js-cloudimage-hotspot 1.1.2 → 1.1.4
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 +1 -1
- package/dist/core/ci-hotspot.d.ts.map +1 -1
- package/dist/core/config.d.ts +1 -1
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/types.d.ts +9 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js +2 -2
- package/dist/editor/js-cloudimage-hotspot-editor.cjs.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js +128 -106
- package/dist/editor/js-cloudimage-hotspot-editor.esm.js.map +1 -1
- package/dist/editor/js-cloudimage-hotspot-editor.min.js +2 -2
- package/dist/editor/js-cloudimage-hotspot-editor.min.js.map +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js +1 -1
- package/dist/js-cloudimage-hotspot.cjs.js.map +1 -1
- package/dist/js-cloudimage-hotspot.esm.js +137 -115
- package/dist/js-cloudimage-hotspot.esm.js.map +1 -1
- package/dist/js-cloudimage-hotspot.min.js +1 -1
- package/dist/js-cloudimage-hotspot.min.js.map +1 -1
- package/dist/popover/Popover.d.ts +1 -0
- package/dist/popover/Popover.d.ts.map +1 -1
- package/dist/popover/template.d.ts.map +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.js +135 -113
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,10 +17,10 @@ function h(a, t, e) {
|
|
|
17
17
|
i.setAttribute(o, r);
|
|
18
18
|
return i;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function m(a, ...t) {
|
|
21
21
|
a.classList.add(...t);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function b(a, ...t) {
|
|
24
24
|
a.classList.remove(...t);
|
|
25
25
|
}
|
|
26
26
|
function Q(a) {
|
|
@@ -64,6 +64,8 @@ const nt = {
|
|
|
64
64
|
sceneTransition: "fade",
|
|
65
65
|
scrollHint: !0,
|
|
66
66
|
invertMarkerTheme: !1,
|
|
67
|
+
markerTheme: "default",
|
|
68
|
+
brandColor: "#00aaff",
|
|
67
69
|
fullscreenButton: !0,
|
|
68
70
|
zoomControlsPosition: "bottom-right"
|
|
69
71
|
}, at = {
|
|
@@ -90,6 +92,8 @@ const nt = {
|
|
|
90
92
|
"data-ci-hotspot-scene-transition": { key: "sceneTransition", type: "string" },
|
|
91
93
|
"data-ci-hotspot-scene-aspect-ratio": { key: "sceneAspectRatio", type: "string" },
|
|
92
94
|
"data-ci-hotspot-invert-marker-theme": { key: "invertMarkerTheme", type: "boolean" },
|
|
95
|
+
"data-ci-hotspot-marker-theme": { key: "markerTheme", type: "string" },
|
|
96
|
+
"data-ci-hotspot-brand-color": { key: "brandColor", type: "string" },
|
|
93
97
|
"data-ci-hotspot-fullscreen-button": { key: "fullscreenButton", type: "boolean" },
|
|
94
98
|
"data-ci-hotspot-zoom-controls-position": { key: "zoomControlsPosition", type: "string" }
|
|
95
99
|
};
|
|
@@ -175,10 +179,10 @@ function dt(a, t) {
|
|
|
175
179
|
});
|
|
176
180
|
if (e.style.left = `${a.x}%`, e.style.top = `${a.y}%`, a.className) {
|
|
177
181
|
const i = a.className.trim().split(/\s+/).filter(Boolean);
|
|
178
|
-
i.length &&
|
|
182
|
+
i.length && m(e, ...i);
|
|
179
183
|
}
|
|
180
|
-
if (a.hidden &&
|
|
181
|
-
|
|
184
|
+
if (a.hidden && m(e, "ci-hotspot-marker--hidden"), t && m(e, "ci-hotspot-marker--pulse"), a.icon && ut(e, a.icon), a.markerStyle === "dot-label" && a.label) {
|
|
185
|
+
m(e, "ci-hotspot-marker--dot-label");
|
|
182
186
|
const i = h("span", "ci-hotspot-marker-label");
|
|
183
187
|
i.textContent = a.label, e.appendChild(i);
|
|
184
188
|
}
|
|
@@ -234,42 +238,42 @@ function ut(a, t) {
|
|
|
234
238
|
a.appendChild(i);
|
|
235
239
|
}
|
|
236
240
|
}
|
|
237
|
-
function
|
|
238
|
-
t ? (
|
|
241
|
+
function v(a, t) {
|
|
242
|
+
t ? (m(a, "ci-hotspot-marker--active"), a.setAttribute("aria-expanded", "true")) : (b(a, "ci-hotspot-marker--active"), a.setAttribute("aria-expanded", "false"));
|
|
239
243
|
}
|
|
240
244
|
function ft(a, t) {
|
|
241
|
-
t ?
|
|
245
|
+
t ? m(a, "ci-hotspot-marker--hidden") : b(a, "ci-hotspot-marker--hidden");
|
|
242
246
|
}
|
|
243
|
-
function
|
|
247
|
+
function A(a) {
|
|
244
248
|
a.remove();
|
|
245
249
|
}
|
|
246
|
-
function
|
|
247
|
-
const o = a.getBoundingClientRect(), r = e.getBoundingClientRect(), s = t.offsetWidth, n = t.offsetHeight, c = o.left + o.width / 2 - r.left, l = o.top + o.height / 2 - r.top, d = o.top - r.top, u = o.bottom - r.top, p = o.left - r.left, g = o.right - r.left,
|
|
248
|
-
top: d -
|
|
249
|
-
bottom: k - u -
|
|
250
|
-
left: p -
|
|
251
|
-
right:
|
|
250
|
+
function mt(a, t, e, i) {
|
|
251
|
+
const o = a.getBoundingClientRect(), r = e.getBoundingClientRect(), s = t.offsetWidth, n = t.offsetHeight, c = o.left + o.width / 2 - r.left, l = o.top + o.height / 2 - r.top, d = o.top - r.top, u = o.bottom - r.top, p = o.left - r.left, g = o.right - r.left, y = e.offsetWidth, k = e.offsetHeight, x = 8, P = {
|
|
252
|
+
top: d - x,
|
|
253
|
+
bottom: k - u - x,
|
|
254
|
+
left: p - x,
|
|
255
|
+
right: y - g - x
|
|
252
256
|
};
|
|
253
257
|
let w = i.placement;
|
|
254
|
-
w === "auto" && (w =
|
|
258
|
+
w === "auto" && (w = gt(P)), w = vt(w, s, n, P);
|
|
255
259
|
let T, S, $ = 0;
|
|
256
260
|
switch (w) {
|
|
257
261
|
case "top":
|
|
258
|
-
T = c - s / 2, S = d -
|
|
262
|
+
T = c - s / 2, S = d - x - n;
|
|
259
263
|
break;
|
|
260
264
|
case "bottom":
|
|
261
|
-
T = c - s / 2, S = u +
|
|
265
|
+
T = c - s / 2, S = u + x;
|
|
262
266
|
break;
|
|
263
267
|
case "left":
|
|
264
|
-
T = p -
|
|
268
|
+
T = p - x - s, S = l - n / 2;
|
|
265
269
|
break;
|
|
266
270
|
case "right":
|
|
267
|
-
T = g +
|
|
271
|
+
T = g + x, S = l - n / 2;
|
|
268
272
|
break;
|
|
269
273
|
default:
|
|
270
|
-
T = c - s / 2, S = d -
|
|
274
|
+
T = c - s / 2, S = d - x - n;
|
|
271
275
|
}
|
|
272
|
-
const I = bt(T, S, s, n,
|
|
276
|
+
const I = bt(T, S, s, n, y, k);
|
|
273
277
|
return $ = w === "top" || w === "bottom" ? T - I.x : S - I.y, {
|
|
274
278
|
x: I.x,
|
|
275
279
|
y: I.y,
|
|
@@ -277,7 +281,7 @@ function gt(a, t, e, i) {
|
|
|
277
281
|
arrowOffset: $
|
|
278
282
|
};
|
|
279
283
|
}
|
|
280
|
-
function
|
|
284
|
+
function gt(a) {
|
|
281
285
|
const t = Math.max(a.top, a.bottom, a.left, a.right);
|
|
282
286
|
return t === a.top ? "top" : t === a.bottom ? "bottom" : t === a.right ? "right" : "left";
|
|
283
287
|
}
|
|
@@ -303,7 +307,7 @@ function bt(a, t, e, i, o, r) {
|
|
|
303
307
|
let n = a, c = t;
|
|
304
308
|
return e > o - 2 * 4 ? n = (o - e) / 2 : (n < 4 && (n = 4), n + e > o - 4 && (n = o - 4 - e)), i > r - 2 * 4 ? c = (r - i) / 2 : (c < 4 && (c = 4), c + i > r - 4 && (c = r - 4 - i)), { x: n, y: c };
|
|
305
309
|
}
|
|
306
|
-
const
|
|
310
|
+
const yt = /* @__PURE__ */ new Set([
|
|
307
311
|
"a",
|
|
308
312
|
"b",
|
|
309
313
|
"br",
|
|
@@ -323,7 +327,7 @@ const xt = /* @__PURE__ */ new Set([
|
|
|
323
327
|
"span",
|
|
324
328
|
"strong",
|
|
325
329
|
"ul"
|
|
326
|
-
]),
|
|
330
|
+
]), xt = /* @__PURE__ */ new Set([
|
|
327
331
|
"class",
|
|
328
332
|
"href",
|
|
329
333
|
"src",
|
|
@@ -355,7 +359,7 @@ function et(a) {
|
|
|
355
359
|
if (e.nodeType !== Node.TEXT_NODE)
|
|
356
360
|
if (e.nodeType === Node.ELEMENT_NODE) {
|
|
357
361
|
const i = e, o = i.tagName.toLowerCase();
|
|
358
|
-
if (!
|
|
362
|
+
if (!yt.has(o)) {
|
|
359
363
|
i.remove();
|
|
360
364
|
continue;
|
|
361
365
|
}
|
|
@@ -366,7 +370,7 @@ function et(a) {
|
|
|
366
370
|
i.removeAttribute(s.name);
|
|
367
371
|
continue;
|
|
368
372
|
}
|
|
369
|
-
if (!
|
|
373
|
+
if (!xt.has(n)) {
|
|
370
374
|
i.removeAttribute(s.name);
|
|
371
375
|
continue;
|
|
372
376
|
}
|
|
@@ -385,16 +389,21 @@ function et(a) {
|
|
|
385
389
|
}
|
|
386
390
|
function Tt(a) {
|
|
387
391
|
const t = [];
|
|
388
|
-
a.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${
|
|
392
|
+
a.image && t.push(`<div class="ci-hotspot-popover-image-wrapper"><img class="ci-hotspot-popover-image" src="${M(a.image)}" alt="${M(a.title || "")}"></div>`);
|
|
389
393
|
const e = [];
|
|
390
394
|
if (a.title && e.push(`<h3 class="ci-hotspot-popover-title">${z(a.title)}</h3>`), a.originalPrice || a.price) {
|
|
391
395
|
let i = "";
|
|
392
396
|
a.originalPrice && (i += `<span class="ci-hotspot-popover-original-price">${z(a.originalPrice)}</span>`), a.price && (i += `<span class="ci-hotspot-popover-price">${z(a.price)}</span>`), e.push(`<div class="ci-hotspot-popover-price-row">${i}</div>`);
|
|
393
397
|
}
|
|
394
398
|
if (a.description && e.push(`<p class="ci-hotspot-popover-description">${z(a.description)}</p>`), a.url && zt(a.url)) {
|
|
399
|
+
const i = a.ctaText || "View details", o = a.id ? ` data-product-id="${M(a.id)}"` : "";
|
|
400
|
+
e.push(
|
|
401
|
+
`<a class="ci-hotspot-popover-cta" href="${M(a.url)}"${o}>${z(String(i))}</a>`
|
|
402
|
+
);
|
|
403
|
+
} else if (a.id) {
|
|
395
404
|
const i = a.ctaText || "View details";
|
|
396
405
|
e.push(
|
|
397
|
-
`<
|
|
406
|
+
`<button class="ci-hotspot-popover-cta" data-product-id="${M(a.id)}">${z(String(i))}</button>`
|
|
398
407
|
);
|
|
399
408
|
}
|
|
400
409
|
return e.length > 0 && t.push(`<div class="ci-hotspot-popover-body">${e.join("")}</div>`), t.join("");
|
|
@@ -409,7 +418,7 @@ function zt(a) {
|
|
|
409
418
|
const t = a.replace(/[\s\x00-\x1f]/g, "");
|
|
410
419
|
return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
|
|
411
420
|
}
|
|
412
|
-
function
|
|
421
|
+
function M(a) {
|
|
413
422
|
return a.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
414
423
|
}
|
|
415
424
|
class W {
|
|
@@ -424,7 +433,16 @@ class W {
|
|
|
424
433
|
...i && t.label ? { "aria-label": t.label } : {}
|
|
425
434
|
}), this.arrowEl = h("div", "ci-hotspot-popover-arrow"), this.contentEl = h("div", "ci-hotspot-popover-content"), this.element.appendChild(this.arrowEl), this.element.appendChild(this.contentEl);
|
|
426
435
|
const o = St(t, e.renderFn);
|
|
427
|
-
if (typeof o == "string" ? this.contentEl.innerHTML = o : o instanceof HTMLElement && this.contentEl.appendChild(o), e.
|
|
436
|
+
if (typeof o == "string" ? this.contentEl.innerHTML = o : o instanceof HTMLElement && this.contentEl.appendChild(o), e.onProductClick) {
|
|
437
|
+
const r = (s) => {
|
|
438
|
+
const n = s.target.closest(".ci-hotspot-popover-cta[data-product-id]");
|
|
439
|
+
if (!n) return;
|
|
440
|
+
const c = n.dataset.productId;
|
|
441
|
+
e.onProductClick(c, t);
|
|
442
|
+
};
|
|
443
|
+
this.contentEl.addEventListener("click", r), this.hoverCleanups.push(() => this.contentEl.removeEventListener("click", r));
|
|
444
|
+
}
|
|
445
|
+
if (e.triggerMode === "hover") {
|
|
428
446
|
const r = () => this.clearHideTimer(), s = () => this.scheduleHide();
|
|
429
447
|
this.element.addEventListener("mouseenter", r), this.element.addEventListener("mouseleave", s), this.hoverCleanups.push(
|
|
430
448
|
() => this.element.removeEventListener("mouseenter", r),
|
|
@@ -439,7 +457,7 @@ class W {
|
|
|
439
457
|
/** Show the popover */
|
|
440
458
|
show() {
|
|
441
459
|
var t, e;
|
|
442
|
-
this.clearHideTimer(), !this.visible && (this.visible = !0,
|
|
460
|
+
this.clearHideTimer(), !this.visible && (this.visible = !0, m(this.element, "ci-hotspot-popover--visible"), this.element.setAttribute("aria-hidden", "false"), this.updatePosition(), (e = (t = this.options).onOpen) == null || e.call(t, this.hotspot));
|
|
443
461
|
}
|
|
444
462
|
/** Schedule hide with delay (for hover mode) */
|
|
445
463
|
scheduleHide(t = 200) {
|
|
@@ -450,7 +468,7 @@ class W {
|
|
|
450
468
|
/** Hide the popover immediately */
|
|
451
469
|
hide() {
|
|
452
470
|
var t, e;
|
|
453
|
-
this.clearHideTimer(), this.visible && (this.visible = !1,
|
|
471
|
+
this.clearHideTimer(), this.visible && (this.visible = !1, b(this.element, "ci-hotspot-popover--visible"), this.element.setAttribute("aria-hidden", "true"), (e = (t = this.options).onClose) == null || e.call(t, this.hotspot));
|
|
454
472
|
}
|
|
455
473
|
/** Clear any pending hide timer */
|
|
456
474
|
clearHideTimer() {
|
|
@@ -459,7 +477,7 @@ class W {
|
|
|
459
477
|
/** Update popover position relative to marker */
|
|
460
478
|
updatePosition() {
|
|
461
479
|
if (!this.markerEl || !this.containerEl || !this.visible) return;
|
|
462
|
-
const t =
|
|
480
|
+
const t = mt(
|
|
463
481
|
this.markerEl,
|
|
464
482
|
this.element,
|
|
465
483
|
this.containerEl,
|
|
@@ -564,13 +582,13 @@ class Ht {
|
|
|
564
582
|
};
|
|
565
583
|
this.container.addEventListener("dblclick", e), this.cleanups.push(() => this.container.removeEventListener("dblclick", e));
|
|
566
584
|
const i = (s) => {
|
|
567
|
-
!this.enabled || this.zoom <= 1 || s.button === 0 && (this.isDragging = !0, this.dragStartX = s.clientX, this.dragStartY = s.clientY, this.lastPanX = this.panX, this.lastPanY = this.panY,
|
|
585
|
+
!this.enabled || this.zoom <= 1 || s.button === 0 && (this.isDragging = !0, this.dragStartX = s.clientX, this.dragStartY = s.clientY, this.lastPanX = this.panX, this.lastPanY = this.panY, m(this.viewport, "ci-hotspot-viewport--dragging"), this.container.style.cursor = "grabbing", s.preventDefault());
|
|
568
586
|
}, o = (s) => {
|
|
569
587
|
if (!this.isDragging) return;
|
|
570
588
|
const n = (s.clientX - this.dragStartX) / this.zoom, c = (s.clientY - this.dragStartY) / this.zoom;
|
|
571
589
|
this.panX = this.lastPanX + n, this.panY = this.lastPanY + c, this.clampPan(), this.applyTransform();
|
|
572
590
|
}, r = () => {
|
|
573
|
-
this.isDragging && (this.isDragging = !1,
|
|
591
|
+
this.isDragging && (this.isDragging = !1, b(this.viewport, "ci-hotspot-viewport--dragging"), this.container.style.cursor = this.zoom > 1 ? "grab" : "");
|
|
574
592
|
};
|
|
575
593
|
this.container.addEventListener("mousedown", i), document.addEventListener("mousemove", o), document.addEventListener("mouseup", r), this.cleanups.push(
|
|
576
594
|
() => this.container.removeEventListener("mousedown", i),
|
|
@@ -688,42 +706,42 @@ function Lt(a, t, e) {
|
|
|
688
706
|
destroy: () => o.remove()
|
|
689
707
|
};
|
|
690
708
|
}
|
|
691
|
-
const
|
|
709
|
+
const Pt = "Ctrl + scroll or pinch to zoom", It = 1500;
|
|
692
710
|
class At {
|
|
693
711
|
constructor(t) {
|
|
694
|
-
this.hideTimer = null, this.el = document.createElement("div"), this.el.className = "ci-hotspot-scroll-hint", this.el.textContent =
|
|
712
|
+
this.hideTimer = null, this.el = document.createElement("div"), this.el.className = "ci-hotspot-scroll-hint", this.el.textContent = Pt, this.el.setAttribute("aria-hidden", "true"), t.appendChild(this.el);
|
|
695
713
|
}
|
|
696
714
|
show() {
|
|
697
715
|
this.hideTimer !== null && clearTimeout(this.hideTimer), this.el.classList.add("ci-hotspot-scroll-hint--visible"), this.hideTimer = setTimeout(() => {
|
|
698
716
|
this.el.classList.remove("ci-hotspot-scroll-hint--visible"), this.hideTimer = null;
|
|
699
|
-
},
|
|
717
|
+
}, It);
|
|
700
718
|
}
|
|
701
719
|
destroy() {
|
|
702
720
|
this.hideTimer !== null && (clearTimeout(this.hideTimer), this.hideTimer = null), this.el.remove();
|
|
703
721
|
}
|
|
704
722
|
}
|
|
705
|
-
const Dt = "cloudimg.io", Bt = "v7",
|
|
706
|
-
function Ft(a, t =
|
|
723
|
+
const Dt = "cloudimg.io", Bt = "v7", F = 100;
|
|
724
|
+
function Ft(a, t = F) {
|
|
707
725
|
return Math.ceil(a / t) * t;
|
|
708
726
|
}
|
|
709
|
-
function it(a, t = 1, e = 1, i =
|
|
727
|
+
function it(a, t = 1, e = 1, i = F) {
|
|
710
728
|
const o = a * t * e;
|
|
711
729
|
return Ft(o, i);
|
|
712
730
|
}
|
|
713
|
-
function
|
|
714
|
-
const r = t.domain || Dt, s = t.apiVersion || Bt, n = t.limitFactor ||
|
|
731
|
+
function H(a, t, e, i = 1, o = 1) {
|
|
732
|
+
const r = t.domain || Dt, s = t.apiVersion || Bt, n = t.limitFactor || F, c = it(e, o, i, n), l = encodeURI(a);
|
|
715
733
|
let d = `https://${t.token}.${r}/${s}/${l}?width=${c}`;
|
|
716
734
|
return t.params && (d += `&${t.params}`), d;
|
|
717
735
|
}
|
|
718
736
|
function Yt(a, t, e, i) {
|
|
719
|
-
const o = e.limitFactor ||
|
|
737
|
+
const o = e.limitFactor || F;
|
|
720
738
|
let r = 0;
|
|
721
739
|
const s = new ResizeObserver((n) => {
|
|
722
740
|
for (const c of n) {
|
|
723
741
|
const l = c.contentRect.width;
|
|
724
742
|
if (l === 0) continue;
|
|
725
743
|
const d = typeof window < "u" && window.devicePixelRatio || 1, u = it(l, d, i(), o);
|
|
726
|
-
u !== r && (r = u, a.src =
|
|
744
|
+
u !== r && (r = u, a.src = H(t, e, l, i(), d));
|
|
727
745
|
}
|
|
728
746
|
});
|
|
729
747
|
return {
|
|
@@ -731,7 +749,7 @@ function Yt(a, t, e, i) {
|
|
|
731
749
|
destroy: () => s.disconnect()
|
|
732
750
|
};
|
|
733
751
|
}
|
|
734
|
-
const
|
|
752
|
+
const D = 50, U = 0.5;
|
|
735
753
|
class Rt {
|
|
736
754
|
constructor(t) {
|
|
737
755
|
this.cleanups = [];
|
|
@@ -745,16 +763,16 @@ class Rt {
|
|
|
745
763
|
o == null || o();
|
|
746
764
|
break;
|
|
747
765
|
case "ArrowUp":
|
|
748
|
-
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(0,
|
|
766
|
+
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(0, D));
|
|
749
767
|
break;
|
|
750
768
|
case "ArrowDown":
|
|
751
|
-
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(0, -
|
|
769
|
+
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(0, -D));
|
|
752
770
|
break;
|
|
753
771
|
case "ArrowLeft":
|
|
754
|
-
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(
|
|
772
|
+
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(D, 0));
|
|
755
773
|
break;
|
|
756
774
|
case "ArrowRight":
|
|
757
|
-
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(-
|
|
775
|
+
l && l.getZoom() > 1 && (n.preventDefault(), l.pan(-D, 0));
|
|
758
776
|
break;
|
|
759
777
|
case "+":
|
|
760
778
|
case "=":
|
|
@@ -803,7 +821,7 @@ function R(a, t) {
|
|
|
803
821
|
}
|
|
804
822
|
return { activate: o, deactivate: r, destroy: s };
|
|
805
823
|
}
|
|
806
|
-
let E = null,
|
|
824
|
+
let E = null, B = 0;
|
|
807
825
|
function $t(a) {
|
|
808
826
|
K() && (E || (E = h("div", void 0, {
|
|
809
827
|
"aria-live": "polite",
|
|
@@ -814,10 +832,10 @@ function $t(a) {
|
|
|
814
832
|
}));
|
|
815
833
|
}
|
|
816
834
|
function q() {
|
|
817
|
-
|
|
835
|
+
B++;
|
|
818
836
|
}
|
|
819
837
|
function Nt() {
|
|
820
|
-
|
|
838
|
+
B = Math.max(0, B - 1), B === 0 && E && (E.remove(), E = null);
|
|
821
839
|
}
|
|
822
840
|
const G = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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>', Xt = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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>';
|
|
823
841
|
function jt() {
|
|
@@ -847,7 +865,7 @@ function Vt(a, t = {}) {
|
|
|
847
865
|
function r() {
|
|
848
866
|
var g;
|
|
849
867
|
const p = o();
|
|
850
|
-
e.innerHTML = p ? Xt : G, e.setAttribute("aria-label", p ? "Exit fullscreen" : "Enter fullscreen"), e.setAttribute("aria-pressed", String(p)), p ?
|
|
868
|
+
e.innerHTML = p ? Xt : G, e.setAttribute("aria-label", p ? "Exit fullscreen" : "Enter fullscreen"), e.setAttribute("aria-pressed", String(p)), p ? m(a, "ci-hotspot-container--fullscreen") : b(a, "ci-hotspot-container--fullscreen"), (g = t.onChange) == null || g.call(t, p);
|
|
851
869
|
}
|
|
852
870
|
function s() {
|
|
853
871
|
o() ? Y().catch(() => {
|
|
@@ -870,7 +888,7 @@ function Vt(a, t = {}) {
|
|
|
870
888
|
i.push(d), a.appendChild(e);
|
|
871
889
|
function u() {
|
|
872
890
|
o() && Y().catch(() => {
|
|
873
|
-
}),
|
|
891
|
+
}), b(a, "ci-hotspot-container--fullscreen"), i.forEach((p) => p()), i.length = 0, e.remove();
|
|
874
892
|
}
|
|
875
893
|
return {
|
|
876
894
|
element: e,
|
|
@@ -881,7 +899,7 @@ function Vt(a, t = {}) {
|
|
|
881
899
|
destroy: u
|
|
882
900
|
};
|
|
883
901
|
}
|
|
884
|
-
const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-border-width: 2px;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci-hotspot-marker-border: var(--ci-hotspot-marker-border-width) solid var(--ci-hotspot-marker-border-color);--ci-hotspot-marker-border-radius: 50%;--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci-hotspot-pulse-color: rgba(0, 0, 0, .2);--ci-hotspot-pulse-size: 40px;--ci-hotspot-pulse-duration: 1.8s;--ci-hotspot-popover-bg: #ffffff;--ci-hotspot-popover-color: #1a1a1a;--ci-hotspot-popover-border: 1px solid rgba(0, 0, 0, .1);--ci-hotspot-popover-border-radius: 12px;--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci-hotspot-popover-padding: 16px;--ci-hotspot-popover-max-width: 320px;--ci-hotspot-popover-max-height: 400px;--ci-hotspot-popover-font-family: inherit;--ci-hotspot-popover-font-size: 14px;--ci-hotspot-popover-line-height: 1.5;--ci-hotspot-popover-z-index: 1000;--ci-hotspot-arrow-size: 8px;--ci-hotspot-arrow-color: var(--ci-hotspot-popover-bg);--ci-hotspot-title-font-size: 16px;--ci-hotspot-title-font-weight: 600;--ci-hotspot-title-color: #1a1a1a;--ci-hotspot-price-color: #2d8c3c;--ci-hotspot-price-font-size: 18px;--ci-hotspot-price-font-weight: 700;--ci-hotspot-description-color: #666666;--ci-hotspot-cta-bg: #0058a3;--ci-hotspot-cta-color: #ffffff;--ci-hotspot-cta-border-radius: 8px;--ci-hotspot-cta-padding: 8px 16px;--ci-hotspot-original-price-color: #999999;--ci-hotspot-popover-text-align: left;--ci-hotspot-hover-transition: .2s ease;--ci-hotspot-popover-transition: .3s ease;--ci-hotspot-scene-transition-duration: .4s;--ci-hotspot-zoom-controls-bg: rgba(255, 255, 255, .9);--ci-hotspot-zoom-controls-color: #333333;--ci-hotspot-zoom-controls-border-radius: 8px;--ci-hotspot-zoom-controls-shadow: 0 2px 8px rgba(0, 0, 0, .15)}.ci-hotspot-container *,.ci-hotspot-container *:before,.ci-hotspot-container *:after{box-sizing:border-box}.ci-hotspot-container{position:relative;overflow:hidden;width:100%;line-height:0;user-select:none;-webkit-user-select:none}.ci-hotspot-viewport{position:relative;width:100%;transform-origin:0 0;will-change:transform;transition:transform .3s ease}.ci-hotspot-viewport--dragging{transition:none}.ci-hotspot-image{display:block;width:100%;height:auto;pointer-events:none}.ci-hotspot-markers{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.ci-hotspot-marker{position:absolute;width:var(--ci-hotspot-marker-size);height:var(--ci-hotspot-marker-size);padding:0;border:var(--ci-hotspot-marker-border);border-radius:var(--ci-hotspot-marker-border-radius);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);box-shadow:var(--ci-hotspot-marker-shadow);cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));transition:transform var(--ci-hotspot-hover-transition),box-shadow var(--ci-hotspot-hover-transition);z-index:1;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;outline:none}.ci-hotspot-marker:hover{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));box-shadow:0 4px 12px #0006}.ci-hotspot-marker:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-marker--active{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));z-index:2}.ci-hotspot-marker--hidden{display:none}.ci-hotspot-marker--dot-label{overflow:visible}.ci-hotspot-marker-label{position:absolute;left:calc(50% + var(--ci-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci-hotspot-marker-color);background:var(--ci-hotspot-marker-bg);border:var(--ci-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-marker--dot-label.ci-hotspot-marker--pulse{animation:none}.ci-hotspot-marker--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci-hotspot-pulse-size);height:var(--ci-hotspot-pulse-size);border-radius:50%;background:var(--ci-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci-hotspot-pulse var(--ci-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci-hotspot-pulse{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.ci-hotspot-marker--pulse{animation:ci-hotspot-breathe 2.4s ease-in-out infinite}.ci-hotspot-marker--pulse:hover,.ci-hotspot-marker--pulse.ci-hotspot-marker--active{animation:none}@keyframes ci-hotspot-breathe{0%,to{transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)))}50%{transform:translate(-50%,-50%) scale(calc(1.15 / var(--zoom, 1)))}}.ci-hotspot-popover{position:absolute;z-index:var(--ci-hotspot-popover-z-index);max-width:var(--ci-hotspot-popover-max-width);background:var(--ci-hotspot-popover-bg);color:var(--ci-hotspot-popover-color);border:var(--ci-hotspot-popover-border);border-radius:var(--ci-hotspot-popover-border-radius);box-shadow:var(--ci-hotspot-popover-shadow);font-family:var(--ci-hotspot-popover-font-family);font-size:var(--ci-hotspot-popover-font-size);line-height:var(--ci-hotspot-popover-line-height);opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity var(--ci-hotspot-popover-transition),transform var(--ci-hotspot-popover-transition)}.ci-hotspot-popover--visible{opacity:1;pointer-events:auto;transform:translateY(0);animation:ci-hotspot-popover-in var(--ci-hotspot-popover-transition) forwards}@keyframes ci-hotspot-popover-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.ci-hotspot-popover-arrow{position:absolute;width:calc(var(--ci-hotspot-arrow-size) * 2);height:calc(var(--ci-hotspot-arrow-size) * 2);background:var(--ci-hotspot-arrow-color);transform:rotate(45deg);pointer-events:none}.ci-hotspot-popover[data-placement=top] .ci-hotspot-popover-arrow{bottom:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=bottom] .ci-hotspot-popover-arrow{top:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=left] .ci-hotspot-popover-arrow{right:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=right] .ci-hotspot-popover-arrow{left:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover-content{padding:var(--ci-hotspot-popover-padding);max-height:var(--ci-hotspot-popover-max-height);overflow-y:auto;overflow-x:hidden;border-radius:var(--ci-hotspot-popover-border-radius)}.ci-hotspot-popover-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci-hotspot-popover-border-radius) - 4px) calc(var(--ci-hotspot-popover-border-radius) - 4px) 0 0;margin:calc(var(--ci-hotspot-popover-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci-hotspot-popover-padding) * 2)}.ci-hotspot-popover-image{display:block;width:100%;height:100%;object-fit:cover}.ci-hotspot-popover-body{line-height:1.5;text-align:var(--ci-hotspot-popover-text-align)}.ci-hotspot-popover-title{margin:0 0 4px;font-size:var(--ci-hotspot-title-font-size);font-weight:var(--ci-hotspot-title-font-weight);color:var(--ci-hotspot-title-color)}.ci-hotspot-popover-price{display:inline-block;margin-bottom:8px;font-size:var(--ci-hotspot-price-font-size);font-weight:var(--ci-hotspot-price-font-weight);color:var(--ci-hotspot-price-color)}.ci-hotspot-popover-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci-hotspot-popover-price-row .ci-hotspot-popover-price{margin-bottom:0}.ci-hotspot-popover-original-price{font-size:calc(var(--ci-hotspot-price-font-size) - 2px);font-weight:500;color:var(--ci-hotspot-original-price-color);text-decoration:line-through}.ci-hotspot-popover-description{margin:0 0 12px;color:var(--ci-hotspot-description-color)}.ci-hotspot-popover-cta{display:inline-block;padding:var(--ci-hotspot-cta-padding);background:var(--ci-hotspot-cta-bg);color:var(--ci-hotspot-cta-color);border-radius:var(--ci-hotspot-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci-hotspot-popover-cta:hover{opacity:.9}.ci-hotspot-popover-cta:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-zoom-controls{position:absolute;display:flex;gap:2px;background:var(--ci-hotspot-zoom-controls-bg);border-radius:var(--ci-hotspot-zoom-controls-border-radius);box-shadow:var(--ci-hotspot-zoom-controls-shadow);z-index:10;overflow:hidden}.ci-hotspot-zoom-controls button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--ci-hotspot-zoom-controls-color);cursor:pointer;font-size:18px;line-height:1;padding:0;transition:background .15s ease}.ci-hotspot-zoom-controls button:hover{background:#0000000d}.ci-hotspot-zoom-controls button:disabled{opacity:.3;cursor:default}.ci-hotspot-zoom-controls button:disabled:hover{background:transparent}.ci-hotspot-zoom-controls button svg{width:18px;height:18px}.ci-hotspot-zoom-controls button:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:-3px}.ci-hotspot-zoom-controls[data-position=bottom-right]{bottom:16px;right:16px}.ci-hotspot-zoom-controls[data-position=bottom-left]{bottom:16px;left:16px}.ci-hotspot-zoom-controls[data-position=bottom-center]{bottom:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]{top:16px;right:16px}.ci-hotspot-zoom-controls[data-position=top-left]{top:16px;left:16px}.ci-hotspot-zoom-controls[data-position=top-center]{top:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]~.ci-hotspot-fullscreen-btn{right:136px}.ci-hotspot-cluster{position:absolute;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border-radius:16px;border:2px solid rgba(255,255,255,.8);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);font-size:13px;font-weight:700;cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-loading .ci-hotspot-image{opacity:0;transition:opacity .3s ease}.ci-hotspot-loading .ci-hotspot-markers{display:none}.ci-hotspot-theme-dark{--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-pulse-color: rgba(255, 255, 255, .2);--ci-hotspot-popover-bg: #1a1a1a;--ci-hotspot-popover-color: #f0f0f0;--ci-hotspot-popover-border: 1px solid rgba(255, 255, 255, .1);--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci-hotspot-title-color: #f0f0f0;--ci-hotspot-description-color: #aaaaaa;--ci-hotspot-original-price-color: #777777;--ci-hotspot-zoom-controls-bg: rgba(30, 30, 30, .9);--ci-hotspot-zoom-controls-color: #f0f0f0}.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(0, 0, 0, .3);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci-hotspot-pulse-color: rgba(0, 0, 0, .15)}.ci-hotspot-theme-dark.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .3);--ci-hotspot-pulse-color: rgba(255, 255, 255, .15)}.ci-hotspot-scroll-hint{position:absolute;bottom:16px;left:50%;transform:translate(-50%) translateY(4px);padding:8px 16px;border-radius:20px;background:#000000b3;color:#fff;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1;white-space:nowrap;z-index:100;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease}.ci-hotspot-scroll-hint--visible{opacity:1;transform:translate(-50%) translateY(0)}.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{overflow:hidden;height:0}.ci-hotspot-container--fixed-ratio .ci-hotspot-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain}.ci-hotspot-container--fixed-ratio .ci-hotspot-markers{z-index:1}.ci-hotspot-scene-incoming{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:0}.ci-hotspot-scene-fade-in{animation:ci-hotspot-scene-fade-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-fade-out{animation:ci-hotspot-scene-fade-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ci-hotspot-scene-fade-out{0%{opacity:1}to{opacity:0}}.ci-hotspot-scene-slide-in{animation:ci-hotspot-scene-slide-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out{animation:ci-hotspot-scene-slide-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out{0%{transform:translate(0)}to{transform:translate(-100%)}}.ci-hotspot-scene-slide-in-reverse{animation:ci-hotspot-scene-slide-in-reverse var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-reverse{animation:ci-hotspot-scene-slide-out-reverse var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-reverse{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out-reverse{0%{transform:translate(0)}to{transform:translate(100%)}}.ci-hotspot-scene-slide-in-up{animation:ci-hotspot-scene-slide-in-up var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-up{animation:ci-hotspot-scene-slide-out-up var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-up{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-up{0%{transform:translateY(0)}to{transform:translateY(100%)}}.ci-hotspot-scene-slide-in-down{animation:ci-hotspot-scene-slide-in-down var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-down{animation:ci-hotspot-scene-slide-out-down var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-down{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-down{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.ci-hotspot-marker--navigate{--ci-hotspot-marker-bg: rgba(0, 88, 163, .7)}.ci-hotspot-navigate-icon{width:75%;height:75%;display:block}.ci-hotspot-scene-transitioning .ci-hotspot-markers{opacity:0;pointer-events:none;transition:opacity .1s ease}.ci-hotspot-scene-loading:after{content:"";position:absolute;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid rgba(0,0,0,.1);border-top-color:#00000080;border-radius:50%;animation:ci-hotspot-spin .6s linear infinite;z-index:10;pointer-events:none}.ci-hotspot-theme-dark .ci-hotspot-scene-loading:after,.ci-hotspot-scene-loading.ci-hotspot-theme-dark:after{border-color:#ffffff1a;border-top-color:#ffffff80}@keyframes ci-hotspot-spin{to{transform:rotate(360deg)}}.ci-hotspot-fullscreen-btn{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--ci-hotspot-zoom-controls-border-radius);background:var(--ci-hotspot-zoom-controls-bg);color:var(--ci-hotspot-zoom-controls-color);box-shadow:var(--ci-hotspot-zoom-controls-shadow);cursor:pointer;padding:0;z-index:10;transition:background .15s ease}.ci-hotspot-fullscreen-btn:hover{background:#e6e6e6f2}.ci-hotspot-fullscreen-btn svg{width:18px;height:18px}.ci-hotspot-fullscreen-btn:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-container--fullscreen{background:#000;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center}.ci-hotspot-container--fullscreen .ci-hotspot-viewport{width:fit-content;max-width:100%;max-height:100%}.ci-hotspot-container--fullscreen .ci-hotspot-image{max-height:100vh;width:auto;max-width:100%;object-fit:contain}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{width:100%;height:100%;padding-bottom:0}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-image{width:100%;height:100%;max-height:none}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn{background:#1e1e1ee6;color:#f0f0f0}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn:hover,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn:hover{background:#3c3c3cf2}@media (prefers-reduced-motion: reduce){.ci-hotspot-marker,.ci-hotspot-marker:before,.ci-hotspot-popover{animation:none!important;transition-duration:.01ms!important}.ci-hotspot-viewport,.ci-hotspot-scroll-hint{transition-duration:.01ms!important}.ci-hotspot-scene-fade-in,.ci-hotspot-scene-fade-out,.ci-hotspot-scene-slide-in,.ci-hotspot-scene-slide-out,.ci-hotspot-scene-slide-in-reverse,.ci-hotspot-scene-slide-out-reverse,.ci-hotspot-scene-slide-in-up,.ci-hotspot-scene-slide-out-up,.ci-hotspot-scene-slide-in-down,.ci-hotspot-scene-slide-out-down{animation-duration:.01ms!important}.ci-hotspot-scene-transitioning .ci-hotspot-markers{transition-duration:.01ms!important}.ci-hotspot-scene-loading:after{animation-duration:.01ms!important}.ci-hotspot-fullscreen-btn{transition-duration:.01ms!important}}', H = class H {
|
|
902
|
+
const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-border-width: 2px;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-marker-border: var(--ci-hotspot-marker-border-width) solid var(--ci-hotspot-marker-border-color);--ci-hotspot-marker-border-radius: 50%;--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .15);--ci-hotspot-pulse-color: rgba(0, 0, 0, .15);--ci-hotspot-pulse-size: 40px;--ci-hotspot-pulse-duration: 1.8s;--ci-hotspot-popover-bg: #ffffff;--ci-hotspot-popover-color: #1a1a1a;--ci-hotspot-popover-border: 1px solid rgba(0, 0, 0, .1);--ci-hotspot-popover-border-radius: 12px;--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .12);--ci-hotspot-popover-padding: 16px;--ci-hotspot-popover-max-width: 320px;--ci-hotspot-popover-max-height: 400px;--ci-hotspot-popover-font-family: inherit;--ci-hotspot-popover-font-size: 14px;--ci-hotspot-popover-line-height: 1.5;--ci-hotspot-popover-z-index: 1000;--ci-hotspot-arrow-size: 8px;--ci-hotspot-arrow-color: var(--ci-hotspot-popover-bg);--ci-hotspot-title-font-size: 16px;--ci-hotspot-title-font-weight: 600;--ci-hotspot-title-color: #1a1a1a;--ci-hotspot-price-color: #2d8c3c;--ci-hotspot-price-font-size: 18px;--ci-hotspot-price-font-weight: 700;--ci-hotspot-description-color: #666666;--ci-hotspot-cta-bg: #0058a3;--ci-hotspot-cta-color: #ffffff;--ci-hotspot-cta-border-radius: 8px;--ci-hotspot-cta-padding: 8px 16px;--ci-hotspot-original-price-color: #999999;--ci-hotspot-popover-text-align: left;--ci-hotspot-hover-transition: .2s ease;--ci-hotspot-popover-transition: .3s ease;--ci-hotspot-scene-transition-duration: .4s;--ci-hotspot-zoom-controls-bg: rgba(255, 255, 255, .9);--ci-hotspot-zoom-controls-color: #333333;--ci-hotspot-zoom-controls-border-radius: 8px;--ci-hotspot-zoom-controls-shadow: 0 2px 8px rgba(0, 0, 0, .15)}.ci-hotspot-container *,.ci-hotspot-container *:before,.ci-hotspot-container *:after{box-sizing:border-box}.ci-hotspot-container{position:relative;overflow:hidden;width:100%;line-height:0;user-select:none;-webkit-user-select:none}.ci-hotspot-viewport{position:relative;width:100%;transform-origin:0 0;will-change:transform;transition:transform .3s ease}.ci-hotspot-viewport--dragging{transition:none}.ci-hotspot-image{display:block;width:100%;height:auto;pointer-events:none}.ci-hotspot-markers{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.ci-hotspot-marker{position:absolute;width:var(--ci-hotspot-marker-size);height:var(--ci-hotspot-marker-size);padding:0;border:var(--ci-hotspot-marker-border);border-radius:var(--ci-hotspot-marker-border-radius);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);box-shadow:var(--ci-hotspot-marker-shadow);cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));transition:transform var(--ci-hotspot-hover-transition),box-shadow var(--ci-hotspot-hover-transition);z-index:1;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;outline:none}.ci-hotspot-marker:hover{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));box-shadow:0 4px 12px #0006}.ci-hotspot-marker:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-marker--active{transform:translate(-50%,-50%) scale(calc(1.2 / var(--zoom, 1)));z-index:2}.ci-hotspot-marker--hidden{display:none}.ci-hotspot-marker--dot-label{overflow:visible}.ci-hotspot-marker-label{position:absolute;left:calc(50% + var(--ci-hotspot-marker-size) / 2 + 4px);top:50%;transform:translateY(-50%);padding:3px 10px;font-size:11px;font-weight:600;white-space:nowrap;color:var(--ci-hotspot-marker-color);background:var(--ci-hotspot-marker-bg);border:var(--ci-hotspot-marker-border);border-radius:100px;box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-marker--dot-label.ci-hotspot-marker--pulse{animation:none}.ci-hotspot-marker--pulse:before{content:"";position:absolute;top:50%;left:50%;width:var(--ci-hotspot-pulse-size);height:var(--ci-hotspot-pulse-size);border-radius:50%;background:var(--ci-hotspot-pulse-color);transform:translate(-50%,-50%) scale(1);animation:ci-hotspot-pulse var(--ci-hotspot-pulse-duration) ease-out infinite;pointer-events:none}@keyframes ci-hotspot-pulse{0%{transform:translate(-50%,-50%) scale(1);opacity:1}to{transform:translate(-50%,-50%) scale(1.8);opacity:0}}.ci-hotspot-marker--pulse{animation:ci-hotspot-breathe 2.4s ease-in-out infinite}.ci-hotspot-marker--pulse:hover,.ci-hotspot-marker--pulse.ci-hotspot-marker--active{animation:none}@keyframes ci-hotspot-breathe{0%,to{transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)))}50%{transform:translate(-50%,-50%) scale(calc(1.15 / var(--zoom, 1)))}}.ci-hotspot-popover{position:absolute;z-index:var(--ci-hotspot-popover-z-index);max-width:var(--ci-hotspot-popover-max-width);background:var(--ci-hotspot-popover-bg);color:var(--ci-hotspot-popover-color);border:var(--ci-hotspot-popover-border);border-radius:var(--ci-hotspot-popover-border-radius);box-shadow:var(--ci-hotspot-popover-shadow);font-family:var(--ci-hotspot-popover-font-family);font-size:var(--ci-hotspot-popover-font-size);line-height:var(--ci-hotspot-popover-line-height);opacity:0;pointer-events:none;transform:translateY(4px);transition:opacity var(--ci-hotspot-popover-transition),transform var(--ci-hotspot-popover-transition)}.ci-hotspot-popover--visible{opacity:1;pointer-events:auto;transform:translateY(0);animation:ci-hotspot-popover-in var(--ci-hotspot-popover-transition) forwards}@keyframes ci-hotspot-popover-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.ci-hotspot-popover-arrow{position:absolute;width:calc(var(--ci-hotspot-arrow-size) * 2);height:calc(var(--ci-hotspot-arrow-size) * 2);background:var(--ci-hotspot-arrow-color);transform:rotate(45deg);pointer-events:none}.ci-hotspot-popover[data-placement=top] .ci-hotspot-popover-arrow{bottom:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=bottom] .ci-hotspot-popover-arrow{top:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=left] .ci-hotspot-popover-arrow{right:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover[data-placement=right] .ci-hotspot-popover-arrow{left:calc(var(--ci-hotspot-arrow-size) * -1)}.ci-hotspot-popover-content{padding:var(--ci-hotspot-popover-padding);max-height:var(--ci-hotspot-popover-max-height);overflow-y:auto;overflow-x:hidden;border-radius:var(--ci-hotspot-popover-border-radius)}.ci-hotspot-popover-image-wrapper{aspect-ratio:16 / 9;overflow:hidden;border-radius:calc(var(--ci-hotspot-popover-border-radius) - 4px) calc(var(--ci-hotspot-popover-border-radius) - 4px) 0 0;margin:calc(var(--ci-hotspot-popover-padding) * -1);margin-bottom:12px;width:calc(100% + var(--ci-hotspot-popover-padding) * 2)}.ci-hotspot-popover-image{display:block;width:100%;height:100%;object-fit:cover}.ci-hotspot-popover-body{line-height:1.5;text-align:var(--ci-hotspot-popover-text-align)}.ci-hotspot-popover-title{margin:0 0 4px;font-size:var(--ci-hotspot-title-font-size);font-weight:var(--ci-hotspot-title-font-weight);color:var(--ci-hotspot-title-color)}.ci-hotspot-popover-price{display:inline-block;margin-bottom:8px;font-size:var(--ci-hotspot-price-font-size);font-weight:var(--ci-hotspot-price-font-weight);color:var(--ci-hotspot-price-color)}.ci-hotspot-popover-price-row{display:inline-flex;align-items:baseline;gap:6px;margin-bottom:8px;flex-wrap:wrap}.ci-hotspot-popover-price-row .ci-hotspot-popover-price{margin-bottom:0}.ci-hotspot-popover-original-price{font-size:calc(var(--ci-hotspot-price-font-size) - 2px);font-weight:500;color:var(--ci-hotspot-original-price-color);text-decoration:line-through}.ci-hotspot-popover-description{margin:0 0 12px;color:var(--ci-hotspot-description-color)}.ci-hotspot-popover-cta{display:inline-block;padding:var(--ci-hotspot-cta-padding);background:var(--ci-hotspot-cta-bg);color:var(--ci-hotspot-cta-color);border-radius:var(--ci-hotspot-cta-border-radius);text-decoration:none;font-weight:600;font-size:14px;transition:opacity .2s ease}.ci-hotspot-popover-cta:hover{opacity:.9}button.ci-hotspot-popover-cta{cursor:pointer;border:none;font:inherit;width:100%}.ci-hotspot-popover-cta:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-zoom-controls{position:absolute;display:flex;gap:2px;background:var(--ci-hotspot-zoom-controls-bg);border-radius:var(--ci-hotspot-zoom-controls-border-radius);box-shadow:var(--ci-hotspot-zoom-controls-shadow);z-index:10;overflow:hidden}.ci-hotspot-zoom-controls button{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;background:transparent;color:var(--ci-hotspot-zoom-controls-color);cursor:pointer;font-size:18px;line-height:1;padding:0;transition:background .15s ease}.ci-hotspot-zoom-controls button:hover{background:#0000000d}.ci-hotspot-zoom-controls button:disabled{opacity:.3;cursor:default}.ci-hotspot-zoom-controls button:disabled:hover{background:transparent}.ci-hotspot-zoom-controls button svg{width:18px;height:18px}.ci-hotspot-zoom-controls button:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:-3px}.ci-hotspot-zoom-controls[data-position=bottom-right]{bottom:16px;right:16px}.ci-hotspot-zoom-controls[data-position=bottom-left]{bottom:16px;left:16px}.ci-hotspot-zoom-controls[data-position=bottom-center]{bottom:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]{top:16px;right:16px}.ci-hotspot-zoom-controls[data-position=top-left]{top:16px;left:16px}.ci-hotspot-zoom-controls[data-position=top-center]{top:16px;left:50%;transform:translate(-50%)}.ci-hotspot-zoom-controls[data-position=top-right]~.ci-hotspot-fullscreen-btn{right:136px}.ci-hotspot-cluster{position:absolute;display:flex;align-items:center;justify-content:center;min-width:32px;height:32px;padding:0 8px;border-radius:16px;border:2px solid rgba(255,255,255,.8);background:var(--ci-hotspot-marker-bg);color:var(--ci-hotspot-marker-color);font-size:13px;font-weight:700;cursor:pointer;pointer-events:auto;transform:translate(-50%,-50%) scale(calc(1 / var(--zoom, 1)));box-shadow:var(--ci-hotspot-marker-shadow)}.ci-hotspot-loading .ci-hotspot-image{opacity:0;transition:opacity .3s ease}.ci-hotspot-loading .ci-hotspot-markers{display:none}.ci-hotspot-theme-dark{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .6);--ci-hotspot-pulse-color: rgba(255, 255, 255, .15);--ci-hotspot-popover-bg: #1a1a1a;--ci-hotspot-popover-color: #f0f0f0;--ci-hotspot-popover-border: 1px solid rgba(255, 255, 255, .1);--ci-hotspot-popover-shadow: 0 8px 32px rgba(0, 0, 0, .4);--ci-hotspot-title-color: #f0f0f0;--ci-hotspot-description-color: #aaaaaa;--ci-hotspot-original-price-color: #777777;--ci-hotspot-zoom-controls-bg: rgba(30, 30, 30, .9);--ci-hotspot-zoom-controls-color: #f0f0f0}.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(0, 0, 0, .6);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .8);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .3);--ci-hotspot-pulse-color: rgba(0, 0, 0, .2)}.ci-hotspot-theme-dark.ci-hotspot-marker-inverted{--ci-hotspot-marker-bg: rgba(255, 255, 255, .8);--ci-hotspot-marker-color: #1a1a1a;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .4);--ci-hotspot-pulse-color: rgba(255, 255, 255, .2)}.ci-hotspot-marker-brand{--ci-hotspot-marker-bg: var(--ci-hotspot-brand-color, #00aaff);--ci-hotspot-marker-color: #ffffff;--ci-hotspot-marker-border-color: rgba(255, 255, 255, .9);--ci-hotspot-marker-shadow: 0 2px 8px rgba(0, 0, 0, .25);--ci-hotspot-pulse-color: var(--ci-hotspot-brand-color, #00aaff)}.ci-hotspot-scroll-hint{position:absolute;bottom:16px;left:50%;transform:translate(-50%) translateY(4px);padding:8px 16px;border-radius:20px;background:#000000b3;color:#fff;font-size:13px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif;line-height:1;white-space:nowrap;z-index:100;opacity:0;pointer-events:none;transition:opacity .3s ease,transform .3s ease}.ci-hotspot-scroll-hint--visible{opacity:1;transform:translate(-50%) translateY(0)}.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{overflow:hidden;height:0}.ci-hotspot-container--fixed-ratio .ci-hotspot-image{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain}.ci-hotspot-container--fixed-ratio .ci-hotspot-markers{z-index:1}.ci-hotspot-scene-incoming{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:contain;pointer-events:none;z-index:0}.ci-hotspot-scene-fade-in{animation:ci-hotspot-scene-fade-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-fade-out{animation:ci-hotspot-scene-fade-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-fade-in{0%{opacity:0}to{opacity:1}}@keyframes ci-hotspot-scene-fade-out{0%{opacity:1}to{opacity:0}}.ci-hotspot-scene-slide-in{animation:ci-hotspot-scene-slide-in var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out{animation:ci-hotspot-scene-slide-out var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out{0%{transform:translate(0)}to{transform:translate(-100%)}}.ci-hotspot-scene-slide-in-reverse{animation:ci-hotspot-scene-slide-in-reverse var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-reverse{animation:ci-hotspot-scene-slide-out-reverse var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-reverse{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes ci-hotspot-scene-slide-out-reverse{0%{transform:translate(0)}to{transform:translate(100%)}}.ci-hotspot-scene-slide-in-up{animation:ci-hotspot-scene-slide-in-up var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-up{animation:ci-hotspot-scene-slide-out-up var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-up{0%{transform:translateY(-100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-up{0%{transform:translateY(0)}to{transform:translateY(100%)}}.ci-hotspot-scene-slide-in-down{animation:ci-hotspot-scene-slide-in-down var(--ci-hotspot-scene-transition-duration) ease forwards;z-index:1}.ci-hotspot-scene-slide-out-down{animation:ci-hotspot-scene-slide-out-down var(--ci-hotspot-scene-transition-duration) ease forwards}@keyframes ci-hotspot-scene-slide-in-down{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes ci-hotspot-scene-slide-out-down{0%{transform:translateY(0)}to{transform:translateY(-100%)}}.ci-hotspot-navigate-icon{width:75%;height:75%;display:block}.ci-hotspot-scene-transitioning .ci-hotspot-markers{opacity:0;pointer-events:none;transition:opacity .1s ease}.ci-hotspot-scene-loading:after{content:"";position:absolute;top:50%;left:50%;width:32px;height:32px;margin:-16px 0 0 -16px;border:3px solid rgba(0,0,0,.1);border-top-color:#00000080;border-radius:50%;animation:ci-hotspot-spin .6s linear infinite;z-index:10;pointer-events:none}.ci-hotspot-theme-dark .ci-hotspot-scene-loading:after,.ci-hotspot-scene-loading.ci-hotspot-theme-dark:after{border-color:#ffffff1a;border-top-color:#ffffff80}@keyframes ci-hotspot-spin{to{transform:rotate(360deg)}}.ci-hotspot-fullscreen-btn{position:absolute;top:16px;right:16px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:none;border-radius:var(--ci-hotspot-zoom-controls-border-radius);background:var(--ci-hotspot-zoom-controls-bg);color:var(--ci-hotspot-zoom-controls-color);box-shadow:var(--ci-hotspot-zoom-controls-shadow);cursor:pointer;padding:0;z-index:10;transition:background .15s ease}.ci-hotspot-fullscreen-btn:hover{background:#e6e6e6f2}.ci-hotspot-fullscreen-btn svg{width:18px;height:18px}.ci-hotspot-fullscreen-btn:focus-visible{outline:3px solid var(--ci-hotspot-focus-ring, #4A90D9);outline-offset:2px}.ci-hotspot-container--fullscreen{background:#000;width:100vw;height:100vh;display:flex;align-items:center;justify-content:center}.ci-hotspot-container--fullscreen .ci-hotspot-viewport{width:fit-content;max-width:100%;max-height:100%}.ci-hotspot-container--fullscreen .ci-hotspot-image{max-height:100vh;width:auto;max-width:100%;object-fit:contain}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-viewport{width:100%;height:100%;padding-bottom:0!important}.ci-hotspot-container--fullscreen.ci-hotspot-container--fixed-ratio .ci-hotspot-image{width:100%;height:100%;max-height:none;object-fit:contain}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn{background:#1e1e1ee6;color:#f0f0f0}.ci-hotspot-theme-dark .ci-hotspot-fullscreen-btn:hover,.ci-hotspot-container--fullscreen .ci-hotspot-fullscreen-btn:hover{background:#3c3c3cf2}@media (prefers-reduced-motion: reduce){.ci-hotspot-marker,.ci-hotspot-marker:before,.ci-hotspot-popover{animation:none!important;transition-duration:.01ms!important}.ci-hotspot-viewport,.ci-hotspot-scroll-hint{transition-duration:.01ms!important}.ci-hotspot-scene-fade-in,.ci-hotspot-scene-fade-out,.ci-hotspot-scene-slide-in,.ci-hotspot-scene-slide-out,.ci-hotspot-scene-slide-in-reverse,.ci-hotspot-scene-slide-out-reverse,.ci-hotspot-scene-slide-in-up,.ci-hotspot-scene-slide-out-up,.ci-hotspot-scene-slide-in-down,.ci-hotspot-scene-slide-out-down{animation-duration:.01ms!important}.ci-hotspot-scene-transitioning .ci-hotspot-markers{transition-duration:.01ms!important}.ci-hotspot-scene-loading:after{animation-duration:.01ms!important}.ci-hotspot-fullscreen-btn{transition-duration:.01ms!important}}', L = class L {
|
|
885
903
|
constructor(t, e) {
|
|
886
904
|
this.markers = /* @__PURE__ */ new Map(), this.popovers = /* @__PURE__ */ new Map(), this.normalizedHotspots = /* @__PURE__ */ new Map(), this.scrollHint = null, this.zoomPan = null, this.zoomControls = null, this.cloudimageHandler = null, this.resizeObserver = null, this.keyboardHandler = null, this.fullscreenControl = null, this.focusTraps = /* @__PURE__ */ new Map(), this.cleanups = [], this.hotspotCleanups = /* @__PURE__ */ new Map(), this.imageLoaded = !1, this.destroyed = !1, this.scenesMap = /* @__PURE__ */ new Map(), this.isTransitioning = !1, this.activeTimers = /* @__PURE__ */ new Set(), this.sceneHotspotOverrides = /* @__PURE__ */ new Map(), this.preloadedScenes = /* @__PURE__ */ new Set(), this.rootEl = st(t), this.config = X(e), j(this.config), this.config.scenes && this.config.scenes.length > 0 && this.initScenes(), q(), Q(ot), this.buildDOM(), this.applyTheme(), this.setupImage(), this.initHotspots(), this.config.zoom && this.initZoom(), this.initKeyboard(), this.initFullscreen(), this.setupResponsive();
|
|
887
905
|
}
|
|
@@ -892,7 +910,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
892
910
|
), o = [];
|
|
893
911
|
return i.forEach((r) => {
|
|
894
912
|
const s = ct(r);
|
|
895
|
-
(s.src || s.scenes) && o.push(new
|
|
913
|
+
(s.src || s.scenes) && o.push(new L(r, s));
|
|
896
914
|
}), o;
|
|
897
915
|
}
|
|
898
916
|
buildDOM() {
|
|
@@ -900,18 +918,20 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
900
918
|
alt: this.config.alt || "",
|
|
901
919
|
draggable: "false"
|
|
902
920
|
}), this.markersEl = h("div", "ci-hotspot-markers"), this.viewportEl.appendChild(this.imgEl), this.viewportEl.appendChild(this.markersEl), this.containerEl.appendChild(this.viewportEl), this.containerEl.setAttribute("role", "group"), this.containerEl.setAttribute("aria-label", this.config.alt || "Image with hotspots"), this.config.sceneAspectRatio) {
|
|
903
|
-
|
|
921
|
+
m(this.containerEl, "ci-hotspot-container--fixed-ratio");
|
|
904
922
|
const t = this.config.sceneAspectRatio.split(/[:/\s]+/).map(Number);
|
|
905
923
|
t.length >= 2 && t[0] > 0 && t[1] > 0 && (this.viewportEl.style.paddingBottom = `${t[1] / t[0] * 100}%`);
|
|
906
924
|
}
|
|
907
|
-
this.rootEl.innerHTML = "", this.rootEl.appendChild(this.containerEl), this.config.lazyLoad &&
|
|
925
|
+
this.rootEl.innerHTML = "", this.rootEl.appendChild(this.containerEl), this.config.lazyLoad && m(this.containerEl, "ci-hotspot-loading");
|
|
908
926
|
}
|
|
909
927
|
applyTheme() {
|
|
910
|
-
this.config.theme === "dark"
|
|
928
|
+
this.config.theme === "dark" ? m(this.containerEl, "ci-hotspot-theme-dark") : b(this.containerEl, "ci-hotspot-theme-dark");
|
|
929
|
+
const t = this.config.markerTheme && this.config.markerTheme !== "default" ? this.config.markerTheme : this.config.invertMarkerTheme ? "inverted" : "default";
|
|
930
|
+
b(this.containerEl, "ci-hotspot-marker-inverted"), b(this.containerEl, "ci-hotspot-marker-brand"), this.containerEl.style.removeProperty("--ci-hotspot-brand-color"), t === "inverted" ? m(this.containerEl, "ci-hotspot-marker-inverted") : t === "brand" && (m(this.containerEl, "ci-hotspot-marker-brand"), this.config.brandColor && this.containerEl.style.setProperty("--ci-hotspot-brand-color", this.config.brandColor));
|
|
911
931
|
}
|
|
912
932
|
setupImage() {
|
|
913
933
|
const t = () => {
|
|
914
|
-
|
|
934
|
+
b(this.containerEl, "ci-hotspot-loading"), this.imageLoaded = !0, this.renormalizePixelCoordinates(), this.syncMarkersToImage(), this.showLoadTriggerPopovers();
|
|
915
935
|
};
|
|
916
936
|
if (this.imgEl.addEventListener("load", t), this.cleanups.push(() => this.imgEl.removeEventListener("load", t)), this.config.lazyLoad && typeof IntersectionObserver < "u") {
|
|
917
937
|
const e = new IntersectionObserver(
|
|
@@ -929,7 +949,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
929
949
|
var t, e;
|
|
930
950
|
if ((t = this.config.cloudimage) != null && t.token) {
|
|
931
951
|
const i = this.containerEl.offsetWidth || 300, o = window.devicePixelRatio || 1, r = ((e = this.zoomPan) == null ? void 0 : e.getZoom()) || 1;
|
|
932
|
-
this.imgEl.src =
|
|
952
|
+
this.imgEl.src = H(
|
|
933
953
|
this.config.src,
|
|
934
954
|
this.config.cloudimage,
|
|
935
955
|
i,
|
|
@@ -958,11 +978,11 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
958
978
|
var d, u;
|
|
959
979
|
if (this.markers.has(t.id)) {
|
|
960
980
|
const p = this.markers.get(t.id);
|
|
961
|
-
|
|
981
|
+
A(p), this.markers.delete(t.id), (d = this.popovers.get(t.id)) == null || d.destroy(), this.popovers.delete(t.id);
|
|
962
982
|
const g = this.hotspotCleanups.get(t.id);
|
|
963
983
|
g && (g.forEach((k) => k()), this.hotspotCleanups.delete(t.id));
|
|
964
|
-
const
|
|
965
|
-
|
|
984
|
+
const y = this.focusTraps.get(t.id);
|
|
985
|
+
y && (y.destroy(), this.focusTraps.delete(t.id));
|
|
966
986
|
}
|
|
967
987
|
const { x: e, y: i } = V(
|
|
968
988
|
t.x,
|
|
@@ -977,12 +997,13 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
977
997
|
if (t.navigateTo) {
|
|
978
998
|
const p = this.enrichNavigateHotspot(t);
|
|
979
999
|
if (!!(p.data || p.content || this.config.renderPopover)) {
|
|
980
|
-
const
|
|
981
|
-
placement:
|
|
1000
|
+
const y = t.placement || this.config.placement || "top", k = new W(p, {
|
|
1001
|
+
placement: y,
|
|
982
1002
|
triggerMode: "hover",
|
|
983
1003
|
renderFn: this.config.renderPopover,
|
|
984
1004
|
onOpen: this.config.onOpen,
|
|
985
|
-
onClose: this.config.onClose
|
|
1005
|
+
onClose: this.config.onClose,
|
|
1006
|
+
onProductClick: this.config.onProductClick
|
|
986
1007
|
});
|
|
987
1008
|
this.popovers.set(t.id, k), k.mount(this.containerEl, s), this.bindNavigateTrigger(t, s, k);
|
|
988
1009
|
} else
|
|
@@ -994,9 +1015,10 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
994
1015
|
triggerMode: n,
|
|
995
1016
|
renderFn: this.config.renderPopover,
|
|
996
1017
|
onOpen: this.config.onOpen,
|
|
997
|
-
onClose: this.config.onClose
|
|
1018
|
+
onClose: this.config.onClose,
|
|
1019
|
+
onProductClick: this.config.onProductClick
|
|
998
1020
|
});
|
|
999
|
-
this.popovers.set(t.id, l), l.mount(this.containerEl, s), this.bindTrigger(t, s, l, n), n === "load" && this.imageLoaded && (this.closeAll(), l.show(),
|
|
1021
|
+
this.popovers.set(t.id, l), l.mount(this.containerEl, s), this.bindTrigger(t, s, l, n), n === "load" && this.imageLoaded && (this.closeAll(), l.show(), v(s, !0), this.ensureFocusTrap(t.id, l.element, s), (u = this.focusTraps.get(t.id)) == null || u.activate());
|
|
1000
1022
|
}
|
|
1001
1023
|
/** For navigateTo hotspots without explicit data/content, generate popover content from the destination scene */
|
|
1002
1024
|
enrichNavigateHotspot(t) {
|
|
@@ -1008,24 +1030,24 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1008
1030
|
} : t;
|
|
1009
1031
|
}
|
|
1010
1032
|
bindNavigateTrigger(t, e, i) {
|
|
1011
|
-
if (
|
|
1033
|
+
if (m(e, "ci-hotspot-marker--navigate"), e.innerHTML = L.NAVIGATE_ARROW_SVG, t.arrowDirection != null) {
|
|
1012
1034
|
const n = e.querySelector("svg");
|
|
1013
1035
|
n && (n.style.transform = `rotate(${t.arrowDirection}deg)`);
|
|
1014
1036
|
}
|
|
1015
1037
|
const o = t.label || t.navigateTo;
|
|
1016
1038
|
if (e.setAttribute("aria-label", `Navigate to ${o}`), e.setAttribute("aria-roledescription", "navigation hotspot"), i) {
|
|
1017
1039
|
const n = f(e, "mouseenter", () => {
|
|
1018
|
-
this.preloadSceneImage(t.navigateTo), i.clearHideTimer(), i.show(),
|
|
1040
|
+
this.preloadSceneImage(t.navigateTo), i.clearHideTimer(), i.show(), v(e, !0);
|
|
1019
1041
|
}), c = () => {
|
|
1020
1042
|
this.trackedTimeout(() => {
|
|
1021
|
-
i.isVisible() ||
|
|
1043
|
+
i.isVisible() || v(e, !1);
|
|
1022
1044
|
}, 250);
|
|
1023
1045
|
}, l = f(e, "mouseleave", () => {
|
|
1024
1046
|
i.scheduleHide(200), c();
|
|
1025
1047
|
}), d = f(i.element, "mouseleave", () => {
|
|
1026
1048
|
c();
|
|
1027
1049
|
}), u = f(e, "focus", () => {
|
|
1028
|
-
this.preloadSceneImage(t.navigateTo), i.clearHideTimer(), i.show(),
|
|
1050
|
+
this.preloadSceneImage(t.navigateTo), i.clearHideTimer(), i.show(), v(e, !0);
|
|
1029
1051
|
}), p = f(e, "blur", () => {
|
|
1030
1052
|
i.scheduleHide(200), c();
|
|
1031
1053
|
});
|
|
@@ -1040,10 +1062,10 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1040
1062
|
}
|
|
1041
1063
|
const r = f(e, "click", (n) => {
|
|
1042
1064
|
var c, l, d;
|
|
1043
|
-
n.stopPropagation(), i == null || i.hide(),
|
|
1065
|
+
n.stopPropagation(), i == null || i.hide(), v(e, !1), (l = (c = this.config).onClick) == null || l.call(c, n, t), (d = t.onClick) == null || d.call(t, n, t), this.goToScene(t.navigateTo);
|
|
1044
1066
|
}), s = f(e, "keydown", (n) => {
|
|
1045
1067
|
var c, l, d;
|
|
1046
|
-
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), i == null || i.hide(),
|
|
1068
|
+
(n.key === "Enter" || n.key === " ") && (n.preventDefault(), i == null || i.hide(), v(e, !1), (l = (c = this.config).onClick) == null || l.call(c, n, t), (d = t.onClick) == null || d.call(t, n, t), this.goToScene(t.navigateTo));
|
|
1047
1069
|
});
|
|
1048
1070
|
this.addHotspotCleanups(t.id, r, s);
|
|
1049
1071
|
}
|
|
@@ -1052,10 +1074,10 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1052
1074
|
}
|
|
1053
1075
|
bindHoverTrigger(t, e, i) {
|
|
1054
1076
|
const o = f(e, "mouseenter", () => {
|
|
1055
|
-
i.clearHideTimer(), i.show(),
|
|
1077
|
+
i.clearHideTimer(), i.show(), v(e, !0);
|
|
1056
1078
|
}), r = () => {
|
|
1057
1079
|
this.trackedTimeout(() => {
|
|
1058
|
-
i.isVisible() ||
|
|
1080
|
+
i.isVisible() || v(e, !1);
|
|
1059
1081
|
}, 250);
|
|
1060
1082
|
}, s = f(e, "mouseleave", () => {
|
|
1061
1083
|
i.scheduleHide(200), r();
|
|
@@ -1069,22 +1091,22 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1069
1091
|
this.focusTraps.set(t.id, o);
|
|
1070
1092
|
const r = f(e, "click", (n) => {
|
|
1071
1093
|
var c, l, d;
|
|
1072
|
-
n.stopPropagation(), (l = (c = this.config).onClick) == null || l.call(c, n, t), (d = t.onClick) == null || d.call(t, n, t), i.isVisible() ? (i.hide(),
|
|
1094
|
+
n.stopPropagation(), (l = (c = this.config).onClick) == null || l.call(c, n, t), (d = t.onClick) == null || d.call(t, n, t), i.isVisible() ? (i.hide(), v(e, !1), o.deactivate()) : (this.closeAll(), i.show(), v(e, !0), o.activate());
|
|
1073
1095
|
}), s = f(this.containerEl, "click", (n) => {
|
|
1074
|
-
i.isVisible() && !t.keepOpen && !i.element.contains(n.target) && !e.contains(n.target) && (i.hide(),
|
|
1096
|
+
i.isVisible() && !t.keepOpen && !i.element.contains(n.target) && !e.contains(n.target) && (i.hide(), v(e, !1), o.deactivate());
|
|
1075
1097
|
});
|
|
1076
1098
|
this.addHotspotCleanups(t.id, r, s);
|
|
1077
1099
|
}
|
|
1078
1100
|
bindKeyboardTrigger(t, e, i, o) {
|
|
1079
1101
|
const r = f(e, "focus", () => {
|
|
1080
|
-
o === "hover" && (i.clearHideTimer(), i.show(),
|
|
1102
|
+
o === "hover" && (i.clearHideTimer(), i.show(), v(e, !0));
|
|
1081
1103
|
}), s = f(e, "blur", () => {
|
|
1082
1104
|
o === "hover" && (i.scheduleHide(200), this.trackedTimeout(() => {
|
|
1083
|
-
i.isVisible() ||
|
|
1105
|
+
i.isVisible() || v(e, !1);
|
|
1084
1106
|
}, 250));
|
|
1085
1107
|
}), n = f(e, "keydown", (c) => {
|
|
1086
1108
|
var l, d, u, p, g;
|
|
1087
|
-
c.key === "Enter" || c.key === " " ? (c.preventDefault(), (d = (l = this.config).onClick) == null || d.call(l, c, t), i.isVisible() ? (i.hide(),
|
|
1109
|
+
c.key === "Enter" || c.key === " " ? (c.preventDefault(), (d = (l = this.config).onClick) == null || d.call(l, c, t), i.isVisible() ? (i.hide(), v(e, !1), (u = this.focusTraps.get(t.id)) == null || u.deactivate()) : (this.closeAll(), i.show(), v(e, !0), this.ensureFocusTrap(t.id, i.element, e), (p = this.focusTraps.get(t.id)) == null || p.activate())) : c.key === "Escape" && i.isVisible() && (i.hide(), v(e, !1), (g = this.focusTraps.get(t.id)) == null || g.deactivate(), e.focus());
|
|
1088
1110
|
});
|
|
1089
1111
|
this.addHotspotCleanups(t.id, r, s, n);
|
|
1090
1112
|
}
|
|
@@ -1107,7 +1129,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1107
1129
|
if (((o == null ? void 0 : o.trigger) || this.config.trigger || "hover") === "load" && !i.isVisible()) {
|
|
1108
1130
|
i.show();
|
|
1109
1131
|
const s = this.markers.get(e);
|
|
1110
|
-
s && (
|
|
1132
|
+
s && (v(s, !0), this.ensureFocusTrap(e, i.element, s), (t = this.focusTraps.get(e)) == null || t.activate());
|
|
1111
1133
|
break;
|
|
1112
1134
|
}
|
|
1113
1135
|
}
|
|
@@ -1208,7 +1230,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1208
1230
|
const i = new Image();
|
|
1209
1231
|
if ((o = this.config.cloudimage) != null && o.token) {
|
|
1210
1232
|
const r = this.containerEl.offsetWidth || 300, s = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1211
|
-
i.src =
|
|
1233
|
+
i.src = H(e.src, this.config.cloudimage, r, 1, s);
|
|
1212
1234
|
} else
|
|
1213
1235
|
i.src = e.src;
|
|
1214
1236
|
}
|
|
@@ -1238,7 +1260,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1238
1260
|
t.destroy();
|
|
1239
1261
|
this.popovers.clear();
|
|
1240
1262
|
for (const [, t] of this.markers)
|
|
1241
|
-
|
|
1263
|
+
A(t);
|
|
1242
1264
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1243
1265
|
for (const [, t] of this.focusTraps)
|
|
1244
1266
|
t.destroy();
|
|
@@ -1257,30 +1279,30 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1257
1279
|
return;
|
|
1258
1280
|
}
|
|
1259
1281
|
const r = this.getSceneTransitionDuration();
|
|
1260
|
-
|
|
1282
|
+
m(this.containerEl, "ci-hotspot-scene-transitioning");
|
|
1261
1283
|
const s = h("img", "ci-hotspot-scene-incoming", {
|
|
1262
1284
|
alt: t.alt || "",
|
|
1263
1285
|
draggable: "false"
|
|
1264
1286
|
});
|
|
1265
1287
|
if ((c = this.config.cloudimage) != null && c.token) {
|
|
1266
1288
|
const l = this.containerEl.offsetWidth || 300, d = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1267
|
-
s.src =
|
|
1289
|
+
s.src = H(t.src, this.config.cloudimage, l, 1, d);
|
|
1268
1290
|
} else
|
|
1269
1291
|
s.src = t.src;
|
|
1270
1292
|
const n = () => {
|
|
1271
|
-
this.destroyed || (e === "fade" ? (
|
|
1293
|
+
this.destroyed || (e === "fade" ? (m(s, "ci-hotspot-scene-fade-in"), m(this.imgEl, "ci-hotspot-scene-fade-out")) : e === "slide" && (m(s, `ci-hotspot-scene-slide-in${i}`), m(this.imgEl, `ci-hotspot-scene-slide-out${i}`)), this.viewportEl.insertBefore(s, this.markersEl), this.transitionTimer = setTimeout(() => {
|
|
1272
1294
|
if (this.transitionTimer = void 0, this.destroyed) return;
|
|
1273
1295
|
this.clearHotspots(), this.switchToScene(t);
|
|
1274
1296
|
const l = () => {
|
|
1275
|
-
s.remove(),
|
|
1297
|
+
s.remove(), b(this.imgEl, "ci-hotspot-scene-fade-out"), b(this.imgEl, `ci-hotspot-scene-slide-out${i}`), b(this.containerEl, "ci-hotspot-scene-transitioning"), o();
|
|
1276
1298
|
};
|
|
1277
1299
|
this.imgEl.complete && this.imgEl.naturalWidth > 0 ? l() : (this.imgEl.addEventListener("load", l, { once: !0 }), this.imgEl.addEventListener("error", l, { once: !0 }));
|
|
1278
1300
|
}, r));
|
|
1279
1301
|
};
|
|
1280
|
-
s.complete ? n() : (
|
|
1281
|
-
|
|
1302
|
+
s.complete ? n() : (m(this.containerEl, "ci-hotspot-scene-loading"), s.onload = () => {
|
|
1303
|
+
b(this.containerEl, "ci-hotspot-scene-loading"), n();
|
|
1282
1304
|
}, s.onerror = () => {
|
|
1283
|
-
this.destroyed || (
|
|
1305
|
+
this.destroyed || (b(this.containerEl, "ci-hotspot-scene-loading"), s.remove(), b(this.containerEl, "ci-hotspot-scene-transitioning"), this.clearHotspots(), this.switchToScene(t), o());
|
|
1284
1306
|
});
|
|
1285
1307
|
}
|
|
1286
1308
|
switchToScene(t) {
|
|
@@ -1291,7 +1313,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1291
1313
|
};
|
|
1292
1314
|
if (this.imgEl.addEventListener("load", e, { once: !0 }), (i = this.config.cloudimage) != null && i.token) {
|
|
1293
1315
|
const o = this.containerEl.offsetWidth || 300, r = typeof window < "u" && window.devicePixelRatio || 1;
|
|
1294
|
-
this.imgEl.src =
|
|
1316
|
+
this.imgEl.src = H(t.src, this.config.cloudimage, o, 1, r);
|
|
1295
1317
|
} else
|
|
1296
1318
|
this.imgEl.src = t.src;
|
|
1297
1319
|
this.imgEl.complete && this.imgEl.naturalWidth > 0 && !this.imageLoaded && (this.imgEl.removeEventListener("load", e), e()), this.initHotspots();
|
|
@@ -1310,13 +1332,13 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1310
1332
|
var o;
|
|
1311
1333
|
if (this.destroyed) return;
|
|
1312
1334
|
const e = this.popovers.get(t), i = this.markers.get(t);
|
|
1313
|
-
!e || !i || e.isVisible() || (this.closeAll(), e.show(),
|
|
1335
|
+
!e || !i || e.isVisible() || (this.closeAll(), e.show(), v(i, !0), (o = this.focusTraps.get(t)) == null || o.activate());
|
|
1314
1336
|
}
|
|
1315
1337
|
close(t) {
|
|
1316
1338
|
var o;
|
|
1317
1339
|
if (this.destroyed) return;
|
|
1318
1340
|
const e = this.popovers.get(t), i = this.markers.get(t);
|
|
1319
|
-
e && i && (e.hide(),
|
|
1341
|
+
e && i && (e.hide(), v(i, !1), (o = this.focusTraps.get(t)) == null || o.deactivate());
|
|
1320
1342
|
}
|
|
1321
1343
|
closeAll() {
|
|
1322
1344
|
var t;
|
|
@@ -1325,7 +1347,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1325
1347
|
if (i.isVisible()) {
|
|
1326
1348
|
i.hide();
|
|
1327
1349
|
const o = this.markers.get(e);
|
|
1328
|
-
o &&
|
|
1350
|
+
o && v(o, !1), (t = this.focusTraps.get(e)) == null || t.deactivate();
|
|
1329
1351
|
}
|
|
1330
1352
|
}
|
|
1331
1353
|
}
|
|
@@ -1399,7 +1421,7 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1399
1421
|
const i = this.focusTraps.get(t);
|
|
1400
1422
|
i && (i.destroy(), this.focusTraps.delete(t));
|
|
1401
1423
|
const o = this.markers.get(t), r = this.popovers.get(t);
|
|
1402
|
-
r && (r.destroy(), this.popovers.delete(t)), o && (
|
|
1424
|
+
r && (r.destroy(), this.popovers.delete(t)), o && (A(o), this.markers.delete(t)), this.normalizedHotspots.delete(t), this.config.hotspots = this.config.hotspots.filter((s) => s.id !== t), this.syncCurrentSceneHotspots();
|
|
1403
1425
|
}
|
|
1404
1426
|
updateHotspot(t, e) {
|
|
1405
1427
|
if (this.destroyed) return;
|
|
@@ -1428,15 +1450,15 @@ const ot = '.ci-hotspot-container{--ci-hotspot-marker-size: 24px;--ci-hotspot-ma
|
|
|
1428
1450
|
c.destroy();
|
|
1429
1451
|
this.popovers.clear();
|
|
1430
1452
|
for (const [, c] of this.markers)
|
|
1431
|
-
|
|
1453
|
+
A(c);
|
|
1432
1454
|
this.markers.clear(), this.normalizedHotspots.clear();
|
|
1433
1455
|
for (const [, c] of this.focusTraps)
|
|
1434
1456
|
c.destroy();
|
|
1435
1457
|
this.focusTraps.clear(), this.scenesMap.clear(), this.preloadedScenes.clear(), this.sceneHotspotOverrides.clear(), this.currentSceneId = void 0, this.isTransitioning = !1, this.transitionTimer !== void 0 && (clearTimeout(this.transitionTimer), this.transitionTimer = void 0), (t = this.fullscreenControl) == null || t.destroy(), this.fullscreenControl = null, (e = this.keyboardHandler) == null || e.destroy(), this.keyboardHandler = null, (i = this.zoomPan) == null || i.destroy(), this.zoomPan = null, (o = this.zoomControls) == null || o.destroy(), this.zoomControls = null, (r = this.scrollHint) == null || r.destroy(), this.scrollHint = null, (s = this.cloudimageHandler) == null || s.destroy(), this.cloudimageHandler = null, (n = this.resizeObserver) == null || n.disconnect(), this.resizeObserver = null, Nt();
|
|
1436
1458
|
}
|
|
1437
1459
|
};
|
|
1438
|
-
|
|
1439
|
-
let O =
|
|
1460
|
+
L.NAVIGATE_ARROW_SVG = '<svg class="ci-hotspot-navigate-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"/></svg>';
|
|
1461
|
+
let O = L;
|
|
1440
1462
|
const C = {
|
|
1441
1463
|
cursor: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12.586 12.586 19 19"/><path d="M3.688 3.037a.497.497 0 0 0-.651.651l6.5 15.999a.501.501 0 0 0 .947-.062l1.569-6.083a2 2 0 0 1 1.448-1.479l6.124-1.579a.5.5 0 0 0 .063-.947z"/></svg>',
|
|
1442
1464
|
plus: '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12h14"/><path d="M12 5v14"/></svg>',
|
|
@@ -1762,18 +1784,18 @@ class qt {
|
|
|
1762
1784
|
if (this.rafId = null, !this.markerEl) return;
|
|
1763
1785
|
const g = t.querySelector(".ci-hotspot-image");
|
|
1764
1786
|
if (!g) return;
|
|
1765
|
-
const
|
|
1766
|
-
this.markerEl.style.left = `${
|
|
1787
|
+
const y = g.getBoundingClientRect(), k = (u - y.left) / y.width * 100, x = (p - y.top) / y.height * 100, P = Math.max(0, Math.min(100, k)), w = Math.max(0, Math.min(100, x));
|
|
1788
|
+
this.markerEl.style.left = `${P}%`, this.markerEl.style.top = `${w}%`;
|
|
1767
1789
|
});
|
|
1768
1790
|
}, o = (c) => {
|
|
1769
1791
|
if (this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), !!this.dragId) {
|
|
1770
1792
|
if (this.dragging && this.markerEl) {
|
|
1771
1793
|
const l = t.querySelector(".ci-hotspot-image");
|
|
1772
1794
|
if (l) {
|
|
1773
|
-
const d = l.getBoundingClientRect(), u = (c.clientX - d.left) / d.width * 100, p = (c.clientY - d.top) / d.height * 100, g = Math.max(0, Math.min(100, Math.round(u * 100) / 100)),
|
|
1795
|
+
const d = l.getBoundingClientRect(), u = (c.clientX - d.left) / d.width * 100, p = (c.clientY - d.top) / d.height * 100, g = Math.max(0, Math.min(100, Math.round(u * 100) / 100)), y = Math.max(0, Math.min(100, Math.round(p * 100) / 100));
|
|
1774
1796
|
this.editor.updateHotspot(this.dragId, {
|
|
1775
1797
|
x: `${g}%`,
|
|
1776
|
-
y: `${
|
|
1798
|
+
y: `${y}%`
|
|
1777
1799
|
});
|
|
1778
1800
|
}
|
|
1779
1801
|
}
|