js-cloudimage-360-view 4.9.3 → 4.9.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 +80 -3
- package/dist/js-cloudimage-360-view.min.js +3 -3
- package/dist/react/{ci360-B2r9u7br.js → ci360-ChiRmGMU.js} +3 -3
- package/dist/react/{ci360-B2r9u7br.js.map → ci360-ChiRmGMU.js.map} +1 -1
- package/dist/react/{ci360-BFobl9uu.mjs → ci360-DwDP_e0s.mjs} +212 -209
- package/dist/react/{ci360-BFobl9uu.mjs.map → ci360-DwDP_e0s.mjs.map} +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +1 -1
- package/package.json +1 -1
- package/src/react/types.d.ts +8 -0
- package/src/types/ci360.d.ts +1 -1
|
@@ -9,51 +9,51 @@ var ii = "Expected a function", xe = NaN, Mi = "[object Symbol]", Oi = /^\s+|\s+
|
|
|
9
9
|
return Gi.Date.now();
|
|
10
10
|
};
|
|
11
11
|
function Vi(e, t, i) {
|
|
12
|
-
var o, s, n, r, a, l, c = 0, h = !1, u = !1,
|
|
12
|
+
var o, s, n, r, a, l, c = 0, h = !1, u = !1, f = !0;
|
|
13
13
|
if (typeof e != "function")
|
|
14
14
|
throw new TypeError(ii);
|
|
15
|
-
t = Pe(t) || 0, Kt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ni(Pe(i.maxWait) || 0, t) : n,
|
|
16
|
-
function p(
|
|
17
|
-
var y = o,
|
|
18
|
-
return o = s = void 0, c =
|
|
15
|
+
t = Pe(t) || 0, Kt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ni(Pe(i.maxWait) || 0, t) : n, f = "trailing" in i ? !!i.trailing : f);
|
|
16
|
+
function p(m) {
|
|
17
|
+
var y = o, C = s;
|
|
18
|
+
return o = s = void 0, c = m, r = e.apply(C, y), r;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return c =
|
|
20
|
+
function I(m) {
|
|
21
|
+
return c = m, a = setTimeout(x, t), h ? p(m) : r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
var y =
|
|
25
|
-
return u ? Wi(T, n -
|
|
23
|
+
function g(m) {
|
|
24
|
+
var y = m - l, C = m - c, T = t - y;
|
|
25
|
+
return u ? Wi(T, n - C) : T;
|
|
26
26
|
}
|
|
27
|
-
function b(
|
|
28
|
-
var y =
|
|
29
|
-
return l === void 0 || y >= t || y < 0 || u &&
|
|
27
|
+
function b(m) {
|
|
28
|
+
var y = m - l, C = m - c;
|
|
29
|
+
return l === void 0 || y >= t || y < 0 || u && C >= n;
|
|
30
30
|
}
|
|
31
31
|
function x() {
|
|
32
|
-
var
|
|
33
|
-
if (b(
|
|
34
|
-
return P(
|
|
35
|
-
a = setTimeout(x,
|
|
32
|
+
var m = le();
|
|
33
|
+
if (b(m))
|
|
34
|
+
return P(m);
|
|
35
|
+
a = setTimeout(x, g(m));
|
|
36
36
|
}
|
|
37
|
-
function P(
|
|
38
|
-
return a = void 0,
|
|
37
|
+
function P(m) {
|
|
38
|
+
return a = void 0, f && o ? p(m) : (o = s = void 0, r);
|
|
39
39
|
}
|
|
40
40
|
function w() {
|
|
41
41
|
a !== void 0 && clearTimeout(a), c = 0, o = l = s = a = void 0;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function v() {
|
|
44
44
|
return a === void 0 ? r : P(le());
|
|
45
45
|
}
|
|
46
46
|
function E() {
|
|
47
|
-
var
|
|
48
|
-
if (o = arguments, s = this, l =
|
|
47
|
+
var m = le(), y = b(m);
|
|
48
|
+
if (o = arguments, s = this, l = m, y) {
|
|
49
49
|
if (a === void 0)
|
|
50
|
-
return
|
|
50
|
+
return I(l);
|
|
51
51
|
if (u)
|
|
52
52
|
return a = setTimeout(x, t), p(l);
|
|
53
53
|
}
|
|
54
54
|
return a === void 0 && (a = setTimeout(x, t)), r;
|
|
55
55
|
}
|
|
56
|
-
return E.cancel = w, E.flush =
|
|
56
|
+
return E.cancel = w, E.flush = v, E;
|
|
57
57
|
}
|
|
58
58
|
function ji(e, t, i) {
|
|
59
59
|
var o = !0, s = !0;
|
|
@@ -340,15 +340,15 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
340
340
|
if (!r || !t) {
|
|
341
341
|
const w = ke(c, h);
|
|
342
342
|
if (!w) return u;
|
|
343
|
-
const
|
|
344
|
-
return `${u}${
|
|
343
|
+
const v = u.includes("?") ? "&" : "?";
|
|
344
|
+
return `${u}${v}${w}`;
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const f = qi.includes(o) ? null : o, p = f ? `${f}/` : "", I = ho(t), g = co(u, r, p), b = uo({
|
|
347
347
|
ciTransformation: l,
|
|
348
|
-
responsiveWidth:
|
|
348
|
+
responsiveWidth: I,
|
|
349
349
|
ciFilters: a
|
|
350
350
|
}), x = ke(c, h), P = [b, x].filter(Boolean).join("&");
|
|
351
|
-
return `${
|
|
351
|
+
return `${g}${P ? "?" : ""}${P}`;
|
|
352
352
|
}, qt = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), po = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", qt(s + 1, i))), mo = (e, { amountX: t = 0, amountY: i = 0, indexZeroBase: o = 0 } = {}) => {
|
|
353
353
|
const s = [];
|
|
354
354
|
for (let n = 0; n < i; n++)
|
|
@@ -367,13 +367,13 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
367
367
|
}) => {
|
|
368
368
|
let r = 0, a = 0;
|
|
369
369
|
const l = e.length, c = [], h = [];
|
|
370
|
-
let u = 0,
|
|
371
|
-
const p = [],
|
|
370
|
+
let u = 0, f = 0;
|
|
371
|
+
const p = [], I = (m, y, C = !1) => {
|
|
372
372
|
const T = {
|
|
373
|
-
message: `Failed to load image: ${
|
|
374
|
-
url:
|
|
373
|
+
message: `Failed to load image: ${m}`,
|
|
374
|
+
url: m,
|
|
375
375
|
index: y,
|
|
376
|
-
isFirstImage:
|
|
376
|
+
isFirstImage: C
|
|
377
377
|
};
|
|
378
378
|
h.push(T), a++, s == null || s({
|
|
379
379
|
error: T,
|
|
@@ -381,50 +381,50 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
381
381
|
totalImages: l,
|
|
382
382
|
errors: h
|
|
383
383
|
});
|
|
384
|
-
},
|
|
384
|
+
}, g = () => {
|
|
385
385
|
r === l && (o == null || o(c, { errorCount: a, errors: h }));
|
|
386
386
|
}, b = () => {
|
|
387
|
-
for (; u < go &&
|
|
388
|
-
const
|
|
389
|
-
|
|
387
|
+
for (; u < go && f < p.length; ) {
|
|
388
|
+
const m = p[f];
|
|
389
|
+
f++, x(e[m], m);
|
|
390
390
|
}
|
|
391
|
-
}, x = (
|
|
391
|
+
}, x = (m, y) => {
|
|
392
392
|
u++;
|
|
393
|
-
const
|
|
394
|
-
|
|
393
|
+
const C = new Image();
|
|
394
|
+
C.crossOrigin = "anonymous", C.src = m, C.onload = async () => {
|
|
395
395
|
try {
|
|
396
|
-
const T = await createImageBitmap(
|
|
397
|
-
src:
|
|
396
|
+
const T = await createImageBitmap(C), k = {
|
|
397
|
+
src: m,
|
|
398
398
|
bitmapImage: T,
|
|
399
|
-
naturalWidth:
|
|
400
|
-
naturalHeight:
|
|
399
|
+
naturalWidth: C.naturalWidth,
|
|
400
|
+
naturalHeight: C.naturalHeight
|
|
401
401
|
};
|
|
402
|
-
|
|
402
|
+
C.onload = null, C.onerror = null, C.src = "", r++, u--, c[y] = k, i == null || i(k, y), g(), b();
|
|
403
403
|
} catch {
|
|
404
|
-
|
|
404
|
+
C.onload = null, C.onerror = null, C.src = "", r++, u--, I(m, y), g(), b();
|
|
405
405
|
}
|
|
406
|
-
},
|
|
407
|
-
|
|
406
|
+
}, C.onerror = () => {
|
|
407
|
+
C.onload = null, C.onerror = null, C.src = "", r++, u--, I(m, y), g(), b();
|
|
408
408
|
};
|
|
409
|
-
}, P = (
|
|
409
|
+
}, P = (m) => {
|
|
410
410
|
for (let y = 0; y < e.length; y++)
|
|
411
|
-
y !==
|
|
412
|
-
|
|
413
|
-
}, w = new Image(),
|
|
411
|
+
y !== m && p.push(y);
|
|
412
|
+
f = 0, b();
|
|
413
|
+
}, w = new Image(), v = n ? e.length - 1 : 0, E = e[v];
|
|
414
414
|
w.crossOrigin = "anonymous", w.src = E, w.onload = async () => {
|
|
415
415
|
try {
|
|
416
|
-
const
|
|
416
|
+
const m = await createImageBitmap(w), y = {
|
|
417
417
|
src: E,
|
|
418
|
-
bitmapImage:
|
|
418
|
+
bitmapImage: m,
|
|
419
419
|
naturalWidth: w.naturalWidth,
|
|
420
420
|
naturalHeight: w.naturalHeight
|
|
421
421
|
};
|
|
422
|
-
w.onload = null, w.onerror = null, w.src = "", c[
|
|
422
|
+
w.onload = null, w.onerror = null, w.src = "", c[v] = y, r++, t == null || t(y), i == null || i(y, v), l === 1 ? g() : P(v);
|
|
423
423
|
} catch {
|
|
424
|
-
w.onload = null, w.onerror = null, w.src = "", r++,
|
|
424
|
+
w.onload = null, w.onerror = null, w.src = "", r++, I(E, v, !0), l === 1 ? g() : P(v);
|
|
425
425
|
}
|
|
426
426
|
}, w.onerror = () => {
|
|
427
|
-
w.onload = null, w.onerror = null, w.src = "", r++,
|
|
427
|
+
w.onload = null, w.onerror = null, w.src = "", r++, I(E, v, !0), l === 1 ? g() : P(v);
|
|
428
428
|
};
|
|
429
429
|
}, Xe = ({
|
|
430
430
|
cdnPathX: e,
|
|
@@ -436,30 +436,30 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
436
436
|
onAllImagesLoad: r,
|
|
437
437
|
onError: a
|
|
438
438
|
}) => {
|
|
439
|
-
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] },
|
|
440
|
-
const p = e || i.imageList.length,
|
|
439
|
+
let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, f = { errorCount: 0, errors: [] };
|
|
440
|
+
const p = e || i.imageList.length, I = t || o.imageList.length, g = () => {
|
|
441
441
|
if (l.x && l.y) {
|
|
442
442
|
const x = {
|
|
443
|
-
errorCount: u.errorCount +
|
|
444
|
-
errors: [...u.errors, ...
|
|
443
|
+
errorCount: u.errorCount + f.errorCount,
|
|
444
|
+
errors: [...u.errors, ...f.errors]
|
|
445
445
|
};
|
|
446
446
|
r == null || r(c, h, x);
|
|
447
447
|
}
|
|
448
|
-
}, b = ({ cdnPath: x, config: P, orientation: w, loadedImages:
|
|
449
|
-
const y = w === L.X,
|
|
448
|
+
}, b = ({ cdnPath: x, config: P, orientation: w, loadedImages: v, loadStats: E, onFirstImageLoad: m }) => {
|
|
449
|
+
const y = w === L.X, C = P.imageList.length ? P.imageList : po(x, P);
|
|
450
450
|
oi({
|
|
451
|
-
imagesUrls:
|
|
452
|
-
onFirstImageLoad:
|
|
451
|
+
imagesUrls: C,
|
|
452
|
+
onFirstImageLoad: m,
|
|
453
453
|
onImageLoad: (T, k) => {
|
|
454
|
-
n == null || n(T, k, w),
|
|
454
|
+
n == null || n(T, k, w), v[k] = T;
|
|
455
455
|
},
|
|
456
456
|
onError: (T) => {
|
|
457
457
|
a == null || a({ ...T, orientation: w });
|
|
458
458
|
},
|
|
459
459
|
onAllImagesLoad: (T, k) => {
|
|
460
|
-
|
|
461
|
-
X && (
|
|
462
|
-
}), E.errorCount = k.errorCount, E.errors = k.errors.map((X) => ({ ...X, orientation: w })), l[y ? "x" : "y"] = !0,
|
|
460
|
+
v.length = 0, T.forEach((X, O) => {
|
|
461
|
+
X && (v[O] = X);
|
|
462
|
+
}), E.errorCount = k.errorCount, E.errors = k.errors.map((X) => ({ ...X, orientation: w })), l[y ? "x" : "y"] = !0, g();
|
|
463
463
|
},
|
|
464
464
|
autoplayReverse: P.autoplayReverse
|
|
465
465
|
});
|
|
@@ -471,14 +471,14 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
471
471
|
loadedImages: c,
|
|
472
472
|
loadStats: u,
|
|
473
473
|
onFirstImageLoad: s
|
|
474
|
-
}) : l.x = !0,
|
|
474
|
+
}) : l.x = !0, I ? b({
|
|
475
475
|
cdnPath: t,
|
|
476
476
|
config: o,
|
|
477
477
|
orientation: L.Y,
|
|
478
478
|
loadedImages: h,
|
|
479
|
-
loadStats:
|
|
479
|
+
loadStats: f,
|
|
480
480
|
onFirstImageLoad: p ? void 0 : s
|
|
481
|
-
}) : l.y = !0, !p && !
|
|
481
|
+
}) : l.y = !0, !p && !I && g();
|
|
482
482
|
}, Se = ({
|
|
483
483
|
cdnPath: e,
|
|
484
484
|
config: t,
|
|
@@ -752,9 +752,9 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
752
752
|
filter: blur(10px);
|
|
753
753
|
`, o;
|
|
754
754
|
}, he = (e, t, i) => {
|
|
755
|
-
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Vo(e, t), l = _o(a), c = Re(l, n, "cloudimage-lazy"), h = Re(l, !1, "cloudimage-360-placeholder"), u = (
|
|
755
|
+
const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Vo(e, t), l = _o(a), c = Re(l, n, "cloudimage-lazy"), h = Re(l, !1, "cloudimage-360-placeholder"), u = (f) => {
|
|
756
756
|
ue(o, ".cloudimage-lazy"), i && i({
|
|
757
|
-
event:
|
|
757
|
+
event: f,
|
|
758
758
|
width: c.width,
|
|
759
759
|
height: c.height,
|
|
760
760
|
naturalWidth: c.naturalWidth,
|
|
@@ -777,8 +777,8 @@ const Ee = /* @__PURE__ */ Li(Ki), Y = {
|
|
|
777
777
|
}) => {
|
|
778
778
|
const { naturalWidth: a, naturalHeight: l } = i;
|
|
779
779
|
let c = e / n * a - o / 2, h = t / r * l - s / 2;
|
|
780
|
-
const u = Math.max(0, a - o),
|
|
781
|
-
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h,
|
|
780
|
+
const u = Math.max(0, a - o), f = Math.max(0, l - s);
|
|
781
|
+
return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, f)), { zoomOffsetX: c, zoomOffsetY: h };
|
|
782
782
|
}, ze = (e, { bottom: t, top: i }) => {
|
|
783
783
|
e ? t() : i();
|
|
784
784
|
}, Ze = (e, { left: t, right: i }) => {
|
|
@@ -1185,7 +1185,7 @@ class us {
|
|
|
1185
1185
|
if (!this.canvas || !this.ctx || !n) return;
|
|
1186
1186
|
let r, a;
|
|
1187
1187
|
if (this.wideImage ? (r = 0, a = (this.canvas.height / this.dpr - this.drawHeight) / 2) : (r = (this.canvas.width / this.dpr - this.drawWidth) / 2, a = 0), this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height), i !== 1) {
|
|
1188
|
-
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = jo(l, c, i), { zoomOffsetX:
|
|
1188
|
+
const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = jo(l, c, i), { zoomOffsetX: f, zoomOffsetY: p } = Uo({
|
|
1189
1189
|
pointerX: o,
|
|
1190
1190
|
pointerY: s,
|
|
1191
1191
|
imageData: t,
|
|
@@ -1196,7 +1196,7 @@ class us {
|
|
|
1196
1196
|
});
|
|
1197
1197
|
this.ctx.drawImage(
|
|
1198
1198
|
n,
|
|
1199
|
-
|
|
1199
|
+
f,
|
|
1200
1200
|
p,
|
|
1201
1201
|
h,
|
|
1202
1202
|
u,
|
|
@@ -1409,15 +1409,15 @@ const ps = /* @__PURE__ */ new Set([
|
|
|
1409
1409
|
let a = e, l = t, c = 0, h = 0;
|
|
1410
1410
|
const u = e / t;
|
|
1411
1411
|
o > u ? (l = e / o, h = (t - l) / 2) : (a = t * o, c = (e - a) / 2);
|
|
1412
|
-
const p = a / n,
|
|
1413
|
-
return s.map((
|
|
1412
|
+
const p = a / n, I = l / r;
|
|
1413
|
+
return s.map((g) => {
|
|
1414
1414
|
const b = {};
|
|
1415
|
-
return Object.entries(
|
|
1415
|
+
return Object.entries(g.initialPositions).forEach(([x, P]) => {
|
|
1416
1416
|
b[x] = {
|
|
1417
1417
|
x: P.x * p + c,
|
|
1418
|
-
y: P.y *
|
|
1418
|
+
y: P.y * I + h
|
|
1419
1419
|
};
|
|
1420
|
-
}), { ...
|
|
1420
|
+
}), { ...g, positions: b };
|
|
1421
1421
|
});
|
|
1422
1422
|
};
|
|
1423
1423
|
function Ps(e) {
|
|
@@ -1546,13 +1546,13 @@ function yt(e, t, i) {
|
|
|
1546
1546
|
t === void 0 && (t = !1), i === void 0 && (i = !1);
|
|
1547
1547
|
var o = e.getBoundingClientRect(), s = 1, n = 1;
|
|
1548
1548
|
t && G(e) && (s = e.offsetWidth > 0 && vt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && vt(o.height) / e.offsetHeight || 1);
|
|
1549
|
-
var r = ht(e) ? D(e) : window, a = r.visualViewport, l = !hi() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s,
|
|
1549
|
+
var r = ht(e) ? D(e) : window, a = r.visualViewport, l = !hi() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, f = o.height / n;
|
|
1550
1550
|
return {
|
|
1551
1551
|
width: u,
|
|
1552
|
-
height:
|
|
1552
|
+
height: f,
|
|
1553
1553
|
top: h,
|
|
1554
1554
|
right: c + u,
|
|
1555
|
-
bottom: h +
|
|
1555
|
+
bottom: h + f,
|
|
1556
1556
|
left: c,
|
|
1557
1557
|
x: c,
|
|
1558
1558
|
y: h
|
|
@@ -1664,8 +1664,8 @@ var Ns = function(t, i) {
|
|
|
1664
1664
|
function Ws(e) {
|
|
1665
1665
|
var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l = ye(a), c = [z, F].indexOf(a) >= 0, h = c ? "height" : "width";
|
|
1666
1666
|
if (!(!n || !r)) {
|
|
1667
|
-
var u = Ns(s.padding, i),
|
|
1668
|
-
i.modifiersData[o] = (t = {}, t[
|
|
1667
|
+
var u = Ns(s.padding, i), f = ve(n), p = l === "y" ? R : z, I = l === "y" ? _ : F, g = i.rects.reference[h] + i.rects.reference[l] - r[l] - i.rects.popper[h], b = r[l] - i.rects.reference[l], x = Mt(n), P = x ? l === "y" ? x.clientHeight || 0 : x.clientWidth || 0 : 0, w = g / 2 - b / 2, v = u[p], E = P - f[h] - u[I], m = P / 2 - f[h] / 2 + w, y = kt(v, m, E), C = l;
|
|
1668
|
+
i.modifiersData[o] = (t = {}, t[C] = y, t.centerOffset = y - m, t);
|
|
1669
1669
|
}
|
|
1670
1670
|
}
|
|
1671
1671
|
function Vs(e) {
|
|
@@ -1698,30 +1698,30 @@ function $s(e, t) {
|
|
|
1698
1698
|
};
|
|
1699
1699
|
}
|
|
1700
1700
|
function Ve(e) {
|
|
1701
|
-
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed,
|
|
1701
|
+
var t, i = e.popper, o = e.popperRect, s = e.placement, n = e.variation, r = e.offsets, a = e.position, l = e.gpuAcceleration, c = e.adaptive, h = e.roundOffsets, u = e.isFixed, f = r.x, p = f === void 0 ? 0 : f, I = r.y, g = I === void 0 ? 0 : I, b = typeof h == "function" ? h({
|
|
1702
1702
|
x: p,
|
|
1703
|
-
y:
|
|
1703
|
+
y: g
|
|
1704
1704
|
}) : {
|
|
1705
1705
|
x: p,
|
|
1706
|
-
y:
|
|
1706
|
+
y: g
|
|
1707
1707
|
};
|
|
1708
|
-
p = b.x,
|
|
1709
|
-
var x = r.hasOwnProperty("x"), P = r.hasOwnProperty("y"), w = z,
|
|
1708
|
+
p = b.x, g = b.y;
|
|
1709
|
+
var x = r.hasOwnProperty("x"), P = r.hasOwnProperty("y"), w = z, v = R, E = window;
|
|
1710
1710
|
if (c) {
|
|
1711
|
-
var
|
|
1712
|
-
if (
|
|
1713
|
-
|
|
1714
|
-
var T = u &&
|
|
1711
|
+
var m = Mt(i), y = "clientHeight", C = "clientWidth";
|
|
1712
|
+
if (m === D(i) && (m = ot(i), tt(m).position !== "static" && a === "absolute" && (y = "scrollHeight", C = "scrollWidth")), m = m, s === R || (s === z || s === F) && n === St) {
|
|
1713
|
+
v = _;
|
|
1714
|
+
var T = u && m === E && E.visualViewport ? E.visualViewport.height : (
|
|
1715
1715
|
// $FlowFixMe[prop-missing]
|
|
1716
|
-
|
|
1716
|
+
m[y]
|
|
1717
1717
|
);
|
|
1718
|
-
|
|
1718
|
+
g -= T - o.height, g *= l ? 1 : -1;
|
|
1719
1719
|
}
|
|
1720
1720
|
if (s === z || (s === R || s === _) && n === St) {
|
|
1721
1721
|
w = F;
|
|
1722
|
-
var k = u &&
|
|
1722
|
+
var k = u && m === E && E.visualViewport ? E.visualViewport.width : (
|
|
1723
1723
|
// $FlowFixMe[prop-missing]
|
|
1724
|
-
|
|
1724
|
+
m[C]
|
|
1725
1725
|
);
|
|
1726
1726
|
p -= k - o.width, p *= l ? 1 : -1;
|
|
1727
1727
|
}
|
|
@@ -1730,16 +1730,16 @@ function Ve(e) {
|
|
|
1730
1730
|
position: a
|
|
1731
1731
|
}, c && Us), O = h === !0 ? $s({
|
|
1732
1732
|
x: p,
|
|
1733
|
-
y:
|
|
1733
|
+
y: g
|
|
1734
1734
|
}, D(i)) : {
|
|
1735
1735
|
x: p,
|
|
1736
|
-
y:
|
|
1736
|
+
y: g
|
|
1737
1737
|
};
|
|
1738
|
-
if (p = O.x,
|
|
1738
|
+
if (p = O.x, g = O.y, l) {
|
|
1739
1739
|
var M;
|
|
1740
|
-
return Object.assign({}, X, (M = {}, M[
|
|
1740
|
+
return Object.assign({}, X, (M = {}, M[v] = P ? "0" : "", M[w] = x ? "0" : "", M.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + g + "px)" : "translate3d(" + p + "px, " + g + "px, 0)", M));
|
|
1741
1741
|
}
|
|
1742
|
-
return Object.assign({}, X, (t = {}, t[
|
|
1742
|
+
return Object.assign({}, X, (t = {}, t[v] = P ? g + "px" : "", t[w] = x ? p + "px" : "", t.transform = "", t));
|
|
1743
1743
|
}
|
|
1744
1744
|
function Ks(e) {
|
|
1745
1745
|
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, a = i.roundOffsets, l = a === void 0 ? !0 : a, c = {
|
|
@@ -1939,17 +1939,17 @@ function fi(e) {
|
|
|
1939
1939
|
}
|
|
1940
1940
|
function Yt(e, t) {
|
|
1941
1941
|
t === void 0 && (t = {});
|
|
1942
|
-
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext,
|
|
1943
|
-
reference:
|
|
1942
|
+
var i = t, o = i.placement, s = o === void 0 ? e.placement : o, n = i.strategy, r = n === void 0 ? e.strategy : n, a = i.boundary, l = a === void 0 ? Ts : a, c = i.rootBoundary, h = c === void 0 ? ai : c, u = i.elementContext, f = u === void 0 ? At : u, p = i.altBoundary, I = p === void 0 ? !1 : p, g = i.padding, b = g === void 0 ? 0 : g, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = f === At ? As : At, w = e.rects.popper, v = e.elements[I ? P : f], E = an(ht(v) ? v : v.contextElement || ot(e.elements.popper), l, h, r), m = yt(e.elements.reference), y = fi({
|
|
1943
|
+
reference: m,
|
|
1944
1944
|
element: w,
|
|
1945
1945
|
placement: s
|
|
1946
|
-
}),
|
|
1946
|
+
}), C = me(Object.assign({}, w, y)), T = f === At ? C : m, k = {
|
|
1947
1947
|
top: E.top - T.top + x.top,
|
|
1948
1948
|
bottom: T.bottom - E.bottom + x.bottom,
|
|
1949
1949
|
left: E.left - T.left + x.left,
|
|
1950
1950
|
right: T.right - E.right + x.right
|
|
1951
1951
|
}, X = e.modifiersData.offset;
|
|
1952
|
-
if (
|
|
1952
|
+
if (f === At && X) {
|
|
1953
1953
|
var O = X[s];
|
|
1954
1954
|
Object.keys(k).forEach(function(M) {
|
|
1955
1955
|
var U = [F, _].indexOf(M) >= 0 ? 1 : -1, $ = [R, _].indexOf(M) >= 0 ? "y" : "x";
|
|
@@ -1960,22 +1960,22 @@ function Yt(e, t) {
|
|
|
1960
1960
|
}
|
|
1961
1961
|
function ln(e, t) {
|
|
1962
1962
|
t === void 0 && (t = {});
|
|
1963
|
-
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = bt(o), u = h ? a ? Ne : Ne.filter(function(
|
|
1964
|
-
return bt(
|
|
1965
|
-
}) : Lt,
|
|
1966
|
-
return c.indexOf(
|
|
1963
|
+
var i = t, o = i.placement, s = i.boundary, n = i.rootBoundary, r = i.padding, a = i.flipVariations, l = i.allowedAutoPlacements, c = l === void 0 ? li : l, h = bt(o), u = h ? a ? Ne : Ne.filter(function(I) {
|
|
1964
|
+
return bt(I) === h;
|
|
1965
|
+
}) : Lt, f = u.filter(function(I) {
|
|
1966
|
+
return c.indexOf(I) >= 0;
|
|
1967
1967
|
});
|
|
1968
|
-
|
|
1969
|
-
var p =
|
|
1970
|
-
return
|
|
1971
|
-
placement:
|
|
1968
|
+
f.length === 0 && (f = u);
|
|
1969
|
+
var p = f.reduce(function(I, g) {
|
|
1970
|
+
return I[g] = Yt(e, {
|
|
1971
|
+
placement: g,
|
|
1972
1972
|
boundary: s,
|
|
1973
1973
|
rootBoundary: n,
|
|
1974
1974
|
padding: r
|
|
1975
|
-
})[V(
|
|
1975
|
+
})[V(g)], I;
|
|
1976
1976
|
}, {});
|
|
1977
|
-
return Object.keys(p).sort(function(
|
|
1978
|
-
return p[
|
|
1977
|
+
return Object.keys(p).sort(function(I, g) {
|
|
1978
|
+
return p[I] - p[g];
|
|
1979
1979
|
});
|
|
1980
1980
|
}
|
|
1981
1981
|
function hn(e) {
|
|
@@ -1987,36 +1987,36 @@ function hn(e) {
|
|
|
1987
1987
|
function cn(e) {
|
|
1988
1988
|
var t = e.state, i = e.options, o = e.name;
|
|
1989
1989
|
if (!t.modifiersData[o]._skip) {
|
|
1990
|
-
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary,
|
|
1990
|
+
for (var s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !0 : r, l = i.fallbackPlacements, c = i.padding, h = i.boundary, u = i.rootBoundary, f = i.altBoundary, p = i.flipVariations, I = p === void 0 ? !0 : p, g = i.allowedAutoPlacements, b = t.options.placement, x = V(b), P = x === b, w = l || (P || !I ? [$t(b)] : hn(b)), v = [b].concat(w).reduce(function(it, W) {
|
|
1991
1991
|
return it.concat(V(W) === fe ? ln(t, {
|
|
1992
1992
|
placement: W,
|
|
1993
1993
|
boundary: h,
|
|
1994
1994
|
rootBoundary: u,
|
|
1995
1995
|
padding: c,
|
|
1996
|
-
flipVariations:
|
|
1997
|
-
allowedAutoPlacements:
|
|
1996
|
+
flipVariations: I,
|
|
1997
|
+
allowedAutoPlacements: g
|
|
1998
1998
|
}) : W);
|
|
1999
|
-
}, []), E = t.rects.reference,
|
|
2000
|
-
var X =
|
|
1999
|
+
}, []), E = t.rects.reference, m = t.rects.popper, y = /* @__PURE__ */ new Map(), C = !0, T = v[0], k = 0; k < v.length; k++) {
|
|
2000
|
+
var X = v[k], O = V(X), M = bt(X) === gt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
|
|
2001
2001
|
placement: X,
|
|
2002
2002
|
boundary: h,
|
|
2003
2003
|
rootBoundary: u,
|
|
2004
|
-
altBoundary:
|
|
2004
|
+
altBoundary: f,
|
|
2005
2005
|
padding: c
|
|
2006
2006
|
}), Z = U ? M ? F : z : M ? _ : R;
|
|
2007
|
-
E[$] >
|
|
2007
|
+
E[$] > m[$] && (Z = $t(Z));
|
|
2008
2008
|
var ct = $t(Z), K = [];
|
|
2009
2009
|
if (n && K.push(H[O] <= 0), a && K.push(H[Z] <= 0, H[ct] <= 0), K.every(function(it) {
|
|
2010
2010
|
return it;
|
|
2011
2011
|
})) {
|
|
2012
|
-
T = X,
|
|
2012
|
+
T = X, C = !1;
|
|
2013
2013
|
break;
|
|
2014
2014
|
}
|
|
2015
2015
|
y.set(X, K);
|
|
2016
2016
|
}
|
|
2017
|
-
if (
|
|
2018
|
-
for (var dt =
|
|
2019
|
-
var nt =
|
|
2017
|
+
if (C)
|
|
2018
|
+
for (var dt = I ? 3 : 1, ut = function(W) {
|
|
2019
|
+
var nt = v.find(function(pt) {
|
|
2020
2020
|
var q = y.get(pt);
|
|
2021
2021
|
if (q)
|
|
2022
2022
|
return q.slice(0, W).every(function(wt) {
|
|
@@ -2125,14 +2125,14 @@ function bn(e) {
|
|
|
2125
2125
|
return e === "x" ? "y" : "x";
|
|
2126
2126
|
}
|
|
2127
2127
|
function wn(e) {
|
|
2128
|
-
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding,
|
|
2128
|
+
var t = e.state, i = e.options, o = e.name, s = i.mainAxis, n = s === void 0 ? !0 : s, r = i.altAxis, a = r === void 0 ? !1 : r, l = i.boundary, c = i.rootBoundary, h = i.altBoundary, u = i.padding, f = i.tether, p = f === void 0 ? !0 : f, I = i.tetherOffset, g = I === void 0 ? 0 : I, b = Yt(t, {
|
|
2129
2129
|
boundary: l,
|
|
2130
2130
|
rootBoundary: c,
|
|
2131
2131
|
padding: u,
|
|
2132
2132
|
altBoundary: h
|
|
2133
|
-
}), x = V(t.placement), P = bt(t.placement), w = !P,
|
|
2133
|
+
}), x = V(t.placement), P = bt(t.placement), w = !P, v = ye(x), E = bn(v), m = t.modifiersData.popperOffsets, y = t.rects.reference, C = t.rects.popper, T = typeof g == "function" ? g(Object.assign({}, t.rects, {
|
|
2134
2134
|
placement: t.placement
|
|
2135
|
-
})) :
|
|
2135
|
+
})) : g, k = typeof T == "number" ? {
|
|
2136
2136
|
mainAxis: T,
|
|
2137
2137
|
altAxis: T
|
|
2138
2138
|
} : Object.assign({
|
|
@@ -2142,17 +2142,17 @@ function wn(e) {
|
|
|
2142
2142
|
x: 0,
|
|
2143
2143
|
y: 0
|
|
2144
2144
|
};
|
|
2145
|
-
if (
|
|
2145
|
+
if (m) {
|
|
2146
2146
|
if (n) {
|
|
2147
|
-
var M, U =
|
|
2147
|
+
var M, U = v === "y" ? R : z, $ = v === "y" ? _ : F, H = v === "y" ? "height" : "width", Z = m[v], ct = Z + b[U], K = Z - b[$], dt = p ? -C[H] / 2 : 0, ut = P === gt ? y[H] : C[H], st = P === gt ? -C[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
|
|
2148
2148
|
width: 0,
|
|
2149
2149
|
height: 0
|
|
2150
|
-
}, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), wt = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, Ct = t.elements.arrow && Mt(t.elements.arrow), ee = Ct ?
|
|
2151
|
-
|
|
2150
|
+
}, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), wt = w ? y[H] / 2 - dt - q - nt - k.mainAxis : ut - q - nt - k.mainAxis, te = w ? -y[H] / 2 + dt + q + pt + k.mainAxis : st + q + pt + k.mainAxis, Ct = t.elements.arrow && Mt(t.elements.arrow), ee = Ct ? v === "y" ? Ct.clientTop || 0 : Ct.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[v]) != null ? M : 0, ie = Z + wt - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
|
|
2151
|
+
m[v] = Ht, O[v] = Ht - Z;
|
|
2152
2152
|
}
|
|
2153
2153
|
if (a) {
|
|
2154
|
-
var It, Rt =
|
|
2155
|
-
|
|
2154
|
+
var It, Rt = v === "x" ? R : z, zt = v === "x" ? _ : F, J = m[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], xt = [R, z].indexOf(x) !== -1, Bt = (It = X == null ? void 0 : X[E]) != null ? It : 0, Gt = xt ? Zt : J - y[mt] - C[mt] - Bt + k.altAxis, _t = xt ? J + y[mt] + C[mt] - Bt - k.altAxis : Dt, Ft = p && xt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
|
|
2155
|
+
m[E] = Ft, O[E] = Ft - J;
|
|
2156
2156
|
}
|
|
2157
2157
|
t.modifiersData[o] = O;
|
|
2158
2158
|
}
|
|
@@ -2271,18 +2271,18 @@ function Sn(e) {
|
|
|
2271
2271
|
},
|
|
2272
2272
|
attributes: {},
|
|
2273
2273
|
styles: {}
|
|
2274
|
-
}, u = [],
|
|
2274
|
+
}, u = [], f = !1, p = {
|
|
2275
2275
|
state: h,
|
|
2276
2276
|
setOptions: function(x) {
|
|
2277
2277
|
var P = typeof x == "function" ? x(h.options) : x;
|
|
2278
|
-
|
|
2278
|
+
g(), h.options = Object.assign({}, n, h.options, P), h.scrollParents = {
|
|
2279
2279
|
reference: ht(a) ? Xt(a) : a.contextElement ? Xt(a.contextElement) : [],
|
|
2280
2280
|
popper: Xt(l)
|
|
2281
2281
|
};
|
|
2282
2282
|
var w = An(Xn([].concat(o, h.options.modifiers)));
|
|
2283
|
-
return h.orderedModifiers = w.filter(function(
|
|
2284
|
-
return
|
|
2285
|
-
}),
|
|
2283
|
+
return h.orderedModifiers = w.filter(function(v) {
|
|
2284
|
+
return v.enabled;
|
|
2285
|
+
}), I(), p.update();
|
|
2286
2286
|
},
|
|
2287
2287
|
// Sync update – it will always be executed, even if not necessary. This
|
|
2288
2288
|
// is useful for low frequency updates where sync behavior simplifies the
|
|
@@ -2290,7 +2290,7 @@ function Sn(e) {
|
|
|
2290
2290
|
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
2291
2291
|
// prefer the async Popper#update method
|
|
2292
2292
|
forceUpdate: function() {
|
|
2293
|
-
if (!
|
|
2293
|
+
if (!f) {
|
|
2294
2294
|
var x = h.elements, P = x.reference, w = x.popper;
|
|
2295
2295
|
if (Je(P, w)) {
|
|
2296
2296
|
h.rects = {
|
|
@@ -2299,15 +2299,15 @@ function Sn(e) {
|
|
|
2299
2299
|
}, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(k) {
|
|
2300
2300
|
return h.modifiersData[k.name] = Object.assign({}, k.data);
|
|
2301
2301
|
});
|
|
2302
|
-
for (var
|
|
2302
|
+
for (var v = 0; v < h.orderedModifiers.length; v++) {
|
|
2303
2303
|
if (h.reset === !0) {
|
|
2304
|
-
h.reset = !1,
|
|
2304
|
+
h.reset = !1, v = -1;
|
|
2305
2305
|
continue;
|
|
2306
2306
|
}
|
|
2307
|
-
var E = h.orderedModifiers[
|
|
2308
|
-
typeof
|
|
2307
|
+
var E = h.orderedModifiers[v], m = E.fn, y = E.options, C = y === void 0 ? {} : y, T = E.name;
|
|
2308
|
+
typeof m == "function" && (h = m({
|
|
2309
2309
|
state: h,
|
|
2310
|
-
options:
|
|
2310
|
+
options: C,
|
|
2311
2311
|
name: T,
|
|
2312
2312
|
instance: p
|
|
2313
2313
|
}) || h);
|
|
@@ -2323,30 +2323,30 @@ function Sn(e) {
|
|
|
2323
2323
|
});
|
|
2324
2324
|
}),
|
|
2325
2325
|
destroy: function() {
|
|
2326
|
-
|
|
2326
|
+
g(), f = !0;
|
|
2327
2327
|
}
|
|
2328
2328
|
};
|
|
2329
2329
|
if (!Je(a, l))
|
|
2330
2330
|
return p;
|
|
2331
2331
|
p.setOptions(c).then(function(b) {
|
|
2332
|
-
!
|
|
2332
|
+
!f && c.onFirstUpdate && c.onFirstUpdate(b);
|
|
2333
2333
|
});
|
|
2334
|
-
function
|
|
2334
|
+
function I() {
|
|
2335
2335
|
h.orderedModifiers.forEach(function(b) {
|
|
2336
|
-
var x = b.name, P = b.options, w = P === void 0 ? {} : P,
|
|
2337
|
-
if (typeof
|
|
2338
|
-
var E =
|
|
2336
|
+
var x = b.name, P = b.options, w = P === void 0 ? {} : P, v = b.effect;
|
|
2337
|
+
if (typeof v == "function") {
|
|
2338
|
+
var E = v({
|
|
2339
2339
|
state: h,
|
|
2340
2340
|
name: x,
|
|
2341
2341
|
instance: p,
|
|
2342
2342
|
options: w
|
|
2343
|
-
}),
|
|
2343
|
+
}), m = function() {
|
|
2344
2344
|
};
|
|
2345
|
-
u.push(E ||
|
|
2345
|
+
u.push(E || m);
|
|
2346
2346
|
}
|
|
2347
2347
|
});
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function g() {
|
|
2350
2350
|
u.forEach(function(b) {
|
|
2351
2351
|
return b();
|
|
2352
2352
|
}), u = [];
|
|
@@ -2416,9 +2416,9 @@ class On {
|
|
|
2416
2416
|
{ element: t, event: "mouseleave", handler: l },
|
|
2417
2417
|
{ element: t, event: "mouseenter", handler: c }
|
|
2418
2418
|
), this.onProductClick) {
|
|
2419
|
-
const
|
|
2420
|
-
const
|
|
2421
|
-
|
|
2419
|
+
const f = this.onProductClick, p = (I) => {
|
|
2420
|
+
const g = I.target.closest(".ci360-popper-cta");
|
|
2421
|
+
g && f(g.dataset.productId ?? "", o);
|
|
2422
2422
|
};
|
|
2423
2423
|
this.popper.addEventListener("click", p), this.popperListeners.push(
|
|
2424
2424
|
{ element: this.popper, event: "click", handler: p }
|
|
@@ -2432,8 +2432,8 @@ class On {
|
|
|
2432
2432
|
};
|
|
2433
2433
|
try {
|
|
2434
2434
|
(u = this.onOpen) == null || u.call(this, o);
|
|
2435
|
-
} catch (
|
|
2436
|
-
console.warn("onHotspotOpen callback error:",
|
|
2435
|
+
} catch (f) {
|
|
2436
|
+
console.warn("onHotspotOpen callback error:", f);
|
|
2437
2437
|
}
|
|
2438
2438
|
}
|
|
2439
2439
|
checkAndHidePopper() {
|
|
@@ -2472,47 +2472,50 @@ class On {
|
|
|
2472
2472
|
this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
|
|
2473
2473
|
}
|
|
2474
2474
|
createHotspot(t) {
|
|
2475
|
-
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t,
|
|
2476
|
-
if (
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2475
|
+
const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a, arrowDirection: l } = t, c = typeof a == "string" ? a.trim() : void 0, h = de(t), u = ys(i, n, r);
|
|
2476
|
+
if (c) {
|
|
2477
|
+
if (u.classList.add("cloudimage-360-hotspot--navigate"), u.innerHTML = Mn, l != null) {
|
|
2478
|
+
const g = u.querySelector(".ci360-navigate-icon");
|
|
2479
|
+
g && (g.style.transform = `rotate(${l}deg)`);
|
|
2480
|
+
}
|
|
2481
|
+
const f = n || c;
|
|
2482
|
+
u.setAttribute("role", "button"), u.setAttribute("aria-label", `Navigate to ${f}`), u.setAttribute("aria-roledescription", "navigation hotspot"), u.style.cursor = "pointer";
|
|
2483
|
+
const p = h || (n ? de({ data: { title: n } }) : "");
|
|
2484
|
+
p ? (u.setAttribute("aria-haspopup", "true"), u.addEventListener(
|
|
2482
2485
|
"mouseenter",
|
|
2483
|
-
() => this.showPopper({ hotspotElement:
|
|
2484
|
-
),
|
|
2486
|
+
() => this.showPopper({ hotspotElement: u, content: p, id: i, keepOpen: !1 })
|
|
2487
|
+
), u.addEventListener("mouseleave", () => {
|
|
2485
2488
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2486
|
-
}),
|
|
2489
|
+
}), u.addEventListener(
|
|
2487
2490
|
"focus",
|
|
2488
|
-
() => this.showPopper({ hotspotElement:
|
|
2489
|
-
),
|
|
2491
|
+
() => this.showPopper({ hotspotElement: u, content: p, id: i, keepOpen: !1 })
|
|
2492
|
+
), u.addEventListener("blur", () => {
|
|
2490
2493
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2491
|
-
})) : (
|
|
2492
|
-
const
|
|
2493
|
-
this.hidePopper(), this.onNavigate ? this.onNavigate(
|
|
2494
|
+
})) : (u.removeAttribute("aria-haspopup"), u.removeAttribute("aria-expanded"));
|
|
2495
|
+
const I = () => {
|
|
2496
|
+
this.hidePopper(), this.onNavigate ? this.onNavigate(c) : console.warn(`[ci360] navigateTo hotspot "${i}" clicked but no onNavigate callback is configured.`);
|
|
2494
2497
|
};
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
},
|
|
2498
|
-
(
|
|
2499
|
-
}), this.hotspotsContainer.appendChild(
|
|
2498
|
+
u.onclick = (g) => {
|
|
2499
|
+
g.stopPropagation(), I();
|
|
2500
|
+
}, u.addEventListener("keydown", (g) => {
|
|
2501
|
+
(g.key === "Enter" || g.key === " ") && (g.preventDefault(), I());
|
|
2502
|
+
}), this.hotspotsContainer.appendChild(u);
|
|
2500
2503
|
return;
|
|
2501
2504
|
}
|
|
2502
|
-
(s ||
|
|
2503
|
-
var
|
|
2504
|
-
|
|
2505
|
-
},
|
|
2505
|
+
(s || h && this.trigger === "click") && (u.style.cursor = "pointer"), u.onclick = (f) => {
|
|
2506
|
+
var p;
|
|
2507
|
+
f.stopPropagation(), h && this.trigger === "click" && (((p = this.popperInstance) == null ? void 0 : p.instanceId) === i ? this.hidePopper() : this.showPopper({ hotspotElement: u, content: h, id: i, keepOpen: o })), s == null || s(f, this.popperInstance, i);
|
|
2508
|
+
}, h && this.trigger === "hover" && (u.addEventListener(
|
|
2506
2509
|
"mouseenter",
|
|
2507
|
-
() => this.showPopper({ hotspotElement:
|
|
2508
|
-
),
|
|
2510
|
+
() => this.showPopper({ hotspotElement: u, content: h, id: i, keepOpen: o })
|
|
2511
|
+
), u.addEventListener("mouseleave", () => {
|
|
2509
2512
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2510
|
-
}),
|
|
2513
|
+
}), u.addEventListener(
|
|
2511
2514
|
"focus",
|
|
2512
|
-
() => this.showPopper({ hotspotElement:
|
|
2513
|
-
),
|
|
2515
|
+
() => this.showPopper({ hotspotElement: u, content: h, id: i, keepOpen: o })
|
|
2516
|
+
), u.addEventListener("blur", () => {
|
|
2514
2517
|
this.shouldHidePopper = !0, this.checkAndHidePopper();
|
|
2515
|
-
})), this.hotspotsContainer.appendChild(
|
|
2518
|
+
})), this.hotspotsContainer.appendChild(u);
|
|
2516
2519
|
}
|
|
2517
2520
|
hideHotspots() {
|
|
2518
2521
|
this.hotspotsContainer.querySelectorAll(".cloudimage-360-hotspot").forEach((t) => {
|
|
@@ -2614,8 +2617,8 @@ class ti {
|
|
|
2614
2617
|
if (!this.isReady || !this.isClicked) return;
|
|
2615
2618
|
const o = t - this.movementStart.x, s = i - this.movementStart.y;
|
|
2616
2619
|
if (this.inertia) {
|
|
2617
|
-
const u = performance.now(),
|
|
2618
|
-
|
|
2620
|
+
const u = performance.now(), f = u - this.lastDragTime;
|
|
2621
|
+
f > 0 && f < 100 && (this.velocityX = (t - this.lastDragX) / f, this.velocityY = (i - this.lastDragY) / f), this.lastDragTime = u, this.lastDragX = t, this.lastDragY = i;
|
|
2619
2622
|
}
|
|
2620
2623
|
this.draggingDirection = Be({
|
|
2621
2624
|
deltaX: o,
|
|
@@ -3114,7 +3117,7 @@ class ti {
|
|
|
3114
3117
|
return;
|
|
3115
3118
|
}
|
|
3116
3119
|
if (this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.isGridMode) {
|
|
3117
|
-
const
|
|
3120
|
+
const f = this.amountX * this.amountY, p = Math.max(0, Math.min(t, f - 1));
|
|
3118
3121
|
this.activeImageY = Math.floor(p / this.amountX), this.activeImageX = p % this.amountX, this.isZoomed || this.updateView(), this.emit("onSpin", {
|
|
3119
3122
|
direction: p > o ? "right" : "left",
|
|
3120
3123
|
activeImageX: this.activeImageX,
|
|
@@ -3232,19 +3235,19 @@ class ti {
|
|
|
3232
3235
|
filenameGrid: c,
|
|
3233
3236
|
imageListX: h,
|
|
3234
3237
|
imageListY: u,
|
|
3235
|
-
imageListGrid:
|
|
3238
|
+
imageListGrid: f,
|
|
3236
3239
|
indexZeroBase: p,
|
|
3237
|
-
amountX:
|
|
3238
|
-
amountY:
|
|
3240
|
+
amountX: I,
|
|
3241
|
+
amountY: g,
|
|
3239
3242
|
draggable: b = !0,
|
|
3240
3243
|
swipeable: x = !0,
|
|
3241
3244
|
keys: P,
|
|
3242
3245
|
keysReverse: w,
|
|
3243
|
-
bottomCircleOffset:
|
|
3246
|
+
bottomCircleOffset: v,
|
|
3244
3247
|
autoplay: E,
|
|
3245
|
-
autoplayBehavior:
|
|
3248
|
+
autoplayBehavior: m,
|
|
3246
3249
|
playOnce: y,
|
|
3247
|
-
speed:
|
|
3250
|
+
speed: C,
|
|
3248
3251
|
autoplayReverse: T,
|
|
3249
3252
|
fullscreen: k,
|
|
3250
3253
|
magnifier: X,
|
|
@@ -3298,10 +3301,10 @@ class ti {
|
|
|
3298
3301
|
onNavigate: Ei,
|
|
3299
3302
|
onError: Ti
|
|
3300
3303
|
} = s, se = { ciToken: ct, ciFilters: K, ciTransformation: dt, cropAspectRatio: Zt, cropGravity: Dt }, ne = Ut(h, []), re = Ut(u, []);
|
|
3301
|
-
let rt = Ut(
|
|
3304
|
+
let rt = Ut(f, []);
|
|
3302
3305
|
rt.length && Array.isArray(rt[0]) && (rt = rt.flat()), this.isGridMode = !!(c || rt.length);
|
|
3303
3306
|
const Ai = s.zoomMax === 5 && O > 1 ? Math.min(O, 5) : M || 5;
|
|
3304
|
-
if (this.viewerConfig = s, this.amountX = ne.length ||
|
|
3307
|
+
if (this.viewerConfig = s, this.amountX = ne.length || I, this.amountY = re.length || g, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.isGridMode && (this.allowSpinX = !0, this.allowSpinY = !0), this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = T ? this.amountX - 1 : 0, this.activeImageY = T ? this.amountY - 1 : 0, this.bottomCircleOffset = v, this.autoplay = E, this.autoplayBehavior = m, this.playOnce = y, this.speed = C, this.autoplayReverse = T, this.fullscreen = k, this.zoomMax = Ai, this.zoomStep = U || 0.5, this.zoomControls = $ ?? !0, this.zoomControlsPosition = H || "bottom-left", this.scrollHint = Z ?? !0, this.dragSpeed = Math.max(st, so), this.stopAtEdges = et, this.stopAtEdgesX = it ?? et, this.stopAtEdgesY = W ?? et, this.ciParams = se, this.apiVersion = r, this.keysReverse = w, this.info = nt, this.keys = P, this.innerBox = this.innerBox ?? Eo(this.container), this.container.style.aspectRatio = mt || "", this.initialIconShown = pt, this.bottomCircle = q, this.spinDirection = Jo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = Ct, this.hotspots = wt, this.hotspotTrigger = te, this.onHotspotOpen = Ii, this.onHotspotClose = xi, this.onProductClick = Pi, this.onNavigate = Ei, this.hide360Logo = ee, this.logoSrc = Ot, this.inertia = ie, this.pinchZoom = oe, this.hints = Ht, this.hotspotTimelineOnClick = J, It === "dark" ? this.container.classList.add("ci360-theme-dark") : It === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Rt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Rt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), zt && this.container.style.setProperty("--ci360-hotspot-brand-color", zt)), this.onReady = xt, this.onLoad = Bt, this.onSpin = Gt, this.onAutoplayStart = _t, this.onAutoplayStop = Ft, this.onFullscreenOpen = gi, this.onFullscreenClose = vi, this.onZoomIn = yi, this.onZoomOut = bi, this.onDragStart = wi, this.onDragEnd = Ci, this.onError = Ti, this.srcXConfig = {
|
|
3305
3308
|
folder: n,
|
|
3306
3309
|
filename: a,
|
|
3307
3310
|
imageList: ne,
|
|
@@ -3461,4 +3464,4 @@ class Rn {
|
|
|
3461
3464
|
export {
|
|
3462
3465
|
Rn as default
|
|
3463
3466
|
};
|
|
3464
|
-
//# sourceMappingURL=ci360-
|
|
3467
|
+
//# sourceMappingURL=ci360-DwDP_e0s.mjs.map
|