js-cloudimage-360-view 4.5.3 → 4.6.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/README.md +28 -20
- package/dist/js-cloudimage-360-view.min.js +15 -15
- package/dist/react/ci360-23B4uCh0.mjs +3206 -0
- package/dist/react/ci360-23B4uCh0.mjs.map +1 -0
- package/dist/react/ci360-D-8A9XyP.js +65 -0
- package/dist/react/ci360-D-8A9XyP.js.map +1 -0
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.ts +34 -6
- package/dist/react/index.js +201 -167
- package/dist/react/index.js.map +1 -1
- package/dist/react/style.css +1 -1
- package/package.json +1 -1
- package/src/react/types.d.ts +34 -6
- package/src/types/ci360.d.ts +63 -11
- package/dist/react/ci360-CAu4PLFX.mjs +0 -3106
- package/dist/react/ci360-CAu4PLFX.mjs.map +0 -1
- package/dist/react/ci360-keaPW9wo.js +0 -65
- package/dist/react/ci360-keaPW9wo.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var CI360=function(){"use strict";var bn=Object.defineProperty;var yn=(Q,B,rt)=>B in Q?bn(Q,B,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Q[B]=rt;var ui=(Q,B,rt)=>yn(Q,typeof B!="symbol"?B+"":B,rt);var Q=document.createElement("style");Q.textContent=`:root{--ci360-button-bg: rgba(255, 255, 255, .9);--ci360-button-bg-hover: rgba(255, 255, 255, 1);--ci360-button-size: 40px;--ci360-button-border-radius: 6px;--ci360-button-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci360-icon-color: #505050;--ci360-icon-color-hover: #333333;--ci360-icon-size: 20px;--ci360-initial-icon-bg: transparent;--ci360-initial-icon-color: #ffffff;--ci360-initial-icon-size: 100px;--ci360-initial-icon-shadow: none;--ci360-spinner-color: rgba(0, 0, 0, .2);--ci360-spinner-accent: #505050;--ci360-spinner-size: 30px;--ci360-fullscreen-bg: #ffffff;--ci360-magnifier-size: 250px;--ci360-magnifier-border: 2px solid rgba(0, 0, 0, .2);--ci360-magnifier-shadow: 0 8px 16px rgba(0, 0, 0, .3);--ci360-focus-color: #0066cc;--ci360-overlay-bg: rgba(255, 255, 255, 1);--ci360-hotspot-marker-size: 24px;--ci360-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci360-hotspot-marker-color: #1a1a1a;--ci360-hotspot-marker-border-width: 2px;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci360-hotspot-marker-border: var(--ci360-hotspot-marker-border-width) solid var(--ci360-hotspot-marker-border-color);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci360-hotspot-pulse-color: rgba(0, 0, 0, .15);--ci360-hotspot-pulse-size: 40px;--ci360-hotspot-pulse-duration: 1.8s;--ci360-hotspot-brand-color: #00aaff;--ci360-popper-bg: #ffffff;--ci360-popper-color: #1a1a1a;--ci360-popper-border: 1px solid rgba(0, 0, 0, .1);--ci360-popper-border-radius: 12px;--ci360-popper-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci360-popper-padding: 16px;--ci360-popper-max-width: 320px;--ci360-popper-font-size: 14px;--ci360-popper-line-height: 1.5;--ci360-popper-title-font-size: 16px;--ci360-popper-title-font-weight: 600;--ci360-popper-title-color: #1a1a1a;--ci360-popper-price-color: #2d8c3c;--ci360-popper-price-font-size: 18px;--ci360-popper-price-font-weight: 700;--ci360-popper-original-price-color: #999999;--ci360-popper-description-color: #666666;--ci360-popper-cta-bg: #0058a3;--ci360-popper-cta-color: #fff;--ci360-popper-cta-border-radius: 8px;--ci360-popper-cta-padding: 8px 16px;--ci360-hints-bg: rgba(255, 255, 255, .9);--ci360-hints-color: #333333;--ci360-hints-font-size: 13px;--ci360-hints-border-radius: 20px;--ci360-hints-shadow: 0 2px 12px rgba(0, 0, 0, .1);--ci360-circle-color: #888888;--ci360-timeline-height: 6px;--ci360-timeline-track-bg: rgba(255, 255, 255, .4);--ci360-timeline-dot-size: 18px;--ci360-timeline-dot-color: var(--ci360-hotspot-marker-bg);--ci360-timeline-dot-active-color: var(--ci360-hotspot-brand-color);--ci360-timeline-dot-border: 2px solid #fff;--ci360-timeline-indicator-size: 12px;--ci360-timeline-indicator-color: var(--ci360-hotspot-brand-color);--ci360-timeline-tooltip-bg: rgba(255, 255, 255, .95);--ci360-timeline-tooltip-color: #333333}.ci360-theme-dark{--ci360-button-bg: rgba(40, 40, 45, .9);--ci360-button-bg-hover: rgba(55, 55, 60, .95);--ci360-button-shadow: 0 2px 8px rgba(0, 0, 0, .4);--ci360-icon-color: #e0e0e0;--ci360-icon-color-hover: #ffffff;--ci360-initial-icon-bg: transparent;--ci360-initial-icon-color: #ffffff;--ci360-initial-icon-shadow: none;--ci360-spinner-color: rgba(255, 255, 255, .2);--ci360-spinner-accent: #e0e0e0;--ci360-fullscreen-bg: #1a1a1f;--ci360-overlay-bg: rgba(26, 26, 31, 1);--ci360-magnifier-border: 2px solid rgba(255, 255, 255, .2);--ci360-magnifier-shadow: 0 8px 16px rgba(0, 0, 0, .5);--ci360-popper-bg: #1a1a1a;--ci360-popper-color: #f0f0f0;--ci360-popper-border: 1px solid rgba(255, 255, 255, .1);--ci360-popper-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci360-popper-title-color: #f0f0f0;--ci360-popper-description-color: #aaaaaa;--ci360-popper-original-price-color: #777777;--ci360-hints-bg: rgba(40, 40, 45, .9);--ci360-hints-color: #e0e0e0;--ci360-hints-shadow: 0 2px 12px rgba(0, 0, 0, .3);--ci360-circle-color: #b0b0b0;--ci360-timeline-track-bg: rgba(255, 255, 255, .4);--ci360-timeline-dot-border: 2px solid rgba(255, 255, 255, .9);--ci360-timeline-indicator-color: var(--ci360-hotspot-brand-color);--ci360-timeline-tooltip-bg: rgba(40, 40, 45, .95);--ci360-timeline-tooltip-color: #e0e0e0;--ci360-loader-bg: rgba(40, 40, 45, .9);--ci360-loader-color: #e0e0e0;--ci360-loader-shadow: 0 4px 20px rgba(0, 0, 0, .4);--ci360-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .6);--ci360-hotspot-pulse-color: rgba(255, 255, 255, .15);--ci360-timeline-dot-color: var(--ci360-hotspot-marker-bg)}.ci360-hotspot-marker-inverted{--ci360-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci360-hotspot-pulse-color: rgba(0, 0, 0, .2)}.ci360-theme-dark.ci360-hotspot-marker-inverted{--ci360-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci360-hotspot-marker-color: #1a1a1a;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci360-hotspot-pulse-color: rgba(255, 255, 255, .2)}.ci360-hotspot-marker-brand{--ci360-hotspot-marker-bg: var(--ci360-hotspot-brand-color);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .9);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .25);--ci360-hotspot-pulse-color: var(--ci360-hotspot-brand-color)}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cloudimage-360{width:100%;position:relative}.cloudimage-360-inner-box{width:100%;position:relative;overflow:hidden}.cloudimage-360-icons-container{position:absolute;display:flex;top:15px;right:10px;height:100%;flex-direction:column;align-items:center;z-index:100;gap:8px}.cloudimage-360-transition-overlay{position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--ci360-overlay-bg);opacity:0;transition:all 1s ease-out;z-index:10}.cloudimage-360-button{width:var(--ci360-button-size);height:var(--ci360-button-size);cursor:pointer;transition:transform .15s ease-out,background-color .15s ease-out,box-shadow .15s ease-out;display:flex;align-items:center;justify-content:center;border-radius:var(--ci360-button-border-radius);border:none;background-color:var(--ci360-button-bg);box-shadow:var(--ci360-button-shadow);padding:6px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-button:hover{transform:scale(1.05);background-color:var(--ci360-button-bg-hover)}.cloudimage-360-button:focus{outline:none}.cloudimage-360-button:focus-visible{outline:2px solid var(--ci360-focus-color);outline-offset:2px}.cloudimage-360-button svg{width:var(--ci360-icon-size);height:var(--ci360-icon-size);stroke:var(--ci360-icon-color);transition:stroke .15s ease-out}.cloudimage-360-button:hover svg{stroke:var(--ci360-icon-color-hover)}.cloudimage-initial-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ci360-initial-icon-size);aspect-ratio:150 / 87;border-radius:var(--ci360-initial-icon-border-radius, 0);background-color:var(--ci360-initial-icon-bg);box-shadow:var(--ci360-initial-icon-shadow);transition:all .3s ease;color:var(--ci360-initial-icon-color);display:flex;align-items:center;justify-content:center;z-index:2;-webkit-user-select:none;-moz-user-select:none;user-select:none}.cloudimage-initial-icon svg{width:100%;height:auto;color:var(--ci360-initial-icon-color);fill:var(--ci360-initial-icon-color);filter:drop-shadow(0 2px 4px rgba(0,0,0,.4))}.cloudimage-initial-icon:hover{transform:translate(-50%,-50%) scale(1.08)}.cloudimage-360-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ci360-loader-size, 70px);height:var(--ci360-loader-size, 70px);border-radius:50%;background-color:var(--ci360-loader-bg, rgba(255, 255, 255, .9));box-shadow:var(--ci360-loader-shadow, 0 4px 20px rgba(0, 0, 0, .15));transition:all .3s ease;color:var(--ci360-loader-color, #505050);display:flex;align-items:center;justify-content:center;z-index:2;-webkit-user-select:none;-moz-user-select:none;user-select:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:system-ui,-apple-system,sans-serif;font-size:14px;font-weight:600}.cloudimage-loading-spinner{width:var(--ci360-spinner-size);height:var(--ci360-spinner-size);transform:translate(-50%,-50%);border:3px solid var(--ci360-spinner-color);position:absolute;top:15px;left:15px;border-bottom-color:var(--ci360-spinner-accent);border-radius:50%;display:inline-block;box-sizing:border-box;opacity:0;animation:rotation .7s linear infinite}.cloudimage-360-view-360-circle{position:absolute;left:0;bottom:0;width:100%;height:auto;margin:auto;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:.2s all;z-index:2;color:var(--ci360-circle-color)}.cloudimage-360-view-360-circle svg{display:block;width:100%;height:auto}.cloudimage-360-fullscreen-modal{position:fixed;top:0;bottom:0;left:0;right:0;width:100%;height:100%;z-index:999;background-color:var(--ci360-fullscreen-bg)}.cloudimage-360-fullscreen-modal .cloudimage-360-inner-box{height:100%}.cloudimage-360-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cloudimage-360-hints-overlay{position:absolute;bottom:0;left:0;width:100%;display:flex;align-items:flex-end;justify-content:center;padding-bottom:16px;z-index:50;pointer-events:none;opacity:0;transition:opacity .3s ease}.cloudimage-360-hints-overlay.visible{opacity:1}.cloudimage-360-hints-overlay.hiding{opacity:0}.cloudimage-360-hints-container{display:flex;flex-direction:row;gap:20px;padding:10px 20px;background:var(--ci360-hints-bg);border-radius:var(--ci360-hints-border-radius);box-shadow:var(--ci360-hints-shadow);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-hint-item{display:flex;align-items:center;gap:8px;color:var(--ci360-hints-color);font-size:var(--ci360-hints-font-size);font-family:system-ui,-apple-system,sans-serif;white-space:nowrap}.cloudimage-360-hint-item svg{width:16px;height:16px;flex-shrink:0;stroke:var(--ci360-hints-color)}.cloudimage-360-hint-item span{opacity:.9}@media (max-width: 480px){.cloudimage-360-hints-container{flex-direction:column;gap:8px;padding:12px 16px;border-radius:12px}.cloudimage-360-hint-item{font-size:12px}.cloudimage-360-hint-item svg{width:14px;height:14px}.cloudimage-360-initial-icon{width:calc(var(--ci360-initial-icon-size) * .8);height:calc(var(--ci360-initial-icon-size) * .8)}}.cloudimage-360-inner-box.has-hotspot-timeline .cloudimage-360-hints-overlay{padding-bottom:56px}.cloudimage-360-img-magnifier-glass{background-color:#fff;background-image:radial-gradient(circle at center,#fffc,#f0f0f0e6);background-repeat:no-repeat;position:absolute;border:var(--ci360-magnifier-border);border-radius:50%;line-height:200px;text-align:center;z-index:1000;width:var(--ci360-magnifier-size);height:var(--ci360-magnifier-size);top:-75px;right:-85px;box-shadow:var(--ci360-magnifier-shadow);transition:box-shadow .2s ease;overflow:hidden;pointer-events:none}.cloudimage-360-hotspot-timeline{position:absolute;bottom:0;left:0;right:0;width:100%;padding:20px;opacity:0;transition:opacity .3s ease;pointer-events:none;z-index:30;background:linear-gradient(to top,rgba(0,0,0,.45) 0%,rgba(0,0,0,.2) 60%,transparent 100%)}.cloudimage-360-hotspot-timeline.visible{opacity:1;pointer-events:auto}.cloudimage-360-hotspot-timeline-track{position:relative;width:100%;max-width:500px;margin:0 auto;height:var(--ci360-timeline-height);background:var(--ci360-timeline-track-bg);border-radius:calc(var(--ci360-timeline-height) / 2)}.cloudimage-360-hotspot-timeline-indicator{position:absolute;top:50%;left:0;width:var(--ci360-timeline-indicator-size);height:var(--ci360-timeline-indicator-size);background:var(--ci360-timeline-indicator-color);border-radius:50%;transform:translate(-50%,-50%);transition:left .1s ease-out;pointer-events:none;box-shadow:0 2px 4px #0003}.cloudimage-360-hotspot-timeline-dot{position:absolute;top:50%;width:var(--ci360-timeline-dot-size);height:var(--ci360-timeline-dot-size);background:var(--ci360-timeline-dot-color);border:var(--ci360-timeline-dot-border);border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:transform .15s ease,background .2s ease,box-shadow .2s ease;box-shadow:0 1px 4px #00000026;padding:0;font:inherit;outline:none}.cloudimage-360-hotspot-timeline-dot:hover{transform:translate(-50%,-50%) scale(1.15);box-shadow:0 2px 8px #0003}.cloudimage-360-hotspot-timeline-dot.active{background:var(--ci360-timeline-dot-color);box-shadow:0 1px 4px #00000026}.cloudimage-360-hotspot-timeline-dot:focus-visible{outline:2px solid var(--ci360-focus-color);outline-offset:2px}.cloudimage-360-hotspot-timeline-tooltip{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translate(-50%);background:var(--ci360-timeline-tooltip-bg);color:var(--ci360-timeline-tooltip-color);padding:6px 12px;border-radius:6px;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;pointer-events:none;box-shadow:0 2px 8px #00000026;z-index:10}.cloudimage-360-hotspot-timeline-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:6px solid transparent;border-top-color:var(--ci360-timeline-tooltip-bg)}.cloudimage-360-hotspot-timeline-tooltip.visible{opacity:1;visibility:visible}@media (max-width: 480px){.cloudimage-360-hotspot-timeline{padding:14px 16px}}.cloudimage-360-fullscreen-modal .cloudimage-360-hotspot-timeline{padding:24px 40px 20px;background:linear-gradient(to top,rgba(0,0,0,.6) 0%,rgba(0,0,0,.3) 60%,transparent 100%)}.cloudimage-360-fullscreen-modal .cloudimage-360-hotspot-timeline-track{max-width:600px;background:#ffffff4d}.cloudimage-360-fullscreen-modal .cloudimage-360-hotspot-timeline-indicator{background:var(--ci360-hotspot-brand-color);box-shadow:0 2px 6px #0006}.cloudimage-360-fullscreen-modal .cloudimage-360-hotspot-timeline-dot{background:var(--ci360-timeline-dot-color);border-color:#fff;box-shadow:0 1px 6px #0000004d}.cloudimage-360-fullscreen-modal .cloudimage-360-hotspot-timeline-tooltip{bottom:calc(100% + 20px)}.cloudimage-360-fullscreen-modal .cloudimage-360-inner-box.has-hotspot-timeline .cloudimage-360-hints-overlay{padding-bottom:64px}.cloudimage-360-hotspot-container{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:20}.cloudimage-360-popper{opacity:1;transition:opacity .2s ease-in-out}.cloudimage-360-hotspot{display:inline-block;position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-50%,-50%);background:var(--ci360-hotspot-marker-bg);border:var(--ci360-hotspot-marker-border);border-radius:50%;height:var(--ci360-hotspot-marker-size);width:var(--ci360-hotspot-marker-size);box-shadow:var(--ci360-hotspot-marker-shadow);opacity:0;transition:transform .2s ease,box-shadow .2s ease;padding:0;cursor:pointer;font:inherit;outline:none}.cloudimage-360-hotspot:focus-visible{outline:2px solid var(--ci360-focus-color, #0066cc);outline-offset:2px}.cloudimage-360-hotspot.visible{opacity:1}.cloudimage-360-hotspot--pulse{overflow:visible}.cloudimage-360-hotspot--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci360-hotspot-pulse-size);height:var(--ci360-hotspot-pulse-size);border-radius:50%;background:var(--ci360-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci360-pulse-ring var(--ci360-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci360-pulse-ring{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.cloudimage-360-hotspot--pulse{animation:ci360-breathe 2.4s ease-in-out infinite}@keyframes ci360-breathe{0%,to{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(1.15)}}.cloudimage-360-hotspot--pulse:hover,.cloudimage-360-hotspot--pulse:focus-visible{animation:none}.cloudimage-360-hotspot--dot-label{animation:none}.cloudimage-360-hotspot-label{position:absolute;left:calc(50% + var(--ci360-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci360-hotspot-marker-color);background:var(--ci360-hotspot-marker-bg);border:var(--ci360-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci360-hotspot-marker-shadow);pointer-events:none}.cloudimage-360-hotspot--dot-label:hover{transform:translate(-50%,-50%);box-shadow:0 4px 12px #0006}.cloudimage-360-hotspot:hover{transform:translate(-50%,-50%) scale(1.2);box-shadow:0 4px 12px #0006}@media (prefers-reduced-motion: reduce){.cloudimage-360-hotspot--pulse{animation:none}.cloudimage-360-hotspot--pulse:before{animation:none}}.cloudimage-360-popper{background:var(--ci360-popper-bg);color:var(--ci360-popper-color);border:var(--ci360-popper-border);padding:var(--ci360-popper-padding);border-radius:var(--ci360-popper-border-radius);box-shadow:var(--ci360-popper-shadow);font-family:system-ui,-apple-system,sans-serif;font-size:var(--ci360-popper-font-size);line-height:var(--ci360-popper-line-height);max-width:var(--ci360-popper-max-width);z-index:9999;text-align:left;transition:opacity .2s ease;opacity:0}.cloudimage-360-popper[data-show]{opacity:1}.ci360-popper-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci360-popper-border-radius) - 4px) calc(var(--ci360-popper-border-radius) - 4px) 0 0;margin:calc(var(--ci360-popper-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci360-popper-padding) * 2)}.ci360-popper-image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.ci360-popper-body{line-height:1.5;text-align:left}.ci360-popper-title{margin:0 0 4px;font-size:var(--ci360-popper-title-font-size);font-weight:var(--ci360-popper-title-font-weight);color:var(--ci360-popper-title-color);line-height:1.3}.ci360-popper-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci360-popper-price{font-size:var(--ci360-popper-price-font-size);font-weight:var(--ci360-popper-price-font-weight);color:var(--ci360-popper-price-color)}.ci360-popper-price-row .ci360-popper-price{margin-bottom:0}.ci360-popper-original-price{font-size:calc(var(--ci360-popper-price-font-size) - 2px);font-weight:500;color:var(--ci360-popper-original-price-color);text-decoration:line-through}.ci360-popper-description{margin:0 0 12px;color:var(--ci360-popper-description-color)}.ci360-popper-cta{display:inline-block;padding:var(--ci360-popper-cta-padding);background:var(--ci360-popper-cta-bg);color:var(--ci360-popper-cta-color);border-radius:var(--ci360-popper-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci360-popper-cta:hover{opacity:.9}button.ci360-popper-cta{cursor:pointer;border:none;font:inherit;width:100%}.ci360-popper-cta:focus-visible{outline:3px solid var(--ci360-focus-color, #0066cc);outline-offset:2px}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Q);var B=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fe="Expected a function",ge=NaN,mi="[object Symbol]",fi=/^\s+|\s+$/g,gi=/^[-+]0x[0-9a-f]+$/i,vi=/^0b[01]+$/i,bi=/^0o[0-7]+$/i,yi=parseInt,wi=typeof B=="object"&&B&&B.Object===Object&&B,xi=typeof self=="object"&&self&&self.Object===Object&&self,Ci=wi||xi||Function("return this")(),Ii=Object.prototype,ki=Ii.toString,Oi=Math.max,Ei=Math.min,Gt=function(){return Ci.Date.now()};function Ai(e,t,i){var o,s,n,l,a,r,h=0,c=!1,p=!1,f=!0;if(typeof e!="function")throw new TypeError(fe);t=ve(t)||0,Pt(i)&&(c=!!i.leading,p="maxWait"in i,n=p?Oi(ve(i.maxWait)||0,t):n,f="trailing"in i?!!i.trailing:f);function u(m){var b=o,C=s;return o=s=void 0,h=m,l=e.apply(C,b),l}function x(m){return h=m,a=setTimeout(I,t),c?u(m):l}function y(m){var b=m-r,C=m-h,E=t-b;return p?Ei(E,n-C):E}function g(m){var b=m-r,C=m-h;return r===void 0||b>=t||b<0||p&&C>=n}function I(){var m=Gt();if(g(m))return O(m);a=setTimeout(I,y(m))}function O(m){return a=void 0,f&&o?u(m):(o=s=void 0,l)}function w(){a!==void 0&&clearTimeout(a),h=0,o=r=s=a=void 0}function v(){return a===void 0?l:O(Gt())}function k(){var m=Gt(),b=g(m);if(o=arguments,s=this,r=m,b){if(a===void 0)return x(r);if(p)return a=setTimeout(I,t),u(r)}return a===void 0&&(a=setTimeout(I,t)),l}return k.cancel=w,k.flush=v,k}function Si(e,t,i){var o=!0,s=!0;if(typeof e!="function")throw new TypeError(fe);return Pt(i)&&(o="leading"in i?!!i.leading:o,s="trailing"in i?!!i.trailing:s),Ai(e,t,{leading:o,maxWait:t,trailing:s})}function Pt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ti(e){return!!e&&typeof e=="object"}function Li(e){return typeof e=="symbol"||Ti(e)&&ki.call(e)==mi}function ve(e){if(typeof e=="number")return e;if(Li(e))return ge;if(Pt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Pt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(fi,"");var i=vi.test(e);return i||bi.test(e)?yi(e.slice(2),i?2:8):gi.test(e)?ge:+e}var Pi=Si;const be=rt(Pi),Y={SPIN_X:"spin-x",SPIN_Y:"spin-y",SPIN_XY:"spin-xy",SPIN_YX:"spin-yx"},Mi=[!1,0,null,void 0,"false","0","null","undefined"],P={X:"x-axis",Y:"y-axis"},Ri=[37,39],Yi=[38,40],ye=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?32:10,Hi=150,Mt=800,Xi=150,Zi=200,we=50,Di=50,zi=5,xe=5,d={folder:"/",apiVersion:"v7",filenameX:"image-{index}.jpg",filenameY:null,imageListX:null,imageListY:null,indexZeroBase:0,amountX:0,amountY:0,speed:80,dragSpeed:150,draggable:!0,swipeable:!0,keys:!1,keysReverse:!1,autoplay:!1,autoplayBehavior:Y.SPIN_X,playOnce:!1,autoplayReverse:!1,pointerZoom:0,pointerZoomTrigger:"dblclick",fullscreen:!1,magnifier:null,bottomCircle:!0,bottomCircleOffset:5,ciToken:null,ciFilters:null,ciTransformation:null,lazyload:!0,dragReverse:!1,stopAtEdges:!1,imageInfo:!1,initialIconShown:!0,hotspots:null,hotspotTrigger:"hover",hide360Logo:!1,logoSrc:null,inertia:!1,pinchZoom:!0,hints:!0,theme:null,markerTheme:null,brandColor:null,hotspotTimelineOnClick:!0,aspectRatio:null,cropAspectRatio:null,cropGravity:null,onReady:null,onLoad:null,onSpin:null,onAutoplayStart:null,onAutoplayStop:null,onFullscreenOpen:null,onFullscreenClose:null,onZoomIn:null,onZoomOut:null,onDragStart:null,onDragEnd:null,onHotspotOpen:null,onHotspotClose:null,onProductClick:null},Bi=e=>({folder:A(e,"folder",d.folder),apiVersion:A(e,"api-version",d.apiVersion),filenameX:A(e,"filename")||A(e,"filename-x")||d.filenameX,filenameY:A(e,"filename-y",d.filenameY),imageListX:A(e,"image-list-x",d.imageListX),imageListY:A(e,"image-list-y",d.imageListY),indexZeroBase:parseInt(A(e,"index-zero-base",d.indexZeroBase),10),amountX:parseInt(A(e,"amount-x",d.amountX),10),amountY:parseInt(A(e,"amount-y",d.amountY),10),speed:parseInt(A(e,"speed",d.speed),10),dragSpeed:parseInt(A(e,"drag-speed",d.dragSpeed),10),draggable:M(e,"draggable",d.draggable),swipeable:M(e,"swipeable",d.swipeable),keys:M(e,"keys",d.keys),keysReverse:M(e,"keys-reverse",d.keysReverse),autoplay:M(e,"autoplay",d.autoplay),autoplayBehavior:A(e,"autoplay-behavior",d.autoplayBehavior),playOnce:M(e,"play-once",d.playOnce),autoplayReverse:M(e,"autoplay-reverse",d.autoplayReverse),pointerZoom:parseFloat(A(e,"pointer-zoom",d.pointerZoom)),pointerZoomTrigger:A(e,"pointer-zoom-trigger",d.pointerZoomTrigger),fullscreen:M(e,"fullscreen")||M(e,"full-screen",d.fullscreen),magnifier:parseFloat(A(e,"magnifier",d.magnifier)),bottomCircleOffset:parseInt(A(e,"bottom-circle-offset",d.bottomCircleOffset),10),ciToken:A(e,"responsive",d.ciToken),ciFilters:A(e,"filters",d.ciFilters),ciTransformation:A(e,"transformation",d.ciTransformation),lazyload:M(e,"lazyload",d.lazyload),dragReverse:M(e,"drag-reverse",d.dragReverse),stopAtEdges:M(e,"stop-at-edges",d.stopAtEdges),imageInfo:M(e,"info",d.imageInfo),initialIconShown:!Rt(e,"initial-icon"),bottomCircle:!Rt(e,"bottom-circle"),hide360Logo:M(e,"hide-360-logo",d.hide360Logo),logoSrc:A(e,"logo-src",d.logoSrc),inertia:M(e,"inertia",d.inertia),pinchZoom:M(e,"pinch-zoom",d.pinchZoom),hints:!Rt(e,"hints"),theme:A(e,"theme",d.theme),markerTheme:A(e,"marker-theme",d.markerTheme),brandColor:A(e,"brand-color",d.brandColor),hotspotTrigger:A(e,"hotspot-trigger",d.hotspotTrigger),hotspotTimelineOnClick:!Rt(e,"hotspot-timeline-on-click"),aspectRatio:A(e,"aspect-ratio",d.aspectRatio),cropAspectRatio:A(e,"crop-aspect-ratio",d.cropAspectRatio),cropGravity:A(e,"crop-gravity",d.cropGravity)}),Wi=e=>{const t=[];e.amountX!==void 0&&e.amountX<0&&t.push("amountX should be a positive number"),e.amountY!==void 0&&e.amountY<0&&t.push("amountY should be a positive number"),e.speed!==void 0&&e.speed<=0&&t.push("speed should be a positive number"),e.dragSpeed!==void 0&&e.dragSpeed<=0&&t.push("dragSpeed should be a positive number"),e.pointerZoom!==void 0&&e.pointerZoom!==0&&(e.pointerZoom<1||e.pointerZoom>5)&&t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"),e.magnifier!==void 0&&e.magnifier!==null&&e.magnifier!==0&&(e.magnifier<1||e.magnifier>5)&&t.push("magnifier should be between 1 and 5 (or 0/null to disable)"),!e.folder&&!e.imageListX&&!e.imageListY&&t.push("Either folder or imageListX/imageListY is required"),e.folder&&!e.amountX&&!e.imageListX&&t.push("amountX is required when using folder (unless imageListX is provided)");const i=["spin-x","spin-y","spin-xy","spin-yx"];return e.autoplayBehavior&&!i.includes(e.autoplayBehavior)&&t.push(`autoplayBehavior should be one of: ${i.join(", ")}`),t.forEach(o=>{console.warn(`CloudImage 360: ${o}`)}),t.length===0},Fi=e=>(Wi(e),{folder:e.folder||d.folder,apiVersion:e.apiVersion||d.apiVersion,filenameX:e.filenameX||e.filename||d.filenameX,filenameY:e.filenameY||d.filenameY,imageListX:e.imageListX||d.imageListX,imageListY:e.imageListY||d.imageListY,indexZeroBase:parseInt(e.indexZeroBase??d.indexZeroBase,10),amountX:parseInt(e.amountX??d.amountX,10),amountY:parseInt(e.amountY??d.amountY,10),speed:parseInt(e.speed??d.speed,10),draggable:e.draggable??d.draggable,swipeable:e.swipeable??d.swipeable,dragSpeed:parseInt(e.dragSpeed??d.dragSpeed,10),keys:e.keys??d.keys,keysReverse:e.keysReverse??d.keysReverse,autoplay:e.autoplay??d.autoplay,autoplayBehavior:e.autoplayBehavior||d.autoplayBehavior,playOnce:e.playOnce??d.playOnce,autoplayReverse:e.autoplayReverse??d.autoplayReverse,pointerZoom:parseFloat(e.pointerZoom??d.pointerZoom),pointerZoomTrigger:e.pointerZoomTrigger||d.pointerZoomTrigger,fullscreen:e.fullscreen??d.fullscreen,magnifier:parseFloat(e.magnifier??d.magnifier),bottomCircleOffset:parseInt(e.bottomCircleOffset??d.bottomCircleOffset,10),ciToken:e.ciToken||d.ciToken,ciFilters:e.ciFilters||d.ciFilters,ciTransformation:e.ciTransformation||d.ciTransformation,lazyload:e.lazyload??d.lazyload,dragReverse:e.dragReverse??d.dragReverse,stopAtEdges:e.stopAtEdges??d.stopAtEdges,imageInfo:e.imageInfo??d.imageInfo,initialIconShown:e.initialIconShown??d.initialIconShown,bottomCircle:e.bottomCircle??d.bottomCircle,hotspots:e.hotspots??d.hotspots,hotspotTrigger:e.hotspotTrigger||d.hotspotTrigger,hide360Logo:e.hide360Logo??d.hide360Logo,logoSrc:e.logoSrc||d.logoSrc,inertia:e.inertia??d.inertia,pinchZoom:e.pinchZoom??d.pinchZoom,hints:e.hints??d.hints,theme:e.theme||d.theme,markerTheme:e.markerTheme||d.markerTheme,brandColor:e.brandColor||d.brandColor,hotspotTimelineOnClick:e.hotspotTimelineOnClick??d.hotspotTimelineOnClick,aspectRatio:e.aspectRatio||d.aspectRatio,cropAspectRatio:e.cropAspectRatio||d.cropAspectRatio,cropGravity:e.cropGravity||d.cropGravity,onReady:e.onReady??d.onReady,onLoad:e.onLoad??d.onLoad,onSpin:e.onSpin??d.onSpin,onAutoplayStart:e.onAutoplayStart??d.onAutoplayStart,onAutoplayStop:e.onAutoplayStop??d.onAutoplayStop,onFullscreenOpen:e.onFullscreenOpen??d.onFullscreenOpen,onFullscreenClose:e.onFullscreenClose??d.onFullscreenClose,onZoomIn:e.onZoomIn??d.onZoomIn,onZoomOut:e.onZoomOut??d.onZoomOut,onDragStart:e.onDragStart??d.onDragStart,onDragEnd:e.onDragEnd??d.onDragEnd,onHotspotOpen:e.onHotspotOpen??d.onHotspotOpen,onHotspotClose:e.onHotspotClose??d.onHotspotClose,onProductClick:e.onProductClick??d.onProductClick}),A=(e,t,i)=>e.getAttribute(t)||e.getAttribute(`data-${t}`)||i,M=(e,t,i)=>{if(!(e.hasAttribute(t)||e.hasAttribute(`data-${t}`)))return i;const s=A(e,t,null);return s!=="false"&&s!=="0"},Rt=(e,t)=>A(e,t,null)==="false",Vi=(e=1)=>{const t=Math.round(window.devicePixelRatio||1);return parseInt(e)*t},Ni=(e,t,i)=>new URL(e).origin.includes("cloudimg")?e:`https://${t}.cloudimg.io/${i}${e}`,Ce=(e,t)=>e?`ar=${e}&gravity=${t||"auto"}`:"",$i=({ciTransformation:e,responsiveWidth:t,ciFilters:i})=>{const o=`width=${t}`,s=e||o,n=i?`&f=${i}`:"";return`${s}${n}`},yt=(e,t)=>{const{folder:i,apiVersion:o,filename:s="",ciParams:n}=e,{ciToken:l,ciFilters:a,ciTransformation:r,cropAspectRatio:h,cropGravity:c}=n||{},p=`${i}${s}`;if(!l||!t){const w=Ce(h,c);if(!w)return p;const v=p.includes("?")?"&":"?";return`${p}${v}${w}`}const f=Mi.includes(o)?null:o,u=f?`${f}/`:"",x=Vi(t),y=Ni(p,l,u),g=$i({ciTransformation:r,responsiveWidth:x,ciFilters:a}),I=Ce(h,c),O=[g,I].filter(Boolean).join("&");return`${y}${O?"?":""}${O}`},ji=(e,t,i)=>{const[o,s]=e.split("?"),n=`${t}=${encodeURIComponent(i)}`;if(!s)return`${o}?${n}`;const l=new URLSearchParams(s);return l.set(t,i),`${o}?${l.toString()}`},Gi=(e,t)=>ji(e,"width",t),Ie=(e,t=0)=>(e+="",e.length>=t?e:new Array(t-e.length+1).join("0")+e),_i=(e,{amount:t=0,indexZeroBase:i=0}={})=>Array.from({length:t},(o,s)=>e.replace("{index}",Ie(s+1,i))),Ui=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?3:6,Ki=({imagesUrls:e,onFirstImageLoad:t,onImageLoad:i,onAllImagesLoad:o,onError:s,autoplayReverse:n})=>{let l=0,a=0;const r=e.length,h=[],c=[];let p=0,f=0;const u=[],x=(m,b,C=!1)=>{const E={message:`Failed to load image: ${m}`,url:m,index:b,isFirstImage:C};c.push(E),a++,s==null||s({error:E,errorCount:a,totalImages:r,errors:c})},y=()=>{l===r&&(o==null||o(h,{errorCount:a,errors:c}))},g=()=>{for(;p<Ui&&f<u.length;){const m=u[f];f++,I(e[m],m)}},I=(m,b)=>{p++;const C=new Image;C.crossOrigin="anonymous",C.src=m,C.onload=async()=>{try{const E=await createImageBitmap(C),S={src:m,bitmapImage:E,naturalWidth:C.naturalWidth,naturalHeight:C.naturalHeight};C.onload=null,C.onerror=null,C.src="",l++,p--,h[b]=S,i==null||i(S,b),y(),g()}catch{C.onload=null,C.onerror=null,C.src="",l++,p--,x(m,b),y(),g()}},C.onerror=()=>{C.onload=null,C.onerror=null,C.src="",l++,p--,x(m,b),y(),g()}},O=m=>{for(let b=0;b<e.length;b++)b!==m&&u.push(b);f=0,g()},w=new Image,v=n?e.length-1:0,k=e[v];w.crossOrigin="anonymous",w.src=k,w.onload=async()=>{try{const m=await createImageBitmap(w),b={src:k,bitmapImage:m,naturalWidth:w.naturalWidth,naturalHeight:w.naturalHeight};w.onload=null,w.onerror=null,w.src="",h[v]=b,l++,t==null||t(b),i==null||i(b,v),r===1?y():O(v)}catch{w.onload=null,w.onerror=null,w.src="",l++,x(k,v,!0),r===1?y():O(v)}},w.onerror=()=>{w.onload=null,w.onerror=null,w.src="",l++,x(k,v,!0),r===1?y():O(v)}},ke=({cdnPathX:e,cdnPathY:t,configX:i,configY:o,onFirstImageLoad:s,onImageLoad:n,onAllImagesLoad:l,onError:a})=>{let r={x:!1,y:!1},h=[],c=[],p={errorCount:0,errors:[]},f={errorCount:0,errors:[]};const u=e||i.imageList.length,x=t||o.imageList.length,y=()=>{if(r.x&&r.y){const I={errorCount:p.errorCount+f.errorCount,errors:[...p.errors,...f.errors]};l==null||l(h,c,I)}},g=({cdnPath:I,config:O,orientation:w,loadedImages:v,loadStats:k,onFirstImageLoad:m})=>{const b=w===P.X,C=O.imageList.length?O.imageList:_i(I,O);Ki({imagesUrls:C,onFirstImageLoad:m,onImageLoad:(E,S)=>{n==null||n(E,S,w),v[S]=E},onError:E=>{a==null||a({...E,orientation:w})},onAllImagesLoad:(E,S)=>{v.length=0,E.forEach((T,H)=>{T&&(v[H]=T)}),k.errorCount=S.errorCount,k.errors=S.errors.map(T=>({...T,orientation:w})),r[b?"x":"y"]=!0,y()},autoplayReverse:O.autoplayReverse})};u?g({cdnPath:e,config:i,orientation:P.X,loadedImages:h,loadStats:p,onFirstImageLoad:s}):r.x=!0,x?g({cdnPath:t,config:o,orientation:P.Y,loadedImages:c,loadStats:f,onFirstImageLoad:u?void 0:s}):r.y=!0,!u&&!x&&y()},qi=`
|
|
1
|
+
var CI360=function(){"use strict";var kn=Object.defineProperty;var Pn=(tt,B,at)=>B in tt?kn(tt,B,{enumerable:!0,configurable:!0,writable:!0,value:at}):tt[B]=at;var ui=(tt,B,at)=>Pn(tt,typeof B!="symbol"?B+"":B,at);var tt=document.createElement("style");tt.textContent=`:root{--ci360-button-bg: rgba(255, 255, 255, .9);--ci360-button-bg-hover: rgba(255, 255, 255, 1);--ci360-button-size: 40px;--ci360-button-border-radius: 6px;--ci360-button-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci360-icon-color: #505050;--ci360-icon-color-hover: #333333;--ci360-icon-size: 20px;--ci360-initial-icon-bg: rgba(255, 255, 255, .15);--ci360-initial-icon-color: #ffffff;--ci360-initial-icon-size: 100px;--ci360-initial-icon-shadow: 0 2px 16px rgba(0, 0, 0, .08);--ci360-initial-icon-border-radius: 16px;--ci360-spinner-color: rgba(0, 0, 0, .2);--ci360-spinner-accent: #505050;--ci360-spinner-size: 30px;--ci360-fullscreen-bg: #ffffff;--ci360-zoom-controls-border-radius: 8px;--ci360-scroll-hint-bg: rgba(0, 0, 0, .7);--ci360-scroll-hint-color: #ffffff;--ci360-scroll-hint-border-radius: 20px;--ci360-focus-color: #0066cc;--ci360-hotspot-marker-size: 24px;--ci360-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci360-hotspot-marker-color: #1a1a1a;--ci360-hotspot-marker-border-width: 2px;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci360-hotspot-marker-border: var(--ci360-hotspot-marker-border-width) solid var(--ci360-hotspot-marker-border-color);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci360-hotspot-pulse-color: rgba(0, 0, 0, .15);--ci360-hotspot-pulse-size: 40px;--ci360-hotspot-pulse-duration: 1.8s;--ci360-hotspot-brand-color: #00aaff;--ci360-popper-bg: #ffffff;--ci360-popper-color: #1a1a1a;--ci360-popper-border: 1px solid rgba(0, 0, 0, .1);--ci360-popper-border-radius: 12px;--ci360-popper-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci360-popper-padding: 16px;--ci360-popper-max-width: 320px;--ci360-popper-font-size: 14px;--ci360-popper-line-height: 1.5;--ci360-popper-title-font-size: 16px;--ci360-popper-title-font-weight: 600;--ci360-popper-title-color: #1a1a1a;--ci360-popper-price-color: #2d8c3c;--ci360-popper-price-font-size: 18px;--ci360-popper-price-font-weight: 700;--ci360-popper-original-price-color: #999999;--ci360-popper-description-color: #666666;--ci360-popper-cta-bg: #0058a3;--ci360-popper-cta-color: #fff;--ci360-popper-cta-border-radius: 8px;--ci360-popper-cta-padding: 8px 16px;--ci360-hints-bg: rgba(255, 255, 255, .9);--ci360-hints-color: #333333;--ci360-hints-font-size: 13px;--ci360-hints-border-radius: 20px;--ci360-hints-shadow: 0 2px 12px rgba(0, 0, 0, .1);--ci360-circle-color: #888888;--ci360-timeline-height: 6px;--ci360-timeline-track-bg: rgba(255, 255, 255, .4);--ci360-timeline-dot-size: 18px;--ci360-timeline-dot-color: var(--ci360-hotspot-marker-bg);--ci360-timeline-dot-active-color: var(--ci360-hotspot-brand-color);--ci360-timeline-dot-border: 2px solid #fff;--ci360-timeline-indicator-size: 12px;--ci360-timeline-indicator-color: var(--ci360-hotspot-brand-color);--ci360-timeline-tooltip-bg: rgba(255, 255, 255, .95);--ci360-timeline-tooltip-color: #333333}.ci360-theme-dark{--ci360-button-bg: rgba(40, 40, 45, .9);--ci360-button-bg-hover: rgba(55, 55, 60, .95);--ci360-button-shadow: 0 2px 8px rgba(0, 0, 0, .4);--ci360-icon-color: #e0e0e0;--ci360-icon-color-hover: #ffffff;--ci360-spinner-color: rgba(255, 255, 255, .2);--ci360-spinner-accent: #e0e0e0;--ci360-fullscreen-bg: #1a1a1f;--ci360-zoom-controls-bg: rgba(40, 40, 45, .9);--ci360-zoom-controls-bg-hover: rgba(55, 55, 60, .95);--ci360-zoom-controls-color: #e0e0e0;--ci360-zoom-controls-color-hover: #ffffff;--ci360-zoom-controls-shadow: 0 2px 8px rgba(0, 0, 0, .4);--ci360-scroll-hint-bg: rgba(255, 255, 255, .15);--ci360-scroll-hint-color: #e0e0e0;--ci360-popper-bg: #1a1a1a;--ci360-popper-color: #f0f0f0;--ci360-popper-border: 1px solid rgba(255, 255, 255, .1);--ci360-popper-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci360-popper-title-color: #f0f0f0;--ci360-popper-description-color: #aaaaaa;--ci360-popper-original-price-color: #777777;--ci360-hints-bg: rgba(40, 40, 45, .9);--ci360-hints-color: #e0e0e0;--ci360-hints-shadow: 0 2px 12px rgba(0, 0, 0, .3);--ci360-circle-color: #b0b0b0;--ci360-timeline-track-bg: rgba(255, 255, 255, .4);--ci360-timeline-dot-border: 2px solid rgba(255, 255, 255, .9);--ci360-timeline-indicator-color: var(--ci360-hotspot-brand-color);--ci360-timeline-tooltip-bg: rgba(40, 40, 45, .95);--ci360-timeline-tooltip-color: #e0e0e0;--ci360-loader-bg: rgba(40, 40, 45, .9);--ci360-loader-color: #e0e0e0;--ci360-loader-shadow: 0 4px 20px rgba(0, 0, 0, .4);--ci360-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .6);--ci360-hotspot-pulse-color: rgba(255, 255, 255, .15);--ci360-timeline-dot-color: var(--ci360-hotspot-marker-bg)}.ci360-hotspot-marker-inverted{--ci360-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci360-hotspot-pulse-color: rgba(0, 0, 0, .2)}.ci360-theme-dark.ci360-hotspot-marker-inverted{--ci360-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci360-hotspot-marker-color: #1a1a1a;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci360-hotspot-pulse-color: rgba(255, 255, 255, .2)}.ci360-hotspot-marker-brand{--ci360-hotspot-marker-bg: var(--ci360-hotspot-brand-color);--ci360-hotspot-marker-color: #ffffff;--ci360-hotspot-marker-border-color: rgba(255, 255, 255, .9);--ci360-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .25);--ci360-hotspot-pulse-color: var(--ci360-hotspot-brand-color)}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cloudimage-360{width:100%;position:relative}.cloudimage-360-inner-box{width:100%;position:relative;overflow:hidden}.cloudimage-360-icons-container{position:absolute;display:flex;top:15px;right:10px;height:100%;flex-direction:column;align-items:center;z-index:100;gap:8px}.cloudimage-360-button{width:var(--ci360-button-size);height:var(--ci360-button-size);cursor:pointer;transition:transform .15s ease-out,background-color .15s ease-out,box-shadow .15s ease-out;display:flex;align-items:center;justify-content:center;border-radius:var(--ci360-button-border-radius);border:none;background-color:var(--ci360-button-bg);box-shadow:var(--ci360-button-shadow);padding:6px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-button:hover{transform:scale(1.05);background-color:var(--ci360-button-bg-hover)}.cloudimage-360-button:focus{outline:none}.cloudimage-360-button:focus-visible{outline:2px solid var(--ci360-focus-color);outline-offset:2px}.cloudimage-360-button svg{width:var(--ci360-icon-size);height:var(--ci360-icon-size);stroke:var(--ci360-icon-color);transition:stroke .15s ease-out}.cloudimage-360-button:hover svg{stroke:var(--ci360-icon-color-hover)}.cloudimage-initial-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ci360-initial-icon-size);aspect-ratio:150 / 87;border-radius:var(--ci360-initial-icon-border-radius);background-color:var(--ci360-initial-icon-bg);box-shadow:var(--ci360-initial-icon-shadow);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:all .3s ease;color:var(--ci360-initial-icon-color);display:flex;align-items:center;justify-content:center;z-index:21;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:12px 16px}.cloudimage-initial-icon svg{width:100%;height:auto;color:var(--ci360-initial-icon-color);fill:var(--ci360-initial-icon-color)}.cloudimage-initial-icon:hover{transform:translate(-50%,-50%) scale(1.08)}.cloudimage-360-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:var(--ci360-loader-size, 70px);height:var(--ci360-loader-size, 70px);border-radius:50%;background-color:var(--ci360-loader-bg, rgba(255, 255, 255, .9));box-shadow:var(--ci360-loader-shadow, 0 4px 20px rgba(0, 0, 0, .15));transition:all .3s ease;color:var(--ci360-loader-color, #505050);display:flex;align-items:center;justify-content:center;z-index:2;-webkit-user-select:none;-moz-user-select:none;user-select:none;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:system-ui,-apple-system,sans-serif;font-size:14px;font-weight:600}.cloudimage-loading-spinner{width:var(--ci360-spinner-size);height:var(--ci360-spinner-size);transform:translate(-50%,-50%);border:3px solid var(--ci360-spinner-color);position:absolute;top:15px;left:15px;border-bottom-color:var(--ci360-spinner-accent);border-radius:50%;display:inline-block;box-sizing:border-box;opacity:0;animation:rotation .7s linear infinite}.cloudimage-360-view-360-circle{position:absolute;left:0;bottom:0;width:100%;height:auto;margin:auto;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;transition:.2s all;z-index:2;color:var(--ci360-circle-color)}.cloudimage-360-view-360-circle svg{display:block;width:100%;height:auto}.cloudimage-360--fullscreen{width:100%;height:100%;background-color:var(--ci360-fullscreen-bg)}.cloudimage-360--fullscreen .cloudimage-360-inner-box{height:100%;display:flex;justify-content:center;align-items:center}.cloudimage-360--fullscreen canvas{width:auto!important;max-width:100%;max-height:100%}.cloudimage-360-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cloudimage-360-hints-overlay{position:absolute;bottom:0;left:0;width:100%;display:flex;align-items:flex-end;justify-content:center;padding-bottom:16px;z-index:50;pointer-events:none;opacity:0;transition:opacity .3s ease}.cloudimage-360-hints-overlay.visible{opacity:1}.cloudimage-360-hints-overlay.hiding{opacity:0}.cloudimage-360-hints-container{display:flex;flex-direction:row;gap:20px;padding:10px 20px;background:var(--ci360-hints-bg);border-radius:var(--ci360-hints-border-radius);box-shadow:var(--ci360-hints-shadow);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-hint-item{display:flex;align-items:center;gap:8px;color:var(--ci360-hints-color);font-size:var(--ci360-hints-font-size);font-family:system-ui,-apple-system,sans-serif;white-space:nowrap}.cloudimage-360-hint-item svg{width:16px;height:16px;flex-shrink:0;stroke:var(--ci360-hints-color)}.cloudimage-360-hint-item span{opacity:.9}@media (max-width: 480px){.cloudimage-360-hints-container{flex-direction:column;gap:8px;padding:12px 16px;border-radius:12px}.cloudimage-360-hint-item{font-size:12px}.cloudimage-360-hint-item svg{width:14px;height:14px}.cloudimage-360-initial-icon{width:calc(var(--ci360-initial-icon-size) * .8);height:calc(var(--ci360-initial-icon-size) * .8)}}.cloudimage-360-inner-box.has-hotspot-timeline .cloudimage-360-hints-overlay{padding-bottom:56px}.cloudimage-360-zoom-controls{position:absolute;display:flex;flex-direction:row;gap:4px;z-index:100;opacity:0;pointer-events:none;transition:opacity .2s ease;background:var(--ci360-zoom-controls-bg, var(--ci360-button-bg));border-radius:var(--ci360-zoom-controls-border-radius);box-shadow:var(--ci360-zoom-controls-shadow, var(--ci360-button-shadow));padding:4px;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-zoom-controls.visible{opacity:1;pointer-events:auto}.cloudimage-360-zoom-controls[data-position=bottom-left]{bottom:12px;left:12px}.cloudimage-360-zoom-controls[data-position=bottom-right]{bottom:12px;right:12px}.cloudimage-360-zoom-controls[data-position=top-left]{top:12px;left:12px}.cloudimage-360-zoom-controls[data-position=top-right]{top:12px;right:12px}.cloudimage-360-zoom-controls[data-position=top-center]{top:12px;left:50%;transform:translate(-50%)}.cloudimage-360-zoom-controls[data-position=bottom-center]{bottom:12px;left:50%;transform:translate(-50%)}.cloudimage-360-zoom-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:none;background:transparent;border-radius:calc(var(--ci360-zoom-controls-border-radius) - 2px);cursor:pointer;padding:0;color:var(--ci360-zoom-controls-color, var(--ci360-icon-color));transition:background-color .15s ease,color .15s ease}.cloudimage-360-zoom-btn:hover:not(:disabled){background:var(--ci360-zoom-controls-bg-hover, var(--ci360-button-bg-hover));color:var(--ci360-zoom-controls-color-hover, var(--ci360-icon-color-hover))}.cloudimage-360-zoom-btn:disabled{opacity:.3;cursor:default}.cloudimage-360-zoom-btn:focus{outline:none}.cloudimage-360-zoom-btn:focus-visible{outline:2px solid var(--ci360-focus-color);outline-offset:-2px}.cloudimage-360-zoom-btn svg{width:18px;height:18px;stroke:currentColor}.cloudimage-360-zoom-btn-reset{border-left:1px solid rgba(128,128,128,.2);padding-left:4px;margin-left:0}.cloudimage-360-scroll-hint{position:absolute;bottom:50%;left:50%;transform:translate(-50%,50%);background:var(--ci360-scroll-hint-bg);color:var(--ci360-scroll-hint-color);padding:8px 16px;border-radius:var(--ci360-scroll-hint-border-radius);font-size:13px;font-family:system-ui,-apple-system,sans-serif;font-weight:500;white-space:nowrap;pointer-events:none;z-index:200;opacity:0;transition:opacity .3s ease;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.cloudimage-360-scroll-hint.visible{opacity:1}.cloudimage-360-hotspot-timeline{position:absolute;bottom:0;left:0;right:0;width:100%;padding:20px;opacity:0;transition:opacity .3s ease;pointer-events:none;z-index:30;background:linear-gradient(to top,rgba(0,0,0,.45) 0%,rgba(0,0,0,.2) 60%,transparent 100%)}.cloudimage-360-hotspot-timeline.visible{opacity:1;pointer-events:auto}.cloudimage-360-hotspot-timeline-track{position:relative;width:100%;max-width:500px;margin:0 auto;height:var(--ci360-timeline-height);background:var(--ci360-timeline-track-bg);border-radius:calc(var(--ci360-timeline-height) / 2)}.cloudimage-360-hotspot-timeline-indicator{position:absolute;top:50%;left:0;width:var(--ci360-timeline-indicator-size);height:var(--ci360-timeline-indicator-size);background:var(--ci360-timeline-indicator-color);border-radius:50%;transform:translate(-50%,-50%);transition:left .1s ease-out;pointer-events:none;box-shadow:0 2px 4px #0003}.cloudimage-360-hotspot-timeline-dot{position:absolute;top:50%;width:var(--ci360-timeline-dot-size);height:var(--ci360-timeline-dot-size);background:var(--ci360-timeline-dot-color);border:var(--ci360-timeline-dot-border);border-radius:50%;transform:translate(-50%,-50%);cursor:pointer;transition:transform .15s ease,background .2s ease,box-shadow .2s ease;box-shadow:0 1px 4px #00000026;padding:0;font:inherit;outline:none}.cloudimage-360-hotspot-timeline-dot:hover{transform:translate(-50%,-50%) scale(1.15);box-shadow:0 2px 8px #0003}.cloudimage-360-hotspot-timeline-dot.active{background:var(--ci360-timeline-dot-color);box-shadow:0 1px 4px #00000026}.cloudimage-360-hotspot-timeline-dot:focus-visible{outline:2px solid var(--ci360-focus-color);outline-offset:2px}.cloudimage-360-hotspot-timeline-tooltip{position:absolute;bottom:calc(100% + 10px);left:50%;transform:translate(-50%);background:var(--ci360-timeline-tooltip-bg);color:var(--ci360-timeline-tooltip-color);padding:6px 12px;border-radius:6px;font-size:13px;font-weight:500;white-space:nowrap;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;pointer-events:none;box-shadow:0 2px 8px #00000026;z-index:10}.cloudimage-360-hotspot-timeline-tooltip:after{content:"";position:absolute;top:100%;left:50%;transform:translate(-50%);border:6px solid transparent;border-top-color:var(--ci360-timeline-tooltip-bg)}.cloudimage-360-hotspot-timeline-tooltip.visible{opacity:1;visibility:visible}@media (max-width: 480px){.cloudimage-360-hotspot-timeline{padding:14px 16px}}.cloudimage-360--fullscreen .cloudimage-360-hotspot-timeline{bottom:0}.cloudimage-360--fullscreen .cloudimage-360-hints-overlay{padding-bottom:32px}.cloudimage-360--fullscreen .cloudimage-360-zoom-controls[data-position^=bottom]{bottom:38px}.cloudimage-360--fullscreen .cloudimage-360-inner-box.has-hotspot-timeline .cloudimage-360-hints-overlay{padding-bottom:72px}.cloudimage-360--fullscreen .cloudimage-360-inner-box.has-hotspot-timeline .cloudimage-360-zoom-controls[data-position^=bottom]{bottom:72px}.cloudimage-360-hotspot-container{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:20}.cloudimage-360-hotspot{display:inline-block;position:absolute;top:0;right:0;bottom:0;left:0;transform:translate(-50%,-50%);background:var(--ci360-hotspot-marker-bg);border:var(--ci360-hotspot-marker-border);border-radius:50%;height:var(--ci360-hotspot-marker-size);width:var(--ci360-hotspot-marker-size);box-shadow:var(--ci360-hotspot-marker-shadow);opacity:0;transition:transform .2s ease,box-shadow .2s ease;padding:0;cursor:pointer;font:inherit;outline:none}.cloudimage-360-hotspot:focus-visible{outline:2px solid var(--ci360-focus-color, #0066cc);outline-offset:2px}.cloudimage-360-hotspot--pulse{overflow:visible}.cloudimage-360-hotspot--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci360-hotspot-pulse-size);height:var(--ci360-hotspot-pulse-size);border-radius:50%;background:var(--ci360-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci360-pulse-ring var(--ci360-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci360-pulse-ring{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.cloudimage-360-hotspot--pulse{animation:ci360-breathe 2.4s ease-in-out infinite}@keyframes ci360-breathe{0%,to{transform:translate(-50%,-50%) scale(1)}50%{transform:translate(-50%,-50%) scale(1.15)}}.cloudimage-360-hotspot--pulse:hover,.cloudimage-360-hotspot--pulse:focus-visible{animation:none}.cloudimage-360-hotspot--dot-label{animation:none}.cloudimage-360-hotspot-label{position:absolute;left:calc(50% + var(--ci360-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci360-hotspot-marker-color);background:var(--ci360-hotspot-marker-bg);border:var(--ci360-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci360-hotspot-marker-shadow);pointer-events:none}.cloudimage-360-hotspot--dot-label:hover{transform:translate(-50%,-50%);box-shadow:0 4px 12px #0006}.cloudimage-360-hotspot:hover{transform:translate(-50%,-50%) scale(1.2);box-shadow:0 4px 12px #0006}@media (prefers-reduced-motion: reduce){.cloudimage-360-hotspot--pulse{animation:none}.cloudimage-360-hotspot--pulse:before{animation:none}}.cloudimage-360-popper{background:var(--ci360-popper-bg);color:var(--ci360-popper-color);border:var(--ci360-popper-border);padding:var(--ci360-popper-padding);border-radius:var(--ci360-popper-border-radius);box-shadow:var(--ci360-popper-shadow);font-family:system-ui,-apple-system,sans-serif;font-size:var(--ci360-popper-font-size);line-height:var(--ci360-popper-line-height);max-width:var(--ci360-popper-max-width);z-index:9999;text-align:left;transition:opacity .2s ease;opacity:0}.cloudimage-360-popper[data-show]{opacity:1}.ci360-popper-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci360-popper-border-radius) - 4px) calc(var(--ci360-popper-border-radius) - 4px) 0 0;margin:calc(var(--ci360-popper-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci360-popper-padding) * 2)}.ci360-popper-image{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.ci360-popper-body{line-height:1.5;text-align:left}.ci360-popper-title{margin:0 0 4px;font-size:var(--ci360-popper-title-font-size);font-weight:var(--ci360-popper-title-font-weight);color:var(--ci360-popper-title-color);line-height:1.3}.ci360-popper-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci360-popper-price{font-size:var(--ci360-popper-price-font-size);font-weight:var(--ci360-popper-price-font-weight);color:var(--ci360-popper-price-color)}.ci360-popper-price-row .ci360-popper-price{margin-bottom:0}.ci360-popper-original-price{font-size:calc(var(--ci360-popper-price-font-size) - 2px);font-weight:500;color:var(--ci360-popper-original-price-color);text-decoration:line-through}.ci360-popper-description{margin:0 0 12px;color:var(--ci360-popper-description-color)}.ci360-popper-cta{display:inline-block;padding:var(--ci360-popper-cta-padding);background:var(--ci360-popper-cta-bg);color:var(--ci360-popper-cta-color);border-radius:var(--ci360-popper-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci360-popper-cta:hover{opacity:.9}button.ci360-popper-cta{cursor:pointer;border:none;font:inherit;width:100%}.ci360-popper-cta:focus-visible{outline:3px solid var(--ci360-focus-color, #0066cc);outline-offset:2px}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(tt);var B=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var me="Expected a function",fe=NaN,mi="[object Symbol]",fi=/^\s+|\s+$/g,gi=/^[-+]0x[0-9a-f]+$/i,vi=/^0b[01]+$/i,bi=/^0o[0-7]+$/i,yi=parseInt,wi=typeof B=="object"&&B&&B.Object===Object&&B,xi=typeof self=="object"&&self&&self.Object===Object&&self,Ci=wi||xi||Function("return this")(),Ii=Object.prototype,ki=Ii.toString,Pi=Math.max,Ei=Math.min,$t=function(){return Ci.Date.now()};function zi(e,t,i){var o,s,n,r,l,a,h=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(me);t=ge(t)||0,Xt(i)&&(c=!!i.leading,d="maxWait"in i,n=d?Pi(ge(i.maxWait)||0,t):n,f="trailing"in i?!!i.trailing:f);function m(u){var v=o,x=s;return o=s=void 0,h=u,r=e.apply(x,v),r}function C(u){return h=u,l=setTimeout(I,t),c?m(u):r}function b(u){var v=u-a,x=u-h,E=t-v;return d?Ei(E,n-x):E}function y(u){var v=u-a,x=u-h;return a===void 0||v>=t||v<0||d&&x>=n}function I(){var u=$t();if(y(u))return P(u);l=setTimeout(I,b(u))}function P(u){return l=void 0,f&&o?m(u):(o=s=void 0,r)}function w(){l!==void 0&&clearTimeout(l),h=0,o=a=s=l=void 0}function g(){return l===void 0?r:P($t())}function k(){var u=$t(),v=y(u);if(o=arguments,s=this,a=u,v){if(l===void 0)return C(a);if(d)return l=setTimeout(I,t),m(a)}return l===void 0&&(l=setTimeout(I,t)),r}return k.cancel=w,k.flush=g,k}function Si(e,t,i){var o=!0,s=!0;if(typeof e!="function")throw new TypeError(me);return Xt(i)&&(o="leading"in i?!!i.leading:o,s="trailing"in i?!!i.trailing:s),zi(e,t,{leading:o,maxWait:t,trailing:s})}function Xt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ti(e){return!!e&&typeof e=="object"}function Ai(e){return typeof e=="symbol"||Ti(e)&&ki.call(e)==mi}function ge(e){if(typeof e=="number")return e;if(Ai(e))return fe;if(Xt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Xt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(fi,"");var i=vi.test(e);return i||bi.test(e)?yi(e.slice(2),i?2:8):gi.test(e)?fe:+e}var Oi=Si;const ve=at(Oi),M={SPIN_X:"spin-x",SPIN_Y:"spin-y",SPIN_XY:"spin-xy",SPIN_YX:"spin-yx"},Li=[!1,0,null,void 0,"false","0","null","undefined"],A={X:"x-axis",Y:"y-axis"},Mi=[37,39],Xi=[38,40],be=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?32:10,Yi=150,Hi=150,Ri=200,ye=50,Zi=50,Di=50,p={folder:"/",apiVersion:"v7",filenameX:"image-{index}.jpg",filenameY:null,imageListX:null,imageListY:null,indexZeroBase:0,amountX:0,amountY:0,speed:80,dragSpeed:150,draggable:!0,swipeable:!0,keys:!1,keysReverse:!1,autoplay:!1,autoplayBehavior:M.SPIN_X,playOnce:!1,autoplayReverse:!1,pointerZoom:0,pointerZoomTrigger:"dblclick",fullscreen:!1,zoomMax:5,zoomStep:.5,zoomControls:!0,zoomControlsPosition:"bottom-right",scrollHint:!0,bottomCircle:!0,bottomCircleOffset:5,ciToken:null,ciFilters:null,ciTransformation:null,lazyload:!0,dragReverse:!1,stopAtEdges:!1,imageInfo:!1,initialIconShown:!0,hotspots:null,hotspotTrigger:"hover",hide360Logo:!1,logoSrc:null,inertia:!1,pinchZoom:!0,hints:!0,theme:null,markerTheme:null,brandColor:null,hotspotTimelineOnClick:!0,aspectRatio:null,cropAspectRatio:null,cropGravity:null,onReady:null,onLoad:null,onSpin:null,onAutoplayStart:null,onAutoplayStop:null,onFullscreenOpen:null,onFullscreenClose:null,onZoomIn:null,onZoomOut:null,onDragStart:null,onDragEnd:null,onHotspotOpen:null,onHotspotClose:null,onProductClick:null,onError:null},Bi=e=>({folder:z(e,"folder",p.folder),apiVersion:z(e,"api-version",p.apiVersion),filenameX:z(e,"filename")||z(e,"filename-x")||p.filenameX,filenameY:z(e,"filename-y",p.filenameY),imageListX:z(e,"image-list-x",p.imageListX),imageListY:z(e,"image-list-y",p.imageListY),indexZeroBase:parseInt(z(e,"index-zero-base",p.indexZeroBase),10),amountX:parseInt(z(e,"amount-x",p.amountX),10),amountY:parseInt(z(e,"amount-y",p.amountY),10),speed:parseInt(z(e,"speed",p.speed),10),dragSpeed:parseInt(z(e,"drag-speed",p.dragSpeed),10),draggable:L(e,"draggable",p.draggable),swipeable:L(e,"swipeable",p.swipeable),keys:L(e,"keys",p.keys),keysReverse:L(e,"keys-reverse",p.keysReverse),autoplay:L(e,"autoplay",p.autoplay),autoplayBehavior:z(e,"autoplay-behavior",p.autoplayBehavior),playOnce:L(e,"play-once",p.playOnce),autoplayReverse:L(e,"autoplay-reverse",p.autoplayReverse),pointerZoom:parseFloat(z(e,"pointer-zoom",p.pointerZoom)),pointerZoomTrigger:z(e,"pointer-zoom-trigger",p.pointerZoomTrigger),fullscreen:L(e,"fullscreen")||L(e,"full-screen",p.fullscreen),magnifier:z(e,"magnifier",null)!=null?parseFloat(z(e,"magnifier",null)):null,zoomMax:parseFloat(z(e,"zoom-max",p.zoomMax)),zoomStep:parseFloat(z(e,"zoom-step",p.zoomStep)),zoomControls:!lt(e,"zoom-controls"),zoomControlsPosition:z(e,"zoom-controls-position",p.zoomControlsPosition),scrollHint:!lt(e,"scroll-hint"),bottomCircleOffset:parseInt(z(e,"bottom-circle-offset",p.bottomCircleOffset),10),ciToken:z(e,"responsive",p.ciToken),ciFilters:z(e,"filters",p.ciFilters),ciTransformation:z(e,"transformation",p.ciTransformation),lazyload:L(e,"lazyload",p.lazyload),dragReverse:L(e,"drag-reverse",p.dragReverse),stopAtEdges:L(e,"stop-at-edges",p.stopAtEdges),imageInfo:L(e,"info",p.imageInfo),initialIconShown:!lt(e,"initial-icon"),bottomCircle:!lt(e,"bottom-circle"),hide360Logo:L(e,"hide-360-logo",p.hide360Logo),logoSrc:z(e,"logo-src",p.logoSrc),inertia:L(e,"inertia",p.inertia),pinchZoom:L(e,"pinch-zoom",p.pinchZoom),hints:!lt(e,"hints"),theme:z(e,"theme",p.theme),markerTheme:z(e,"marker-theme",p.markerTheme),brandColor:z(e,"brand-color",p.brandColor),hotspotTrigger:z(e,"hotspot-trigger",p.hotspotTrigger),hotspotTimelineOnClick:!lt(e,"hotspot-timeline-on-click"),aspectRatio:z(e,"aspect-ratio",p.aspectRatio),cropAspectRatio:z(e,"crop-aspect-ratio",p.cropAspectRatio),cropGravity:z(e,"crop-gravity",p.cropGravity)}),_i=e=>{const t=[];e.amountX!==void 0&&e.amountX<0&&t.push("amountX should be a positive number"),e.amountY!==void 0&&e.amountY<0&&t.push("amountY should be a positive number"),e.speed!==void 0&&e.speed<=0&&t.push("speed should be a positive number"),e.dragSpeed!==void 0&&e.dragSpeed<=0&&t.push("dragSpeed should be a positive number"),e.pointerZoom!==void 0&&e.pointerZoom!==0&&(e.pointerZoom<1||e.pointerZoom>5)&&t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"),e.magnifier!==void 0&&e.magnifier!==null&&e.magnifier!==0&&t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."),e.pointerZoomTrigger==="click"&&t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.'),!e.folder&&!e.imageListX&&!e.imageListY&&t.push("Either folder or imageListX/imageListY is required"),e.folder&&!e.amountX&&!e.imageListX&&t.push("amountX is required when using folder (unless imageListX is provided)");const i=["spin-x","spin-y","spin-xy","spin-yx"];return e.autoplayBehavior&&!i.includes(e.autoplayBehavior)&&t.push(`autoplayBehavior should be one of: ${i.join(", ")}`),t.forEach(o=>{console.warn(`CloudImage 360: ${o}`)}),t.length===0},Fi=e=>(_i(e),{folder:e.folder||p.folder,apiVersion:e.apiVersion||p.apiVersion,filenameX:e.filenameX||e.filename||p.filenameX,filenameY:e.filenameY||p.filenameY,imageListX:e.imageListX||p.imageListX,imageListY:e.imageListY||p.imageListY,indexZeroBase:parseInt(e.indexZeroBase??p.indexZeroBase,10),amountX:parseInt(e.amountX??p.amountX,10),amountY:parseInt(e.amountY??p.amountY,10),speed:parseInt(e.speed??p.speed,10),draggable:e.draggable??p.draggable,swipeable:e.swipeable??p.swipeable,dragSpeed:parseInt(e.dragSpeed??p.dragSpeed,10),keys:e.keys??p.keys,keysReverse:e.keysReverse??p.keysReverse,autoplay:e.autoplay??p.autoplay,autoplayBehavior:e.autoplayBehavior||p.autoplayBehavior,playOnce:e.playOnce??p.playOnce,autoplayReverse:e.autoplayReverse??p.autoplayReverse,pointerZoom:parseFloat(e.pointerZoom??p.pointerZoom),pointerZoomTrigger:e.pointerZoomTrigger||p.pointerZoomTrigger,fullscreen:e.fullscreen??p.fullscreen,magnifier:e.magnifier!=null?parseFloat(e.magnifier):null,zoomMax:parseFloat(e.zoomMax??p.zoomMax),zoomStep:parseFloat(e.zoomStep??p.zoomStep),zoomControls:e.zoomControls??p.zoomControls,zoomControlsPosition:e.zoomControlsPosition||p.zoomControlsPosition,scrollHint:e.scrollHint??p.scrollHint,bottomCircleOffset:parseInt(e.bottomCircleOffset??p.bottomCircleOffset,10),ciToken:e.ciToken||p.ciToken,ciFilters:e.ciFilters||p.ciFilters,ciTransformation:e.ciTransformation||p.ciTransformation,lazyload:e.lazyload??p.lazyload,dragReverse:e.dragReverse??p.dragReverse,stopAtEdges:e.stopAtEdges??p.stopAtEdges,imageInfo:e.imageInfo??p.imageInfo,initialIconShown:e.initialIconShown??p.initialIconShown,bottomCircle:e.bottomCircle??p.bottomCircle,hotspots:e.hotspots??p.hotspots,hotspotTrigger:e.hotspotTrigger||p.hotspotTrigger,hide360Logo:e.hide360Logo??p.hide360Logo,logoSrc:e.logoSrc||p.logoSrc,inertia:e.inertia??p.inertia,pinchZoom:e.pinchZoom??p.pinchZoom,hints:e.hints??p.hints,theme:e.theme||p.theme,markerTheme:e.markerTheme||p.markerTheme,brandColor:e.brandColor||p.brandColor,hotspotTimelineOnClick:e.hotspotTimelineOnClick??p.hotspotTimelineOnClick,aspectRatio:e.aspectRatio||p.aspectRatio,cropAspectRatio:e.cropAspectRatio||p.cropAspectRatio,cropGravity:e.cropGravity||p.cropGravity,onReady:e.onReady??p.onReady,onLoad:e.onLoad??p.onLoad,onSpin:e.onSpin??p.onSpin,onAutoplayStart:e.onAutoplayStart??p.onAutoplayStart,onAutoplayStop:e.onAutoplayStop??p.onAutoplayStop,onFullscreenOpen:e.onFullscreenOpen??p.onFullscreenOpen,onFullscreenClose:e.onFullscreenClose??p.onFullscreenClose,onZoomIn:e.onZoomIn??p.onZoomIn,onZoomOut:e.onZoomOut??p.onZoomOut,onDragStart:e.onDragStart??p.onDragStart,onDragEnd:e.onDragEnd??p.onDragEnd,onHotspotOpen:e.onHotspotOpen??p.onHotspotOpen,onHotspotClose:e.onHotspotClose??p.onHotspotClose,onProductClick:e.onProductClick??p.onProductClick,onError:e.onError??p.onError}),z=(e,t,i)=>e.getAttribute(t)||e.getAttribute(`data-${t}`)||i,L=(e,t,i)=>{if(!(e.hasAttribute(t)||e.hasAttribute(`data-${t}`)))return i;const s=z(e,t,null);return s!=="false"&&s!=="0"},lt=(e,t)=>z(e,t,null)==="false",Wi=(e=1)=>{const t=Math.round(window.devicePixelRatio||1);return parseInt(e)*t},Ni=(e,t,i)=>new URL(e).origin.includes("cloudimg")?e:`https://${t}.cloudimg.io/${i}${e}`,we=(e,t)=>e?`ar=${e}&gravity=${t||"auto"}`:"",Vi=({ciTransformation:e,responsiveWidth:t,ciFilters:i})=>{const o=`width=${t}`,s=e||o,n=i?`&f=${i}`:"";return`${s}${n}`},yt=(e,t)=>{const{folder:i,apiVersion:o,filename:s="",ciParams:n}=e,{ciToken:r,ciFilters:l,ciTransformation:a,cropAspectRatio:h,cropGravity:c}=n||{},d=`${i}${s}`;if(!r||!t){const w=we(h,c);if(!w)return d;const g=d.includes("?")?"&":"?";return`${d}${g}${w}`}const f=Li.includes(o)?null:o,m=f?`${f}/`:"",C=Wi(t),b=Ni(d,r,m),y=Vi({ciTransformation:a,responsiveWidth:C,ciFilters:l}),I=we(h,c),P=[y,I].filter(Boolean).join("&");return`${b}${P?"?":""}${P}`},xe=(e,t=0)=>(e+="",e.length>=t?e:new Array(t-e.length+1).join("0")+e),ji=(e,{amount:t=0,indexZeroBase:i=0}={})=>Array.from({length:t},(o,s)=>e.replace("{index}",xe(s+1,i))),Gi=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?3:6,Ui=({imagesUrls:e,onFirstImageLoad:t,onImageLoad:i,onAllImagesLoad:o,onError:s,autoplayReverse:n})=>{let r=0,l=0;const a=e.length,h=[],c=[];let d=0,f=0;const m=[],C=(u,v,x=!1)=>{const E={message:`Failed to load image: ${u}`,url:u,index:v,isFirstImage:x};c.push(E),l++,s==null||s({error:E,errorCount:l,totalImages:a,errors:c})},b=()=>{r===a&&(o==null||o(h,{errorCount:l,errors:c}))},y=()=>{for(;d<Gi&&f<m.length;){const u=m[f];f++,I(e[u],u)}},I=(u,v)=>{d++;const x=new Image;x.crossOrigin="anonymous",x.src=u,x.onload=async()=>{try{const E=await createImageBitmap(x),S={src:u,bitmapImage:E,naturalWidth:x.naturalWidth,naturalHeight:x.naturalHeight};x.onload=null,x.onerror=null,x.src="",r++,d--,h[v]=S,i==null||i(S,v),b(),y()}catch{x.onload=null,x.onerror=null,x.src="",r++,d--,C(u,v),b(),y()}},x.onerror=()=>{x.onload=null,x.onerror=null,x.src="",r++,d--,C(u,v),b(),y()}},P=u=>{for(let v=0;v<e.length;v++)v!==u&&m.push(v);f=0,y()},w=new Image,g=n?e.length-1:0,k=e[g];w.crossOrigin="anonymous",w.src=k,w.onload=async()=>{try{const u=await createImageBitmap(w),v={src:k,bitmapImage:u,naturalWidth:w.naturalWidth,naturalHeight:w.naturalHeight};w.onload=null,w.onerror=null,w.src="",h[g]=v,r++,t==null||t(v),i==null||i(v,g),a===1?b():P(g)}catch{w.onload=null,w.onerror=null,w.src="",r++,C(k,g,!0),a===1?b():P(g)}},w.onerror=()=>{w.onload=null,w.onerror=null,w.src="",r++,C(k,g,!0),a===1?b():P(g)}},Ce=({cdnPathX:e,cdnPathY:t,configX:i,configY:o,onFirstImageLoad:s,onImageLoad:n,onAllImagesLoad:r,onError:l})=>{let a={x:!1,y:!1},h=[],c=[],d={errorCount:0,errors:[]},f={errorCount:0,errors:[]};const m=e||i.imageList.length,C=t||o.imageList.length,b=()=>{if(a.x&&a.y){const I={errorCount:d.errorCount+f.errorCount,errors:[...d.errors,...f.errors]};r==null||r(h,c,I)}},y=({cdnPath:I,config:P,orientation:w,loadedImages:g,loadStats:k,onFirstImageLoad:u})=>{const v=w===A.X,x=P.imageList.length?P.imageList:ji(I,P);Ui({imagesUrls:x,onFirstImageLoad:u,onImageLoad:(E,S)=>{n==null||n(E,S,w),g[S]=E},onError:E=>{l==null||l({...E,orientation:w})},onAllImagesLoad:(E,S)=>{g.length=0,E.forEach((T,X)=>{T&&(g[X]=T)}),k.errorCount=S.errorCount,k.errors=S.errors.map(T=>({...T,orientation:w})),a[v?"x":"y"]=!0,b()},autoplayReverse:P.autoplayReverse})};m?y({cdnPath:e,config:i,orientation:A.X,loadedImages:h,loadStats:d,onFirstImageLoad:s}):a.x=!0,C?y({cdnPath:t,config:o,orientation:A.Y,loadedImages:c,loadStats:f,onFirstImageLoad:m?void 0:s}):a.y=!0,!m&&!C&&b()},$i=`
|
|
3
3
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
|
|
4
4
|
<path fill="currentColor" d="M409.9,145.6c-42.7-1.7-85.5-4.4-128.1-8.4c-21.3-2-42.6-4.3-63.8-7.1c-21.2-2.8-42.4-5.9-63.4-9.7c-21.1-3.8-42-8.2-62.7-13.7c-10.3-2.8-20.6-5.8-30.7-9.4c-10.1-3.5-20.1-7.6-29.5-12.7c-4.7-2.6-9.3-5.4-13.5-8.8c-2.1-1.7-4-3.6-5.8-5.6c-1.8-2-3.3-4.3-4.3-6.8c-1.1-2.5-1.6-5.3-1.4-8c0.2-2.7,1.1-5.4,2.4-7.7c2.7-4.8,6.7-8.5,11-11.7c8.6-6.4,18.4-10.9,28.3-15c9.9-4,20.1-7.3,30.4-10.3c-10.2,3.1-20.4,6.5-30.3,10.5c-9.8,4.1-19.6,8.7-28.1,15.1c-4.2,3.2-8.2,6.9-10.7,11.6c-1.2,2.3-2.1,4.8-2.3,7.5c-0.1,2.6,0.4,5.2,1.4,7.6c2.1,4.8,5.9,8.7,10,12.1c4.1,3.3,8.7,6.1,13.4,8.6c9.4,5,19.4,8.9,29.4,12.4c10.1,3.5,20.4,6.4,30.7,9.1c20.7,5.3,41.6,9.5,62.7,13.2c21,3.6,42.2,6.6,63.4,9.2c21.2,2.6,42.5,4.8,63.7,6.6c42.6,3.7,85.2,6,127.9,7.4L409.9,145.6z"/>
|
|
5
5
|
<path fill="currentColor" d="M977.1,11.6c13.8,4.1,27.4,8.8,40.4,15.2c6.4,3.2,12.7,6.9,18.3,11.5c2.7,2.4,5.3,5,7.3,8c2,3,3.3,6.6,3.3,10.3c0,3.7-1.4,7.2-3.3,10.3c-2,3.1-4.5,5.7-7.3,8.1c-2.7,2.4-5.7,4.4-8.8,6.3c-1.6,0.9-3.1,1.9-4.7,2.7l-2.4,1.3l-2.4,1.2C1004.5,93,990.8,97.8,977,102c-6.9,2.1-13.8,4-20.8,5.8c-7,1.8-14,3.5-21,5c-14.1,3.1-28.2,5.9-42.4,8.3c-28.4,4.9-57,8.8-85.6,12c-57.3,6.4-114.8,10.2-172.4,12.2c-57.6,2-115.2,2.3-172.9,0.8l0.1-4c57.5,1.8,115.1,1.9,172.6,0.2c57.5-1.7,115-5.2,172.3-11.2c28.6-3.1,57.2-6.7,85.6-11.5c14.2-2.4,28.3-5,42.4-8.1c7-1.5,14-3.1,21-4.9c7-1.7,13.9-3.6,20.8-5.7c13.8-4.1,27.4-8.8,40.3-15.2l2.4-1.2l2.4-1.3c1.6-0.8,3.1-1.8,4.7-2.7c3-1.9,6-3.9,8.7-6.2c2.7-2.3,5.2-4.9,7.2-7.9c1.9-3,3.2-6.4,3.3-10c0-3.6-1.2-7-3.1-10c-1.9-3-4.4-5.6-7.1-8c-5.5-4.7-11.7-8.3-18.1-11.6C1004.5,20.6,990.8,15.8,977.1,11.6z"/>
|
|
@@ -10,19 +10,19 @@ var CI360=function(){"use strict";var bn=Object.defineProperty;var yn=(Q,B,rt)=>
|
|
|
10
10
|
<path fill="currentColor" d="M10.9,9.7c0-1.1-0.8-2-2.5-2.5c1.3-0.5,1.9-1.3,1.9-2.3c0-1.7-1.7-2.8-4.6-2.8c-1.5,0-2.7,0.3-3.6,0.8v1.7c0.9-0.4,2.3-0.7,3.4-0.7C7,3.9,8,4.4,8,5.1c0,0.8-0.7,1.3-2.4,1.3H4.3v1.6h1.3c2,0,2.9,0.8,2.9,1.6c0,0.8-1,1.5-2.8,1.5c-1.5,0-2.8-0.3-3.7-0.6v1.7c0.9,0.3,2.1,0.6,3.8,0.6C9.2,12.8,10.9,11.4,10.9,9.7"/>
|
|
11
11
|
</g>
|
|
12
12
|
</svg>
|
|
13
|
-
`,
|
|
13
|
+
`,Ki=e=>{const t=document.createElement("div");return t.innerHTML=$i,t.style.bottom=`${e}%`,t.className="cloudimage-360-view-360-circle",t},qi=`
|
|
14
14
|
<svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
|
|
15
15
|
<g clip-path="url(#clip0_751_188)">
|
|
16
16
|
<g filter="url(#filter0_d_751_188)">
|
|
17
|
-
<path d="M112.566 15.2227C112.598 15.706 112.529 16.1906 112.364 16.6458C112.198 17.101 111.94 17.5167 111.605 17.8665C111.27 18.2163 110.866 18.4925 110.418 18.6775C109.971 18.8626 109.489 18.9524 109.005 18.9412C108.532 18.955 108.06 18.871 107.621 18.6944C107.181 18.5178 106.782 18.2524 106.45 17.9148C106.117 17.5772 105.858 17.1747 105.688 16.7323C105.518 16.29 105.442 15.8174 105.463 15.344C105.437 14.8591 105.511 14.374 105.68 13.9188C105.849 13.4635 106.109 13.0477 106.445 12.697C106.781 12.3463 107.186 12.0681 107.633 11.8797C108.081 11.6912 108.562 11.5965 109.048 11.6013C111.213 11.5952 112.566 13.1299 112.566 15.2227ZM106.961 15.2895C106.961 16.7574 107.913 17.825 109.03 17.825C110.146 17.825 111.08 16.8059 111.08 15.2652C111.08 14.1551 110.473 12.7053 109.005 12.7053C107.537 12.7053 106.961 14.0884 106.961 15.2895Z" fill="
|
|
18
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M110.164 12.3811C110.552 12.5859 110.861 12.8886 111.093 13.2348C111.506 13.8535 111.681 14.6156 111.681 15.2652C111.681 16.5122 111.13 17.5742 110.261 18.0908C110.603 17.9385 110.912 17.7212 111.171 17.4507C111.448 17.1612 111.662 16.8172 111.799 16.4404C111.936 16.0637 111.993 15.6626 111.966 15.2626L111.965 15.2427V15.2227C111.965 14.3058 111.67 13.5543 111.182 13.0378C110.913 12.7532 110.573 12.5262 110.164 12.3811ZM108.002 18.1944C107.011 17.7212 106.36 16.5793 106.36 15.2895C106.36 14.6064 106.522 13.8357 106.931 13.2157C107.06 13.021 107.212 12.8427 107.389 12.6885C107.204 12.81 107.033 12.9523 106.88 13.1128C106.6 13.4042 106.384 13.7497 106.244 14.128C106.103 14.5062 106.042 14.9093 106.063 15.3122L106.065 15.3415L106.063 15.3708C106.046 15.7615 106.109 16.1517 106.25 16.5168C106.39 16.882 106.604 17.2143 106.878 17.493C107.153 17.7717 107.482 17.9908 107.845 18.1366C107.897 18.1574 107.949 18.1767 108.002 18.1944ZM109.05 11.0002C108.483 10.9951 107.922 11.1058 107.4 11.3256C106.877 11.5459 106.404 11.8711 106.011 12.2811C105.619 12.6912 105.314 13.1773 105.116 13.7096C104.922 14.2327 104.835 14.7894 104.861 15.3466C104.841 15.8928 104.931 16.4375 105.127 16.9478C105.327 17.4673 105.631 17.9401 106.022 18.3366C106.412 18.7331 106.88 19.0448 107.397 19.2522C107.908 19.4577 108.456 19.5564 109.007 19.5425C109.569 19.5533 110.128 19.448 110.648 19.2331C111.173 19.0162 111.646 18.6924 112.039 18.2823C112.432 17.8722 112.735 17.3848 112.929 16.8512C113.121 16.3239 113.202 15.7628 113.167 15.203C113.163 14.035 112.782 12.9803 112.056 12.2121C111.323 11.4362 110.28 10.9976 109.05 11.0002ZM107.934 13.8783C107.689 14.2501 107.562 14.7714 107.562 15.2895C107.562 16.5291 108.34 17.2239 109.03 17.2239C109.716 17.2239 110.479 16.5808 110.479 15.2652C110.479 14.8047 110.35 14.2869 110.093 13.9031C109.851 13.5403 109.507 13.3065 109.005 13.3065C108.495 13.3065 108.163 13.5319 107.934 13.8783Z" fill="
|
|
19
|
-
<path d="M94.3617 40.718H95.5396C99.9046 40.718 103.369 37.1844 103.369 32.8193V19.5164C103.369 15.1514 99.8353 11.6871 95.5396 11.6871H94.3617C89.9967 11.6871 86.5324 15.2207 86.5324 19.5164V32.8193C86.4631 37.1844 90.0659 40.718 94.3617 40.718ZM91.1052 19.5164C91.1052 17.715 92.5602 16.26 94.3617 16.26H95.5396C97.341 16.26 98.796 17.715 98.796 19.5164V32.8193C98.796 34.6208 97.341 36.0758 95.5396 36.0758H94.3617C92.5602 36.0758 91.1052 34.6208 91.1052 32.8193V19.5164Z" fill="
|
|
20
|
-
<path d="M74.6152 40.7179C79.2574 40.7179 82.9988 36.9765 82.9988 32.3343C82.9988 27.6922 79.2574 23.9507 74.6152 23.9507C73.9916 23.9507 73.2988 24.02 72.7445 24.1586C73.9223 21.4564 75.7931 18.685 78.7724 16.4678C79.8117 15.7749 80.0195 14.3199 79.2574 13.2806C78.5645 12.2413 77.1095 12.0335 76.0702 12.7956C67.8944 18.8928 66.578 28.0386 66.3701 31.2258C66.3701 31.2258 66.3701 31.2257 66.3701 31.295C66.3009 31.6415 66.3009 31.9879 66.3009 32.4036C66.2316 36.9072 70.0423 40.7179 74.6152 40.7179ZM74.6152 28.4543C76.6938 28.4543 78.3566 30.1865 78.3566 32.1958C78.3566 34.2051 76.6245 35.9372 74.6152 35.9372C72.6752 35.9372 71.0123 34.3436 70.8737 32.4729C70.8737 32.4036 70.943 32.265 70.943 32.1265C70.943 32.1265 70.943 31.9186 71.0123 31.5722C71.2202 29.84 72.8138 28.4543 74.6152 28.4543Z" fill="
|
|
21
|
-
<path d="M54.3143 36.0758C52.2358 36.0758 50.5729 34.3436 50.5729 32.3343C50.5729 31.0179 49.5336 30.0479 48.2864 30.0479C46.97 30.0479 46 31.0872 46 32.3343C46 36.9765 49.7414 40.718 54.3836 40.718C59.0258 40.718 62.7672 36.9765 62.7672 32.1958C62.7672 29.84 61.7279 27.6229 60.0651 26.0986C61.7279 24.505 62.7672 22.4264 62.7672 20.0014C62.7672 15.3592 59.0258 11.6178 54.3836 11.6178C49.7414 11.6178 46 15.3592 46 20.0014C46 21.3178 47.0393 22.2879 48.2864 22.2879C49.6029 22.2879 50.5729 21.2486 50.5729 20.0014C50.5729 17.9228 52.305 16.26 54.3143 16.26C56.3236 16.26 58.0558 17.9921 58.0558 20.0014C58.0558 22.0107 56.3236 23.7429 54.3143 23.7429C52.9979 23.7429 52.0279 24.7822 52.0279 26.0293C52.0279 27.3458 53.0672 28.3157 54.3143 28.3157C56.3929 28.3157 58.0558 30.0479 58.0558 32.0572C58.1251 34.3436 56.4622 36.0758 54.3143 36.0758Z" fill="
|
|
17
|
+
<path d="M112.566 15.2227C112.598 15.706 112.529 16.1906 112.364 16.6458C112.198 17.101 111.94 17.5167 111.605 17.8665C111.27 18.2163 110.866 18.4925 110.418 18.6775C109.971 18.8626 109.489 18.9524 109.005 18.9412C108.532 18.955 108.06 18.871 107.621 18.6944C107.181 18.5178 106.782 18.2524 106.45 17.9148C106.117 17.5772 105.858 17.1747 105.688 16.7323C105.518 16.29 105.442 15.8174 105.463 15.344C105.437 14.8591 105.511 14.374 105.68 13.9188C105.849 13.4635 106.109 13.0477 106.445 12.697C106.781 12.3463 107.186 12.0681 107.633 11.8797C108.081 11.6912 108.562 11.5965 109.048 11.6013C111.213 11.5952 112.566 13.1299 112.566 15.2227ZM106.961 15.2895C106.961 16.7574 107.913 17.825 109.03 17.825C110.146 17.825 111.08 16.8059 111.08 15.2652C111.08 14.1551 110.473 12.7053 109.005 12.7053C107.537 12.7053 106.961 14.0884 106.961 15.2895Z" fill="currentColor"/>
|
|
18
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M110.164 12.3811C110.552 12.5859 110.861 12.8886 111.093 13.2348C111.506 13.8535 111.681 14.6156 111.681 15.2652C111.681 16.5122 111.13 17.5742 110.261 18.0908C110.603 17.9385 110.912 17.7212 111.171 17.4507C111.448 17.1612 111.662 16.8172 111.799 16.4404C111.936 16.0637 111.993 15.6626 111.966 15.2626L111.965 15.2427V15.2227C111.965 14.3058 111.67 13.5543 111.182 13.0378C110.913 12.7532 110.573 12.5262 110.164 12.3811ZM108.002 18.1944C107.011 17.7212 106.36 16.5793 106.36 15.2895C106.36 14.6064 106.522 13.8357 106.931 13.2157C107.06 13.021 107.212 12.8427 107.389 12.6885C107.204 12.81 107.033 12.9523 106.88 13.1128C106.6 13.4042 106.384 13.7497 106.244 14.128C106.103 14.5062 106.042 14.9093 106.063 15.3122L106.065 15.3415L106.063 15.3708C106.046 15.7615 106.109 16.1517 106.25 16.5168C106.39 16.882 106.604 17.2143 106.878 17.493C107.153 17.7717 107.482 17.9908 107.845 18.1366C107.897 18.1574 107.949 18.1767 108.002 18.1944ZM109.05 11.0002C108.483 10.9951 107.922 11.1058 107.4 11.3256C106.877 11.5459 106.404 11.8711 106.011 12.2811C105.619 12.6912 105.314 13.1773 105.116 13.7096C104.922 14.2327 104.835 14.7894 104.861 15.3466C104.841 15.8928 104.931 16.4375 105.127 16.9478C105.327 17.4673 105.631 17.9401 106.022 18.3366C106.412 18.7331 106.88 19.0448 107.397 19.2522C107.908 19.4577 108.456 19.5564 109.007 19.5425C109.569 19.5533 110.128 19.448 110.648 19.2331C111.173 19.0162 111.646 18.6924 112.039 18.2823C112.432 17.8722 112.735 17.3848 112.929 16.8512C113.121 16.3239 113.202 15.7628 113.167 15.203C113.163 14.035 112.782 12.9803 112.056 12.2121C111.323 11.4362 110.28 10.9976 109.05 11.0002ZM107.934 13.8783C107.689 14.2501 107.562 14.7714 107.562 15.2895C107.562 16.5291 108.34 17.2239 109.03 17.2239C109.716 17.2239 110.479 16.5808 110.479 15.2652C110.479 14.8047 110.35 14.2869 110.093 13.9031C109.851 13.5403 109.507 13.3065 109.005 13.3065C108.495 13.3065 108.163 13.5319 107.934 13.8783Z" fill="currentColor"/>
|
|
19
|
+
<path d="M94.3617 40.718H95.5396C99.9046 40.718 103.369 37.1844 103.369 32.8193V19.5164C103.369 15.1514 99.8353 11.6871 95.5396 11.6871H94.3617C89.9967 11.6871 86.5324 15.2207 86.5324 19.5164V32.8193C86.4631 37.1844 90.0659 40.718 94.3617 40.718ZM91.1052 19.5164C91.1052 17.715 92.5602 16.26 94.3617 16.26H95.5396C97.341 16.26 98.796 17.715 98.796 19.5164V32.8193C98.796 34.6208 97.341 36.0758 95.5396 36.0758H94.3617C92.5602 36.0758 91.1052 34.6208 91.1052 32.8193V19.5164Z" fill="currentColor"/>
|
|
20
|
+
<path d="M74.6152 40.7179C79.2574 40.7179 82.9988 36.9765 82.9988 32.3343C82.9988 27.6922 79.2574 23.9507 74.6152 23.9507C73.9916 23.9507 73.2988 24.02 72.7445 24.1586C73.9223 21.4564 75.7931 18.685 78.7724 16.4678C79.8117 15.7749 80.0195 14.3199 79.2574 13.2806C78.5645 12.2413 77.1095 12.0335 76.0702 12.7956C67.8944 18.8928 66.578 28.0386 66.3701 31.2258C66.3701 31.2258 66.3701 31.2257 66.3701 31.295C66.3009 31.6415 66.3009 31.9879 66.3009 32.4036C66.2316 36.9072 70.0423 40.7179 74.6152 40.7179ZM74.6152 28.4543C76.6938 28.4543 78.3566 30.1865 78.3566 32.1958C78.3566 34.2051 76.6245 35.9372 74.6152 35.9372C72.6752 35.9372 71.0123 34.3436 70.8737 32.4729C70.8737 32.4036 70.943 32.265 70.943 32.1265C70.943 32.1265 70.943 31.9186 71.0123 31.5722C71.2202 29.84 72.8138 28.4543 74.6152 28.4543Z" fill="currentColor"/>
|
|
21
|
+
<path d="M54.3143 36.0758C52.2358 36.0758 50.5729 34.3436 50.5729 32.3343C50.5729 31.0179 49.5336 30.0479 48.2864 30.0479C46.97 30.0479 46 31.0872 46 32.3343C46 36.9765 49.7414 40.718 54.3836 40.718C59.0258 40.718 62.7672 36.9765 62.7672 32.1958C62.7672 29.84 61.7279 27.6229 60.0651 26.0986C61.7279 24.505 62.7672 22.4264 62.7672 20.0014C62.7672 15.3592 59.0258 11.6178 54.3836 11.6178C49.7414 11.6178 46 15.3592 46 20.0014C46 21.3178 47.0393 22.2879 48.2864 22.2879C49.6029 22.2879 50.5729 21.2486 50.5729 20.0014C50.5729 17.9228 52.305 16.26 54.3143 16.26C56.3236 16.26 58.0558 17.9921 58.0558 20.0014C58.0558 22.0107 56.3236 23.7429 54.3143 23.7429C52.9979 23.7429 52.0279 24.7822 52.0279 26.0293C52.0279 27.3458 53.0672 28.3157 54.3143 28.3157C56.3929 28.3157 58.0558 30.0479 58.0558 32.0572C58.1251 34.3436 56.4622 36.0758 54.3143 36.0758Z" fill="currentColor"/>
|
|
22
22
|
</g>
|
|
23
23
|
<g filter="url(#filter1_d_751_188)">
|
|
24
|
-
<path d="M26.8762 25.5149C27.5172 25.2883 28.1927 25.7659 28.1927 26.4458V33.5925C28.1927 34.0014 27.9493 34.3677 27.5768 34.5364C23.692 36.2966 3.80303 46.5259 37.3945 58.1537C37.3945 58.1537 57.0291 63.5205 76.923 63.6974C77.4752 63.7023 77.9231 63.2541 77.9231 62.7018V57.8317C77.9231 57.0995 78.6841 56.6156 79.3472 56.9261L103.851 68.4011C104.598 68.7507 104.624 69.8027 103.897 70.1897L79.3926 83.2187C78.7265 83.5728 77.9231 83.0901 77.9231 82.3357V75.7982C77.9231 75.2459 77.5039 74.797 76.9517 74.7892C68.3815 74.6673 6 72.8926 6 47.0574C6 47.0574 6 32.8966 26.8762 25.5149Z" fill="
|
|
25
|
-
<path d="M111.768 58.2062C110.979 57.639 111.335 56.0078 112.271 55.7479C118.431 54.037 131.443 49.0118 131.443 41.6445C131.443 34.2279 126.608 31.5583 124.732 30.8016C124.308 30.6306 124 30.2281 124 29.7708V26.2189C124 25.5882 124.573 25.1253 125.18 25.2967C129.233 26.4408 142.336 31.2278 142.336 45.2982C142.336 45.2982 142.336 58.9459 122.524 65.4395C122.224 65.5379 121.887 65.4876 121.63 65.3031L111.768 58.2062Z" fill="
|
|
24
|
+
<path d="M26.8762 25.5149C27.5172 25.2883 28.1927 25.7659 28.1927 26.4458V33.5925C28.1927 34.0014 27.9493 34.3677 27.5768 34.5364C23.692 36.2966 3.80303 46.5259 37.3945 58.1537C37.3945 58.1537 57.0291 63.5205 76.923 63.6974C77.4752 63.7023 77.9231 63.2541 77.9231 62.7018V57.8317C77.9231 57.0995 78.6841 56.6156 79.3472 56.9261L103.851 68.4011C104.598 68.7507 104.624 69.8027 103.897 70.1897L79.3926 83.2187C78.7265 83.5728 77.9231 83.0901 77.9231 82.3357V75.7982C77.9231 75.2459 77.5039 74.797 76.9517 74.7892C68.3815 74.6673 6 72.8926 6 47.0574C6 47.0574 6 32.8966 26.8762 25.5149Z" fill="currentColor"/>
|
|
25
|
+
<path d="M111.768 58.2062C110.979 57.639 111.335 56.0078 112.271 55.7479C118.431 54.037 131.443 49.0118 131.443 41.6445C131.443 34.2279 126.608 31.5583 124.732 30.8016C124.308 30.6306 124 30.2281 124 29.7708V26.2189C124 25.5882 124.573 25.1253 125.18 25.2967C129.233 26.4408 142.336 31.2278 142.336 45.2982C142.336 45.2982 142.336 58.9459 122.524 65.4395C122.224 65.5379 121.887 65.4876 121.63 65.3031L111.768 58.2062Z" fill="currentColor"/>
|
|
26
26
|
</g>
|
|
27
27
|
</g>
|
|
28
28
|
<defs>
|
|
@@ -51,10 +51,10 @@ var CI360=function(){"use strict";var bn=Object.defineProperty;var yn=(Q,B,rt)=>
|
|
|
51
51
|
</clipPath>
|
|
52
52
|
</defs>
|
|
53
53
|
</svg>
|
|
54
|
-
`,
|
|
55
|
-
${
|
|
56
|
-
<span>${
|
|
57
|
-
`,
|
|
54
|
+
`,Ji=e=>{const t=document.createElement("div");return t.className="cloudimage-initial-icon",t.setAttribute("aria-label","360 degree view - drag to rotate"),e?(t.style.backgroundImage=`url('${e}')`,t.style.backgroundPosition="50% 50%",t.style.backgroundSize="contain",t.style.backgroundRepeat="no-repeat"):t.innerHTML=qi,t},Qi=(e,t)=>{const{width:i,height:o}=t,s=document.createElement("canvas");return s.width=i,s.height=o,s.style.width="100%",s.style.height="auto",e.appendChild(s),s},Ie='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>',to='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>',eo=()=>{const e=document.createElement("button");return e.className="cloudimage-360-button cloudimage-360-fullscreen-button",e.setAttribute("aria-label","View fullscreen"),e.setAttribute("type","button"),e.innerHTML=Ie,e},io=(e,t)=>{e&&(e.innerHTML=t?to:Ie,e.setAttribute("aria-label",t?"Exit fullscreen":"View fullscreen"))},ke=e=>{const t=document.createElement("div");return t.className="cloudimage-360-icons-container",e.appendChild(t),t},oo=e=>{const t=document.createElement("div");return t.className="cloudimage-360-inner-box",t.setAttribute("role","img"),t.setAttribute("aria-label","360 degree product view. Use mouse drag or arrow keys to rotate."),e.appendChild(t),t},so=e=>{const t=document.createElement("div");t.className="cloudimage-360-loader";const i=document.createElement("span");return i.className="percentage",i.innerText="0%",t.appendChild(i),e.appendChild(t),t},Kt=(e,t)=>{const i=e.querySelector(t);i&&i.parentNode.removeChild(i)},no=()=>{const e=document.createElement("div");return e.className="cloudimage-loading-spinner",e},ro=e=>{const t=document.createElement("div");return t.className="cloudimage-360-hotspot-container",e.appendChild(t),t},ao=e=>{const t=document.createElement("div");return t.className="cloudimage-360-sr-only",t.setAttribute("role","status"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),e.appendChild(t),t},lo=(e,t)=>{e&&(e.textContent="",setTimeout(()=>{e.textContent=t},50))},Pe={drag:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',swipe:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="M8 12h8"/></svg>',click:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/></svg>',dblclick:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/><text x="1" y="22" font-size="8" font-weight="bold" fill="currentColor" stroke="none" font-family="sans-serif">2×</text></svg>',pinch:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l4 4"/><path d="M18 6l-4 4"/><path d="M6 18l4-4"/><path d="M18 18l-4-4"/><circle cx="12" cy="12" r="2"/></svg>',keys:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m9 10 3 3 3-3"/></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>'},co={drag:"Drag to rotate",swipe:"Swipe to rotate",click:"Click to zoom",dblclick:"Double-click to zoom",pinch:"Pinch to zoom",keys:"Use arrow keys",fullscreen:"Click for fullscreen"},ho=e=>{const t=document.createElement("div");t.className="cloudimage-360-hint-item";const i=co[e];return t.innerHTML=`
|
|
55
|
+
${Pe[e]}
|
|
56
|
+
<span>${i}</span>
|
|
57
|
+
`,t},Ee=(e,t=[])=>{if(!t||t.length===0)return null;const i=document.createElement("div");i.className="cloudimage-360-hints-overlay",i.setAttribute("role","tooltip"),i.setAttribute("aria-label","Interaction hints");const o=document.createElement("div");return o.className="cloudimage-360-hints-container",t.forEach(s=>{Pe[s]&&o.appendChild(ho(s))}),i.appendChild(o),e.appendChild(i),i},ze=(e,t)=>t?["swipe","pinch"]:["drag","dblclick"],Se=e=>{e&&e.classList.add("visible")},po=e=>{e&&(e.classList.remove("visible"),e.classList.add("hiding"),setTimeout(()=>{e.classList.remove("hiding")},300))},uo=e=>{if(!e||typeof e!="object")return null;const t=Object.keys(e).map(o=>parseInt(o,10)).filter(o=>!isNaN(o)).sort((o,s)=>o-s);if(t.length===0)return null;const i=Math.floor(t.length/2);return t[i]},mo=e=>{const t=[];return!e||!Array.isArray(e)||e.forEach((i,o)=>{const s=uo(i.positions);s!==null&&t.push({id:i.id||`hotspot-${o}`,frame:s,label:i.label||null})}),t},fo=400,go=(e,t,i,o)=>{const s=document.createElement("button");s.className="cloudimage-360-hotspot-timeline-dot",s.setAttribute("type","button"),s.setAttribute("aria-label",o||`Go to hotspot at frame ${t+1}`),s.setAttribute("data-frame",t.toString()),s.setAttribute("data-hotspot-id",e);const n=i>1?t/(i-1)*100:0;if(s.style.left=`${n}%`,o){const r=document.createElement("span");r.className="cloudimage-360-hotspot-timeline-tooltip",r.textContent=o,s.appendChild(r);let l=null;s.addEventListener("mouseenter",()=>{l=setTimeout(()=>{r.classList.add("visible")},fo)}),s.addEventListener("mouseleave",()=>{l&&(clearTimeout(l),l=null),r.classList.remove("visible")}),s.addEventListener("click",()=>{l&&(clearTimeout(l),l=null),r.classList.remove("visible")})}return s},vo=(e,t,i)=>{const o=mo(i);if(o.length===0)return null;const s=document.createElement("div");s.className="cloudimage-360-hotspot-timeline",s.setAttribute("role","navigation"),s.setAttribute("aria-label","Hotspot timeline navigation");const n=document.createElement("div");n.className="cloudimage-360-hotspot-timeline-track";const r=document.createElement("div");return r.className="cloudimage-360-hotspot-timeline-indicator",o.forEach(({id:l,frame:a,label:h})=>{const c=go(l,a,t,h);n.appendChild(c)}),n.appendChild(r),s.appendChild(n),e.appendChild(s),{element:s,indicator:r,hotspotFrames:o}},bo=(e,t,i)=>{if(!e)return;const o=i>1?t/(i-1)*100:0;e.style.left=`${o}%`},yo=e=>{e&&e.classList.add("visible")},wo=e=>{e&&e.classList.remove("visible")},qt=(e,t=[])=>{if(!e)return t;if(Array.isArray(e))return e;try{return JSON.parse(e)}catch(i){return console.warn("CloudImage 360: Failed to parse JSON:",i.message),t}},xo=(e,t)=>{const[i,o]=e.split("?");if(!o)return e;const s=new RegExp(`^${t}=|&${t}=`),n=o.split("&").filter(r=>!s.test(r)).join("&");return n?`${i}?${n}`:i},Co=e=>{const t=xo(e,"width"),i=t.includes("?")?"&":"?";return`${t}${i}width=${150*devicePixelRatio}`},Io=e=>{const t={root:null,rootMargin:"0px",threshold:.1},i=s=>{const n=s.getAttribute("data-src");n&&(s.src=n)};new IntersectionObserver((s,n)=>{s.forEach(r=>{r.isIntersecting&&(i(r.target),n.unobserve(r.target))})},t).observe(e)},ko=(e,t)=>{const i=xe(1,t);return e.replace("{index}",i)},Po=(e,t)=>{const[i]=e,o=/(https?):\/\//i.test(i);return yt({...t,folder:o?"":t.folder,filename:i})},Eo=(e,t)=>{const{imageList:i,indexZeroBase:o}=t;if(i.length){const s=qt(i,null);if(s)return Po(s,t)}return ko(e,o)},Te=(e,t,i)=>{const o=new Image;return o.setAttribute(t?"data-src":"src",e),o.className=i,o.style.cssText=`
|
|
58
58
|
position: ${t?"absolute":"static"};
|
|
59
59
|
width: 100%;
|
|
60
60
|
inset: 0;
|
|
@@ -62,4 +62,4 @@ var CI360=function(){"use strict";var bn=Object.defineProperty;var yn=(Q,B,rt)=>
|
|
|
62
62
|
object-fit: contain;
|
|
63
63
|
object-position: center;
|
|
64
64
|
filter: blur(10px);
|
|
65
|
-
`,o},Me=(e,t,i)=>{const{innerBox:o,imageList:s,lazyload:n}=t||{},[l]=s,a=l||Lo(e,t),r=Eo(a),h=Pe(r,n,"cloudimage-lazy"),c=Pe(r,!1,"cloudimage-360-placeholder"),p=f=>{_t(o,".cloudimage-lazy"),i&&i({event:f,width:h.width,height:h.height,naturalWidth:h.naturalWidth,naturalHeight:h.naturalHeight,src:r})};h.onload=p,o.appendChild(h),o.appendChild(c),Ao(h)},Po=(e,t,i)=>{const o=new Image;o.src=e,o.onload=s=>{t&&t({event:s,width:o.width,height:o.height,naturalWidth:o.naturalWidth,naturalHeight:o.naturalHeight,src:e})},o.onerror=s=>{const n=new Error(`Failed to load image: ${e}`);n.url=e,n.event=s,i?i(n):console.error(n.message)}},Mo=(e,t)=>{const i=t.getBoundingClientRect(),o=e.touches?e.touches[0].clientX:e.clientX,s=e.touches?e.touches[0].clientY:e.clientY;return{x:o-i.left,y:s-i.top}},Kt=(e,t,i)=>{const{container:o,w:s,h:n,zoom:l,bw:a,offsetX:r,offsetY:h}=t,c=Mo(e,o);let p=c.x,f=c.y;p=Math.max(s/l,Math.min(p,o.offsetWidth-s/l)),f=Math.max(n/l,Math.min(f,o.offsetHeight-n/l)),i.style.left=`${p-s}px`,i.style.top=`${f-n}px`;const u=(p-r)*l-s+a,x=(f-h)*l-n+a;i.style.backgroundPosition=`-${u}px -${x}px`},Ro=(e,t,i,o,s,n)=>{const{x:l=0,y:a=0}=i||{},r=(t.offsetWidth-l*2)*n,h=(t.offsetHeight-a*2)*n;if(!s)return;s.setAttribute("class","cloudimage-360-img-magnifier-glass"),t.prepend(s),s.style.backgroundImage=`url('${o.src}')`,s.style.backgroundSize=`${r}px ${h}px`;const c=3,p=s.offsetWidth/2,f=s.offsetHeight/2,u={container:t,w:p,h:f,zoom:n,bw:c,offsetX:l,offsetY:a};Kt(e,u,s);const x=g=>{Kt(g,u,s)},y=g=>{g.preventDefault(),Kt(g,u,s)};s.addEventListener("mousemove",x),t.addEventListener("mousemove",x),t.addEventListener("touchmove",y)},Yo=(e,t,i)=>{const{clientX:o,clientY:s}=e,n=t.getBoundingClientRect(),l=t.width/(n.width*i),a=t.height/(n.height*i),r=(o-n.left)*l,h=(s-n.top)*a;return{offsetX:r,offsetY:h}},Ho=(e,t,i)=>{const o=e/i,s=t/i;return{zoomedWidth:o,zoomedHeight:s}},Xo=({pointerX:e,pointerY:t,imageData:i,zoomedWidth:o,zoomedHeight:s,drawWidth:n,drawHeight:l})=>{const{naturalWidth:a,naturalHeight:r}=i;let h=e/n*a-o/2,c=t/l*r-s/2;const p=Math.max(0,a-o),f=Math.max(0,r-s);return h=Math.max(0,Math.min(h,p)),c=Math.max(0,Math.min(c,f)),{zoomOffsetX:h,zoomOffsetY:c}},Re=(e,{bottom:t,top:i})=>{e?t():i()},Ye=(e,{left:t,right:i})=>{e?t():i()},Zo=({autoplayBehavior:e,spinY:t,reversed:i,loopTriggers:o})=>{switch(e){case Y.SPIN_XY:case Y.SPIN_YX:t?Re(i,o):Ye(i,o);break;case Y.SPIN_Y:Re(i,o);break;case Y.SPIN_X:default:Ye(i,o)}},Do=({autoplayBehavior:e,activeImageX:t,activeImageY:i,amountX:o,amountY:s,autoplayReverse:n})=>{const l=(a,r)=>{const h=r-1;return n?a===0:a===h};switch(e){case Y.SPIN_XY:case Y.SPIN_Y:return l(i,s);case Y.SPIN_X:case Y.SPIN_YX:default:return l(t,o)}},zo=({autoplayBehavior:e,activeImageX:t,activeImageY:i,amountX:o,amountY:s,autoplayReverse:n,spinDirection:l})=>{const a=t===(n?0:o-1),r=i===(n?0:s-1);return e===Y.SPIN_XY||e===Y.SPIN_YX?l==="x"&&a||l==="y"&&r:!1},Bo=(e,t,i)=>{if(!i)return"x";if(!t)return"y";switch(e){case Y.SPIN_XY:return"x";case Y.SPIN_YX:return"y";case Y.SPIN_Y:return"y";case Y.SPIN_X:default:return"x"}},Wo=e=>e==="x"?"y":"x",He=(e,t)=>{const i=[...Ri];return t?[...i,...Yi].includes(e):i.includes(e)},Xe=({deltaX:e,deltaY:t,reversed:i,allowSpinX:o,allowSpinY:s,threshold:n=0})=>{const l=o&&!s||s&&!o?0:n,a=Math.abs(e),r=Math.abs(t);return o&&a-l>r?i?e>0?"left":"right":e>0?"right":"left":s&&r-l>a?i?t>0?"up":"down":t>0?"down":"up":null},Fo=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,Vo=(e,t=150)=>{let i;return function(...o){clearTimeout(i),i=setTimeout(()=>{e.apply(this,o)},t)}},Ze="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsK",No=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),De=typeof self<"u"&&self.Blob&&new Blob([No(Ze)],{type:"text/javascript;charset=utf-8"});function $o(e){let t;try{if(t=De&&(self.URL||self.webkitURL).createObjectURL(De),!t)throw"";const i=new Worker(t,{name:e==null?void 0:e.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),i}catch{return new Worker("data:text/javascript;base64,"+Ze,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class jo{constructor(){this.canvas=null,this.ctx=null,this.dpr=1,this.drawWidth=0,this.drawHeight=0,this.wideImage=!1}postMessage(t){const{action:i,offscreen:o,devicePixelRatio:s,imageData:n,zoomScale:l,pointerX:a,pointerY:r,imageAspectRatio:h,containerWidth:c,containerHeight:p}=t;switch(i){case"initCanvas":this.initCanvas(o,s);break;case"adaptCanvasSize":this.adaptCanvasSize(h,c,p);break;case"drawImageOnCanvas":this.drawImageOnCanvas(n,l,a,r);break}}terminate(){var t,i;this.ctx&&this.ctx.clearRect(0,0,((t=this.canvas)==null?void 0:t.width)||0,((i=this.canvas)==null?void 0:i.height)||0),this.canvas=null,this.ctx=null}initCanvas(t,i){this.canvas=t,this.ctx=t.getContext("2d"),this.dpr=i}adaptCanvasSize(t,i,o){if(!this.canvas||!this.ctx)return;const s=i/o;this.wideImage=t>s,this.canvas.width=i*this.dpr,this.canvas.height=o*this.dpr,this.ctx.scale(this.dpr,this.dpr),this.wideImage?(this.drawWidth=i,this.drawHeight=i/t):(this.drawHeight=o,this.drawWidth=o*t),this.ctx.imageSmoothingEnabled=!0,this.ctx.imageSmoothingQuality="high"}drawImageOnCanvas(t={},i=1,o=0,s=0){const{bitmapImage:n}=t;if(!this.canvas||!this.ctx||!n)return;let l,a;if(this.wideImage?(l=0,a=(this.canvas.height/this.dpr-this.drawHeight)/2):(l=(this.canvas.width/this.dpr-this.drawWidth)/2,a=0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),i!==1){const{naturalWidth:r,naturalHeight:h}=t,{zoomedWidth:c,zoomedHeight:p}=Ho(r,h,i),{zoomOffsetX:f,zoomOffsetY:u}=Xo({pointerX:o,pointerY:s,imageData:t,zoomedWidth:c,zoomedHeight:p,drawWidth:this.drawWidth,drawHeight:this.drawHeight});this.ctx.drawImage(n,f,u,c,p,l,a,this.drawWidth,this.drawHeight)}else this.ctx.drawImage(n,l,a,this.drawWidth,this.drawHeight)}}const Go=new Set(["p","span","div","br","hr","strong","em","b","i","u","s","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","button","table","thead","tbody","tr","th","td","blockquote","pre","code","label","input","select","option","textarea","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","use","symbol","clippath","mask","lineargradient","radialgradient","stop"]),ze={a:["href","title","target","rel"],img:["src","alt","title","width","height"],button:["type","disabled","name","value"],input:["type","name","value","placeholder","disabled","readonly","checked","min","max","step"],select:["name","disabled","multiple"],option:["value","disabled","selected"],textarea:["name","placeholder","disabled","readonly","rows","cols"],label:["for"],svg:["viewbox","width","height","fill","stroke","xmlns","preserveaspectratio"],path:["d","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","transform"],circle:["cx","cy","r","fill","stroke","stroke-width"],rect:["x","y","width","height","rx","ry","fill","stroke","stroke-width"],line:["x1","y1","x2","y2","stroke","stroke-width"],polyline:["points","fill","stroke","stroke-width"],polygon:["points","fill","stroke","stroke-width"],ellipse:["cx","cy","rx","ry","fill","stroke","stroke-width"],g:["transform","fill","stroke"],text:["x","y","dx","dy","text-anchor","fill","font-size","font-family","font-weight"],tspan:["x","y","dx","dy"],use:["href","xlink:href","x","y","width","height"],lineargradient:["id","x1","y1","x2","y2","gradientunits"],radialgradient:["id","cx","cy","r","fx","fy","gradientunits"],stop:["offset","stop-color","stop-opacity"],clippath:["id"],mask:["id"],"*":["class","id","style"]},_o=[/javascript:/gi,/vbscript:/gi,/data:/gi,/on\w+\s*=/gi],Uo=e=>{if(typeof e!="string")return"";const t=document.createElement("template");t.innerHTML=e;const i=o=>{if(Array.from(o.childNodes).forEach(i),o.nodeType===Node.ELEMENT_NODE){const n=o.tagName.toLowerCase();if(!Go.has(n)){if(n==="script"||n==="style"){o.remove();return}const r=document.createTextNode(o.textContent);o.parentNode.replaceChild(r,o);return}const l=[...ze[n]||[],...ze["*"]||[]];if(Array.from(o.attributes).forEach(r=>{const h=r.name.toLowerCase();if(h.startsWith("on")){o.removeAttribute(r.name);return}if(!l.includes(h)){o.removeAttribute(r.name);return}let c=r.value;_o.forEach(p=>{p.test(c)&&o.removeAttribute(r.name)})}),n==="a"){const r=o.getAttribute("href");r&&(/^(https?:|mailto:|tel:|#|\/)/i.test(r.trim())||o.removeAttribute("href")),o.getAttribute("target")==="_blank"&&o.setAttribute("rel","noopener noreferrer")}if(n==="img"){const r=o.getAttribute("src");r&&(/^(https?:|\/|data:image\/)/i.test(r.trim())||o.removeAttribute("src"))}}};return i(t.content),t.innerHTML},Ko=e=>e==="y"?P.Y:P.X,qo=(e,t,i)=>e.filter(o=>Ko(o.orientation)===i&&t in o.positions),Jo=(e,t,i)=>{const o=document.createElement("button");if(o.id=e,o.className="cloudimage-360-hotspot cloudimage-360-hotspot--pulse",o.dataset.hotspotId=e,o.setAttribute("type","button"),o.setAttribute("aria-label",t||`Hotspot ${e}`),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false"),i==="dot-label"&&t){o.classList.add("cloudimage-360-hotspot--dot-label");const s=document.createElement("span");s.className="cloudimage-360-hotspot-label",s.textContent=t,o.appendChild(s)}return o},Qo=e=>{const t=Object.entries(e).sort(([n],[l])=>Number(n)-Number(l));let i=null,o=null;const s={};for(const[n,l]of t)if(!l)s[n]={x:i,y:o};else{const{x:a,y:r}=l;a!=null&&(i=a),r!=null&&(o=r),s[n]={x:a||i,y:r||o}}return s},ts=e=>({placement:"top",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"preventOverflow",options:{boundary:e}},{name:"flip",options:{boundary:e,fallbackPlacements:["bottom","right","left"]}}]}),es=(e,t)=>{const i=document.createElement("div");return i.className="cloudimage-360-popper",i.id=`cloudimage-360-popper-${t}`,i.dataset.popperId=t,i.setAttribute("role","tooltip"),i.setAttribute("aria-hidden","false"),typeof e=="string"&&/<\/?[a-z][\s\S]*>/i.test(e)?i.innerHTML=Uo(e):i.textContent=e,document.body.appendChild(i),i},is=e=>{const t=[...e];return t.forEach((i,o)=>{const s={...Qo(i.positions)};t[o].initialPositions=s,t[o].positions=s}),t},os=({newWidth:e,newHeight:t,initialContainerSize:i,imageAspectRatio:o,hotspotsConfig:s})=>{const[n,l]=i;let a=e,r=t,h=0,c=0;const p=e/t;o>p?(r=e/o,c=(t-r)/2):(a=t*o,h=(e-a)/2);const u=a/n,x=r/l;return s.map(y=>{const g={};return Object.entries(y.initialPositions).forEach(([I,O])=>{g[I]={x:O.x*u+h,y:O.y*x+c}}),{...y,positions:g}})};function ss(e){const t=[];e.image&&t.push(`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${wt(e.image)}" alt="${wt(e.title||"")}"></div>`);const i=[];if(e.title&&i.push(`<h3 class="ci360-popper-title">${at(e.title)}</h3>`),e.originalPrice||e.price){let o="";e.originalPrice&&(o+=`<span class="ci360-popper-original-price">${at(e.originalPrice)}</span>`),e.price&&(o+=`<span class="ci360-popper-price">${at(e.price)}</span>`),i.push(`<div class="ci360-popper-price-row">${o}</div>`)}if(e.description&&i.push(`<p class="ci360-popper-description">${at(e.description)}</p>`),e.url&&ns(e.url)){const o=e.ctaText||"View details",s=e.id?` data-product-id="${wt(e.id)}"`:"";i.push(`<a class="ci360-popper-cta" href="${wt(e.url)}"${s}>${at(String(o))}</a>`)}else if(e.id){const o=e.ctaText||"View details";i.push(`<button class="ci360-popper-cta" data-product-id="${wt(e.id)}">${at(String(o))}</button>`)}return i.length>0&&t.push(`<div class="ci360-popper-body">${i.join("")}</div>`),t.join("")}function Be(e){return e.content?e.content:e.data?ss(e.data):""}function at(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function wt(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ns(e){const t=e.replace(/[\s\x00-\x1f]/g,"");return/^https?:\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^#/.test(t)}var X="top",W="bottom",F="right",Z="left",qt="auto",xt=[X,W,F,Z],lt="start",Ct="end",rs="clippingParents",We="viewport",It="popper",as="reference",Fe=xt.reduce(function(e,t){return e.concat([t+"-"+lt,t+"-"+Ct])},[]),Ve=[].concat(xt,[qt]).reduce(function(e,t){return e.concat([t,t+"-"+lt,t+"-"+Ct])},[]),ls="beforeRead",cs="read",hs="afterRead",ds="beforeMain",ps="main",us="afterMain",ms="beforeWrite",fs="write",gs="afterWrite",vs=[ls,cs,hs,ds,ps,us,ms,fs,gs];function N(e){return e?(e.nodeName||"").toLowerCase():null}function D(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function it(e){var t=D(e).Element;return e instanceof t||e instanceof Element}function V(e){var t=D(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Jt(e){if(typeof ShadowRoot>"u")return!1;var t=D(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bs(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},s=t.attributes[i]||{},n=t.elements[i];!V(n)||!N(n)||(Object.assign(n.style,o),Object.keys(s).forEach(function(l){var a=s[l];a===!1?n.removeAttribute(l):n.setAttribute(l,a===!0?"":a)}))})}function ys(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],n=t.attributes[o]||{},l=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),a=l.reduce(function(r,h){return r[h]="",r},{});!V(s)||!N(s)||(Object.assign(s.style,a),Object.keys(n).forEach(function(r){s.removeAttribute(r)}))})}}const ws={name:"applyStyles",enabled:!0,phase:"write",fn:bs,effect:ys,requires:["computeStyles"]};function $(e){return e.split("-")[0]}var ot=Math.max,Yt=Math.min,ct=Math.round;function Qt(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Ne(){return!/^((?!chrome|android).)*safari/i.test(Qt())}function ht(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),s=1,n=1;t&&V(e)&&(s=e.offsetWidth>0&&ct(o.width)/e.offsetWidth||1,n=e.offsetHeight>0&&ct(o.height)/e.offsetHeight||1);var l=it(e)?D(e):window,a=l.visualViewport,r=!Ne()&&i,h=(o.left+(r&&a?a.offsetLeft:0))/s,c=(o.top+(r&&a?a.offsetTop:0))/n,p=o.width/s,f=o.height/n;return{width:p,height:f,top:c,right:h+p,bottom:c+f,left:h,x:h,y:c}}function te(e){var t=ht(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function $e(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&Jt(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function G(e){return D(e).getComputedStyle(e)}function xs(e){return["table","td","th"].indexOf(N(e))>=0}function tt(e){return((it(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ht(e){return N(e)==="html"?e:e.assignedSlot||e.parentNode||(Jt(e)?e.host:null)||tt(e)}function je(e){return!V(e)||G(e).position==="fixed"?null:e.offsetParent}function Cs(e){var t=/firefox/i.test(Qt()),i=/Trident/i.test(Qt());if(i&&V(e)){var o=G(e);if(o.position==="fixed")return null}var s=Ht(e);for(Jt(s)&&(s=s.host);V(s)&&["html","body"].indexOf(N(s))<0;){var n=G(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||t&&n.willChange==="filter"||t&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function kt(e){for(var t=D(e),i=je(e);i&&xs(i)&&G(i).position==="static";)i=je(i);return i&&(N(i)==="html"||N(i)==="body"&&G(i).position==="static")?t:i||Cs(e)||t}function ee(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ot(e,t,i){return ot(e,Yt(t,i))}function Is(e,t,i){var o=Ot(e,t,i);return o>i?i:o}function Ge(){return{top:0,right:0,bottom:0,left:0}}function _e(e){return Object.assign({},Ge(),e)}function Ue(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var ks=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,_e(typeof t!="number"?t:Ue(t,xt))};function Os(e){var t,i=e.state,o=e.name,s=e.options,n=i.elements.arrow,l=i.modifiersData.popperOffsets,a=$(i.placement),r=ee(a),h=[Z,F].indexOf(a)>=0,c=h?"height":"width";if(!(!n||!l)){var p=ks(s.padding,i),f=te(n),u=r==="y"?X:Z,x=r==="y"?W:F,y=i.rects.reference[c]+i.rects.reference[r]-l[r]-i.rects.popper[c],g=l[r]-i.rects.reference[r],I=kt(n),O=I?r==="y"?I.clientHeight||0:I.clientWidth||0:0,w=y/2-g/2,v=p[u],k=O-f[c]-p[x],m=O/2-f[c]/2+w,b=Ot(v,m,k),C=r;i.modifiersData[o]=(t={},t[C]=b,t.centerOffset=b-m,t)}}function Es(e){var t=e.state,i=e.options,o=i.element,s=o===void 0?"[data-popper-arrow]":o;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||$e(t.elements.popper,s)&&(t.elements.arrow=s))}const As={name:"arrow",enabled:!0,phase:"main",fn:Os,effect:Es,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dt(e){return e.split("-")[1]}var Ss={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ts(e,t){var i=e.x,o=e.y,s=t.devicePixelRatio||1;return{x:ct(i*s)/s||0,y:ct(o*s)/s||0}}function Ke(e){var t,i=e.popper,o=e.popperRect,s=e.placement,n=e.variation,l=e.offsets,a=e.position,r=e.gpuAcceleration,h=e.adaptive,c=e.roundOffsets,p=e.isFixed,f=l.x,u=f===void 0?0:f,x=l.y,y=x===void 0?0:x,g=typeof c=="function"?c({x:u,y}):{x:u,y};u=g.x,y=g.y;var I=l.hasOwnProperty("x"),O=l.hasOwnProperty("y"),w=Z,v=X,k=window;if(h){var m=kt(i),b="clientHeight",C="clientWidth";if(m===D(i)&&(m=tt(i),G(m).position!=="static"&&a==="absolute"&&(b="scrollHeight",C="scrollWidth")),m=m,s===X||(s===Z||s===F)&&n===Ct){v=W;var E=p&&m===k&&k.visualViewport?k.visualViewport.height:m[b];y-=E-o.height,y*=r?1:-1}if(s===Z||(s===X||s===W)&&n===Ct){w=F;var S=p&&m===k&&k.visualViewport?k.visualViewport.width:m[C];u-=S-o.width,u*=r?1:-1}}var T=Object.assign({position:a},h&&Ss),H=c===!0?Ts({x:u,y},D(i)):{x:u,y};if(u=H.x,y=H.y,r){var L;return Object.assign({},T,(L={},L[v]=O?"0":"",L[w]=I?"0":"",L.transform=(k.devicePixelRatio||1)<=1?"translate("+u+"px, "+y+"px)":"translate3d("+u+"px, "+y+"px, 0)",L))}return Object.assign({},T,(t={},t[v]=O?y+"px":"",t[w]=I?u+"px":"",t.transform="",t))}function Ls(e){var t=e.state,i=e.options,o=i.gpuAcceleration,s=o===void 0?!0:o,n=i.adaptive,l=n===void 0?!0:n,a=i.roundOffsets,r=a===void 0?!0:a,h={placement:$(t.placement),variation:dt(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ke(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:l,roundOffsets:r})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ke(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:r})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Ps={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ls,data:{}};var Xt={passive:!0};function Ms(e){var t=e.state,i=e.instance,o=e.options,s=o.scroll,n=s===void 0?!0:s,l=o.resize,a=l===void 0?!0:l,r=D(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(c){c.addEventListener("scroll",i.update,Xt)}),a&&r.addEventListener("resize",i.update,Xt),function(){n&&h.forEach(function(c){c.removeEventListener("scroll",i.update,Xt)}),a&&r.removeEventListener("resize",i.update,Xt)}}const Rs={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ms,data:{}};var Ys={left:"right",right:"left",bottom:"top",top:"bottom"};function Zt(e){return e.replace(/left|right|bottom|top/g,function(t){return Ys[t]})}var Hs={start:"end",end:"start"};function qe(e){return e.replace(/start|end/g,function(t){return Hs[t]})}function ie(e){var t=D(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function oe(e){return ht(tt(e)).left+ie(e).scrollLeft}function Xs(e,t){var i=D(e),o=tt(e),s=i.visualViewport,n=o.clientWidth,l=o.clientHeight,a=0,r=0;if(s){n=s.width,l=s.height;var h=Ne();(h||!h&&t==="fixed")&&(a=s.offsetLeft,r=s.offsetTop)}return{width:n,height:l,x:a+oe(e),y:r}}function Zs(e){var t,i=tt(e),o=ie(e),s=(t=e.ownerDocument)==null?void 0:t.body,n=ot(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),l=ot(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-o.scrollLeft+oe(e),r=-o.scrollTop;return G(s||i).direction==="rtl"&&(a+=ot(i.clientWidth,s?s.clientWidth:0)-n),{width:n,height:l,x:a,y:r}}function se(e){var t=G(e),i=t.overflow,o=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+o)}function Je(e){return["html","body","#document"].indexOf(N(e))>=0?e.ownerDocument.body:V(e)&&se(e)?e:Je(Ht(e))}function Et(e,t){var i;t===void 0&&(t=[]);var o=Je(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=D(o),l=s?[n].concat(n.visualViewport||[],se(o)?o:[]):o,a=t.concat(l);return s?a:a.concat(Et(Ht(l)))}function ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ds(e,t){var i=ht(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Qe(e,t,i){return t===We?ne(Xs(e,i)):it(t)?Ds(t,i):ne(Zs(tt(e)))}function zs(e){var t=Et(Ht(e)),i=["absolute","fixed"].indexOf(G(e).position)>=0,o=i&&V(e)?kt(e):e;return it(o)?t.filter(function(s){return it(s)&&$e(s,o)&&N(s)!=="body"}):[]}function Bs(e,t,i,o){var s=t==="clippingParents"?zs(e):[].concat(t),n=[].concat(s,[i]),l=n[0],a=n.reduce(function(r,h){var c=Qe(e,h,o);return r.top=ot(c.top,r.top),r.right=Yt(c.right,r.right),r.bottom=Yt(c.bottom,r.bottom),r.left=ot(c.left,r.left),r},Qe(e,l,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ti(e){var t=e.reference,i=e.element,o=e.placement,s=o?$(o):null,n=o?dt(o):null,l=t.x+t.width/2-i.width/2,a=t.y+t.height/2-i.height/2,r;switch(s){case X:r={x:l,y:t.y-i.height};break;case W:r={x:l,y:t.y+t.height};break;case F:r={x:t.x+t.width,y:a};break;case Z:r={x:t.x-i.width,y:a};break;default:r={x:t.x,y:t.y}}var h=s?ee(s):null;if(h!=null){var c=h==="y"?"height":"width";switch(n){case lt:r[h]=r[h]-(t[c]/2-i[c]/2);break;case Ct:r[h]=r[h]+(t[c]/2-i[c]/2);break}}return r}function At(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=o===void 0?e.placement:o,n=i.strategy,l=n===void 0?e.strategy:n,a=i.boundary,r=a===void 0?rs:a,h=i.rootBoundary,c=h===void 0?We:h,p=i.elementContext,f=p===void 0?It:p,u=i.altBoundary,x=u===void 0?!1:u,y=i.padding,g=y===void 0?0:y,I=_e(typeof g!="number"?g:Ue(g,xt)),O=f===It?as:It,w=e.rects.popper,v=e.elements[x?O:f],k=Bs(it(v)?v:v.contextElement||tt(e.elements.popper),r,c,l),m=ht(e.elements.reference),b=ti({reference:m,element:w,placement:s}),C=ne(Object.assign({},w,b)),E=f===It?C:m,S={top:k.top-E.top+I.top,bottom:E.bottom-k.bottom+I.bottom,left:k.left-E.left+I.left,right:E.right-k.right+I.right},T=e.modifiersData.offset;if(f===It&&T){var H=T[s];Object.keys(S).forEach(function(L){var _=[F,W].indexOf(L)>=0?1:-1,U=[X,W].indexOf(L)>=0?"y":"x";S[L]+=H[U]*_})}return S}function Ws(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=i.boundary,n=i.rootBoundary,l=i.padding,a=i.flipVariations,r=i.allowedAutoPlacements,h=r===void 0?Ve:r,c=dt(o),p=c?a?Fe:Fe.filter(function(x){return dt(x)===c}):xt,f=p.filter(function(x){return h.indexOf(x)>=0});f.length===0&&(f=p);var u=f.reduce(function(x,y){return x[y]=At(e,{placement:y,boundary:s,rootBoundary:n,padding:l})[$(y)],x},{});return Object.keys(u).sort(function(x,y){return u[x]-u[y]})}function Fs(e){if($(e)===qt)return[];var t=Zt(e);return[qe(e),t,qe(t)]}function Vs(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var s=i.mainAxis,n=s===void 0?!0:s,l=i.altAxis,a=l===void 0?!0:l,r=i.fallbackPlacements,h=i.padding,c=i.boundary,p=i.rootBoundary,f=i.altBoundary,u=i.flipVariations,x=u===void 0?!0:u,y=i.allowedAutoPlacements,g=t.options.placement,I=$(g),O=I===g,w=r||(O||!x?[Zt(g)]:Fs(g)),v=[g].concat(w).reduce(function(et,j){return et.concat($(j)===qt?Ws(t,{placement:j,boundary:c,rootBoundary:p,padding:h,flipVariations:x,allowedAutoPlacements:y}):j)},[]),k=t.rects.reference,m=t.rects.popper,b=new Map,C=!0,E=v[0],S=0;S<v.length;S++){var T=v[S],H=$(T),L=dt(T)===lt,_=[X,W].indexOf(H)>=0,U=_?"width":"height",R=At(t,{placement:T,boundary:c,rootBoundary:p,altBoundary:f,padding:h}),z=_?L?F:Z:L?W:X;k[U]>m[U]&&(z=Zt(z));var pt=Zt(z),K=[];if(n&&K.push(R[H]<=0),a&&K.push(R[z]<=0,R[pt]<=0),K.every(function(et){return et})){E=T,C=!1;break}b.set(T,K)}if(C)for(var ut=x?3:1,St=function(j){var nt=v.find(function(ft){var q=b.get(ft);if(q)return q.slice(0,j).every(function(gt){return gt})});if(nt)return E=nt,"break"},st=ut;st>0;st--){var mt=St(st);if(mt==="break")break}t.placement!==E&&(t.modifiersData[o]._skip=!0,t.placement=E,t.reset=!0)}}const Ns={name:"flip",enabled:!0,phase:"main",fn:Vs,requiresIfExists:["offset"],data:{_skip:!1}};function ei(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ii(e){return[X,F,W,Z].some(function(t){return e[t]>=0})}function $s(e){var t=e.state,i=e.name,o=t.rects.reference,s=t.rects.popper,n=t.modifiersData.preventOverflow,l=At(t,{elementContext:"reference"}),a=At(t,{altBoundary:!0}),r=ei(l,o),h=ei(a,s,n),c=ii(r),p=ii(h);t.modifiersData[i]={referenceClippingOffsets:r,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}const js={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:$s};function Gs(e,t,i){var o=$(e),s=[Z,X].indexOf(o)>=0?-1:1,n=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,l=n[0],a=n[1];return l=l||0,a=(a||0)*s,[Z,F].indexOf(o)>=0?{x:a,y:l}:{x:l,y:a}}function _s(e){var t=e.state,i=e.options,o=e.name,s=i.offset,n=s===void 0?[0,0]:s,l=Ve.reduce(function(c,p){return c[p]=Gs(p,t.rects,n),c},{}),a=l[t.placement],r=a.x,h=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=r,t.modifiersData.popperOffsets.y+=h),t.modifiersData[o]=l}const Us={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_s};function Ks(e){var t=e.state,i=e.name;t.modifiersData[i]=ti({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const qs={name:"popperOffsets",enabled:!0,phase:"read",fn:Ks,data:{}};function Js(e){return e==="x"?"y":"x"}function Qs(e){var t=e.state,i=e.options,o=e.name,s=i.mainAxis,n=s===void 0?!0:s,l=i.altAxis,a=l===void 0?!1:l,r=i.boundary,h=i.rootBoundary,c=i.altBoundary,p=i.padding,f=i.tether,u=f===void 0?!0:f,x=i.tetherOffset,y=x===void 0?0:x,g=At(t,{boundary:r,rootBoundary:h,padding:p,altBoundary:c}),I=$(t.placement),O=dt(t.placement),w=!O,v=ee(I),k=Js(v),m=t.modifiersData.popperOffsets,b=t.rects.reference,C=t.rects.popper,E=typeof y=="function"?y(Object.assign({},t.rects,{placement:t.placement})):y,S=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(m){if(n){var L,_=v==="y"?X:Z,U=v==="y"?W:F,R=v==="y"?"height":"width",z=m[v],pt=z+g[_],K=z-g[U],ut=u?-C[R]/2:0,St=O===lt?b[R]:C[R],st=O===lt?-C[R]:-b[R],mt=t.elements.arrow,et=u&&mt?te(mt):{width:0,height:0},j=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ge(),nt=j[_],ft=j[U],q=Ot(0,b[R],et[R]),gt=w?b[R]/2-ut-q-nt-S.mainAxis:St-q-nt-S.mainAxis,zt=w?-b[R]/2+ut+q+ft+S.mainAxis:st+q+ft+S.mainAxis,vt=t.elements.arrow&&kt(t.elements.arrow),re=vt?v==="y"?vt.clientTop||0:vt.clientLeft||0:0,Bt=(L=T==null?void 0:T[v])!=null?L:0,ae=z+gt-Bt-re,le=z+zt-Bt,Wt=Ot(u?Yt(pt,ae):pt,z,u?ot(K,le):K);m[v]=Wt,H[v]=Wt-z}if(a){var Ft,ce=v==="x"?X:Z,he=v==="x"?W:F,J=m[k],bt=k==="y"?"height":"width",Vt=J+g[ce],Nt=J-g[he],Tt=[X,Z].indexOf(I)!==-1,$t=(Ft=T==null?void 0:T[k])!=null?Ft:0,jt=Tt?Vt:J-b[bt]-C[bt]-$t+S.altAxis,de=Tt?J+b[bt]+C[bt]-$t-S.altAxis:Nt,pe=u&&Tt?Is(jt,J,de):Ot(u?jt:Vt,J,u?de:Nt);m[k]=pe,H[k]=pe-J}t.modifiersData[o]=H}}const tn={name:"preventOverflow",enabled:!0,phase:"main",fn:Qs,requiresIfExists:["offset"]};function en(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function on(e){return e===D(e)||!V(e)?ie(e):en(e)}function sn(e){var t=e.getBoundingClientRect(),i=ct(t.width)/e.offsetWidth||1,o=ct(t.height)/e.offsetHeight||1;return i!==1||o!==1}function nn(e,t,i){i===void 0&&(i=!1);var o=V(t),s=V(t)&&sn(t),n=tt(t),l=ht(e,s,i),a={scrollLeft:0,scrollTop:0},r={x:0,y:0};return(o||!o&&!i)&&((N(t)!=="body"||se(n))&&(a=on(t)),V(t)?(r=ht(t,!0),r.x+=t.clientLeft,r.y+=t.clientTop):n&&(r.x=oe(n))),{x:l.left+a.scrollLeft-r.x,y:l.top+a.scrollTop-r.y,width:l.width,height:l.height}}function rn(e){var t=new Map,i=new Set,o=[];e.forEach(function(n){t.set(n.name,n)});function s(n){i.add(n.name);var l=[].concat(n.requires||[],n.requiresIfExists||[]);l.forEach(function(a){if(!i.has(a)){var r=t.get(a);r&&s(r)}}),o.push(n)}return e.forEach(function(n){i.has(n.name)||s(n)}),o}function an(e){var t=rn(e);return vs.reduce(function(i,o){return i.concat(t.filter(function(s){return s.phase===o}))},[])}function ln(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function cn(e){var t=e.reduce(function(i,o){var s=i[o.name];return i[o.name]=s?Object.assign({},s,o,{options:Object.assign({},s.options,o.options),data:Object.assign({},s.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var oi={placement:"bottom",modifiers:[],strategy:"absolute"};function si(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function hn(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,s=t.defaultOptions,n=s===void 0?oi:s;return function(a,r,h){h===void 0&&(h=n);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},oi,n),modifiersData:{},elements:{reference:a,popper:r},attributes:{},styles:{}},p=[],f=!1,u={state:c,setOptions:function(I){var O=typeof I=="function"?I(c.options):I;y(),c.options=Object.assign({},n,c.options,O),c.scrollParents={reference:it(a)?Et(a):a.contextElement?Et(a.contextElement):[],popper:Et(r)};var w=an(cn([].concat(o,c.options.modifiers)));return c.orderedModifiers=w.filter(function(v){return v.enabled}),x(),u.update()},forceUpdate:function(){if(!f){var I=c.elements,O=I.reference,w=I.popper;if(si(O,w)){c.rects={reference:nn(O,kt(w),c.options.strategy==="fixed"),popper:te(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(S){return c.modifiersData[S.name]=Object.assign({},S.data)});for(var v=0;v<c.orderedModifiers.length;v++){if(c.reset===!0){c.reset=!1,v=-1;continue}var k=c.orderedModifiers[v],m=k.fn,b=k.options,C=b===void 0?{}:b,E=k.name;typeof m=="function"&&(c=m({state:c,options:C,name:E,instance:u})||c)}}}},update:ln(function(){return new Promise(function(g){u.forceUpdate(),g(c)})}),destroy:function(){y(),f=!0}};if(!si(a,r))return u;u.setOptions(h).then(function(g){!f&&h.onFirstUpdate&&h.onFirstUpdate(g)});function x(){c.orderedModifiers.forEach(function(g){var I=g.name,O=g.options,w=O===void 0?{}:O,v=g.effect;if(typeof v=="function"){var k=v({state:c,name:I,instance:u,options:w}),m=function(){};p.push(k||m)}})}function y(){p.forEach(function(g){return g()}),p=[]}return u}}var dn=[Rs,qs,Ps,ws,Us,Ns,tn,As,js],pn=hn({defaultModifiers:dn});class un{constructor(t,i,o,s={}){ui(this,"updateHotspotPosition",(t,i)=>{this.currentActiveIndex=t,this.currentOrientation=i;const o=qo(this.hotspotsConfig,t,i);this.hideHotspots(),o.forEach(s=>this.updateAndShowHotspot(s,t))});this.container=i,this.popper=null,this.popperInstance=null,this.hotspotsContainer=po(this.container),this.hotspotsConfig=is(t),this.shouldHidePopper=!0,this.hidePopper=this.hidePopper.bind(this),this.forceHidePopper=this.forceHidePopper.bind(this),this.imageAspectRatio=o,this.hotspotElements=new Map,this.popperListeners=[],this.trigger=s.trigger||"hover",this.onOpen=s.onOpen||null,this.onClose=s.onClose||null,this.onProductClick=s.onProductClick||null;const{containerSize:n}=t[0];this.initialContainerSize=n||[i.offsetWidth,i.offsetHeight],this.initHotspots(),this.updateHotspotsForResize(i.offsetWidth,i.offsetHeight),this.observeContainerResize()}observeContainerResize(){this.resizeObserver=new ResizeObserver(()=>{const t=this.container.offsetWidth,i=this.container.offsetHeight;this.updateHotspotsForResize(t,i)}),this.resizeObserver.observe(this.container)}updateHotspotsForResize(t,i){this.hotspotsConfig=os({newWidth:t,newHeight:i,initialContainerSize:this.initialContainerSize,imageAspectRatio:this.imageAspectRatio,hotspotsConfig:this.hotspotsConfig}),this.updateHotspotPosition(this.currentActiveIndex,this.currentOrientation)}cleanupPopperListeners(){this.popperListeners.forEach(({element:t,event:i,handler:o})=>{t.removeEventListener(i,o)}),this.popperListeners=[]}showPopper({hotspotElement:t,content:i,id:o,keepOpen:s}){var c;this.popperInstance&&this.hidePopper();const n=ts(this.container);this.popper=es(i,o),this.popper.setAttribute("data-show",""),this.currentHotspotElement=t,t.setAttribute("aria-expanded","true"),t.setAttribute("aria-describedby",`cloudimage-360-popper-${o}`);const l=()=>{this.shouldHidePopper=!1},a=()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()},r=()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()},h=()=>{this.shouldHidePopper=!1,this.hidePopperTimeout&&clearTimeout(this.hidePopperTimeout)};if(this.popper.addEventListener("mouseenter",l),this.popper.addEventListener("mouseleave",a),t.addEventListener("mouseleave",r),t.addEventListener("mouseenter",h),this.popperListeners.push({element:this.popper,event:"mouseenter",handler:l},{element:this.popper,event:"mouseleave",handler:a},{element:t,event:"mouseleave",handler:r},{element:t,event:"mouseenter",handler:h}),this.onProductClick){const p=this.onProductClick,f=u=>{const x=u.target.closest(".ci360-popper-cta[data-product-id]");x&&p(x.dataset.productId,o)};this.popper.addEventListener("click",f),this.popperListeners.push({element:this.popper,event:"click",handler:f})}this.popperInstance={...pn(t,this.popper,n),keepOpen:s,instanceId:o};try{(c=this.onOpen)==null||c.call(this,o)}catch(p){console.warn("onHotspotOpen callback error:",p)}}checkAndHidePopper(){var t;this.shouldHidePopper&&!((t=this.popperInstance)!=null&&t.keepOpen)&&(this.hidePopperTimeout=setTimeout(()=>{this.shouldHidePopper&&this.hidePopper()},Xi))}hidePopper(){var i,o;this.hidePopperTimeout&&(clearTimeout(this.hidePopperTimeout),this.hidePopperTimeout=null);const t=(i=this.popperInstance)==null?void 0:i.instanceId;if(this.cleanupPopperListeners(),this.currentHotspotElement&&(this.currentHotspotElement.setAttribute("aria-expanded","false"),this.currentHotspotElement.removeAttribute("aria-describedby"),this.currentHotspotElement=null),this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null),t!=null)try{(o=this.onClose)==null||o.call(this,t)}catch(s){console.warn("onHotspotClose callback error:",s)}if(this.popper){this.popper.removeAttribute("data-show"),this.popper.setAttribute("aria-hidden","true");const s=this.popper;this.popper=null,setTimeout(()=>{s.remove()},Zi)}this.shouldHidePopper=!0}forceHidePopper(){this.shouldHidePopper=!0,this.popperInstance&&(this.popperInstance.keepOpen=!1),this.hidePopper()}createHotspot(t){const{id:i,keepOpen:o,onClick:s,label:n,markerStyle:l}=t,a=Be(t),r=Jo(i,n,l);(s||a&&this.trigger==="click")&&(r.style.cursor="pointer"),r.onclick=h=>{var c;h.stopPropagation(),a&&this.trigger==="click"&&(((c=this.popperInstance)==null?void 0:c.instanceId)===i?this.hidePopper():this.showPopper({hotspotElement:r,content:a,id:i,keepOpen:o})),s==null||s(h,this.popperInstance,i)},a&&this.trigger==="hover"&&(r.addEventListener("mouseenter",()=>this.showPopper({hotspotElement:r,content:a,id:i,keepOpen:o})),r.addEventListener("mouseleave",()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()}),r.addEventListener("focus",()=>this.showPopper({hotspotElement:r,content:a,id:i,keepOpen:o})),r.addEventListener("blur",()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()})),this.hotspotsContainer.appendChild(r)}hideHotspots(){this.hotspotsContainer.querySelectorAll(".cloudimage-360-hotspot").forEach(t=>{t.style.opacity=0,t.style.pointerEvents="none"})}updateAndShowHotspot(t,i){const{positions:o,id:s}=t,{x:n,y:l}=o[i]??{},a=this.hotspotsContainer.querySelector(`[data-hotspot-id="${s}"]`);a&&(a.style.translate=`${n}px ${l}px`,a.style.opacity=1,a.style.pointerEvents="all")}showHotspotById(t){const i=this.hotspotsConfig.find(n=>n.id===t);if(!i)return;const o=Be(i);if(!o)return;const s=this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);s&&s.style.opacity==="1"&&this.showPopper({hotspotElement:s,content:o,id:t,keepOpen:i.keepOpen})}createAllHotspots(){this.hotspotsConfig.forEach(t=>this.createHotspot(t))}initHotspots(){this.createAllHotspots()}destroy(){this.hidePopperTimeout&&clearTimeout(this.hidePopperTimeout),this.resizeObserver.disconnect(),this.hidePopper(),this.hotspotElements.clear(),this.hotspotsContainer.innerHTML=""}}const ni=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);class Dt{constructor(t,i,o){this.container=t,this.isClicked=!1,this.fullscreenView=!!o,this.imagesX=[],this.imagesY=[];const s=Math.round(window.devicePixelRatio||1);this.devicePixelRatio=ni?Math.min(s,2):s,this.id=t.id,this.movementStart={x:0,y:0},this.draggingDirection=null,this.isReady=!1,this.velocityX=0,this.velocityY=0,this.lastDragTime=0,this.lastDragX=0,this.lastDragY=0,this.inertiaAnimationId=null,this.hasInteracted=!1,this.currentZoomScale=1,this.touchDevice=Fo(),this.dragJustEnded=!1,this.isPinching=!1,this.initialPinchDistance=0,this.pinchZoomLevel=1,this.pinchZoomEmitted=!1,this.lastEmittedZoom=1,this.panOffsetX=0,this.panOffsetY=0,this.useMainThreadCanvas=ni,this.canvasWorker=this.useMainThreadCanvas?new jo:new $o,this.hotspotTimeline=null,this.hotspotTimelineIndicator=null,this.isAnimatingToFrame=!1,this.onMoveHandler=this.onMoveHandler.bind(this),this.destroy=this.destroy.bind(this),this.init(this.container,i)}closeImageBitmaps(t){!t||!Array.isArray(t)||t.forEach(i=>{var o;(o=i==null?void 0:i.bitmapImage)!=null&&o.close&&i.bitmapImage.close()})}emit(t,i={}){const o=this[t];typeof o=="function"&&o({...i,viewerId:this.id})}announce(t){mo(this.ariaLiveRegion,t)}mouseDown(t){if(!this.isReady||this.glass)return;const i=t.target;if(i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot")))return;const{pageX:o,pageY:s}=t;this.hideHints(),this.hideHotspotPopper(),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),this.autoplayJustStopped=!1,(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1,this.autoplayJustStopped=!0),this.movementStart={x:o,y:s},this.isClicked=!0,this.isDragging=!1,this.inertia&&(this.velocityX=0,this.velocityY=0,this.lastDragTime=performance.now(),this.lastDragX=o,this.lastDragY=s)}mouseUp(){this.isReady&&(!this.isZoomed&&!this.autoplayJustStopped&&this.showAllIcons(),this.inertia&&this.isDragging&&(Math.abs(this.velocityX)>.1||Math.abs(this.velocityY)>.1)&&this.startInertia(),this.isDragging&&(this.emit("onDragEnd"),this.dragJustEnded=!0),this.movementStart={x:0,y:0},this.isClicked=!1,this.isDragging=!1,this.innerBox.style.cursor="grab")}startInertia(){const o=this.fullscreenView?document.body:this.container,s=this.dragSpeed/we,n=s*(this.amountX/o.offsetWidth),l=s*(this.amountY/o.offsetHeight),a=()=>{if(this.velocityX*=.95,this.velocityY*=.95,Math.abs(this.velocityX)<.01&&Math.abs(this.velocityY)<.01){this.inertiaAnimationId=null;return}const r=this.velocityX*16,h=this.velocityY*16,c=Xe({deltaX:r,deltaY:h,reversed:this.dragReverse,allowSpinX:this.allowSpinX,allowSpinY:this.allowSpinY});if(c){const p=this.allowSpinX?Math.max(1,Math.abs(Math.round(r*n))):0,f=this.allowSpinY?Math.max(1,Math.abs(Math.round(h*l))):0;(p>0||f>0)&&this.onMoveHandler(c,p,f)}this.inertiaAnimationId=requestAnimationFrame(a)};this.inertiaAnimationId=requestAnimationFrame(a)}drag(t,i){if(!this.isReady||!this.isClicked)return;const o=t-this.movementStart.x,s=i-this.movementStart.y;if(this.inertia){const f=performance.now(),u=f-this.lastDragTime;u>0&&u<100&&(this.velocityX=(t-this.lastDragX)/u,this.velocityY=(i-this.lastDragY)/u),this.lastDragTime=f,this.lastDragX=t,this.lastDragY=i}this.draggingDirection=Xe({deltaX:o,deltaY:s,reversed:this.dragReverse,allowSpinX:this.allowSpinX,allowSpinY:this.allowSpinY})||this.draggingDirection;const n=this.fullscreenView?document.body:this.container,l=this.dragSpeed/we,a=l*(this.amountX/n.offsetWidth),r=l*(this.amountY/n.offsetHeight),h=this.allowSpinX?Math.abs(Math.round(o*a)):0,c=this.allowSpinY?Math.abs(Math.round(s*r)):0;(this.allowSpinX&&h!==0||this.allowSpinY&&c!==0)&&(this.hasInteracted=!0,this.hideHotspotPopper(),this.onMoveHandler(this.draggingDirection,h,c),this.movementStart={x:t,y:i},setTimeout(()=>{this.isDragging||(this.isDragging=!0,this.emit("onDragStart"))},Hi))}mouseMove(t){!this.isReady||!this.isClicked&&!this.isZoomed||this.glass||(this.isZoomed||this.hideAllIcons(),this.drag(t.pageX,t.pageY),this.isZoomed&&this.applyZoom(t))}mouseClick(t){if(!this.isReady||this.isDragging)return;const i=t.target;if(!(i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot")))){if(this.dragJustEnded){this.dragJustEnded=!1;return}if(this.autoplayJustStopped){this.autoplayJustStopped=!1;return}if(this.glass&&this.magnified){this.removeGlass();return}this.pointerZoomTrigger==="click"&&this.pointerZoom&&!this.glass&&!this.touchDevice&&this.toggleZoom(t)}}mouseDblClick(t){if(!this.isReady)return;const i=t.target;i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot"))||this.pointerZoomTrigger==="dblclick"&&this.pointerZoom&&!this.glass&&!this.touchDevice&&this.toggleZoom(t)}loadHigherQualityImages(t,i){const o=yt(this.srcXConfig,t),s=this.allowSpinY?yt(this.srcYConfig,t):null;ke({cdnPathX:o,cdnPathY:s,configX:this.srcXConfig,configY:this.srcYConfig,onAllImagesLoad:(n,l)=>{this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=n,this.imagesY=l,i()},onError:n=>this.emit("onError",n)})}hideHotspots(){this.hotspotsInstance&&this.hotspotsInstance.hideHotspots()}hideHotspotPopper(){this.hotspotsInstance&&this.hotspotsInstance.forceHidePopper()}toggleZoom(t){if(this.isZoomed)this.showTransitionOverlay(),setTimeout(()=>{this.removeZoom()},Mt);else{let i=(this.fullscreenView||this.pointerZoom?document.body:this.container).offsetWidth;this.hideHotspots(),this.showLoadingSpinner(),this.loadHigherQualityImages(i,()=>{this.showTransitionOverlay(),setTimeout(()=>{this.applyZoom(t)},Mt)})}}removeZoom(){this.isZoomed=!1,this.updateView(),this.showAllIcons(),this.hideZoomOutIcon(),this.hideTransitionOverlay(),this.emit("onZoomOut"),this.announce("Zoomed out")}zoomIn(t){if(this.isZoomed||!this.pointerZoom)return;t==null||t.stopPropagation();let i=(this.fullscreenView||this.pointerZoom?document.body:this.container).offsetWidth;this.hideHotspots(),this.hideAllIcons(),this.showLoadingSpinner(),this.loadHigherQualityImages(i,()=>{this.showTransitionOverlay(),setTimeout(()=>{this.applyZoom(t)},Mt)})}zoomOut(t){this.isZoomed&&(t==null||t.stopPropagation(),this.showTransitionOverlay(),setTimeout(()=>{this.removeZoom()},Mt))}mouseLeave(){this.isZoomed&&this.removeZoom()}applyZoom(t){const{offsetX:i,offsetY:o}=Yo(t,this.canvas,this.devicePixelRatio);this.isZoomed||(this.isZoomed=!0,this.hideAllIcons(),this.hideLoadingSpinner(),this.hideTransitionOverlay(),this.showZoomOutIcon(),this.emit("onZoomIn",{zoomLevel:this.pointerZoom}),this.announce("Zoomed in. Move mouse to pan. Click to zoom out.")),this.updateView(this.pointerZoom,i,o)}touchOutside(t){if(!this.glass)return;!this.canvas.contains(t.target)&&this.removeGlass()}touchStart(t){if(!this.isReady||this.glass||!t.touches||!t.touches.length)return;const i=t.target;if(i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot")))return;if(this.hideHints(),t.touches.length===2&&this.pinchZoom&&!this.isDragging){t.preventDefault(),this.isPinching=!0,this.isClicked=!1,this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null);const n=t.touches[0],l=t.touches[1];if(this.initialPinchDistance=this.getPinchDistance(n,l),(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1),!this.isZoomed&&this.pinchZoomLevel===1){const a=(this.fullscreenView?document.body:this.container).offsetWidth;this.hideHotspots(),this.loadHigherQualityImages(a,()=>{})}return}if(t.touches.length>1)return;const{pageX:o,pageY:s}=t.touches[0];this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1),this.hideAllIcons(),this.hideHotspotPopper(),this.movementStart={x:o,y:s},this.isClicked=!0,this.isDragging=!1,this.inertia&&(this.velocityX=0,this.velocityY=0,this.lastDragTime=performance.now(),this.lastDragX=o,this.lastDragY=s)}getPinchDistance(t,i){const o=t.pageX-i.pageX,s=t.pageY-i.pageY;return Math.sqrt(o*o+s*s)}getPinchCenter(t,i){return{x:(t.pageX+i.pageX)/2,y:(t.pageY+i.pageY)/2}}touchEnd(t){if(this.isReady){if(this.isPinching){if(!t.touches||t.touches.length<2){if(this.isPinching=!1,this.initialPinchDistance=0,this.pinchZoomLevel<=1){const i=this.pinchZoomEmitted;this.pinchZoomLevel=1,this.pinchZoomEmitted=!1,this.lastEmittedZoom=1,this.isZoomed=!1,this.panOffsetX=0,this.panOffsetY=0,this.showAllIcons(),this.updateView(),i&&this.emit("onZoomOut")}else if(this.canvas){const i=this.canvas.getBoundingClientRect();this.panOffsetX=i.width/2*this.devicePixelRatio,this.panOffsetY=i.height/2*this.devicePixelRatio}}return}this.showAllIcons(),this.inertia&&this.isDragging&&(Math.abs(this.velocityX)>.1||Math.abs(this.velocityY)>.1)&&this.startInertia(),this.movementStart={x:0,y:0},this.isClicked=!1,this.isDragging=!1}}touchMove(t){if(!this.isReady||this.glass)return;if(this.isPinching&&t.touches.length===2){t.preventDefault();const s=t.touches[0],n=t.touches[1],l=this.getPinchDistance(s,n);if(this.initialPinchDistance===0){this.initialPinchDistance=l;return}const a=l/this.initialPinchDistance,r=Math.max(1,Math.min(this.pinchZoomLevel*a,xe));if(this.initialPinchDistance=l,this.pinchZoomLevel=r,!this.canvas)return;const h=this.canvas.getBoundingClientRect(),c=h.width/2*this.devicePixelRatio,p=h.height/2*this.devicePixelRatio;r>1?(this.isZoomed=!0,this.hideAllIcons(),this.updateView(r,c,p),(!this.pinchZoomEmitted||r>this.lastEmittedZoom)&&(this.emit("onZoomIn",{zoomLevel:r}),this.pinchZoomEmitted=!0,this.lastEmittedZoom=r)):(this.isZoomed=!1,this.panOffsetX=0,this.panOffsetY=0,this.updateView());return}if(!this.isClicked||!t.touches||!t.touches[0])return;const{pageX:i,pageY:o}=t.touches[0];if(t.preventDefault(),this.isZoomed&&this.pinchZoomLevel>1){const s=i-this.movementStart.x,n=o-this.movementStart.y;this.panOffsetX-=s*this.devicePixelRatio,this.panOffsetY-=n*this.devicePixelRatio,this.movementStart={x:i,y:o},this.updateView(this.pinchZoomLevel,this.panOffsetX,this.panOffsetY);return}this.drag(i,o)}keyDown(t){if(!this.isReady)return;const{keyCode:i}=t,o=this.keysReverse;switch(this.autoplay&&this.stopAutoplay(),He(i,this.allowSpinY)&&(this.hasInteracted=!0,this.hideAllIcons(),this.hideHints()),i){case 37:o?this.moveLeft():this.moveRight();break;case 39:o?this.moveRight():this.moveLeft();break;case 38:this.allowSpinY&&(t.preventDefault(),o?this.moveTop():this.moveBottom());break;case 40:this.allowSpinY&&(t.preventDefault(),o?this.moveBottom():this.moveTop());break}}keyUp(t){const{keyCode:i}=t;He(i,this.allowSpinY)&&this.showAllIcons()}moveActiveXIndexUp(t){this.orientation=P.X,this.activeImageX=(this.activeImageX+t)%this.amountX}moveActiveXIndexDown(t){this.orientation=P.X,this.activeImageX=(this.activeImageX-t+this.amountX)%this.amountX}moveActiveYIndexUp(t){this.orientation=P.Y,this.activeImageY=(this.activeImageY+t)%this.amountY}moveActiveYIndexDown(t){this.orientation=P.Y,this.activeImageY=(this.activeImageY-t+this.amountY)%this.amountY}moveRight(t,i=1){t&&this.activeImageX>=this.imagesX.length-1||(this.moveActiveXIndexUp(i),this.isZoomed||this.updateView())}moveLeft(t,i=1){t&&this.activeImageX<=0||(this.moveActiveXIndexDown(i),this.isZoomed||this.updateView())}moveTop(t,i=1){t&&this.activeImageY>=this.imagesY.length-1||(this.moveActiveYIndexUp(i),this.isZoomed||this.updateView())}moveBottom(t,i=1){t&&this.activeImageY<=0||(this.moveActiveYIndexDown(i),this.isZoomed||this.updateView())}onMoveHandler(t,i=1,o=1){t==="right"?this.moveRight(this.stopAtEdges,i):t==="left"?this.moveLeft(this.stopAtEdges,i):t==="up"?this.moveTop(this.stopAtEdges,o):t==="down"&&this.moveBottom(this.stopAtEdges,o),this.emit("onSpin",{direction:t,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY})}updateView(t,i,o){const s=this.orientation===P.X?this.activeImageX:this.activeImageY,n=this.orientation===P.X?this.imagesX[this.activeImageX]:this.imagesY[this.activeImageY];this.hotspotsInstance&&!this.isZoomed&&!this.autoplay&&this.hotspotsInstance.updateHotspotPosition(s,this.orientation),this.hotspotTimelineIndicator&&this.orientation===P.X&&this.updateHotspotTimelinePosition(),this.drawImageOnCanvas(n,t,i,o)}updatePercentageInLoader(t=0){this.loader&&(this.loader.innerText=t+"%")}adaptCanvasSize(t){const{naturalWidth:i,naturalHeight:o}=t;this.imageAspectRatio=i/o;const s=this.fullscreenView?window.innerWidth:this.canvas.clientWidth,n=this.fullscreenView?window.innerHeight:this.canvas.clientHeight;this.canvasWorker.postMessage({action:"adaptCanvasSize",devicePixelRatio:this.devicePixelRatio,imageAspectRatio:this.imageAspectRatio,containerWidth:s,containerHeight:n})}drawImageOnCanvas(t,i=1,o=0,s=0){this.pendingDrawData={imageData:t,zoomScale:i,pointerX:o,pointerY:s},this.drawFrameRequested||(this.drawFrameRequested=!0,requestAnimationFrame(()=>{if(this.drawFrameRequested=!1,this.pendingDrawData){const{imageData:n,zoomScale:l,pointerX:a,pointerY:r}=this.pendingDrawData;this.canvasWorker.postMessage({action:"drawImageOnCanvas",imageData:n,zoomScale:l,pointerX:a,pointerY:r})}}))}pushImageToSet(t,i,o){o===P.X?this.imagesX[i]=t:this.imagesY[i]=t}calculatePercentage(){const t=this.amountX+this.amountY,i=this.imagesX.length+this.imagesY.length;return Math.round(i/t*100)}onImageLoad(t,i,o){this.pushImageToSet(t,i,o),this.updatePercentageInLoader(this.calculatePercentage())}onFirstImageLoaded(t,i){this.createContainers(t),this.adaptCanvasSize(i),this.drawImageOnCanvas(i)}onAllImagesLoaded(){if(this.addAllIcons(),this.isReady=!0,this.amountX=this.imagesX.length,this.amountY=this.imagesY.length,this.activeImageX=this.autoplayReverse?this.amountX-1:0,this.activeImageY=this.autoplayReverse?this.amountY-1:0,this.hotspots&&(this.hotspotsInstance=new un(this.hotspots,this.innerBox,this.imageAspectRatio,{trigger:this.hotspotTrigger,onOpen:onHotspotOpen,onClose:onHotspotClose,onProductClick}),this.hotspotsInstance.updateHotspotPosition(this.activeImageX,this.orientation),this.addHotspotTimeline(),this.showHotspotTimeline()),this.emit("onLoad",{imagesX:this.imagesX.length,imagesY:this.imagesY.length}),this.emit("onReady"),this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."),this.hints!==!1&&!this.autoplay){const t=this.hints===!0||this.hints===void 0?Te(this.viewerConfig,this.touchDevice):this.hints;t&&t.length>0&&(this.hintsOverlay=Se(this.innerBox,t,{pointerZoomTrigger:this.pointerZoomTrigger}),Le(this.hintsOverlay))}this.autoplay&&(this.hideAllIcons(),Vo(this.play.bind(this))())}magnify(t){t.stopPropagation();const{src:i}=this.orientation===P.Y?this.imagesY[this.activeImageY]:this.imagesX[this.activeImageX],s=(this.fullscreenView?document.body:this.container).offsetWidth*this.magnifier,n=Gi(i,s);this.showLoadingSpinner(),this.createGlass(),Po(n,r=>{this.hideLoadingSpinner(),this.magnified=!0,Ro(t,this.innerBox,this.offset,r,this.glass,this.magnifier)},r=>{this.hideLoadingSpinner(),this.removeGlass(),this.emit("onError",{error:{message:r.message,url:r.url},errorCount:1,totalImages:1,errors:[{message:r.message,url:r.url}]})})}openFullscreenModal(t){t.stopPropagation(),this.hideHotspotPopper(),this.releaseMemory(),window.document.body.style.overflow="hidden";const i=lo(this.container);this.fullscreenInstance=new Dt(i,this.viewerConfig,!0),this.fullscreenInstance.originalViewer=this,this.boundResizeHandler=()=>{this.fullscreenInstance&&this.closeFullscreenModal(new Event("resize"))},window.addEventListener("resize",this.boundResizeHandler),this.emit("onFullscreenOpen"),this.announce("Opened fullscreen mode. Press Escape to exit.")}closeFullscreenModal(t){t.stopPropagation();const i=this.originalViewer||this,o=this.fullscreenView?this:i.fullscreenInstance;if(i.boundResizeHandler&&(window.removeEventListener("resize",i.boundResizeHandler),i.boundResizeHandler=null),o){o.hideHotspotPopper();const s=o.container.parentNode;s&&s.parentNode&&s.parentNode.removeChild(s),o.destroy(),i.fullscreenInstance&&(i.fullscreenInstance=null)}window.document.body.style.overflow="visible",i.reloadImages(),i.emit("onFullscreenClose"),i.announce("Exited fullscreen mode")}play(){if(this.isClicked)return;this.hide360ViewCircleIcon(),this.emit("onAutoplayStart");const t=this.speed*36/(this.amountX+this.amountY),i={left:this.moveLeft.bind(this),right:this.moveRight.bind(this),top:this.moveTop.bind(this),bottom:this.moveBottom.bind(this)};this.loopTimeoutId=window.setInterval(()=>{if(this.playOnce&&Do({autoplayBehavior:this.autoplayBehavior,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY,autoplayReverse:this.autoplayReverse})){this.stopAutoplay();return}zo({autoplayBehavior:this.autoplayBehavior,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY,autoplayReverse:this.autoplayReverse,spinDirection:this.spinDirection})&&(this.spinDirection=Wo(this.spinDirection));const n=this.spinDirection==="y";Zo({autoplayBehavior:this.autoplayBehavior,spinY:n,reversed:this.autoplayReverse,loopTriggers:i})},t)}stopAutoplay(){if(this.showAllIcons(),this.autoplay=!1,window.clearTimeout(this.loopTimeoutId),this.loopTimeoutId=null,this.emit("onAutoplayStop"),this.hints!==!1&&!this.hintsOverlay&&!this.hintsHidden){const t=this.hints===!0?Te(this.viewerConfig,this.touchDevice):this.hints;t&&t.length>0&&(this.hintsOverlay=Se(this.innerBox,t,{pointerZoomTrigger:this.pointerZoomTrigger}),Le(this.hintsOverlay))}}destroy(){this.stopAutoplay(),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),this.removeEvents(),this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=[],this.imagesY=[],this.canvasWorker&&(this.canvasWorker.terminate(),this.canvasWorker=null),this.hotspotsInstance&&this.hotspotsInstance.destroy(),this.hintsOverlay&&this.hintsOverlay.parentNode&&(this.hintsOverlay.parentNode.removeChild(this.hintsOverlay),this.hintsOverlay=null),this.hotspotTimeline&&this.hotspotTimeline.parentNode&&(this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline),this.hotspotTimeline=null,this.hotspotTimelineIndicator=null),this.innerBox&&this.innerBox.classList.remove("has-hotspot-timeline"),this.container&&(this.container.classList.remove("ci360-theme-dark","ci360-hotspot-marker-inverted","ci360-hotspot-marker-brand"),this.container.style.removeProperty("--ci360-hotspot-brand-color"),this.container.innerHTML="")}releaseMemory(){this.stopAutoplay(),this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=[],this.imagesY=[],this.isMemoryReleased=!0}reloadImages(){if(!this.isMemoryReleased)return;this.isMemoryReleased=!1;const t=this.container.offsetWidth;this.loadHigherQualityImages(t,()=>{this.updateView()})}addInitialIcon(){this.initialIcon||this.hide360Logo||(this.initialIcon=to(this.logoSrc),this.innerBox.appendChild(this.initialIcon))}showInitialIcon(){!this.initialIcon||this.hasInteracted||(this.initialIcon.style.opacity=1)}hideInitialIcon(){this.initialIcon&&(this.initialIcon.style.opacity=0)}createGlass(){this.hideAllIcons(),this.glass=document.createElement("div"),this.innerBox.appendChild(this.glass),this.innerBox.style.cursor="default"}removeGlass(){this.showAllIcons(),this.innerBox.removeChild(this.glass),this.glass=null,this.magnified=!1}addMagnifierIcon(){this.pointerZoom&&(this.magnifierIcon=no(),this.magnifierIcon.onclick=this.zoomIn.bind(this),this.iconsContainer.appendChild(this.magnifierIcon),this.zoomOutIcon=ro(),this.zoomOutIcon.onclick=this.zoomOut.bind(this),this.zoomOutIcon.style.display="none",this.iconsContainer.appendChild(this.zoomOutIcon))}showMagnifierIcon(){this.magnifierIcon&&(this.magnifierIcon.style.display="",this.magnifierIcon.style.visibility="visible",this.magnifierIcon.style.opacity=1)}hideMagnifierIcon(){this.magnifierIcon&&(this.magnifierIcon.style.display="none",this.magnifierIcon.style.visibility="hidden",this.magnifierIcon.style.opacity=0)}showZoomOutIcon(){this.zoomOutIcon&&(this.zoomOutIcon.style.display="",this.zoomOutIcon.style.visibility="visible",this.zoomOutIcon.style.opacity=1)}hideZoomOutIcon(){this.zoomOutIcon&&(this.zoomOutIcon.style.display="none",this.zoomOutIcon.style.visibility="hidden",this.zoomOutIcon.style.opacity=0)}addFullscreenIcon(){this.fullscreen&&(this.fullscreenIcon=oo(),this.fullscreenIcon.onclick=this.openFullscreenModal.bind(this),this.iconsContainer.appendChild(this.fullscreenIcon))}addCloseFullscreenIcon(){this.fullscreenCloseIcon=io(),this.fullscreenCloseIcon.onclick=this.closeFullscreenModal.bind(this),this.iconsContainer.appendChild(this.fullscreenCloseIcon)}showFullscreenIcon(){this.fullscreenIcon&&(this.fullscreenIcon.style.opacity=1)}hideFullscreenIcon(){this.fullscreenIcon&&(this.fullscreenIcon.style.opacity=0)}add360ViewCircleIcon(){this.view360CircleIcon||(this.view360CircleIcon=Ji(this.bottomCircleOffset),this.innerBox.appendChild(this.view360CircleIcon))}show360ViewCircleIcon(){this.view360CircleIcon&&(this.view360CircleIcon.style.opacity=1)}hide360ViewCircleIcon(){this.view360CircleIcon&&(this.view360CircleIcon.style.opacity=0)}addLoadingSpinner(){this.loadingSpinner=co(),this.innerBox.appendChild(this.loadingSpinner)}showLoadingSpinner(){this.loadingSpinner&&(this.hideAllIcons(),this.loadingSpinner.style.opacity=1)}createTransitionOverlay(){this.transitionOverlay=ho(),this.innerBox.appendChild(this.transitionOverlay)}showTransitionOverlay(){this.transitionOverlay&&(this.hideAllIcons(),this.transitionOverlay.style.opacity=1)}hideTransitionOverlay(){this.transitionOverlay&&(this.transitionOverlay.style.opacity=0)}hideLoadingSpinner(){this.loadingSpinner&&(this.loadingSpinner.style.opacity=0)}hideHints(){!this.hintsOverlay||this.hintsHidden||(this.hintsHidden=!0,go(this.hintsOverlay))}addHotspotTimeline(){if(!this.hotspots||this.hotspotTimeline)return;const t=xo(this.innerBox,this.amountX,this.hotspots);if(!t)return;this.hotspotTimeline=t.element,this.hotspotTimelineIndicator=t.indicator,this.innerBox.classList.add("has-hotspot-timeline"),this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach(o=>{o.addEventListener("click",s=>{s.stopPropagation(),this.hideAllIcons(),this.hideHints();const n=parseInt(o.getAttribute("data-frame"),10),l=o.getAttribute("data-hotspot-id");isNaN(n)||this.animateToFrame(n,l)})}),this.updateHotspotTimelinePosition()}showHotspotTimeline(){Io(this.hotspotTimeline)}hideHotspotTimeline(){ko(this.hotspotTimeline)}updateHotspotTimelinePosition(){Co(this.hotspotTimelineIndicator,this.activeImageX,this.amountX)}animateToFrame(t,i){if(this.hotspotsInstance&&this.hotspotsInstance.hidePopper(),this.isAnimatingToFrame||t===this.activeImageX){t===this.activeImageX&&i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&this.hotspotsInstance.showHotspotById(i);return}this.isAnimatingToFrame=!0,this.hasInteracted=!0,(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null);const o=this.activeImageX,s=(t-o+this.amountX)%this.amountX,n=(o-t+this.amountX)%this.amountX,l=s<=n,a=l?s:n;if(a===0){this.isAnimatingToFrame=!1;return}const r=30;let h=a;const c=()=>{if(h<=0){this.isAnimatingToFrame=!1,i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&setTimeout(()=>{this.hotspotsInstance.showHotspotById(i)},50);return}l?this.moveRight():this.moveLeft(),h--,h>0?setTimeout(c,r):(this.isAnimatingToFrame=!1,i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&setTimeout(()=>{this.hotspotsInstance.showHotspotById(i)},50))};c()}remove360ViewCircleIcon(){this.view360CircleIcon&&(this.innerBox.removeChild(this.view360CircleIcon),this.view360CircleIcon=null)}addAllIcons(){this.removeLoader(),this.iconsContainer&&(this.innerBox.style.cursor="grab",this.pointerZoom&&(this.createTransitionOverlay(),this.addLoadingSpinner()),!this.fullscreenView&&!this.touchDevice&&this.addMagnifierIcon(),this.fullscreenView||this.addFullscreenIcon(),this.initialIconShown&&this.addInitialIcon(),this.bottomCircle&&this.add360ViewCircleIcon())}showAllIcons(){this.showInitialIcon(),this.show360ViewCircleIcon(),this.showMagnifierIcon(),this.showFullscreenIcon(),this.showHotspotTimeline()}hideAllIcons(){this.hideInitialIcon(),this.hide360ViewCircleIcon(),this.hideMagnifierIcon(),this.hideZoomOutIcon(),this.hideFullscreenIcon()}removeLoader(){this.loader&&(this.innerBox.removeChild(this.loader),this.loader=null)}attachEvents(t,i,o){t&&this.addMouseEvents(),i&&this.addTouchEvents(),o&&this.addKeyboardEvents(),this.addEscKeyHandler()}removeEvents(){this.removeMouseEvents(),this.removeTouchEvents(),this.removeKeyboardEvents(),this.removeEscKeyHandler()}addMouseEvents(){this.boundMouseClick=this.mouseClick.bind(this),this.boundMouseDblClick=this.mouseDblClick.bind(this),this.boundMouseDown=this.mouseDown.bind(this),this.boundMouseMove=be(this.mouseMove.bind(this),ye),this.boundMouseUp=this.mouseUp.bind(this),this.boundMouseLeave=this.mouseLeave.bind(this),this.innerBox.addEventListener("click",this.boundMouseClick),this.innerBox.addEventListener("dblclick",this.boundMouseDblClick),this.innerBox.addEventListener("mousedown",this.boundMouseDown),this.innerBox.addEventListener("mouseleave",this.boundMouseLeave),document.addEventListener("mousemove",this.boundMouseMove),document.addEventListener("mouseup",this.boundMouseUp)}addTouchEvents(){this.boundTouchOutside=this.touchOutside.bind(this),this.boundTouchStart=this.touchStart.bind(this),this.boundTouchEnd=this.touchEnd.bind(this),this.boundTouchMove=be(this.touchMove.bind(this),ye),document.addEventListener("touchstart",this.boundTouchOutside),this.container.addEventListener("touchstart",this.boundTouchStart),this.container.addEventListener("touchend",this.boundTouchEnd),this.container.addEventListener("touchmove",this.boundTouchMove)}addKeyboardEvents(){this.boundKeyDown=this.keyDown.bind(this),this.boundKeyUp=this.keyUp.bind(this),document.addEventListener("keydown",this.boundKeyDown),document.addEventListener("keyup",this.boundKeyUp)}addEscKeyHandler(){this.boundEscHandler=t=>{t.keyCode===27&&(this.fullscreenView?this.closeFullscreenModal(t):this.isZoomed?this.removeZoom():this.glass&&this.removeGlass())},document.addEventListener("keydown",this.boundEscHandler)}removeEscKeyHandler(){document.removeEventListener("keydown",this.boundEscHandler)}removeMouseEvents(){this.innerBox.removeEventListener("click",this.boundMouseClick),this.innerBox.removeEventListener("dblclick",this.boundMouseDblClick),this.innerBox.removeEventListener("mousedown",this.boundMouseDown),this.innerBox.removeEventListener("mouseleave",this.boundMouseLeave),document.removeEventListener("mousemove",this.boundMouseMove),document.removeEventListener("mouseup",this.boundMouseUp)}removeTouchEvents(){document.removeEventListener("touchstart",this.boundTouchOutside),this.container.removeEventListener("touchstart",this.boundTouchStart),this.container.removeEventListener("touchend",this.boundTouchEnd),this.container.removeEventListener("touchmove",this.boundTouchMove)}removeKeyboardEvents(){document.removeEventListener("keydown",this.boundKeyDown),document.removeEventListener("keyup",this.boundKeyUp)}createContainers(t){if(this.iconsContainer=Oe(this.innerBox),this.canvas=eo(this.innerBox,t),this.loader=ao(this.innerBox),this.ariaLiveRegion=uo(this.innerBox),this.useMainThreadCanvas)this.canvasWorker.postMessage({action:"initCanvas",offscreen:this.canvas,devicePixelRatio:this.devicePixelRatio});else{const i=this.canvas.transferControlToOffscreen();this.canvasWorker.postMessage({action:"initCanvas",offscreen:i,devicePixelRatio:this.devicePixelRatio},[i])}this.fullscreenView&&this.addCloseFullscreenIcon(),_t(this.innerBox,".cloudimage-360-placeholder")}update(t){this.isReady&&(this.stopAutoplay(),_t(this.innerBox,".cloudimage-360-icons-container"),this.init(this.container,t,!0),this.iconsContainer=Oe(this.innerBox),this.onAllImagesLoaded())}init(t,i,o){const s=i?Fi(i):Bi(t),{folder:n,apiVersion:l,filenameX:a,filenameY:r,imageListX:h,imageListY:c,indexZeroBase:p,amountX:f,amountY:u,draggable:x=!0,swipeable:y=!0,keys:g,keysReverse:I,bottomCircleOffset:O,autoplay:w,autoplayBehavior:v,playOnce:k,speed:m,autoplayReverse:b,fullscreen:C,magnifier:E,ciToken:S,ciFilters:T,ciTransformation:H,lazyload:L,dragSpeed:_,stopAtEdges:U,pointerZoom:R,pointerZoomTrigger:z="dblclick",imageInfo:pt="black",initialIconShown:K,bottomCircle:ut,hotspots:St,hotspotTrigger:st="hover",dragReverse:mt,hide360Logo:et,logoSrc:j,inertia:nt,pinchZoom:ft,hints:q,theme:gt,markerTheme:zt,brandColor:vt,hotspotTimelineOnClick:re=!0,aspectRatio:Bt,cropAspectRatio:ae,cropGravity:le,onReady:Wt,onLoad:Ft,onSpin:ce,onAutoplayStart:he,onAutoplayStop:J,onFullscreenOpen:bt,onFullscreenClose:Vt,onZoomIn:Nt,onZoomOut:Tt,onDragStart:$t,onDragEnd:jt,onHotspotOpen:de,onHotspotClose:pe,onProductClick:Cn,onError:mn}=s,li={ciToken:S,ciFilters:T,ciTransformation:H,cropAspectRatio:ae,cropGravity:le},ue=Ut(h,[]),me=Ut(c,[]);if(this.viewerConfig=s,this.amountX=ue.length||f,this.amountY=me.length||u,this.allowSpinX=!!this.amountX,this.allowSpinY=!!this.amountY,this.activeImageX=b?this.amountX-1:0,this.activeImageY=b?this.amountY-1:0,this.bottomCircleOffset=O,this.autoplay=w,this.autoplayBehavior=v,this.playOnce=k,this.speed=m,this.autoplayReverse=b,this.fullscreen=C,this.magnifier=E>1?Math.min(E,zi):0,this.dragSpeed=Math.max(_,Di),this.stopAtEdges=U,this.ciParams=li,this.apiVersion=l,this.pointerZoom=R>1?Math.min(R,xe):null,this.pointerZoomTrigger=z,this.keysReverse=I,this.info=pt,this.keys=g,this.innerBox=this.innerBox??so(this.container),this.container.style.aspectRatio=Bt||"",this.initialIconShown=K,this.bottomCircle=ut,this.spinDirection=Bo(this.autoplayBehavior,this.allowSpinX,this.allowSpinY),this.dragReverse=mt,this.hotspots=St,this.hotspotTrigger=st,this.hide360Logo=et,this.logoSrc=j,this.inertia=nt,this.pinchZoom=ft,this.hints=q,this.hotspotTimelineOnClick=re,gt==="dark"?this.container.classList.add("ci360-theme-dark"):gt==="light"&&this.container.classList.remove("ci360-theme-dark"),this.container.classList.remove("ci360-hotspot-marker-inverted","ci360-hotspot-marker-brand"),zt==="inverted"?this.container.classList.add("ci360-hotspot-marker-inverted"):zt==="brand"&&(this.container.classList.add("ci360-hotspot-marker-brand"),vt&&this.container.style.setProperty("--ci360-hotspot-brand-color",vt)),this.onReady=Wt,this.onLoad=Ft,this.onSpin=ce,this.onAutoplayStart=he,this.onAutoplayStop=J,this.onFullscreenOpen=bt,this.onFullscreenClose=Vt,this.onZoomIn=Nt,this.onZoomOut=Tt,this.onDragStart=$t,this.onDragEnd=jt,this.onError=mn,this.srcXConfig={folder:n,filename:a,imageList:ue,container:t,innerBox:this.innerBox,apiVersion:l,ciParams:li,lazyload:L,amount:this.amountX,indexZeroBase:p,autoplayReverse:b,orientation:P.X},this.srcYConfig={...this.srcXConfig,filename:r,imageList:me,orientation:P.Y,amount:this.amountY},o&&this.removeEvents(),this.attachEvents(x,y,g),o)return;const ci=(this.fullscreenView?document.body:this.container).offsetWidth,hi=this.allowSpinX&&!ue.length?yt(this.srcXConfig,ci):null,di=this.allowSpinY&&!me.length?yt(this.srcYConfig,ci):null,pi=fn=>{ke({cdnPathX:hi,cdnPathY:di,configX:this.srcXConfig,configY:this.srcYConfig,onImageLoad:(Lt,gn,vn)=>this.onImageLoad(Lt,gn,vn),onFirstImageLoad:Lt=>this.onFirstImageLoaded(fn,Lt),onAllImagesLoad:this.onAllImagesLoaded.bind(this),onError:Lt=>this.emit("onError",Lt)})};this.allowSpinX?Me(hi,this.srcXConfig,pi):this.allowSpinY&&Me(di,this.srcYConfig,pi)}}const ri=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);class ai{constructor(){this.views=new Map,this.initAll=this.initAll.bind(this),this.getViews=this.getViews.bind(this),this.memoryObserver=null,this.memoryManagementAutoEnabled=!1}generateId(){return`ci360-${Math.random().toString(36).slice(2,11)}`}init(t,i,o){if(!t)return;const s=t.id||this.generateId();t.id||(t.id=s);const n=new Dt(t,i,o);return this.views.set(s,n),ri&&!this.memoryManagementAutoEnabled&&(this.memoryManagementAutoEnabled=!0,setTimeout(()=>this.enableMemoryManagement(),100)),n}initAll(t="cloudimage-360"){[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach(o=>{const s=o.id||this.generateId();o.id||(o.id=s);const n=new Dt(o);this.views.set(s,n)}),ri&&!this.memoryManagementAutoEnabled&&this.views.size>0&&(this.memoryManagementAutoEnabled=!0,setTimeout(()=>this.enableMemoryManagement(),100))}destroy(t){const i=this.getViewById(t);i&&(i.destroy(),this.views.delete(t))}destroyAll(){this.views.forEach(t=>{t.destroy()}),this.views.clear()}getViewById(t){return this.views.get(t)}getViews(){return Array.from(this.views.values())}updateView(t,i){const o=this.getViewById(t);if(!o)return null;const s={...o.viewerConfig,...i};o.destroy();const n=document.getElementById(t);return this.init(n,s)}enableMemoryManagement(t={}){this.memoryObserver&&this.memoryObserver.disconnect();const i=t.rootMargin||"200px";this.memoryObserver=new IntersectionObserver(o=>{o.forEach(s=>{const n=this.getViewById(s.target.id);n&&(s.isIntersecting?n.isMemoryReleased&&n.reloadImages():!n.isMemoryReleased&&n.isReady&&n.releaseMemory())})},{rootMargin:i}),this.views.forEach((o,s)=>{const n=document.getElementById(s);n&&this.memoryObserver.observe(n)}),this.boundVisibilityHandler=()=>{document.hidden?this.views.forEach(o=>{!o.isMemoryReleased&&o.isReady&&o.releaseMemory()}):this.views.forEach((o,s)=>{if(o.isMemoryReleased){const n=document.getElementById(s);if(n){const l=n.getBoundingClientRect();l.top<window.innerHeight&&l.bottom>0&&o.reloadImages()}}})},document.addEventListener("visibilitychange",this.boundVisibilityHandler)}disableMemoryManagement(){this.memoryObserver&&(this.memoryObserver.disconnect(),this.memoryObserver=null),this.boundVisibilityHandler&&(document.removeEventListener("visibilitychange",this.boundVisibilityHandler),this.boundVisibilityHandler=null)}}return window.CI360=ai,ai}();
|
|
65
|
+
`,o},Ae=(e,t,i)=>{const{innerBox:o,imageList:s,lazyload:n}=t||{},[r]=s,l=r||Eo(e,t),a=Co(l),h=Te(a,n,"cloudimage-lazy"),c=Te(a,!1,"cloudimage-360-placeholder"),d=f=>{Kt(o,".cloudimage-lazy"),i&&i({event:f,width:h.width,height:h.height,naturalWidth:h.naturalWidth,naturalHeight:h.naturalHeight,src:a})};h.onload=d,o.appendChild(h),o.appendChild(c),Io(h)},zo=(e,t,i)=>{const o=e/i,s=t/i;return{zoomedWidth:o,zoomedHeight:s}},So=({pointerX:e,pointerY:t,imageData:i,zoomedWidth:o,zoomedHeight:s,drawWidth:n,drawHeight:r})=>{const{naturalWidth:l,naturalHeight:a}=i;let h=e/n*l-o/2,c=t/r*a-s/2;const d=Math.max(0,l-o),f=Math.max(0,a-s);return h=Math.max(0,Math.min(h,d)),c=Math.max(0,Math.min(c,f)),{zoomOffsetX:h,zoomOffsetY:c}},Oe=(e,{bottom:t,top:i})=>{e?t():i()},Le=(e,{left:t,right:i})=>{e?t():i()},To=({autoplayBehavior:e,spinY:t,reversed:i,loopTriggers:o})=>{switch(e){case M.SPIN_XY:case M.SPIN_YX:t?Oe(i,o):Le(i,o);break;case M.SPIN_Y:Oe(i,o);break;case M.SPIN_X:default:Le(i,o)}},Ao=({autoplayBehavior:e,activeImageX:t,activeImageY:i,amountX:o,amountY:s,autoplayReverse:n})=>{const r=(l,a)=>{const h=a-1;return n?l===0:l===h};switch(e){case M.SPIN_XY:case M.SPIN_Y:return r(i,s);case M.SPIN_X:case M.SPIN_YX:default:return r(t,o)}},Oo=({autoplayBehavior:e,activeImageX:t,activeImageY:i,amountX:o,amountY:s,autoplayReverse:n,spinDirection:r})=>{const l=t===(n?0:o-1),a=i===(n?0:s-1);return e===M.SPIN_XY||e===M.SPIN_YX?r==="x"&&l||r==="y"&&a:!1},Lo=(e,t,i)=>{if(!i)return"x";if(!t)return"y";switch(e){case M.SPIN_XY:return"x";case M.SPIN_YX:return"y";case M.SPIN_Y:return"y";case M.SPIN_X:default:return"x"}},Mo=e=>e==="x"?"y":"x",Me=(e,t)=>{const i=[...Mi];return t?[...i,...Xi].includes(e):i.includes(e)},Xe=({deltaX:e,deltaY:t,reversed:i,allowSpinX:o,allowSpinY:s,threshold:n=0})=>{const r=o&&!s||s&&!o?0:n,l=Math.abs(e),a=Math.abs(t);return o&&l-r>a?i?e>0?"left":"right":e>0?"right":"left":s&&a-r>l?i?t>0?"up":"down":t>0?"down":"up":null},Xo=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0,Yo=(e,t=150)=>{let i;return function(...o){clearTimeout(i),i=setTimeout(()=>{e.apply(this,o)},t)}},Ho=()=>document.fullscreenEnabled||document.webkitFullscreenEnabled,Jt=()=>document.fullscreenElement||document.webkitFullscreenElement,Ro=e=>e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():Promise.reject(new Error("Fullscreen API not supported")),Ye=()=>document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():Promise.reject(new Error("Fullscreen API not supported")),N=1;class Zo{constructor(t,{zoomMax:i=5,zoomStep:o=.5,onZoomChange:s}={}){this.container=t,this.zoomMax=i,this.zoomStep=o,this.onZoomChange=s,this.zoom=1,this.panX=0,this.panY=0,this.drawWidth=0,this.drawHeight=0,this.isPanning=!1,this.panStartX=0,this.panStartY=0,this._onWheel=this._onWheel.bind(this),this._onDblClick=this._onDblClick.bind(this),this._onMouseMove=this._onMouseMove.bind(this),this._onMouseUp=this._onMouseUp.bind(this),this._onGestureStart=this._onGestureStart.bind(this),this._onGestureChange=this._onGestureChange.bind(this),this._onGestureEnd=this._onGestureEnd.bind(this),this._gestureBaseZoom=1,this._attach()}setDrawSize(t,i,o=!1){const s=this.drawWidth,n=this.drawHeight;this.drawWidth=t,this.drawHeight=i,o&&s&&n?(this.panX=this.panX/s*t,this.panY=this.panY/n*i,this._clampPan()):(this.panX=t/2,this.panY=i/2)}_attach(){this.container.addEventListener("wheel",this._onWheel,{passive:!1}),this.container.addEventListener("dblclick",this._onDblClick),typeof GestureEvent<"u"&&(this.container.addEventListener("gesturestart",this._onGestureStart),this.container.addEventListener("gesturechange",this._onGestureChange),this.container.addEventListener("gestureend",this._onGestureEnd))}destroy(){this.container.removeEventListener("wheel",this._onWheel),this.container.removeEventListener("dblclick",this._onDblClick),this._stopPanListeners(),typeof GestureEvent<"u"&&(this.container.removeEventListener("gesturestart",this._onGestureStart),this.container.removeEventListener("gesturechange",this._onGestureChange),this.container.removeEventListener("gestureend",this._onGestureEnd))}zoomIn(){this._applyZoom(this.zoom+this.zoomStep)}zoomOut(){this._applyZoom(this.zoom-this.zoomStep)}resetZoom(){this._applyZoom(N)}setZoom(t){this._applyZoom(t)}zoomTowardPoint(t,i,o){this._zoomTowardPoint(t,i,o)}getZoom(){return this.zoom}isZoomed(){return this.zoom>N}startPan(t,i){return this.zoom<=N?!1:(this.isPanning=!0,this.panStartX=t,this.panStartY=i,document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),!0)}_stopPanListeners(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp)}_onMouseMove(t){if(!this.isPanning)return;const i=t.pageX-this.panStartX,o=t.pageY-this.panStartY;this.panStartX=t.pageX,this.panStartY=t.pageY,this._applyPan(this.panX-i,this.panY-o)}_onMouseUp(){this.isPanning=!1,this._stopPanListeners()}_onWheel(t){if(!t.ctrlKey&&!t.metaKey)return;t.preventDefault();const i=t.deltaY>0?-1:1,o=this.zoom+i*this.zoomStep;this._zoomTowardPoint(o,t.clientX,t.clientY)}_onDblClick(t){t.target&&t.target.closest&&(t.target.closest(".cloudimage-360-button")||t.target.closest(".cloudimage-360-hotspot-timeline")||t.target.closest(".cloudimage-360-hotspot")||t.target.closest(".cloudimage-360-zoom-controls"))||(this.zoom>N?this._applyZoom(N):this._zoomTowardPoint(2,t.clientX,t.clientY))}_onGestureStart(t){t.preventDefault(),this._gestureBaseZoom=this.zoom}_onGestureChange(t){t.preventDefault();const i=this._gestureBaseZoom*t.scale;this._zoomTowardPoint(i,t.clientX,t.clientY)}_onGestureEnd(t){t.preventDefault()}handleKeyZoom(t){return t===187||t===107?(this.zoomIn(),!0):t===189||t===109?(this.zoomOut(),!0):t===48||t===96?(this.resetZoom(),!0):!1}handleKeyPan(t,i=50){if(this.zoom<=N)return!1;let o=0,s=0;switch(t){case 37:o=-i;break;case 39:o=i;break;case 38:s=-i;break;case 40:s=i;break;default:return!1}return this._applyPan(this.panX+o,this.panY+s),!0}applyTouchPan(t,i){this.zoom<=N||this._applyPan(this.panX-t,this.panY-i)}applyTouchZoom(t){this._applyZoom(t)}_zoomTowardPoint(t,i,o){var r;const s=Math.max(N,Math.min(t,this.zoomMax));if(s===this.zoom)return;const n=(r=this.container.querySelector("canvas"))==null?void 0:r.getBoundingClientRect();if(n){const l=(i-n.left)/n.width*this.drawWidth,a=(o-n.top)/n.height*this.drawHeight,h=s/this.zoom;this.panX=l+(this.panX-l)*h,this.panY=a+(this.panY-a)*h}this.zoom=s,this._clampPan(),this._emit()}_applyZoom(t){const i=Math.max(N,Math.min(t,this.zoomMax));i!==this.zoom&&(this.zoom=i,this.zoom<=N&&(this.panX=this.drawWidth/2,this.panY=this.drawHeight/2),this._clampPan(),this._emit())}_applyPan(t,i){this.panX=t,this.panY=i,this._clampPan(),this._emit()}_clampPan(){if(this.zoom<=N||!this.drawWidth||!this.drawHeight)return;const t=this.drawWidth/(2*this.zoom),i=this.drawHeight/(2*this.zoom);this.panX=Math.max(t,Math.min(this.panX,this.drawWidth-t)),this.panY=Math.max(i,Math.min(this.panY,this.drawHeight-i))}_emit(){typeof this.onZoomChange=="function"&&this.onZoomChange(this.zoom,this.panX,this.panY)}}class Do{constructor(t,{onPinchZoom:i,onPan:o,onDoubleTap:s,getZoom:n,zoomMax:r=5}={}){this.container=t,this.onPinchZoom=i,this.onPan=o,this.onDoubleTap=s,this.getZoom=n,this.zoomMax=r,this.isPinching=!1,this.initialPinchDistance=0,this.pinchBaseZoom=1,this.lastTouchX=0,this.lastTouchY=0,this.lastTapTime=0,this.lastTapX=0,this.lastTapY=0,this._onTouchStart=this._onTouchStart.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._attach()}_attach(){this.container.addEventListener("touchstart",this._onTouchStart,{passive:!1}),this.container.addEventListener("touchmove",this._onTouchMove,{passive:!1}),this.container.addEventListener("touchend",this._onTouchEnd,{passive:!1})}destroy(){this.container.removeEventListener("touchstart",this._onTouchStart),this.container.removeEventListener("touchmove",this._onTouchMove),this.container.removeEventListener("touchend",this._onTouchEnd)}_getPinchDistance(t,i){const o=t.pageX-i.pageX,s=t.pageY-i.pageY;return Math.sqrt(o*o+s*s)}_onTouchStart(t){if(t.touches){if(t.touches.length===2){t.preventDefault(),this.isPinching=!0,this.initialPinchDistance=this._getPinchDistance(t.touches[0],t.touches[1]),this.pinchBaseZoom=typeof this.getZoom=="function"?this.getZoom():1;return}if(t.touches.length===1){const i=t.touches[0];this.lastTouchX=i.pageX,this.lastTouchY=i.pageY;const o=Date.now(),s=o-this.lastTapTime,n=Math.abs(i.pageX-this.lastTapX),r=Math.abs(i.pageY-this.lastTapY);if(s<300&&n<30&&r<30){t.preventDefault(),t.stopPropagation(),this.lastTapTime=0,typeof this.onDoubleTap=="function"&&this.onDoubleTap(i.clientX,i.clientY);return}this.lastTapTime=o,this.lastTapX=i.pageX,this.lastTapY=i.pageY}}}_onTouchMove(t){if(t.touches){if(this.isPinching&&t.touches.length===2){t.preventDefault();const i=this._getPinchDistance(t.touches[0],t.touches[1]);if(this.initialPinchDistance===0){this.initialPinchDistance=i;return}const o=i/this.initialPinchDistance,s=Math.max(1,Math.min(this.pinchBaseZoom*o,this.zoomMax)),n=(t.touches[0].clientX+t.touches[1].clientX)/2,r=(t.touches[0].clientY+t.touches[1].clientY)/2;typeof this.onPinchZoom=="function"&&this.onPinchZoom(s,n,r);return}if(t.touches.length===1){if((typeof this.getZoom=="function"?this.getZoom():1)<=1)return;t.preventDefault();const o=t.touches[0],s=o.pageX-this.lastTouchX,n=o.pageY-this.lastTouchY;this.lastTouchX=o.pageX,this.lastTouchY=o.pageY,typeof this.onPan=="function"&&this.onPan(s,n)}}}_onTouchEnd(t){this.isPinching&&(!t.touches||t.touches.length<2)&&(this.isPinching=!1,this.initialPinchDistance=0,t.touches&&t.touches.length===1&&(this.lastTouchX=t.touches[0].pageX,this.lastTouchY=t.touches[0].pageY))}}const Bo='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>',_o='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>',Fo='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>',Wo=(e,{position:t="bottom-right",onZoomIn:i,onZoomOut:o,onReset:s,zoomMax:n=5}={})=>{const r=document.createElement("div");r.className="cloudimage-360-zoom-controls",r.setAttribute("data-position",t),r.setAttribute("role","toolbar"),r.setAttribute("aria-label","Zoom controls");const l=document.createElement("button");l.className="cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in",l.setAttribute("aria-label","Zoom in"),l.innerHTML=Bo,l.addEventListener("click",c=>{c.stopPropagation(),typeof i=="function"&&i()});const a=document.createElement("button");a.className="cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out",a.setAttribute("aria-label","Zoom out"),a.innerHTML=_o,a.disabled=!0,a.addEventListener("click",c=>{c.stopPropagation(),typeof o=="function"&&o()});const h=document.createElement("button");return h.className="cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset",h.setAttribute("aria-label","Reset zoom"),h.innerHTML=Fo,h.disabled=!0,h.addEventListener("click",c=>{c.stopPropagation(),typeof s=="function"&&s()}),r.appendChild(l),r.appendChild(a),r.appendChild(h),e.appendChild(r),{element:r,updateState(c){l.disabled=c>=n,a.disabled=c<=1,h.disabled=c<=1},show(){r.classList.add("visible")},hide(){r.classList.remove("visible")},destroy(){r.parentNode&&r.parentNode.removeChild(r)}}},He="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsK",No=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0)),Re=typeof self<"u"&&self.Blob&&new Blob([No(He)],{type:"text/javascript;charset=utf-8"});function Vo(e){let t;try{if(t=Re&&(self.URL||self.webkitURL).createObjectURL(Re),!t)throw"";const i=new Worker(t,{name:e==null?void 0:e.name});return i.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),i}catch{return new Worker("data:text/javascript;base64,"+He,{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class jo{constructor(){this.canvas=null,this.ctx=null,this.dpr=1,this.drawWidth=0,this.drawHeight=0,this.wideImage=!1}postMessage(t){const{action:i,offscreen:o,devicePixelRatio:s,imageData:n,zoomScale:r,pointerX:l,pointerY:a,imageAspectRatio:h,containerWidth:c,containerHeight:d}=t;switch(i){case"initCanvas":this.initCanvas(o,s);break;case"adaptCanvasSize":this.adaptCanvasSize(h,c,d);break;case"drawImageOnCanvas":this.drawImageOnCanvas(n,r,l,a);break}}terminate(){var t,i;this.ctx&&this.ctx.clearRect(0,0,((t=this.canvas)==null?void 0:t.width)||0,((i=this.canvas)==null?void 0:i.height)||0),this.canvas=null,this.ctx=null}initCanvas(t,i){this.canvas=t,this.ctx=t.getContext("2d"),this.dpr=i}adaptCanvasSize(t,i,o){if(!this.canvas||!this.ctx)return;const s=i/o;this.wideImage=t>s,this.canvas.width=i*this.dpr,this.canvas.height=o*this.dpr,this.ctx.scale(this.dpr,this.dpr),this.wideImage?(this.drawWidth=i,this.drawHeight=i/t):(this.drawHeight=o,this.drawWidth=o*t),this.ctx.imageSmoothingEnabled=!0,this.ctx.imageSmoothingQuality="high"}drawImageOnCanvas(t={},i=1,o=0,s=0){const{bitmapImage:n}=t;if(!this.canvas||!this.ctx||!n)return;let r,l;if(this.wideImage?(r=0,l=(this.canvas.height/this.dpr-this.drawHeight)/2):(r=(this.canvas.width/this.dpr-this.drawWidth)/2,l=0),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),i!==1){const{naturalWidth:a,naturalHeight:h}=t,{zoomedWidth:c,zoomedHeight:d}=zo(a,h,i),{zoomOffsetX:f,zoomOffsetY:m}=So({pointerX:o,pointerY:s,imageData:t,zoomedWidth:c,zoomedHeight:d,drawWidth:this.drawWidth,drawHeight:this.drawHeight});this.ctx.drawImage(n,f,m,c,d,r,l,this.drawWidth,this.drawHeight)}else this.ctx.drawImage(n,r,l,this.drawWidth,this.drawHeight)}}const Go=new Set(["p","span","div","br","hr","strong","em","b","i","u","s","h1","h2","h3","h4","h5","h6","ul","ol","li","a","img","button","table","thead","tbody","tr","th","td","blockquote","pre","code","label","input","select","option","textarea","svg","path","circle","rect","line","polyline","polygon","ellipse","g","text","tspan","defs","use","symbol","clippath","mask","lineargradient","radialgradient","stop"]),Ze={a:["href","title","target","rel"],img:["src","alt","title","width","height"],button:["type","disabled","name","value"],input:["type","name","value","placeholder","disabled","readonly","checked","min","max","step"],select:["name","disabled","multiple"],option:["value","disabled","selected"],textarea:["name","placeholder","disabled","readonly","rows","cols"],label:["for"],svg:["viewbox","width","height","fill","stroke","xmlns","preserveaspectratio"],path:["d","fill","stroke","stroke-width","stroke-linecap","stroke-linejoin","transform"],circle:["cx","cy","r","fill","stroke","stroke-width"],rect:["x","y","width","height","rx","ry","fill","stroke","stroke-width"],line:["x1","y1","x2","y2","stroke","stroke-width"],polyline:["points","fill","stroke","stroke-width"],polygon:["points","fill","stroke","stroke-width"],ellipse:["cx","cy","rx","ry","fill","stroke","stroke-width"],g:["transform","fill","stroke"],text:["x","y","dx","dy","text-anchor","fill","font-size","font-family","font-weight"],tspan:["x","y","dx","dy"],use:["href","xlink:href","x","y","width","height"],lineargradient:["id","x1","y1","x2","y2","gradientunits"],radialgradient:["id","cx","cy","r","fx","fy","gradientunits"],stop:["offset","stop-color","stop-opacity"],clippath:["id"],mask:["id"],"*":["class","id","style"]},Uo=[/javascript:/i,/vbscript:/i,/on\w+\s*=/i],$o=e=>{if(typeof e!="string")return"";const t=document.createElement("template");t.innerHTML=e;const i=o=>{if(Array.from(o.childNodes).forEach(i),o.nodeType===Node.ELEMENT_NODE){const n=o.tagName.toLowerCase();if(!Go.has(n)){if(n==="script"||n==="style"){o.remove();return}const a=document.createTextNode(o.textContent);o.parentNode.replaceChild(a,o);return}const r=[...Ze[n]||[],...Ze["*"]||[]];if(Array.from(o.attributes).forEach(a=>{const h=a.name.toLowerCase();if(h.startsWith("on")){o.removeAttribute(a.name);return}if(!r.includes(h)){o.removeAttribute(a.name);return}let c=a.value;Uo.forEach(d=>{d.test(c)&&o.removeAttribute(a.name)})}),n==="a"){const a=o.getAttribute("href");a&&(/^(https?:|mailto:|tel:|#|\/)/i.test(a.trim())||o.removeAttribute("href")),o.getAttribute("target")==="_blank"&&o.setAttribute("rel","noopener noreferrer")}if(n==="img"){const a=o.getAttribute("src");a&&(/^(https?:|\/|data:image\/)/i.test(a.trim())||o.removeAttribute("src"))}}};return i(t.content),t.innerHTML},Ko=e=>e==="y"?A.Y:A.X,qo=(e,t,i)=>e.filter(o=>Ko(o.orientation)===i&&t in o.positions),Jo=(e,t,i)=>{const o=document.createElement("button");if(o.id=e,o.className="cloudimage-360-hotspot cloudimage-360-hotspot--pulse",o.dataset.hotspotId=e,o.setAttribute("type","button"),o.setAttribute("aria-label",t||`Hotspot ${e}`),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-expanded","false"),i==="dot-label"&&t){o.classList.add("cloudimage-360-hotspot--dot-label");const s=document.createElement("span");s.className="cloudimage-360-hotspot-label",s.textContent=t,o.appendChild(s)}return o},Qo=e=>{const t=Object.entries(e).sort(([n],[r])=>Number(n)-Number(r));let i=null,o=null;const s={};for(const[n,r]of t)if(!r)s[n]={x:i,y:o};else{const{x:l,y:a}=r;l!=null&&(i=l),a!=null&&(o=a),s[n]={x:l??i,y:a??o}}return s},ts=e=>({placement:"top",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"preventOverflow",options:{boundary:e}},{name:"flip",options:{boundary:e,fallbackPlacements:["bottom","right","left"]}}]}),es=(e,t,i)=>{const o=document.createElement("div");return o.className="cloudimage-360-popper",o.id=`cloudimage-360-popper-${t}`,o.dataset.popperId=t,o.setAttribute("role","tooltip"),o.setAttribute("aria-hidden","false"),typeof e=="string"&&/<\/?[a-z][\s\S]*>/i.test(e)?o.innerHTML=$o(e):o.textContent=e,(i||document.body).appendChild(o),o},is=e=>e.map(t=>{const i={...Qo(t.positions)};return{...t,initialPositions:i,positions:i}}),os=({newWidth:e,newHeight:t,initialContainerSize:i,imageAspectRatio:o,hotspotsConfig:s})=>{const[n,r]=i;let l=e,a=t,h=0,c=0;const d=e/t;o>d?(a=e/o,c=(t-a)/2):(l=t*o,h=(e-l)/2);const m=l/n,C=a/r;return s.map(b=>{const y={};return Object.entries(b.initialPositions).forEach(([I,P])=>{y[I]={x:P.x*m+h,y:P.y*C+c}}),{...b,positions:y}})};function ss(e){const t=[];e.image&&t.push(`<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${wt(e.image)}" alt="${wt(e.title||"")}"></div>`);const i=[];if(e.title&&i.push(`<h3 class="ci360-popper-title">${ct(e.title)}</h3>`),e.originalPrice||e.price){let o="";e.originalPrice&&(o+=`<span class="ci360-popper-original-price">${ct(e.originalPrice)}</span>`),e.price&&(o+=`<span class="ci360-popper-price">${ct(e.price)}</span>`),i.push(`<div class="ci360-popper-price-row">${o}</div>`)}if(e.description&&i.push(`<p class="ci360-popper-description">${ct(e.description)}</p>`),e.url&&ns(e.url)){const o=e.ctaText||"View details",s=e.id?` data-product-id="${wt(e.id)}"`:"";i.push(`<a class="ci360-popper-cta" href="${wt(e.url)}"${s}>${ct(String(o))}</a>`)}else if(e.id){const o=e.ctaText||"View details";i.push(`<button class="ci360-popper-cta" data-product-id="${wt(e.id)}">${ct(String(o))}</button>`)}return i.length>0&&t.push(`<div class="ci360-popper-body">${i.join("")}</div>`),t.join("")}function De(e){return e.content?e.content:e.data?ss(e.data):""}function ct(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function wt(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function ns(e){const t=e.replace(/[\s\x00-\x1f]/g,"");return/^https?:\/\//i.test(t)||/^\/(?!\/)/.test(t)||/^#/.test(t)}var H="top",_="bottom",F="right",R="left",Qt="auto",xt=[H,_,F,R],ht="start",Ct="end",rs="clippingParents",Be="viewport",It="popper",as="reference",_e=xt.reduce(function(e,t){return e.concat([t+"-"+ht,t+"-"+Ct])},[]),Fe=[].concat(xt,[Qt]).reduce(function(e,t){return e.concat([t,t+"-"+ht,t+"-"+Ct])},[]),ls="beforeRead",cs="read",hs="afterRead",ps="beforeMain",ds="main",us="afterMain",ms="beforeWrite",fs="write",gs="afterWrite",vs=[ls,cs,hs,ps,ds,us,ms,fs,gs];function V(e){return e?(e.nodeName||"").toLowerCase():null}function Z(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function ot(e){var t=Z(e).Element;return e instanceof t||e instanceof Element}function W(e){var t=Z(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function te(e){if(typeof ShadowRoot>"u")return!1;var t=Z(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function bs(e){var t=e.state;Object.keys(t.elements).forEach(function(i){var o=t.styles[i]||{},s=t.attributes[i]||{},n=t.elements[i];!W(n)||!V(n)||(Object.assign(n.style,o),Object.keys(s).forEach(function(r){var l=s[r];l===!1?n.removeAttribute(r):n.setAttribute(r,l===!0?"":l)}))})}function ys(e){var t=e.state,i={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,i.popper),t.styles=i,t.elements.arrow&&Object.assign(t.elements.arrow.style,i.arrow),function(){Object.keys(t.elements).forEach(function(o){var s=t.elements[o],n=t.attributes[o]||{},r=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:i[o]),l=r.reduce(function(a,h){return a[h]="",a},{});!W(s)||!V(s)||(Object.assign(s.style,l),Object.keys(n).forEach(function(a){s.removeAttribute(a)}))})}}const ws={name:"applyStyles",enabled:!0,phase:"write",fn:bs,effect:ys,requires:["computeStyles"]};function j(e){return e.split("-")[0]}var st=Math.max,Yt=Math.min,pt=Math.round;function ee(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function We(){return!/^((?!chrome|android).)*safari/i.test(ee())}function dt(e,t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var o=e.getBoundingClientRect(),s=1,n=1;t&&W(e)&&(s=e.offsetWidth>0&&pt(o.width)/e.offsetWidth||1,n=e.offsetHeight>0&&pt(o.height)/e.offsetHeight||1);var r=ot(e)?Z(e):window,l=r.visualViewport,a=!We()&&i,h=(o.left+(a&&l?l.offsetLeft:0))/s,c=(o.top+(a&&l?l.offsetTop:0))/n,d=o.width/s,f=o.height/n;return{width:d,height:f,top:c,right:h+d,bottom:c+f,left:h,x:h,y:c}}function ie(e){var t=dt(e),i=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-i)<=1&&(i=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:i,height:o}}function Ne(e,t){var i=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(i&&te(i)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function U(e){return Z(e).getComputedStyle(e)}function xs(e){return["table","td","th"].indexOf(V(e))>=0}function et(e){return((ot(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ht(e){return V(e)==="html"?e:e.assignedSlot||e.parentNode||(te(e)?e.host:null)||et(e)}function Ve(e){return!W(e)||U(e).position==="fixed"?null:e.offsetParent}function Cs(e){var t=/firefox/i.test(ee()),i=/Trident/i.test(ee());if(i&&W(e)){var o=U(e);if(o.position==="fixed")return null}var s=Ht(e);for(te(s)&&(s=s.host);W(s)&&["html","body"].indexOf(V(s))<0;){var n=U(s);if(n.transform!=="none"||n.perspective!=="none"||n.contain==="paint"||["transform","perspective"].indexOf(n.willChange)!==-1||t&&n.willChange==="filter"||t&&n.filter&&n.filter!=="none")return s;s=s.parentNode}return null}function kt(e){for(var t=Z(e),i=Ve(e);i&&xs(i)&&U(i).position==="static";)i=Ve(i);return i&&(V(i)==="html"||V(i)==="body"&&U(i).position==="static")?t:i||Cs(e)||t}function oe(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Pt(e,t,i){return st(e,Yt(t,i))}function Is(e,t,i){var o=Pt(e,t,i);return o>i?i:o}function je(){return{top:0,right:0,bottom:0,left:0}}function Ge(e){return Object.assign({},je(),e)}function Ue(e,t){return t.reduce(function(i,o){return i[o]=e,i},{})}var ks=function(t,i){return t=typeof t=="function"?t(Object.assign({},i.rects,{placement:i.placement})):t,Ge(typeof t!="number"?t:Ue(t,xt))};function Ps(e){var t,i=e.state,o=e.name,s=e.options,n=i.elements.arrow,r=i.modifiersData.popperOffsets,l=j(i.placement),a=oe(l),h=[R,F].indexOf(l)>=0,c=h?"height":"width";if(!(!n||!r)){var d=ks(s.padding,i),f=ie(n),m=a==="y"?H:R,C=a==="y"?_:F,b=i.rects.reference[c]+i.rects.reference[a]-r[a]-i.rects.popper[c],y=r[a]-i.rects.reference[a],I=kt(n),P=I?a==="y"?I.clientHeight||0:I.clientWidth||0:0,w=b/2-y/2,g=d[m],k=P-f[c]-d[C],u=P/2-f[c]/2+w,v=Pt(g,u,k),x=a;i.modifiersData[o]=(t={},t[x]=v,t.centerOffset=v-u,t)}}function Es(e){var t=e.state,i=e.options,o=i.element,s=o===void 0?"[data-popper-arrow]":o;s!=null&&(typeof s=="string"&&(s=t.elements.popper.querySelector(s),!s)||Ne(t.elements.popper,s)&&(t.elements.arrow=s))}const zs={name:"arrow",enabled:!0,phase:"main",fn:Ps,effect:Es,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ut(e){return e.split("-")[1]}var Ss={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ts(e,t){var i=e.x,o=e.y,s=t.devicePixelRatio||1;return{x:pt(i*s)/s||0,y:pt(o*s)/s||0}}function $e(e){var t,i=e.popper,o=e.popperRect,s=e.placement,n=e.variation,r=e.offsets,l=e.position,a=e.gpuAcceleration,h=e.adaptive,c=e.roundOffsets,d=e.isFixed,f=r.x,m=f===void 0?0:f,C=r.y,b=C===void 0?0:C,y=typeof c=="function"?c({x:m,y:b}):{x:m,y:b};m=y.x,b=y.y;var I=r.hasOwnProperty("x"),P=r.hasOwnProperty("y"),w=R,g=H,k=window;if(h){var u=kt(i),v="clientHeight",x="clientWidth";if(u===Z(i)&&(u=et(i),U(u).position!=="static"&&l==="absolute"&&(v="scrollHeight",x="scrollWidth")),u=u,s===H||(s===R||s===F)&&n===Ct){g=_;var E=d&&u===k&&k.visualViewport?k.visualViewport.height:u[v];b-=E-o.height,b*=a?1:-1}if(s===R||(s===H||s===_)&&n===Ct){w=F;var S=d&&u===k&&k.visualViewport?k.visualViewport.width:u[x];m-=S-o.width,m*=a?1:-1}}var T=Object.assign({position:l},h&&Ss),X=c===!0?Ts({x:m,y:b},Z(i)):{x:m,y:b};if(m=X.x,b=X.y,a){var O;return Object.assign({},T,(O={},O[g]=P?"0":"",O[w]=I?"0":"",O.transform=(k.devicePixelRatio||1)<=1?"translate("+m+"px, "+b+"px)":"translate3d("+m+"px, "+b+"px, 0)",O))}return Object.assign({},T,(t={},t[g]=P?b+"px":"",t[w]=I?m+"px":"",t.transform="",t))}function As(e){var t=e.state,i=e.options,o=i.gpuAcceleration,s=o===void 0?!0:o,n=i.adaptive,r=n===void 0?!0:n,l=i.roundOffsets,a=l===void 0?!0:l,h={placement:j(t.placement),variation:ut(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:s,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,$e(Object.assign({},h,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:a})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,$e(Object.assign({},h,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Os={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:As,data:{}};var Rt={passive:!0};function Ls(e){var t=e.state,i=e.instance,o=e.options,s=o.scroll,n=s===void 0?!0:s,r=o.resize,l=r===void 0?!0:r,a=Z(t.elements.popper),h=[].concat(t.scrollParents.reference,t.scrollParents.popper);return n&&h.forEach(function(c){c.addEventListener("scroll",i.update,Rt)}),l&&a.addEventListener("resize",i.update,Rt),function(){n&&h.forEach(function(c){c.removeEventListener("scroll",i.update,Rt)}),l&&a.removeEventListener("resize",i.update,Rt)}}const Ms={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ls,data:{}};var Xs={left:"right",right:"left",bottom:"top",top:"bottom"};function Zt(e){return e.replace(/left|right|bottom|top/g,function(t){return Xs[t]})}var Ys={start:"end",end:"start"};function Ke(e){return e.replace(/start|end/g,function(t){return Ys[t]})}function se(e){var t=Z(e),i=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:i,scrollTop:o}}function ne(e){return dt(et(e)).left+se(e).scrollLeft}function Hs(e,t){var i=Z(e),o=et(e),s=i.visualViewport,n=o.clientWidth,r=o.clientHeight,l=0,a=0;if(s){n=s.width,r=s.height;var h=We();(h||!h&&t==="fixed")&&(l=s.offsetLeft,a=s.offsetTop)}return{width:n,height:r,x:l+ne(e),y:a}}function Rs(e){var t,i=et(e),o=se(e),s=(t=e.ownerDocument)==null?void 0:t.body,n=st(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=st(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),l=-o.scrollLeft+ne(e),a=-o.scrollTop;return U(s||i).direction==="rtl"&&(l+=st(i.clientWidth,s?s.clientWidth:0)-n),{width:n,height:r,x:l,y:a}}function re(e){var t=U(e),i=t.overflow,o=t.overflowX,s=t.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+o)}function qe(e){return["html","body","#document"].indexOf(V(e))>=0?e.ownerDocument.body:W(e)&&re(e)?e:qe(Ht(e))}function Et(e,t){var i;t===void 0&&(t=[]);var o=qe(e),s=o===((i=e.ownerDocument)==null?void 0:i.body),n=Z(o),r=s?[n].concat(n.visualViewport||[],re(o)?o:[]):o,l=t.concat(r);return s?l:l.concat(Et(Ht(r)))}function ae(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zs(e,t){var i=dt(e,!1,t==="fixed");return i.top=i.top+e.clientTop,i.left=i.left+e.clientLeft,i.bottom=i.top+e.clientHeight,i.right=i.left+e.clientWidth,i.width=e.clientWidth,i.height=e.clientHeight,i.x=i.left,i.y=i.top,i}function Je(e,t,i){return t===Be?ae(Hs(e,i)):ot(t)?Zs(t,i):ae(Rs(et(e)))}function Ds(e){var t=Et(Ht(e)),i=["absolute","fixed"].indexOf(U(e).position)>=0,o=i&&W(e)?kt(e):e;return ot(o)?t.filter(function(s){return ot(s)&&Ne(s,o)&&V(s)!=="body"}):[]}function Bs(e,t,i,o){var s=t==="clippingParents"?Ds(e):[].concat(t),n=[].concat(s,[i]),r=n[0],l=n.reduce(function(a,h){var c=Je(e,h,o);return a.top=st(c.top,a.top),a.right=Yt(c.right,a.right),a.bottom=Yt(c.bottom,a.bottom),a.left=st(c.left,a.left),a},Je(e,r,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Qe(e){var t=e.reference,i=e.element,o=e.placement,s=o?j(o):null,n=o?ut(o):null,r=t.x+t.width/2-i.width/2,l=t.y+t.height/2-i.height/2,a;switch(s){case H:a={x:r,y:t.y-i.height};break;case _:a={x:r,y:t.y+t.height};break;case F:a={x:t.x+t.width,y:l};break;case R:a={x:t.x-i.width,y:l};break;default:a={x:t.x,y:t.y}}var h=s?oe(s):null;if(h!=null){var c=h==="y"?"height":"width";switch(n){case ht:a[h]=a[h]-(t[c]/2-i[c]/2);break;case Ct:a[h]=a[h]+(t[c]/2-i[c]/2);break}}return a}function zt(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=o===void 0?e.placement:o,n=i.strategy,r=n===void 0?e.strategy:n,l=i.boundary,a=l===void 0?rs:l,h=i.rootBoundary,c=h===void 0?Be:h,d=i.elementContext,f=d===void 0?It:d,m=i.altBoundary,C=m===void 0?!1:m,b=i.padding,y=b===void 0?0:b,I=Ge(typeof y!="number"?y:Ue(y,xt)),P=f===It?as:It,w=e.rects.popper,g=e.elements[C?P:f],k=Bs(ot(g)?g:g.contextElement||et(e.elements.popper),a,c,r),u=dt(e.elements.reference),v=Qe({reference:u,element:w,placement:s}),x=ae(Object.assign({},w,v)),E=f===It?x:u,S={top:k.top-E.top+I.top,bottom:E.bottom-k.bottom+I.bottom,left:k.left-E.left+I.left,right:E.right-k.right+I.right},T=e.modifiersData.offset;if(f===It&&T){var X=T[s];Object.keys(S).forEach(function(O){var $=[F,_].indexOf(O)>=0?1:-1,K=[H,_].indexOf(O)>=0?"y":"x";S[O]+=X[K]*$})}return S}function _s(e,t){t===void 0&&(t={});var i=t,o=i.placement,s=i.boundary,n=i.rootBoundary,r=i.padding,l=i.flipVariations,a=i.allowedAutoPlacements,h=a===void 0?Fe:a,c=ut(o),d=c?l?_e:_e.filter(function(C){return ut(C)===c}):xt,f=d.filter(function(C){return h.indexOf(C)>=0});f.length===0&&(f=d);var m=f.reduce(function(C,b){return C[b]=zt(e,{placement:b,boundary:s,rootBoundary:n,padding:r})[j(b)],C},{});return Object.keys(m).sort(function(C,b){return m[C]-m[b]})}function Fs(e){if(j(e)===Qt)return[];var t=Zt(e);return[Ke(e),t,Ke(t)]}function Ws(e){var t=e.state,i=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var s=i.mainAxis,n=s===void 0?!0:s,r=i.altAxis,l=r===void 0?!0:r,a=i.fallbackPlacements,h=i.padding,c=i.boundary,d=i.rootBoundary,f=i.altBoundary,m=i.flipVariations,C=m===void 0?!0:m,b=i.allowedAutoPlacements,y=t.options.placement,I=j(y),P=I===y,w=a||(P||!C?[Zt(y)]:Fs(y)),g=[y].concat(w).reduce(function(it,G){return it.concat(j(G)===Qt?_s(t,{placement:G,boundary:c,rootBoundary:d,padding:h,flipVariations:C,allowedAutoPlacements:b}):G)},[]),k=t.rects.reference,u=t.rects.popper,v=new Map,x=!0,E=g[0],S=0;S<g.length;S++){var T=g[S],X=j(T),O=ut(T)===ht,$=[H,_].indexOf(X)>=0,K=$?"width":"height",Y=zt(t,{placement:T,boundary:c,rootBoundary:d,altBoundary:f,padding:h}),D=$?O?F:R:O?_:H;k[K]>u[K]&&(D=Zt(D));var mt=Zt(D),q=[];if(n&&q.push(Y[X]<=0),l&&q.push(Y[D]<=0,Y[mt]<=0),q.every(function(it){return it})){E=T,x=!1;break}v.set(T,q)}if(x)for(var ft=C?3:1,St=function(G){var rt=g.find(function(vt){var J=v.get(vt);if(J)return J.slice(0,G).every(function(Tt){return Tt})});if(rt)return E=rt,"break"},nt=ft;nt>0;nt--){var gt=St(nt);if(gt==="break")break}t.placement!==E&&(t.modifiersData[o]._skip=!0,t.placement=E,t.reset=!0)}}const Ns={name:"flip",enabled:!0,phase:"main",fn:Ws,requiresIfExists:["offset"],data:{_skip:!1}};function ti(e,t,i){return i===void 0&&(i={x:0,y:0}),{top:e.top-t.height-i.y,right:e.right-t.width+i.x,bottom:e.bottom-t.height+i.y,left:e.left-t.width-i.x}}function ei(e){return[H,F,_,R].some(function(t){return e[t]>=0})}function Vs(e){var t=e.state,i=e.name,o=t.rects.reference,s=t.rects.popper,n=t.modifiersData.preventOverflow,r=zt(t,{elementContext:"reference"}),l=zt(t,{altBoundary:!0}),a=ti(r,o),h=ti(l,s,n),c=ei(a),d=ei(h);t.modifiersData[i]={referenceClippingOffsets:a,popperEscapeOffsets:h,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}const js={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Vs};function Gs(e,t,i){var o=j(e),s=[R,H].indexOf(o)>=0?-1:1,n=typeof i=="function"?i(Object.assign({},t,{placement:e})):i,r=n[0],l=n[1];return r=r||0,l=(l||0)*s,[R,F].indexOf(o)>=0?{x:l,y:r}:{x:r,y:l}}function Us(e){var t=e.state,i=e.options,o=e.name,s=i.offset,n=s===void 0?[0,0]:s,r=Fe.reduce(function(c,d){return c[d]=Gs(d,t.rects,n),c},{}),l=r[t.placement],a=l.x,h=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=a,t.modifiersData.popperOffsets.y+=h),t.modifiersData[o]=r}const $s={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Us};function Ks(e){var t=e.state,i=e.name;t.modifiersData[i]=Qe({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const qs={name:"popperOffsets",enabled:!0,phase:"read",fn:Ks,data:{}};function Js(e){return e==="x"?"y":"x"}function Qs(e){var t=e.state,i=e.options,o=e.name,s=i.mainAxis,n=s===void 0?!0:s,r=i.altAxis,l=r===void 0?!1:r,a=i.boundary,h=i.rootBoundary,c=i.altBoundary,d=i.padding,f=i.tether,m=f===void 0?!0:f,C=i.tetherOffset,b=C===void 0?0:C,y=zt(t,{boundary:a,rootBoundary:h,padding:d,altBoundary:c}),I=j(t.placement),P=ut(t.placement),w=!P,g=oe(I),k=Js(g),u=t.modifiersData.popperOffsets,v=t.rects.reference,x=t.rects.popper,E=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,S=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,X={x:0,y:0};if(u){if(n){var O,$=g==="y"?H:R,K=g==="y"?_:F,Y=g==="y"?"height":"width",D=u[g],mt=D+y[$],q=D-y[K],ft=m?-x[Y]/2:0,St=P===ht?v[Y]:x[Y],nt=P===ht?-x[Y]:-v[Y],gt=t.elements.arrow,it=m&>?ie(gt):{width:0,height:0},G=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:je(),rt=G[$],vt=G[K],J=Pt(0,v[Y],it[Y]),Tt=w?v[Y]/2-ft-J-rt-S.mainAxis:St-J-rt-S.mainAxis,le=w?-v[Y]/2+ft+J+vt+S.mainAxis:nt+J+vt+S.mainAxis,At=t.elements.arrow&&kt(t.elements.arrow),ce=At?g==="y"?At.clientTop||0:At.clientLeft||0:0,Ot=(O=T==null?void 0:T[g])!=null?O:0,Dt=D+Tt-Ot-ce,Bt=D+le-Ot,_t=Pt(m?Yt(mt,Dt):mt,D,m?st(q,Bt):q);u[g]=_t,X[g]=_t-D}if(l){var Ft,he=g==="x"?H:R,pe=g==="x"?_:F,Q=u[k],bt=k==="y"?"height":"width",Wt=Q+y[he],Nt=Q-y[pe],Lt=[H,R].indexOf(I)!==-1,Vt=(Ft=T==null?void 0:T[k])!=null?Ft:0,jt=Lt?Wt:Q-v[bt]-x[bt]-Vt+S.altAxis,Gt=Lt?Q+v[bt]+x[bt]-Vt-S.altAxis:Nt,Ut=m&&Lt?Is(jt,Q,Gt):Pt(m?jt:Wt,Q,m?Gt:Nt);u[k]=Ut,X[k]=Ut-Q}t.modifiersData[o]=X}}const tn={name:"preventOverflow",enabled:!0,phase:"main",fn:Qs,requiresIfExists:["offset"]};function en(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function on(e){return e===Z(e)||!W(e)?se(e):en(e)}function sn(e){var t=e.getBoundingClientRect(),i=pt(t.width)/e.offsetWidth||1,o=pt(t.height)/e.offsetHeight||1;return i!==1||o!==1}function nn(e,t,i){i===void 0&&(i=!1);var o=W(t),s=W(t)&&sn(t),n=et(t),r=dt(e,s,i),l={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!i)&&((V(t)!=="body"||re(n))&&(l=on(t)),W(t)?(a=dt(t,!0),a.x+=t.clientLeft,a.y+=t.clientTop):n&&(a.x=ne(n))),{x:r.left+l.scrollLeft-a.x,y:r.top+l.scrollTop-a.y,width:r.width,height:r.height}}function rn(e){var t=new Map,i=new Set,o=[];e.forEach(function(n){t.set(n.name,n)});function s(n){i.add(n.name);var r=[].concat(n.requires||[],n.requiresIfExists||[]);r.forEach(function(l){if(!i.has(l)){var a=t.get(l);a&&s(a)}}),o.push(n)}return e.forEach(function(n){i.has(n.name)||s(n)}),o}function an(e){var t=rn(e);return vs.reduce(function(i,o){return i.concat(t.filter(function(s){return s.phase===o}))},[])}function ln(e){var t;return function(){return t||(t=new Promise(function(i){Promise.resolve().then(function(){t=void 0,i(e())})})),t}}function cn(e){var t=e.reduce(function(i,o){var s=i[o.name];return i[o.name]=s?Object.assign({},s,o,{options:Object.assign({},s.options,o.options),data:Object.assign({},s.data,o.data)}):o,i},{});return Object.keys(t).map(function(i){return t[i]})}var ii={placement:"bottom",modifiers:[],strategy:"absolute"};function oi(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return!t.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function hn(e){e===void 0&&(e={});var t=e,i=t.defaultModifiers,o=i===void 0?[]:i,s=t.defaultOptions,n=s===void 0?ii:s;return function(l,a,h){h===void 0&&(h=n);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},ii,n),modifiersData:{},elements:{reference:l,popper:a},attributes:{},styles:{}},d=[],f=!1,m={state:c,setOptions:function(I){var P=typeof I=="function"?I(c.options):I;b(),c.options=Object.assign({},n,c.options,P),c.scrollParents={reference:ot(l)?Et(l):l.contextElement?Et(l.contextElement):[],popper:Et(a)};var w=an(cn([].concat(o,c.options.modifiers)));return c.orderedModifiers=w.filter(function(g){return g.enabled}),C(),m.update()},forceUpdate:function(){if(!f){var I=c.elements,P=I.reference,w=I.popper;if(oi(P,w)){c.rects={reference:nn(P,kt(w),c.options.strategy==="fixed"),popper:ie(w)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(S){return c.modifiersData[S.name]=Object.assign({},S.data)});for(var g=0;g<c.orderedModifiers.length;g++){if(c.reset===!0){c.reset=!1,g=-1;continue}var k=c.orderedModifiers[g],u=k.fn,v=k.options,x=v===void 0?{}:v,E=k.name;typeof u=="function"&&(c=u({state:c,options:x,name:E,instance:m})||c)}}}},update:ln(function(){return new Promise(function(y){m.forceUpdate(),y(c)})}),destroy:function(){b(),f=!0}};if(!oi(l,a))return m;m.setOptions(h).then(function(y){!f&&h.onFirstUpdate&&h.onFirstUpdate(y)});function C(){c.orderedModifiers.forEach(function(y){var I=y.name,P=y.options,w=P===void 0?{}:P,g=y.effect;if(typeof g=="function"){var k=g({state:c,name:I,instance:m,options:w}),u=function(){};d.push(k||u)}})}function b(){d.forEach(function(y){return y()}),d=[]}return m}}var pn=[Ms,qs,Os,ws,$s,Ns,tn,zs,js],dn=hn({defaultModifiers:pn});class un{constructor(t,i,o,s={}){ui(this,"updateHotspotPosition",(t,i)=>{this.currentActiveIndex=t,this.currentOrientation=i;const o=qo(this.hotspotsConfig,t,i);this.hideHotspots(),o.forEach(s=>this.updateAndShowHotspot(s,t))});this.container=i,this.popper=null,this.popperInstance=null,this.hotspotsContainer=ro(this.container),this.hotspotsConfig=is(t),this.shouldHidePopper=!0,this.hidePopper=this.hidePopper.bind(this),this.forceHidePopper=this.forceHidePopper.bind(this),this.imageAspectRatio=o,this.popperListeners=[],this.trigger=s.trigger||"hover",this.onOpen=s.onOpen||null,this.onClose=s.onClose||null,this.onProductClick=s.onProductClick||null;const{containerSize:n}=t[0];this.initialContainerSize=n||[i.offsetWidth,i.offsetHeight],this.initHotspots(),this.updateHotspotsForResize(i.offsetWidth,i.offsetHeight),this.observeContainerResize()}observeContainerResize(){this.resizeObserver=new ResizeObserver(()=>{const t=this.container.offsetWidth,i=this.container.offsetHeight;this.updateHotspotsForResize(t,i)}),this.resizeObserver.observe(this.container)}updateHotspotsForResize(t,i){this.hotspotsConfig=os({newWidth:t,newHeight:i,initialContainerSize:this.initialContainerSize,imageAspectRatio:this.imageAspectRatio,hotspotsConfig:this.hotspotsConfig}),this.updateHotspotPosition(this.currentActiveIndex,this.currentOrientation)}cleanupPopperListeners(){this.popperListeners.forEach(({element:t,event:i,handler:o})=>{t.removeEventListener(i,o)}),this.popperListeners=[]}showPopper({hotspotElement:t,content:i,id:o,keepOpen:s}){var d;this.popperInstance&&this.hidePopper();const n=ts(this.container);this.popper=es(i,o,this.container.parentElement),this.currentHotspotElement=t,t.setAttribute("aria-expanded","true"),t.setAttribute("aria-describedby",`cloudimage-360-popper-${o}`);const r=()=>{this.shouldHidePopper=!1},l=()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()},a=()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()},h=()=>{this.shouldHidePopper=!1,this.hidePopperTimeout&&clearTimeout(this.hidePopperTimeout)};if(this.popper.addEventListener("mouseenter",r),this.popper.addEventListener("mouseleave",l),t.addEventListener("mouseleave",a),t.addEventListener("mouseenter",h),this.popperListeners.push({element:this.popper,event:"mouseenter",handler:r},{element:this.popper,event:"mouseleave",handler:l},{element:t,event:"mouseleave",handler:a},{element:t,event:"mouseenter",handler:h}),this.onProductClick){const f=this.onProductClick,m=C=>{const b=C.target.closest(".ci360-popper-cta[data-product-id]");b&&f(b.dataset.productId,o)};this.popper.addEventListener("click",m),this.popperListeners.push({element:this.popper,event:"click",handler:m})}const c=dn(t,this.popper,n);c.forceUpdate(),this.popper.setAttribute("data-show",""),this.shouldHidePopper=!1,this.popperInstance={...c,keepOpen:s,instanceId:o};try{(d=this.onOpen)==null||d.call(this,o)}catch(f){console.warn("onHotspotOpen callback error:",f)}}checkAndHidePopper(){var t;this.shouldHidePopper&&!((t=this.popperInstance)!=null&&t.keepOpen)&&(this.hidePopperTimeout&&clearTimeout(this.hidePopperTimeout),this.hidePopperTimeout=setTimeout(()=>{this.shouldHidePopper&&this.hidePopper()},Hi))}hidePopper(){var o,s;this.hidePopperTimeout&&(clearTimeout(this.hidePopperTimeout),this.hidePopperTimeout=null);const t=(o=this.popperInstance)==null?void 0:o.instanceId;this.cleanupPopperListeners(),this.currentHotspotElement&&(this.currentHotspotElement.setAttribute("aria-expanded","false"),this.currentHotspotElement.removeAttribute("aria-describedby"),this.currentHotspotElement=null);const i=this.popperInstance;if(this.popperInstance=null,t!=null)try{(s=this.onClose)==null||s.call(this,t)}catch(n){console.warn("onHotspotClose callback error:",n)}if(this.popper){this.popper.removeAttribute("data-show"),this.popper.setAttribute("aria-hidden","true");const n=this.popper;this.popper=null,setTimeout(()=>{i==null||i.destroy(),n.remove()},Ri)}else i==null||i.destroy();this.shouldHidePopper=!0}forceHidePopper(){this.shouldHidePopper=!0,this.popperInstance&&(this.popperInstance.keepOpen=!1),this.hidePopper()}createHotspot(t){const{id:i,keepOpen:o,onClick:s,label:n,markerStyle:r}=t,l=De(t),a=Jo(i,n,r);(s||l&&this.trigger==="click")&&(a.style.cursor="pointer"),a.onclick=h=>{var c;h.stopPropagation(),l&&this.trigger==="click"&&(((c=this.popperInstance)==null?void 0:c.instanceId)===i?this.hidePopper():this.showPopper({hotspotElement:a,content:l,id:i,keepOpen:o})),s==null||s(h,this.popperInstance,i)},l&&this.trigger==="hover"&&(a.addEventListener("mouseenter",()=>this.showPopper({hotspotElement:a,content:l,id:i,keepOpen:o})),a.addEventListener("mouseleave",()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()}),a.addEventListener("focus",()=>this.showPopper({hotspotElement:a,content:l,id:i,keepOpen:o})),a.addEventListener("blur",()=>{this.shouldHidePopper=!0,this.checkAndHidePopper()})),this.hotspotsContainer.appendChild(a)}hideHotspots(){this.hotspotsContainer.querySelectorAll(".cloudimage-360-hotspot").forEach(t=>{t.style.opacity=0,t.style.pointerEvents="none"})}updateAndShowHotspot(t,i){const{positions:o,id:s}=t,{x:n,y:r}=o[i]??{},l=this.hotspotsContainer.querySelector(`[data-hotspot-id="${s}"]`);l&&(l.style.translate=`${n}px ${r}px`,l.style.opacity=1,l.style.pointerEvents="all")}showHotspotById(t){const i=this.hotspotsConfig.find(n=>n.id===t);if(!i)return;const o=De(i);if(!o)return;const s=this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);s&&s.style.opacity==="1"&&this.showPopper({hotspotElement:s,content:o,id:t,keepOpen:i.keepOpen})}createAllHotspots(){this.hotspotsConfig.forEach(t=>this.createHotspot(t))}initHotspots(){this.createAllHotspots()}destroy(){this.hidePopperTimeout&&clearTimeout(this.hidePopperTimeout),this.resizeObserver.disconnect(),this.hidePopper(),this.hotspotsContainer.innerHTML=""}}const si=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);class ni{constructor(t,i){this.container=t,this.isClicked=!1,this.imagesX=[],this.imagesY=[];const o=Math.round(window.devicePixelRatio||1);this.devicePixelRatio=si?Math.min(o,2):o,this.id=t.id,this.movementStart={x:0,y:0},this.draggingDirection=null,this.isReady=!1,this.velocityX=0,this.velocityY=0,this.lastDragTime=0,this.lastDragX=0,this.lastDragY=0,this.inertiaAnimationId=null,this.hasInteracted=!1,this.touchDevice=Xo(),this.dragJustEnded=!1,this.zoomPan=null,this.gestureRecognizer=null,this.zoomControlsUI=null,this.scrollHintUI=null,this.highResLoaded=!1,this.useMainThreadCanvas=si,this.canvasWorker=this.useMainThreadCanvas?new jo:new Vo,this.hotspotTimeline=null,this.hotspotTimelineIndicator=null,this.isAnimatingToFrame=!1,this.onMoveHandler=this.onMoveHandler.bind(this),this.destroy=this.destroy.bind(this),this.init(this.container,i)}closeImageBitmaps(t){!t||!Array.isArray(t)||t.forEach(i=>{var o;(o=i==null?void 0:i.bitmapImage)!=null&&o.close&&i.bitmapImage.close()})}emit(t,i={}){const o=this[t];typeof o=="function"&&o({...i,viewerId:this.id})}announce(t){lo(this.ariaLiveRegion,t)}mouseDown(t){if(!this.isReady)return;const i=t.target;if(i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot")||i.closest(".cloudimage-360-zoom-controls")))return;const{pageX:o,pageY:s}=t;if(this.hideHints(),this.hideHotspotPopper(),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),this.autoplayJustStopped=!1,(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1,this.autoplayJustStopped=!0),this.isZoomed&&this.zoomPan){this.zoomPan.startPan(o,s);return}this.movementStart={x:o,y:s},this.isClicked=!0,this.isDragging=!1,this.inertia&&(this.velocityX=0,this.velocityY=0,this.lastDragTime=performance.now(),this.lastDragX=o,this.lastDragY=s)}mouseUp(){this.isReady&&(!this.isZoomed&&!this.autoplayJustStopped&&this.showAllIcons(),this.inertia&&this.isDragging&&(Math.abs(this.velocityX)>.1||Math.abs(this.velocityY)>.1)&&this.startInertia(),this.isDragging&&(this.emit("onDragEnd"),this.dragJustEnded=!0),this.movementStart={x:0,y:0},this.isClicked=!1,this.isDragging=!1,this.innerBox.style.cursor="grab")}startInertia(){const o=this.dragSpeed/ye,s=o*(this.amountX/this.container.offsetWidth),n=o*(this.amountY/this.container.offsetHeight),r=()=>{if(this.velocityX*=.95,this.velocityY*=.95,Math.abs(this.velocityX)<.01&&Math.abs(this.velocityY)<.01){this.inertiaAnimationId=null;return}const l=this.velocityX*16,a=this.velocityY*16,h=Xe({deltaX:l,deltaY:a,reversed:this.dragReverse,allowSpinX:this.allowSpinX,allowSpinY:this.allowSpinY});if(h){const c=this.allowSpinX?Math.max(1,Math.abs(Math.round(l*s))):0,d=this.allowSpinY?Math.max(1,Math.abs(Math.round(a*n))):0;(c>0||d>0)&&this.onMoveHandler(h,c,d)}this.inertiaAnimationId=requestAnimationFrame(r)};this.inertiaAnimationId=requestAnimationFrame(r)}drag(t,i){if(!this.isReady||!this.isClicked)return;const o=t-this.movementStart.x,s=i-this.movementStart.y;if(this.inertia){const d=performance.now(),f=d-this.lastDragTime;f>0&&f<100&&(this.velocityX=(t-this.lastDragX)/f,this.velocityY=(i-this.lastDragY)/f),this.lastDragTime=d,this.lastDragX=t,this.lastDragY=i}this.draggingDirection=Xe({deltaX:o,deltaY:s,reversed:this.dragReverse,allowSpinX:this.allowSpinX,allowSpinY:this.allowSpinY})||this.draggingDirection;const n=this.dragSpeed/ye,r=n*(this.amountX/this.container.offsetWidth),l=n*(this.amountY/this.container.offsetHeight),a=this.allowSpinX?Math.abs(Math.round(o*r)):0,h=this.allowSpinY?Math.abs(Math.round(s*l)):0;(this.allowSpinX&&a!==0||this.allowSpinY&&h!==0)&&(this.hasInteracted=!0,this.hideHotspotPopper(),this.onMoveHandler(this.draggingDirection,a,h),this.movementStart={x:t,y:i},setTimeout(()=>{this.isDragging||(this.isDragging=!0,this.emit("onDragStart"))},Yi))}mouseMove(t){!this.isReady||!this.isClicked||this.isZoomed||(this.hideAllIcons(),this.drag(t.pageX,t.pageY))}mouseClick(){this.dragJustEnded=!1,this.autoplayJustStopped=!1}loadHigherQualityImages(t,i){const o=yt(this.srcXConfig,t),s=this.allowSpinY?yt(this.srcYConfig,t):null;Ce({cdnPathX:o,cdnPathY:s,configX:this.srcXConfig,configY:this.srcYConfig,onAllImagesLoad:(n,r)=>{this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=n,this.imagesY=r,i()},onError:n=>this.emit("onError",n)})}hideHotspots(){this.hotspotsInstance&&this.hotspotsInstance.hideHotspots()}hideHotspotPopper(){this.hotspotsInstance&&this.hotspotsInstance.forceHidePopper()}getDrawDimensions(){if(!this.canvas||!this.imageAspectRatio)return null;const t=this.canvas.clientWidth,i=t/this.imageAspectRatio,o=t/i;return this.imageAspectRatio>o?{drawWidth:t,drawHeight:t/this.imageAspectRatio}:{drawWidth:i*this.imageAspectRatio,drawHeight:i}}initZoom(){const t=this.zoomMax||5,i=this.zoomStep||.5;this.zoomPan=new Zo(this.innerBox,{zoomMax:t,zoomStep:i,onZoomChange:(s,n,r)=>this.onZoomChange(s,n,r)});const o=this.getDrawDimensions();o&&this.zoomPan.setDrawSize(o.drawWidth,o.drawHeight),this.touchDevice&&this.pinchZoom!==!1&&(this.gestureRecognizer=new Do(this.innerBox,{zoomMax:t,getZoom:()=>this.zoomPan?this.zoomPan.getZoom():1,onPinchZoom:(s,n,r)=>{this.zoomPan&&(n!==void 0?this.zoomPan.zoomTowardPoint(s,n,r):this.zoomPan.applyTouchZoom(s))},onPan:(s,n)=>{this.zoomPan&&this.zoomPan.applyTouchPan(s,n)},onDoubleTap:(s,n)=>{this.zoomPan&&(this.zoomPan.isZoomed()?this.zoomPan.resetZoom():this.zoomPan.zoomTowardPoint(2,s,n))}})),this.zoomControls&&!this.touchDevice&&(this.zoomControlsUI=Wo(this.innerBox,{position:this.zoomControlsPosition||"bottom-left",zoomMax:t,onZoomIn:()=>this.zoomPan&&this.zoomPan.zoomIn(),onZoomOut:()=>this.zoomPan&&this.zoomPan.zoomOut(),onReset:()=>this.zoomPan&&this.zoomPan.resetZoom()}))}onZoomChange(t,i,o){this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null);const s=this.isZoomed;if(this.isZoomed=t>1,this.isZoomed&&!s){if(this.hideAllIcons(),this.hideHotspots(),this.zoomControlsUI&&this.zoomControlsUI.show(),!this.highResLoaded){this.highResLoaded=!0;const n=document.body.offsetWidth;this.loadHigherQualityImages(n,()=>{this.zoomPan&&this.updateView(this.zoomPan.getZoom(),this.zoomPan.panX,this.zoomPan.panY)})}this.emit("onZoomIn",{zoomLevel:t}),this.announce("Zoomed in. Use mouse drag or arrow keys to pan. Double-click or press 0 to reset.")}!this.isZoomed&&s&&(this.showAllIcons(),this.emit("onZoomOut"),this.announce("Zoomed out")),this.zoomControlsUI&&this.zoomControlsUI.updateState(t),this.updateView(t,i,o)}removeZoom(){this.zoomPan&&this.zoomPan.resetZoom()}toggleZoom(){this.zoomPan&&(this.isZoomed?this.zoomPan.resetZoom():this.zoomPan.setZoom(2))}touchStart(t){if(!this.isReady||!t.touches||!t.touches.length)return;const i=t.target;if(i&&i.closest&&(i.closest(".cloudimage-360-button")||i.closest(".cloudimage-360-hotspot-timeline")||i.closest(".cloudimage-360-hotspot")||i.closest(".cloudimage-360-zoom-controls")))return;if(this.hideHints(),t.touches.length>1){this.isClicked=!1;return}if(this.isZoomed)return;const{pageX:o,pageY:s}=t.touches[0];this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1),this.hideAllIcons(),this.hideHotspotPopper(),this.movementStart={x:o,y:s},this.isClicked=!0,this.isDragging=!1,this.inertia&&(this.velocityX=0,this.velocityY=0,this.lastDragTime=performance.now(),this.lastDragX=o,this.lastDragY=s)}touchEnd(t){this.isReady&&(this.isZoomed||this.showAllIcons(),this.inertia&&this.isDragging&&(Math.abs(this.velocityX)>.1||Math.abs(this.velocityY)>.1)&&this.startInertia(),this.movementStart={x:0,y:0},this.isClicked=!1,this.isDragging=!1)}touchMove(t){if(!this.isReady||this.isZoomed||t.touches&&t.touches.length>1||!this.isClicked||!t.touches||!t.touches[0])return;const{pageX:i,pageY:o}=t.touches[0];t.preventDefault(),this.drag(i,o)}keyDown(t){if(!this.isReady)return;const i=t.target&&t.target.tagName;if(i==="INPUT"||i==="TEXTAREA"||t.target&&t.target.isContentEditable)return;const{keyCode:o}=t,s=this.keysReverse;if(this.autoplay&&this.stopAutoplay(),this.zoomPan&&this.zoomPan.handleKeyZoom(o)){t.preventDefault(),this.hideHints();return}if(this.isZoomed&&this.zoomPan&&this.zoomPan.handleKeyPan(o,Di)){t.preventDefault();return}switch(Me(o,this.allowSpinY)&&(this.hasInteracted=!0,this.hideAllIcons(),this.hideHints()),o){case 37:s?this.moveLeft():this.moveRight();break;case 39:s?this.moveRight():this.moveLeft();break;case 38:this.allowSpinY&&(t.preventDefault(),s?this.moveTop():this.moveBottom());break;case 40:this.allowSpinY&&(t.preventDefault(),s?this.moveBottom():this.moveTop());break}}keyUp(t){const{keyCode:i}=t;Me(i,this.allowSpinY)&&this.showAllIcons()}moveActiveXIndexUp(t){this.orientation=A.X,this.activeImageX=(this.activeImageX+t)%this.amountX}moveActiveXIndexDown(t){this.orientation=A.X,this.activeImageX=(this.activeImageX-t+this.amountX)%this.amountX}moveActiveYIndexUp(t){this.orientation=A.Y,this.activeImageY=(this.activeImageY+t)%this.amountY}moveActiveYIndexDown(t){this.orientation=A.Y,this.activeImageY=(this.activeImageY-t+this.amountY)%this.amountY}moveRight(t,i=1){t&&this.activeImageX>=this.imagesX.length-1||(this.moveActiveXIndexUp(i),this.isZoomed||this.updateView())}moveLeft(t,i=1){t&&this.activeImageX<=0||(this.moveActiveXIndexDown(i),this.isZoomed||this.updateView())}moveTop(t,i=1){t&&this.activeImageY>=this.imagesY.length-1||(this.moveActiveYIndexUp(i),this.isZoomed||this.updateView())}moveBottom(t,i=1){t&&this.activeImageY<=0||(this.moveActiveYIndexDown(i),this.isZoomed||this.updateView())}onMoveHandler(t,i=1,o=1){t==="right"?this.moveRight(this.stopAtEdges,i):t==="left"?this.moveLeft(this.stopAtEdges,i):t==="up"?this.moveTop(this.stopAtEdges,o):t==="down"&&this.moveBottom(this.stopAtEdges,o),this.emit("onSpin",{direction:t,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY})}updateView(t,i,o){const s=this.orientation===A.X?this.activeImageX:this.activeImageY,n=this.orientation===A.X?this.imagesX[this.activeImageX]:this.imagesY[this.activeImageY];this.hotspotsInstance&&!this.isZoomed&&!this.autoplay&&this.hotspotsInstance.updateHotspotPosition(s,this.orientation),this.hotspotTimelineIndicator&&this.orientation===A.X&&this.updateHotspotTimelinePosition(),this.drawImageOnCanvas(n,t,i,o)}updatePercentageInLoader(t=0){this.loader&&(this.loader.innerText=t+"%")}adaptCanvasSize(t){const{naturalWidth:i,naturalHeight:o}=t;this.imageAspectRatio=i/o;const s=this.canvas.clientWidth,n=s/this.imageAspectRatio;this.canvasWorker.postMessage({action:"adaptCanvasSize",devicePixelRatio:this.devicePixelRatio,imageAspectRatio:this.imageAspectRatio,containerWidth:s,containerHeight:n})}drawImageOnCanvas(t,i=1,o=0,s=0){this.pendingDrawData={imageData:t,zoomScale:i,pointerX:o,pointerY:s},this.drawFrameRequested||(this.drawFrameRequested=!0,requestAnimationFrame(()=>{if(this.drawFrameRequested=!1,this.pendingDrawData){const{imageData:n,zoomScale:r,pointerX:l,pointerY:a}=this.pendingDrawData;this.canvasWorker.postMessage({action:"drawImageOnCanvas",imageData:n,zoomScale:r,pointerX:l,pointerY:a})}}))}pushImageToSet(t,i,o){o===A.X?this.imagesX[i]=t:this.imagesY[i]=t}calculatePercentage(){const t=this.amountX+this.amountY,i=this.imagesX.length+this.imagesY.length;return Math.round(i/t*100)}onImageLoad(t,i,o){this.pushImageToSet(t,i,o),this.updatePercentageInLoader(this.calculatePercentage())}onFirstImageLoaded(t,i){this.createContainers(t),this.adaptCanvasSize(i),this.drawImageOnCanvas(i)}onAllImagesLoaded(){if(this.addAllIcons(),this.isReady=!0,this.amountX=this.imagesX.length,this.amountY=this.imagesY.length,this.activeImageX=this.autoplayReverse?this.amountX-1:0,this.activeImageY=this.autoplayReverse?this.amountY-1:0,this.hotspots&&(this.hotspotsInstance=new un(this.hotspots,this.innerBox,this.imageAspectRatio,{trigger:this.hotspotTrigger,onOpen:this.onHotspotOpen,onClose:this.onHotspotClose,onProductClick:this.onProductClick}),this.addHotspotTimeline(),this.autoplay?(this.hotspotsInstance.hideHotspots(),this.hideHotspotTimeline()):(this.hotspotsInstance.updateHotspotPosition(this.activeImageX,this.orientation),this.showHotspotTimeline())),this.emit("onLoad",{imagesX:this.imagesX.length,imagesY:this.imagesY.length}),this.emit("onReady"),this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."),this.hints!==!1&&!this.autoplay){const t=this.hints===!0||this.hints===void 0?ze(this.viewerConfig,this.touchDevice):this.hints;t&&t.length>0&&(this.hintsOverlay=Ee(this.innerBox,t),Se(this.hintsOverlay))}this.autoplay&&(this.hideAllIcons(),Yo(this.play.bind(this))())}toggleFullscreen(t){t.stopPropagation(),this.hideHotspotPopper(),Jt()?Ye():Ro(this.container)}onFullscreenChange(){const t=Jt()===this.container,i=this.container.classList.contains("cloudimage-360--fullscreen");t!==i&&(this.container.classList.toggle("cloudimage-360--fullscreen",t),io(this.fullscreenIcon,t),requestAnimationFrame(()=>{if(this.imagesX.length>0){if(this.adaptCanvasSize(this.imagesX[this.activeImageX]),this.zoomPan){const o=this.getDrawDimensions();o&&this.zoomPan.setDrawSize(o.drawWidth,o.drawHeight,!0)}this.updateView()}}),t?(this.emit("onFullscreenOpen"),this.announce("Opened fullscreen mode. Press Escape to exit.")):(this.emit("onFullscreenClose"),this.announce("Exited fullscreen mode")))}play(){if(this.isClicked)return;this.hide360ViewCircleIcon(),this.emit("onAutoplayStart");const t=this.speed*36/(this.amountX+this.amountY),i={left:this.moveLeft.bind(this),right:this.moveRight.bind(this),top:this.moveTop.bind(this),bottom:this.moveBottom.bind(this)};this.loopTimeoutId=window.setInterval(()=>{if(this.playOnce&&Ao({autoplayBehavior:this.autoplayBehavior,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY,autoplayReverse:this.autoplayReverse})){this.stopAutoplay();return}Oo({autoplayBehavior:this.autoplayBehavior,activeImageX:this.activeImageX,activeImageY:this.activeImageY,amountX:this.amountX,amountY:this.amountY,autoplayReverse:this.autoplayReverse,spinDirection:this.spinDirection})&&(this.spinDirection=Mo(this.spinDirection));const n=this.spinDirection==="y";To({autoplayBehavior:this.autoplayBehavior,spinY:n,reversed:this.autoplayReverse,loopTriggers:i})},t)}stopAutoplay(){if(this.showAllIcons(),this.autoplay=!1,window.clearTimeout(this.loopTimeoutId),this.loopTimeoutId=null,this.emit("onAutoplayStop"),this.hotspotsInstance&&(this.hotspotsInstance.updateHotspotPosition(this.activeImageX,this.orientation),this.showHotspotTimeline()),this.hints!==!1&&!this.hintsOverlay&&!this.hintsHidden){const t=this.hints===!0?ze(this.viewerConfig,this.touchDevice):this.hints;t&&t.length>0&&(this.hintsOverlay=Ee(this.innerBox,t),Se(this.hintsOverlay))}}destroy(){this.stopAutoplay(),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null),this.removeEvents(),this.zoomPan&&(this.zoomPan.destroy(),this.zoomPan=null),this.gestureRecognizer&&(this.gestureRecognizer.destroy(),this.gestureRecognizer=null),this.zoomControlsUI&&(this.zoomControlsUI.destroy(),this.zoomControlsUI=null),this.scrollHintUI&&(this.scrollHintUI.destroy(),this.scrollHintUI=null),this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=[],this.imagesY=[],this.canvasWorker&&(this.canvasWorker.terminate(),this.canvasWorker=null),this.hotspotsInstance&&this.hotspotsInstance.destroy(),this.hintsOverlay&&this.hintsOverlay.parentNode&&(this.hintsOverlay.parentNode.removeChild(this.hintsOverlay),this.hintsOverlay=null),this.hotspotTimeline&&this.hotspotTimeline.parentNode&&(this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline),this.hotspotTimeline=null,this.hotspotTimelineIndicator=null),this.innerBox&&this.innerBox.classList.remove("has-hotspot-timeline"),Jt()===this.container&&Ye(),this.container&&(this.container.classList.remove("ci360-theme-dark","ci360-hotspot-marker-inverted","ci360-hotspot-marker-brand","cloudimage-360--fullscreen"),this.container.style.removeProperty("--ci360-hotspot-brand-color"),this.container.innerHTML="")}releaseMemory(){this.stopAutoplay(),this.closeImageBitmaps(this.imagesX),this.closeImageBitmaps(this.imagesY),this.imagesX=[],this.imagesY=[],this.isMemoryReleased=!0}reloadImages(){if(!this.isMemoryReleased)return;this.isMemoryReleased=!1;const t=this.container.offsetWidth;this.loadHigherQualityImages(t,()=>{this.updateView()})}addInitialIcon(){this.initialIcon||this.hide360Logo||(this.initialIcon=Ji(this.logoSrc),this.innerBox.appendChild(this.initialIcon))}showInitialIcon(){!this.initialIcon||this.hasInteracted||(this.initialIcon.style.opacity=1)}hideInitialIcon(){this.initialIcon&&(this.initialIcon.style.opacity=0)}addFullscreenIcon(){!this.fullscreen||!Ho()||(this.fullscreenIcon=eo(),this.fullscreenIcon.onclick=this.toggleFullscreen.bind(this),this.iconsContainer.appendChild(this.fullscreenIcon))}showFullscreenIcon(){this.fullscreenIcon&&(this.fullscreenIcon.style.opacity=1)}hideFullscreenIcon(){this.fullscreenIcon&&(this.fullscreenIcon.style.opacity=0)}add360ViewCircleIcon(){this.view360CircleIcon||(this.view360CircleIcon=Ki(this.bottomCircleOffset),this.innerBox.appendChild(this.view360CircleIcon))}show360ViewCircleIcon(){this.view360CircleIcon&&(this.view360CircleIcon.style.opacity=1)}hide360ViewCircleIcon(){this.view360CircleIcon&&(this.view360CircleIcon.style.opacity=0)}addLoadingSpinner(){this.loadingSpinner=no(),this.innerBox.appendChild(this.loadingSpinner)}showLoadingSpinner(){this.loadingSpinner&&(this.hideAllIcons(),this.loadingSpinner.style.opacity=1)}hideLoadingSpinner(){this.loadingSpinner&&(this.loadingSpinner.style.opacity=0)}hideHints(){!this.hintsOverlay||this.hintsHidden||(this.hintsHidden=!0,po(this.hintsOverlay))}addHotspotTimeline(){if(!this.hotspots||this.hotspotTimeline)return;const t=vo(this.innerBox,this.amountX,this.hotspots);if(!t)return;this.hotspotTimeline=t.element,this.hotspotTimelineIndicator=t.indicator,this.innerBox.classList.add("has-hotspot-timeline"),this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach(o=>{o.addEventListener("click",s=>{s.stopPropagation(),this.hideAllIcons(),this.hideHints();const n=parseInt(o.getAttribute("data-frame"),10),r=o.getAttribute("data-hotspot-id");isNaN(n)||this.animateToFrame(n,r)})}),this.updateHotspotTimelinePosition()}showHotspotTimeline(){yo(this.hotspotTimeline)}hideHotspotTimeline(){wo(this.hotspotTimeline)}updateHotspotTimelinePosition(){bo(this.hotspotTimelineIndicator,this.activeImageX,this.amountX)}animateToFrame(t,i){if(this.hotspotsInstance&&this.hotspotsInstance.hidePopper(),this.isAnimatingToFrame||t===this.activeImageX){t===this.activeImageX&&i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&this.hotspotsInstance.showHotspotById(i);return}this.isAnimatingToFrame=!0,this.hasInteracted=!0,(this.autoplay||this.loopTimeoutId)&&(this.stopAutoplay(),this.autoplay=!1),this.inertiaAnimationId&&(cancelAnimationFrame(this.inertiaAnimationId),this.inertiaAnimationId=null);const o=this.activeImageX,s=(t-o+this.amountX)%this.amountX,n=(o-t+this.amountX)%this.amountX,r=s<=n,l=r?s:n;if(l===0){this.isAnimatingToFrame=!1;return}const a=30;let h=l;const c=()=>{if(h<=0){this.isAnimatingToFrame=!1,i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&setTimeout(()=>{this.hotspotsInstance.showHotspotById(i)},50);return}r?this.moveRight():this.moveLeft(),h--,h>0?setTimeout(c,a):(this.isAnimatingToFrame=!1,i&&this.hotspotsInstance&&this.hotspotTimelineOnClick&&setTimeout(()=>{this.hotspotsInstance.showHotspotById(i)},50))};c()}remove360ViewCircleIcon(){this.view360CircleIcon&&(this.innerBox.removeChild(this.view360CircleIcon),this.view360CircleIcon=null)}addAllIcons(){this.removeLoader(),this.iconsContainer&&(this.innerBox.style.cursor="grab",this.addLoadingSpinner(),this.addFullscreenIcon(),this.initialIconShown&&this.addInitialIcon(),this.bottomCircle&&this.add360ViewCircleIcon(),this.initZoom())}showAllIcons(){this.showInitialIcon(),this.show360ViewCircleIcon(),this.showFullscreenIcon(),this.showHotspotTimeline(),this.zoomControlsUI&&this.zoomControlsUI.show()}hideAllIcons(){this.hideInitialIcon(),this.hide360ViewCircleIcon(),this.hideFullscreenIcon(),this.zoomControlsUI&&this.zoomControlsUI.hide()}removeLoader(){this.loader&&(this.innerBox.removeChild(this.loader),this.loader=null)}attachEvents(t,i,o){t&&this.addMouseEvents(),i&&this.addTouchEvents(),o&&this.addKeyboardEvents(),this.addEscKeyHandler(),this.addFullscreenChangeHandler()}removeEvents(){this.removeMouseEvents(),this.removeTouchEvents(),this.removeKeyboardEvents(),this.removeEscKeyHandler(),this.removeFullscreenChangeHandler()}addMouseEvents(){this.boundMouseClick=this.mouseClick.bind(this),this.boundMouseDown=this.mouseDown.bind(this),this.boundMouseMove=ve(this.mouseMove.bind(this),be),this.boundMouseUp=this.mouseUp.bind(this),this.innerBox.addEventListener("click",this.boundMouseClick),this.innerBox.addEventListener("mousedown",this.boundMouseDown),document.addEventListener("mousemove",this.boundMouseMove),document.addEventListener("mouseup",this.boundMouseUp)}addTouchEvents(){this.boundTouchStart=this.touchStart.bind(this),this.boundTouchEnd=this.touchEnd.bind(this),this.boundTouchMove=ve(this.touchMove.bind(this),be),this.container.addEventListener("touchstart",this.boundTouchStart,{passive:!1}),this.container.addEventListener("touchend",this.boundTouchEnd),this.container.addEventListener("touchmove",this.boundTouchMove,{passive:!1})}addKeyboardEvents(){this.boundKeyDown=this.keyDown.bind(this),this.boundKeyUp=this.keyUp.bind(this),document.addEventListener("keydown",this.boundKeyDown),document.addEventListener("keyup",this.boundKeyUp)}addEscKeyHandler(){this.boundEscHandler=t=>{t.keyCode===27&&this.isZoomed&&this.removeZoom()},document.addEventListener("keydown",this.boundEscHandler)}removeEscKeyHandler(){document.removeEventListener("keydown",this.boundEscHandler)}addFullscreenChangeHandler(){this.boundFullscreenChange=this.onFullscreenChange.bind(this),document.addEventListener("fullscreenchange",this.boundFullscreenChange),document.addEventListener("webkitfullscreenchange",this.boundFullscreenChange)}removeFullscreenChangeHandler(){document.removeEventListener("fullscreenchange",this.boundFullscreenChange),document.removeEventListener("webkitfullscreenchange",this.boundFullscreenChange)}removeMouseEvents(){this.innerBox.removeEventListener("click",this.boundMouseClick),this.innerBox.removeEventListener("mousedown",this.boundMouseDown),document.removeEventListener("mousemove",this.boundMouseMove),document.removeEventListener("mouseup",this.boundMouseUp)}removeTouchEvents(){this.container.removeEventListener("touchstart",this.boundTouchStart),this.container.removeEventListener("touchend",this.boundTouchEnd),this.container.removeEventListener("touchmove",this.boundTouchMove)}removeKeyboardEvents(){document.removeEventListener("keydown",this.boundKeyDown),document.removeEventListener("keyup",this.boundKeyUp)}createContainers(t){if(this.iconsContainer=ke(this.innerBox),this.canvas=Qi(this.innerBox,t),this.loader=so(this.innerBox),this.ariaLiveRegion=ao(this.innerBox),this.useMainThreadCanvas)this.canvasWorker.postMessage({action:"initCanvas",offscreen:this.canvas,devicePixelRatio:this.devicePixelRatio});else{const i=this.canvas.transferControlToOffscreen();this.canvasWorker.postMessage({action:"initCanvas",offscreen:i,devicePixelRatio:this.devicePixelRatio},[i])}Kt(this.innerBox,".cloudimage-360-placeholder")}update(t){this.isReady&&(this.stopAutoplay(),this.zoomPan&&(this.zoomPan.destroy(),this.zoomPan=null),this.gestureRecognizer&&(this.gestureRecognizer.destroy(),this.gestureRecognizer=null),this.zoomControlsUI&&(this.zoomControlsUI.destroy(),this.zoomControlsUI=null),this.scrollHintUI&&(this.scrollHintUI.destroy(),this.scrollHintUI=null),this.isZoomed=!1,this.highResLoaded=!1,Kt(this.innerBox,".cloudimage-360-icons-container"),this.init(this.container,t,!0),this.iconsContainer=ke(this.innerBox),this.onAllImagesLoaded())}init(t,i,o){const s=i?Fi(i):Bi(t),{folder:n,apiVersion:r,filenameX:l,filenameY:a,imageListX:h,imageListY:c,indexZeroBase:d,amountX:f,amountY:m,draggable:C=!0,swipeable:b=!0,keys:y,keysReverse:I,bottomCircleOffset:P,autoplay:w,autoplayBehavior:g,playOnce:k,speed:u,autoplayReverse:v,fullscreen:x,magnifier:E,pointerZoom:S,zoomMax:T,zoomStep:X,zoomControls:O,zoomControlsPosition:$,scrollHint:K,ciToken:Y,ciFilters:D,ciTransformation:mt,lazyload:q,dragSpeed:ft,stopAtEdges:St,imageInfo:nt="black",initialIconShown:gt,bottomCircle:it,hotspots:G,hotspotTrigger:rt="hover",dragReverse:vt,hide360Logo:J,logoSrc:Tt,inertia:le,pinchZoom:At,hints:ce,theme:Ot,markerTheme:Dt,brandColor:Bt,hotspotTimelineOnClick:_t=!0,aspectRatio:Ft,cropAspectRatio:he,cropGravity:pe,onReady:Q,onLoad:bt,onSpin:Wt,onAutoplayStart:Nt,onAutoplayStop:Lt,onFullscreenOpen:Vt,onFullscreenClose:jt,onZoomIn:Gt,onZoomOut:Ut,onDragStart:mn,onDragEnd:fn,onHotspotOpen:gn,onHotspotClose:vn,onProductClick:bn,onError:yn}=s,li={ciToken:Y,ciFilters:D,ciTransformation:mt,cropAspectRatio:he,cropGravity:pe},de=qt(h,[]),ue=qt(c,[]),wn=s.zoomMax===5&&S>1?Math.min(S,5):T||5;if(this.viewerConfig=s,this.amountX=de.length||f,this.amountY=ue.length||m,this.allowSpinX=!!this.amountX,this.allowSpinY=!!this.amountY,this.orientation=this.allowSpinX?A.X:A.Y,this.activeImageX=v?this.amountX-1:0,this.activeImageY=v?this.amountY-1:0,this.bottomCircleOffset=P,this.autoplay=w,this.autoplayBehavior=g,this.playOnce=k,this.speed=u,this.autoplayReverse=v,this.fullscreen=x,this.zoomMax=wn,this.zoomStep=X||.5,this.zoomControls=O??!0,this.zoomControlsPosition=$||"bottom-left",this.scrollHint=K??!0,this.dragSpeed=Math.max(ft,Zi),this.stopAtEdges=St,this.ciParams=li,this.apiVersion=r,this.keysReverse=I,this.info=nt,this.keys=y,this.innerBox=this.innerBox??oo(this.container),this.container.style.aspectRatio=Ft||"",this.initialIconShown=gt,this.bottomCircle=it,this.spinDirection=Lo(this.autoplayBehavior,this.allowSpinX,this.allowSpinY),this.dragReverse=vt,this.hotspots=G,this.hotspotTrigger=rt,this.onHotspotOpen=gn,this.onHotspotClose=vn,this.onProductClick=bn,this.hide360Logo=J,this.logoSrc=Tt,this.inertia=le,this.pinchZoom=At,this.hints=ce,this.hotspotTimelineOnClick=_t,Ot==="dark"?this.container.classList.add("ci360-theme-dark"):Ot==="light"&&this.container.classList.remove("ci360-theme-dark"),this.container.classList.remove("ci360-hotspot-marker-inverted","ci360-hotspot-marker-brand"),Dt==="inverted"?this.container.classList.add("ci360-hotspot-marker-inverted"):Dt==="brand"&&(this.container.classList.add("ci360-hotspot-marker-brand"),Bt&&this.container.style.setProperty("--ci360-hotspot-brand-color",Bt)),this.onReady=Q,this.onLoad=bt,this.onSpin=Wt,this.onAutoplayStart=Nt,this.onAutoplayStop=Lt,this.onFullscreenOpen=Vt,this.onFullscreenClose=jt,this.onZoomIn=Gt,this.onZoomOut=Ut,this.onDragStart=mn,this.onDragEnd=fn,this.onError=yn,this.srcXConfig={folder:n,filename:l,imageList:de,container:t,innerBox:this.innerBox,apiVersion:r,ciParams:li,lazyload:q,amount:this.amountX,indexZeroBase:d,autoplayReverse:v,orientation:A.X},this.srcYConfig={...this.srcXConfig,filename:a,imageList:ue,orientation:A.Y,amount:this.amountY},o&&this.removeEvents(),this.attachEvents(C,b,y),o)return;const ci=this.container.offsetWidth,hi=this.allowSpinX&&!de.length?yt(this.srcXConfig,ci):null,pi=this.allowSpinY&&!ue.length?yt(this.srcYConfig,ci):null,di=xn=>{Ce({cdnPathX:hi,cdnPathY:pi,configX:this.srcXConfig,configY:this.srcYConfig,onImageLoad:(Mt,Cn,In)=>this.onImageLoad(Mt,Cn,In),onFirstImageLoad:Mt=>this.onFirstImageLoaded(xn,Mt),onAllImagesLoad:this.onAllImagesLoaded.bind(this),onError:Mt=>this.emit("onError",Mt)})};this.allowSpinX?Ae(hi,this.srcXConfig,di):this.allowSpinY&&Ae(pi,this.srcYConfig,di)}}const ri=typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);class ai{constructor(){this.views=new Map,this.initAll=this.initAll.bind(this),this.getViews=this.getViews.bind(this),this.memoryObserver=null,this.memoryManagementAutoEnabled=!1}generateId(){return`ci360-${Math.random().toString(36).slice(2,11)}`}init(t,i){if(!t)return;const o=t.id||this.generateId();t.id||(t.id=o);const s=new ni(t,i);return this.views.set(o,s),ri&&!this.memoryManagementAutoEnabled&&(this.memoryManagementAutoEnabled=!0,setTimeout(()=>this.enableMemoryManagement(),100)),s}initAll(t="cloudimage-360"){[...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach(o=>{const s=o.id||this.generateId();o.id||(o.id=s);const n=new ni(o);this.views.set(s,n)}),ri&&!this.memoryManagementAutoEnabled&&this.views.size>0&&(this.memoryManagementAutoEnabled=!0,setTimeout(()=>this.enableMemoryManagement(),100))}destroy(t){const i=this.getViewById(t);i&&(i.destroy(),this.views.delete(t))}destroyAll(){this.views.forEach(t=>{t.destroy()}),this.views.clear()}getViewById(t){return this.views.get(t)}getViews(){return Array.from(this.views.values())}updateView(t,i){const o=this.getViewById(t);if(!o)return null;const s={...o.viewerConfig,...i};o.destroy();const n=document.getElementById(t);return this.init(n,s)}enableMemoryManagement(t={}){this.memoryObserver&&this.memoryObserver.disconnect();const i=t.rootMargin||"200px";this.memoryObserver=new IntersectionObserver(o=>{o.forEach(s=>{const n=this.getViewById(s.target.id);n&&(s.isIntersecting?n.isMemoryReleased&&n.reloadImages():!n.isMemoryReleased&&n.isReady&&n.releaseMemory())})},{rootMargin:i}),this.views.forEach((o,s)=>{const n=document.getElementById(s);n&&this.memoryObserver.observe(n)}),this.boundVisibilityHandler=()=>{document.hidden?this.views.forEach(o=>{!o.isMemoryReleased&&o.isReady&&o.releaseMemory()}):this.views.forEach((o,s)=>{if(o.isMemoryReleased){const n=document.getElementById(s);if(n){const r=n.getBoundingClientRect();r.top<window.innerHeight&&r.bottom>0&&o.reloadImages()}}})},document.addEventListener("visibilitychange",this.boundVisibilityHandler)}disableMemoryManagement(){this.memoryObserver&&(this.memoryObserver.disconnect(),this.memoryObserver=null),this.boundVisibilityHandler&&(document.removeEventListener("visibilitychange",this.boundVisibilityHandler),this.boundVisibilityHandler=null)}}return window.CI360=ai,ai}();
|