!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="86fc39ea-c9e9-461a-9b44-1b5028c54c4c",e._sentryDebugIdIdentifier="sentry-dbid-86fc39ea-c9e9-461a-9b44-1b5028c54c4c")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3028],{99836:function(e,t,n){n.d(t,{Z:function(){return a}});var r=n(23099),i=n(2784);function a(e,t){let n=(0,i.useRef)();(0,i.useEffect)(()=>{n.current=t},[t]),(0,i.useEffect)(()=>{let t=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.current(...t)};return r.Z.on(e,t),()=>r.Z.off(e,t)},[e])}},54223:function(e,t,n){n.d(t,{Rm:function(){return u},Xb:function(){return d},ZP:function(){return p}});var r=n(52322);n(2784);var i=n(93888),a=n(44216);let o=i.ZP.div.withConfig({componentId:"sc-ae56e813-0"})(["a{text-decoration:none;}display:flex;flex-direction:column;align-items:center;margin-top:",";.title{","}.sub-text{"," color:rgba(0,0,0,0.4);margin:"," 0;}.signin-link{"," margin:"," 0;& > a{text-decoration:underline;}& > span{opacity:0.6;}}"],a.j9(12),a.nP.sans.a,a.nP.sans.c,a.j9(2),a.fL.a,a.j9(6)),s=i.ZP.div.withConfig({componentId:"sc-ae56e813-1"})(["display:flex;flex-direction:column;border:0.5px solid rgba(0,0,0,0.4);& > a:not(:first-child){border-top:0.5px solid rgba(0,0,0,0.4);}"]),l=i.ZP.a.withConfig({componentId:"sc-ae56e813-2"})(["color:"," !important;position:relative;display:flex;align-items:center;width:",";height:",";transition:background-color ",";.logo{margin:",";width:55px;.logo-img{width:100%;}}.hub-text-content{display:flex;flex-direction:column;justify-content:center;.hub-name{",";line-height:",";}.hub-sub-text{display:flex;",";color:rgba(0,0,0,0.5);.separator{margin:0 ",';}}}&::after{content:"";position:absolute;height:16px;width:16px;right:0;margin:',";padding:",";background-image:url(",");background-size:10px;background-repeat:no-repeat;background-position:center center;opacity:0.4;}&:hover{cursor:pointer;background-color:rgba(0,0,0,0.05);&::after{opacity:1;}}"],a.Af,e=>e.$small?"auto":"580px",e=>e.$small?"80px":"100px",a.NS.fast,e=>e.$small?"0 ".concat(a.j9()):"0 ".concat(a.j9(1.5)),e=>e.$small?"".concat(a.fL.a):"".concat(a.nP.sans.c),a.j9(2),a.fL.b,a.j9(.6),a.j9(.5),a.j9(),"/_next/static/media/icon-rarrow.f67d04cf.png"),c=i.ZP.a.withConfig({componentId:"sc-ae56e813-3"})(["",";position:relative;margin:"," 0;color:rgba(0,0,0,0.4) !important;transition:",";text-decoration:none;margin:",' !important;border-radius:100%;&::before{content:"";height:16px;width:16px;margin:',";padding:",";background-image:url(",");background-size:24px;background-repeat:no-repeat;background-position:center center;opacity:0.8;}&:hover{cursor:pointer;color:rgba(0,0,0,1);&::before{opacity:1;}}"],a.fL.a,a.j9(2),a.NS.fast,a.j9(.5),a.j9(.5),a.j9(),"/_next/static/media/icon-create.7f28e3dd.png"),d=e=>{let{acc:t,small:n,isEmailVerified:i}=e,a=t.team_account.account_options.hub_name,o=t.team_account.team_name,s=t.team_domain.host,c=t.id;return(0,r.jsxs)(l,{href:t.requires_sso?t.sso_url:i?"/api/v2/auth/login/".concat(c):"".concat(window.location.protocol,"//").concat(s).concat(window.location.port?":".concat(window.location.port):"","/auth"),$small:n,className:"fs-select-hub","data-sentry-element":"HubContainer","data-sentry-component":"Hub","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)("div",{className:"logo",children:t.logo_positive?(0,r.jsx)("img",{src:t.logo_positive,className:"logo-img"}):null}),(0,r.jsxs)("div",{className:"hub-text-content",children:[(0,r.jsx)("h5",{className:"hub-name",children:o||a}),(0,r.jsxs)("div",{className:"hub-sub-text",children:[(0,r.jsx)("p",{children:a}),n?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"separator",children:"•"}),(0,r.jsx)("p",{children:s})]})]})]})]})},u=e=>{let t="".concat("https://niice.co","/auth/signup?email=").concat(e.email?e.email:"");return(0,r.jsx)(c,{className:"fs-create-new-hub",href:t,"data-sentry-element":"CreateNewHub","data-sentry-component":"CreateNewHubLink","data-sentry-source-file":"index.tsx",children:e.children})};var p=e=>{var t,n;let{accounts:i,isEmailVerified:a}=e;if(!i||0===i.length)return(0,r.jsxs)(o,{children:[(0,r.jsx)("div",{className:"title",children:"No accounts found!"}),(0,r.jsx)(c,{href:"/auth/signup"}),(0,r.jsx)("div",{className:"signin-link",children:(0,r.jsx)("a",{href:"/auth",children:"Sign in with a different email"})})]});let l=(null===(t=i.find(e=>e.first_name))||void 0===t?void 0:t.first_name)||"",p=(null===(n=i.find(e=>e.email))||void 0===n?void 0:n.email)||"";return(0,r.jsxs)(o,{"data-sentry-element":"PageContainer","data-sentry-component":"Accounts","data-sentry-source-file":"index.tsx",children:[(0,r.jsxs)("h2",{className:"title",children:["Welcome back",", ".concat(l),"!"]}),(0,r.jsx)("p",{className:"sub-text",children:"Choose a hub to sign in to:"}),(0,r.jsx)(s,{"data-sentry-element":"Hubs","data-sentry-source-file":"index.tsx",children:i.map(e=>(0,r.jsx)(d,{acc:e,isEmailVerified:a},e.id))}),(0,r.jsx)(u,{email:p,"data-sentry-element":"CreateNewHubLink","data-sentry-source-file":"index.tsx",children:"Create new hub"}),(0,r.jsxs)("div",{className:"signin-link",children:[(0,r.jsx)("span",{children:"Not seeing your hub? "}),(0,r.jsx)("a",{href:"/auth",children:"Sign in with a different email"})]})]})}},76582:function(e,t,n){var r=n(52322);n(2784);var i=n(93888),a=n(44216),o=n(23072);let s=i.ZP.span.withConfig({componentId:"sc-7d87c282-0"})(["border-radius:",";user-select:none;width:",";height:",";",";box-sizing:content-box;display:inline-block;background-color:",";border:",";",";position:relative;"," transition:transform ",",background-color 5s,width ",",height ",",margin-top ",';&:first-child{margin-left:0;}&:after{content:"";display:block;width:',";height:",";background-color:",";border-radius:50%;position:absolute;top:0;opacity:0.5;"," transition:opacity ",",width ",",height ",";}"],e=>e.$square?"none":"50%",e=>e.$small?a.j9(2):a.j9(3),e=>e.$small?a.j9(2):a.j9(3),e=>{let{$size:t}=e;switch(t){case"small":return(0,i.iv)(["width:",";height:",";"],a.j9(2),a.j9(2));case"default":return(0,i.iv)(["width:",";height:",";"],a.j9(3),a.j9(3));case"large":return(0,i.iv)(["width:",";height:",";"],a.j9(4),a.j9(4));case"x-large":return(0,i.iv)(["width:",";height:",";"],a.j9(5),a.j9(5));case"xx-large":return(0,i.iv)(["width:",";height:",";"],a.j9(7.5),a.j9(7.5))}},e=>e.$color?e.$color:a.Af,e=>e.$borderless?"none":"2px solid #ffffff",e=>e.$negative&&"border-color: "+a.Af+";",e=>!e.$active&&(0,i.iv)(["width:",";height:",";margin-top:3px;"],a.j9(2.5),a.j9(2.5)),a.NS.fast,a.NS.fast,a.NS.fast,a.NS.fast,a.j9(2.5),a.j9(2.5),e=>e.$bgColor||"white",e=>e.$active&&(0,i.iv)(["width:",";height:",";opacity:0;"],a.j9(3),a.j9(3)),a.NS.fast,a.NS.fast,a.NS.fast),l=i.ZP.span.withConfig({componentId:"sc-7d87c282-1"})(["pointer-events:none;position:absolute;color:white;top:50%;left:50%;",";",";transform:translate(-50%,-50%);line-height:1;",";"],e=>e.$small?a.nP.sans.f:a.nP.sans.d,e=>{let{$size:t}=e;switch(t){case"small":return(0,i.iv)(["",";letter-spacing:0;"],a.nP.sans.f);case"default":case"large":return(0,i.iv)(["",";"],a.nP.sans.d);case"x-large":return(0,i.iv)(["",";letter-spacing:0;"],a.nP.sans.c);case"xx-large":return(0,i.iv)(["",";"],a.nP.sans.c)}},e=>e.$small&&"letter-spacing: 0"),c=i.ZP.span.withConfig({componentId:"sc-7d87c282-2"})(["display:block;width:100%;padding-bottom:100%;border-radius:",";position:relative;background:url(",") no-repeat center;background-size:cover;image-rendering:crisp-edges;"],e=>e.$square?"none":"50%",e=>e.$src);function d(e){let{user:t}=e,n=(0,o.u_)(null==t?void 0:t.email),i=String((null==t?void 0:t.display_name)||(null==t?void 0:t.email)||"").split(" ").map(e=>e.length&&-1===e.toLowerCase().indexOf("pending")?e[0]:"").join("").toUpperCase().replace(/\W/g,"");return(0,r.jsxs)(s,{$negative:e.negative,$color:n||"#212121",$small:e.small,$size:e.size?e.size:"default",$borderless:e.borderless,className:e.className,style:{zIndex:"-"+e.zindex,...e.style},$active:e.active,$bgColor:e.bgColor,$square:e.square,"data-sentry-element":"AvatarHolder","data-sentry-component":"Avatar","data-sentry-source-file":"index.tsx",children:[i&&(0,r.jsx)(l,{$small:e.small,$size:e.size?e.size:"default",children:i}),(null==t?void 0:t.transparent_avatar)&&(0,r.jsx)(c,{$square:e.square,$src:t.transparent_avatar})]})}d.defaultProps={active:!0,style:{}},t.Z=d},93771:function(e,t,n){n.d(t,{Z:function(){return p}});var r=n(52322),i=n(2784),a=n(93888),o=n(44216),s=n(76542),l=n(76839),c=n(45496);let d=(0,a.ZP)("span").withConfig({componentId:"sc-28adcfc2-0"})(["width:0;height:0;border-style:solid;border-width:5px 4px 4px 4px;border-color:"," transparent transparent transparent;margin-left:",";"],e=>e.$negative?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.4)",o.j9(.5)),u=(0,a.ZP)("button").withConfig({componentId:"sc-28adcfc2-1"})(["",";background-color:transparent;display:flex;align-items:center;margin-right:-16px;&:hover ","{border-color:"," transparent transparent transparent;}"],o.mc,d,e=>e.$negative?"white":"black");function p(e){let{user:t,negative:n}=e,[a,o]=(0,i.useState)(null),p=(0,c.nE)(t);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(u,{ref:o,$negative:n,"data-sentry-element":"Wrapper","data-sentry-source-file":"index.tsx",children:[(0,r.jsx)(c.qE,{initials:p,colorSeed:null==t?void 0:t.email,"data-sentry-element":"Avatar","data-sentry-source-file":"index.tsx"}),(0,r.jsx)(d,{$negative:n,"data-sentry-element":"DropdownArrow","data-sentry-source-file":"index.tsx"})]}),(0,r.jsx)(s.Z,{horizontalTipAdjustment:"-6px",horizontalAdjustment:"-24px",target:a,contentFixed:!0,tooltip:(0,r.jsxs)(r.Fragment,{children:[null==t?void 0:t.display_name,(0,r.jsxs)("small",{children:["Click for settings, resources,",(0,r.jsx)("br",{}),"sign out & more"]})]}),"data-sentry-element":"Popover","data-sentry-source-file":"index.tsx",children:(0,r.jsx)(l.Z,{user:t,"data-sentry-element":"ProfilePopoverContent","data-sentry-source-file":"index.tsx"})})]})}},76839:function(e,t,n){n.d(t,{Z:function(){return x}});var r=n(52322),i=n(93888),a=n(39097),o=n.n(a),s=n(44216),l=n(34678),c=n(76582),d=n(42226),u=n(23072),p=n(54223);let h=e=>{l.h.persist.clear().then(()=>{console.log("Persisted state has been removed"),window.location.assign("/sign-out")})},m=(0,i.ZP)("div").withConfig({componentId:"sc-2a94be88-0"})(["min-width:",";max-height:calc(100vh - ",");overflow-y:auto;text-align:left;"," scrollbar-width:thin;&::-webkit-scrollbar{width:8px;}&::-webkit-scrollbar-track{background:white;}&::-webkit-scrollbar-thumb{background-color:rgb(0 0 0 / 0.2);border-radius:20px;border:2px solid white;&:hover{background-color:gray;}}header{display:grid;grid-template-columns:"," auto;gap:",";padding:"," "," "," ",";.email{",";line-height:",";color:rgb(0 0 0 / 0.6);}a{grid-column:span 2;}}hr{",";border-top:1px solid rgb(0 0 0 /0.1);margin-top:",";}li{.link{",";display:block;padding:"," ",";transition:background-color ",";cursor:pointer;color:black;&:hover{background:rgb(0 0 0 / 0.05);}}&:last-child .link{padding-bottom:",";}&:first-child .link{padding-top:",";}}.link-group{border-top:1px solid rgb(0 0 0 /0.1);.group-label{"," color:rgb(0 0 0 / .6);line-height:",";padding:"," "," ",";}a:hover{text-decoration:none;}}.hub-container{a{text-decoration:none !important;}}"],s.j9(20),s.j9(12),s.fL.a,s.j9(3.5),s.j9(.5),s.j9(),s.j9(),s.j9(),s.j9(.75),s.fL.b,s.j9(1),s.mc,s.j9(.25),s.mc,s.j9(.5),s.j9(),s.NS.fast,s.j9(1.5),s.j9(1.5),s.fL.b,s.j9(1.5),s.j9(),s.j9(),s.j9(.5)),g=i.ZP.div.withConfig({componentId:"sc-2a94be88-1"})(["",""],e=>{let{theme:t}=e;return(0,i.iv)(["grid-column:span 2;cursor:pointer;margin-top:",";.upgrade-button{background:",";color:",";border-radius:100px;display:inline-block;margin-right:",";padding:"," ",";transition:opacity ",";&:hover{filter:brightness(",");color:",";opacity:0.9;}}.counter{",";opacity:0.6;}"],s.j9(.5),t.buttonBg,u.ZP.isDark(t.buttonBg)?"white":s.Af,s.j9(.5),s.j9(.25),s.j9(.75),s.NS.fast,u.ZP.isDark(t.buttonBg)?1.1:.9,u.ZP.isDark(t.buttonBg)?"white":s.Af,s.fL.b)}),f=i.ZP.div.withConfig({componentId:"sc-2a94be88-2"})(["display:flex;flex-direction:column;justify-content:center;padding-bottom:",";a{padding-top:",";}"],s.j9(),s.j9());function x(e){var t,n;let{user:i}=e,a=(null==i?void 0:i.pro)||!1,s=(null==i?void 0:i.free_moodboards)||0,u=(null==i?void 0:i.number_of_moodboards)||0,x=(0,l.Kw)(e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.hasPermission("manage-account-settings")}),v=(0,l.Kw)(e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.hasPermission("secondary-nav")}),b=(0,l.Kw)(e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.isEmailVerified}),j=(0,l.Kw)(e=>{var t;return null===(t=e.user)||void 0===t?void 0:t.availableHubs}),y=null==j?void 0:j.filter(e=>e.id!==i.id);return(0,r.jsxs)(m,{"data-sentry-element":"Wrapper","data-sentry-component":"ProfilePopoverContent","data-sentry-source-file":"index.jsx",children:[(0,r.jsxs)("header",{children:[(0,r.jsx)(c.Z,{user:i,"data-sentry-element":"Avatar","data-sentry-source-file":"index.jsx"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"name",children:null==i?void 0:i.display_name}),(0,r.jsx)("p",{className:"email",children:null==i?void 0:i.email})]}),!a&&x?(0,r.jsx)(o(),{href:"/upgrade",children:(0,r.jsxs)(g,{children:[(0,r.jsx)("span",{className:"upgrade-button",children:"Upgrade"}),(0,r.jsxs)("span",{className:"counter",children:[s-u<1?"No":s-u+"/"+s," ","free boards remaining"]})]})}):null]}),(0,r.jsxs)("ul",{className:"link-group",children:[(0,r.jsx)("h3",{className:"group-label",children:"Account"}),(0,r.jsx)(d.Z,{tooltip:(0,r.jsx)(r.Fragment,{children:"Manage your account, change your password, &\xa0more"}),type:"floater",placement:"right","data-sentry-element":"Tooltip","data-sentry-source-file":"index.jsx",children:(0,r.jsx)("li",{children:(0,r.jsx)(o(),{href:"/settings","data-sentry-element":"Link","data-sentry-source-file":"index.jsx",children:(0,r.jsx)("span",{className:"link",children:"Settings"})})})}),(0,r.jsx)(d.Z,{tooltip:(0,r.jsxs)(r.Fragment,{children:["Sign out of"," ",(null==i?void 0:null===(t=i.team_account)||void 0===t?void 0:t.team_name)?"the "+(null==i?void 0:null===(n=i.team_account)||void 0===n?void 0:n.team_name):"this"," ","hub"]}),type:"floater",placement:"right","data-sentry-element":"Tooltip","data-sentry-source-file":"index.jsx",children:(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"link",onClick:()=>h(),children:"Sign out"})})})]}),v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("ul",{className:"link-group",children:[(0,r.jsx)("h3",{className:"group-label",children:"Tools & Resources"}),(0,r.jsx)(d.Z,{tooltip:(0,r.jsx)(r.Fragment,{children:"Search for ideas"}),type:"floater",placement:"right",children:(0,r.jsx)("li",{children:(0,r.jsx)(o(),{href:"https://niice.co/inspiration",children:(0,r.jsx)("span",{className:"link",children:"Inspiration"})})})}),(0,r.jsx)(d.Z,{tooltip:(0,r.jsx)(r.Fragment,{children:"Read the latest product news & updates"}),type:"floater",placement:"right",children:(0,r.jsx)("li",{children:(0,r.jsx)(o(),{href:"https://niice.co/blog",children:(0,r.jsx)("span",{className:"link",children:"Blog"})})})})]}),(0,r.jsx)("ul",{className:"link-group",children:(0,r.jsx)(d.Z,{tooltip:(0,r.jsxs)(r.Fragment,{children:["Easily add content to your boards from around the web",(0,r.jsx)("small",{children:"Available for Chrome, Safari &\xa0Firefox"})]}),type:"floater",placement:"right",children:(0,r.jsx)("li",{children:(0,r.jsx)(o(),{href:"https://niice.co/apps",children:(0,r.jsx)("span",{className:"link",children:"Get the browser extension"})})})})})]}):null,(0,r.jsxs)(f,{"data-sentry-element":"HubsContainer","data-sentry-source-file":"index.jsx",children:[(0,r.jsxs)("ul",{className:"link-group",children:[(0,r.jsx)("h3",{className:"group-label",children:"Other hubs"}),(0,r.jsx)("div",{className:"hub-container",children:y.map(e=>(0,r.jsx)(p.Xb,{small:!0,acc:e,isEmailVerified:b},e.id))})]}),(0,r.jsx)(p.Rm,{email:i.email,"data-sentry-element":"CreateNewHubLink","data-sentry-source-file":"index.jsx",children:"Create new hub"})]})]})}},76542:function(e,t,n){n.d(t,{X:function(){return y}});var r=n(52322),i=n(2784),a=n(26194),o=n(6364),s=n(55096),l=n(93888),c=n(44216),d=n(99836),u=n(23099);let p={top:(0,l.F4)(["0%{transform:translateY(12px);opacity:0}100%{transform:translateY(0px);opacity:1}"]),bottom:(0,l.F4)(["0%{transform:translateY(-12px);opacity:0}100%{transform:translateY(0px);opacity:1}"]),left:(0,l.F4)(["0%{transform:translateX(12px);opacity:0}100%{transform:translateX(0px);opacity:1}"]),right:(0,l.F4)(["0%{transform:translateX(-12px);opacity:0}100%{transform:translateX(0px);opacity:1}"])},h=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r={top:"bottom",bottom:"top",left:"right",right:"left"}[e];return(0,l.iv)(['&[data-popper-placement^="','"]{margin-',":",";& > .popover-animator{animation:"," "," ",";& > #arrow{",":-10px;border-",":5px solid ",";}}}"],e,r,c.j9(),p[n?r:e],c.NS.fast,n?"cubic-bezier(0.485, 0.605, 0.06, 1.48) 1;":"ease-out",r,e,t?"white":c.Af)},m=l.ZP.div.withConfig({componentId:"sc-9ffc15a9-0"})(["z-index:999999;"," "," "," ",""],h("top",!0,!1),h("bottom",!0,!1),h("left",!0,!1),h("right",!0,!1)),g=l.ZP.div.withConfig({componentId:"sc-9ffc15a9-1"})(["box-shadow:0 0 12px rgba(0,0,0,0.2);background-color:white;position:relative;",""],e=>e.$horizontalAdjustment&&(0,l.iv)(["left:",";"],e.$horizontalAdjustment)),f=l.ZP.div.withConfig({componentId:"sc-9ffc15a9-2"})(["width:0;height:0;z-index:999999;border:5px solid transparent;",""],e=>e.$horizontalTipAdjustment&&(0,l.iv)(["left:"," !important;"],e.$horizontalTipAdjustment)),x=l.ZP.div.withConfig({componentId:"sc-9ffc15a9-3"})(["z-index:999999;"," "," "," ",""],e=>{let{$negativeTooltip:t}=e;return h("top",t,!0)},e=>{let{$negativeTooltip:t}=e;return h("bottom",t,!0)},e=>{let{$negativeTooltip:t}=e;return h("left",t,!0)},e=>{let{$negativeTooltip:t}=e;return h("right",t,!0)}),v=l.ZP.div.withConfig({componentId:"sc-9ffc15a9-4"})(["",";border:1px solid ",";background-color:",";color:",";position:relative;max-width:180px;text-align:center;padding:3px 6px;box-shadow:0 0 "," rgba(0,0,0,0.2);small{",";line-height:",";display:block;opacity:0.6;}"],c.fL.b,e=>e.$negativeTooltip?"white":c.Af,e=>e.$negativeTooltip?"white":c.Af,e=>e.$negativeTooltip?c.Af:"white",c.j9(),c.fL.c,c.j9(1.5));function b(e){let{target:t,tooltip:n,negativeTooltip:s,contentFixed:l,tooltipFixed:c,contentPlacement:p,tooltipPlacement:h,clickOutsideToDismiss:b,horizontalAdjustment:j,horizontalTipAdjustment:y}=e,w=(0,i.useRef)((0,o.Z)()),[k,N]=(0,i.useState)(!1),[P,$]=(0,i.useState)(null),[Z,C]=(0,i.useState)(null),[_,L]=(0,i.useState)(null),[A,E]=(0,i.useState)(!1),[S,z]=(0,i.useState)(null),{styles:I,attributes:F,update:T}=(0,a.D)(t,S,{placement:p,strategy:l?"fixed":"absolute",modifiers:[{name:"arrow",options:{element:Z}},{name:"preventOverflow",options:{padding:24}}]}),{styles:D,attributes:q,update:H}=(0,a.D)(t,P,{placement:h,strategy:c?"fixed":"absolute",modifiers:[{name:"arrow",options:{element:_}}]}),O=()=>{N(!1)},X=()=>{null==T||T(),null==H||H()};return((0,d.Z)("ui:close-popovers",O),(0,d.Z)("ui:close_popovers",O),(0,d.Z)("ui:notifications:create",X),(0,d.Z)("ui:notifications:close",X),(0,d.Z)("ui:refreshPopoverLocation",X),(0,i.useEffect)(()=>{var t,n;k?null===(t=e.onOpen)||void 0===t||t.call(e):null==e||null===(n=e.onClose)||void 0===n||n.call(e)},[k,e.onOpen,e.onClose]),(0,i.useEffect)(()=>{t&&t.setAttribute("data-popover-target","true")},[t]),(0,i.useEffect)(()=>{let n=()=>{!k&&e.group&&u.Z.trigger("ui:close_popover_group",{group:e.group,exclude:e.id}),N(e=>!e)},r=()=>E(!0),i=()=>E(!1);if(t)return t.addEventListener("click",n),t.addEventListener("touchstart",n),t.addEventListener("mouseenter",r),t.addEventListener("mouseleave",i),()=>{t.removeEventListener("click",n),t.removeEventListener("touchstart",n),t.removeEventListener("mouseenter",r),t.removeEventListener("mouseleave",i)}},[t,k,N,E]),(0,d.Z)("ui:close_popover_group",t=>{let{group:n,exclude:r}=t;n===e.group&&e.id!==r&&N(!1)}),(0,i.useEffect)(()=>{if(!b)return;let e=e=>{var t,n,r;let i=[!!(null===(t=e.target)||void 0===t?void 0:t.closest(".popover-".concat(w.current))),!!(null===(n=e.target)||void 0===n?void 0:n.closest(".in-popover")),!!(null===(r=e.target)||void 0===r?void 0:r.closest("[data-popover-target]"))];requestAnimationFrame(()=>{i.includes(!0)||O()})};return k?requestAnimationFrame(()=>{document.addEventListener("mousedown",e),document.addEventListener("touchstart",e)}):(document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}},[k,b]),k)?(0,r.jsx)(m,{className:"popover-".concat(w.current),ref:z,style:null==I?void 0:I.popper,...null==F?void 0:F.popper,children:(0,r.jsxs)("div",{className:"popover-animator",children:[(0,r.jsx)(f,{id:"arrow",ref:C,style:null==I?void 0:I.arrow,$horizontalTipAdjustment:y}),(0,r.jsx)(g,{$horizontalAdjustment:j,children:e.children})]})}):A&&n?(0,r.jsx)(x,{className:"in-dialogue",ref:$,$negativeTooltip:s,style:null==D?void 0:D.popper,...null==q?void 0:q.popper,children:(0,r.jsxs)("div",{className:"popover-animator",children:[(0,r.jsx)(f,{id:"arrow",ref:L,style:null==D?void 0:D.arrow}),(0,r.jsx)(v,{$negativeTooltip:s,children:e.tooltip})]})}):null}let j=()=>{};function y(e){return(0,r.jsx)(s.Z,{"data-sentry-element":"Portal","data-sentry-component":"PopoverWithPortal","data-sentry-source-file":"index.tsx",children:(0,r.jsx)(b,{...e,"data-sentry-element":"Popover","data-sentry-source-file":"index.tsx"})})}b.defaultProps={onOpen:j,onClose:j,clickOutsideToDismiss:!0,contentFixed:!1,tooltipFixed:!1},t.Z=b}}]);