@epigraph/configurator 1.7.4 → 1.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -6
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -8846,19 +8846,19 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var ue=pe(W,re,H,K,J+"."
|
|
|
8846
8846
|
Dependency:
|
|
8847
8847
|
`;for(const pe of W)V+=`- ${pe}
|
|
8848
8848
|
`}for(const pe of W)V+=`- ${pe}
|
|
8849
|
-
`;N(V)},[R]),j=oe.useCallback(()=>{a.isMobile!==!0&&D!==!0&&(k(!0),!Jt.getState().CORE_API.sceneSettings.draggableUI&&(L===!0?(N(null),r(n)):G()))},[L,D,R]),Q=oe.useCallback(()=>{a.isMobile!==!0&&(k(!1),!Jt.getState().CORE_API.sceneSettings.draggableUI&&(window.mouseDragging||L===!0&&t&&t()))},[L,D]),H=oe.useCallback(J=>{J.preventDefault(),J.stopPropagation(),document.body.style.touchAction="none",Jt.getState().CORE_API.sceneSettings.draggableUI!==!1&&L!==!1&&(window.pointerDownPos=J.offsetX,window.mouseDragging=!1,window.mouseDownImgSrc=a.getResolvedAssetUrl(_),window.mouseDownSkuID=n)},[L]),K=oe.useCallback(J=>{const W=b.lookDetails[u];W.productCategory={id:b.categoryID,label:b.categoryLabel},a.isMobile===!0?(o(W),l(!0)):(J.stopPropagation(),L&&t&&t(),o(W),l(!0))},[L,u,b]);return ne(hi,{children:ne("div",{className:i?"imageContainer active":"imageContainer",draggable:!1,children:[ne("div",{className:"contentContainer",children:[ne("div",{id:"itemCard"+n,className:"contentOverlay ".concat(`${L===!0&&D===!0?"enabled-item-overlay":"disabled-item-overlay"}`),ref:s,onClick:J=>U(J),onTouchStart:J=>H(J),onMouseEnter:j,onMouseLeave:Q,onMouseDown:H,children:ne("img",{draggable:!1,className:"addIcon",src:Vr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:287,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:271,columnNumber:11},globalThis),ne("img",{className:"product-image product-image-default-state ".concat(`${L===!1?"product-image-disabled":""}`),draggable:!1,alt:x,src:a.getResolvedAssetUrl(_)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:294,columnNumber:11},globalThis),ne("div",{className:"spawning-requirements-container",hidden:!(L===!1&&D===!0&&R),children:ne("p",{className:"spawning-requirements-text",children:R},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:307,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:303,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:270,columnNumber:9},globalThis),ne("div",{className:a.isMobile?"showAlways itemDetails":"itemDetails",onClick:K,children:[ne("div",{className:"item-details-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:317,columnNumber:11},globalThis),ne("p",{className:"truncate",children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:318,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:311,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:266,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:265,columnNumber:5},globalThis)},$Oe=({visible:r})=>{const e=Za(h=>h),t=ol(h=>h.allActiveVariants),n=of(h=>h.infoObject),i=of(h=>h.infoModalOpen),a=of(h=>h.updateInfoModalOpen),[s,o]=oe.useState(""),[l,u]=oe.useState([]),f=Jt(h=>h.CORE_API);return oe.useEffect(()=>{Object.keys(e.categoryData).length!=0&&u(e.categoryData.build)},[e.categoryData]),oe.useEffect(()=>(o(t[Object.keys(t)[0]]),()=>{}),[t]),ne(hi,{children:ne("div",{className:i?"infoModal open":"infoModal",children:[ne("button",{className:"closeButton",onClick:()=>{a(!1)},children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:51,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:45,columnNumber:9},globalThis),ne("a",{href:n.productPageUrl,className:"categoryLink",target:"_blank",style:n?.productPageUrl?{pointerEvents:"all"}:{pointerEvents:"none"},children:[ne("h2",{className:"categoryTitle",children:n?.productCategory?.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:63,columnNumber:11},globalThis),n.productPageUrl&&ne("img",{src:Vr+"/Icon/OpenTab.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:68,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:53,columnNumber:9},globalThis),ne("div",{className:"infoModalImageContainer",children:n?.thumbnails?.high?ne("img",{className:"itemImage",src:f.getResolvedAssetUrl(n.thumbnails.high)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:75,columnNumber:13},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:73,columnNumber:9},globalThis),ne("div",{className:"infoModalTextContainer",children:[ne("h2",{className:"itemTitle",children:n.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:86,columnNumber:11},globalThis),ne("pre",{className:"itemDescription",children:n.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:87,columnNumber:11},globalThis),n.boundingBoxSize?ne("p",{className:"infoModalDimensions",children:[n.boundingBoxSize.x.toFixed(1),"” W x"," ",n.boundingBoxSize.y.toFixed(1),"” D x"," ",n.boundingBoxSize.z.toFixed(1),"” H"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:90,columnNumber:13},globalThis):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:85,columnNumber:9},globalThis),ne("div",{className:"infoModalActions",children:ne("button",{className:"item-price",disabled:!0,children:n.price&&`$${k6(parseFloat(n.price).toFixed(2))}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:101,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:100,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:44,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:43,columnNumber:5},globalThis)};function KOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l}){return ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:r.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:36,columnNumber:7},this),ne("div",{className:"sidemenuContent",children:ne("div",{className:"item-grid",children:r.skus.map(u=>ne(Mne,{skuId:u,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,categoryDataIndex:e,setItemAllowed:o,active:l.includes(u)},"itemCardB"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:41,columnNumber:13},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:39,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:38,columnNumber:7},this),e!==t-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:58,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:35,columnNumber:5},this)}function ZOe({categoryID:r,index:e,categories:t,activeTab:n,tabsRef:i,mobileGrid:a}){const s=oe.useCallback(o=>{if(a.current.scrollLeft===o)return;let l,u,f,h=!1;function p(m){l===void 0&&(l=m);const y=m-l;if(u!==m){const E=y/200;a.current.scrollLeft>o?(f=(a.current.scrollLeft-o)*Math.min(E,1),a.current.scrollLeft-=f,a.current.scrollLeft===o&&(h=!0)):a.current.scrollLeft<o&&(f=(o-a.current.scrollLeft)*Math.min(E,1),a.current.scrollLeft+=f,a.current.scrollLeft===o&&(h=!0))}y<200&&(u=m,!h&&window.requestAnimationFrame(p))}window.requestAnimationFrame(p)},[]);return ne(hi,{children:ne("a",{className:n===e?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let o=0;o<t.length;o++)o===e&&s(i.current[o].offsetLeft)},children:t[r].label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:130,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:129,columnNumber:5},this)}function JOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l,tabsRef:u}){return ne(hi,{children:[ne("section",{id:`section-${r.categoryID}`,className:"mobileGridSection",ref:f=>u.current[e]=f,children:r.skus.map(f=>ne(Mne,{skuId:f,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,setItemAllowed:o,active:l.includes(f)},"itemCardB"+f,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:176,columnNumber:11},this))},"mobileGridSection"+e,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:169,columnNumber:7},this),e!==t-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:191,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:168,columnNumber:5},this)}const QX=({visible:r})=>{const e=Za(w=>w),[t,n]=oe.useState([]),i=of(w=>w.infoModalOpen),[a,s]=oe.useState(0),[o,l]=oe.useState(!1),[u,f]=oe.useState([]),h=of(w=>w.populateInfoObject),p=of(w=>w.updateInfoModalOpen),m=Jt(w=>w.CORE_API),y=oe.useRef(null),E=oe.useCallback(w=>{let R=[];for(const[N,L]of Object.entries(w))R.push(L);f(R)},[]);Tr(m.EVENTS.UI.ContextMenu_InfoBtnClicked,w=>{const R=w.itemData.lookDetails[w.currentVariant];let N=R;N.price=R.price,N.id=w.currentVariant,N.productCategory={id:w.itemData.categoryID,label:w.itemData.categoryLabel},h(N),p(!0)}),Tr(m.EVENTS.UI.ContextMenu_Hide,w=>{ly.info({title:"Context Menu Closed"})}),Tr(m.EVENTS.SCENE.ReplaceableCategory_Updated,E),oe.useEffect(()=>{const w=m.getCurrentItemsInReplaceableCategory();return E(w),()=>{}},[m]),oe.useEffect(()=>{Object.keys(e.categoryData).length!==0&&n(e.categoryData.build)},[e.categoryData]);const b=oe.useCallback((w,R)=>{Jt.getState().CORE_API.spawnItemBySkuID(w,R)},[]),v=oe.useCallback(w=>{Jt.getState().CORE_API.spawnGhostsForSkuID(w,!1,1)},[]),x=oe.useCallback(w=>{i||Jt.getState().CORE_API.removeAllGhosts(w)},[i]),S=oe.useRef([]);oe.useEffect(()=>{S.current=S.current.slice(0,t.length)},[t]);const _=oe.useCallback(()=>{let w=-3e3,R=-1;for(let N=0;N<t.length;N++){let L=S.current[N].getBoundingClientRect().left;L<28&&w<L&&(w=L,R=N)}R!==-1&&s(R)},[S,t]);return ne(hi,{children:[ne("div",{className:"mobileTabContent",hidden:!r,children:ne("div",{className:"scrollSpyTabs",children:[ne("div",{className:"secondMobileTabs",children:Object.keys(t).map((w,R)=>ne(ZOe,{categoryID:w,index:R,categories:t,activeTab:a,tabsRef:S,mobileGrid:y},"mobileTabs"+w,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:318,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:316,columnNumber:11},globalThis),ne("div",{className:"mobileGrid",ref:y,onScroll:_,children:t.map((w,R)=>ne(JOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,tabsRef:S,elementsLength:t.length},"mobileGrid"+R,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:331,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:329,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:315,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:314,columnNumber:7},globalThis),ne("div",{className:"container desktop",hidden:!r,children:t.map((w,R)=>ne(KOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,elementsLength:t.length},`category_${w.categoryID}_${R}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:352,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:350,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:313,columnNumber:5},globalThis)},e2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalVariant(r,e)};function t2e(r,e){return ne(hi,{children:r!==e.length-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:20,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:18,columnNumber:5},this)}const n2e=({visible:r})=>{const e=Za.getState().categoryData.color,t=ol(s=>s.allActiveVariants),n=Jt(s=>s.materialOverrideExists),i=Jt(s=>s.CORE_API),a=oe.useCallback(()=>{Jt.getState().CORE_API.removeAllVariantOverrides()},[]);return ne(hi,{children:ne("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:[n&&ne("button",{className:"removeAllColorOverridesButton",onClick:a,disabled:!n,children:"Remove all overrides"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:47,columnNumber:11},globalThis),e.map((s,o)=>ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:s.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:62,columnNumber:15},globalThis),ne("div",{className:"sidemenuContent",children:ne("div",{className:"color-grid color-variants-selection",children:s.looks.map((l,u)=>ne("div",{onClick:()=>e2e(s.id,l),className:t[s.id]==l?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:82,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:81,columnNumber:29},globalThis),ne("img",{className:"contextColorThumbnail",src:i.getResolvedAssetUrl(Za.getState().lookData[l]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:89,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:80,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:79,columnNumber:25},globalThis),ne("div",{className:"colorDetails",children:[ne("p",{className:"truncate colorDetailsLabel",children:xy(Za.getState().lookData[l]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:99,columnNumber:27},globalThis),ne("p",{className:"truncate colorDetailsLabel",children:xy(Za.getState().lookData[l]?.accent)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:104,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:98,columnNumber:25},globalThis)]},"Color-"+u,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:68,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:65,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:64,columnNumber:15},globalThis),ne(t2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:117,columnNumber:15},globalThis)]},`${s.label}-${o}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:58,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:39,columnNumber:5},globalThis)},Rne=Do((r,e)=>({activeHotspotData:null,activeFeatureID:"",actions:{enterHotspotInFeaturesTab(n){Jt.getState().sideMenuState!==2&&Jt.setState({sideMenuState:2}),r({activeFeatureID:n})},exitHotspot(){r({activeFeatureID:null})}}}));function i2e(r,e){if(r.current.scrollTop===e)return;let t,n,i,a=!1;function s(o){t===void 0&&(t=o);const l=o-t;if(n!==o){const u=l/200;r.current.scrollTop>e?(i=(r.current.scrollTop-e)*Math.min(u,1),r.current.scrollTop-=i,r.current.scrollTop===e&&(a=!0)):r.current.scrollTop<e&&(i=(e-r.current.scrollTop)*Math.min(u,1),r.current.scrollTop+=i,r.current.scrollTop===e&&(a=!0))}l<200&&(n=o,!a&&window.requestAnimationFrame(s))}window.requestAnimationFrame(s)}function WX({carouselTabKey:r,hotspotContentRef:e}){const t=oe.useRef(null),n=Jt(a=>a.CORE_API),i=a=>{a.target.style.width="100%"};return ne(see,{children:ne("div",{className:"carouselTabParent",ref:t,children:[r.type==="img"&&ne("img",{src:n.getResolvedAssetUrl(r.link),alt:r.alt?r.alt:r.type,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:74,columnNumber:11},this),r.type==="video"&&ne(hi,{children:[ne("p",{className:"carouselVideoPlaceholderText",children:r.alt?r.alt:r.type},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:82,columnNumber:13},this),ne("video",{src:n.getResolvedAssetUrl(r.link),muted:!0,loop:!0,autoPlay:!0,playsInline:!0,controls:!1,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:72,columnNumber:7},this)},"SplideSlide-"+r.link,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:71,columnNumber:5},this)}function r2e({tabs:r,tabKey:e,index:t,activeFeatureID:n}){const[i,a]=oe.useState([]),s=oe.useRef(null),o=oe.useRef(null);Jt(p=>p.CORE_API);const l=oe.useRef(null),u=oe.useCallback(p=>{Jt.getState().CORE_API.clickHotspot("hotspot3D_"+p,{ignoreUI:!0})},[]);oe.useEffect(()=>{let p=[],m=e.hotspotData;for(let y=0;y<m.carousel.length;y++)m.carousel[y].type!==""&&m.carousel[y].link!==""&&(p=[...p,{...m.carousel[y],index:y}]);a(p)},[e]),oe.useEffect(()=>{const{current:p}=o;p&&(n===p.id?f(p):h(p))},[n]);const f=oe.useCallback(p=>{p.checked=!0,p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 800px;");let E=p.nextElementSibling.clientHeight*t;i2e(r,E)},[]),h=oe.useCallback(p=>{p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 0px;"),p.checked=!1},[]);return ne(hi,{children:e.hotspotData&&ne("div",{className:"accordionTab",children:[ne("input",{type:"checkbox",name:"accordion",id:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,defaultChecked:!1,ref:o,onClick:p=>{u(e.itemData.skuID+"_"+e.hotspotData.hotspotID,{ignoreUI:!1})}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:169,columnNumber:11},this),ne("label",{className:"tab-label",htmlFor:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,children:[ne("span",{children:e.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:191,columnNumber:13},this),ne("img",{className:"accordion-closed",src:Vr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:192,columnNumber:13},this),ne("img",{className:"accordion-open",src:Vr+"/Icon/Minus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:196,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:185,columnNumber:11},this),ne("div",{className:"tab-content",children:ne("div",{className:"hotspot-content",ref:l,children:[ne(_ee,{className:"ignore",modules:{toolbar:!1},theme:"bubble",readOnly:!0,value:e.hotspotData.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:204,columnNumber:15},this),i.length==1&&i[0].type!=""&&i[0].link!=""&&ne(WX,{carouselTabKey:i[0],index:0,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_0",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:214,columnNumber:19},this),i.length>1&&ne("div",{className:"carousel",children:ne(aee,{options:{perPage:1,preloadPages:3},ref:s,children:i.map((p,m)=>p.type!=""&&p.link!=""&&ne(WX,{carouselTabKey:p,index:m,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_"+p.index,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:241,columnNumber:27},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:230,columnNumber:19},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:229,columnNumber:17},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:203,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:202,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:168,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:166,columnNumber:5},this)}const a2e=({visible:r})=>{const e=Jt(i=>i.tabSpawnCount),t=oe.useRef(null),n=Rne(i=>i.activeFeatureID);return ne(hi,{children:ne("div",{className:"col desktop productFeatureUIDic",hidden:!r,ref:t,children:ne("div",{className:"tabs",children:[e.length==0&&ne("div",{className:"tabEmptyText",children:"*Please add an item to the scene to see the features"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:282,columnNumber:13},globalThis),e.map((i,a)=>ne(r2e,{tabs:t,activeFeatureID:n,tabKey:i,index:a},"tabs_"+i.itemData.skuID+"_"+i.hotspotData.hotspotID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:287,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:280,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:275,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:274,columnNumber:5},globalThis)},s2e=function(r,e){return r.filter(function(t,n){return e!==n})},o2e=function(r,e,t){let n=r.slice();return n[e].quantity=t,n},Fm=Do((r,e)=>({cart:[],cartTotalPrice:0,deleteCartItem:t=>{r(n=>({cart:s2e(n.cart,t)}))},addToCart:t=>{r(n=>({cart:[...n.cart,t]}))},updateQuantity:(t,n)=>{r(i=>({cart:o2e(i.cart,t,n)}))},previewCartModalOpen:!1,togglePreviewCartModal:()=>{const{previewCartModalOpen:t}=e();t===!0?Jt.getState().CORE_API.reviewCartHidden():Jt.getState().CORE_API.reviewCartShown(),r({previewCartModalOpen:!t})},actions:{setCartTotalPrice:t=>{r(()=>({cartTotalPrice:t}))}}})),Ine=({itemObject:r})=>{const e=Jt(a=>a.CORE_API),t=Jt(a=>a.disableCart),[n,i]=oe.useState(e.sceneSettings.currency);return ne(hi,{children:ne("div",{className:r.countUnavailable=="0"||t?"cartItem":"cartItem cartItemOutOfStock",draggable:!1,style:{display:r?"":"none"},children:[ne("div",{className:"cartItemImage",children:ne("img",{draggable:!1,src:e.getResolvedAssetUrl(r.thumbnails.review?r.thumbnails.review:r.thumbnails.low),alt:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:24,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:23,columnNumber:9},globalThis),ne("div",{className:"cartItemDetails",children:[ne("h4",{children:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:35,columnNumber:11},globalThis),ne("h5",{children:r.subtitle},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:36,columnNumber:11},globalThis),ne("div",{className:"cartRow",children:[ne("span",{className:"itemCount",children:[e.sceneSettings.textSettings.cartQuantityText,":"," ",r.count]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:38,columnNumber:13},globalThis),ne("h3",{className:"itemPrice".concat(t===!0?" hide":""),children:[n,parseFloat(r.price).toFixed(2)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:42,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:37,columnNumber:11},globalThis),r.actionButton&&ne("span",{className:"actionButton",onClick:()=>e.actionButtonClicked(r),children:r.actionButton.text},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:52,columnNumber:13},globalThis),ne("div",{className:"cartRow".concat(t===!0||r.countUnavailable=="0"?" hide":""),children:[ne("img",{className:"cartRowImage",src:Vr+"/Icon/Info_red.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:66,columnNumber:13},globalThis),ne("h3",{className:"itemAvailable",children:[r.countAvailable," IN STOCK"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:70,columnNumber:13},globalThis),ne("span",{className:"itemCount",children:"- quantities requested not available"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:74,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:59,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:34,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:14,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:13,columnNumber:5},globalThis)},l2e=({})=>{const r=Fm(o=>o.cart),e=Fm(o=>o.previewCartModalOpen),t=Fm(o=>o.togglePreviewCartModal),n=Jt(o=>o.CORE_API),i=Jt(o=>o.disableCart),a=Jt(o=>o.cartMessage),s=oe.useCallback(()=>{n.checkout()},[]);return ne(hi,{children:ne("div",{className:e?"previewCartModal open":"previewCartModal",children:[ne("div",{className:"previewCartModalChild",children:[ne("button",{className:"closeButton",onClick:()=>{t()},children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:46,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:40,columnNumber:11},globalThis),r.length<=0&&ne("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:49,columnNumber:13},globalThis),r.length>0&&ne(hi,{children:[ne("h2",{className:"cartTitle",children:n.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:53,columnNumber:15},globalThis),ne("div",{className:"previewCartContentParentDiv",children:ne("div",{className:"previewCartContent",children:r.map((o,l)=>ne(Ine,{itemObject:o,index:l},`Cart Item-${l}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:59,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:57,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:56,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:52,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:39,columnNumber:9},globalThis),ne("div",{className:"checkButtonParentDiv".concat(i===!0?" hide":""),children:[a&&ne("div",{className:"cartMessageDiv",children:ne("span",{children:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:77,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:76,columnNumber:13},globalThis),ne("button",{className:"checkoutButton",onClick:s,children:ne("span",{children:n.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:80,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:34,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:33,columnNumber:5},globalThis)},c2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalGeometryVariant(r,e)};function u2e(r,e){return ne(hi,{children:r!==e.length-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:22,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:20,columnNumber:5},this)}const h2e=({visible:r})=>{const e=Za.getState().categoryData.geometryVariants,t=ol(i=>i.allActiveGeometryVariants),n=Jt(i=>i.CORE_API);return ne(hi,{children:ne("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:e.map((i,a)=>ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:i.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:52,columnNumber:15},globalThis),ne("div",{className:"sidemenuContent",children:ne("div",{className:"color-grid geometry-variants-selection",children:Object.keys(i.variants).map((s,o)=>ne("div",{onClick:()=>c2e(i.id,s),className:t[i.id]==s?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",style:{borderRadius:"0%"},children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:78,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:77,columnNumber:29},globalThis),ne("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(i.variants[s].thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:85,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:73,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:72,columnNumber:25},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:xy(i.variants[s].label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:94,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:93,columnNumber:25},globalThis)]},"Color-"+o,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:58,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:55,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:54,columnNumber:15},globalThis),ne(u2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:104,columnNumber:15},globalThis)]},`${i.label}-${a}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:48,columnNumber:13},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:39,columnNumber:5},globalThis)},f2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalGeometryVariant(r,e)},d2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalVariant(r,e)};function p2e({color:r,index:e,elementId:t,allActiveVariants:n}){return ne("div",{onClick:()=>d2e(t,r),className:n[t]==r?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:39,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:38,columnNumber:11},this),ne("img",{className:"contextColorThumbnail",src:Jt.getState().CORE_API.getResolvedAssetUrl(Za.getState().lookData[r]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:37,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:36,columnNumber:7},this),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate-mobile colorDetailsLabel",children:xy(Za.getState().lookData[r]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:52,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:51,columnNumber:7},this)]},"Color-"+e,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:27,columnNumber:5},this)}function m2e({variant:r,variantId:e,index:t,elementId:n,allActiveGeometryVariants:i}){return ne("div",{onClick:()=>f2e(n,e),className:i[n]==e?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:80,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:79,columnNumber:11},this),ne("img",{className:"contextColorThumbnail",src:Jt.getState().CORE_API.getResolvedAssetUrl(r.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:78,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:77,columnNumber:7},this),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate-mobile colorDetailsLabel",children:xy(r.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:91,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:90,columnNumber:7},this)]},"GeometryVariant-"+t,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:68,columnNumber:5},this)}function YX({variantType:r,element:e,allActiveVariants:t,startIndex:n}){return ne(hi,{children:[r=="color"&&e.looks.map((i,a)=>ne(p2e,{color:i,index:a,elementId:e.id,allActiveVariants:t},"MobileGridInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:105,columnNumber:13},this)),r=="geometry"&&Object.keys(e.variants).map((i,a)=>ne(m2e,{variant:e.variants[i],index:a,elementId:e.id,variantId:i,allActiveGeometryVariants:t},"MobileGridVariantInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:117,columnNumber:13},this))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:101,columnNumber:5},this)}const g2e=({sortedVariantsTabOrder:r})=>{const e=Za.getState().categoryData.color,t=Za.getState().categoryData.geometryVariants,n=ol(v=>v.allActiveVariants),i=ol(v=>v.allActiveGeometryVariants),a=Jt(v=>v.materialOverrideExists);Jt(v=>v.CORE_API);const[s,o]=oe.useState(0),[l,u]=oe.useState(0);oe.useEffect(()=>{let v=0;r.includes("color")===!0&&(v+=e.length),r.includes("geometryVariants")===!0&&(v+=t.length),u(v)},[e,t]);const f=oe.useCallback(({index:v})=>ne(hi,{children:v!==l-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:160,columnNumber:13},globalThis):ne("div",{className:"itemGridPlaceholder"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:162,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:158,columnNumber:9},globalThis),[e,t,l]),h=oe.useCallback(()=>{Jt.getState().CORE_API.removeAllVariantOverrides()},[]),p=oe.useCallback(v=>{if(y.current.scrollLeft===v)return;let x,S,_,w=!1;function R(N){x===void 0&&(x=N);const L=N-x;if(S!==N){const I=L/200;y.current.scrollLeft>v?(_=(y.current.scrollLeft-v)*Math.min(I,1),y.current.scrollLeft-=_,y.current.scrollLeft===v&&(w=!0)):y.current.scrollLeft<v&&(_=(v-y.current.scrollLeft)*Math.min(I,1),y.current.scrollLeft+=_,y.current.scrollLeft===v&&(w=!0))}L<200&&(S=N,!w&&window.requestAnimationFrame(R))}window.requestAnimationFrame(R)},[]),m=oe.useRef([]);oe.useEffect(()=>{m.current=m.current.slice(0,l)},[l]);const y=oe.useRef(null),E=oe.useCallback(({categoryID:v,label:x,index:S,totalLength:_})=>ne(hi,{children:ne("a",{className:s===S?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let w=0;w<_;w++)w===S&&p(m.current[w].offsetLeft)},children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:232,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:231,columnNumber:9},globalThis),[s,m]),b=oe.useCallback(()=>{let v=-3e3,x=-1;for(let S=0;S<l;S++){let _=m.current[S].getBoundingClientRect().left;_<28&&v<_&&(v=_,x=S)}x!==-1&&o(x)},[m,e,t,l]);return ne(hi,{children:ne("div",{className:"mobileTabContent",children:ne("div",{className:"scrollSpyTabs",children:[ne("div",{className:"secondMobileTabs",children:r.map((v,x)=>{if(v=="color")return e.map((S,_)=>ne(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("geometryVariants")?t.length+_:_,totalLength:l},"mobileTabsColors"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:274,columnNumber:19},globalThis));if(v=="geometryVariants")return t.map((S,_)=>ne(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("color")?e.length+_:_,totalLength:l},"mobileTabsVariants"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:290,columnNumber:19},globalThis))})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:270,columnNumber:11},globalThis),ne("div",{children:ne("div",{className:"mobileGrid mobileGridCenter",ref:y,onScroll:b,children:ne("section",{className:"mobileGridSection",children:[a&&ne("button",{onClick:h,className:"removeAllColorOverridesButton",disabled:!a,children:[ne("div",{className:"iconContainer",children:ne("img",{src:Vr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:321,columnNumber:23},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:320,columnNumber:21},globalThis),"Remove all",ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:330,columnNumber:21},globalThis),"overrides"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:315,columnNumber:19},globalThis),r.map((v,x)=>{if(v=="color")return e.map((S,_)=>ne("section",{className:"mobileGridCategorySection color-variants-selection",id:`section-${S.categoryID}`,ref:w=>m.current[x==0?_:r.includes("geometryVariants")?t.length+_:_]=w,children:[ne(YX,{variantType:"color",element:S,allActiveVariants:n},`mobileGrid-${S.categoryID}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:355,columnNumber:27},globalThis),ne(f,{index:x==0?_:r.includes("geometryVariants")?t.length+_:_},"divider"+S.categoryID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:361,columnNumber:27},globalThis)]},`sectionz-${S.categoryID}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:339,columnNumber:25},globalThis));if(v=="geometryVariants")return t.map((S,_)=>ne("section",{className:"mobileGridCategorySection geometry-variants-selection",id:`section-${S.id}`,ref:w=>m.current[x==0?_:r.includes("color")?e.length+_:_]=w,children:[ne(YX,{variantType:"geometry",element:S,allActiveVariants:i},`mobileGrid-variants-${S.id}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:393,columnNumber:27},globalThis),ne(f,{index:x==0?_:r.includes("color")?e.length+_:_},"divider-variants-"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:399,columnNumber:27},globalThis)]},`sectionz-variants-${S.id}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:379,columnNumber:25},globalThis))})]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:313,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:308,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:307,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:269,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:268,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:267,columnNumber:5},globalThis)},v2e=({sideMenuOpen:r,sideMenuRef:e,toggleSideMenuOpen:t,configuratorWcRef:n,PUBLIC_DESIGN_ASSETS_ENDPOINT:i,handleSideButtonClick:a,useTabIcon:s,GENERIC_PROJECT_ASSET_DATA_ROOT_URL:o,sideMenuState:l,togglePreviewCartModal:u,getItemCount:f,currency:h,numberWithCommas:p})=>{const m=Za(_=>_.hotspotsData),y=Za.getState().categoryData.color,E=Za.getState().categoryData.geometryVariants,b=Jt(_=>_.disableCart),v=Jt(_=>_.CORE_API),[x,S]=oe.useState([]);return oe.useEffect(()=>{const _=v.sceneSettings.variantsTabOrder,w=Object.entries(_);w.sort(([,N],[,L])=>N.priority-L.priority);const R=[];w.forEach(([N,L])=>{L.enabled&&R.push(N)}),S(R)},[v]),oe.useEffect(()=>{if(!Jt.getState().CORE_API.isMobile)return;const{current:_}=e;!_||n.shadowRoot.getElementById("_leftShell")},[r,e]),ne("div",{className:`sideMenu interactable ${r===!0?"":"side-menu-collapsed"}`,ref:e,children:[ne("div",{className:r?"mobileExpandButton sideMenuOpen":"mobileExpandButton",children:[ne("span",{children:"EXPAND CONFIGURATOR"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:88,columnNumber:9},globalThis),ne("button",{role:"button",onClick:t,children:ne("img",{src:i+"/Icon/ArrowDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:94,columnNumber:11},globalThis)},"expandSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:89,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:81,columnNumber:7},globalThis),ne("div",{className:r===!0?"sideMenuTabContainer":"sideMenuTabContainer side-menu-container-hide",children:ne(XU,{className:"firstMobileTab",children:[ne($U,{className:"firstMobileTabs",children:[ne(hI,{children:ne("div",{className:"mobileTab",onClick:()=>{a(0)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/BuildTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:118,columnNumber:19},globalThis):"",v.sceneSettings.textSettings.buildTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:111,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:110,columnNumber:13},globalThis),(y.length>0||E.length>0)&&ne(hI,{children:ne("div",{className:"mobileTab",onClick:()=>{a(1)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:141,columnNumber:21},globalThis):"",v.sceneSettings.textSettings.colorTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:134,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:133,columnNumber:15},globalThis),ne("button",{className:`collapse-side-menu-button ${r===!0?"":"set-display-none"}`,role:"button",onClick:t,children:ne("img",{src:i+"/Icon/ArrowDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:165,columnNumber:15},globalThis)},"collapseSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:157,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:109,columnNumber:11},globalThis),ne(fI,{children:ne(QX,{sideMenuState:0},"BuildUI1",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:174,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:172,columnNumber:11},globalThis),(y.length>0||E.length>0)&&ne(fI,{children:ne("div",{className:"variantContainer",children:ne(g2e,{sortedVariantsTabOrder:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:180,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:179,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:178,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:108,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:100,columnNumber:7},globalThis),ne("div",{className:"desktopSideMenu",children:[ne("div",{className:"sideMenuTabs",children:[ne("div",{className:l===0?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(0)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"BuildTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:202,columnNumber:15},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.buildTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:210,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:191,columnNumber:11},globalThis),(y.length>0||E.length>0)&&ne("div",{className:l===1?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(1)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:226,columnNumber:17},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.colorTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:237,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:215,columnNumber:13},globalThis),Object.keys(m).length>0&&ne("div",{className:l===2?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(2)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ProductFeaturesTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:254,columnNumber:17},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.featuresTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:265,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:243,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:190,columnNumber:9},globalThis),ne("div",{className:"sideMenuContent",children:[ne(l2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:272,columnNumber:11},globalThis),ne($Oe,{visible:l===0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:273,columnNumber:11},globalThis),ne(QX,{visible:l===0},"buildUi-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:275,columnNumber:12},globalThis),ne("div",{className:"variantContainer",children:x.map(_=>{if(_=="color"){if(y.length>0)return ne(n2e,{visible:l===1},"colourTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:282,columnNumber:21},globalThis)}else if(_=="geometryVariants"&&E.length>0)return ne(h2e,{visible:l===1},"geometryVariantsTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:291,columnNumber:21},globalThis)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:277,columnNumber:11},globalThis),ne(a2e,{visible:l===2},"featuresTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:301,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:271,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:189,columnNumber:7},globalThis),ne("div",{className:"bottomBar right button",onClick:()=>{u()},children:[ne("div",{className:"bottomBarChildDiv",children:[ne("span",{children:v.sceneSettings.textSettings.reviewButtonText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:316,columnNumber:11},globalThis),ne("div",{className:"cartNumber",children:f()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:317,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:315,columnNumber:9},globalThis),ne("div",{className:"reviewButtonParentDiv",children:ne("div",{className:"button reviewButton".concat(b===!0?" hide":""),children:ne("div",{className:"",children:`${h}${p(Fm.getState().cartTotalPrice)}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:325,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:320,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:319,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:309,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:75,columnNumber:5},globalThis)},y2e=({previewCartModalOpen:r,togglePreviewCartModal:e,PUBLIC_DESIGN_ASSETS_ENDPOINT:t,cart:n})=>{const i=Jt(l=>l.disableCart),a=Jt(l=>l.CORE_API),s=Jt(l=>l.cartMessage),o=oe.useCallback(()=>{a.checkout()},[]);return ne("div",{className:r?"previewCartModal mobile open":"previewCartModal mobile",children:[ne("button",{className:"closeButton",onClick:()=>{e()},children:ne("img",{src:t+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:33,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:27,columnNumber:7},globalThis),ne("h2",{className:"cartTitle",children:a.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:35,columnNumber:7},globalThis),n.length>0?ne("div",{className:"previewCartContentParentDiv",children:[ne("div",{className:"previewCartContent",children:n.map(function(l,u){return ne(Ine,{itemObject:l,index:u},`Cart Item - ${u}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:43,columnNumber:17},this)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:40,columnNumber:11},globalThis),ne("div",{className:"previewCartButtonContainer".concat(i===!0?" hide":""),children:[s&&ne("div",{className:"cartMessageDiv",children:ne("span",{children:s},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:58,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:57,columnNumber:15},globalThis),ne("button",{className:"checkoutButton",onClick:o,children:[ne("span",{children:a.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:62,columnNumber:15},globalThis),ne("img",{src:t+"/Icon/ArrowRight.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:63,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:61,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:51,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:39,columnNumber:9},globalThis):ne("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:20,columnNumber:5},globalThis)},A2e=({selectedItemData:r,colors:e,colorsCategoryName:t})=>{const n=Jt(y=>y.CORE_API),[i,a]=oe.useState(null),[s,o]=oe.useState(0),[l,u]=oe.useState(0),[f,h]=oe.useState(null),p=oe.useRef(null),m=oe.useCallback(()=>{n.fireEvent(n.EVENTS.UI.ContextMenu_InfoBtnClicked,r)},[r]);return oe.useEffect(()=>{h(null),r&&(h({...r}),r.overrideVariant?a(r.overrideVariant):a(r.currentVariant))},[r]),oe.useEffect(()=>{if(!f||!r||!p.current)return;const y=n.getCanvasSize();let E=r.offsetX+p.current.children[0].clientWidth,b=r.offsetY+p.current.children[0].clientHeight,v=y.width-E;v<0?o(r.offsetX+v-10):o(r.offsetX);let x=y.height-b;x<0?u(r.offsetY+x-10):u(r.offsetY)},[f,r,p]),ne("div",{ref:p,children:r!==null&&ne("div",{className:"contextMenuParent interactable",style:{left:s+"px",top:l+"px"},children:ne("div",{className:"contextContentDiv",children:ne("div",{className:"contextContent",children:[ne("div",{className:"contextContentChildDiv",children:[ne("div",{className:"contextNameContent",children:[ne("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:84,columnNumber:19},globalThis),ne("img",{className:"infoButton",src:Vr+"/Icon/Info.svg",onClick:()=>m()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:85,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:83,columnNumber:17},globalThis),ne("div",{className:"closeContainer",onClick:()=>n.exitSelectedItem(),children:ne("button",{role:"button",title:"Close",children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:96,columnNumber:21},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:95,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:91,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:82,columnNumber:15},globalThis),e.length>0&&n.sceneSettings.disableLocalColorOverride===!1&&ne("div",{className:"contextColorContent",children:[ne("span",{className:"colorSwatchTitle",children:["Select ",t]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:106,columnNumber:21},globalThis),ne("div",{className:"color-grid color-variants-selection",children:e.map((y,E)=>ne("div",{onClick:async()=>{await n.overrideSelectedItemMaterial(y.id),a(y.id)},asgaga:y.id,asd:i,className:i==y.id?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:131,columnNumber:33},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:130,columnNumber:31},globalThis),ne("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(y.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:138,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:129,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:128,columnNumber:27},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:[xy(y.label),ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:149,columnNumber:31},globalThis),ne("span",{className:"redText",children:y.outOfStock?"OUT OF STOCK":ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:151,columnNumber:70},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:150,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:147,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:146,columnNumber:27},globalThis)]},"Color-"+E,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:111,columnNumber:25},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:109,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:105,columnNumber:19},globalThis),ne("div",{className:"contextButtons",children:[n.canSelectedItemDrag()&&ne("button",{role:"button",onClick:()=>{n.doesSelectedItemHasAttachedDependency()?Jt.getState().setRemoveModalOpen(!0):n.removeSelectedItem()},children:[ne("img",{src:Vr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:174,columnNumber:21},globalThis),ne("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:180,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:162,columnNumber:19},globalThis),n.canSelectedItemRotate()&&ne("button",{role:"button",onClick:()=>n.rotateSelectedItem(),children:[ne("img",{src:Vr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:188,columnNumber:21},globalThis),ne("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:191,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:184,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:160,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:80,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:73,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:71,columnNumber:5},globalThis)},b2e=({selectedItemData:r,contextMenuDrawerOpen:e,dismissContextMenuDrawer:t,colors:n,colorsCategoryName:i})=>{const[a,s]=oe.useState(e),o=oe.useRef(null),l=Jt(p=>p.CORE_API),[u,f]=oe.useState(null);oe.useEffect(()=>{o.current.addEventListener("drawerClosed",()=>{t()})},[o]),oe.useEffect(()=>(s(e),()=>{}),[e]),oe.useEffect(()=>{!r||!r.itemData||(r.overrideVariant?f(r.overrideVariant):f(r.currentVariant))},[r]);function h(){l.doesSelectedItemHasAttachedDependency()?Jt.getState().setRemoveModalOpen(!0):(l.removeSelectedItem(),t())}return ne("bottom-drawer",{id:"contextDrawer",ref:o,open:`${a}`,"initial-screen-coverage":"60%",children:ne("div",{className:"contextMenuDrawer epigraphDrawer",slot:"bottom-drawer-content",children:ne("div",{className:"contextMenuParent interactable",children:[ne("div",{className:"contextContent",children:r&&r.itemData?ne(hi,{children:ne("div",{className:"contextContentNameDiv",children:ne("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:69,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:68,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:67,columnNumber:15},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:65,columnNumber:11},globalThis),n.length>0&&l.sceneSettings.disableLocalColorOverride===!1&&ne(hi,{children:[ne("p",{className:"colorSwatchTitle",children:["Select ",i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:79,columnNumber:17},globalThis),ne("div",{className:"color-grid color-variants-selection",children:n.map((p,m)=>ne("div",{onClick:async()=>{await Jt.getState().CORE_API.overrideSelectedItemMaterial(p.id),f(p.id)},className:u==p.id?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:[ne("div",{className:"colorThumbnail",children:ne("img",{className:"colorThumbnailImg",src:l.getResolvedAssetUrl(p.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:98,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:97,columnNumber:25},globalThis),ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:104,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:103,columnNumber:25},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:96,columnNumber:23},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:[xy(p.label),ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:114,columnNumber:27},globalThis),ne("span",{className:"redText",children:p.outOfStock?"OUT OF STOCK":ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:116,columnNumber:66},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:115,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:112,columnNumber:25},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:111,columnNumber:23},globalThis)]},"Color-"+m,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:82,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:80,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:78,columnNumber:15},globalThis),ne("div",{className:"contextButtons",children:[l.canSelectedItemDrag()&&ne("button",{role:"button",onClick:()=>h(),children:[ne("img",{src:Vr+"/Icon/Trash.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:128,columnNumber:17},globalThis),ne("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:131,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:127,columnNumber:15},globalThis),l.canSelectedItemRotate()&&ne("button",{role:"button",onClick:()=>l.rotateSelectedItem(),children:[ne("img",{src:Vr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:139,columnNumber:17},globalThis),ne("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:142,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:135,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:125,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:64,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:60,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:54,columnNumber:5},globalThis)},_2e=({selectedItemData:r,contextMenuOpen:e,dismissContextMenuDrawer:t})=>{const n=Jt(p=>p.CORE_API),[i,a]=oe.useState(!1),[s,o]=oe.useState([]),[l,u]=oe.useState(""),f=Jt(p=>p.inventoryData);oe.useEffect(()=>(a(e),()=>{}),[e]),oe.useEffect(()=>{if(o([]),r===void 0||!r.itemData||n===null)return;const p=n.getSelectedItemColors(),m=n.getInventoryInfo()[r.itemData.skuID];if(p.map(E=>{E.outOfStock=!1,m[E.id].countAvailable==0&&(E.outOfStock=!0)}),o(p),p.length===0)return;const y=n.categoryData;y.color&&y.color.map(E=>{E.looks.map(b=>{b===p[0].id&&u(E.label)})})},[r]),oe.useEffect(()=>{f!=null&&h(f)},[f]);const h=oe.useCallback(p=>{const m=n.getSelectedItemData();if(m==null)return;const y=n.getSelectedItemColors(),E=p[m.itemData.skuID];y.map(b=>{b.outOfStock=!1,E[b.id].countAvailable==0&&(b.outOfStock=!0)}),o(y)},[r]);return ne(hi,{children:n.isMobile&&window.innerWidth<=768?ne(b2e,{selectedItemData:r,contextMenuDrawerOpen:i,dismissContextMenuDrawer:t,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:87,columnNumber:9},globalThis):i&&ne(A2e,{contextMenuDesktopOpen:i,selectedItemData:r,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:96,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:85,columnNumber:5},globalThis)},E2e=({configuratorWcRef:r,coreRef:e,viewInYourSpaceRef:t,disableUI:n})=>{Za(xt=>xt);const i=Jt(xt=>xt.setSideMenuState),a=Jt(xt=>xt.sideMenuState),[s,o]=oe.useState(!0),[l,u]=oe.useState(!1),[f,h]=oe.useState(!1),p=of(xt=>xt.infoModalOpen),m=of(xt=>xt.updateInfoModalOpen),[y,E]=oe.useState(!1),[b,v]=oe.useState(!1),[x,S]=oe.useState("Link not generated!"),[_,w]=oe.useState(!1),R=Jt(xt=>xt.removeModalOpen),N=Jt(xt=>xt.setRemoveModalOpen),L=Jt(xt=>xt.moveModalOpen),I=Jt(xt=>xt.setMoveModalOpen),D=Jt(xt=>xt.outOfStockModalOpen),k=Jt(xt=>xt.setOutOfStockModalOpen),F=oe.useRef(null),U=oe.useRef(null),G=oe.useRef(null),[j,Q]=oe.useState({}),[H,K]=oe.useState({}),[J,W]=oe.useState(!1),[V,$]=oe.useState(""),[re,pe]=oe.useState(""),ue=Za(xt=>xt.productData),ce=Fm(xt=>xt.cart),ye=Fm(xt=>xt.previewCartModalOpen),Se=Fm(xt=>xt.togglePreviewCartModal),[Ie,We]=oe.useState(!1),[Fe,ie]=oe.useState(!1),[qe,Me]=oe.useState(!0),He=Rne(xt=>xt),Oe=Jt(xt=>xt.CORE_API),[gt,Re]=oe.useState(!1),[Ne,Ze]=oe.useState(!0),[pt,et]=oe.useState(Oe.getSceneItemCount()>0),[ee,X]=oe.useState(Oe.sceneSettings.showSaveButton),[Ee,Ge]=oe.useState(Oe.sceneSettings.showContextMenu),Be=Jt(xt=>xt.viewInYourSpaceMenuBtnVisible),[Ye,yt]=oe.useState(Oe.sceneSettings.showResetBtn),[Xe,de]=oe.useState(Oe.sceneSettings.showDimensionBtn),[ke,$e]=oe.useState(Oe.sceneSettings.showHotspotsBtn),[st,Ve]=oe.useState(Oe.sceneSettings.currency);oe.useEffect(()=>(Me(Oe.areHotspotsVisible()),()=>{}),[a]);const ct=oe.useCallback(()=>{Me(!Oe.areHotspotsVisible()),Oe.areHotspotsVisible()?Oe.hideAllHotspots():Oe.showAllHotspots()},[]),Mt=oe.useCallback(()=>{Re(!Oe.areDimensionsVisible()),Oe.areDimensionsVisible()?Oe.hideDimensions():Oe.showDimensions()},[]);function Ct(){w(!0)}const se=oe.useCallback(()=>{ie(!0),v(!0),Oe.shareScene().then(xt=>{S(xt),ie(!1),Oe.alert({alertMsg:"Configuration saved succesfully!",alertTime:4e3,alertType:"success",alertLabel:"Success",alertId:"configurationSaved"})}).catch(xt=>{ie(!1),Oe.alert({alertMsg:"Error saving this configuration!",alertTime:5e3,alertType:"error",alertLabel:"Unsaved Changes",persistant:!0})})},[]);oe.useEffect(()=>{U.current&&U.current.appendChild(e.current)},[U]),oe.useEffect(()=>{G.current&&G.current.appendChild(t.current)},[G]),Tr(Oe.EVENTS.SCENE.Hotspot_Enter,xt=>{if(window.innerWidth<window.innerHeight)ly.info({title:Oe.getActiveHotspot()}),K(Oe.getActiveHotspot().hotspotData),h(!0);else{const{hotspotAbsID:an}=xt;He.actions.enterHotspotInFeaturesTab(an)}}),Tr(Oe.EVENTS.SCENE.Hotspot_Exit,xt=>{He.actions.exitHotspot()}),Tr(Oe.EVENTS.SCENE.MaterialOverrides_Exists,xt=>{Jt.setState({materialOverrideExists:xt})}),Tr(Oe.EVENTS.UI.UtilityMenu_Hide,xt=>{Ze(!1)}),Tr(Oe.EVENTS.UI.UtilityMenu_Show,xt=>{Ze(!0)}),Tr(Oe.EVENTS.UI.ShareButton_Hide,xt=>{et(!1)}),Tr(Oe.EVENTS.UI.ShareButton_Show,xt=>{et(!0)}),Tr(Oe.EVENTS.UI.ContextMenu_Show,xt=>{Q(xt?.primary.data),We(!0)}),Tr(Oe.EVENTS.UI.ContextMenu_Hide,xt=>{We(!1)}),Tr(Oe.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,xt=>{I(!0);let an="";Object.keys(xt).length==1?an=`The item below will be lost if you place this here:
|
|
8849
|
+
`;N(V)},[R]),j=oe.useCallback(()=>{a.isMobile!==!0&&D!==!0&&(k(!0),!Jt.getState().CORE_API.sceneSettings.draggableUI&&(L===!0?(N(null),r(n)):G()))},[L,D,R]),Q=oe.useCallback(()=>{a.isMobile!==!0&&(k(!1),!Jt.getState().CORE_API.sceneSettings.draggableUI&&(window.mouseDragging||L===!0&&t&&t()))},[L,D]),H=oe.useCallback(J=>{J.preventDefault(),J.stopPropagation(),document.body.style.touchAction="none",Jt.getState().CORE_API.sceneSettings.draggableUI!==!1&&L!==!1&&(window.pointerDownPos=J.offsetX,window.mouseDragging=!1,window.mouseDownImgSrc=a.getResolvedAssetUrl(_),window.mouseDownSkuID=n)},[L]),K=oe.useCallback(J=>{const W=b.lookDetails[u];W.productCategory={id:b.categoryID,label:b.categoryLabel},a.isMobile===!0?(o(W),l(!0)):(J.stopPropagation(),L&&t&&t(),o(W),l(!0))},[L,u,b]);return ne(hi,{children:ne("div",{className:i?"imageContainer active":"imageContainer",draggable:!1,children:[ne("div",{className:"contentContainer",children:[ne("div",{id:"itemCard"+n,className:"contentOverlay ".concat(`${L===!0&&D===!0?"enabled-item-overlay":"disabled-item-overlay"}`),ref:s,onClick:J=>U(J),onTouchStart:J=>H(J),onMouseEnter:j,onMouseLeave:Q,onMouseDown:H,children:ne("img",{draggable:!1,className:"addIcon",src:Vr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:287,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:271,columnNumber:11},globalThis),ne("img",{className:"product-image product-image-default-state ".concat(`${L===!1?"product-image-disabled":""}`),draggable:!1,alt:x,src:a.getResolvedAssetUrl(_)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:294,columnNumber:11},globalThis),ne("div",{className:"spawning-requirements-container",hidden:!(L===!1&&D===!0&&R),children:ne("p",{className:"spawning-requirements-text",children:R},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:307,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:303,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:270,columnNumber:9},globalThis),ne("div",{className:a.isMobile?"showAlways itemDetails":"itemDetails",onClick:K,children:[ne("div",{className:"item-details-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:317,columnNumber:11},globalThis),ne("p",{className:"truncate",children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:318,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:311,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:266,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ItemCard.js",lineNumber:265,columnNumber:5},globalThis)},$Oe=({visible:r})=>{const e=Za(h=>h),t=ol(h=>h.allActiveVariants),n=of(h=>h.infoObject),i=of(h=>h.infoModalOpen),a=of(h=>h.updateInfoModalOpen),[s,o]=oe.useState(""),[l,u]=oe.useState([]),f=Jt(h=>h.CORE_API);return oe.useEffect(()=>{Object.keys(e.categoryData).length!=0&&u(e.categoryData.build)},[e.categoryData]),oe.useEffect(()=>(o(t[Object.keys(t)[0]]),()=>{}),[t]),ne(hi,{children:ne("div",{className:i?"infoModal open":"infoModal",children:[ne("button",{className:"closeButton",onClick:()=>{a(!1)},children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:51,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:45,columnNumber:9},globalThis),ne("a",{href:n.productPageUrl,className:"categoryLink",target:"_blank",style:n?.productPageUrl?{pointerEvents:"all"}:{pointerEvents:"none"},children:[ne("h2",{className:"categoryTitle",children:n?.productCategory?.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:63,columnNumber:11},globalThis),n.productPageUrl&&ne("img",{src:Vr+"/Icon/OpenTab.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:68,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:53,columnNumber:9},globalThis),ne("div",{className:"infoModalImageContainer",children:n?.thumbnails?.high?ne("img",{className:"itemImage",src:f.getResolvedAssetUrl(n.thumbnails.high)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:75,columnNumber:13},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:73,columnNumber:9},globalThis),ne("div",{className:"infoModalTextContainer",children:[ne("h2",{className:"itemTitle",children:n.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:86,columnNumber:11},globalThis),ne("pre",{className:"itemDescription",children:n.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:87,columnNumber:11},globalThis),n.boundingBoxSize?ne("p",{className:"infoModalDimensions",children:[n.boundingBoxSize.x.toFixed(1),"” W x"," ",n.boundingBoxSize.y.toFixed(1),"” D x"," ",n.boundingBoxSize.z.toFixed(1),"” H"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:90,columnNumber:13},globalThis):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:85,columnNumber:9},globalThis),ne("div",{className:"infoModalActions",children:ne("button",{className:"item-price",disabled:!0,children:n.price&&`$${k6(parseFloat(n.price).toFixed(2))}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:101,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:100,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:44,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/InfoModal.js",lineNumber:43,columnNumber:5},globalThis)};function KOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l}){return ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:r.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:36,columnNumber:7},this),ne("div",{className:"sidemenuContent",children:ne("div",{className:"item-grid",children:r.skus.map(u=>ne(Mne,{skuId:u,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,categoryDataIndex:e,setItemAllowed:o,active:l.includes(u)},"itemCardB"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:41,columnNumber:13},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:39,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:38,columnNumber:7},this),e!==t-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:58,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:35,columnNumber:5},this)}function ZOe({categoryID:r,index:e,categories:t,activeTab:n,tabsRef:i,mobileGrid:a}){const s=oe.useCallback(o=>{if(a.current.scrollLeft===o)return;let l,u,f,h=!1;function p(m){l===void 0&&(l=m);const y=m-l;if(u!==m){const E=y/200;a.current.scrollLeft>o?(f=(a.current.scrollLeft-o)*Math.min(E,1),a.current.scrollLeft-=f,a.current.scrollLeft===o&&(h=!0)):a.current.scrollLeft<o&&(f=(o-a.current.scrollLeft)*Math.min(E,1),a.current.scrollLeft+=f,a.current.scrollLeft===o&&(h=!0))}y<200&&(u=m,!h&&window.requestAnimationFrame(p))}window.requestAnimationFrame(p)},[]);return ne(hi,{children:ne("a",{className:n===e?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let o=0;o<t.length;o++)o===e&&s(i.current[o].offsetLeft)},children:t[r].label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:130,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:129,columnNumber:5},this)}function JOe({element:r,index:e,elementsLength:t,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,infoModalOpen:s,setItemAllowed:o,activeItems:l,tabsRef:u}){return ne(hi,{children:[ne("section",{id:`section-${r.categoryID}`,className:"mobileGridSection",ref:f=>u.current[e]=f,children:r.skus.map(f=>ne(Mne,{skuId:f,categoryID:r.categoryID,spawnGhosts:n,spawnItem:i,removeAllGhosts:a,modalOpen:s,setItemAllowed:o,active:l.includes(f)},"itemCardB"+f,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:176,columnNumber:11},this))},"mobileGridSection"+e,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:169,columnNumber:7},this),e!==t-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:191,columnNumber:9},this):""]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:168,columnNumber:5},this)}const QX=({visible:r})=>{const e=Za(w=>w),[t,n]=oe.useState([]),i=of(w=>w.infoModalOpen),[a,s]=oe.useState(0),[o,l]=oe.useState(!1),[u,f]=oe.useState([]),h=of(w=>w.populateInfoObject),p=of(w=>w.updateInfoModalOpen),m=Jt(w=>w.CORE_API),y=oe.useRef(null),E=oe.useCallback(w=>{let R=[];for(const[N,L]of Object.entries(w))R.push(L);f(R)},[]);Tr(m.EVENTS.UI.ContextMenu_InfoBtnClicked,w=>{const R=w.itemData.lookDetails[w.currentVariant];let N=R;N.price=R.price,N.id=w.currentVariant,N.productCategory={id:w.itemData.categoryID,label:w.itemData.categoryLabel},h(N),p(!0)}),Tr(m.EVENTS.UI.ContextMenu_Hide,w=>{ly.info({title:"Context Menu Closed"})}),Tr(m.EVENTS.SCENE.ReplaceableCategory_Updated,E),oe.useEffect(()=>{const w=m.getCurrentItemsInReplaceableCategory();return E(w),()=>{}},[m]),oe.useEffect(()=>{Object.keys(e.categoryData).length!==0&&n(e.categoryData.build)},[e.categoryData]);const b=oe.useCallback((w,R)=>{Jt.getState().CORE_API.spawnItemBySkuID(w,R)},[]),v=oe.useCallback(w=>{Jt.getState().CORE_API.spawnGhostsForSkuID(w,!1,1)},[]),x=oe.useCallback(w=>{i||Jt.getState().CORE_API.removeAllGhosts(w)},[i]),S=oe.useRef([]);oe.useEffect(()=>{S.current=S.current.slice(0,t.length)},[t]);const _=oe.useCallback(()=>{let w=-3e3,R=-1;for(let N=0;N<t.length;N++){let L=S.current[N].getBoundingClientRect().left;L<28&&w<L&&(w=L,R=N)}R!==-1&&s(R)},[S,t]);return ne(hi,{children:[ne("div",{className:"mobileTabContent",hidden:!r,children:ne("div",{className:"scrollSpyTabs",children:[ne("div",{className:"secondMobileTabs",children:Object.keys(t).map((w,R)=>ne(ZOe,{categoryID:w,index:R,categories:t,activeTab:a,tabsRef:S,mobileGrid:y},"mobileTabs"+w,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:318,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:316,columnNumber:11},globalThis),ne("div",{className:"mobileGrid",ref:y,onScroll:_,children:t.map((w,R)=>ne(JOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,tabsRef:S,elementsLength:t.length},"mobileGrid"+R,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:331,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:329,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:315,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:314,columnNumber:7},globalThis),ne("div",{className:"container desktop",hidden:!r,children:t.map((w,R)=>ne(KOe,{element:w,index:R,spawnGhosts:v,spawnItem:b,removeAllGhosts:x,infoModalOpen:i,setItemAllowed:l,activeItems:u,elementsLength:t.length},`category_${w.categoryID}_${R}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:352,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:350,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/BuildUI.js",lineNumber:313,columnNumber:5},globalThis)},e2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalVariant(r,e)};function t2e(r,e){return ne(hi,{children:r!==e.length-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:20,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:18,columnNumber:5},this)}const n2e=({visible:r})=>{const e=Za.getState().categoryData.color,t=ol(s=>s.allActiveVariants),n=Jt(s=>s.materialOverrideExists),i=Jt(s=>s.CORE_API),a=oe.useCallback(()=>{Jt.getState().CORE_API.removeAllVariantOverrides()},[]);return ne(hi,{children:ne("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:[n&&ne("button",{className:"removeAllColorOverridesButton",onClick:a,disabled:!n,children:"Remove all overrides"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:47,columnNumber:11},globalThis),e.map((s,o)=>ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:s.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:62,columnNumber:15},globalThis),ne("div",{className:"sidemenuContent",children:ne("div",{className:"color-grid color-variants-selection",children:s.looks.map((l,u)=>ne("div",{onClick:()=>e2e(s.id,l),className:t[s.id]==l?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:82,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:81,columnNumber:29},globalThis),ne("img",{className:"contextColorThumbnail",src:i.getResolvedAssetUrl(Za.getState().lookData[l]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:89,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:80,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:79,columnNumber:25},globalThis),ne("div",{className:"colorDetails",children:[ne("p",{className:"truncate colorDetailsLabel",children:xy(Za.getState().lookData[l]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:99,columnNumber:27},globalThis),ne("p",{className:"truncate colorDetailsLabel",children:xy(Za.getState().lookData[l]?.accent)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:104,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:98,columnNumber:25},globalThis)]},"Color-"+u,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:68,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:65,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:64,columnNumber:15},globalThis),ne(t2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:117,columnNumber:15},globalThis)]},`${s.label}-${o}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:58,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/Color.js",lineNumber:39,columnNumber:5},globalThis)},Rne=Do((r,e)=>({activeHotspotData:null,activeFeatureID:"",actions:{enterHotspotInFeaturesTab(n){Jt.getState().sideMenuState!==2&&Jt.setState({sideMenuState:2}),r({activeFeatureID:n})},exitHotspot(){r({activeFeatureID:null})}}}));function i2e(r,e){if(r.current.scrollTop===e)return;let t,n,i,a=!1;function s(o){t===void 0&&(t=o);const l=o-t;if(n!==o){const u=l/200;r.current.scrollTop>e?(i=(r.current.scrollTop-e)*Math.min(u,1),r.current.scrollTop-=i,r.current.scrollTop===e&&(a=!0)):r.current.scrollTop<e&&(i=(e-r.current.scrollTop)*Math.min(u,1),r.current.scrollTop+=i,r.current.scrollTop===e&&(a=!0))}l<200&&(n=o,!a&&window.requestAnimationFrame(s))}window.requestAnimationFrame(s)}function WX({carouselTabKey:r,hotspotContentRef:e}){const t=oe.useRef(null),n=Jt(a=>a.CORE_API),i=a=>{a.target.style.width="100%"};return ne(see,{children:ne("div",{className:"carouselTabParent",ref:t,children:[r.type==="img"&&ne("img",{src:n.getResolvedAssetUrl(r.link),alt:r.alt?r.alt:r.type,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:74,columnNumber:11},this),r.type==="video"&&ne(hi,{children:[ne("p",{className:"carouselVideoPlaceholderText",children:r.alt?r.alt:r.type},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:82,columnNumber:13},this),ne("video",{src:n.getResolvedAssetUrl(r.link),muted:!0,loop:!0,autoPlay:!0,playsInline:!0,controls:!1,onLoad:a=>i(a)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:72,columnNumber:7},this)},"SplideSlide-"+r.link,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:71,columnNumber:5},this)}function r2e({tabs:r,tabKey:e,index:t,activeFeatureID:n}){const[i,a]=oe.useState([]),s=oe.useRef(null),o=oe.useRef(null);Jt(p=>p.CORE_API);const l=oe.useRef(null),u=oe.useCallback(p=>{Jt.getState().CORE_API.clickHotspot("hotspot3D_"+p,{ignoreUI:!0})},[]);oe.useEffect(()=>{let p=[],m=e.hotspotData;for(let y=0;y<m.carousel.length;y++)m.carousel[y].type!==""&&m.carousel[y].link!==""&&(p=[...p,{...m.carousel[y],index:y}]);a(p)},[e]),oe.useEffect(()=>{const{current:p}=o;p&&(n===p.id?f(p):h(p))},[n]);const f=oe.useCallback(p=>{p.checked=!0,p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 800px;");let E=p.nextElementSibling.clientHeight*t;i2e(r,E)},[]),h=oe.useCallback(p=>{p.nextElementSibling.nextElementSibling.setAttribute("style","max-height: 0px;"),p.checked=!1},[]);return ne(hi,{children:e.hotspotData&&ne("div",{className:"accordionTab",children:[ne("input",{type:"checkbox",name:"accordion",id:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,defaultChecked:!1,ref:o,onClick:p=>{u(e.itemData.skuID+"_"+e.hotspotData.hotspotID,{ignoreUI:!1})}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:169,columnNumber:11},this),ne("label",{className:"tab-label",htmlFor:"rd_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID,children:[ne("span",{children:e.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:191,columnNumber:13},this),ne("img",{className:"accordion-closed",src:Vr+"/Icon/Plus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:192,columnNumber:13},this),ne("img",{className:"accordion-open",src:Vr+"/Icon/Minus.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:196,columnNumber:13},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:185,columnNumber:11},this),ne("div",{className:"tab-content",children:ne("div",{className:"hotspot-content",ref:l,children:[ne(_ee,{className:"ignore",modules:{toolbar:!1},theme:"bubble",readOnly:!0,value:e.hotspotData.description},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:204,columnNumber:15},this),i.length==1&&i[0].type!=""&&i[0].link!=""&&ne(WX,{carouselTabKey:i[0],index:0,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_0",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:214,columnNumber:19},this),i.length>1&&ne("div",{className:"carousel",children:ne(aee,{options:{perPage:1,preloadPages:3},ref:s,children:i.map((p,m)=>p.type!=""&&p.link!=""&&ne(WX,{carouselTabKey:p,index:m,hotspotContentRef:l},"carouselTabs_"+e.itemData.skuID+"_"+e.hotspotData.hotspotID+"_"+p.index,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:241,columnNumber:27},this))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:230,columnNumber:19},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:229,columnNumber:17},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:203,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:202,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:168,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:166,columnNumber:5},this)}const a2e=({visible:r})=>{const e=Jt(i=>i.tabSpawnCount),t=oe.useRef(null),n=Rne(i=>i.activeFeatureID);return ne(hi,{children:ne("div",{className:"col desktop productFeatureUIDic",hidden:!r,ref:t,children:ne("div",{className:"tabs",children:[e.length==0&&ne("div",{className:"tabEmptyText",children:"*Please add an item to the scene to see the features"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:282,columnNumber:13},globalThis),e.map((i,a)=>ne(r2e,{tabs:t,activeFeatureID:n,tabKey:i,index:a},"tabs_"+i.itemData.skuID+"_"+i.hotspotData.hotspotID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:287,columnNumber:13},globalThis))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:280,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:275,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/ProductFeaturesUI.js",lineNumber:274,columnNumber:5},globalThis)},s2e=function(r,e){return r.filter(function(t,n){return e!==n})},o2e=function(r,e,t){let n=r.slice();return n[e].quantity=t,n},Fm=Do((r,e)=>({cart:[],cartTotalPrice:0,deleteCartItem:t=>{r(n=>({cart:s2e(n.cart,t)}))},addToCart:t=>{r(n=>({cart:[...n.cart,t]}))},updateQuantity:(t,n)=>{r(i=>({cart:o2e(i.cart,t,n)}))},previewCartModalOpen:!1,togglePreviewCartModal:()=>{const{previewCartModalOpen:t}=e();t===!0?Jt.getState().CORE_API.reviewCartHidden():Jt.getState().CORE_API.reviewCartShown(),r({previewCartModalOpen:!t})},actions:{setCartTotalPrice:t=>{r(()=>({cartTotalPrice:t}))}}})),Ine=({itemObject:r})=>{const e=Jt(a=>a.CORE_API),t=Jt(a=>a.disableCart),[n,i]=oe.useState(e.sceneSettings.currency);return ne(hi,{children:ne("div",{className:r.countUnavailable=="0"||t?"cartItem":"cartItem cartItemOutOfStock",draggable:!1,style:{display:r?"":"none"},children:[ne("div",{className:"cartItemImage",children:ne("img",{draggable:!1,src:e.getResolvedAssetUrl(r.thumbnails.review?r.thumbnails.review:r.thumbnails.low),alt:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:24,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:23,columnNumber:9},globalThis),ne("div",{className:"cartItemDetails",children:[ne("h4",{children:r.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:35,columnNumber:11},globalThis),ne("h5",{children:r.subtitle},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:36,columnNumber:11},globalThis),ne("div",{className:"cartRow",children:[ne("span",{className:"itemCount",children:[e.sceneSettings.textSettings.cartQuantityText,":"," ",r.count]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:38,columnNumber:13},globalThis),ne("h3",{className:"itemPrice".concat(t===!0?" hide":""),children:[n,parseFloat(r.price).toFixed(2)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:42,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:37,columnNumber:11},globalThis),r.actionButton&&ne("span",{className:"actionButton",onClick:()=>e.actionButtonClicked(r),children:r.actionButton.text},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:52,columnNumber:13},globalThis),ne("div",{className:"cartRow".concat(t===!0||r.countUnavailable=="0"?" hide":""),children:[ne("img",{className:"cartRowImage",src:Vr+"/Icon/Info_red.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:66,columnNumber:13},globalThis),ne("h3",{className:"itemAvailable",children:[r.countAvailable," IN STOCK"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:70,columnNumber:13},globalThis),ne("span",{className:"itemCount",children:"- quantities requested not available"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:74,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:59,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:34,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:14,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/CartItem.js",lineNumber:13,columnNumber:5},globalThis)},l2e=({})=>{const r=Fm(o=>o.cart),e=Fm(o=>o.previewCartModalOpen),t=Fm(o=>o.togglePreviewCartModal),n=Jt(o=>o.CORE_API),i=Jt(o=>o.disableCart),a=Jt(o=>o.cartMessage),s=oe.useCallback(()=>{n.checkout()},[]);return ne(hi,{children:ne("div",{className:e?"previewCartModal open":"previewCartModal",children:[ne("div",{className:"previewCartModalChild",children:[ne("button",{className:"closeButton",onClick:()=>{t()},children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:46,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:40,columnNumber:11},globalThis),r.length<=0&&ne("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:49,columnNumber:13},globalThis),r.length>0&&ne(hi,{children:[ne("h2",{className:"cartTitle",children:n.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:53,columnNumber:15},globalThis),ne("div",{className:"previewCartContentParentDiv",children:ne("div",{className:"previewCartContent",children:r.map((o,l)=>ne(Ine,{itemObject:o,index:l},`Cart Item-${l}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:59,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:57,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:56,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:52,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:39,columnNumber:9},globalThis),ne("div",{className:"checkButtonParentDiv".concat(i===!0?" hide":""),children:[a&&ne("div",{className:"cartMessageDiv",children:ne("span",{children:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:77,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:76,columnNumber:13},globalThis),ne("button",{className:"checkoutButton",onClick:s,children:ne("span",{children:n.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:80,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:34,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/PreviewCart.js",lineNumber:33,columnNumber:5},globalThis)},c2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalGeometryVariant(r,e)};function u2e(r,e){return ne(hi,{children:r!==e.length-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:22,columnNumber:9},this):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:20,columnNumber:5},this)}const h2e=({visible:r})=>{const e=Za.getState().categoryData.geometryVariants,t=ol(i=>i.allActiveGeometryVariants),n=Jt(i=>i.CORE_API);return ne(hi,{children:ne("div",{className:"container desktop",style:{height:"auto"},hidden:!r,children:e.map((i,a)=>ne("div",{className:"subContainer topContainer",children:[ne("h4",{className:"subheading",children:i.label},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:52,columnNumber:15},globalThis),ne("div",{className:"sidemenuContent",children:ne("div",{className:"color-grid geometry-variants-selection",children:Object.keys(i.variants).map((s,o)=>ne("div",{onClick:()=>c2e(i.id,s),className:t[i.id]==s?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",style:{borderRadius:"0%"},children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:78,columnNumber:31},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:77,columnNumber:29},globalThis),ne("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(i.variants[s].thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:85,columnNumber:29},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:73,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:72,columnNumber:25},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:xy(i.variants[s].label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:94,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:93,columnNumber:25},globalThis)]},"Color-"+o,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:58,columnNumber:23},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:55,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:54,columnNumber:15},globalThis),ne(u2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:104,columnNumber:15},globalThis)]},`${i.label}-${a}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:48,columnNumber:13},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:41,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/GeometryVariants.js",lineNumber:39,columnNumber:5},globalThis)},f2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalGeometryVariant(r,e)},d2e=(r,e)=>{Jt.getState().CORE_API.switchGlobalVariant(r,e)};function p2e({color:r,index:e,elementId:t,allActiveVariants:n}){return ne("div",{onClick:()=>d2e(t,r),className:n[t]==r?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:39,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:38,columnNumber:11},this),ne("img",{className:"contextColorThumbnail",src:Jt.getState().CORE_API.getResolvedAssetUrl(Za.getState().lookData[r]?.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:37,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:36,columnNumber:7},this),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate-mobile colorDetailsLabel",children:xy(Za.getState().lookData[r]?.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:52,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:51,columnNumber:7},this)]},"Color-"+e,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:27,columnNumber:5},this)}function m2e({variant:r,variantId:e,index:t,elementId:n,allActiveGeometryVariants:i}){return ne("div",{onClick:()=>f2e(n,e),className:i[n]==e?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:80,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:79,columnNumber:11},this),ne("img",{className:"contextColorThumbnail",src:Jt.getState().CORE_API.getResolvedAssetUrl(r.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:82,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:78,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:77,columnNumber:7},this),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate-mobile colorDetailsLabel",children:xy(r.label)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:91,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:90,columnNumber:7},this)]},"GeometryVariant-"+t,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:68,columnNumber:5},this)}function YX({variantType:r,element:e,allActiveVariants:t,startIndex:n}){return ne(hi,{children:[r=="color"&&e.looks.map((i,a)=>ne(p2e,{color:i,index:a,elementId:e.id,allActiveVariants:t},"MobileGridInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:105,columnNumber:13},this)),r=="geometry"&&Object.keys(e.variants).map((i,a)=>ne(m2e,{variant:e.variants[i],index:a,elementId:e.id,variantId:i,allActiveGeometryVariants:t},"MobileGridVariantInternal_"+a,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:117,columnNumber:13},this))]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:101,columnNumber:5},this)}const g2e=({sortedVariantsTabOrder:r})=>{const e=Za.getState().categoryData.color,t=Za.getState().categoryData.geometryVariants,n=ol(v=>v.allActiveVariants),i=ol(v=>v.allActiveGeometryVariants),a=Jt(v=>v.materialOverrideExists);Jt(v=>v.CORE_API);const[s,o]=oe.useState(0),[l,u]=oe.useState(0);oe.useEffect(()=>{let v=0;r.includes("color")===!0&&(v+=e.length),r.includes("geometryVariants")===!0&&(v+=t.length),u(v)},[e,t]);const f=oe.useCallback(({index:v})=>ne(hi,{children:v!==l-1?ne("div",{className:"itemGridDivider"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:160,columnNumber:13},globalThis):ne("div",{className:"itemGridPlaceholder"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:162,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:158,columnNumber:9},globalThis),[e,t,l]),h=oe.useCallback(()=>{Jt.getState().CORE_API.removeAllVariantOverrides()},[]),p=oe.useCallback(v=>{if(y.current.scrollLeft===v)return;let x,S,_,w=!1;function R(N){x===void 0&&(x=N);const L=N-x;if(S!==N){const I=L/200;y.current.scrollLeft>v?(_=(y.current.scrollLeft-v)*Math.min(I,1),y.current.scrollLeft-=_,y.current.scrollLeft===v&&(w=!0)):y.current.scrollLeft<v&&(_=(v-y.current.scrollLeft)*Math.min(I,1),y.current.scrollLeft+=_,y.current.scrollLeft===v&&(w=!0))}L<200&&(S=N,!w&&window.requestAnimationFrame(R))}window.requestAnimationFrame(R)},[]),m=oe.useRef([]);oe.useEffect(()=>{m.current=m.current.slice(0,l)},[l]);const y=oe.useRef(null),E=oe.useCallback(({categoryID:v,label:x,index:S,totalLength:_})=>ne(hi,{children:ne("a",{className:s===S?"mobileTab scrolled":"mobileTab",onClick:()=>{for(let w=0;w<_;w++)w===S&&p(m.current[w].offsetLeft)},children:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:232,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:231,columnNumber:9},globalThis),[s,m]),b=oe.useCallback(()=>{let v=-3e3,x=-1;for(let S=0;S<l;S++){let _=m.current[S].getBoundingClientRect().left;_<28&&v<_&&(v=_,x=S)}x!==-1&&o(x)},[m,e,t,l]);return ne(hi,{children:ne("div",{className:"mobileTabContent",children:ne("div",{className:"scrollSpyTabs",children:[ne("div",{className:"secondMobileTabs",children:r.map((v,x)=>{if(v=="color")return e.map((S,_)=>ne(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("geometryVariants")?t.length+_:_,totalLength:l},"mobileTabsColors"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:274,columnNumber:19},globalThis));if(v=="geometryVariants")return t.map((S,_)=>ne(E,{categoryID:S.id,label:S.label,index:x==0?_:r.includes("color")?e.length+_:_,totalLength:l},"mobileTabsVariants"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:290,columnNumber:19},globalThis))})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:270,columnNumber:11},globalThis),ne("div",{children:ne("div",{className:"mobileGrid mobileGridCenter",ref:y,onScroll:b,children:ne("section",{className:"mobileGridSection",children:[a&&ne("button",{onClick:h,className:"removeAllColorOverridesButton",disabled:!a,children:[ne("div",{className:"iconContainer",children:ne("img",{src:Vr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:321,columnNumber:23},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:320,columnNumber:21},globalThis),"Remove all",ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:330,columnNumber:21},globalThis),"overrides"]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:315,columnNumber:19},globalThis),r.map((v,x)=>{if(v=="color")return e.map((S,_)=>ne("section",{className:"mobileGridCategorySection color-variants-selection",id:`section-${S.categoryID}`,ref:w=>m.current[x==0?_:r.includes("geometryVariants")?t.length+_:_]=w,children:[ne(YX,{variantType:"color",element:S,allActiveVariants:n},`mobileGrid-${S.categoryID}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:355,columnNumber:27},globalThis),ne(f,{index:x==0?_:r.includes("geometryVariants")?t.length+_:_},"divider"+S.categoryID,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:361,columnNumber:27},globalThis)]},`sectionz-${S.categoryID}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:339,columnNumber:25},globalThis));if(v=="geometryVariants")return t.map((S,_)=>ne("section",{className:"mobileGridCategorySection geometry-variants-selection",id:`section-${S.id}`,ref:w=>m.current[x==0?_:r.includes("color")?e.length+_:_]=w,children:[ne(YX,{variantType:"geometry",element:S,allActiveVariants:i},`mobileGrid-variants-${S.id}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:393,columnNumber:27},globalThis),ne(f,{index:x==0?_:r.includes("color")?e.length+_:_},"divider-variants-"+S.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:399,columnNumber:27},globalThis)]},`sectionz-variants-${S.id}-${_}`,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:379,columnNumber:25},globalThis))})]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:313,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:308,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:307,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:269,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:268,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/sideMenu/VariantMobile.js",lineNumber:267,columnNumber:5},globalThis)},v2e=({sideMenuOpen:r,sideMenuRef:e,toggleSideMenuOpen:t,configuratorWcRef:n,PUBLIC_DESIGN_ASSETS_ENDPOINT:i,handleSideButtonClick:a,useTabIcon:s,GENERIC_PROJECT_ASSET_DATA_ROOT_URL:o,sideMenuState:l,togglePreviewCartModal:u,getItemCount:f,currency:h,numberWithCommas:p})=>{const m=Za(_=>_.hotspotsData),y=Za.getState().categoryData.color,E=Za.getState().categoryData.geometryVariants,b=Jt(_=>_.disableCart),v=Jt(_=>_.CORE_API),[x,S]=oe.useState([]);return oe.useEffect(()=>{const _=v.sceneSettings.variantsTabOrder,w=Object.entries(_);w.sort(([,N],[,L])=>N.priority-L.priority);const R=[];w.forEach(([N,L])=>{L.enabled&&R.push(N)}),S(R)},[v]),oe.useEffect(()=>{if(!Jt.getState().CORE_API.isMobile)return;const{current:_}=e;!_||n.shadowRoot.getElementById("_leftShell")},[r,e]),ne("div",{className:`sideMenu interactable ${r===!0?"":"side-menu-collapsed"}`,ref:e,children:[ne("div",{className:r?"mobileExpandButton sideMenuOpen":"mobileExpandButton",children:[ne("span",{children:"Expand Configurator"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:88,columnNumber:9},globalThis),ne("button",{role:"button",onClick:t,children:ne("img",{src:i+"/Icon/ArrowDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:94,columnNumber:11},globalThis)},"expandSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:89,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:81,columnNumber:7},globalThis),ne("div",{className:r===!0?"sideMenuTabContainer":"sideMenuTabContainer side-menu-container-hide",children:ne(XU,{className:"firstMobileTab",children:[ne($U,{className:"firstMobileTabs",children:[ne(hI,{children:ne("div",{className:"mobileTab",onClick:()=>{a(0)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/BuildTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:118,columnNumber:19},globalThis):"",v.sceneSettings.textSettings.buildTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:111,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:110,columnNumber:13},globalThis),(y.length>0||E.length>0)&&ne(hI,{children:ne("div",{className:"mobileTab",onClick:()=>{a(1)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:141,columnNumber:21},globalThis):"",v.sceneSettings.textSettings.colorTabHeadingText]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:134,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:133,columnNumber:15},globalThis),ne("button",{className:`collapse-side-menu-button ${r===!0?"":"set-display-none"}`,role:"button",onClick:t,children:ne("img",{src:i+"/Icon/ArrowDown.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:165,columnNumber:15},globalThis)},"collapseSideMenuButton",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:157,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:109,columnNumber:11},globalThis),ne(fI,{children:ne(QX,{sideMenuState:0},"BuildUI1",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:174,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:172,columnNumber:11},globalThis),(y.length>0||E.length>0)&&ne(fI,{children:ne("div",{className:"variantContainer",children:ne(g2e,{sortedVariantsTabOrder:x},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:180,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:179,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:178,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:108,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:100,columnNumber:7},globalThis),ne("div",{className:"desktopSideMenu",children:[ne("div",{className:"sideMenuTabs",children:[ne("div",{className:l===0?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(0)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"BuildTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:202,columnNumber:15},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.buildTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:210,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:191,columnNumber:11},globalThis),(y.length>0||E.length>0)&&ne("div",{className:l===1?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(1)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ColorTabIcon.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:226,columnNumber:17},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.colorTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:237,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:215,columnNumber:13},globalThis),Object.keys(m).length>0&&ne("div",{className:l===2?"activeSideMenuTab rightTopBarButton button":"inactiveSideMenuTab rightTopBarButton button",onClick:()=>{a(2)},children:[s?ne("img",{className:"icon",alt:"null",src:o+"/thumbnails/common-ui/ProductFeaturesTabIcon.png"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:254,columnNumber:17},globalThis):"",ne("span",{children:v.sceneSettings.textSettings.featuresTabHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:265,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:243,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:190,columnNumber:9},globalThis),ne("div",{className:"sideMenuContent",children:[ne(l2e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:272,columnNumber:11},globalThis),ne($Oe,{visible:l===0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:273,columnNumber:11},globalThis),ne(QX,{visible:l===0},"buildUi-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:275,columnNumber:12},globalThis),ne("div",{className:"variantContainer",children:x.map(_=>{if(_=="color"){if(y.length>0)return ne(n2e,{visible:l===1},"colourTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:282,columnNumber:21},globalThis)}else if(_=="geometryVariants"&&E.length>0)return ne(h2e,{visible:l===1},"geometryVariantsTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:291,columnNumber:21},globalThis)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:277,columnNumber:11},globalThis),ne(a2e,{visible:l===2},"featuresTab-desktop",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:301,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:271,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:189,columnNumber:7},globalThis),ne("div",{className:"bottomBar right button",onClick:()=>{u()},children:[ne("div",{className:"bottomBarChildDiv",children:[ne("span",{children:v.sceneSettings.textSettings.reviewButtonText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:316,columnNumber:11},globalThis),ne("div",{className:"cartNumber",children:f()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:317,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:315,columnNumber:9},globalThis),ne("div",{className:"reviewButtonParentDiv",children:ne("div",{className:"button reviewButton".concat(b===!0?" hide":""),children:ne("div",{className:"",children:`${h}${p(Fm.getState().cartTotalPrice)}`},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:325,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:320,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:319,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:309,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/SideMenu.js",lineNumber:75,columnNumber:5},globalThis)},y2e=({previewCartModalOpen:r,togglePreviewCartModal:e,PUBLIC_DESIGN_ASSETS_ENDPOINT:t,cart:n})=>{const i=Jt(l=>l.disableCart),a=Jt(l=>l.CORE_API),s=Jt(l=>l.cartMessage),o=oe.useCallback(()=>{a.checkout()},[]);return ne("div",{className:r?"previewCartModal mobile open":"previewCartModal mobile",children:[ne("button",{className:"closeButton",onClick:()=>{e()},children:ne("img",{src:t+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:33,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:27,columnNumber:7},globalThis),ne("h2",{className:"cartTitle",children:a.sceneSettings.textSettings.cartHeadingText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:35,columnNumber:7},globalThis),n.length>0?ne("div",{className:"previewCartContentParentDiv",children:[ne("div",{className:"previewCartContent",children:n.map(function(l,u){return ne(Ine,{itemObject:l,index:u},`Cart Item - ${u}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:43,columnNumber:17},this)})},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:40,columnNumber:11},globalThis),ne("div",{className:"previewCartButtonContainer".concat(i===!0?" hide":""),children:[s&&ne("div",{className:"cartMessageDiv",children:ne("span",{children:s},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:58,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:57,columnNumber:15},globalThis),ne("button",{className:"checkoutButton",onClick:o,children:[ne("span",{children:a.sceneSettings.addToCartCTAText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:62,columnNumber:15},globalThis),ne("img",{src:t+"/Icon/ArrowRight.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:63,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:61,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:51,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:39,columnNumber:9},globalThis):ne("h3",{className:"cartEmptyText",children:"Your cart is currently empty"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:70,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/PreviewCartMobile.js",lineNumber:20,columnNumber:5},globalThis)},A2e=({selectedItemData:r,colors:e,colorsCategoryName:t})=>{const n=Jt(y=>y.CORE_API),[i,a]=oe.useState(null),[s,o]=oe.useState(0),[l,u]=oe.useState(0),[f,h]=oe.useState(null),p=oe.useRef(null),m=oe.useCallback(()=>{n.fireEvent(n.EVENTS.UI.ContextMenu_InfoBtnClicked,r)},[r]);return oe.useEffect(()=>{h(null),r&&(h({...r}),r.overrideVariant?a(r.overrideVariant):a(r.currentVariant))},[r]),oe.useEffect(()=>{if(!f||!r||!p.current)return;const y=n.getCanvasSize();let E=r.offsetX+p.current.children[0].clientWidth,b=r.offsetY+p.current.children[0].clientHeight,v=y.width-E;v<0?o(r.offsetX+v-10):o(r.offsetX);let x=y.height-b;x<0?u(r.offsetY+x-10):u(r.offsetY)},[f,r,p]),ne("div",{ref:p,children:r!==null&&ne("div",{className:"contextMenuParent interactable",style:{left:s+"px",top:l+"px"},children:ne("div",{className:"contextContentDiv",children:ne("div",{className:"contextContent",children:[ne("div",{className:"contextContentChildDiv",children:[ne("div",{className:"contextNameContent",children:[ne("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:84,columnNumber:19},globalThis),ne("img",{className:"infoButton",src:Vr+"/Icon/Info.svg",onClick:()=>m()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:85,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:83,columnNumber:17},globalThis),ne("div",{className:"closeContainer",onClick:()=>n.exitSelectedItem(),children:ne("button",{role:"button",title:"Close",children:ne("img",{src:Vr+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:96,columnNumber:21},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:95,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:91,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:82,columnNumber:15},globalThis),e.length>0&&n.sceneSettings.disableLocalColorOverride===!1&&ne("div",{className:"contextColorContent",children:[ne("span",{className:"colorSwatchTitle",children:["Select ",t]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:106,columnNumber:21},globalThis),ne("div",{className:"color-grid color-variants-selection",children:e.map((y,E)=>ne("div",{onClick:async()=>{await n.overrideSelectedItemMaterial(y.id),a(y.id)},asgaga:y.id,asd:i,className:i==y.id?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:ne("div",{className:"colorThumbnail",children:[ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:131,columnNumber:33},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:130,columnNumber:31},globalThis),ne("img",{className:"contextColorThumbnail",src:n.getResolvedAssetUrl(y.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:138,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:129,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:128,columnNumber:27},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:[xy(y.label),ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:149,columnNumber:31},globalThis),ne("span",{className:"redText",children:y.outOfStock?"OUT OF STOCK":ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:151,columnNumber:70},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:150,columnNumber:31},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:147,columnNumber:29},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:146,columnNumber:27},globalThis)]},"Color-"+E,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:111,columnNumber:25},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:109,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:105,columnNumber:19},globalThis),ne("div",{className:"contextButtons",children:[n.canSelectedItemDrag()&&ne("button",{role:"button",onClick:()=>{n.doesSelectedItemHasAttachedDependency()?Jt.getState().setRemoveModalOpen(!0):n.removeSelectedItem()},children:[ne("img",{src:Vr+"/Icon/TrashSimple.svg",alt:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:174,columnNumber:21},globalThis),ne("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:180,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:162,columnNumber:19},globalThis),n.canSelectedItemRotate()&&ne("button",{role:"button",onClick:()=>n.rotateSelectedItem(),children:[ne("img",{src:Vr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:188,columnNumber:21},globalThis),ne("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:191,columnNumber:21},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:184,columnNumber:19},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:160,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:81,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:80,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:73,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuDesktop.js",lineNumber:71,columnNumber:5},globalThis)},b2e=({selectedItemData:r,contextMenuDrawerOpen:e,dismissContextMenuDrawer:t,colors:n,colorsCategoryName:i})=>{const[a,s]=oe.useState(e),o=oe.useRef(null),l=Jt(p=>p.CORE_API),[u,f]=oe.useState(null);oe.useEffect(()=>{o.current.addEventListener("drawerClosed",()=>{t()})},[o]),oe.useEffect(()=>(s(e),()=>{}),[e]),oe.useEffect(()=>{!r||!r.itemData||(r.overrideVariant?f(r.overrideVariant):f(r.currentVariant))},[r]);function h(){l.doesSelectedItemHasAttachedDependency()?Jt.getState().setRemoveModalOpen(!0):(l.removeSelectedItem(),t())}return ne("bottom-drawer",{id:"contextDrawer",ref:o,open:`${a}`,"initial-screen-coverage":"60%",children:ne("div",{className:"contextMenuDrawer epigraphDrawer",slot:"bottom-drawer-content",children:ne("div",{className:"contextMenuParent interactable",children:[ne("div",{className:"contextContent",children:r&&r.itemData?ne(hi,{children:ne("div",{className:"contextContentNameDiv",children:ne("h3",{children:r.itemData.name},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:69,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:68,columnNumber:17},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:67,columnNumber:15},globalThis):""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:65,columnNumber:11},globalThis),n.length>0&&l.sceneSettings.disableLocalColorOverride===!1&&ne(hi,{children:[ne("p",{className:"colorSwatchTitle",children:["Select ",i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:79,columnNumber:17},globalThis),ne("div",{className:"color-grid color-variants-selection",children:n.map((p,m)=>ne("div",{onClick:async()=>{await Jt.getState().CORE_API.overrideSelectedItemMaterial(p.id),f(p.id)},className:u==p.id?"colorSelector selected":"colorSelector",children:[ne("div",{className:"colorThumbnailContainer",children:[ne("div",{className:"colorThumbnail",children:ne("img",{className:"colorThumbnailImg",src:l.getResolvedAssetUrl(p.thumbnail)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:98,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:97,columnNumber:25},globalThis),ne("div",{className:"checkMark",children:ne("img",{src:Vr+"/Icon/Check.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:104,columnNumber:27},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:103,columnNumber:25},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:96,columnNumber:23},globalThis),ne("div",{className:"colorDetails",children:ne("p",{className:"truncate colorDetailsLabel",children:[xy(p.label),ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:114,columnNumber:27},globalThis),ne("span",{className:"redText",children:p.outOfStock?"OUT OF STOCK":ne("br",{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:116,columnNumber:66},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:115,columnNumber:27},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:112,columnNumber:25},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:111,columnNumber:23},globalThis)]},"Color-"+m,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:82,columnNumber:21},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:80,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:78,columnNumber:15},globalThis),ne("div",{className:"contextButtons",children:[l.canSelectedItemDrag()&&ne("button",{role:"button",onClick:()=>h(),children:[ne("img",{src:Vr+"/Icon/Trash.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:128,columnNumber:17},globalThis),ne("span",{children:"Remove"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:131,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:127,columnNumber:15},globalThis),l.canSelectedItemRotate()&&ne("button",{role:"button",onClick:()=>l.rotateSelectedItem(),children:[ne("img",{src:Vr+"/Icon/Rotate.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:139,columnNumber:17},globalThis),ne("span",{children:"Rotate"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:142,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:135,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:125,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:64,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:60,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenuMobile.js",lineNumber:54,columnNumber:5},globalThis)},_2e=({selectedItemData:r,contextMenuOpen:e,dismissContextMenuDrawer:t})=>{const n=Jt(p=>p.CORE_API),[i,a]=oe.useState(!1),[s,o]=oe.useState([]),[l,u]=oe.useState(""),f=Jt(p=>p.inventoryData);oe.useEffect(()=>(a(e),()=>{}),[e]),oe.useEffect(()=>{if(o([]),r===void 0||!r.itemData||n===null)return;const p=n.getSelectedItemColors(),m=n.getInventoryInfo()[r.itemData.skuID];if(p.map(E=>{E.outOfStock=!1,m[E.id].countAvailable==0&&(E.outOfStock=!0)}),o(p),p.length===0)return;const y=n.categoryData;y.color&&y.color.map(E=>{E.looks.map(b=>{b===p[0].id&&u(E.label)})})},[r]),oe.useEffect(()=>{f!=null&&h(f)},[f]);const h=oe.useCallback(p=>{const m=n.getSelectedItemData();if(m==null)return;const y=n.getSelectedItemColors(),E=p[m.itemData.skuID];y.map(b=>{b.outOfStock=!1,E[b.id].countAvailable==0&&(b.outOfStock=!0)}),o(y)},[r]);return ne(hi,{children:n.isMobile&&window.innerWidth<=768?ne(b2e,{selectedItemData:r,contextMenuDrawerOpen:i,dismissContextMenuDrawer:t,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:87,columnNumber:9},globalThis):i&&ne(A2e,{contextMenuDesktopOpen:i,selectedItemData:r,colors:s,colorsCategoryName:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:96,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/components/reactComponents/ContextMenu.js",lineNumber:85,columnNumber:5},globalThis)},E2e=({configuratorWcRef:r,coreRef:e,viewInYourSpaceRef:t,disableUI:n})=>{Za(xt=>xt);const i=Jt(xt=>xt.setSideMenuState),a=Jt(xt=>xt.sideMenuState),[s,o]=oe.useState(!0),[l,u]=oe.useState(!1),[f,h]=oe.useState(!1),p=of(xt=>xt.infoModalOpen),m=of(xt=>xt.updateInfoModalOpen),[y,E]=oe.useState(!1),[b,v]=oe.useState(!1),[x,S]=oe.useState("Link not generated!"),[_,w]=oe.useState(!1),R=Jt(xt=>xt.removeModalOpen),N=Jt(xt=>xt.setRemoveModalOpen),L=Jt(xt=>xt.moveModalOpen),I=Jt(xt=>xt.setMoveModalOpen),D=Jt(xt=>xt.outOfStockModalOpen),k=Jt(xt=>xt.setOutOfStockModalOpen),F=oe.useRef(null),U=oe.useRef(null),G=oe.useRef(null),[j,Q]=oe.useState({}),[H,K]=oe.useState({}),[J,W]=oe.useState(!1),[V,$]=oe.useState(""),[re,pe]=oe.useState(""),ue=Za(xt=>xt.productData),ce=Fm(xt=>xt.cart),ye=Fm(xt=>xt.previewCartModalOpen),Se=Fm(xt=>xt.togglePreviewCartModal),[Ie,We]=oe.useState(!1),[Fe,ie]=oe.useState(!1),[qe,Me]=oe.useState(!0),He=Rne(xt=>xt),Oe=Jt(xt=>xt.CORE_API),[gt,Re]=oe.useState(!1),[Ne,Ze]=oe.useState(!0),[pt,et]=oe.useState(Oe.getSceneItemCount()>0),[ee,X]=oe.useState(Oe.sceneSettings.showSaveButton),[Ee,Ge]=oe.useState(Oe.sceneSettings.showContextMenu),Be=Jt(xt=>xt.viewInYourSpaceMenuBtnVisible),[Ye,yt]=oe.useState(Oe.sceneSettings.showResetBtn),[Xe,de]=oe.useState(Oe.sceneSettings.showDimensionBtn),[ke,$e]=oe.useState(Oe.sceneSettings.showHotspotsBtn),[st,Ve]=oe.useState(Oe.sceneSettings.currency);oe.useEffect(()=>(Me(Oe.areHotspotsVisible()),()=>{}),[a]);const ct=oe.useCallback(()=>{Me(!Oe.areHotspotsVisible()),Oe.areHotspotsVisible()?Oe.hideAllHotspots():Oe.showAllHotspots()},[]),Mt=oe.useCallback(()=>{Re(!Oe.areDimensionsVisible()),Oe.areDimensionsVisible()?Oe.hideDimensions():Oe.showDimensions()},[]);function Ct(){w(!0)}const se=oe.useCallback(()=>{ie(!0),v(!0),Oe.shareScene().then(xt=>{S(xt),ie(!1),Oe.alert({alertMsg:"Configuration saved succesfully!",alertTime:4e3,alertType:"success",alertLabel:"Success",alertId:"configurationSaved"})}).catch(xt=>{ie(!1),Oe.alert({alertMsg:"Error saving this configuration!",alertTime:5e3,alertType:"error",alertLabel:"Unsaved Changes",persistant:!0})})},[]);oe.useEffect(()=>{U.current&&U.current.appendChild(e.current)},[U]),oe.useEffect(()=>{G.current&&G.current.appendChild(t.current)},[G]),Tr(Oe.EVENTS.SCENE.Hotspot_Enter,xt=>{if(window.innerWidth<window.innerHeight)ly.info({title:Oe.getActiveHotspot()}),K(Oe.getActiveHotspot().hotspotData),h(!0);else{const{hotspotAbsID:an}=xt;He.actions.enterHotspotInFeaturesTab(an)}}),Tr(Oe.EVENTS.SCENE.Hotspot_Exit,xt=>{He.actions.exitHotspot()}),Tr(Oe.EVENTS.SCENE.MaterialOverrides_Exists,xt=>{Jt.setState({materialOverrideExists:xt})}),Tr(Oe.EVENTS.UI.UtilityMenu_Hide,xt=>{Ze(!1)}),Tr(Oe.EVENTS.UI.UtilityMenu_Show,xt=>{Ze(!0)}),Tr(Oe.EVENTS.UI.ShareButton_Hide,xt=>{et(!1)}),Tr(Oe.EVENTS.UI.ShareButton_Show,xt=>{et(!0)}),Tr(Oe.EVENTS.UI.ContextMenu_Show,xt=>{Q(xt?.primary.data),We(!0)}),Tr(Oe.EVENTS.UI.ContextMenu_Hide,xt=>{We(!1)}),Tr(Oe.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,xt=>{I(!0);let an="";Object.keys(xt).length==1?an=`The item below will be lost if you place this here:
|
|
8850
8850
|
`:an=`The items below will be lost if you place this here:
|
|
8851
8851
|
`,Object.keys(xt).map(ai=>{an+=`
|
|
8852
8852
|
• `+(xt[ai].itemData.name?xt[ai].itemData.name:xt[ai].itemData.skuID)}),$(an)}),Tr(Oe.EVENTS.SCENE.Cart_OutOfStock,xt=>{k(!0);let an="",ai="",Bn=0;xt.cartItems.map(Ki=>{Ki.countUnavailable>0&&(Bn++,ai+=`
|
|
8853
8853
|
• `+(ue[Ki.skuID].name?ue[Ki.skuID].name:Ki.skuID)+" ("+xy(Ki.currentVariant)+") x "+Ki.countUnavailable)}),Bn==1?an=`The following item is unavailable and will not be added to your cart:
|
|
8854
8854
|
`:an=`The following items are unavailable and will not be added to your cart:
|
|
8855
8855
|
`,pe(an+ai)});function Ke(xt){i(xt)}function be(){o(!s)}function Le(){m(!1)}function tt(){u(!1),Jt.getState().CORE_API.closeContextMenu()}function $t(){h(!1),Jt.getState().CORE_API.exitHotspot()}const En=oe.useCallback(()=>{navigator.clipboard.writeText(x),Oe.alert({alertMsg:"Link copied to the clipboard",alertTime:4e3,alertType:"success",alertLabel:"Copied",alertId:"linkCopied"})},[x]),Un=oe.useCallback(()=>{let xt=0;return ce.map(an=>xt+=an.count),xt},[ce]);return ne(hi,{children:[Ee&&j&&ne(_2e,{selectedItemData:j,contextMenuOpen:Ie,dismissContextMenuDrawer:tt},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:332,columnNumber:9},globalThis),ne("div",{className:"overlayUI",children:[ne("div",{id:"view-in-your-space-slot",ref:G},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:339,columnNumber:9},globalThis),ne(jS,{open:y,setOpen:E,heading:"Save This Configuration",inputPlaceholder:"Email Address",buttonText:"Send",dualOptions:!1,formFieldExists:!0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:341,columnNumber:9},globalThis),ne(jS,{open:b,setOpen:v,heading:Oe.sceneSettings.textSettings.shareModalHeading??"Share Configuration",inputValue:x,buttonText:ne("img",{src:Vr+"/Icon/Copy.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:360,columnNumber:13},globalThis),dualOptions:!1,modalText:"Your design has been saved via the unique link below.",shareModal:!0,formFieldExists:!0,onSubmit:()=>{En(),v(!1)},loading:Fe},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:351,columnNumber:9},globalThis),ne(jS,{open:_,setOpen:w,heading:"Are you sure you want to restart?",buttonText:"Restart",dualOptions:!0,modalText:"All changes will be lost.",formFieldExists:!1,onSubmit:()=>Oe.restartScene()},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:373,columnNumber:9},globalThis),ne(jS,{zIndex:31,open:R,setOpen:N,heading:"Are you sure you want to remove?",buttonText:"Remove",dualOptions:!0,modalText:"All changes made to this item will be lost.",formFieldExists:!1,onSubmit:()=>{Oe.removeSelectedItem(),tt()}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:384,columnNumber:9},globalThis),ne(jS,{zIndex:31,open:L,setOpen:I,heading:"Are you sure you want to move?",buttonText:"Move",dualOptions:!0,modalText:V,formFieldExists:!1,onSubmit:async()=>{await Oe.completeItemDrop()},onCancel:()=>{Oe.revertItemDrop()}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:399,columnNumber:9},globalThis),ne(jS,{zIndex:31,open:D,setOpen:k,heading:"Items Out Of Stock!",buttonText:"Confirm",dualOptions:!0,modalText:re,formFieldExists:!1,onSubmit:()=>{Oe.checkout(!0)}},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:416,columnNumber:9},globalThis),ne(T1e,{open:f,dataObject:H,dismissDrawer:$t},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:430,columnNumber:9},globalThis),ne(oOe,{open:p,dismissDrawer:Le},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:436,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:338,columnNumber:7},globalThis),ne("div",{className:`leftShell ${n===!0?"disabledleftShell":""} ${s===!1?"expanded-left-shell":""}`,id:"_leftShell",children:[(ee||pt||Xe||Ye||ke)&&ne(lOe,{utilityMenuVisible:Ne,dimensionsVisible:gt,viewInYourSpaceMenuBtnVisible:Be,saveMenuBtnVisible:ee,shareMenuBtnVisible:pt,dimensionsMenuBtnVisible:Xe,restartMenuBtnVisible:Ye,hotspotsMenuBtnVisible:ke,hotspotsVisibility:qe,handleRestartButtonClick:Ct,handleShareButtonTrigger:se,handleDimensionClick:Mt,handleShowHotspots:ct,position:"bottom",CORE_API:Oe},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:453,columnNumber:11},globalThis),ne("div",{id:"epigraph-configurator-core-slot",ref:U},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:472,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:442,columnNumber:7},globalThis),n===!1&&ne(hi,{children:[ne(y2e,{previewCartModalOpen:ye,togglePreviewCartModal:Se,PUBLIC_DESIGN_ASSETS_ENDPOINT:Vr,cart:ce},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:477,columnNumber:11},globalThis),ne(v2e,{configuratorWcRef:r,sideMenuOpen:s,sideMenuRef:F,toggleSideMenuOpen:be,PUBLIC_DESIGN_ASSETS_ENDPOINT:Vr,handleSideButtonClick:Ke,useTabIcon:J,GENERIC_PROJECT_ASSET_DATA_ROOT_URL:IAe,sideMenuState:a,togglePreviewCartModal:Se,getItemCount:Un,currency:st,numberWithCommas:k6},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:484,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:476,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/OverlayUIManager.js",lineNumber:330,columnNumber:5},globalThis)};function Nne({containerId:r,localStyles:e,dynamicStyles:t}){const[n,i]=oe.useState(0),a=Za(u=>u.assetsData),s=Jt(u=>u.CORE_API),[o,l]=oe.useState([]);return oe.useEffect(()=>{if(!s||!t)return;let u=e;if(t){for(const f of t)if(f&&f?.enabled===!0&&!f.global&&u.push(f),f.global===!0){const h=`dynamic-${f.id}`;if(!document.querySelector(`#${h}`)){const p=document.createElement("link");p.href=s.getResolvedAssetUrl(f.url),p.id=h,p.rel="stylesheet",p.type="text/css",document.body.appendChild(p)}}}l(u)},[a,s]),ne("div",{id:r,children:o&&o.map(u=>ne("div",{children:u.contents?ne("style",{id:u.id,children:u.contents},u.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/StyleManager.js",lineNumber:52,columnNumber:17},this):ne("link",{href:s.getResolvedAssetUrl(u.url),id:`dynamic-${u.id}`,rel:"stylesheet",type:"text/css",onLoad:()=>{u.loaded=!0,i(n+1)}},u.id,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/StyleManager.js",lineNumber:56,columnNumber:17},this)},`styleContainer-${u.id}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/StyleManager.js",lineNumber:50,columnNumber:13},this))},r,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/managers/StyleManager.js",lineNumber:46,columnNumber:5},this)}const S2e=`*{--primary-color: #e52438;--secondary-color: #e52438;--visited-color: #949494;--brand-dark: #333;--font-family: "Inter", helvetica, sans-serif;--hotspot-inner-circle-border-color: #e52438;--hotspot-active-inner-circle-border-color: var(--brand-dark);--hotspot-button-background-color: white;--hotspot-button-border-color: #e52438;--product-tour-dot-background-color: #000;--product-tour-current-dot-background-color: white;--tabs-height: 3.25rem;--tab-button-padding: 0 0 0 0;--tab-button-container-backgroundColor: #fff;--tab-button-hover-container-backgroundColor: #fff;--tab-button-background-color: #fff;--tab-button-hover-background-color: #fff;--tab-button-text-color: var(--brand-dark);--tab-button-hover-text-color: var(--brand-dark);--tab-button-underline: var(--brand-dark);--tabs-border-color: transparent;--review-cart-panel-background-color: var(--brand-dark);--product-feature-border-color: #f1f1f1;--item-card-box-shadow: 0px 2px 8px rgb(0 0 0 / 10%);--item-card-border-radius: .6rem;--item-card-background-coolor: #fff;--info-dark: #2e6cdf;--info-light: #d3e0f8;--warn-dark: #e2b236;--warn-light: #f9eed2;--error-dark: #d0342c;--error-light: #f6d7d5;--success-dark: #65bc6c;--success-light: #dbf0dd;--view-in-your-space-done-button-bg-color: var(--primary-color);--view-in-your-space-done-button-hover-bg-color: transparent;--view-in-your-space-done-button-hover-color: var(--primary-color)}
|
|
8856
|
-
`,x2e=`@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*{box-sizing:border-box;font-family:var(--font-family)}epigraph-configurator-core{width:100%;height:100%}epigraph-configurator{overflow-anchor:none}#epigraph-configurator-core-slot{width:100%;height:100%;position:relative;overflow:hidden}html,#root{width:100%;height:100%;margin:0;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.configuratorParentDiv{display:flex;width:100%;height:100%;justify-content:center;align-items:center}#dragImgElRef{opacity:0;position:absolute;z-index:1000;width:3rem;height:3rem;pointer-events:none;border-radius:.6rem}.loading{color:var(--primary-color, #000)}.shadowRoot{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.mainCanvas{background:white}.annotation{cursor:pointer;outline:none;border:none;font-size:8px;font-weight:300;background:black;color:#f0f0f0;padding:2px 10px;border-radius:20px;letter-spacing:1px;display:flex;justify-content:center;align-items:center;gap:5px}.annotation:hover{opacity:.8}.content{transform:translate3d(50%,0,0);text-align:left;background:#202035;color:#fff;padding:10px 15px;border-radius:5px}.ItemsParent{position:absolute;right:0;bottom:0;background-color:#e0e0e0ee;margin:5px;border-radius:15%}.Item{width:75px;height:75px;padding:15px;cursor:grab;user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.Item:hover{transform:scale(1.1)}.cursorImg{position:absolute;top:0;left:0;opacity:0;width:0px;height:0px;pointer-events:none}.heading{font-size:2rem;padding:1rem;font-weight:700}.description{font-size:1rem;padding:0rem 1rem}.overlayUI{width:100%;height:100%;padding:0;position:absolute;display:flex;align-items:center;justify-content:center;align-content:center;flex-direction:row;box-shadow:4px 4px 24px #00000014}.shellCanvas{width:100%;height:85%;position:relative;border-radius:12px 12px 0 0}.shellSideMenu{width:30%;height:100%}.ignore{pointer-events:none}.interactable{pointer-events:all}.arButton{position:absolute;bottom:3vh;left:2vh}.sideMenu{width:31%;height:100%;background:#fff;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;align-content:center;min-width:27.5rem;max-width:27.5rem;filter:drop-shadow(-4px 4px 12px rgba(0,0,0,.05));position:relative}.desktopSideMenu{width:100%;height:100%;position:relative}.sideMenuTabs{width:100%;height:5rem;display:flex;justify-content:center;align-items:center;gap:0px;box-shadow:-4px 4px 8px #0000000d;position:relative;z-index:1;border-bottom:2px solid var(--tabs-border-color)}.sideMenuTabs .button{display:flex;align-items:center;justify-content:center;flex-direction:column;font-weight:600;color:var(--brand-dark);width:33.33%;opacity:1;text-transform:uppercase;padding:var(--tab-button-padding);font-size:1rem;height:100%;background:var(--tab-button-container-background-color);border-left:2px solid var(--tabs-border-color);border-right:2px solid var(--tabs-border-color)}.sideMenuTabs .button:nth-child(2){border-left:none;border-right:none}.sideMenuTabs .button .icon,.sideMenuTabs .button span{opacity:.5}.sideMenuTabs .button span{padding:.5rem 2rem;transition:.1s ease;background:var(--tab-button-background-color)}.activeSideMenuTab .icon,.activeSideMenuTab span{opacity:1!important}.sideMenuTabs .button:hover{border-bottom:1px solid var(--tab-button-underline);margin-bottom:-1px}.sideMenuTabs .button:hover span,.activeSideMenuTab span{opacity:1;background:var(--tab-button-hover-background-color)!important;color:var(--tab-button-hover-text-color)}.activeSideMenuTab{border-bottom:2px solid var(--tab-button-underline)!important}.sideMenuTabs .button .icon{width:22px;margin-bottom:.5rem}.sideMenuContent{height:calc(100% - 9rem);width:100%;background:#fff;position:absolute;top:5rem;left:0}.leftShell{height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center;position:relative;min-width:50%;width:100%;z-index:2}.disabledleftShell{width:100%}.shellCanvasContainerParent{display:flex;height:100%;align-items:center;position:absolute;z-index:5;top:0;left:0}.shellCanvasContainerParent#bottom{height:auto;width:100%;top:auto;bottom:0;justify-content:center}.shellCanvasContainerParent#right{height:100%;left:auto;top:0;right:0}.shellCanvasContainerParent#top{height:auto;width:100%;top:0;justify-content:center}.shellCanvasContainer{box-shadow:4px 4px 12px #0000000d;border-radius:2px;padding:1rem 1rem 1rem 0px;display:flex;flex-direction:column;gap:1.125rem;background:white;transition:.25s ease-in-out}.shellCanvasContainerParent#bottom .shellCanvasContainer{gap:.75rem;flex-direction:row;justify-content:center;align-items:center;box-shadow:0 -4px 12px #0000000d}.shellCanvasContainerParent#right .shellCanvasContainer{box-shadow:-4px 0 12px #0000000d}.shellCanvasContainerParent#top .shellCanvasContainer{gap:.75rem;flex-direction:row;justify-content:center;align-items:center;box-shadow:0 4px 12px #0000000d}.shellCanvasContainerInactive{opacity:0;pointer-events:none}.shellCanvasContainerInactive .shellButtonContainer{pointer-events:none}.shellButtonContainer{margin-left:1rem;cursor:pointer;pointer-events:all;border-left:1px solid #fff;position:relative}.shellCanvasContainerParent#bottom .shellButtonContainer,.shellCanvasContainerParent#top .shellButtonContainer{display:flex;flex-direction:column;justify-content:center;align-items:center}.shellButtonContainer .buttonContent{background:#fff;transition:.2s all ease;-webkit-transition:.2s all ease;min-width:2.5rem;max-width:2.5rem;min-height:2.5rem;max-height:2.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:50%}.shellButtonContainer .buttonContent span{display:none}.shellButtonContainer:hover .buttonContent{background:#f1f1f1}.shellButtonContainer.active{border-left:1px solid var(--brand-dark)}.shellCanvasContainerParent#bottom .shellButtonContainer.active,.shellCanvasContainerParent#top .shellButtonContainer.active{border-left:none}.shellCanvasContainerParent#right .shellButtonContainer.active{border-left:none;border-right:1px solid var(--brand-dark)}.shellButtonContainer.active .buttonContent{background:#f1f1f1}.shellButtonContainer img{width:1.375rem}.shellButtonContainer span{font-size:.6875rem;color:#333}.shellButtonContainer .hoverDescriptor{position:absolute;border-radius:1px;display:flex;justify-content:center;transition:.2s all ease;-webkit-transition:.2s all ease;opacity:0;pointer-events:none;top:calc(50% - .5625rem);left:calc(100% + 1rem);padding:.25rem .5rem;background:rgba(0,0,0,.6)}.shellCanvasContainerParent#bottom .shellButtonContainer .hoverDescriptor{top:-2rem;left:auto}.shellCanvasContainerParent#right .hoverDescriptor{right:calc(100% + 1rem);left:auto}.shellCanvasContainerParent#top .shellButtonContainer .hoverDescriptor{top:auto;bottom:-2rem;left:auto}.shellButtonContainer:hover .hoverDescriptor{opacity:1}.shellButtonContainer .hoverDescriptor span{color:#fff;font-size:11px;white-space:nowrap}.bottomBar{background-color:var(--brand-dark);height:4rem;width:100%;display:flex;padding:1vh;justify-content:flex-end;align-items:center;bottom:0;left:0;min-height:4rem;position:absolute}.bottomBar.right{justify-content:space-between;padding:.5rem 24px;border-radius:12px 12px 0 0}.bottomBar:hover{background-color:#1f1f1f}.bottomBar .cartButton{position:relative}.bottomBar .reviewButton{color:#fff;margin-right:12px;font-size:18px}.bottomBar div{font-size:1.125rem;font-weight:700;color:#fff;text-transform:uppercase}.bottomBar .cartNumber{position:relative;margin-left:.5rem;padding:.5rem;background:var(--primary-color);color:#fff;border-radius:50%;width:2rem;height:2rem;display:flex;justify-content:center;align-items:center}.bottomBar .bottomBarChildDiv{display:flex;align-items:center}.bottomBar .reviewButtonParentDiv{display:flex;align-items:center;color:#fff}.button{cursor:pointer;font-weight:700}.leftBottomBarButton{color:#fff;margin:1vh;width:80px;padding:12px;font-size:14px;border:2px solid #ccc!important;text-align:center;border-radius:4px}*{scrollbar-width:8px;scrollbar-color:var(--primary-color) transparent}*::-webkit-scrollbar{width:8px;height:3px;background-color:#c4c4c426}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:#c4c4c4;border-radius:0;border:none}.shellCanvasTopOptions{position:absolute;top:2rem;right:2rem}.shellCanvasBottomOptions{position:absolute;right:2rem;bottom:2rem;display:flex;flex-direction:column;justify-content:flex-end;z-index:4}.shellCanvasBottomOptions img:nth-child(1){margin-bottom:1rem}.hotspotDrawer .drawerContent{padding:2rem}.hotspotDrawer h2{text-transform:uppercase;font-weight:700}.uiModals{z-index:3}.uiModal{position:fixed;z-index:7;width:100%;height:100%;top:0;left:0;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;transition:.2s ease;-webkit-transition:.2s ease}.uiModal.open{opacity:1;pointer-events:all}.uiModal .modalOverlay{background:rgba(51,51,51,.4);position:absolute;top:0;left:0;width:100%;height:100%;display:none}.uiModal.open .modalOverlay{display:block}.uiModal .modalDialog{background:#fff;width:90%;max-width:27.5rem;padding:3rem 2rem 2rem;border-radius:6px;position:relative;z-index:8;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModal .modalText{white-space:pre-wrap;font-size:.75rem;font-weight:300;color:#222;margin-bottom:1rem}.uiModal .modalDialog .modalHeading{font-size:1.5rem;font-weight:700;color:var(--brand-dark);text-transform:capitalize;margin:0;margin-bottom:2.25rem}.uiModal .modalDialog input{font-weight:300;color:var(--brand-dark);border:.5px solid var(--brand-dark);border-radius:2px;width:100%;height:100%}.uiModal .modalDialog button{border-radius:2px;background:var(--primary-color);color:#fff;text-align:center;font-size:.875rem;font-weight:700;padding:.75rem 1rem;outline:none;border:2px solid black;box-shadow:none;margin:0;margin-top:2.25rem;cursor:pointer;width:100%;transition:.5s}.uiModal .modalDialog button:hover{color:#000;background-color:#fff}.shareModal{display:flex;width:100%;height:3rem;align-items:center;justify-content:center}.noShareModal{width:100%}.shareModalChildDiv,.shareModalLoaderImg{height:100%}.uiModal .shareModal button{text-transform:uppercase;right:.25rem;margin:0;top:.25rem;font-size:1rem;padding:0;width:20%;height:100%;display:flex;justify-content:center;align-items:center}.uiModal .shareModal button img{width:1.75rem;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.uiModal .shareModal button:hover img{filter:unset}.uiModal .modalDialog .modalCloseContainer{width:100%;display:flex;justify-content:flex-end;position:absolute;right:26px;top:1rem}.uiModal .modalDialog .modalCloseContainer button{cursor:pointer;outline:none;background:transparent;border:none;margin:0;padding:0;width:auto}.uiModal .modalDialog .modalCloseContainer button img{width:1.75rem}.removeAllColorOverridesButton{cursor:pointer;margin-bottom:1rem;width:100%;height:44px;font-family:var(--font-family);font-weight:700;background-color:transparent;border:solid 1px var(--brand-dark);color:var(--brand-dark);border-radius:3px;transition:.2s}.removeAllColorOverridesButton:hover{background-color:var(--brand-dark);color:#fff;transition:.25s}.removeAllColorOverridesButton:disabled{opacity:.25;cursor:not-allowed}.Toastify__toast-container--bottom-right{bottom:4rem!important}.Toastify__close-button{align-self:center!important}.viewInYourSpace{z-index:213}.viewInYourSpace-AR{position:absolute;z-index:213;width:90%;height:0%}.contextMenuParent{position:absolute;max-width:none;width:auto;z-index:3;background:#ffffff;box-shadow:0 1.21008px 14.521px #0003;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;transition:ease-in-out .25s;border-radius:.625rem;min-width:10.625rem}.contextMenuParent .infoButton{transition:.2s all ease;cursor:pointer}.contextMenuParent .infoButton:hover{opacity:.5}.contextMenuParent .closeContainer{width:fit-content;display:flex;justify-content:flex-end}.contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent;transition:.25s}.contextMenuParent .closeContainer button img{width:1.5rem}.contextMenuParent .contextContent{min-width:13.5rem}.contextMenuParent .contextNameContent{display:flex;align-items:center;gap:.5rem}.contextMenuParent .contextColorContent{margin-top:.75rem;display:flex;flex-direction:column}.colorThumbnailContainer .contextColorThumbnail,.contextMenuParent .contextColorThumbnail{height:100%;width:100%;opacity:1}.contextMenuParent .contextContentDiv{display:flex;align-items:flex-start}.contextMenuParent .contextContent .contextContentChildDiv{width:100%;display:flex;justify-content:space-between}.contextMenuParent .contextContent h3{font-size:1rem;font-weight:600;text-transform:uppercase;margin:0}.contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0;width:100%;white-space:nowrap}.contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.contextMenuParent .contextButtons button{border-radius:1.75px;padding:.75rem 2rem;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;border:none;outline:none;box-shadow:none;background:#ffffff;font-weight:700}.contextMenuParent .contextButtons button img{width:1.125rem}.contextMenuParent .contextButtons button:nth-child(1){color:var(--primary-color);border:.5px solid var(--primary-color)}.contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.contextMenuParent .contextButtons button:nth-child(2){opacity:.3;color:var(--brand-dark);border:.5px solid var(--brand-dark)}.contextMenuParent .color-grid{display:flex;align-items:center;gap:.5rem;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-width:320px;padding-bottom:4px}.contextMenuParent .color-grid ::-webkit-scrollbar-thumb{height:4px}.contextMenuParent .colorSwatchTitle{color:#c4c4c4;font-size:.6875rem;margin-bottom:.5rem;text-transform:uppercase}.mobileExpandButton{display:none}.epigraphDrawer .contextMenuParent{position:relative;max-width:none;width:100%;top:0;left:0;z-index:1005;background:#ffffff;box-shadow:none;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;transition:ease-in-out .25s;border-radius:.625rem;min-width:200px}.epigraphDrawer .contextMenuParent .closeContainer{width:100%;display:flex;justify-content:flex-end}.epigraphDrawer .contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent}.epigraphDrawer .contextMenuParent .closeContainer button img{width:.75rem}.epigraphDrawer .contextMenuParent .contextContent h3{font-size:.875rem;font-weight:700;text-transform:uppercase;margin:0}.epigraphDrawer .contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0}.epigraphDrawer .contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.epigraphDrawer .contextMenuParent .contextButtons button{border-radius:.25rem;padding:.75rem 2rem;background:transparent;display:flex;flex-direction:row;align-items:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;font-weight:700;border:1px solid var(--primary-color);outline:none;background:#fff;box-shadow:none;justify-content:center}.epigraphDrawer .contextMenuParent .contextButtons button img{width:1rem}.epigraphDrawer .contextMenuParent .contextButtons button{color:var(--primary-color);width:100%}.epigraphDrawer .contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.epigraphDrawer .contextMenuParent .contextButtons button svg path{fill:var(--primary-color)}.epigraphDrawer .color-grid{display:flex;gap:1rem}.epigraphDrawer .colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem}.epigraphDrawer .colorSelector .colorThumbnailContainer{position:relative}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:.1s all ease;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.epigraphDrawer .colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.epigraphDrawer .colorSelector .colorDetails{text-align:center;opacity:.75;pointer-events:none;margin-top:0}.spawning-requirements-container{position:absolute;top:5.5rem;background:#eaeaea;width:125%;border-radius:.3rem;padding:.2rem;z-index:1;pointer-events:none;font-size:.5rem;box-shadow:0 2px 8px #0000001a;-webkit-box-shadow:0px 2px 8px rgb(0 0 0 / 10%);transition:.25s}.spawningRequirementDiv .reason,.spawning-requirements-text{width:100%;padding:.2rem;white-space:pre-line}.truncate{width:100px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-align:center}.epigraphDrawer .colorSelector:hover .colorDetails,.epigraphDrawer .colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.epigraphDrawer .colorSelector .colorDetails p{margin:0;font-size:.75rem;color:var(--brand-dark)}.epigraphDrawer .colorSelector .colorDetails p:nth-child(1){font-weight:600}.epigraphDrawer .colorSelector .colorDetails p:nth-child(2){font-weight:400}.epigraphDrawer p,.epigraphDrawer span,.epigraphDrawer h1,.epigraphDrawer h2,.epigraphDrawer h3,.epigraphDrawer h4,.epigraphDrawer h5,.epigraphDrawer pre{font-family:Inter,helvetica,sans-serif}.infoDrawer{padding-top:2rem;padding-bottom:3rem;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;position:relative}.infoDrawer .infoDrawerImageContainer{position:relative;width:100%}.infoDrawer button{background:transparent;border:none;outline:none;cursor:pointer}.infoDrawer .closeButton{position:absolute;right:1.5rem;top:1.5rem}.infoDrawer .closeButton img{width:.75rem}.infoDrawer .openNewTab{position:relative;margin-top:1rem;display:flex;align-items:center;color:var(--brand-dark);gap:.5rem;outline:none}.infoDrawer .itemImage{max-width:60%;width:50%}.infoDrawer .itemTitle{font-weight:400;max-width:70%;font-size:1rem;margin-top:1.25rem;text-align:center}.infoDrawer .infoDrawerActions{margin-top:1.5rem}.infoDrawer .infoDrawerActions button{width:65%;padding:.6875rem;text-align:center;color:#fff}.infoDrawer .infoDrawerActions .removeFromCart{background:var(--brand-dark)}.infoDrawer .itemTitle{font-weight:400;max-width:60%;font-size:1.25rem;margin-top:1rem}.infoDrawer .infoDrawerDimensions{color:var(--brand-dark);opacity:.4;font-weight:700;font-size:.875rem;margin-top:1rem}.infoDrawer .infoDrawerActions{margin-top:3.75rem}.infoDrawer .infoModalActions button{width:65%;padding:.6875rem;text-align:center;color:var(--brand-dark);pointer-events:none;font-size:1.25rem;font-weight:700;background:#f8f8f8;margin-top:1rem}.infoDrawer .categoryLink{display:flex;align-items:center;color:var(--brand-dark);gap:.75rem;text-decoration:none;position:relative;width:70%;outline:none;margin-bottom:1rem}.infoDrawer .categoryLink .categoryTitle{font-size:1.25rem;font-weight:700;text-align:center;margin:auto}.previewCartModalChild{width:100%;height:100%}.cartEmptyText{padding:2rem}.previewCartContentParentDiv{position:relative;padding-top:.5rem;width:100%;height:100%}.checkButtonParentDiv{background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;height:auto;padding:1rem;width:100%;box-shadow:0 2px 12px #0000001a}.cartMessageDiv{font-size:.7rem;width:20.625rem;padding:1rem;font-weight:600;text-align:center;display:flex;justify-content:center;align-items:center}.infoModalTextContainer{text-align:center;width:100%;display:flex;flex-direction:column;align-items:center;margin-top:1rem}#hotspotDrawer{position:absolute;width:100%;height:100%}.epigraphDrawer.hotspotDrawer .drawerContent{padding:3.5rem 1.25rem}.epigraphDrawer.hotspotDrawer .quill p{margin:0;margin-top:.5rem}.product-image-default-state{opacity:1;cursor:not-allowed;transition:opacity .3s ease-in-out}.product-image-disabled{opacity:.1}.UIModalButtonParentDiv{display:flex;gap:1rem;width:inherit}.colorSelector .colorThumbnailContainer .checkMark{display:none!important}.colorSelector .colorThumbnailContainer{border-radius:3.97381px;border:2px solid #4a4a4a00;padding:2px}.colorSelector.selected .colorThumbnailContainer{border:2px solid #4a4a4a}.imageContainer .contentContainer{border-radius:3.97381px;border:2px solid #4a4a4a00}.imageContainer.active .contentContainer{border:2px solid #4a4a4a}
|
|
8856
|
+
`,x2e=`@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*{box-sizing:border-box;font-family:var(--font-family)}epigraph-configurator-core{width:100%;height:100%}epigraph-configurator{overflow-anchor:none}#epigraph-configurator-core-slot{width:100%;height:100%;position:relative;overflow:hidden}html,#root{width:100%;height:100%;margin:0;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.configuratorParentDiv{display:flex;width:100%;height:100%;justify-content:center;align-items:center}#dragImgElRef{opacity:0;position:absolute;z-index:1000;width:3rem;height:3rem;pointer-events:none;border-radius:.6rem}.loading{color:var(--primary-color, #000)}.shadowRoot{position:relative;width:100%;height:100%;display:flex;justify-content:center;align-items:center;overflow:hidden}.mainCanvas{background:white}.annotation{cursor:pointer;outline:none;border:none;font-size:8px;font-weight:300;background:black;color:#f0f0f0;padding:2px 10px;border-radius:20px;letter-spacing:1px;display:flex;justify-content:center;align-items:center;gap:5px}.annotation:hover{opacity:.8}.content{transform:translate3d(50%,0,0);text-align:left;background:#202035;color:#fff;padding:10px 15px;border-radius:5px}.ItemsParent{position:absolute;right:0;bottom:0;background-color:#e0e0e0ee;margin:5px;border-radius:15%}.Item{width:75px;height:75px;padding:15px;cursor:grab;user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.Item:hover{transform:scale(1.1)}.cursorImg{position:absolute;top:0;left:0;opacity:0;width:0px;height:0px;pointer-events:none}.heading{font-size:2rem;padding:1rem;font-weight:700}.description{font-size:1rem;padding:0rem 1rem}.overlayUI{width:100%;height:100%;padding:0;position:absolute;display:flex;align-items:center;justify-content:center;align-content:center;flex-direction:row;box-shadow:4px 4px 24px #00000014}.shellCanvas{width:100%;height:85%;position:relative;border-radius:12px 12px 0 0}.shellSideMenu{width:30%;height:100%}.ignore{pointer-events:none}.interactable{pointer-events:all}.arButton{position:absolute;bottom:3vh;left:2vh}.sideMenu{width:31%;height:100%;background:#fff;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;align-content:center;min-width:27.5rem;max-width:27.5rem;filter:drop-shadow(-4px 4px 12px rgba(0,0,0,.05));position:relative}.desktopSideMenu{width:100%;height:100%;position:relative}.sideMenuTabs{width:100%;height:5rem;display:flex;justify-content:center;align-items:center;gap:0px;box-shadow:-4px 4px 8px #0000000d;position:relative;z-index:1;border-bottom:2px solid var(--tabs-border-color)}.sideMenuTabs .button{display:flex;align-items:center;justify-content:center;flex-direction:column;font-weight:600;color:var(--brand-dark);min-width:33.33%;opacity:1;text-transform:uppercase;padding:var(--tab-button-padding);font-size:1rem;height:100%;background:var(--tab-button-container-background-color);border-left:2px solid var(--tabs-border-color);border-right:2px solid var(--tabs-border-color)}.sideMenuTabs .button:nth-child(2){border-left:none;border-right:none}.sideMenuTabs .button .icon,.sideMenuTabs .button span{opacity:.5}.sideMenuTabs .button span{padding:.5rem 2rem;transition:.1s ease;background:var(--tab-button-background-color)}.activeSideMenuTab .icon,.activeSideMenuTab span{opacity:1!important}.sideMenuTabs .button:hover{border-bottom:1px solid var(--tab-button-underline);margin-bottom:-1px}.sideMenuTabs .button:hover span,.activeSideMenuTab span{opacity:1;background:var(--tab-button-hover-background-color)!important;color:var(--tab-button-hover-text-color)}.activeSideMenuTab{border-bottom:2px solid var(--tab-button-underline)!important}.sideMenuTabs .button .icon{width:22px;margin-bottom:.5rem}.sideMenuContent{height:calc(100% - 9rem);width:100%;background:#fff;position:absolute;top:5rem;left:0}.leftShell{height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center;position:relative;min-width:50%;width:100%;z-index:2}.disabledleftShell{width:100%}.shellCanvasContainerParent{display:flex;height:100%;align-items:center;position:absolute;z-index:5;top:0;left:0}.shellCanvasContainerParent#bottom{height:auto;width:100%;top:auto;bottom:0;justify-content:center}.shellCanvasContainerParent#right{height:100%;left:auto;top:0;right:0}.shellCanvasContainerParent#top{height:auto;width:100%;top:0;justify-content:center}.shellCanvasContainer{box-shadow:4px 4px 12px #0000000d;border-radius:2px;padding:1rem 1rem 1rem 0px;display:flex;flex-direction:column;gap:1.125rem;background:white;transition:.25s ease-in-out}.shellCanvasContainerParent#bottom .shellCanvasContainer{gap:.75rem;flex-direction:row;justify-content:center;align-items:center;box-shadow:0 -4px 12px #0000000d}.shellCanvasContainerParent#right .shellCanvasContainer{box-shadow:-4px 0 12px #0000000d}.shellCanvasContainerParent#top .shellCanvasContainer{gap:.75rem;flex-direction:row;justify-content:center;align-items:center;box-shadow:0 4px 12px #0000000d}.shellCanvasContainerInactive{opacity:0;pointer-events:none}.shellCanvasContainerInactive .shellButtonContainer{pointer-events:none}.shellButtonContainer{margin-left:1rem;cursor:pointer;pointer-events:all;border-left:1px solid #fff;position:relative}.shellCanvasContainerParent#bottom .shellButtonContainer,.shellCanvasContainerParent#top .shellButtonContainer{display:flex;flex-direction:column;justify-content:center;align-items:center}.shellButtonContainer .buttonContent{background:#fff;transition:.2s all ease;-webkit-transition:.2s all ease;min-width:2.5rem;max-width:2.5rem;min-height:2.5rem;max-height:2.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:50%}.shellButtonContainer .buttonContent span{display:none}.shellButtonContainer:hover .buttonContent{background:#f1f1f1}.shellButtonContainer.active{border-left:1px solid var(--brand-dark)}.shellCanvasContainerParent#bottom .shellButtonContainer.active,.shellCanvasContainerParent#top .shellButtonContainer.active{border-left:none}.shellCanvasContainerParent#right .shellButtonContainer.active{border-left:none;border-right:1px solid var(--brand-dark)}.shellButtonContainer.active .buttonContent{background:#f1f1f1}.shellButtonContainer img{width:1.375rem}.shellButtonContainer span{font-size:.6875rem;color:#333}.shellButtonContainer .hoverDescriptor{position:absolute;border-radius:1px;display:flex;justify-content:center;transition:.2s all ease;-webkit-transition:.2s all ease;opacity:0;pointer-events:none;top:calc(50% - .5625rem);left:calc(100% + 1rem);padding:.25rem .5rem;background:rgba(0,0,0,.6)}.shellCanvasContainerParent#bottom .shellButtonContainer .hoverDescriptor{top:-2rem;left:auto}.shellCanvasContainerParent#right .hoverDescriptor{right:calc(100% + 1rem);left:auto}.shellCanvasContainerParent#top .shellButtonContainer .hoverDescriptor{top:auto;bottom:-2rem;left:auto}.shellButtonContainer:hover .hoverDescriptor{opacity:1}.shellButtonContainer .hoverDescriptor span{color:#fff;font-size:11px;white-space:nowrap}.bottomBar{background-color:var(--brand-dark);height:4rem;width:100%;display:flex;padding:1vh;justify-content:flex-end;align-items:center;bottom:0;left:0;min-height:4rem;position:absolute}.bottomBar.right{justify-content:space-between;padding:.5rem 24px;border-radius:12px 12px 0 0}.bottomBar:hover{background-color:#1f1f1f}.bottomBar .cartButton{position:relative}.bottomBar .reviewButton{color:#fff;margin-right:12px;font-size:18px}.bottomBar div{font-size:1.125rem;font-weight:700;color:#fff;text-transform:uppercase}.bottomBar .cartNumber{position:relative;margin-left:.5rem;padding:.5rem;background:var(--primary-color);color:#fff;border-radius:50%;width:2rem;height:2rem;display:flex;justify-content:center;align-items:center}.bottomBar .bottomBarChildDiv{display:flex;align-items:center}.bottomBar .reviewButtonParentDiv{display:flex;align-items:center;color:#fff}.button{cursor:pointer;font-weight:700}.leftBottomBarButton{color:#fff;margin:1vh;width:80px;padding:12px;font-size:14px;border:2px solid #ccc!important;text-align:center;border-radius:4px}*{scrollbar-width:8px;scrollbar-color:var(--primary-color) transparent}*::-webkit-scrollbar{width:8px;height:3px;background-color:#c4c4c426}*::-webkit-scrollbar-track{background:transparent}*::-webkit-scrollbar-thumb{background-color:#c4c4c4;border-radius:0;border:none}.shellCanvasTopOptions{position:absolute;top:2rem;right:2rem}.shellCanvasBottomOptions{position:absolute;right:2rem;bottom:2rem;display:flex;flex-direction:column;justify-content:flex-end;z-index:4}.shellCanvasBottomOptions img:nth-child(1){margin-bottom:1rem}.hotspotDrawer .drawerContent{padding:2rem}.hotspotDrawer h2{text-transform:uppercase;font-weight:700}.uiModals{z-index:3}.uiModal{position:fixed;z-index:7;width:100%;height:100%;top:0;left:0;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;transition:.2s ease;-webkit-transition:.2s ease}.uiModal.open{opacity:1;pointer-events:all}.uiModal .modalOverlay{background:rgba(51,51,51,.4);position:absolute;top:0;left:0;width:100%;height:100%;display:none}.uiModal.open .modalOverlay{display:block}.uiModal .modalDialog{background:#fff;width:90%;max-width:27.5rem;padding:3rem 2rem 2rem;border-radius:6px;position:relative;z-index:8;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModal .modalText{white-space:pre-wrap;font-size:.75rem;font-weight:300;color:#222;margin-bottom:1rem}.uiModal .modalDialog .modalHeading{font-size:1.5rem;font-weight:700;color:var(--brand-dark);text-transform:capitalize;margin:0;margin-bottom:2.25rem}.uiModal .modalDialog input{font-weight:300;color:var(--brand-dark);border:.5px solid var(--brand-dark);border-radius:2px;width:100%;height:100%}.uiModal .modalDialog button{border-radius:2px;background:var(--primary-color);color:#fff;text-align:center;font-size:.875rem;font-weight:700;padding:.75rem 1rem;outline:none;border:2px solid black;box-shadow:none;margin:0;margin-top:2.25rem;cursor:pointer;width:100%;transition:.5s}.uiModal .modalDialog button:hover{color:#000;background-color:#fff}.shareModal{display:flex;width:100%;height:3rem;align-items:center;justify-content:center}.noShareModal{width:100%}.shareModalChildDiv,.shareModalLoaderImg{height:100%}.uiModal .shareModal button{text-transform:uppercase;right:.25rem;margin:0;top:.25rem;font-size:1rem;padding:0;width:20%;height:100%;display:flex;justify-content:center;align-items:center}.uiModal .shareModal button img{width:1.75rem;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.uiModal .shareModal button:hover img{filter:unset}.uiModal .modalDialog .modalCloseContainer{width:100%;display:flex;justify-content:flex-end;position:absolute;right:26px;top:1rem}.uiModal .modalDialog .modalCloseContainer button{cursor:pointer;outline:none;background:transparent;border:none;margin:0;padding:0;width:auto}.uiModal .modalDialog .modalCloseContainer button img{width:1.75rem}.removeAllColorOverridesButton{cursor:pointer;margin-bottom:1rem;width:100%;height:44px;font-family:var(--font-family);font-weight:700;background-color:transparent;border:solid 1px var(--brand-dark);color:var(--brand-dark);border-radius:3px;transition:.2s}.removeAllColorOverridesButton:hover{background-color:var(--brand-dark);color:#fff;transition:.25s}.removeAllColorOverridesButton:disabled{opacity:.25;cursor:not-allowed}.Toastify__toast-container--bottom-right{bottom:4rem!important}.Toastify__close-button{align-self:center!important}.viewInYourSpace{z-index:213}.viewInYourSpace-AR{position:absolute;z-index:213;width:90%;height:0%}.contextMenuParent{position:absolute;max-width:none;width:auto;z-index:3;background:#ffffff;box-shadow:0 1.21008px 14.521px #0003;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;transition:ease-in-out .25s;border-radius:.625rem;min-width:10.625rem}.contextMenuParent .infoButton{transition:.2s all ease;cursor:pointer}.contextMenuParent .infoButton:hover{opacity:.5}.contextMenuParent .closeContainer{width:fit-content;display:flex;justify-content:flex-end}.contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent;transition:.25s}.contextMenuParent .closeContainer button img{width:1.5rem}.contextMenuParent .contextContent{min-width:13.5rem}.contextMenuParent .contextNameContent{display:flex;align-items:center;gap:.5rem}.contextMenuParent .contextColorContent{margin-top:.75rem;display:flex;flex-direction:column}.colorThumbnailContainer .contextColorThumbnail,.contextMenuParent .contextColorThumbnail{height:100%;width:100%;opacity:1}.contextMenuParent .contextContentDiv{display:flex;align-items:flex-start}.contextMenuParent .contextContent .contextContentChildDiv{width:100%;display:flex;justify-content:space-between}.contextMenuParent .contextContent h3{font-size:1rem;font-weight:600;text-transform:uppercase;margin:0}.contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0;width:100%;white-space:nowrap}.contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.contextMenuParent .contextButtons button{border-radius:1.75px;padding:.75rem 2rem;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;border:none;outline:none;box-shadow:none;background:#ffffff;font-weight:700}.contextMenuParent .contextButtons button img{width:1.125rem}.contextMenuParent .contextButtons button:nth-child(1){color:var(--primary-color);border:.5px solid var(--primary-color)}.contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.contextMenuParent .contextButtons button:nth-child(2){opacity:.3;color:var(--brand-dark);border:.5px solid var(--brand-dark)}.contextMenuParent .color-grid{display:flex;align-items:center;gap:.5rem;flex-direction:row;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-width:320px;padding-bottom:4px}.contextMenuParent .color-grid ::-webkit-scrollbar-thumb{height:4px}.contextMenuParent .colorSwatchTitle{color:#c4c4c4;font-size:.6875rem;margin-bottom:.5rem;text-transform:uppercase}.mobileExpandButton{display:none}.epigraphDrawer .contextMenuParent{position:relative;max-width:none;width:100%;top:0;left:0;z-index:1005;background:#ffffff;box-shadow:none;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;transition:ease-in-out .25s;border-radius:.625rem;min-width:200px}.epigraphDrawer .contextMenuParent .closeContainer{width:100%;display:flex;justify-content:flex-end}.epigraphDrawer .contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent}.epigraphDrawer .contextMenuParent .closeContainer button img{width:.75rem}.epigraphDrawer .contextMenuParent .contextContent h3{font-size:.875rem;font-weight:700;text-transform:uppercase;margin:0}.epigraphDrawer .contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0}.epigraphDrawer .contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.epigraphDrawer .contextMenuParent .contextButtons button{border-radius:.25rem;padding:.75rem 2rem;background:transparent;display:flex;flex-direction:row;align-items:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;font-weight:700;border:1px solid var(--primary-color);outline:none;background:#fff;box-shadow:none;justify-content:center}.epigraphDrawer .contextMenuParent .contextButtons button img{width:1rem}.epigraphDrawer .contextMenuParent .contextButtons button{color:var(--primary-color);width:100%}.epigraphDrawer .contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.epigraphDrawer .contextMenuParent .contextButtons button svg path{fill:var(--primary-color)}.epigraphDrawer .color-grid{display:flex;gap:1rem}.epigraphDrawer .colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem}.epigraphDrawer .colorSelector .colorThumbnailContainer{position:relative}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:.1s all ease;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.epigraphDrawer .colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.epigraphDrawer .colorSelector .colorDetails{text-align:center;opacity:.75;pointer-events:none;margin-top:0}.spawning-requirements-container{position:absolute;top:5.5rem;background:#eaeaea;width:125%;border-radius:.3rem;padding:.2rem;z-index:1;pointer-events:none;font-size:.5rem;box-shadow:0 2px 8px #0000001a;-webkit-box-shadow:0px 2px 8px rgb(0 0 0 / 10%);transition:.25s}.spawningRequirementDiv .reason,.spawning-requirements-text{width:100%;padding:.2rem;white-space:pre-line}.truncate{width:100px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-align:center}.epigraphDrawer .colorSelector:hover .colorDetails,.epigraphDrawer .colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.epigraphDrawer .colorSelector .colorDetails p{margin:0;font-size:.75rem;color:var(--brand-dark)}.epigraphDrawer .colorSelector .colorDetails p:nth-child(1){font-weight:600}.epigraphDrawer .colorSelector .colorDetails p:nth-child(2){font-weight:400}.epigraphDrawer p,.epigraphDrawer span,.epigraphDrawer h1,.epigraphDrawer h2,.epigraphDrawer h3,.epigraphDrawer h4,.epigraphDrawer h5,.epigraphDrawer pre{font-family:Inter,helvetica,sans-serif}.infoDrawer{padding-top:2rem;padding-bottom:3rem;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;position:relative}.infoDrawer .infoDrawerImageContainer{position:relative;width:100%}.infoDrawer button{background:transparent;border:none;outline:none;cursor:pointer}.infoDrawer .closeButton{position:absolute;right:1.5rem;top:1.5rem}.infoDrawer .closeButton img{width:.75rem}.infoDrawer .openNewTab{position:relative;margin-top:1rem;display:flex;align-items:center;color:var(--brand-dark);gap:.5rem;outline:none}.infoDrawer .itemImage{max-width:60%;width:50%}.infoDrawer .itemTitle{font-weight:400;max-width:70%;font-size:1rem;margin-top:1.25rem;text-align:center}.infoDrawer .infoDrawerActions{margin-top:1.5rem}.infoDrawer .infoDrawerActions button{width:65%;padding:.6875rem;text-align:center;color:#fff}.infoDrawer .infoDrawerActions .removeFromCart{background:var(--brand-dark)}.infoDrawer .itemTitle{font-weight:400;max-width:60%;font-size:1.25rem;margin-top:1rem}.infoDrawer .infoDrawerDimensions{color:var(--brand-dark);opacity:.4;font-weight:700;font-size:.875rem;margin-top:1rem}.infoDrawer .infoDrawerActions{margin-top:3.75rem}.infoDrawer .infoModalActions button{width:65%;padding:.6875rem;text-align:center;color:var(--brand-dark);pointer-events:none;font-size:1.25rem;font-weight:700;background:#f8f8f8;margin-top:1rem}.infoDrawer .categoryLink{display:flex;align-items:center;color:var(--brand-dark);gap:.75rem;text-decoration:none;position:relative;width:70%;outline:none;margin-bottom:1rem}.infoDrawer .categoryLink .categoryTitle{font-size:1.25rem;font-weight:700;text-align:center;margin:auto}.previewCartModalChild{width:100%;height:100%}.cartEmptyText{padding:2rem}.previewCartContentParentDiv{position:relative;padding-top:.5rem;width:100%;height:100%}.checkButtonParentDiv{background:#fff;display:flex;flex-direction:column;justify-content:center;align-items:center;height:auto;padding:1rem;width:100%;box-shadow:0 2px 12px #0000001a}.cartMessageDiv{font-size:.7rem;width:20.625rem;padding:1rem;font-weight:600;text-align:center;display:flex;justify-content:center;align-items:center}.infoModalTextContainer{text-align:center;width:100%;display:flex;flex-direction:column;align-items:center;margin-top:1rem}#hotspotDrawer{position:absolute;width:100%;height:100%}.epigraphDrawer.hotspotDrawer .drawerContent{padding:3.5rem 1.25rem}.epigraphDrawer.hotspotDrawer .quill p{margin:0;margin-top:.5rem}.product-image-default-state{opacity:1;cursor:not-allowed;transition:opacity .3s ease-in-out}.product-image-disabled{opacity:.1}.UIModalButtonParentDiv{display:flex;gap:1rem;width:inherit}.colorSelector .colorThumbnailContainer .checkMark{display:none!important}.colorSelector .colorThumbnailContainer{border-radius:3.97381px;border:2px solid #4a4a4a00;padding:2px}.colorSelector.selected .colorThumbnailContainer{border:2px solid #4a4a4a}.imageContainer .contentContainer{border-radius:3.97381px;border:2px solid #4a4a4a00}.imageContainer.active .contentContainer{border:2px solid #4a4a4a}
|
|
8857
8857
|
`,T2e=`h1{margin:0;line-height:2;text-align:center}h2{margin:0 0 .5em;font-weight:400}.tabs input{position:absolute;opacity:0;z-index:-1}.row{display:flex}.row .col{flex:1}.row .col:last-child{margin-left:1em}.tabs{border-radius:8px;overflow:scroll;top:0;left:0;width:100%;height:100%;min-height:100%;position:absolute}.productFeatureUIDiv{position:relative}.tabEmptyText{padding-top:2rem;text-align:center;color:#818181;font-size:.9rem}.tab{width:100%;color:#fff;overflow:hidden}.tab-label{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#fff;font-weight:600;cursor:pointer;color:#000;font-size:16px;text-transform:uppercase;position:relative;border-bottom:1px solid var(--product-feature-border-color)}.tab-label img{width:1.6rem;height:auto}.tab-label span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:80%}input:checked~.tab-label{background:#f8f8f8}input:checked~.tab-content{background:#f8f8f8}.tab-label:hover{background:hsl(0,0%,97%)}.tab-label .ellipsis{width:20px;height:20px;background:#ffffff;border:2px solid #e52438;box-sizing:border-box;border-radius:50%;margin-right:12px}.tabs .tab-content{padding:0 1em;color:#000;background:white;transition:.7s ease-out;height:auto;max-height:0px;overflow:hidden}input:checked~.tab-label{font-weight:700}.tab:nth-child(even) .tab-content{background:#f5f5f5}.tab-close{display:flex;justify-content:flex-end;padding:1em;font-size:.75em;background:#2c3e50;cursor:pointer}.tab-close:hover{background:#1a252f}input:checked+.tab-label .accordion-closed{display:none}input+.tab-label .accordion-closed{display:flex}input:checked+.tab-label .accordion-open{display:flex}input+.tab-label .accordion-open{display:none}
|
|
8858
|
-
`,w2e=`.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{border-bottom:1px solid #aaa;margin:0 0 10px;padding:0}.react-tabs__tab{border:1px solid transparent;border-bottom:none;bottom:-1px;cursor:pointer;display:inline-block;list-style:none;padding:6px 12px;position:relative}.react-tabs__tab--selected{background:#fff;border-color:#aaa;border-radius:5px 5px 0 0;color:#000}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{outline:none}.react-tabs__tab:focus:after{background:#fff;bottom:-5px;content:"";height:5px;left:-4px;position:absolute;right:-4px}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide--draggable>.splide__slider>.splide__track,.splide--draggable>.splide__track{-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide--fade>.splide__slider>.splide__track>.splide__list,.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--fade>.splide__track>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide--ttb.is-active>.splide__slider>.splide__track>.splide__list,.splide--ttb.is-active>.splide__track>.splide__list{display:block}.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important;transform-style:preserve-3d}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{outline:none;position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-ms-flex-negative:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;flex-shrink:0;list-style-type:none!important;margin:0;outline:none;position:relative}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;contain:strict;display:inline-block;height:20px;inset:0;margin:auto;position:absolute;width:20px}.splide__track{overflow:hidden;position:relative;z-index:0}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: hsla(0, 0%, 100%, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( 90deg, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error)}.Toastify__toast-container{box-sizing:border-box;color:#fff;padding:4px;position:fixed;-webkit-transform:translate3d(0,0,9999 px);-webkit-transform:translate3d(0,0,var(--toastify-z-index) px);width:320px;width:var(--toastify-toast-width);z-index:9999;z-index:var(--toastify-z-index)}.Toastify__toast-container--top-left{left:1em;top:1em}.Toastify__toast-container--top-center{left:50%;top:1em;-webkit-transform:translateX(-50%);transform:translate(-50%)}.Toastify__toast-container--top-right{right:1em;top:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width: 480px){.Toastify__toast-container{left:0;margin:0;padding:0;width:100vw}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;-webkit-transform:translateX(0);transform:translate(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;-webkit-transform:translateX(0);transform:translate(0)}.Toastify__toast-container--rtl{left:auto;right:0}}.Toastify__toast{border-radius:4px;box-shadow:0 1px 10px #0000001a,0 2px 15px #0000000d;box-sizing:border-box;cursor:pointer;direction:ltr;display:flex;font-family:sans-serif;font-family:var(--toastify-font-family);justify-content:space-between;margin-bottom:1rem;max-height:800px;max-height:var(--toastify-toast-max-height);min-height:64px;min-height:var(--toastify-toast-min-height);overflow:hidden;padding:8px;position:relative}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{align-items:center;display:flex;flex:1 1 auto;margin:auto 0;padding:6px}.Toastify__toast-body>div:last-child{flex:1 1}.Toastify__toast-icon{-webkit-margin-end:10px;display:flex;flex-shrink:0;margin-inline-end:10px;width:20px}.Toastify--animate{-webkit-animation-duration:.7s;animation-duration:.7s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.Toastify--animate-icon{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@media only screen and (max-width: 480px){.Toastify__toast{border-radius:0;margin-bottom:0}}.f{--y: calc(var(--len) - var(--nth));bottom:0;min-height:80px;position:absolute;right:0;-webkit-transform:translate3d(0,calc(var(--y) * -40%),0) scale(calc(1 - var(--y) * .05));transform:translate3d(0,calc(var(--y) * -40%),0) scale(calc(1 - var(--y) * .05));transition:all .3s;width:100%}.Toastify__toast-theme--dark{background:#121212;background:var(--toastify-color-dark);color:#fff;color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:#fff;background:var(--toastify-color-light);color:#757575;color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{background:#3498db;background:var(--toastify-color-info);color:#fff;color:var(--toastify-text-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{background:#07bc0c;background:var(--toastify-color-success);color:#fff;color:var(--toastify-text-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{background:#f1c40f;background:var(--toastify-color-warning);color:#fff;color:var(--toastify-text-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{background:#e74c3c;background:var(--toastify-color-error);color:#fff;color:var(--toastify-text-color-error)}.Toastify__progress-bar-theme--light{background:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:#bb86fc;background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:#3498db;background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:#07bc0c;background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:#f1c40f;background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:#e74c3c;background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:hsla(0,0%,100%,.7);background:var(--toastify-color-transparent)}.Toastify__close-button{align-self:flex-start;background:transparent;border:none;color:#fff;cursor:pointer;opacity:.7;outline:none;padding:0;transition:.3s ease}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@-webkit-keyframes Toastify__trackProgress{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}to{-webkit-transform:scaleX(0);transform:scaleX(0)}}@keyframes Toastify__trackProgress{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}to{-webkit-transform:scaleX(0);transform:scaleX(0)}}.Toastify__progress-bar{bottom:0;height:5px;left:0;opacity:.7;position:absolute;-webkit-transform-origin:left;transform-origin:left;width:100%;z-index:9999;z-index:var(--toastify-z-index)}.Toastify__progress-bar--animated{-webkit-animation:Toastify__trackProgress linear 1 forwards;animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.Toastify__progress-bar--rtl{left:auto;right:0;-webkit-transform-origin:right;transform-origin:right}.Toastify__spinner{-webkit-animation:Toastify__spin .65s linear infinite;animation:Toastify__spin .65s linear infinite;border:2px solid #e0e0e0;border-radius:100%;border-right:2px solid var(--toastify-spinner-color);box-sizing:border-box;height:20px;width:20px}@-webkit-keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes Toastify__bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{-webkit-animation-name:Toastify__bounceInLeft;animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{-webkit-animation-name:Toastify__bounceInRight;animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{-webkit-animation-name:Toastify__bounceInDown;animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{-webkit-animation-name:Toastify__bounceInUp;animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{-webkit-animation-name:Toastify__bounceOutLeft;animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{-webkit-animation-name:Toastify__bounceOutRight;animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{-webkit-animation-name:Toastify__bounceOutUp;animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{-webkit-animation-name:Toastify__bounceOutDown;animation-name:Toastify__bounceOutDown}@-webkit-keyframes Toastify__zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{-webkit-animation-name:Toastify__zoomIn;animation-name:Toastify__zoomIn}.Toastify__zoom-exit{-webkit-animation-name:Toastify__zoomOut;animation-name:Toastify__zoomOut}@-webkit-keyframes Toastify__flipIn{0%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes Toastify__flipIn{0%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes Toastify__flipOut{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{opacity:1;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}@keyframes Toastify__flipOut{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{opacity:1;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}.Toastify__flip-enter{-webkit-animation-name:Toastify__flipIn;animation-name:Toastify__flipIn}.Toastify__flip-exit{-webkit-animation-name:Toastify__flipOut;animation-name:Toastify__flipOut}@-webkit-keyframes Toastify__slideInRight{0%{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInRight{0%{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInLeft{0%{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInUp{0%{-webkit-transform:translate3d(0,110%,0);transform:translate3d(0,110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{-webkit-transform:translate3d(0,110%,0);transform:translate3d(0,110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInDown{0%{-webkit-transform:translate3d(0,-110%,0);transform:translate3d(0,-110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{-webkit-transform:translate3d(0,-110%,0);transform:translate3d(0,-110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,500px,0);transform:translate3d(0,500px,0);visibility:hidden}}@keyframes Toastify__slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,500px,0);transform:translate3d(0,500px,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-500px,0);transform:translate3d(0,-500px,0);visibility:hidden}}@keyframes Toastify__slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-500px,0);transform:translate3d(0,-500px,0);visibility:hidden}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{-webkit-animation-name:Toastify__slideInLeft;animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{-webkit-animation-name:Toastify__slideInRight;animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{-webkit-animation-name:Toastify__slideInDown;animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{-webkit-animation-name:Toastify__slideInUp;animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{-webkit-animation-name:Toastify__slideOutLeft;animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{-webkit-animation-name:Toastify__slideOutRight;animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{-webkit-animation-name:Toastify__slideOutUp;animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{-webkit-animation-name:Toastify__slideOutDown;animation-name:Toastify__slideOutDown}@-webkit-keyframes Toastify__spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes Toastify__spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-rsbs-overlay]{background:#fff;background:var(--rsbs-bg, #fff);border-top-left-radius:16px;border-top-left-radius:var(--rsbs-overlay-rounded, 16px);border-top-right-radius:16px;border-top-right-radius:var(--rsbs-overlay-rounded, 16px);display:flex;flex-direction:column;height:0;height:var(--rsbs-overlay-h, 0);transform:translateZ(0);transform:translate3d(0,var(--rsbs-overlay-translate-y, 0),0);will-change:height}[data-rsbs-overlay]:focus{outline:none}[data-rsbs-is-blocking=false] [data-rsbs-overlay]{box-shadow:0 -5px 60px #2659731c,0 -1px #2659730d}[data-rsbs-overlay],[data-rsbs-root]:after{margin-left:env(safe-area-inset-left);margin-left:var(--rsbs-ml, env(safe-area-inset-left));margin-right:env(safe-area-inset-right);margin-right:var(--rsbs-mr, env(safe-area-inset-right));max-width:auto;max-width:var(--rsbs-max-w, auto)}[data-rsbs-backdrop],[data-rsbs-overlay],[data-rsbs-root]:after{-ms-scroll-chaining:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}[data-rsbs-backdrop]{background-color:#0009;background-color:var(--rsbs-backdrop-bg, rgba(0, 0, 0, .6));bottom:-60px;cursor:pointer;opacity:1;top:-60px;will-change:opacity}[data-rsbs-is-dismissable=false] [data-rsbs-backdrop]{cursor:ns-resize}[data-rsbs-root]:after{background:#fff;background:var(--rsbs-bg, #fff);content:"";height:1px;pointer-events:none;transform:scaleY(0);transform:scaleY(var(--rsbs-antigap-scale-y, 0));transform-origin:bottom;will-change:transform}[data-rsbs-footer],[data-rsbs-header]{cursor:ns-resize;flex-shrink:0;padding:16px}[data-rsbs-header]{box-shadow:0 1px #2e3b4220;box-shadow:0 1px 0 rgba(46,59,66,calc(var(--rsbs-content-opacity, 1) * .125));padding-bottom:8px;padding-top:calc(20px + env(safe-area-inset-top));text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}[data-rsbs-header]:before{background-color:#00000024;background-color:var(--rsbs-handle-bg, rgba(0, 0, 0, .14));border-radius:2px;content:"";display:block;height:4px;left:50%;position:absolute;top:calc(8px + env(safe-area-inset-top));transform:translate(-50%);width:36px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx){[data-rsbs-header]:before{transform:translate(-50%) scaleY(.75)}}[data-rsbs-has-header=false] [data-rsbs-header]{box-shadow:none;padding-top:calc(12px + env(safe-area-inset-top))}[data-rsbs-scroll]{-webkit-tap-highlight-color:revert;-webkit-touch-callout:revert;-ms-scroll-chaining:none;-webkit-overflow-scrolling:touch;flex-grow:1;flex-shrink:1;overflow:auto;overscroll-behavior:contain;-webkit-user-select:auto;-ms-user-select:auto;-moz-user-select:auto;user-select:auto}[data-rsbs-scroll]:focus{outline:none}[data-rsbs-has-footer=false] [data-rsbs-content]{padding-bottom:env(safe-area-inset-bottom)}[data-rsbs-content]{overflow:hidden}[data-rsbs-footer]{box-shadow:0 -1px #2e3b4220,0 2px #fff;box-shadow:0 -1px 0 rgba(46,59,66,calc(var(--rsbs-content-opacity, 1) * .125)),0 2px 0 var(--rsbs-bg, #fff);overflow:hidden;padding-bottom:calc(16px + env(safe-area-inset-bottom));z-index:1}[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-header]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-scroll]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-header]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-scroll]>*,[data-rsbs-is-dismissable=true] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=true] [data-rsbs-header]>*,[data-rsbs-is-dismissable=true] [data-rsbs-scroll]>*{opacity:1;opacity:var(--rsbs-content-opacity, 1)}[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-backdrop],[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-backdrop],[data-rsbs-is-dismissable=true] [data-rsbs-backdrop]{opacity:1;opacity:var(--rsbs-backdrop-opacity, 1)}[data-rsbs-state=closed],[data-rsbs-state=closing]{pointer-events:none}
|
|
8858
|
+
`,w2e=`.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{border-bottom:1px solid #aaa;margin:0 0 10px;padding:0}.react-tabs__tab{border:1px solid transparent;border-bottom:none;bottom:-1px;cursor:pointer;display:inline-block;list-style:none;padding:6px 12px;position:relative}.react-tabs__tab--selected{background:#fff;border-color:#aaa;border-radius:5px 5px 0 0;color:#000}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{outline:none}.react-tabs__tab:focus:after{background:#ffffff00;bottom:-5px;content:"";height:5px;left:-4px;position:absolute;right:-4px}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}@keyframes splide-loading{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.splide--draggable>.splide__slider>.splide__track,.splide--draggable>.splide__track{-webkit-user-select:none;-ms-user-select:none;user-select:none}.splide--fade>.splide__slider>.splide__track>.splide__list,.splide--fade>.splide__track>.splide__list{display:block}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide,.splide--fade>.splide__track>.splide__list>.splide__slide{left:0;opacity:0;position:absolute;top:0;z-index:0}.splide--fade>.splide__slider>.splide__track>.splide__list>.splide__slide.is-active,.splide--fade>.splide__track>.splide__list>.splide__slide.is-active{opacity:1;position:relative;z-index:1}.splide--rtl{direction:rtl}.splide--ttb.is-active>.splide__slider>.splide__track>.splide__list,.splide--ttb.is-active>.splide__track>.splide__list{display:block}.splide__container{box-sizing:border-box;position:relative}.splide__list{-webkit-backface-visibility:hidden;backface-visibility:hidden;display:-ms-flexbox;display:flex;height:100%;margin:0!important;padding:0!important;transform-style:preserve-3d}.splide.is-initialized:not(.is-active) .splide__list{display:block}.splide__pagination{-ms-flex-align:center;-ms-flex-pack:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;justify-content:center;margin:0;pointer-events:none}.splide__pagination li{display:inline-block;line-height:1;list-style-type:none;margin:0;pointer-events:auto}.splide__progress__bar{width:0}.splide{outline:none;position:relative;visibility:hidden}.splide.is-initialized,.splide.is-rendered{visibility:visible}.splide__slide{-ms-flex-negative:0;-webkit-backface-visibility:hidden;backface-visibility:hidden;box-sizing:border-box;flex-shrink:0;list-style-type:none!important;margin:0;outline:none;position:relative}.splide__slide img{vertical-align:bottom}.splide__slider{position:relative}.splide__spinner{animation:splide-loading 1s linear infinite;border:2px solid #999;border-left-color:transparent;border-radius:50%;contain:strict;display:inline-block;height:20px;inset:0;margin:auto;position:absolute;width:20px}.splide__track{overflow:hidden;position:relative;z-index:0}:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: #e74c3c;--toastify-color-transparent: hsla(0, 0%, 100%, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-toast-width: 320px;--toastify-toast-background: #fff;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient( 90deg, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55 );--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error)}.Toastify__toast-container{box-sizing:border-box;color:#fff;padding:4px;position:fixed;-webkit-transform:translate3d(0,0,9999 px);-webkit-transform:translate3d(0,0,var(--toastify-z-index) px);width:320px;width:var(--toastify-toast-width);z-index:9999;z-index:var(--toastify-z-index)}.Toastify__toast-container--top-left{left:1em;top:1em}.Toastify__toast-container--top-center{left:50%;top:1em;-webkit-transform:translateX(-50%);transform:translate(-50%)}.Toastify__toast-container--top-right{right:1em;top:1em}.Toastify__toast-container--bottom-left{bottom:1em;left:1em}.Toastify__toast-container--bottom-center{bottom:1em;left:50%;-webkit-transform:translateX(-50%);transform:translate(-50%)}.Toastify__toast-container--bottom-right{bottom:1em;right:1em}@media only screen and (max-width: 480px){.Toastify__toast-container{left:0;margin:0;padding:0;width:100vw}.Toastify__toast-container--top-center,.Toastify__toast-container--top-left,.Toastify__toast-container--top-right{top:0;-webkit-transform:translateX(0);transform:translate(0)}.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-right{bottom:0;-webkit-transform:translateX(0);transform:translate(0)}.Toastify__toast-container--rtl{left:auto;right:0}}.Toastify__toast{border-radius:4px;box-shadow:0 1px 10px #0000001a,0 2px 15px #0000000d;box-sizing:border-box;cursor:pointer;direction:ltr;display:flex;font-family:sans-serif;font-family:var(--toastify-font-family);justify-content:space-between;margin-bottom:1rem;max-height:800px;max-height:var(--toastify-toast-max-height);min-height:64px;min-height:var(--toastify-toast-min-height);overflow:hidden;padding:8px;position:relative}.Toastify__toast--rtl{direction:rtl}.Toastify__toast-body{align-items:center;display:flex;flex:1 1 auto;margin:auto 0;padding:6px}.Toastify__toast-body>div:last-child{flex:1 1}.Toastify__toast-icon{-webkit-margin-end:10px;display:flex;flex-shrink:0;margin-inline-end:10px;width:20px}.Toastify--animate{-webkit-animation-duration:.7s;animation-duration:.7s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.Toastify--animate-icon{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}@media only screen and (max-width: 480px){.Toastify__toast{border-radius:0;margin-bottom:0}}.f{--y: calc(var(--len) - var(--nth));bottom:0;min-height:80px;position:absolute;right:0;-webkit-transform:translate3d(0,calc(var(--y) * -40%),0) scale(calc(1 - var(--y) * .05));transform:translate3d(0,calc(var(--y) * -40%),0) scale(calc(1 - var(--y) * .05));transition:all .3s;width:100%}.Toastify__toast-theme--dark{background:#121212;background:var(--toastify-color-dark);color:#fff;color:var(--toastify-text-color-dark)}.Toastify__toast-theme--colored.Toastify__toast--default,.Toastify__toast-theme--light{background:#fff;background:var(--toastify-color-light);color:#757575;color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{background:#3498db;background:var(--toastify-color-info);color:#fff;color:var(--toastify-text-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{background:#07bc0c;background:var(--toastify-color-success);color:#fff;color:var(--toastify-text-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{background:#f1c40f;background:var(--toastify-color-warning);color:#fff;color:var(--toastify-text-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{background:#e74c3c;background:var(--toastify-color-error);color:#fff;color:var(--toastify-text-color-error)}.Toastify__progress-bar-theme--light{background:linear-gradient(90deg,#4cd964,#5ac8fa,#007aff,#34aadc,#5856d6,#ff2d55);background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:#bb86fc;background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:#3498db;background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:#07bc0c;background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:#f1c40f;background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:#e74c3c;background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning{background:hsla(0,0%,100%,.7);background:var(--toastify-color-transparent)}.Toastify__close-button{align-self:flex-start;background:transparent;border:none;color:#fff;cursor:pointer;opacity:.7;outline:none;padding:0;transition:.3s ease}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:focus,.Toastify__close-button:hover{opacity:1}@-webkit-keyframes Toastify__trackProgress{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}to{-webkit-transform:scaleX(0);transform:scaleX(0)}}@keyframes Toastify__trackProgress{0%{-webkit-transform:scaleX(1);transform:scaleX(1)}to{-webkit-transform:scaleX(0);transform:scaleX(0)}}.Toastify__progress-bar{bottom:0;height:5px;left:0;opacity:.7;position:absolute;-webkit-transform-origin:left;transform-origin:left;width:100%;z-index:9999;z-index:var(--toastify-z-index)}.Toastify__progress-bar--animated{-webkit-animation:Toastify__trackProgress linear 1 forwards;animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.Toastify__progress-bar--rtl{left:auto;right:0;-webkit-transform-origin:right;transform-origin:right}.Toastify__spinner{-webkit-animation:Toastify__spin .65s linear infinite;animation:Toastify__spin .65s linear infinite;border:2px solid #e0e0e0;border-radius:100%;border-right:2px solid var(--toastify-spinner-color);box-sizing:border-box;height:20px;width:20px}@-webkit-keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes Toastify__bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@-webkit-keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@-webkit-keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@-webkit-keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@-webkit-keyframes Toastify__bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes Toastify__bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--bottom-left,.Toastify__bounce-enter--top-left{-webkit-animation-name:Toastify__bounceInLeft;animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--bottom-right,.Toastify__bounce-enter--top-right{-webkit-animation-name:Toastify__bounceInRight;animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{-webkit-animation-name:Toastify__bounceInDown;animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{-webkit-animation-name:Toastify__bounceInUp;animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--bottom-left,.Toastify__bounce-exit--top-left{-webkit-animation-name:Toastify__bounceOutLeft;animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--bottom-right,.Toastify__bounce-exit--top-right{-webkit-animation-name:Toastify__bounceOutRight;animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{-webkit-animation-name:Toastify__bounceOutUp;animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{-webkit-animation-name:Toastify__bounceOutDown;animation-name:Toastify__bounceOutDown}@-webkit-keyframes Toastify__zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomIn{0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@-webkit-keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{-webkit-animation-name:Toastify__zoomIn;animation-name:Toastify__zoomIn}.Toastify__zoom-exit{-webkit-animation-name:Toastify__zoomOut;animation-name:Toastify__zoomOut}@-webkit-keyframes Toastify__flipIn{0%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes Toastify__flipIn{0%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}40%{-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}60%{opacity:1;-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg)}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes Toastify__flipOut{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{opacity:1;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}@keyframes Toastify__flipOut{0%{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{opacity:1;-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg)}to{opacity:0;-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg)}}.Toastify__flip-enter{-webkit-animation-name:Toastify__flipIn;animation-name:Toastify__flipIn}.Toastify__flip-exit{-webkit-animation-name:Toastify__flipOut;animation-name:Toastify__flipOut}@-webkit-keyframes Toastify__slideInRight{0%{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInRight{0%{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInLeft{0%{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInLeft{0%{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInUp{0%{-webkit-transform:translate3d(0,110%,0);transform:translate3d(0,110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInUp{0%{-webkit-transform:translate3d(0,110%,0);transform:translate3d(0,110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideInDown{0%{-webkit-transform:translate3d(0,-110%,0);transform:translate3d(0,-110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes Toastify__slideInDown{0%{-webkit-transform:translate3d(0,-110%,0);transform:translate3d(0,-110%,0);visibility:visible}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes Toastify__slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutRight{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(110%,0,0);transform:translate3d(110%,0,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:hidden}}@keyframes Toastify__slideOutLeft{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(-110%,0,0);transform:translate3d(-110%,0,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,500px,0);transform:translate3d(0,500px,0);visibility:hidden}}@keyframes Toastify__slideOutDown{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,500px,0);transform:translate3d(0,500px,0);visibility:hidden}}@-webkit-keyframes Toastify__slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-500px,0);transform:translate3d(0,-500px,0);visibility:hidden}}@keyframes Toastify__slideOutUp{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}to{-webkit-transform:translate3d(0,-500px,0);transform:translate3d(0,-500px,0);visibility:hidden}}.Toastify__slide-enter--bottom-left,.Toastify__slide-enter--top-left{-webkit-animation-name:Toastify__slideInLeft;animation-name:Toastify__slideInLeft}.Toastify__slide-enter--bottom-right,.Toastify__slide-enter--top-right{-webkit-animation-name:Toastify__slideInRight;animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{-webkit-animation-name:Toastify__slideInDown;animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{-webkit-animation-name:Toastify__slideInUp;animation-name:Toastify__slideInUp}.Toastify__slide-exit--bottom-left,.Toastify__slide-exit--top-left{-webkit-animation-name:Toastify__slideOutLeft;animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--bottom-right,.Toastify__slide-exit--top-right{-webkit-animation-name:Toastify__slideOutRight;animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{-webkit-animation-name:Toastify__slideOutUp;animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{-webkit-animation-name:Toastify__slideOutDown;animation-name:Toastify__slideOutDown}@-webkit-keyframes Toastify__spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes Toastify__spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[data-rsbs-overlay]{background:#fff;background:var(--rsbs-bg, #fff);border-top-left-radius:16px;border-top-left-radius:var(--rsbs-overlay-rounded, 16px);border-top-right-radius:16px;border-top-right-radius:var(--rsbs-overlay-rounded, 16px);display:flex;flex-direction:column;height:0;height:var(--rsbs-overlay-h, 0);transform:translateZ(0);transform:translate3d(0,var(--rsbs-overlay-translate-y, 0),0);will-change:height}[data-rsbs-overlay]:focus{outline:none}[data-rsbs-is-blocking=false] [data-rsbs-overlay]{box-shadow:0 -5px 60px #2659731c,0 -1px #2659730d}[data-rsbs-overlay],[data-rsbs-root]:after{margin-left:env(safe-area-inset-left);margin-left:var(--rsbs-ml, env(safe-area-inset-left));margin-right:env(safe-area-inset-right);margin-right:var(--rsbs-mr, env(safe-area-inset-right));max-width:auto;max-width:var(--rsbs-max-w, auto)}[data-rsbs-backdrop],[data-rsbs-overlay],[data-rsbs-root]:after{-ms-scroll-chaining:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;bottom:0;left:0;overscroll-behavior:none;position:fixed;right:0;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:3}[data-rsbs-backdrop]{background-color:#0009;background-color:var(--rsbs-backdrop-bg, rgba(0, 0, 0, .6));bottom:-60px;cursor:pointer;opacity:1;top:-60px;will-change:opacity}[data-rsbs-is-dismissable=false] [data-rsbs-backdrop]{cursor:ns-resize}[data-rsbs-root]:after{background:#fff;background:var(--rsbs-bg, #fff);content:"";height:1px;pointer-events:none;transform:scaleY(0);transform:scaleY(var(--rsbs-antigap-scale-y, 0));transform-origin:bottom;will-change:transform}[data-rsbs-footer],[data-rsbs-header]{cursor:ns-resize;flex-shrink:0;padding:16px}[data-rsbs-header]{box-shadow:0 1px #2e3b4220;box-shadow:0 1px 0 rgba(46,59,66,calc(var(--rsbs-content-opacity, 1) * .125));padding-bottom:8px;padding-top:calc(20px + env(safe-area-inset-top));text-align:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1}[data-rsbs-header]:before{background-color:#00000024;background-color:var(--rsbs-handle-bg, rgba(0, 0, 0, .14));border-radius:2px;content:"";display:block;height:4px;left:50%;position:absolute;top:calc(8px + env(safe-area-inset-top));transform:translate(-50%);width:36px}@media (-webkit-min-device-pixel-ratio: 2),(min-resolution: 2dppx){[data-rsbs-header]:before{transform:translate(-50%) scaleY(.75)}}[data-rsbs-has-header=false] [data-rsbs-header]{box-shadow:none;padding-top:calc(12px + env(safe-area-inset-top))}[data-rsbs-scroll]{-webkit-tap-highlight-color:revert;-webkit-touch-callout:revert;-ms-scroll-chaining:none;-webkit-overflow-scrolling:touch;flex-grow:1;flex-shrink:1;overflow:auto;overscroll-behavior:contain;-webkit-user-select:auto;-ms-user-select:auto;-moz-user-select:auto;user-select:auto}[data-rsbs-scroll]:focus{outline:none}[data-rsbs-has-footer=false] [data-rsbs-content]{padding-bottom:env(safe-area-inset-bottom)}[data-rsbs-content]{overflow:hidden}[data-rsbs-footer]{box-shadow:0 -1px #2e3b4220,0 2px #fff;box-shadow:0 -1px 0 rgba(46,59,66,calc(var(--rsbs-content-opacity, 1) * .125)),0 2px 0 var(--rsbs-bg, #fff);overflow:hidden;padding-bottom:calc(16px + env(safe-area-inset-bottom));z-index:1}[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-header]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-scroll]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-header]>*,[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-scroll]>*,[data-rsbs-is-dismissable=true] [data-rsbs-footer]>*,[data-rsbs-is-dismissable=true] [data-rsbs-header]>*,[data-rsbs-is-dismissable=true] [data-rsbs-scroll]>*{opacity:1;opacity:var(--rsbs-content-opacity, 1)}[data-rsbs-is-dismissable=false][data-rsbs-state=closing] [data-rsbs-backdrop],[data-rsbs-is-dismissable=false][data-rsbs-state=opening] [data-rsbs-backdrop],[data-rsbs-is-dismissable=true] [data-rsbs-backdrop]{opacity:1;opacity:var(--rsbs-backdrop-opacity, 1)}[data-rsbs-state=closed],[data-rsbs-state=closing]{pointer-events:none}
|
|
8859
8859
|
`,C2e=`h1,h2,h3,h4,h5,p{margin:0}.hotspot-content{padding:.5rem 2rem 2.5rem}.hotspot-content h2{font-size:1.3rem;font-weight:700;text-transform:uppercase;margin-bottom:1rem}.carousel{margin-top:1rem;padding-bottom:1rem;display:flex;justify-content:center}.carousel img{width:100%}.carousel video{max-width:100%;height:100%}.carouselTabParent{width:100%;display:flex;justify-content:center;align-items:center}.carouselVideoPlaceholderText{position:absolute}.splide__pagination{display:none!important}.splide__arrows{position:absolute;bottom:-52px;width:100%;justify-content:center;display:flex}.splide__arrow--prev{transform:rotateY(180deg)}.splide__arrow{background:transparent;border:none;box-shadow:none;transition:.1s;padding:1rem}.splide__arrow svg{width:1rem;height:1rem}.splide__arrow:disabled{opacity:.3;pointer-events:none}.col{border-radius:12px}
|
|
8860
8860
|
`,M2e=`.hide{display:none!important}.container{padding:28px 46px;padding-bottom:2.5rem;height:100%;overflow-y:scroll}.variantContainer{height:100%;overflow-y:scroll}.col{padding:0;height:100%;overflow-y:scroll}.container .subheading{font-size:.75rem;font-weight:700;text-transform:uppercase;margin-top:0;margin-bottom:1.5rem}.item-grid{display:flex;justify-content:flex-start;column-gap:1.25rem;align-items:flex-start;position:relative;flex-wrap:wrap}.item-grid .imageContainer{width:6rem;height:fit-content;position:relative;cursor:pointer;border-radius:.6rem;background:#fff;box-sizing:border-box;margin-bottom:2rem;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;transition:.2s ease}.item-grid .imageContainer .contentContainer{left:0;top:0;width:6rem;height:6rem;transition:.2s ease;background:var(--item-card-background-color);padding:8px;display:flex;flex-direction:column;justify-content:center;align-items:center;box-shadow:0 2px 8px #0000001a;-webkit-box-shadow:0px 2px 8px rgb(0 0 0 / 10%);border-radius:.6rem;margin:0}.splide__arrow{pointer-events:all;cursor:pointer}.item-grid .imageContainer .addCartButton{width:100%;height:auto;line-height:.75rem;justify-content:center;align-items:center;background:var(--primary-color);cursor:pointer;display:none;position:absolute;bottom:0;left:0;border:none;border-bottom-left-radius:.6rem;border-bottom-right-radius:.6rem;font-size:.625rem;color:#fff;text-transform:uppercase;font-weight:600;padding:.5rem;transition:.2s all ease;-webkit-transition:.2s all ease}.item-grid .imageContainer .addCartButton.added{background:var(--brand-dark)}.item-grid .imageContainer .infoButton{position:absolute;right:.25rem;top:.25rem;z-index:8;background:none;padding:0;margin:0;border:0;cursor:pointer;opacity:0;pointer-events:none;transition:.2s all ease;-webkit-transition:.2s all ease}.item-grid .imageContainer .contentOverlay{position:absolute;left:0;top:0;width:6rem;height:6rem;display:flex;justify-content:center;align-items:center;opacity:0;transition:.5s;background:rgba(51,51,51,.2);border-radius:.6rem;z-index:3;pointer-events:all}.enabled-item-overlay{opacity:1!important;cursor:pointer!important}.disabled-item-overlay{cursor:not-allowed!important}.item-grid .imageContainer .contentOverlay img{filter:invert(96%) sepia(3%) saturate(312%) hue-rotate(315deg) brightness(114%) contrast(100%);width:1.875rem;pointer-events:all}.item-grid .imageContainer .itemDetails{opacity:0;font-size:.685rem;justify-content:center;width:100%;height:fit-content;margin-top:.8rem;display:flex;align-items:center}.showAlways{opacity:1!important}.item-details-icon:before{content:none;vertical-align:middle}.item-grid .imageContainer .itemDetails:hover{opacity:1;text-decoration:underline}.item-grid .imageContainer:hover .itemDetails{opacity:1;transition:.5s}.item-grid img{max-width:100%;max-height:100%}.container .subContainer{border-bottom:.5px solid #c4c4c4;margin-bottom:2rem}.container .subContainer:nth-child(1){margin-top:0}.container .subContainer:nth-last-child(1){margin-bottom:0;border-bottom:0}.bottomBar .cartButton img{width:2rem}.sideMenu .sideMenuTabContainer,.mobileTabContent,.mobileElementsModal{display:none}.infoModal{position:absolute;width:100%;height:100%;left:0;top:0;z-index:8;background:#fff;box-shadow:0 -5px 8px #00000005;border-radius:.75rem .75rem 0 0;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;text-align:center;opacity:0;pointer-events:none;transition:.2s all ease;-webkit-transition:.2s all ease;padding-bottom:1rem;padding-top:2rem;overflow-y:auto}.infoModal.open{opacity:1;pointer-events:all}.infoModal .categoryLink{display:flex;align-items:center;color:var(--brand-dark);gap:.75rem;text-decoration:none;align-self:flex-start;margin-left:4rem;margin-bottom:2rem}.infoModal .categoryLink:hover{text-decoration:underline}.infoModal .categoryLink .categoryTitle{font-size:1.25rem;font-weight:700}.infoModal .infoModalImageContainer{position:relative;width:auto;height:12.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;background:#fff;border-radius:.8rem}.infoModal .itemImage{width:auto;height:100%}.infoModal button{background:transparent;border:none;outline:none;cursor:pointer}.infoModal .closeButton{position:absolute;right:1.5rem;top:1.5rem}.infoModal .closeButton img{width:1.5rem}.infoModal .openNewTab{position:relative;margin-top:1rem;color:var(--brand-dark);font-size:.75rem;text-decoration:underline}.infoModal .itemTitle{font-weight:400;max-width:60%;font-size:1.25rem;margin-top:1rem;margin-bottom:1rem}.infoModal .itemDescription{max-width:70%;font-size:1rem;line-height:1.25rem;display:-webkit-box;-webkit-box-orient:vertical;white-space:pre-wrap;text-align:-webkit-left}.infoModal .infoModalDimensions{color:var(--brand-dark);opacity:.4;font-weight:700;font-size:.875rem;margin-top:1rem}.infoModal .infoModalActions{width:100%;margin-top:2rem}.infoModal .infoModalActions button{width:65%;padding:.6875rem;text-align:center;color:var(--brand-dark);pointer-events:none;font-size:1.25rem;font-weight:700;background:#f8f8f8}.addToCartDisabled{background:#00000057!important;opacity:.75;cursor:not-allowed!important}.previewCartModal{position:absolute;width:100%;height:calc(100% + 5rem);left:0;top:-5rem;z-index:9;background:#fff;box-shadow:0 4.96px 19.84px #0000001a;border-radius:.75rem .75rem 0 0;display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;opacity:0;pointer-events:none;transition:.2s all ease;-webkit-transition:.2s all ease;overflow:hidden;padding-top:5.75rem}.previewCartModal .cartTitle{font-size:1.25rem;font-weight:700;position:absolute;left:2rem;top:2.5rem}.previewCartModal.open{opacity:1;pointer-events:all}.previewCartModal.mobile{display:none}.previewCartModal .previewCartContent{overflow:auto;padding:0 1.5rem;width:100%;height:100%;position:absolute}.previewCartModal .checkoutButton{position:relative;width:20.625rem;background:var(--primary-color);color:#fff;display:flex;align-items:center;text-align:center;padding:.6875rem 1rem;border-radius:.25rem;justify-content:center}.previewCartModal .checkoutButton:disabled{background:#00000057!important;opacity:.75;cursor:not-allowed!important}.previewCartModal .checkoutButton img{margin-left:.25rem}.previewCartModal .checkoutButton span{font-size:.6875rem;text-transform:uppercase;font-weight:700}.previewCartModal button{background:transparent;border:none;outline:none;cursor:pointer}.previewCartModal .closeButton{position:absolute;right:1.5rem;top:1.5rem}.previewCartModal .closeButton img{width:1.5rem}.cartItem{display:flex;align-items:flex-start;max-width:100%}.cartItemOutOfStock{border:1px solid #d0342c;border-radius:5px}.cartItem:nth-child(n + 1){margin-bottom:1rem}.cartItem .cartItemImage{width:6.25rem;height:6.25rem;padding:.5rem;background:#ffffff;box-shadow:0 2px 8px #0000001a;border-radius:.25rem;margin-right:1rem;display:flex;justify-content:center;align-items:center}.cartItem .cartItemImage img{width:100%;height:auto;max-width:100%;max-height:100%}.cartItem .cartItemDetails{display:flex;flex-direction:column;width:calc(100% - 6.25rem);justify-content:flex-start;padding-top:.75rem}.cartItem .cartItemDetails h4{font-size:.75rem;font-weight:400;padding-top:.25rem;white-space:pre-line}.cartItem .cartItemDetails h5{font-size:.7rem;font-weight:400;padding-top:.25rem;white-space:pre-line}.cartRowImage{height:.8rem}.cartItem .cartRow{margin-top:1rem;width:100%;display:flex;justify-content:flex-start;align-items:center;color:red;gap:.25rem}.cartItem .itemCount{font-size:.7rem}.cartItem .qtyContainer{display:flex;gap:.5rem;color:var(--primary-color);margin-right:1.75rem}.cartItem .qtyContainer span{display:none}.cartItem .qtyContainer button{color:var(--primary-color)}.cartItem .qtyContainer input{color:#333;width:1.7rem;padding:.25rem .5rem;border-radius:3px;background:#eeeeee;border:none}.cartItem .deleteCartButton{font-size:.6875rem;text-decoration:underline;color:#333;display:flex;margin-top:.5rem}.cartItem .deleteCartButton:hover{color:var(--primary-color)}.cartItem .itemPrice{font-size:.7rem}.cartItem .itemAvailable{font-size:.5rem}.cartItem .actionButton{margin-top:.2rem;font-weight:600;font-size:.9rem;cursor:pointer}.color-grid{display:flex;gap:1rem;margin-top:.5rem;flex-wrap:wrap;align-items:flex-start}.colorSelector{cursor:pointer;display:flex;flex-direction:column;align-items:center}.colorSelector .colorThumbnailContainer{position:relative}.colorSelector .colorThumbnailContainer .colorThumbnail{width:5rem;height:5rem;position:relative;overflow:hidden}.colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:.1s all ease;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.colorSelector .colorDetails{margin-top:.5rem;text-align:center}.colorDetails .colorDetailsLabel{width:100px}.colorSelector .colorDetails p{margin:0;font-size:.75rem;color:var(--brand-dark)}.colorDetails .redText{color:#d0342c!important;font-size:.6rem!important;font-weight:800}.colorSelector .colorDetails p:nth-child(1){font-weight:600}.colorSelector .colorDetails p:nth-child(2){font-weight:400}
|
|
8861
|
-
`,R2e=`@media only screen and (orientation: portrait){.overlayUI{z-index:3;flex-direction:column;padding:0;align-content:flex-start;align-items:flex-start;justify-content:flex-start;top:0;height:100%;max-height:800px;border:none;pointer-events:none}.shadowRoot{flex-direction:column;justify-content:flex-end}.leftShell{width:100%;height:100%!important;padding:0;position:relative;flex-direction:column;align-items:flex-start;justify-content:flex-start;align-content:flex-start;background:#fff;z-index:2;transition:.5s ease-out;flex-shrink:2}.expanded-left-shell,.disabledleftShell{height:100%!important}.desktopSideMenu{display:none}.sideMenu{width:100%;height:100%!important;display:flex;z-index:1;bottom:0;flex-direction:column;align-items:flex-start;justify-content:space-between;align-content:flex-end;padding:0;border:none;background:#f5f5f5;border-radius:12px;max-width:unset;min-width:unset;box-shadow:0 -2px 12px #0000001a!important;transition:.5s;min-height:300px;max-height:300px;flex-shrink:1}.side-menu-collapsed{min-height:110px;max-height:110px}.collapse-side-menu-button{opacity:1;border:none;box-shadow:none;background:transparent;display:flex;align-items:center;position:absolute;right:6%;top:5%}.set-display-none,.sideMenuContent,.sideMenu .desktop,.sideMenuTabs{display:none}.sideMenu .viewInSpaceButton{width:9rem}.sideMenu .bottomBar{z-index:4;width:100%;position:absolute}.bottomBar .reviewButton{font-size:.875rem;margin-right:.5rem}.bottomBar .cartButton img{width:1.25rem}.mobileExpandButton{justify-content:center;align-items:center;display:flex;flex-direction:column-reverse;background:#f5f5f5;font-size:.75rem;width:100%;border-top-left-radius:.75rem;border-top-right-radius:.75rem;transition:none;opacity:1}.mobileExpandButton.sideMenuOpen{padding:0;height:0%;opacity:0;background:#f8f8f8;pointer-events:none}.mobileExpandButton button{position:relative;width:100%;top:0;right:auto;border:none;box-shadow:none;background:transparent;display:flex;justify-content:center;align-items:center;z-index:5;transition:none}.mobileExpandButton button img{transform:rotate(180deg)}epigraph-configurator-core{width:100%;height:100%}epigraph-configurator{position:fixed!important;top:0;left:0;width:100%!important;height:100%!important}.sideMenu .sideMenuTabContainer{display:flex;width:100%;height:100%;transition:none;align-items:flex-start;min-height:300px;max-height:300px}.side-menu-tab-container-open{height:100%}.side-menu-container-hide{height:0%!important}.sideMenu.open .sideMenuTabContainer{height:100%}.sideMenu.open{height:100%;max-height:310px}.sideMenu .sideMenuTabContainer .mobileTab{display:flex}.sideMenu .sideMenuTabContainer .firstMobileTabs img{height:auto}.sideMenu .sideMenuTabContainer .firstMobileTab{width:100%}.sideMenu .firstMobileTabs{width:100%;height:auto;display:flex;justify-content:center;padding:0 2.5rem;margin:0;border-bottom:.25px solid #c4c4c4}.sideMenu .firstMobileTabs .mobileTab{display:flex;align-items:center;justify-content:flex-end;flex-direction:column;font-weight:600;color:var(--brand-dark);width:6rem;height:3rem;text-transform:uppercase;font-size:1rem;background:transparent;border-radius:0;padding:.75rem 0rem;opacity:.5}.sideMenu .react-tabs__tab--selected{background:none;border:none;border-radius:0}.react-tabs__tab{padding:0!important}.react-tabs__tab-panel{height:auto}.sideMenu .firstMobileTabs .react-tabs__tab--selected .mobileTab{border-bottom:2px solid var(--brand-dark);opacity:1}.sideMenu .secondMobileTabs{width:100%;height:auto;display:flex;justify-content:flex-start;margin:0;gap:1rem;padding:0 1rem;margin-top:1.5rem;margin-bottom:1.25rem;overflow:auto}.sideMenu .secondMobileTabs::-webkit-scrollbar{display:none}.sideMenu .secondMobileTabs .mobileTab{padding:0;font-weight:500;font-size:.75rem;text-transform:uppercase;color:#c4c4c4;text-decoration:none;white-space:nowrap}.sideMenu .secondMobileTabs .mobileTab.scrolled{font-weight:700;color:var(--brand-dark)}.sideMenu .secondMobileTabs .react-tabs__tab{padding:0;width:100%}.sideMenu .secondMobileTabs .react-tabs__tab--selected .mobileTab{border-bottom:1px solid var(--brand-dark)}.imageContainer{width:100%;height:8rem;cursor:pointer;padding:0;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;border-radius:.375rem;background:transparent;position:relative}.imageContainer .contentContainer,.imageContainer:hover .contentContainer{width:4.5rem;height:4.5rem;left:0%;top:0;border-radius:.375rem;background:#fff;display:flex;justify-content:center;align-items:center;flex-direction:column}.imageContainer .itemDetails{display:flex;text-align:start;font-size:.75rem;margin-top:.5rem;text-decoration:none}.truncate{width:70px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-align:center}.truncate-mobile{text-align:center}.product-image{margin-right:0;border-radius:0rem;padding:.5rem;max-width:100%;max-height:100%}.mobileGrid{display:flex;flex-direction:row;grid-template-columns:none;align-items:flex-start;justify-items:flex-start;justify-content:flex-start;padding-left:1rem;padding-right:1rem;width:100%;gap:1rem;overflow-x:auto;overflow-y:hidden;margin-bottom:10px}.mobileGridCenter{align-items:center}.mobileGrid .mobileGridSection{display:flex;align-items:center;gap:.75rem}.mobileGrid .mobileGridSection .mobileGridCategorySection{display:flex;align-items:flex-start;gap:.75rem}.mobileGrid::-webkit-scrollbar{display:none}.mobileGrid .imageContainer .contentContainer .contentOverlay{transition:none;opacity:1;pointer-events:all;background:transparent}.mobileGrid .imageContainer .contentContainer .contentOverlay img{display:none}.mobileGrid .imageContainer .contentOverlay{position:absolute;left:0;top:0;width:100%;height:5rem;display:flex;justify-content:center;align-items:center;opacity:0;transition:none;background:rgba(51,51,51,.2);border-radius:.6rem;z-index:3}.mobileGrid .imageContainer .contentOverlay img{filter:invert(96%) sepia(3%) saturate(312%) hue-rotate(315deg) brightness(114%) contrast(100%);width:3rem;background:none}.imageContainer .infoButton{display:none}.imageContainer:hover .itemDetails,.imageContainer:hover .addCartButton{display:flex}.mobileTabContent{display:block;padding-bottom:0}.mobileElementsModal{opacity:0;position:absolute;width:100%;height:100%;top:0;left:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.mobileElementsModal.open{pointer-events:all;opacity:1}.mobileElementsModal .overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(31,31,31,.7);z-index:2}.mobileElementsModal .modalContent{position:relative;width:8.9rem;height:auto;background:#fff;box-shadow:0 1.89333px 7.57333px #0000001a;border-radius:.75rem;z-index:4;display:flex;flex-direction:column;overflow:hidden;margin-top:-25%}.mobileElementsModal .modalContent .contentContainer{padding:.5rem}.mobileElementsModal .modalContent .thumbnailImage{max-height:6.4rem;width:100%;display:flex;justify-content:center}.mobileElementsModal .modalContent .thumbnailImage img{max-height:100%;max-width:100%}.mobileElementsModal .addCartButton{width:2rem;height:2rem;justify-content:center;align-items:center;background:#ffffff;box-shadow:0 1px 3px #0000000d;display:block;position:absolute;right:1.25rem;top:.875rem;border:none;border-radius:50%;font-size:1.25rem;color:var(--brand-dark)}.mobileElementsModal .itemDetails{display:block;max-width:100%;font-size:.85rem;align-items:flex-start;margin-top:.25rem;display:flex;flex-direction:row}.mobileElementsModal .itemDetails p{max-width:50%}.mobileElementsModal .itemDetails img{width:.7rem;margin-left:.25rem;margin-top:.25rem}.mobileElementsModal .cartOptions{display:flex;justify-content:space-between;align-items:center;width:calc(100% - 1rem);background:white;position:relative;top:.5rem;left:.5rem;border-radius:2.6rem;overflow:hidden}.mobileElementsModal .cartOptions button{background:#ffffff;box-shadow:0 .946667px 2.84px #0000000d;width:1.75rem;height:1.75rem;font-size:1.125rem;border:none;outline:none}.mobileElementsModal .cartOptions .cartCount{color:#e52438;font-size:1rem}.mobileElementsModal .confirmCartButton{width:100%;padding:.5rem;display:flex;justify-content:center;align-items:center;background:#e52438;font-weight:900;color:#fff;border:none;font-size:.6875rem;margin-top:.25rem}.mobileGridSection{display:flex;width:auto;gap:1rem}.itemGridDivider{background:transparent;width:1px;height:5rem;border-right:.5px solid #c4c4c4;margin:0}.itemGridPlaceholder{width:calc(100vw - 8rem)}.previewCartModal.mobile{display:flex;box-shadow:none}.previewCartModal{height:90%;z-index:9;top:0}.previewCartModal .checkoutButton{position:relative;width:100%;margin:auto;text-align:center;bottom:0;left:0}.previewCartModal .checkoutButton img{filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.previewCartModal .checkoutButton:disabled{opacity:.75}.previewCartModal .previewCartButtonContainer{position:absolute;width:100%;display:flex;flex-direction:column;gap:.75rem;left:0;bottom:0;align-items:center;padding:.6875rem .9rem;box-shadow:0 -4px 12px #0000000d}.cartMessageDiv{margin:0;padding-bottom:.2rem}.removeAllColorOverridesButton{margin:0;cursor:pointer;width:auto;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.25rem;background:transparent!important;border:none;font-size:11px;text-transform:capitalize;color:var(--brand-dark)!important}.removeAllColorOverridesButton .iconContainer{background:white;padding:.5rem;box-shadow:1.28889px 1.28889px 7.73333px #0000000d;border-radius:50%}.removeAllColorOverridesButton .iconContainer img{width:1.25rem;height:auto}.removeAllColorOverridesButton:disabled{opacity:.25;cursor:not-allowed}.uiModalDrawer .modalDialog{background:#fff;width:100%;padding:1.5rem;border-radius:0;position:relative;z-index:8;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModalDrawer .modalDialog .modalHeading{font-size:1.25rem;font-weight:700;color:var(--brand-dark);text-transform:capitalize;margin:0;margin-bottom:2.25rem;position:relative;width:100%}.uiModalDrawer .modalDialog .modalHeading:after{content:"";position:absolute;width:100%;height:.25px;background:#a0a0a0;left:0rem;bottom:-1rem}.uiModalDrawer .modalDialog button{border-radius:2px;background:var(--primary-color);color:#fff;text-align:center;font-size:.875rem;font-weight:500;padding:.75rem 1.875rem;outline:none;border:none;box-shadow:none;margin:0;cursor:pointer;width:100%}.uiModalDrawer .shareModal{position:relative;width:100%}.uiModalDrawer .shareModalChildDiv,.uiModalDrawer .shareModalLoaderImg{height:100%}.uiModalDrawer .shareModalRelative{position:relative;width:100%}.UIModalButtonParentDiv{display:flex;gap:10px;width:100%}.uiModalDrawer .shareModal button{position:absolute;text-transform:uppercase;right:.25rem;margin:0;top:.25rem;font-size:1rem;padding:0;width:2.3125rem;height:2.3125rem;display:flex;justify-content:center;align-items:center}.shellCanvasContainer{padding:0!important;box-shadow:none!important;flex-direction:row!important;gap:.75rem!important;overflow-x:scroll!important;background:#ffffff!important;box-shadow:0 2px 12px #0000001a!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;padding:.5rem!important;position:absolute;top:0}.shellCanvasContainer::-webkit-scrollbar{display:none}.shellCanvasContainerParent{align-items:flex-start!important;width:100%!important;height:20%!important;transition:.5s ease-in-out;-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;top:0!important;position:relative}.shellButtonContainer{padding:.5rem .75rem!important;margin:0!important;background:#f8f8f8!important;border-radius:1.5rem!important;gap:.25rem!important}.shellButtonContainer .buttonContent{gap:.25rem!important;display:flex!important;align-items:center!important;flex-direction:row!important;min-width:auto!important;max-width:none!important;min-height:auto!important;max-height:none!important;height:auto!important;width:auto!important;background:transparent!important}.shellButtonContainer .buttonContent span{display:flex;font-size:.6875rem}.contextMenuParent{display:none}.shellButtonContainer.active{border-left:none;background:#f1f1f1!important}.shellButtonContainer.active .buttonContent{background:transparent}.shellButtonContainer .hoverDescriptor,.infoModal{display:none}.epigraphDrawer .contextMenuParent{position:relative;max-width:none;width:100%;top:0;left:0;z-index:1005;background:#ffffff;box-shadow:none;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;border-radius:.625rem;min-width:200px}#contextDrawer{z-index:3}.epigraphDrawer .contextMenuParent .closeContainer{width:100%;display:flex;justify-content:flex-end}.epigraphDrawer .contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent}.epigraphDrawer .contextMenuParent .closeContainer button img{width:.75rem}.epigraphDrawer .contextMenuParent .contextContent h3{font-size:.875rem;font-weight:700;text-transform:uppercase;margin:0}.epigraphDrawer .contextMenuParent .contextContentNameDiv{display:flex;align-items:center;gap:.5rem}.epigraphDrawer .contextMenuParent .selectColorLabel{font-weight:300;font-size:.75rem;margin-top:1rem;text-transform:uppercase}.epigraphDrawer .contextMenuParent .colorSwatchTitle{margin-top:1rem}.epigraphDrawer .contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0}.epigraphDrawer .contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.epigraphDrawer .contextMenuParent .contextButtons button{border-radius:.25rem;padding:.75rem 2rem;background:transparent;display:flex;flex-direction:row;align-items:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;font-weight:700;border:1px solid var(--primary-color);outline:none;background:#fff;box-shadow:none;justify-content:center}.epigraphDrawer .contextMenuParent .contextButtons button img{width:1rem}.epigraphDrawer .contextMenuParent .contextButtons button{color:var(--primary-color);width:100%}.epigraphDrawer .contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.epigraphDrawer .contextMenuParent .contextButtons button svg path{fill:var(--primary-color)}.epigraphDrawer .color-grid{display:flex;gap:1rem}.epigraphDrawer .colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem}.epigraphDrawer .colorSelector .colorThumbnailContainer{position:relative}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail .colorThumbnailImg{height:100%;width:100%;opacity:1}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:none;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.epigraphDrawer .colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.epigraphDrawer .colorSelector .colorDetails{text-align:center;opacity:.75;pointer-events:none;margin-top:0}.epigraphDrawer .colorSelector:hover .colorDetails,.epigraphDrawer .colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.epigraphDrawer .colorSelector .colorDetails p{margin:0;font-size:.75rem;color:var(--brand-dark)}.epigraphDrawer .colorSelector .colorDetails p:nth-child(1){font-weight:600;text-align:center}.epigraphDrawer .colorSelector .colorDetails p:nth-child(2){font-weight:400}.epigraphDrawer p,.epigraphDrawer span,.epigraphDrawer h1,.epigraphDrawer h2,.epigraphDrawer h3,.epigraphDrawer h4,.epigraphDrawer h5,.epigraphDrawer pre{font-family:Inter,helvetica,sans-serif}.infoDrawer{padding-top:2rem;padding-bottom:3rem;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;position:relative}.infoDrawer .drawerContent{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;overflow-y:scroll}.infoDrawer .infoDrawerImageContainer{position:relative;width:100%}.infoDrawer button{background:transparent;border:none;outline:none;cursor:pointer}.infoDrawer .closeButton{position:absolute;right:1.5rem;top:1.5rem}.infoDrawer .closeButton img{width:.75rem}.infoDrawer .openNewTab{position:relative;margin-top:1rem;display:flex;align-items:center;color:var(--brand-dark);gap:.5rem;outline:none}.infoDrawer .itemImage{max-width:60%;width:50%}.infoDrawer .itemTitle{font-weight:400;max-width:70%;font-size:1rem;margin-top:1.25rem;text-align:center}.infoDrawer .infoDrawerActions{margin-top:1.5rem}.infoDrawer .infoDrawerActions button{width:65%;padding:.6875rem;text-align:center;color:#fff}.infoDrawer .infoDrawerActions .removeFromCart{background:var(--brand-dark)}.infoDrawer .itemTitle{font-weight:400;max-width:60%;font-size:1.25rem;margin-top:1rem;margin-bottom:1rem}.infoDrawer .itemDescription{max-width:70%;font-size:1rem;line-height:1.25rem;display:-webkit-box;-webkit-box-orient:vertical;white-space:pre-wrap;text-align:-webkit-left}.infoDrawer .infoDrawerDimensions{color:var(--brand-dark);opacity:.4;font-weight:700;font-size:.875rem;margin-top:1rem}.infoDrawer .infoDrawerActions{margin-top:3.75rem}.infoDrawer .infoModalActions button{width:100%;padding:.6875rem;text-align:center;color:var(--brand-dark);pointer-events:none;font-size:1.25rem;font-weight:700;background:#f8f8f8;margin-top:1rem}.infoDrawer .categoryLink{display:flex;align-items:center;color:var(--brand-dark);gap:.75rem;text-decoration:none;position:relative;width:70%;outline:none;margin-bottom:2rem}.infoDrawer .categoryLink .categoryTitle{font-size:1.25rem;font-weight:700;text-align:center;margin:auto}.addToCartDisabled{background:#00000057!important;opacity:.75;cursor:not-allowed!important}.epigraphDrawer.hotspotDrawer .drawerContent{padding:unset;height:100%;overflow-y:none}.epigraphDrawer.hotspotDrawer h2{font-size:1.25rem;text-transform:uppercase;margin:0;margin-bottom:2rem}.epigraphDrawer.hotspotDrawer .quill p{margin:0;margin-top:.5rem}.uiModalDrawer.open{opacity:1;pointer-events:all}.uiModalDrawer .modalOverlay{background:rgba(51,51,51,.4);position:absolute;top:0;left:0;width:100%;height:100%}.uiModalDrawer .modalDialog{background:#fff;width:100%;padding:0;border-radius:0;position:relative;z-index:32;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModalDrawer .modalText{white-space:pre-wrap;font-size:.75rem;font-weight:300;color:#222;margin-bottom:1rem}.uiModalDrawer .modalDialog input{font-weight:300;color:var(--brand-dark);border:.5px solid var(--brand-dark);border-radius:2px;padding:1rem;width:100%}.uiModalDrawer .shareModal{width:100%;display:flex}.uiModalDrawer .shareModal button{position:absolute;text-transform:uppercase;right:0;margin:0;top:0;font-size:1rem;padding:0;width:3rem;height:100%;display:flex;justify-content:center;align-items:center}.uiModalDrawer .shareModal button:before{position:absolute;content:"";background:white;height:calc(100% - 2px);right:3rem;top:1px;width:12px}.uiModalDrawer .shareModal button img{width:1.75rem;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.uiModalDrawer .modalDialog .modalCloseContainer{display:none}.uiModalDrawer .modalDialog .modalCloseContainer button{cursor:pointer;outline:none;background:transparent;border:none;margin:0;padding:0}.uiModalDrawer .modalDialog .modalCloseContainer button img{width:1.5rem}}
|
|
8861
|
+
`,R2e=`@media only screen and (orientation: portrait){.overlayUI{z-index:3;flex-direction:column;padding:0;align-content:flex-start;align-items:flex-start;justify-content:flex-start;top:0;height:100%;max-height:800px;border:none;pointer-events:none}.shadowRoot{flex-direction:column;justify-content:flex-end}.leftShell{width:100%;height:100%!important;padding:0;position:relative;flex-direction:column;align-items:flex-start;justify-content:flex-start;align-content:flex-start;background:#fff;z-index:2;transition:.5s ease-out;flex-shrink:2}.expanded-left-shell,.disabledleftShell{height:100%!important}.desktopSideMenu{display:none}.sideMenu{width:100%;height:100%!important;display:flex;z-index:1;bottom:0;flex-direction:column;align-items:flex-start;justify-content:space-between;align-content:flex-end;padding:0;border:none;background:#f5f5f5;border-radius:12px;max-width:unset;min-width:unset;box-shadow:0 -2px 12px #0000001a!important;transition:.5s;min-height:300px;max-height:300px;flex-shrink:1}.side-menu-collapsed{min-height:110px;max-height:110px}.collapse-side-menu-button{opacity:1;border:none;box-shadow:none;background:transparent;display:flex;align-items:center;position:absolute;right:6%;top:5%}.set-display-none,.sideMenuContent,.sideMenu .desktop,.sideMenuTabs{display:none}.sideMenu .viewInSpaceButton{width:9rem}.sideMenu .bottomBar{z-index:4;width:100%;position:absolute}.bottomBar .reviewButton{font-size:.875rem;margin-right:.5rem}.bottomBar .cartButton img{width:1.25rem}.mobileExpandButton{justify-content:center;align-items:center;display:flex;flex-direction:column-reverse;background:#f5f5f5;font-size:.75rem;width:100%;border-top-left-radius:.75rem;border-top-right-radius:.75rem;transition:none;opacity:1;text-transform:uppercase}.mobileExpandButton.sideMenuOpen{padding:0;height:0%;opacity:0;background:#f8f8f8;pointer-events:none}.mobileExpandButton button{position:relative;width:100%;top:0;right:auto;border:none;box-shadow:none;background:transparent;display:flex;justify-content:center;align-items:center;z-index:5;transition:none}.mobileExpandButton button img{transform:rotate(180deg)}epigraph-configurator-core{width:100%;height:100%}epigraph-configurator{position:fixed!important;top:0;left:0;width:100%!important;height:100%!important}.sideMenu .sideMenuTabContainer{display:flex;width:100%;height:100%;transition:none;align-items:flex-start;min-height:300px;max-height:300px}.side-menu-tab-container-open{height:100%}.side-menu-container-hide{height:0%!important}.sideMenu.open .sideMenuTabContainer{height:100%}.sideMenu.open{height:100%;max-height:310px}.sideMenu .sideMenuTabContainer .mobileTab{display:flex}.sideMenu .sideMenuTabContainer .firstMobileTabs img{height:auto}.sideMenu .sideMenuTabContainer .firstMobileTab{width:100%}.sideMenu .firstMobileTabs{width:100%;height:auto;display:flex;justify-content:center;padding:0 2.5rem;margin:0;border-bottom:.25px solid #c4c4c4}.sideMenu .firstMobileTabs .mobileTab{display:flex;align-items:center;justify-content:flex-end;flex-direction:column;font-weight:600;color:var(--brand-dark);width:6rem;height:3rem;text-transform:uppercase;font-size:1rem;background:transparent;border-radius:0;padding:.75rem 0rem;opacity:.5}.sideMenu .react-tabs__tab--selected{background:none;border:none;border-radius:0}.react-tabs__tab{padding:0!important}.react-tabs__tab-panel{height:auto}.sideMenu .firstMobileTabs .react-tabs__tab--selected .mobileTab{border-bottom:2px solid var(--brand-dark);opacity:1}.sideMenu .secondMobileTabs{width:100%;height:auto;display:flex;justify-content:flex-start;margin:0;gap:1rem;padding:0 1rem;margin-top:1.5rem;margin-bottom:1.25rem;overflow:auto}.sideMenu .secondMobileTabs::-webkit-scrollbar{display:none}.sideMenu .secondMobileTabs .mobileTab{padding:0;font-weight:500;font-size:.75rem;text-transform:uppercase;color:#c4c4c4;text-decoration:none;white-space:nowrap}.sideMenu .secondMobileTabs .mobileTab.scrolled{font-weight:700;color:var(--brand-dark)}.sideMenu .secondMobileTabs .react-tabs__tab{padding:0;width:100%}.sideMenu .secondMobileTabs .react-tabs__tab--selected .mobileTab{border-bottom:1px solid var(--brand-dark)}.imageContainer{width:100%;height:8rem;cursor:pointer;padding:0;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;border-radius:.375rem;background:transparent;position:relative}.imageContainer .contentContainer,.imageContainer:hover .contentContainer{width:4.5rem;height:4.5rem;left:0%;top:0;border-radius:.375rem;background:#fff;display:flex;justify-content:center;align-items:center;flex-direction:column}.imageContainer .itemDetails{display:flex;text-align:start;font-size:.75rem;margin-top:.5rem;text-decoration:none}.truncate{width:70px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-align:center}.truncate-mobile{text-align:center}.product-image{margin-right:0;border-radius:0rem;padding:.5rem;max-width:100%;max-height:100%}.mobileGrid{display:flex;flex-direction:row;grid-template-columns:none;align-items:flex-start;justify-items:flex-start;justify-content:flex-start;padding-left:1rem;padding-right:1rem;width:100%;gap:1rem;overflow-x:auto;overflow-y:hidden;margin-bottom:10px}.mobileGridCenter{align-items:center}.mobileGrid .mobileGridSection{display:flex;align-items:center;gap:.75rem}.mobileGrid .mobileGridSection .mobileGridCategorySection{display:flex;align-items:flex-start;gap:.75rem}.mobileGrid::-webkit-scrollbar{display:none}.mobileGrid .imageContainer .contentContainer .contentOverlay{transition:none;opacity:1;pointer-events:all;background:transparent}.mobileGrid .imageContainer .contentContainer .contentOverlay img{display:none}.mobileGrid .imageContainer .contentOverlay{position:absolute;left:0;top:0;width:100%;height:5rem;display:flex;justify-content:center;align-items:center;opacity:0;transition:none;background:rgba(51,51,51,.2);border-radius:.6rem;z-index:3}.mobileGrid .imageContainer .contentOverlay img{filter:invert(96%) sepia(3%) saturate(312%) hue-rotate(315deg) brightness(114%) contrast(100%);width:3rem;background:none}.imageContainer .infoButton{display:none}.imageContainer:hover .itemDetails,.imageContainer:hover .addCartButton{display:flex}.mobileTabContent{display:block;padding-bottom:0}.mobileElementsModal{opacity:0;position:absolute;width:100%;height:100%;top:0;left:0;display:flex;align-items:center;justify-content:center;pointer-events:none}.mobileElementsModal.open{pointer-events:all;opacity:1}.mobileElementsModal .overlay{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(31,31,31,.7);z-index:2}.mobileElementsModal .modalContent{position:relative;width:8.9rem;height:auto;background:#fff;box-shadow:0 1.89333px 7.57333px #0000001a;border-radius:.75rem;z-index:4;display:flex;flex-direction:column;overflow:hidden;margin-top:-25%}.mobileElementsModal .modalContent .contentContainer{padding:.5rem}.mobileElementsModal .modalContent .thumbnailImage{max-height:6.4rem;width:100%;display:flex;justify-content:center}.mobileElementsModal .modalContent .thumbnailImage img{max-height:100%;max-width:100%}.mobileElementsModal .addCartButton{width:2rem;height:2rem;justify-content:center;align-items:center;background:#ffffff;box-shadow:0 1px 3px #0000000d;display:block;position:absolute;right:1.25rem;top:.875rem;border:none;border-radius:50%;font-size:1.25rem;color:var(--brand-dark)}.mobileElementsModal .itemDetails{display:block;max-width:100%;font-size:.85rem;align-items:flex-start;margin-top:.25rem;display:flex;flex-direction:row}.mobileElementsModal .itemDetails p{max-width:50%}.mobileElementsModal .itemDetails img{width:.7rem;margin-left:.25rem;margin-top:.25rem}.mobileElementsModal .cartOptions{display:flex;justify-content:space-between;align-items:center;width:calc(100% - 1rem);background:white;position:relative;top:.5rem;left:.5rem;border-radius:2.6rem;overflow:hidden}.mobileElementsModal .cartOptions button{background:#ffffff;box-shadow:0 .946667px 2.84px #0000000d;width:1.75rem;height:1.75rem;font-size:1.125rem;border:none;outline:none}.mobileElementsModal .cartOptions .cartCount{color:#e52438;font-size:1rem}.mobileElementsModal .confirmCartButton{width:100%;padding:.5rem;display:flex;justify-content:center;align-items:center;background:#e52438;font-weight:900;color:#fff;border:none;font-size:.6875rem;margin-top:.25rem}.mobileGridSection{display:flex;width:auto;gap:1rem}.itemGridDivider{background:transparent;width:1px;height:5rem;border-right:.5px solid #c4c4c4;margin:0}.itemGridPlaceholder{width:calc(100vw - 8rem)}.previewCartModal.mobile{display:flex;box-shadow:none}.previewCartModal{height:90%;z-index:9;top:0}.previewCartModal .checkoutButton{position:relative;width:100%;margin:auto;text-align:center;bottom:0;left:0}.previewCartModal .checkoutButton img{filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.previewCartModal .checkoutButton:disabled{opacity:.75}.previewCartModal .previewCartButtonContainer{position:absolute;width:100%;display:flex;flex-direction:column;gap:.75rem;left:0;bottom:0;align-items:center;padding:.6875rem .9rem;box-shadow:0 -4px 12px #0000000d}.cartMessageDiv{margin:0;padding-bottom:.2rem}.removeAllColorOverridesButton{margin:0;cursor:pointer;width:auto;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:.25rem;background:transparent!important;border:none;font-size:11px;text-transform:capitalize;color:var(--brand-dark)!important}.removeAllColorOverridesButton .iconContainer{background:white;padding:.5rem;box-shadow:1.28889px 1.28889px 7.73333px #0000000d;border-radius:50%}.removeAllColorOverridesButton .iconContainer img{width:1.25rem;height:auto}.removeAllColorOverridesButton:disabled{opacity:.25;cursor:not-allowed}.uiModalDrawer .modalDialog{background:#fff;width:100%;padding:1.5rem;border-radius:0;position:relative;z-index:8;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModalDrawer .modalDialog .modalHeading{font-size:1.25rem;font-weight:700;color:var(--brand-dark);text-transform:capitalize;margin:0;margin-bottom:2.25rem;position:relative;width:100%}.uiModalDrawer .modalDialog .modalHeading:after{content:"";position:absolute;width:100%;height:.25px;background:#a0a0a0;left:0rem;bottom:-1rem}.uiModalDrawer .modalDialog button{border-radius:2px;background:var(--primary-color);color:#fff;text-align:center;font-size:.875rem;font-weight:500;padding:.75rem 1.875rem;outline:none;border:none;box-shadow:none;margin:0;cursor:pointer;width:100%}.uiModalDrawer .shareModal{position:relative;width:100%}.uiModalDrawer .shareModalChildDiv,.uiModalDrawer .shareModalLoaderImg{height:100%}.uiModalDrawer .shareModalRelative{position:relative;width:100%}.UIModalButtonParentDiv{display:flex;gap:10px;width:100%}.uiModalDrawer .shareModal button{position:absolute;text-transform:uppercase;right:.25rem;margin:0;top:.25rem;font-size:1rem;padding:0;width:2.3125rem;height:2.3125rem;display:flex;justify-content:center;align-items:center}.shellCanvasContainer{padding:0!important;box-shadow:none!important;flex-direction:row!important;gap:.75rem!important;overflow-x:scroll!important;background:#ffffff!important;box-shadow:0 2px 12px #0000001a!important;align-items:flex-start!important;justify-content:flex-start!important;width:100%!important;padding:.5rem!important;position:absolute;top:0}.shellCanvasContainer::-webkit-scrollbar{display:none}.shellCanvasContainerParent{align-items:flex-start!important;width:100%!important;height:20%!important;transition:.5s ease-in-out;-webkit-transition:.5s ease-in-out;-moz-transition:.5s ease-in-out;top:0!important;position:relative}.shellButtonContainer{padding:.5rem .75rem!important;margin:0!important;background:#f8f8f8!important;border-radius:1.5rem!important;gap:.25rem!important}.shellButtonContainer .buttonContent{gap:.25rem!important;display:flex!important;align-items:center!important;flex-direction:row!important;min-width:auto!important;max-width:none!important;min-height:auto!important;max-height:none!important;height:auto!important;width:auto!important;background:transparent!important}.shellButtonContainer .buttonContent span{display:flex;font-size:.6875rem}.contextMenuParent{display:none}.shellButtonContainer.active{border-left:none;background:#f1f1f1!important}.shellButtonContainer.active .buttonContent{background:transparent}.shellButtonContainer .hoverDescriptor,.infoModal{display:none}.epigraphDrawer .contextMenuParent{position:relative;max-width:none;width:100%;top:0;left:0;z-index:1005;background:#ffffff;box-shadow:none;border:black;border-radius:3%;display:flex;justify-content:center;padding:1rem 1rem 1.5rem;flex-direction:column;align-content:center;border-radius:.625rem;min-width:200px}#contextDrawer{z-index:3}.epigraphDrawer .contextMenuParent .closeContainer{width:100%;display:flex;justify-content:flex-end}.epigraphDrawer .contextMenuParent .closeContainer button{cursor:pointer;border:none;outline:none;box-shadow:none;background:transparent}.epigraphDrawer .contextMenuParent .closeContainer button img{width:.75rem}.epigraphDrawer .contextMenuParent .contextContent h3{font-size:.875rem;font-weight:700;text-transform:uppercase;margin:0}.epigraphDrawer .contextMenuParent .contextContentNameDiv{display:flex;align-items:center;gap:.5rem}.epigraphDrawer .contextMenuParent .selectColorLabel{font-weight:300;font-size:.75rem;margin-top:1rem;text-transform:uppercase}.epigraphDrawer .contextMenuParent .colorSwatchTitle{margin-top:1rem}.epigraphDrawer .contextMenuParent .contextContent p{font-size:.75rem;font-weight:300;margin:0}.epigraphDrawer .contextMenuParent .contextButtons{display:flex;flex-direction:row;gap:.75rem;margin-top:.05rem}.epigraphDrawer .contextMenuParent .contextButtons button{border-radius:.25rem;padding:.75rem 2rem;background:transparent;display:flex;flex-direction:row;align-items:center;gap:.25rem;cursor:pointer;text-transform:uppercase;font-size:.75rem;font-weight:700;border:1px solid var(--primary-color);outline:none;background:#fff;box-shadow:none;justify-content:center}.epigraphDrawer .contextMenuParent .contextButtons button img{width:1rem}.epigraphDrawer .contextMenuParent .contextButtons button{color:var(--primary-color);width:100%}.epigraphDrawer .contextMenuParent .contextButtons button:nth-child(1) img{filter:invert(52%) sepia(97%) saturate(5241%) hue-rotate(347deg) brightness(94%) contrast(93%)}.epigraphDrawer .contextMenuParent .contextButtons button svg path{fill:var(--primary-color)}.epigraphDrawer .color-grid{display:flex;gap:1rem}.epigraphDrawer .colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem}.epigraphDrawer .colorSelector .colorThumbnailContainer{position:relative}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.epigraphDrawer .colorSelector .colorThumbnailContainer .colorThumbnail .colorThumbnailImg{height:100%;width:100%;opacity:1}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.epigraphDrawer .colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:none;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.epigraphDrawer .colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.epigraphDrawer .colorSelector .colorDetails{text-align:center;opacity:.75;pointer-events:none;margin-top:0}.epigraphDrawer .colorSelector:hover .colorDetails,.epigraphDrawer .colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.epigraphDrawer .colorSelector .colorDetails p{margin:0;font-size:.75rem;color:var(--brand-dark)}.epigraphDrawer .colorSelector .colorDetails p:nth-child(1){font-weight:600;text-align:center}.epigraphDrawer .colorSelector .colorDetails p:nth-child(2){font-weight:400}.epigraphDrawer p,.epigraphDrawer span,.epigraphDrawer h1,.epigraphDrawer h2,.epigraphDrawer h3,.epigraphDrawer h4,.epigraphDrawer h5,.epigraphDrawer pre{font-family:Inter,helvetica,sans-serif}.infoDrawer{padding-top:2rem;padding-bottom:3rem;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;position:relative}.infoDrawer .drawerContent{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;overflow-y:scroll}.infoDrawer .infoDrawerImageContainer{position:relative;width:100%}.infoDrawer button{background:transparent;border:none;outline:none;cursor:pointer}.infoDrawer .closeButton{position:absolute;right:1.5rem;top:1.5rem}.infoDrawer .closeButton img{width:.75rem}.infoDrawer .openNewTab{position:relative;margin-top:1rem;display:flex;align-items:center;color:var(--brand-dark);gap:.5rem;outline:none}.infoDrawer .itemImage{max-width:60%;width:50%}.infoDrawer .itemTitle{font-weight:400;max-width:70%;font-size:1rem;margin-top:1.25rem;text-align:center}.infoDrawer .infoDrawerActions{margin-top:1.5rem}.infoDrawer .infoDrawerActions button{width:65%;padding:.6875rem;text-align:center;color:#fff}.infoDrawer .infoDrawerActions .removeFromCart{background:var(--brand-dark)}.infoDrawer .itemTitle{font-weight:400;max-width:60%;font-size:1.25rem;margin-top:1rem;margin-bottom:1rem}.infoDrawer .itemDescription{max-width:70%;font-size:1rem;line-height:1.25rem;display:-webkit-box;-webkit-box-orient:vertical;white-space:pre-wrap;text-align:-webkit-left}.infoDrawer .infoDrawerDimensions{color:var(--brand-dark);opacity:.4;font-weight:700;font-size:.875rem;margin-top:1rem}.infoDrawer .infoDrawerActions{margin-top:3.75rem}.infoDrawer .infoModalActions button{width:100%;padding:.6875rem;text-align:center;color:var(--brand-dark);pointer-events:none;font-size:1.25rem;font-weight:700;background:#f8f8f8;margin-top:1rem}.infoDrawer .categoryLink{display:flex;align-items:center;color:var(--brand-dark);gap:.75rem;text-decoration:none;position:relative;width:70%;outline:none;margin-bottom:2rem}.infoDrawer .categoryLink .categoryTitle{font-size:1.25rem;font-weight:700;text-align:center;margin:auto}.addToCartDisabled{background:#00000057!important;opacity:.75;cursor:not-allowed!important}.epigraphDrawer.hotspotDrawer .drawerContent{padding:unset;height:100%;overflow-y:none}.epigraphDrawer.hotspotDrawer h2{font-size:1.25rem;text-transform:uppercase;margin:0;margin-bottom:2rem}.epigraphDrawer.hotspotDrawer .quill p{margin:0;margin-top:.5rem}.uiModalDrawer.open{opacity:1;pointer-events:all}.uiModalDrawer .modalOverlay{background:rgba(51,51,51,.4);position:absolute;top:0;left:0;width:100%;height:100%}.uiModalDrawer .modalDialog{background:#fff;width:100%;padding:0;border-radius:0;position:relative;z-index:32;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.uiModalDrawer .modalText{white-space:pre-wrap;font-size:.75rem;font-weight:300;color:#222;margin-bottom:1rem}.uiModalDrawer .modalDialog input{font-weight:300;color:var(--brand-dark);border:.5px solid var(--brand-dark);border-radius:2px;padding:1rem;width:100%}.uiModalDrawer .shareModal{width:100%;display:flex}.uiModalDrawer .shareModal button{position:absolute;text-transform:uppercase;right:0;margin:0;top:0;font-size:1rem;padding:0;width:3rem;height:100%;display:flex;justify-content:center;align-items:center}.uiModalDrawer .shareModal button:before{position:absolute;content:"";background:white;height:calc(100% - 2px);right:3rem;top:1px;width:12px}.uiModalDrawer .shareModal button img{width:1.75rem;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.uiModalDrawer .modalDialog .modalCloseContainer{display:none}.uiModalDrawer .modalDialog .modalCloseContainer button{cursor:pointer;outline:none;background:transparent;border:none;margin:0;padding:0}.uiModalDrawer .modalDialog .modalCloseContainer button img{width:1.5rem}}
|
|
8862
8862
|
`,I2e=[{id:"variables",contents:S2e},{id:"styles",contents:x2e},{id:"accordion",contents:T2e},{id:"productFeaturesUI",contents:C2e},{id:"sideMenuContent",contents:M2e},{id:"build",contents:w2e},{id:"mobile",contents:R2e}];function N2e({disableUI:r,launchInAR:e,disableCart:t,configuratorWcRef:n,gaCode:i,thumbComputedStyle:a=null}){const s=Za(S=>S),o=oe.useRef(null),l=oe.useRef(null),u=oe.useRef(null),[f,h]=oe.useState(!1),p=Jt(S=>S.CORE_API),m=Jt(S=>S.cssLoaded),y=oe.useRef(null);Tr("coreApi:ready",S=>{s.setProductData(S.productData),s.setCategoryData(S.categoryData),s.setLookData(S.lookData),s.setHotspotsData(S.hotspotsData),s.setAssetsData(S.assetsData);const _=S.categoryData.geometryVariants;Object.keys(ol.getState().allActiveGeometryVariants).length==0&&_.map(R=>ol.getState().allActiveGeometryVariants[R.id]=Object.keys(R.variants)[0]);const w=S.categoryData.color;if(Object.keys(ol.getState().allActiveVariants).length==0&&w.map(R=>ol.getState().allActiveVariants[R.id]=R.looks[0]),S.configuration&&S.configuration.globalVariants){const R=S.configuration.globalVariants;Object.keys(R).map(N=>{ol.getState().allActiveVariants[N]=R[N]}),ol.setState({allActiveVariants:{...ol.getState().allActiveVariants}})}u.current.coreApi=o.current.api,h(!0)}),Tr("coreApi:failed",S=>{n.showHiccupScreen(`AUTHENTICATION FAILED FOR: ${window.location.href}`),h(!1)}),Tr("globalGeometryVariant:updated",S=>{ol.setState({allActiveGeometryVariants:{...S}});const _=aL.getState().itemsSpawned;E(_)}),Tr("globalVariant:updated",S=>{ol.setState({allActiveVariants:{...S}})}),Tr("categoryData:updated",S=>{s.setCategoryData(S)}),Tr("fittingSkuIds:updated",S=>{aL.getState().actions.setFittingSkuIds([...S.skuids])}),Tr("cartMessage:updated",S=>{Jt.setState({cartMessage:S.cartMessage})});const E=S=>{let _=[],w=[];const R=ol.getState().allActiveGeometryVariants;Object.keys(S).map(N=>{let L=S[N];!L.hotspotSpawned||!L.hotspotsData||L.hotspotsData.map(I=>{if(I.geometryVariantID){let D=!1;if(Object.keys(R).map(k=>{I.geometryVariantID==R[k]&&(D=!0)}),D===!1)return}I.categoryID!==""&&w.includes(I.categoryID)||(w.push(I.categoryID),_=[..._,{itemData:{...S[N].itemData},hotspotData:{...I}}])})}),Jt.setState({tabSpawnCount:_})};Tr("items:updated",S=>{ly.info({title:"Items changed"});const _={...S.itemsSpawned};aL.getState().setItemsSpawned(_),E(_)}),Tr("cart:statusUpdated",S=>{S.disableCart!==void 0&&Jt.setState({disableCart:S.disableCart})}),Tr("viewInYourSpace:hide",S=>{Jt.setState({viewInYourSpaceMenuBtnVisible:!1})}),Tr("viewInYourSpace:show",S=>{Jt.setState({viewInYourSpaceMenuBtnVisible:!0})});const b=oe.useCallback(S=>{let _=[];const w=Za.getState().productData;S.cartItems.forEach(R=>{let N={...R},L=w[R.skuID];N.title=L.lookDetails[R.currentVariant].title,N.subtitle=L.lookDetails[R.currentVariant].subtitle,N.actionButton=L.lookDetails[R.currentVariant].actionButton,N.thumbnails=L.lookDetails[R.currentVariant].thumbnails,_.push(N)}),Fm.setState({cart:[..._]}),Fm.getState().actions.setCartTotalPrice(S.details.total)},[]),v=oe.useCallback(S=>{p&&(Jt.setState({inventoryData:{...S}}),b(p.getCartItems()))},[p]),x=()=>(Tr(p.EVENTS.UI.PreloadScreen_Hide,()=>{n.api.ui.hidePreloadScreen()}),Tr(p.EVENTS.UI.PreloadScreen_Show,()=>{n.api.ui.showPreloadScreen()}),Tr(p.EVENTS.SCENE.CartItems_Updated,b),Tr(p.EVENTS.SCENE.Inventory_Updated,v),ne(hi,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:282,columnNumber:12},this));return oe.useEffect(()=>{const{current:S}=o;S&&(Jt.setState({coreWcRef:S}),n.api.core=S.api,n.api.core.clientAccessKey=n.clientAccessKey,Jt.setState({CORE_API:S.api}))},[o]),oe.useEffect(()=>{m===!1||f===!1||(b(p.getCartItems()),n.api.ui.hidePreloadScreen(),e&&(ly.info({title:"Attempting to auto launch view in your space"}),p.viewInYourSpace()))},[m,f]),oe.useEffect(()=>{const{current:S}=y;S&&(a=window.getComputedStyle(S),window.addEventListener("mousemove",_=>{if(_.preventDefault(),window.mouseDownImgSrc){if(Math.abs(_.offsetX-window.pointerDownPos)<=10)return;const R={x:_.offsetX,y:_.offsetY},N=S;N.src=window.mouseDownImgSrc,N.style.opacity=.75,N.style.left=`calc(${R.x}px - ${a.width})`,N.style.top=`calc(${R.y}px - ${a.height})`,window.mouseDragging||(window.mouseDragging=!0,Jt.getState().CORE_API.itemDragStart(window.mouseDownSkuID))}}),window.addEventListener("mouseup",()=>{if(window.mouseDownImgSrc){const _=S;_.style.left="0px",_.style.top="0px",_.style.opacity=0,window.mouseDragging&&Jt.getState().CORE_API.itemDragEnd(),window.mouseDownImgSrc=null,window.mouseDragging=!1}}),window.addEventListener("touchmove",_=>{if(window.mouseDownImgSrc){if(Math.abs(_.touches[0].screenX-window.pointerDownPos)<=10)return;const R={x:_.touches[0].clientX,y:_.touches[0].clientY},N=S;if(N.src=window.mouseDownImgSrc,N.style.opacity=.75,N.style.left=`calc(${R.x}px - ${a.width})`,N.style.top=`calc(${R.y}px - ${a.height})`,!window.mouseDragging){window.mouseDragging=!0;const L=l.current.getElementsByClassName("mobileGrid");for(let I=0;I<L.length;I++)L[I].style="overflow-x:hidden !important";Jt.getState().CORE_API.itemDragStart(window.mouseDownSkuID)}}}),window.addEventListener("touchend",_=>{if(window.mouseDownImgSrc){const w=S;if(w.style.left="0px",w.style.top="0px",w.style.opacity=0,window.mouseDragging){Jt.getState().CORE_API.itemDragEnd();const R=l.current.getElementsByClassName("mobileGrid");for(let N=0;N<R.length;N++)R[N].style="overflow-x:auto !important"}window.mouseDownImgSrc=null,window.mouseDragging=!1}}))},[y,l,p]),oe.useEffect(()=>{u&&(ly.info({title:"SENDING VIEW IN YOUR SPACE ID: ",details:u.current.id}),o.current.setAttribute("view-in-your-space-elem-id",u.current.id))},[u]),ne("div",{className:"configuratorParentDiv",ref:l,children:[f&&ne(x,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:425,columnNumber:21},this),ne(Nne,{containerId:"uiStylesContainer",localStyles:I2e,dynamicStyles:p?.assetsData.uiStyles},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:427,columnNumber:7},this),ne("img",{id:"dragImgElRef",ref:y,alt:""},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:432,columnNumber:7},this),ne("epigraph-configurator-core",{ref:o,id:"epigraphConfiguratorCore","ga-code":i,...t&&{["disable-cart"]:""},"configurator-wc-id":n.configuratorWcId,"initial-config-id":n.initialConfigId,"client-access-key":n.clientAccessKey},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:434,columnNumber:7},this),ne("view-in-your-space",{id:"viewInYourSpaceWc","hide-button":e===!0?"false":"true","launch-in-ar":e===!0?"true":"false",ref:u,class:e===!0?"viewInYourSpace-AR":"viewInYourSpace"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:445,columnNumber:7},this),f&&m&&ne("div",{className:"shadowRoot",children:ne(E2e,{configuratorWcRef:n,coreRef:o,viewInYourSpaceRef:u,disableUI:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:455,columnNumber:11},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:454,columnNumber:9},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/scripts/App.js",lineNumber:424,columnNumber:5},this)}var KU,qX=DL;{var XX=qX.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;KU=function(r,e){XX.usingClientEntryPoint=!0;try{return qX.createRoot(r,e)}finally{XX.usingClientEntryPoint=!1}}}var ry={},D2e={get exports(){return ry},set exports(r){ry=r}},K0={};/**
|
|
8863
8863
|
* @license React
|
|
8864
8864
|
* react-reconciler-constants.development.js
|
|
@@ -9193,8 +9193,8 @@ Check the render method of %s.`,Ct(zo)||"Unknown"));var ge=kf(Y,ae);ge.payload={
|
|
|
9193
9193
|
* Released under the MIT License.
|
|
9194
9194
|
*/const Jn={LEFT:1,RIGHT:2,MIDDLE:4},Et=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),gx={NONE:0,IN:1,OUT:-1};function F0(r){return r.isPerspectiveCamera}function Yv(r){return r.isOrthographicCamera}const vx=Math.PI*2,b$=Math.PI/2,sie=1e-5,XM=Math.PI/180;function bd(r,e,t){return Math.max(e,Math.min(t,r))}function zr(r,e=sie){return Math.abs(r)<e}function fr(r,e,t=sie){return zr(r-e,t)}function _$(r,e){return Math.round(r/e)*e}function $M(r){return isFinite(r)?r:r<0?-Number.MAX_VALUE:Number.MAX_VALUE}function KM(r){return Math.abs(r)<Number.MAX_VALUE?r:r*(1/0)}function AP(r,e,t,n,i=1/0,a){n=Math.max(1e-4,n);const s=2/n,o=s*a,l=1/(1+o+.48*o*o+.235*o*o*o);let u=r-e;const f=e,h=i*n;u=bd(u,-h,h),e=r-u;const p=(t.value+s*u)*a;t.value=(t.value-s*p)*l;let m=e+(u+p)*l;return f-r>0==m>f&&(m=f,t.value=(m-f)/a),m}function E$(r,e,t,n,i=1/0,a,s){n=Math.max(1e-4,n);const o=2/n,l=o*a,u=1/(1+l+.48*l*l+.235*l*l*l);let f=e.x,h=e.y,p=e.z,m=r.x-f,y=r.y-h,E=r.z-p;const b=f,v=h,x=p,S=i*n,_=S*S,w=m*m+y*y+E*E;if(w>_){const j=Math.sqrt(w);m=m/j*S,y=y/j*S,E=E/j*S}f=r.x-m,h=r.y-y,p=r.z-E;const R=(t.x+o*m)*a,N=(t.y+o*y)*a,L=(t.z+o*E)*a;t.x=(t.x-o*R)*u,t.y=(t.y-o*N)*u,t.z=(t.z-o*L)*u,s.x=f+(m+R)*u,s.y=h+(y+N)*u,s.z=p+(E+L)*u;const I=b-r.x,D=v-r.y,k=x-r.z,F=s.x-b,U=s.y-v,G=s.z-x;return I*F+D*U+k*G>0&&(s.x=b,s.y=v,s.z=x,t.x=(s.x-b)/a,t.y=(s.y-v)/a,t.z=(s.z-x)/a),s}function tz(r,e){e.set(0,0),r.forEach(t=>{e.x+=t.clientX,e.y+=t.clientY}),e.x/=r.length,e.y/=r.length}function nz(r,e){return Yv(r)?(console.warn(`${e} is not supported in OrthographicCamera`),!0):!1}class kLe{constructor(){this._listeners={}}addEventListener(e,t){const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const i=this._listeners[e];if(i!==void 0){const a=i.indexOf(t);a!==-1&&i.splice(a,1)}}removeAllEventListeners(e){if(!e){this._listeners={};return}Array.isArray(this._listeners[e])&&(this._listeners[e].length=0)}dispatchEvent(e){const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let a=0,s=i.length;a<s;a++)i[a].call(this,e)}}}const FLe="2.7.0",bP=1/8,oie=typeof window<"u",GLe=oie&&/Mac/.test(navigator.platform),zLe=!(oie&&"PointerEvent"in window);let jn,S$,_P,iz,pc,yi,ir,yx,ZM,vd,yd,G0,x$,T$,Vu,JM,Ax,w$,rz,C$,az,sz,EP,oz=class CH extends kLe{static install(e){jn=e.THREE,S$=Object.freeze(new jn.Vector3(0,0,0)),_P=Object.freeze(new jn.Vector3(0,1,0)),iz=Object.freeze(new jn.Vector3(0,0,1)),pc=new jn.Vector2,yi=new jn.Vector3,ir=new jn.Vector3,yx=new jn.Vector3,ZM=new jn.Vector3,vd=new jn.Vector3,yd=new jn.Vector3,G0=new jn.Vector3,x$=new jn.Vector3,T$=new jn.Vector3,Vu=new jn.Spherical,JM=new jn.Spherical,Ax=new jn.Box3,w$=new jn.Box3,rz=new jn.Sphere,C$=new jn.Quaternion,az=new jn.Quaternion,sz=new jn.Matrix4,EP=new jn.Raycaster}static get ACTION(){return Et}constructor(e,t){super(),this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.minDistance=Number.EPSILON,this.maxDistance=1/0,this.infinityDolly=!1,this.minZoom=.01,this.maxZoom=1/0,this.smoothTime=.25,this.draggingSmoothTime=.125,this.maxSpeed=1/0,this.azimuthRotateSpeed=1,this.polarRotateSpeed=1,this.dollySpeed=1,this.dollyDragInverted=!1,this.truckSpeed=2,this.dollyToCursor=!1,this.dragToOffset=!1,this.verticalDragToForward=!1,this.boundaryFriction=0,this.restThreshold=.01,this.colliderMeshes=[],this.cancel=()=>{},this._enabled=!0,this._state=Et.NONE,this._viewport=null,this._changedDolly=0,this._changedZoom=0,this._hasRested=!0,this._boundaryEnclosesCamera=!1,this._needsUpdate=!0,this._updatedLastTime=!1,this._elementRect=new DOMRect,this._isDragging=!1,this._activePointers=[],this._lockedPointer=null,this._interactiveArea=new DOMRect(0,0,1,1),this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._isUserControllingOffset=!1,this._isUserControllingZoom=!1,this._lastDollyDirection=gx.NONE,this._thetaVelocity={value:0},this._phiVelocity={value:0},this._radiusVelocity={value:0},this._targetVelocity=new jn.Vector3,this._focalOffsetVelocity=new jn.Vector3,this._zoomVelocity={value:0},this._truckInternal=(_,w,R)=>{let N,L;if(F0(this._camera)){const I=yi.copy(this._camera.position).sub(this._target),D=this._camera.getEffectiveFOV()*XM,k=I.length()*Math.tan(D*.5);N=this.truckSpeed*_*k/this._elementRect.height,L=this.truckSpeed*w*k/this._elementRect.height}else if(Yv(this._camera)){const I=this._camera;N=_*(I.right-I.left)/I.zoom/this._elementRect.width,L=w*(I.top-I.bottom)/I.zoom/this._elementRect.height}else return;this.verticalDragToForward?(R?this.setFocalOffset(this._focalOffsetEnd.x+N,this._focalOffsetEnd.y,this._focalOffsetEnd.z,!0):this.truck(N,0,!0),this.forward(-L,!0)):R?this.setFocalOffset(this._focalOffsetEnd.x+N,this._focalOffsetEnd.y+L,this._focalOffsetEnd.z,!0):this.truck(N,L,!0)},this._rotateInternal=(_,w)=>{const R=vx*this.azimuthRotateSpeed*_/this._elementRect.height,N=vx*this.polarRotateSpeed*w/this._elementRect.height;this.rotate(R,N,!0)},this._dollyInternal=(_,w,R)=>{const N=Math.pow(.95,-_*this.dollySpeed),L=this._sphericalEnd.radius,I=this._sphericalEnd.radius*N,D=jn.MathUtils.clamp(I,this.minDistance,this.maxDistance),k=D-I;this.infinityDolly&&this.dollyToCursor?this._dollyToNoClamp(I,!0):this.infinityDolly&&!this.dollyToCursor?(this.dollyInFixed(k,!0),this._dollyToNoClamp(D,!0)):this._dollyToNoClamp(D,!0),this.dollyToCursor&&(this._changedDolly+=(this.infinityDolly?I:D)-L,this._dollyControlCoord.set(w,R)),this._lastDollyDirection=Math.sign(-_)},this._zoomInternal=(_,w,R)=>{const N=Math.pow(.95,_*this.dollySpeed),L=this._zoom,I=this._zoom*N;this.zoomTo(I,!0),this.dollyToCursor&&(this._changedZoom+=I-L,this._dollyControlCoord.set(w,R))},typeof jn>"u"&&console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."),this._camera=e,this._yAxisUpSpace=new jn.Quaternion().setFromUnitVectors(this._camera.up,_P),this._yAxisUpSpaceInverse=this._yAxisUpSpace.clone().invert(),this._state=Et.NONE,this._target=new jn.Vector3,this._targetEnd=this._target.clone(),this._focalOffset=new jn.Vector3,this._focalOffsetEnd=this._focalOffset.clone(),this._spherical=new jn.Spherical().setFromVector3(yi.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)),this._sphericalEnd=this._spherical.clone(),this._lastDistance=this._spherical.radius,this._zoom=this._camera.zoom,this._zoomEnd=this._zoom,this._lastZoom=this._zoom,this._nearPlaneCorners=[new jn.Vector3,new jn.Vector3,new jn.Vector3,new jn.Vector3],this._updateNearPlaneCorners(),this._boundary=new jn.Box3(new jn.Vector3(-1/0,-1/0,-1/0),new jn.Vector3(1/0,1/0,1/0)),this._cameraUp0=this._camera.up.clone(),this._target0=this._target.clone(),this._position0=this._camera.position.clone(),this._zoom0=this._zoom,this._focalOffset0=this._focalOffset.clone(),this._dollyControlCoord=new jn.Vector2,this.mouseButtons={left:Et.ROTATE,middle:Et.DOLLY,right:Et.TRUCK,wheel:F0(this._camera)?Et.DOLLY:Yv(this._camera)?Et.ZOOM:Et.NONE},this.touches={one:Et.TOUCH_ROTATE,two:F0(this._camera)?Et.TOUCH_DOLLY_TRUCK:Yv(this._camera)?Et.TOUCH_ZOOM_TRUCK:Et.NONE,three:Et.TOUCH_TRUCK};const n=new jn.Vector2,i=new jn.Vector2,a=new jn.Vector2,s=_=>{if(!this._enabled||!this._domElement)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),L=_.clientX/N.width,I=_.clientY/N.height;if(L<this._interactiveArea.left||L>this._interactiveArea.right||I<this._interactiveArea.top||I>this._interactiveArea.bottom)return}const w=_.pointerType!=="mouse"?null:(_.buttons&Jn.LEFT)===Jn.LEFT?Jn.LEFT:(_.buttons&Jn.MIDDLE)===Jn.MIDDLE?Jn.MIDDLE:(_.buttons&Jn.RIGHT)===Jn.RIGHT?Jn.RIGHT:null;if(w!==null){const N=this._findPointerByMouseButton(w);N&&this._disposePointer(N)}if((_.buttons&Jn.LEFT)===Jn.LEFT&&this._lockedPointer)return;const R={pointerId:_.pointerId,clientX:_.clientX,clientY:_.clientY,deltaX:0,deltaY:0,mouseButton:w};this._activePointers.push(R),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",f),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",f),this._isDragging=!0,E(_)},o=_=>{if(!this._enabled||!this._domElement||this._lockedPointer)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const N=this._domElement.getBoundingClientRect(),L=_.clientX/N.width,I=_.clientY/N.height;if(L<this._interactiveArea.left||L>this._interactiveArea.right||I<this._interactiveArea.top||I>this._interactiveArea.bottom)return}const w=(_.buttons&Jn.LEFT)===Jn.LEFT?Jn.LEFT:(_.buttons&Jn.MIDDLE)===Jn.MIDDLE?Jn.MIDDLE:(_.buttons&Jn.RIGHT)===Jn.RIGHT?Jn.RIGHT:null;if(w!==null){const N=this._findPointerByMouseButton(w);N&&this._disposePointer(N)}const R={pointerId:1,clientX:_.clientX,clientY:_.clientY,deltaX:0,deltaY:0,mouseButton:(_.buttons&Jn.LEFT)===Jn.LEFT?Jn.LEFT:(_.buttons&Jn.MIDDLE)===Jn.LEFT?Jn.MIDDLE:(_.buttons&Jn.RIGHT)===Jn.LEFT?Jn.RIGHT:null};this._activePointers.push(R),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.addEventListener("mousemove",u),this._domElement.ownerDocument.addEventListener("mouseup",h),this._isDragging=!0,E(_)},l=_=>{_.cancelable&&_.preventDefault();const w=_.pointerId,R=this._lockedPointer||this._findPointerById(w);if(R){if(R.clientX=_.clientX,R.clientY=_.clientY,R.deltaX=_.movementX,R.deltaY=_.movementY,this._state=0,_.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else(!this._isDragging&&this._lockedPointer||this._isDragging&&(_.buttons&Jn.LEFT)===Jn.LEFT)&&(this._state=this._state|this.mouseButtons.left),this._isDragging&&(_.buttons&Jn.MIDDLE)===Jn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),this._isDragging&&(_.buttons&Jn.RIGHT)===Jn.RIGHT&&(this._state=this._state|this.mouseButtons.right);b()}},u=_=>{const w=this._lockedPointer||this._findPointerById(1);w&&(w.clientX=_.clientX,w.clientY=_.clientY,w.deltaX=_.movementX,w.deltaY=_.movementY,this._state=0,(this._lockedPointer||(_.buttons&Jn.LEFT)===Jn.LEFT)&&(this._state=this._state|this.mouseButtons.left),(_.buttons&Jn.MIDDLE)===Jn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(_.buttons&Jn.RIGHT)===Jn.RIGHT&&(this._state=this._state|this.mouseButtons.right),b())},f=_=>{const w=this._findPointerById(_.pointerId);if(!(w&&w===this._lockedPointer)){if(w&&this._disposePointer(w),_.pointerType==="touch")switch(this._activePointers.length){case 0:this._state=Et.NONE;break;case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else this._state=Et.NONE;v()}},h=()=>{const _=this._findPointerById(1);_&&_===this._lockedPointer||(_&&this._disposePointer(_),this._state=Et.NONE,v())};let p=-1;const m=_=>{if(!this._domElement||!this._enabled||this.mouseButtons.wheel===Et.NONE)return;if(this._interactiveArea.left!==0||this._interactiveArea.top!==0||this._interactiveArea.width!==1||this._interactiveArea.height!==1){const I=this._domElement.getBoundingClientRect(),D=_.clientX/I.width,k=_.clientY/I.height;if(D<this._interactiveArea.left||D>this._interactiveArea.right||k<this._interactiveArea.top||k>this._interactiveArea.bottom)return}if(_.preventDefault(),this.dollyToCursor||this.mouseButtons.wheel===Et.ROTATE||this.mouseButtons.wheel===Et.TRUCK){const I=performance.now();p-I<1e3&&this._getClientRect(this._elementRect),p=I}const w=GLe?-1:-3,R=_.deltaMode===1?_.deltaY/w:_.deltaY/(w*10),N=this.dollyToCursor?(_.clientX-this._elementRect.x)/this._elementRect.width*2-1:0,L=this.dollyToCursor?(_.clientY-this._elementRect.y)/this._elementRect.height*-2+1:0;switch(this.mouseButtons.wheel){case Et.ROTATE:{this._rotateInternal(_.deltaX,_.deltaY),this._isUserControllingRotate=!0;break}case Et.TRUCK:{this._truckInternal(_.deltaX,_.deltaY,!1),this._isUserControllingTruck=!0;break}case Et.OFFSET:{this._truckInternal(_.deltaX,_.deltaY,!0),this._isUserControllingOffset=!0;break}case Et.DOLLY:{this._dollyInternal(-R,N,L),this._isUserControllingDolly=!0;break}case Et.ZOOM:{this._zoomInternal(-R,N,L),this._isUserControllingZoom=!0;break}}this.dispatchEvent({type:"control"})},y=_=>{if(!(!this._domElement||!this._enabled)){if(this.mouseButtons.right===CH.ACTION.NONE){const w=_ instanceof PointerEvent?_.pointerId:(_ instanceof MouseEvent,0),R=this._findPointerById(w);R&&this._disposePointer(R),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",f),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("mouseup",h);return}_.preventDefault()}},E=_=>{if(!this._enabled)return;if(tz(this._activePointers,pc),this._getClientRect(this._elementRect),n.copy(pc),i.copy(pc),this._activePointers.length>=2){const R=pc.x-this._activePointers[1].clientX,N=pc.y-this._activePointers[1].clientY,L=Math.sqrt(R*R+N*N);a.set(0,L);const I=(this._activePointers[0].clientX+this._activePointers[1].clientX)*.5,D=(this._activePointers[0].clientY+this._activePointers[1].clientY)*.5;i.set(I,D)}if(this._state=0,!_)this._lockedPointer&&(this._state=this._state|this.mouseButtons.left);else if("pointerType"in _&&_.pointerType==="touch")switch(this._activePointers.length){case 1:this._state=this.touches.one;break;case 2:this._state=this.touches.two;break;case 3:this._state=this.touches.three;break}else!this._lockedPointer&&(_.buttons&Jn.LEFT)===Jn.LEFT&&(this._state=this._state|this.mouseButtons.left),(_.buttons&Jn.MIDDLE)===Jn.MIDDLE&&(this._state=this._state|this.mouseButtons.middle),(_.buttons&Jn.RIGHT)===Jn.RIGHT&&(this._state=this._state|this.mouseButtons.right);((this._state&Et.ROTATE)===Et.ROTATE||(this._state&Et.TOUCH_ROTATE)===Et.TOUCH_ROTATE||(this._state&Et.TOUCH_DOLLY_ROTATE)===Et.TOUCH_DOLLY_ROTATE||(this._state&Et.TOUCH_ZOOM_ROTATE)===Et.TOUCH_ZOOM_ROTATE)&&(this._sphericalEnd.theta=this._spherical.theta,this._sphericalEnd.phi=this._spherical.phi,this._thetaVelocity.value=0,this._phiVelocity.value=0),((this._state&Et.TRUCK)===Et.TRUCK||(this._state&Et.TOUCH_TRUCK)===Et.TOUCH_TRUCK||(this._state&Et.TOUCH_DOLLY_TRUCK)===Et.TOUCH_DOLLY_TRUCK||(this._state&Et.TOUCH_ZOOM_TRUCK)===Et.TOUCH_ZOOM_TRUCK)&&(this._targetEnd.copy(this._target),this._targetVelocity.set(0,0,0)),((this._state&Et.DOLLY)===Et.DOLLY||(this._state&Et.TOUCH_DOLLY)===Et.TOUCH_DOLLY||(this._state&Et.TOUCH_DOLLY_TRUCK)===Et.TOUCH_DOLLY_TRUCK||(this._state&Et.TOUCH_DOLLY_OFFSET)===Et.TOUCH_DOLLY_OFFSET||(this._state&Et.TOUCH_DOLLY_ROTATE)===Et.TOUCH_DOLLY_ROTATE)&&(this._sphericalEnd.radius=this._spherical.radius,this._radiusVelocity.value=0),((this._state&Et.ZOOM)===Et.ZOOM||(this._state&Et.TOUCH_ZOOM)===Et.TOUCH_ZOOM||(this._state&Et.TOUCH_ZOOM_TRUCK)===Et.TOUCH_ZOOM_TRUCK||(this._state&Et.TOUCH_ZOOM_OFFSET)===Et.TOUCH_ZOOM_OFFSET||(this._state&Et.TOUCH_ZOOM_ROTATE)===Et.TOUCH_ZOOM_ROTATE)&&(this._zoomEnd=this._zoom,this._zoomVelocity.value=0),((this._state&Et.OFFSET)===Et.OFFSET||(this._state&Et.TOUCH_OFFSET)===Et.TOUCH_OFFSET||(this._state&Et.TOUCH_DOLLY_OFFSET)===Et.TOUCH_DOLLY_OFFSET||(this._state&Et.TOUCH_ZOOM_OFFSET)===Et.TOUCH_ZOOM_OFFSET)&&(this._focalOffsetEnd.copy(this._focalOffset),this._focalOffsetVelocity.set(0,0,0)),this.dispatchEvent({type:"controlstart"})},b=()=>{if(!this._enabled)return;tz(this._activePointers,pc);const w=this._domElement&&document.pointerLockElement===this._domElement?this._lockedPointer||this._activePointers[0]:null,R=w?-w.deltaX:i.x-pc.x,N=w?-w.deltaY:i.y-pc.y;if(i.copy(pc),((this._state&Et.ROTATE)===Et.ROTATE||(this._state&Et.TOUCH_ROTATE)===Et.TOUCH_ROTATE||(this._state&Et.TOUCH_DOLLY_ROTATE)===Et.TOUCH_DOLLY_ROTATE||(this._state&Et.TOUCH_ZOOM_ROTATE)===Et.TOUCH_ZOOM_ROTATE)&&(this._rotateInternal(R,N),this._isUserControllingRotate=!0),(this._state&Et.DOLLY)===Et.DOLLY||(this._state&Et.ZOOM)===Et.ZOOM){const L=this.dollyToCursor?(n.x-this._elementRect.x)/this._elementRect.width*2-1:0,I=this.dollyToCursor?(n.y-this._elementRect.y)/this._elementRect.height*-2+1:0,D=this.dollyDragInverted?-1:1;(this._state&Et.DOLLY)===Et.DOLLY?(this._dollyInternal(D*N*bP,L,I),this._isUserControllingDolly=!0):(this._zoomInternal(D*N*bP,L,I),this._isUserControllingZoom=!0)}if((this._state&Et.TOUCH_DOLLY)===Et.TOUCH_DOLLY||(this._state&Et.TOUCH_ZOOM)===Et.TOUCH_ZOOM||(this._state&Et.TOUCH_DOLLY_TRUCK)===Et.TOUCH_DOLLY_TRUCK||(this._state&Et.TOUCH_ZOOM_TRUCK)===Et.TOUCH_ZOOM_TRUCK||(this._state&Et.TOUCH_DOLLY_OFFSET)===Et.TOUCH_DOLLY_OFFSET||(this._state&Et.TOUCH_ZOOM_OFFSET)===Et.TOUCH_ZOOM_OFFSET||(this._state&Et.TOUCH_DOLLY_ROTATE)===Et.TOUCH_DOLLY_ROTATE||(this._state&Et.TOUCH_ZOOM_ROTATE)===Et.TOUCH_ZOOM_ROTATE){const L=pc.x-this._activePointers[1].clientX,I=pc.y-this._activePointers[1].clientY,D=Math.sqrt(L*L+I*I),k=a.y-D;a.set(0,D);const F=this.dollyToCursor?(i.x-this._elementRect.x)/this._elementRect.width*2-1:0,U=this.dollyToCursor?(i.y-this._elementRect.y)/this._elementRect.height*-2+1:0;(this._state&Et.TOUCH_DOLLY)===Et.TOUCH_DOLLY||(this._state&Et.TOUCH_DOLLY_ROTATE)===Et.TOUCH_DOLLY_ROTATE||(this._state&Et.TOUCH_DOLLY_TRUCK)===Et.TOUCH_DOLLY_TRUCK||(this._state&Et.TOUCH_DOLLY_OFFSET)===Et.TOUCH_DOLLY_OFFSET?(this._dollyInternal(k*bP,F,U),this._isUserControllingDolly=!0):(this._zoomInternal(k*bP,F,U),this._isUserControllingZoom=!0)}((this._state&Et.TRUCK)===Et.TRUCK||(this._state&Et.TOUCH_TRUCK)===Et.TOUCH_TRUCK||(this._state&Et.TOUCH_DOLLY_TRUCK)===Et.TOUCH_DOLLY_TRUCK||(this._state&Et.TOUCH_ZOOM_TRUCK)===Et.TOUCH_ZOOM_TRUCK)&&(this._truckInternal(R,N,!1),this._isUserControllingTruck=!0),((this._state&Et.OFFSET)===Et.OFFSET||(this._state&Et.TOUCH_OFFSET)===Et.TOUCH_OFFSET||(this._state&Et.TOUCH_DOLLY_OFFSET)===Et.TOUCH_DOLLY_OFFSET||(this._state&Et.TOUCH_ZOOM_OFFSET)===Et.TOUCH_ZOOM_OFFSET)&&(this._truckInternal(R,N,!0),this._isUserControllingOffset=!0),this.dispatchEvent({type:"control"})},v=()=>{tz(this._activePointers,pc),i.copy(pc),(this._activePointers.length===0||this._activePointers.length===1&&this._activePointers[0]===this._lockedPointer)&&(this._isDragging=!1),this._activePointers.length===0&&this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("pointerup",f),this._domElement.ownerDocument.removeEventListener("mouseup",h),this.dispatchEvent({type:"controlend"}))};this.lockPointer=()=>{!this._enabled||!this._domElement||(this.cancel(),this._lockedPointer={pointerId:-1,clientX:0,clientY:0,deltaX:0,deltaY:0,mouseButton:null},this._activePointers.push(this._lockedPointer),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("pointerup",f),this._domElement.requestPointerLock(),this._domElement.ownerDocument.addEventListener("pointerlockchange",x),this._domElement.ownerDocument.addEventListener("pointerlockerror",S),this._domElement.ownerDocument.addEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.addEventListener("pointerup",f),E())},this.unlockPointer=()=>{this._lockedPointer!==null&&(this._disposePointer(this._lockedPointer),this._lockedPointer=null),document.exitPointerLock(),this.cancel(),this._domElement&&(this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))};const x=()=>{this._domElement&&this._domElement.ownerDocument.pointerLockElement===this._domElement||this.unlockPointer()},S=()=>{this.unlockPointer()};this._addAllEventListeners=_=>{this._domElement=_,this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none",this._domElement.addEventListener("pointerdown",s),zLe&&this._domElement.addEventListener("mousedown",o),this._domElement.addEventListener("pointercancel",f),this._domElement.addEventListener("wheel",m,{passive:!1}),this._domElement.addEventListener("contextmenu",y)},this._removeAllEventListeners=()=>{this._domElement&&(this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect="",this._domElement.removeEventListener("pointerdown",s),this._domElement.removeEventListener("mousedown",o),this._domElement.removeEventListener("pointercancel",f),this._domElement.removeEventListener("wheel",m,{passive:!1}),this._domElement.removeEventListener("contextmenu",y),this._domElement.ownerDocument.removeEventListener("pointermove",l,{passive:!1}),this._domElement.ownerDocument.removeEventListener("mousemove",u),this._domElement.ownerDocument.removeEventListener("pointerup",f),this._domElement.ownerDocument.removeEventListener("mouseup",h),this._domElement.ownerDocument.removeEventListener("pointerlockchange",x),this._domElement.ownerDocument.removeEventListener("pointerlockerror",S))},this.cancel=()=>{this._state!==Et.NONE&&(this._state=Et.NONE,this._activePointers.length=0,v())},t&&this.connect(t),this.update(0)}get camera(){return this._camera}set camera(e){this._camera=e,this.updateCameraUp(),this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._domElement&&(e?(this._domElement.style.touchAction="none",this._domElement.style.userSelect="none",this._domElement.style.webkitUserSelect="none"):(this.cancel(),this._domElement.style.touchAction="",this._domElement.style.userSelect="",this._domElement.style.webkitUserSelect=""))}get active(){return!this._hasRested}get currentAction(){return this._state}get distance(){return this._spherical.radius}set distance(e){this._spherical.radius===e&&this._sphericalEnd.radius===e||(this._spherical.radius=e,this._sphericalEnd.radius=e,this._needsUpdate=!0)}get azimuthAngle(){return this._spherical.theta}set azimuthAngle(e){this._spherical.theta===e&&this._sphericalEnd.theta===e||(this._spherical.theta=e,this._sphericalEnd.theta=e,this._needsUpdate=!0)}get polarAngle(){return this._spherical.phi}set polarAngle(e){this._spherical.phi===e&&this._sphericalEnd.phi===e||(this._spherical.phi=e,this._sphericalEnd.phi=e,this._needsUpdate=!0)}get boundaryEnclosesCamera(){return this._boundaryEnclosesCamera}set boundaryEnclosesCamera(e){this._boundaryEnclosesCamera=e,this._needsUpdate=!0}set interactiveArea(e){this._interactiveArea.width=bd(e.width,0,1),this._interactiveArea.height=bd(e.height,0,1),this._interactiveArea.x=bd(e.x,0,1-this._interactiveArea.width),this._interactiveArea.y=bd(e.x,0,1-this._interactiveArea.height)}addEventListener(e,t){super.addEventListener(e,t)}removeEventListener(e,t){super.removeEventListener(e,t)}rotate(e,t,n=!1){return this.rotateTo(this._sphericalEnd.theta+e,this._sphericalEnd.phi+t,n)}rotateAzimuthTo(e,t=!1){return this.rotateTo(e,this._sphericalEnd.phi,t)}rotatePolarTo(e,t=!1){return this.rotateTo(this._sphericalEnd.theta,e,t)}rotateTo(e,t,n=!1){this._isUserControllingRotate=!1;const i=bd(e,this.minAzimuthAngle,this.maxAzimuthAngle),a=bd(t,this.minPolarAngle,this.maxPolarAngle);this._sphericalEnd.theta=i,this._sphericalEnd.phi=a,this._sphericalEnd.makeSafe(),this._needsUpdate=!0,n||(this._spherical.theta=this._sphericalEnd.theta,this._spherical.phi=this._sphericalEnd.phi);const s=!n||fr(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fr(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold);return this._createOnRestPromise(s)}dolly(e,t=!1){return this.dollyTo(this._sphericalEnd.radius-e,t)}dollyTo(e,t=!1){return this._isUserControllingDolly=!1,this._lastDollyDirection=gx.NONE,this._changedDolly=0,this._dollyToNoClamp(bd(e,this.minDistance,this.maxDistance),t)}_dollyToNoClamp(e,t=!1){const n=this._sphericalEnd.radius;if(this.colliderMeshes.length>=1){const s=this._collisionTest(),o=fr(s,this._spherical.radius);if(!(n>e)&&o)return Promise.resolve();this._sphericalEnd.radius=Math.min(e,s)}else this._sphericalEnd.radius=e;this._needsUpdate=!0,t||(this._spherical.radius=this._sphericalEnd.radius);const a=!t||fr(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(a)}dollyInFixed(e,t=!1){this._targetEnd.add(this._getCameraDirection(ZM).multiplyScalar(e)),t||this._target.copy(this._targetEnd);const n=!t||fr(this._target.x,this._targetEnd.x,this.restThreshold)&&fr(this._target.y,this._targetEnd.y,this.restThreshold)&&fr(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(n)}zoom(e,t=!1){return this.zoomTo(this._zoomEnd+e,t)}zoomTo(e,t=!1){this._isUserControllingZoom=!1,this._zoomEnd=bd(e,this.minZoom,this.maxZoom),this._needsUpdate=!0,t||(this._zoom=this._zoomEnd);const n=!t||fr(this._zoom,this._zoomEnd,this.restThreshold);return this._changedZoom=0,this._createOnRestPromise(n)}pan(e,t,n=!1){return console.warn("`pan` has been renamed to `truck`"),this.truck(e,t,n)}truck(e,t,n=!1){this._camera.updateMatrix(),vd.setFromMatrixColumn(this._camera.matrix,0),yd.setFromMatrixColumn(this._camera.matrix,1),vd.multiplyScalar(e),yd.multiplyScalar(-t);const i=yi.copy(vd).add(yd),a=ir.copy(this._targetEnd).add(i);return this.moveTo(a.x,a.y,a.z,n)}forward(e,t=!1){yi.setFromMatrixColumn(this._camera.matrix,0),yi.crossVectors(this._camera.up,yi),yi.multiplyScalar(e);const n=ir.copy(this._targetEnd).add(yi);return this.moveTo(n.x,n.y,n.z,t)}elevate(e,t=!1){return yi.copy(this._camera.up).multiplyScalar(e),this.moveTo(this._targetEnd.x+yi.x,this._targetEnd.y+yi.y,this._targetEnd.z+yi.z,t)}moveTo(e,t,n,i=!1){this._isUserControllingTruck=!1;const a=yi.set(e,t,n).sub(this._targetEnd);this._encloseToBoundary(this._targetEnd,a,this.boundaryFriction),this._needsUpdate=!0,i||this._target.copy(this._targetEnd);const s=!i||fr(this._target.x,this._targetEnd.x,this.restThreshold)&&fr(this._target.y,this._targetEnd.y,this.restThreshold)&&fr(this._target.z,this._targetEnd.z,this.restThreshold);return this._createOnRestPromise(s)}lookInDirectionOf(e,t,n,i=!1){const o=yi.set(e,t,n).sub(this._targetEnd).normalize().multiplyScalar(-this._sphericalEnd.radius);return this.setPosition(o.x,o.y,o.z,i)}fitToBox(e,t,{cover:n=!1,paddingLeft:i=0,paddingRight:a=0,paddingBottom:s=0,paddingTop:o=0}={}){const l=[],u=e.isBox3?Ax.copy(e):Ax.setFromObject(e);u.isEmpty()&&(console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"),Promise.resolve());const f=_$(this._sphericalEnd.theta,b$),h=_$(this._sphericalEnd.phi,b$);l.push(this.rotateTo(f,h,t));const p=yi.setFromSpherical(this._sphericalEnd).normalize(),m=C$.setFromUnitVectors(p,iz),y=fr(Math.abs(p.y),1);y&&m.multiply(az.setFromAxisAngle(_P,f)),m.multiply(this._yAxisUpSpaceInverse);const E=w$.makeEmpty();ir.copy(u.min).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.min).setX(u.max.x).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.min).setY(u.max.y).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.max).setZ(u.min.z).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.min).setZ(u.max.z).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.max).setY(u.min.y).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.max).setX(u.min.x).applyQuaternion(m),E.expandByPoint(ir),ir.copy(u.max).applyQuaternion(m),E.expandByPoint(ir),E.min.x-=i,E.min.y-=s,E.max.x+=a,E.max.y+=o,m.setFromUnitVectors(iz,p),y&&m.premultiply(az.invert()),m.premultiply(this._yAxisUpSpace);const b=E.getSize(yi),v=E.getCenter(ir).applyQuaternion(m);if(F0(this._camera)){const x=this.getDistanceToFitBox(b.x,b.y,b.z,n);l.push(this.moveTo(v.x,v.y,v.z,t)),l.push(this.dollyTo(x,t)),l.push(this.setFocalOffset(0,0,0,t))}else if(Yv(this._camera)){const x=this._camera,S=x.right-x.left,_=x.top-x.bottom,w=n?Math.max(S/b.x,_/b.y):Math.min(S/b.x,_/b.y);l.push(this.moveTo(v.x,v.y,v.z,t)),l.push(this.zoomTo(w,t)),l.push(this.setFocalOffset(0,0,0,t))}return Promise.all(l)}fitToSphere(e,t){const n=[],a=e instanceof jn.Sphere?rz.copy(e):CH.createBoundingSphere(e,rz);if(n.push(this.moveTo(a.center.x,a.center.y,a.center.z,t)),F0(this._camera)){const s=this.getDistanceToFitSphere(a.radius);n.push(this.dollyTo(s,t))}else if(Yv(this._camera)){const s=this._camera.right-this._camera.left,o=this._camera.top-this._camera.bottom,l=2*a.radius,u=Math.min(s/l,o/l);n.push(this.zoomTo(u,t))}return n.push(this.setFocalOffset(0,0,0,t)),Promise.all(n)}setLookAt(e,t,n,i,a,s,o=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=gx.NONE,this._changedDolly=0;const l=ir.set(i,a,s),u=yi.set(e,t,n);this._targetEnd.copy(l),this._sphericalEnd.setFromVector3(u.sub(l).applyQuaternion(this._yAxisUpSpace)),this.normalizeRotations(),this._needsUpdate=!0,o||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const f=!o||fr(this._target.x,this._targetEnd.x,this.restThreshold)&&fr(this._target.y,this._targetEnd.y,this.restThreshold)&&fr(this._target.z,this._targetEnd.z,this.restThreshold)&&fr(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fr(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&fr(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(f)}lerpLookAt(e,t,n,i,a,s,o,l,u,f,h,p,m,y=!1){this._isUserControllingRotate=!1,this._isUserControllingDolly=!1,this._isUserControllingTruck=!1,this._lastDollyDirection=gx.NONE,this._changedDolly=0;const E=yi.set(i,a,s),b=ir.set(e,t,n);Vu.setFromVector3(b.sub(E).applyQuaternion(this._yAxisUpSpace));const v=yx.set(f,h,p),x=ir.set(o,l,u);JM.setFromVector3(x.sub(v).applyQuaternion(this._yAxisUpSpace)),this._targetEnd.copy(E.lerp(v,m));const S=JM.theta-Vu.theta,_=JM.phi-Vu.phi,w=JM.radius-Vu.radius;this._sphericalEnd.set(Vu.radius+w*m,Vu.phi+_*m,Vu.theta+S*m),this.normalizeRotations(),this._needsUpdate=!0,y||(this._target.copy(this._targetEnd),this._spherical.copy(this._sphericalEnd));const R=!y||fr(this._target.x,this._targetEnd.x,this.restThreshold)&&fr(this._target.y,this._targetEnd.y,this.restThreshold)&&fr(this._target.z,this._targetEnd.z,this.restThreshold)&&fr(this._spherical.theta,this._sphericalEnd.theta,this.restThreshold)&&fr(this._spherical.phi,this._sphericalEnd.phi,this.restThreshold)&&fr(this._spherical.radius,this._sphericalEnd.radius,this.restThreshold);return this._createOnRestPromise(R)}setPosition(e,t,n,i=!1){return this.setLookAt(e,t,n,this._targetEnd.x,this._targetEnd.y,this._targetEnd.z,i)}setTarget(e,t,n,i=!1){const a=this.getPosition(yi),s=this.setLookAt(a.x,a.y,a.z,e,t,n,i);return this._sphericalEnd.phi=bd(this._sphericalEnd.phi,this.minPolarAngle,this.maxPolarAngle),s}setFocalOffset(e,t,n,i=!1){this._isUserControllingOffset=!1,this._focalOffsetEnd.set(e,t,n),this._needsUpdate=!0,i||this._focalOffset.copy(this._focalOffsetEnd);const a=!i||fr(this._focalOffset.x,this._focalOffsetEnd.x,this.restThreshold)&&fr(this._focalOffset.y,this._focalOffsetEnd.y,this.restThreshold)&&fr(this._focalOffset.z,this._focalOffsetEnd.z,this.restThreshold);return this._createOnRestPromise(a)}setOrbitPoint(e,t,n){this._camera.updateMatrixWorld(),vd.setFromMatrixColumn(this._camera.matrixWorldInverse,0),yd.setFromMatrixColumn(this._camera.matrixWorldInverse,1),G0.setFromMatrixColumn(this._camera.matrixWorldInverse,2);const i=yi.set(e,t,n),a=i.distanceTo(this._camera.position),s=i.sub(this._camera.position);vd.multiplyScalar(s.x),yd.multiplyScalar(s.y),G0.multiplyScalar(s.z),yi.copy(vd).add(yd).add(G0),yi.z=yi.z+a,this.dollyTo(a,!1),this.setFocalOffset(-yi.x,yi.y,-yi.z,!1),this.moveTo(e,t,n,!1)}setBoundary(e){if(!e){this._boundary.min.set(-1/0,-1/0,-1/0),this._boundary.max.set(1/0,1/0,1/0),this._needsUpdate=!0;return}this._boundary.copy(e),this._boundary.clampPoint(this._targetEnd,this._targetEnd),this._needsUpdate=!0}setViewport(e,t,n,i){if(e===null){this._viewport=null;return}this._viewport=this._viewport||new jn.Vector4,typeof e=="number"?this._viewport.set(e,t,n,i):this._viewport.copy(e)}getDistanceToFitBox(e,t,n,i=!1){if(nz(this._camera,"getDistanceToFitBox"))return this._spherical.radius;const a=e/t,s=this._camera.getEffectiveFOV()*XM,o=this._camera.aspect;return((i?a>o:a<o)?t:e/o)*.5/Math.tan(s*.5)+n*.5}getDistanceToFitSphere(e){if(nz(this._camera,"getDistanceToFitSphere"))return this._spherical.radius;const t=this._camera.getEffectiveFOV()*XM,n=Math.atan(Math.tan(t*.5)*this._camera.aspect)*2,i=1<this._camera.aspect?t:n;return e/Math.sin(i*.5)}getTarget(e,t=!0){return(e&&e.isVector3?e:new jn.Vector3).copy(t?this._targetEnd:this._target)}getPosition(e,t=!0){return(e&&e.isVector3?e:new jn.Vector3).setFromSpherical(t?this._sphericalEnd:this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(t?this._targetEnd:this._target)}getSpherical(e,t=!0){return(e&&e instanceof jn.Spherical?e:new jn.Spherical).copy(t?this._sphericalEnd:this._spherical)}getFocalOffset(e,t=!0){return(e&&e.isVector3?e:new jn.Vector3).copy(t?this._focalOffsetEnd:this._focalOffset)}normalizeRotations(){this._sphericalEnd.theta=this._sphericalEnd.theta%vx,this._sphericalEnd.theta<0&&(this._sphericalEnd.theta+=vx),this._spherical.theta+=vx*Math.round((this._sphericalEnd.theta-this._spherical.theta)/vx)}reset(e=!1){if(!fr(this._camera.up.x,this._cameraUp0.x)||!fr(this._camera.up.y,this._cameraUp0.y)||!fr(this._camera.up.z,this._cameraUp0.z)){this._camera.up.copy(this._cameraUp0);const n=this.getPosition(yi);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}const t=[this.setLookAt(this._position0.x,this._position0.y,this._position0.z,this._target0.x,this._target0.y,this._target0.z,e),this.setFocalOffset(this._focalOffset0.x,this._focalOffset0.y,this._focalOffset0.z,e),this.zoomTo(this._zoom0,e)];return Promise.all(t)}saveState(){this._cameraUp0.copy(this._camera.up),this.getTarget(this._target0),this.getPosition(this._position0),this._zoom0=this._zoom,this._focalOffset0.copy(this._focalOffset)}updateCameraUp(){this._yAxisUpSpace.setFromUnitVectors(this._camera.up,_P),this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert()}applyCameraUp(){const e=yi.subVectors(this._target,this._camera.position).normalize(),t=ir.crossVectors(e,this._camera.up);this._camera.up.crossVectors(t,e),this._camera.updateMatrixWorld();const n=this.getPosition(yi);this.updateCameraUp(),this.setPosition(n.x,n.y,n.z)}update(e){const t=this._sphericalEnd.theta-this._spherical.theta,n=this._sphericalEnd.phi-this._spherical.phi,i=this._sphericalEnd.radius-this._spherical.radius,a=x$.subVectors(this._targetEnd,this._target),s=T$.subVectors(this._focalOffsetEnd,this._focalOffset),o=this._zoomEnd-this._zoom;if(zr(t))this._thetaVelocity.value=0,this._spherical.theta=this._sphericalEnd.theta;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.theta=AP(this._spherical.theta,this._sphericalEnd.theta,this._thetaVelocity,h,1/0,e),this._needsUpdate=!0}if(zr(n))this._phiVelocity.value=0,this._spherical.phi=this._sphericalEnd.phi;else{const h=this._isUserControllingRotate?this.draggingSmoothTime:this.smoothTime;this._spherical.phi=AP(this._spherical.phi,this._sphericalEnd.phi,this._phiVelocity,h,1/0,e),this._needsUpdate=!0}if(zr(i))this._radiusVelocity.value=0,this._spherical.radius=this._sphericalEnd.radius;else{const h=this._isUserControllingDolly?this.draggingSmoothTime:this.smoothTime;this._spherical.radius=AP(this._spherical.radius,this._sphericalEnd.radius,this._radiusVelocity,h,this.maxSpeed,e),this._needsUpdate=!0}if(zr(a.x)&&zr(a.y)&&zr(a.z))this._targetVelocity.set(0,0,0),this._target.copy(this._targetEnd);else{const h=this._isUserControllingTruck?this.draggingSmoothTime:this.smoothTime;E$(this._target,this._targetEnd,this._targetVelocity,h,this.maxSpeed,e,this._target),this._needsUpdate=!0}if(zr(s.x)&&zr(s.y)&&zr(s.z))this._focalOffsetVelocity.set(0,0,0),this._focalOffset.copy(this._focalOffsetEnd);else{const h=this._isUserControllingOffset?this.draggingSmoothTime:this.smoothTime;E$(this._focalOffset,this._focalOffsetEnd,this._focalOffsetVelocity,h,this.maxSpeed,e,this._focalOffset),this._needsUpdate=!0}if(zr(o))this._zoomVelocity.value=0,this._zoom=this._zoomEnd;else{const h=this._isUserControllingZoom?this.draggingSmoothTime:this.smoothTime;this._zoom=AP(this._zoom,this._zoomEnd,this._zoomVelocity,h,1/0,e)}if(this.dollyToCursor){if(F0(this._camera)&&this._changedDolly!==0){const h=this._spherical.radius-this._lastDistance,p=this._camera,m=this._getCameraDirection(ZM),y=yi.copy(m).cross(p.up).normalize();y.lengthSq()===0&&(y.x=1);const E=ir.crossVectors(y,m),b=this._sphericalEnd.radius*Math.tan(p.getEffectiveFOV()*XM*.5),x=(this._sphericalEnd.radius-h-this._sphericalEnd.radius)/this._sphericalEnd.radius,S=yx.copy(this._targetEnd).add(y.multiplyScalar(this._dollyControlCoord.x*b*p.aspect)).add(E.multiplyScalar(this._dollyControlCoord.y*b)),_=yi.copy(this._targetEnd).lerp(S,x),w=this._lastDollyDirection===gx.IN&&this._spherical.radius<=this.minDistance,R=this._lastDollyDirection===gx.OUT&&this.maxDistance<=this._spherical.radius;if(this.infinityDolly&&(w||R)){this._sphericalEnd.radius-=h,this._spherical.radius-=h;const L=ir.copy(m).multiplyScalar(-h);_.add(L)}this._boundary.clampPoint(_,_);const N=ir.subVectors(_,this._targetEnd);this._targetEnd.copy(_),this._target.add(N),this._changedDolly-=h,zr(this._changedDolly)&&(this._changedDolly=0)}else if(Yv(this._camera)&&this._changedZoom!==0){const h=this._zoom-this._lastZoom,p=this._camera,m=yi.set(this._dollyControlCoord.x,this._dollyControlCoord.y,(p.near+p.far)/(p.near-p.far)).unproject(p),y=ir.set(0,0,-1).applyQuaternion(p.quaternion),E=yx.copy(m).add(y.multiplyScalar(-m.dot(p.up))),v=-(this._zoom-h-this._zoom)/this._zoom,x=this._getCameraDirection(ZM),S=this._targetEnd.dot(x),_=yi.copy(this._targetEnd).lerp(E,v),w=_.dot(x),R=x.multiplyScalar(w-S);_.sub(R),this._boundary.clampPoint(_,_);const N=ir.subVectors(_,this._targetEnd);this._targetEnd.copy(_),this._target.add(N),this._changedZoom-=h,zr(this._changedZoom)&&(this._changedZoom=0)}}this._camera.zoom!==this._zoom&&(this._camera.zoom=this._zoom,this._camera.updateProjectionMatrix(),this._updateNearPlaneCorners(),this._needsUpdate=!0);const l=this._collisionTest();this._spherical.radius=Math.min(this._spherical.radius,l),this._spherical.makeSafe(),this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target),this._camera.lookAt(this._target),(!zr(this._focalOffset.x)||!zr(this._focalOffset.y)||!zr(this._focalOffset.z))&&(this._camera.updateMatrixWorld(),vd.setFromMatrixColumn(this._camera.matrix,0),yd.setFromMatrixColumn(this._camera.matrix,1),G0.setFromMatrixColumn(this._camera.matrix,2),vd.multiplyScalar(this._focalOffset.x),yd.multiplyScalar(-this._focalOffset.y),G0.multiplyScalar(this._focalOffset.z),yi.copy(vd).add(yd).add(G0),this._camera.position.add(yi)),this._boundaryEnclosesCamera&&this._encloseToBoundary(this._camera.position.copy(this._target),yi.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse),1);const f=this._needsUpdate;return f&&!this._updatedLastTime?(this._hasRested=!1,this.dispatchEvent({type:"wake"}),this.dispatchEvent({type:"update"})):f?(this.dispatchEvent({type:"update"}),zr(t,this.restThreshold)&&zr(n,this.restThreshold)&&zr(i,this.restThreshold)&&zr(a.x,this.restThreshold)&&zr(a.y,this.restThreshold)&&zr(a.z,this.restThreshold)&&zr(s.x,this.restThreshold)&&zr(s.y,this.restThreshold)&&zr(s.z,this.restThreshold)&&zr(o,this.restThreshold)&&!this._hasRested&&(this._hasRested=!0,this.dispatchEvent({type:"rest"}))):!f&&this._updatedLastTime&&this.dispatchEvent({type:"sleep"}),this._lastDistance=this._spherical.radius,this._lastZoom=this._zoom,this._updatedLastTime=f,this._needsUpdate=!1,f}toJSON(){return JSON.stringify({enabled:this._enabled,minDistance:this.minDistance,maxDistance:$M(this.maxDistance),minZoom:this.minZoom,maxZoom:$M(this.maxZoom),minPolarAngle:this.minPolarAngle,maxPolarAngle:$M(this.maxPolarAngle),minAzimuthAngle:$M(this.minAzimuthAngle),maxAzimuthAngle:$M(this.maxAzimuthAngle),smoothTime:this.smoothTime,draggingSmoothTime:this.draggingSmoothTime,dollySpeed:this.dollySpeed,truckSpeed:this.truckSpeed,dollyToCursor:this.dollyToCursor,verticalDragToForward:this.verticalDragToForward,target:this._targetEnd.toArray(),position:yi.setFromSpherical(this._sphericalEnd).add(this._targetEnd).toArray(),zoom:this._zoomEnd,focalOffset:this._focalOffsetEnd.toArray(),target0:this._target0.toArray(),position0:this._position0.toArray(),zoom0:this._zoom0,focalOffset0:this._focalOffset0.toArray()})}fromJSON(e,t=!1){const n=JSON.parse(e);this.enabled=n.enabled,this.minDistance=n.minDistance,this.maxDistance=KM(n.maxDistance),this.minZoom=n.minZoom,this.maxZoom=KM(n.maxZoom),this.minPolarAngle=n.minPolarAngle,this.maxPolarAngle=KM(n.maxPolarAngle),this.minAzimuthAngle=KM(n.minAzimuthAngle),this.maxAzimuthAngle=KM(n.maxAzimuthAngle),this.smoothTime=n.smoothTime,this.draggingSmoothTime=n.draggingSmoothTime,this.dollySpeed=n.dollySpeed,this.truckSpeed=n.truckSpeed,this.dollyToCursor=n.dollyToCursor,this.verticalDragToForward=n.verticalDragToForward,this._target0.fromArray(n.target0),this._position0.fromArray(n.position0),this._zoom0=n.zoom0,this._focalOffset0.fromArray(n.focalOffset0),this.moveTo(n.target[0],n.target[1],n.target[2],t),Vu.setFromVector3(yi.fromArray(n.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)),this.rotateTo(Vu.theta,Vu.phi,t),this.dollyTo(Vu.radius,t),this.zoomTo(n.zoom,t),this.setFocalOffset(n.focalOffset[0],n.focalOffset[1],n.focalOffset[2],t),this._needsUpdate=!0}connect(e){if(this._domElement){console.warn("camera-controls is already connected.");return}e.setAttribute("data-camera-controls-version",FLe),this._addAllEventListeners(e)}disconnect(){this.cancel(),this._removeAllEventListeners(),this._domElement&&(this._domElement.removeAttribute("data-camera-controls-version"),this._domElement=void 0)}dispose(){this.removeAllEventListeners(),this.disconnect()}_getTargetDirection(e){return e.setFromSpherical(this._spherical).divideScalar(this._spherical.radius).applyQuaternion(this._yAxisUpSpaceInverse)}_getCameraDirection(e){return this._getTargetDirection(e).negate()}_findPointerById(e){return this._activePointers.find(t=>t.pointerId===e)}_findPointerByMouseButton(e){return this._activePointers.find(t=>t.mouseButton===e)}_disposePointer(e){this._activePointers.splice(this._activePointers.indexOf(e),1)}_encloseToBoundary(e,t,n){const i=t.lengthSq();if(i===0)return e;const a=ir.copy(t).add(e),o=this._boundary.clampPoint(a,yx).sub(a),l=o.lengthSq();if(l===0)return e.add(t);if(l===i)return e;if(n===0)return e.add(t).add(o);{const u=1+n*l/t.dot(o);return e.add(ir.copy(t).multiplyScalar(u)).add(o.multiplyScalar(1-n))}}_updateNearPlaneCorners(){if(F0(this._camera)){const e=this._camera,t=e.near,n=e.getEffectiveFOV()*XM,i=Math.tan(n*.5)*t,a=i*e.aspect;this._nearPlaneCorners[0].set(-a,-i,0),this._nearPlaneCorners[1].set(a,-i,0),this._nearPlaneCorners[2].set(a,i,0),this._nearPlaneCorners[3].set(-a,i,0)}else if(Yv(this._camera)){const e=this._camera,t=1/e.zoom,n=e.left*t,i=e.right*t,a=e.top*t,s=e.bottom*t;this._nearPlaneCorners[0].set(n,a,0),this._nearPlaneCorners[1].set(i,a,0),this._nearPlaneCorners[2].set(i,s,0),this._nearPlaneCorners[3].set(n,s,0)}}_collisionTest(){let e=1/0;if(!(this.colliderMeshes.length>=1)||nz(this._camera,"_collisionTest"))return e;const n=this._getTargetDirection(ZM);sz.lookAt(S$,n,this._camera.up);for(let i=0;i<4;i++){const a=ir.copy(this._nearPlaneCorners[i]);a.applyMatrix4(sz);const s=yx.addVectors(this._target,a);EP.set(s,n),EP.far=this._spherical.radius+1;const o=EP.intersectObjects(this.colliderMeshes);o.length!==0&&o[0].distance<e&&(e=o[0].distance)}return e}_getClientRect(e){if(!this._domElement)return;const t=this._domElement.getBoundingClientRect();return e.x=t.left,e.y=t.top,this._viewport?(e.x+=this._viewport.x,e.y+=t.height-this._viewport.w-this._viewport.y,e.width=this._viewport.z,e.height=this._viewport.w):(e.width=t.width,e.height=t.height),e}_createOnRestPromise(e){return e?Promise.resolve():(this._hasRested=!1,this.dispatchEvent({type:"transitionstart"}),new Promise(t=>{const n=()=>{this.removeEventListener("rest",n),t()};this.addEventListener("rest",n)}))}_addAllEventListeners(e){}_removeAllEventListeners(){}get dampingFactor(){return console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead."),0}set dampingFactor(e){console.warn(".dampingFactor has been deprecated. use smoothTime (in seconds) instead.")}get draggingDampingFactor(){return console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead."),0}set draggingDampingFactor(e){console.warn(".draggingDampingFactor has been deprecated. use draggingSmoothTime (in seconds) instead.")}static createBoundingSphere(e,t=new jn.Sphere){const n=t,i=n.center;Ax.makeEmpty(),e.traverseVisible(s=>{s.isMesh&&Ax.expandByObject(s)}),Ax.getCenter(i);let a=0;return e.traverseVisible(s=>{if(!s.isMesh)return;const o=s,l=o.geometry.clone();l.applyMatrix4(o.matrixWorld);const f=l.attributes.position;for(let h=0,p=f.count;h<p;h++)yi.fromBufferAttribute(f,h),a=Math.max(a,i.distanceToSquared(yi))}),n.radius=Math.sqrt(a),n}};const HLe=oe.forwardRef((r,e)=>{oe.useMemo(()=>{oz.install({THREE:uI}),z6({CameraControlsImpl:oz})},[]);const{camera:t,domElement:n,makeDefault:i,onStart:a,onEnd:s,onChange:o,regress:l,...u}=r,f=fs(w=>w.camera),h=fs(w=>w.gl),p=fs(w=>w.invalidate),m=fs(w=>w.events),y=fs(w=>w.setEvents),E=fs(w=>w.set),b=fs(w=>w.get),v=fs(w=>w.performance),x=t||f,S=n||m.connected||h.domElement,_=oe.useMemo(()=>new oz(x),[x]);return Km((w,R)=>{_.enabled&&_.update(R)},-1),oe.useEffect(()=>(_.connect(S),()=>void _.disconnect()),[S,_]),oe.useEffect(()=>{const w=L=>{p(),l&&v.regress(),o&&o(L)},R=L=>{a&&a(L)},N=L=>{s&&s(L)};return _.addEventListener("update",w),_.addEventListener("controlstart",R),_.addEventListener("controlend",N),_.addEventListener("control",w),_.addEventListener("transitionstart",w),_.addEventListener("wake",w),()=>{_.removeEventListener("update",w),_.removeEventListener("controlstart",R),_.removeEventListener("controlend",N),_.removeEventListener("control",w),_.removeEventListener("transitionstart",w),_.removeEventListener("wake",w)}},[_,a,s,p,y,l,o]),oe.useEffect(()=>{if(i){const w=b().controls;return E({controls:_}),()=>E({controls:w})}},[i,_]),oe.createElement("primitive",Gd({ref:e,object:_},u))});function VLe(r,e){const t=oe.useRef(),[n]=oe.useState(()=>e?e instanceof Ei?{current:e}:e:t),[i]=oe.useState(()=>new yne(void 0)),a=oe.useRef({}),[s]=oe.useState(()=>{const o={};return r.forEach(l=>Object.defineProperty(o,l.name,{enumerable:!0,get(){if(n.current)return a.current[l.name]||(a.current[l.name]=i.clipAction(l,n.current))}})),{ref:n,clips:r,actions:o,names:r.map(l=>l.name),mixer:i}});return Km((o,l)=>i.update(l)),oe.useEffect(()=>{const o=n.current;return()=>{a.current={},Object.values(s.actions).forEach(l=>{o&&i.uncacheAction(l,o)})}},[r]),oe.useEffect(()=>()=>{i.stopAllAction()},[i]),s}function jLe(r,e){const t=r+"Geometry";return oe.forwardRef(({args:n,children:i,...a},s)=>{const o=oe.useRef(null);return oe.useImperativeHandle(s,()=>o.current),oe.useLayoutEffect(()=>void e?.(o.current)),oe.createElement("mesh",Gd({ref:o},a),oe.createElement(t,{attach:"geometry",args:n}),i)})}const lie=jLe("box"),_d=1e-5;function QLe(r,e,t){const n=new fy,i=t-_d;return n.absarc(_d,_d,_d,-Math.PI/2,-Math.PI,!0),n.absarc(_d,e-i*2,_d,Math.PI,Math.PI/2,!0),n.absarc(r-i*2,e-i*2,_d,Math.PI/2,0,!0),n.absarc(r-i*2,_d,_d,0,-Math.PI/2,!0),n}const bm=oe.forwardRef(function({args:[e=1,t=1,n=1]=[],radius:i=.05,steps:a=1,smoothness:s=4,creaseAngle:o=.4,children:l,...u},f){const h=oe.useMemo(()=>QLe(e,t,i),[e,t,i]),p=oe.useMemo(()=>({depth:n-i*2,bevelEnabled:!0,bevelSegments:s*2,steps:a,bevelSize:i-_d,bevelThickness:i,curveSegments:s}),[n,i,s]),m=oe.useRef();return oe.useLayoutEffect(()=>{m.current&&(m.current.center(),BPe(m.current,o))},[h,p]),oe.createElement("mesh",Gd({ref:f},u),oe.createElement("extrudeGeometry",{ref:m,args:[h,p]}),l)}),lz={sunset:"venice/venice_sunset_1k.hdr",dawn:"kiara/kiara_1_dawn_1k.hdr",night:"dikhololo/dikhololo_night_1k.hdr",warehouse:"empty-wharehouse/empty_warehouse_01_1k.hdr",forest:"forrest-slope/forest_slope_1k.hdr",apartment:"lebombo/lebombo_1k.hdr",studio:"studio-small-3/studio_small_03_1k.hdr",city:"potsdamer-platz/potsdamer_platz_1k.hdr",park:"rooitou/rooitou_park_1k.hdr",lobby:"st-fagans/st_fagans_interior_1k.hdr"},WLe="https://market-assets.fra1.cdn.digitaloceanspaces.com/market-assets/hdris/";function cie({files:r=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:e="",preset:t=void 0,encoding:n=void 0,extensions:i}={}){if(t){if(!(t in lz))throw new Error("Preset must be one of: "+Object.keys(lz).join(", "));r=lz[t],e=WLe}const a=Array.isArray(r),o=j6(a?ane:LLe,a?[r]:r,u=>{u.setPath(e),i&&i(u)}),l=a?o[0]:o;return l.mapping=a?jm:pT,l.encoding=n??a?cf:CI,l}const YLe=r=>r.current&&r.current.isScene,qLe=r=>YLe(r)?r.current:r;function $6(r,e,t,n,i=0){const a=qLe(e||t),s=a.background,o=a.environment,l=a.backgroundBlurriness||0;return r!=="only"&&(a.environment=n),r&&(a.background=n),r&&a.backgroundBlurriness!==void 0&&(a.backgroundBlurriness=i),()=>{r!=="only"&&(a.environment=o),r&&(a.background=s),r&&a.backgroundBlurriness!==void 0&&(a.backgroundBlurriness=l)}}function K6({scene:r,background:e=!1,blur:t,map:n}){const i=fs(a=>a.scene);return oe.useLayoutEffect(()=>{if(n)return $6(e,r,i,n,t)},[i,r,n,e,t]),null}function uie({background:r=!1,scene:e,blur:t,...n}){const i=cie(n),a=fs(s=>s.scene);return oe.useLayoutEffect(()=>$6(r,e,a,i,t),[i,r,e,a,t]),null}function XLe({children:r,near:e=1,far:t=1e3,resolution:n=256,frames:i=1,map:a,background:s=!1,blur:o,scene:l,files:u,path:f,preset:h=void 0,extensions:p}){const m=fs(S=>S.gl),y=fs(S=>S.scene),E=oe.useRef(null),[b]=oe.useState(()=>new yT),v=oe.useMemo(()=>{const S=new l6(n);return S.texture.type=nf,S},[n]);oe.useLayoutEffect(()=>(i===1&&E.current.update(m,b),$6(s,l,y,v.texture,o)),[r,b,v.texture,l,y,s,i,m]);let x=1;return Km(()=>{(i===1/0||x<i)&&(E.current.update(m,b),x++)}),oe.createElement(oe.Fragment,null,cPe(oe.createElement(oe.Fragment,null,r,oe.createElement("cubeCamera",{ref:E,args:[e,t,v]}),u||h?oe.createElement(uie,{background:!0,files:u,preset:h,path:f,extensions:p}):a?oe.createElement(K6,{background:!0,map:a,extensions:p}):null),b))}function $Le(r){var e,t,n,i;const a=cie(r),s=r.map||a;oe.useMemo(()=>z6({GroundProjectedEnvImpl:JPe}),[]);const o=oe.useMemo(()=>[s],[s]),l=(e=r.ground)==null?void 0:e.height,u=(t=r.ground)==null?void 0:t.radius,f=(n=(i=r.ground)==null?void 0:i.scale)!==null&&n!==void 0?n:1e3;return oe.createElement(oe.Fragment,null,oe.createElement(K6,Gd({},r,{map:s})),oe.createElement("groundProjectedEnvImpl",{args:o,scale:f,height:l,radius:u}))}function KLe(r){return r.ground?oe.createElement($Le,r):r.map?oe.createElement(K6,r):r.children?oe.createElement(XLe,r):oe.createElement(uie,r)}const ZLe=oe.forwardRef(({scale:r=10,frames:e=1/0,opacity:t=1,width:n=1,height:i=1,blur:a=1,far:s=10,resolution:o=512,smooth:l=!0,color:u="#000000",depthWrite:f=!1,renderOrder:h,...p},m)=>{const y=oe.useRef(null),E=fs(U=>U.scene),b=fs(U=>U.gl),v=oe.useRef(null);n=n*(Array.isArray(r)?r[0]:r||1),i=i*(Array.isArray(r)?r[1]:r||1);const[x,S,_,w,R,N,L]=oe.useMemo(()=>{const U=new uu(o,o),G=new uu(o,o);G.texture.generateMipmaps=U.texture.generateMipmaps=!1;const j=new QT(n,i).rotateX(Math.PI/2),Q=new Ka(j),H=new TU;H.depthTest=H.depthWrite=!1,H.onBeforeCompile=W=>{W.uniforms={...W.uniforms,ucolor:{value:new Yt(u)}},W.fragmentShader=W.fragmentShader.replace("void main() {",`uniform vec3 ucolor;
|
|
9195
9195
|
void main() {
|
|
9196
|
-
`),W.fragmentShader=W.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const K=new hu(OLe),J=new hu(PLe);return J.depthTest=K.depthTest=!1,[U,j,H,Q,K,J,G]},[o,n,i,r,u]),I=U=>{w.visible=!0,w.material=R,R.uniforms.tDiffuse.value=x.texture,R.uniforms.h.value=U*1/256,b.setRenderTarget(L),b.render(w,v.current),w.material=N,N.uniforms.tDiffuse.value=L.texture,N.uniforms.v.value=U*1/256,b.setRenderTarget(x),b.render(w,v.current),w.visible=!1};let D=0,k,F;return Km(()=>{v.current&&(e===1/0||D<e)&&(D++,k=E.background,F=E.overrideMaterial,y.current.visible=!1,E.background=null,E.overrideMaterial=_,b.setRenderTarget(x),b.render(E,v.current),I(a),l&&I(a*.4),b.setRenderTarget(null),y.current.visible=!0,E.overrideMaterial=F,E.background=k)}),oe.useImperativeHandle(m,()=>y.current,[]),oe.createElement("group",Gd({"rotation-x":Math.PI/2},p,{ref:y}),oe.createElement("mesh",{renderOrder:h,geometry:S,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},oe.createElement("meshBasicMaterial",{transparent:!0,map:x.texture,"map-encoding":b.outputEncoding,opacity:t,depthWrite:f})),oe.createElement("orthographicCamera",{ref:v,args:[-n/2,n/2,i/2,-i/2,0,s]}))}),JLe={}.VITE_APP_ENV,eUe=!1;let tUe=!1,xT;const zt=new bJ("CORE");JLe==="staging"?(zt.setCurrentMode(jR.Staging),xT="https://storage.googleapis.com/epigraph-configurator"):(zt.setCurrentMode(jR.Release),xT="https://storage.googleapis.com/epigraph-configurator");zt.info({title:"test"});const M$=99999,nUe=99999;let nt=null;function iUe(r){nt=r,nt.disableAnalyticsEvents=tUe}const hie=`${xT}/projects-asset-data`,rUe=`${hie}/generic`;let aUe="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe?moduleID=",MH="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe/saveConfig",RH="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe?configID=",Om="https://storage.googleapis.com/gsc-epigraph-design/product-assets";function sUe(r){const e=r.SAVE_CONFIG_ENDPOINT;MH=e||MH;const t=r.FETCH_CONFIG_ENDPOINT;RH=t||RH;const n=r.PUBLIC_DESIGN_ASSETS_ENDPOINT;Om=n||Om;const i=r.ASSETS_SOURCE_ROOT;xT=i||xT}const kl=Object.freeze({info:{id:"info",level:1e3,src:Om+"/Icon/Info.svg",color:"#2E6CDF",cssClass:"alert-info",background:"#D3E0F8",filter:"invert(39%) sepia(41%) saturate(5002%) hue-rotate(208deg) brightness(91%) contrast(92%)"},warn:{id:"warn",level:3e3,src:Om+"/Icon/Warning.svg",color:"#E2B236",cssClass:"alert-warn",background:"#F9EED2",filter:"invert(83%) sepia(67%) saturate(1578%) hue-rotate(328deg) brightness(93%) contrast(90%)"},error:{id:"error",level:4e3,src:Om+"/Icon/Block.svg",color:"#D0342C",cssClass:"alert-error",background:"#F6D7D5",filter:"invert(24%) sepia(96%) saturate(1914%) hue-rotate(349deg) brightness(95%) contrast(81%)"},success:{id:"success",level:2e3,src:Om+"/Icon/CheckCircle.svg",color:"#65BC6C",cssClass:"alert-success",background:"#DBF0DD",filter:"invert(74%) sepia(3%) saturate(5600%) hue-rotate(75deg) brightness(90%) contrast(90%)"}}),Js=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),eo={GRAB:"grab",POINTER:"pointer",BLOCKED:"blocked",GRABBING:"grabbing",MOVE:"move"},oUe=r=>{const e=[],t=new Set;for(const n of r){let i=n,a=0;for(;t.has(i);)i=n+"."+ ++a;t.add(i),e.push(i)}return e},lUe=(r,e)=>{const t={};for(const n of r.mappings)for(const i of n.variants)t[e[i]]={material:null,gltfMaterialIndex:n.material};return t},SP=r=>r.material!==void 0&&r.userData&&r.userData.variantMaterials,fie=(r,e,t)=>{t(r,e);for(let n=0;n<r.children.length;n++)fie(r.children[n],e.children[n],t)},R$=(r,e)=>{e.userData.variantMaterials!==void 0&&(r.userData.variantMaterials=Object.assign({},e.userData.variantMaterials)),e.userData.originalMaterial!==void 0&&(r.userData.originalMaterial=e.userData.originalMaterial)};class cUe{constructor(e){this.parser=e,this.name="KHR_materials_variants"}afterRoot(e){const t=this.parser,n=t.json;if(!n.extensions||!n.extensions[this.name])return null;const a=n.extensions[this.name].variants||[],s=oUe(a.map(u=>u.name));for(const u of e.scenes)u.traverse(f=>{const h=t.associations.get(f);if(!h||h.meshes===void 0||h.primitives===void 0)return;const y=n.meshes[h.meshes].primitives[h.primitives].extensions;!y||!y[this.name]||(f.userData.variantMaterials=lUe(y[this.name],s))});e.userData.variants=s,e.functions=e.functions||{};const o=async(u,f,h)=>{u.userData.originalMaterial||(u.userData.originalMaterial=u.material);const p=u.material;let m=null;if(f===null||!u.userData.variantMaterials[f])u.material=u.userData.originalMaterial,t.associations.has(u.material)&&(m=t.associations.get(u.material).index);else{const y=u.userData.variantMaterials[f];y.material?(u.material=y.material,y.gltfMaterialIndex!==void 0&&(m=y.gltfMaterialIndex)):(m=y.gltfMaterialIndex,u.material=await t.getDependency("material",m),t.assignFinalMaterial(u),y.material=u.material)}h!==null&&h(u,p,m)},l=u=>{const f=u.material,h=u.userData.variantMaterials,p=[];for(const m in h){const y=h[m];if(y.material)continue;const E=y.gltfMaterialIndex;p.push(t.getDependency("material",E).then(b=>{u.material=b,t.assignFinalMaterial(u),h[m].material=u.material}))}return Promise.all(p).then(()=>{u.material=f})};e.functions.selectVariant=(u,f,h=!0,p=null)=>{const m=[];return h?u.traverse(y=>SP(y)&&m.push(o(y,f,p))):SP(u)&&m.push(o(u,f,p)),Promise.all(m)},e.functions.ensureLoadVariants=(u,f=!0)=>{const h=[];return f?u.traverse(p=>SP(p)&&h.push(l(p))):SP(u)&&h.push(l(u)),Promise.all(h)},e.functions.copyVariantMaterials=(u,f,h=!0)=>{h?fie(u,f,(p,m)=>R$(p,m)):R$(u,f)}}}var Z6=new ULe;Z6.setDecoderPath(`${xT}/external-libs/draco/`);Z6.setDecoderConfig({type:"js"});const Mo=Do((r,e)=>({assets:{items:{}},actions:{async loadAsset(t,n=!1){const{assets:i}=e();let a,s;if(i.items[t]){const h=n?i.items[t].proxy:i.items[t];if(h.isLoaded)return i.items[t];if(h.errorLoading)throw Error((n?"Proxy ":"Model ")+"Loading failed for: "+t,t)}else i.items[t]={isLoaded:!1,errorLoading:!1,proxy:{isLoaded:!1,errorLoading:!1}};const o=Ln.getState().productData[t];if(!o)throw Error("Data doesn't exists for "+t,t);if(n?(a=i.items[t].proxy,s=nt.getResolvedAssetUrl(o.colliderProxyGLTF)):(a=i.items[t],s=nt.getResolvedAssetUrl(o.gltfURL)),!a||!s)return null;const l=new eLe;l.register(h=>new cUe(h)),l.setDRACOLoader(Z6);async function u(h){const p=h.loaded/h.total*100;a.progress=p}const f=await l.loadAsync(s,u).catch(h=>{throw a.isLoaded=!1,a.errorLoading=!0,a.error=h,zt.info(s),Error("Couldn't load "+t,t)});return a.data=f,a.isLoaded=!0,i.items[t]},IsAssetLoaded(t){const{assets:n}=e();return n.items.hasOwnProperty(t)?n.items[t].isLoaded:!1},IsProxyLoaded(t){const{assets:n}=e();return n.items.hasOwnProperty(t)&&n.items[t].hasOwnProperty(proxy)?n.items[t].proxy.isLoaded:!1}}}));var Vv=null,jv=[];const mr=Do((r,e)=>({ghostData:null,ghostsTransform:[],ghostVisibility:!0,ghostParentRef:null,ghostMaterial:null,actions:{spawnGhostsForSkuID:async(t,n=!1,i)=>{const{ghostData:a,ghostsTransform:s}=e();if(a!==null||s.length>0){zt.info("ghosts are already spawned for: "+a.skuID);return}return await new Promise(async(l,u)=>{let f={};const h=()=>{l(f)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Ghost_Loaded,h,{once:!0});const p=Ln.getState().productData,m=ln.getState().attachmentSystem.currentStructure;if(Vv=m.getFirstNodeByCategoryID(p[t].categoryID),p[t].replace&&Vv){if(t==Vv.skuID)return;const{transforms:E,connectablePlugs:b}=m.findGhostTransformForReplacement(t,Vv);if(E==null&&b==null){zt.error({title:"Couldn't Find Ghost transforms and connectablePlugs for "+t});return}f.transforms=E,f.newNodes=[Vv],f.connectablePlugs=b,f.addItemOrSwap=["replace"],Vv.setModelVisibility(!1)}else{const{transforms:E,newNodes:b,connectablePlugs:v}=m.findGhostTransforms(t,n);let x=E,S=v,_=b,w=[];for(let R=0;R<E.length;R++)w.push("add");if(p[t].swappable&&!Je.getState().dragging){jv=m.getNodesByCategoryID(p[t].categoryID);for(let R=0;R<jv.length;R++){const N=m.findGhostTransformForReplacement(t,jv[R]);N.transforms&&(x.push(N.transforms[0]),S.push(N.connectablePlugs[0]),_.push(jv[R]),w.push("replace"),jv[R].setModelVisibility(!1))}}f.transforms=x,f.newNodes=_,f.connectablePlugs=S,f.addItemOrSwap=w}if(f.transforms.length<=0)return;const y=await Mo.getState().actions.loadAsset(t,!0);r({ghostsTransform:f.transforms,ghostData:{proxyScene:y.proxy.data.scene,skuID:t,newNodes:f.newNodes,addItemOrSwap:f.addItemOrSwap,connectablePlugs:f.connectablePlugs,count:i||f.transforms.length}})})},clearAllGhosts:()=>{if(Vv&&Vv.setModelVisibility(!0),jv)for(let t=0;t<jv.length;t++)jv[t].setModelVisibility(!0);r({ghostVisibility:!0,ghostData:null,ghostsTransform:[]})}}})),wr=Do((r,e)=>({manualControl:!1,sourcePos:null,destPos:new ve(0,0,0),interpolationFactor:0,duration:0,focusPointPosition:new ve(0,0,0),canCameraRotate:!0,sendCameraDetailsTrigger:!1,viewPointPosition:new ve(0,0,0),boundsMargin:0,userDragging:!1,disableAutoRotate:!1,cameraSettings:{truckSpeed:1,fov:35,dollySpeed:1,initialViewPointPosition:new ve(20,15,50),canZoom:!1,canPan:!1,minZoom:1,maxZoom:3,canAutoRotate:!1,autoRotateSpeed:.5,minPolarAngle:0,maxPolarAngle:180,clearColour:"white",zoomingMultiplier:0},actions:{triggerFetchingCamera:()=>{r(t=>({sendCameraDetailsTrigger:!t.sendCameraDetailsTrigger}))},setCameraSettings:t=>{const{cameraSettings:n}=e();Je.getState().isMobile===!0&&t.zoomingMultiplier_mobile!==void 0?t.zoomingMultiplier=t.zoomingMultiplier_mobile:t.zoomingMultiplier_desktop!==void 0&&(t.zoomingMultiplier=t.zoomingMultiplier_desktop),Object.keys(t).map(a=>n[a]=t[a]),r({cameraSettings:{...n},viewPointPosition:IH(n.initialViewPointPosition)})}}})),ui=Do((r,e)=>({activeHotspotData:null,lastActiveHotspotData:null,isAnyHotspotActive:!1,hotspotsVisibility:!1,hotspotsTempVisibility:!0,hotspotsHealthCheck:!0,hotspotsSpawned:{},visitedHotspotsID:[],hotspotSpawnedForCategoryIDs:[],actions:{clearAllHotspots:()=>r({isAnyHotspotActive:!1,activeHotspotData:null,lastActiveHotspotData:null,hotspotsSpawned:{}}),removeHotspotForItem(t){const{hotspotsSpawned:n}=e();Object.keys(n).map(i=>{n[i].itemData.guid==t.itemData.guid&&delete n[i]}),r({hotspotsSpawned:{...n}})},checkHotspotHealth(){const{hotspotsHealthCheck:t}=e();r({hotspotsHealthCheck:!t})},toggleHotspotVisibility(){const{hotspotsVisibility:t}=e();r({hotspotsVisibility:!t})},switchHotspotsVisibility(t,n=!1){r(n===!0?{hotspotsTempVisibility:t}:{hotspotsVisibility:t})},clickHotspot(t,n,i,a=!1){const{activeHotspotData:s}=e();r({lastActiveHotspotData:s}),hUe(t,n,i);let l=Wt.getState().itemsSpawned[i].itemData.skuID;a===!1&&(nt.fireEvent(nt.EVENTS.SCENE.Hotspot_Enter,{hotspotAbsID:pUe(l,t)}),nt.fireEvent(nt.EVENTS.UI.UtilityMenu_Hide))},exitHotspot(t=!1){const{activeHotspotData:n}=e();n&&(r({lastActiveHotspotData:n}),uUe(),t===!1&&(nt.fireEvent(nt.EVENTS.SCENE.Hotspot_Exit,n),nt.fireEvent(nt.EVENTS.UI.UtilityMenu_Show)))}}}));function uUe(){ui.setState({activeHotspotData:null}),ui.setState({isAnyHotspotActive:!1}),Je.getState().actions.triggerAutoFocus()}function hUe(r,e,t){let n=ui.getState();const a=Wt.getState().itemsSpawned;let s=n.visitedHotspotsID;const o=a[t].hotspotsData.filter(w=>w.hotspotID==r);if(!o||o.length<=0)return;const l=o[0],u=a[t].itemData.skuID+"_"+r;let h=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t),p=new ve(0,0,0);h&&h.ref&&h.ref.getWorldPosition(p);let m=new Xi().identity();h&&h.ref&&h.ref.getWorldQuaternion(m);let y=l.focusPointTransform;zt.info(y);let E=IH(y);E.applyQuaternion(m);let b=l.viewPointTransform,v=IH(b);v.applyQuaternion(m);let x=N$(Fx(E),Fx(p)),S=N$(Fx(v),Fx(p));wr.setState({sourcePos:null,manualControl:!1,focusPointPosition:x,destPos:S,viewPointPosition:S,duration:1e3}),ui.setState({activeHotspotData:{hotspotData:{guid:e,...l},itemData:{...a[t],guid:t},domID:"rd_"+u},isAnyHotspotActive:!0}),s.includes(u)||(s.push(u),ui.setState({visitedIDs:{...s}}))}const Wt=Do((r,e)=>({variantChangeAlert:!1,removeItems:[],removeItemTrigger:!1,itemsSpawned:{},itemsCount:0,modelLoadedAlert:0,lastDeletedItemData:null,lastDeletedItemsData:[],hoveredItemRef:{},collidersRef:[],filteredCollidersRef:[],selectedItemData:null,busy:!1,actions:{triggerModelLoaded:()=>r(t=>({modelLoadedAlert:t.modelLoadedAlert+1})),triggerRemoveItem:()=>r(t=>({removeItemTrigger:!t.removeItemTrigger})),addToRemoveItems:t=>{const{removeItems:n}=e();n.push(t)},switchToVariant:async(t,n,i=!1)=>{const{itemsSpawned:a,variantChangeAlert:s}=e(),o=Ln.getState().categoryData,l=a[t.guid].itemData.clonedScene;var f=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t.guid);Mo.getState().assets.items[t.skuID].data||o.geometryVariants&&o.geometryVariants.map(m=>{m.productsInCategory.map(y=>{let E=!1;y.products.map(b=>{b==t.skuID&&(E=!0)}),E&&y.products.map(b=>{const v=Mo.getState().assets.items[b].data;v&&(Mo.getState().assets.items[t.skuID].data=v)})})});const p=Mo.getState().assets.items[t.skuID].data;p&&(await p.functions.selectVariant(l,n),i?(f.overrideVariant=n,nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!0)):f.currentVariant=n,r({variantChangeAlert:!s}))},clearAllItems:()=>{r({itemsSpawned:{},itemsCount:0,lastDeletedItemsData:[],hoveredItemRef:[],collidersRef:[],filteredCollidersRef:[],selectedItemData:null})},setItemsSpawned:t=>{r({itemsSpawned:t,itemsCount:Object.keys(t).length})},setHoveredItemRef:t=>r({hoveredItemRef:t}),setCollidersRef:t=>{r({collidersRef:t});let n=[];for(var i=0;i<t.length;i++)t[i].current&&n.push(t[i]);Wt.setState({filteredCollidersRef:[...n]})},setSelectedItemData:t=>{const{selectedItemData:n,hoveredItemRef:i,actions:a}=e();n&&(delete i[n.itemData.guid],a.setHoveredItemRef({...i})),r({selectedItemData:{...t}}),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.switchHotspotsVisibility(!1,!0),wr.setState({canCameraRotate:!1})},deselectItem:()=>{const{selectedItemData:t}=e();t&&nt.fireEvent(nt.EVENTS.UI.ContextMenu_Hide,t),r(()=>({selectedItemData:null})),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.switchHotspotsVisibility(!0,!0),wr.setState({canCameraRotate:!0}),Wt.getState().actions.setHoveredItemRef({})},removeItemByGUID:async t=>{const{itemsSpawned:n,actions:i}=e();if(n.hasOwnProperty(t))return new Promise(async(a,s)=>{i.addToRemoveItems(t),i.triggerRemoveItem();const o=l=>{t===l.data.itemData.guid&&a(t)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Item_Removed,o,{once:!0})})},addItemBySkuID:async(t,n=0,i=!1,a)=>{r({busy:!0});const{actions:s,itemsSpawned:o}=e(),l=Ln.getState().productData,u=Ln.getState().hotspotsData,f=ln.getState().attachmentSystem;let h=!0;const p=await new Promise(async(E,b)=>{if(s.deselectItem(),!l[t]){zt.warn({title:`Product not found: ${t}`}),nt.alert({alertMsg:t+": product not found!",alertTime:5e3,alertType:"warn",alertLabel:"Not Found"}),h=!1,b(t+": product not found!");return}const v=[...mr.getState().ghostsTransform],x={...mr.getState().ghostData};if(mr.getState().actions.clearAllGhosts(),v.length<=0){nt.alert({alertMsg:"Unable to add item to configuration",alertTime:6e3,alertType:"warn",alertLabel:"Action Unavailable"}),h=!1,b("No available connections for this product to attach to");return}const S=_=>{t===_.data&&E(x.newNodes[n].guid)};if(nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,S,{once:!0}),x.addItemOrSwap[n]=="replace")await fUe(o,x.skuID,v[n],x.newNodes[n]);else{const _=x.newNodes[n];_.isDependent=i;let w=!0;if(l[x.skuID].hasOwnProperty("disableInteraction")){const I=l[x.skuID].disableInteraction;(I==!0||I==!1)&&(w=!I)}(a==!0||a==!1)&&(w=a),_.isInteractive=w;const{position:R,rotation:N}=v[n];_.transform={position:R,rotation:N},f.currentStructure.addNode(_),f.currentStructure.connectPlugs(x.connectablePlugs[n]);const L=await Mo.getState().actions.loadAsset(x.skuID,!0);zt.info("GHOST NEW NODE: ",_),o[_.guid]={itemData:{proxyScene:L.proxy.data.scene,guid:x.newNodes[n].guid,...l[x.skuID],position:R,rotation:N,hasItemLoaded:!1,isDependent:i,isInteractive:w},hotspotsData:u[x.skuID],hotspotSpawned:!1},await vc(1),s.setItemsSpawned({...o})}}).catch(E=>{zt.error({title:E}),h=!1});if(h===!1)return r({busy:!1}),p;const m=f.getCartItems();m&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,m);const y=l[t]?.plugs;if(y){for(const E of y){const b=E?.dependencySku;if(!b)continue;zt.info(`Found a dependency: ${b} on the plug: ${E.name}`);let v=!0;l[b]&&l[b].hasOwnProperty("ignoreSpawningCollisionAsDependency")&&(v=l[b].ignoreSpawningCollisionAsDependency),E.hasOwnProperty("ignoreSpawningCollision")&&(v=E.ignoreSpawningCollision);let x=Je.getState().sceneSettings.ignoreSpawningCollision;l[b].hasOwnProperty("ignoreSpawningCollision")&&(x=l[b].ignoreSpawningCollision),l[b].ignoreSpawningCollision=v;const S=await mr.getState().actions.spawnGhostsForSkuID(b,v);if(l[b].ignoreSpawningCollision=x,!S)continue;const _=f.currentStructure.getNodeByGUID(p),w=_.getPlugByName(E.name)?.guid,R=E?.isDependencySkuInteractive?E.isDependencySkuInteractive===1:!1,N=S.connectablePlugs;let L=!1;for(let I=0;I<S.connectablePlugs.length;I++){if(N[I].receiverPlug.guid!==w)continue;L=!0;const D=await s.addItemBySkuID(b,I,!0,R);D!==null&&_.addMyDependenciesGUID(D)}L||mr.getState().actions.clearAllGhosts()}mr.getState().actions.clearAllGhosts()}return r({busy:!1}),p},async addItemWithTransform(t,n,i,a=!0){return new Promise(async(s,o)=>{const{actions:l,itemsSpawned:u}=e();l.deselectItem();const f=Ln.getState().productData,h=Ln.getState().hotspotsData;if(!f[n]){nt.alert({alertMsg:n+": product not found!",alertTime:5e3,alertType:"warn",alertLabel:"Not Found"});return}const{position:p,rotation:m}=t;u[i]!=null&&(ui.getState().actions.removeHotspotForItem({...u[i]}),delete u[i]);const y=b=>{n==b.data&&s(i)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,y,{once:!0});const E=await Mo.getState().actions.loadAsset(n,!0);E!=null&&(await vc(1),u[i]={itemData:{proxyScene:E.proxy.data.scene,guid:i,...f[n],position:p,rotation:m,hasItemLoaded:!1,isInteractive:a},hotspotsData:h[n],hotspotSpawned:!1},r({itemsSpawned:{...u}}))})},async replaceGUIDItemBySKUID(t,n){const{itemsSpawned:i}=e(),a=Ln.getState().productData,s=Ln.getState().hotspotsData,o=ln.getState().attachmentSystem.currentStructure,l=o.getNodeByGUID(t);return l.isReplaceableWithSkuId(n)?(await new Promise(async(f,h)=>{ui.getState().actions.removeHotspotForItem({...i[t]}),delete i[t],l.update(n);const p=y=>{n===y.data&&f(!0)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,p,{once:!0});const m=await Mo.getState().actions.loadAsset(n,!0);await vc(1),i[t]={itemData:{proxyScene:m.proxy.data.scene,guid:t,...a[n],position:l.transform.position,rotation:l.transform.rotation,hasItemLoaded:!1},hotspotsData:s[n],hotspotSpawned:!1},Wt.setState({itemsSpawned:{...i}})}),o.recalculateStructureFromNode(l.whichNodeAreWeAttachedTo()),ln.getState().actions.toggleStructureUpdated(),!0):!1}}}));async function fUe(r,e,t,n){const{position:i,rotation:a}=t,s=Ln.getState().productData,o=Ln.getState().hotspotsData,l=ln.getState().attachmentSystem.currentStructure;return new Promise(async(u,f)=>{const h=async()=>{const p=await Mo.getState().actions.loadAsset(e,!0);r[n.guid]={itemData:{proxyScene:p.proxy.data.scene,guid:n.guid,...s[e],position:i,rotation:a,hasItemLoaded:!1},hotspotsData:o[e],hotspotSpawned:!1},zt.warn({title:"SWITCHING VARIANT: ",details:n.currentVariant}),n.currentVariant=n.currentVariant,n.transform=t,Wt.setState({itemsSpawned:{...r}}),l.recalculateStructureFromNode(n),ln.getState().actions.toggleStructureUpdated(),u(n.guid)};ui.getState().actions.removeHotspotForItem({...r[n.guid]}),delete r[n.guid],n.update(e),nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Removed,h,{once:!0})})}const zd=Do((r,e)=>({inventoryData:{},actions:{getInventoryInfo:()=>{const{inventoryData:t}=e();return t},updateInventoryForAllProducts:t=>{const{actions:n}=e();Object.keys(t).map(i=>{let a=t[i];Object.keys(a).map(s=>{n.updateInventoryForProduct(i,s,a[s].inventory)})}),n.refreshInventory(Wt.getState().itemsSpawned)},updateInventoryForProduct:(t,n,i)=>{const{inventoryData:a}=e();let s=a[t],o=s[n];!s||!o||(o.inventory=i)},_clearInScene:()=>{const{inventoryData:t}=e();Object.keys(t).map(n=>{const i=t[n];Object.keys(i).map(a=>{i[a].inScene=[]})})},refreshInventory:t=>{if(!t)return;zt.info({title:"Refreshing Inventory"});const{actions:n,inventoryData:i}=e();n._clearInScene();const a=ln.getState().attachmentSystem;if(a===null)return;const s=a.currentStructure;if(s===null)return;Object.keys(t).map(f=>{const h=s.getNodeByGUID(f);if(!h)return;const p=h.overrideVariant?h.overrideVariant:h.currentVariant;if(!p)return;const m=i[h.skuID];if(!m||!m[p].inScene)return;m[p].inScene.push(f),Je.getState().sceneSettings.disableCart===!0?h.inStock={variantName:p,newValue:!0}:m[p].inScene.length>m[p].inventory?h.inStock={variantName:p,newValue:!1}:h.inStock={variantName:p,newValue:!0}});let o=!1;Object.keys(i).map(f=>{const h=i[f];Object.keys(h).map(p=>{h[p].countAvailable=h[p].inventory-h[p].inScene.length,h[p].countAvailable<0?(h[p].countUnavailable=h[p].countAvailable*-1,h[p].countAvailable=0,o=!0):h[p].countUnavailable=0})});const l={alertMsg:"Some items selected are out of stock",alertTime:3e3,alertType:"warn",alertLabel:"Stock Alert",alertId:"outOfStock"},u=mUe(Je.getState().persistantAlertData,l);o===!1&&u===!0&&nt.removePersistantAlert(),nt.fireEvent(nt.EVENTS.SCENE.Inventory_Updated,i)}}})),Je=Do((r,e)=>({hoveredGhostIndex:-1,itemDraggedSkuID:null,builderMode:!1,dragging:!1,bbox:null,draggingItemGUID:null,sceneRef:null,cssLoaded:!0,configurationLoaded:!0,preconfigurationLoaded:!1,cursorParentRef:null,glContext:null,canvasTooltipText:"",canvasSize:{width:600,height:600},boundData:null,showDimensions:!1,autoFocusTrigger:0,cameraActive:!1,autoFocusRef:null,alertData:{},persistantAlertData:null,alertQueue:[],alertSettings:null,draggingOnDropCollisionData:null,multipleTouchDetected:!1,isMobile:!1,isTouchDevice:!1,isTablet:!1,isDesktop:!0,isLandscape:!1,sceneSettings:{swappableRoot:!0,preserveDrawingBuffer:!1,showSaveBtn:!0,showShareBtn:!0,showResetBtn:!0,showDimensionBtn:!0,showViewInYourSpaceBtn:!0,showDependencyOnHover:!1,showContextMenu:!0,showHotspotsBtn:!0,sceneScaleUnit:"ft",currency:"$",disableDragDrop:!1,ignoreSpawningCollision:!1,disableCollider:!1,disableContextMenu:!1,ghostColor:{r:250,g:50,b:0,a:.75},ghostAsWireframe:!1,draggableUI:!1,outOfStock_EmissiveColor:{r:250,g:50,b:0},outOfStock_EmissiveIntensity:.002,defaultConfigurationID:null,emptySceneText:"Empty Scene",addToCartCTAText:"Add To Cart",ignoreCollisionPostDragging:!1,disableCart:!1,dimensionColor:{r:0,g:0,b:0},disableLocalColorOverride:!1,textSettings:{cartQuantityText:"Qty",reviewButtonText:"Review",cartHeadingText:"Review Products",buildTabHeadingText:"Build",colorTabHeadingText:"Color",featuresTabHeadingText:"Features",tooltipEmptySceneText:"-Add items to the scene-",tooltipInstructionText:"-Drag to rotate the camera-"},variantsTabOrder:{color:{enabled:!0,priority:1},geometryVariants:{enabled:!0,priority:2}},boundingBoxLeeway:.9,contactShadowVisibility:!0,measurementPrecision:2,disableAlerts:!1,focusCameraOnGhosts:!0,alertLevel:0,alertControl:{itemAdded:!0,geometryVariantChanged:!0,overridesRemoved:!0,materialVariantChanged:!0,itemRemoved:!0,itemRepositioned:!0,configurationSaved:!0,linkCopied:!0,outOfStock:!0}},actions:{popFromAlertQueue:()=>{const{alertQueue:t}=e();return t.shift(),r({alertQueue:t}),t},addToAlertQueue:t=>{const{alertQueue:n}=e();return n.push(t),r({alertQueue:n}),n},getDeviceState:()=>{const{isDesktop:t,isMobile:n,isTablet:i,isTouchDevice:a,isLandscape:s}=e();return{isDesktop:t,isMobile:n,isTablet:i,isTouchDevice:a,isLandscape:s}},enableCart:()=>{const{sceneSettings:t}=e();t.disableCart=!1,zd.getState().actions.refreshInventory(Wt.getState().itemsSpawned),nt.fireEvent(nt.EVENTS.SCENE.Cart_StatusUpdated,{disableCart:!1})},disableCart:()=>{const{sceneSettings:t}=e();t.disableCart=!0,zd.getState().actions.refreshInventory(Wt.getState().itemsSpawned),nt.fireEvent(nt.EVENTS.SCENE.Cart_StatusUpdated,{disableCart:!0})},getSceneSettings:()=>{const{sceneSettings:t}=e();return t},sendAlert:t=>{r({alertData:{...t}})},switchCursor(t){const{cursorParentRef:n}=e();if(!n)return;let i="";switch(t){default:case eo.GRAB:i="grabCursor";break;case eo.GRABBING:i="grabbingCursor";break;case eo.BLOCKED:i="blockedCursor";break;case eo.POINTER:i="pointerCursor";break;case eo.MOVE:i="moveCursor";break}for(let a=0;a<n.classList.length;a++)n.classList[a].includes("Cursor")&&n.classList.remove(n.classList[a]);n.classList.add(i)},setAlertSettings:t=>{r({alertSettings:t})},async completeDropItem(){const t=ln.getState().attachmentSystem,{draggingOnDropCollisionData:n}=e(),{node:i,attachedChildrenGuids:a,collidingStatus:s,intersectingGhostObject:o,initPosition:l,initRotation:u,detachedPlugs:f,attachedNodesToCurrentNode:h}=n;nt.alert({alertMsg:"Item(s) have been removed",alertTime:7e3,alertType:"info",alertLabel:"Item(s) Removed",alertId:"itemRemoved"});for(const[E,b]of a.entries())s[E]===!0&&await Wt.getState().actions.removeItemByGUID(b);const p=o.userData;let m=i.getPlugByName(p.incomingPlugName),y=t.currentStructure.getPlugByGUID(p.receiverPlugGUID);i.ref.position.set(o.position.x,o.position.y,o.position.z),i.ref.setRotationFromEuler(o.rotation),i.transform={position:o.position,rotation:o.quaternion},t.currentStructure.connectPlugs({incomingPlug:m,receiverPlug:y}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),h.map(E=>{i.ref.parent.attach(E.ref)}),ln.getState().actions.updateFittingSkuIds()},revertDropItem(){const t=ln.getState().attachmentSystem,{draggingOnDropCollisionData:n}=e(),{node:i,attachedChildrenGuids:a,collidingStatus:s,intersectingGhostObject:o,initPosition:l,initRotation:u,detachedPlugs:f,attachedNodesToCurrentNode:h}=n;nt.alert({alertMsg:"Position of item"+i.skuID+"is being moved to it's original position",alertTime:4e3,alertType:"info",alertLabel:"Repositioning",alertId:"itemRepositioned"});const p=f.neighbourDetachedPlugs;p&&(f.neighbourNode.detachNodeFromReceiver(),t.currentStructure.connectPlugs({incomingPlug:p.incomingPlug,receiverPlug:p.receiverPlug}));let m=f.rootDetachedPlugs.incomingPlug,y=f.rootDetachedPlugs.receiverPlug;i.ref.position.set(l.x,l.y,l.z),i.ref.setRotationFromEuler(u);let E=new Xi().identity();i.ref.getWorldQuaternion(E),i.transform={position:l,rotation:E},t.currentStructure.connectPlugs({incomingPlug:m,receiverPlug:y}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),h.map(b=>{i.ref.parent.attach(b.ref)}),ln.getState().actions.updateFittingSkuIds()},setCoreSettings:t=>{const{sceneSettings:n,isMobile:i,isTouchDevice:a,isLandscape:s,actions:o}=e(),l=i===!0?"mobile":"desktop",u=["showSave","showShare","showReset","showDimension","showHotspots","showViewInYourSpace","showContextMenu","draggableUI","textSettings","variantsTabOrder"];for(const f of u)if(f==="draggableUI"){const p=`${f}_${s===!1&&a===!0?"mobile":"desktop"}`;t[p]!==void 0&&(n[f]=t[p])}else if(f==="textSettings"||f==="variantsTabOrder"){if(t.hasOwnProperty(f)){let h=n[f];Object.keys(h).map(p=>{let m=t[f];m.hasOwnProperty(p)||(m[p]=h[p])})}}else{const h=`${f}_${l}`;if(t[h]!==void 0){let p=`${f}Btn`;f=="showContextMenu"&&(p=`${f}`),n[p]=t[h]}}t.disableCart===!0&&o.disableCart(),Object.keys(t).map(f=>n[f]=t[f]),r({sceneSettings:{...n,ghostThreeColor:{r:n.ghostColor.r/255,g:n.ghostColor.g/255,b:n.ghostColor.b/255,a:n.ghostColor.a/255}}})},triggerAutoFocus:(t=null)=>r(n=>({autoFocusRef:t,autoFocusTrigger:n.autoFocusTrigger+1})),requestNewScreenshot:async()=>new Promise((t,n)=>{zt.info("Taking a screenshot");const{glContext:i}=e();if(i.preserveDrawingBuffer===!1)zt.warn({title:"Preserve Drawing Buffer must be enabled to take a screenshot. Please make sure to enable this within the project input data coreSettings"}),n({success:!1,imageData:null});else{zt.info("Downloading the screenshot");const a=i.domElement.toDataURL("image/png").replace("image/png","image/octet-stream");t({success:!0,imageData:a})}})}})),dUe="rd",I$="_";function pUe(r,e){return`${dUe}${I$}${r}${I$}${e}`}async function vc(r){return zt.info({title:`Waiting for ${r}ms`}),new Promise((e,t)=>{setTimeout(()=>{e(!0)},r)})}function mUe(r,e){if(r===null||e===null)return!1;for(let t in r)if(r.hasOwnProperty(t)&&e.hasOwnProperty(t)&&r[t]!==e[t])return!1;return Object.keys(r).length===Object.keys(e).length}const gUe=r=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)};return fetch(MH,e)},vUe=function(){let r=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r};function yUe(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}function AUe(){const r=navigator.userAgent.toLowerCase(),e=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(r);return e||yUe()}function bUe(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}async function die(r){let e={data:null,report:"",success:!1};try{const n=await(await fetch(r)).text();e.data=JSON.parse(n),e.success=!0,e.report="Successfully fetched JSON data."}catch(t){e.report=t,nt.alert({alertMsg:"",alertTime:5e3,alertType:"warn",alertLabel:"Preload Failed"})}return e}const N$=(r,e)=>new ve(r[0]+e[0],r[1]+e[1],r[2]+e[2]),Fx=r=>[r.x,r.y,r.z],IH=r=>new ve(r[0],r[1],r[2]),_Ue=(r,e=!0)=>{let t=[];const n=Je.getState().sceneSettings.outOfStock_EmissiveColor,i=Je.getState().sceneSettings.outOfStock_EmissiveIntensity;return r.traverse(a=>{a.isMesh&&(a.material.userData.cloned?a.material.userData.inStock!==e&&(e?(a.material.emissive.set(new Yt(255,255,255)),a.material.emissiveIntensity=0):(a.material.emissive.set(new Yt(n.r,n.g,n.b)),a.material.emissiveIntensity=i),a.material.userData.inStock=e):(a.material=a.material.clone(),a.material.userData.inStock=e,a.material.userData.cloned=!0,e?(a.material.emissive.set(new Yt(255,255,255)),a.material.emissiveIntensity=0):(a.material.emissive.set(new Yt(n.r,n.g,n.b)),a.material.emissiveIntensity=i)),t.push(a))}),t},D$=(r,e)=>{let t=0,n=[];for(let i=0;i<r.length;i++){const a=r[i];e(a)?r[t++]=a:n.push(r[i])}return r.length=t,n},QL=r=>r*Math.PI/180,EUe=r=>{if(!r)return;if(new RegExp("^(?:[a-z+]+:)?//","i").test(r))return r;let n=r;return n=n.replaceAll("<@all-projects@>",hie),n=n.replaceAll("<@generic-project@>",rUe),n};function cz(r){var e=r.toString(16);return e.length==1?"0"+e:e}function O$(r,e,t){return"#"+cz(r)+cz(e)+cz(t)}var WL={},P$={get exports(){return WL},set exports(r){WL=r}},L$=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(L$){var U$=new Uint8Array(16);P$.exports=function(){return L$(U$),U$}}else{var B$=new Array(16);P$.exports=function(){for(var e=0,t;e<16;e++)e&3||(t=Math.random()*4294967296),B$[e]=t>>>((e&3)<<3)&255;return B$}}var pie=[];for(var xP=0;xP<256;++xP)pie[xP]=(xP+256).toString(16).substr(1);function SUe(r,e){var t=e||0,n=pie;return[n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]]].join("")}var mie=SUe,xUe=WL,TUe=mie,k$,uz,hz=0,fz=0;function wUe(r,e,t){var n=e&&t||0,i=e||[];r=r||{};var a=r.node||k$,s=r.clockseq!==void 0?r.clockseq:uz;if(a==null||s==null){var o=xUe();a==null&&(a=k$=[o[0]|1,o[1],o[2],o[3],o[4],o[5]]),s==null&&(s=uz=(o[6]<<8|o[7])&16383)}var l=r.msecs!==void 0?r.msecs:new Date().getTime(),u=r.nsecs!==void 0?r.nsecs:fz+1,f=l-hz+(u-fz)/1e4;if(f<0&&r.clockseq===void 0&&(s=s+1&16383),(f<0||l>hz)&&r.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");hz=l,fz=u,uz=s,l+=122192928e5;var h=((l&268435455)*1e4+u)%4294967296;i[n++]=h>>>24&255,i[n++]=h>>>16&255,i[n++]=h>>>8&255,i[n++]=h&255;var p=l/4294967296*1e4&268435455;i[n++]=p>>>8&255,i[n++]=p&255,i[n++]=p>>>24&15|16,i[n++]=p>>>16&255,i[n++]=s>>>8|128,i[n++]=s&255;for(var m=0;m<6;++m)i[n+m]=a[m];return e||TUe(i)}var CUe=wUe,MUe=WL,RUe=mie;function IUe(r,e,t){var n=e&&t||0;typeof r=="string"&&(e=r==="binary"?new Array(16):null,r=null),r=r||{};var i=r.random||(r.rng||MUe)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e)for(var a=0;a<16;++a)e[n+a]=i[a];return e||RUe(i)}var NUe=IUe,DUe=CUe,gie=NUe,J6=gie;J6.v1=DUe;J6.v4=gie;var vie=J6;class NH{constructor(e,t,n=null){this._attachedPlug=null,this._name=e.name,this._acceptedPlugTypes=e.acceptedPlugTypes,this._type=e.type,this._affectedNodes=e.affectedNodes,this._weight=e.weight,this._connectsToPlugTypes=e.connectsToPlugTypes,this._node=t,this._guid=vie.v4(),this._isOpen=!0,this._isReceiverPlug=!1,this._attachedPlugGUID=null,n&&(this._guid=n.guid,this._isOpen=n.isOpen,this._isReceiverPlug=n.isReceiverPlug,this._attachedPlugGUID=n.attachedPlugGUID)}export(){return this.isOpen?null:{guid:this._guid,isOpen:this._isOpen,attachedPlugGUID:this._attachedPlugGUID,isReceiverPlug:this._isReceiverPlug}}get node(){return this._node}get attachedPlug(){return this._attachedPlug}set attachedPlug(e){this._attachedPlug=e}get type(){return this._type}get weight(){return this._weight}get affectedNodes(){return this._affectedNodes}get guid(){return this._guid}get isReceiverPlug(){return this._isReceiverPlug}get name(){return this._name}get acceptedPlugTypes(){return this._acceptedPlugTypes}set acceptedPlugTypes(e){this._acceptedPlugTypes=e}get connectsToPlugTypes(){return this._connectsToPlugTypes}set connectsToPlugTypes(e){this._connectsToPlugTypes=e}get isOpen(){return this._isOpen}attachPlug(e,t=!1){if(this._attachedPlug=e,this._attachedPlugGUID=e.guid,this._isOpen=!1,this._isReceiverPlug=t,t&&e.type!==""&&e.type==this._type)switch(e.type){default:case"weighted_hider":this._weight>e.weight?e.node.hideNodes(e.affectedNodes)||nt.coreWCRef.addEventListener(e.node.guid+":refLoaded",function(){e.node.hideNodes(e.affectedNodes)},{once:!0}):this._weight<e.weight&&(this._node.hideNodes(this._affectedNodes)||nt.coreWCRef.addEventListener(this._node.guid+":refLoaded",function(){this._node.hideNodes(this._affectedNodes)},{once:!0}));break}t&&(this._node.isEndNode=!1)}openPlug(){if(this._isReceiverPlug&&this._attachedPlug.type!==""&&this._attachedPlug.type==this._type)switch(this._attachedPlug.type){default:case"weighted_hider":this._weight>this._attachedPlug.weight?this._attachedPlug.node.showNodes(this._attachedPlug.affectedNodes):this._weight<this._attachedPlug.weight&&this._node.showNodes(this._affectedNodes);break}this._attachedPlug=null,this._attachedPlugGUID=null,this._isOpen=!0,this._isReceiverPlug&&(this._isReceiverPlug=!1,this._node.checkIfEndNode())}canAttachToPlug(e){for(let t=0;t<this._connectsToPlugTypes.length;t++)if(e._acceptedPlugTypes.includes(this._connectsToPlugTypes[t]))return!0;return!1}}let pR=class{#e="default";#i=!1;#t=!1;#r=!0;#a={};#o=!1;#n={};#s=[];constructor(e,t=null,n,i){let a=Ln.getState().productData;this._plugs=[],this._skuID=e,this._ref=null,this._transform=null,this.#e="default",this._overrideVariant=null,this._followsParent=a[e].followsParent,this._categoryID=a[e].categoryID,this._replace=a[e].replace,this._swappable=a[e].swappable,this._price=this.#l(),this.#i=a[e]?.ignoreInCart,t?(this._guid=t.guid,this._isEndNode=t.isEndNode,this._overrideVariant=t.overrideVariant,this.generatePlugsWithData(e,t.plugs)):(this._guid=vie.v4(),this._isEndNode=!0,this.generatePlugsForNode(e)),n&&Object.keys(n).map(s=>{if(a[e].looks&&a[e].looks.includes(s)){this.#e=s;return}})}updateGeometryVariant(e,t){const i=Ln.getState().categoryData.geometryVariants;let a=null;if(i.map(f=>{f.id==e&&(a=f)}),!a)return;const s=a.productsInCategory,l=a.variants[t].productsToSwitch,u=Wt.getState().itemsSpawned;s.map(f=>{f.products.map(h=>{this.skuID===h&&f.products.map(p=>{l.map(m=>{if(m==p){const y=Ln.getState().actions.getProductDataById(m);this.skuID=y.skuID;const E=u[this.guid];E&&E.itemData&&Object.keys(y).map(b=>{E.itemData[b]=y[b]}),this.hideNodes(y.geometriesToHide),this.showNodes(y.geometriesToShow),this.updatePricing(),this.resetInStock(),zd.getState().actions.refreshInventory(u)}})})})})}resetInStock(){this.#a={},this.#o=!0}setInStockForRef(e){if(!this.ref)return!1;let t=this.ref.getObjectByName("GRP_RenderGeometry");return t?(t.inStock=e,!0):!1}set inStock({variantName:e,newValue:t}){if(this.#a[e]&&this.#a[e]==t||(this.#a[e]=t,e!==this.#e&&this.#o===!1))return;const n=()=>{this.setInStockForRef(t)};n()||nt.coreWCRef.addEventListener(this.guid+":refLoaded",n,{once:!0})}get myDependenciesGUID(){return this.#s}set myDependenciesGUID(e){this.#s=e}addMyDependenciesGUID(e){this.#s.push(e)}get isDependent(){return this.#t}set isDependent(e){this.#t=e}get isInteractive(){return this.#r}set isInteractive(e){this.#r=e}update(e){this._skuID=e;const t=Ln.getState().productData,n=t[e]?.plugs;if(this.ignoreInCart=t[e].ignoreInCart,!!n)for(let i=0;i<this._plugs.length;i++)for(let a=0;a<n.length;a++)this._plugs[i].name==n[a].name&&(this._plugs[i].acceptedPlugTypes=n[a].acceptedPlugTypes,this._plugs[i].connectsToPlugTypes=n[a].connectsToPlugTypes)}export(){let e={};for(var t=0;t<this._plugs.length;t++){let n=this._plugs[t].export();n&&(e[this._plugs[t].name]=n)}return{skuID:this._skuID,guid:this._guid,isEndNode:this._isEndNode,plugs:e,overrideVariant:this._overrideVariant}}get node(){return this}get swappable(){return this._swappable}get replace(){return this._replace}get ignoreInCart(){return this.#i}set ignoreInCart(e){this.#i=e}get canRotate(){let e=!0;if(!this._isEndNode){const s=this.whichNodesAreAttachedToUs();if(s.length>0){let o=!0;if(s.map(l=>{l.followsParent===!1&&(o=!1)}),!o)return!1}}let t=!1;for(var n=0;n<this.plugs.length;n++)if(!this.plugs[n].isOpen&&this.plugs[n].attachedPlug.isReceiverPlug){const s=this.plugs[n].attachedPlug.acceptedPlugTypes;for(var i=0;i<this.plugs.length;i++)if(n!=i)for(var a=0;a<this.plugs[i].connectsToPlugTypes.length;a++)s.includes(this.plugs[i].connectsToPlugTypes[a])&&(t=!0)}return e=t,e}hideNodes(e){if(!this.ref)return!1;const t=this.ref.getObjectByName("GRP_RenderGeometry"),n=this.ref.getObjectByName("GRP_ProxyMesh");return e.map(i=>{if(t){const a=t.getObjectByName(i);a&&(a.visible=!1)}if(n){const a=n.getObjectByName(i);a&&(a.visible=!1)}}),!0}showNodes(e){if(!this.ref)return!1;const t=this.ref.getObjectByName("GRP_RenderGeometry"),n=this.ref.getObjectByName("GRP_ProxyMesh");e.map(i=>{if(t){const a=t.getObjectByName(i);a&&(a.visible=!0)}if(n){const a=n.getObjectByName(i);a&&(a.visible=!0)}})}canConnectToPlugType(e){let t=!1;return this._plugs.map(n=>{n.connectsToPlugTypes.map(i=>{i==e&&(t=!0)})}),t}isConnectedToSkuID(e){let t=!1;return this._plugs.map(n=>{n.isOpen||n.attachedPlug.node.skuID==e&&(t=!0)}),t}get isConnectedToRoot(){return this.isConnectedToSkuID("Root")}swapRoot(){if(!this.canSwapRoot)return;const t=ln.getState().attachmentSystem.currentStructure,n=this.whichNodesAreAttachedToUs();let i=null;n.map(u=>{u.followsParent===!1&&(i=u)});const a=i.detachNodeFromReceiver();let s=null;this._plugs.map(u=>{u.isOpen||u.attachedPlug.node.skuID=="Root"&&(s=u.attachedPlug)});const o=this.detachNodeFromReceiver();let l=null;return i.plugs.map(u=>{u.connectsToPlugTypes.includes("root")&&(l=u)}),t.connectPlugs({incomingPlug:l,receiverPlug:s}),{neighbourDetachedPlugs:a,rootDetachedPlugs:o,neighbourNode:i}}get canSwapRoot(){if(Je.getState().sceneSettings.swappableRoot===!1)return!1;let e=!1;if(this.isConnectedToRoot&&!this._isEndNode){const n=this.whichNodesAreAttachedToUs();let i=0,a=null;n.map(s=>{s.followsParent===!1&&(i++,a=s)}),i==1?a.canConnectToPlugType("root")&&(e=!0):i>0&&(e=!1)}return e}get canDrag(){let e=!0;return this._isEndNode||(this.whichNodesAreAttachedToUs().map(n=>{n.followsParent===!1&&(e=!1)}),e||(e=this.canSwapRoot)),e}get followsParent(){return this._followsParent}set followsParent(e){this._followsParent=e}get currentVariant(){return this.#e==="default"?Ln.getState().actions.getProductDataById(this._skuID).lookDetails.default.id:this.#e}get price(){return this._price}set price(e){this._price=e}updatePricing(){this._price=this.#l()}#l(){let t=Ln.getState().actions.getProductDataById(this._skuID).lookDetails[this.#e]?.price;return t||(t=0),t}set currentVariant(e){this.#e=e,this._price=this.#l()}get overrideVariant(){return this._overrideVariant}set overrideVariant(e){this._overrideVariant=e,this.#e=this._overrideVariant,this._price=this.#l()}get guid(){return this._guid}get skuID(){return this._skuID}set skuID(e){this._skuID=e}get plugs(){return this._plugs}get ref(){return this._ref}set ref(e){this._ref=e;let t=new CustomEvent(this._guid+":refLoaded",{bubbles:!0,cancelable:!1,composed:!0});const n=ln.getState().attachmentSystem;n.globalGeometryVariants&&Object.keys(n.globalGeometryVariants).map(i=>{this.updateGeometryVariant(i,n.globalGeometryVariants[i])}),t.data={},nt.coreWCRef?nt.coreWCRef.dispatchEvent(t):zt.warn({title:"core web component not found!"})}get isEndNode(){return this._isEndNode}set isEndNode(e){this._isEndNode=e}get categoryID(){return this._categoryID}get transform(){return this._transform}set transform(e){this._transform=e}setModelVisibility(e){e?this._ref?.scale.set(1,1,1):this._ref.scale.set(0,0,0)}checkIfEndNode(){let e=!0;for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&(e=!1);this.isEndNode=e}whichNodesAreAttachedToUs(){var e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&e.push(this._plugs[t].attachedPlug.node);return e}whichPlugsAreAttachedToUs(){var e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&e.push({receiverPlug:this._plugs[t],incomingPlug:this._plugs[t].attachedPlug});return e}whichNodeAreWeAttachedTo(){var e=null;for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&(e=this._plugs[t].attachedPlug.node);return e}isReplaceableWithSkuId(e){const n=Ln.getState().productData[e]?.plugs;let i=0;if(!n)return!1;for(let a=0;a<this._plugs.length;a++)for(let s=0;s<n.length;s++)this._plugs[a].name==n[s].name&&i++;return i==this._plugs.length}whichPlugAreWeAttachedUsing(){for(let e=0;e<this._plugs.length;e++)if(!this._plugs[e].isOpen&&this._plugs[e].attachedPlug.isReceiverPlug)return this._plugs[e]}whichPlugAreWeAttachedTo(){for(let e=0;e<this._plugs.length;e++)if(!this._plugs[e].isOpen&&this._plugs[e].attachedPlug.isReceiverPlug)return this._plugs[e].attachedPlug}getPlugWhichCanConnectToType(e){for(const t of this._plugs)if(t.connectsToPlugTypes.includes(e))return t;return null}getOpenPlugsWeCanAttachFrom(){let e=[];if(this.whichNodeAreWeAttachedTo())return e;for(let t=0;t<this._plugs.length;t++)this.plugs[t].isOpen&&this.plugs[t].connectsToPlugTypes.length>0&&e.push(this._plugs[t]);return e}getOpenPlugsFromNode(){let e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isOpen&&this._plugs[t].acceptedPlugTypes.length>0&&e.push(this._plugs[t]);return e}generatePlugsForNode(e){this._plugs=[];let t=Ln.getState().productData[e]?.plugs;if(t)for(var n=0;n<t.length;n++){const i=new NH(t[n],this);this._plugs.push(i)}}generatePlugsWithData(e,t){let n=Ln.getState().productData[e]?.plugs;if(n)for(var i=0;i<n.length;i++){const a=new NH(n[i],this,t[n[i].name]);this._plugs.push(a)}}detachNodeFromReceiver(){for(var e=0;e<this.plugs.length;e++)if(!this.plugs[e].isOpen&&this.plugs[e].attachedPlug.isReceiverPlug){const t={incomingPlug:this.plugs[e],receiverPlug:this.plugs[e].attachedPlug};return this.plugs[e].attachedPlug.openPlug(),this.plugs[e].openPlug(),t}}detachNodeCompletely(){for(var e=0;e<this._plugs.length;e++)this._plugs[e].isOpen||(this._plugs[e].attachedPlug.openPlug(),this._plugs[e].openPlug())}getPlugByName(e){for(var t=0;t<this._plugs.length;t++)if(this._plugs[t].name==e)return this._plugs[t];return null}getPlugByGUID(e){for(var t=0;t<this._plugs.length;t++)if(this._plugs[t].guid==e)return this._plugs[t];return null}removeNode(){for(var e=0;e<this._plugs.length;e++)this._plugs[e].isOpen||(this._plugs[e].attachedPlug.isReceiverPlug?this._plugs[e].attachedPlug.openPlug():Wt.getState().actions.addToRemoveItems(this._plugs[e].attachedPlug.node.guid))}};class F${#e=!1;constructor(e=null,t,n){if(this._nodes=[],this._rootNode=null,zt.info({title:"preloadNodes",details:e}),e){zt.info({title:"PRELOAD Length-----------------:"+e.length});for(var i=0;i<e.length;i++){zt.info({title:"FOUND PRELOAD-----------------"});let a=e[i].skuID,s=new pR(a,e[i],t,n);a=="Root"&&(this._rootNode=s),this._nodes.push(s)}this.resolvePlugConnections(e)}else{const a=new pR("Root",null,t,n);this._rootNode=a,this._nodes.push(a)}Wt.getState().actions.addItemWithTransform({position:new ve(0,0,0),rotation:new Xi().identity()},"Root",this._rootNode.guid,!1),this._boundingBoxLeeway=Je.getState().sceneSettings.boundingBoxLeeway}get nodes(){return this._nodes}get rootNode(){return this._rootNode}updatePricing(){for(let e=0;e<this._nodes.length;e++)this._nodes[e].updatePricing()}getCurrentItemsInReplaceableCategory(){let e={};for(const t of this._nodes)t.replace&&(e[t.categoryID]=t.skuID);return e}recalculateStructureFromNode(e){for(let t=0;t<e.plugs.length;t++)if(!e.plugs[t].isOpen&&e.plugs[t].isReceiverPlug){const n=e.plugs[t].attachedPlug.node,i={receiverPlug:e.plugs[t],incomingPlug:e.plugs[t].attachedPlug};if(i){const a=this.findItemTransform(i);a&&(n.ref.position.set(a.position.x,a.position.y,a.position.z),n.ref.setRotationFromQuaternion(a.rotation),n.transform={position:a.position,rotation:a.rotation})}this.recalculateStructureFromNode(n)}}rotateNode(e){const t=this.getNodeByGUID(e);let n=null,i=null;for(let o=0;o<t.plugs.length;o++)if(!i&&!t.plugs[o].isOpen&&t.plugs[o].attachedPlug.isReceiverPlug){const l=t.plugs[o].attachedPlug.acceptedPlugTypes;i=t.plugs[o].attachedPlug;let u=[];for(let f=o+1;f<t.plugs.length;f++)u.push(t.plugs[f]);for(let f=0;f<o;f++)u.push(t.plugs[f]);for(let f=0;f<u.length;f++)for(let h=0;h<u[f].connectsToPlugTypes.length;h++)l.includes(u[f].connectsToPlugTypes[h])&&(n=u[f])}if(!n)return;t.detachNodeFromReceiver();const{position:a,rotation:s}=this.findItemTransform({receiverPlug:i,incomingPlug:n});t.ref.position.set(a.x,a.y,a.z),t.ref.setRotationFromQuaternion(s),t.transform={position:t.ref.position,rotation:s},this.connectPlugs({receiverPlug:i,incomingPlug:n}),this.recalculateStructureFromNode(t)}async load(){await this.respawnItems()}materialOverrideExists(){let e=!1;return this.nodes.map(t=>{if(t.overrideVariant)return e=!0,!0}),e}findGhostTransformForReplacement(e,t){const n=ln.getState().attachmentSystem,i=t.whichPlugAreWeAttachedTo(),a=t.whichPlugAreWeAttachedUsing(),o=new pR(e,null,n.globalVariants,n.globalGeometryVariants).getPlugByName(a.name);if(!o)return{transforms:null,connectablePlugs:null};const l={incomingPlug:o,receiverPlug:i};let u=[],f=this.findItemTransform(l);if(!f)return{transforms:u,connectablePlugs:l};let{position:h,rotation:p}=f;return h&&p&&u.push({position:h,rotation:p,incomingPlugName:l.incomingPlug.name,receiverPlugName:l.receiverPlug.name,incomingPlugGUID:l.incomingPlug.guid,receiverPlugGUID:l.receiverPlug.guid}),{transforms:u,connectablePlugs:l}}findGhostTransforms(e,t){const n=this.getOpenPlugs();if(n.length<=0)return{transforms:[]};const i=ln.getState().attachmentSystem,a=Ln.getState().productData,s=new pR(e,null,i.globalVariants,i.globalGeometryVariants),o=this.getConnectablePlugs(s,n);let l=[];if(o.length<=0)return{transforms:[]};let u=[];for(let h=0;h<o.length;h++){let p=this.findItemTransform(o[h]);if(!p)continue;let{position:m,rotation:y}=p;if(m&&y){let E=t;Array.isArray(t)===!0&&(E=!1),a[e].hasOwnProperty("ignoreSpawningCollision")&&(E=a[e].ignoreSpawningCollision),(E?!1:this.isColliding(s.skuID,p,o[h].receiverPlug,t))||(u.push({position:m,rotation:y,incomingPlugName:o[h].incomingPlug.name,receiverPlugName:o[h].receiverPlug.name,incomingPlugGUID:o[h].incomingPlug.guid,receiverPlugGUID:o[h].receiverPlug.guid}),l.push(o[h]))}}let f=[];for(let h=0;h<u.length;h++)f.push(s);return{transforms:u,newNodes:f,connectablePlugs:l}}resolvePlugConnections(e){for(let t=0;t<e.length;t++)Object.keys(e[t].plugs).map(n=>{let i=e[t].plugs[n].guid,a=this.getPlugInNodesByGUID(i);if(!a||a.attachedPlug)return;let s=e[t].plugs[n].attachedPlugGUID,o=this.getPlugInNodesByGUID(s);o&&(o.attachedPlug||(a.attachPlug(o,e[t].plugs[n].isReceiverPlug),o.attachPlug(a,!e[t].plugs[n].isReceiverPlug)))});zt.info({title:"RESOLVED PLUG CONNECTION: ",details:this})}async respawnItems(){let e=[this.rootNode];for(let t=0;t<e.length;t++){let i=e[t].whichPlugsAreAttachedToUs();for(let a=0;a<i.length;a++){let s=this.findItemTransformForPreload(i[a],i[a].receiverPlug.node.transform);s?await Wt.getState().actions.addItemWithTransform(s,i[a].incomingPlug.node.skuID,i[a].incomingPlug.node.guid):zt.warn({title:"Problem finding plug transform! "+i[a].name}),i[a].incomingPlug.node.transform=s,e.push(i[a].incomingPlug.node)}}nt.fireEvent(nt.EVENTS.SCENE.SavedConfiguration_Loaded),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.checkHotspotHealth()}getPlugInNodesByGUID(e){for(let t=0;t<this._nodes.length;t++){let n=this._nodes[t].getPlugByGUID(e);if(n)return n}return null}export(){let e=[];for(let t=0;t<this._nodes.length;t++){let n=this._nodes[t].export();n&&e.push(n)}return e}async clear(){return new Promise(async(e,t)=>{!this._rootNode&&this._rootNode.isEndNode&&e(!0);let n=this._rootNode.whichNodeAreWeAttachedTo();this.#e=!0,nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Scene_Cleared,i=>e(i.data),{once:!0}),n?nt.removeItemByGUID(n.guid,!0):(await vc(500),e(!0))})}getNodeByGUID(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e)return this._nodes[t];return null}getPlugByGUID(e){for(const t of this._nodes){const n=t.getPlugByGUID(e);if(n)return n}return null}findItemTransformForPreload(e,t){let{receiverPlug:n,incomingPlug:i}=e,a=n,s=i;if(a.node.skuID=="Root")return this.findItemTransformRoot(e);let o=null,l=null,u=new Ei,f=Mo.getState().assets.items[a.node.skuID].proxy.data.scene.clone();u.add(f);let{position:h,rotation:p}=t;if(f.position.set(h.x,h.y,h.z),f.setRotationFromQuaternion(p),l=f,!l||(o=l.getObjectByName(a.name),!o))return;let m=new ve(0,0,0);o.getWorldPosition(m);let y=new Xi().identity();o.getWorldQuaternion(y);let E=new Ei;o.add(E);let b=Mo.getState().assets.items[s.node.skuID].proxy.data.scene.clone();b.position.set(m.x,m.y,m.z),b.applyQuaternion(y);let v=new ve;v.copy(f.up).applyQuaternion(l.quaternion);let x=new ve;x.copy(b.up).applyQuaternion(y),x.negate();let S=new Xi().setFromUnitVectors(v,x);v.round(),x.round();let _=v.dot(x);_!==1&&_!==-1&&b.applyQuaternion(S);let w=b.getObjectByName(s.name),R=new Xi().identity();w.getWorldQuaternion(R);let N=new ve(0,1,0);N.applyQuaternion(R);let L=new ve(0,1,0);L.applyQuaternion(y),L.negate();let I=new Xi().setFromUnitVectors(N,L);if(N.round(),L.round(),N.dot(L)!==-1)b.applyQuaternion(I);else{let j=new ve(0,1,0),Q=L.dot(j);if(Q!==1&&Q!==-1)b.rotateOnAxis(j,Math.PI);else{let H=new ve(0,0,1),K=L.dot(H);if(K!==1&&K!==-1)b.rotateOnAxis(H,Math.PI);else{let J=new ve(1,0,0),W=L.dot(J);W!==1&&W!==-1&&b.rotateOnAxis(J,Math.PI)}}}let k=b.getObjectByName(s.name),F=new ve(k.position.x,k.position.y,k.position.z);b.translateX(-F.x),b.translateY(-F.y),b.translateZ(-F.z);let U=new ve(0,0,0);b.getWorldPosition(U);let G=new Xi().identity();return b.getWorldQuaternion(G),b=null,{position:U,rotation:G}}findItemTransformRoot(e){let{receiverPlug:t,incomingPlug:n}=e,i=n;const a=new Ei;let s=a,o=new ve(0,0,0);s.getWorldPosition(o);let l=new Xi().identity(),u=new Ei;u.position.set(0,0,0),a.add(u);let f=Mo.getState().assets.items[i.node.skuID].proxy.data.scene.clone();u.attach(f),f.translateX(o.x),f.translateY(o.y),f.translateZ(o.z);let h=f.getObjectByName(i.name),p=new Xi().identity();h.getWorldQuaternion(p);const m=new ve(0,1,0);m.applyQuaternion(p);const y=new ve(0,1,0);y.applyQuaternion(l);const E=y.angleTo(m),b=new ve(0,0,0);b.crossVectors(y,m),b.round(),b.length()!==0&&f.rotateOnAxis(b,E);var v=new Wn().extractRotation(f.matrixWorld);let x=new ve(h.position.x,h.position.y,h.position.z);x.applyMatrix4(v),f.translateX(-x.x),f.translateY(-x.y),f.translateZ(-x.z);let S=new ve(0,0,0);f.getWorldPosition(S);let _=new Xi().identity();return f.getWorldQuaternion(_),u.remove(f),u=null,f=null,{position:S,rotation:_}}findItemTransform(e){let{receiverPlug:t,incomingPlug:n}=e,i=t,a=n;if(i.node.skuID=="Root")return this.findItemTransformRoot(e);const s=i.node.transform;if(!s)return;const o=Mo.getState().assets.items[i.node.skuID].proxy.data.scene.clone(),l=new Ei;l.position.set(s.position.x,s.position.y,s.position.z),l.setRotationFromQuaternion(s.rotation),l.add(o);let u=l.getObjectByName(""+i.name);if(!u){zt.error({title:"Plug: "+i.name+" doesn't exist in "+i.node.skuID});return}let f=new ve(0,1,0);u.getWorldPosition(f);let h=new Xi().identity();u.getWorldQuaternion(h);let p=Mo.getState().assets.items[a.node.skuID].proxy.data.scene.clone();p.position.set(f.x,f.y,f.z),p.applyQuaternion(h);let m=new ve;m.copy(o.up).applyQuaternion(l.quaternion);let y=new ve;y.copy(p.up).applyQuaternion(h),y.negate();let E=new Xi().setFromUnitVectors(m,y);m.round(),y.round();let b=m.dot(y);b!==1&&b!==-1&&p.applyQuaternion(E);let v=p.getObjectByName(a.name);if(!v){zt.error({title:"Plug: "+a.name+" doesn't exist in "+a.node.skuID});return}let x=new Xi().identity();v.getWorldQuaternion(x);let S=new ve(0,1,0);S.applyQuaternion(x);let _=new ve(0,1,0);_.applyQuaternion(h),_.negate();let w=new Xi().setFromUnitVectors(S,_);if(S.round(),_.round(),S.dot(_)!==-1)p.applyQuaternion(w);else{let k=new ve(0,1,0),F=_.dot(k);if(F!==1&&F!==-1)p.rotateOnAxis(k,Math.PI);else{let U=new ve(0,0,1),G=_.dot(U);if(G!==1&&G!==-1)p.rotateOnAxis(U,Math.PI);else{let j=new ve(1,0,0),Q=_.dot(j);Q!==1&&Q!==-1&&p.rotateOnAxis(j,Math.PI)}}}let N=p.getObjectByName(a.name),L=new ve(N.position.x,N.position.y,N.position.z);p.translateX(-L.x),p.translateY(-L.y),p.translateZ(-L.z);let I=new ve(0,0,0);p.getWorldPosition(I);let D=new Xi().identity();return p.getWorldQuaternion(D),l.remove(o),p=null,{position:I,rotation:D}}getSpawningRequirementForSkuID(e){let t=[];const n=Ln.getState().productData,i=n[e];if(!i)return t;const a=[];return i.plugs.map(s=>{s.connectsToPlugTypes.map(o=>{a.push(o)})}),Object.keys(n).map(s=>{for(let o=0;o<n[s].plugs.length;o++){const l=n[s].plugs[o].acceptedPlugTypes;for(let u=0;u<l.length;u++)a.map(f=>{f==l[u]&&!t.includes(s)&&t.push(s)})}}),t}getConnectablePlugs(e,t){let n=[],i=e.getOpenPlugsWeCanAttachFrom();for(let a=0;a<i.length;a++)for(let s=0;s<t.length;s++){let o=!1;for(let u=0;u<n.length;u++)if(n[u].receiverPlug.guid==t[s].guid){o=!0;break}if(o)continue;i[a].canAttachToPlug(t[s])&&n.push({incomingPlug:i[a],receiverPlug:t[s]})}return n}getOpenPlugs(){let e=[];return this._nodes.map(t=>{let n=t.getOpenPlugsFromNode();e=e.concat(n)}),e}checkCollisionforGUID(e){if(Je.getState().sceneSettings.disableCollider)return!1;const t=Wt.getState().itemsSpawned,n=Ln.getState().productData;if(!t[e])return!1;const a=this.getNodeByGUID(e);if(!a||!a.ref||n[a.skuID].disableCollider)return!1;const s={position:a.ref.position,rotation:a.ref.rotation},o=a.whichPlugAreWeAttachedTo();return o==null?!1:this.isColliding(a.skuID,s,o,[])}isColliding(e,{position:t,rotation:n},i,a=[]){const s=Mo.getState().assets.items[e].proxy.data.scene,o=Ln.getState().productData;if(!s)return!1;let l=s.clone();l.position.set(t.x,t.y,t.z),l.setRotationFromQuaternion(n);let u=new fl().setFromObject(l);var f=new ve;u.getCenter(f);let h=new Ei;h.position.set(f.x,f.y,f.z),h.attach(l),h.scale.set(this._boundingBoxLeeway,this._boundingBoxLeeway,this._boundingBoxLeeway),u=new fl().setFromObject(h);const p=[];if(this._nodes.forEach(y=>{i.node.guid!=y.guid&&(Array.isArray(a)===!0&&a.includes(y.guid)||y.ref&&((o[y.skuID].hasOwnProperty("disableCollider")?o[y.skuID].disableCollider:Je.getState().sceneSettings.disableCollider)||p.push(y.ref)))}),p.length<=0)return!1;let m=!1;return p.forEach(y=>{if(m)return;let E=new fl().setFromObject(y);if(u.intersectsBox(E)){m=!0;return}}),h.clear(),l=null,h=null,u=null,m}boxOverlapPercent(e,t){if(e.containsBox(t)||t.containsBox(e))return 100;if(!(e.min.x<t.max.x||t.min.x<e.max.x))return 0;let n=new ve(0,0,0);e.getSize(n),n.x*n.y*n.z;let i=new ve(0,0,0);t.getSize(i),i.x*i.y*i.z}checkInsideOutCollision(e,t,n){let i=t.position.clone(),a=new Float32Array(n.attributes.position.array),s=a.length/3;for(let o=0;o<s;o++){let l=new ve(a[o*3],a[o*3+1],a[o*3+2]),u=l.add(t.position);u=l.applyQuaternion(t.quaternion);let f=u.sub(t.position);const p=new Sy(i,f.clone().normalize()).intersectObjects(e),m=p.length>0,y=p[0].distance<f.length();if(m&&y)return!0}return!1}addNode(e){this._nodes.push(e)}getFirstNodeByCategoryID(e){for(var t=0;t<this._nodes.length;t++)if(this._nodes[t]._categoryID==e)return this._nodes[t];return null}getNodesBySKUID(e){let t=[];for(var n=0;n<this._nodes.length;n++)this._nodes[n].skuID==e&&t.push(this._nodes[n]);return t}getNodesByCategoryID(e){let t=[];for(var n=0;n<this._nodes.length;n++)this._nodes[n]._categoryID==e&&t.push(this._nodes[n]);return t}connectPlugs({incomingPlug:e,receiverPlug:t}){e.attachPlug(t,!1),t.attachPlug(e,!0),ln.getState().actions.toggleStructureUpdated()}removeNodeByGUID(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e){this._nodes[t].removeNode(),this._nodes.splice(t,1);break}this._nodes.length==1&&this.#e&&nt.fireEvent(nt.EVENTS.SCENE.Scene_Cleared,!0),ln.getState().actions.updateFittingSkuIds(),ln.getState().actions.toggleStructureUpdated()}removeNodeFromStructure(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e.guid){this._nodes.splice(t,1);break}ln.getState().actions.toggleStructureUpdated()}}class OUe{constructor(){this._globalVariants={},this._globalGeometryVariants={},Ln.getState().categoryData.geometryVariants.map(e=>{this._globalGeometryVariants[e.id]=e.defaultVariant}),Ln.getState().categoryData.color.map(e=>{this._globalVariants[e.id]=e.defaultLook}),this._currentStructure=new F$(null,this._globalVariants,this._globalGeometryVariants);for(const[e,t]of Object.entries(this._globalVariants))this.switchGlobalVariant(e,t);for(const[e,t]of Object.entries(this._globalGeometryVariants))this.switchGlobalGeometryVariant(e,t)}get globalGeometryVariants(){return this._globalGeometryVariants}get globalVariants(){return this._globalVariants}get currentStructure(){return this._currentStructure}getClientProductId(e,t){let n;return n=Ln.getState()?.productData[e]?.lookDetails[t],n?.clientProductId?n?.clientProductId:""}getCartItems(){let e=[];const t=zd.getState().inventoryData;this.currentStructure.nodes.map(a=>{if(a.skuID=="Root"||a.ignoreInCart===!0)return;let s=!1;if(e.map(u=>{const f=t[u.skuID];if(u.skuID==a.skuID&&u.currentVariant==a.currentVariant){u.count++,u.countAvailable=f[a.currentVariant].countAvailable,u.countUnavailable=f[a.currentVariant].countUnavailable,u.price=a.price*u.count,s=!0;return}}),s===!0)return;let o={};o.skuID=a.skuID,o.currentVariant=a.currentVariant,o.clientProductId=this.getClientProductId(o.skuID,o.currentVariant),o.count=1;const l=t[o.skuID];o.price=a.price,o.countAvailable=l[a.currentVariant].countAvailable,o.countUnavailable=l[a.currentVariant].countUnavailable,e.push(o)});let n=0;for(const a of e)n=n+a.price;return{cartItems:e,details:{total:n.toFixed(2)}}}getFittingSKUIDs(){const e=Ln.getState().productData;if(!this.currentStructure)return;let t=this.currentStructure.nodes,n=[],i=[],a=[],s=[];if(t.map(l=>{s.push(l.skuID),l.plugs.map(u=>{if(!u.isOpen){u.attachedPlug.node.replace&&u.acceptedPlugTypes.map(f=>{i.includes(f)||i.push(f)});return}u.acceptedPlugTypes.map(f=>{n.includes(f)||n.push(f)})})}),n.length<=0&&i.length<=0)return[];Object.keys(e).map(l=>{!e[l].plugs||a.includes(l)||e[l].plugs.map(u=>{a.includes(l)||u.connectsToPlugTypes.map(f=>{if(!a.includes(l)){if(i.includes(f)){if(!s.includes(l)){let h=!1,p=this.currentStructure.getFirstNodeByCategoryID(e[l].categoryID),m=!1;p?.plugs.map(y=>{!y.isOpen&&y.isReceiverPlug&&(m=!0,e[l].plugs.map(E=>{E.name==y.name&&y.attachedPlug.connectsToPlugTypes.map(b=>{E.acceptedPlugTypes.includes(b)&&(h=!0)})}))}),(h||!m)&&a.push(l)}}else if(n.includes(f)){const h=this.currentStructure.getFirstNodeByCategoryID(e[l].categoryID);if(h&&h.replace)return;a.push(l)}}})})});let o=[];return a.map(l=>{if(o.includes(l))return;if(e[l].replace){o.push(l);return}const{transforms:u,newNodes:f,connectablePlugs:h}=this.currentStructure.findGhostTransforms(l,Je.getState().sceneSettings.ignoreSpawningCollision);u.length>0&&o.push(l)}),o.map(l=>{e[l].replace}),o}async removeAllVariantOverrides(){let e=this._currentStructure.nodes,t=Ln.getState().productData,n=Wt.getState().itemsSpawned;await e.map(async i=>{if(!i.overrideVariant||(i.overrideVariant=null,!t[i.skuID].looks))return;let a=null;Object.keys(this._globalVariants).map(s=>{t[i.skuID].looks.includes(this._globalVariants[s])&&a==null&&(a=this._globalVariants[s])}),a&&await Wt.getState().actions.switchToVariant(n[i.guid].itemData,a)}),nt.alert({alertMsg:"Changes to individual items in the scene have been cleared",alertTime:6e3,alertType:"info",alertLabel:"Overrides Removed",alertId:"overridesRemoved"}),nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!1)}async switchGlobalGeometryVariant(e,t){const i=Ln.getState().categoryData.geometryVariants;let a=null;if(i.map(p=>{p.id==e&&(a=p)}),!a)return;const s=a.productsInCategory,l=a.variants[t].productsToSwitch,u=Wt.getState().itemsSpawned;let f=Ln.getState().categoryData;l.map(p=>{s.map(m=>{let y=!1;m.products.map(E=>{p==E&&(y=!0)}),y&&f.build.map(E=>{m.products.map(b=>{E.skus.map((v,x)=>{E.skus[x]==b&&(E.skus[x]=p)})})})})}),this._currentStructure.nodes.map(p=>{s.map(m=>{m.products.map(y=>{p.skuID==y&&p.ref!==null&&m.products.map(E=>{l.map(b=>{if(b==E){const v=Ln.getState().actions.getProductDataById(b);p.hideNodes(v.geometriesToHide),p.showNodes(v.geometriesToShow),p.skuID=b;const x=u[p.guid];x&&x.itemData&&Object.keys(v).map(S=>{x.itemData[S]=v[S]}),p.resetInStock(),p.updatePricing()}})})})})}),this._globalGeometryVariants[e]=t,ui.getState().actions.checkHotspotHealth(),zd.getState().actions.refreshInventory(u),Ln.setState({categoryData:f}),nt.fireEvent(nt.EVENTS.SCENE.CategoryData_Updated,f),nt.fireEvent(nt.EVENTS.SCENE.GlobalGeometryVariant_Updated,this._globalGeometryVariants);const h=this.getCartItems();h&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,h)}async switchGlobalVariant(e,t){this._globalVariants[e]=t;const n=Wt.getState().actions;let i=Wt.getState().itemsSpawned;for(let l=0;l<Object.keys(i).length;l++){let u=i[Object.keys(i)[l]];if(u.itemData.looks&&u.itemData.looks.includes(t)){let f=this._currentStructure.getNodeByGUID(u.itemData.guid);f&&!f.overrideVariant&&await n.switchToVariant(u.itemData,t)}}const a=Ln.getState().lookData;$x.getState().actions.processLookEnvMapOverride(t);const s=e;Object.keys(i).length>0&&nt.alert({alertMsg:s.charAt(0).toUpperCase()+s.slice(1)+" was successfully switched to "+a[t].label+".",alertTime:3e3,alertType:"success",alertLabel:`${s} Changed`,alertId:"materialVariantChanged"}),nt.fireEvent(nt.EVENTS.SCENE.GlobalVariant_Updated,this._globalVariants),Wt.setState({variantChangeAlert:!Wt.getState().variantChangeAlert});const o=this.getCartItems();o&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,o)}async#e(e){if(!e)return;zt.info({title:"Structure to load",details:e}),delete this._currentStructure,this._globalVariants={...e.globalVariants},this._globalGeometryVariants=e.globalGeometryVariants?{...e.globalGeometryVariants}:{};const t=[...e.structure];this._currentStructure=new F$(t,this._globalVariants,this._globalGeometryVariants);for(const[n,i]of Object.entries(this._globalVariants))this.switchGlobalVariant(n,i);for(const[n,i]of Object.entries(this._globalGeometryVariants))this.switchGlobalGeometryVariant(n,i);zt.info({title:"Structure Loading..."}),await this._currentStructure.load(),zt.info({title:"Structure Loaded."})}async loadStructure(e){e&&(nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),Je.setState({configurationLoaded:!1}),await vc(500),await this._currentStructure.clear(),await this.#e(e),Je.getState().preconfigurationLoaded?nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide):Je.setState({preconfigurationLoaded:!0}),Je.setState({configurationLoaded:!0}),ln.getState().actions.toggleStructureUpdated())}export(){return{structure:this._currentStructure.export(),globalVariants:this._globalVariants,globalGeometryVariants:this._globalGeometryVariants}}async clear(){nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),this._currentStructure.clear(),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide)}async restart(){zt.warn({title:"Restarting the Scene!!"}),Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),await vc(500),await this._currentStructure.clear();const e=ln.getState().defaultConfig;await this.#e(e),ln.getState().actions.toggleStructureUpdated(),Je.setState({configurationLoaded:!0}),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide)}}const yie=Do((r,e)=>({attachmentSystem:null,defaultConfig:null,structureUpdated:!1,colliderMeshRef:null,placeholderRef:null,draggingItem:null,snappingThreshold:.5,actions:{initializeAttachmentSystem:async()=>{const{actions:t,defaultConfig:n}=e(),i=await new OUe;r({attachmentSystem:i}),t.updateFittingSkuIds(),t.toggleStructureUpdated()},loadSavedStructureFromConfigID:async t=>{const n=await die(RH+t);return n.success===!1?null:n.data},loadDefaultStructure:async()=>{const{actions:t,defaultConfig:n,attachmentSystem:i}=e();await t.loadStructure(n)},updateFittingSkuIds:()=>{const t=yie.getState().attachmentSystem.getFittingSKUIDs();t&&nt.fireEvent(nt.EVENTS.SCENE.FittingSkuIds_Updated,{skuids:t})},toggleStructureUpdated:()=>{const{attachmentSystem:t}=e();r(i=>({structureUpdated:!i.structureUpdated})),nt.fireEvent(nt.EVENTS.SCENE.ReplaceableCategory_Updated,t.currentStructure.getCurrentItemsInReplaceableCategory());const n=t.getCartItems();n&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,n)},loadStructure:async t=>{const{attachmentSystem:n}=e();n&&Je.getState().configurationLoaded!==!1&&await n.loadStructure(t)},export:()=>{const{attachmentSystem:t}=e();if(t)return t.export()}}})),ln=yie,PUe=Do((r,e)=>({productData:{},categoryData:{},lookData:{},hotspotsData:{},endpoints:{},assetsData:{},actions:{getCurrentPricingInfo:()=>{const{productData:t}=e();let n={};return Object.keys(t).map(i=>{if(i.toLowerCase()==="root")return;let a=t[i].lookDetails,s={};Object.keys(a).map(o=>{o!="default"&&(s[o]=a[o].price)}),n[i]=s}),n},updatePricingForAllProducts:t=>{const{actions:n}=e();Object.keys(t).map(i=>{let a=t[i];Object.keys(a).map(s=>{n.updatePricingForProduct(i,s,a[s])})})},updatePricingForProduct:(t,n,i)=>{const{productData:a}=e();let s=a[t];if(!s||!s.lookDetails)return;let o=s.lookDetails[n];if(!o)return;o.price=i,ln.getState().attachmentSystem.currentStructure.getNodesBySKUID(t).map(f=>f.updatePricing())},setProductData:t=>{let n={};t&&Object.keys(t).map(i=>{const a=t[i];if(a.skuID=i,a.skuID.toLowerCase()==="root"){a.lookDetails={default:{title:"",description:"",productPageUrl:"",thumbnails:{high:"",low:""},price:0}},a.defaultVariant="default";return}if(a?.lookDetails){const s=a.lookDetails;let o=Object.keys(a.lookDetails);if(o.includes("default")){const u=o.indexOf("default");o.splice(u,1)}a.looks=o,Object.keys(a.lookDetails).map(u=>{let f=a.lookDetails[u];f.inventory===void 0&&(f.inventory=M$),f.price===void 0&&(f.price=nUe),n[i]={...n[i],[u]:{inventory:M$,inScene:[]}}});let l=a?.defaultVariant;l||(zt.warn({title:`No defaultVariant set for ${a.skuID}. Attempting to auto resolve but the colour variants behaviour might be unexpected!`}),l=Object.keys(a.lookDetails).sort()[0],zt.warn({title:"Auto resolved default look ID: "+l})),o.includes(l)?(a.lookDetails.default=s[l],a.lookDetails.default.id=l):(zt.error({title:`Default look [ ${l} ] doesn't exist for: ${i}. Please make sure to select a default variant in Input Data for this project`}),a.lookDetails.default=null)}}),zt.info("PRODUCT DATA: ",t),zd.setState({inventoryData:n}),r({productData:t})},setCategoryData:t=>{const{productData:n}=e();t.geometryVariants!==void 0&&t.geometryVariants.map(i=>{i.defaultVariant===void 0&&Object.keys(i.variants).length>0&&(i.defaultVariant=Object.keys(i.variants)[0])}),t.color!==void 0&&t.color.map(i=>{(i.defaultLook===void 0&&i.looks.length>0||!i.looks.includes(i.defaultLook))&&(i.defaultLook=i.looks[0])}),r({categoryData:t}),t.build!==void 0&&t.build.map(i=>{i.skus.map(a=>{n[a].categoryID=i.categoryID,n[a].categoryLabel=i.label,n[a].swappable=i.swappable?i.swappable:!1,n[a].replace=i.replace})})},getProductDataById:t=>{const{productData:n}=e();let i=null;return n[t]&&(i=n[t]),i},setLookData:t=>r({lookData:t}),setHotspotsData:t=>{const{categoryData:n,productData:i}=e();n.geometryVariants&&Object.keys(t).map(a=>{t[a].map(s=>{s.geometryVariantID&&n.geometryVariants.map(o=>{Object.keys(o.variants).map(l=>{s.geometryVariantID==l&&o.productsInCategory.map(u=>{let f=null;u.products.map(h=>{t.hasOwnProperty(h)&&(f=t[h])}),u.products.map(h=>{t.hasOwnProperty(h)||(t[h]=f)})})})})})}),r({hotspotsData:t})},setEndpoints:t=>{r({endpoints:t}),sUe(t)},setAssetsData:t=>r({assetsData:t})}})),Ln=PUe,LUe=Do((r,e)=>({defaultEnvMapUrl:"<@generic-project@>/env-map/neutral.hdr",envMapUrl:"",actions:{setEnvLightMap:t=>{r(n=>({envMapUrl:t}))},processLookEnvMapOverride:t=>{const{envMapUrl:n,defaultEnvMapUrl:i,actions:a}=e(),s=Ln.getState().lookData[t],o=s?.envMapOverride;if(!s||!o){a.setEnvLightMap(i);return}if(o===n){zt.info(`New Env Map Url is the same as the current ${o}`);return}a.setEnvLightMap(o)}}})),$x=LUe,UUe=()=>{const[r,e]=oe.useState(!1),t=Ln(s=>s),n=$x(s=>s),[i,a]=oe.useState(1);return oe.useEffect(()=>{const s=t.assetsData,o=s?.sceneMoodSettings?.envMap;o&&($x.setState({defaultEnvMapUrl:o}),n.actions.setEnvLightMap(o)),n.envMapUrl===""&&n.actions.setEnvLightMap($x.getState().defaultEnvMapUrl);const l=s?.sceneMoodSettings?.ambientLightIntensity;l!==void 0&&a(l),e(!0)},[]),oe.useEffect(()=>{r!==!1&&(zt.groupCollapsed("SCENE LIGHTING INFO:"),zt.table({title:"Scene Lights",details:{"Environment Map":n.envMapUrl,"Ambient Light Intensity":i}}),zt.groupEnd())},[r]),ne(hi,{children:r===!0&&ne("group",{name:"GRP_LIGHTS",children:[ne("ambientLight",{intensity:i},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:70,columnNumber:11},globalThis),ne(KLe,{background:!1,files:nt.getResolvedAssetUrl(n.envMapUrl)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:71,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:69,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:67,columnNumber:5},globalThis)};function BUe(r,e,t){return Math.max(e,Math.min(r,t))}const ea={toVector(r,e){return r===void 0&&(r=e),Array.isArray(r)?r:[r,r]},add(r,e){return[r[0]+e[0],r[1]+e[1]]},sub(r,e){return[r[0]-e[0],r[1]-e[1]]},addTo(r,e){r[0]+=e[0],r[1]+=e[1]},subTo(r,e){r[0]-=e[0],r[1]-=e[1]}};function G$(r,e,t){return e===0||Math.abs(e)===1/0?Math.pow(r,t*5):r*e*t/(e+t*r)}function z$(r,e,t,n=.15){return n===0?BUe(r,e,t):r<e?-G$(e-r,t-e,n)+e:r>t?+G$(r-t,t-e,n)+t:r}function kUe(r,[e,t],[n,i]){const[[a,s],[o,l]]=r;return[z$(e,a,s,n),z$(t,o,l,i)]}function us(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function H$(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ta(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H$(Object(t),!0).forEach(function(n){us(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):H$(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}const Aie={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function V$(r){return r?r[0].toUpperCase()+r.slice(1):""}const FUe=["enter","leave"];function GUe(r=!1,e){return r&&!FUe.includes(e)}function zUe(r,e="",t=!1){const n=Aie[r],i=n&&n[e]||e;return"on"+V$(r)+V$(i)+(GUe(t,i)?"Capture":"")}const HUe=["gotpointercapture","lostpointercapture"];function VUe(r){let e=r.substring(2).toLowerCase();const t=!!~e.indexOf("passive");t&&(e=e.replace("passive",""));const n=HUe.includes(e)?"capturecapture":"capture",i=!!~e.indexOf(n);return i&&(e=e.replace("capture","")),{device:e,capture:i,passive:t}}function jUe(r,e=""){const t=Aie[r],n=t&&t[e]||e;return r+n}function ZU(r){return"touches"in r}function bie(r){return ZU(r)?"touch":"pointerType"in r?r.pointerType:"mouse"}function QUe(r){return Array.from(r.touches).filter(e=>{var t,n;return e.target===r.currentTarget||((t=r.currentTarget)===null||t===void 0||(n=t.contains)===null||n===void 0?void 0:n.call(t,e.target))})}function WUe(r){return r.type==="touchend"||r.type==="touchcancel"?r.changedTouches:r.targetTouches}function _ie(r){return ZU(r)?WUe(r)[0]:r}function DH(r,e){const t=e.clientX-r.clientX,n=e.clientY-r.clientY,i=(e.clientX+r.clientX)/2,a=(e.clientY+r.clientY)/2,s=Math.hypot(t,n);return{angle:-(Math.atan2(t,n)*180)/Math.PI,distance:s,origin:[i,a]}}function YUe(r){return QUe(r).map(e=>e.identifier)}function j$(r,e){const[t,n]=Array.from(r.touches).filter(i=>e.includes(i.identifier));return DH(t,n)}function dz(r){const e=_ie(r);return ZU(r)?e.identifier:e.pointerId}function TT(r){const e=_ie(r);return[e.clientX,e.clientY]}const Q$=40,W$=800;function Eie(r){let{deltaX:e,deltaY:t,deltaMode:n}=r;return n===1?(e*=Q$,t*=Q$):n===2&&(e*=W$,t*=W$),[e,t]}function qUe(r){var e,t;const{scrollX:n,scrollY:i,scrollLeft:a,scrollTop:s}=r.currentTarget;return[(e=n??a)!==null&&e!==void 0?e:0,(t=i??s)!==null&&t!==void 0?t:0]}function XUe(r){const e={};if("buttons"in r&&(e.buttons=r.buttons),"shiftKey"in r){const{shiftKey:t,altKey:n,metaKey:i,ctrlKey:a}=r;Object.assign(e,{shiftKey:t,altKey:n,metaKey:i,ctrlKey:a})}return e}function YL(r,...e){return typeof r=="function"?r(...e):r}function $Ue(){}function KUe(...r){return r.length===0?$Ue:r.length===1?r[0]:function(){let e;for(const t of r)e=t.apply(this,arguments)||e;return e}}function Y$(r,e){return Object.assign({},e,r||{})}const ZUe=32;class Sie{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:i}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=i,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?YL(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let a=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,XUe(e)),i.down=i.pressed=i.buttons%2===1||i.touches>0,a=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const R=t._delta.map(Math.abs);ea.addTo(t._distance,R)}this.axisIntent&&this.axisIntent(e);const[s,o]=t._movement,[l,u]=n.threshold,{_step:f,values:h}=t;if(n.hasCustomTransform?(f[0]===!1&&(f[0]=Math.abs(s)>=l&&h[0]),f[1]===!1&&(f[1]=Math.abs(o)>=u&&h[1])):(f[0]===!1&&(f[0]=Math.abs(s)>=l&&Math.sign(s)*l),f[1]===!1&&(f[1]=Math.abs(o)>=u&&Math.sign(o)*u)),t.intentional=f[0]!==!1||f[1]!==!1,!t.intentional)return;const p=[0,0];if(n.hasCustomTransform){const[R,N]=h;p[0]=f[0]!==!1?R-f[0]:0,p[1]=f[1]!==!1?N-f[1]:0}else p[0]=f[0]!==!1?s-f[0]:0,p[1]=f[1]!==!1?o-f[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(p);const m=t.offset,y=t._active&&!t._blocked||t.active;y&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=YL(n.bounds,t)),this.setup&&this.setup()),t.movement=p,this.computeOffset()));const[E,b]=t.offset,[[v,x],[S,_]]=t._bounds;t.overflow=[E<v?-1:E>x?1:0,b<S?-1:b>_?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const w=t._active?n.rubberband||[0,0]:[0,0];if(t.offset=kUe(t._bounds,t.offset,w),t.delta=ea.sub(t.offset,m),this.computeMovement(),y&&(!t.last||a>ZUe)){t.delta=ea.sub(t.offset,m);const R=t.delta.map(Math.abs);ea.addTo(t.distance,R),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&a>0&&(t.velocity=[R[0]/a,R[1]/a])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const i=this.handler(Ta(Ta(Ta({},t),e),{},{[this.aliasKey]:e.values}));i!==void 0&&(e.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function JUe([r,e],t){const n=Math.abs(r),i=Math.abs(e);if(n>i&&n>t)return"x";if(i>n&&i>t)return"y"}class HI extends Sie{constructor(...e){super(...e),us(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ea.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const i=typeof n.axisThreshold=="object"?n.axisThreshold[bie(e)]:n.axisThreshold;t.axis=JUe(t._movement,i)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const eBe=r=>r,q$=.15,xie={enabled(r=!0){return r},eventOptions(r,e,t){return Ta(Ta({},t.shared.eventOptions),r)},preventDefault(r=!1){return r},triggerAllEvents(r=!1){return r},rubberband(r=0){switch(r){case!0:return[q$,q$];case!1:return[0,0];default:return ea.toVector(r)}},from(r){if(typeof r=="function")return r;if(r!=null)return ea.toVector(r)},transform(r,e,t){const n=r||t.shared.transform;return this.hasCustomTransform=!!n,n||eBe},threshold(r){return ea.toVector(r,0)}},tBe=0,Bb=Ta(Ta({},xie),{},{axis(r,e,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(r=tBe){return r},bounds(r={}){if(typeof r=="function")return a=>Bb.bounds(r(a));if("current"in r)return()=>r.current;if(typeof HTMLElement=="function"&&r instanceof HTMLElement)return r;const{left:e=-1/0,right:t=1/0,top:n=-1/0,bottom:i=1/0}=r;return[[e,t],[n,i]]}}),TP=10,X$={ArrowRight:(r=1)=>[TP*r,0],ArrowLeft:(r=1)=>[-TP*r,0],ArrowUp:(r=1)=>[0,-TP*r],ArrowDown:(r=1)=>[0,TP*r]};class nBe extends HI{constructor(...e){super(...e),us(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),i={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Bb.bounds(i)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;const i=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=dz(e),n._pointerActive=!0,this.computeValues(TT(e)),this.computeInitial(),t.preventScrollAxis&&bie(e)!=="mouse"?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive||t.type===e.type&&e.timeStamp===t.timeStamp)return;const i=dz(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;const a=TT(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=ea.sub(a,t._values),this.computeValues(a)),ea.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const i=dz(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[a,s]=t._distance;if(t.tap=a<=n.tapsThreshold&&s<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[o,l]=t.direction,[u,f]=t.velocity,[h,p]=t.movement,[m,y]=n.swipe.velocity,[E,b]=n.swipe.distance,v=n.swipe.duration;t.elapsedTime<v&&(Math.abs(u)>m&&Math.abs(h)>E&&(t.swipe[0]=o),Math.abs(f)>y&&Math.abs(p)>b&&(t.swipe[1]=l))}this.emit()}pointerClick(e){this.state.tap||(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,iBe(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const t=X$[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(i),n._keyboardActive=!0,ea.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in X$&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this)),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function iBe(r){"persist"in r&&typeof r.persist=="function"&&r.persist()}const VI=typeof window<"u"&&window.document&&window.document.createElement;function rBe(){return VI&&"ontouchstart"in window}function $$(){return rBe()||VI&&window.navigator.maxTouchPoints>1}function aBe(){return VI&&"onpointerdown"in window}function sBe(){return VI&&"exitPointerLock"in window.document}function oBe(){try{return"constructor"in GestureEvent}catch{return!1}}const $u={isBrowser:VI,gesture:oBe(),touch:$$(),touchscreen:$$(),pointer:aBe(),pointerLock:sBe()},lBe=250,cBe=180,uBe=.5,hBe=50,fBe=250,K$={mouse:0,touch:0,pen:8},dBe=Ta(Ta({},Bb),{},{device(r,e,{pointer:{touch:t=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&$u.pointerLock,$u.touch&&t?"touch":this.pointerLock?"mouse":$u.pointer&&!i?"pointer":$u.touch?"touch":"mouse"},preventScrollAxis(r,e,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&r?lBe:void 0,!(!$u.touchscreen||t===!1))return r||(t!==void 0?"y":void 0)},pointerCapture(r,e,{pointer:{capture:t=!0,buttons:n=1}={}}){return this.pointerButtons=n,!this.pointerLock&&this.device==="pointer"&&t},threshold(r,e,{filterTaps:t=!1,tapsThreshold:n=3,axis:i=void 0}){const a=ea.toVector(r,t?n:i?1:0);return this.filterTaps=t,this.tapsThreshold=n,a},swipe({velocity:r=uBe,distance:e=hBe,duration:t=fBe}={}){return{velocity:this.transform(ea.toVector(r)),distance:this.transform(ea.toVector(e)),duration:t}},delay(r=0){switch(r){case!0:return cBe;case!1:return 0;default:return r}},axisThreshold(r){return r?Ta(Ta({},K$),r):K$}}),pBe=30,mBe=100;class gBe extends Sie{constructor(...e){super(...e),us(this,"ingKey","pinching"),us(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const e=this.state;e._touchIds=[],e.canceled=!1,e.cancel=this.cancel.bind(this),e.turns=0}computeOffset(){const{type:e,movement:t,lastOffset:n}=this.state;e==="wheel"?this.state.offset=ea.add(t,n):this.state.offset=[(1+t[0])*n[0],t[1]+n[1]]}computeMovement(){const{offset:e,lastOffset:t}=this.state;this.state.movement=[e[0]/t[0],e[1]-t[1]]}axisIntent(){const e=this.state,[t,n]=e._movement;if(!e.axis){const i=Math.abs(t)*pBe-Math.abs(n);i<0?e.axis="angle":i>0&&(e.axis="scale")}}restrictToAxis(e){this.config.lockDirection&&(this.state.axis==="scale"?e[1]=0:this.state.axis==="angle"&&(e[0]=0))}cancel(){const e=this.state;e.canceled||setTimeout(()=>{e.canceled=!0,e._active=!1,this.compute(),this.emit()},0)}touchStart(e){this.ctrl.setEventIds(e);const t=this.state,n=this.ctrl.touchIds;if(t._active&&t._touchIds.every(a=>n.has(a))||n.size<2)return;this.start(e),t._touchIds=Array.from(n).slice(0,2);const i=j$(e,t._touchIds);this.pinchStart(e,i)}pointerStart(e){if(e.buttons!=null&&e.buttons%2!==1)return;this.ctrl.setEventIds(e),e.target.setPointerCapture(e.pointerId);const t=this.state,n=t._pointerEvents,i=this.ctrl.pointerIds;if(t._active&&Array.from(n.keys()).every(s=>i.has(s))||(n.size<2&&n.set(e.pointerId,e),t._pointerEvents.size<2))return;this.start(e);const a=DH(...Array.from(n.values()));this.pinchStart(e,a)}pinchStart(e,t){const n=this.state;n.origin=t.origin,this.computeValues([t.distance,t.angle]),this.computeInitial(),this.compute(e),this.emit()}touchMove(e){if(!this.state._active)return;const t=j$(e,this.state._touchIds);this.pinchMove(e,t)}pointerMove(e){const t=this.state._pointerEvents;if(t.has(e.pointerId)&&t.set(e.pointerId,e),!this.state._active)return;const n=DH(...Array.from(t.values()));this.pinchMove(e,n)}pinchMove(e,t){const n=this.state,i=n._values[1],a=t.angle-i;let s=0;Math.abs(a)>270&&(s+=Math.sign(a)),this.computeValues([t.distance,t.angle-360*s]),n.origin=t.origin,n.turns=s,n._movement=[n._values[0]/n._initial[0]-1,n._values[1]-n._initial[1]],this.compute(e),this.emit()}touchEnd(e){this.ctrl.setEventIds(e),this.state._active&&this.state._touchIds.some(t=>!this.ctrl.touchIds.has(t))&&(this.state._active=!1,this.compute(e),this.emit())}pointerEnd(e){const t=this.state;this.ctrl.setEventIds(e);try{e.target.releasePointerCapture(e.pointerId)}catch{}t._pointerEvents.has(e.pointerId)&&t._pointerEvents.delete(e.pointerId),t._active&&t._pointerEvents.size<2&&(t._active=!1,this.compute(e),this.emit())}gestureStart(e){e.cancelable&&e.preventDefault();const t=this.state;t._active||(this.start(e),this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY],this.compute(e),this.emit())}gestureMove(e){if(e.cancelable&&e.preventDefault(),!this.state._active)return;const t=this.state;this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY];const n=t._movement;t._movement=[e.scale-1,e.rotation],t._delta=ea.sub(t._movement,n),this.compute(e),this.emit()}gestureEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}wheel(e){const t=this.config.modifierKey;t&&!e[t]||(this.state._active?this.wheelChange(e):this.wheelStart(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(e){this.start(e),this.wheelChange(e)}wheelChange(e){"uv"in e||e.cancelable&&e.preventDefault();const n=this.state;n._delta=[-Eie(e)[1]/mBe*n.offset[0],0],ea.addTo(n._movement,n._delta),this.state.origin=[e.clientX,e.clientY],this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){const t=this.config.device;t?(e(t,"start",this[t+"Start"].bind(this)),e(t,"change",this[t+"Move"].bind(this)),e(t,"end",this[t+"End"].bind(this)),e(t,"cancel",this[t+"End"].bind(this))):e("wheel","",this.wheel.bind(this),{passive:!1})}}const vBe=Ta(Ta({},xie),{},{device(r,e,{shared:t,pointer:{touch:n=!1}={}}){if(t.target&&!$u.touch&&$u.gesture)return"gesture";if($u.touch&&n)return"touch";if($u.touchscreen){if($u.pointer)return"pointer";if($u.touch)return"touch"}},bounds(r,e,{scaleBounds:t={},angleBounds:n={}}){const i=s=>{const o=Y$(YL(t,s),{min:-1/0,max:1/0});return[o.min,o.max]},a=s=>{const o=Y$(YL(n,s),{min:-1/0,max:1/0});return[o.min,o.max]};return typeof t!="function"&&typeof n!="function"?[i(),a()]:s=>[i(s),a(s)]},threshold(r,e,t){return this.lockDirection=t.axis==="lock",ea.toVector(r,this.lockDirection?[.1,3]:0)},modifierKey(r){return r===void 0?"ctrlKey":r}});class yBe extends HI{constructor(...e){super(...e),us(this,"ingKey","moving")}move(e){this.config.mouseOnly&&e.pointerType!=="mouse"||(this.state._active?this.moveChange(e):this.moveStart(e),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(e){this.start(e),this.computeValues(TT(e)),this.compute(e),this.computeInitial(),this.emit()}moveChange(e){if(!this.state._active)return;const t=TT(e),n=this.state;n._delta=ea.sub(t,n._values),ea.addTo(n._movement,n._delta),this.computeValues(t),this.compute(e),this.emit()}moveEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}bind(e){e("pointer","change",this.move.bind(this)),e("pointer","leave",this.moveEnd.bind(this))}}const ABe=Ta(Ta({},Bb),{},{mouseOnly:(r=!0)=>r});class bBe extends HI{constructor(...e){super(...e),us(this,"ingKey","scrolling")}scroll(e){this.state._active||this.start(e),this.scrollChange(e),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(e){e.cancelable&&e.preventDefault();const t=this.state,n=qUe(e);t._delta=ea.sub(n,t._values),ea.addTo(t._movement,t._delta),this.computeValues(n),this.compute(e),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("scroll","",this.scroll.bind(this))}}const _Be=Bb;class EBe extends HI{constructor(...e){super(...e),us(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=Eie(e),ea.addTo(t._movement,t._delta);const[n,i]=t.overflow,[a,s]=t._delta,[o,l]=t._direction;(n<0&&a>0&&o<0||n>0&&a<0&&o>0)&&(t._movement[0]=t._movementBound[0]),(i<0&&s>0&&l<0||i>0&&s<0&&l>0)&&(t._movement[1]=t._movementBound[1]),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}}const SBe=Bb;class xBe extends HI{constructor(...e){super(...e),us(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&e.pointerType!=="mouse"||(this.start(e),this.computeValues(TT(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&e.pointerType!=="mouse")return;const t=this.state;if(!t._active)return;t._active=!1;const n=TT(e);t._movement=t._delta=ea.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}}const TBe=Ta(Ta({},Bb),{},{mouseOnly:(r=!0)=>r}),e8=new Map,OH=new Map;function wBe(r){e8.set(r.key,r.engine),OH.set(r.key,r.resolver)}const CBe={key:"drag",engine:nBe,resolver:dBe},MBe={key:"hover",engine:xBe,resolver:TBe},RBe={key:"move",engine:yBe,resolver:ABe},IBe={key:"pinch",engine:gBe,resolver:vBe},NBe={key:"scroll",engine:bBe,resolver:_Be},DBe={key:"wheel",engine:EBe,resolver:SBe};function OBe(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function PBe(r,e){if(r==null)return{};var t=OBe(r,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}const LBe={target(r){if(r)return()=>"current"in r?r.current:r},enabled(r=!0){return r},window(r=$u.isBrowser?window:void 0){return r},eventOptions({passive:r=!0,capture:e=!1}={}){return{passive:r,capture:e}},transform(r){return r}},UBe=["target","eventOptions","window","enabled","transform"];function oL(r={},e){const t={};for(const[n,i]of Object.entries(e))switch(typeof i){case"function":t[n]=i.call(t,r[n],n,r);break;case"object":t[n]=oL(r[n],i);break;case"boolean":i&&(t[n]=r[n]);break}return t}function BBe(r,e){const t=r,{target:n,eventOptions:i,window:a,enabled:s,transform:o}=t,l=PBe(t,UBe),u={shared:oL({target:n,eventOptions:i,window:a,enabled:s,transform:o},LBe)};if(e){const f=OH.get(e);u[e]=oL(Ta({shared:u.shared},l),f)}else for(const f in l){const h=OH.get(f);h&&(u[f]=oL(Ta({shared:u.shared},l[f]),h))}return u}class Tie{constructor(e,t){us(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,i,a){const s=this._listeners,o=jUe(t,n),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=Ta(Ta({},l),a);e.addEventListener(o,i,u);const f=()=>{e.removeEventListener(o,i,u),s.delete(f)};return s.add(f),f}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class kBe{constructor(){us(this,"_timeouts",new Map)}add(e,t,n=140,...i){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...i))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class FBe{constructor(e){us(this,"gestures",new Set),us(this,"_targetEventStore",new Tie(this)),us(this,"gestureEventStores",{}),us(this,"gestureTimeoutStores",{}),us(this,"handlers",{}),us(this,"config",{}),us(this,"pointerIds",new Set),us(this,"touchIds",new Set),us(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),GBe(this,e)}setEventIds(e){if(ZU(e))return this.touchIds=new Set(YUe(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=BBe(e,t)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let i;if(!(t.target&&(i=t.target(),!i))){if(t.enabled){for(const s of this.gestures){const o=this.config[s],l=Z$(n,o.eventOptions,!!i);if(o.enabled){const u=e8.get(s);new u(this,e,s).bind(l)}}const a=Z$(n,t.eventOptions,!!i);for(const s in this.nativeHandlers)a(s,"",o=>this.nativeHandlers[s](Ta(Ta({},this.state.shared),{},{event:o,args:e})),void 0,!0)}for(const a in n)n[a]=KUe(...n[a]);if(!i)return n;for(const a in n){const{device:s,capture:o,passive:l}=VUe(a);this._targetEventStore.add(i,s,"",n[a],{capture:o,passive:l})}}}}function bx(r,e){r.gestures.add(e),r.gestureEventStores[e]=new Tie(r,e),r.gestureTimeoutStores[e]=new kBe}function GBe(r,e){e.drag&&bx(r,"drag"),e.wheel&&bx(r,"wheel"),e.scroll&&bx(r,"scroll"),e.move&&bx(r,"move"),e.pinch&&bx(r,"pinch"),e.hover&&bx(r,"hover")}const Z$=(r,e,t)=>(n,i,a,s={},o=!1)=>{var l,u;const f=(l=s.capture)!==null&&l!==void 0?l:e.capture,h=(u=s.passive)!==null&&u!==void 0?u:e.passive;let p=o?n:zUe(n,i,f);t&&h&&(p+="Passive"),r[p]=r[p]||[],r[p].push(a)},zBe=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function HBe(r){const e={},t={},n=new Set;for(let i in r)zBe.test(i)?(n.add(RegExp.lastMatch),t[i]=r[i]):e[i]=r[i];return[t,e,n]}function _x(r,e,t,n,i,a){if(!r.has(t)||!e8.has(n))return;const s=t+"Start",o=t+"End",l=u=>{let f;return u.first&&s in e&&e[s](u),t in e&&(f=e[t](u)),u.last&&o in e&&e[o](u),f};i[n]=l,a[n]=a[n]||{}}function VBe(r,e){const[t,n,i]=HBe(r),a={};return _x(i,t,"onDrag","drag",a,e),_x(i,t,"onWheel","wheel",a,e),_x(i,t,"onScroll","scroll",a,e),_x(i,t,"onPinch","pinch",a,e),_x(i,t,"onMove","move",a,e),_x(i,t,"onHover","hover",a,e),{handlers:a,config:e,nativeHandlers:n}}function jBe(r,e={},t,n){const i=Ya.useMemo(()=>new FBe(r),[]);if(i.applyHandlers(r,n),i.applyConfig(e,t),Ya.useEffect(i.effect.bind(i)),Ya.useEffect(()=>i.clean.bind(i),[]),e.target===void 0)return i.bind.bind(i)}function QBe(r){return r.forEach(wBe),function(t,n){const{handlers:i,nativeHandlers:a,config:s}=VBe(t,n||{});return jBe(i,s,void 0,a)}}function wie(r,e){return QBe([CBe,IBe,NBe,DBe,RBe,MBe])(r,e||{})}function WBe({children:r,guid:e,onDragStartHandler:t,onDragEndHandler:n,onItemClickHandler:i,onPointerEnter:a,onPointerLeave:s,dragging:o=!1,intersectingGhostObject:l=null,isInteractive:u=!0,initialIntersectedGhostUUID:f=null,isSnapAllowed:h=!1,...p}){const m=oe.useRef(),y=oe.useRef(-1),E=oe.useRef([]),b=oe.useRef([]),{raycaster:v,size:x,camera:S}=fs(),_=ui(W=>W.isAnyHotspotActive),w=Je(W=>W.multipleTouchDetected),[R,N]=oe.useState(null),{raycasterGhost:L}=oe.useMemo(()=>({raycasterGhost:new Sy})),I=W=>{let V;return W.isGhost===!0?V=W:W.parent?W.parent.isGhost===!0?V=W.parent:V=I(W.parent):V=null,V},D=W=>{L.setFromCamera(W,S);const V=L.intersectObject(mr.getState().ghostParentRef);let $=null;return V.length>0&&($=I(V[0].object)),$},k=W=>{let V=W.whichNodesAreAttachedToUs();return V.map($=>{k($).map(pe=>{V.push(pe)})}),V},{initialMouse2D:F,mouse2D:U,mouse3D:G,offset:j,normal:Q,plane:H,pointerDownPos:K}=oe.useMemo(()=>({initialMouse2D:new Rt,mouse2D:new Rt,mouse3D:new ve,offset:new ve,normal:new ve,plane:new Sm,pointerDownPos:new Rt}),[]);oe.useEffect(()=>{let W=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);N(W)},[]);const J=wie({onPointerEnter:W=>{w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||Je.getState().itemDraggedSkuID||Je.getState().cameraActive!==!0&&!Je.getState().dragging&&!_&&(R&&!R.isEndNode?nt.switchCursor(eo.POINTER):nt.switchCursor(eo.GRAB),a(W.event))},onPointerLeave:W=>{w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||Je.getState().itemDraggedSkuID||Je.getState().cameraActive!==!0&&!Je.getState().dragging&&!_&&(nt.switchCursor(eo.GRAB),s(W.event))},onClick:W=>{if(W.event.stopPropagation(),!w){if(Je.getState().builderMode){const{eventObject:V,point:$}=W.event;V.getWorldPosition(j).sub($),G.copy($);const re=W.event.offsetX,pe=W.event.offsetY,ue=re/x.width*2-1,ce=-pe/x.height*2+1;U.set(ue,ce);const ye=new Sy;ye.setFromCamera(U,S);const Se=ye.intersectObject(Je.getState().sceneRef.getObjectByName("proxyGeometry"));Se.length>0&&nt.fireEvent(nt.EVENTS.CONFIGURATION.OnClickItem,{point:Se[0].point,camera:ye.camera})}if(!Je.getState().sceneSettings.disableContextMenu)if(!W.dragging&&!_){if(Math.abs(W.event.x-K.x)>1)return;i(W.event.offsetX,W.event.offsetY,e)}else ui.getState().actions.exitHotspot(!0)}},onDrag:async W=>{if(Je.getState().simulateDragEnd===!0||Je.getState().dragging&&Je.getState().draggingItemGUID!==R.guid||Je.getState().sceneSettings.disableDragDrop)return;const V=W.event;if(V.stopPropagation(),_){nt.switchCursor(eo.BLOCKED);return}if(Wt.getState().selectedItemData){nt.switchCursor(eo.BLOCKED);return}if(Object.keys(Wt.getState().itemsSpawned).length<2){nt.switchCursor(eo.BLOCKED);return}const re=W.event.offsetX,pe=W.event.offsetY;if(!Je.getState().dragging){if(Wt.setState({busy:!0}),Math.abs(V.x-K.x)<=1)return;if(R&&!R.canDrag){nt.switchCursor(eo.BLOCKED);return}const We=R.whichPlugAreWeAttachedUsing().attachedPlug.guid;let Fe=R.swapRoot();Fe||(Fe={rootDetachedPlugs:R.detachNodeFromReceiver()}),E.current=k(R),b.current=[],E.current.map(He=>{b.current.push(He.guid),R.ref.attach(He.ref)}),nt.switchCursor(eo.MOVE),Je.setState({dragging:!0}),Je.setState({draggingItemGUID:R.guid}),h=!1,l=null,f=null,y.current=-1;const ie=re/x.width*2-1,qe=-pe/x.height*2+1;F.set(ie,qe);const Me=await t({guid:e,node:R,detachedData:Fe,attachedChildrenGuids:b.current});if(Me.length<=0||Me.transforms===void 0)return;Me.transforms.map((He,Oe)=>{He.receiverPlugGUID===We&&(y.current=Oe)})}const ue=re/x.width*2-1,ce=-pe/x.height*2+1;U.set(ue,ce),v.setFromCamera(U,S),S.getWorldDirection(Q).negate(),H.setFromNormalAndCoplanarPoint(Q,G),v.ray.intersectPlane(H,G);const ye=mr.getState().ghostParentRef;ye.children.length>0&&(l=D(U),f===null&&y.current!==-1&&y.current<ye.children.length&&ye.children[y.current]!==void 0&&(f=ye.children[y.current].children[0].uuid),l&&f!==null&&f!==l.uuid&&!h&&(h=!0),!h&&!l&&(h=!0)),l&&h?(mr.setState({ghostVisibility:!1}),R.ref.position.set(l.position.x,l.position.y,l.position.z),R.ref.setRotationFromEuler(l.rotation)):(mr.setState({ghostVisibility:!0}),R.ref.position.copy(G).add(j)),(ue>1||ue<-1||ce<-1||ce>1)&&(Je.setState({simulateDragEnd:!0}),Je.setState({dragging:!1}),Je.setState({draggingItemGUID:null}),Wt.setState({busy:!1}),nt.switchCursor(eo.GRAB),n({node:R,intersectingGhostObject:l,attachedChildrenGuids:b.current,attachedNodesToCurrentNode:E.current}))},onDragStart:({event:W})=>{if(Je.setState({simulateDragEnd:!1}),w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu)return;W.stopPropagation();const{eventObject:V,point:$}=W;V.getWorldPosition(j).sub($),G.copy($),K.set(W.x,W.y)},onDragEnd:({event:W})=>{Je.setState({simulateDragEnd:!1}),!(Je.getState().dragging&&Je.getState().draggingItemGUID!==R.guid)&&(Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||(W.stopPropagation(),Je.setState({dragging:!1}),Je.setState({draggingItemGUID:null}),Wt.setState({busy:!1}),nt.switchCursor(eo.GRAB),n({node:R,intersectingGhostObject:l,attachedChildrenGuids:b.current,attachedNodesToCurrentNode:E.current})))}});return ne(hi,{children:u?ne("group",{ref:m,...J(),...p,children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:479,columnNumber:9},this):ne("group",{ref:m,...p,children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:483,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:477,columnNumber:5},this)}const YBe=({modelData:r,clonedMesh:e,clonedProxyMesh:t,itemKey:n,scale:i,onItemClickHandler:a,onDragEndHandler:s,onDragStartHandler:o,stockAlert:l=!0})=>{const u=ui(Q=>Q),f=Wt(Q=>Q),h=Wt(Q=>Q.hoveredItemRef),p=oe.useRef(null),m=oe.useRef(null),y=oe.useRef([]),E=oe.useRef(null),[b,v]=oe.useState(e),[x,S]=oe.useState(t),_=oe.useRef(0),w=oe.useRef(0),{ref:R,actions:N,names:L}=VLe(r.data.animations),I=oe.useCallback((Q,H,K,J)=>qBe(Q,H,K,J,L,N),[L,N]),D=oe.useCallback(Q=>XBe(Q,L,N),[L,N]);oe.useEffect(()=>{if(p.current===n.itemData.guid){p.current=null;let Q=u.lastActiveHotspotData.hotspotData;if(!Q)return;if(Q.exitAnim?I(Q.exitAnim,!1,!1,!1):Q.entryAnim&&I(Q.entryAnim,!1,!0,!1),Q.activeAnim&&D(Q.activeAnim),u.activeHotspotData){if(n.itemData.guid===u.activeHotspotData.itemData.guid){p.current=n.itemData.guid;let H=u.activeHotspotData.hotspotData;if(!H)return;H.entryAnim&&I(H.entryAnim,!1,!1,!0),H.activeAnim&&I(H.activeAnim,!0,!1,!1)}}else return}else if(u.activeHotspotData){if(n.itemData.guid===u.activeHotspotData.itemData.guid){p.current=n.itemData.guid;let Q=u.activeHotspotData.hotspotData;if(!Q)return;Q.entryAnim&&I(Q.entryAnim,!1,!1,!0),Q.activeAnim&&I(Q.activeAnim,!0,!1,!1)}}else return},[u.activeHotspotData]),oe.useEffect(()=>{Je.getState().actions.triggerAutoFocus(),nt.fireEvent(nt.EVENTS.SCENE.Item_Added,{...n})},[]);const k=oe.useCallback(()=>{if(!R.current||(y.current=_Ue(b,R.current.inStock),y.current.length==0))return;if(R.current.inStock===!1){l==!0&&(l=!1,nt.alert({alertMsg:"Some item(s) in configuration are out of stock",alertTime:7e3,alertType:"warn",alertLabel:"Stock Alert",persistant:!0,alertId:"outOfStock"}));return}const{current:Q}=w;for(let H=0;H<y.current.length;H++){const K=y.current[H].material;if(K.emissiveIntensity==Q)return;K.emissiveIntensity=Q}},[w,R]),F=oe.useCallback(()=>{_.current=0},[y]),U=oe.useCallback(()=>{_.current=.005},[y,b]);Km(()=>{Je.getState().builderMode||(w.current=MI.lerp(w.current,_.current,.1),k())}),oe.useEffect(()=>{const Q=ln.getState().attachmentSystem.currentStructure,H=Q.getNodeByGUID(n.itemData.guid);if(H?.isDependent&&!H.isInteractive&&Object.keys(h).length>0){const K=Q.getNodeByGUID(Object.keys(h)[0]);if(!K||!K.myDependenciesGUID)return;K.myDependenciesGUID.includes(n.itemData.guid)?F():U()}else h.hasOwnProperty(n.itemData.guid)||Object.keys(h).length==0?F():U()},[h]);const G=oe.useCallback(Q=>{Q.stopPropagation();const H=f.selectedItemData;Je.setState({canvasTooltipText:"-"+n.itemData.name+"-"}),H||Wt.setState({hoveredItemRef:{}});let K=Wt.getState().hoveredItemRef;K.hasOwnProperty(n.itemData.guid)||(K[n.itemData.guid]={instance:R.current},f.actions.setHoveredItemRef({...K}))},[f,h,m]),j=oe.useCallback(Q=>{Q.stopPropagation();const H=f.selectedItemData;if(Je.setState({canvasTooltipText:""}),H){if(H.itemData.guid==n.itemData.guid)return;h[n.itemData.guid]&&(delete h[n.itemData.guid],f.actions.setHoveredItemRef({...h}))}else Wt.setState({hoveredItemRef:{}})},[m,f,h]);return oe.useEffect(()=>{if(E.current)return f.collidersRef.push(E),f.actions.setCollidersRef([...f.collidersRef]),()=>{const Q=f.collidersRef.indexOf(E);Q>-1&&f.collidersRef.splice(Q,1),f.actions.setCollidersRef([...f.collidersRef])}},[E]),ne(hi,{children:[ne("primitive",{name:"GRP_RenderGeometry",ref:R,object:b,scale:i,inStock:!0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:240,columnNumber:7},globalThis),(n.itemData.hasOwnProperty("disableCollider")?!n.itemData.disableCollider:!Je.getState().sceneSettings.disableCollider)&&ne("group",{name:"GRP_LoadingPlaceholder",children:ne("group",{position:n.itemData.boundingSphereCenter,scale:[.9,.9,.9],name:"boxGeometry",children:ne(lie,{ref:E,scale:Fx(n.itemData.boundingBoxSize),visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:257,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:252,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:251,columnNumber:9},globalThis),r.proxy.isLoaded&&ne(WBe,{guid:n.itemData.guid,onDragStartHandler:o,onDragEndHandler:s,onItemClickHandler:a,onPointerEnter:G,onPointerLeave:j,name:"GRP_ProxyMesh",isInteractive:n.itemData.isInteractive,children:ne("primitive",{name:"proxyGeometry",object:x,scale:i,visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:277,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:267,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:239,columnNumber:5},globalThis)};function qBe(r,e,t,n,i,a){if(!i.includes(r))return;const s=a[r];s.setLoop(e?JV:ZV),s.clampWhenFinished=!e,n&&s.reset(),t?s.fadeOut(.5).play():s.fadeIn(.5).play()}function XBe(r,e,t){if(!e.includes(r))return;t[r].stop()}function $Be({distanceFactor:r,position:e,proxymodel:t,scale:n}){return ne("primitive",{position:[0,0,0],name:"proxyLoader",object:t,scale:n,visible:!0,wireframe:!0,children:ne(IR,{center:!0,position:e,distanceFactor:r,zIndexRange:[29,0],children:ne("img",{alt:"Loading...",draggable:"false",src:Om+"/Animation/Loading.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:32,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:25,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:17,columnNumber:5},this)}function KBe({proxymodel:r,itemKey:e,scale:t}){return oe.useEffect(()=>{ln.getState().actions.updateFittingSkuIds()},[]),ne("group",{children:[(e.itemData.hasOwnProperty("disableCollider")?!e.itemData.disableCollider:!Je.getState().sceneSettings.disableCollider)&&ne("group",{name:"GRP_LoadingPlaceholder",children:ne("group",{position:e.itemData.boundingSphereCenter,scale:[.9,.9,.9],name:"boxGeometry",children:ne(lie,{scale:Fx(e.itemData.boundingBoxSize),visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:65,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:60,columnNumber:11},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:59,columnNumber:9},this),ne("group",{name:"GRP_ProxyMesh",children:ne("primitive",{name:"proxyGeometry",object:r.clone(),scale:t,visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:73,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:55,columnNumber:5},this)}const ZBe=({position:r,rotation:e,itemKey:t,scale:n,rejectFunc:i,onItemClickHandler:a,onDragEndHandler:s,onDragStartHandler:o,itemIndex:l,proxyScene:u})=>{const f=Je(x=>x.sceneRef),h=Mo(x=>x),[p,m]=oe.useState(null),[y,E]=oe.useState(u.clone()),b=oe.useRef(null);oe.useEffect(()=>((async()=>{let x=await h.actions.loadAsset(t.itemData.skuID).catch((w,R)=>{i(w,R,t.itemData.guid)});if(!x||!x.data){m({data:null,clonedMesh:null,mainModelReady:!1});return}let S=x.data,_;t.itemData.replace===!0?_=S.scene:_=S.scene.clone(),t.itemData.clonedScene=_,S.functions&&(S.functions.copyVariantMaterials(_,S.scene),await v(S,_)),zt.info({title:"model loaded: "+t.itemData.skuID}),t.itemData.hasItemLoaded=!0,Wt.getState().actions.triggerModelLoaded(),nt.fireEvent(nt.EVENTS.SCENE.Model_Loaded,t.itemData.skuID),m({data:x,clonedMesh:_,mainModelReady:!0})})(),()=>{nt.fireEvent(nt.EVENTS.SCENE.Model_Removed,t.itemData.skuID)}),[]);const v=oe.useCallback(async(x,S)=>{const _=ln.getState().attachmentSystem;var w=_.currentStructure.getNodeByGUID(t.itemData.guid);if(!w)return;let R="";if(w.overrideVariant)R=w.overrideVariant,nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!0);else{const N=_.globalVariants;if(!N||N.Count<=0)return;let L=[];Object.keys(N).map((I,D)=>{L.push(N[I])}),t.itemData.looks?.map(I=>{L.includes(I)&&(R=I)}),R||(R=t.itemData.looks[0])}return R&&(w.currentVariant=R,await x.functions.selectVariant(S,R),Wt.setState({variantChangeAlert:!Wt.getState().variantChangeAlert})),R},[]);return oe.useEffect(()=>{if(!b.current)return;const x=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t.itemData.guid);x&&p!==null?(x.ref=b.current,x.transform={position:r,rotation:e},ln.getState().actions.updateFittingSkuIds()):zt.warn({title:t.itemData.guid})},[b,p]),oe.useEffect(()=>{if(b.current&&f&&t.itemData.hasOwnProperty("excludeFromSceneBounds")&&t.itemData.excludeFromSceneBounds){const x=f.getObjectByName("#GRP_EXCLUDED");x!==void 0&&x.attach(b.current)}},[f,b]),ne("group",{ref:b,position:r,quaternion:e,name:`GRP_${t.itemData.name}_`+l.toString().padStart(2,"0"),children:[p!==null&&(p.mainModelReady?ne(YBe,{modelData:p.data,clonedMesh:p.clonedMesh,clonedProxyMesh:y,itemKey:t,scale:n,onDragStartHandler:o,onDragEndHandler:s,onItemClickHandler:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:264,columnNumber:11},globalThis):ne(KBe,{itemKey:t,proxymodel:y,scale:n},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:275,columnNumber:11},globalThis)),p==null&&y&&ne($Be,{proxymodel:y,distanceFactor:t.itemData.boundingBoxSize.x*4>1?1:t.itemData.boundingBoxSize.x*4,position:t.itemData.boundingSphereCenter,scale:n},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:283,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:254,columnNumber:5},globalThis)};function JBe({index:r,children:e,...t}){const n=oe.useRef(),i=wie({onPointerEnter:a=>{a.event.stopPropagation(),Je.getState().itemDraggedSkuID&&Je.setState({hoveredGhostIndex:r})},onPointerLeave:a=>{a.event.stopPropagation(),Je.getState().itemDraggedSkuID&&Je.setState({hoveredGhostIndex:-1})}});return ne("group",{ref:n,...i(),...t,children:e},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/GhostEventHandler.js",lineNumber:22,columnNumber:5},this)}const e3e=({ghostData:r,ghostTransform:e,index:t})=>{const n=oe.useRef(),i=oe.useMemo(()=>r.proxyScene.clone(),[r]),a=Je(o=>o.hoveredGhostIndex),s=new Yt(.6,.98,0);return oe.useEffect(()=>{const{current:o}=n;o&&(o.userData.incomingPlugName=e.incomingPlugName,o.userData.receiverPlugName=e.receiverPlugName,o.userData.incomingPlugGUID=e.incomingPlugGUID,o.userData.receiverPlugGUID=e.receiverPlugGUID,nt.fireEvent(nt.EVENTS.SCENE.Ghost_Loaded,{ghostData:r,ghostTransform:e}))},[n]),oe.useEffect(()=>{if(!i||!Je.getState().itemDraggedSkuID)return;let o;a===t?o=s:o=Je.getState().sceneSettings.ghostThreeColor,i.traverse(l=>{l.isMesh===!0&&(l.material=l.material.clone(),l.material.emissive=o)})},[a,i]),ne(hi,{children:ne(JBe,{index:t,children:ne("primitive",{isGhost:!0,ref:n,index:t,position:e.position,quaternion:e.rotation,object:i,castShadow:!1,receiveShadow:!1,frustumCulled:!1},`ghost${t}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:59,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:58,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:57,columnNumber:5},globalThis)},t3e=({intersectingGhostObject:r=null})=>{const{camera:e}=fs(),t=mr(l=>l.ghostVisibility),n=mr(l=>l.ghostData),i=mr(l=>l.ghostsTransform),a=oe.useRef(),{_touch2D:s}=oe.useMemo(()=>({_touch2D:new Rt}),[]);oe.useEffect(()=>{const{current:l}=a;l&&mr.setState({ghostParentRef:l})},[a]);const o=l=>{let u=0,f=0;if(l.touches&&l.touches[0])u=l.touches[0].clientX,f=l.touches[0].clientY;else return;if(!Je.getState().itemDraggedSkuID)return;const h=Je.getState().cursorParentRef,p=Je.getState().canvasSize;if(!h)return;const m=h.getBoundingClientRect(),y=m.top,E=m.left,b=(u-E)/p.width*2-1,v=(-f+y)/p.height*2+1;s.set(b,v);const x=new Sy;x.setFromCamera(s,e);const S=x.intersectObject(mr.getState().ghostParentRef);S.length>0?(r=S[0].object,Je.setState({hoveredGhostIndex:r.parent.index})):(r=null,Je.setState({hoveredGhostIndex:-1}))};return oe.useEffect(()=>{window.addEventListener("touchmove",o,!1),zt.info({title:"Ghost Manager Mounted!"})},[]),ne("group",{name:"#GRP_GhostParent",visible:t,ref:a,children:n&&ne(hi,{children:i.map((l,u)=>u<n.count&&ne(e3e,{ghostData:n,ghostTransform:l,index:u},"ghosts"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:89,columnNumber:17},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:85,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:79,columnNumber:5},globalThis)},n3e=()=>{const r=ln(L=>L.attachmentSystem),e=ln(L=>L),t=Wt(L=>L.removeItemTrigger),n=Wt(L=>L.variantChangeAlert),i=ui(L=>L),a=Je(L=>L.showDimensions);Je(L=>L.sceneSettings);const s=Wt(L=>L),o=Wt(L=>L.lastDeletedItemData),l=wr(L=>L),u=Wt(L=>L.selectedItemData),f=Wt(L=>L.itemsSpawned),h=oe.useRef(null),p=oe.useRef(null),m=oe.useRef(!1),y=oe.useRef(null),E=oe.useRef(null),b=oe.useRef(!1),v=oe.useRef(!1);oe.useRef(!1),oe.useRef(!1);const x=oe.useCallback(({guid:L,node:I,detachedData:D,attachedChildrenGuids:k})=>{if(m.current!==!0)return m.current=!0,wr.setState({canCameraRotate:!1}),i.actions.switchHotspotsVisibility(!1,!0),y.current={position:I.ref.position.clone(),rotation:I.ref.rotation.clone()},E.current=D,r.currentStructure.removeNodeFromStructure(I),k.length<=0&&(k=!1),mr.getState().actions.spawnGhostsForSkuID(f[L].itemData.skuID,k)},[l,f]),S=oe.useCallback(({node:L,intersectingGhostObject:I,attachedChildrenGuids:D,attachedNodesToCurrentNode:k})=>{if(!m.current)return;m.current=!1,wr.setState({canCameraRotate:!0}),i.actions.switchHotspotsVisibility(!0,!0);function F(){L.ref.position.set(0,0,0),mr.getState().actions.clearAllGhosts()}if(!mr.getState().ghostData?.connectablePlugs){F();return}r.currentStructure.addNode(L);let G=null,j=null,Q=!1,H=[],K={};if(Je.getState().sceneSettings.ignoreCollisionPostDragging===!1&&D.map((J,W)=>{H[W]=r.currentStructure.checkCollisionforGUID(J),H[W]&&(K[J]=f[J])}),H.map(J=>{Q||(Q=J)}),I&&Q){Je.setState({draggingOnDropCollisionData:{node:L,attachedChildrenGuids:D,collidingStatus:H,intersectingGhostObject:I,initPosition:y.current.position,initRotation:y.current.rotation,detachedPlugs:E.current,attachedNodesToCurrentNode:k}}),L.ref.position.set(I.position.x,I.position.y,I.position.z),L.ref.setRotationFromEuler(I.rotation),nt.fireEvent(nt.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,K);return}if(I){const J=I.userData;G=L.getPlugByName(J.incomingPlugName),j=r.currentStructure.getPlugByGUID(J.receiverPlugGUID),L.ref.position.set(I.position.x,I.position.y,I.position.z),L.ref.setRotationFromEuler(I.rotation),L.transform={position:I.position,rotation:I.quaternion}}else{const J=E.current.neighbourDetachedPlugs;J&&(E.current.neighbourNode.detachNodeFromReceiver(),r.currentStructure.connectPlugs({incomingPlug:J.incomingPlug,receiverPlug:J.receiverPlug})),G=E.current.rootDetachedPlugs.incomingPlug,j=E.current.rootDetachedPlugs.receiverPlug,L.ref.position.set(y.current.position.x,y.current.position.y,y.current.position.z),L.ref.setRotationFromEuler(y.current.rotation);let W=new Xi().identity();L.ref.getWorldQuaternion(W),L.transform={position:y.current.position,rotation:W}}r.currentStructure.connectPlugs({incomingPlug:G,receiverPlug:j}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),k.map(J=>{L.ref.parent.attach(J.ref)}),ln.getState().actions.updateFittingSkuIds()},[l,Je,mr,r,e,f]),_=oe.useCallback((L,I,D)=>{if(Je.getState().sceneSettings.disableContextMenu)return;const k=ln.getState().attachmentSystem.currentStructure,F=k.getNodeByGUID(D);let U=[];if(!F.myDependenciesGUID)return;F.myDependenciesGUID.map(Q=>{const H=k.getNodeByGUID(Q);let K={guid:Q,name:f[Q].itemData.guid,data:{...f[Q],overrideVariant:H.overrideVariant,currentVariant:H.currentVariant,offsetX:L,offsetY:I}};U.push(K)}),U.sort((Q,H)=>Q.name>H.name?1:H.name>Q.name?-1:0);let G=zd.getState().inventoryData[f[D].itemData.skuID];const j={primary:{guid:D,name:f[D].itemData.name,data:{inventory:G,...f[D],overrideVariant:F.overrideVariant,currentVariant:F.currentVariant,offsetX:L,offsetY:I}},dependencies:U};s.actions.setSelectedItemData(j.primary.data),nt.fireEvent(nt.EVENTS.UI.ContextMenu_Show,j)},[f]),w=oe.useCallback(L=>{L&&(Wt.setState({lastDeletedItemData:{...f[L]}}),nt.fireEvent(nt.EVENTS.SCENE.Item_Removed,{...f[L]}),delete f[L],s.actions.setItemsSpawned({...f}))},[s,Wt,f]);oe.useEffect(()=>{let L=Wt.getState().removeItems;if(L.length<=0&&!o)return;let I=L.pop();w(I)},[t,o]);const R=oe.useCallback(function(L,I){const D=L>0,k=L<=0;zt.groupCollapsed("Resolving buttons visibility"),zt.table({sceneIsEmpty:k,sceneIsNotEmpty:D}),zt.groupEnd(),I.showViewInYourSpaceBtn===!0&&(D&&b.current===!1?(nt.fireEvent(nt.EVENTS.UI.ViewInYourSpaceButton_Show),b.current=!0):k&&b.current===!0&&(nt.fireEvent(nt.EVENTS.UI.ViewInYourSpaceButton_Hide),b.current=!1)),I.showShareBtn===!0&&(D&&v.current===!1?(nt.fireEvent(nt.EVENTS.UI.ShareButton_Show),v.current=!0):k&&v.current===!0&&(nt.fireEvent(nt.EVENTS.UI.ShareButton_Hide),v.current=!1))},[f]);oe.useEffect(()=>{nt.fireEvent(nt.EVENTS.SCENE.Items_Updated,{itemsSpawned:f});const L=Je.getState().sceneSettings;R(Object.keys(f).length,L),Object.keys(f).length==0?Je.setState({canvasTooltipText:L.textSettings.tooltipEmptySceneText}):Object.keys(f).length==1&&Je.setState({canvasTooltipText:L.textSettings.tooltipInstructionText})},[f]),oe.useEffect(()=>{const L=ln.getState().attachmentSystem;if(!L)return;zd.getState().actions.refreshInventory(f);const I=L.getCartItems();nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,I),nt.fireEvent(nt.EVENTS.SCENE.ReplaceableCategory_Updated,L.currentStructure.getCurrentItemsInReplaceableCategory())},[f,n]);const N=oe.useCallback((L,I,D)=>{nt.removeItemByGUID(D),nt.alert({alertMsg:I+": "+L,alertTime:5e3,alertType:"error",alertLabel:"Error",persistant:!0})},[]);return oe.useEffect(()=>{const{current:L}=p;L&&ln.setState({colliderMeshRef:L})},[p]),oe.useEffect(()=>{const{current:L}=h;L&&Je.setState({sceneRef:L})},[h]),oe.useEffect(()=>{let L=u?wr.getState().cameraSettings.zoomingMultiplier:wr.getState().cameraSettings.zoomingMultiplier+.1;L+=a?.3:.1,wr.setState({boundsMargin:L}),Je.getState().actions.triggerAutoFocus()},[a,u]),oe.useEffect(()=>{zt.info({title:"item Manager mounted"}),Je.getState().preconfigurationLoaded||ln.getState().actions.loadDefaultStructure()},[]),ne(hi,{children:[ne("group",{name:"Scene",ref:h,onPointerMissed:()=>{u&&s.actions.deselectItem(),ui.getState().isAnyHotspotActive&&ui.getState().actions.exitHotspot()},children:[eUe,ne("group",{name:"#GRP_EXCLUDED"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:466,columnNumber:9},globalThis),ne("group",{name:"#ITEMSANDGHOSTS",children:[ne("group",{name:"#ITEMS",children:Object.keys(f).map((L,I)=>ne(ZBe,{scale:[1,1,1],onDragStartHandler:x,onDragEndHandler:S,onItemClickHandler:_,itemKey:f[L],position:f[L].itemData.position,rotation:f[L].itemData.rotation,itemIndex:I,proxyScene:f[L].itemData.proxyScene,rejectFunc:N},L,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:470,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:468,columnNumber:11},globalThis),ne(t3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:485,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:467,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:456,columnNumber:7},globalThis),ne("group",{name:"#Parent_ColliderMesh",children:ne("mesh",{ref:p,visible:!1,enabled:!0,name:"#COLLIDER_MESH",children:ne("meshPhongMaterial",{depthTest:!1,transparent:!0,opacity:.8},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:495,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:489,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:488,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:455,columnNumber:5},globalThis)},i3e=({...r})=>{const[e,t]=oe.useState(10),n=Je(a=>a.bbox),i=Je(a=>a.sceneSettings);return oe.useEffect(()=>{if(!n||!n.isBox3){t(10);return}const a=new ve(0,0,0);let s=a.distanceTo(n.min)*2,o=a.distanceTo(n.max)*2,l=o>s?o:s;l!=1/0&&l!=-1/0&&(l+=5,t(l||10))},[n]),ne(hi,{children:i.contactShadowVisibility&&ne(ZLe,{rotation:[Math.PI/2,0,0],position:[0,0,0],opacity:.3,scale:e,blur:1,far:5,resolution:512},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/EffectsComposer.js",lineNumber:32,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/EffectsComposer.js",lineNumber:30,columnNumber:5},globalThis)};function r3e({hotspotKey:r}){const e=ln(v=>v.attachmentSystem),t=ui(v=>v),n=ui(v=>v.activeHotspotData),i=Wt(v=>v.lastDeletedItemData),a=mr(v=>v.ghostData),s=ui(v=>v.actions),o=ui(v=>v.hotspotsVisibility),l=ui(v=>v.hotspotsTempVisibility),[u,f]=oe.useState(null),[h,p]=oe.useState(!1),m=oe.useRef(null),y=oe.useRef(null),E=oe.useRef(null),b=oe.useCallback(v=>{v.includes(r.itemData.skuID+"_"+r.hotspotData.hotspotID)&&p(!0)},[r]);return oe.useEffect(()=>b(t.visitedHotspotsID),[t,b]),oe.useEffect(()=>{f(n?n.hotspotData.guid:null)},[n]),oe.useEffect(()=>{y.current&&(u===r.hotspotData.guid?y.current.parentNode.classList.add("topmostActive"):y.current.parentNode.classList.remove("topmostActive"))},[u]),oe.useEffect(()=>{m.current&&u===r.hotspotData.guid&&(m.current.style.opacity=1)},[u,m]),oe.useEffect(()=>{if(!(!E.current&&!i)){var v=e.currentStructure.getNodeByGUID(r.itemData.guid);v?.ref&&(E.current.parent=v.ref)}},[E,e,o,i]),ne("group",{ref:E,position:r.hotspotData.hotspotPointTransform,children:ne(IR,{ref:y,zIndexRange:[6,0],style:o&&l&&!a?{opacity:"1",pointerEvents:"all",transition:"0.5s"}:{opacity:"0",pointerEvents:"none",transition:"0.5s"},children:ne("button",{style:{display:r.hotspotData.visibleInScene==!1?"none":"block"},ref:m,className:u===r.hotspotData.guid?"hotspot hotspot-0 active":h?"hotspot hotspot-0 visited":"hotspot hotspot-0",onPointerEnter:v=>{v.stopPropagation(),m.current&&u!==r.hotspotData.guid&&(m.current.getClientRects()[0].left>Je.getState().canvasSize.width/1.6?m.current.classList.add("left"):m.current.classList.remove("left")),y.current&&y.current.parentNode.classList.add("topmostHover")},onPointerLeave:v=>{v.stopPropagation(),y.current&&y.current.parentNode.classList.remove("topmostHover")},id:"hotspot3D_"+r.itemData.skuID+"_"+r.hotspotData.hotspotID,onClick:v=>{if(v.stopPropagation(),t.isAnyHotspotActive&&t.activeHotspotData.hotspotData.guid===r.hotspotData.guid){s.exitHotspot();return}s.clickHotspot(r.hotspotData.hotspotID,r.hotspotData.guid,r.itemData.guid)},children:[ne("span",{className:"inner-circle"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:137,columnNumber:11},this),ne("span",{className:"hotspot-annotation",children:r.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:138,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:83,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:74,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:73,columnNumber:5},this)}const a3e=()=>{const r=ui(b=>b),e=ui(b=>b.hotspotsHealthCheck),t=Wt(b=>b.lastDeletedItemData),n=ui(b=>b.hotspotsSpawned),i=Wt(b=>b.itemsSpawned),a=ui(b=>b.activeHotspotData),[s,o]=oe.useState(null),{camera:l}=fs(),u=oe.useRef(null),f=oe.useCallback(()=>{const b=ui.getState().hotspotSpawnedForCategoryIDs,v=ln.getState().attachmentSystem.globalGeometryVariants;Object.keys(i).map(x=>{let S=i[x];if(!S.hotspotsData)return;let _=!1;Object.keys(n).map(w=>{const R=n[w].hotspotData.geometryVariantID;if(R){let N=!1;if(Object.keys(v).map(L=>{R==v[L]&&(N=!0)}),N===!1){_=!0;let L=[];L.push(n[w].hotspotData.categoryID);const I=new Set(L);D$(b,D=>!I.has(D)),delete n[w]}}}),_===!0&&(ui.setState({hotspotSpawned:{...n}}),ui.setState({hotspotSpawnedForCategoryIDs:b})),S.hotspotsData.map(w=>{const R=ui.getState().hotspotSpawnedForCategoryIDs;if(w.geometryVariantID){let N=!1;if(Object.keys(v).map(L=>{w.geometryVariantID==v[L]&&(N=!0)}),N===!1)return}w.categoryID!==""&&R.includes(w.categoryID)||(S.hotspotSpawned=!0,R.push(w.categoryID),h(x,w))})})},[i,n]),h=oe.useCallback((b,v)=>{let x=i[b].itemData.skuID+"_"+v.hotspotID;n[x]={itemData:{guid:b,...i[b].itemData},hotspotData:{guid:x,...v}},ui.setState({hotspotsSpawned:{...n}})},[i,r,n]);oe.useEffect(()=>{if(!t)return;if(t.hotspotSpawned){ui.getState().actions.removeHotspotForItem({...t});const v=ui.getState().hotspotSpawnedForCategoryIDs;let x=[];t.hotspotsData.map(_=>{x.push(_.categoryID)});const S=new Set(x);D$(v,_=>!S.has(_)),ui.setState({hotspotSpawnedForCategoryIDs:v})}Wt.setState({lastDeletedItemData:null});const b=ln.getState().attachmentSystem;b.currentStructure.removeNodeByGUID(t.itemData.guid),nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,b.currentStructure.materialOverrideExists())},[t]);const{raycasterHotspot:p,worldPos:m}=oe.useMemo(()=>({raycasterHotspot:new Sy,worldPos:new ve}),[]),y=(b,v)=>{let x=b;x.sub(l.position);const S=x.length();p.set(l.position,x);const _=p.intersectObject(Je.getState().sceneRef);if(_.length>0&&_[0].distance<S){v.style.opacity=.5;return}v.style.opacity=s?.5:1};oe.useEffect(()=>{o(a?a.hotspotData.guid:null)},[a]);const E=oe.useRef(0);return Km(()=>{if(u.current===null||u.current.children.length<=0)return;E.current<u.current.children.length-1?E.current+=1:E.current=0;const b=Object.keys(n)[E.current],v="hotspot3D_"+n[b].itemData.skuID+"_"+n[b].hotspotData.hotspotID,x=nt.coreWCRef.shadowRoot.getElementById(v);s===b||x===null||(u.current.children[E.current].getWorldPosition(m),y(m,x))},[]),oe.useEffect(()=>{f()},[Object.keys(i).length,e]),r.hotspotsVisibility===!0&&ne("group",{name:"#GRP_HotspotManager",ref:u,children:Object.keys(n).map(b=>ne(r3e,{hotspotKey:n[b]},b,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/HotspotManager.js",lineNumber:261,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/HotspotManager.js",lineNumber:259,columnNumber:7},globalThis)};var s3e={boolean:!1,function:!0,object:!0,number:!1,string:!1,undefined:!1},t8=s3e,o3e=t8;function l3e(r){return!!(r&&o3e[typeof r])}var JU=l3e,c3e=Object.prototype,u3e=c3e.toString,h3e=RegExp("^"+String(u3e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),eB=h3e,f3e=t8,d3e=Object.prototype,p3e=d3e.hasOwnProperty,m3e=function(r){var e,t=r,n=[];if(!t||!f3e[typeof r])return n;for(e in t)p3e.call(t,e)&&n.push(e);return n},g3e=m3e,v3e=JU,y3e=eB,A3e=g3e,qL=y3e.test(qL=Object.keys)&&qL,b3e=qL?function(r){return v3e(r)?qL(r):[]}:A3e,Cie=b3e;function _3e(){}var E3e=_3e,Mie=JU,S3e=eB,XL=S3e.test(XL=Object.create)&&XL;function Rie(r,e){return Mie(r)?XL(r):{}}XL||(Rie=function(){function r(){}return function(e){if(Mie(e)){r.prototype=e;var t=new r;r.prototype=null}return t||zl.Object()}}());var Iie=Rie,x3e=E3e,T3e=eB,J$={configurable:!1,enumerable:!1,value:null,writable:!1},eK=function(){try{var r={},e=T3e.test(e=Object.defineProperty)&&e,t=e(r,r,r)&&e}catch{}return t}(),w3e=eK?function(r,e){J$.value=e,eK(r,"__bindData__",J$)}:x3e,n8=w3e,C3e=Iie,M3e=JU,R3e=n8,I3e=[],N3e=I3e.push;function D3e(r){var e=r[0],t=r[2],n=r[4];function i(){if(t){var a=t.slice();N3e.apply(a,arguments)}if(this instanceof i){var s=C3e(e.prototype),o=e.apply(s,a||arguments);return M3e(o)?o:s}return e.apply(n,a||arguments)}return R3e(i,r),i}var O3e=D3e;function P3e(r,e,t){e||(e=0),typeof t>"u"&&(t=r?r.length:0);for(var n=-1,i=t-e||0,a=Array(i<0?0:i);++n<i;)a[n]=r[e+n];return a}var Nie=P3e,L3e=Iie,U3e=JU,B3e=n8,k3e=Nie,F3e=[],tK=F3e.push;function Die(r){var e=r[0],t=r[1],n=r[2],i=r[3],a=r[4],s=r[5],o=t&1,l=t&2,u=t&4,f=t&8,h=e;function p(){var m=o?a:this;if(n){var y=n.slice();tK.apply(y,arguments)}if((i||u)&&(y||(y=k3e(arguments)),i&&tK.apply(y,i),u&&y.length<s))return t|=16,Die([e,f?t:t&-4,y,null,a,s]);if(y||(y=arguments),l&&(e=m[h]),this instanceof p){m=L3e(e.prototype);var E=e.apply(m,y);return U3e(E)?E:m}return e.apply(m,y)}return B3e(p,r),p}var G3e=Die;function z3e(r){return typeof r=="function"}var H3e=z3e,V3e=O3e,j3e=G3e,Q3e=H3e,W3e=[],nK=W3e.push;function Oie(r,e,t,n,i,a){var s=e&1,o=e&2,l=e&4,u=e&16,f=e&32;if(!o&&!Q3e(r))throw new TypeError;u&&!t.length&&(e&=-17,u=t=!1),f&&!n.length&&(e&=-33,f=n=!1);var h=r&&r.__bindData__;if(h&&h!==!0)return h=h.slice(),s&&!(h[1]&1)&&(h[4]=i),!s&&h[1]&1&&(e|=8),l&&!(h[1]&4)&&(h[5]=a),u&&nK.apply(h[2]||(h[2]=[]),t),f&&nK.apply(h[3]||(h[3]=[]),n),h[1]|=e,Oie.apply(null,h);var p=e==1||e===17?V3e:j3e;return p([r,e,t,n,i,a])}var Y3e=Oie,iK=Y3e,q3e=Nie;function X3e(r,e){return arguments.length>2?iK(r,17,q3e(arguments,2),null,e):iK(r,1,null,null,e)}var $3e=X3e;function K3e(r){return r}var Z3e=K3e,J3e=eB,eke=/\bthis\b/,i8={};i8.funcDecomp=!J3e.test(zl.WinRTError)&&eke.test(function(){return this});i8.funcNames=typeof Function.name=="string";var tke=i8,nke=$3e,ike=Z3e,rke=n8,pz=tke,ake=/^\s*function[ \n\r\t]+\w/,ske=/\bthis\b/,oke=Function.prototype.toString;function lke(r,e,t){if(typeof r!="function")return ike;if(typeof e>"u"||!("prototype"in r))return r;var n=r.__bindData__;if(typeof n>"u"&&(pz.funcNames&&(n=!r.name),n=n||!pz.funcDecomp,!n)){var i=oke.call(r);pz.funcNames||(n=!ake.test(i)),n||(n=ske.test(i),rke(r,n))}if(n===!1||n!==!0&&n[1]&1)return r;switch(t){case 1:return function(a){return r.call(e,a)};case 2:return function(a,s){return r.call(e,a,s)};case 3:return function(a,s,o){return r.call(e,a,s,o)};case 4:return function(a,s,o,l){return r.call(e,a,s,o,l)}}return nke(r,e)}var Pie=lke,cke=Pie,uke=Cie,rK=t8,hke=function(r,e,t){var n,i=r,a=i;if(!i||!rK[typeof i])return a;e=e&&typeof t>"u"?e:cke(e,t,3);for(var s=-1,o=rK[typeof i]&&uke(i),l=o?o.length:0;++s<l;)if(n=o[s],e(i[n],n,r)===!1)return a;return a},fke=hke,dke=Pie,pke=fke;function mke(r,e,t){var n=-1,i=r?r.length:0;if(e=e&&typeof t>"u"?e:dke(e,t,3),typeof i=="number")for(;++n<i&&e(r[n],n,r)!==!1;);else pke(r,e);return r}var gke=mke,Lie,Uie;Lie={mm:{name:{singular:"Millimeter",plural:"Millimeters"},to_anchor:1/1e3},cm:{name:{singular:"Centimeter",plural:"Centimeters"},to_anchor:1/100},m:{name:{singular:"Meter",plural:"Meters"},to_anchor:1},km:{name:{singular:"Kilometer",plural:"Kilometers"},to_anchor:1e3}};Uie={in:{name:{singular:"Inch",plural:"Inches"},to_anchor:1/12},yd:{name:{singular:"Yard",plural:"Yards"},to_anchor:3},"ft-us":{name:{singular:"US Survey Foot",plural:"US Survey Feet"},to_anchor:1.000002},ft:{name:{singular:"Foot",plural:"Feet"},to_anchor:1},mi:{name:{singular:"Mile",plural:"Miles"},to_anchor:5280}};var vke={metric:Lie,imperial:Uie,_anchors:{metric:{unit:"m",ratio:3.28084},imperial:{unit:"ft",ratio:1/3.28084}}},Bie,kie;Bie={mm2:{name:{singular:"Square Millimeter",plural:"Square Millimeters"},to_anchor:1/1e6},cm2:{name:{singular:"Centimeter",plural:"Centimeters"},to_anchor:1/1e4},m2:{name:{singular:"Square Meter",plural:"Square Meters"},to_anchor:1},ha:{name:{singular:"Hectare",plural:"Hectares"},to_anchor:1e4},km2:{name:{singular:"Square Kilometer",plural:"Square Kilometers"},to_anchor:1e6}};kie={in2:{name:{singular:"Square Inch",plural:"Square Inches"},to_anchor:1/144},yd2:{name:{singular:"Square Yard",plural:"Square Yards"},to_anchor:9},ft2:{name:{singular:"Square Foot",plural:"Square Feet"},to_anchor:1},ac:{name:{singular:"Acre",plural:"Acres"},to_anchor:43560},mi2:{name:{singular:"Square Mile",plural:"Square Miles"},to_anchor:27878400}};var yke={metric:Bie,imperial:kie,_anchors:{metric:{unit:"m2",ratio:10.7639},imperial:{unit:"ft2",ratio:1/10.7639}}},Fie,Gie;Fie={mcg:{name:{singular:"Microgram",plural:"Micrograms"},to_anchor:1/1e6},mg:{name:{singular:"Milligram",plural:"Milligrams"},to_anchor:1/1e3},g:{name:{singular:"Gram",plural:"Grams"},to_anchor:1},kg:{name:{singular:"Kilogram",plural:"Kilograms"},to_anchor:1e3},mt:{name:{singular:"Metric Tonne",plural:"Metric Tonnes"},to_anchor:1e6}};Gie={oz:{name:{singular:"Ounce",plural:"Ounces"},to_anchor:1/16},lb:{name:{singular:"Pound",plural:"Pounds"},to_anchor:1},t:{name:{singular:"Ton",plural:"Tons"},to_anchor:2e3}};var Ake={metric:Fie,imperial:Gie,_anchors:{metric:{unit:"g",ratio:1/453.592},imperial:{unit:"lb",ratio:453.592}}},zie,Hie;zie={mm3:{name:{singular:"Cubic Millimeter",plural:"Cubic Millimeters"},to_anchor:1/1e6},cm3:{name:{singular:"Cubic Centimeter",plural:"Cubic Centimeters"},to_anchor:1/1e3},ml:{name:{singular:"Millilitre",plural:"Millilitres"},to_anchor:1/1e3},cl:{name:{singular:"Centilitre",plural:"Centilitres"},to_anchor:1/100},dl:{name:{singular:"Decilitre",plural:"Decilitres"},to_anchor:1/10},l:{name:{singular:"Litre",plural:"Litres"},to_anchor:1},kl:{name:{singular:"Kilolitre",plural:"Kilolitres"},to_anchor:1e3},m3:{name:{singular:"Cubic meter",plural:"Cubic meters"},to_anchor:1e3},km3:{name:{singular:"Cubic kilometer",plural:"Cubic kilometers"},to_anchor:1e12},krm:{name:{singular:"Matsked",plural:"Matskedar"},to_anchor:1/1e3},tsk:{name:{singular:"Tesked",plural:"Teskedar"},to_anchor:5/1e3},msk:{name:{singular:"Matsked",plural:"Matskedar"},to_anchor:15/1e3},kkp:{name:{singular:"Kaffekopp",plural:"Kaffekoppar"},to_anchor:150/1e3},glas:{name:{singular:"Glas",plural:"Glas"},to_anchor:200/1e3},kanna:{name:{singular:"Kanna",plural:"Kannor"},to_anchor:2.617}};Hie={tsp:{name:{singular:"Teaspoon",plural:"Teaspoons"},to_anchor:1/6},Tbs:{name:{singular:"Tablespoon",plural:"Tablespoons"},to_anchor:1/2},in3:{name:{singular:"Cubic inch",plural:"Cubic inches"},to_anchor:.55411},"fl-oz":{name:{singular:"Fluid Ounce",plural:"Fluid Ounces"},to_anchor:1},cup:{name:{singular:"Cup",plural:"Cups"},to_anchor:8},pnt:{name:{singular:"Pint",plural:"Pints"},to_anchor:16},qt:{name:{singular:"Quart",plural:"Quarts"},to_anchor:32},gal:{name:{singular:"Gallon",plural:"Gallons"},to_anchor:128},ft3:{name:{singular:"Cubic foot",plural:"Cubic feet"},to_anchor:957.506},yd3:{name:{singular:"Cubic yard",plural:"Cubic yards"},to_anchor:25852.7}};var bke={metric:zie,imperial:Hie,_anchors:{metric:{unit:"l",ratio:33.8140226},imperial:{unit:"fl-oz",ratio:1/33.8140226}}},Vie;Vie={ea:{name:{singular:"Each",plural:"Each"},to_anchor:1},dz:{name:{singular:"Dozen",plural:"Dozens"},to_anchor:12}};var _ke={metric:Vie,imperial:{},_anchors:{metric:{unit:"ea",ratio:1}}},jie,Qie;jie={C:{name:{singular:"degree Celsius",plural:"degrees Celsius"},to_anchor:1,anchor_shift:0},K:{name:{singular:"degree Kelvin",plural:"degrees Kelvin"},to_anchor:1,anchor_shift:273.15}};Qie={F:{name:{singular:"degree Fahrenheit",plural:"degrees Fahrenheit"},to_anchor:1},R:{name:{singular:"degree Rankine",plural:"degrees Rankine"},to_anchor:1,anchor_shift:459.67}};var Eke={metric:jie,imperial:Qie,_anchors:{metric:{unit:"C",transform:function(r){return r/(5/9)+32}},imperial:{unit:"F",transform:function(r){return(r-32)*(5/9)}}}},Wie,aK=365.25;Wie={ns:{name:{singular:"Nanosecond",plural:"Nanoseconds"},to_anchor:1/1e9},mu:{name:{singular:"Microsecond",plural:"Microseconds"},to_anchor:1/1e6},ms:{name:{singular:"Millisecond",plural:"Milliseconds"},to_anchor:1/1e3},s:{name:{singular:"Second",plural:"Seconds"},to_anchor:1},min:{name:{singular:"Minute",plural:"Minutes"},to_anchor:60},h:{name:{singular:"Hour",plural:"Hours"},to_anchor:60*60},d:{name:{singular:"Day",plural:"Days"},to_anchor:60*60*24},week:{name:{singular:"Week",plural:"Weeks"},to_anchor:60*60*24*7},month:{name:{singular:"Month",plural:"Months"},to_anchor:60*60*24*aK/12},year:{name:{singular:"Year",plural:"Years"},to_anchor:60*60*24*aK}};var Ske={metric:Wie,_anchors:{metric:{unit:"s",ratio:1}}},Yie,qie;Yie={b:{name:{singular:"Bit",plural:"Bits"},to_anchor:1},Kb:{name:{singular:"Kilobit",plural:"Kilobits"},to_anchor:1024},Mb:{name:{singular:"Megabit",plural:"Megabits"},to_anchor:1048576},Gb:{name:{singular:"Gigabit",plural:"Gigabits"},to_anchor:1073741824},Tb:{name:{singular:"Terabit",plural:"Terabits"},to_anchor:1099511627776}};qie={B:{name:{singular:"Byte",plural:"Bytes"},to_anchor:1},KB:{name:{singular:"Kilobyte",plural:"Kilobytes"},to_anchor:1024},MB:{name:{singular:"Megabyte",plural:"Megabytes"},to_anchor:1048576},GB:{name:{singular:"Gigabyte",plural:"Gigabytes"},to_anchor:1073741824},TB:{name:{singular:"Terabyte",plural:"Terabytes"},to_anchor:1099511627776}};var xke={bits:Yie,bytes:qie,_anchors:{bits:{unit:"b",ratio:1/8},bytes:{unit:"B",ratio:8}}},Xie;Xie={ppm:{name:{singular:"Part-per Million",plural:"Parts-per Million"},to_anchor:1},ppb:{name:{singular:"Part-per Billion",plural:"Parts-per Billion"},to_anchor:.001},ppt:{name:{singular:"Part-per Trillion",plural:"Parts-per Trillion"},to_anchor:1e-6},ppq:{name:{singular:"Part-per Quadrillion",plural:"Parts-per Quadrillion"},to_anchor:1e-9}};var Tke={metric:Xie,imperial:{},_anchors:{metric:{unit:"ppm",ratio:1e-6}}},$ie,Kie;$ie={"m/s":{name:{singular:"Metre per second",plural:"Metres per second"},to_anchor:3.6},"km/h":{name:{singular:"Kilometre per hour",plural:"Kilometres per hour"},to_anchor:1}};Kie={"m/h":{name:{singular:"Mile per hour",plural:"Miles per hour"},to_anchor:1},knot:{name:{singular:"Knot",plural:"Knots"},to_anchor:1.150779},"ft/s":{name:{singular:"Foot per second",plural:"Feet per second"},to_anchor:.681818}};var wke={metric:$ie,imperial:Kie,_anchors:{metric:{unit:"km/h",ratio:1/1.609344},imperial:{unit:"m/h",ratio:1.609344}}},Zie,Jie;Zie={"min/km":{name:{singular:"Minute per kilometre",plural:"Minutes per kilometre"},to_anchor:.06},"s/m":{name:{singular:"Second per metre",plural:"Seconds per metre"},to_anchor:1}};Jie={"min/mi":{name:{singular:"Minute per mile",plural:"Minutes per mile"},to_anchor:.0113636},"s/ft":{name:{singular:"Second per foot",plural:"Seconds per foot"},to_anchor:1}};var Cke={metric:Zie,imperial:Jie,_anchors:{metric:{unit:"s/m",ratio:.3048},imperial:{unit:"s/ft",ratio:1/.3048}}},ere,tre;ere={Pa:{name:{singular:"pascal",plural:"pascals"},to_anchor:1/1e3},kPa:{name:{singular:"kilopascal",plural:"kilopascals"},to_anchor:1},MPa:{name:{singular:"megapascal",plural:"megapascals"},to_anchor:1e3},hPa:{name:{singular:"hectopascal",plural:"hectopascals"},to_anchor:1/10},bar:{name:{singular:"bar",plural:"bar"},to_anchor:100},torr:{name:{singular:"torr",plural:"torr"},to_anchor:101325/76e4}};tre={psi:{name:{singular:"pound per square inch",plural:"pounds per square inch"},to_anchor:1/1e3},ksi:{name:{singular:"kilopound per square inch",plural:"kilopound per square inch"},to_anchor:1}};var Mke={metric:ere,imperial:tre,_anchors:{metric:{unit:"kPa",ratio:.00014503768078},imperial:{unit:"psi",ratio:1/.00014503768078}}},nre;nre={A:{name:{singular:"Ampere",plural:"Amperes"},to_anchor:1},mA:{name:{singular:"Milliampere",plural:"Milliamperes"},to_anchor:.001},kA:{name:{singular:"Kiloampere",plural:"Kiloamperes"},to_anchor:1e3}};var Rke={metric:nre,_anchors:{metric:{unit:"A",ratio:1}}},ire;ire={V:{name:{singular:"Volt",plural:"Volts"},to_anchor:1},mV:{name:{singular:"Millivolt",plural:"Millivolts"},to_anchor:.001},kV:{name:{singular:"Kilovolt",plural:"Kilovolts"},to_anchor:1e3}};var Ike={metric:ire,_anchors:{metric:{unit:"V",ratio:1}}},rre;rre={W:{name:{singular:"Watt",plural:"Watts"},to_anchor:1},mW:{name:{singular:"Milliwatt",plural:"Milliwatts"},to_anchor:.001},kW:{name:{singular:"Kilowatt",plural:"Kilowatts"},to_anchor:1e3},MW:{name:{singular:"Megawatt",plural:"Megawatts"},to_anchor:1e6},GW:{name:{singular:"Gigawatt",plural:"Gigawatts"},to_anchor:1e9}};var Nke={metric:rre,_anchors:{metric:{unit:"W",ratio:1}}},are;are={VAR:{name:{singular:"Volt-Ampere Reactive",plural:"Volt-Amperes Reactive"},to_anchor:1},mVAR:{name:{singular:"Millivolt-Ampere Reactive",plural:"Millivolt-Amperes Reactive"},to_anchor:.001},kVAR:{name:{singular:"Kilovolt-Ampere Reactive",plural:"Kilovolt-Amperes Reactive"},to_anchor:1e3},MVAR:{name:{singular:"Megavolt-Ampere Reactive",plural:"Megavolt-Amperes Reactive"},to_anchor:1e6},GVAR:{name:{singular:"Gigavolt-Ampere Reactive",plural:"Gigavolt-Amperes Reactive"},to_anchor:1e9}};var Dke={metric:are,_anchors:{metric:{unit:"VAR",ratio:1}}},sre;sre={VA:{name:{singular:"Volt-Ampere",plural:"Volt-Amperes"},to_anchor:1},mVA:{name:{singular:"Millivolt-Ampere",plural:"Millivolt-Amperes"},to_anchor:.001},kVA:{name:{singular:"Kilovolt-Ampere",plural:"Kilovolt-Amperes"},to_anchor:1e3},MVA:{name:{singular:"Megavolt-Ampere",plural:"Megavolt-Amperes"},to_anchor:1e6},GVA:{name:{singular:"Gigavolt-Ampere",plural:"Gigavolt-Amperes"},to_anchor:1e9}};var Oke={metric:sre,_anchors:{metric:{unit:"VA",ratio:1}}},ore;ore={Wh:{name:{singular:"Watt-hour",plural:"Watt-hours"},to_anchor:3600},mWh:{name:{singular:"Milliwatt-hour",plural:"Milliwatt-hours"},to_anchor:3.6},kWh:{name:{singular:"Kilowatt-hour",plural:"Kilowatt-hours"},to_anchor:36e5},MWh:{name:{singular:"Megawatt-hour",plural:"Megawatt-hours"},to_anchor:36e8},GWh:{name:{singular:"Gigawatt-hour",plural:"Gigawatt-hours"},to_anchor:36e11},J:{name:{singular:"Joule",plural:"Joules"},to_anchor:1},kJ:{name:{singular:"Kilojoule",plural:"Kilojoules"},to_anchor:1e3}};var Pke={metric:ore,_anchors:{metric:{unit:"J",ratio:1}}},lre;lre={VARh:{name:{singular:"Volt-Ampere Reactive Hour",plural:"Volt-Amperes Reactive Hour"},to_anchor:1},mVARh:{name:{singular:"Millivolt-Ampere Reactive Hour",plural:"Millivolt-Amperes Reactive Hour"},to_anchor:.001},kVARh:{name:{singular:"Kilovolt-Ampere Reactive Hour",plural:"Kilovolt-Amperes Reactive Hour"},to_anchor:1e3},MVARh:{name:{singular:"Megavolt-Ampere Reactive Hour",plural:"Megavolt-Amperes Reactive Hour"},to_anchor:1e6},GVARh:{name:{singular:"Gigavolt-Ampere Reactive Hour",plural:"Gigavolt-Amperes Reactive Hour"},to_anchor:1e9}};var Lke={metric:lre,_anchors:{metric:{unit:"VARh",ratio:1}}},cre,ure;cre={"mm3/s":{name:{singular:"Cubic Millimeter per second",plural:"Cubic Millimeters per second"},to_anchor:1/1e6},"cm3/s":{name:{singular:"Cubic Centimeter per second",plural:"Cubic Centimeters per second"},to_anchor:1/1e3},"ml/s":{name:{singular:"Millilitre per second",plural:"Millilitres per second"},to_anchor:1/1e3},"cl/s":{name:{singular:"Centilitre per second",plural:"Centilitres per second"},to_anchor:1/100},"dl/s":{name:{singular:"Decilitre per second",plural:"Decilitres per second"},to_anchor:1/10},"l/s":{name:{singular:"Litre per second",plural:"Litres per second"},to_anchor:1},"l/min":{name:{singular:"Litre per minute",plural:"Litres per minute"},to_anchor:1/60},"l/h":{name:{singular:"Litre per hour",plural:"Litres per hour"},to_anchor:1/3600},"kl/s":{name:{singular:"Kilolitre per second",plural:"Kilolitres per second"},to_anchor:1e3},"kl/min":{name:{singular:"Kilolitre per minute",plural:"Kilolitres per minute"},to_anchor:50/3},"kl/h":{name:{singular:"Kilolitre per hour",plural:"Kilolitres per hour"},to_anchor:5/18},"m3/s":{name:{singular:"Cubic meter per second",plural:"Cubic meters per second"},to_anchor:1e3},"m3/min":{name:{singular:"Cubic meter per minute",plural:"Cubic meters per minute"},to_anchor:50/3},"m3/h":{name:{singular:"Cubic meter per hour",plural:"Cubic meters per hour"},to_anchor:5/18},"km3/s":{name:{singular:"Cubic kilometer per second",plural:"Cubic kilometers per second"},to_anchor:1e12}};ure={"tsp/s":{name:{singular:"Teaspoon per second",plural:"Teaspoons per second"},to_anchor:1/6},"Tbs/s":{name:{singular:"Tablespoon per second",plural:"Tablespoons per second"},to_anchor:1/2},"in3/s":{name:{singular:"Cubic inch per second",plural:"Cubic inches per second"},to_anchor:.55411},"in3/min":{name:{singular:"Cubic inch per minute",plural:"Cubic inches per minute"},to_anchor:.55411/60},"in3/h":{name:{singular:"Cubic inch per hour",plural:"Cubic inches per hour"},to_anchor:.55411/3600},"fl-oz/s":{name:{singular:"Fluid Ounce per second",plural:"Fluid Ounces per second"},to_anchor:1},"fl-oz/min":{name:{singular:"Fluid Ounce per minute",plural:"Fluid Ounces per minute"},to_anchor:1/60},"fl-oz/h":{name:{singular:"Fluid Ounce per hour",plural:"Fluid Ounces per hour"},to_anchor:1/3600},"cup/s":{name:{singular:"Cup per second",plural:"Cups per second"},to_anchor:8},"pnt/s":{name:{singular:"Pint per second",plural:"Pints per second"},to_anchor:16},"pnt/min":{name:{singular:"Pint per minute",plural:"Pints per minute"},to_anchor:4/15},"pnt/h":{name:{singular:"Pint per hour",plural:"Pints per hour"},to_anchor:1/225},"qt/s":{name:{singular:"Quart per second",plural:"Quarts per second"},to_anchor:32},"gal/s":{name:{singular:"Gallon per second",plural:"Gallons per second"},to_anchor:128},"gal/min":{name:{singular:"Gallon per minute",plural:"Gallons per minute"},to_anchor:32/15},"gal/h":{name:{singular:"Gallon per hour",plural:"Gallons per hour"},to_anchor:8/225},"ft3/s":{name:{singular:"Cubic foot per second",plural:"Cubic feet per second"},to_anchor:957.506},"ft3/min":{name:{singular:"Cubic foot per minute",plural:"Cubic feet per minute"},to_anchor:957.506/60},"ft3/h":{name:{singular:"Cubic foot per hour",plural:"Cubic feet per hour"},to_anchor:957.506/3600},"yd3/s":{name:{singular:"Cubic yard per second",plural:"Cubic yards per second"},to_anchor:25852.7},"yd3/min":{name:{singular:"Cubic yard per minute",plural:"Cubic yards per minute"},to_anchor:25852.7/60},"yd3/h":{name:{singular:"Cubic yard per hour",plural:"Cubic yards per hour"},to_anchor:25852.7/3600}};var Uke={metric:cre,imperial:ure,_anchors:{metric:{unit:"l/s",ratio:33.8140227},imperial:{unit:"fl-oz/s",ratio:1/33.8140227}}},hre,fre;hre={lx:{name:{singular:"Lux",plural:"Lux"},to_anchor:1}};fre={"ft-cd":{name:{singular:"Foot-candle",plural:"Foot-candles"},to_anchor:1}};var Bke={metric:hre,imperial:fre,_anchors:{metric:{unit:"lx",ratio:1/10.76391},imperial:{unit:"ft-cd",ratio:10.76391}}},dre;dre={mHz:{name:{singular:"millihertz",plural:"millihertz"},to_anchor:1/1e3},Hz:{name:{singular:"hertz",plural:"hertz"},to_anchor:1},kHz:{name:{singular:"kilohertz",plural:"kilohertz"},to_anchor:1e3},MHz:{name:{singular:"megahertz",plural:"megahertz"},to_anchor:1e3*1e3},GHz:{name:{singular:"gigahertz",plural:"gigahertz"},to_anchor:1e3*1e3*1e3},THz:{name:{singular:"terahertz",plural:"terahertz"},to_anchor:1e3*1e3*1e3*1e3},rpm:{name:{singular:"rotation per minute",plural:"rotations per minute"},to_anchor:1/60},"deg/s":{name:{singular:"degree per second",plural:"degrees per second"},to_anchor:1/360},"rad/s":{name:{singular:"radian per second",plural:"radians per second"},to_anchor:1/(Math.PI*2)}};var kke={metric:dre,_anchors:{frequency:{unit:"hz",ratio:1}}},pre;pre={rad:{name:{singular:"radian",plural:"radians"},to_anchor:180/Math.PI},deg:{name:{singular:"degree",plural:"degrees"},to_anchor:1},grad:{name:{singular:"gradian",plural:"gradians"},to_anchor:9/10},arcmin:{name:{singular:"arcminute",plural:"arcminutes"},to_anchor:1/60},arcsec:{name:{singular:"arcsecond",plural:"arcseconds"},to_anchor:1/3600}};var Fke={metric:pre,_anchors:{metric:{unit:"deg",ratio:1}}},mre,DR=Cie,eh=gke,Gm={length:vke,area:yke,mass:Ake,volume:bke,each:_ke,temperature:Eke,time:Ske,digital:xke,partsPer:Tke,speed:wke,pace:Cke,pressure:Mke,current:Rke,voltage:Ike,power:Nke,reactivePower:Dke,apparentPower:Oke,energy:Pke,reactiveEnergy:Lke,volumeFlowRate:Uke,illuminance:Bke,frequency:kke,angle:Fke},th;th=function(r,e){e?this.val=r/e:this.val=r};th.prototype.from=function(r){if(this.destination)throw new Error(".from must be called before .to");return this.origin=this.getUnit(r),this.origin||this.throwUnsupportedUnitError(r),this};th.prototype.to=function(r){if(!this.origin)throw new Error(".to must be called after .from");this.destination=this.getUnit(r);var e,t;if(this.destination||this.throwUnsupportedUnitError(r),this.origin.abbr===this.destination.abbr)return this.val;if(this.destination.measure!=this.origin.measure)throw new Error("Cannot convert incompatible measures of "+this.destination.measure+" and "+this.origin.measure);return e=this.val*this.origin.unit.to_anchor,this.origin.unit.anchor_shift&&(e-=this.origin.unit.anchor_shift),this.origin.system!=this.destination.system&&(t=Gm[this.origin.measure]._anchors[this.origin.system].transform,typeof t=="function"?e=t(e):e*=Gm[this.origin.measure]._anchors[this.origin.system].ratio),this.destination.unit.anchor_shift&&(e+=this.destination.unit.anchor_shift),e/this.destination.unit.to_anchor};th.prototype.toBest=function(e){if(!this.origin)throw new Error(".toBest must be called after .from");var e=Object.assign({exclude:[],cutOffNumber:1},e),t;return eh(this.possibilities(),function(n){var i=this.describe(n),a=e.exclude.indexOf(n)===-1;if(a&&i.system===this.origin.system){var s=this.to(n);(!t||s>=e.cutOffNumber&&s<t.val)&&(t={val:s,unit:n,singular:i.singular,plural:i.plural})}}.bind(this)),t};th.prototype.getUnit=function(r){var e;return eh(Gm,function(t,n){if(eh(t,function(i,a){if(a=="_anchors"||(eh(i,function(s,o){if(o==r)return e={abbr:r,measure:n,system:a,unit:s},!1}),e))return!1}),e)return!1}),e};var gre=function(r){return{abbr:r.abbr,measure:r.measure,system:r.system,singular:r.unit.name.singular,plural:r.unit.name.plural}};th.prototype.describe=function(r){var e=th.prototype.getUnit(r),t=null;try{t=gre(e)}catch{this.throwUnsupportedUnitError(r)}return t};th.prototype.list=function(r){var e=[];return eh(Gm,function(t,n){r&&r!==n||eh(t,function(i,a){if(a=="_anchors")return!1;eh(i,function(s,o){e=e.concat(gre({abbr:o,measure:n,system:a,unit:s}))})})}),e};th.prototype.throwUnsupportedUnitError=function(r){var e=[];throw eh(Gm,function(t,n){eh(t,function(i,a){if(a=="_anchors")return!1;e=e.concat(DR(i))})}),new Error("Unsupported unit "+r+", use one of: "+e.join(", "))};th.prototype.possibilities=function(r){var e=[];return!this.origin&&!r?eh(DR(Gm),function(t){eh(Gm[t],function(n,i){if(i=="_anchors")return!1;e=e.concat(DR(n))})}):(r=r||this.origin.measure,eh(Gm[r],function(t,n){if(n=="_anchors")return!1;e=e.concat(DR(t))})),e};th.prototype.measures=function(){return DR(Gm)};mre=function(r){return new th(r)};var mz=mre;const Gke=()=>{const r=Wt(y=>y.itemsSpawned),e=Je(y=>y.showDimensions),t=Je(y=>y.sceneSettings),n=Je(y=>y.boundData),i=Je(y=>y.sceneSettings.sceneScaleUnit),a=Je(y=>y.sceneSettings.sceneScaleDisplayUnit),[s,o]=oe.useState(.2),[l,u]=oe.useState("#000000"),[f,h]=oe.useState(.01),p=oe.useRef(null);oe.useRef(null);const m=oe.useRef(0);return oe.useEffect(()=>{if(t==null)return;const y=t.dimensionColor,E=O$(y.r,y.g,y.b);u(E)},[t]),oe.useEffect(()=>{if(t==null)return;const y=t.dimensionColor,E=O$(y.r,y.g,y.b);u(E)},[t]),oe.useEffect(()=>{if(!n||!n.size)return;let y=n.size.x;y>n.size.z&&(y=n.size.z);let E=y/20;h(E<.005?E:.005),o(y<.2?y:.2)},[n]),oe.useEffect(()=>{m.current=0},[e]),Km(()=>{p.current!==null&&m.current<1&&(m.current+=.05,p.current.scale.x=m.current,p.current.scale.y=m.current,p.current.scale.z=m.current)}),e===!0&&ne("group",{ref:p,children:n!==null&&n.size.x!==0&&n.size.y!==0&&n.size.z!==0&&Object.keys(r).length>0&&ne(hi,{children:[ne(bm,{position:[n.center.x,n.center.y-n.size.y/2,n.center.z+n.size.z/2+s],rotation:[0,0,QL(90)],scale:[f,n.size.x,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:105,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:100,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:112,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:107,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:116,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.x).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:119,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:89,columnNumber:15},globalThis),ne(bm,{position:[n.center.x-n.size.x/2-s,n.center.y,n.center.z+n.size.z/2+s],rotation:[0,0,0],scale:[f,n.size.y,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:150,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:145,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:157,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:152,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:161,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.y).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:164,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:134,columnNumber:15},globalThis),ne(bm,{position:[n.center.x+n.size.x/2+s,n.center.y-n.size.y/2,n.center.z],rotation:[QL(90),0,0],scale:[f,n.size.z,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[7,f,1],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:195,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:190,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[7,f,1],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:202,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:197,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:206,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.z).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:209,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:179,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:87,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:81,columnNumber:7},globalThis)},zke=({...r})=>ne(hi,{children:[ne(a3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:11,columnNumber:7},globalThis),ne(Gke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:12,columnNumber:7},globalThis),ne(n3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:13,columnNumber:7},globalThis),ne(i3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:14,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:10,columnNumber:5},globalThis),Hke=()=>{const r=oe.useRef(null),e=Wt(E=>E.itemsSpawned),t=ui(E=>E.isAnyHotspotActive),n=wr(E=>E.canCameraRotate),i=wr(E=>E.cameraSettings),a=wr(E=>E.disableAutoRotate),s=Je(E=>E.autoFocusTrigger),o=Je(E=>E.dragging),l=wr(E=>E.sendCameraDetailsTrigger),u=wr(E=>E.focusPointPosition),f=wr(E=>E.viewPointPosition),h=oe.useRef(!1),{camera:p}=fs(),m=mr(E=>E.ghostsTransform),y=()=>{if(r.current===null)return;const E=wr.getState().boundsMargin,b=Je.getState().autoFocusRef,v=Je.getState().sceneRef.getObjectByName("#ITEMSANDGHOSTS"),x=b||v,S=new fl().setFromObject(x);b||Je.setState({bbox:S});const _=new ve;if(S.getSize(_),_.x>0){const w=new ve;S.getCenter(w);const R=new ve(S.max.x,S.max.y,S.max.z);R.sub(S.min),Je.setState({boundData:{center:w,size:R}}),r.current.setBoundary(S);const N=new fl(S.min,S.max);N.min=new ve(N.min.x-E/2,N.min.y-E/2,N.min.z-E/2),N.max=new ve(N.max.x+E/2,N.max.y+E/2,N.max.z+E/2);const L=N.getBoundingSphere(new du(w));L.radius>0&&r.current.fitToSphere(L,!0)}else{const w=new ve(0,0,0),R=new ve(0,0,0);Je.setState({boundData:{center:w,size:R}})}};return oe.useEffect(()=>{y()},[s,Object.keys(e).length]),oe.useEffect(()=>{nt!=null&&(Je.getState().sceneSettings.focusCameraOnGhosts===!0?nt.focusOnGhosts():nt.refocus())},[m]),oe.useEffect(()=>{if(t==!1){h.current==!0&&(r.current.reset(!0),h.current=!1);return}h.current==!1&&(r.current.saveState(),h.current=!0),r.current.setLookAt(f.x,f.y,f.z,u.x,u.y,u.z,!0)},[t,f,u]),oe.useEffect(()=>{nt.fireEvent(nt.EVENTS.CONFIGURATION.CameraDetails_Update,p)},[l]),Km(E=>{i.canAutoRotate===!1||r.current===null||a===!1&&t===!1&&(r.current.azimuthAngle+=20*E*MI.DEG2RAD*i.autoRotateSpeed)}),oe.useEffect(()=>{r.current!==null&&(n===!0?(r.current.mouseButtons.left=Js.ROTATE,r.current.touches.one=Js.TOUCH_ROTATE):(r.current.mouseButtons.left=Js.NONE,r.current.touches.one=Js.NONE),i.canZoom===!0&&o===!1?(r.current.mouseButtons.wheel=Js.ZOOM,r.current.mouseButtons.middle=Js.ZOOM):(r.current.mouseButtons.wheel=Js.NONE,r.current.mouseButtons.middle=Js.NONE),i.canPan===!0&&o===!1?(r.current.mouseButtons.right=Js.OFFSET,i.canZoom===!0&&o===!1?(r.current.touches.two=Js.TOUCH_ZOOM_OFFSET,r.current.touches.three=Js.TOUCH_ZOOM_OFFSET):(r.current.touches.two=Js.TOUCH_OFFSET,r.current.touches.three=Js.TOUCH_OFFSET)):(r.current.mouseButtons.right=Js.NONE,i.canZoom===!0&&o===!1?(r.current.touches.two=Js.TOUCH_ZOOM,r.current.touches.three=Js.TOUCH_ZOOM):(r.current.touches.two=Js.NONE,r.current.touches.three=Js.NONE)))},[r,i,o,n]),oe.useEffect(()=>{if(r.current===null)return;p.fov=i.fov,p.updateProjectionMatrix();const E=()=>{r.current.removeEventListener("rest",E),wr.setState({userDragging:!1,disableAutoRotate:!1})};r.current.addEventListener("controlstart",()=>{r.current.removeEventListener("rest",E),wr.setState({userDragging:!0,disableAutoRotate:!0})}),r.current.addEventListener("controlend",()=>{r.current.active?r.current.addEventListener("rest",E):E()}),r.current.addEventListener("transitionstart",()=>{wr.getState().userDragging!==!0&&(wr.setState({disableAutoRotate:!0}),r.current.addEventListener("rest",E))})},[r]),ne(hi,{children:ne(HLe,{ref:r,makeDefault:!0,dollySpeed:i.dollySpeed,truckSpeed:i.truckSpeed,minZoom:i.minZoom,maxZoom:i.maxZoom,minPolarAngle:t?-Math.PI:QL(i.minPolarAngle),maxPolarAngle:t?Math.PI:QL(i.maxPolarAngle)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/CameraManager.js",lineNumber:219,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/CameraManager.js",lineNumber:218,columnNumber:5},globalThis)},Vke=()=>{const r=fs(e=>e.gl);return oe.useEffect(()=>{Je.setState({glContext:r})},[]),ne(hi,{children:[ne(zke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:16,columnNumber:7},globalThis),ne(Hke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:17,columnNumber:7},globalThis),ne(UUe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:18,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:15,columnNumber:5},globalThis)},jke=({handleCloseAlert:r,alertData:e})=>{const t=oe.useRef(null),n=oe.useRef(null),i=oe.useRef(null),a=()=>{clearTimeout(t.current),i.current.style="",n.current.style="",r()};return oe.useEffect(()=>{if(i.current===null||n.current===null)return;const s=e.alertTime?e.alertTime:1e3;i.current.style="animation: loader "+s+"ms; animation-timing-function: linear;",n.current.style="animation: loader "+s+"ms; animation-timing-function: linear;",t.current=setTimeout(a,s)},[i,n,e]),ne(hi,{children:[ne("div",{className:"alert-bg ".concat(kl[e.alertType].cssClass),children:[ne("div",{className:"alert-icon-bg ".concat(kl[e.alertType].cssClass),children:ne("img",{src:kl[e.alertType].src,className:"alert-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:50,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:45,columnNumber:9},globalThis),ne("div",{className:"alert-msg-cross-timer-bg",children:[ne("div",{className:"alert-msg-cross-bg",children:[ne("div",{className:"alert-msg-bg",style:e.alertLabel?{}:{display:"flex",alignItems:"center"},children:[e.alertLabel&&ne("p",{className:"alert-label",children:e.alertLabel},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:66,columnNumber:17},globalThis),ne("span",{className:"alert-msg",children:e.alertMsg},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:68,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:57,columnNumber:13},globalThis),ne("div",{className:"alert-close-btn-bg",children:ne("img",{onClick:a,className:"alert-cross-btn",src:Om+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:71,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:70,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:56,columnNumber:11},globalThis),ne("div",{ref:n,className:"alert-timer ".concat(kl[e.alertType].cssClass)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:78,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:55,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:40,columnNumber:7},globalThis),ne("div",{className:"alert-bg alert-mobile ".concat(kl[e.alertType].cssClass),children:[ne("div",{className:"alert-icon-msg-cross-bg",children:[ne("div",{className:"alert-icon-bg ".concat(kl[e.alertType].cssClass),children:ne("img",{src:kl[e.alertType].src,className:"alert-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:99,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:94,columnNumber:11},globalThis),ne("div",{className:"alert-msg-bg",children:[e.alertLabel&&ne("span",{className:"alert-label",children:[e.alertLabel,": "]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:106,columnNumber:15},globalThis),ne("span",{className:"alert-msg",children:e.alertMsg_Mobile?e.alertMsg_Mobile:e.alertMsg},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:108,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:104,columnNumber:11},globalThis),ne("div",{className:"alert-close-btn-bg",children:ne("img",{onClick:a,className:"alert-cross-btn",src:Om+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:115,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:114,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:93,columnNumber:9},globalThis),ne("div",{ref:i,className:"alert-timer ".concat(kl[e.alertType].cssClass)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:122,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:88,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:38,columnNumber:5},globalThis)},Qke=()=>{const[r,e]=oe.useState(null),t=Je(o=>o.alertData),n=Je(o=>o.persistantAlertData);oe.useEffect(()=>{!t||!t.alertMsg||i(t)},[t]),oe.useEffect(()=>{const o=Je.getState().alertQueue;o.length<=0||(r===null&&(e(o[0]),o[0].persistant===!0&&Je.setState({persistantAlertData:o[0]})),Je.getState().actions.popFromAlertQueue())},[r]);const i=oe.useCallback(o=>{if(Je.getState().sceneSettings.disableAlerts===!0)return;let l=o.alertType,u=!1;if(Object.keys(kl).map(h=>{h==l.toLowerCase()&&(u=!0)}),u==!1&&(l=kl.info.id,o.alertType=l),kl[o.alertType].level<Je.getState().sceneSettings.alertLevel||Je.getState().sceneSettings.alertControl[o.alertId]!==!0)return;const f=Je.getState().actions.addToAlertQueue(o);r===null&&f.length===1&&(e(o),o.persistant===!0&&Je.setState({persistantAlertData:o}))},[r]),a=oe.useCallback(()=>{e(n)},[n]),s=oe.useCallback(async()=>{e(null)},[]);return oe.useEffect(()=>{async function o(){await vc(1500);let l=null,u={alertMsg:"Add items by selecting from the panel",alertMsg_Mobile:"Add items by selecting from the panel",alertTime:8e3,alertType:"info",alertLabel:"Get Started"};Je.getState().alertSettings&&(Je.getState().alertSettings.welcomeMessage&&(l=Je.getState().alertSettings.welcomeMessage),Je.getState().alertSettings.instructionMessage&&(u=Je.getState().alertSettings.instructionMessage)),l!==null&&i(l),i(u)}o()},[]),ne("div",{className:"alert-space",children:[r===null&&n&&ne("div",{onClick:a,className:"alert-persistant-btn-bg",style:{background:kl[n.alertType].background,border:"1px solid "+kl[n.alertType].color},children:ne("img",{style:{filter:kl[n.alertType].filter},className:"alert-persistant-btn",src:kl[n.alertType].src},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:144,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:135,columnNumber:9},globalThis),r&&ne(jke,{handleCloseAlert:s,alertData:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:154,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:133,columnNumber:5},globalThis)},Wke=()=>{const r=Je(n=>n.canvasTooltipText),e=Je(n=>n.sceneSettings),t=mr(n=>n.ghostData);return ne(hi,{children:ne("div",{children:[ne(Qke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:16,columnNumber:9},globalThis),nt.getSceneItemCount()<=0&&!t&&ne("div",{className:"emptySceneBG",children:e.emptySceneText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:19,columnNumber:11},globalThis),ne("div",{className:"canvasTooltip",children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:22,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:15,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:14,columnNumber:5},globalThis)};function Yke(r){let e={};if(r.type.toLowerCase()==="object3d"){const t=r.userData;if(t?.isPlug===1){const n=t.name;n&&typeof n=="string"&&(e.name=n);const i=t.type;i&&typeof i=="string"?e.type=i:e.type="";const a=t.weight;a&&typeof a=="number"?e.weight=a:e.weight=1;const s=t.affectedNodes;s&&typeof s=="string"?e.affectedNodes=s.replaceAll(" ","").split(","):e.affectedNodes=[];const o=t.acceptedPlugTypes;o&&typeof o=="string"?e.acceptedPlugTypes=o.replaceAll(" ","").split(","):e.acceptedPlugTypes=[];const l=t.connectsToPlugTypes;l&&typeof l=="string"?e.connectsToPlugTypes=l.replaceAll(" ","").split(","):e.connectsToPlugTypes=[];const u=t.dependencySku;u&&typeof u=="string"?e.dependencySku=u:e.dependencySku="";const f=t.isDependencySkuInteractive;u!==void 0&&typeof f=="number"?e.isDependencySkuInteractive=f:e.isDependencySkuInteractive=1}}return e}async function qke(r){const e=Mo.getState().actions;for(let t=0;t<Object.keys(r).length;t++){const n=Object.keys(r)[t];zt.info({title:"loading proxy: "+n});const i=performance.now(),a=await e.loadAsset(n,!0),s=performance.now();if(zt.info({title:`${n} proxy: ${((s-i)/1e3).toFixed(2)} seconds to load.`}),zt.info({title:"loaded proxy: "+n}),zt.info({title:"waitingForAsset",details:a}),!a||!a.proxy.data)continue;const o=r[n]?.plugs,l=o===void 0||Array.isArray(o)&&o.length===0;l===!0&&zt.info({title:`Collecting plugs information for ${n} from the proxy mesh`});let u=[];a.proxy.data.scene.traverse(p=>{if(l===!0){const m=Yke(p);Object.keys(m).length>0&&u.push(m)}if(p.isMesh){p.material.color=new Yt(0/255,0/255,0/255);const m=Je.getState().sceneSettings.ghostColor;p.material.emissive=new Yt(m.r/255,m.g/255,m.b/255),p.material.emissiveIntensity=.75,p.material.alphaTest=m.a,p.material.transparent=!0,p.material.opacity=m.a,p.material.depthTest=!1,p.material.reflectivity=0,p.material.metalness=0,p.material.wireframe=Je.getState().sceneSettings.ghostAsWireframe}}),u.length>0&&(r[n].plugs=u);const{boundingBox:f,boundingSphere:h}=$ke(a);if(f&&h){const p=Xke(f);r[n].boundingBox=f,r[n].boundingSphereCenter=h.center,r[n].boundingBoxSize=p}else r[n].boundingSphereCenter={x:0,y:0,z:0},r[n].boundingBoxSize={x:0,y:0,z:0}}}function Xke(r){return{x:r.max.x-r.min.x,y:r.max.y-r.min.y,z:r.max.z-r.min.z}}function $ke(r){const e=r.proxy.data.scene;if(e){let t=null;return e.traverse(n=>{if(n.isMesh){t=n;return}}),t?(t.geometry.boundingBox||t.geometry.computeBoundingBox(),{boundingBox:t.geometry.boundingBox,boundingSphere:t.geometry.boundingSphere}):!1}}const Kke=`.alert-space{position:absolute;width:auto;height:auto;max-width:40%;top:0;margin:1rem}.alert-bg{display:flex;flex-direction:row;border-radius:5.04px}.alert-mobile{display:none}.alert-persistant-btn{width:2rem;height:2rem;margin:4px;filter:invert(100%) brightness(200%)}.alert-persistant-btn-bg{cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:4px}.alert-persistant-btn-bg:hover{opacity:.9!important}.alert-icon{width:2rem;height:2rem;margin:14px;filter:invert(100%) brightness(200%)}.alert-icon-bg{border-radius:5.04px 0 0 5.04px}.alert-msg-bg{padding:1rem}.alert-label{font-weight:600;font-size:1.125rem;margin:0 0 4px;text-transform:capitalize}.alert-msg{font-size:1rem}.alert-cross-btn{width:1.5rem;cursor:pointer;margin:.5rem}.alert-msg-cross-timer-bg{display:flex;flex-direction:column;justify-content:space-between}.alert-msg-cross-bg{display:flex;flex-direction:row}.alert-timer{width:0%;height:2px;transition:10ms}.alert-bg.alert-info,.alert-bg.alert-mobile.alert-info{background-color:var(--info-light);border:1.26px solid var(--info-dark)}.alert-icon-bg.alert-info{background-color:var(--info-dark);border:1.26px solid var(--info-dark)}.alert-timer.alert-info{background-color:var(--info-dark)}.alert-bg.alert-warn,.alert-bg.alert-mobile.alert-warn{background-color:var(--warn-light);border:1.26px solid var(--warn-dark)}.alert-icon-bg.alert-warn{background-color:var(--warn-dark);border:1.26px solid var(--warn-dark)}.alert-timer.alert-warn{background-color:var(--warn-dark)}.alert-bg.alert-error,.alert-bg.alert-mobile.alert-error{background-color:var(--error-light);border:1.26px solid var(--error-dark)}.alert-icon-bg.alert-error{background-color:var(--error-dark);border:1.26px solid var(--error-dark)}.alert-timer.alert-error{background-color:var(--error-dark)}.alert-bg.alert-success,.alert-bg.alert-mobile.alert-success{background-color:var(--success-light);border:1.26px solid var(--success-dark)}.alert-icon-bg.alert-success{background-color:var(--success-dark);border:1.26px solid var(--success-dark)}.alert-timer.alert-success{background-color:var(--success-dark)}@keyframes loader{0%{width:0%}to{width:100%}}@media only screen and (orientation: portrait){.alert-label{margin:none}.alert-close-btn-bg{display:flex;justify-content:center}.alert-icon-msg-cross-bg{display:flex;flex-direction:row;width:100%;align-items:center}.alert-space{width:100%;max-width:100%;margin:auto}.alert-bg{display:none;flex-direction:column}.alert-mobile{display:flex;justify-content:center;align-items:flex-start}.alert-icon{margin:4px}.alert-icon-bg{display:flex;justify-content:center;align-items:center;border-radius:5.04px;margin:8px 16px;height:fit-content}.alert-msg-bg{padding:1rem 0rem;width:calc(100% - 70px)}.alert-persistant-btn{margin:4px!important}.alert-persistant-btn-bg{display:flex;justify-content:center;width:calc(8px + 2rem)!important;align-items:center;border-radius:5.04px;margin:8px 16px}}
|
|
9197
|
-
`,Zke=`@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*{box-sizing:border-box}html,#root,epigraph-configurator-core{width:100%;height:100%;margin:0;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.loading{color:red}.shadowRoot{position:relative;width:100%;height:100%}.shellCanvasContainerParent{display:flex;height:100%;align-items:center;position:absolute;z-index:30;top:0;left:0}.grabCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Move.svg) 6 3,auto}.grabbingCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Grab.svg) 6 3,auto}.pointerCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Click.svg) 6 2,auto}.blockedCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Block.svg),auto}.moveCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-MoveArrows.svg) 8.65 8.65,auto}.mainCanvas{width:100%!important;height:100%!important;background:white}.annotation{cursor:pointer;outline:none;border:none;font-size:8px;font-weight:300;background:black;color:#f0f0f0;padding:2px 10px;border-radius:20px;letter-spacing:1px;display:flex;justify-content:center;align-items:center;gap:5px}.annotation:hover{opacity:.8}.content{transform:translate3d(50%,0,0);text-align:left;background:#202035;color:#fff;padding:10px 15px;border-radius:5px}.ItemsParent{position:absolute;right:0;bottom:0;background-color:#e0e0e0ee;margin:5px;border-radius:15%}.Item{width:75px;height:75px;padding:15px;cursor:grab;user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.Item:hover{transform:scale(1.1)}.cursorImg{position:absolute;top:0;left:0;opacity:0;width:0px;height:0px;pointer-events:none}.heading{font-size:2rem;padding:1rem;font-weight:700}.description{font-size:1rem;padding:0rem 1rem}.overlayUI{width:100%;height:100%;padding:1%;position:absolute;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.shellCanvas{width:100%;height:85%;position:relative;border-radius:12px 12px 0 0}.shellSideMenu{width:30%;height:100%}.ignore{pointer-events:none}.interactable{pointer-events:all}.uninteractable{pointer-events:none;opacity:.8}.arButton{position:absolute;bottom:3vh;left:2vh}.sideMenu{width:30%;height:100%;background:#f5f5f5;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center}.sideMenuTabs{width:100%;height:10vh;display:flex;justify-content:space-between;padding:1vh 0%;gap:12px}.sideMenuTabs .button{display:flex;align-items:center;justify-content:center;flex-direction:column;font-weight:600;color:#333;width:33%;opacity:1;text-transform:uppercase;padding-bottom:16px;font-size:.8rem}.sideMenuTabs .button .icon{width:22px;margin-bottom:.5rem}.sideMenuContent{height:75%;width:100%;padding:1vh;background:#f5f5f5;overflow-y:auto}.leftShell{width:65%;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center}.bottomBar{background-color:#333;height:72px;width:100%;display:flex;padding:1vh;justify-content:flex-end;align-items:center}.bottomBar.right{justify-content:space-between;padding:0 24px;border-radius:12px 12px 0 0}.bottomBar .cartButton{position:relative}.bottomBar .reviewButton{color:#fff;margin-right:12px;font-size:18px}.bottomBar .cartButton .cartNumber{position:absolute;right:-8px;bottom:-4px;padding:4px;background:#e52438;color:#fff;font-size:12px;border-radius:50%}.button{cursor:pointer;font-weight:700}.rightTopBarButton{margin:1vh}.leftBottomBarButton{color:#fff;margin:1vh;width:80px;padding:12px;font-size:14px;border:2px solid #ccc!important;text-align:center;border-radius:4px}.activeSideMenuTab{border-bottom:1px solid #333333}*{scrollbar-width:8px;scrollbar-color:blue transparent}*::-webkit-scrollbar{width:8px}*::-webkit-scrollbar-track{background:black}*::-webkit-scrollbar-thumb{background-color:#e52438;border-radius:0;border:none}.dimensionsButtonParent{position:relative;display:flex}.dimensionText{font-size:.8rem;font-style:normal;font-weight:600}.dimensionActive{border-color:#c7c7c7!important}.color-grid{display:flex;gap:1rem}.colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem;transition:.1s ease all}.colorSelector .colorThumbnailContainer{position:relative;transition:.1s ease all}.colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:.1s all ease;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.colorSelector .colorDetails{text-align:center;opacity:0;pointer-events:none}.colorSelector:hover .colorDetails,.colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.colorSelector .colorDetails p{margin:0;font-size:.75rem;color:#333}.colorSelector .colorDetails p:nth-child(1){font-weight:600}.colorSelector .colorDetails p:nth-child(2){font-weight:400}.shellCanvasContainer{box-shadow:4px 4px 12px #0000000d;border-radius:2px;padding:1rem 1rem 1rem 0px;display:none;flex-direction:column;gap:1.125rem;background:white;transition:.25s ease-in-out}.shellCanvasContainerInactive{opacity:0;pointer-events:none}.shellButtonContainer{padding-left:1rem;cursor:pointer;pointer-events:all;border-left:1px solid #fff;position:relative}.shellButtonContainer .buttonContent{background:#fff;transition:.2s all ease;-webkit-transition:.2s all ease;min-width:2.5rem;max-width:2.5rem;min-height:2.5rem;max-height:2.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:50%}.shellButtonContainer .buttonContent span{display:none}.shellButtonContainer:hover .buttonContent{background:#f1f1f1}.shellButtonContainer.active{border-left:1px solid #333333}.shellButtonContainer.active .buttonContent{background:#f1f1f1}.shellButtonContainer img{width:1.375rem}.shellButtonContainer span{font-size:.6875rem;color:#333}.shellButtonContainer:hover span{color:#fff}.shellButtonContainer .hoverDescriptor{position:absolute;top:calc(50% - .5625rem);left:calc(100% + 1rem);padding:.25rem .5rem;background:rgba(0,0,0,.6);border-radius:1px;display:flex;justify-content:center;transition:.2s all ease;-webkit-transition:.2s all ease;opacity:0;pointer-events:none}.shellButtonContainer:hover .hoverDescriptor{opacity:1}.shellButtonContainer .hoverDescriptor span{color:#fff;font-size:11px;white-space:nowrap}.canvasTooltip{position:absolute;width:100%;display:flex;padding:1rem;bottom:0;justify-content:center;color:#898989;font-style:italic;font-size:.75rem;font-family:Inter,helvetica,sans-serif;opacity:1;transition:.2s all ease;-webkit-transition:.2s all ease;pointer-events:none;text-transform:uppercase;margin-bottom:5rem}.emptySceneBG{position:absolute;width:100%;height:100%;display:flex;padding:1rem;bottom:0;font-size:2rem;justify-content:center;align-items:center;color:#89898939;font-family:Inter,helvetica,sans-serif;opacity:1;transition:.2s all ease;-webkit-transition:.2s all ease;pointer-events:none;text-transform:uppercase}
|
|
9196
|
+
`),W.fragmentShader=W.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const K=new hu(OLe),J=new hu(PLe);return J.depthTest=K.depthTest=!1,[U,j,H,Q,K,J,G]},[o,n,i,r,u]),I=U=>{w.visible=!0,w.material=R,R.uniforms.tDiffuse.value=x.texture,R.uniforms.h.value=U*1/256,b.setRenderTarget(L),b.render(w,v.current),w.material=N,N.uniforms.tDiffuse.value=L.texture,N.uniforms.v.value=U*1/256,b.setRenderTarget(x),b.render(w,v.current),w.visible=!1};let D=0,k,F;return Km(()=>{v.current&&(e===1/0||D<e)&&(D++,k=E.background,F=E.overrideMaterial,y.current.visible=!1,E.background=null,E.overrideMaterial=_,b.setRenderTarget(x),b.render(E,v.current),I(a),l&&I(a*.4),b.setRenderTarget(null),y.current.visible=!0,E.overrideMaterial=F,E.background=k)}),oe.useImperativeHandle(m,()=>y.current,[]),oe.createElement("group",Gd({"rotation-x":Math.PI/2},p,{ref:y}),oe.createElement("mesh",{renderOrder:h,geometry:S,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},oe.createElement("meshBasicMaterial",{transparent:!0,map:x.texture,"map-encoding":b.outputEncoding,opacity:t,depthWrite:f})),oe.createElement("orthographicCamera",{ref:v,args:[-n/2,n/2,i/2,-i/2,0,s]}))}),JLe={}.VITE_APP_ENV,eUe=!1;let tUe=!1,xT;const zt=new bJ("CORE");JLe==="staging"?(zt.setCurrentMode(jR.Staging),xT="https://storage.googleapis.com/epigraph-configurator"):(zt.setCurrentMode(jR.Release),xT="https://storage.googleapis.com/epigraph-configurator");zt.info({title:"test"});const M$=99999,nUe=99999;let nt=null;function iUe(r){nt=r,nt.disableAnalyticsEvents=tUe}const hie=`${xT}/projects-asset-data`,rUe=`${hie}/generic`;let aUe="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe?moduleID=",MH="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe/saveConfig",RH="https://us-central1-epigraph-product-configurator.cloudfunctions.net/epigraphServe?configID=",Om="https://storage.googleapis.com/gsc-epigraph-design/product-assets";function sUe(r){const e=r.SAVE_CONFIG_ENDPOINT;MH=e||MH;const t=r.FETCH_CONFIG_ENDPOINT;RH=t||RH;const n=r.PUBLIC_DESIGN_ASSETS_ENDPOINT;Om=n||Om;const i=r.ASSETS_SOURCE_ROOT;xT=i||xT}const kl=Object.freeze({info:{id:"info",level:1e3,src:Om+"/Icon/Info.svg",color:"#2E6CDF",cssClass:"alert-info",background:"#D3E0F8",filter:"invert(39%) sepia(41%) saturate(5002%) hue-rotate(208deg) brightness(91%) contrast(92%)"},warn:{id:"warn",level:3e3,src:Om+"/Icon/Warning.svg",color:"#E2B236",cssClass:"alert-warn",background:"#F9EED2",filter:"invert(83%) sepia(67%) saturate(1578%) hue-rotate(328deg) brightness(93%) contrast(90%)"},error:{id:"error",level:4e3,src:Om+"/Icon/Block.svg",color:"#D0342C",cssClass:"alert-error",background:"#F6D7D5",filter:"invert(24%) sepia(96%) saturate(1914%) hue-rotate(349deg) brightness(95%) contrast(81%)"},success:{id:"success",level:2e3,src:Om+"/Icon/CheckCircle.svg",color:"#65BC6C",cssClass:"alert-success",background:"#DBF0DD",filter:"invert(74%) sepia(3%) saturate(5600%) hue-rotate(75deg) brightness(90%) contrast(90%)"}}),Js=Object.freeze({NONE:0,ROTATE:1,TRUCK:2,OFFSET:4,DOLLY:8,ZOOM:16,TOUCH_ROTATE:32,TOUCH_TRUCK:64,TOUCH_OFFSET:128,TOUCH_DOLLY:256,TOUCH_ZOOM:512,TOUCH_DOLLY_TRUCK:1024,TOUCH_DOLLY_OFFSET:2048,TOUCH_DOLLY_ROTATE:4096,TOUCH_ZOOM_TRUCK:8192,TOUCH_ZOOM_OFFSET:16384,TOUCH_ZOOM_ROTATE:32768}),eo={GRAB:"grab",POINTER:"pointer",BLOCKED:"blocked",GRABBING:"grabbing",MOVE:"move"},oUe=r=>{const e=[],t=new Set;for(const n of r){let i=n,a=0;for(;t.has(i);)i=n+"."+ ++a;t.add(i),e.push(i)}return e},lUe=(r,e)=>{const t={};for(const n of r.mappings)for(const i of n.variants)t[e[i]]={material:null,gltfMaterialIndex:n.material};return t},SP=r=>r.material!==void 0&&r.userData&&r.userData.variantMaterials,fie=(r,e,t)=>{t(r,e);for(let n=0;n<r.children.length;n++)fie(r.children[n],e.children[n],t)},R$=(r,e)=>{e.userData.variantMaterials!==void 0&&(r.userData.variantMaterials=Object.assign({},e.userData.variantMaterials)),e.userData.originalMaterial!==void 0&&(r.userData.originalMaterial=e.userData.originalMaterial)};class cUe{constructor(e){this.parser=e,this.name="KHR_materials_variants"}afterRoot(e){const t=this.parser,n=t.json;if(!n.extensions||!n.extensions[this.name])return null;const a=n.extensions[this.name].variants||[],s=oUe(a.map(u=>u.name));for(const u of e.scenes)u.traverse(f=>{const h=t.associations.get(f);if(!h||h.meshes===void 0||h.primitives===void 0)return;const y=n.meshes[h.meshes].primitives[h.primitives].extensions;!y||!y[this.name]||(f.userData.variantMaterials=lUe(y[this.name],s))});e.userData.variants=s,e.functions=e.functions||{};const o=async(u,f,h)=>{u.userData.originalMaterial||(u.userData.originalMaterial=u.material);const p=u.material;let m=null;if(f===null||!u.userData.variantMaterials[f])u.material=u.userData.originalMaterial,t.associations.has(u.material)&&(m=t.associations.get(u.material).index);else{const y=u.userData.variantMaterials[f];y.material?(u.material=y.material,y.gltfMaterialIndex!==void 0&&(m=y.gltfMaterialIndex)):(m=y.gltfMaterialIndex,u.material=await t.getDependency("material",m),t.assignFinalMaterial(u),y.material=u.material)}h!==null&&h(u,p,m)},l=u=>{const f=u.material,h=u.userData.variantMaterials,p=[];for(const m in h){const y=h[m];if(y.material)continue;const E=y.gltfMaterialIndex;p.push(t.getDependency("material",E).then(b=>{u.material=b,t.assignFinalMaterial(u),h[m].material=u.material}))}return Promise.all(p).then(()=>{u.material=f})};e.functions.selectVariant=(u,f,h=!0,p=null)=>{const m=[];return h?u.traverse(y=>SP(y)&&m.push(o(y,f,p))):SP(u)&&m.push(o(u,f,p)),Promise.all(m)},e.functions.ensureLoadVariants=(u,f=!0)=>{const h=[];return f?u.traverse(p=>SP(p)&&h.push(l(p))):SP(u)&&h.push(l(u)),Promise.all(h)},e.functions.copyVariantMaterials=(u,f,h=!0)=>{h?fie(u,f,(p,m)=>R$(p,m)):R$(u,f)}}}var Z6=new ULe;Z6.setDecoderPath(`${xT}/external-libs/draco/`);Z6.setDecoderConfig({type:"js"});const Mo=Do((r,e)=>({assets:{items:{}},actions:{async loadAsset(t,n=!1){const{assets:i}=e();let a,s;if(i.items[t]){const h=n?i.items[t].proxy:i.items[t];if(h.isLoaded)return i.items[t];if(h.errorLoading)throw Error((n?"Proxy ":"Model ")+"Loading failed for: "+t,t)}else i.items[t]={isLoaded:!1,errorLoading:!1,proxy:{isLoaded:!1,errorLoading:!1}};const o=Ln.getState().productData[t];if(!o)throw Error("Data doesn't exists for "+t,t);if(n?(a=i.items[t].proxy,s=nt.getResolvedAssetUrl(o.colliderProxyGLTF)):(a=i.items[t],s=nt.getResolvedAssetUrl(o.gltfURL)),!a||!s)return null;const l=new eLe;l.register(h=>new cUe(h)),l.setDRACOLoader(Z6);async function u(h){const p=h.loaded/h.total*100;a.progress=p}const f=await l.loadAsync(s,u).catch(h=>{throw a.isLoaded=!1,a.errorLoading=!0,a.error=h,zt.info(s),Error("Couldn't load "+t,t)});return a.data=f,a.isLoaded=!0,i.items[t]},IsAssetLoaded(t){const{assets:n}=e();return n.items.hasOwnProperty(t)?n.items[t].isLoaded:!1},IsProxyLoaded(t){const{assets:n}=e();return n.items.hasOwnProperty(t)&&n.items[t].hasOwnProperty(proxy)?n.items[t].proxy.isLoaded:!1}}}));var Vv=null,jv=[];const mr=Do((r,e)=>({ghostData:null,ghostsTransform:[],ghostVisibility:!0,ghostParentRef:null,ghostMaterial:null,actions:{spawnGhostsForSkuID:async(t,n=!1,i)=>{const{ghostData:a,ghostsTransform:s}=e();if(a!==null||s.length>0){zt.info("ghosts are already spawned for: "+a.skuID);return}return await new Promise(async(l,u)=>{let f={};const h=()=>{l(f)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Ghost_Loaded,h,{once:!0});const p=Ln.getState().productData,m=ln.getState().attachmentSystem.currentStructure;if(Vv=m.getFirstNodeByCategoryID(p[t].categoryID),p[t].replace&&Vv){if(t==Vv.skuID)return;const{transforms:E,connectablePlugs:b}=m.findGhostTransformForReplacement(t,Vv);if(E==null&&b==null){zt.error({title:"Couldn't Find Ghost transforms and connectablePlugs for "+t});return}f.transforms=E,f.newNodes=[Vv],f.connectablePlugs=b,f.addItemOrSwap=["replace"],Vv.setModelVisibility(!1)}else{const{transforms:E,newNodes:b,connectablePlugs:v}=m.findGhostTransforms(t,n);let x=E,S=v,_=b,w=[];for(let R=0;R<E.length;R++)w.push("add");if(p[t].swappable&&!Je.getState().dragging){jv=m.getNodesByCategoryID(p[t].categoryID);for(let R=0;R<jv.length;R++){const N=m.findGhostTransformForReplacement(t,jv[R]);N.transforms&&(x.push(N.transforms[0]),S.push(N.connectablePlugs[0]),_.push(jv[R]),w.push("replace"),jv[R].setModelVisibility(!1))}}f.transforms=x,f.newNodes=_,f.connectablePlugs=S,f.addItemOrSwap=w}if(f.transforms.length<=0)return;const y=await Mo.getState().actions.loadAsset(t,!0);r({ghostsTransform:f.transforms,ghostData:{proxyScene:y.proxy.data.scene,skuID:t,newNodes:f.newNodes,addItemOrSwap:f.addItemOrSwap,connectablePlugs:f.connectablePlugs,count:i||f.transforms.length}})})},clearAllGhosts:()=>{if(Vv&&Vv.setModelVisibility(!0),jv)for(let t=0;t<jv.length;t++)jv[t].setModelVisibility(!0);r({ghostVisibility:!0,ghostData:null,ghostsTransform:[]})}}})),wr=Do((r,e)=>({manualControl:!1,sourcePos:null,destPos:new ve(0,0,0),interpolationFactor:0,duration:0,focusPointPosition:new ve(0,0,0),canCameraRotate:!0,sendCameraDetailsTrigger:!1,viewPointPosition:new ve(0,0,0),boundsMargin:0,userDragging:!1,disableAutoRotate:!1,cameraSettings:{truckSpeed:1,fov:35,dollySpeed:1,initialViewPointPosition:new ve(20,15,50),canZoom:!1,canPan:!1,minZoom:1,maxZoom:3,canAutoRotate:!1,autoRotateSpeed:.5,minPolarAngle:0,maxPolarAngle:180,clearColour:"white",zoomingMultiplier:0},actions:{triggerFetchingCamera:()=>{r(t=>({sendCameraDetailsTrigger:!t.sendCameraDetailsTrigger}))},setCameraSettings:t=>{const{cameraSettings:n}=e();Je.getState().isMobile===!0&&t.zoomingMultiplier_mobile!==void 0?t.zoomingMultiplier=t.zoomingMultiplier_mobile:t.zoomingMultiplier_desktop!==void 0&&(t.zoomingMultiplier=t.zoomingMultiplier_desktop),Object.keys(t).map(a=>n[a]=t[a]),r({cameraSettings:{...n},viewPointPosition:IH(n.initialViewPointPosition)})}}})),ui=Do((r,e)=>({activeHotspotData:null,lastActiveHotspotData:null,isAnyHotspotActive:!1,hotspotsVisibility:!1,hotspotsTempVisibility:!0,hotspotsHealthCheck:!0,hotspotsSpawned:{},visitedHotspotsID:[],hotspotSpawnedForCategoryIDs:[],actions:{clearAllHotspots:()=>r({isAnyHotspotActive:!1,activeHotspotData:null,lastActiveHotspotData:null,hotspotsSpawned:{}}),removeHotspotForItem(t){const{hotspotsSpawned:n}=e();Object.keys(n).map(i=>{n[i].itemData.guid==t.itemData.guid&&delete n[i]}),r({hotspotsSpawned:{...n}})},checkHotspotHealth(){const{hotspotsHealthCheck:t}=e();r({hotspotsHealthCheck:!t})},toggleHotspotVisibility(){const{hotspotsVisibility:t}=e();r({hotspotsVisibility:!t})},switchHotspotsVisibility(t,n=!1){r(n===!0?{hotspotsTempVisibility:t}:{hotspotsVisibility:t})},clickHotspot(t,n,i,a=!1){const{activeHotspotData:s}=e();r({lastActiveHotspotData:s}),hUe(t,n,i);let l=Wt.getState().itemsSpawned[i].itemData.skuID;a===!1&&(nt.fireEvent(nt.EVENTS.SCENE.Hotspot_Enter,{hotspotAbsID:pUe(l,t)}),nt.fireEvent(nt.EVENTS.UI.UtilityMenu_Hide))},exitHotspot(t=!1){const{activeHotspotData:n}=e();n&&(r({lastActiveHotspotData:n}),uUe(),t===!1&&(nt.fireEvent(nt.EVENTS.SCENE.Hotspot_Exit,n),nt.fireEvent(nt.EVENTS.UI.UtilityMenu_Show)))}}}));function uUe(){ui.setState({activeHotspotData:null}),ui.setState({isAnyHotspotActive:!1}),Je.getState().actions.triggerAutoFocus()}function hUe(r,e,t){let n=ui.getState();const a=Wt.getState().itemsSpawned;let s=n.visitedHotspotsID;const o=a[t].hotspotsData.filter(w=>w.hotspotID==r);if(!o||o.length<=0)return;const l=o[0],u=a[t].itemData.skuID+"_"+r;let h=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t),p=new ve(0,0,0);h&&h.ref&&h.ref.getWorldPosition(p);let m=new Xi().identity();h&&h.ref&&h.ref.getWorldQuaternion(m);let y=l.focusPointTransform;zt.info(y);let E=IH(y);E.applyQuaternion(m);let b=l.viewPointTransform,v=IH(b);v.applyQuaternion(m);let x=N$(Fx(E),Fx(p)),S=N$(Fx(v),Fx(p));wr.setState({sourcePos:null,manualControl:!1,focusPointPosition:x,destPos:S,viewPointPosition:S,duration:1e3}),ui.setState({activeHotspotData:{hotspotData:{guid:e,...l},itemData:{...a[t],guid:t},domID:"rd_"+u},isAnyHotspotActive:!0}),s.includes(u)||(s.push(u),ui.setState({visitedIDs:{...s}}))}const Wt=Do((r,e)=>({variantChangeAlert:!1,removeItems:[],removeItemTrigger:!1,itemsSpawned:{},itemsCount:0,modelLoadedAlert:0,lastDeletedItemData:null,lastDeletedItemsData:[],hoveredItemRef:{},collidersRef:[],filteredCollidersRef:[],selectedItemData:null,busy:!1,actions:{triggerModelLoaded:()=>r(t=>({modelLoadedAlert:t.modelLoadedAlert+1})),triggerRemoveItem:()=>r(t=>({removeItemTrigger:!t.removeItemTrigger})),addToRemoveItems:t=>{const{removeItems:n}=e();n.push(t)},switchToVariant:async(t,n,i=!1)=>{const{itemsSpawned:a,variantChangeAlert:s}=e(),o=Ln.getState().categoryData,l=a[t.guid].itemData.clonedScene;var f=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t.guid);Mo.getState().assets.items[t.skuID].data||o.geometryVariants&&o.geometryVariants.map(m=>{m.productsInCategory.map(y=>{let E=!1;y.products.map(b=>{b==t.skuID&&(E=!0)}),E&&y.products.map(b=>{const v=Mo.getState().assets.items[b].data;v&&(Mo.getState().assets.items[t.skuID].data=v)})})});const p=Mo.getState().assets.items[t.skuID].data;p&&(await p.functions.selectVariant(l,n),i?(f.overrideVariant=n,nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!0)):f.currentVariant=n,r({variantChangeAlert:!s}))},clearAllItems:()=>{r({itemsSpawned:{},itemsCount:0,lastDeletedItemsData:[],hoveredItemRef:[],collidersRef:[],filteredCollidersRef:[],selectedItemData:null})},setItemsSpawned:t=>{r({itemsSpawned:t,itemsCount:Object.keys(t).length})},setHoveredItemRef:t=>r({hoveredItemRef:t}),setCollidersRef:t=>{r({collidersRef:t});let n=[];for(var i=0;i<t.length;i++)t[i].current&&n.push(t[i]);Wt.setState({filteredCollidersRef:[...n]})},setSelectedItemData:t=>{const{selectedItemData:n,hoveredItemRef:i,actions:a}=e();n&&(delete i[n.itemData.guid],a.setHoveredItemRef({...i})),r({selectedItemData:{...t}}),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.switchHotspotsVisibility(!1,!0),wr.setState({canCameraRotate:!1})},deselectItem:()=>{const{selectedItemData:t}=e();t&&nt.fireEvent(nt.EVENTS.UI.ContextMenu_Hide,t),r(()=>({selectedItemData:null})),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.switchHotspotsVisibility(!0,!0),wr.setState({canCameraRotate:!0}),Wt.getState().actions.setHoveredItemRef({})},removeItemByGUID:async t=>{const{itemsSpawned:n,actions:i}=e();if(n.hasOwnProperty(t))return new Promise(async(a,s)=>{i.addToRemoveItems(t),i.triggerRemoveItem();const o=l=>{t===l.data.itemData.guid&&a(t)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Item_Removed,o,{once:!0})})},addItemBySkuID:async(t,n=0,i=!1,a)=>{r({busy:!0});const{actions:s,itemsSpawned:o}=e(),l=Ln.getState().productData,u=Ln.getState().hotspotsData,f=ln.getState().attachmentSystem;let h=!0;const p=await new Promise(async(E,b)=>{if(s.deselectItem(),!l[t]){zt.warn({title:`Product not found: ${t}`}),nt.alert({alertMsg:t+": product not found!",alertTime:5e3,alertType:"warn",alertLabel:"Not Found"}),h=!1,b(t+": product not found!");return}const v=[...mr.getState().ghostsTransform],x={...mr.getState().ghostData};if(mr.getState().actions.clearAllGhosts(),v.length<=0){nt.alert({alertMsg:"Unable to add item to configuration",alertTime:6e3,alertType:"warn",alertLabel:"Action Unavailable"}),h=!1,b("No available connections for this product to attach to");return}const S=_=>{t===_.data&&E(x.newNodes[n].guid)};if(nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,S,{once:!0}),x.addItemOrSwap[n]=="replace")await fUe(o,x.skuID,v[n],x.newNodes[n]);else{const _=x.newNodes[n];_.isDependent=i;let w=!0;if(l[x.skuID].hasOwnProperty("disableInteraction")){const I=l[x.skuID].disableInteraction;(I==!0||I==!1)&&(w=!I)}(a==!0||a==!1)&&(w=a),_.isInteractive=w;const{position:R,rotation:N}=v[n];_.transform={position:R,rotation:N},f.currentStructure.addNode(_),f.currentStructure.connectPlugs(x.connectablePlugs[n]);const L=await Mo.getState().actions.loadAsset(x.skuID,!0);zt.info("GHOST NEW NODE: ",_),o[_.guid]={itemData:{proxyScene:L.proxy.data.scene,guid:x.newNodes[n].guid,...l[x.skuID],position:R,rotation:N,hasItemLoaded:!1,isDependent:i,isInteractive:w},hotspotsData:u[x.skuID],hotspotSpawned:!1},await vc(1),s.setItemsSpawned({...o})}}).catch(E=>{zt.error({title:E}),h=!1});if(h===!1)return r({busy:!1}),p;const m=f.getCartItems();m&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,m);const y=l[t]?.plugs;if(y){for(const E of y){const b=E?.dependencySku;if(!b)continue;zt.info(`Found a dependency: ${b} on the plug: ${E.name}`);let v=!0;l[b]&&l[b].hasOwnProperty("ignoreSpawningCollisionAsDependency")&&(v=l[b].ignoreSpawningCollisionAsDependency),E.hasOwnProperty("ignoreSpawningCollision")&&(v=E.ignoreSpawningCollision);let x=Je.getState().sceneSettings.ignoreSpawningCollision;l[b].hasOwnProperty("ignoreSpawningCollision")&&(x=l[b].ignoreSpawningCollision),l[b].ignoreSpawningCollision=v;const S=await mr.getState().actions.spawnGhostsForSkuID(b,v);if(l[b].ignoreSpawningCollision=x,!S)continue;const _=f.currentStructure.getNodeByGUID(p),w=_.getPlugByName(E.name)?.guid,R=E?.isDependencySkuInteractive?E.isDependencySkuInteractive===1:!1,N=S.connectablePlugs;let L=!1;for(let I=0;I<S.connectablePlugs.length;I++){if(N[I].receiverPlug.guid!==w)continue;L=!0;const D=await s.addItemBySkuID(b,I,!0,R);D!==null&&_.addMyDependenciesGUID(D)}L||mr.getState().actions.clearAllGhosts()}mr.getState().actions.clearAllGhosts()}return r({busy:!1}),p},async addItemWithTransform(t,n,i,a=!0){return new Promise(async(s,o)=>{const{actions:l,itemsSpawned:u}=e();l.deselectItem();const f=Ln.getState().productData,h=Ln.getState().hotspotsData;if(!f[n]){nt.alert({alertMsg:n+": product not found!",alertTime:5e3,alertType:"warn",alertLabel:"Not Found"});return}const{position:p,rotation:m}=t;u[i]!=null&&(ui.getState().actions.removeHotspotForItem({...u[i]}),delete u[i]);const y=b=>{n==b.data&&s(i)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,y,{once:!0});const E=await Mo.getState().actions.loadAsset(n,!0);E!=null&&(await vc(1),u[i]={itemData:{proxyScene:E.proxy.data.scene,guid:i,...f[n],position:p,rotation:m,hasItemLoaded:!1,isInteractive:a},hotspotsData:h[n],hotspotSpawned:!1},r({itemsSpawned:{...u}}))})},async replaceGUIDItemBySKUID(t,n){const{itemsSpawned:i}=e(),a=Ln.getState().productData,s=Ln.getState().hotspotsData,o=ln.getState().attachmentSystem.currentStructure,l=o.getNodeByGUID(t);return l.isReplaceableWithSkuId(n)?(await new Promise(async(f,h)=>{ui.getState().actions.removeHotspotForItem({...i[t]}),delete i[t],l.update(n);const p=y=>{n===y.data&&f(!0)};nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Loaded,p,{once:!0});const m=await Mo.getState().actions.loadAsset(n,!0);await vc(1),i[t]={itemData:{proxyScene:m.proxy.data.scene,guid:t,...a[n],position:l.transform.position,rotation:l.transform.rotation,hasItemLoaded:!1},hotspotsData:s[n],hotspotSpawned:!1},Wt.setState({itemsSpawned:{...i}})}),o.recalculateStructureFromNode(l.whichNodeAreWeAttachedTo()),ln.getState().actions.toggleStructureUpdated(),!0):!1}}}));async function fUe(r,e,t,n){const{position:i,rotation:a}=t,s=Ln.getState().productData,o=Ln.getState().hotspotsData,l=ln.getState().attachmentSystem.currentStructure;return new Promise(async(u,f)=>{const h=async()=>{const p=await Mo.getState().actions.loadAsset(e,!0);r[n.guid]={itemData:{proxyScene:p.proxy.data.scene,guid:n.guid,...s[e],position:i,rotation:a,hasItemLoaded:!1},hotspotsData:o[e],hotspotSpawned:!1},zt.warn({title:"SWITCHING VARIANT: ",details:n.currentVariant}),n.currentVariant=n.currentVariant,n.transform=t,Wt.setState({itemsSpawned:{...r}}),l.recalculateStructureFromNode(n),ln.getState().actions.toggleStructureUpdated(),u(n.guid)};ui.getState().actions.removeHotspotForItem({...r[n.guid]}),delete r[n.guid],n.update(e),nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Model_Removed,h,{once:!0})})}const zd=Do((r,e)=>({inventoryData:{},actions:{getInventoryInfo:()=>{const{inventoryData:t}=e();return t},updateInventoryForAllProducts:t=>{const{actions:n}=e();Object.keys(t).map(i=>{let a=t[i];Object.keys(a).map(s=>{n.updateInventoryForProduct(i,s,a[s].inventory)})}),n.refreshInventory(Wt.getState().itemsSpawned)},updateInventoryForProduct:(t,n,i)=>{const{inventoryData:a}=e();let s=a[t],o=s[n];!s||!o||(o.inventory=i)},_clearInScene:()=>{const{inventoryData:t}=e();Object.keys(t).map(n=>{const i=t[n];Object.keys(i).map(a=>{i[a].inScene=[]})})},refreshInventory:t=>{if(!t)return;zt.info({title:"Refreshing Inventory"});const{actions:n,inventoryData:i}=e();n._clearInScene();const a=ln.getState().attachmentSystem;if(a===null)return;const s=a.currentStructure;if(s===null)return;Object.keys(t).map(f=>{const h=s.getNodeByGUID(f);if(!h)return;const p=h.overrideVariant?h.overrideVariant:h.currentVariant;if(!p)return;const m=i[h.skuID];if(!m||!m[p].inScene)return;m[p].inScene.push(f),Je.getState().sceneSettings.disableCart===!0?h.inStock={variantName:p,newValue:!0}:m[p].inScene.length>m[p].inventory?h.inStock={variantName:p,newValue:!1}:h.inStock={variantName:p,newValue:!0}});let o=!1;Object.keys(i).map(f=>{const h=i[f];Object.keys(h).map(p=>{h[p].countAvailable=h[p].inventory-h[p].inScene.length,h[p].countAvailable<0?(h[p].countUnavailable=h[p].countAvailable*-1,h[p].countAvailable=0,o=!0):h[p].countUnavailable=0})});const l={alertMsg:"Some items selected are out of stock",alertTime:3e3,alertType:"warn",alertLabel:"Stock Alert",alertId:"outOfStock"},u=mUe(Je.getState().persistantAlertData,l);o===!1&&u===!0&&nt.removePersistantAlert(),nt.fireEvent(nt.EVENTS.SCENE.Inventory_Updated,i)}}})),Je=Do((r,e)=>({hoveredGhostIndex:-1,itemDraggedSkuID:null,builderMode:!1,dragging:!1,bbox:null,draggingItemGUID:null,sceneRef:null,cssLoaded:!0,configurationLoaded:!0,preconfigurationLoaded:!1,cursorParentRef:null,glContext:null,canvasTooltipText:"",canvasSize:{width:600,height:600},boundData:null,showDimensions:!1,autoFocusTrigger:0,cameraActive:!1,autoFocusRef:null,alertData:{},persistantAlertData:null,alertQueue:[],alertSettings:null,draggingOnDropCollisionData:null,multipleTouchDetected:!1,isMobile:!1,isTouchDevice:!1,isTablet:!1,isDesktop:!0,isLandscape:!1,sceneSettings:{swappableRoot:!0,preserveDrawingBuffer:!1,showSaveBtn:!0,showShareBtn:!0,showResetBtn:!0,showDimensionBtn:!0,showViewInYourSpaceBtn:!0,showDependencyOnHover:!1,showContextMenu:!0,showHotspotsBtn:!0,sceneScaleUnit:"ft",currency:"$",disableDragDrop:!1,ignoreSpawningCollision:!1,disableCollider:!1,disableContextMenu:!1,ghostColor:{r:250,g:50,b:0,a:.75},ghostAsWireframe:!1,draggableUI:!1,outOfStock_EmissiveColor:{r:250,g:50,b:0},outOfStock_EmissiveIntensity:.002,defaultConfigurationID:null,emptySceneText:"Empty Scene",addToCartCTAText:"Add To Cart",ignoreCollisionPostDragging:!1,disableCart:!1,dimensionColor:{r:0,g:0,b:0},disableLocalColorOverride:!1,textSettings:{cartQuantityText:"Qty",reviewButtonText:"Review",cartHeadingText:"Review Products",buildTabHeadingText:"Build",colorTabHeadingText:"Color",featuresTabHeadingText:"Features",tooltipEmptySceneText:"-Add items to the scene-",tooltipInstructionText:"-Drag to rotate the camera-"},variantsTabOrder:{color:{enabled:!0,priority:1},geometryVariants:{enabled:!0,priority:2}},boundingBoxLeeway:.9,contactShadowVisibility:!0,measurementPrecision:2,disableAlerts:!1,focusCameraOnGhosts:!0,alertLevel:0,alertControl:{itemAdded:!0,geometryVariantChanged:!0,overridesRemoved:!0,materialVariantChanged:!0,itemRemoved:!0,itemRepositioned:!0,configurationSaved:!0,linkCopied:!0,outOfStock:!0}},actions:{popFromAlertQueue:()=>{const{alertQueue:t}=e();return t.shift(),r({alertQueue:t}),t},addToAlertQueue:t=>{const{alertQueue:n}=e();return n.push(t),r({alertQueue:n}),n},getDeviceState:()=>{const{isDesktop:t,isMobile:n,isTablet:i,isTouchDevice:a,isLandscape:s}=e();return{isDesktop:t,isMobile:n,isTablet:i,isTouchDevice:a,isLandscape:s}},enableCart:()=>{const{sceneSettings:t}=e();t.disableCart=!1,zd.getState().actions.refreshInventory(Wt.getState().itemsSpawned),nt.fireEvent(nt.EVENTS.SCENE.Cart_StatusUpdated,{disableCart:!1})},disableCart:()=>{const{sceneSettings:t}=e();t.disableCart=!0,zd.getState().actions.refreshInventory(Wt.getState().itemsSpawned),nt.fireEvent(nt.EVENTS.SCENE.Cart_StatusUpdated,{disableCart:!0})},getSceneSettings:()=>{const{sceneSettings:t}=e();return t},sendAlert:t=>{r({alertData:{...t}})},switchCursor(t){const{cursorParentRef:n}=e();if(!n)return;let i="";switch(t){default:case eo.GRAB:i="grabCursor";break;case eo.GRABBING:i="grabbingCursor";break;case eo.BLOCKED:i="blockedCursor";break;case eo.POINTER:i="pointerCursor";break;case eo.MOVE:i="moveCursor";break}for(let a=0;a<n.classList.length;a++)n.classList[a].includes("Cursor")&&n.classList.remove(n.classList[a]);n.classList.add(i)},setAlertSettings:t=>{r({alertSettings:t})},async completeDropItem(){const t=ln.getState().attachmentSystem,{draggingOnDropCollisionData:n}=e(),{node:i,attachedChildrenGuids:a,collidingStatus:s,intersectingGhostObject:o,initPosition:l,initRotation:u,detachedPlugs:f,attachedNodesToCurrentNode:h}=n;nt.alert({alertMsg:"Item(s) have been removed",alertTime:7e3,alertType:"info",alertLabel:"Item(s) Removed",alertId:"itemRemoved"});for(const[E,b]of a.entries())s[E]===!0&&await Wt.getState().actions.removeItemByGUID(b);const p=o.userData;let m=i.getPlugByName(p.incomingPlugName),y=t.currentStructure.getPlugByGUID(p.receiverPlugGUID);i.ref.position.set(o.position.x,o.position.y,o.position.z),i.ref.setRotationFromEuler(o.rotation),i.transform={position:o.position,rotation:o.quaternion},t.currentStructure.connectPlugs({incomingPlug:m,receiverPlug:y}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),h.map(E=>{i.ref.parent.attach(E.ref)}),ln.getState().actions.updateFittingSkuIds()},revertDropItem(){const t=ln.getState().attachmentSystem,{draggingOnDropCollisionData:n}=e(),{node:i,attachedChildrenGuids:a,collidingStatus:s,intersectingGhostObject:o,initPosition:l,initRotation:u,detachedPlugs:f,attachedNodesToCurrentNode:h}=n;nt.alert({alertMsg:"Position of item"+i.skuID+"is being moved to it's original position",alertTime:4e3,alertType:"info",alertLabel:"Repositioning",alertId:"itemRepositioned"});const p=f.neighbourDetachedPlugs;p&&(f.neighbourNode.detachNodeFromReceiver(),t.currentStructure.connectPlugs({incomingPlug:p.incomingPlug,receiverPlug:p.receiverPlug}));let m=f.rootDetachedPlugs.incomingPlug,y=f.rootDetachedPlugs.receiverPlug;i.ref.position.set(l.x,l.y,l.z),i.ref.setRotationFromEuler(u);let E=new Xi().identity();i.ref.getWorldQuaternion(E),i.transform={position:l,rotation:E},t.currentStructure.connectPlugs({incomingPlug:m,receiverPlug:y}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),h.map(b=>{i.ref.parent.attach(b.ref)}),ln.getState().actions.updateFittingSkuIds()},setCoreSettings:t=>{const{sceneSettings:n,isMobile:i,isTouchDevice:a,isLandscape:s,actions:o}=e(),l=i===!0?"mobile":"desktop",u=["showSave","showShare","showReset","showDimension","showHotspots","showViewInYourSpace","showContextMenu","draggableUI","textSettings","variantsTabOrder"];for(const f of u)if(f==="draggableUI"){const p=`${f}_${s===!1&&a===!0?"mobile":"desktop"}`;t[p]!==void 0&&(n[f]=t[p])}else if(f==="textSettings"||f==="variantsTabOrder"){if(t.hasOwnProperty(f)){let h=n[f];Object.keys(h).map(p=>{let m=t[f];m.hasOwnProperty(p)||(m[p]=h[p])})}}else{const h=`${f}_${l}`;if(t[h]!==void 0){let p=`${f}Btn`;f=="showContextMenu"&&(p=`${f}`),n[p]=t[h]}}t.disableCart===!0&&o.disableCart(),Object.keys(t).map(f=>n[f]=t[f]),r({sceneSettings:{...n,ghostThreeColor:{r:n.ghostColor.r/255,g:n.ghostColor.g/255,b:n.ghostColor.b/255,a:n.ghostColor.a/255}}})},triggerAutoFocus:(t=null)=>r(n=>({autoFocusRef:t,autoFocusTrigger:n.autoFocusTrigger+1})),requestNewScreenshot:async()=>new Promise((t,n)=>{zt.info("Taking a screenshot");const{glContext:i}=e();if(i.preserveDrawingBuffer===!1)zt.warn({title:"Preserve Drawing Buffer must be enabled to take a screenshot. Please make sure to enable this within the project input data coreSettings"}),n({success:!1,imageData:null});else{zt.info("Downloading the screenshot");const a=i.domElement.toDataURL("image/png").replace("image/png","image/octet-stream");t({success:!0,imageData:a})}})}})),dUe="rd",I$="_";function pUe(r,e){return`${dUe}${I$}${r}${I$}${e}`}async function vc(r){return zt.info({title:`Waiting for ${r}ms`}),new Promise((e,t)=>{setTimeout(()=>{e(!0)},r)})}function mUe(r,e){if(r===null||e===null)return!1;for(let t in r)if(r.hasOwnProperty(t)&&e.hasOwnProperty(t)&&r[t]!==e[t])return!1;return Object.keys(r).length===Object.keys(e).length}const gUe=r=>{const e={method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)};return fetch(MH,e)},vUe=function(){let r=!1;return function(e){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4)))&&(r=!0)}(navigator.userAgent||navigator.vendor||window.opera),r};function yUe(){return navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}function AUe(){const r=navigator.userAgent.toLowerCase(),e=/(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(r);return e||yUe()}function bUe(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}async function die(r){let e={data:null,report:"",success:!1};try{const n=await(await fetch(r)).text();e.data=JSON.parse(n),e.success=!0,e.report="Successfully fetched JSON data."}catch(t){e.report=t,nt.alert({alertMsg:"",alertTime:5e3,alertType:"warn",alertLabel:"Preload Failed"})}return e}const N$=(r,e)=>new ve(r[0]+e[0],r[1]+e[1],r[2]+e[2]),Fx=r=>[r.x,r.y,r.z],IH=r=>new ve(r[0],r[1],r[2]),_Ue=(r,e=!0)=>{let t=[];const n=Je.getState().sceneSettings.outOfStock_EmissiveColor,i=Je.getState().sceneSettings.outOfStock_EmissiveIntensity;return r.traverse(a=>{a.isMesh&&(a.material.userData.cloned?a.material.userData.inStock!==e&&(e?(a.material.emissive.set(new Yt(255,255,255)),a.material.emissiveIntensity=0):(a.material.emissive.set(new Yt(n.r,n.g,n.b)),a.material.emissiveIntensity=i),a.material.userData.inStock=e):(a.material=a.material.clone(),a.material.userData.inStock=e,a.material.userData.cloned=!0,e?(a.material.emissive.set(new Yt(255,255,255)),a.material.emissiveIntensity=0):(a.material.emissive.set(new Yt(n.r,n.g,n.b)),a.material.emissiveIntensity=i)),t.push(a))}),t},D$=(r,e)=>{let t=0,n=[];for(let i=0;i<r.length;i++){const a=r[i];e(a)?r[t++]=a:n.push(r[i])}return r.length=t,n},QL=r=>r*Math.PI/180,EUe=r=>{if(!r)return;if(new RegExp("^(?:[a-z+]+:)?//","i").test(r))return r;let n=r;return n=n.replaceAll("<@all-projects@>",hie),n=n.replaceAll("<@generic-project@>",rUe),n};function cz(r){var e=r.toString(16);return e.length==1?"0"+e:e}function O$(r,e,t){return"#"+cz(r)+cz(e)+cz(t)}var WL={},P$={get exports(){return WL},set exports(r){WL=r}},L$=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof window.msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto);if(L$){var U$=new Uint8Array(16);P$.exports=function(){return L$(U$),U$}}else{var B$=new Array(16);P$.exports=function(){for(var e=0,t;e<16;e++)e&3||(t=Math.random()*4294967296),B$[e]=t>>>((e&3)<<3)&255;return B$}}var pie=[];for(var xP=0;xP<256;++xP)pie[xP]=(xP+256).toString(16).substr(1);function SUe(r,e){var t=e||0,n=pie;return[n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],"-",n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]],n[r[t++]]].join("")}var mie=SUe,xUe=WL,TUe=mie,k$,uz,hz=0,fz=0;function wUe(r,e,t){var n=e&&t||0,i=e||[];r=r||{};var a=r.node||k$,s=r.clockseq!==void 0?r.clockseq:uz;if(a==null||s==null){var o=xUe();a==null&&(a=k$=[o[0]|1,o[1],o[2],o[3],o[4],o[5]]),s==null&&(s=uz=(o[6]<<8|o[7])&16383)}var l=r.msecs!==void 0?r.msecs:new Date().getTime(),u=r.nsecs!==void 0?r.nsecs:fz+1,f=l-hz+(u-fz)/1e4;if(f<0&&r.clockseq===void 0&&(s=s+1&16383),(f<0||l>hz)&&r.nsecs===void 0&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");hz=l,fz=u,uz=s,l+=122192928e5;var h=((l&268435455)*1e4+u)%4294967296;i[n++]=h>>>24&255,i[n++]=h>>>16&255,i[n++]=h>>>8&255,i[n++]=h&255;var p=l/4294967296*1e4&268435455;i[n++]=p>>>8&255,i[n++]=p&255,i[n++]=p>>>24&15|16,i[n++]=p>>>16&255,i[n++]=s>>>8|128,i[n++]=s&255;for(var m=0;m<6;++m)i[n+m]=a[m];return e||TUe(i)}var CUe=wUe,MUe=WL,RUe=mie;function IUe(r,e,t){var n=e&&t||0;typeof r=="string"&&(e=r==="binary"?new Array(16):null,r=null),r=r||{};var i=r.random||(r.rng||MUe)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e)for(var a=0;a<16;++a)e[n+a]=i[a];return e||RUe(i)}var NUe=IUe,DUe=CUe,gie=NUe,J6=gie;J6.v1=DUe;J6.v4=gie;var vie=J6;class NH{constructor(e,t,n=null){this._attachedPlug=null,this._name=e.name,this._acceptedPlugTypes=e.acceptedPlugTypes,this._type=e.type,this._affectedNodes=e.affectedNodes,this._weight=e.weight,this._connectsToPlugTypes=e.connectsToPlugTypes,this._node=t,this._guid=vie.v4(),this._isOpen=!0,this._isReceiverPlug=!1,this._attachedPlugGUID=null,n&&(this._guid=n.guid,this._isOpen=n.isOpen,this._isReceiverPlug=n.isReceiverPlug,this._attachedPlugGUID=n.attachedPlugGUID)}export(){return this.isOpen?null:{guid:this._guid,isOpen:this._isOpen,attachedPlugGUID:this._attachedPlugGUID,isReceiverPlug:this._isReceiverPlug}}get node(){return this._node}get attachedPlug(){return this._attachedPlug}set attachedPlug(e){this._attachedPlug=e}get type(){return this._type}get weight(){return this._weight}get affectedNodes(){return this._affectedNodes}get guid(){return this._guid}get isReceiverPlug(){return this._isReceiverPlug}get name(){return this._name}get acceptedPlugTypes(){return this._acceptedPlugTypes}set acceptedPlugTypes(e){this._acceptedPlugTypes=e}get connectsToPlugTypes(){return this._connectsToPlugTypes}set connectsToPlugTypes(e){this._connectsToPlugTypes=e}get isOpen(){return this._isOpen}attachPlug(e,t=!1){if(this._attachedPlug=e,this._attachedPlugGUID=e.guid,this._isOpen=!1,this._isReceiverPlug=t,t&&e.type!==""&&e.type==this._type)switch(e.type){default:case"weighted_hider":this._weight>e.weight?e.node.hideNodes(e.affectedNodes)||nt.coreWCRef.addEventListener(e.node.guid+":refLoaded",function(){e.node.hideNodes(e.affectedNodes)},{once:!0}):this._weight<e.weight&&(this._node.hideNodes(this._affectedNodes)||nt.coreWCRef.addEventListener(this._node.guid+":refLoaded",function(){this._node.hideNodes(this._affectedNodes)},{once:!0}));break}t&&(this._node.isEndNode=!1)}openPlug(){if(this._isReceiverPlug&&this._attachedPlug.type!==""&&this._attachedPlug.type==this._type)switch(this._attachedPlug.type){default:case"weighted_hider":this._weight>this._attachedPlug.weight?this._attachedPlug.node.showNodes(this._attachedPlug.affectedNodes):this._weight<this._attachedPlug.weight&&this._node.showNodes(this._affectedNodes);break}this._attachedPlug=null,this._attachedPlugGUID=null,this._isOpen=!0,this._isReceiverPlug&&(this._isReceiverPlug=!1,this._node.checkIfEndNode())}canAttachToPlug(e){for(let t=0;t<this._connectsToPlugTypes.length;t++)if(e._acceptedPlugTypes.includes(this._connectsToPlugTypes[t]))return!0;return!1}}let pR=class{#e="default";#i=!1;#t=!1;#r=!0;#a={};#o=!1;#n={};#s=[];constructor(e,t=null,n,i){let a=Ln.getState().productData;this._plugs=[],this._skuID=e,this._ref=null,this._transform=null,this.#e="default",this._overrideVariant=null,this._followsParent=a[e].followsParent,this._categoryID=a[e].categoryID,this._replace=a[e].replace,this._swappable=a[e].swappable,this._price=this.#l(),this.#i=a[e]?.ignoreInCart,t?(this._guid=t.guid,this._isEndNode=t.isEndNode,this._overrideVariant=t.overrideVariant,this.generatePlugsWithData(e,t.plugs)):(this._guid=vie.v4(),this._isEndNode=!0,this.generatePlugsForNode(e)),n&&Object.keys(n).map(s=>{if(a[e].looks&&a[e].looks.includes(s)){this.#e=s;return}})}updateGeometryVariant(e,t){const i=Ln.getState().categoryData.geometryVariants;let a=null;if(i.map(f=>{f.id==e&&(a=f)}),!a)return;const s=a.productsInCategory,l=a.variants[t].productsToSwitch,u=Wt.getState().itemsSpawned;s.map(f=>{f.products.map(h=>{this.skuID===h&&f.products.map(p=>{l.map(m=>{if(m==p){const y=Ln.getState().actions.getProductDataById(m);this.skuID=y.skuID;const E=u[this.guid];E&&E.itemData&&Object.keys(y).map(b=>{E.itemData[b]=y[b]}),this.hideNodes(y.geometriesToHide),this.showNodes(y.geometriesToShow),this.updatePricing(),this.resetInStock(),zd.getState().actions.refreshInventory(u)}})})})})}resetInStock(){this.#a={},this.#o=!0}setInStockForRef(e){if(!this.ref)return!1;let t=this.ref.getObjectByName("GRP_RenderGeometry");return t?(t.inStock=e,!0):!1}set inStock({variantName:e,newValue:t}){if(this.#a[e]&&this.#a[e]==t||(this.#a[e]=t,e!==this.#e&&this.#o===!1))return;const n=()=>{this.setInStockForRef(t)};n()||nt.coreWCRef.addEventListener(this.guid+":refLoaded",n,{once:!0})}get myDependenciesGUID(){return this.#s}set myDependenciesGUID(e){this.#s=e}addMyDependenciesGUID(e){this.#s.push(e)}get isDependent(){return this.#t}set isDependent(e){this.#t=e}get isInteractive(){return this.#r}set isInteractive(e){this.#r=e}update(e){this._skuID=e;const t=Ln.getState().productData,n=t[e]?.plugs;if(this.ignoreInCart=t[e].ignoreInCart,!!n)for(let i=0;i<this._plugs.length;i++)for(let a=0;a<n.length;a++)this._plugs[i].name==n[a].name&&(this._plugs[i].acceptedPlugTypes=n[a].acceptedPlugTypes,this._plugs[i].connectsToPlugTypes=n[a].connectsToPlugTypes)}export(){let e={};for(var t=0;t<this._plugs.length;t++){let n=this._plugs[t].export();n&&(e[this._plugs[t].name]=n)}return{skuID:this._skuID,guid:this._guid,isEndNode:this._isEndNode,plugs:e,overrideVariant:this._overrideVariant}}get node(){return this}get swappable(){return this._swappable}get replace(){return this._replace}get ignoreInCart(){return this.#i}set ignoreInCart(e){this.#i=e}get canRotate(){let e=!0;if(!this._isEndNode){const s=this.whichNodesAreAttachedToUs();if(s.length>0){let o=!0;if(s.map(l=>{l.followsParent===!1&&(o=!1)}),!o)return!1}}let t=!1;for(var n=0;n<this.plugs.length;n++)if(!this.plugs[n].isOpen&&this.plugs[n].attachedPlug.isReceiverPlug){const s=this.plugs[n].attachedPlug.acceptedPlugTypes;for(var i=0;i<this.plugs.length;i++)if(n!=i)for(var a=0;a<this.plugs[i].connectsToPlugTypes.length;a++)s.includes(this.plugs[i].connectsToPlugTypes[a])&&(t=!0)}return e=t,e}hideNodes(e){if(!this.ref)return!1;const t=this.ref.getObjectByName("GRP_RenderGeometry"),n=this.ref.getObjectByName("GRP_ProxyMesh");return e.map(i=>{if(t){const a=t.getObjectByName(i);a&&(a.visible=!1)}if(n){const a=n.getObjectByName(i);a&&(a.visible=!1)}}),!0}showNodes(e){if(!this.ref)return!1;const t=this.ref.getObjectByName("GRP_RenderGeometry"),n=this.ref.getObjectByName("GRP_ProxyMesh");e.map(i=>{if(t){const a=t.getObjectByName(i);a&&(a.visible=!0)}if(n){const a=n.getObjectByName(i);a&&(a.visible=!0)}})}canConnectToPlugType(e){let t=!1;return this._plugs.map(n=>{n.connectsToPlugTypes.map(i=>{i==e&&(t=!0)})}),t}isConnectedToSkuID(e){let t=!1;return this._plugs.map(n=>{n.isOpen||n.attachedPlug.node.skuID==e&&(t=!0)}),t}get isConnectedToRoot(){return this.isConnectedToSkuID("Root")}swapRoot(){if(!this.canSwapRoot)return;const t=ln.getState().attachmentSystem.currentStructure,n=this.whichNodesAreAttachedToUs();let i=null;n.map(u=>{u.followsParent===!1&&(i=u)});const a=i.detachNodeFromReceiver();let s=null;this._plugs.map(u=>{u.isOpen||u.attachedPlug.node.skuID=="Root"&&(s=u.attachedPlug)});const o=this.detachNodeFromReceiver();let l=null;return i.plugs.map(u=>{u.connectsToPlugTypes.includes("root")&&(l=u)}),t.connectPlugs({incomingPlug:l,receiverPlug:s}),{neighbourDetachedPlugs:a,rootDetachedPlugs:o,neighbourNode:i}}get canSwapRoot(){if(Je.getState().sceneSettings.swappableRoot===!1)return!1;let e=!1;if(this.isConnectedToRoot&&!this._isEndNode){const n=this.whichNodesAreAttachedToUs();let i=0,a=null;n.map(s=>{s.followsParent===!1&&(i++,a=s)}),i==1?a.canConnectToPlugType("root")&&(e=!0):i>0&&(e=!1)}return e}get canDrag(){let e=!0;return this._isEndNode||(this.whichNodesAreAttachedToUs().map(n=>{n.followsParent===!1&&(e=!1)}),e||(e=this.canSwapRoot)),e}get followsParent(){return this._followsParent}set followsParent(e){this._followsParent=e}get currentVariant(){return this.#e==="default"?Ln.getState().actions.getProductDataById(this._skuID).lookDetails.default.id:this.#e}get price(){return this._price}set price(e){this._price=e}updatePricing(){this._price=this.#l()}#l(){let t=Ln.getState().actions.getProductDataById(this._skuID).lookDetails[this.#e]?.price;return t||(t=0),t}set currentVariant(e){this.#e=e,this._price=this.#l()}get overrideVariant(){return this._overrideVariant}set overrideVariant(e){this._overrideVariant=e,this.#e=this._overrideVariant,this._price=this.#l()}get guid(){return this._guid}get skuID(){return this._skuID}set skuID(e){this._skuID=e}get plugs(){return this._plugs}get ref(){return this._ref}set ref(e){this._ref=e;let t=new CustomEvent(this._guid+":refLoaded",{bubbles:!0,cancelable:!1,composed:!0});const n=ln.getState().attachmentSystem;n.globalGeometryVariants&&Object.keys(n.globalGeometryVariants).map(i=>{this.updateGeometryVariant(i,n.globalGeometryVariants[i])}),t.data={},nt.coreWCRef?nt.coreWCRef.dispatchEvent(t):zt.warn({title:"core web component not found!"})}get isEndNode(){return this._isEndNode}set isEndNode(e){this._isEndNode=e}get categoryID(){return this._categoryID}get transform(){return this._transform}set transform(e){this._transform=e}setModelVisibility(e){e?this._ref?.scale.set(1,1,1):this._ref.scale.set(0,0,0)}checkIfEndNode(){let e=!0;for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&(e=!1);this.isEndNode=e}whichNodesAreAttachedToUs(){var e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&e.push(this._plugs[t].attachedPlug.node);return e}whichPlugsAreAttachedToUs(){var e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&e.push({receiverPlug:this._plugs[t],incomingPlug:this._plugs[t].attachedPlug});return e}whichNodeAreWeAttachedTo(){var e=null;for(let t=0;t<this._plugs.length;t++)this._plugs[t].isReceiverPlug&&(e=this._plugs[t].attachedPlug.node);return e}isReplaceableWithSkuId(e){const n=Ln.getState().productData[e]?.plugs;let i=0;if(!n)return!1;for(let a=0;a<this._plugs.length;a++)for(let s=0;s<n.length;s++)this._plugs[a].name==n[s].name&&i++;return i==this._plugs.length}whichPlugAreWeAttachedUsing(){for(let e=0;e<this._plugs.length;e++)if(!this._plugs[e].isOpen&&this._plugs[e].attachedPlug.isReceiverPlug)return this._plugs[e]}whichPlugAreWeAttachedTo(){for(let e=0;e<this._plugs.length;e++)if(!this._plugs[e].isOpen&&this._plugs[e].attachedPlug.isReceiverPlug)return this._plugs[e].attachedPlug}getPlugWhichCanConnectToType(e){for(const t of this._plugs)if(t.connectsToPlugTypes.includes(e))return t;return null}getOpenPlugsWeCanAttachFrom(){let e=[];if(this.whichNodeAreWeAttachedTo())return e;for(let t=0;t<this._plugs.length;t++)this.plugs[t].isOpen&&this.plugs[t].connectsToPlugTypes.length>0&&e.push(this._plugs[t]);return e}getOpenPlugsFromNode(){let e=[];for(let t=0;t<this._plugs.length;t++)this._plugs[t].isOpen&&this._plugs[t].acceptedPlugTypes.length>0&&e.push(this._plugs[t]);return e}generatePlugsForNode(e){this._plugs=[];let t=Ln.getState().productData[e]?.plugs;if(t)for(var n=0;n<t.length;n++){const i=new NH(t[n],this);this._plugs.push(i)}}generatePlugsWithData(e,t){let n=Ln.getState().productData[e]?.plugs;if(n)for(var i=0;i<n.length;i++){const a=new NH(n[i],this,t[n[i].name]);this._plugs.push(a)}}detachNodeFromReceiver(){for(var e=0;e<this.plugs.length;e++)if(!this.plugs[e].isOpen&&this.plugs[e].attachedPlug.isReceiverPlug){const t={incomingPlug:this.plugs[e],receiverPlug:this.plugs[e].attachedPlug};return this.plugs[e].attachedPlug.openPlug(),this.plugs[e].openPlug(),t}}detachNodeCompletely(){for(var e=0;e<this._plugs.length;e++)this._plugs[e].isOpen||(this._plugs[e].attachedPlug.openPlug(),this._plugs[e].openPlug())}getPlugByName(e){for(var t=0;t<this._plugs.length;t++)if(this._plugs[t].name==e)return this._plugs[t];return null}getPlugByGUID(e){for(var t=0;t<this._plugs.length;t++)if(this._plugs[t].guid==e)return this._plugs[t];return null}removeNode(){for(var e=0;e<this._plugs.length;e++)this._plugs[e].isOpen||(this._plugs[e].attachedPlug.isReceiverPlug?this._plugs[e].attachedPlug.openPlug():Wt.getState().actions.addToRemoveItems(this._plugs[e].attachedPlug.node.guid))}};class F${#e=!1;constructor(e=null,t,n){if(this._nodes=[],this._rootNode=null,zt.info({title:"preloadNodes",details:e}),e){zt.info({title:"PRELOAD Length-----------------:"+e.length});for(var i=0;i<e.length;i++){zt.info({title:"FOUND PRELOAD-----------------"});let a=e[i].skuID,s=new pR(a,e[i],t,n);a=="Root"&&(this._rootNode=s),this._nodes.push(s)}this.resolvePlugConnections(e)}else{const a=new pR("Root",null,t,n);this._rootNode=a,this._nodes.push(a)}Wt.getState().actions.addItemWithTransform({position:new ve(0,0,0),rotation:new Xi().identity()},"Root",this._rootNode.guid,!1),this._boundingBoxLeeway=Je.getState().sceneSettings.boundingBoxLeeway}get nodes(){return this._nodes}get rootNode(){return this._rootNode}updatePricing(){for(let e=0;e<this._nodes.length;e++)this._nodes[e].updatePricing()}getCurrentItemsInReplaceableCategory(){let e={};for(const t of this._nodes)t.replace&&(e[t.categoryID]=t.skuID);return e}recalculateStructureFromNode(e){for(let t=0;t<e.plugs.length;t++)if(!e.plugs[t].isOpen&&e.plugs[t].isReceiverPlug){const n=e.plugs[t].attachedPlug.node,i={receiverPlug:e.plugs[t],incomingPlug:e.plugs[t].attachedPlug};if(i){const a=this.findItemTransform(i);a&&(n.ref.position.set(a.position.x,a.position.y,a.position.z),n.ref.setRotationFromQuaternion(a.rotation),n.transform={position:a.position,rotation:a.rotation})}this.recalculateStructureFromNode(n)}}rotateNode(e){const t=this.getNodeByGUID(e);let n=null,i=null;for(let o=0;o<t.plugs.length;o++)if(!i&&!t.plugs[o].isOpen&&t.plugs[o].attachedPlug.isReceiverPlug){const l=t.plugs[o].attachedPlug.acceptedPlugTypes;i=t.plugs[o].attachedPlug;let u=[];for(let f=o+1;f<t.plugs.length;f++)u.push(t.plugs[f]);for(let f=0;f<o;f++)u.push(t.plugs[f]);for(let f=0;f<u.length;f++)for(let h=0;h<u[f].connectsToPlugTypes.length;h++)l.includes(u[f].connectsToPlugTypes[h])&&(n=u[f])}if(!n)return;t.detachNodeFromReceiver();const{position:a,rotation:s}=this.findItemTransform({receiverPlug:i,incomingPlug:n});t.ref.position.set(a.x,a.y,a.z),t.ref.setRotationFromQuaternion(s),t.transform={position:t.ref.position,rotation:s},this.connectPlugs({receiverPlug:i,incomingPlug:n}),this.recalculateStructureFromNode(t)}async load(){await this.respawnItems()}materialOverrideExists(){let e=!1;return this.nodes.map(t=>{if(t.overrideVariant)return e=!0,!0}),e}findGhostTransformForReplacement(e,t){const n=ln.getState().attachmentSystem,i=t.whichPlugAreWeAttachedTo(),a=t.whichPlugAreWeAttachedUsing(),o=new pR(e,null,n.globalVariants,n.globalGeometryVariants).getPlugByName(a.name);if(!o)return{transforms:null,connectablePlugs:null};const l={incomingPlug:o,receiverPlug:i};let u=[],f=this.findItemTransform(l);if(!f)return{transforms:u,connectablePlugs:l};let{position:h,rotation:p}=f;return h&&p&&u.push({position:h,rotation:p,incomingPlugName:l.incomingPlug.name,receiverPlugName:l.receiverPlug.name,incomingPlugGUID:l.incomingPlug.guid,receiverPlugGUID:l.receiverPlug.guid}),{transforms:u,connectablePlugs:l}}findGhostTransforms(e,t){const n=this.getOpenPlugs();if(n.length<=0)return{transforms:[]};const i=ln.getState().attachmentSystem,a=Ln.getState().productData,s=new pR(e,null,i.globalVariants,i.globalGeometryVariants),o=this.getConnectablePlugs(s,n);let l=[];if(o.length<=0)return{transforms:[]};let u=[];for(let h=0;h<o.length;h++){let p=this.findItemTransform(o[h]);if(!p)continue;let{position:m,rotation:y}=p;if(m&&y){let E=t;Array.isArray(t)===!0&&(E=!1),a[e].hasOwnProperty("ignoreSpawningCollision")&&(E=a[e].ignoreSpawningCollision),(E?!1:this.isColliding(s.skuID,p,o[h].receiverPlug,t))||(u.push({position:m,rotation:y,incomingPlugName:o[h].incomingPlug.name,receiverPlugName:o[h].receiverPlug.name,incomingPlugGUID:o[h].incomingPlug.guid,receiverPlugGUID:o[h].receiverPlug.guid}),l.push(o[h]))}}let f=[];for(let h=0;h<u.length;h++)f.push(s);return{transforms:u,newNodes:f,connectablePlugs:l}}resolvePlugConnections(e){for(let t=0;t<e.length;t++)Object.keys(e[t].plugs).map(n=>{let i=e[t].plugs[n].guid,a=this.getPlugInNodesByGUID(i);if(!a||a.attachedPlug)return;let s=e[t].plugs[n].attachedPlugGUID,o=this.getPlugInNodesByGUID(s);o&&(o.attachedPlug||(a.attachPlug(o,e[t].plugs[n].isReceiverPlug),o.attachPlug(a,!e[t].plugs[n].isReceiverPlug)))});zt.info({title:"RESOLVED PLUG CONNECTION: ",details:this})}async respawnItems(){let e=[this.rootNode];for(let t=0;t<e.length;t++){let i=e[t].whichPlugsAreAttachedToUs();for(let a=0;a<i.length;a++){let s=this.findItemTransformForPreload(i[a],i[a].receiverPlug.node.transform);s?await Wt.getState().actions.addItemWithTransform(s,i[a].incomingPlug.node.skuID,i[a].incomingPlug.node.guid):zt.warn({title:"Problem finding plug transform! "+i[a].name}),i[a].incomingPlug.node.transform=s,e.push(i[a].incomingPlug.node)}}nt.fireEvent(nt.EVENTS.SCENE.SavedConfiguration_Loaded),Je.getState().actions.triggerAutoFocus(),ui.getState().actions.checkHotspotHealth()}getPlugInNodesByGUID(e){for(let t=0;t<this._nodes.length;t++){let n=this._nodes[t].getPlugByGUID(e);if(n)return n}return null}export(){let e=[];for(let t=0;t<this._nodes.length;t++){let n=this._nodes[t].export();n&&e.push(n)}return e}async clear(){return new Promise(async(e,t)=>{!this._rootNode&&this._rootNode.isEndNode&&e(!0);let n=this._rootNode.whichNodeAreWeAttachedTo();this.#e=!0,nt.coreWCRef.addEventListener(nt.EVENTS.SCENE.Scene_Cleared,i=>e(i.data),{once:!0}),n?nt.removeItemByGUID(n.guid,!0):(await vc(500),e(!0))})}getNodeByGUID(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e)return this._nodes[t];return null}getPlugByGUID(e){for(const t of this._nodes){const n=t.getPlugByGUID(e);if(n)return n}return null}findItemTransformForPreload(e,t){let{receiverPlug:n,incomingPlug:i}=e,a=n,s=i;if(a.node.skuID=="Root")return this.findItemTransformRoot(e);let o=null,l=null,u=new Ei,f=Mo.getState().assets.items[a.node.skuID].proxy.data.scene.clone();u.add(f);let{position:h,rotation:p}=t;if(f.position.set(h.x,h.y,h.z),f.setRotationFromQuaternion(p),l=f,!l||(o=l.getObjectByName(a.name),!o))return;let m=new ve(0,0,0);o.getWorldPosition(m);let y=new Xi().identity();o.getWorldQuaternion(y);let E=new Ei;o.add(E);let b=Mo.getState().assets.items[s.node.skuID].proxy.data.scene.clone();b.position.set(m.x,m.y,m.z),b.applyQuaternion(y);let v=new ve;v.copy(f.up).applyQuaternion(l.quaternion);let x=new ve;x.copy(b.up).applyQuaternion(y),x.negate();let S=new Xi().setFromUnitVectors(v,x);v.round(),x.round();let _=v.dot(x);_!==1&&_!==-1&&b.applyQuaternion(S);let w=b.getObjectByName(s.name),R=new Xi().identity();w.getWorldQuaternion(R);let N=new ve(0,1,0);N.applyQuaternion(R);let L=new ve(0,1,0);L.applyQuaternion(y),L.negate();let I=new Xi().setFromUnitVectors(N,L);if(N.round(),L.round(),N.dot(L)!==-1)b.applyQuaternion(I);else{let j=new ve(0,1,0),Q=L.dot(j);if(Q!==1&&Q!==-1)b.rotateOnAxis(j,Math.PI);else{let H=new ve(0,0,1),K=L.dot(H);if(K!==1&&K!==-1)b.rotateOnAxis(H,Math.PI);else{let J=new ve(1,0,0),W=L.dot(J);W!==1&&W!==-1&&b.rotateOnAxis(J,Math.PI)}}}let k=b.getObjectByName(s.name),F=new ve(k.position.x,k.position.y,k.position.z);b.translateX(-F.x),b.translateY(-F.y),b.translateZ(-F.z);let U=new ve(0,0,0);b.getWorldPosition(U);let G=new Xi().identity();return b.getWorldQuaternion(G),b=null,{position:U,rotation:G}}findItemTransformRoot(e){let{receiverPlug:t,incomingPlug:n}=e,i=n;const a=new Ei;let s=a,o=new ve(0,0,0);s.getWorldPosition(o);let l=new Xi().identity(),u=new Ei;u.position.set(0,0,0),a.add(u);let f=Mo.getState().assets.items[i.node.skuID].proxy.data.scene.clone();u.attach(f),f.translateX(o.x),f.translateY(o.y),f.translateZ(o.z);let h=f.getObjectByName(i.name),p=new Xi().identity();h.getWorldQuaternion(p);const m=new ve(0,1,0);m.applyQuaternion(p);const y=new ve(0,1,0);y.applyQuaternion(l);const E=y.angleTo(m),b=new ve(0,0,0);b.crossVectors(y,m),b.round(),b.length()!==0&&f.rotateOnAxis(b,E);var v=new Wn().extractRotation(f.matrixWorld);let x=new ve(h.position.x,h.position.y,h.position.z);x.applyMatrix4(v),f.translateX(-x.x),f.translateY(-x.y),f.translateZ(-x.z);let S=new ve(0,0,0);f.getWorldPosition(S);let _=new Xi().identity();return f.getWorldQuaternion(_),u.remove(f),u=null,f=null,{position:S,rotation:_}}findItemTransform(e){let{receiverPlug:t,incomingPlug:n}=e,i=t,a=n;if(i.node.skuID=="Root")return this.findItemTransformRoot(e);const s=i.node.transform;if(!s)return;const o=Mo.getState().assets.items[i.node.skuID].proxy.data.scene.clone(),l=new Ei;l.position.set(s.position.x,s.position.y,s.position.z),l.setRotationFromQuaternion(s.rotation),l.add(o);let u=l.getObjectByName(""+i.name);if(!u){zt.error({title:"Plug: "+i.name+" doesn't exist in "+i.node.skuID});return}let f=new ve(0,1,0);u.getWorldPosition(f);let h=new Xi().identity();u.getWorldQuaternion(h);let p=Mo.getState().assets.items[a.node.skuID].proxy.data.scene.clone();p.position.set(f.x,f.y,f.z),p.applyQuaternion(h);let m=new ve;m.copy(o.up).applyQuaternion(l.quaternion);let y=new ve;y.copy(p.up).applyQuaternion(h),y.negate();let E=new Xi().setFromUnitVectors(m,y);m.round(),y.round();let b=m.dot(y);b!==1&&b!==-1&&p.applyQuaternion(E);let v=p.getObjectByName(a.name);if(!v){zt.error({title:"Plug: "+a.name+" doesn't exist in "+a.node.skuID});return}let x=new Xi().identity();v.getWorldQuaternion(x);let S=new ve(0,1,0);S.applyQuaternion(x);let _=new ve(0,1,0);_.applyQuaternion(h),_.negate();let w=new Xi().setFromUnitVectors(S,_);if(S.round(),_.round(),S.dot(_)!==-1)p.applyQuaternion(w);else{let k=new ve(0,1,0),F=_.dot(k);if(F!==1&&F!==-1)p.rotateOnAxis(k,Math.PI);else{let U=new ve(0,0,1),G=_.dot(U);if(G!==1&&G!==-1)p.rotateOnAxis(U,Math.PI);else{let j=new ve(1,0,0),Q=_.dot(j);Q!==1&&Q!==-1&&p.rotateOnAxis(j,Math.PI)}}}let N=p.getObjectByName(a.name),L=new ve(N.position.x,N.position.y,N.position.z);p.translateX(-L.x),p.translateY(-L.y),p.translateZ(-L.z);let I=new ve(0,0,0);p.getWorldPosition(I);let D=new Xi().identity();return p.getWorldQuaternion(D),l.remove(o),p=null,{position:I,rotation:D}}getSpawningRequirementForSkuID(e){let t=[];const n=Ln.getState().productData,i=n[e];if(!i)return t;const a=[];return i.plugs.map(s=>{s.connectsToPlugTypes.map(o=>{a.push(o)})}),Object.keys(n).map(s=>{for(let o=0;o<n[s].plugs.length;o++){const l=n[s].plugs[o].acceptedPlugTypes;for(let u=0;u<l.length;u++)a.map(f=>{f==l[u]&&!t.includes(s)&&t.push(s)})}}),t}getConnectablePlugs(e,t){let n=[],i=e.getOpenPlugsWeCanAttachFrom();for(let a=0;a<i.length;a++)for(let s=0;s<t.length;s++){let o=!1;for(let u=0;u<n.length;u++)if(n[u].receiverPlug.guid==t[s].guid){o=!0;break}if(o)continue;i[a].canAttachToPlug(t[s])&&n.push({incomingPlug:i[a],receiverPlug:t[s]})}return n}getOpenPlugs(){let e=[];return this._nodes.map(t=>{let n=t.getOpenPlugsFromNode();e=e.concat(n)}),e}checkCollisionforGUID(e){if(Je.getState().sceneSettings.disableCollider)return!1;const t=Wt.getState().itemsSpawned,n=Ln.getState().productData;if(!t[e])return!1;const a=this.getNodeByGUID(e);if(!a||!a.ref||n[a.skuID].disableCollider)return!1;const s={position:a.ref.position,rotation:a.ref.rotation},o=a.whichPlugAreWeAttachedTo();return o==null?!1:this.isColliding(a.skuID,s,o,[])}isColliding(e,{position:t,rotation:n},i,a=[]){const s=Mo.getState().assets.items[e].proxy.data.scene,o=Ln.getState().productData;if(!s)return!1;let l=s.clone();l.position.set(t.x,t.y,t.z),l.setRotationFromQuaternion(n);let u=new fl().setFromObject(l);var f=new ve;u.getCenter(f);let h=new Ei;h.position.set(f.x,f.y,f.z),h.attach(l),h.scale.set(this._boundingBoxLeeway,this._boundingBoxLeeway,this._boundingBoxLeeway),u=new fl().setFromObject(h);const p=[];if(this._nodes.forEach(y=>{i.node.guid!=y.guid&&(Array.isArray(a)===!0&&a.includes(y.guid)||y.ref&&((o[y.skuID].hasOwnProperty("disableCollider")?o[y.skuID].disableCollider:Je.getState().sceneSettings.disableCollider)||p.push(y.ref)))}),p.length<=0)return!1;let m=!1;return p.forEach(y=>{if(m)return;let E=new fl().setFromObject(y);if(u.intersectsBox(E)){m=!0;return}}),h.clear(),l=null,h=null,u=null,m}boxOverlapPercent(e,t){if(e.containsBox(t)||t.containsBox(e))return 100;if(!(e.min.x<t.max.x||t.min.x<e.max.x))return 0;let n=new ve(0,0,0);e.getSize(n),n.x*n.y*n.z;let i=new ve(0,0,0);t.getSize(i),i.x*i.y*i.z}checkInsideOutCollision(e,t,n){let i=t.position.clone(),a=new Float32Array(n.attributes.position.array),s=a.length/3;for(let o=0;o<s;o++){let l=new ve(a[o*3],a[o*3+1],a[o*3+2]),u=l.add(t.position);u=l.applyQuaternion(t.quaternion);let f=u.sub(t.position);const p=new Sy(i,f.clone().normalize()).intersectObjects(e),m=p.length>0,y=p[0].distance<f.length();if(m&&y)return!0}return!1}addNode(e){this._nodes.push(e)}getFirstNodeByCategoryID(e){for(var t=0;t<this._nodes.length;t++)if(this._nodes[t]._categoryID==e)return this._nodes[t];return null}getNodesBySKUID(e){let t=[];for(var n=0;n<this._nodes.length;n++)this._nodes[n].skuID==e&&t.push(this._nodes[n]);return t}getNodesByCategoryID(e){let t=[];for(var n=0;n<this._nodes.length;n++)this._nodes[n]._categoryID==e&&t.push(this._nodes[n]);return t}connectPlugs({incomingPlug:e,receiverPlug:t}){e.attachPlug(t,!1),t.attachPlug(e,!0),ln.getState().actions.toggleStructureUpdated()}removeNodeByGUID(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e){this._nodes[t].removeNode(),this._nodes.splice(t,1);break}this._nodes.length==1&&this.#e&&nt.fireEvent(nt.EVENTS.SCENE.Scene_Cleared,!0),ln.getState().actions.updateFittingSkuIds(),ln.getState().actions.toggleStructureUpdated()}removeNodeFromStructure(e){for(let t=0;t<this._nodes.length;t++)if(this._nodes[t].guid==e.guid){this._nodes.splice(t,1);break}ln.getState().actions.toggleStructureUpdated()}}class OUe{constructor(){this._globalVariants={},this._globalGeometryVariants={},Ln.getState().categoryData.geometryVariants.map(e=>{this._globalGeometryVariants[e.id]=e.defaultVariant}),Ln.getState().categoryData.color.map(e=>{this._globalVariants[e.id]=e.defaultLook}),this._currentStructure=new F$(null,this._globalVariants,this._globalGeometryVariants);for(const[e,t]of Object.entries(this._globalVariants))this.switchGlobalVariant(e,t);for(const[e,t]of Object.entries(this._globalGeometryVariants))this.switchGlobalGeometryVariant(e,t)}get globalGeometryVariants(){return this._globalGeometryVariants}get globalVariants(){return this._globalVariants}get currentStructure(){return this._currentStructure}getClientProductId(e,t){let n;return n=Ln.getState()?.productData[e]?.lookDetails[t],n?.clientProductId?n?.clientProductId:""}getCartItems(){let e=[];const t=zd.getState().inventoryData;this.currentStructure.nodes.map(a=>{if(a.skuID=="Root"||a.ignoreInCart===!0)return;let s=!1;if(e.map(u=>{const f=t[u.skuID];if(u.skuID==a.skuID&&u.currentVariant==a.currentVariant){u.count++,u.countAvailable=f[a.currentVariant].countAvailable,u.countUnavailable=f[a.currentVariant].countUnavailable,u.price=a.price*u.count,s=!0;return}}),s===!0)return;let o={};o.skuID=a.skuID,o.currentVariant=a.currentVariant,o.clientProductId=this.getClientProductId(o.skuID,o.currentVariant),o.count=1;const l=t[o.skuID];o.price=a.price,o.countAvailable=l[a.currentVariant].countAvailable,o.countUnavailable=l[a.currentVariant].countUnavailable,e.push(o)});let n=0;for(const a of e)n=n+a.price;return{cartItems:e,details:{total:n.toFixed(2)}}}getFittingSKUIDs(){const e=Ln.getState().productData;if(!this.currentStructure)return;let t=this.currentStructure.nodes,n=[],i=[],a=[],s=[];if(t.map(l=>{s.push(l.skuID),l.plugs.map(u=>{if(!u.isOpen){u.attachedPlug.node.replace&&u.acceptedPlugTypes.map(f=>{i.includes(f)||i.push(f)});return}u.acceptedPlugTypes.map(f=>{n.includes(f)||n.push(f)})})}),n.length<=0&&i.length<=0)return[];Object.keys(e).map(l=>{!e[l].plugs||a.includes(l)||e[l].plugs.map(u=>{a.includes(l)||u.connectsToPlugTypes.map(f=>{if(!a.includes(l)){if(i.includes(f)){if(!s.includes(l)){let h=!1,p=this.currentStructure.getFirstNodeByCategoryID(e[l].categoryID),m=!1;p?.plugs.map(y=>{!y.isOpen&&y.isReceiverPlug&&(m=!0,e[l].plugs.map(E=>{E.name==y.name&&y.attachedPlug.connectsToPlugTypes.map(b=>{E.acceptedPlugTypes.includes(b)&&(h=!0)})}))}),(h||!m)&&a.push(l)}}else if(n.includes(f)){const h=this.currentStructure.getFirstNodeByCategoryID(e[l].categoryID);if(h&&h.replace)return;a.push(l)}}})})});let o=[];return a.map(l=>{if(o.includes(l))return;if(e[l].replace){o.push(l);return}const{transforms:u,newNodes:f,connectablePlugs:h}=this.currentStructure.findGhostTransforms(l,Je.getState().sceneSettings.ignoreSpawningCollision);u.length>0&&o.push(l)}),o.map(l=>{e[l].replace}),o}async removeAllVariantOverrides(){let e=this._currentStructure.nodes,t=Ln.getState().productData,n=Wt.getState().itemsSpawned;await e.map(async i=>{if(!i.overrideVariant||(i.overrideVariant=null,!t[i.skuID].looks))return;let a=null;Object.keys(this._globalVariants).map(s=>{t[i.skuID].looks.includes(this._globalVariants[s])&&a==null&&(a=this._globalVariants[s])}),a&&await Wt.getState().actions.switchToVariant(n[i.guid].itemData,a)}),nt.alert({alertMsg:"Changes to individual items in the scene have been cleared",alertTime:6e3,alertType:"info",alertLabel:"Overrides Removed",alertId:"overridesRemoved"}),nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!1)}async switchGlobalGeometryVariant(e,t){const i=Ln.getState().categoryData.geometryVariants;let a=null;if(i.map(p=>{p.id==e&&(a=p)}),!a)return;const s=a.productsInCategory,l=a.variants[t].productsToSwitch,u=Wt.getState().itemsSpawned;let f=Ln.getState().categoryData;l.map(p=>{s.map(m=>{let y=!1;m.products.map(E=>{p==E&&(y=!0)}),y&&f.build.map(E=>{m.products.map(b=>{E.skus.map((v,x)=>{E.skus[x]==b&&(E.skus[x]=p)})})})})}),this._currentStructure.nodes.map(p=>{s.map(m=>{m.products.map(y=>{p.skuID==y&&p.ref!==null&&m.products.map(E=>{l.map(b=>{if(b==E){const v=Ln.getState().actions.getProductDataById(b);p.hideNodes(v.geometriesToHide),p.showNodes(v.geometriesToShow),p.skuID=b;const x=u[p.guid];x&&x.itemData&&Object.keys(v).map(S=>{x.itemData[S]=v[S]}),p.resetInStock(),p.updatePricing()}})})})})}),this._globalGeometryVariants[e]=t,ui.getState().actions.checkHotspotHealth(),zd.getState().actions.refreshInventory(u),Ln.setState({categoryData:f}),nt.fireEvent(nt.EVENTS.SCENE.CategoryData_Updated,f),nt.fireEvent(nt.EVENTS.SCENE.GlobalGeometryVariant_Updated,this._globalGeometryVariants);const h=this.getCartItems();h&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,h)}async switchGlobalVariant(e,t){this._globalVariants[e]=t;const n=Wt.getState().actions;let i=Wt.getState().itemsSpawned;for(let l=0;l<Object.keys(i).length;l++){let u=i[Object.keys(i)[l]];if(u.itemData.looks&&u.itemData.looks.includes(t)){let f=this._currentStructure.getNodeByGUID(u.itemData.guid);f&&!f.overrideVariant&&await n.switchToVariant(u.itemData,t)}}const a=Ln.getState().lookData;$x.getState().actions.processLookEnvMapOverride(t);const s=e;Object.keys(i).length>0&&nt.alert({alertMsg:s.charAt(0).toUpperCase()+s.slice(1)+" was successfully switched to "+a[t].label+".",alertTime:3e3,alertType:"success",alertLabel:`${s} Changed`,alertId:"materialVariantChanged"}),nt.fireEvent(nt.EVENTS.SCENE.GlobalVariant_Updated,this._globalVariants),Wt.setState({variantChangeAlert:!Wt.getState().variantChangeAlert});const o=this.getCartItems();o&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,o)}async#e(e){if(!e)return;zt.info({title:"Structure to load",details:e}),delete this._currentStructure,this._globalVariants={...e.globalVariants},this._globalGeometryVariants=e.globalGeometryVariants?{...e.globalGeometryVariants}:{};const t=[...e.structure];this._currentStructure=new F$(t,this._globalVariants,this._globalGeometryVariants);for(const[n,i]of Object.entries(this._globalVariants))this.switchGlobalVariant(n,i);for(const[n,i]of Object.entries(this._globalGeometryVariants))this.switchGlobalGeometryVariant(n,i);zt.info({title:"Structure Loading..."}),await this._currentStructure.load(),zt.info({title:"Structure Loaded."})}async loadStructure(e){e&&(nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),Je.setState({configurationLoaded:!1}),await vc(500),await this._currentStructure.clear(),await this.#e(e),Je.getState().preconfigurationLoaded?nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide):Je.setState({preconfigurationLoaded:!0}),Je.setState({configurationLoaded:!0}),ln.getState().actions.toggleStructureUpdated())}export(){return{structure:this._currentStructure.export(),globalVariants:this._globalVariants,globalGeometryVariants:this._globalGeometryVariants}}async clear(){nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),this._currentStructure.clear(),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide)}async restart(){zt.warn({title:"Restarting the Scene!!"}),Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Show),await vc(500),await this._currentStructure.clear();const e=ln.getState().defaultConfig;await this.#e(e),ln.getState().actions.toggleStructureUpdated(),Je.setState({configurationLoaded:!0}),nt.fireEvent(nt.EVENTS.UI.PreloadScreen_Hide)}}const yie=Do((r,e)=>({attachmentSystem:null,defaultConfig:null,structureUpdated:!1,colliderMeshRef:null,placeholderRef:null,draggingItem:null,snappingThreshold:.5,actions:{initializeAttachmentSystem:async()=>{const{actions:t,defaultConfig:n}=e(),i=await new OUe;r({attachmentSystem:i}),t.updateFittingSkuIds(),t.toggleStructureUpdated()},loadSavedStructureFromConfigID:async t=>{const n=await die(RH+t);return n.success===!1?null:n.data},loadDefaultStructure:async()=>{const{actions:t,defaultConfig:n,attachmentSystem:i}=e();await t.loadStructure(n)},updateFittingSkuIds:()=>{const t=yie.getState().attachmentSystem.getFittingSKUIDs();t&&nt.fireEvent(nt.EVENTS.SCENE.FittingSkuIds_Updated,{skuids:t})},toggleStructureUpdated:()=>{const{attachmentSystem:t}=e();r(i=>({structureUpdated:!i.structureUpdated})),nt.fireEvent(nt.EVENTS.SCENE.ReplaceableCategory_Updated,t.currentStructure.getCurrentItemsInReplaceableCategory());const n=t.getCartItems();n&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,n)},loadStructure:async t=>{const{attachmentSystem:n}=e();n&&Je.getState().configurationLoaded!==!1&&await n.loadStructure(t)},export:()=>{const{attachmentSystem:t}=e();if(t)return t.export()}}})),ln=yie,PUe=Do((r,e)=>({productData:{},categoryData:{},lookData:{},hotspotsData:{},endpoints:{},assetsData:{},actions:{getCurrentPricingInfo:()=>{const{productData:t}=e();let n={};return Object.keys(t).map(i=>{if(i.toLowerCase()==="root")return;let a=t[i].lookDetails,s={};Object.keys(a).map(o=>{o!="default"&&(s[o]=a[o].price)}),n[i]=s}),n},updatePricingForAllProducts:t=>{const{actions:n}=e();Object.keys(t).map(i=>{let a=t[i];Object.keys(a).map(s=>{n.updatePricingForProduct(i,s,a[s])})})},updatePricingForProduct:(t,n,i)=>{const{productData:a}=e();let s=a[t];if(!s||!s.lookDetails)return;let o=s.lookDetails[n];if(!o)return;o.price=i,ln.getState().attachmentSystem.currentStructure.getNodesBySKUID(t).map(f=>f.updatePricing())},setProductData:t=>{let n={};t&&Object.keys(t).map(i=>{const a=t[i];if(a.skuID=i,a.skuID.toLowerCase()==="root"){a.lookDetails={default:{title:"",description:"",productPageUrl:"",thumbnails:{high:"",low:""},price:0}},a.defaultVariant="default";return}if(a?.lookDetails){const s=a.lookDetails;let o=Object.keys(a.lookDetails);if(o.includes("default")){const u=o.indexOf("default");o.splice(u,1)}a.looks=o,Object.keys(a.lookDetails).map(u=>{let f=a.lookDetails[u];f.inventory===void 0&&(f.inventory=M$),f.price===void 0&&(f.price=nUe),n[i]={...n[i],[u]:{inventory:M$,inScene:[]}}});let l=a?.defaultVariant;l||(zt.warn({title:`No defaultVariant set for ${a.skuID}. Attempting to auto resolve but the colour variants behaviour might be unexpected!`}),l=Object.keys(a.lookDetails).sort()[0],zt.warn({title:"Auto resolved default look ID: "+l})),o.includes(l)?(a.lookDetails.default=s[l],a.lookDetails.default.id=l):(zt.error({title:`Default look [ ${l} ] doesn't exist for: ${i}. Please make sure to select a default variant in Input Data for this project`}),a.lookDetails.default=null)}}),zt.info("PRODUCT DATA: ",t),zd.setState({inventoryData:n}),r({productData:t})},setCategoryData:t=>{const{productData:n}=e();t.geometryVariants!==void 0&&t.geometryVariants.map(i=>{i.defaultVariant===void 0&&Object.keys(i.variants).length>0&&(i.defaultVariant=Object.keys(i.variants)[0])}),t.color!==void 0&&t.color.map(i=>{(i.defaultLook===void 0&&i.looks.length>0||!i.looks.includes(i.defaultLook))&&(i.defaultLook=i.looks[0])}),r({categoryData:t}),t.build!==void 0&&t.build.map(i=>{i.skus.map(a=>{n[a].categoryID=i.categoryID,n[a].categoryLabel=i.label,n[a].swappable=i.swappable?i.swappable:!1,n[a].replace=i.replace})})},getProductDataById:t=>{const{productData:n}=e();let i=null;return n[t]&&(i=n[t]),i},setLookData:t=>r({lookData:t}),setHotspotsData:t=>{const{categoryData:n,productData:i}=e();n.geometryVariants&&Object.keys(t).map(a=>{t[a].map(s=>{s.geometryVariantID&&n.geometryVariants.map(o=>{Object.keys(o.variants).map(l=>{s.geometryVariantID==l&&o.productsInCategory.map(u=>{let f=null;u.products.map(h=>{t.hasOwnProperty(h)&&(f=t[h])}),u.products.map(h=>{t.hasOwnProperty(h)||(t[h]=f)})})})})})}),r({hotspotsData:t})},setEndpoints:t=>{r({endpoints:t}),sUe(t)},setAssetsData:t=>r({assetsData:t})}})),Ln=PUe,LUe=Do((r,e)=>({defaultEnvMapUrl:"<@generic-project@>/env-map/neutral.hdr",envMapUrl:"",actions:{setEnvLightMap:t=>{r(n=>({envMapUrl:t}))},processLookEnvMapOverride:t=>{const{envMapUrl:n,defaultEnvMapUrl:i,actions:a}=e(),s=Ln.getState().lookData[t],o=s?.envMapOverride;if(!s||!o){a.setEnvLightMap(i);return}if(o===n){zt.info(`New Env Map Url is the same as the current ${o}`);return}a.setEnvLightMap(o)}}})),$x=LUe,UUe=()=>{const[r,e]=oe.useState(!1),t=Ln(s=>s),n=$x(s=>s),[i,a]=oe.useState(1);return oe.useEffect(()=>{const s=t.assetsData,o=s?.sceneMoodSettings?.envMap;o&&($x.setState({defaultEnvMapUrl:o}),n.actions.setEnvLightMap(o)),n.envMapUrl===""&&n.actions.setEnvLightMap($x.getState().defaultEnvMapUrl);const l=s?.sceneMoodSettings?.ambientLightIntensity;l!==void 0&&a(l),e(!0)},[]),oe.useEffect(()=>{r!==!1&&(zt.groupCollapsed("SCENE LIGHTING INFO:"),zt.table({title:"Scene Lights",details:{"Environment Map":n.envMapUrl,"Ambient Light Intensity":i}}),zt.groupEnd())},[r]),ne(hi,{children:r===!0&&ne("group",{name:"GRP_LIGHTS",children:[ne("ambientLight",{intensity:i},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:70,columnNumber:11},globalThis),ne(KLe,{background:!1,files:nt.getResolvedAssetUrl(n.envMapUrl)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:71,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:69,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/LightManager.js",lineNumber:67,columnNumber:5},globalThis)};function BUe(r,e,t){return Math.max(e,Math.min(r,t))}const ea={toVector(r,e){return r===void 0&&(r=e),Array.isArray(r)?r:[r,r]},add(r,e){return[r[0]+e[0],r[1]+e[1]]},sub(r,e){return[r[0]-e[0],r[1]-e[1]]},addTo(r,e){r[0]+=e[0],r[1]+=e[1]},subTo(r,e){r[0]-=e[0],r[1]-=e[1]}};function G$(r,e,t){return e===0||Math.abs(e)===1/0?Math.pow(r,t*5):r*e*t/(e+t*r)}function z$(r,e,t,n=.15){return n===0?BUe(r,e,t):r<e?-G$(e-r,t-e,n)+e:r>t?+G$(r-t,t-e,n)+t:r}function kUe(r,[e,t],[n,i]){const[[a,s],[o,l]]=r;return[z$(e,a,s,n),z$(t,o,l,i)]}function us(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function H$(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Ta(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?H$(Object(t),!0).forEach(function(n){us(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):H$(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}const Aie={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function V$(r){return r?r[0].toUpperCase()+r.slice(1):""}const FUe=["enter","leave"];function GUe(r=!1,e){return r&&!FUe.includes(e)}function zUe(r,e="",t=!1){const n=Aie[r],i=n&&n[e]||e;return"on"+V$(r)+V$(i)+(GUe(t,i)?"Capture":"")}const HUe=["gotpointercapture","lostpointercapture"];function VUe(r){let e=r.substring(2).toLowerCase();const t=!!~e.indexOf("passive");t&&(e=e.replace("passive",""));const n=HUe.includes(e)?"capturecapture":"capture",i=!!~e.indexOf(n);return i&&(e=e.replace("capture","")),{device:e,capture:i,passive:t}}function jUe(r,e=""){const t=Aie[r],n=t&&t[e]||e;return r+n}function ZU(r){return"touches"in r}function bie(r){return ZU(r)?"touch":"pointerType"in r?r.pointerType:"mouse"}function QUe(r){return Array.from(r.touches).filter(e=>{var t,n;return e.target===r.currentTarget||((t=r.currentTarget)===null||t===void 0||(n=t.contains)===null||n===void 0?void 0:n.call(t,e.target))})}function WUe(r){return r.type==="touchend"||r.type==="touchcancel"?r.changedTouches:r.targetTouches}function _ie(r){return ZU(r)?WUe(r)[0]:r}function DH(r,e){const t=e.clientX-r.clientX,n=e.clientY-r.clientY,i=(e.clientX+r.clientX)/2,a=(e.clientY+r.clientY)/2,s=Math.hypot(t,n);return{angle:-(Math.atan2(t,n)*180)/Math.PI,distance:s,origin:[i,a]}}function YUe(r){return QUe(r).map(e=>e.identifier)}function j$(r,e){const[t,n]=Array.from(r.touches).filter(i=>e.includes(i.identifier));return DH(t,n)}function dz(r){const e=_ie(r);return ZU(r)?e.identifier:e.pointerId}function TT(r){const e=_ie(r);return[e.clientX,e.clientY]}const Q$=40,W$=800;function Eie(r){let{deltaX:e,deltaY:t,deltaMode:n}=r;return n===1?(e*=Q$,t*=Q$):n===2&&(e*=W$,t*=W$),[e,t]}function qUe(r){var e,t;const{scrollX:n,scrollY:i,scrollLeft:a,scrollTop:s}=r.currentTarget;return[(e=n??a)!==null&&e!==void 0?e:0,(t=i??s)!==null&&t!==void 0?t:0]}function XUe(r){const e={};if("buttons"in r&&(e.buttons=r.buttons),"shiftKey"in r){const{shiftKey:t,altKey:n,metaKey:i,ctrlKey:a}=r;Object.assign(e,{shiftKey:t,altKey:n,metaKey:i,ctrlKey:a})}return e}function YL(r,...e){return typeof r=="function"?r(...e):r}function $Ue(){}function KUe(...r){return r.length===0?$Ue:r.length===1?r[0]:function(){let e;for(const t of r)e=t.apply(this,arguments)||e;return e}}function Y$(r,e){return Object.assign({},e,r||{})}const ZUe=32;class Sie{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:i}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=i,e.axis=void 0,e.memo=void 0,e.elapsedTime=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?YL(n.from,t):t.offset,t.offset=t.lastOffset),t.startTime=t.timeStamp=e.timeStamp}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let a=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,XUe(e)),i.down=i.pressed=i.buttons%2===1||i.touches>0,a=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const R=t._delta.map(Math.abs);ea.addTo(t._distance,R)}this.axisIntent&&this.axisIntent(e);const[s,o]=t._movement,[l,u]=n.threshold,{_step:f,values:h}=t;if(n.hasCustomTransform?(f[0]===!1&&(f[0]=Math.abs(s)>=l&&h[0]),f[1]===!1&&(f[1]=Math.abs(o)>=u&&h[1])):(f[0]===!1&&(f[0]=Math.abs(s)>=l&&Math.sign(s)*l),f[1]===!1&&(f[1]=Math.abs(o)>=u&&Math.sign(o)*u)),t.intentional=f[0]!==!1||f[1]!==!1,!t.intentional)return;const p=[0,0];if(n.hasCustomTransform){const[R,N]=h;p[0]=f[0]!==!1?R-f[0]:0,p[1]=f[1]!==!1?N-f[1]:0}else p[0]=f[0]!==!1?s-f[0]:0,p[1]=f[1]!==!1?o-f[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(p);const m=t.offset,y=t._active&&!t._blocked||t.active;y&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=YL(n.bounds,t)),this.setup&&this.setup()),t.movement=p,this.computeOffset()));const[E,b]=t.offset,[[v,x],[S,_]]=t._bounds;t.overflow=[E<v?-1:E>x?1:0,b<S?-1:b>_?1:0],t._movementBound[0]=t.overflow[0]?t._movementBound[0]===!1?t._movement[0]:t._movementBound[0]:!1,t._movementBound[1]=t.overflow[1]?t._movementBound[1]===!1?t._movement[1]:t._movementBound[1]:!1;const w=t._active?n.rubberband||[0,0]:[0,0];if(t.offset=kUe(t._bounds,t.offset,w),t.delta=ea.sub(t.offset,m),this.computeMovement(),y&&(!t.last||a>ZUe)){t.delta=ea.sub(t.offset,m);const R=t.delta.map(Math.abs);ea.addTo(t.distance,R),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&a>0&&(t.velocity=[R[0]/a,R[1]/a])}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const i=this.handler(Ta(Ta(Ta({},t),e),{},{[this.aliasKey]:e.values}));i!==void 0&&(e.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function JUe([r,e],t){const n=Math.abs(r),i=Math.abs(e);if(n>i&&n>t)return"x";if(i>n&&i>t)return"y"}class HI extends Sie{constructor(...e){super(...e),us(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=ea.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=ea.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const i=typeof n.axisThreshold=="object"?n.axisThreshold[bie(e)]:n.axisThreshold;t.axis=JUe(t._movement,i)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0;break}}}const eBe=r=>r,q$=.15,xie={enabled(r=!0){return r},eventOptions(r,e,t){return Ta(Ta({},t.shared.eventOptions),r)},preventDefault(r=!1){return r},triggerAllEvents(r=!1){return r},rubberband(r=0){switch(r){case!0:return[q$,q$];case!1:return[0,0];default:return ea.toVector(r)}},from(r){if(typeof r=="function")return r;if(r!=null)return ea.toVector(r)},transform(r,e,t){const n=r||t.shared.transform;return this.hasCustomTransform=!!n,n||eBe},threshold(r){return ea.toVector(r,0)}},tBe=0,Bb=Ta(Ta({},xie),{},{axis(r,e,{axis:t}){if(this.lockDirection=t==="lock",!this.lockDirection)return t},axisThreshold(r=tBe){return r},bounds(r={}){if(typeof r=="function")return a=>Bb.bounds(r(a));if("current"in r)return()=>r.current;if(typeof HTMLElement=="function"&&r instanceof HTMLElement)return r;const{left:e=-1/0,right:t=1/0,top:n=-1/0,bottom:i=1/0}=r;return[[e,t],[n,i]]}}),TP=10,X$={ArrowRight:(r=1)=>[TP*r,0],ArrowLeft:(r=1)=>[-TP*r,0],ArrowUp:(r=1)=>[0,-TP*r],ArrowDown:(r=1)=>[0,TP*r]};class nBe extends HI{constructor(...e){super(...e),us(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),i={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=Bb.bounds(i)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(e.buttons!=null&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):t.pointerButtons!==-1&&t.pointerButtons!==e.buttons))return;const i=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),!(i&&i.size>1&&n._pointerActive)&&(this.start(e),this.setupPointer(e),n._pointerId=dz(e),n._pointerActive=!0,this.computeValues(TT(e)),this.computeInitial(),t.preventScrollAxis&&bie(e)!=="mouse"?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive||t.type===e.type&&e.timeStamp===t.timeStamp)return;const i=dz(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;const a=TT(e);if(document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=ea.sub(a,t._values),this.computeValues(a)),ea.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional){this.timeoutStore.remove("dragDelay"),t.active=!1,this.startPointerDrag(e);return}if(n.preventScrollAxis&&!t._preventScroll)if(t.axis)if(t.axis===n.preventScrollAxis||n.preventScrollAxis==="xy"){t._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(e);return}else return;this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch{}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const i=dz(e);if(t._pointerId!==void 0&&i!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[a,s]=t._distance;if(t.tap=a<=n.tapsThreshold&&s<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[o,l]=t.direction,[u,f]=t.velocity,[h,p]=t.movement,[m,y]=n.swipe.velocity,[E,b]=n.swipe.distance,v=n.swipe.duration;t.elapsedTime<v&&(Math.abs(u)>m&&Math.abs(h)>E&&(t.swipe[0]=o),Math.abs(f)>y&&Math.abs(p)>b&&(t.swipe[1]=l))}this.emit()}pointerClick(e){this.state.tap||(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,iBe(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(e)},this.config.delay)}keyDown(e){const t=X$[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(i),n._keyboardActive=!0,ea.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in X$&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this)),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function iBe(r){"persist"in r&&typeof r.persist=="function"&&r.persist()}const VI=typeof window<"u"&&window.document&&window.document.createElement;function rBe(){return VI&&"ontouchstart"in window}function $$(){return rBe()||VI&&window.navigator.maxTouchPoints>1}function aBe(){return VI&&"onpointerdown"in window}function sBe(){return VI&&"exitPointerLock"in window.document}function oBe(){try{return"constructor"in GestureEvent}catch{return!1}}const $u={isBrowser:VI,gesture:oBe(),touch:$$(),touchscreen:$$(),pointer:aBe(),pointerLock:sBe()},lBe=250,cBe=180,uBe=.5,hBe=50,fBe=250,K$={mouse:0,touch:0,pen:8},dBe=Ta(Ta({},Bb),{},{device(r,e,{pointer:{touch:t=!1,lock:n=!1,mouse:i=!1}={}}){return this.pointerLock=n&&$u.pointerLock,$u.touch&&t?"touch":this.pointerLock?"mouse":$u.pointer&&!i?"pointer":$u.touch?"touch":"mouse"},preventScrollAxis(r,e,{preventScroll:t}){if(this.preventScrollDelay=typeof t=="number"?t:t||t===void 0&&r?lBe:void 0,!(!$u.touchscreen||t===!1))return r||(t!==void 0?"y":void 0)},pointerCapture(r,e,{pointer:{capture:t=!0,buttons:n=1}={}}){return this.pointerButtons=n,!this.pointerLock&&this.device==="pointer"&&t},threshold(r,e,{filterTaps:t=!1,tapsThreshold:n=3,axis:i=void 0}){const a=ea.toVector(r,t?n:i?1:0);return this.filterTaps=t,this.tapsThreshold=n,a},swipe({velocity:r=uBe,distance:e=hBe,duration:t=fBe}={}){return{velocity:this.transform(ea.toVector(r)),distance:this.transform(ea.toVector(e)),duration:t}},delay(r=0){switch(r){case!0:return cBe;case!1:return 0;default:return r}},axisThreshold(r){return r?Ta(Ta({},K$),r):K$}}),pBe=30,mBe=100;class gBe extends Sie{constructor(...e){super(...e),us(this,"ingKey","pinching"),us(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const e=this.state;e._touchIds=[],e.canceled=!1,e.cancel=this.cancel.bind(this),e.turns=0}computeOffset(){const{type:e,movement:t,lastOffset:n}=this.state;e==="wheel"?this.state.offset=ea.add(t,n):this.state.offset=[(1+t[0])*n[0],t[1]+n[1]]}computeMovement(){const{offset:e,lastOffset:t}=this.state;this.state.movement=[e[0]/t[0],e[1]-t[1]]}axisIntent(){const e=this.state,[t,n]=e._movement;if(!e.axis){const i=Math.abs(t)*pBe-Math.abs(n);i<0?e.axis="angle":i>0&&(e.axis="scale")}}restrictToAxis(e){this.config.lockDirection&&(this.state.axis==="scale"?e[1]=0:this.state.axis==="angle"&&(e[0]=0))}cancel(){const e=this.state;e.canceled||setTimeout(()=>{e.canceled=!0,e._active=!1,this.compute(),this.emit()},0)}touchStart(e){this.ctrl.setEventIds(e);const t=this.state,n=this.ctrl.touchIds;if(t._active&&t._touchIds.every(a=>n.has(a))||n.size<2)return;this.start(e),t._touchIds=Array.from(n).slice(0,2);const i=j$(e,t._touchIds);this.pinchStart(e,i)}pointerStart(e){if(e.buttons!=null&&e.buttons%2!==1)return;this.ctrl.setEventIds(e),e.target.setPointerCapture(e.pointerId);const t=this.state,n=t._pointerEvents,i=this.ctrl.pointerIds;if(t._active&&Array.from(n.keys()).every(s=>i.has(s))||(n.size<2&&n.set(e.pointerId,e),t._pointerEvents.size<2))return;this.start(e);const a=DH(...Array.from(n.values()));this.pinchStart(e,a)}pinchStart(e,t){const n=this.state;n.origin=t.origin,this.computeValues([t.distance,t.angle]),this.computeInitial(),this.compute(e),this.emit()}touchMove(e){if(!this.state._active)return;const t=j$(e,this.state._touchIds);this.pinchMove(e,t)}pointerMove(e){const t=this.state._pointerEvents;if(t.has(e.pointerId)&&t.set(e.pointerId,e),!this.state._active)return;const n=DH(...Array.from(t.values()));this.pinchMove(e,n)}pinchMove(e,t){const n=this.state,i=n._values[1],a=t.angle-i;let s=0;Math.abs(a)>270&&(s+=Math.sign(a)),this.computeValues([t.distance,t.angle-360*s]),n.origin=t.origin,n.turns=s,n._movement=[n._values[0]/n._initial[0]-1,n._values[1]-n._initial[1]],this.compute(e),this.emit()}touchEnd(e){this.ctrl.setEventIds(e),this.state._active&&this.state._touchIds.some(t=>!this.ctrl.touchIds.has(t))&&(this.state._active=!1,this.compute(e),this.emit())}pointerEnd(e){const t=this.state;this.ctrl.setEventIds(e);try{e.target.releasePointerCapture(e.pointerId)}catch{}t._pointerEvents.has(e.pointerId)&&t._pointerEvents.delete(e.pointerId),t._active&&t._pointerEvents.size<2&&(t._active=!1,this.compute(e),this.emit())}gestureStart(e){e.cancelable&&e.preventDefault();const t=this.state;t._active||(this.start(e),this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY],this.compute(e),this.emit())}gestureMove(e){if(e.cancelable&&e.preventDefault(),!this.state._active)return;const t=this.state;this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY];const n=t._movement;t._movement=[e.scale-1,e.rotation],t._delta=ea.sub(t._movement,n),this.compute(e),this.emit()}gestureEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}wheel(e){const t=this.config.modifierKey;t&&!e[t]||(this.state._active?this.wheelChange(e):this.wheelStart(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(e){this.start(e),this.wheelChange(e)}wheelChange(e){"uv"in e||e.cancelable&&e.preventDefault();const n=this.state;n._delta=[-Eie(e)[1]/mBe*n.offset[0],0],ea.addTo(n._movement,n._delta),this.state.origin=[e.clientX,e.clientY],this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){const t=this.config.device;t?(e(t,"start",this[t+"Start"].bind(this)),e(t,"change",this[t+"Move"].bind(this)),e(t,"end",this[t+"End"].bind(this)),e(t,"cancel",this[t+"End"].bind(this))):e("wheel","",this.wheel.bind(this),{passive:!1})}}const vBe=Ta(Ta({},xie),{},{device(r,e,{shared:t,pointer:{touch:n=!1}={}}){if(t.target&&!$u.touch&&$u.gesture)return"gesture";if($u.touch&&n)return"touch";if($u.touchscreen){if($u.pointer)return"pointer";if($u.touch)return"touch"}},bounds(r,e,{scaleBounds:t={},angleBounds:n={}}){const i=s=>{const o=Y$(YL(t,s),{min:-1/0,max:1/0});return[o.min,o.max]},a=s=>{const o=Y$(YL(n,s),{min:-1/0,max:1/0});return[o.min,o.max]};return typeof t!="function"&&typeof n!="function"?[i(),a()]:s=>[i(s),a(s)]},threshold(r,e,t){return this.lockDirection=t.axis==="lock",ea.toVector(r,this.lockDirection?[.1,3]:0)},modifierKey(r){return r===void 0?"ctrlKey":r}});class yBe extends HI{constructor(...e){super(...e),us(this,"ingKey","moving")}move(e){this.config.mouseOnly&&e.pointerType!=="mouse"||(this.state._active?this.moveChange(e):this.moveStart(e),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(e){this.start(e),this.computeValues(TT(e)),this.compute(e),this.computeInitial(),this.emit()}moveChange(e){if(!this.state._active)return;const t=TT(e),n=this.state;n._delta=ea.sub(t,n._values),ea.addTo(n._movement,n._delta),this.computeValues(t),this.compute(e),this.emit()}moveEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}bind(e){e("pointer","change",this.move.bind(this)),e("pointer","leave",this.moveEnd.bind(this))}}const ABe=Ta(Ta({},Bb),{},{mouseOnly:(r=!0)=>r});class bBe extends HI{constructor(...e){super(...e),us(this,"ingKey","scrolling")}scroll(e){this.state._active||this.start(e),this.scrollChange(e),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(e){e.cancelable&&e.preventDefault();const t=this.state,n=qUe(e);t._delta=ea.sub(n,t._values),ea.addTo(t._movement,t._delta),this.computeValues(n),this.compute(e),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("scroll","",this.scroll.bind(this))}}const _Be=Bb;class EBe extends HI{constructor(...e){super(...e),us(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=Eie(e),ea.addTo(t._movement,t._delta);const[n,i]=t.overflow,[a,s]=t._delta,[o,l]=t._direction;(n<0&&a>0&&o<0||n>0&&a<0&&o>0)&&(t._movement[0]=t._movementBound[0]),(i<0&&s>0&&l<0||i>0&&s<0&&l>0)&&(t._movement[1]=t._movementBound[1]),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}}const SBe=Bb;class xBe extends HI{constructor(...e){super(...e),us(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&e.pointerType!=="mouse"||(this.start(e),this.computeValues(TT(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&e.pointerType!=="mouse")return;const t=this.state;if(!t._active)return;t._active=!1;const n=TT(e);t._movement=t._delta=ea.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}}const TBe=Ta(Ta({},Bb),{},{mouseOnly:(r=!0)=>r}),e8=new Map,OH=new Map;function wBe(r){e8.set(r.key,r.engine),OH.set(r.key,r.resolver)}const CBe={key:"drag",engine:nBe,resolver:dBe},MBe={key:"hover",engine:xBe,resolver:TBe},RBe={key:"move",engine:yBe,resolver:ABe},IBe={key:"pinch",engine:gBe,resolver:vBe},NBe={key:"scroll",engine:bBe,resolver:_Be},DBe={key:"wheel",engine:EBe,resolver:SBe};function OBe(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function PBe(r,e){if(r==null)return{};var t=OBe(r,e),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);for(i=0;i<a.length;i++)n=a[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}const LBe={target(r){if(r)return()=>"current"in r?r.current:r},enabled(r=!0){return r},window(r=$u.isBrowser?window:void 0){return r},eventOptions({passive:r=!0,capture:e=!1}={}){return{passive:r,capture:e}},transform(r){return r}},UBe=["target","eventOptions","window","enabled","transform"];function oL(r={},e){const t={};for(const[n,i]of Object.entries(e))switch(typeof i){case"function":t[n]=i.call(t,r[n],n,r);break;case"object":t[n]=oL(r[n],i);break;case"boolean":i&&(t[n]=r[n]);break}return t}function BBe(r,e){const t=r,{target:n,eventOptions:i,window:a,enabled:s,transform:o}=t,l=PBe(t,UBe),u={shared:oL({target:n,eventOptions:i,window:a,enabled:s,transform:o},LBe)};if(e){const f=OH.get(e);u[e]=oL(Ta({shared:u.shared},l),f)}else for(const f in l){const h=OH.get(f);h&&(u[f]=oL(Ta({shared:u.shared},l[f]),h))}return u}class Tie{constructor(e,t){us(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,i,a){const s=this._listeners,o=jUe(t,n),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=Ta(Ta({},l),a);e.addEventListener(o,i,u);const f=()=>{e.removeEventListener(o,i,u),s.delete(f)};return s.add(f),f}clean(){this._listeners.forEach(e=>e()),this._listeners.clear()}}class kBe{constructor(){us(this,"_timeouts",new Map)}add(e,t,n=140,...i){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...i))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach(e=>void window.clearTimeout(e)),this._timeouts.clear()}}class FBe{constructor(e){us(this,"gestures",new Set),us(this,"_targetEventStore",new Tie(this)),us(this,"gestureEventStores",{}),us(this,"gestureTimeoutStores",{}),us(this,"handlers",{}),us(this,"config",{}),us(this,"pointerIds",new Set),us(this,"touchIds",new Set),us(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),GBe(this,e)}setEventIds(e){if(ZU(e))return this.touchIds=new Set(YUe(e)),this.touchIds;if("pointerId"in e)return e.type==="pointerup"||e.type==="pointercancel"?this.pointerIds.delete(e.pointerId):e.type==="pointerdown"&&this.pointerIds.add(e.pointerId),this.pointerIds}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=BBe(e,t)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let i;if(!(t.target&&(i=t.target(),!i))){if(t.enabled){for(const s of this.gestures){const o=this.config[s],l=Z$(n,o.eventOptions,!!i);if(o.enabled){const u=e8.get(s);new u(this,e,s).bind(l)}}const a=Z$(n,t.eventOptions,!!i);for(const s in this.nativeHandlers)a(s,"",o=>this.nativeHandlers[s](Ta(Ta({},this.state.shared),{},{event:o,args:e})),void 0,!0)}for(const a in n)n[a]=KUe(...n[a]);if(!i)return n;for(const a in n){const{device:s,capture:o,passive:l}=VUe(a);this._targetEventStore.add(i,s,"",n[a],{capture:o,passive:l})}}}}function bx(r,e){r.gestures.add(e),r.gestureEventStores[e]=new Tie(r,e),r.gestureTimeoutStores[e]=new kBe}function GBe(r,e){e.drag&&bx(r,"drag"),e.wheel&&bx(r,"wheel"),e.scroll&&bx(r,"scroll"),e.move&&bx(r,"move"),e.pinch&&bx(r,"pinch"),e.hover&&bx(r,"hover")}const Z$=(r,e,t)=>(n,i,a,s={},o=!1)=>{var l,u;const f=(l=s.capture)!==null&&l!==void 0?l:e.capture,h=(u=s.passive)!==null&&u!==void 0?u:e.passive;let p=o?n:zUe(n,i,f);t&&h&&(p+="Passive"),r[p]=r[p]||[],r[p].push(a)},zBe=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function HBe(r){const e={},t={},n=new Set;for(let i in r)zBe.test(i)?(n.add(RegExp.lastMatch),t[i]=r[i]):e[i]=r[i];return[t,e,n]}function _x(r,e,t,n,i,a){if(!r.has(t)||!e8.has(n))return;const s=t+"Start",o=t+"End",l=u=>{let f;return u.first&&s in e&&e[s](u),t in e&&(f=e[t](u)),u.last&&o in e&&e[o](u),f};i[n]=l,a[n]=a[n]||{}}function VBe(r,e){const[t,n,i]=HBe(r),a={};return _x(i,t,"onDrag","drag",a,e),_x(i,t,"onWheel","wheel",a,e),_x(i,t,"onScroll","scroll",a,e),_x(i,t,"onPinch","pinch",a,e),_x(i,t,"onMove","move",a,e),_x(i,t,"onHover","hover",a,e),{handlers:a,config:e,nativeHandlers:n}}function jBe(r,e={},t,n){const i=Ya.useMemo(()=>new FBe(r),[]);if(i.applyHandlers(r,n),i.applyConfig(e,t),Ya.useEffect(i.effect.bind(i)),Ya.useEffect(()=>i.clean.bind(i),[]),e.target===void 0)return i.bind.bind(i)}function QBe(r){return r.forEach(wBe),function(t,n){const{handlers:i,nativeHandlers:a,config:s}=VBe(t,n||{});return jBe(i,s,void 0,a)}}function wie(r,e){return QBe([CBe,IBe,NBe,DBe,RBe,MBe])(r,e||{})}function WBe({children:r,guid:e,onDragStartHandler:t,onDragEndHandler:n,onItemClickHandler:i,onPointerEnter:a,onPointerLeave:s,dragging:o=!1,intersectingGhostObject:l=null,isInteractive:u=!0,initialIntersectedGhostUUID:f=null,isSnapAllowed:h=!1,...p}){const m=oe.useRef(),y=oe.useRef(-1),E=oe.useRef([]),b=oe.useRef([]),{raycaster:v,size:x,camera:S}=fs(),_=ui(W=>W.isAnyHotspotActive),w=Je(W=>W.multipleTouchDetected),[R,N]=oe.useState(null),{raycasterGhost:L}=oe.useMemo(()=>({raycasterGhost:new Sy})),I=W=>{let V;return W.isGhost===!0?V=W:W.parent?W.parent.isGhost===!0?V=W.parent:V=I(W.parent):V=null,V},D=W=>{L.setFromCamera(W,S);const V=L.intersectObject(mr.getState().ghostParentRef);let $=null;return V.length>0&&($=I(V[0].object)),$},k=W=>{let V=W.whichNodesAreAttachedToUs();return V.map($=>{k($).map(pe=>{V.push(pe)})}),V},{initialMouse2D:F,mouse2D:U,mouse3D:G,offset:j,normal:Q,plane:H,pointerDownPos:K}=oe.useMemo(()=>({initialMouse2D:new Rt,mouse2D:new Rt,mouse3D:new ve,offset:new ve,normal:new ve,plane:new Sm,pointerDownPos:new Rt}),[]);oe.useEffect(()=>{let W=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);N(W)},[]);const J=wie({onPointerEnter:W=>{w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||Je.getState().itemDraggedSkuID||Je.getState().cameraActive!==!0&&!Je.getState().dragging&&!_&&(R&&!R.isEndNode?nt.switchCursor(eo.POINTER):nt.switchCursor(eo.GRAB),a(W.event))},onPointerLeave:W=>{w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||Je.getState().itemDraggedSkuID||Je.getState().cameraActive!==!0&&!Je.getState().dragging&&!_&&(nt.switchCursor(eo.GRAB),s(W.event))},onClick:W=>{if(W.event.stopPropagation(),!w){if(Je.getState().builderMode){const{eventObject:V,point:$}=W.event;V.getWorldPosition(j).sub($),G.copy($);const re=W.event.offsetX,pe=W.event.offsetY,ue=re/x.width*2-1,ce=-pe/x.height*2+1;U.set(ue,ce);const ye=new Sy;ye.setFromCamera(U,S);const Se=ye.intersectObject(Je.getState().sceneRef.getObjectByName("proxyGeometry"));Se.length>0&&nt.fireEvent(nt.EVENTS.CONFIGURATION.OnClickItem,{point:Se[0].point,camera:ye.camera})}if(!Je.getState().sceneSettings.disableContextMenu)if(!W.dragging&&!_){if(Math.abs(W.event.x-K.x)>1)return;i(W.event.offsetX,W.event.offsetY,e)}else ui.getState().actions.exitHotspot(!0)}},onDrag:async W=>{if(Je.getState().simulateDragEnd===!0||Je.getState().dragging&&Je.getState().draggingItemGUID!==R.guid||Je.getState().sceneSettings.disableDragDrop)return;const V=W.event;if(V.stopPropagation(),_){nt.switchCursor(eo.BLOCKED);return}if(Wt.getState().selectedItemData){nt.switchCursor(eo.BLOCKED);return}if(Object.keys(Wt.getState().itemsSpawned).length<2){nt.switchCursor(eo.BLOCKED);return}const re=W.event.offsetX,pe=W.event.offsetY;if(!Je.getState().dragging){if(Wt.setState({busy:!0}),Math.abs(V.x-K.x)<=1)return;if(R&&!R.canDrag){nt.switchCursor(eo.BLOCKED);return}const We=R.whichPlugAreWeAttachedUsing().attachedPlug.guid;let Fe=R.swapRoot();Fe||(Fe={rootDetachedPlugs:R.detachNodeFromReceiver()}),E.current=k(R),b.current=[],E.current.map(He=>{b.current.push(He.guid),R.ref.attach(He.ref)}),nt.switchCursor(eo.MOVE),Je.setState({dragging:!0}),Je.setState({draggingItemGUID:R.guid}),h=!1,l=null,f=null,y.current=-1;const ie=re/x.width*2-1,qe=-pe/x.height*2+1;F.set(ie,qe);const Me=await t({guid:e,node:R,detachedData:Fe,attachedChildrenGuids:b.current});if(Me.length<=0||Me.transforms===void 0)return;Me.transforms.map((He,Oe)=>{He.receiverPlugGUID===We&&(y.current=Oe)})}const ue=re/x.width*2-1,ce=-pe/x.height*2+1;U.set(ue,ce),v.setFromCamera(U,S),S.getWorldDirection(Q).negate(),H.setFromNormalAndCoplanarPoint(Q,G),v.ray.intersectPlane(H,G);const ye=mr.getState().ghostParentRef;ye.children.length>0&&(l=D(U),f===null&&y.current!==-1&&y.current<ye.children.length&&ye.children[y.current]!==void 0&&(f=ye.children[y.current].children[0].uuid),l&&f!==null&&f!==l.uuid&&!h&&(h=!0),!h&&!l&&(h=!0)),l&&h?(mr.setState({ghostVisibility:!1}),R.ref.position.set(l.position.x,l.position.y,l.position.z),R.ref.setRotationFromEuler(l.rotation)):(mr.setState({ghostVisibility:!0}),R.ref.position.copy(G).add(j)),(ue>1||ue<-1||ce<-1||ce>1)&&(Je.setState({simulateDragEnd:!0}),Je.setState({dragging:!1}),Je.setState({draggingItemGUID:null}),Wt.setState({busy:!1}),nt.switchCursor(eo.GRAB),n({node:R,intersectingGhostObject:l,attachedChildrenGuids:b.current,attachedNodesToCurrentNode:E.current}))},onDragStart:({event:W})=>{if(Je.setState({simulateDragEnd:!1}),w||Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu)return;W.stopPropagation();const{eventObject:V,point:$}=W;V.getWorldPosition(j).sub($),G.copy($),K.set(W.x,W.y)},onDragEnd:({event:W})=>{Je.setState({simulateDragEnd:!1}),!(Je.getState().dragging&&Je.getState().draggingItemGUID!==R.guid)&&(Je.getState().sceneSettings.disableDragDrop&&Je.getState().sceneSettings.disableContextMenu||(W.stopPropagation(),Je.setState({dragging:!1}),Je.setState({draggingItemGUID:null}),Wt.setState({busy:!1}),nt.switchCursor(eo.GRAB),n({node:R,intersectingGhostObject:l,attachedChildrenGuids:b.current,attachedNodesToCurrentNode:E.current})))}});return ne(hi,{children:u?ne("group",{ref:m,...J(),...p,children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:479,columnNumber:9},this):ne("group",{ref:m,...p,children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:483,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/Draggable.js",lineNumber:477,columnNumber:5},this)}const YBe=({modelData:r,clonedMesh:e,clonedProxyMesh:t,itemKey:n,scale:i,onItemClickHandler:a,onDragEndHandler:s,onDragStartHandler:o,stockAlert:l=!0})=>{const u=ui(Q=>Q),f=Wt(Q=>Q),h=Wt(Q=>Q.hoveredItemRef),p=oe.useRef(null),m=oe.useRef(null),y=oe.useRef([]),E=oe.useRef(null),[b,v]=oe.useState(e),[x,S]=oe.useState(t),_=oe.useRef(0),w=oe.useRef(0),{ref:R,actions:N,names:L}=VLe(r.data.animations),I=oe.useCallback((Q,H,K,J)=>qBe(Q,H,K,J,L,N),[L,N]),D=oe.useCallback(Q=>XBe(Q,L,N),[L,N]);oe.useEffect(()=>{if(p.current===n.itemData.guid){p.current=null;let Q=u.lastActiveHotspotData.hotspotData;if(!Q)return;if(Q.exitAnim?I(Q.exitAnim,!1,!1,!1):Q.entryAnim&&I(Q.entryAnim,!1,!0,!1),Q.activeAnim&&D(Q.activeAnim),u.activeHotspotData){if(n.itemData.guid===u.activeHotspotData.itemData.guid){p.current=n.itemData.guid;let H=u.activeHotspotData.hotspotData;if(!H)return;H.entryAnim&&I(H.entryAnim,!1,!1,!0),H.activeAnim&&I(H.activeAnim,!0,!1,!1)}}else return}else if(u.activeHotspotData){if(n.itemData.guid===u.activeHotspotData.itemData.guid){p.current=n.itemData.guid;let Q=u.activeHotspotData.hotspotData;if(!Q)return;Q.entryAnim&&I(Q.entryAnim,!1,!1,!0),Q.activeAnim&&I(Q.activeAnim,!0,!1,!1)}}else return},[u.activeHotspotData]),oe.useEffect(()=>{Je.getState().actions.triggerAutoFocus(),nt.fireEvent(nt.EVENTS.SCENE.Item_Added,{...n})},[]);const k=oe.useCallback(()=>{if(!R.current||(y.current=_Ue(b,R.current.inStock),y.current.length==0))return;if(R.current.inStock===!1){l==!0&&(l=!1,nt.alert({alertMsg:"Some item(s) in configuration are out of stock",alertTime:7e3,alertType:"warn",alertLabel:"Stock Alert",persistant:!0,alertId:"outOfStock"}));return}const{current:Q}=w;for(let H=0;H<y.current.length;H++){const K=y.current[H].material;if(K.emissiveIntensity==Q)return;K.emissiveIntensity=Q}},[w,R]),F=oe.useCallback(()=>{_.current=0},[y]),U=oe.useCallback(()=>{_.current=.005},[y,b]);Km(()=>{Je.getState().builderMode||(w.current=MI.lerp(w.current,_.current,.1),k())}),oe.useEffect(()=>{const Q=ln.getState().attachmentSystem.currentStructure,H=Q.getNodeByGUID(n.itemData.guid);if(H?.isDependent&&!H.isInteractive&&Object.keys(h).length>0){const K=Q.getNodeByGUID(Object.keys(h)[0]);if(!K||!K.myDependenciesGUID)return;K.myDependenciesGUID.includes(n.itemData.guid)?F():U()}else h.hasOwnProperty(n.itemData.guid)||Object.keys(h).length==0?F():U()},[h]);const G=oe.useCallback(Q=>{Q.stopPropagation();const H=f.selectedItemData;Je.setState({canvasTooltipText:"-"+n.itemData.name+"-"}),H||Wt.setState({hoveredItemRef:{}});let K=Wt.getState().hoveredItemRef;K.hasOwnProperty(n.itemData.guid)||(K[n.itemData.guid]={instance:R.current},f.actions.setHoveredItemRef({...K}))},[f,h,m]),j=oe.useCallback(Q=>{Q.stopPropagation();const H=f.selectedItemData;if(Je.setState({canvasTooltipText:""}),H){if(H.itemData.guid==n.itemData.guid)return;h[n.itemData.guid]&&(delete h[n.itemData.guid],f.actions.setHoveredItemRef({...h}))}else Wt.setState({hoveredItemRef:{}})},[m,f,h]);return oe.useEffect(()=>{if(E.current)return f.collidersRef.push(E),f.actions.setCollidersRef([...f.collidersRef]),()=>{const Q=f.collidersRef.indexOf(E);Q>-1&&f.collidersRef.splice(Q,1),f.actions.setCollidersRef([...f.collidersRef])}},[E]),ne(hi,{children:[ne("primitive",{name:"GRP_RenderGeometry",ref:R,object:b,scale:i,inStock:!0},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:240,columnNumber:7},globalThis),(n.itemData.hasOwnProperty("disableCollider")?!n.itemData.disableCollider:!Je.getState().sceneSettings.disableCollider)&&ne("group",{name:"GRP_LoadingPlaceholder",children:ne("group",{position:n.itemData.boundingSphereCenter,scale:[.9,.9,.9],name:"boxGeometry",children:ne(lie,{ref:E,scale:Fx(n.itemData.boundingBoxSize),visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:257,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:252,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:251,columnNumber:9},globalThis),r.proxy.isLoaded&&ne(WBe,{guid:n.itemData.guid,onDragStartHandler:o,onDragEndHandler:s,onItemClickHandler:a,onPointerEnter:G,onPointerLeave:j,name:"GRP_ProxyMesh",isInteractive:n.itemData.isInteractive,children:ne("primitive",{name:"proxyGeometry",object:x,scale:i,visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:277,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:267,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Model.js",lineNumber:239,columnNumber:5},globalThis)};function qBe(r,e,t,n,i,a){if(!i.includes(r))return;const s=a[r];s.setLoop(e?JV:ZV),s.clampWhenFinished=!e,n&&s.reset(),t?s.fadeOut(.5).play():s.fadeIn(.5).play()}function XBe(r,e,t){if(!e.includes(r))return;t[r].stop()}function $Be({distanceFactor:r,position:e,proxymodel:t,scale:n}){return ne("primitive",{position:[0,0,0],name:"proxyLoader",object:t,scale:n,visible:!0,wireframe:!0,children:ne(IR,{center:!0,position:e,distanceFactor:r,zIndexRange:[29,0],children:ne("img",{alt:"Loading...",draggable:"false",src:Om+"/Animation/Loading.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:32,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:25,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:17,columnNumber:5},this)}function KBe({proxymodel:r,itemKey:e,scale:t}){return oe.useEffect(()=>{ln.getState().actions.updateFittingSkuIds()},[]),ne("group",{children:[(e.itemData.hasOwnProperty("disableCollider")?!e.itemData.disableCollider:!Je.getState().sceneSettings.disableCollider)&&ne("group",{name:"GRP_LoadingPlaceholder",children:ne("group",{position:e.itemData.boundingSphereCenter,scale:[.9,.9,.9],name:"boxGeometry",children:ne(lie,{scale:Fx(e.itemData.boundingBoxSize),visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:65,columnNumber:13},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:60,columnNumber:11},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:59,columnNumber:9},this),ne("group",{name:"GRP_ProxyMesh",children:ne("primitive",{name:"proxyGeometry",object:r.clone(),scale:t,visible:!1},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:73,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:72,columnNumber:7},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:55,columnNumber:5},this)}const ZBe=({position:r,rotation:e,itemKey:t,scale:n,rejectFunc:i,onItemClickHandler:a,onDragEndHandler:s,onDragStartHandler:o,itemIndex:l,proxyScene:u})=>{const f=Je(x=>x.sceneRef),h=Mo(x=>x),[p,m]=oe.useState(null),[y,E]=oe.useState(u.clone()),b=oe.useRef(null);oe.useEffect(()=>((async()=>{let x=await h.actions.loadAsset(t.itemData.skuID).catch((w,R)=>{i(w,R,t.itemData.guid)});if(!x||!x.data){m({data:null,clonedMesh:null,mainModelReady:!1});return}let S=x.data,_;t.itemData.replace===!0?_=S.scene:_=S.scene.clone(),t.itemData.clonedScene=_,S.functions&&(S.functions.copyVariantMaterials(_,S.scene),await v(S,_)),zt.info({title:"model loaded: "+t.itemData.skuID}),t.itemData.hasItemLoaded=!0,Wt.getState().actions.triggerModelLoaded(),nt.fireEvent(nt.EVENTS.SCENE.Model_Loaded,t.itemData.skuID),m({data:x,clonedMesh:_,mainModelReady:!0})})(),()=>{nt.fireEvent(nt.EVENTS.SCENE.Model_Removed,t.itemData.skuID)}),[]);const v=oe.useCallback(async(x,S)=>{const _=ln.getState().attachmentSystem;var w=_.currentStructure.getNodeByGUID(t.itemData.guid);if(!w)return;let R="";if(w.overrideVariant)R=w.overrideVariant,nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,!0);else{const N=_.globalVariants;if(!N||N.Count<=0)return;let L=[];Object.keys(N).map((I,D)=>{L.push(N[I])}),t.itemData.looks?.map(I=>{L.includes(I)&&(R=I)}),R||(R=t.itemData.looks[0])}return R&&(w.currentVariant=R,await x.functions.selectVariant(S,R),Wt.setState({variantChangeAlert:!Wt.getState().variantChangeAlert})),R},[]);return oe.useEffect(()=>{if(!b.current)return;const x=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t.itemData.guid);x&&p!==null?(x.ref=b.current,x.transform={position:r,rotation:e},ln.getState().actions.updateFittingSkuIds()):zt.warn({title:t.itemData.guid})},[b,p]),oe.useEffect(()=>{if(b.current&&f&&t.itemData.hasOwnProperty("excludeFromSceneBounds")&&t.itemData.excludeFromSceneBounds){const x=f.getObjectByName("#GRP_EXCLUDED");x!==void 0&&x.attach(b.current)}},[f,b]),ne("group",{ref:b,position:r,quaternion:e,name:`GRP_${t.itemData.name}_`+l.toString().padStart(2,"0"),children:[p!==null&&(p.mainModelReady?ne(YBe,{modelData:p.data,clonedMesh:p.clonedMesh,clonedProxyMesh:y,itemKey:t,scale:n,onDragStartHandler:o,onDragEndHandler:s,onItemClickHandler:a},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:264,columnNumber:11},globalThis):ne(KBe,{itemKey:t,proxymodel:y,scale:n},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:275,columnNumber:11},globalThis)),p==null&&y&&ne($Be,{proxymodel:y,distanceFactor:t.itemData.boundingBoxSize.x*4>1?1:t.itemData.boundingBoxSize.x*4,position:t.itemData.boundingSphereCenter,scale:n},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:283,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Item.js",lineNumber:254,columnNumber:5},globalThis)};function JBe({index:r,children:e,...t}){const n=oe.useRef(),i=wie({onPointerEnter:a=>{a.event.stopPropagation(),Je.getState().itemDraggedSkuID&&Je.setState({hoveredGhostIndex:r})},onPointerLeave:a=>{a.event.stopPropagation(),Je.getState().itemDraggedSkuID&&Je.setState({hoveredGhostIndex:-1})}});return ne("group",{ref:n,...i(),...t,children:e},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/generic/GhostEventHandler.js",lineNumber:22,columnNumber:5},this)}const e3e=({ghostData:r,ghostTransform:e,index:t})=>{const n=oe.useRef(),i=oe.useMemo(()=>r.proxyScene.clone(),[r]),a=Je(o=>o.hoveredGhostIndex),s=new Yt(.6,.98,0);return oe.useEffect(()=>{const{current:o}=n;o&&(o.userData.incomingPlugName=e.incomingPlugName,o.userData.receiverPlugName=e.receiverPlugName,o.userData.incomingPlugGUID=e.incomingPlugGUID,o.userData.receiverPlugGUID=e.receiverPlugGUID,nt.fireEvent(nt.EVENTS.SCENE.Ghost_Loaded,{ghostData:r,ghostTransform:e}))},[n]),oe.useEffect(()=>{if(!i||!Je.getState().itemDraggedSkuID)return;let o;a===t?o=s:o=Je.getState().sceneSettings.ghostThreeColor,i.traverse(l=>{l.isMesh===!0&&(l.material=l.material.clone(),l.material.emissive=o)})},[a,i]),ne(hi,{children:ne(JBe,{index:t,children:ne("primitive",{isGhost:!0,ref:n,index:t,position:e.position,quaternion:e.rotation,object:i,castShadow:!1,receiveShadow:!1,frustumCulled:!1},`ghost${t}`,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:59,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:58,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Ghost.js",lineNumber:57,columnNumber:5},globalThis)},t3e=({intersectingGhostObject:r=null})=>{const{camera:e}=fs(),t=mr(l=>l.ghostVisibility),n=mr(l=>l.ghostData),i=mr(l=>l.ghostsTransform),a=oe.useRef(),{_touch2D:s}=oe.useMemo(()=>({_touch2D:new Rt}),[]);oe.useEffect(()=>{const{current:l}=a;l&&mr.setState({ghostParentRef:l})},[a]);const o=l=>{let u=0,f=0;if(l.touches&&l.touches[0])u=l.touches[0].clientX,f=l.touches[0].clientY;else return;if(!Je.getState().itemDraggedSkuID)return;const h=Je.getState().cursorParentRef,p=Je.getState().canvasSize;if(!h)return;const m=h.getBoundingClientRect(),y=m.top,E=m.left,b=(u-E)/p.width*2-1,v=(-f+y)/p.height*2+1;s.set(b,v);const x=new Sy;x.setFromCamera(s,e);const S=x.intersectObject(mr.getState().ghostParentRef);S.length>0?(r=S[0].object,Je.setState({hoveredGhostIndex:r.parent.index})):(r=null,Je.setState({hoveredGhostIndex:-1}))};return oe.useEffect(()=>{window.addEventListener("touchmove",o,!1),zt.info({title:"Ghost Manager Mounted!"})},[]),ne("group",{name:"#GRP_GhostParent",visible:t,ref:a,children:n&&ne(hi,{children:i.map((l,u)=>u<n.count&&ne(e3e,{ghostData:n,ghostTransform:l,index:u},"ghosts"+u,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:89,columnNumber:17},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:85,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/GhostManager.js",lineNumber:79,columnNumber:5},globalThis)},n3e=()=>{const r=ln(L=>L.attachmentSystem),e=ln(L=>L),t=Wt(L=>L.removeItemTrigger),n=Wt(L=>L.variantChangeAlert),i=ui(L=>L),a=Je(L=>L.showDimensions);Je(L=>L.sceneSettings);const s=Wt(L=>L),o=Wt(L=>L.lastDeletedItemData),l=wr(L=>L),u=Wt(L=>L.selectedItemData),f=Wt(L=>L.itemsSpawned),h=oe.useRef(null),p=oe.useRef(null),m=oe.useRef(!1),y=oe.useRef(null),E=oe.useRef(null),b=oe.useRef(!1),v=oe.useRef(!1);oe.useRef(!1),oe.useRef(!1);const x=oe.useCallback(({guid:L,node:I,detachedData:D,attachedChildrenGuids:k})=>{if(m.current!==!0)return m.current=!0,wr.setState({canCameraRotate:!1}),i.actions.switchHotspotsVisibility(!1,!0),y.current={position:I.ref.position.clone(),rotation:I.ref.rotation.clone()},E.current=D,r.currentStructure.removeNodeFromStructure(I),k.length<=0&&(k=!1),mr.getState().actions.spawnGhostsForSkuID(f[L].itemData.skuID,k)},[l,f]),S=oe.useCallback(({node:L,intersectingGhostObject:I,attachedChildrenGuids:D,attachedNodesToCurrentNode:k})=>{if(!m.current)return;m.current=!1,wr.setState({canCameraRotate:!0}),i.actions.switchHotspotsVisibility(!0,!0);function F(){L.ref.position.set(0,0,0),mr.getState().actions.clearAllGhosts()}if(!mr.getState().ghostData?.connectablePlugs){F();return}r.currentStructure.addNode(L);let G=null,j=null,Q=!1,H=[],K={};if(Je.getState().sceneSettings.ignoreCollisionPostDragging===!1&&D.map((J,W)=>{H[W]=r.currentStructure.checkCollisionforGUID(J),H[W]&&(K[J]=f[J])}),H.map(J=>{Q||(Q=J)}),I&&Q){Je.setState({draggingOnDropCollisionData:{node:L,attachedChildrenGuids:D,collidingStatus:H,intersectingGhostObject:I,initPosition:y.current.position,initRotation:y.current.rotation,detachedPlugs:E.current,attachedNodesToCurrentNode:k}}),L.ref.position.set(I.position.x,I.position.y,I.position.z),L.ref.setRotationFromEuler(I.rotation),nt.fireEvent(nt.EVENTS.SCENE.DraggingOnDrop_CollsionDetected,K);return}if(I){const J=I.userData;G=L.getPlugByName(J.incomingPlugName),j=r.currentStructure.getPlugByGUID(J.receiverPlugGUID),L.ref.position.set(I.position.x,I.position.y,I.position.z),L.ref.setRotationFromEuler(I.rotation),L.transform={position:I.position,rotation:I.quaternion}}else{const J=E.current.neighbourDetachedPlugs;J&&(E.current.neighbourNode.detachNodeFromReceiver(),r.currentStructure.connectPlugs({incomingPlug:J.incomingPlug,receiverPlug:J.receiverPlug})),G=E.current.rootDetachedPlugs.incomingPlug,j=E.current.rootDetachedPlugs.receiverPlug,L.ref.position.set(y.current.position.x,y.current.position.y,y.current.position.z),L.ref.setRotationFromEuler(y.current.rotation);let W=new Xi().identity();L.ref.getWorldQuaternion(W),L.transform={position:y.current.position,rotation:W}}r.currentStructure.connectPlugs({incomingPlug:G,receiverPlug:j}),mr.getState().actions.clearAllGhosts(),Wt.getState().actions.deselectItem(),k.map(J=>{L.ref.parent.attach(J.ref)}),ln.getState().actions.updateFittingSkuIds()},[l,Je,mr,r,e,f]),_=oe.useCallback((L,I,D)=>{if(Je.getState().sceneSettings.disableContextMenu)return;const k=ln.getState().attachmentSystem.currentStructure,F=k.getNodeByGUID(D);let U=[];if(!F.myDependenciesGUID)return;F.myDependenciesGUID.map(Q=>{const H=k.getNodeByGUID(Q);let K={guid:Q,name:f[Q].itemData.guid,data:{...f[Q],overrideVariant:H.overrideVariant,currentVariant:H.currentVariant,offsetX:L,offsetY:I}};U.push(K)}),U.sort((Q,H)=>Q.name>H.name?1:H.name>Q.name?-1:0);let G=zd.getState().inventoryData[f[D].itemData.skuID];const j={primary:{guid:D,name:f[D].itemData.name,data:{inventory:G,...f[D],overrideVariant:F.overrideVariant,currentVariant:F.currentVariant,offsetX:L,offsetY:I}},dependencies:U};s.actions.setSelectedItemData(j.primary.data),nt.fireEvent(nt.EVENTS.UI.ContextMenu_Show,j)},[f]),w=oe.useCallback(L=>{L&&(Wt.setState({lastDeletedItemData:{...f[L]}}),nt.fireEvent(nt.EVENTS.SCENE.Item_Removed,{...f[L]}),delete f[L],s.actions.setItemsSpawned({...f}))},[s,Wt,f]);oe.useEffect(()=>{let L=Wt.getState().removeItems;if(L.length<=0&&!o)return;let I=L.pop();w(I)},[t,o]);const R=oe.useCallback(function(L,I){const D=L>0,k=L<=0;zt.groupCollapsed("Resolving buttons visibility"),zt.table({sceneIsEmpty:k,sceneIsNotEmpty:D}),zt.groupEnd(),I.showViewInYourSpaceBtn===!0&&(D&&b.current===!1?(nt.fireEvent(nt.EVENTS.UI.ViewInYourSpaceButton_Show),b.current=!0):k&&b.current===!0&&(nt.fireEvent(nt.EVENTS.UI.ViewInYourSpaceButton_Hide),b.current=!1)),I.showShareBtn===!0&&(D&&v.current===!1?(nt.fireEvent(nt.EVENTS.UI.ShareButton_Show),v.current=!0):k&&v.current===!0&&(nt.fireEvent(nt.EVENTS.UI.ShareButton_Hide),v.current=!1))},[f]);oe.useEffect(()=>{nt.fireEvent(nt.EVENTS.SCENE.Items_Updated,{itemsSpawned:f});const L=Je.getState().sceneSettings;R(Object.keys(f).length,L),Object.keys(f).length==0?Je.setState({canvasTooltipText:L.textSettings.tooltipEmptySceneText}):Object.keys(f).length==1&&Je.setState({canvasTooltipText:L.textSettings.tooltipInstructionText})},[f]),oe.useEffect(()=>{const L=ln.getState().attachmentSystem;if(!L)return;zd.getState().actions.refreshInventory(f);const I=L.getCartItems();nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,I),nt.fireEvent(nt.EVENTS.SCENE.ReplaceableCategory_Updated,L.currentStructure.getCurrentItemsInReplaceableCategory())},[f,n]);const N=oe.useCallback((L,I,D)=>{nt.removeItemByGUID(D),nt.alert({alertMsg:I+": "+L,alertTime:5e3,alertType:"error",alertLabel:"Error",persistant:!0})},[]);return oe.useEffect(()=>{const{current:L}=p;L&&ln.setState({colliderMeshRef:L})},[p]),oe.useEffect(()=>{const{current:L}=h;L&&Je.setState({sceneRef:L})},[h]),oe.useEffect(()=>{let L=u?wr.getState().cameraSettings.zoomingMultiplier:wr.getState().cameraSettings.zoomingMultiplier+.1;L+=a?.3:.1,wr.setState({boundsMargin:L}),Je.getState().actions.triggerAutoFocus()},[a,u]),oe.useEffect(()=>{zt.info({title:"item Manager mounted"}),Je.getState().preconfigurationLoaded||ln.getState().actions.loadDefaultStructure()},[]),ne(hi,{children:[ne("group",{name:"Scene",ref:h,onPointerMissed:()=>{u&&s.actions.deselectItem(),ui.getState().isAnyHotspotActive&&ui.getState().actions.exitHotspot()},children:[eUe,ne("group",{name:"#GRP_EXCLUDED"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:466,columnNumber:9},globalThis),ne("group",{name:"#ITEMSANDGHOSTS",children:[ne("group",{name:"#ITEMS",children:Object.keys(f).map((L,I)=>ne(ZBe,{scale:[1,1,1],onDragStartHandler:x,onDragEndHandler:S,onItemClickHandler:_,itemKey:f[L],position:f[L].itemData.position,rotation:f[L].itemData.rotation,itemIndex:I,proxyScene:f[L].itemData.proxyScene,rejectFunc:N},L,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:470,columnNumber:15},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:468,columnNumber:11},globalThis),ne(t3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:485,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:467,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:456,columnNumber:7},globalThis),ne("group",{name:"#Parent_ColliderMesh",children:ne("mesh",{ref:p,visible:!1,enabled:!0,name:"#COLLIDER_MESH",children:ne("meshPhongMaterial",{depthTest:!1,transparent:!0,opacity:.8},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:495,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:489,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:488,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/ItemManager.js",lineNumber:455,columnNumber:5},globalThis)},i3e=({...r})=>{const[e,t]=oe.useState(10),n=Je(a=>a.bbox),i=Je(a=>a.sceneSettings);return oe.useEffect(()=>{if(!n||!n.isBox3){t(10);return}const a=new ve(0,0,0);let s=a.distanceTo(n.min)*2,o=a.distanceTo(n.max)*2,l=o>s?o:s;l!=1/0&&l!=-1/0&&(l+=5,t(l||10))},[n]),ne(hi,{children:i.contactShadowVisibility&&ne(ZLe,{rotation:[Math.PI/2,0,0],position:[0,0,0],opacity:.3,scale:e,blur:1,far:5,resolution:512},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/EffectsComposer.js",lineNumber:32,columnNumber:9},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/EffectsComposer.js",lineNumber:30,columnNumber:5},globalThis)};function r3e({hotspotKey:r}){const e=ln(v=>v.attachmentSystem),t=ui(v=>v),n=ui(v=>v.activeHotspotData),i=Wt(v=>v.lastDeletedItemData),a=mr(v=>v.ghostData),s=ui(v=>v.actions),o=ui(v=>v.hotspotsVisibility),l=ui(v=>v.hotspotsTempVisibility),[u,f]=oe.useState(null),[h,p]=oe.useState(!1),m=oe.useRef(null),y=oe.useRef(null),E=oe.useRef(null),b=oe.useCallback(v=>{v.includes(r.itemData.skuID+"_"+r.hotspotData.hotspotID)&&p(!0)},[r]);return oe.useEffect(()=>b(t.visitedHotspotsID),[t,b]),oe.useEffect(()=>{f(n?n.hotspotData.guid:null)},[n]),oe.useEffect(()=>{y.current&&(u===r.hotspotData.guid?y.current.parentNode.classList.add("topmostActive"):y.current.parentNode.classList.remove("topmostActive"))},[u]),oe.useEffect(()=>{m.current&&u===r.hotspotData.guid&&(m.current.style.opacity=1)},[u,m]),oe.useEffect(()=>{if(!(!E.current&&!i)){var v=e.currentStructure.getNodeByGUID(r.itemData.guid);v?.ref&&(E.current.parent=v.ref)}},[E,e,o,i]),ne("group",{ref:E,position:r.hotspotData.hotspotPointTransform,children:ne(IR,{ref:y,zIndexRange:[6,0],style:o&&l&&!a?{opacity:"1",pointerEvents:"all",transition:"0.5s"}:{opacity:"0",pointerEvents:"none",transition:"0.5s"},children:ne("button",{style:{display:r.hotspotData.visibleInScene==!1?"none":"block"},ref:m,className:u===r.hotspotData.guid?"hotspot hotspot-0 active":h?"hotspot hotspot-0 visited":"hotspot hotspot-0",onPointerEnter:v=>{v.stopPropagation(),m.current&&u!==r.hotspotData.guid&&(m.current.getClientRects()[0].left>Je.getState().canvasSize.width/1.6?m.current.classList.add("left"):m.current.classList.remove("left")),y.current&&y.current.parentNode.classList.add("topmostHover")},onPointerLeave:v=>{v.stopPropagation(),y.current&&y.current.parentNode.classList.remove("topmostHover")},id:"hotspot3D_"+r.itemData.skuID+"_"+r.hotspotData.hotspotID,onClick:v=>{if(v.stopPropagation(),t.isAnyHotspotActive&&t.activeHotspotData.hotspotData.guid===r.hotspotData.guid){s.exitHotspot();return}s.clickHotspot(r.hotspotData.hotspotID,r.hotspotData.guid,r.itemData.guid)},children:[ne("span",{className:"inner-circle"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:137,columnNumber:11},this),ne("span",{className:"hotspot-annotation",children:r.hotspotData.title},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:138,columnNumber:11},this)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:83,columnNumber:9},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:74,columnNumber:7},this)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Hotspot.js",lineNumber:73,columnNumber:5},this)}const a3e=()=>{const r=ui(b=>b),e=ui(b=>b.hotspotsHealthCheck),t=Wt(b=>b.lastDeletedItemData),n=ui(b=>b.hotspotsSpawned),i=Wt(b=>b.itemsSpawned),a=ui(b=>b.activeHotspotData),[s,o]=oe.useState(null),{camera:l}=fs(),u=oe.useRef(null),f=oe.useCallback(()=>{const b=ui.getState().hotspotSpawnedForCategoryIDs,v=ln.getState().attachmentSystem.globalGeometryVariants;Object.keys(i).map(x=>{let S=i[x];if(!S.hotspotsData)return;let _=!1;Object.keys(n).map(w=>{const R=n[w].hotspotData.geometryVariantID;if(R){let N=!1;if(Object.keys(v).map(L=>{R==v[L]&&(N=!0)}),N===!1){_=!0;let L=[];L.push(n[w].hotspotData.categoryID);const I=new Set(L);D$(b,D=>!I.has(D)),delete n[w]}}}),_===!0&&(ui.setState({hotspotSpawned:{...n}}),ui.setState({hotspotSpawnedForCategoryIDs:b})),S.hotspotsData.map(w=>{const R=ui.getState().hotspotSpawnedForCategoryIDs;if(w.geometryVariantID){let N=!1;if(Object.keys(v).map(L=>{w.geometryVariantID==v[L]&&(N=!0)}),N===!1)return}w.categoryID!==""&&R.includes(w.categoryID)||(S.hotspotSpawned=!0,R.push(w.categoryID),h(x,w))})})},[i,n]),h=oe.useCallback((b,v)=>{let x=i[b].itemData.skuID+"_"+v.hotspotID;n[x]={itemData:{guid:b,...i[b].itemData},hotspotData:{guid:x,...v}},ui.setState({hotspotsSpawned:{...n}})},[i,r,n]);oe.useEffect(()=>{if(!t)return;if(t.hotspotSpawned){ui.getState().actions.removeHotspotForItem({...t});const v=ui.getState().hotspotSpawnedForCategoryIDs;let x=[];t.hotspotsData.map(_=>{x.push(_.categoryID)});const S=new Set(x);D$(v,_=>!S.has(_)),ui.setState({hotspotSpawnedForCategoryIDs:v})}Wt.setState({lastDeletedItemData:null});const b=ln.getState().attachmentSystem;b.currentStructure.removeNodeByGUID(t.itemData.guid),nt.fireEvent(nt.EVENTS.SCENE.MaterialOverrides_Exists,b.currentStructure.materialOverrideExists())},[t]);const{raycasterHotspot:p,worldPos:m}=oe.useMemo(()=>({raycasterHotspot:new Sy,worldPos:new ve}),[]),y=(b,v)=>{let x=b;x.sub(l.position);const S=x.length();p.set(l.position,x);const _=p.intersectObject(Je.getState().sceneRef);if(_.length>0&&_[0].distance<S){v.style.opacity=.5;return}v.style.opacity=s?.5:1};oe.useEffect(()=>{o(a?a.hotspotData.guid:null)},[a]);const E=oe.useRef(0);return Km(()=>{if(u.current===null||u.current.children.length<=0)return;E.current<u.current.children.length-1?E.current+=1:E.current=0;const b=Object.keys(n)[E.current],v="hotspot3D_"+n[b].itemData.skuID+"_"+n[b].hotspotData.hotspotID,x=nt.coreWCRef.shadowRoot.getElementById(v);s===b||x===null||(u.current.children[E.current].getWorldPosition(m),y(m,x))},[]),oe.useEffect(()=>{f()},[Object.keys(i).length,e]),r.hotspotsVisibility===!0&&ne("group",{name:"#GRP_HotspotManager",ref:u,children:Object.keys(n).map(b=>ne(r3e,{hotspotKey:n[b]},b,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/HotspotManager.js",lineNumber:261,columnNumber:11},globalThis))},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/HotspotManager.js",lineNumber:259,columnNumber:7},globalThis)};var s3e={boolean:!1,function:!0,object:!0,number:!1,string:!1,undefined:!1},t8=s3e,o3e=t8;function l3e(r){return!!(r&&o3e[typeof r])}var JU=l3e,c3e=Object.prototype,u3e=c3e.toString,h3e=RegExp("^"+String(u3e).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),eB=h3e,f3e=t8,d3e=Object.prototype,p3e=d3e.hasOwnProperty,m3e=function(r){var e,t=r,n=[];if(!t||!f3e[typeof r])return n;for(e in t)p3e.call(t,e)&&n.push(e);return n},g3e=m3e,v3e=JU,y3e=eB,A3e=g3e,qL=y3e.test(qL=Object.keys)&&qL,b3e=qL?function(r){return v3e(r)?qL(r):[]}:A3e,Cie=b3e;function _3e(){}var E3e=_3e,Mie=JU,S3e=eB,XL=S3e.test(XL=Object.create)&&XL;function Rie(r,e){return Mie(r)?XL(r):{}}XL||(Rie=function(){function r(){}return function(e){if(Mie(e)){r.prototype=e;var t=new r;r.prototype=null}return t||zl.Object()}}());var Iie=Rie,x3e=E3e,T3e=eB,J$={configurable:!1,enumerable:!1,value:null,writable:!1},eK=function(){try{var r={},e=T3e.test(e=Object.defineProperty)&&e,t=e(r,r,r)&&e}catch{}return t}(),w3e=eK?function(r,e){J$.value=e,eK(r,"__bindData__",J$)}:x3e,n8=w3e,C3e=Iie,M3e=JU,R3e=n8,I3e=[],N3e=I3e.push;function D3e(r){var e=r[0],t=r[2],n=r[4];function i(){if(t){var a=t.slice();N3e.apply(a,arguments)}if(this instanceof i){var s=C3e(e.prototype),o=e.apply(s,a||arguments);return M3e(o)?o:s}return e.apply(n,a||arguments)}return R3e(i,r),i}var O3e=D3e;function P3e(r,e,t){e||(e=0),typeof t>"u"&&(t=r?r.length:0);for(var n=-1,i=t-e||0,a=Array(i<0?0:i);++n<i;)a[n]=r[e+n];return a}var Nie=P3e,L3e=Iie,U3e=JU,B3e=n8,k3e=Nie,F3e=[],tK=F3e.push;function Die(r){var e=r[0],t=r[1],n=r[2],i=r[3],a=r[4],s=r[5],o=t&1,l=t&2,u=t&4,f=t&8,h=e;function p(){var m=o?a:this;if(n){var y=n.slice();tK.apply(y,arguments)}if((i||u)&&(y||(y=k3e(arguments)),i&&tK.apply(y,i),u&&y.length<s))return t|=16,Die([e,f?t:t&-4,y,null,a,s]);if(y||(y=arguments),l&&(e=m[h]),this instanceof p){m=L3e(e.prototype);var E=e.apply(m,y);return U3e(E)?E:m}return e.apply(m,y)}return B3e(p,r),p}var G3e=Die;function z3e(r){return typeof r=="function"}var H3e=z3e,V3e=O3e,j3e=G3e,Q3e=H3e,W3e=[],nK=W3e.push;function Oie(r,e,t,n,i,a){var s=e&1,o=e&2,l=e&4,u=e&16,f=e&32;if(!o&&!Q3e(r))throw new TypeError;u&&!t.length&&(e&=-17,u=t=!1),f&&!n.length&&(e&=-33,f=n=!1);var h=r&&r.__bindData__;if(h&&h!==!0)return h=h.slice(),s&&!(h[1]&1)&&(h[4]=i),!s&&h[1]&1&&(e|=8),l&&!(h[1]&4)&&(h[5]=a),u&&nK.apply(h[2]||(h[2]=[]),t),f&&nK.apply(h[3]||(h[3]=[]),n),h[1]|=e,Oie.apply(null,h);var p=e==1||e===17?V3e:j3e;return p([r,e,t,n,i,a])}var Y3e=Oie,iK=Y3e,q3e=Nie;function X3e(r,e){return arguments.length>2?iK(r,17,q3e(arguments,2),null,e):iK(r,1,null,null,e)}var $3e=X3e;function K3e(r){return r}var Z3e=K3e,J3e=eB,eke=/\bthis\b/,i8={};i8.funcDecomp=!J3e.test(zl.WinRTError)&&eke.test(function(){return this});i8.funcNames=typeof Function.name=="string";var tke=i8,nke=$3e,ike=Z3e,rke=n8,pz=tke,ake=/^\s*function[ \n\r\t]+\w/,ske=/\bthis\b/,oke=Function.prototype.toString;function lke(r,e,t){if(typeof r!="function")return ike;if(typeof e>"u"||!("prototype"in r))return r;var n=r.__bindData__;if(typeof n>"u"&&(pz.funcNames&&(n=!r.name),n=n||!pz.funcDecomp,!n)){var i=oke.call(r);pz.funcNames||(n=!ake.test(i)),n||(n=ske.test(i),rke(r,n))}if(n===!1||n!==!0&&n[1]&1)return r;switch(t){case 1:return function(a){return r.call(e,a)};case 2:return function(a,s){return r.call(e,a,s)};case 3:return function(a,s,o){return r.call(e,a,s,o)};case 4:return function(a,s,o,l){return r.call(e,a,s,o,l)}}return nke(r,e)}var Pie=lke,cke=Pie,uke=Cie,rK=t8,hke=function(r,e,t){var n,i=r,a=i;if(!i||!rK[typeof i])return a;e=e&&typeof t>"u"?e:cke(e,t,3);for(var s=-1,o=rK[typeof i]&&uke(i),l=o?o.length:0;++s<l;)if(n=o[s],e(i[n],n,r)===!1)return a;return a},fke=hke,dke=Pie,pke=fke;function mke(r,e,t){var n=-1,i=r?r.length:0;if(e=e&&typeof t>"u"?e:dke(e,t,3),typeof i=="number")for(;++n<i&&e(r[n],n,r)!==!1;);else pke(r,e);return r}var gke=mke,Lie,Uie;Lie={mm:{name:{singular:"Millimeter",plural:"Millimeters"},to_anchor:1/1e3},cm:{name:{singular:"Centimeter",plural:"Centimeters"},to_anchor:1/100},m:{name:{singular:"Meter",plural:"Meters"},to_anchor:1},km:{name:{singular:"Kilometer",plural:"Kilometers"},to_anchor:1e3}};Uie={in:{name:{singular:"Inch",plural:"Inches"},to_anchor:1/12},yd:{name:{singular:"Yard",plural:"Yards"},to_anchor:3},"ft-us":{name:{singular:"US Survey Foot",plural:"US Survey Feet"},to_anchor:1.000002},ft:{name:{singular:"Foot",plural:"Feet"},to_anchor:1},mi:{name:{singular:"Mile",plural:"Miles"},to_anchor:5280}};var vke={metric:Lie,imperial:Uie,_anchors:{metric:{unit:"m",ratio:3.28084},imperial:{unit:"ft",ratio:1/3.28084}}},Bie,kie;Bie={mm2:{name:{singular:"Square Millimeter",plural:"Square Millimeters"},to_anchor:1/1e6},cm2:{name:{singular:"Centimeter",plural:"Centimeters"},to_anchor:1/1e4},m2:{name:{singular:"Square Meter",plural:"Square Meters"},to_anchor:1},ha:{name:{singular:"Hectare",plural:"Hectares"},to_anchor:1e4},km2:{name:{singular:"Square Kilometer",plural:"Square Kilometers"},to_anchor:1e6}};kie={in2:{name:{singular:"Square Inch",plural:"Square Inches"},to_anchor:1/144},yd2:{name:{singular:"Square Yard",plural:"Square Yards"},to_anchor:9},ft2:{name:{singular:"Square Foot",plural:"Square Feet"},to_anchor:1},ac:{name:{singular:"Acre",plural:"Acres"},to_anchor:43560},mi2:{name:{singular:"Square Mile",plural:"Square Miles"},to_anchor:27878400}};var yke={metric:Bie,imperial:kie,_anchors:{metric:{unit:"m2",ratio:10.7639},imperial:{unit:"ft2",ratio:1/10.7639}}},Fie,Gie;Fie={mcg:{name:{singular:"Microgram",plural:"Micrograms"},to_anchor:1/1e6},mg:{name:{singular:"Milligram",plural:"Milligrams"},to_anchor:1/1e3},g:{name:{singular:"Gram",plural:"Grams"},to_anchor:1},kg:{name:{singular:"Kilogram",plural:"Kilograms"},to_anchor:1e3},mt:{name:{singular:"Metric Tonne",plural:"Metric Tonnes"},to_anchor:1e6}};Gie={oz:{name:{singular:"Ounce",plural:"Ounces"},to_anchor:1/16},lb:{name:{singular:"Pound",plural:"Pounds"},to_anchor:1},t:{name:{singular:"Ton",plural:"Tons"},to_anchor:2e3}};var Ake={metric:Fie,imperial:Gie,_anchors:{metric:{unit:"g",ratio:1/453.592},imperial:{unit:"lb",ratio:453.592}}},zie,Hie;zie={mm3:{name:{singular:"Cubic Millimeter",plural:"Cubic Millimeters"},to_anchor:1/1e6},cm3:{name:{singular:"Cubic Centimeter",plural:"Cubic Centimeters"},to_anchor:1/1e3},ml:{name:{singular:"Millilitre",plural:"Millilitres"},to_anchor:1/1e3},cl:{name:{singular:"Centilitre",plural:"Centilitres"},to_anchor:1/100},dl:{name:{singular:"Decilitre",plural:"Decilitres"},to_anchor:1/10},l:{name:{singular:"Litre",plural:"Litres"},to_anchor:1},kl:{name:{singular:"Kilolitre",plural:"Kilolitres"},to_anchor:1e3},m3:{name:{singular:"Cubic meter",plural:"Cubic meters"},to_anchor:1e3},km3:{name:{singular:"Cubic kilometer",plural:"Cubic kilometers"},to_anchor:1e12},krm:{name:{singular:"Matsked",plural:"Matskedar"},to_anchor:1/1e3},tsk:{name:{singular:"Tesked",plural:"Teskedar"},to_anchor:5/1e3},msk:{name:{singular:"Matsked",plural:"Matskedar"},to_anchor:15/1e3},kkp:{name:{singular:"Kaffekopp",plural:"Kaffekoppar"},to_anchor:150/1e3},glas:{name:{singular:"Glas",plural:"Glas"},to_anchor:200/1e3},kanna:{name:{singular:"Kanna",plural:"Kannor"},to_anchor:2.617}};Hie={tsp:{name:{singular:"Teaspoon",plural:"Teaspoons"},to_anchor:1/6},Tbs:{name:{singular:"Tablespoon",plural:"Tablespoons"},to_anchor:1/2},in3:{name:{singular:"Cubic inch",plural:"Cubic inches"},to_anchor:.55411},"fl-oz":{name:{singular:"Fluid Ounce",plural:"Fluid Ounces"},to_anchor:1},cup:{name:{singular:"Cup",plural:"Cups"},to_anchor:8},pnt:{name:{singular:"Pint",plural:"Pints"},to_anchor:16},qt:{name:{singular:"Quart",plural:"Quarts"},to_anchor:32},gal:{name:{singular:"Gallon",plural:"Gallons"},to_anchor:128},ft3:{name:{singular:"Cubic foot",plural:"Cubic feet"},to_anchor:957.506},yd3:{name:{singular:"Cubic yard",plural:"Cubic yards"},to_anchor:25852.7}};var bke={metric:zie,imperial:Hie,_anchors:{metric:{unit:"l",ratio:33.8140226},imperial:{unit:"fl-oz",ratio:1/33.8140226}}},Vie;Vie={ea:{name:{singular:"Each",plural:"Each"},to_anchor:1},dz:{name:{singular:"Dozen",plural:"Dozens"},to_anchor:12}};var _ke={metric:Vie,imperial:{},_anchors:{metric:{unit:"ea",ratio:1}}},jie,Qie;jie={C:{name:{singular:"degree Celsius",plural:"degrees Celsius"},to_anchor:1,anchor_shift:0},K:{name:{singular:"degree Kelvin",plural:"degrees Kelvin"},to_anchor:1,anchor_shift:273.15}};Qie={F:{name:{singular:"degree Fahrenheit",plural:"degrees Fahrenheit"},to_anchor:1},R:{name:{singular:"degree Rankine",plural:"degrees Rankine"},to_anchor:1,anchor_shift:459.67}};var Eke={metric:jie,imperial:Qie,_anchors:{metric:{unit:"C",transform:function(r){return r/(5/9)+32}},imperial:{unit:"F",transform:function(r){return(r-32)*(5/9)}}}},Wie,aK=365.25;Wie={ns:{name:{singular:"Nanosecond",plural:"Nanoseconds"},to_anchor:1/1e9},mu:{name:{singular:"Microsecond",plural:"Microseconds"},to_anchor:1/1e6},ms:{name:{singular:"Millisecond",plural:"Milliseconds"},to_anchor:1/1e3},s:{name:{singular:"Second",plural:"Seconds"},to_anchor:1},min:{name:{singular:"Minute",plural:"Minutes"},to_anchor:60},h:{name:{singular:"Hour",plural:"Hours"},to_anchor:60*60},d:{name:{singular:"Day",plural:"Days"},to_anchor:60*60*24},week:{name:{singular:"Week",plural:"Weeks"},to_anchor:60*60*24*7},month:{name:{singular:"Month",plural:"Months"},to_anchor:60*60*24*aK/12},year:{name:{singular:"Year",plural:"Years"},to_anchor:60*60*24*aK}};var Ske={metric:Wie,_anchors:{metric:{unit:"s",ratio:1}}},Yie,qie;Yie={b:{name:{singular:"Bit",plural:"Bits"},to_anchor:1},Kb:{name:{singular:"Kilobit",plural:"Kilobits"},to_anchor:1024},Mb:{name:{singular:"Megabit",plural:"Megabits"},to_anchor:1048576},Gb:{name:{singular:"Gigabit",plural:"Gigabits"},to_anchor:1073741824},Tb:{name:{singular:"Terabit",plural:"Terabits"},to_anchor:1099511627776}};qie={B:{name:{singular:"Byte",plural:"Bytes"},to_anchor:1},KB:{name:{singular:"Kilobyte",plural:"Kilobytes"},to_anchor:1024},MB:{name:{singular:"Megabyte",plural:"Megabytes"},to_anchor:1048576},GB:{name:{singular:"Gigabyte",plural:"Gigabytes"},to_anchor:1073741824},TB:{name:{singular:"Terabyte",plural:"Terabytes"},to_anchor:1099511627776}};var xke={bits:Yie,bytes:qie,_anchors:{bits:{unit:"b",ratio:1/8},bytes:{unit:"B",ratio:8}}},Xie;Xie={ppm:{name:{singular:"Part-per Million",plural:"Parts-per Million"},to_anchor:1},ppb:{name:{singular:"Part-per Billion",plural:"Parts-per Billion"},to_anchor:.001},ppt:{name:{singular:"Part-per Trillion",plural:"Parts-per Trillion"},to_anchor:1e-6},ppq:{name:{singular:"Part-per Quadrillion",plural:"Parts-per Quadrillion"},to_anchor:1e-9}};var Tke={metric:Xie,imperial:{},_anchors:{metric:{unit:"ppm",ratio:1e-6}}},$ie,Kie;$ie={"m/s":{name:{singular:"Metre per second",plural:"Metres per second"},to_anchor:3.6},"km/h":{name:{singular:"Kilometre per hour",plural:"Kilometres per hour"},to_anchor:1}};Kie={"m/h":{name:{singular:"Mile per hour",plural:"Miles per hour"},to_anchor:1},knot:{name:{singular:"Knot",plural:"Knots"},to_anchor:1.150779},"ft/s":{name:{singular:"Foot per second",plural:"Feet per second"},to_anchor:.681818}};var wke={metric:$ie,imperial:Kie,_anchors:{metric:{unit:"km/h",ratio:1/1.609344},imperial:{unit:"m/h",ratio:1.609344}}},Zie,Jie;Zie={"min/km":{name:{singular:"Minute per kilometre",plural:"Minutes per kilometre"},to_anchor:.06},"s/m":{name:{singular:"Second per metre",plural:"Seconds per metre"},to_anchor:1}};Jie={"min/mi":{name:{singular:"Minute per mile",plural:"Minutes per mile"},to_anchor:.0113636},"s/ft":{name:{singular:"Second per foot",plural:"Seconds per foot"},to_anchor:1}};var Cke={metric:Zie,imperial:Jie,_anchors:{metric:{unit:"s/m",ratio:.3048},imperial:{unit:"s/ft",ratio:1/.3048}}},ere,tre;ere={Pa:{name:{singular:"pascal",plural:"pascals"},to_anchor:1/1e3},kPa:{name:{singular:"kilopascal",plural:"kilopascals"},to_anchor:1},MPa:{name:{singular:"megapascal",plural:"megapascals"},to_anchor:1e3},hPa:{name:{singular:"hectopascal",plural:"hectopascals"},to_anchor:1/10},bar:{name:{singular:"bar",plural:"bar"},to_anchor:100},torr:{name:{singular:"torr",plural:"torr"},to_anchor:101325/76e4}};tre={psi:{name:{singular:"pound per square inch",plural:"pounds per square inch"},to_anchor:1/1e3},ksi:{name:{singular:"kilopound per square inch",plural:"kilopound per square inch"},to_anchor:1}};var Mke={metric:ere,imperial:tre,_anchors:{metric:{unit:"kPa",ratio:.00014503768078},imperial:{unit:"psi",ratio:1/.00014503768078}}},nre;nre={A:{name:{singular:"Ampere",plural:"Amperes"},to_anchor:1},mA:{name:{singular:"Milliampere",plural:"Milliamperes"},to_anchor:.001},kA:{name:{singular:"Kiloampere",plural:"Kiloamperes"},to_anchor:1e3}};var Rke={metric:nre,_anchors:{metric:{unit:"A",ratio:1}}},ire;ire={V:{name:{singular:"Volt",plural:"Volts"},to_anchor:1},mV:{name:{singular:"Millivolt",plural:"Millivolts"},to_anchor:.001},kV:{name:{singular:"Kilovolt",plural:"Kilovolts"},to_anchor:1e3}};var Ike={metric:ire,_anchors:{metric:{unit:"V",ratio:1}}},rre;rre={W:{name:{singular:"Watt",plural:"Watts"},to_anchor:1},mW:{name:{singular:"Milliwatt",plural:"Milliwatts"},to_anchor:.001},kW:{name:{singular:"Kilowatt",plural:"Kilowatts"},to_anchor:1e3},MW:{name:{singular:"Megawatt",plural:"Megawatts"},to_anchor:1e6},GW:{name:{singular:"Gigawatt",plural:"Gigawatts"},to_anchor:1e9}};var Nke={metric:rre,_anchors:{metric:{unit:"W",ratio:1}}},are;are={VAR:{name:{singular:"Volt-Ampere Reactive",plural:"Volt-Amperes Reactive"},to_anchor:1},mVAR:{name:{singular:"Millivolt-Ampere Reactive",plural:"Millivolt-Amperes Reactive"},to_anchor:.001},kVAR:{name:{singular:"Kilovolt-Ampere Reactive",plural:"Kilovolt-Amperes Reactive"},to_anchor:1e3},MVAR:{name:{singular:"Megavolt-Ampere Reactive",plural:"Megavolt-Amperes Reactive"},to_anchor:1e6},GVAR:{name:{singular:"Gigavolt-Ampere Reactive",plural:"Gigavolt-Amperes Reactive"},to_anchor:1e9}};var Dke={metric:are,_anchors:{metric:{unit:"VAR",ratio:1}}},sre;sre={VA:{name:{singular:"Volt-Ampere",plural:"Volt-Amperes"},to_anchor:1},mVA:{name:{singular:"Millivolt-Ampere",plural:"Millivolt-Amperes"},to_anchor:.001},kVA:{name:{singular:"Kilovolt-Ampere",plural:"Kilovolt-Amperes"},to_anchor:1e3},MVA:{name:{singular:"Megavolt-Ampere",plural:"Megavolt-Amperes"},to_anchor:1e6},GVA:{name:{singular:"Gigavolt-Ampere",plural:"Gigavolt-Amperes"},to_anchor:1e9}};var Oke={metric:sre,_anchors:{metric:{unit:"VA",ratio:1}}},ore;ore={Wh:{name:{singular:"Watt-hour",plural:"Watt-hours"},to_anchor:3600},mWh:{name:{singular:"Milliwatt-hour",plural:"Milliwatt-hours"},to_anchor:3.6},kWh:{name:{singular:"Kilowatt-hour",plural:"Kilowatt-hours"},to_anchor:36e5},MWh:{name:{singular:"Megawatt-hour",plural:"Megawatt-hours"},to_anchor:36e8},GWh:{name:{singular:"Gigawatt-hour",plural:"Gigawatt-hours"},to_anchor:36e11},J:{name:{singular:"Joule",plural:"Joules"},to_anchor:1},kJ:{name:{singular:"Kilojoule",plural:"Kilojoules"},to_anchor:1e3}};var Pke={metric:ore,_anchors:{metric:{unit:"J",ratio:1}}},lre;lre={VARh:{name:{singular:"Volt-Ampere Reactive Hour",plural:"Volt-Amperes Reactive Hour"},to_anchor:1},mVARh:{name:{singular:"Millivolt-Ampere Reactive Hour",plural:"Millivolt-Amperes Reactive Hour"},to_anchor:.001},kVARh:{name:{singular:"Kilovolt-Ampere Reactive Hour",plural:"Kilovolt-Amperes Reactive Hour"},to_anchor:1e3},MVARh:{name:{singular:"Megavolt-Ampere Reactive Hour",plural:"Megavolt-Amperes Reactive Hour"},to_anchor:1e6},GVARh:{name:{singular:"Gigavolt-Ampere Reactive Hour",plural:"Gigavolt-Amperes Reactive Hour"},to_anchor:1e9}};var Lke={metric:lre,_anchors:{metric:{unit:"VARh",ratio:1}}},cre,ure;cre={"mm3/s":{name:{singular:"Cubic Millimeter per second",plural:"Cubic Millimeters per second"},to_anchor:1/1e6},"cm3/s":{name:{singular:"Cubic Centimeter per second",plural:"Cubic Centimeters per second"},to_anchor:1/1e3},"ml/s":{name:{singular:"Millilitre per second",plural:"Millilitres per second"},to_anchor:1/1e3},"cl/s":{name:{singular:"Centilitre per second",plural:"Centilitres per second"},to_anchor:1/100},"dl/s":{name:{singular:"Decilitre per second",plural:"Decilitres per second"},to_anchor:1/10},"l/s":{name:{singular:"Litre per second",plural:"Litres per second"},to_anchor:1},"l/min":{name:{singular:"Litre per minute",plural:"Litres per minute"},to_anchor:1/60},"l/h":{name:{singular:"Litre per hour",plural:"Litres per hour"},to_anchor:1/3600},"kl/s":{name:{singular:"Kilolitre per second",plural:"Kilolitres per second"},to_anchor:1e3},"kl/min":{name:{singular:"Kilolitre per minute",plural:"Kilolitres per minute"},to_anchor:50/3},"kl/h":{name:{singular:"Kilolitre per hour",plural:"Kilolitres per hour"},to_anchor:5/18},"m3/s":{name:{singular:"Cubic meter per second",plural:"Cubic meters per second"},to_anchor:1e3},"m3/min":{name:{singular:"Cubic meter per minute",plural:"Cubic meters per minute"},to_anchor:50/3},"m3/h":{name:{singular:"Cubic meter per hour",plural:"Cubic meters per hour"},to_anchor:5/18},"km3/s":{name:{singular:"Cubic kilometer per second",plural:"Cubic kilometers per second"},to_anchor:1e12}};ure={"tsp/s":{name:{singular:"Teaspoon per second",plural:"Teaspoons per second"},to_anchor:1/6},"Tbs/s":{name:{singular:"Tablespoon per second",plural:"Tablespoons per second"},to_anchor:1/2},"in3/s":{name:{singular:"Cubic inch per second",plural:"Cubic inches per second"},to_anchor:.55411},"in3/min":{name:{singular:"Cubic inch per minute",plural:"Cubic inches per minute"},to_anchor:.55411/60},"in3/h":{name:{singular:"Cubic inch per hour",plural:"Cubic inches per hour"},to_anchor:.55411/3600},"fl-oz/s":{name:{singular:"Fluid Ounce per second",plural:"Fluid Ounces per second"},to_anchor:1},"fl-oz/min":{name:{singular:"Fluid Ounce per minute",plural:"Fluid Ounces per minute"},to_anchor:1/60},"fl-oz/h":{name:{singular:"Fluid Ounce per hour",plural:"Fluid Ounces per hour"},to_anchor:1/3600},"cup/s":{name:{singular:"Cup per second",plural:"Cups per second"},to_anchor:8},"pnt/s":{name:{singular:"Pint per second",plural:"Pints per second"},to_anchor:16},"pnt/min":{name:{singular:"Pint per minute",plural:"Pints per minute"},to_anchor:4/15},"pnt/h":{name:{singular:"Pint per hour",plural:"Pints per hour"},to_anchor:1/225},"qt/s":{name:{singular:"Quart per second",plural:"Quarts per second"},to_anchor:32},"gal/s":{name:{singular:"Gallon per second",plural:"Gallons per second"},to_anchor:128},"gal/min":{name:{singular:"Gallon per minute",plural:"Gallons per minute"},to_anchor:32/15},"gal/h":{name:{singular:"Gallon per hour",plural:"Gallons per hour"},to_anchor:8/225},"ft3/s":{name:{singular:"Cubic foot per second",plural:"Cubic feet per second"},to_anchor:957.506},"ft3/min":{name:{singular:"Cubic foot per minute",plural:"Cubic feet per minute"},to_anchor:957.506/60},"ft3/h":{name:{singular:"Cubic foot per hour",plural:"Cubic feet per hour"},to_anchor:957.506/3600},"yd3/s":{name:{singular:"Cubic yard per second",plural:"Cubic yards per second"},to_anchor:25852.7},"yd3/min":{name:{singular:"Cubic yard per minute",plural:"Cubic yards per minute"},to_anchor:25852.7/60},"yd3/h":{name:{singular:"Cubic yard per hour",plural:"Cubic yards per hour"},to_anchor:25852.7/3600}};var Uke={metric:cre,imperial:ure,_anchors:{metric:{unit:"l/s",ratio:33.8140227},imperial:{unit:"fl-oz/s",ratio:1/33.8140227}}},hre,fre;hre={lx:{name:{singular:"Lux",plural:"Lux"},to_anchor:1}};fre={"ft-cd":{name:{singular:"Foot-candle",plural:"Foot-candles"},to_anchor:1}};var Bke={metric:hre,imperial:fre,_anchors:{metric:{unit:"lx",ratio:1/10.76391},imperial:{unit:"ft-cd",ratio:10.76391}}},dre;dre={mHz:{name:{singular:"millihertz",plural:"millihertz"},to_anchor:1/1e3},Hz:{name:{singular:"hertz",plural:"hertz"},to_anchor:1},kHz:{name:{singular:"kilohertz",plural:"kilohertz"},to_anchor:1e3},MHz:{name:{singular:"megahertz",plural:"megahertz"},to_anchor:1e3*1e3},GHz:{name:{singular:"gigahertz",plural:"gigahertz"},to_anchor:1e3*1e3*1e3},THz:{name:{singular:"terahertz",plural:"terahertz"},to_anchor:1e3*1e3*1e3*1e3},rpm:{name:{singular:"rotation per minute",plural:"rotations per minute"},to_anchor:1/60},"deg/s":{name:{singular:"degree per second",plural:"degrees per second"},to_anchor:1/360},"rad/s":{name:{singular:"radian per second",plural:"radians per second"},to_anchor:1/(Math.PI*2)}};var kke={metric:dre,_anchors:{frequency:{unit:"hz",ratio:1}}},pre;pre={rad:{name:{singular:"radian",plural:"radians"},to_anchor:180/Math.PI},deg:{name:{singular:"degree",plural:"degrees"},to_anchor:1},grad:{name:{singular:"gradian",plural:"gradians"},to_anchor:9/10},arcmin:{name:{singular:"arcminute",plural:"arcminutes"},to_anchor:1/60},arcsec:{name:{singular:"arcsecond",plural:"arcseconds"},to_anchor:1/3600}};var Fke={metric:pre,_anchors:{metric:{unit:"deg",ratio:1}}},mre,DR=Cie,eh=gke,Gm={length:vke,area:yke,mass:Ake,volume:bke,each:_ke,temperature:Eke,time:Ske,digital:xke,partsPer:Tke,speed:wke,pace:Cke,pressure:Mke,current:Rke,voltage:Ike,power:Nke,reactivePower:Dke,apparentPower:Oke,energy:Pke,reactiveEnergy:Lke,volumeFlowRate:Uke,illuminance:Bke,frequency:kke,angle:Fke},th;th=function(r,e){e?this.val=r/e:this.val=r};th.prototype.from=function(r){if(this.destination)throw new Error(".from must be called before .to");return this.origin=this.getUnit(r),this.origin||this.throwUnsupportedUnitError(r),this};th.prototype.to=function(r){if(!this.origin)throw new Error(".to must be called after .from");this.destination=this.getUnit(r);var e,t;if(this.destination||this.throwUnsupportedUnitError(r),this.origin.abbr===this.destination.abbr)return this.val;if(this.destination.measure!=this.origin.measure)throw new Error("Cannot convert incompatible measures of "+this.destination.measure+" and "+this.origin.measure);return e=this.val*this.origin.unit.to_anchor,this.origin.unit.anchor_shift&&(e-=this.origin.unit.anchor_shift),this.origin.system!=this.destination.system&&(t=Gm[this.origin.measure]._anchors[this.origin.system].transform,typeof t=="function"?e=t(e):e*=Gm[this.origin.measure]._anchors[this.origin.system].ratio),this.destination.unit.anchor_shift&&(e+=this.destination.unit.anchor_shift),e/this.destination.unit.to_anchor};th.prototype.toBest=function(e){if(!this.origin)throw new Error(".toBest must be called after .from");var e=Object.assign({exclude:[],cutOffNumber:1},e),t;return eh(this.possibilities(),function(n){var i=this.describe(n),a=e.exclude.indexOf(n)===-1;if(a&&i.system===this.origin.system){var s=this.to(n);(!t||s>=e.cutOffNumber&&s<t.val)&&(t={val:s,unit:n,singular:i.singular,plural:i.plural})}}.bind(this)),t};th.prototype.getUnit=function(r){var e;return eh(Gm,function(t,n){if(eh(t,function(i,a){if(a=="_anchors"||(eh(i,function(s,o){if(o==r)return e={abbr:r,measure:n,system:a,unit:s},!1}),e))return!1}),e)return!1}),e};var gre=function(r){return{abbr:r.abbr,measure:r.measure,system:r.system,singular:r.unit.name.singular,plural:r.unit.name.plural}};th.prototype.describe=function(r){var e=th.prototype.getUnit(r),t=null;try{t=gre(e)}catch{this.throwUnsupportedUnitError(r)}return t};th.prototype.list=function(r){var e=[];return eh(Gm,function(t,n){r&&r!==n||eh(t,function(i,a){if(a=="_anchors")return!1;eh(i,function(s,o){e=e.concat(gre({abbr:o,measure:n,system:a,unit:s}))})})}),e};th.prototype.throwUnsupportedUnitError=function(r){var e=[];throw eh(Gm,function(t,n){eh(t,function(i,a){if(a=="_anchors")return!1;e=e.concat(DR(i))})}),new Error("Unsupported unit "+r+", use one of: "+e.join(", "))};th.prototype.possibilities=function(r){var e=[];return!this.origin&&!r?eh(DR(Gm),function(t){eh(Gm[t],function(n,i){if(i=="_anchors")return!1;e=e.concat(DR(n))})}):(r=r||this.origin.measure,eh(Gm[r],function(t,n){if(n=="_anchors")return!1;e=e.concat(DR(t))})),e};th.prototype.measures=function(){return DR(Gm)};mre=function(r){return new th(r)};var mz=mre;const Gke=()=>{const r=Wt(y=>y.itemsSpawned),e=Je(y=>y.showDimensions),t=Je(y=>y.sceneSettings),n=Je(y=>y.boundData),i=Je(y=>y.sceneSettings.sceneScaleUnit),a=Je(y=>y.sceneSettings.sceneScaleDisplayUnit),[s,o]=oe.useState(.2),[l,u]=oe.useState("#000000"),[f,h]=oe.useState(.01),p=oe.useRef(null);oe.useRef(null);const m=oe.useRef(0);return oe.useEffect(()=>{if(t==null)return;const y=t.dimensionColor,E=O$(y.r,y.g,y.b);u(E)},[t]),oe.useEffect(()=>{if(t==null)return;const y=t.dimensionColor,E=O$(y.r,y.g,y.b);u(E)},[t]),oe.useEffect(()=>{if(!n||!n.size)return;let y=n.size.x;y>n.size.z&&(y=n.size.z);let E=y/20;h(E<.005?E:.005),o(y<.2?y:.2)},[n]),oe.useEffect(()=>{m.current=0},[e]),Km(()=>{p.current!==null&&m.current<1&&(m.current+=.05,p.current.scale.x=m.current,p.current.scale.y=m.current,p.current.scale.z=m.current)}),e===!0&&ne("group",{ref:p,children:n!==null&&n.size.x!==0&&n.size.y!==0&&n.size.z!==0&&Object.keys(r).length>0&&ne(hi,{children:[ne(bm,{position:[n.center.x,n.center.y-n.size.y/2,n.center.z+n.size.z/2+s],rotation:[0,0,QL(90)],scale:[f,n.size.x,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:105,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:100,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:112,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:107,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:116,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.x).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:119,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:89,columnNumber:15},globalThis),ne(bm,{position:[n.center.x-n.size.x/2-s,n.center.y,n.center.z+n.size.z/2+s],rotation:[0,0,0],scale:[f,n.size.y,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:150,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:145,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[1,f,7],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:157,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:152,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:161,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.y).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:164,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:134,columnNumber:15},globalThis),ne(bm,{position:[n.center.x+n.size.x/2+s,n.center.y-n.size.y/2,n.center.z],rotation:[QL(90),0,0],scale:[f,n.size.z,f],visible:!0,children:[ne(bm,{position:[0,.5,0],scale:[7,f,1],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:195,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:190,columnNumber:17},globalThis),ne(bm,{position:[0,-.5,0],scale:[7,f,1],visible:!0,children:ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:202,columnNumber:19},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:197,columnNumber:17},globalThis),ne("meshBasicMaterial",{color:l},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:206,columnNumber:17},globalThis),ne(IR,{center:!0,className:"dimensionsText ignore",style:{opacity:"1"},zIndexRange:[29,0],children:[mz(n.size.z).from("m").to(i).toFixed(t.measurementPrecision),a??i]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:209,columnNumber:17},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:179,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:87,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/DimensionsManager.js",lineNumber:81,columnNumber:7},globalThis)},zke=({...r})=>ne(hi,{children:[ne(a3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:11,columnNumber:7},globalThis),ne(Gke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:12,columnNumber:7},globalThis),ne(n3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:13,columnNumber:7},globalThis),ne(i3e,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:14,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/BaseScene.js",lineNumber:10,columnNumber:5},globalThis),Hke=()=>{const r=oe.useRef(null),e=Wt(E=>E.itemsSpawned),t=ui(E=>E.isAnyHotspotActive),n=wr(E=>E.canCameraRotate),i=wr(E=>E.cameraSettings),a=wr(E=>E.disableAutoRotate),s=Je(E=>E.autoFocusTrigger),o=Je(E=>E.dragging),l=wr(E=>E.sendCameraDetailsTrigger),u=wr(E=>E.focusPointPosition),f=wr(E=>E.viewPointPosition),h=oe.useRef(!1),{camera:p}=fs(),m=mr(E=>E.ghostsTransform),y=()=>{if(r.current===null)return;const E=wr.getState().boundsMargin,b=Je.getState().autoFocusRef,v=Je.getState().sceneRef.getObjectByName("#ITEMSANDGHOSTS"),x=b||v,S=new fl().setFromObject(x);b||Je.setState({bbox:S});const _=new ve;if(S.getSize(_),_.x>0){const w=new ve;S.getCenter(w);const R=new ve(S.max.x,S.max.y,S.max.z);R.sub(S.min),Je.setState({boundData:{center:w,size:R}}),r.current.setBoundary(S);const N=new fl(S.min,S.max);N.min=new ve(N.min.x-E/2,N.min.y-E/2,N.min.z-E/2),N.max=new ve(N.max.x+E/2,N.max.y+E/2,N.max.z+E/2);const L=N.getBoundingSphere(new du(w));L.radius>0&&r.current.fitToSphere(L,!0)}else{const w=new ve(0,0,0),R=new ve(0,0,0);Je.setState({boundData:{center:w,size:R}})}};return oe.useEffect(()=>{y()},[s,Object.keys(e).length]),oe.useEffect(()=>{nt!=null&&(Je.getState().sceneSettings.focusCameraOnGhosts===!0?nt.focusOnGhosts():nt.refocus())},[m]),oe.useEffect(()=>{if(t==!1){h.current==!0&&(r.current.reset(!0),h.current=!1);return}h.current==!1&&(r.current.saveState(),h.current=!0),r.current.setLookAt(f.x,f.y,f.z,u.x,u.y,u.z,!0)},[t,f,u]),oe.useEffect(()=>{nt.fireEvent(nt.EVENTS.CONFIGURATION.CameraDetails_Update,p)},[l]),Km(E=>{i.canAutoRotate===!1||r.current===null||a===!1&&t===!1&&(r.current.azimuthAngle+=20*E*MI.DEG2RAD*i.autoRotateSpeed)}),oe.useEffect(()=>{r.current!==null&&(n===!0?(r.current.mouseButtons.left=Js.ROTATE,r.current.touches.one=Js.TOUCH_ROTATE):(r.current.mouseButtons.left=Js.NONE,r.current.touches.one=Js.NONE),i.canZoom===!0&&o===!1?(r.current.mouseButtons.wheel=Js.ZOOM,r.current.mouseButtons.middle=Js.ZOOM):(r.current.mouseButtons.wheel=Js.NONE,r.current.mouseButtons.middle=Js.NONE),i.canPan===!0&&o===!1?(r.current.mouseButtons.right=Js.OFFSET,i.canZoom===!0&&o===!1?(r.current.touches.two=Js.TOUCH_ZOOM_OFFSET,r.current.touches.three=Js.TOUCH_ZOOM_OFFSET):(r.current.touches.two=Js.TOUCH_OFFSET,r.current.touches.three=Js.TOUCH_OFFSET)):(r.current.mouseButtons.right=Js.NONE,i.canZoom===!0&&o===!1?(r.current.touches.two=Js.TOUCH_ZOOM,r.current.touches.three=Js.TOUCH_ZOOM):(r.current.touches.two=Js.NONE,r.current.touches.three=Js.NONE)))},[r,i,o,n]),oe.useEffect(()=>{if(r.current===null)return;p.fov=i.fov,p.updateProjectionMatrix();const E=()=>{r.current.removeEventListener("rest",E),wr.setState({userDragging:!1,disableAutoRotate:!1})};r.current.addEventListener("controlstart",()=>{r.current.removeEventListener("rest",E),wr.setState({userDragging:!0,disableAutoRotate:!0})}),r.current.addEventListener("controlend",()=>{r.current.active?r.current.addEventListener("rest",E):E()}),r.current.addEventListener("transitionstart",()=>{wr.getState().userDragging!==!0&&(wr.setState({disableAutoRotate:!0}),r.current.addEventListener("rest",E))})},[r]),ne(hi,{children:ne(HLe,{ref:r,makeDefault:!0,dollySpeed:i.dollySpeed,truckSpeed:i.truckSpeed,minZoom:i.minZoom,maxZoom:i.maxZoom,minPolarAngle:t?-Math.PI:QL(i.minPolarAngle),maxPolarAngle:t?Math.PI:QL(i.maxPolarAngle)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/CameraManager.js",lineNumber:219,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/CameraManager.js",lineNumber:218,columnNumber:5},globalThis)},Vke=()=>{const r=fs(e=>e.gl);return oe.useEffect(()=>{Je.setState({glContext:r})},[]),ne(hi,{children:[ne(zke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:16,columnNumber:7},globalThis),ne(Hke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:17,columnNumber:7},globalThis),ne(UUe,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:18,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/Root.js",lineNumber:15,columnNumber:5},globalThis)},jke=({handleCloseAlert:r,alertData:e})=>{const t=oe.useRef(null),n=oe.useRef(null),i=oe.useRef(null),a=()=>{clearTimeout(t.current),i.current.style="",n.current.style="",r()};return oe.useEffect(()=>{if(i.current===null||n.current===null)return;const s=e.alertTime?e.alertTime:1e3;i.current.style="animation: loader "+s+"ms; animation-timing-function: linear;",n.current.style="animation: loader "+s+"ms; animation-timing-function: linear;",t.current=setTimeout(a,s)},[i,n,e]),ne(hi,{children:[ne("div",{className:"alert-bg ".concat(kl[e.alertType].cssClass),children:[ne("div",{className:"alert-icon-bg ".concat(kl[e.alertType].cssClass),children:ne("img",{src:kl[e.alertType].src,className:"alert-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:50,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:45,columnNumber:9},globalThis),ne("div",{className:"alert-msg-cross-timer-bg",children:[ne("div",{className:"alert-msg-cross-bg",children:[ne("div",{className:"alert-msg-bg",style:e.alertLabel?{}:{display:"flex",alignItems:"center"},children:[e.alertLabel&&ne("p",{className:"alert-label",children:e.alertLabel},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:66,columnNumber:17},globalThis),ne("span",{className:"alert-msg",children:e.alertMsg},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:68,columnNumber:15},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:57,columnNumber:13},globalThis),ne("div",{className:"alert-close-btn-bg",children:ne("img",{onClick:a,className:"alert-cross-btn",src:Om+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:71,columnNumber:15},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:70,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:56,columnNumber:11},globalThis),ne("div",{ref:n,className:"alert-timer ".concat(kl[e.alertType].cssClass)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:78,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:55,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:40,columnNumber:7},globalThis),ne("div",{className:"alert-bg alert-mobile ".concat(kl[e.alertType].cssClass),children:[ne("div",{className:"alert-icon-msg-cross-bg",children:[ne("div",{className:"alert-icon-bg ".concat(kl[e.alertType].cssClass),children:ne("img",{src:kl[e.alertType].src,className:"alert-icon"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:99,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:94,columnNumber:11},globalThis),ne("div",{className:"alert-msg-bg",children:[e.alertLabel&&ne("p",{className:"alert-label",children:e.alertLabel},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:106,columnNumber:15},globalThis),ne("span",{className:"alert-msg",children:e.alertMsg_Mobile?e.alertMsg_Mobile:e.alertMsg},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:108,columnNumber:13},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:104,columnNumber:11},globalThis),ne("div",{className:"alert-close-btn-bg",children:ne("img",{onClick:a,className:"alert-cross-btn",src:Om+"/Icon/X.svg"},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:115,columnNumber:13},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:114,columnNumber:11},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:93,columnNumber:9},globalThis),ne("div",{ref:i,className:"alert-timer ".concat(kl[e.alertType].cssClass)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:122,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:88,columnNumber:7},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/components/Alert.js",lineNumber:38,columnNumber:5},globalThis)},Qke=()=>{const[r,e]=oe.useState(null),t=Je(o=>o.alertData),n=Je(o=>o.persistantAlertData);oe.useEffect(()=>{!t||!t.alertMsg||i(t)},[t]),oe.useEffect(()=>{const o=Je.getState().alertQueue;o.length<=0||(r===null&&(e(o[0]),o[0].persistant===!0&&Je.setState({persistantAlertData:o[0]})),Je.getState().actions.popFromAlertQueue())},[r]);const i=oe.useCallback(o=>{if(Je.getState().sceneSettings.disableAlerts===!0)return;let l=o.alertType,u=!1;if(Object.keys(kl).map(h=>{h==l.toLowerCase()&&(u=!0)}),u==!1&&(l=kl.info.id,o.alertType=l),kl[o.alertType].level<Je.getState().sceneSettings.alertLevel||Je.getState().sceneSettings.alertControl[o.alertId]!==!0)return;const f=Je.getState().actions.addToAlertQueue(o);r===null&&f.length===1&&(e(o),o.persistant===!0&&Je.setState({persistantAlertData:o}))},[r]),a=oe.useCallback(()=>{e(n)},[n]),s=oe.useCallback(async()=>{e(null)},[]);return oe.useEffect(()=>{async function o(){await vc(1500);let l=null,u={alertMsg:"Add items by selecting from the panel",alertMsg_Mobile:"Add items by selecting from the panel",alertTime:8e3,alertType:"info",alertLabel:"Get Started"};Je.getState().alertSettings&&(Je.getState().alertSettings.welcomeMessage&&(l=Je.getState().alertSettings.welcomeMessage),Je.getState().alertSettings.instructionMessage&&(u=Je.getState().alertSettings.instructionMessage)),l!==null&&i(l),i(u)}o()},[]),ne("div",{className:"alert-space",children:[r===null&&n&&ne("div",{onClick:a,className:"alert-persistant-btn-bg",style:{background:kl[n.alertType].background,border:"1px solid "+kl[n.alertType].color},children:ne("img",{style:{filter:kl[n.alertType].filter},className:"alert-persistant-btn",src:kl[n.alertType].src},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:144,columnNumber:11},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:135,columnNumber:9},globalThis),r&&ne(jke,{handleCloseAlert:s,alertData:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:154,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/AlertManager.js",lineNumber:133,columnNumber:5},globalThis)},Wke=()=>{const r=Je(n=>n.canvasTooltipText),e=Je(n=>n.sceneSettings),t=mr(n=>n.ghostData);return ne(hi,{children:ne("div",{children:[ne(Qke,{},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:16,columnNumber:9},globalThis),nt.getSceneItemCount()<=0&&!t&&ne("div",{className:"emptySceneBG",children:e.emptySceneText},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:19,columnNumber:11},globalThis),ne("div",{className:"canvasTooltip",children:r},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:22,columnNumber:9},globalThis)]},void 0,!0,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:15,columnNumber:7},globalThis)},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/scripts/managers/OverlayUIManager.js",lineNumber:14,columnNumber:5},globalThis)};function Yke(r){let e={};if(r.type.toLowerCase()==="object3d"){const t=r.userData;if(t?.isPlug===1){const n=t.name;n&&typeof n=="string"&&(e.name=n);const i=t.type;i&&typeof i=="string"?e.type=i:e.type="";const a=t.weight;a&&typeof a=="number"?e.weight=a:e.weight=1;const s=t.affectedNodes;s&&typeof s=="string"?e.affectedNodes=s.replaceAll(" ","").split(","):e.affectedNodes=[];const o=t.acceptedPlugTypes;o&&typeof o=="string"?e.acceptedPlugTypes=o.replaceAll(" ","").split(","):e.acceptedPlugTypes=[];const l=t.connectsToPlugTypes;l&&typeof l=="string"?e.connectsToPlugTypes=l.replaceAll(" ","").split(","):e.connectsToPlugTypes=[];const u=t.dependencySku;u&&typeof u=="string"?e.dependencySku=u:e.dependencySku="";const f=t.isDependencySkuInteractive;u!==void 0&&typeof f=="number"?e.isDependencySkuInteractive=f:e.isDependencySkuInteractive=1}}return e}async function qke(r){const e=Mo.getState().actions;for(let t=0;t<Object.keys(r).length;t++){const n=Object.keys(r)[t];zt.info({title:"loading proxy: "+n});const i=performance.now(),a=await e.loadAsset(n,!0),s=performance.now();if(zt.info({title:`${n} proxy: ${((s-i)/1e3).toFixed(2)} seconds to load.`}),zt.info({title:"loaded proxy: "+n}),zt.info({title:"waitingForAsset",details:a}),!a||!a.proxy.data)continue;const o=r[n]?.plugs,l=o===void 0||Array.isArray(o)&&o.length===0;l===!0&&zt.info({title:`Collecting plugs information for ${n} from the proxy mesh`});let u=[];a.proxy.data.scene.traverse(p=>{if(l===!0){const m=Yke(p);Object.keys(m).length>0&&u.push(m)}if(p.isMesh){p.material.color=new Yt(0/255,0/255,0/255);const m=Je.getState().sceneSettings.ghostColor;p.material.emissive=new Yt(m.r/255,m.g/255,m.b/255),p.material.emissiveIntensity=.75,p.material.alphaTest=m.a,p.material.transparent=!0,p.material.opacity=m.a,p.material.depthTest=!1,p.material.reflectivity=0,p.material.metalness=0,p.material.wireframe=Je.getState().sceneSettings.ghostAsWireframe}}),u.length>0&&(r[n].plugs=u);const{boundingBox:f,boundingSphere:h}=$ke(a);if(f&&h){const p=Xke(f);r[n].boundingBox=f,r[n].boundingSphereCenter=h.center,r[n].boundingBoxSize=p}else r[n].boundingSphereCenter={x:0,y:0,z:0},r[n].boundingBoxSize={x:0,y:0,z:0}}}function Xke(r){return{x:r.max.x-r.min.x,y:r.max.y-r.min.y,z:r.max.z-r.min.z}}function $ke(r){const e=r.proxy.data.scene;if(e){let t=null;return e.traverse(n=>{if(n.isMesh){t=n;return}}),t?(t.geometry.boundingBox||t.geometry.computeBoundingBox(),{boundingBox:t.geometry.boundingBox,boundingSphere:t.geometry.boundingSphere}):!1}}const Kke=`.alert-space{position:absolute;width:auto;height:auto;max-width:40%;top:0;margin:1rem}.alert-bg{display:flex;flex-direction:row;border-radius:5.04px}.alert-mobile{display:none}.alert-persistant-btn{width:2rem;height:2rem;margin:4px;filter:invert(100%) brightness(200%)}.alert-persistant-btn-bg{cursor:pointer;display:flex;justify-content:center;align-items:center;border-radius:4px}.alert-persistant-btn-bg:hover{opacity:.9!important}.alert-icon{width:2rem;height:2rem;margin:14px;filter:invert(100%) brightness(200%)}.alert-icon-bg{border-radius:5.04px 0 0 5.04px}.alert-msg-bg{padding:1rem}.alert-label{font-weight:600;font-size:1.125rem;margin:0 0 4px;text-transform:capitalize}.alert-msg{font-size:1rem}.alert-cross-btn{width:1.5rem;cursor:pointer;margin:.5rem}.alert-msg-cross-timer-bg{display:flex;flex-direction:column;justify-content:space-between}.alert-msg-cross-bg{display:flex;flex-direction:row}.alert-timer{width:0%;height:2px;transition:10ms}.alert-bg.alert-info,.alert-bg.alert-mobile.alert-info{background-color:var(--info-light);border:1.26px solid var(--info-dark)}.alert-icon-bg.alert-info{background-color:var(--info-dark);border:1.26px solid var(--info-dark)}.alert-timer.alert-info{background-color:var(--info-dark)}.alert-bg.alert-warn,.alert-bg.alert-mobile.alert-warn{background-color:var(--warn-light);border:1.26px solid var(--warn-dark)}.alert-icon-bg.alert-warn{background-color:var(--warn-dark);border:1.26px solid var(--warn-dark)}.alert-timer.alert-warn{background-color:var(--warn-dark)}.alert-bg.alert-error,.alert-bg.alert-mobile.alert-error{background-color:var(--error-light);border:1.26px solid var(--error-dark)}.alert-icon-bg.alert-error{background-color:var(--error-dark);border:1.26px solid var(--error-dark)}.alert-timer.alert-error{background-color:var(--error-dark)}.alert-bg.alert-success,.alert-bg.alert-mobile.alert-success{background-color:var(--success-light);border:1.26px solid var(--success-dark)}.alert-icon-bg.alert-success{background-color:var(--success-dark);border:1.26px solid var(--success-dark)}.alert-timer.alert-success{background-color:var(--success-dark)}@keyframes loader{0%{width:0%}to{width:100%}}@media only screen and (orientation: portrait){.alert-label{margin:auto}.alert-close-btn-bg{display:flex;justify-content:center}.alert-icon-msg-cross-bg{display:flex;flex-direction:row;width:100%;align-items:center}.alert-space{width:100%;max-width:100%;margin:auto}.alert-bg{display:none;flex-direction:column}.alert-mobile{display:flex;justify-content:center;align-items:flex-start}.alert-icon{margin:4px}.alert-icon-bg{display:flex;justify-content:center;align-items:center;border-radius:5.04px;margin:8px 16px;height:fit-content}.alert-msg-bg{padding:1rem 0rem;width:calc(100% - 70px)}.alert-persistant-btn{margin:4px!important}.alert-persistant-btn-bg{display:flex;justify-content:center;width:calc(8px + 2rem)!important;align-items:center;border-radius:5.04px;margin:8px 16px}}
|
|
9197
|
+
`,Zke=`@import"https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap";*{box-sizing:border-box}html,#root,epigraph-configurator-core{width:100%;height:100%;margin:0;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.loading{color:red}.shadowRoot{position:relative;width:100%;height:100%}.shellCanvasContainerParent{display:flex;height:100%;align-items:center;position:absolute;z-index:30;top:0;left:0}.grabCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Move.svg) 6 3,auto}.grabbingCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Grab.svg) 6 3,auto}.pointerCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Click.svg) 6 2,auto}.blockedCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-Block.svg),auto}.moveCursor{cursor:url(https://storage.googleapis.com/gsc-epigraph-design/product-assets/Icon/Cursor-MoveArrows.svg) 8.65 8.65,auto}.mainCanvas{width:100%!important;height:100%!important;background:white}.annotation{cursor:pointer;outline:none;border:none;font-size:8px;font-weight:300;background:black;color:#f0f0f0;padding:2px 10px;border-radius:20px;letter-spacing:1px;display:flex;justify-content:center;align-items:center;gap:5px}.annotation:hover{opacity:.8}.content{transform:translate3d(50%,0,0);text-align:left;background:#202035;color:#fff;padding:10px 15px;border-radius:5px}.ItemsParent{position:absolute;right:0;bottom:0;background-color:#e0e0e0ee;margin:5px;border-radius:15%}.Item{width:75px;height:75px;padding:15px;cursor:grab;user-drag:none;-webkit-user-drag:none;user-select:none;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.Item:hover{transform:scale(1.1)}.cursorImg{position:absolute;top:0;left:0;opacity:0;width:0px;height:0px;pointer-events:none}.heading{font-size:2rem;padding:1rem;font-weight:700}.description{font-size:1rem;padding:0rem 1rem}.overlayUI{width:100%;height:100%;padding:1%;position:absolute;display:flex;align-items:center;justify-content:space-evenly;align-content:center;flex-direction:row}.shellCanvas{width:100%;height:85%;position:relative;border-radius:12px 12px 0 0}.shellSideMenu{width:30%;height:100%}.ignore{pointer-events:none}.interactable{pointer-events:all}.uninteractable{pointer-events:none;opacity:.8}.arButton{position:absolute;bottom:3vh;left:2vh}.sideMenu{width:30%;height:100%;background:#f5f5f5;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center}.sideMenuTabs{width:100%;height:10vh;display:flex;justify-content:space-between;padding:1vh 0%;gap:12px}.sideMenuTabs .button{display:flex;align-items:center;justify-content:center;flex-direction:column;font-weight:600;color:#333;min-width:33.33%;opacity:1;text-transform:uppercase;padding-bottom:16px;font-size:.8rem}.sideMenuTabs .button .icon{width:22px;margin-bottom:.5rem}.sideMenuContent{height:75%;width:100%;padding:1vh;background:#f5f5f5;overflow-y:auto}.leftShell{width:65%;height:100%;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;align-content:center}.bottomBar{background-color:#333;height:72px;width:100%;display:flex;padding:1vh;justify-content:flex-end;align-items:center}.bottomBar.right{justify-content:space-between;padding:0 24px;border-radius:12px 12px 0 0}.bottomBar .cartButton{position:relative}.bottomBar .reviewButton{color:#fff;margin-right:12px;font-size:18px}.bottomBar .cartButton .cartNumber{position:absolute;right:-8px;bottom:-4px;padding:4px;background:#e52438;color:#fff;font-size:12px;border-radius:50%}.button{cursor:pointer;font-weight:700}.rightTopBarButton{margin:1vh}.leftBottomBarButton{color:#fff;margin:1vh;width:80px;padding:12px;font-size:14px;border:2px solid #ccc!important;text-align:center;border-radius:4px}.activeSideMenuTab{border-bottom:1px solid #333333}*{scrollbar-width:8px;scrollbar-color:blue transparent}*::-webkit-scrollbar{width:8px}*::-webkit-scrollbar-track{background:black}*::-webkit-scrollbar-thumb{background-color:#e52438;border-radius:0;border:none}.dimensionsButtonParent{position:relative;display:flex}.dimensionText{font-size:.8rem;font-style:normal;font-weight:600}.dimensionActive{border-color:#c7c7c7!important}.color-grid{display:flex;gap:1rem}.colorSelector{cursor:pointer;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:.25rem;transition:.1s ease all}.colorSelector .colorThumbnailContainer{position:relative;transition:.1s ease all}.colorSelector .colorThumbnailContainer .colorThumbnail{width:2.625rem;height:2.625rem;border-radius:50%}.colorSelector .colorThumbnailContainer .checkMark{width:100%;height:100%;display:flex;justify-content:center;align-items:center;position:absolute;left:0;top:0}.colorSelector .colorThumbnailContainer .checkMark img{opacity:0;transition:.1s all ease;width:45%;filter:invert(100%) sepia(100%) saturate(2%) hue-rotate(188deg) brightness(101%)}.colorSelector.selected .colorThumbnailContainer .checkMark img{opacity:1}.colorSelector .colorDetails{text-align:center;opacity:0;pointer-events:none}.colorSelector:hover .colorDetails,.colorSelector.selected .colorDetails{opacity:1;pointer-events:all}.colorSelector .colorDetails p{margin:0;font-size:.75rem;color:#333}.colorSelector .colorDetails p:nth-child(1){font-weight:600}.colorSelector .colorDetails p:nth-child(2){font-weight:400}.shellCanvasContainer{box-shadow:4px 4px 12px #0000000d;border-radius:2px;padding:1rem 1rem 1rem 0px;display:none;flex-direction:column;gap:1.125rem;background:white;transition:.25s ease-in-out}.shellCanvasContainerInactive{opacity:0;pointer-events:none}.shellButtonContainer{padding-left:1rem;cursor:pointer;pointer-events:all;border-left:1px solid #fff;position:relative}.shellButtonContainer .buttonContent{background:#fff;transition:.2s all ease;-webkit-transition:.2s all ease;min-width:2.5rem;max-width:2.5rem;min-height:2.5rem;max-height:2.5rem;display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:50%}.shellButtonContainer .buttonContent span{display:none}.shellButtonContainer:hover .buttonContent{background:#f1f1f1}.shellButtonContainer.active{border-left:1px solid #333333}.shellButtonContainer.active .buttonContent{background:#f1f1f1}.shellButtonContainer img{width:1.375rem}.shellButtonContainer span{font-size:.6875rem;color:#333}.shellButtonContainer:hover span{color:#fff}.shellButtonContainer .hoverDescriptor{position:absolute;top:calc(50% - .5625rem);left:calc(100% + 1rem);padding:.25rem .5rem;background:rgba(0,0,0,.6);border-radius:1px;display:flex;justify-content:center;transition:.2s all ease;-webkit-transition:.2s all ease;opacity:0;pointer-events:none}.shellButtonContainer:hover .hoverDescriptor{opacity:1}.shellButtonContainer .hoverDescriptor span{color:#fff;font-size:11px;white-space:nowrap}.canvasTooltip{position:absolute;width:100%;display:flex;padding:1rem;bottom:0;justify-content:center;color:#898989;font-style:italic;font-size:.75rem;font-family:Inter,helvetica,sans-serif;opacity:1;transition:.2s all ease;-webkit-transition:.2s all ease;pointer-events:none;text-transform:uppercase;margin-bottom:5rem}.emptySceneBG{position:absolute;width:100%;height:100%;display:flex;padding:1rem;bottom:0;font-size:2rem;justify-content:center;align-items:center;color:#89898939;font-family:Inter,helvetica,sans-serif;opacity:1;transition:.2s all ease;-webkit-transition:.2s all ease;pointer-events:none;text-transform:uppercase}
|
|
9198
9198
|
`,Jke=`.topmostActive{z-index:1001!important}.topmostHover{z-index:1002!important}.hotspot{margin-left:0;transition:max-width .5s ease 0s;display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:auto;max-width:36px;height:36px;border:3px solid var(--hotspot-button-border-color);border-radius:18px;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;background-color:var(--hotspot-button-background-color);transition:all .5s ease 0s;position:absolute;z-index:0;cursor:pointer;overflow:hidden;color:#000}.hotspot.left{right:-36px}.hotspot:hover{border:3px solid #000}.hotspot:hover,.hotspot.active{opacity:1!important;cursor:pointer;max-width:400px;box-shadow:#00000040 0 14px 28px,#00000038 0 10px 10px}.hotspot:hover .inner-circle{border:2px solid #000}.hotspot.active .inner-circle{background:#fff;border:10px solid var(--hotspot-active-inner-circle-border-color);width:30px;height:30px;left:-.2px;top:-.2px}.hotspot-annotation{display:inline-flex;margin:0 27px 0 34px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-style:normal;font-weight:500;font-size:14px;white-space:nowrap}.hotspot.visited:not(:focus) .inner-circle{background:#fff;border:12px solid var(--visited-color)}.hotspot .inner-circle{width:36px;height:36px;border:3px solid var(--hotspot-inner-circle-border-color);background:white;border-radius:18px;box-sizing:border-box;position:absolute;top:-3px;left:-3px;transition:.1s}.hotspot.left .inner-circle{left:auto;right:-2px}.hotspot.left:hover .inner-circle{left:auto;right:-3px}.hotspot.left .hotspot-annotation{margin:0 34px 0 27px}@media screen and (orientation: portrait){.hotspot:hover{opacity:1!important;cursor:pointer;max-width:36px;box-shadow:#0000001f 0 1px 3px,#0000003d 0 1px 2px;border:3px solid var(--hotspot-button-border-color)}.hotspot:hover .inner-circle{border:3px solid var(--hotspot-inner-circle-border-color)}.hotspot.active{opacity:1!important;cursor:pointer;max-width:400px;box-shadow:#00000040 0 14px 28px,#00000038 0 10px 10px}.hotspot.active .inner-circle{background:#fff;border:10px solid var(--hotspot-active-inner-circle-border-color);width:30px;height:30px;left:-.2px;top:-.2px}}
|
|
9199
9199
|
`,eFe=`.dimensionsText{background:rgb(0,0,0);padding:.2rem .6rem;border-radius:.5rem;color:#fff;white-space:nowrap;transition:.5s}.dimensions:before{content:"";display:block;position:absolute;top:50%;left:-30px;width:30px;height:1px;background-color:#000}.dimensions:after{content:"";display:block;position:absolute;top:50%;right:-30px;width:30px;height:1px;background-color:#000}.yDimension{transform:rotate(90deg)}.zDimension{transform:rotateY(90deg)}
|
|
9200
9200
|
`,tFe=`@media only screen and (orientation: portrait){.shellCanvasBottomOptions,.shellCanvasTopOptions{display:none}.shellButtonContainer .buttonContent{min-width:1.75rem;max-width:1.75rem;min-height:1.75rem;max-height:1.75rem}.shellButtonContainer{padding-left:.5rem}.shellCanvasContainer{padding:.75rem .5rem .75rem 0px}.canvasTooltip{position:absolute;width:100%;display:flex;padding-left:2rem;padding-right:2rem;bottom:0;justify-content:center;color:#898989;font-style:italic;font-size:.75rem;font-family:Inter,helvetica,sans-serif;opacity:1;transition:.2s all ease;-webkit-transition:.2s all ease;pointer-events:none;text-transform:uppercase;margin-bottom:0rem;text-align:center}}
|