@epigraph/configurator 1.7.7 → 1.8.0
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 +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8859,7 +8859,7 @@ Valid keys: `+JSON.stringify(Object.keys(U),null," "));var ue=pe(W,re,H,K,J+"."
|
|
|
8859
8859
|
`,L2e=`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
|
`,U2e=`.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
8861
|
`,B2e=`@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
|
-
`,k2e=[{id:"variables",contents:N2e},{id:"styles",contents:D2e},{id:"accordion",contents:O2e},{id:"productFeaturesUI",contents:L2e},{id:"sideMenuContent",contents:U2e},{id:"build",contents:P2e},{id:"mobile",contents:B2e}];function F2e({disableUI:r,launchInAR:e,disableCart:t,configuratorWcRef:n,
|
|
8862
|
+
`,k2e=[{id:"variables",contents:N2e},{id:"styles",contents:D2e},{id:"accordion",contents:O2e},{id:"productFeaturesUI",contents:L2e},{id:"sideMenuContent",contents:U2e},{id:"build",contents:P2e},{id:"mobile",contents:B2e}];function F2e({disableUI:r,launchInAR:e,disableCart:t,configuratorWcRef:n,gaMeasurementId: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);wr("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)}),wr("coreApi:failed",S=>{n.showHiccupScreen(`AUTHENTICATION FAILED FOR: ${window.location.href}`),h(!1)}),wr("globalGeometryVariant:updated",S=>{ol.setState({allActiveGeometryVariants:{...S}});const _=cL.getState().itemsSpawned;E(_)}),wr("globalVariant:updated",S=>{ol.setState({allActiveVariants:{...S}})}),wr("categoryData:updated",S=>{s.setCategoryData(S)}),wr("fittingSkuIds:updated",S=>{cL.getState().actions.setFittingSkuIds([...S.skuids])}),wr("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:_})};wr("items:updated",S=>{uy.info({title:"Items changed"});const _={...S.itemsSpawned};cL.getState().setItemsSpawned(_),E(_)}),wr("cart:statusUpdated",S=>{S.disableCart!==void 0&&Jt.setState({disableCart:S.disableCart})}),wr("viewInYourSpace:hide",S=>{Jt.setState({viewInYourSpaceMenuBtnVisible:!1})}),wr("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)}),zm.setState({cart:[..._]}),zm.getState().actions.setCartTotalPrice(S.details.total)},[]),v=oe.useCallback(S=>{p&&(Jt.setState({inventoryData:{...S}}),b(p.getCartItems()))},[p]),x=()=>(wr(p.EVENTS.UI.PreloadScreen_Hide,()=>{n.api.ui.hidePreloadScreen()}),wr(p.EVENTS.UI.PreloadScreen_Show,()=>{n.api.ui.showPreloadScreen()}),wr(p.EVENTS.SCENE.CartItems_Updated,b),wr(p.EVENTS.SCENE.Inventory_Updated,v),ne(fi,{},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&&(uy.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&&(uy.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(Fne,{containerId:"uiStylesContainer",localStyles:k2e,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-measurement-id":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(I2e,{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 iB,e$=UL;{var t$=e$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;iB=function(r,e){t$.usingClientEntryPoint=!0;try{return e$.createRoot(r,e)}finally{t$.usingClientEntryPoint=!1}}}var sy={},z2e={get exports(){return sy},set exports(r){sy=r}},Z0={};/**
|
|
8863
8863
|
* @license React
|
|
8864
8864
|
* react-reconciler-constants.development.js
|
|
8865
8865
|
*
|
|
@@ -9314,7 +9314,7 @@ ${i.join(`
|
|
|
9314
9314
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
9315
9315
|
* See the License for the specific language governing permissions and
|
|
9316
9316
|
* limitations under the License.
|
|
9317
|
-
*/const w5e=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null;w5e&&self.XRSession.prototype.requestHitTestSource!=null;(()=>{const r=navigator.userAgent||navigator.vendor||self.opera;let e=!1;return(/(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/i.test(r)||/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(r.substr(0,4)))&&(e=!0),e})();const kre=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,C5e=!!(window.webkit&&window.webkit.messageHandlers);(()=>{if(kre){if(C5e)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const r=document.createElement("a");return!!(r.relList&&r.relList.supports&&r.relList.supports("ar"))}}else return!1})();class kR{static instanceSingleton=void 0;#e=!1;#i;#n;#r;#a;#s;#l=!0;#o;#t;#f=!0;#c;#u=!0;#h="";#d="";#p=null;epigraphAnalytics=null;EVENTS={UI:{PreloadScreen_Show:"preload:show",PreloadScreen_Hide:"preload:hide",ContextMenu_InfoBtnClicked:"infoButtonClicked_ContextMenu",ContextMenu_Show:"contextMenu:show",ContextMenu_Hide:"contextMenu:hide",UtilityMenu_Show:"utilityMenu:show",UtilityMenu_Hide:"utilityMenu:hide",ShareButton_Show:"shareButton:show",ShareButton_Hide:"shareButton:hide",ViewInYourSpaceButton_Show:"viewInYourSpace:show",ViewInYourSpaceButton_Hide:"viewInYourSpace:hide",ResetButton_Show:"resetBtn:show",ResetButton_Hide:"resetBtn:hide",DimensionsButton_Show:"dimensionsBtn:show",DimensionsButton_Hide:"dimensionsBtn:hide"},SCENE:{Item_Added:"item:added",Item_Removed:"item:removed",Items_Updated:"items:updated",FittingSkuIds_Updated:"fittingSkuIds:updated",CartItems_Updated:"cartItems:updated",Hotspot_Enter:"hotspot:enter",Hotspot_Exit:"hotspot:exit",SavedConfiguration_Loaded:"loaded-saved-configuration",MaterialOverrides_Exists:"materialOverrideExists",Cart_Checkout:"cart:checkout",Cart_OutOfStock:"cart:outOfStock",Cart_StatusUpdated:"cart:statusUpdated",ReplaceableCategory_Updated:"replaceableCategory:updated",GlobalVariant_Updated:"globalVariant:updated",CategoryData_Updated:"categoryData:updated",GlobalGeometryVariant_Updated:"globalGeometryVariant:updated",Ghost_Loaded:"ghost:loaded",Model_Loaded:"model:loaded",Model_Removed:"model:removed",Scene_Cleared:"scene:cleared",Inventory_Updated:"inventory:updated",DraggingOnDrop_CollsionDetected:"draggingOnDrop:collisionDetected",ActionButton_Clicked:"actionButton:clicked",CartMessage_Update:"cartMessage:updated"},CONFIGURATION:{OnClickItem:"onClickItem",CameraDetails_Update:"cameraDetails:Update"}};constructor(e,t=null){if(kR.instanceSingleton!==void 0)return kR.instanceSingleton;if(e.identifier!=="wc-epigraph-configurator-core")return Gt.error({title:"Invalid identifier on the 'wc-epigraph-configurator-core'. Unable to initialise the ConfiguratorCoreAPI class."}),null;kR.instanceSingleton=this,Object.freeze(this.CORE_EVENTS),this.#r=e,this.#a=performance.now(),this.#n=t,this.#r.addEventListener(this.EVENTS.SCENE.CartItems_Updated,()=>{this.#c=void 0,this.#f=!0,this.#u=!0}),this.setupAnalyticsEventListeners(),this.#e=!0}set clientAccessKey(e){this.#o=e}set canUpdateInventory(e){this.#l=e}get lastSharedConfigurationID(){return this.#c}set lastSharedConfigurationID(e){this.#c=e}set projectId(e){this.#t=e}get coreWCRef(){return this.#r}getResolvedAssetUrl(e){return IUe(e)}initializeAnalytics(e=void 0){e!==void 0&&(this.epigraphAnalytics=new UAe,this.epigraphAnalytics.addEventPlugin(new LAe(e,!1)))}get isReady(){return this.#e}get preloadProgress(){return this.#i}get categoryData(){return Ln.getState().categoryData}get productData(){return Ln.getState().productData}get lookData(){return Ln.getState().lookData}get sceneSettings(){return Je.getState().sceneSettings}get assetsData(){return Ln.getState().assetsData}get isMobile(){return Je.getState().isMobile}getDeviceState(){return Je.getState().actions.getDeviceState()}get hasSceneChanged(){return this.#f}set hasSceneChanged(e){this.#f=e}enableCart(){Je.getState().actions.enableCart()}disableCart(){Je.getState().actions.disableCart()}fireEvent(e,t){let n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0});n.data=t,this.coreWCRef?this.coreWCRef.dispatchEvent(n):Gt.warn({title:"core web component not found!"})}setupAnalyticsEventListeners(){this.coreWCRef.addEventListener("coreApi:ready",e=>{let t=Object.assign({},c5e);const n=((performance.now()-this.#a)/1e3).toFixed(2);this.#s=n,t.parameters={project_id:`${this.#t}`,load_time:n},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener("coreApi:failed",e=>{let t=Object.assign({},u5e);t.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Added,e=>{Gt.info({title:"Add Item",details:e});const t=e.data.itemData.guid,a=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t).currentVariant,s=`${e.data.itemData.skuID}(${a})`;let o=Object.assign({},_5e);o.parameters={item_added:`${s}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(o)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Removed,e=>{if(Gt.info({title:"Remove Item"}),e.data.itemData==null)return;const t=e.data.itemData.skuID;let n=Object.assign({},b5e);n.parameters={item_removed:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Enter,e=>{let t=Object.assign({},x5e);t.parameters={hotspot_entered:`${e.data.hotspotAbsID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Exit,e=>{let t=Object.assign({},T5e);t.parameters={hotspot_exited:`${e.data.domID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Cart_Checkout,e=>{let t=0,n=0,i=0;e.data.cartItems.forEach((s,o)=>{n++,i+=s.count,t+=s.price;let l=Object.assign({},p5e);l.parameters={client_product_id:s.clientProductId,count_added_to_cart:s.count,variant:`${s.currentVariant}`,total_value:s.price,epigraph_sku:`${s.skuID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(l)});let a=Object.assign({},d5e);a.parameters={cart_total:t,unique_items_count:n,total_items:i,project_id:`${this.#t}`},this.sendAnalyticsEvent(a)})}setEmptySceneText(e){const t=Je.getState().sceneSettings;t.emptySceneText=e,Je.setState({sceneSettings:{...t}})}getSpawningRequirementForSkuID(e){return ln.getState().attachmentSystem.currentStructure.getSpawningRequirementForSkuID(e)}getCartItems(){return ln.getState().attachmentSystem.getCartItems()}checkout(e=!1){const t=ln.getState().attachmentSystem;this.#p=this.getSceneStructure();const n=t.getCartItems();return Gt.warn({title:"CONFIGURATOR CHECKED OUT: "}),Gt.table(n),e===!0||n.cartItems.find(i=>i.countUnavailable>0)===void 0?(this.fireEvent(this.EVENTS.SCENE.Cart_Checkout,n),nt.alert({alertMsg:"Items from your configuration have been added to your cart.",alertTime:6e3,alertType:"success",alertLabel:"Success",alertId:"itemAdded"})):this.fireEvent(this.EVENTS.SCENE.Cart_OutOfStock,n),n}async reloadCheckedoutScene(){if(!this.#p){Gt.info({title:"No data found since last checkout"});return}await this.loadSceneFromConfiguration(this.#p)}getCurrentItemsInReplaceableCategory(){return ln.getState().attachmentSystem.currentStructure.getCurrentItemsInReplaceableCategory()}async getSceneAsGlbUrl(){return this.#u===!1?this.#h:(URL.revokeObjectURL(this.#h),this.#h=void 0,this.#h=await a5e(),this.#u=!1,this.#h)}async getSceneAsUsdzUrl(){return this.#u===!1?this.#d:(URL.revokeObjectURL(this.#d),this.#d=void 0,this.#d=await r5e(),this.#u=!1,this.#d)}async generateShareableLink(e=!1){if(!this.#f&&this.#c)Gt.info({title:"Reusing the cached configuration ID that was last saved..."});else{Gt.info({title:"Generating a new configuration ID..."});let a=ln.getState().actions.export();const s=await xUe(a);this.#c=await s.text()}const t=window.location.href;let n=new URL(t);e===!0&&n.searchParams.set("launchInAR",!0),n.searchParams.set("projectId",this.#t),n.searchParams.set("epgsharedconfigid",this.#c),this.#f=!1;let i=Object.assign({},TK);return i.parameters={shared_url:`${n}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(i),n.href}closeContextMenu(){Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem()}updatePreloadProgress(e){const t=this.#i;this.#i=e;const n=new CustomEvent("preload:update",{detail:{progress:this.#i}});window.dispatchEvent(n),typeof this.#n=="function"&&this.#n(t,e)}alert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a=!1,alertId:s}){Je.getState().actions.sendAlert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a,alertId:s})}removePersistantAlert(){Je.setState({persistantAlertData:null})}clickHotspot(e){let t=this.coreWCRef.shadowRoot.getElementById(e);t&&t.click()}exitHotspot(){hi.getState().actions.exitHotspot(!1)}async spawnGhostsForSkuID(e,t=!1,n){if(Wt.getState().busy)return null;await gr.getState().actions.spawnGhostsForSkuID(e,t,n)}removeAllGhosts(){if(Wt.getState().busy)return null;gr.getState().actions.clearAllGhosts()}printSceneHierarchy(e=!1){const t=Je.getState().sceneRef;(function n(i){const a=`${i.name} < ${i.type} >`;e===!0?console.groupCollapsed(a):console.group(a),i.children.forEach(n),console.groupEnd()})(t)}getSceneItems(){const e=Wt.getState().itemsSpawned;if(typeof e!="object"){Gt.error({title:"There was an error while fetching the scene item count."});return}return e}getSceneItemCount(){let e;const t=Wt.getState().itemsSpawned;return typeof t!="object"&&Gt.error({title:"There was an error while fetching the scene item count."}),e=Object.keys(t).length,e}async spawnItemBySkuID(e,t=!1){return Wt.getState().busy?null:(t===!0&&await this.spawnGhostsForSkuID(e,!1,1),await Wt.getState().actions.addItemBySkuID(e))}async replaceItemsByGuid(e){let t={...e},n=!1;const i=ln.getState().attachmentSystem.currentStructure;let a=this.getSceneStructure();return Object.keys(e).map(s=>{a.structure.map(o=>{if(o.guid==s){let l=!1;const u=i.getNodeByGUID(s);u&&(l=u.isReplaceableWithSkuId(e[s].skuId)),t[s].success=l,l&&(o.skuID=e[s].skuId,n=!0)}})}),n&&await this.loadSceneFromConfiguration(a),t}async replaceItemsBySkuId(e,t=[]){let n={...e},i=!1;const a=ln.getState().attachmentSystem.currentStructure;let s=this.getSceneStructure();return s.structure.map(o=>{t.includes(o.guid)!==!0&&Object.keys(e).map(l=>{if(o.skuID==l){let u=!1;const f=a.getNodeByGUID(o.guid);f&&(u=f.isReplaceableWithSkuId(e[l].skuId)),n[l].success=u,u&&(o.skuID=e[l].skuId,i=!0)}})}),i&&await this.loadSceneFromConfiguration(s),n}async removeItemByGUID(e,t=!1){const i=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);t===!1&&i.canSwapRoot===!0&&i.swapRoot(),await Wt.getState().actions.removeItemByGUID(e)}rotateItemByGUID(e){ln.getState().attachmentSystem.currentStructure.rotateNode(e)}rotateSelectedItem(){const e=Wt.getState().selectedItemData;if(!e){Gt.info("No current item selected to rotate");return}const t=e.itemData.guid;return ln.getState().attachmentSystem.currentStructure.rotateNode(t),e}removeItemBySkuID(e,t=!0){this.removeSelectedItem()}async removeSelectedItem(){const e=Wt.getState().selectedItemData;if(!e){Gt.info({title:"No current item selected to delete"});return}const t=e.itemData.guid;return Wt.getState().actions.deselectItem(),await this.removeItemByGUID(t),Gt.info({title:`Removed Item: ${t}`}),e}refocus(){Je.getState().actions.triggerAutoFocus()}focusOnGhosts(){if(gr.getState().ghostParentRef===null){Gt.warn({title:"Ghost Parent Reference not found"});return}gr.getState().ghostParentRef.children.length<=0?Je.getState().actions.triggerAutoFocus():Je.getState().actions.triggerAutoFocus(gr.getState().ghostParentRef)}exitSelectedItem(){Wt.getState().actions.deselectItem()}getSelectedItemData(){return Wt.getState().selectedItemData}canSelectedItemRotate(){const e=ln.getState().attachmentSystem.currentStructure;let t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canRotate:!1}canSelectedItemDrag(){const e=ln.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canDrag:!1}doesGuidItemHaveAnAttachedDependency(e){let t=!0;const i=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e),a=i.isEndNode;return t=!a,a||i.canSwapRoot&&i.whichNodesAreAttachedToUs().length==1&&(t=!1),t}doesSelectedItemHasAttachedDependency(){const e=this.getSelectedItemData();return e?this.doesGuidItemHaveAnAttachedDependency(e.itemData.guid):!1}isSelectedItemAnEndNode(){const e=ln.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).isEndNode:!1}getCurrentSceneEnvMap(){return tT.getState().envMapUrl}async switchGlobalGeometryVariant(e,t){if(!e){Gt.WARN({title:"Geometry Category: '"+e+"' not valid!"});return}Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),await ln.getState().attachmentSystem.switchGlobalGeometryVariant(e,t),await gc(1);let n=Object.assign({},m5e);n.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n);const a=Ln.getState().categoryData.geometryVariants;let s=null;if(a.map(l=>{l.id==e&&(s=l)}),!s)return;const o=s.variants[t];this.alert({alertMsg:s.label.charAt(0).toUpperCase()+s.label.slice(1)+" was successfully switched to "+o.label.charAt(0).toUpperCase()+o.label.slice(1)+".",alertTime:3e3,alertType:"success",alertLabel:`${s.label} Changed`,alertId:"geometryVariantChanged"})}async switchGlobalVariant(e,t=""){if(!e){Gt.WARN({title:"Look Category: '"+e+"' not valid!"});return}Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),Gt.info({title:`Changing Global Variant: Category: ${e} Id: ${t}`}),await ln.getState().attachmentSystem.switchGlobalVariant(e,t),await gc(1);let n=Object.assign({},g5e);n.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n)}async overrideSelectedItemMaterial(e=""){return Wt.getState().selectedItemData?(await Wt.getState().actions.switchToVariant(Wt.getState().selectedItemData.itemData,e,!0),!0):!1}async overrideItemMaterialByGuid(e,t){const n=Wt.getState().itemsSpawned[e];if(!n)return Gt.warn({title:"Item with guid: "+e+" doesn't exist"}),!1;await Wt.getState().actions.switchToVariant(n.itemData,t,!0);let i=Object.assign({},v5e);return i.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(i),!0}getSelectedItemColors(){let e=[];if(this.getSelectedItemData()==null)return e;let n=this.getSelectedItemData().itemData.looks;if(n){let i=Ln.getState().lookData;n.map(a=>{i.hasOwnProperty(a)&&e.push(i[a])})}return e}getCanvasSize(){return Je.getState().canvasSize}async removeAllVariantOverrides(){Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),await ln.getState().attachmentSystem.removeAllVariantOverrides()}switchCursor(e){Je&&Je.getState().actions.switchCursor(e)}getSceneStructure(){return ln.getState().actions.export()}async loadSceneFromConfiguration(e){await ln.getState().actions.loadStructure(e);let t=Object.assign({},xK);t.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}async loadSceneFromConfigurationID(e){const t=await ln.getState().actions.loadSavedStructureFromConfigID(e);if(!t)return null;ln.setState({defaultConfig:t});let n=Object.assign({},xK);n.label=`Preconfig ID: ${e}`,await this.loadSceneFromConfiguration(t)}viewInYourSpace(){Gt.info({title:"View in your space called from the Core API"});let e=Object.assign({},A5e);e.label="AR Requested",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e),this.#r.epigraphViewInYourSpaceRef._onViewInYourSpaceButtonClicked()}async shareScene(){const e=await this.generateShareableLink();let t=Object.assign({},TK);return t.parameters={shared_url:`${e}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t),e}async clearScene(){await ln.getState().attachmentSystem.clear()}async restartScene(){Gt.info({title:"Restarting Scene."}),await ln.getState().attachmentSystem.restart();let e=Object.assign({},y5e);e.label="Scene Restarted",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}areDimensionsVisible(){return Je.getState().showDimensions}getActiveHotspot(){return hi.getState().activeHotspotData}reviewCartShown(){let e=Object.assign({},h5e);e.label="Review Cart shown",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}reviewCartHidden(){let e=Object.assign({},f5e);e.label="Review Cart hidden",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}showDimensions(){Je.setState({showDimensions:!0});let e=Object.assign({},E5e);e.label="Dimensions shown",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}hideDimensions(){Je.setState({showDimensions:!1});let e=Object.assign({},S5e);e.label="Dimensions hidden",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}areHotspotsVisible(){return hi.getState().hotspotsVisibility}areHotspotsTemporarilyVisible(){return hi.getState().hotspotsTempVisibility}showAllHotspots(e=!1){hi.getState().actions.switchHotspotsVisibility(!0,e)}hideAllHotspots(e=!1){hi.getState().actions.switchHotspotsVisibility(!1,e)}getFittingSkuIds(){return ln.getState().attachmentSystem.getFittingSKUIDs()}selectItemWithGUID(e){const t=Wt.getState().itemsSpawned,n=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);Wt.getState().actions.setSelectedItemData({...t[e],overrideVariant:n.overrideVariant,currentVariant:n.currentVariant,offsetX:0,offsetY:0})}async getCurrentCameraDetails(){return new Promise((e,t)=>{nt.coreWCRef.addEventListener(nt.EVENTS.CONFIGURATION.CameraDetails_Update,n=>{e(n.data)},{once:!0}),Cr.getState().actions.triggerFetchingCamera()})}moveCamera(e,t,n,i,a){hi.setState({isAnyHotspotActive:!0}),Cr.setState({manualControl:!0,sourcePos:e,destPos:t,interpolationFactor:n,duration:i}),a&&Cr.setState({focusPointPosition:a})}setEnvLightMap(e){tT.setState({envMapUrl:e})}updateInventoryForAllProducts(e){return this.#l===!1?(Gt.warn({title:"Inventory has been already updated once!"}),null):(Gd.getState().actions.updateInventoryForAllProducts(e),this.#l=!1,this.getInventoryInfo())}getInventoryInfo(){return Gd.getState().actions.getInventoryInfo()}updatePricingForAllProducts(e){Ln.getState().actions.updatePricingForAllProducts(e);const n=ln.getState().attachmentSystem.getCartItems();n&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,n)}updatePricingForProduct(e,t,n){Ln.getState().actions.updatePricingForProduct(e,t,n);const a=ln.getState().attachmentSystem.getCartItems();a&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,a)}getCurrentPricingInfo(){return Ln.getState().actions.getCurrentPricingInfo()}async itemDragStart(e){if(Wt.getState().busy)return null;Je.setState({hoveredGhostIndex:-1}),await this.removeAllGhosts(),Je.setState({itemDraggedSkuID:e}),await this.spawnGhostsForSkuID(e,!1)}async itemDragEnd(){if(Wt.getState().busy)return null;const e=Je.getState().hoveredGhostIndex;e!==-1?await Wt.getState().actions.addItemBySkuID(Je.getState().itemDraggedSkuID,e):await this.removeAllGhosts(),Je.setState({itemDraggedSkuID:null,hoveredGhostIndex:-1})}async forceSpawnItem(e,t){const n=Ln.getState().productData,i=ln.getState().attachmentSystem;if(!i)return;const a=i.currentStructure;if(!a)return;let s=a.getNodeByGUID(t);s?(s._skuID=e,s.generatePlugsForNode(e)):(s=new vR(e,{guid:t,isEndNode:!0,overrideVariant:null,plugs:n[e].plugs}),a.addNode(s),a.connectPlugs({incomingPlug:new zH({name:"haha",acceptedPlugTypes:[],connectsToPlugTypes:[]},s),receiverPlug:a.rootNode.plugs[0]}));const o=await Wt.getState().actions.addItemWithTransform({position:new ve(0,0,0),rotation:new $i().identity()},e,t);return await gc(1),o}async downloadCurrentViewAsImage(e,t="png"){if(!e){Gt.warn({title:`Couldn't take screenshot for ${e}. Missing imageName parameter`});return}if(!t){Gt.warn({title:`Couldn't take screenshot for ${t}. Missing imageExtension parameter`});return}await gc(1);const n=await this.getCurrentViewAsImageUrl();await gc(1);let i;return n.success===!0&&(Gt.info({title:"Downloading the screenshot"}),i=document.createElement("a"),i.setAttribute("download",`${e}.${t}`),i.setAttribute("href",n.imageData),i.click(),Gt.info({title:"Screenshot download complete"})),i}async getCurrentViewAsImageUrl(){await gc(1);const e=await Je.getState().actions.requestNewScreenshot();return await gc(1),e}setCameraFocusPointPosition(e){Cr.setState({focusPointPosition:e})}triggerFetchingCamera(){Cr.getState().actions.triggerFetchingCamera()}async completeItemDrop(){await Je.getState().actions.completeDropItem()}revertItemDrop(){Je.getState().actions.revertDropItem()}getCameraFocusPointPosition(){return Cr.getState().focusPointPosition}sendAnalyticsPageViewedEvent(){}sendAnalyticsEvent(e){this.epigraphAnalytics!==null&&this.epigraphAnalytics.sendEvent(e)}isIosDevice(){return kre}actionButtonClicked(e){this.fireEvent(this.EVENTS.SCENE.ActionButton_Clicked,{data:e.actionButton.data,skuID:e.skuID,count:e.count,price:e.price,countAvailable:e.countAvailable,countUnavailable:e.countUnavailable,currentVariant:e.currentVariant})}setCartMessage(e){this.fireEvent(this.EVENTS.SCENE.CartMessage_Update,{cartMessage:e})}}class M5e extends HTMLElement{#e="wc-epigraph-configurator-core";#i=!1;#n=void 0;#r=void 0;initialConfigId="";clientAccessKey="";gaCode="";builderMode=!1;projectId="";api=null;constructor(){super(),this.attachShadow({mode:"open"}),hUe(new kR(this)),this.api=nt}get identifier(){return this.#e}static get observedAttributes(){}get epigraphViewInYourSpaceRef(){return this.#n}#a(){this.hasAttribute("configurator-wc-id")&&(this.configuratorWcId=this.getAttribute("configurator-wc-id")),this.hasAttribute("initial-config-id")&&(this.initialConfigId=this.getAttribute("initial-config-id")),this.hasAttribute("client-access-key")&&(this.clientAccessKey=this.getAttribute("client-access-key")),this.hasAttribute("ga-code")&&(this.gaCode=this.getAttribute("ga-code")),this.hasAttribute("builder-mode")&&(this.builderMode=!0),Gt.group("Collected Web Component Attributes"),Gt.table({initialConfigId:this.initialConfigId,clientAccessKey:this.clientAccessKey,builderMode:this.builderMode}),Gt.groupEnd()}static get observedAttributes(){return["view-in-your-space-elem-id"]}attributeChangedCallback(e,t,n){if(this.#r||(this.#r=document.querySelector(`#${this.configuratorWcId}`)),!!this.#r)switch(e){case"view-in-your-space-elem-id":this.#n=this.#r.shadowRoot.querySelector(`#${n}`),Gt.warn({title:"ViewInYourSpace is now accessible from the core: "});break}}async#s(e){return new Promise(function(t,n){let i=new XMLHttpRequest;i.withCredentials=!1,i.open("GET","https://api.seeitinyourspace.com/auth/"+e),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(this.readyState===4){const a=JSON.parse(this.responseText);Gt.warn({title:a}),t(a)}},i.onerror=function(){n({status:this.status,statusText:i.statusText})},i.send()})}async connectedCallback(){if(this.#i===!0)return;this.#a();const e=await this.#s(this.clientAccessKey);this.validationPassed=e.passed,this.projectId=e.projectID,this.api.projectId=this.projectId,nt.initializeAnalytics(this.gaCode);let t=Object.assign({},l5e);if(t.parameters={project_id:`${this.projectId}`},nt.sendAnalyticsEvent(t),this.validationPassed==="false"){Gt.error({title:"Request from an invalidated source: "+window.location.href}),nt.fireEvent("coreApi:failed");return}Gt.info({title:"VALIDATION SUCCESSFUL!"}),this.#i=!0,this.#r=document.querySelector(`#${this.configuratorWcId}`);let n=new URL(window.location).searchParams;n.has("epgsharedconfigid")&&(this.initialConfigId=n.get("epgsharedconfigid")),iB(this.shadowRoot).render(ne(hFe,{projectId:this.projectId,clientAccessKey:this.clientAccessKey,initialConfigId:this.initialConfigId,builderMode:this.builderMode,disableCart:this.hasAttribute("disable-cart")},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/index.js",lineNumber:206,columnNumber:7},this))}disconnectedCallback(){nt.fireEvent("coreApi:shutDown")}}const v8=document.createElement("template");v8.id="fullScreenModalTemplate";v8.innerHTML=`
|
|
9317
|
+
*/const w5e=navigator.xr!=null&&self.XRSession!=null&&navigator.xr.isSessionSupported!=null;w5e&&self.XRSession.prototype.requestHitTestSource!=null;(()=>{const r=navigator.userAgent||navigator.vendor||self.opera;let e=!1;return(/(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/i.test(r)||/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(r.substr(0,4)))&&(e=!0),e})();const kre=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!self.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,C5e=!!(window.webkit&&window.webkit.messageHandlers);(()=>{if(kre){if(C5e)return!!/CriOS\/|EdgiOS\/|FxiOS\/|GSA\/|DuckDuckGo\//.test(navigator.userAgent);{const r=document.createElement("a");return!!(r.relList&&r.relList.supports&&r.relList.supports("ar"))}}else return!1})();class kR{static instanceSingleton=void 0;#e=!1;#i;#n;#r;#a;#s;#l=!0;#o;#t;#f=!0;#c;#u=!0;#h="";#d="";#p=null;epigraphAnalytics=null;EVENTS={UI:{PreloadScreen_Show:"preload:show",PreloadScreen_Hide:"preload:hide",ContextMenu_InfoBtnClicked:"infoButtonClicked_ContextMenu",ContextMenu_Show:"contextMenu:show",ContextMenu_Hide:"contextMenu:hide",UtilityMenu_Show:"utilityMenu:show",UtilityMenu_Hide:"utilityMenu:hide",ShareButton_Show:"shareButton:show",ShareButton_Hide:"shareButton:hide",ViewInYourSpaceButton_Show:"viewInYourSpace:show",ViewInYourSpaceButton_Hide:"viewInYourSpace:hide",ResetButton_Show:"resetBtn:show",ResetButton_Hide:"resetBtn:hide",DimensionsButton_Show:"dimensionsBtn:show",DimensionsButton_Hide:"dimensionsBtn:hide"},SCENE:{Item_Added:"item:added",Item_Removed:"item:removed",Items_Updated:"items:updated",FittingSkuIds_Updated:"fittingSkuIds:updated",CartItems_Updated:"cartItems:updated",Hotspot_Enter:"hotspot:enter",Hotspot_Exit:"hotspot:exit",SavedConfiguration_Loaded:"loaded-saved-configuration",MaterialOverrides_Exists:"materialOverrideExists",Cart_Checkout:"cart:checkout",Cart_OutOfStock:"cart:outOfStock",Cart_StatusUpdated:"cart:statusUpdated",ReplaceableCategory_Updated:"replaceableCategory:updated",GlobalVariant_Updated:"globalVariant:updated",CategoryData_Updated:"categoryData:updated",GlobalGeometryVariant_Updated:"globalGeometryVariant:updated",Ghost_Loaded:"ghost:loaded",Model_Loaded:"model:loaded",Model_Removed:"model:removed",Scene_Cleared:"scene:cleared",Inventory_Updated:"inventory:updated",DraggingOnDrop_CollsionDetected:"draggingOnDrop:collisionDetected",ActionButton_Clicked:"actionButton:clicked",CartMessage_Update:"cartMessage:updated"},CONFIGURATION:{OnClickItem:"onClickItem",CameraDetails_Update:"cameraDetails:Update"}};constructor(e,t=null){if(kR.instanceSingleton!==void 0)return kR.instanceSingleton;if(e.identifier!=="wc-epigraph-configurator-core")return Gt.error({title:"Invalid identifier on the 'wc-epigraph-configurator-core'. Unable to initialise the ConfiguratorCoreAPI class."}),null;kR.instanceSingleton=this,Object.freeze(this.CORE_EVENTS),this.#r=e,this.#a=performance.now(),this.#n=t,this.#r.addEventListener(this.EVENTS.SCENE.CartItems_Updated,()=>{this.#c=void 0,this.#f=!0,this.#u=!0}),this.setupAnalyticsEventListeners(),this.#e=!0}set clientAccessKey(e){this.#o=e}set canUpdateInventory(e){this.#l=e}get lastSharedConfigurationID(){return this.#c}set lastSharedConfigurationID(e){this.#c=e}set projectId(e){this.#t=e}get coreWCRef(){return this.#r}getResolvedAssetUrl(e){return IUe(e)}initializeAnalytics(e=void 0){e!==void 0&&(this.epigraphAnalytics=new UAe,this.epigraphAnalytics.addEventPlugin(new LAe(e,!1)))}get isReady(){return this.#e}get preloadProgress(){return this.#i}get categoryData(){return Ln.getState().categoryData}get productData(){return Ln.getState().productData}get lookData(){return Ln.getState().lookData}get sceneSettings(){return Je.getState().sceneSettings}get assetsData(){return Ln.getState().assetsData}get isMobile(){return Je.getState().isMobile}getDeviceState(){return Je.getState().actions.getDeviceState()}get hasSceneChanged(){return this.#f}set hasSceneChanged(e){this.#f=e}enableCart(){Je.getState().actions.enableCart()}disableCart(){Je.getState().actions.disableCart()}fireEvent(e,t){let n=new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0});n.data=t,this.coreWCRef?this.coreWCRef.dispatchEvent(n):Gt.warn({title:"core web component not found!"})}setupAnalyticsEventListeners(){this.coreWCRef.addEventListener("coreApi:ready",e=>{let t=Object.assign({},c5e);const n=((performance.now()-this.#a)/1e3).toFixed(2);this.#s=n,t.parameters={project_id:`${this.#t}`,load_time:n},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener("coreApi:failed",e=>{let t=Object.assign({},u5e);t.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Added,e=>{Gt.info({title:"Add Item",details:e});const t=e.data.itemData.guid,a=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(t).currentVariant,s=`${e.data.itemData.skuID}(${a})`;let o=Object.assign({},_5e);o.parameters={item_added:`${s}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(o)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Item_Removed,e=>{if(Gt.info({title:"Remove Item"}),e.data.itemData==null)return;const t=e.data.itemData.skuID;let n=Object.assign({},b5e);n.parameters={item_removed:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Enter,e=>{let t=Object.assign({},x5e);t.parameters={hotspot_entered:`${e.data.hotspotAbsID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Hotspot_Exit,e=>{let t=Object.assign({},T5e);t.parameters={hotspot_exited:`${e.data.domID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}),this.coreWCRef.addEventListener(this.EVENTS.SCENE.Cart_Checkout,e=>{let t=0,n=0,i=0;e.data.cartItems.forEach((s,o)=>{n++,i+=s.count,t+=s.price;let l=Object.assign({},p5e);l.parameters={client_product_id:s.clientProductId,count_added_to_cart:s.count,variant:`${s.currentVariant}`,total_value:s.price,epigraph_sku:`${s.skuID}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(l)});let a=Object.assign({},d5e);a.parameters={cart_total:t,unique_items_count:n,total_items:i,project_id:`${this.#t}`},this.sendAnalyticsEvent(a)})}setEmptySceneText(e){const t=Je.getState().sceneSettings;t.emptySceneText=e,Je.setState({sceneSettings:{...t}})}getSpawningRequirementForSkuID(e){return ln.getState().attachmentSystem.currentStructure.getSpawningRequirementForSkuID(e)}getCartItems(){return ln.getState().attachmentSystem.getCartItems()}checkout(e=!1){const t=ln.getState().attachmentSystem;this.#p=this.getSceneStructure();const n=t.getCartItems();return Gt.warn({title:"CONFIGURATOR CHECKED OUT: "}),Gt.table(n),e===!0||n.cartItems.find(i=>i.countUnavailable>0)===void 0?(this.fireEvent(this.EVENTS.SCENE.Cart_Checkout,n),nt.alert({alertMsg:"Items from your configuration have been added to your cart.",alertTime:6e3,alertType:"success",alertLabel:"Success",alertId:"itemAdded"})):this.fireEvent(this.EVENTS.SCENE.Cart_OutOfStock,n),n}async reloadCheckedoutScene(){if(!this.#p){Gt.info({title:"No data found since last checkout"});return}await this.loadSceneFromConfiguration(this.#p)}getCurrentItemsInReplaceableCategory(){return ln.getState().attachmentSystem.currentStructure.getCurrentItemsInReplaceableCategory()}async getSceneAsGlbUrl(){return this.#u===!1?this.#h:(URL.revokeObjectURL(this.#h),this.#h=void 0,this.#h=await a5e(),this.#u=!1,this.#h)}async getSceneAsUsdzUrl(){return this.#u===!1?this.#d:(URL.revokeObjectURL(this.#d),this.#d=void 0,this.#d=await r5e(),this.#u=!1,this.#d)}async generateShareableLink(e=!1){if(!this.#f&&this.#c)Gt.info({title:"Reusing the cached configuration ID that was last saved..."});else{Gt.info({title:"Generating a new configuration ID..."});let a=ln.getState().actions.export();const s=await xUe(a);this.#c=await s.text()}const t=window.location.href;let n=new URL(t);e===!0&&n.searchParams.set("launchInAR",!0),n.searchParams.set("projectId",this.#t),n.searchParams.set("epgsharedconfigid",this.#c),this.#f=!1;let i=Object.assign({},TK);return i.parameters={shared_url:`${n}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(i),n.href}closeContextMenu(){Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem()}updatePreloadProgress(e){const t=this.#i;this.#i=e;const n=new CustomEvent("preload:update",{detail:{progress:this.#i}});window.dispatchEvent(n),typeof this.#n=="function"&&this.#n(t,e)}alert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a=!1,alertId:s}){Je.getState().actions.sendAlert({alertMsg:e,alertTime:t,alertType:n,alertLabel:i,persistant:a,alertId:s})}removePersistantAlert(){Je.setState({persistantAlertData:null})}clickHotspot(e){let t=this.coreWCRef.shadowRoot.getElementById(e);t&&t.click()}exitHotspot(){hi.getState().actions.exitHotspot(!1)}async spawnGhostsForSkuID(e,t=!1,n){if(Wt.getState().busy)return null;await gr.getState().actions.spawnGhostsForSkuID(e,t,n)}removeAllGhosts(){if(Wt.getState().busy)return null;gr.getState().actions.clearAllGhosts()}printSceneHierarchy(e=!1){const t=Je.getState().sceneRef;(function n(i){const a=`${i.name} < ${i.type} >`;e===!0?console.groupCollapsed(a):console.group(a),i.children.forEach(n),console.groupEnd()})(t)}getSceneItems(){const e=Wt.getState().itemsSpawned;if(typeof e!="object"){Gt.error({title:"There was an error while fetching the scene item count."});return}return e}getSceneItemCount(){let e;const t=Wt.getState().itemsSpawned;return typeof t!="object"&&Gt.error({title:"There was an error while fetching the scene item count."}),e=Object.keys(t).length,e}async spawnItemBySkuID(e,t=!1){return Wt.getState().busy?null:(t===!0&&await this.spawnGhostsForSkuID(e,!1,1),await Wt.getState().actions.addItemBySkuID(e))}async replaceItemsByGuid(e){let t={...e},n=!1;const i=ln.getState().attachmentSystem.currentStructure;let a=this.getSceneStructure();return Object.keys(e).map(s=>{a.structure.map(o=>{if(o.guid==s){let l=!1;const u=i.getNodeByGUID(s);u&&(l=u.isReplaceableWithSkuId(e[s].skuId)),t[s].success=l,l&&(o.skuID=e[s].skuId,n=!0)}})}),n&&await this.loadSceneFromConfiguration(a),t}async replaceItemsBySkuId(e,t=[]){let n={...e},i=!1;const a=ln.getState().attachmentSystem.currentStructure;let s=this.getSceneStructure();return s.structure.map(o=>{t.includes(o.guid)!==!0&&Object.keys(e).map(l=>{if(o.skuID==l){let u=!1;const f=a.getNodeByGUID(o.guid);f&&(u=f.isReplaceableWithSkuId(e[l].skuId)),n[l].success=u,u&&(o.skuID=e[l].skuId,i=!0)}})}),i&&await this.loadSceneFromConfiguration(s),n}async removeItemByGUID(e,t=!1){const i=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);t===!1&&i.canSwapRoot===!0&&i.swapRoot(),await Wt.getState().actions.removeItemByGUID(e)}rotateItemByGUID(e){ln.getState().attachmentSystem.currentStructure.rotateNode(e)}rotateSelectedItem(){const e=Wt.getState().selectedItemData;if(!e){Gt.info("No current item selected to rotate");return}const t=e.itemData.guid;return ln.getState().attachmentSystem.currentStructure.rotateNode(t),e}removeItemBySkuID(e,t=!0){this.removeSelectedItem()}async removeSelectedItem(){const e=Wt.getState().selectedItemData;if(!e){Gt.info({title:"No current item selected to delete"});return}const t=e.itemData.guid;return Wt.getState().actions.deselectItem(),await this.removeItemByGUID(t),Gt.info({title:`Removed Item: ${t}`}),e}refocus(){Je.getState().actions.triggerAutoFocus()}focusOnGhosts(){if(gr.getState().ghostParentRef===null){Gt.warn({title:"Ghost Parent Reference not found"});return}gr.getState().ghostParentRef.children.length<=0?Je.getState().actions.triggerAutoFocus():Je.getState().actions.triggerAutoFocus(gr.getState().ghostParentRef)}exitSelectedItem(){Wt.getState().actions.deselectItem()}getSelectedItemData(){return Wt.getState().selectedItemData}canSelectedItemRotate(){const e=ln.getState().attachmentSystem.currentStructure;let t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canRotate:!1}canSelectedItemDrag(){const e=ln.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).canDrag:!1}doesGuidItemHaveAnAttachedDependency(e){let t=!0;const i=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e),a=i.isEndNode;return t=!a,a||i.canSwapRoot&&i.whichNodesAreAttachedToUs().length==1&&(t=!1),t}doesSelectedItemHasAttachedDependency(){const e=this.getSelectedItemData();return e?this.doesGuidItemHaveAnAttachedDependency(e.itemData.guid):!1}isSelectedItemAnEndNode(){const e=ln.getState().attachmentSystem.currentStructure,t=this.getSelectedItemData();return t?e.getNodeByGUID(t.itemData.guid).isEndNode:!1}getCurrentSceneEnvMap(){return tT.getState().envMapUrl}async switchGlobalGeometryVariant(e,t){if(!e){Gt.WARN({title:"Geometry Category: '"+e+"' not valid!"});return}Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),await ln.getState().attachmentSystem.switchGlobalGeometryVariant(e,t),await gc(1);let n=Object.assign({},m5e);n.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n);const a=Ln.getState().categoryData.geometryVariants;let s=null;if(a.map(l=>{l.id==e&&(s=l)}),!s)return;const o=s.variants[t];this.alert({alertMsg:s.label.charAt(0).toUpperCase()+s.label.slice(1)+" was successfully switched to "+o.label.charAt(0).toUpperCase()+o.label.slice(1)+".",alertTime:3e3,alertType:"success",alertLabel:`${s.label} Changed`,alertId:"geometryVariantChanged"})}async switchGlobalVariant(e,t=""){if(!e){Gt.WARN({title:"Look Category: '"+e+"' not valid!"});return}Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),Gt.info({title:`Changing Global Variant: Category: ${e} Id: ${t}`}),await ln.getState().attachmentSystem.switchGlobalVariant(e,t),await gc(1);let n=Object.assign({},g5e);n.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(n)}async overrideSelectedItemMaterial(e=""){return Wt.getState().selectedItemData?(await Wt.getState().actions.switchToVariant(Wt.getState().selectedItemData.itemData,e,!0),!0):!1}async overrideItemMaterialByGuid(e,t){const n=Wt.getState().itemsSpawned[e];if(!n)return Gt.warn({title:"Item with guid: "+e+" doesn't exist"}),!1;await Wt.getState().actions.switchToVariant(n.itemData,t,!0);let i=Object.assign({},v5e);return i.parameters={variant:`${t}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(i),!0}getSelectedItemColors(){let e=[];if(this.getSelectedItemData()==null)return e;let n=this.getSelectedItemData().itemData.looks;if(n){let i=Ln.getState().lookData;n.map(a=>{i.hasOwnProperty(a)&&e.push(i[a])})}return e}getCanvasSize(){return Je.getState().canvasSize}async removeAllVariantOverrides(){Wt.getState().selectedItemData&&Wt.getState().actions.deselectItem(),await ln.getState().attachmentSystem.removeAllVariantOverrides()}switchCursor(e){Je&&Je.getState().actions.switchCursor(e)}getSceneStructure(){return ln.getState().actions.export()}async loadSceneFromConfiguration(e){await ln.getState().actions.loadStructure(e);let t=Object.assign({},xK);t.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(t)}async loadSceneFromConfigurationID(e){const t=await ln.getState().actions.loadSavedStructureFromConfigID(e);if(!t)return null;ln.setState({defaultConfig:t});let n=Object.assign({},xK);n.label=`Preconfig ID: ${e}`,await this.loadSceneFromConfiguration(t)}viewInYourSpace(){Gt.info({title:"View in your space called from the Core API"});let e=Object.assign({},A5e);e.label="AR Requested",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e),this.#r.epigraphViewInYourSpaceRef._onViewInYourSpaceButtonClicked()}async shareScene(){const e=await this.generateShareableLink();let t=Object.assign({},TK);return t.parameters={shared_url:`${e}`,project_id:`${this.#t}`},this.sendAnalyticsEvent(t),e}async clearScene(){await ln.getState().attachmentSystem.clear()}async restartScene(){Gt.info({title:"Restarting Scene."}),await ln.getState().attachmentSystem.restart();let e=Object.assign({},y5e);e.label="Scene Restarted",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}areDimensionsVisible(){return Je.getState().showDimensions}getActiveHotspot(){return hi.getState().activeHotspotData}reviewCartShown(){let e=Object.assign({},h5e);e.label="Review Cart shown",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}reviewCartHidden(){let e=Object.assign({},f5e);e.label="Review Cart hidden",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}showDimensions(){Je.setState({showDimensions:!0});let e=Object.assign({},E5e);e.label="Dimensions shown",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}hideDimensions(){Je.setState({showDimensions:!1});let e=Object.assign({},S5e);e.label="Dimensions hidden",e.parameters={project_id:`${this.#t}`},this.sendAnalyticsEvent(e)}areHotspotsVisible(){return hi.getState().hotspotsVisibility}areHotspotsTemporarilyVisible(){return hi.getState().hotspotsTempVisibility}showAllHotspots(e=!1){hi.getState().actions.switchHotspotsVisibility(!0,e)}hideAllHotspots(e=!1){hi.getState().actions.switchHotspotsVisibility(!1,e)}getFittingSkuIds(){return ln.getState().attachmentSystem.getFittingSKUIDs()}selectItemWithGUID(e){const t=Wt.getState().itemsSpawned,n=ln.getState().attachmentSystem.currentStructure.getNodeByGUID(e);Wt.getState().actions.setSelectedItemData({...t[e],overrideVariant:n.overrideVariant,currentVariant:n.currentVariant,offsetX:0,offsetY:0})}async getCurrentCameraDetails(){return new Promise((e,t)=>{nt.coreWCRef.addEventListener(nt.EVENTS.CONFIGURATION.CameraDetails_Update,n=>{e(n.data)},{once:!0}),Cr.getState().actions.triggerFetchingCamera()})}moveCamera(e,t,n,i,a){hi.setState({isAnyHotspotActive:!0}),Cr.setState({manualControl:!0,sourcePos:e,destPos:t,interpolationFactor:n,duration:i}),a&&Cr.setState({focusPointPosition:a})}setEnvLightMap(e){tT.setState({envMapUrl:e})}updateInventoryForAllProducts(e){return this.#l===!1?(Gt.warn({title:"Inventory has been already updated once!"}),null):(Gd.getState().actions.updateInventoryForAllProducts(e),this.#l=!1,this.getInventoryInfo())}getInventoryInfo(){return Gd.getState().actions.getInventoryInfo()}updatePricingForAllProducts(e){Ln.getState().actions.updatePricingForAllProducts(e);const n=ln.getState().attachmentSystem.getCartItems();n&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,n)}updatePricingForProduct(e,t,n){Ln.getState().actions.updatePricingForProduct(e,t,n);const a=ln.getState().attachmentSystem.getCartItems();a&&nt.fireEvent(nt.EVENTS.SCENE.CartItems_Updated,a)}getCurrentPricingInfo(){return Ln.getState().actions.getCurrentPricingInfo()}async itemDragStart(e){if(Wt.getState().busy)return null;Je.setState({hoveredGhostIndex:-1}),await this.removeAllGhosts(),Je.setState({itemDraggedSkuID:e}),await this.spawnGhostsForSkuID(e,!1)}async itemDragEnd(){if(Wt.getState().busy)return null;const e=Je.getState().hoveredGhostIndex;e!==-1?await Wt.getState().actions.addItemBySkuID(Je.getState().itemDraggedSkuID,e):await this.removeAllGhosts(),Je.setState({itemDraggedSkuID:null,hoveredGhostIndex:-1})}async forceSpawnItem(e,t){const n=Ln.getState().productData,i=ln.getState().attachmentSystem;if(!i)return;const a=i.currentStructure;if(!a)return;let s=a.getNodeByGUID(t);s?(s._skuID=e,s.generatePlugsForNode(e)):(s=new vR(e,{guid:t,isEndNode:!0,overrideVariant:null,plugs:n[e].plugs}),a.addNode(s),a.connectPlugs({incomingPlug:new zH({name:"haha",acceptedPlugTypes:[],connectsToPlugTypes:[]},s),receiverPlug:a.rootNode.plugs[0]}));const o=await Wt.getState().actions.addItemWithTransform({position:new ve(0,0,0),rotation:new $i().identity()},e,t);return await gc(1),o}async downloadCurrentViewAsImage(e,t="png"){if(!e){Gt.warn({title:`Couldn't take screenshot for ${e}. Missing imageName parameter`});return}if(!t){Gt.warn({title:`Couldn't take screenshot for ${t}. Missing imageExtension parameter`});return}await gc(1);const n=await this.getCurrentViewAsImageUrl();await gc(1);let i;return n.success===!0&&(Gt.info({title:"Downloading the screenshot"}),i=document.createElement("a"),i.setAttribute("download",`${e}.${t}`),i.setAttribute("href",n.imageData),i.click(),Gt.info({title:"Screenshot download complete"})),i}async getCurrentViewAsImageUrl(){await gc(1);const e=await Je.getState().actions.requestNewScreenshot();return await gc(1),e}setCameraFocusPointPosition(e){Cr.setState({focusPointPosition:e})}triggerFetchingCamera(){Cr.getState().actions.triggerFetchingCamera()}async completeItemDrop(){await Je.getState().actions.completeDropItem()}revertItemDrop(){Je.getState().actions.revertDropItem()}getCameraFocusPointPosition(){return Cr.getState().focusPointPosition}sendAnalyticsPageViewedEvent(){}sendAnalyticsEvent(e){this.epigraphAnalytics!==null&&this.epigraphAnalytics.sendEvent(e)}isIosDevice(){return kre}actionButtonClicked(e){this.fireEvent(this.EVENTS.SCENE.ActionButton_Clicked,{data:e.actionButton.data,skuID:e.skuID,count:e.count,price:e.price,countAvailable:e.countAvailable,countUnavailable:e.countUnavailable,currentVariant:e.currentVariant})}setCartMessage(e){this.fireEvent(this.EVENTS.SCENE.CartMessage_Update,{cartMessage:e})}}class M5e extends HTMLElement{#e="wc-epigraph-configurator-core";#i=!1;#n=void 0;#r=void 0;initialConfigId="";clientAccessKey="";gaMeasurementId="";builderMode=!1;projectId="";api=null;constructor(){super(),this.attachShadow({mode:"open"}),hUe(new kR(this)),this.api=nt}get identifier(){return this.#e}static get observedAttributes(){}get epigraphViewInYourSpaceRef(){return this.#n}#a(){this.hasAttribute("configurator-wc-id")&&(this.configuratorWcId=this.getAttribute("configurator-wc-id")),this.hasAttribute("initial-config-id")&&(this.initialConfigId=this.getAttribute("initial-config-id")),this.hasAttribute("client-access-key")&&(this.clientAccessKey=this.getAttribute("client-access-key")),this.hasAttribute("ga-measurement-id")&&(this.gaMeasurementId=this.getAttribute("ga-measurement-id")),this.hasAttribute("builder-mode")&&(this.builderMode=!0),Gt.group("Collected Web Component Attributes"),Gt.table({initialConfigId:this.initialConfigId,clientAccessKey:this.clientAccessKey,builderMode:this.builderMode}),Gt.groupEnd()}static get observedAttributes(){return["view-in-your-space-elem-id"]}attributeChangedCallback(e,t,n){if(this.#r||(this.#r=document.querySelector(`#${this.configuratorWcId}`)),!!this.#r)switch(e){case"view-in-your-space-elem-id":this.#n=this.#r.shadowRoot.querySelector(`#${n}`),Gt.warn({title:"ViewInYourSpace is now accessible from the core: "});break}}async#s(e){return new Promise(function(t,n){let i=new XMLHttpRequest;i.withCredentials=!1,i.open("GET","https://api.seeitinyourspace.com/auth/"+e),i.setRequestHeader("Content-Type","application/json"),i.onreadystatechange=function(){if(this.readyState===4){const a=JSON.parse(this.responseText);Gt.warn({title:a}),t(a)}},i.onerror=function(){n({status:this.status,statusText:i.statusText})},i.send()})}async connectedCallback(){if(this.#i===!0)return;this.#a();const e=await this.#s(this.clientAccessKey);this.validationPassed=e.passed,this.projectId=e.projectID,this.api.projectId=this.projectId,nt.initializeAnalytics(this.gaMeasurementId);let t=Object.assign({},l5e);if(t.parameters={project_id:`${this.projectId}`},nt.sendAnalyticsEvent(t),this.validationPassed==="false"){Gt.error({title:"Request from an invalidated source: "+window.location.href}),nt.fireEvent("coreApi:failed");return}Gt.info({title:"VALIDATION SUCCESSFUL!"}),this.#i=!0,this.#r=document.querySelector(`#${this.configuratorWcId}`);let n=new URL(window.location).searchParams;n.has("epgsharedconfigid")&&(this.initialConfigId=n.get("epgsharedconfigid")),iB(this.shadowRoot).render(ne(hFe,{projectId:this.projectId,clientAccessKey:this.clientAccessKey,initialConfigId:this.initialConfigId,builderMode:this.builderMode,disableCart:this.hasAttribute("disable-cart")},void 0,!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/core/index.js",lineNumber:206,columnNumber:7},this))}disconnectedCallback(){nt.fireEvent("coreApi:shutDown")}}const v8=document.createElement("template");v8.id="fullScreenModalTemplate";v8.innerHTML=`
|
|
9318
9318
|
<style>
|
|
9319
9319
|
.full-screen-modal-container {
|
|
9320
9320
|
width: 100vw;
|
|
@@ -10085,4 +10085,4 @@ ${i.join(`
|
|
|
10085
10085
|
There was a problem while trying to initialise the configurator.
|
|
10086
10086
|
</div>
|
|
10087
10087
|
</div>
|
|
10088
|
-
`;class D5e extends HTMLElement{#e=void 0;clientAccessKey=null;validationPassed=!1;projectID="";configID="default";
|
|
10088
|
+
`;class D5e extends HTMLElement{#e=void 0;clientAccessKey=null;validationPassed=!1;projectID="";configID="default";gaMeasurementId="";#i=!1;#n=void 0;api={core:null,ui:null};constructor(){super(),this.api.ui=this,this.attachShadow({mode:"open"}),this.#r(),this.#a()}#r(){this.preloadDiv=document.createElement("div"),this.preloadDiv.id="preloadMainContainer",this.preloadDiv.classList.add("preload-main-container"),this.preloadDiv.classList.add("showPreload"),this.preloadDiv.appendChild(Fre.content.cloneNode(!0)),this.preloadDiv.appendChild(zre.content.cloneNode(!0)),this.shadowRoot.appendChild(this.preloadDiv)}#a(){this.hiccupUi=document.createElement("div"),this.hiccupUi.id="hiccupMainContainer",this.hiccupUi.classList.add("hiccup-ui-main-container"),this.hiccupUi.appendChild(Gre.content.cloneNode(!0)),this.hiccupUi.appendChild(Hre.content.cloneNode(!0)),this.shadowRoot.appendChild(this.hiccupUi)}#s(){window.customElements.define("epigraph-configurator-core",M5e)}#l(){window.customElements.define("view-in-your-space",I5e)}#o(){this._epigraphLoggerScriptElem=document.createElement("script"),this._epigraphLoggerScriptElem.setAttribute("src",N5e),this._epigraphLoggerScriptElem.setAttribute("id","epigraphLoggerScript"),document.head.appendChild(this._epigraphLoggerScriptElem),this._epigraphLoggerScriptElem.addEventListener("load",()=>{})}get configuratorWcId(){return this.#e}#t(){this.hasAttribute("id")?this.#e=this.getAttribute("id"):(this.setAttribute("id","epigraphConfiguratorWc"),this.#e=this.getAttribute("id")),(this.hasAttribute("ga-measurement-id")||this.hasAttribute("ga-code"))&&(this.gaMeasurementId=this.getAttribute("ga-measurement-id")??this.getAttribute("ga-code")),this.clientAccessKey=this.getAttribute("client-access-key"),this.initialConfigId=this.getAttribute("initial-config-id"),this.initialConfigId||(this.initialConfigId="default")}async connectedCallback(){if(this.#i===!0){console.warn("Tried to remount configurator. Blocking the process.");return}this.#t(),this.#s(),console.log("Imported core"),this.#l(),console.log("Imported VIYS"),this.style.maxWidth="1440px",this.style.maxHeight="800px",this.style.overflow="hidden",this.style.width="100%",this.style.height="100%",this.style.position="relative",this.style.visibility="visible",this.style.display="flex";const e=document.createElement("div");e.id="configuratorContainer",e.style.width="100%",e.style.height="100%",e.style.userSelect="none",e.style.overflow="hidden",this.shadowRoot.appendChild(e),iB(e).render(ne(F2e,{disableUI:this.hasAttribute("disable-ui"),launchInAR:this.hasAttribute("launch-in-ar"),disableCart:this.hasAttribute("disable-cart"),gaMeasurementId:this.gaMeasurementId,configuratorWcRef:this},"Configurator-App",!1,{fileName:"C:/Users/Tanay/Desktop/TANAY/GIT_REPOS/epigraph-configurator/src/ui/index.js",lineNumber:363,columnNumber:7},this)),this.#i=!0}showPreloadScreen(){this.preloadDiv.classList.remove("no-pointer-events"),this.preloadDiv.classList.add("showPreload")}async hidePreloadScreen(){this.preloadDiv.classList.remove("showPreload"),await QX(1e3),this.preloadDiv.classList.add("no-pointer-events")}showHiccupScreen(){this.hiccupUi.classList.remove("no-pointer-events"),this.hiccupUi.classList.add("show-hiccup")}async hideHiccupScreen(){this.hiccupUi.classList.remove("show-hiccup"),await QX(1e3),this.hiccupUi.classList.add("no-pointer-events")}}window.customElements.define("epigraph-configurator",D5e);
|