js-cloudimage-360-view 4.8.0 → 4.9.1

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.
@@ -1,111 +1,113 @@
1
- var xi = Object.defineProperty;
2
- var Ii = (e, t, i) => t in e ? xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
- var ye = (e, t, i) => Ii(e, typeof t != "symbol" ? t + "" : t, i);
4
- var _t = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
- function Pi(e) {
1
+ var Si = Object.defineProperty;
2
+ var Yi = (e, t, i) => t in e ? Si(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i;
3
+ var Ie = (e, t, i) => Yi(e, typeof t != "symbol" ? t + "" : t, i);
4
+ var Vt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
+ function Li(e) {
6
6
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
7
7
  }
8
- var qe = "Expected a function", be = NaN, Ei = "[object Symbol]", ki = /^\s+|\s+$/g, Ti = /^[-+]0x[0-9a-f]+$/i, Si = /^0b[01]+$/i, Ai = /^0o[0-7]+$/i, Oi = parseInt, Li = typeof _t == "object" && _t && _t.Object === Object && _t, Mi = typeof self == "object" && self && self.Object === Object && self, Hi = Li || Mi || Function("return this")(), Xi = Object.prototype, Yi = Xi.toString, Ri = Math.max, zi = Math.min, Qt = function() {
9
- return Hi.Date.now();
8
+ var ii = "Expected a function", xe = NaN, Mi = "[object Symbol]", Oi = /^\s+|\s+$/g, Hi = /^[-+]0x[0-9a-f]+$/i, Ri = /^0b[01]+$/i, zi = /^0o[0-7]+$/i, Zi = parseInt, Di = typeof Vt == "object" && Vt && Vt.Object === Object && Vt, Bi = typeof self == "object" && self && self.Object === Object && self, Gi = Di || Bi || Function("return this")(), _i = Object.prototype, Fi = _i.toString, Ni = Math.max, Wi = Math.min, le = function() {
9
+ return Gi.Date.now();
10
10
  };
11
- function Zi(e, t, i) {
11
+ function Vi(e, t, i) {
12
12
  var o, s, n, r, a, l, c = 0, h = !1, u = !1, m = !0;
13
13
  if (typeof e != "function")
14
- throw new TypeError(qe);
15
- t = we(t) || 0, Nt(i) && (h = !!i.leading, u = "maxWait" in i, n = u ? Ri(we(i.maxWait) || 0, t) : n, m = "trailing" in i ? !!i.trailing : m);
16
- function f(p) {
17
- var g = o, x = s;
18
- return o = s = void 0, c = p, r = e.apply(x, g), r;
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, m = "trailing" in i ? !!i.trailing : m);
16
+ function p(f) {
17
+ var y = o, I = s;
18
+ return o = s = void 0, c = f, r = e.apply(I, y), r;
19
19
  }
20
- function C(p) {
21
- return c = p, a = setTimeout(I, t), h ? f(p) : r;
20
+ function C(f) {
21
+ return c = f, a = setTimeout(x, t), h ? p(f) : r;
22
22
  }
23
- function y(p) {
24
- var g = p - l, x = p - c, k = t - g;
25
- return u ? zi(k, n - x) : k;
23
+ function v(f) {
24
+ var y = f - l, I = f - c, T = t - y;
25
+ return u ? Wi(T, n - I) : T;
26
26
  }
27
- function b(p) {
28
- var g = p - l, x = p - c;
29
- return l === void 0 || g >= t || g < 0 || u && x >= n;
27
+ function b(f) {
28
+ var y = f - l, I = f - c;
29
+ return l === void 0 || y >= t || y < 0 || u && I >= n;
30
30
  }
31
- function I() {
32
- var p = Qt();
33
- if (b(p))
34
- return E(p);
35
- a = setTimeout(I, y(p));
31
+ function x() {
32
+ var f = le();
33
+ if (b(f))
34
+ return P(f);
35
+ a = setTimeout(x, v(f));
36
36
  }
37
- function E(p) {
38
- return a = void 0, m && o ? f(p) : (o = s = void 0, r);
37
+ function P(f) {
38
+ return a = void 0, m && o ? p(f) : (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 v() {
44
- return a === void 0 ? r : E(Qt());
43
+ function g() {
44
+ return a === void 0 ? r : P(le());
45
45
  }
46
- function P() {
47
- var p = Qt(), g = b(p);
48
- if (o = arguments, s = this, l = p, g) {
46
+ function E() {
47
+ var f = le(), y = b(f);
48
+ if (o = arguments, s = this, l = f, y) {
49
49
  if (a === void 0)
50
50
  return C(l);
51
51
  if (u)
52
- return a = setTimeout(I, t), f(l);
52
+ return a = setTimeout(x, t), p(l);
53
53
  }
54
- return a === void 0 && (a = setTimeout(I, t)), r;
54
+ return a === void 0 && (a = setTimeout(x, t)), r;
55
55
  }
56
- return P.cancel = w, P.flush = v, P;
56
+ return E.cancel = w, E.flush = g, E;
57
57
  }
58
- function Di(e, t, i) {
58
+ function ji(e, t, i) {
59
59
  var o = !0, s = !0;
60
60
  if (typeof e != "function")
61
- throw new TypeError(qe);
62
- return Nt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Zi(e, t, {
61
+ throw new TypeError(ii);
62
+ return Kt(i) && (o = "leading" in i ? !!i.leading : o, s = "trailing" in i ? !!i.trailing : s), Vi(e, t, {
63
63
  leading: o,
64
64
  maxWait: t,
65
65
  trailing: s
66
66
  });
67
67
  }
68
- function Nt(e) {
68
+ function Kt(e) {
69
69
  var t = typeof e;
70
70
  return !!e && (t == "object" || t == "function");
71
71
  }
72
- function Bi(e) {
72
+ function Ui(e) {
73
73
  return !!e && typeof e == "object";
74
74
  }
75
- function _i(e) {
76
- return typeof e == "symbol" || Bi(e) && Yi.call(e) == Ei;
75
+ function $i(e) {
76
+ return typeof e == "symbol" || Ui(e) && Fi.call(e) == Mi;
77
77
  }
78
- function we(e) {
78
+ function Pe(e) {
79
79
  if (typeof e == "number")
80
80
  return e;
81
- if (_i(e))
82
- return be;
83
- if (Nt(e)) {
81
+ if ($i(e))
82
+ return xe;
83
+ if (Kt(e)) {
84
84
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
85
- e = Nt(t) ? t + "" : t;
85
+ e = Kt(t) ? t + "" : t;
86
86
  }
87
87
  if (typeof e != "string")
88
88
  return e === 0 ? e : +e;
89
- e = e.replace(ki, "");
90
- var i = Si.test(e);
91
- return i || Ai.test(e) ? Oi(e.slice(2), i ? 2 : 8) : Ti.test(e) ? be : +e;
89
+ e = e.replace(Oi, "");
90
+ var i = Ri.test(e);
91
+ return i || zi.test(e) ? Zi(e.slice(2), i ? 2 : 8) : Hi.test(e) ? xe : +e;
92
92
  }
93
- var Fi = Di;
94
- const Ce = /* @__PURE__ */ Pi(Fi), Y = {
93
+ var Ki = ji;
94
+ const Ee = /* @__PURE__ */ Li(Ki), S = {
95
95
  SPIN_X: "spin-x",
96
96
  SPIN_Y: "spin-y",
97
97
  SPIN_XY: "spin-xy",
98
98
  SPIN_YX: "spin-yx"
99
- }, Wi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], L = {
99
+ }, qi = [!1, 0, null, void 0, "false", "0", "null", "undefined"], L = {
100
100
  X: "x-axis",
101
101
  Y: "y-axis"
102
- }, Ni = [37, 39], Vi = [38, 40], Gi = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), xe = Gi ? 32 : 10, ji = 150, Ui = 150, $i = 200, Ie = 50, Ki = 50, qi = 50, d = {
102
+ }, Ji = [37, 39], Qi = [38, 40], to = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), Te = to ? 32 : 10, eo = 150, io = 150, oo = 200, Ae = 50, so = 50, no = 50, d = {
103
103
  folder: "/",
104
104
  apiVersion: "v7",
105
105
  filenameX: "image-{index}.jpg",
106
106
  filenameY: null,
107
107
  imageListX: null,
108
108
  imageListY: null,
109
+ filenameGrid: null,
110
+ imageListGrid: null,
109
111
  indexZeroBase: 0,
110
112
  amountX: 0,
111
113
  amountY: 0,
@@ -116,7 +118,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
116
118
  keys: !1,
117
119
  keysReverse: !1,
118
120
  autoplay: !1,
119
- autoplayBehavior: Y.SPIN_X,
121
+ autoplayBehavior: S.SPIN_X,
120
122
  playOnce: !1,
121
123
  autoplayReverse: !1,
122
124
  pointerZoom: 0,
@@ -135,6 +137,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
135
137
  lazyload: !0,
136
138
  dragReverse: !1,
137
139
  stopAtEdges: !1,
140
+ stopAtEdgesX: null,
141
+ stopAtEdgesY: null,
138
142
  imageInfo: !1,
139
143
  initialIconShown: !0,
140
144
  hotspots: null,
@@ -168,75 +172,87 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
168
172
  onProductClick: null,
169
173
  onNavigate: null,
170
174
  onError: null
171
- }, Ji = (e) => ({
172
- folder: T(e, "folder", d.folder),
173
- apiVersion: T(e, "api-version", d.apiVersion),
174
- filenameX: T(e, "filename") || T(e, "filename-x") || d.filenameX,
175
- filenameY: T(e, "filename-y", d.filenameY),
176
- imageListX: T(e, "image-list-x", d.imageListX),
177
- imageListY: T(e, "image-list-y", d.imageListY),
178
- indexZeroBase: parseInt(T(e, "index-zero-base", d.indexZeroBase), 10),
179
- amountX: parseInt(T(e, "amount-x", d.amountX), 10),
180
- amountY: parseInt(T(e, "amount-y", d.amountY), 10),
181
- speed: parseInt(T(e, "speed", d.speed), 10),
182
- dragSpeed: parseInt(T(e, "drag-speed", d.dragSpeed), 10),
183
- draggable: M(e, "draggable", d.draggable),
184
- swipeable: M(e, "swipeable", d.swipeable),
185
- keys: M(e, "keys", d.keys),
186
- keysReverse: M(e, "keys-reverse", d.keysReverse),
187
- autoplay: M(e, "autoplay", d.autoplay),
188
- autoplayBehavior: T(e, "autoplay-behavior", d.autoplayBehavior),
189
- playOnce: M(e, "play-once", d.playOnce),
190
- autoplayReverse: M(e, "autoplay-reverse", d.autoplayReverse),
191
- pointerZoom: parseFloat(T(e, "pointer-zoom", d.pointerZoom)),
192
- pointerZoomTrigger: T(e, "pointer-zoom-trigger", d.pointerZoomTrigger),
193
- fullscreen: M(e, "fullscreen") || M(e, "full-screen", d.fullscreen),
194
- magnifier: T(e, "magnifier", null) != null ? parseFloat(T(e, "magnifier", null)) : null,
195
- zoomMax: parseFloat(T(e, "zoom-max", d.zoomMax)),
196
- zoomStep: parseFloat(T(e, "zoom-step", d.zoomStep)),
197
- zoomControls: !ct(e, "zoom-controls"),
198
- zoomControlsPosition: T(e, "zoom-controls-position", d.zoomControlsPosition),
199
- scrollHint: !ct(e, "scroll-hint"),
175
+ }, ro = (e) => ({
176
+ folder: A(e, "folder", d.folder),
177
+ apiVersion: A(e, "api-version", d.apiVersion),
178
+ filenameX: A(e, "filename") || A(e, "filename-x") || d.filenameX,
179
+ filenameY: A(e, "filename-y", d.filenameY),
180
+ imageListX: A(e, "image-list-x", d.imageListX),
181
+ imageListY: A(e, "image-list-y", d.imageListY),
182
+ filenameGrid: A(e, "filename-grid", d.filenameGrid),
183
+ imageListGrid: A(e, "image-list-grid", d.imageListGrid),
184
+ indexZeroBase: parseInt(A(e, "index-zero-base", d.indexZeroBase), 10),
185
+ amountX: parseInt(A(e, "amount-x", d.amountX), 10),
186
+ amountY: parseInt(A(e, "amount-y", d.amountY), 10),
187
+ speed: parseInt(A(e, "speed", d.speed), 10),
188
+ dragSpeed: parseInt(A(e, "drag-speed", d.dragSpeed), 10),
189
+ draggable: Y(e, "draggable", d.draggable),
190
+ swipeable: Y(e, "swipeable", d.swipeable),
191
+ keys: Y(e, "keys", d.keys),
192
+ keysReverse: Y(e, "keys-reverse", d.keysReverse),
193
+ autoplay: Y(e, "autoplay", d.autoplay),
194
+ autoplayBehavior: A(e, "autoplay-behavior", d.autoplayBehavior),
195
+ playOnce: Y(e, "play-once", d.playOnce),
196
+ autoplayReverse: Y(e, "autoplay-reverse", d.autoplayReverse),
197
+ pointerZoom: parseFloat(A(e, "pointer-zoom", d.pointerZoom)),
198
+ pointerZoomTrigger: A(e, "pointer-zoom-trigger", d.pointerZoomTrigger),
199
+ fullscreen: Y(e, "fullscreen") || Y(e, "full-screen", d.fullscreen),
200
+ magnifier: A(e, "magnifier", null) != null ? parseFloat(A(e, "magnifier", null)) : null,
201
+ zoomMax: parseFloat(A(e, "zoom-max", d.zoomMax)),
202
+ zoomStep: parseFloat(A(e, "zoom-step", d.zoomStep)),
203
+ zoomControls: !ft(e, "zoom-controls"),
204
+ zoomControlsPosition: A(e, "zoom-controls-position", d.zoomControlsPosition),
205
+ scrollHint: !ft(e, "scroll-hint"),
200
206
  bottomCircleOffset: parseInt(
201
- T(e, "bottom-circle-offset", d.bottomCircleOffset),
207
+ A(e, "bottom-circle-offset", d.bottomCircleOffset),
202
208
  10
203
209
  ),
204
- ciToken: T(e, "responsive", d.ciToken),
205
- ciFilters: T(e, "filters", d.ciFilters),
206
- ciTransformation: T(e, "transformation", d.ciTransformation),
207
- lazyload: M(e, "lazyload", d.lazyload),
208
- dragReverse: M(e, "drag-reverse", d.dragReverse),
209
- stopAtEdges: M(e, "stop-at-edges", d.stopAtEdges),
210
- imageInfo: M(e, "info", d.imageInfo),
211
- initialIconShown: !ct(e, "initial-icon"),
212
- bottomCircle: !ct(e, "bottom-circle"),
213
- hide360Logo: M(e, "hide-360-logo", d.hide360Logo),
214
- logoSrc: T(e, "logo-src", d.logoSrc),
215
- inertia: M(e, "inertia", d.inertia),
216
- pinchZoom: M(e, "pinch-zoom", d.pinchZoom),
217
- hints: !ct(e, "hints"),
218
- theme: T(e, "theme", d.theme),
219
- markerTheme: T(e, "marker-theme", d.markerTheme),
220
- brandColor: T(e, "brand-color", d.brandColor),
221
- hotspotTrigger: T(e, "hotspot-trigger", d.hotspotTrigger),
222
- hotspotTimelineOnClick: !ct(e, "hotspot-timeline-on-click"),
223
- aspectRatio: T(e, "aspect-ratio", d.aspectRatio),
224
- cropAspectRatio: T(e, "crop-aspect-ratio", d.cropAspectRatio),
225
- cropGravity: T(e, "crop-gravity", d.cropGravity)
226
- }), Qi = (e) => {
210
+ ciToken: A(e, "responsive", d.ciToken),
211
+ ciFilters: A(e, "filters", d.ciFilters),
212
+ ciTransformation: A(e, "transformation", d.ciTransformation),
213
+ lazyload: Y(e, "lazyload", d.lazyload),
214
+ dragReverse: Y(e, "drag-reverse", d.dragReverse),
215
+ stopAtEdges: Y(e, "stop-at-edges", d.stopAtEdges),
216
+ stopAtEdgesX: A(e, "stop-at-edges-x", null) !== null ? Y(e, "stop-at-edges-x", null) : null,
217
+ stopAtEdgesY: A(e, "stop-at-edges-y", null) !== null ? Y(e, "stop-at-edges-y", null) : null,
218
+ imageInfo: Y(e, "info", d.imageInfo),
219
+ initialIconShown: !ft(e, "initial-icon"),
220
+ bottomCircle: !ft(e, "bottom-circle"),
221
+ hide360Logo: Y(e, "hide-360-logo", d.hide360Logo),
222
+ logoSrc: A(e, "logo-src", d.logoSrc),
223
+ inertia: Y(e, "inertia", d.inertia),
224
+ pinchZoom: Y(e, "pinch-zoom", d.pinchZoom),
225
+ hints: !ft(e, "hints"),
226
+ theme: A(e, "theme", d.theme),
227
+ markerTheme: A(e, "marker-theme", d.markerTheme),
228
+ brandColor: A(e, "brand-color", d.brandColor),
229
+ hotspotTrigger: A(e, "hotspot-trigger", d.hotspotTrigger),
230
+ hotspotTimelineOnClick: !ft(e, "hotspot-timeline-on-click"),
231
+ aspectRatio: A(e, "aspect-ratio", d.aspectRatio),
232
+ cropAspectRatio: A(e, "crop-aspect-ratio", d.cropAspectRatio),
233
+ cropGravity: A(e, "crop-gravity", d.cropGravity)
234
+ }), ao = (e) => {
227
235
  const t = [];
228
- e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.'), !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)");
229
- const i = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
230
- return e.autoplayBehavior && !i.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${i.join(", ")}`), t.forEach((o) => {
231
- console.warn(`CloudImage 360: ${o}`);
236
+ e.amountX !== void 0 && e.amountX < 0 && t.push("amountX should be a positive number"), e.amountY !== void 0 && e.amountY < 0 && t.push("amountY should be a positive number"), e.speed !== void 0 && e.speed <= 0 && t.push("speed should be a positive number"), e.dragSpeed !== void 0 && e.dragSpeed <= 0 && t.push("dragSpeed should be a positive number"), e.pointerZoom !== void 0 && e.pointerZoom !== 0 && (e.pointerZoom < 1 || e.pointerZoom > 5) && t.push("pointerZoom should be between 1 and 5 (or 0 to disable)"), e.magnifier !== void 0 && e.magnifier !== null && e.magnifier !== 0 && t.push("magnifier option is deprecated and will be ignored. Use zoomMax instead."), e.pointerZoomTrigger === "click" && t.push('pointerZoomTrigger: "click" is deprecated. Zoom is now always triggered by double-click. Use dblclick trigger or the new zoom controls.');
237
+ const i = !!(e.filenameGrid || e.imageListGrid);
238
+ if (!i && !e.folder && !e.imageListX && !e.imageListY && t.push("Either folder or imageListX/imageListY is required"), !i && e.folder && !e.amountX && !e.imageListX && t.push("amountX is required when using folder (unless imageListX is provided)"), e.filenameGrid && (!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("filenameGrid requires both amountX > 0 and amountY > 0"), e.imageListGrid) {
239
+ (!e.amountX || e.amountX <= 0 || !e.amountY || e.amountY <= 0) && t.push("imageListGrid requires both amountX > 0 and amountY > 0");
240
+ const s = Array.isArray(e.imageListGrid) ? e.imageListGrid.flat() : [];
241
+ s.length && e.amountX && e.amountY && s.length !== e.amountX * e.amountY && t.push(`imageListGrid length (${s.length}) does not match amountX * amountY (${e.amountX * e.amountY})`);
242
+ }
243
+ const o = ["spin-x", "spin-y", "spin-xy", "spin-yx"];
244
+ return e.autoplayBehavior && !o.includes(e.autoplayBehavior) && t.push(`autoplayBehavior should be one of: ${o.join(", ")}`), t.forEach((s) => {
245
+ console.warn(`CloudImage 360: ${s}`);
232
246
  }), t.length === 0;
233
- }, to = (e) => (Qi(e), {
247
+ }, lo = (e) => (ao(e), {
234
248
  folder: e.folder || d.folder,
235
249
  apiVersion: e.apiVersion || d.apiVersion,
236
250
  filenameX: e.filenameX || e.filename || d.filenameX,
237
251
  filenameY: e.filenameY || d.filenameY,
238
252
  imageListX: e.imageListX || d.imageListX,
239
253
  imageListY: e.imageListY || d.imageListY,
254
+ filenameGrid: e.filenameGrid || d.filenameGrid,
255
+ imageListGrid: e.imageListGrid || d.imageListGrid,
240
256
  indexZeroBase: parseInt(e.indexZeroBase ?? d.indexZeroBase, 10),
241
257
  amountX: parseInt(e.amountX ?? d.amountX, 10),
242
258
  amountY: parseInt(e.amountY ?? d.amountY, 10),
@@ -266,6 +282,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
266
282
  lazyload: e.lazyload ?? d.lazyload,
267
283
  dragReverse: e.dragReverse ?? d.dragReverse,
268
284
  stopAtEdges: e.stopAtEdges ?? d.stopAtEdges,
285
+ stopAtEdgesX: e.stopAtEdgesX ?? d.stopAtEdgesX,
286
+ stopAtEdgesY: e.stopAtEdgesY ?? d.stopAtEdgesY,
269
287
  imageInfo: e.imageInfo ?? d.imageInfo,
270
288
  initialIconShown: e.initialIconShown ?? d.initialIconShown,
271
289
  bottomCircle: e.bottomCircle ?? d.bottomCircle,
@@ -300,31 +318,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
300
318
  onProductClick: e.onProductClick ?? d.onProductClick,
301
319
  onNavigate: e.onNavigate ?? d.onNavigate,
302
320
  onError: e.onError ?? d.onError
303
- }), T = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, M = (e, t, i) => {
321
+ }), A = (e, t, i) => e.getAttribute(t) || e.getAttribute(`data-${t}`) || i, Y = (e, t, i) => {
304
322
  if (!(e.hasAttribute(t) || e.hasAttribute(`data-${t}`))) return i;
305
- const s = T(e, t, null);
323
+ const s = A(e, t, null);
306
324
  return s !== "false" && s !== "0";
307
- }, ct = (e, t) => T(e, t, null) === "false", eo = (e = 1) => {
325
+ }, ft = (e, t) => A(e, t, null) === "false", ho = (e = 1) => {
308
326
  const t = Math.round(window.devicePixelRatio || 1);
309
327
  return parseInt(e) * t;
310
- }, io = (e, t, i) => new URL(e).origin.includes("cloudimg") ? e : `https://${t}.cloudimg.io/${i}${e}`, Pe = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", oo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
328
+ }, co = (e, t, i) => {
329
+ try {
330
+ if (new URL(e).origin.includes("cloudimg")) return e;
331
+ } catch {
332
+ }
333
+ return `https://${t}.cloudimg.io/${i}${e}`;
334
+ }, ke = (e, t) => e ? `ar=${e}&gravity=${t || "auto"}` : "", uo = ({ ciTransformation: e, responsiveWidth: t, ciFilters: i }) => {
311
335
  const o = `width=${t}`, s = e || o, n = i ? `&f=${i}` : "";
312
336
  return `${s}${n}`;
313
- }, Pt = (e, t) => {
337
+ }, at = (e, t) => {
314
338
  const { folder: i, apiVersion: o, filename: s = "", ciParams: n } = e, { ciToken: r, ciFilters: a, ciTransformation: l, cropAspectRatio: c, cropGravity: h } = n || {}, u = `${i}${s}`;
315
339
  if (!r || !t) {
316
- const w = Pe(c, h);
340
+ const w = ke(c, h);
317
341
  if (!w) return u;
318
- const v = u.includes("?") ? "&" : "?";
319
- return `${u}${v}${w}`;
342
+ const g = u.includes("?") ? "&" : "?";
343
+ return `${u}${g}${w}`;
320
344
  }
321
- const m = Wi.includes(o) ? null : o, f = m ? `${m}/` : "", C = eo(t), y = io(u, r, f), b = oo({
345
+ const m = qi.includes(o) ? null : o, p = m ? `${m}/` : "", C = ho(t), v = co(u, r, p), b = uo({
322
346
  ciTransformation: l,
323
347
  responsiveWidth: C,
324
348
  ciFilters: a
325
- }), I = Pe(c, h), E = [b, I].filter(Boolean).join("&");
326
- return `${y}${E ? "?" : ""}${E}`;
327
- }, Je = (e, t = 0) => (e += "", e.length >= t ? e : new Array(t - e.length + 1).join("0") + e), so = (e, { amount: t = 0, indexZeroBase: i = 0 } = {}) => Array.from({ length: t }, (o, s) => e.replace("{index}", Je(s + 1, i))), no = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), ro = no ? 3 : 6, ao = ({
349
+ }), x = ke(c, h), P = [b, x].filter(Boolean).join("&");
350
+ return `${v}${P ? "?" : ""}${P}`;
351
+ }, 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 } = {}) => {
352
+ const s = [];
353
+ for (let n = 0; n < i; n++)
354
+ for (let r = 0; r < t; r++)
355
+ s.push(
356
+ e.replace("{indexX}", qt(r + 1, o)).replace("{indexY}", qt(n + 1, o))
357
+ );
358
+ return s;
359
+ }, fo = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), go = fo ? 3 : 6, oi = ({
328
360
  imagesUrls: e,
329
361
  onFirstImageLoad: t,
330
362
  onImageLoad: i,
@@ -335,65 +367,65 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
335
367
  let r = 0, a = 0;
336
368
  const l = e.length, c = [], h = [];
337
369
  let u = 0, m = 0;
338
- const f = [], C = (p, g, x = !1) => {
339
- const k = {
340
- message: `Failed to load image: ${p}`,
341
- url: p,
342
- index: g,
343
- isFirstImage: x
370
+ const p = [], C = (f, y, I = !1) => {
371
+ const T = {
372
+ message: `Failed to load image: ${f}`,
373
+ url: f,
374
+ index: y,
375
+ isFirstImage: I
344
376
  };
345
- h.push(k), a++, s == null || s({
346
- error: k,
377
+ h.push(T), a++, s == null || s({
378
+ error: T,
347
379
  errorCount: a,
348
380
  totalImages: l,
349
381
  errors: h
350
382
  });
351
- }, y = () => {
383
+ }, v = () => {
352
384
  r === l && (o == null || o(c, { errorCount: a, errors: h }));
353
385
  }, b = () => {
354
- for (; u < ro && m < f.length; ) {
355
- const p = f[m];
356
- m++, I(e[p], p);
386
+ for (; u < go && m < p.length; ) {
387
+ const f = p[m];
388
+ m++, x(e[f], f);
357
389
  }
358
- }, I = (p, g) => {
390
+ }, x = (f, y) => {
359
391
  u++;
360
- const x = new Image();
361
- x.crossOrigin = "anonymous", x.src = p, x.onload = async () => {
392
+ const I = new Image();
393
+ I.crossOrigin = "anonymous", I.src = f, I.onload = async () => {
362
394
  try {
363
- const k = await createImageBitmap(x), S = {
364
- src: p,
365
- bitmapImage: k,
366
- naturalWidth: x.naturalWidth,
367
- naturalHeight: x.naturalHeight
395
+ const T = await createImageBitmap(I), k = {
396
+ src: f,
397
+ bitmapImage: T,
398
+ naturalWidth: I.naturalWidth,
399
+ naturalHeight: I.naturalHeight
368
400
  };
369
- x.onload = null, x.onerror = null, x.src = "", r++, u--, c[g] = S, i == null || i(S, g), y(), b();
401
+ I.onload = null, I.onerror = null, I.src = "", r++, u--, c[y] = k, i == null || i(k, y), v(), b();
370
402
  } catch {
371
- x.onload = null, x.onerror = null, x.src = "", r++, u--, C(p, g), y(), b();
403
+ I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
372
404
  }
373
- }, x.onerror = () => {
374
- x.onload = null, x.onerror = null, x.src = "", r++, u--, C(p, g), y(), b();
405
+ }, I.onerror = () => {
406
+ I.onload = null, I.onerror = null, I.src = "", r++, u--, C(f, y), v(), b();
375
407
  };
376
- }, E = (p) => {
377
- for (let g = 0; g < e.length; g++)
378
- g !== p && f.push(g);
408
+ }, P = (f) => {
409
+ for (let y = 0; y < e.length; y++)
410
+ y !== f && p.push(y);
379
411
  m = 0, b();
380
- }, w = new Image(), v = n ? e.length - 1 : 0, P = e[v];
381
- w.crossOrigin = "anonymous", w.src = P, w.onload = async () => {
412
+ }, w = new Image(), g = n ? e.length - 1 : 0, E = e[g];
413
+ w.crossOrigin = "anonymous", w.src = E, w.onload = async () => {
382
414
  try {
383
- const p = await createImageBitmap(w), g = {
384
- src: P,
385
- bitmapImage: p,
415
+ const f = await createImageBitmap(w), y = {
416
+ src: E,
417
+ bitmapImage: f,
386
418
  naturalWidth: w.naturalWidth,
387
419
  naturalHeight: w.naturalHeight
388
420
  };
389
- w.onload = null, w.onerror = null, w.src = "", c[v] = g, r++, t == null || t(g), i == null || i(g, v), l === 1 ? y() : E(v);
421
+ w.onload = null, w.onerror = null, w.src = "", c[g] = y, r++, t == null || t(y), i == null || i(y, g), l === 1 ? v() : P(g);
390
422
  } catch {
391
- w.onload = null, w.onerror = null, w.src = "", r++, C(P, v, !0), l === 1 ? y() : E(v);
423
+ w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
392
424
  }
393
425
  }, w.onerror = () => {
394
- w.onload = null, w.onerror = null, w.src = "", r++, C(P, v, !0), l === 1 ? y() : E(v);
426
+ w.onload = null, w.onerror = null, w.src = "", r++, C(E, g, !0), l === 1 ? v() : P(g);
395
427
  };
396
- }, Ee = ({
428
+ }, Xe = ({
397
429
  cdnPathX: e,
398
430
  cdnPathY: t,
399
431
  configX: i,
@@ -404,34 +436,34 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
404
436
  onError: a
405
437
  }) => {
406
438
  let l = { x: !1, y: !1 }, c = [], h = [], u = { errorCount: 0, errors: [] }, m = { errorCount: 0, errors: [] };
407
- const f = e || i.imageList.length, C = t || o.imageList.length, y = () => {
439
+ const p = e || i.imageList.length, C = t || o.imageList.length, v = () => {
408
440
  if (l.x && l.y) {
409
- const I = {
441
+ const x = {
410
442
  errorCount: u.errorCount + m.errorCount,
411
443
  errors: [...u.errors, ...m.errors]
412
444
  };
413
- r == null || r(c, h, I);
445
+ r == null || r(c, h, x);
414
446
  }
415
- }, b = ({ cdnPath: I, config: E, orientation: w, loadedImages: v, loadStats: P, onFirstImageLoad: p }) => {
416
- const g = w === L.X, x = E.imageList.length ? E.imageList : so(I, E);
417
- ao({
418
- imagesUrls: x,
419
- onFirstImageLoad: p,
420
- onImageLoad: (k, S) => {
421
- n == null || n(k, S, w), v[S] = k;
447
+ }, b = ({ cdnPath: x, config: P, orientation: w, loadedImages: g, loadStats: E, onFirstImageLoad: f }) => {
448
+ const y = w === L.X, I = P.imageList.length ? P.imageList : po(x, P);
449
+ oi({
450
+ imagesUrls: I,
451
+ onFirstImageLoad: f,
452
+ onImageLoad: (T, k) => {
453
+ n == null || n(T, k, w), g[k] = T;
422
454
  },
423
- onError: (k) => {
424
- a == null || a({ ...k, orientation: w });
455
+ onError: (T) => {
456
+ a == null || a({ ...T, orientation: w });
425
457
  },
426
- onAllImagesLoad: (k, S) => {
427
- v.length = 0, k.forEach((A, H) => {
428
- A && (v[H] = A);
429
- }), P.errorCount = S.errorCount, P.errors = S.errors.map((A) => ({ ...A, orientation: w })), l[g ? "x" : "y"] = !0, y();
458
+ onAllImagesLoad: (T, k) => {
459
+ g.length = 0, T.forEach((X, O) => {
460
+ X && (g[O] = X);
461
+ }), E.errorCount = k.errorCount, E.errors = k.errors.map((X) => ({ ...X, orientation: w })), l[y ? "x" : "y"] = !0, v();
430
462
  },
431
- autoplayReverse: E.autoplayReverse
463
+ autoplayReverse: P.autoplayReverse
432
464
  });
433
465
  };
434
- f ? b({
466
+ p ? b({
435
467
  cdnPath: e,
436
468
  config: i,
437
469
  orientation: L.X,
@@ -444,9 +476,32 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
444
476
  orientation: L.Y,
445
477
  loadedImages: h,
446
478
  loadStats: m,
447
- onFirstImageLoad: f ? void 0 : s
448
- }) : l.y = !0, !f && !C && y();
449
- }, lo = `
479
+ onFirstImageLoad: p ? void 0 : s
480
+ }) : l.y = !0, !p && !C && v();
481
+ }, Se = ({
482
+ cdnPath: e,
483
+ config: t,
484
+ onFirstImageLoad: i,
485
+ onImageLoad: o,
486
+ onAllImagesLoad: s,
487
+ onError: n
488
+ }) => {
489
+ const r = t.imageList && t.imageList.length ? t.imageList : mo(e, t);
490
+ oi({
491
+ imagesUrls: r,
492
+ onFirstImageLoad: i,
493
+ onImageLoad: (a, l) => {
494
+ o == null || o(a, l);
495
+ },
496
+ onAllImagesLoad: (a, l) => {
497
+ s == null || s(a, l);
498
+ },
499
+ onError: (a) => {
500
+ n == null || n(a);
501
+ },
502
+ autoplayReverse: t.autoplayReverse
503
+ });
504
+ }, vo = `
450
505
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1052 156" aria-hidden="true">
451
506
  <path fill="currentColor" d="M409.9,145.6c-42.7-1.7-85.5-4.4-128.1-8.4c-21.3-2-42.6-4.3-63.8-7.1c-21.2-2.8-42.4-5.9-63.4-9.7c-21.1-3.8-42-8.2-62.7-13.7c-10.3-2.8-20.6-5.8-30.7-9.4c-10.1-3.5-20.1-7.6-29.5-12.7c-4.7-2.6-9.3-5.4-13.5-8.8c-2.1-1.7-4-3.6-5.8-5.6c-1.8-2-3.3-4.3-4.3-6.8c-1.1-2.5-1.6-5.3-1.4-8c0.2-2.7,1.1-5.4,2.4-7.7c2.7-4.8,6.7-8.5,11-11.7c8.6-6.4,18.4-10.9,28.3-15c9.9-4,20.1-7.3,30.4-10.3c-10.2,3.1-20.4,6.5-30.3,10.5c-9.8,4.1-19.6,8.7-28.1,15.1c-4.2,3.2-8.2,6.9-10.7,11.6c-1.2,2.3-2.1,4.8-2.3,7.5c-0.1,2.6,0.4,5.2,1.4,7.6c2.1,4.8,5.9,8.7,10,12.1c4.1,3.3,8.7,6.1,13.4,8.6c9.4,5,19.4,8.9,29.4,12.4c10.1,3.5,20.4,6.4,30.7,9.1c20.7,5.3,41.6,9.5,62.7,13.2c21,3.6,42.2,6.6,63.4,9.2c21.2,2.6,42.5,4.8,63.7,6.6c42.6,3.7,85.2,6,127.9,7.4L409.9,145.6z"/>
452
507
  <path fill="currentColor" d="M977.1,11.6c13.8,4.1,27.4,8.8,40.4,15.2c6.4,3.2,12.7,6.9,18.3,11.5c2.7,2.4,5.3,5,7.3,8c2,3,3.3,6.6,3.3,10.3c0,3.7-1.4,7.2-3.3,10.3c-2,3.1-4.5,5.7-7.3,8.1c-2.7,2.4-5.7,4.4-8.8,6.3c-1.6,0.9-3.1,1.9-4.7,2.7l-2.4,1.3l-2.4,1.2C1004.5,93,990.8,97.8,977,102c-6.9,2.1-13.8,4-20.8,5.8c-7,1.8-14,3.5-21,5c-14.1,3.1-28.2,5.9-42.4,8.3c-28.4,4.9-57,8.8-85.6,12c-57.3,6.4-114.8,10.2-172.4,12.2c-57.6,2-115.2,2.3-172.9,0.8l0.1-4c57.5,1.8,115.1,1.9,172.6,0.2c57.5-1.7,115-5.2,172.3-11.2c28.6-3.1,57.2-6.7,85.6-11.5c14.2-2.4,28.3-5,42.4-8.1c7-1.5,14-3.1,21-4.9c7-1.7,13.9-3.6,20.8-5.7c13.8-4.1,27.4-8.8,40.3-15.2l2.4-1.2l2.4-1.3c1.6-0.8,3.1-1.8,4.7-2.7c3-1.9,6-3.9,8.7-6.2c2.7-2.3,5.2-4.9,7.2-7.9c1.9-3,3.2-6.4,3.3-10c0-3.6-1.2-7-3.1-10c-1.9-3-4.4-5.6-7.1-8c-5.5-4.7-11.7-8.3-18.1-11.6C1004.5,20.6,990.8,15.8,977.1,11.6z"/>
@@ -457,10 +512,10 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
457
512
  <path fill="currentColor" d="M10.9,9.7c0-1.1-0.8-2-2.5-2.5c1.3-0.5,1.9-1.3,1.9-2.3c0-1.7-1.7-2.8-4.6-2.8c-1.5,0-2.7,0.3-3.6,0.8v1.7c0.9-0.4,2.3-0.7,3.4-0.7C7,3.9,8,4.4,8,5.1c0,0.8-0.7,1.3-2.4,1.3H4.3v1.6h1.3c2,0,2.9,0.8,2.9,1.6c0,0.8-1,1.5-2.8,1.5c-1.5,0-2.8-0.3-3.7-0.6v1.7c0.9,0.3,2.1,0.6,3.8,0.6C9.2,12.8,10.9,11.4,10.9,9.7"/>
458
513
  </g>
459
514
  </svg>
460
- `, ho = (e) => {
515
+ `, yo = (e) => {
461
516
  const t = document.createElement("div");
462
- return t.innerHTML = lo, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
463
- }, co = `
517
+ return t.innerHTML = vo, t.style.bottom = `${e}%`, t.className = "cloudimage-360-view-360-circle", t;
518
+ }, bo = `
464
519
  <svg width="150" height="87" viewBox="0 0 150 87" xmlns="http://www.w3.org/2000/svg">
465
520
  <g clip-path="url(#clip0_751_188)">
466
521
  <g filter="url(#filter0_d_751_188)">
@@ -501,45 +556,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
501
556
  </clipPath>
502
557
  </defs>
503
558
  </svg>
504
- `, uo = (e) => {
559
+ `, wo = (e) => {
505
560
  const t = document.createElement("div");
506
- return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML = co, t;
507
- }, po = (e, t) => {
561
+ return t.className = "cloudimage-initial-icon", t.setAttribute("aria-label", "360 degree view - drag to rotate"), e ? (t.style.backgroundImage = `url('${e}')`, t.style.backgroundPosition = "50% 50%", t.style.backgroundSize = "contain", t.style.backgroundRepeat = "no-repeat") : t.innerHTML = bo, t;
562
+ }, Co = (e, t) => {
508
563
  const { width: i, height: o } = t, s = document.createElement("canvas");
509
564
  return s.width = i, s.height = o, s.style.width = "100%", s.style.height = "auto", e.appendChild(s), s;
510
- }, Qe = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', mo = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', fo = () => {
565
+ }, si = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', Io = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/></svg>', xo = () => {
511
566
  const e = document.createElement("button");
512
- return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = Qe, e;
513
- }, vo = (e, t) => {
514
- e && (e.innerHTML = t ? mo : Qe, e.setAttribute("aria-label", t ? "Exit fullscreen" : "View fullscreen"));
515
- }, ke = (e) => {
567
+ return e.className = "cloudimage-360-button cloudimage-360-fullscreen-button", e.setAttribute("aria-label", "View fullscreen"), e.setAttribute("type", "button"), e.innerHTML = si, e;
568
+ }, Po = (e, t) => {
569
+ e && (e.innerHTML = t ? Io : si, e.setAttribute("aria-label", t ? "Exit fullscreen" : "View fullscreen"));
570
+ }, Ye = (e) => {
516
571
  const t = document.createElement("div");
517
572
  return t.className = "cloudimage-360-icons-container", e.appendChild(t), t;
518
- }, go = (e) => {
573
+ }, Eo = (e) => {
519
574
  const t = document.createElement("div");
520
575
  return t.className = "cloudimage-360-inner-box", t.setAttribute("role", "img"), t.setAttribute("aria-label", "360 degree product view. Use mouse drag or arrow keys to rotate."), e.appendChild(t), t;
521
- }, yo = (e) => {
576
+ }, To = (e) => {
522
577
  const t = document.createElement("div");
523
578
  t.className = "cloudimage-360-loader";
524
579
  const i = document.createElement("span");
525
580
  return i.className = "percentage", i.innerText = "0%", t.appendChild(i), e.appendChild(t), t;
526
- }, ie = (e, t) => {
581
+ }, ue = (e, t) => {
527
582
  const i = e.querySelector(t);
528
583
  i && i.parentNode.removeChild(i);
529
- }, bo = () => {
584
+ }, Ao = () => {
530
585
  const e = document.createElement("div");
531
586
  return e.className = "cloudimage-loading-spinner", e;
532
- }, wo = (e) => {
587
+ }, ko = (e) => {
533
588
  const t = document.createElement("div");
534
589
  return t.className = "cloudimage-360-hotspot-container", e.appendChild(t), t;
535
- }, Co = (e) => {
590
+ }, Xo = (e) => {
536
591
  const t = document.createElement("div");
537
592
  return t.className = "cloudimage-360-sr-only", t.setAttribute("role", "status"), t.setAttribute("aria-live", "polite"), t.setAttribute("aria-atomic", "true"), e.appendChild(t), t;
538
- }, xo = (e, t) => {
593
+ }, So = (e, t) => {
539
594
  e && (e.textContent = "", setTimeout(() => {
540
595
  e.textContent = t;
541
596
  }, 50));
542
- }, ti = {
597
+ }, ni = {
543
598
  drag: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2"/><path d="M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"/><path d="M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8"/><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"/></svg>',
544
599
  swipe: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m18 16 4-4-4-4"/><path d="m6 8-4 4 4 4"/><path d="M8 12h8"/></svg>',
545
600
  click: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m9 9 5 12 1.8-5.2L21 14Z"/><path d="M7.2 2.2 8 5.1"/><path d="m5.1 8-2.9-.8"/><path d="M14 4.1 12 6"/><path d="m6 12-1.9 2"/></svg>',
@@ -547,7 +602,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
547
602
  pinch: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 6l4 4"/><path d="M18 6l-4 4"/><path d="M6 18l4-4"/><path d="M18 18l-4-4"/><circle cx="12" cy="12" r="2"/></svg>',
548
603
  keys: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect width="20" height="16" x="2" y="4" rx="2"/><path d="m9 10 3 3 3-3"/></svg>',
549
604
  fullscreen: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>'
550
- }, Io = {
605
+ }, Yo = {
551
606
  drag: "Drag to rotate",
552
607
  swipe: "Swipe to rotate",
553
608
  click: "Click to zoom",
@@ -555,45 +610,45 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
555
610
  pinch: "Pinch to zoom",
556
611
  keys: "Use arrow keys",
557
612
  fullscreen: "Click for fullscreen"
558
- }, Po = (e) => {
613
+ }, Lo = (e) => {
559
614
  const t = document.createElement("div");
560
615
  t.className = "cloudimage-360-hint-item";
561
- const i = Io[e];
616
+ const i = Yo[e];
562
617
  return t.innerHTML = `
563
- ${ti[e]}
618
+ ${ni[e]}
564
619
  <span>${i}</span>
565
620
  `, t;
566
- }, Te = (e, t = []) => {
621
+ }, Le = (e, t = []) => {
567
622
  if (!t || t.length === 0) return null;
568
623
  const i = document.createElement("div");
569
624
  i.className = "cloudimage-360-hints-overlay", i.setAttribute("role", "tooltip"), i.setAttribute("aria-label", "Interaction hints");
570
625
  const o = document.createElement("div");
571
626
  return o.className = "cloudimage-360-hints-container", t.forEach((s) => {
572
- ti[s] && o.appendChild(Po(s));
627
+ ni[s] && o.appendChild(Lo(s));
573
628
  }), i.appendChild(o), e.appendChild(i), i;
574
- }, Se = (e, t) => t ? ["swipe", "pinch"] : ["drag", "dblclick"], Ae = (e) => {
629
+ }, Me = (e, t) => t ? ["swipe", "pinch"] : ["drag", "dblclick"], Oe = (e) => {
575
630
  e && e.classList.add("visible");
576
- }, Eo = (e) => {
631
+ }, Mo = (e) => {
577
632
  e && (e.classList.remove("visible"), e.classList.add("hiding"), setTimeout(() => {
578
633
  e.classList.remove("hiding");
579
634
  }, 300));
580
- }, ko = (e) => {
635
+ }, Oo = (e) => {
581
636
  if (!e || typeof e != "object") return null;
582
637
  const t = Object.keys(e).map((o) => parseInt(o, 10)).filter((o) => !isNaN(o)).sort((o, s) => o - s);
583
638
  if (t.length === 0) return null;
584
639
  const i = Math.floor(t.length / 2);
585
640
  return t[i];
586
- }, To = (e) => {
641
+ }, Ho = (e) => {
587
642
  const t = [];
588
643
  return !e || !Array.isArray(e) || e.forEach((i, o) => {
589
- const s = ko(i.positions);
644
+ const s = Oo(i.positions);
590
645
  s !== null && t.push({
591
646
  id: i.id || `hotspot-${o}`,
592
647
  frame: s,
593
648
  label: i.label || null
594
649
  });
595
650
  }), t;
596
- }, So = 400, Ao = (e, t, i, o) => {
651
+ }, Ro = 400, zo = (e, t, i, o) => {
597
652
  const s = document.createElement("button");
598
653
  s.className = "cloudimage-360-hotspot-timeline-dot", s.setAttribute("type", "button"), s.setAttribute("aria-label", o || `Go to hotspot at frame ${t + 1}`), s.setAttribute("data-frame", t.toString()), s.setAttribute("data-hotspot-id", e);
599
654
  const n = i > 1 ? t / (i - 1) * 100 : 0;
@@ -604,7 +659,7 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
604
659
  s.addEventListener("mouseenter", () => {
605
660
  a = setTimeout(() => {
606
661
  r.classList.add("visible");
607
- }, So);
662
+ }, Ro);
608
663
  }), s.addEventListener("mouseleave", () => {
609
664
  a && (clearTimeout(a), a = null), r.classList.remove("visible");
610
665
  }), s.addEventListener("click", () => {
@@ -612,8 +667,8 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
612
667
  });
613
668
  }
614
669
  return s;
615
- }, Oo = (e, t, i) => {
616
- const o = To(i);
670
+ }, Zo = (e, t, i) => {
671
+ const o = Ho(i);
617
672
  if (o.length === 0) return null;
618
673
  const s = document.createElement("div");
619
674
  s.className = "cloudimage-360-hotspot-timeline", s.setAttribute("role", "navigation"), s.setAttribute("aria-label", "Hotspot timeline navigation");
@@ -621,22 +676,22 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
621
676
  n.className = "cloudimage-360-hotspot-timeline-track";
622
677
  const r = document.createElement("div");
623
678
  return r.className = "cloudimage-360-hotspot-timeline-indicator", o.forEach(({ id: a, frame: l, label: c }) => {
624
- const h = Ao(a, l, t, c);
679
+ const h = zo(a, l, t, c);
625
680
  n.appendChild(h);
626
681
  }), n.appendChild(r), s.appendChild(n), e.appendChild(s), {
627
682
  element: s,
628
683
  indicator: r,
629
684
  hotspotFrames: o
630
685
  };
631
- }, Lo = (e, t, i) => {
686
+ }, He = (e, t, i) => {
632
687
  if (!e) return;
633
688
  const o = i > 1 ? t / (i - 1) * 100 : 0;
634
689
  e.style.left = `${o}%`;
635
- }, Mo = (e) => {
690
+ }, Do = (e) => {
636
691
  e && e.classList.add("visible");
637
- }, Ho = (e) => {
692
+ }, Bo = (e) => {
638
693
  e && e.classList.remove("visible");
639
- }, oe = (e, t = []) => {
694
+ }, Ut = (e, t = []) => {
640
695
  if (!e) return t;
641
696
  if (Array.isArray(e)) return e;
642
697
  try {
@@ -644,15 +699,15 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
644
699
  } catch (i) {
645
700
  return console.warn("CloudImage 360: Failed to parse JSON:", i.message), t;
646
701
  }
647
- }, Xo = (e, t) => {
702
+ }, Go = (e, t) => {
648
703
  const [i, o] = e.split("?");
649
704
  if (!o) return e;
650
705
  const s = new RegExp(`^${t}=|&${t}=`), n = o.split("&").filter((r) => !s.test(r)).join("&");
651
706
  return n ? `${i}?${n}` : i;
652
- }, Yo = (e) => {
653
- const t = Xo(e, "width"), i = t.includes("?") ? "&" : "?";
707
+ }, _o = (e) => {
708
+ const t = Go(e, "width"), i = t.includes("?") ? "&" : "?";
654
709
  return `${t}${i}width=${150 * devicePixelRatio}`;
655
- }, Ro = (e) => {
710
+ }, Fo = (e) => {
656
711
  const t = {
657
712
  root: null,
658
713
  rootMargin: "0px",
@@ -666,25 +721,25 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
666
721
  r.isIntersecting && (i(r.target), n.unobserve(r.target));
667
722
  });
668
723
  }, t).observe(e);
669
- }, zo = (e, t) => {
670
- const i = Je(1, t);
671
- return e.replace("{index}", i);
672
- }, Zo = (e, t) => {
724
+ }, No = (e, t) => {
725
+ const i = qt(1, t);
726
+ return e.replace("{index}", i).replace("{indexX}", i).replace("{indexY}", i);
727
+ }, Wo = (e, t) => {
673
728
  const [i] = e, o = /(https?):\/\//i.test(i);
674
- return Pt({
729
+ return at({
675
730
  ...t,
676
731
  folder: o ? "" : t.folder,
677
732
  filename: i
678
733
  });
679
- }, Do = (e, t) => {
734
+ }, Vo = (e, t) => {
680
735
  const { imageList: i, indexZeroBase: o } = t;
681
736
  if (i.length) {
682
- const s = oe(i, null);
737
+ const s = Ut(i, null);
683
738
  if (s)
684
- return Zo(s, t);
739
+ return Wo(s, t);
685
740
  }
686
- return zo(e, o);
687
- }, Oe = (e, t, i) => {
741
+ return No(e, o);
742
+ }, Re = (e, t, i) => {
688
743
  const o = new Image();
689
744
  return o.setAttribute(t ? "data-src" : "src", e), o.className = i, o.style.cssText = `
690
745
  position: ${t ? "absolute" : "static"};
@@ -695,9 +750,9 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
695
750
  object-position: center;
696
751
  filter: blur(10px);
697
752
  `, o;
698
- }, Le = (e, t, i) => {
699
- const { innerBox: o, imageList: s, lazyload: n } = t || {}, [r] = s, a = r || Do(e, t), l = Yo(a), c = Oe(l, n, "cloudimage-lazy"), h = Oe(l, !1, "cloudimage-360-placeholder"), u = (m) => {
700
- ie(o, ".cloudimage-lazy"), i && i({
753
+ }, he = (e, t, i) => {
754
+ 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 = (m) => {
755
+ ue(o, ".cloudimage-lazy"), i && i({
701
756
  event: m,
702
757
  width: c.width,
703
758
  height: c.height,
@@ -706,11 +761,11 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
706
761
  src: l
707
762
  });
708
763
  };
709
- c.onload = u, o.appendChild(c), o.appendChild(h), Ro(c);
710
- }, Bo = (e, t, i) => {
764
+ c.onload = u, o.appendChild(c), o.appendChild(h), Fo(c);
765
+ }, jo = (e, t, i) => {
711
766
  const o = e / i, s = t / i;
712
767
  return { zoomedWidth: o, zoomedHeight: s };
713
- }, _o = ({
768
+ }, Uo = ({
714
769
  pointerX: e,
715
770
  pointerY: t,
716
771
  imageData: i,
@@ -723,84 +778,98 @@ const Ce = /* @__PURE__ */ Pi(Fi), Y = {
723
778
  let c = e / n * a - o / 2, h = t / r * l - s / 2;
724
779
  const u = Math.max(0, a - o), m = Math.max(0, l - s);
725
780
  return c = Math.max(0, Math.min(c, u)), h = Math.max(0, Math.min(h, m)), { zoomOffsetX: c, zoomOffsetY: h };
726
- }, Me = (e, { bottom: t, top: i }) => {
781
+ }, ze = (e, { bottom: t, top: i }) => {
727
782
  e ? t() : i();
728
- }, He = (e, { left: t, right: i }) => {
783
+ }, Ze = (e, { left: t, right: i }) => {
729
784
  e ? t() : i();
730
- }, Fo = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
785
+ }, $o = ({ autoplayBehavior: e, spinY: t, reversed: i, loopTriggers: o }) => {
731
786
  switch (e) {
732
- case Y.SPIN_XY:
733
- case Y.SPIN_YX:
734
- t ? Me(i, o) : He(i, o);
787
+ case S.SPIN_XY:
788
+ case S.SPIN_YX:
789
+ t ? ze(i, o) : Ze(i, o);
735
790
  break;
736
- case Y.SPIN_Y:
737
- Me(i, o);
791
+ case S.SPIN_Y:
792
+ ze(i, o);
738
793
  break;
739
- case Y.SPIN_X:
794
+ case S.SPIN_X:
740
795
  default:
741
- He(i, o);
796
+ Ze(i, o);
742
797
  }
743
- }, Wo = ({
798
+ }, Ko = ({
744
799
  autoplayBehavior: e,
745
800
  activeImageX: t,
746
801
  activeImageY: i,
747
802
  amountX: o,
748
803
  amountY: s,
749
- autoplayReverse: n
804
+ autoplayReverse: n,
805
+ isGridMode: r = !1
750
806
  }) => {
751
- const r = (a, l) => {
752
- const c = l - 1;
753
- return n ? a === 0 : a === c;
807
+ const a = (l, c) => {
808
+ const h = c - 1;
809
+ return n ? l === 0 : l === h;
754
810
  };
811
+ if (r)
812
+ switch (e) {
813
+ case S.SPIN_X:
814
+ return a(t, o);
815
+ case S.SPIN_Y:
816
+ return a(i, s);
817
+ case S.SPIN_XY:
818
+ case S.SPIN_YX:
819
+ default:
820
+ return a(t, o) && a(i, s);
821
+ }
755
822
  switch (e) {
756
- case Y.SPIN_XY:
757
- case Y.SPIN_Y:
758
- return r(i, s);
759
- case Y.SPIN_X:
760
- case Y.SPIN_YX:
823
+ case S.SPIN_XY:
824
+ case S.SPIN_Y:
825
+ return a(i, s);
826
+ case S.SPIN_X:
827
+ case S.SPIN_YX:
761
828
  default:
762
- return r(t, o);
829
+ return a(t, o);
763
830
  }
764
- }, No = ({
831
+ }, qo = ({
765
832
  autoplayBehavior: e,
766
833
  activeImageX: t,
767
834
  activeImageY: i,
768
835
  amountX: o,
769
836
  amountY: s,
770
837
  autoplayReverse: n,
771
- spinDirection: r
838
+ spinDirection: r,
839
+ isGridMode: a = !1
772
840
  }) => {
773
- const a = t === (n ? 0 : o - 1), l = i === (n ? 0 : s - 1);
774
- return e === Y.SPIN_XY || e === Y.SPIN_YX ? r === "x" && a || r === "y" && l : !1;
775
- }, Vo = (e, t, i) => {
841
+ if (a) return !1;
842
+ const l = t === (n ? 0 : o - 1), c = i === (n ? 0 : s - 1);
843
+ return e === S.SPIN_XY || e === S.SPIN_YX ? r === "x" && l || r === "y" && c : !1;
844
+ }, Jo = (e, t, i) => {
776
845
  if (!i) return "x";
777
846
  if (!t) return "y";
778
847
  switch (e) {
779
- case Y.SPIN_XY:
848
+ case S.SPIN_XY:
780
849
  return "x";
781
- case Y.SPIN_YX:
850
+ case S.SPIN_YX:
782
851
  return "y";
783
- case Y.SPIN_Y:
852
+ case S.SPIN_Y:
784
853
  return "y";
785
- case Y.SPIN_X:
854
+ case S.SPIN_X:
786
855
  default:
787
856
  return "x";
788
857
  }
789
- }, Go = (e) => e === "x" ? "y" : "x", Xe = (e, t) => {
790
- const i = [...Ni];
791
- return t ? [...i, ...Vi].includes(e) : i.includes(e);
792
- }, Ye = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
858
+ }, Qo = (e) => e === "x" ? "y" : "x", De = (e, t) => {
859
+ const i = [...Ji];
860
+ return t ? [...i, ...Qi].includes(e) : i.includes(e);
861
+ }, Be = ({ deltaX: e, deltaY: t, reversed: i, allowSpinX: o, allowSpinY: s, threshold: n = 0 }) => {
793
862
  const r = o && !s || s && !o ? 0 : n, a = Math.abs(e), l = Math.abs(t);
794
863
  return o && a - r > l ? i ? e > 0 ? "left" : "right" : e > 0 ? "right" : "left" : s && l - r > a ? i ? t > 0 ? "up" : "down" : t > 0 ? "down" : "up" : null;
795
- }, jo = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, Uo = (e, t = 150) => {
864
+ }, ts = () => "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0, es = (e, t = 150) => {
796
865
  let i;
797
866
  return function(...o) {
798
867
  clearTimeout(i), i = setTimeout(() => {
799
868
  e.apply(this, o);
800
869
  }, t);
801
870
  };
802
- }, $o = () => document.fullscreenEnabled || document.webkitFullscreenEnabled, te = () => document.fullscreenElement || document.webkitFullscreenElement, Ko = (e) => e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), Re = () => document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), W = 1;
803
- class qo {
871
+ }, is = () => document.fullscreenEnabled || document.webkitFullscreenEnabled, ce = () => document.fullscreenElement || document.webkitFullscreenElement, os = (e) => e.requestFullscreen ? e.requestFullscreen() : e.webkitRequestFullscreen ? e.webkitRequestFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), Ge = () => document.exitFullscreen ? document.exitFullscreen() : document.webkitExitFullscreen ? document.webkitExitFullscreen() : Promise.reject(new Error("Fullscreen API not supported")), N = 1;
872
+ class ss {
804
873
  constructor(t, {
805
874
  zoomMax: i = 5,
806
875
  zoomStep: o = 0.5,
@@ -826,7 +895,7 @@ class qo {
826
895
  this._applyZoom(this.zoom - this.zoomStep);
827
896
  }
828
897
  resetZoom() {
829
- this._applyZoom(W);
898
+ this._applyZoom(N);
830
899
  }
831
900
  setZoom(t) {
832
901
  this._applyZoom(t);
@@ -838,11 +907,11 @@ class qo {
838
907
  return this.zoom;
839
908
  }
840
909
  isZoomed() {
841
- return this.zoom > W;
910
+ return this.zoom > N;
842
911
  }
843
912
  // --- Mouse pan management ---
844
913
  startPan(t, i) {
845
- return this.zoom <= W ? !1 : (this.isPanning = !0, this.panStartX = t, this.panStartY = i, document.addEventListener("mousemove", this._onMouseMove), document.addEventListener("mouseup", this._onMouseUp), !0);
914
+ return this.zoom <= N ? !1 : (this.isPanning = !0, this.panStartX = t, this.panStartY = i, document.addEventListener("mousemove", this._onMouseMove), document.addEventListener("mouseup", this._onMouseUp), !0);
846
915
  }
847
916
  _stopPanListeners() {
848
917
  document.removeEventListener("mousemove", this._onMouseMove), document.removeEventListener("mouseup", this._onMouseUp);
@@ -859,12 +928,14 @@ class qo {
859
928
  _onWheel(t) {
860
929
  if (!t.ctrlKey && !t.metaKey) return;
861
930
  t.preventDefault();
862
- const i = t.deltaY > 0 ? -1 : 1, o = this.zoom + i * this.zoomStep;
863
- this._zoomTowardPoint(o, t.clientX, t.clientY);
931
+ let i = -t.deltaY;
932
+ t.deltaMode === 1 && (i *= 40), t.deltaMode === 2 && (i *= 800);
933
+ const o = Math.pow(2, i / 300), s = this.zoom * o;
934
+ this._zoomTowardPoint(s, t.clientX, t.clientY);
864
935
  }
865
936
  // --- Double-click toggle ---
866
937
  _onDblClick(t) {
867
- t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom > W ? this._applyZoom(W) : this._zoomTowardPoint(2, t.clientX, t.clientY));
938
+ t.target && t.target.closest && (t.target.closest(".cloudimage-360-button") || t.target.closest(".cloudimage-360-hotspot-timeline") || t.target.closest(".cloudimage-360-hotspot") || t.target.closest(".cloudimage-360-zoom-controls")) || (this.zoom > N ? this._applyZoom(N) : this._zoomTowardPoint(2, t.clientX, t.clientY));
868
939
  }
869
940
  // --- Safari GestureEvent (trackpad pinch) ---
870
941
  _onGestureStart(t) {
@@ -883,7 +954,7 @@ class qo {
883
954
  return t === 187 || t === 107 ? (this.zoomIn(), !0) : t === 189 || t === 109 ? (this.zoomOut(), !0) : t === 48 || t === 96 ? (this.resetZoom(), !0) : !1;
884
955
  }
885
956
  handleKeyPan(t, i = 50) {
886
- if (this.zoom <= W) return !1;
957
+ if (this.zoom <= N) return !1;
887
958
  let o = 0, s = 0;
888
959
  switch (t) {
889
960
  case 37:
@@ -905,7 +976,7 @@ class qo {
905
976
  }
906
977
  // --- Touch pan (called by GestureRecognizer) ---
907
978
  applyTouchPan(t, i) {
908
- this.zoom <= W || this._applyPan(this.panX - t, this.panY - i);
979
+ this.zoom <= N || this._applyPan(this.panX - t, this.panY - i);
909
980
  }
910
981
  applyTouchZoom(t) {
911
982
  this._applyZoom(t);
@@ -913,7 +984,7 @@ class qo {
913
984
  // --- Internal ---
914
985
  _zoomTowardPoint(t, i, o) {
915
986
  var r;
916
- const s = Math.max(W, Math.min(t, this.zoomMax));
987
+ const s = Math.max(N, Math.min(t, this.zoomMax));
917
988
  if (s === this.zoom) return;
918
989
  const n = (r = this.container.querySelector("canvas")) == null ? void 0 : r.getBoundingClientRect();
919
990
  if (n) {
@@ -923,14 +994,14 @@ class qo {
923
994
  this.zoom = s, this._clampPan(), this._emit();
924
995
  }
925
996
  _applyZoom(t) {
926
- const i = Math.max(W, Math.min(t, this.zoomMax));
927
- i !== this.zoom && (this.zoom = i, this.zoom <= W && (this.panX = this.drawWidth / 2, this.panY = this.drawHeight / 2), this._clampPan(), this._emit());
997
+ const i = Math.max(N, Math.min(t, this.zoomMax));
998
+ i !== this.zoom && (this.zoom = i, this.zoom <= N && (this.panX = this.drawWidth / 2, this.panY = this.drawHeight / 2), this._clampPan(), this._emit());
928
999
  }
929
1000
  _applyPan(t, i) {
930
1001
  this.panX = t, this.panY = i, this._clampPan(), this._emit();
931
1002
  }
932
1003
  _clampPan() {
933
- if (this.zoom <= W || !this.drawWidth || !this.drawHeight) return;
1004
+ if (this.zoom <= N || !this.drawWidth || !this.drawHeight) return;
934
1005
  const t = this.drawWidth / (2 * this.zoom), i = this.drawHeight / (2 * this.zoom);
935
1006
  this.panX = Math.max(t, Math.min(this.panX, this.drawWidth - t)), this.panY = Math.max(i, Math.min(this.panY, this.drawHeight - i));
936
1007
  }
@@ -938,7 +1009,7 @@ class qo {
938
1009
  typeof this.onZoomChange == "function" && this.onZoomChange(this.zoom, this.panX, this.panY);
939
1010
  }
940
1011
  }
941
- class Jo {
1012
+ class ns {
942
1013
  constructor(t, {
943
1014
  onPinchZoom: i,
944
1015
  onPan: o,
@@ -1001,7 +1072,7 @@ class Jo {
1001
1072
  this.isPinching && (!t.touches || t.touches.length < 2) && (this.isPinching = !1, this.initialPinchDistance = 0, t.touches && t.touches.length === 1 && (this.lastTouchX = t.touches[0].pageX, this.lastTouchY = t.touches[0].pageY));
1002
1073
  }
1003
1074
  }
1004
- const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', ts = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', es = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>', is = (e, {
1075
+ const rs = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="11" x2="11" y1="8" y2="14"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', as = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><line x1="21" x2="16.65" y1="21" y2="16.65"/><line x1="8" x2="14" y1="11" y2="11"/></svg>', ls = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>', hs = (e, {
1005
1076
  position: t = "bottom-right",
1006
1077
  onZoomIn: i,
1007
1078
  onZoomOut: o,
@@ -1011,20 +1082,22 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
1011
1082
  const r = document.createElement("div");
1012
1083
  r.className = "cloudimage-360-zoom-controls", r.setAttribute("data-position", t), r.setAttribute("role", "toolbar"), r.setAttribute("aria-label", "Zoom controls");
1013
1084
  const a = document.createElement("button");
1014
- a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML = Qo, a.addEventListener("click", (h) => {
1015
- h.stopPropagation(), typeof i == "function" && i();
1085
+ a.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-in", a.setAttribute("aria-label", "Zoom in"), a.innerHTML = rs, a.addEventListener("click", (u) => {
1086
+ u.stopPropagation(), typeof i == "function" && i();
1016
1087
  });
1017
1088
  const l = document.createElement("button");
1018
- l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML = ts, l.disabled = !0, l.addEventListener("click", (h) => {
1019
- h.stopPropagation(), typeof o == "function" && o();
1089
+ l.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-out", l.setAttribute("aria-label", "Zoom out"), l.innerHTML = as, l.disabled = !0, l.addEventListener("click", (u) => {
1090
+ u.stopPropagation(), typeof o == "function" && o();
1020
1091
  });
1021
1092
  const c = document.createElement("button");
1022
- return c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML = es, c.disabled = !0, c.addEventListener("click", (h) => {
1023
- h.stopPropagation(), typeof s == "function" && s();
1024
- }), r.appendChild(a), r.appendChild(l), r.appendChild(c), e.appendChild(r), {
1093
+ c.className = "cloudimage-360-zoom-btn cloudimage-360-zoom-btn-reset", c.setAttribute("aria-label", "Reset zoom"), c.innerHTML = ls, c.disabled = !0, c.addEventListener("click", (u) => {
1094
+ u.stopPropagation(), typeof s == "function" && s();
1095
+ });
1096
+ const h = document.createElement("span");
1097
+ return h.className = "cloudimage-360-zoom-separator", r.appendChild(a), r.appendChild(l), r.appendChild(h), r.appendChild(c), e.appendChild(r), {
1025
1098
  element: r,
1026
- updateState(h) {
1027
- a.disabled = h >= n, l.disabled = h <= 1, c.disabled = h <= 1;
1099
+ updateState(u) {
1100
+ a.disabled = u >= n, l.disabled = u <= 1, c.disabled = u <= 1;
1028
1101
  },
1029
1102
  show() {
1030
1103
  r.classList.add("visible");
@@ -1036,11 +1109,11 @@ const Qo = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewB
1036
1109
  r.parentNode && r.parentNode.removeChild(r);
1037
1110
  }
1038
1111
  };
1039
- }, ei = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", os = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), ze = typeof self < "u" && self.Blob && new Blob([os(ei)], { type: "text/javascript;charset=utf-8" });
1040
- function ss(e) {
1112
+ }, ri = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0IHY9KHQsYSxlKT0+e2NvbnN0IHM9dC9lLG49YS9lO3JldHVybnt6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpufX0sej0oe3BvaW50ZXJYOnQscG9pbnRlclk6YSxpbWFnZURhdGE6ZSx6b29tZWRXaWR0aDpzLHpvb21lZEhlaWdodDpuLGRyYXdXaWR0aDppLGRyYXdIZWlnaHQ6Y30pPT57Y29uc3R7bmF0dXJhbFdpZHRoOmcsbmF0dXJhbEhlaWdodDp1fT1lO2xldCBmPXQvaSpnLXMvMixtPWEvYyp1LW4vMjtjb25zdCB4PU1hdGgubWF4KDAsZy1zKSxPPU1hdGgubWF4KDAsdS1uKTtyZXR1cm4gZj1NYXRoLm1heCgwLE1hdGgubWluKGYseCkpLG09TWF0aC5tYXgoMCxNYXRoLm1pbihtLE8pKSx7em9vbU9mZnNldFg6Zix6b29tT2Zmc2V0WTptfX07bGV0IG8saCxyLGQsbCx3O3NlbGYub25tZXNzYWdlPWFzeW5jIHQ9Pntjb25zdHthY3Rpb246YSxvZmZzY3JlZW46ZSxkZXZpY2VQaXhlbFJhdGlvOnMsaW1hZ2VEYXRhOm4sem9vbVNjYWxlOmkscG9pbnRlclg6Yyxwb2ludGVyWTpnLGltYWdlQXNwZWN0UmF0aW86dSxjb250YWluZXJXaWR0aDpmLGNvbnRhaW5lckhlaWdodDptfT10LmRhdGE7c3dpdGNoKGEpe2Nhc2UiaW5pdENhbnZhcyI6QyhlLHMpO2JyZWFrO2Nhc2UiYWRhcHRDYW52YXNTaXplIjpwKHUsZixtKTticmVhaztjYXNlImRyYXdJbWFnZU9uQ2FudmFzIjpJKG4saSxjLGcpO2JyZWFrfX07Y29uc3QgQz0odCxhKT0+e289dCxoPW8uZ2V0Q29udGV4dCgiMmQiKSxyPWF9LHA9KHQsYSxlKT0+e2NvbnN0IHM9YS9lO3c9dD5zLG8ud2lkdGg9YSpyLG8uaGVpZ2h0PWUqcixoLnNjYWxlKHIsciksdz8oZD1hLGw9YS90KToobD1lLGQ9ZSp0KSxoLmltYWdlU21vb3RoaW5nRW5hYmxlZD0hMCxoLmltYWdlU21vb3RoaW5nUXVhbGl0eT0iaGlnaCJ9LEk9KHQ9e30sYT0xLGU9MCxzPTApPT57Y29uc3R7Yml0bWFwSW1hZ2U6bn09dDtpZighb3x8IW4pcmV0dXJuO2xldCBpLGM7aWYodz8oaT0wLGM9KG8uaGVpZ2h0L3ItbCkvMik6KGk9KG8ud2lkdGgvci1kKS8yLGM9MCksaC5jbGVhclJlY3QoMCwwLG8ud2lkdGgsby5oZWlnaHQpLGEhPT0xKXtjb25zdHtuYXR1cmFsV2lkdGg6ZyxuYXR1cmFsSGVpZ2h0OnV9PXQse3pvb21lZFdpZHRoOmYsem9vbWVkSGVpZ2h0Om19PXYoZyx1LGEpLHt6b29tT2Zmc2V0WDp4LHpvb21PZmZzZXRZOk99PXooe3BvaW50ZXJYOmUscG9pbnRlclk6cyxpbWFnZURhdGE6dCx6b29tZWRXaWR0aDpmLHpvb21lZEhlaWdodDptLGRyYXdXaWR0aDpkLGRyYXdIZWlnaHQ6bH0pO2guZHJhd0ltYWdlKG4seCxPLGYsbSxpLGMsZCxsKX1lbHNlIGguZHJhd0ltYWdlKG4saSxjLGQsbCl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2FudmFzLndvcmtlci1DZzBma3BEMS5qcy5tYXAK", cs = (e) => Uint8Array.from(atob(e), (t) => t.charCodeAt(0)), _e = typeof self < "u" && self.Blob && new Blob([cs(ri)], { type: "text/javascript;charset=utf-8" });
1113
+ function ds(e) {
1041
1114
  let t;
1042
1115
  try {
1043
- if (t = ze && (self.URL || self.webkitURL).createObjectURL(ze), !t) throw "";
1116
+ if (t = _e && (self.URL || self.webkitURL).createObjectURL(_e), !t) throw "";
1044
1117
  const i = new Worker(t, {
1045
1118
  name: e == null ? void 0 : e.name
1046
1119
  });
@@ -1049,7 +1122,7 @@ function ss(e) {
1049
1122
  }), i;
1050
1123
  } catch {
1051
1124
  return new Worker(
1052
- "data:text/javascript;base64," + ei,
1125
+ "data:text/javascript;base64," + ri,
1053
1126
  {
1054
1127
  name: e == null ? void 0 : e.name
1055
1128
  }
@@ -1058,7 +1131,7 @@ function ss(e) {
1058
1131
  t && (self.URL || self.webkitURL).revokeObjectURL(t);
1059
1132
  }
1060
1133
  }
1061
- class ns {
1134
+ class us {
1062
1135
  constructor() {
1063
1136
  this.canvas = null, this.ctx = null, this.dpr = 1, this.drawWidth = 0, this.drawHeight = 0, this.wideImage = !1;
1064
1137
  }
@@ -1111,7 +1184,7 @@ class ns {
1111
1184
  if (!this.canvas || !this.ctx || !n) return;
1112
1185
  let r, a;
1113
1186
  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) {
1114
- const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = Bo(l, c, i), { zoomOffsetX: m, zoomOffsetY: f } = _o({
1187
+ const { naturalWidth: l, naturalHeight: c } = t, { zoomedWidth: h, zoomedHeight: u } = jo(l, c, i), { zoomOffsetX: m, zoomOffsetY: p } = Uo({
1115
1188
  pointerX: o,
1116
1189
  pointerY: s,
1117
1190
  imageData: t,
@@ -1123,7 +1196,7 @@ class ns {
1123
1196
  this.ctx.drawImage(
1124
1197
  n,
1125
1198
  m,
1126
- f,
1199
+ p,
1127
1200
  h,
1128
1201
  u,
1129
1202
  r,
@@ -1135,7 +1208,7 @@ class ns {
1135
1208
  this.ctx.drawImage(n, r, a, this.drawWidth, this.drawHeight);
1136
1209
  }
1137
1210
  }
1138
- const rs = /* @__PURE__ */ new Set([
1211
+ const ps = /* @__PURE__ */ new Set([
1139
1212
  // Basic HTML
1140
1213
  "p",
1141
1214
  "span",
@@ -1194,7 +1267,7 @@ const rs = /* @__PURE__ */ new Set([
1194
1267
  "lineargradient",
1195
1268
  "radialgradient",
1196
1269
  "stop"
1197
- ]), Ze = {
1270
+ ]), Fe = {
1198
1271
  a: ["href", "title", "target", "rel"],
1199
1272
  img: ["src", "alt", "title", "width", "height"],
1200
1273
  button: ["type", "disabled", "name", "value"],
@@ -1222,11 +1295,11 @@ const rs = /* @__PURE__ */ new Set([
1222
1295
  clippath: ["id"],
1223
1296
  mask: ["id"],
1224
1297
  "*": ["class", "id", "style"]
1225
- }, as = [
1298
+ }, ms = [
1226
1299
  /javascript:/i,
1227
1300
  /vbscript:/i,
1228
1301
  /on\w+\s*=/i
1229
- ], ls = (e) => {
1302
+ ], fs = (e) => {
1230
1303
  if (typeof e != "string")
1231
1304
  return "";
1232
1305
  const t = document.createElement("template");
@@ -1234,7 +1307,7 @@ const rs = /* @__PURE__ */ new Set([
1234
1307
  const i = (o) => {
1235
1308
  if (Array.from(o.childNodes).forEach(i), o.nodeType === Node.ELEMENT_NODE) {
1236
1309
  const n = o.tagName.toLowerCase();
1237
- if (!rs.has(n)) {
1310
+ if (!ps.has(n)) {
1238
1311
  if (n === "script" || n === "style") {
1239
1312
  o.remove();
1240
1313
  return;
@@ -1244,8 +1317,8 @@ const rs = /* @__PURE__ */ new Set([
1244
1317
  return;
1245
1318
  }
1246
1319
  const r = [
1247
- ...Ze[n] || [],
1248
- ...Ze["*"] || []
1320
+ ...Fe[n] || [],
1321
+ ...Fe["*"] || []
1249
1322
  ];
1250
1323
  if (Array.from(o.attributes).forEach((l) => {
1251
1324
  const c = l.name.toLowerCase();
@@ -1258,7 +1331,7 @@ const rs = /* @__PURE__ */ new Set([
1258
1331
  return;
1259
1332
  }
1260
1333
  let h = l.value;
1261
- as.forEach((u) => {
1334
+ ms.forEach((u) => {
1262
1335
  u.test(h) && o.removeAttribute(l.name);
1263
1336
  });
1264
1337
  }), n === "a") {
@@ -1272,9 +1345,7 @@ const rs = /* @__PURE__ */ new Set([
1272
1345
  }
1273
1346
  };
1274
1347
  return i(t.content), t.innerHTML;
1275
- }, hs = (e) => e === "y" ? L.Y : L.X, cs = (e, t, i) => e.filter(
1276
- (o) => hs(o.orientation) === i && t in o.positions
1277
- ), ds = (e, t, i) => {
1348
+ }, gs = (e) => e === "y" ? L.Y : L.X, vs = (e, t, i) => e.filter((o) => t in o.positions ? i === "grid" ? !0 : gs(o.orientation) === i : !1), ys = (e, t, i) => {
1278
1349
  const o = document.createElement("button");
1279
1350
  if (o.id = e, o.className = "cloudimage-360-hotspot cloudimage-360-hotspot--pulse", o.dataset.hotspotId = e, o.setAttribute("type", "button"), o.setAttribute("aria-label", t || `Hotspot ${e}`), o.setAttribute("aria-haspopup", "true"), o.setAttribute("aria-expanded", "false"), i === "dot-label" && t) {
1280
1351
  o.classList.add("cloudimage-360-hotspot--dot-label");
@@ -1282,7 +1353,7 @@ const rs = /* @__PURE__ */ new Set([
1282
1353
  s.className = "cloudimage-360-hotspot-label", s.textContent = t, o.appendChild(s);
1283
1354
  }
1284
1355
  return o;
1285
- }, us = (e) => {
1356
+ }, bs = (e) => {
1286
1357
  const t = Object.entries(e).sort(([n], [r]) => Number(n) - Number(r));
1287
1358
  let i = null, o = null;
1288
1359
  const s = {};
@@ -1297,7 +1368,7 @@ const rs = /* @__PURE__ */ new Set([
1297
1368
  };
1298
1369
  }
1299
1370
  return s;
1300
- }, ps = (e) => ({
1371
+ }, ws = (e) => ({
1301
1372
  placement: "top",
1302
1373
  modifiers: [
1303
1374
  {
@@ -1320,13 +1391,13 @@ const rs = /* @__PURE__ */ new Set([
1320
1391
  }
1321
1392
  }
1322
1393
  ]
1323
- }), ms = (e, t, i) => {
1394
+ }), Cs = (e, t, i) => {
1324
1395
  const o = document.createElement("div");
1325
- return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML = ls(e) : o.textContent = e, (i || document.body).appendChild(o), o;
1326
- }, fs = (e) => e.map((t) => {
1327
- const i = { ...us(t.positions) };
1396
+ return o.className = "cloudimage-360-popper", o.id = `cloudimage-360-popper-${t}`, o.dataset.popperId = t, o.setAttribute("role", "tooltip"), o.setAttribute("aria-hidden", "false"), typeof e == "string" && /<\/?[a-z][\s\S]*>/i.test(e) ? o.innerHTML = fs(e) : o.textContent = e, (i || document.body).appendChild(o), o;
1397
+ }, Is = (e) => e.map((t) => {
1398
+ const i = { ...bs(t.positions) };
1328
1399
  return { ...t, initialPositions: i, positions: i };
1329
- }), vs = ({
1400
+ }), xs = ({
1330
1401
  newWidth: e,
1331
1402
  newHeight: t,
1332
1403
  initialContainerSize: i,
@@ -1337,59 +1408,59 @@ const rs = /* @__PURE__ */ new Set([
1337
1408
  let a = e, l = t, c = 0, h = 0;
1338
1409
  const u = e / t;
1339
1410
  o > u ? (l = e / o, h = (t - l) / 2) : (a = t * o, c = (e - a) / 2);
1340
- const f = a / n, C = l / r;
1341
- return s.map((y) => {
1411
+ const p = a / n, C = l / r;
1412
+ return s.map((v) => {
1342
1413
  const b = {};
1343
- return Object.entries(y.initialPositions).forEach(([I, E]) => {
1344
- b[I] = {
1345
- x: E.x * f + c,
1346
- y: E.y * C + h
1414
+ return Object.entries(v.initialPositions).forEach(([x, P]) => {
1415
+ b[x] = {
1416
+ x: P.x * p + c,
1417
+ y: P.y * C + h
1347
1418
  };
1348
- }), { ...y, positions: b };
1419
+ }), { ...v, positions: b };
1349
1420
  });
1350
1421
  };
1351
- function gs(e) {
1422
+ function Ps(e) {
1352
1423
  const t = [];
1353
1424
  e.image && t.push(
1354
- `<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${xt(e.image)}" alt="${xt(e.title || "")}"></div>`
1425
+ `<div class="ci360-popper-image-wrapper"><img class="ci360-popper-image" src="${Tt(e.image)}" alt="${Tt(e.title || "")}"></div>`
1355
1426
  );
1356
1427
  const i = [];
1357
- if (e.title && i.push(`<h3 class="ci360-popper-title">${dt(e.title)}</h3>`), e.originalPrice || e.price) {
1428
+ if (e.title && i.push(`<h3 class="ci360-popper-title">${gt(e.title)}</h3>`), e.originalPrice || e.price) {
1358
1429
  let o = "";
1359
- e.originalPrice && (o += `<span class="ci360-popper-original-price">${dt(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${dt(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
1430
+ e.originalPrice && (o += `<span class="ci360-popper-original-price">${gt(e.originalPrice)}</span>`), e.price && (o += `<span class="ci360-popper-price">${gt(e.price)}</span>`), i.push(`<div class="ci360-popper-price-row">${o}</div>`);
1360
1431
  }
1361
- if (e.description && i.push(`<p class="ci360-popper-description">${dt(e.description)}</p>`), e.url && ys(e.url)) {
1362
- const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${xt(e.id)}"` : "";
1432
+ if (e.description && i.push(`<p class="ci360-popper-description">${gt(e.description)}</p>`), e.url && Es(e.url)) {
1433
+ const o = e.ctaText || "View details", s = e.id ? ` data-product-id="${Tt(e.id)}"` : "";
1363
1434
  i.push(
1364
- `<a class="ci360-popper-cta" href="${xt(e.url)}" target="_top"${s}>${dt(String(o))}</a>`
1435
+ `<a class="ci360-popper-cta" href="${Tt(e.url)}" target="_top"${s}>${gt(String(o))}</a>`
1365
1436
  );
1366
1437
  } else if (e.id) {
1367
1438
  const o = e.ctaText || "View details";
1368
1439
  i.push(
1369
- `<button class="ci360-popper-cta" data-product-id="${xt(e.id)}">${dt(String(o))}</button>`
1440
+ `<button class="ci360-popper-cta" data-product-id="${Tt(e.id)}">${gt(String(o))}</button>`
1370
1441
  );
1371
1442
  }
1372
1443
  return i.length > 0 && t.push(`<div class="ci360-popper-body">${i.join("")}</div>`), t.join("");
1373
1444
  }
1374
- function ee(e) {
1375
- return e.content ? e.content : e.data ? gs(e.data) : "";
1445
+ function de(e) {
1446
+ return e.content ? e.content : e.data ? Ps(e.data) : "";
1376
1447
  }
1377
- function dt(e) {
1448
+ function gt(e) {
1378
1449
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
1379
1450
  }
1380
- function xt(e) {
1451
+ function Tt(e) {
1381
1452
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
1382
1453
  }
1383
- function ys(e) {
1454
+ function Es(e) {
1384
1455
  const t = e.replace(/[\s\x00-\x1f]/g, "");
1385
1456
  return /^https?:\/\//i.test(t) || /^\/(?!\/)/.test(t) || /^#/.test(t);
1386
1457
  }
1387
- var R = "top", _ = "bottom", F = "right", z = "left", re = "auto", At = [R, _, F, z], ut = "start", Tt = "end", bs = "clippingParents", ii = "viewport", It = "popper", ws = "reference", De = /* @__PURE__ */ At.reduce(function(e, t) {
1388
- return e.concat([t + "-" + ut, t + "-" + Tt]);
1389
- }, []), oi = /* @__PURE__ */ [].concat(At, [re]).reduce(function(e, t) {
1390
- return e.concat([t, t + "-" + ut, t + "-" + Tt]);
1391
- }, []), Cs = "beforeRead", xs = "read", Is = "afterRead", Ps = "beforeMain", Es = "main", ks = "afterMain", Ts = "beforeWrite", Ss = "write", As = "afterWrite", Os = [Cs, xs, Is, Ps, Es, ks, Ts, Ss, As];
1392
- function G(e) {
1458
+ var R = "top", _ = "bottom", F = "right", z = "left", fe = "auto", Lt = [R, _, F, z], vt = "start", St = "end", Ts = "clippingParents", ai = "viewport", At = "popper", As = "reference", Ne = /* @__PURE__ */ Lt.reduce(function(e, t) {
1459
+ return e.concat([t + "-" + vt, t + "-" + St]);
1460
+ }, []), li = /* @__PURE__ */ [].concat(Lt, [fe]).reduce(function(e, t) {
1461
+ return e.concat([t, t + "-" + vt, t + "-" + St]);
1462
+ }, []), ks = "beforeRead", Xs = "read", Ss = "afterRead", Ys = "beforeMain", Ls = "main", Ms = "afterMain", Os = "beforeWrite", Hs = "write", Rs = "afterWrite", zs = [ks, Xs, Ss, Ys, Ls, Ms, Os, Hs, Rs];
1463
+ function j(e) {
1393
1464
  return e ? (e.nodeName || "").toLowerCase() : null;
1394
1465
  }
1395
1466
  function D(e) {
@@ -1401,31 +1472,31 @@ function D(e) {
1401
1472
  }
1402
1473
  return e;
1403
1474
  }
1404
- function st(e) {
1475
+ function ht(e) {
1405
1476
  var t = D(e).Element;
1406
1477
  return e instanceof t || e instanceof Element;
1407
1478
  }
1408
- function B(e) {
1479
+ function G(e) {
1409
1480
  var t = D(e).HTMLElement;
1410
1481
  return e instanceof t || e instanceof HTMLElement;
1411
1482
  }
1412
- function ae(e) {
1483
+ function ge(e) {
1413
1484
  if (typeof ShadowRoot > "u")
1414
1485
  return !1;
1415
1486
  var t = D(e).ShadowRoot;
1416
1487
  return e instanceof t || e instanceof ShadowRoot;
1417
1488
  }
1418
- function Ls(e) {
1489
+ function Zs(e) {
1419
1490
  var t = e.state;
1420
1491
  Object.keys(t.elements).forEach(function(i) {
1421
1492
  var o = t.styles[i] || {}, s = t.attributes[i] || {}, n = t.elements[i];
1422
- !B(n) || !G(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(r) {
1493
+ !G(n) || !j(n) || (Object.assign(n.style, o), Object.keys(s).forEach(function(r) {
1423
1494
  var a = s[r];
1424
1495
  a === !1 ? n.removeAttribute(r) : n.setAttribute(r, a === !0 ? "" : a);
1425
1496
  }));
1426
1497
  });
1427
1498
  }
1428
- function Ms(e) {
1499
+ function Ds(e) {
1429
1500
  var t = e.state, i = {
1430
1501
  popper: {
1431
1502
  position: t.options.strategy,
@@ -1443,38 +1514,38 @@ function Ms(e) {
1443
1514
  var s = t.elements[o], n = t.attributes[o] || {}, r = Object.keys(t.styles.hasOwnProperty(o) ? t.styles[o] : i[o]), a = r.reduce(function(l, c) {
1444
1515
  return l[c] = "", l;
1445
1516
  }, {});
1446
- !B(s) || !G(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(l) {
1517
+ !G(s) || !j(s) || (Object.assign(s.style, a), Object.keys(n).forEach(function(l) {
1447
1518
  s.removeAttribute(l);
1448
1519
  }));
1449
1520
  });
1450
1521
  };
1451
1522
  }
1452
- const Hs = {
1523
+ const Bs = {
1453
1524
  name: "applyStyles",
1454
1525
  enabled: !0,
1455
1526
  phase: "write",
1456
- fn: Ls,
1457
- effect: Ms,
1527
+ fn: Zs,
1528
+ effect: Ds,
1458
1529
  requires: ["computeStyles"]
1459
1530
  };
1460
1531
  function V(e) {
1461
1532
  return e.split("-")[0];
1462
1533
  }
1463
- var ot = Math.max, Vt = Math.min, pt = Math.round;
1464
- function se() {
1534
+ var lt = Math.max, Jt = Math.min, yt = Math.round;
1535
+ function pe() {
1465
1536
  var e = navigator.userAgentData;
1466
1537
  return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
1467
1538
  return t.brand + "/" + t.version;
1468
1539
  }).join(" ") : navigator.userAgent;
1469
1540
  }
1470
- function si() {
1471
- return !/^((?!chrome|android).)*safari/i.test(se());
1541
+ function hi() {
1542
+ return !/^((?!chrome|android).)*safari/i.test(pe());
1472
1543
  }
1473
- function mt(e, t, i) {
1544
+ function bt(e, t, i) {
1474
1545
  t === void 0 && (t = !1), i === void 0 && (i = !1);
1475
1546
  var o = e.getBoundingClientRect(), s = 1, n = 1;
1476
- t && B(e) && (s = e.offsetWidth > 0 && pt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && pt(o.height) / e.offsetHeight || 1);
1477
- var r = st(e) ? D(e) : window, a = r.visualViewport, l = !si() && i, c = (o.left + (l && a ? a.offsetLeft : 0)) / s, h = (o.top + (l && a ? a.offsetTop : 0)) / n, u = o.width / s, m = o.height / n;
1547
+ t && G(e) && (s = e.offsetWidth > 0 && yt(o.width) / e.offsetWidth || 1, n = e.offsetHeight > 0 && yt(o.height) / e.offsetHeight || 1);
1548
+ 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, m = o.height / n;
1478
1549
  return {
1479
1550
  width: u,
1480
1551
  height: m,
@@ -1486,8 +1557,8 @@ function mt(e, t, i) {
1486
1557
  y: h
1487
1558
  };
1488
1559
  }
1489
- function le(e) {
1490
- var t = mt(e), i = e.offsetWidth, o = e.offsetHeight;
1560
+ function ve(e) {
1561
+ var t = bt(e), i = e.offsetWidth, o = e.offsetHeight;
1491
1562
  return Math.abs(t.width - i) <= 1 && (i = t.width), Math.abs(t.height - o) <= 1 && (o = t.height), {
1492
1563
  x: e.offsetLeft,
1493
1564
  y: e.offsetTop,
@@ -1495,11 +1566,11 @@ function le(e) {
1495
1566
  height: o
1496
1567
  };
1497
1568
  }
1498
- function ni(e, t) {
1569
+ function ci(e, t) {
1499
1570
  var i = t.getRootNode && t.getRootNode();
1500
1571
  if (e.contains(t))
1501
1572
  return !0;
1502
- if (i && ae(i)) {
1573
+ if (i && ge(i)) {
1503
1574
  var o = t;
1504
1575
  do {
1505
1576
  if (o && e.isSameNode(o))
@@ -1509,66 +1580,66 @@ function ni(e, t) {
1509
1580
  }
1510
1581
  return !1;
1511
1582
  }
1512
- function J(e) {
1583
+ function tt(e) {
1513
1584
  return D(e).getComputedStyle(e);
1514
1585
  }
1515
- function Xs(e) {
1516
- return ["table", "td", "th"].indexOf(G(e)) >= 0;
1586
+ function Gs(e) {
1587
+ return ["table", "td", "th"].indexOf(j(e)) >= 0;
1517
1588
  }
1518
- function tt(e) {
1519
- return ((st(e) ? e.ownerDocument : (
1589
+ function ot(e) {
1590
+ return ((ht(e) ? e.ownerDocument : (
1520
1591
  // $FlowFixMe[prop-missing]
1521
1592
  e.document
1522
1593
  )) || window.document).documentElement;
1523
1594
  }
1524
- function Gt(e) {
1525
- return G(e) === "html" ? e : (
1595
+ function Qt(e) {
1596
+ return j(e) === "html" ? e : (
1526
1597
  // this is a quicker (but less type safe) way to save quite some bytes from the bundle
1527
1598
  // $FlowFixMe[incompatible-return]
1528
1599
  // $FlowFixMe[prop-missing]
1529
1600
  e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
1530
1601
  e.parentNode || // DOM Element detected
1531
- (ae(e) ? e.host : null) || // ShadowRoot detected
1602
+ (ge(e) ? e.host : null) || // ShadowRoot detected
1532
1603
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
1533
- tt(e)
1604
+ ot(e)
1534
1605
  );
1535
1606
  }
1536
- function Be(e) {
1537
- return !B(e) || // https://github.com/popperjs/popper-core/issues/837
1538
- J(e).position === "fixed" ? null : e.offsetParent;
1607
+ function We(e) {
1608
+ return !G(e) || // https://github.com/popperjs/popper-core/issues/837
1609
+ tt(e).position === "fixed" ? null : e.offsetParent;
1539
1610
  }
1540
- function Ys(e) {
1541
- var t = /firefox/i.test(se()), i = /Trident/i.test(se());
1542
- if (i && B(e)) {
1543
- var o = J(e);
1611
+ function _s(e) {
1612
+ var t = /firefox/i.test(pe()), i = /Trident/i.test(pe());
1613
+ if (i && G(e)) {
1614
+ var o = tt(e);
1544
1615
  if (o.position === "fixed")
1545
1616
  return null;
1546
1617
  }
1547
- var s = Gt(e);
1548
- for (ae(s) && (s = s.host); B(s) && ["html", "body"].indexOf(G(s)) < 0; ) {
1549
- var n = J(s);
1618
+ var s = Qt(e);
1619
+ for (ge(s) && (s = s.host); G(s) && ["html", "body"].indexOf(j(s)) < 0; ) {
1620
+ var n = tt(s);
1550
1621
  if (n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].indexOf(n.willChange) !== -1 || t && n.willChange === "filter" || t && n.filter && n.filter !== "none")
1551
1622
  return s;
1552
1623
  s = s.parentNode;
1553
1624
  }
1554
1625
  return null;
1555
1626
  }
1556
- function Ot(e) {
1557
- for (var t = D(e), i = Be(e); i && Xs(i) && J(i).position === "static"; )
1558
- i = Be(i);
1559
- return i && (G(i) === "html" || G(i) === "body" && J(i).position === "static") ? t : i || Ys(e) || t;
1627
+ function Mt(e) {
1628
+ for (var t = D(e), i = We(e); i && Gs(i) && tt(i).position === "static"; )
1629
+ i = We(i);
1630
+ return i && (j(i) === "html" || j(i) === "body" && tt(i).position === "static") ? t : i || _s(e) || t;
1560
1631
  }
1561
- function he(e) {
1632
+ function ye(e) {
1562
1633
  return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
1563
1634
  }
1564
- function Et(e, t, i) {
1565
- return ot(e, Vt(t, i));
1635
+ function kt(e, t, i) {
1636
+ return lt(e, Jt(t, i));
1566
1637
  }
1567
- function Rs(e, t, i) {
1568
- var o = Et(e, t, i);
1638
+ function Fs(e, t, i) {
1639
+ var o = kt(e, t, i);
1569
1640
  return o > i ? i : o;
1570
1641
  }
1571
- function ri() {
1642
+ function di() {
1572
1643
  return {
1573
1644
  top: 0,
1574
1645
  right: 0,
@@ -1576,114 +1647,114 @@ function ri() {
1576
1647
  left: 0
1577
1648
  };
1578
1649
  }
1579
- function ai(e) {
1580
- return Object.assign({}, ri(), e);
1650
+ function ui(e) {
1651
+ return Object.assign({}, di(), e);
1581
1652
  }
1582
- function li(e, t) {
1653
+ function pi(e, t) {
1583
1654
  return t.reduce(function(i, o) {
1584
1655
  return i[o] = e, i;
1585
1656
  }, {});
1586
1657
  }
1587
- var zs = function(t, i) {
1658
+ var Ns = function(t, i) {
1588
1659
  return t = typeof t == "function" ? t(Object.assign({}, i.rects, {
1589
1660
  placement: i.placement
1590
- })) : t, ai(typeof t != "number" ? t : li(t, At));
1661
+ })) : t, ui(typeof t != "number" ? t : pi(t, Lt));
1591
1662
  };
1592
- function Zs(e) {
1593
- var t, i = e.state, o = e.name, s = e.options, n = i.elements.arrow, r = i.modifiersData.popperOffsets, a = V(i.placement), l = he(a), c = [z, F].indexOf(a) >= 0, h = c ? "height" : "width";
1663
+ function Ws(e) {
1664
+ 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";
1594
1665
  if (!(!n || !r)) {
1595
- var u = zs(s.padding, i), m = le(n), f = l === "y" ? R : z, C = l === "y" ? _ : F, y = i.rects.reference[h] + i.rects.reference[l] - r[l] - i.rects.popper[h], b = r[l] - i.rects.reference[l], I = Ot(n), E = I ? l === "y" ? I.clientHeight || 0 : I.clientWidth || 0 : 0, w = y / 2 - b / 2, v = u[f], P = E - m[h] - u[C], p = E / 2 - m[h] / 2 + w, g = Et(v, p, P), x = l;
1596
- i.modifiersData[o] = (t = {}, t[x] = g, t.centerOffset = g - p, t);
1666
+ var u = Ns(s.padding, i), m = ve(n), p = l === "y" ? R : z, C = l === "y" ? _ : F, v = 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 = v / 2 - b / 2, g = u[p], E = P - m[h] - u[C], f = P / 2 - m[h] / 2 + w, y = kt(g, f, E), I = l;
1667
+ i.modifiersData[o] = (t = {}, t[I] = y, t.centerOffset = y - f, t);
1597
1668
  }
1598
1669
  }
1599
- function Ds(e) {
1670
+ function Vs(e) {
1600
1671
  var t = e.state, i = e.options, o = i.element, s = o === void 0 ? "[data-popper-arrow]" : o;
1601
- s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || ni(t.elements.popper, s) && (t.elements.arrow = s));
1672
+ s != null && (typeof s == "string" && (s = t.elements.popper.querySelector(s), !s) || ci(t.elements.popper, s) && (t.elements.arrow = s));
1602
1673
  }
1603
- const Bs = {
1674
+ const js = {
1604
1675
  name: "arrow",
1605
1676
  enabled: !0,
1606
1677
  phase: "main",
1607
- fn: Zs,
1608
- effect: Ds,
1678
+ fn: Ws,
1679
+ effect: Vs,
1609
1680
  requires: ["popperOffsets"],
1610
1681
  requiresIfExists: ["preventOverflow"]
1611
1682
  };
1612
- function ft(e) {
1683
+ function wt(e) {
1613
1684
  return e.split("-")[1];
1614
1685
  }
1615
- var _s = {
1686
+ var Us = {
1616
1687
  top: "auto",
1617
1688
  right: "auto",
1618
1689
  bottom: "auto",
1619
1690
  left: "auto"
1620
1691
  };
1621
- function Fs(e, t) {
1692
+ function $s(e, t) {
1622
1693
  var i = e.x, o = e.y, s = t.devicePixelRatio || 1;
1623
1694
  return {
1624
- x: pt(i * s) / s || 0,
1625
- y: pt(o * s) / s || 0
1695
+ x: yt(i * s) / s || 0,
1696
+ y: yt(o * s) / s || 0
1626
1697
  };
1627
1698
  }
1628
- function _e(e) {
1629
- 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, m = r.x, f = m === void 0 ? 0 : m, C = r.y, y = C === void 0 ? 0 : C, b = typeof h == "function" ? h({
1630
- x: f,
1631
- y
1699
+ function Ve(e) {
1700
+ 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, m = r.x, p = m === void 0 ? 0 : m, C = r.y, v = C === void 0 ? 0 : C, b = typeof h == "function" ? h({
1701
+ x: p,
1702
+ y: v
1632
1703
  }) : {
1633
- x: f,
1634
- y
1704
+ x: p,
1705
+ y: v
1635
1706
  };
1636
- f = b.x, y = b.y;
1637
- var I = r.hasOwnProperty("x"), E = r.hasOwnProperty("y"), w = z, v = R, P = window;
1707
+ p = b.x, v = b.y;
1708
+ var x = r.hasOwnProperty("x"), P = r.hasOwnProperty("y"), w = z, g = R, E = window;
1638
1709
  if (c) {
1639
- var p = Ot(i), g = "clientHeight", x = "clientWidth";
1640
- if (p === D(i) && (p = tt(i), J(p).position !== "static" && a === "absolute" && (g = "scrollHeight", x = "scrollWidth")), p = p, s === R || (s === z || s === F) && n === Tt) {
1641
- v = _;
1642
- var k = u && p === P && P.visualViewport ? P.visualViewport.height : (
1710
+ var f = Mt(i), y = "clientHeight", I = "clientWidth";
1711
+ if (f === D(i) && (f = ot(i), tt(f).position !== "static" && a === "absolute" && (y = "scrollHeight", I = "scrollWidth")), f = f, s === R || (s === z || s === F) && n === St) {
1712
+ g = _;
1713
+ var T = u && f === E && E.visualViewport ? E.visualViewport.height : (
1643
1714
  // $FlowFixMe[prop-missing]
1644
- p[g]
1715
+ f[y]
1645
1716
  );
1646
- y -= k - o.height, y *= l ? 1 : -1;
1717
+ v -= T - o.height, v *= l ? 1 : -1;
1647
1718
  }
1648
- if (s === z || (s === R || s === _) && n === Tt) {
1719
+ if (s === z || (s === R || s === _) && n === St) {
1649
1720
  w = F;
1650
- var S = u && p === P && P.visualViewport ? P.visualViewport.width : (
1721
+ var k = u && f === E && E.visualViewport ? E.visualViewport.width : (
1651
1722
  // $FlowFixMe[prop-missing]
1652
- p[x]
1723
+ f[I]
1653
1724
  );
1654
- f -= S - o.width, f *= l ? 1 : -1;
1725
+ p -= k - o.width, p *= l ? 1 : -1;
1655
1726
  }
1656
1727
  }
1657
- var A = Object.assign({
1728
+ var X = Object.assign({
1658
1729
  position: a
1659
- }, c && _s), H = h === !0 ? Fs({
1660
- x: f,
1661
- y
1730
+ }, c && Us), O = h === !0 ? $s({
1731
+ x: p,
1732
+ y: v
1662
1733
  }, D(i)) : {
1663
- x: f,
1664
- y
1734
+ x: p,
1735
+ y: v
1665
1736
  };
1666
- if (f = H.x, y = H.y, l) {
1667
- var O;
1668
- return Object.assign({}, A, (O = {}, O[v] = E ? "0" : "", O[w] = I ? "0" : "", O.transform = (P.devicePixelRatio || 1) <= 1 ? "translate(" + f + "px, " + y + "px)" : "translate3d(" + f + "px, " + y + "px, 0)", O));
1737
+ if (p = O.x, v = O.y, l) {
1738
+ var M;
1739
+ return Object.assign({}, X, (M = {}, M[g] = P ? "0" : "", M[w] = x ? "0" : "", M.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + p + "px, " + v + "px)" : "translate3d(" + p + "px, " + v + "px, 0)", M));
1669
1740
  }
1670
- return Object.assign({}, A, (t = {}, t[v] = E ? y + "px" : "", t[w] = I ? f + "px" : "", t.transform = "", t));
1741
+ return Object.assign({}, X, (t = {}, t[g] = P ? v + "px" : "", t[w] = x ? p + "px" : "", t.transform = "", t));
1671
1742
  }
1672
- function Ws(e) {
1743
+ function Ks(e) {
1673
1744
  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 = {
1674
1745
  placement: V(t.placement),
1675
- variation: ft(t.placement),
1746
+ variation: wt(t.placement),
1676
1747
  popper: t.elements.popper,
1677
1748
  popperRect: t.rects.popper,
1678
1749
  gpuAcceleration: s,
1679
1750
  isFixed: t.options.strategy === "fixed"
1680
1751
  };
1681
- t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, _e(Object.assign({}, c, {
1752
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ve(Object.assign({}, c, {
1682
1753
  offsets: t.modifiersData.popperOffsets,
1683
1754
  position: t.options.strategy,
1684
1755
  adaptive: r,
1685
1756
  roundOffsets: l
1686
- })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, _e(Object.assign({}, c, {
1757
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ve(Object.assign({}, c, {
1687
1758
  offsets: t.modifiersData.arrow,
1688
1759
  position: "absolute",
1689
1760
  adaptive: !1,
@@ -1692,105 +1763,105 @@ function Ws(e) {
1692
1763
  "data-popper-placement": t.placement
1693
1764
  });
1694
1765
  }
1695
- const Ns = {
1766
+ const qs = {
1696
1767
  name: "computeStyles",
1697
1768
  enabled: !0,
1698
1769
  phase: "beforeWrite",
1699
- fn: Ws,
1770
+ fn: Ks,
1700
1771
  data: {}
1701
1772
  };
1702
- var Ft = {
1773
+ var jt = {
1703
1774
  passive: !0
1704
1775
  };
1705
- function Vs(e) {
1776
+ function Js(e) {
1706
1777
  var t = e.state, i = e.instance, o = e.options, s = o.scroll, n = s === void 0 ? !0 : s, r = o.resize, a = r === void 0 ? !0 : r, l = D(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
1707
1778
  return n && c.forEach(function(h) {
1708
- h.addEventListener("scroll", i.update, Ft);
1709
- }), a && l.addEventListener("resize", i.update, Ft), function() {
1779
+ h.addEventListener("scroll", i.update, jt);
1780
+ }), a && l.addEventListener("resize", i.update, jt), function() {
1710
1781
  n && c.forEach(function(h) {
1711
- h.removeEventListener("scroll", i.update, Ft);
1712
- }), a && l.removeEventListener("resize", i.update, Ft);
1782
+ h.removeEventListener("scroll", i.update, jt);
1783
+ }), a && l.removeEventListener("resize", i.update, jt);
1713
1784
  };
1714
1785
  }
1715
- const Gs = {
1786
+ const Qs = {
1716
1787
  name: "eventListeners",
1717
1788
  enabled: !0,
1718
1789
  phase: "write",
1719
1790
  fn: function() {
1720
1791
  },
1721
- effect: Vs,
1792
+ effect: Js,
1722
1793
  data: {}
1723
1794
  };
1724
- var js = {
1795
+ var tn = {
1725
1796
  left: "right",
1726
1797
  right: "left",
1727
1798
  bottom: "top",
1728
1799
  top: "bottom"
1729
1800
  };
1730
- function Wt(e) {
1801
+ function $t(e) {
1731
1802
  return e.replace(/left|right|bottom|top/g, function(t) {
1732
- return js[t];
1803
+ return tn[t];
1733
1804
  });
1734
1805
  }
1735
- var Us = {
1806
+ var en = {
1736
1807
  start: "end",
1737
1808
  end: "start"
1738
1809
  };
1739
- function Fe(e) {
1810
+ function je(e) {
1740
1811
  return e.replace(/start|end/g, function(t) {
1741
- return Us[t];
1812
+ return en[t];
1742
1813
  });
1743
1814
  }
1744
- function ce(e) {
1815
+ function be(e) {
1745
1816
  var t = D(e), i = t.pageXOffset, o = t.pageYOffset;
1746
1817
  return {
1747
1818
  scrollLeft: i,
1748
1819
  scrollTop: o
1749
1820
  };
1750
1821
  }
1751
- function de(e) {
1752
- return mt(tt(e)).left + ce(e).scrollLeft;
1822
+ function we(e) {
1823
+ return bt(ot(e)).left + be(e).scrollLeft;
1753
1824
  }
1754
- function $s(e, t) {
1755
- var i = D(e), o = tt(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
1825
+ function on(e, t) {
1826
+ var i = D(e), o = ot(e), s = i.visualViewport, n = o.clientWidth, r = o.clientHeight, a = 0, l = 0;
1756
1827
  if (s) {
1757
1828
  n = s.width, r = s.height;
1758
- var c = si();
1829
+ var c = hi();
1759
1830
  (c || !c && t === "fixed") && (a = s.offsetLeft, l = s.offsetTop);
1760
1831
  }
1761
1832
  return {
1762
1833
  width: n,
1763
1834
  height: r,
1764
- x: a + de(e),
1835
+ x: a + we(e),
1765
1836
  y: l
1766
1837
  };
1767
1838
  }
1768
- function Ks(e) {
1769
- var t, i = tt(e), o = ce(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = ot(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = ot(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + de(e), l = -o.scrollTop;
1770
- return J(s || i).direction === "rtl" && (a += ot(i.clientWidth, s ? s.clientWidth : 0) - n), {
1839
+ function sn(e) {
1840
+ var t, i = ot(e), o = be(e), s = (t = e.ownerDocument) == null ? void 0 : t.body, n = lt(i.scrollWidth, i.clientWidth, s ? s.scrollWidth : 0, s ? s.clientWidth : 0), r = lt(i.scrollHeight, i.clientHeight, s ? s.scrollHeight : 0, s ? s.clientHeight : 0), a = -o.scrollLeft + we(e), l = -o.scrollTop;
1841
+ return tt(s || i).direction === "rtl" && (a += lt(i.clientWidth, s ? s.clientWidth : 0) - n), {
1771
1842
  width: n,
1772
1843
  height: r,
1773
1844
  x: a,
1774
1845
  y: l
1775
1846
  };
1776
1847
  }
1777
- function ue(e) {
1778
- var t = J(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
1848
+ function Ce(e) {
1849
+ var t = tt(e), i = t.overflow, o = t.overflowX, s = t.overflowY;
1779
1850
  return /auto|scroll|overlay|hidden/.test(i + s + o);
1780
1851
  }
1781
- function hi(e) {
1782
- return ["html", "body", "#document"].indexOf(G(e)) >= 0 ? e.ownerDocument.body : B(e) && ue(e) ? e : hi(Gt(e));
1852
+ function mi(e) {
1853
+ return ["html", "body", "#document"].indexOf(j(e)) >= 0 ? e.ownerDocument.body : G(e) && Ce(e) ? e : mi(Qt(e));
1783
1854
  }
1784
- function kt(e, t) {
1855
+ function Xt(e, t) {
1785
1856
  var i;
1786
1857
  t === void 0 && (t = []);
1787
- var o = hi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [], ue(o) ? o : []) : o, a = t.concat(r);
1858
+ var o = mi(e), s = o === ((i = e.ownerDocument) == null ? void 0 : i.body), n = D(o), r = s ? [n].concat(n.visualViewport || [], Ce(o) ? o : []) : o, a = t.concat(r);
1788
1859
  return s ? a : (
1789
1860
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
1790
- a.concat(kt(Gt(r)))
1861
+ a.concat(Xt(Qt(r)))
1791
1862
  );
1792
1863
  }
1793
- function ne(e) {
1864
+ function me(e) {
1794
1865
  return Object.assign({}, e, {
1795
1866
  left: e.x,
1796
1867
  top: e.y,
@@ -1798,28 +1869,28 @@ function ne(e) {
1798
1869
  bottom: e.y + e.height
1799
1870
  });
1800
1871
  }
1801
- function qs(e, t) {
1802
- var i = mt(e, !1, t === "fixed");
1872
+ function nn(e, t) {
1873
+ var i = bt(e, !1, t === "fixed");
1803
1874
  return i.top = i.top + e.clientTop, i.left = i.left + e.clientLeft, i.bottom = i.top + e.clientHeight, i.right = i.left + e.clientWidth, i.width = e.clientWidth, i.height = e.clientHeight, i.x = i.left, i.y = i.top, i;
1804
1875
  }
1805
- function We(e, t, i) {
1806
- return t === ii ? ne($s(e, i)) : st(t) ? qs(t, i) : ne(Ks(tt(e)));
1876
+ function Ue(e, t, i) {
1877
+ return t === ai ? me(on(e, i)) : ht(t) ? nn(t, i) : me(sn(ot(e)));
1807
1878
  }
1808
- function Js(e) {
1809
- var t = kt(Gt(e)), i = ["absolute", "fixed"].indexOf(J(e).position) >= 0, o = i && B(e) ? Ot(e) : e;
1810
- return st(o) ? t.filter(function(s) {
1811
- return st(s) && ni(s, o) && G(s) !== "body";
1879
+ function rn(e) {
1880
+ var t = Xt(Qt(e)), i = ["absolute", "fixed"].indexOf(tt(e).position) >= 0, o = i && G(e) ? Mt(e) : e;
1881
+ return ht(o) ? t.filter(function(s) {
1882
+ return ht(s) && ci(s, o) && j(s) !== "body";
1812
1883
  }) : [];
1813
1884
  }
1814
- function Qs(e, t, i, o) {
1815
- var s = t === "clippingParents" ? Js(e) : [].concat(t), n = [].concat(s, [i]), r = n[0], a = n.reduce(function(l, c) {
1816
- var h = We(e, c, o);
1817
- return l.top = ot(h.top, l.top), l.right = Vt(h.right, l.right), l.bottom = Vt(h.bottom, l.bottom), l.left = ot(h.left, l.left), l;
1818
- }, We(e, r, o));
1885
+ function an(e, t, i, o) {
1886
+ var s = t === "clippingParents" ? rn(e) : [].concat(t), n = [].concat(s, [i]), r = n[0], a = n.reduce(function(l, c) {
1887
+ var h = Ue(e, c, o);
1888
+ return l.top = lt(h.top, l.top), l.right = Jt(h.right, l.right), l.bottom = Jt(h.bottom, l.bottom), l.left = lt(h.left, l.left), l;
1889
+ }, Ue(e, r, o));
1819
1890
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
1820
1891
  }
1821
- function ci(e) {
1822
- var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? ft(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
1892
+ function fi(e) {
1893
+ var t = e.reference, i = e.element, o = e.placement, s = o ? V(o) : null, n = o ? wt(o) : null, r = t.x + t.width / 2 - i.width / 2, a = t.y + t.height / 2 - i.height / 2, l;
1823
1894
  switch (s) {
1824
1895
  case R:
1825
1896
  l = {
@@ -1851,126 +1922,126 @@ function ci(e) {
1851
1922
  y: t.y
1852
1923
  };
1853
1924
  }
1854
- var c = s ? he(s) : null;
1925
+ var c = s ? ye(s) : null;
1855
1926
  if (c != null) {
1856
1927
  var h = c === "y" ? "height" : "width";
1857
1928
  switch (n) {
1858
- case ut:
1929
+ case vt:
1859
1930
  l[c] = l[c] - (t[h] / 2 - i[h] / 2);
1860
1931
  break;
1861
- case Tt:
1932
+ case St:
1862
1933
  l[c] = l[c] + (t[h] / 2 - i[h] / 2);
1863
1934
  break;
1864
1935
  }
1865
1936
  }
1866
1937
  return l;
1867
1938
  }
1868
- function St(e, t) {
1939
+ function Yt(e, t) {
1869
1940
  t === void 0 && (t = {});
1870
- 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 ? bs : a, c = i.rootBoundary, h = c === void 0 ? ii : c, u = i.elementContext, m = u === void 0 ? It : u, f = i.altBoundary, C = f === void 0 ? !1 : f, y = i.padding, b = y === void 0 ? 0 : y, I = ai(typeof b != "number" ? b : li(b, At)), E = m === It ? ws : It, w = e.rects.popper, v = e.elements[C ? E : m], P = Qs(st(v) ? v : v.contextElement || tt(e.elements.popper), l, h, r), p = mt(e.elements.reference), g = ci({
1871
- reference: p,
1941
+ 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, m = u === void 0 ? At : u, p = i.altBoundary, C = p === void 0 ? !1 : p, v = i.padding, b = v === void 0 ? 0 : v, x = ui(typeof b != "number" ? b : pi(b, Lt)), P = m === At ? As : At, w = e.rects.popper, g = e.elements[C ? P : m], E = an(ht(g) ? g : g.contextElement || ot(e.elements.popper), l, h, r), f = bt(e.elements.reference), y = fi({
1942
+ reference: f,
1872
1943
  element: w,
1873
1944
  placement: s
1874
- }), x = ne(Object.assign({}, w, g)), k = m === It ? x : p, S = {
1875
- top: P.top - k.top + I.top,
1876
- bottom: k.bottom - P.bottom + I.bottom,
1877
- left: P.left - k.left + I.left,
1878
- right: k.right - P.right + I.right
1879
- }, A = e.modifiersData.offset;
1880
- if (m === It && A) {
1881
- var H = A[s];
1882
- Object.keys(S).forEach(function(O) {
1883
- var j = [F, _].indexOf(O) >= 0 ? 1 : -1, U = [R, _].indexOf(O) >= 0 ? "y" : "x";
1884
- S[O] += H[U] * j;
1945
+ }), I = me(Object.assign({}, w, y)), T = m === At ? I : f, k = {
1946
+ top: E.top - T.top + x.top,
1947
+ bottom: T.bottom - E.bottom + x.bottom,
1948
+ left: E.left - T.left + x.left,
1949
+ right: T.right - E.right + x.right
1950
+ }, X = e.modifiersData.offset;
1951
+ if (m === At && X) {
1952
+ var O = X[s];
1953
+ Object.keys(k).forEach(function(M) {
1954
+ var U = [F, _].indexOf(M) >= 0 ? 1 : -1, $ = [R, _].indexOf(M) >= 0 ? "y" : "x";
1955
+ k[M] += O[$] * U;
1885
1956
  });
1886
1957
  }
1887
- return S;
1958
+ return k;
1888
1959
  }
1889
- function tn(e, t) {
1960
+ function ln(e, t) {
1890
1961
  t === void 0 && (t = {});
1891
- 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 ? oi : l, h = ft(o), u = h ? a ? De : De.filter(function(C) {
1892
- return ft(C) === h;
1893
- }) : At, m = u.filter(function(C) {
1962
+ 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 = wt(o), u = h ? a ? Ne : Ne.filter(function(C) {
1963
+ return wt(C) === h;
1964
+ }) : Lt, m = u.filter(function(C) {
1894
1965
  return c.indexOf(C) >= 0;
1895
1966
  });
1896
1967
  m.length === 0 && (m = u);
1897
- var f = m.reduce(function(C, y) {
1898
- return C[y] = St(e, {
1899
- placement: y,
1968
+ var p = m.reduce(function(C, v) {
1969
+ return C[v] = Yt(e, {
1970
+ placement: v,
1900
1971
  boundary: s,
1901
1972
  rootBoundary: n,
1902
1973
  padding: r
1903
- })[V(y)], C;
1974
+ })[V(v)], C;
1904
1975
  }, {});
1905
- return Object.keys(f).sort(function(C, y) {
1906
- return f[C] - f[y];
1976
+ return Object.keys(p).sort(function(C, v) {
1977
+ return p[C] - p[v];
1907
1978
  });
1908
1979
  }
1909
- function en(e) {
1910
- if (V(e) === re)
1980
+ function hn(e) {
1981
+ if (V(e) === fe)
1911
1982
  return [];
1912
- var t = Wt(e);
1913
- return [Fe(e), t, Fe(t)];
1983
+ var t = $t(e);
1984
+ return [je(e), t, je(t)];
1914
1985
  }
1915
- function on(e) {
1986
+ function cn(e) {
1916
1987
  var t = e.state, i = e.options, o = e.name;
1917
1988
  if (!t.modifiersData[o]._skip) {
1918
- 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, m = i.altBoundary, f = i.flipVariations, C = f === void 0 ? !0 : f, y = i.allowedAutoPlacements, b = t.options.placement, I = V(b), E = I === b, w = l || (E || !C ? [Wt(b)] : en(b)), v = [b].concat(w).reduce(function(Q, N) {
1919
- return Q.concat(V(N) === re ? tn(t, {
1920
- placement: N,
1989
+ 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, m = i.altBoundary, p = i.flipVariations, C = p === void 0 ? !0 : p, v = i.allowedAutoPlacements, b = t.options.placement, x = V(b), P = x === b, w = l || (P || !C ? [$t(b)] : hn(b)), g = [b].concat(w).reduce(function(it, W) {
1990
+ return it.concat(V(W) === fe ? ln(t, {
1991
+ placement: W,
1921
1992
  boundary: h,
1922
1993
  rootBoundary: u,
1923
1994
  padding: c,
1924
1995
  flipVariations: C,
1925
- allowedAutoPlacements: y
1926
- }) : N);
1927
- }, []), P = t.rects.reference, p = t.rects.popper, g = /* @__PURE__ */ new Map(), x = !0, k = v[0], S = 0; S < v.length; S++) {
1928
- var A = v[S], H = V(A), O = ft(A) === ut, j = [R, _].indexOf(H) >= 0, U = j ? "width" : "height", X = St(t, {
1929
- placement: A,
1996
+ allowedAutoPlacements: v
1997
+ }) : W);
1998
+ }, []), E = t.rects.reference, f = t.rects.popper, y = /* @__PURE__ */ new Map(), I = !0, T = g[0], k = 0; k < g.length; k++) {
1999
+ var X = g[k], O = V(X), M = wt(X) === vt, U = [R, _].indexOf(O) >= 0, $ = U ? "width" : "height", H = Yt(t, {
2000
+ placement: X,
1930
2001
  boundary: h,
1931
2002
  rootBoundary: u,
1932
2003
  altBoundary: m,
1933
2004
  padding: c
1934
- }), Z = j ? O ? F : z : O ? _ : R;
1935
- P[U] > p[U] && (Z = Wt(Z));
1936
- var nt = Wt(Z), $ = [];
1937
- if (n && $.push(X[H] <= 0), a && $.push(X[Z] <= 0, X[nt] <= 0), $.every(function(Q) {
1938
- return Q;
2005
+ }), Z = U ? M ? F : z : M ? _ : R;
2006
+ E[$] > f[$] && (Z = $t(Z));
2007
+ var ct = $t(Z), K = [];
2008
+ if (n && K.push(H[O] <= 0), a && K.push(H[Z] <= 0, H[ct] <= 0), K.every(function(it) {
2009
+ return it;
1939
2010
  })) {
1940
- k = A, x = !1;
2011
+ T = X, I = !1;
1941
2012
  break;
1942
2013
  }
1943
- g.set(A, $);
2014
+ y.set(X, K);
1944
2015
  }
1945
- if (x)
1946
- for (var rt = C ? 3 : 1, vt = function(N) {
1947
- var it = v.find(function(lt) {
1948
- var K = g.get(lt);
1949
- if (K)
1950
- return K.slice(0, N).every(function(gt) {
1951
- return gt;
2016
+ if (I)
2017
+ for (var dt = C ? 3 : 1, ut = function(W) {
2018
+ var nt = g.find(function(pt) {
2019
+ var q = y.get(pt);
2020
+ if (q)
2021
+ return q.slice(0, W).every(function(Ct) {
2022
+ return Ct;
1952
2023
  });
1953
2024
  });
1954
- if (it)
1955
- return k = it, "break";
1956
- }, et = rt; et > 0; et--) {
1957
- var at = vt(et);
1958
- if (at === "break") break;
2025
+ if (nt)
2026
+ return T = nt, "break";
2027
+ }, st = dt; st > 0; st--) {
2028
+ var et = ut(st);
2029
+ if (et === "break") break;
1959
2030
  }
1960
- t.placement !== k && (t.modifiersData[o]._skip = !0, t.placement = k, t.reset = !0);
2031
+ t.placement !== T && (t.modifiersData[o]._skip = !0, t.placement = T, t.reset = !0);
1961
2032
  }
1962
2033
  }
1963
- const sn = {
2034
+ const dn = {
1964
2035
  name: "flip",
1965
2036
  enabled: !0,
1966
2037
  phase: "main",
1967
- fn: on,
2038
+ fn: cn,
1968
2039
  requiresIfExists: ["offset"],
1969
2040
  data: {
1970
2041
  _skip: !1
1971
2042
  }
1972
2043
  };
1973
- function Ne(e, t, i) {
2044
+ function $e(e, t, i) {
1974
2045
  return i === void 0 && (i = {
1975
2046
  x: 0,
1976
2047
  y: 0
@@ -1981,17 +2052,17 @@ function Ne(e, t, i) {
1981
2052
  left: e.left - t.width - i.x
1982
2053
  };
1983
2054
  }
1984
- function Ve(e) {
2055
+ function Ke(e) {
1985
2056
  return [R, F, _, z].some(function(t) {
1986
2057
  return e[t] >= 0;
1987
2058
  });
1988
2059
  }
1989
- function nn(e) {
1990
- var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r = St(t, {
2060
+ function un(e) {
2061
+ var t = e.state, i = e.name, o = t.rects.reference, s = t.rects.popper, n = t.modifiersData.preventOverflow, r = Yt(t, {
1991
2062
  elementContext: "reference"
1992
- }), a = St(t, {
2063
+ }), a = Yt(t, {
1993
2064
  altBoundary: !0
1994
- }), l = Ne(r, o), c = Ne(a, s, n), h = Ve(l), u = Ve(c);
2065
+ }), l = $e(r, o), c = $e(a, s, n), h = Ke(l), u = Ke(c);
1995
2066
  t.modifiersData[i] = {
1996
2067
  referenceClippingOffsets: l,
1997
2068
  popperEscapeOffsets: c,
@@ -2002,14 +2073,14 @@ function nn(e) {
2002
2073
  "data-popper-escaped": u
2003
2074
  });
2004
2075
  }
2005
- const rn = {
2076
+ const pn = {
2006
2077
  name: "hide",
2007
2078
  enabled: !0,
2008
2079
  phase: "main",
2009
2080
  requiresIfExists: ["preventOverflow"],
2010
- fn: nn
2081
+ fn: un
2011
2082
  };
2012
- function an(e, t, i) {
2083
+ function mn(e, t, i) {
2013
2084
  var o = V(e), s = [z, R].indexOf(o) >= 0 ? -1 : 1, n = typeof i == "function" ? i(Object.assign({}, t, {
2014
2085
  placement: e
2015
2086
  })) : i, r = n[0], a = n[1];
@@ -2021,108 +2092,108 @@ function an(e, t, i) {
2021
2092
  y: a
2022
2093
  };
2023
2094
  }
2024
- function ln(e) {
2025
- var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r = oi.reduce(function(h, u) {
2026
- return h[u] = an(u, t.rects, n), h;
2095
+ function fn(e) {
2096
+ var t = e.state, i = e.options, o = e.name, s = i.offset, n = s === void 0 ? [0, 0] : s, r = li.reduce(function(h, u) {
2097
+ return h[u] = mn(u, t.rects, n), h;
2027
2098
  }, {}), a = r[t.placement], l = a.x, c = a.y;
2028
2099
  t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += c), t.modifiersData[o] = r;
2029
2100
  }
2030
- const hn = {
2101
+ const gn = {
2031
2102
  name: "offset",
2032
2103
  enabled: !0,
2033
2104
  phase: "main",
2034
2105
  requires: ["popperOffsets"],
2035
- fn: ln
2106
+ fn
2036
2107
  };
2037
- function cn(e) {
2108
+ function vn(e) {
2038
2109
  var t = e.state, i = e.name;
2039
- t.modifiersData[i] = ci({
2110
+ t.modifiersData[i] = fi({
2040
2111
  reference: t.rects.reference,
2041
2112
  element: t.rects.popper,
2042
2113
  placement: t.placement
2043
2114
  });
2044
2115
  }
2045
- const dn = {
2116
+ const yn = {
2046
2117
  name: "popperOffsets",
2047
2118
  enabled: !0,
2048
2119
  phase: "read",
2049
- fn: cn,
2120
+ fn: vn,
2050
2121
  data: {}
2051
2122
  };
2052
- function un(e) {
2123
+ function bn(e) {
2053
2124
  return e === "x" ? "y" : "x";
2054
2125
  }
2055
- function pn(e) {
2056
- 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, m = i.tether, f = m === void 0 ? !0 : m, C = i.tetherOffset, y = C === void 0 ? 0 : C, b = St(t, {
2126
+ function wn(e) {
2127
+ 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, m = i.tether, p = m === void 0 ? !0 : m, C = i.tetherOffset, v = C === void 0 ? 0 : C, b = Yt(t, {
2057
2128
  boundary: l,
2058
2129
  rootBoundary: c,
2059
2130
  padding: u,
2060
2131
  altBoundary: h
2061
- }), I = V(t.placement), E = ft(t.placement), w = !E, v = he(I), P = un(v), p = t.modifiersData.popperOffsets, g = t.rects.reference, x = t.rects.popper, k = typeof y == "function" ? y(Object.assign({}, t.rects, {
2132
+ }), x = V(t.placement), P = wt(t.placement), w = !P, g = ye(x), E = bn(g), f = t.modifiersData.popperOffsets, y = t.rects.reference, I = t.rects.popper, T = typeof v == "function" ? v(Object.assign({}, t.rects, {
2062
2133
  placement: t.placement
2063
- })) : y, S = typeof k == "number" ? {
2064
- mainAxis: k,
2065
- altAxis: k
2134
+ })) : v, k = typeof T == "number" ? {
2135
+ mainAxis: T,
2136
+ altAxis: T
2066
2137
  } : Object.assign({
2067
2138
  mainAxis: 0,
2068
2139
  altAxis: 0
2069
- }, k), A = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, H = {
2140
+ }, T), X = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, O = {
2070
2141
  x: 0,
2071
2142
  y: 0
2072
2143
  };
2073
- if (p) {
2144
+ if (f) {
2074
2145
  if (n) {
2075
- var O, j = v === "y" ? R : z, U = v === "y" ? _ : F, X = v === "y" ? "height" : "width", Z = p[v], nt = Z + b[j], $ = Z - b[U], rt = f ? -x[X] / 2 : 0, vt = E === ut ? g[X] : x[X], et = E === ut ? -x[X] : -g[X], at = t.elements.arrow, Q = f && at ? le(at) : {
2146
+ var M, U = g === "y" ? R : z, $ = g === "y" ? _ : F, H = g === "y" ? "height" : "width", Z = f[g], ct = Z + b[U], K = Z - b[$], dt = p ? -I[H] / 2 : 0, ut = P === vt ? y[H] : I[H], st = P === vt ? -I[H] : -y[H], et = t.elements.arrow, it = p && et ? ve(et) : {
2076
2147
  width: 0,
2077
2148
  height: 0
2078
- }, N = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : ri(), it = N[j], lt = N[U], K = Et(0, g[X], Q[X]), gt = w ? g[X] / 2 - rt - K - it - S.mainAxis : vt - K - it - S.mainAxis, jt = w ? -g[X] / 2 + rt + K + lt + S.mainAxis : et + K + lt + S.mainAxis, yt = t.elements.arrow && Ot(t.elements.arrow), Ut = yt ? v === "y" ? yt.clientTop || 0 : yt.clientLeft || 0 : 0, bt = (O = A == null ? void 0 : A[v]) != null ? O : 0, Lt = Z + gt - bt - Ut, Mt = Z + jt - bt, Ht = Et(f ? Vt(nt, Lt) : nt, Z, f ? ot($, Mt) : $);
2079
- p[v] = Ht, H[v] = Ht - Z;
2149
+ }, W = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : di(), nt = W[U], pt = W[$], q = kt(0, y[H], it[H]), Ct = 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, It = t.elements.arrow && Mt(t.elements.arrow), ee = It ? g === "y" ? It.clientTop || 0 : It.clientLeft || 0 : 0, Ot = (M = X == null ? void 0 : X[g]) != null ? M : 0, ie = Z + Ct - Ot - ee, oe = Z + te - Ot, Ht = kt(p ? Jt(ct, ie) : ct, Z, p ? lt(K, oe) : K);
2150
+ f[g] = Ht, O[g] = Ht - Z;
2080
2151
  }
2081
2152
  if (a) {
2082
- var Xt, $t = v === "x" ? R : z, Kt = v === "x" ? _ : F, q = p[P], ht = P === "y" ? "height" : "width", Yt = q + b[$t], Rt = q - b[Kt], wt = [R, z].indexOf(I) !== -1, zt = (Xt = A == null ? void 0 : A[P]) != null ? Xt : 0, Zt = wt ? Yt : q - g[ht] - x[ht] - zt + S.altAxis, Dt = wt ? q + g[ht] + x[ht] - zt - S.altAxis : Rt, Bt = f && wt ? Rs(Zt, q, Dt) : Et(f ? Zt : Yt, q, f ? Dt : Rt);
2083
- p[P] = Bt, H[P] = Bt - q;
2153
+ var xt, Rt = g === "x" ? R : z, zt = g === "x" ? _ : F, J = f[E], mt = E === "y" ? "height" : "width", Zt = J + b[Rt], Dt = J - b[zt], Pt = [R, z].indexOf(x) !== -1, Bt = (xt = X == null ? void 0 : X[E]) != null ? xt : 0, Gt = Pt ? Zt : J - y[mt] - I[mt] - Bt + k.altAxis, _t = Pt ? J + y[mt] + I[mt] - Bt - k.altAxis : Dt, Ft = p && Pt ? Fs(Gt, J, _t) : kt(p ? Gt : Zt, J, p ? _t : Dt);
2154
+ f[E] = Ft, O[E] = Ft - J;
2084
2155
  }
2085
- t.modifiersData[o] = H;
2156
+ t.modifiersData[o] = O;
2086
2157
  }
2087
2158
  }
2088
- const mn = {
2159
+ const Cn = {
2089
2160
  name: "preventOverflow",
2090
2161
  enabled: !0,
2091
2162
  phase: "main",
2092
- fn: pn,
2163
+ fn: wn,
2093
2164
  requiresIfExists: ["offset"]
2094
2165
  };
2095
- function fn(e) {
2166
+ function In(e) {
2096
2167
  return {
2097
2168
  scrollLeft: e.scrollLeft,
2098
2169
  scrollTop: e.scrollTop
2099
2170
  };
2100
2171
  }
2101
- function vn(e) {
2102
- return e === D(e) || !B(e) ? ce(e) : fn(e);
2172
+ function xn(e) {
2173
+ return e === D(e) || !G(e) ? be(e) : In(e);
2103
2174
  }
2104
- function gn(e) {
2105
- var t = e.getBoundingClientRect(), i = pt(t.width) / e.offsetWidth || 1, o = pt(t.height) / e.offsetHeight || 1;
2175
+ function Pn(e) {
2176
+ var t = e.getBoundingClientRect(), i = yt(t.width) / e.offsetWidth || 1, o = yt(t.height) / e.offsetHeight || 1;
2106
2177
  return i !== 1 || o !== 1;
2107
2178
  }
2108
- function yn(e, t, i) {
2179
+ function En(e, t, i) {
2109
2180
  i === void 0 && (i = !1);
2110
- var o = B(t), s = B(t) && gn(t), n = tt(t), r = mt(e, s, i), a = {
2181
+ var o = G(t), s = G(t) && Pn(t), n = ot(t), r = bt(e, s, i), a = {
2111
2182
  scrollLeft: 0,
2112
2183
  scrollTop: 0
2113
2184
  }, l = {
2114
2185
  x: 0,
2115
2186
  y: 0
2116
2187
  };
2117
- return (o || !o && !i) && ((G(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2118
- ue(n)) && (a = vn(t)), B(t) ? (l = mt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = de(n))), {
2188
+ return (o || !o && !i) && ((j(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
2189
+ Ce(n)) && (a = xn(t)), G(t) ? (l = bt(t, !0), l.x += t.clientLeft, l.y += t.clientTop) : n && (l.x = we(n))), {
2119
2190
  x: r.left + a.scrollLeft - l.x,
2120
2191
  y: r.top + a.scrollTop - l.y,
2121
2192
  width: r.width,
2122
2193
  height: r.height
2123
2194
  };
2124
2195
  }
2125
- function bn(e) {
2196
+ function Tn(e) {
2126
2197
  var t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), o = [];
2127
2198
  e.forEach(function(n) {
2128
2199
  t.set(n.name, n);
@@ -2141,15 +2212,15 @@ function bn(e) {
2141
2212
  i.has(n.name) || s(n);
2142
2213
  }), o;
2143
2214
  }
2144
- function wn(e) {
2145
- var t = bn(e);
2146
- return Os.reduce(function(i, o) {
2215
+ function An(e) {
2216
+ var t = Tn(e);
2217
+ return zs.reduce(function(i, o) {
2147
2218
  return i.concat(t.filter(function(s) {
2148
2219
  return s.phase === o;
2149
2220
  }));
2150
2221
  }, []);
2151
2222
  }
2152
- function Cn(e) {
2223
+ function kn(e) {
2153
2224
  var t;
2154
2225
  return function() {
2155
2226
  return t || (t = new Promise(function(i) {
@@ -2159,7 +2230,7 @@ function Cn(e) {
2159
2230
  })), t;
2160
2231
  };
2161
2232
  }
2162
- function xn(e) {
2233
+ function Xn(e) {
2163
2234
  var t = e.reduce(function(i, o) {
2164
2235
  var s = i[o.name];
2165
2236
  return i[o.name] = s ? Object.assign({}, s, o, {
@@ -2171,27 +2242,27 @@ function xn(e) {
2171
2242
  return t[i];
2172
2243
  });
2173
2244
  }
2174
- var Ge = {
2245
+ var qe = {
2175
2246
  placement: "bottom",
2176
2247
  modifiers: [],
2177
2248
  strategy: "absolute"
2178
2249
  };
2179
- function je() {
2250
+ function Je() {
2180
2251
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2181
2252
  t[i] = arguments[i];
2182
2253
  return !t.some(function(o) {
2183
2254
  return !(o && typeof o.getBoundingClientRect == "function");
2184
2255
  });
2185
2256
  }
2186
- function In(e) {
2257
+ function Sn(e) {
2187
2258
  e === void 0 && (e = {});
2188
- var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? Ge : s;
2259
+ var t = e, i = t.defaultModifiers, o = i === void 0 ? [] : i, s = t.defaultOptions, n = s === void 0 ? qe : s;
2189
2260
  return function(a, l, c) {
2190
2261
  c === void 0 && (c = n);
2191
2262
  var h = {
2192
2263
  placement: "bottom",
2193
2264
  orderedModifiers: [],
2194
- options: Object.assign({}, Ge, n),
2265
+ options: Object.assign({}, qe, n),
2195
2266
  modifiersData: {},
2196
2267
  elements: {
2197
2268
  reference: a,
@@ -2199,18 +2270,18 @@ function In(e) {
2199
2270
  },
2200
2271
  attributes: {},
2201
2272
  styles: {}
2202
- }, u = [], m = !1, f = {
2273
+ }, u = [], m = !1, p = {
2203
2274
  state: h,
2204
- setOptions: function(I) {
2205
- var E = typeof I == "function" ? I(h.options) : I;
2206
- y(), h.options = Object.assign({}, n, h.options, E), h.scrollParents = {
2207
- reference: st(a) ? kt(a) : a.contextElement ? kt(a.contextElement) : [],
2208
- popper: kt(l)
2275
+ setOptions: function(x) {
2276
+ var P = typeof x == "function" ? x(h.options) : x;
2277
+ v(), h.options = Object.assign({}, n, h.options, P), h.scrollParents = {
2278
+ reference: ht(a) ? Xt(a) : a.contextElement ? Xt(a.contextElement) : [],
2279
+ popper: Xt(l)
2209
2280
  };
2210
- var w = wn(xn([].concat(o, h.options.modifiers)));
2211
- return h.orderedModifiers = w.filter(function(v) {
2212
- return v.enabled;
2213
- }), C(), f.update();
2281
+ var w = An(Xn([].concat(o, h.options.modifiers)));
2282
+ return h.orderedModifiers = w.filter(function(g) {
2283
+ return g.enabled;
2284
+ }), C(), p.update();
2214
2285
  },
2215
2286
  // Sync update – it will always be executed, even if not necessary. This
2216
2287
  // is useful for low frequency updates where sync behavior simplifies the
@@ -2219,25 +2290,25 @@ function In(e) {
2219
2290
  // prefer the async Popper#update method
2220
2291
  forceUpdate: function() {
2221
2292
  if (!m) {
2222
- var I = h.elements, E = I.reference, w = I.popper;
2223
- if (je(E, w)) {
2293
+ var x = h.elements, P = x.reference, w = x.popper;
2294
+ if (Je(P, w)) {
2224
2295
  h.rects = {
2225
- reference: yn(E, Ot(w), h.options.strategy === "fixed"),
2226
- popper: le(w)
2227
- }, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(S) {
2228
- return h.modifiersData[S.name] = Object.assign({}, S.data);
2296
+ reference: En(P, Mt(w), h.options.strategy === "fixed"),
2297
+ popper: ve(w)
2298
+ }, h.reset = !1, h.placement = h.options.placement, h.orderedModifiers.forEach(function(k) {
2299
+ return h.modifiersData[k.name] = Object.assign({}, k.data);
2229
2300
  });
2230
- for (var v = 0; v < h.orderedModifiers.length; v++) {
2301
+ for (var g = 0; g < h.orderedModifiers.length; g++) {
2231
2302
  if (h.reset === !0) {
2232
- h.reset = !1, v = -1;
2303
+ h.reset = !1, g = -1;
2233
2304
  continue;
2234
2305
  }
2235
- var P = h.orderedModifiers[v], p = P.fn, g = P.options, x = g === void 0 ? {} : g, k = P.name;
2236
- typeof p == "function" && (h = p({
2306
+ var E = h.orderedModifiers[g], f = E.fn, y = E.options, I = y === void 0 ? {} : y, T = E.name;
2307
+ typeof f == "function" && (h = f({
2237
2308
  state: h,
2238
- options: x,
2239
- name: k,
2240
- instance: f
2309
+ options: I,
2310
+ name: T,
2311
+ instance: p
2241
2312
  }) || h);
2242
2313
  }
2243
2314
  }
@@ -2245,48 +2316,48 @@ function In(e) {
2245
2316
  },
2246
2317
  // Async and optimistically optimized update – it will not be executed if
2247
2318
  // not necessary (debounced to run at most once-per-tick)
2248
- update: Cn(function() {
2319
+ update: kn(function() {
2249
2320
  return new Promise(function(b) {
2250
- f.forceUpdate(), b(h);
2321
+ p.forceUpdate(), b(h);
2251
2322
  });
2252
2323
  }),
2253
2324
  destroy: function() {
2254
- y(), m = !0;
2325
+ v(), m = !0;
2255
2326
  }
2256
2327
  };
2257
- if (!je(a, l))
2258
- return f;
2259
- f.setOptions(c).then(function(b) {
2328
+ if (!Je(a, l))
2329
+ return p;
2330
+ p.setOptions(c).then(function(b) {
2260
2331
  !m && c.onFirstUpdate && c.onFirstUpdate(b);
2261
2332
  });
2262
2333
  function C() {
2263
2334
  h.orderedModifiers.forEach(function(b) {
2264
- var I = b.name, E = b.options, w = E === void 0 ? {} : E, v = b.effect;
2265
- if (typeof v == "function") {
2266
- var P = v({
2335
+ var x = b.name, P = b.options, w = P === void 0 ? {} : P, g = b.effect;
2336
+ if (typeof g == "function") {
2337
+ var E = g({
2267
2338
  state: h,
2268
- name: I,
2269
- instance: f,
2339
+ name: x,
2340
+ instance: p,
2270
2341
  options: w
2271
- }), p = function() {
2342
+ }), f = function() {
2272
2343
  };
2273
- u.push(P || p);
2344
+ u.push(E || f);
2274
2345
  }
2275
2346
  });
2276
2347
  }
2277
- function y() {
2348
+ function v() {
2278
2349
  u.forEach(function(b) {
2279
2350
  return b();
2280
2351
  }), u = [];
2281
2352
  }
2282
- return f;
2353
+ return p;
2283
2354
  };
2284
2355
  }
2285
- var Pn = [Gs, dn, Ns, Hs, hn, sn, mn, Bs, rn], En = /* @__PURE__ */ In({
2286
- defaultModifiers: Pn
2356
+ var Yn = [Qs, yn, qs, Bs, gn, dn, Cn, js, pn], Ln = /* @__PURE__ */ Sn({
2357
+ defaultModifiers: Yn
2287
2358
  });
2288
- const kn = '<svg class="ci360-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>';
2289
- class Tn {
2359
+ const Mn = '<svg class="ci360-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>';
2360
+ class On {
2290
2361
  /**
2291
2362
  * @param {Array} hotspotsConfig - Hotspot configuration array
2292
2363
  * @param {HTMLElement} container - Container element
@@ -2295,12 +2366,12 @@ class Tn {
2295
2366
  * @param {string} options.trigger - 'hover' or 'click' (default: 'hover')
2296
2367
  */
2297
2368
  constructor(t, i, o, s = {}) {
2298
- ye(this, "updateHotspotPosition", (t, i) => {
2369
+ Ie(this, "updateHotspotPosition", (t, i) => {
2299
2370
  this.currentActiveIndex = t, this.currentOrientation = i;
2300
- const o = cs(this.hotspotsConfig, t, i);
2371
+ const o = vs(this.hotspotsConfig, t, i);
2301
2372
  this.hideHotspots(), o.forEach((s) => this.updateAndShowHotspot(s, t));
2302
2373
  });
2303
- this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = wo(this.container), this.hotspotsConfig = fs(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null, this.onNavigate = s.onNavigate || null;
2374
+ this.container = i, this.popper = null, this.popperInstance = null, this.hotspotsContainer = ko(this.container), this.hotspotsConfig = Is(t), this.shouldHidePopper = !0, this.hidePopper = this.hidePopper.bind(this), this.forceHidePopper = this.forceHidePopper.bind(this), this.imageAspectRatio = o, this.popperListeners = [], this.trigger = s.trigger || "hover", this.onOpen = s.onOpen || null, this.onClose = s.onClose || null, this.onProductClick = s.onProductClick || null, this.onNavigate = s.onNavigate || null;
2304
2375
  const { containerSize: n } = t[0];
2305
2376
  this.initialContainerSize = n || [i.offsetWidth, i.offsetHeight], this.initHotspots(), this.updateHotspotsForResize(i.offsetWidth, i.offsetHeight), this.observeContainerResize();
2306
2377
  }
@@ -2311,7 +2382,7 @@ class Tn {
2311
2382
  }), this.resizeObserver.observe(this.container);
2312
2383
  }
2313
2384
  updateHotspotsForResize(t, i) {
2314
- this.hotspotsConfig = vs({
2385
+ this.hotspotsConfig = xs({
2315
2386
  newWidth: t,
2316
2387
  newHeight: i,
2317
2388
  initialContainerSize: this.initialContainerSize,
@@ -2327,8 +2398,8 @@ class Tn {
2327
2398
  showPopper({ hotspotElement: t, content: i, id: o, keepOpen: s }) {
2328
2399
  var u;
2329
2400
  this.popperInstance && this.hidePopper();
2330
- const n = ps(this.container);
2331
- this.popper = ms(i, o, this.container.parentElement), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
2401
+ const n = ws(this.container);
2402
+ this.popper = Cs(i, o, this.container.parentElement), this.currentHotspotElement = t, t.setAttribute("aria-expanded", "true"), t.setAttribute("aria-describedby", `cloudimage-360-popper-${o}`);
2332
2403
  const r = () => {
2333
2404
  this.shouldHidePopper = !1;
2334
2405
  }, a = () => {
@@ -2344,15 +2415,15 @@ class Tn {
2344
2415
  { element: t, event: "mouseleave", handler: l },
2345
2416
  { element: t, event: "mouseenter", handler: c }
2346
2417
  ), this.onProductClick) {
2347
- const m = this.onProductClick, f = (C) => {
2348
- const y = C.target.closest(".ci360-popper-cta");
2349
- y && m(y.dataset.productId ?? "", o);
2418
+ const m = this.onProductClick, p = (C) => {
2419
+ const v = C.target.closest(".ci360-popper-cta");
2420
+ v && m(v.dataset.productId ?? "", o);
2350
2421
  };
2351
- this.popper.addEventListener("click", f), this.popperListeners.push(
2352
- { element: this.popper, event: "click", handler: f }
2422
+ this.popper.addEventListener("click", p), this.popperListeners.push(
2423
+ { element: this.popper, event: "click", handler: p }
2353
2424
  );
2354
2425
  }
2355
- const h = En(t, this.popper, n);
2426
+ const h = Ln(t, this.popper, n);
2356
2427
  h.forceUpdate(), this.popper.setAttribute("data-show", ""), this.shouldHidePopper = !1, this.popperInstance = {
2357
2428
  ...h,
2358
2429
  keepOpen: s,
@@ -2368,7 +2439,7 @@ class Tn {
2368
2439
  var t;
2369
2440
  this.shouldHidePopper && !((t = this.popperInstance) != null && t.keepOpen) && (this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.hidePopperTimeout = setTimeout(() => {
2370
2441
  this.shouldHidePopper && this.hidePopper();
2371
- }, Ui));
2442
+ }, io));
2372
2443
  }
2373
2444
  hidePopper() {
2374
2445
  var o, s;
@@ -2387,7 +2458,7 @@ class Tn {
2387
2458
  const n = this.popper;
2388
2459
  this.popper = null, setTimeout(() => {
2389
2460
  i == null || i.destroy(), n.remove();
2390
- }, $i);
2461
+ }, oo);
2391
2462
  } else
2392
2463
  i == null || i.destroy();
2393
2464
  this.shouldHidePopper = !0;
@@ -2400,12 +2471,12 @@ class Tn {
2400
2471
  this.shouldHidePopper = !0, this.popperInstance && (this.popperInstance.keepOpen = !1), this.hidePopper();
2401
2472
  }
2402
2473
  createHotspot(t) {
2403
- const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c = ee(t), h = ds(i, n, r);
2474
+ const { id: i, keepOpen: o, onClick: s, label: n, markerStyle: r, navigateTo: a } = t, l = typeof a == "string" ? a.trim() : void 0, c = de(t), h = ys(i, n, r);
2404
2475
  if (l) {
2405
- h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML = kn;
2476
+ h.classList.add("cloudimage-360-hotspot--navigate"), h.innerHTML = Mn;
2406
2477
  const u = n || l;
2407
2478
  h.setAttribute("role", "button"), h.setAttribute("aria-label", `Navigate to ${u}`), h.setAttribute("aria-roledescription", "navigation hotspot"), h.style.cursor = "pointer";
2408
- const m = c || (n ? ee({ data: { title: n } }) : "");
2479
+ const m = c || (n ? de({ data: { title: n } }) : "");
2409
2480
  m ? (h.setAttribute("aria-haspopup", "true"), h.addEventListener(
2410
2481
  "mouseenter",
2411
2482
  () => this.showPopper({ hotspotElement: h, content: m, id: i, keepOpen: !1 })
@@ -2417,13 +2488,13 @@ class Tn {
2417
2488
  ), h.addEventListener("blur", () => {
2418
2489
  this.shouldHidePopper = !0, this.checkAndHidePopper();
2419
2490
  })) : (h.removeAttribute("aria-haspopup"), h.removeAttribute("aria-expanded"));
2420
- const f = () => {
2491
+ const p = () => {
2421
2492
  this.hidePopper(), this.onNavigate ? this.onNavigate(l) : console.warn(`[ci360] navigateTo hotspot "${i}" clicked but no onNavigate callback is configured.`);
2422
2493
  };
2423
2494
  h.onclick = (C) => {
2424
- C.stopPropagation(), f();
2495
+ C.stopPropagation(), p();
2425
2496
  }, h.addEventListener("keydown", (C) => {
2426
- (C.key === "Enter" || C.key === " ") && (C.preventDefault(), f());
2497
+ (C.key === "Enter" || C.key === " ") && (C.preventDefault(), p());
2427
2498
  }), this.hotspotsContainer.appendChild(h);
2428
2499
  return;
2429
2500
  }
@@ -2458,7 +2529,7 @@ class Tn {
2458
2529
  showHotspotById(t) {
2459
2530
  const i = this.hotspotsConfig.find((n) => n.id === t);
2460
2531
  if (!i || i.navigateTo) return;
2461
- const o = ee(i);
2532
+ const o = de(i);
2462
2533
  if (!o) return;
2463
2534
  const s = this.hotspotsContainer.querySelector(`[data-hotspot-id="${t}"]`);
2464
2535
  s && s.style.opacity === "1" && this.showPopper({
@@ -2478,12 +2549,12 @@ class Tn {
2478
2549
  this.hidePopperTimeout && clearTimeout(this.hidePopperTimeout), this.resizeObserver.disconnect(), this.hidePopper(), this.hotspotsContainer.innerHTML = "";
2479
2550
  }
2480
2551
  }
2481
- const Ue = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
2482
- class $e {
2552
+ const Qe = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
2553
+ class ti {
2483
2554
  constructor(t, i) {
2484
- this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [];
2555
+ this.container = t, this.isClicked = !1, this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1;
2485
2556
  const o = Math.round(window.devicePixelRatio || 1);
2486
- this.devicePixelRatio = Ue ? Math.min(o, 2) : o, this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.touchDevice = jo(), this.dragJustEnded = !1, this.zoomPan = null, this.gestureRecognizer = null, this.zoomControlsUI = null, this.scrollHintUI = null, this.highResLoaded = !1, this.useMainThreadCanvas = Ue, this.canvasWorker = this.useMainThreadCanvas ? new ns() : new ss(), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null, this.isAnimatingToFrame = !1, this.onMoveHandler = this.onMoveHandler.bind(this), this.destroy = this.destroy.bind(this), this.init(this.container, i);
2557
+ this.devicePixelRatio = Qe ? Math.min(o, 2) : o, this.id = t.id, this.movementStart = { x: 0, y: 0 }, this.draggingDirection = null, this.isReady = !1, this.velocityX = 0, this.velocityY = 0, this.lastDragTime = 0, this.lastDragX = 0, this.lastDragY = 0, this.inertiaAnimationId = null, this.hasInteracted = !1, this.touchDevice = ts(), this.dragJustEnded = !1, this.zoomPan = null, this.gestureRecognizer = null, this.zoomControlsUI = null, this.scrollHintUI = null, this.highResLoaded = !1, this.useMainThreadCanvas = Qe, this.canvasWorker = this.useMainThreadCanvas ? new us() : new ds(), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null, this.isAnimatingToFrame = !1, this.onMoveHandler = this.onMoveHandler.bind(this), this.destroy = this.destroy.bind(this), this.init(this.container, i);
2487
2558
  }
2488
2559
  /**
2489
2560
  * Close ImageBitmap objects to free GPU memory
@@ -2500,7 +2571,7 @@ class $e {
2500
2571
  typeof o == "function" && o({ ...i, viewerId: this.id });
2501
2572
  }
2502
2573
  announce(t) {
2503
- xo(this.ariaLiveRegion, t);
2574
+ So(this.ariaLiveRegion, t);
2504
2575
  }
2505
2576
  mouseDown(t) {
2506
2577
  if (!this.isReady) return;
@@ -2518,12 +2589,12 @@ class $e {
2518
2589
  this.isReady && (!this.isZoomed && !this.autoplayJustStopped && this.showAllIcons(), this.inertia && this.isDragging && (Math.abs(this.velocityX) > 0.1 || Math.abs(this.velocityY) > 0.1) && this.startInertia(), this.isDragging && (this.emit("onDragEnd"), this.dragJustEnded = !0), this.movementStart = { x: 0, y: 0 }, this.isClicked = !1, this.isDragging = !1, this.innerBox.style.cursor = "grab");
2519
2590
  }
2520
2591
  startInertia() {
2521
- const o = this.dragSpeed / Ie, s = o * (this.amountX / this.container.offsetWidth), n = o * (this.amountY / this.container.offsetHeight), r = () => {
2592
+ const o = this.dragSpeed / Ae, s = o * (this.amountX / this.container.offsetWidth), n = o * (this.amountY / this.container.offsetHeight), r = () => {
2522
2593
  if (this.velocityX *= 0.95, this.velocityY *= 0.95, Math.abs(this.velocityX) < 0.01 && Math.abs(this.velocityY) < 0.01) {
2523
2594
  this.inertiaAnimationId = null;
2524
2595
  return;
2525
2596
  }
2526
- const a = this.velocityX * 16, l = this.velocityY * 16, c = Ye({
2597
+ const a = this.velocityX * 16, l = this.velocityY * 16, c = Be({
2527
2598
  deltaX: a,
2528
2599
  deltaY: l,
2529
2600
  reversed: this.dragReverse,
@@ -2545,17 +2616,17 @@ class $e {
2545
2616
  const u = performance.now(), m = u - this.lastDragTime;
2546
2617
  m > 0 && m < 100 && (this.velocityX = (t - this.lastDragX) / m, this.velocityY = (i - this.lastDragY) / m), this.lastDragTime = u, this.lastDragX = t, this.lastDragY = i;
2547
2618
  }
2548
- this.draggingDirection = Ye({
2619
+ this.draggingDirection = Be({
2549
2620
  deltaX: o,
2550
2621
  deltaY: s,
2551
2622
  reversed: this.dragReverse,
2552
2623
  allowSpinX: this.allowSpinX,
2553
2624
  allowSpinY: this.allowSpinY
2554
2625
  }) || this.draggingDirection;
2555
- const n = this.dragSpeed / Ie, r = n * (this.amountX / this.container.offsetWidth), a = n * (this.amountY / this.container.offsetHeight), l = this.allowSpinX ? Math.abs(Math.round(o * r)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * a)) : 0;
2626
+ const n = this.dragSpeed / Ae, r = n * (this.amountX / this.container.offsetWidth), a = n * (this.amountY / this.container.offsetHeight), l = this.allowSpinX ? Math.abs(Math.round(o * r)) : 0, c = this.allowSpinY ? Math.abs(Math.round(s * a)) : 0;
2556
2627
  (this.allowSpinX && l !== 0 || this.allowSpinY && c !== 0) && (this.hasInteracted = !0, this.hideHotspotPopper(), this.onMoveHandler(this.draggingDirection, l, c), this.movementStart = { x: t, y: i }, setTimeout(() => {
2557
2628
  this.isDragging || (this.isDragging = !0, this.emit("onDragStart"));
2558
- }, ji));
2629
+ }, eo));
2559
2630
  }
2560
2631
  mouseMove(t) {
2561
2632
  !this.isReady || !this.isClicked || this.isZoomed || (this.hideAllIcons(), this.drag(t.pageX, t.pageY));
@@ -2564,8 +2635,20 @@ class $e {
2564
2635
  this.dragJustEnded = !1, this.autoplayJustStopped = !1;
2565
2636
  }
2566
2637
  loadHigherQualityImages(t, i) {
2567
- const o = Pt(this.srcXConfig, t), s = this.allowSpinY ? Pt(this.srcYConfig, t) : null;
2568
- Ee({
2638
+ if (this.isGridMode) {
2639
+ const n = at(this.srcGridConfig, t);
2640
+ Se({
2641
+ cdnPath: n,
2642
+ config: this.srcGridConfig,
2643
+ onAllImagesLoad: (r) => {
2644
+ this.closeImageBitmaps(this.imagesGrid), this.imagesGrid = r, i();
2645
+ },
2646
+ onError: (r) => this.emit("onError", r)
2647
+ });
2648
+ return;
2649
+ }
2650
+ const o = at(this.srcXConfig, t), s = this.allowSpinY ? at(this.srcYConfig, t) : null;
2651
+ Xe({
2569
2652
  cdnPathX: o,
2570
2653
  cdnPathY: s,
2571
2654
  configX: this.srcXConfig,
@@ -2594,13 +2677,13 @@ class $e {
2594
2677
  }
2595
2678
  initZoom() {
2596
2679
  const t = this.zoomMax || 5, i = this.zoomStep || 0.5;
2597
- this.zoomPan = new qo(this.innerBox, {
2680
+ this.zoomPan = new ss(this.innerBox, {
2598
2681
  zoomMax: t,
2599
2682
  zoomStep: i,
2600
2683
  onZoomChange: (s, n, r) => this.onZoomChange(s, n, r)
2601
2684
  });
2602
2685
  const o = this.getDrawDimensions();
2603
- o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new Jo(this.innerBox, {
2686
+ o && this.zoomPan.setDrawSize(o.drawWidth, o.drawHeight), this.touchDevice && this.pinchZoom !== !1 && (this.gestureRecognizer = new ns(this.innerBox, {
2604
2687
  zoomMax: t,
2605
2688
  getZoom: () => this.zoomPan ? this.zoomPan.getZoom() : 1,
2606
2689
  onPinchZoom: (s, n, r) => {
@@ -2612,7 +2695,7 @@ class $e {
2612
2695
  onDoubleTap: (s, n) => {
2613
2696
  this.zoomPan && (this.zoomPan.isZoomed() ? this.zoomPan.resetZoom() : this.zoomPan.zoomTowardPoint(2, s, n));
2614
2697
  }
2615
- })), this.zoomControls && !this.touchDevice && (this.zoomControlsUI = is(this.innerBox, {
2698
+ })), this.zoomControls && !this.touchDevice && (this.zoomControlsUI = hs(this.innerBox, {
2616
2699
  position: this.zoomControlsPosition || "bottom-left",
2617
2700
  zoomMax: t,
2618
2701
  onZoomIn: () => this.zoomPan && this.zoomPan.zoomIn(),
@@ -2671,11 +2754,11 @@ class $e {
2671
2754
  t.preventDefault(), this.hideHints();
2672
2755
  return;
2673
2756
  }
2674
- if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o, qi)) {
2757
+ if (this.isZoomed && this.zoomPan && this.zoomPan.handleKeyPan(o, no)) {
2675
2758
  t.preventDefault();
2676
2759
  return;
2677
2760
  }
2678
- switch (Xe(o, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), o) {
2761
+ switch (De(o, this.allowSpinY) && (this.hasInteracted = !0, this.hideAllIcons(), this.hideHints()), o) {
2679
2762
  case 37:
2680
2763
  s ? this.moveLeft() : this.moveRight();
2681
2764
  break;
@@ -2692,44 +2775,53 @@ class $e {
2692
2775
  }
2693
2776
  keyUp(t) {
2694
2777
  const { keyCode: i } = t;
2695
- Xe(i, this.allowSpinY) && this.showAllIcons();
2778
+ De(i, this.allowSpinY) && this.showAllIcons();
2696
2779
  }
2697
2780
  moveActiveXIndexUp(t) {
2698
- this.orientation = L.X, this.activeImageX = (this.activeImageX + t) % this.amountX;
2781
+ this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX + t) % this.amountX;
2699
2782
  }
2700
2783
  moveActiveXIndexDown(t) {
2701
- this.orientation = L.X, this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
2784
+ this.isGridMode || (this.orientation = L.X), this.activeImageX = (this.activeImageX - t + this.amountX) % this.amountX;
2702
2785
  }
2703
2786
  moveActiveYIndexUp(t) {
2704
- this.orientation = L.Y, this.activeImageY = (this.activeImageY + t) % this.amountY;
2787
+ this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY + t) % this.amountY;
2705
2788
  }
2706
2789
  moveActiveYIndexDown(t) {
2707
- this.orientation = L.Y, this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
2790
+ this.isGridMode || (this.orientation = L.Y), this.activeImageY = (this.activeImageY - t + this.amountY) % this.amountY;
2708
2791
  }
2709
2792
  moveRight(t, i = 1) {
2710
- t && this.activeImageX >= this.imagesX.length - 1 || (this.moveActiveXIndexUp(i), this.isZoomed || this.updateView());
2793
+ const o = this.isGridMode ? this.amountX - 1 : this.imagesX.length - 1;
2794
+ t && this.activeImageX >= o || (this.moveActiveXIndexUp(i), this.isZoomed || this.updateView());
2711
2795
  }
2712
2796
  moveLeft(t, i = 1) {
2713
2797
  t && this.activeImageX <= 0 || (this.moveActiveXIndexDown(i), this.isZoomed || this.updateView());
2714
2798
  }
2715
2799
  moveTop(t, i = 1) {
2716
- t && this.activeImageY >= this.imagesY.length - 1 || (this.moveActiveYIndexUp(i), this.isZoomed || this.updateView());
2800
+ const o = this.isGridMode ? this.amountY - 1 : this.imagesY.length - 1;
2801
+ t && this.activeImageY >= o || (this.moveActiveYIndexUp(i), this.isZoomed || this.updateView());
2717
2802
  }
2718
2803
  moveBottom(t, i = 1) {
2719
2804
  t && this.activeImageY <= 0 || (this.moveActiveYIndexDown(i), this.isZoomed || this.updateView());
2720
2805
  }
2721
2806
  onMoveHandler(t, i = 1, o = 1) {
2722
- t === "right" ? this.moveRight(this.stopAtEdges, i) : t === "left" ? this.moveLeft(this.stopAtEdges, i) : t === "up" ? this.moveTop(this.stopAtEdges, o) : t === "down" && this.moveBottom(this.stopAtEdges, o), this.emit("onSpin", {
2807
+ t === "right" ? this.moveRight(this.stopAtEdgesX, i) : t === "left" ? this.moveLeft(this.stopAtEdgesX, i) : t === "up" ? this.moveTop(this.stopAtEdgesY, o) : t === "down" && this.moveBottom(this.stopAtEdgesY, o), this.emit("onSpin", {
2723
2808
  direction: t,
2724
2809
  activeImageX: this.activeImageX,
2725
2810
  activeImageY: this.activeImageY,
2726
2811
  amountX: this.amountX,
2727
- amountY: this.amountY
2812
+ amountY: this.amountY,
2813
+ isGridMode: this.isGridMode
2728
2814
  });
2729
2815
  }
2730
2816
  updateView(t, i, o) {
2731
- const s = this.orientation === L.X ? this.activeImageX : this.activeImageY, n = this.orientation === L.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
2732
- this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(s, this.orientation), this.hotspotTimelineIndicator && this.orientation === L.X && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(n, t, i, o);
2817
+ let s;
2818
+ if (this.isGridMode) {
2819
+ const r = this.activeImageY * this.amountX + this.activeImageX;
2820
+ s = this.imagesGrid[r];
2821
+ } else
2822
+ s = this.orientation === L.X ? this.imagesX[this.activeImageX] : this.imagesY[this.activeImageY];
2823
+ const n = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.orientation === L.X ? this.activeImageX : this.activeImageY;
2824
+ this.hotspotsInstance && !this.isZoomed && !this.autoplay && this.hotspotsInstance.updateHotspotPosition(n, this.isGridMode ? "grid" : this.orientation), this.hotspotTimelineIndicator && (this.isGridMode || this.orientation === L.X) && this.updateHotspotTimelinePosition(), this.drawImageOnCanvas(s, t, i, o);
2733
2825
  }
2734
2826
  updatePercentageInLoader(t = 0) {
2735
2827
  this.loader && (this.loader.innerText = t + "%");
@@ -2761,10 +2853,14 @@ class $e {
2761
2853
  }));
2762
2854
  }
2763
2855
  pushImageToSet(t, i, o) {
2764
- o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
2856
+ o === "grid" ? this.imagesGrid[i] = t : o === L.X ? this.imagesX[i] = t : this.imagesY[i] = t;
2765
2857
  }
2766
2858
  calculatePercentage() {
2767
- const t = this.amountX + this.amountY, i = this.imagesX.length + this.imagesY.length;
2859
+ if (this.isGridMode) {
2860
+ const o = this.amountX * this.amountY, s = this.imagesGrid.filter(Boolean).length;
2861
+ return Math.round(s / o * 100);
2862
+ }
2863
+ const t = this.amountX + this.amountY, i = this.imagesX.filter(Boolean).length + this.imagesY.filter(Boolean).length;
2768
2864
  return Math.round(i / t * 100);
2769
2865
  }
2770
2866
  onImageLoad(t, i, o) {
@@ -2781,10 +2877,11 @@ class $e {
2781
2877
  if (!o) return;
2782
2878
  const s = Math.round(o.contentRect.width);
2783
2879
  s === t || s === 0 || (t = s, requestAnimationFrame(() => {
2784
- if (this.imagesX.length > 0) {
2785
- if (this.adaptCanvasSize(this.imagesX[this.activeImageX]), this.zoomPan) {
2786
- const n = this.getDrawDimensions();
2787
- n && this.zoomPan.setDrawSize(n.drawWidth, n.drawHeight, !0);
2880
+ let n;
2881
+ if (this.isGridMode ? n = this.imagesGrid[this.activeImageY * this.amountX + this.activeImageX] : this.orientation === L.Y && this.imagesY.length > 0 ? n = this.imagesY[this.activeImageY] : n = this.imagesX[this.activeImageX], n) {
2882
+ if (this.adaptCanvasSize(n), this.zoomPan) {
2883
+ const r = this.getDrawDimensions();
2884
+ r && this.zoomPan.setDrawSize(r.drawWidth, r.drawHeight, !0);
2788
2885
  }
2789
2886
  this.updateView();
2790
2887
  }
@@ -2792,47 +2889,69 @@ class $e {
2792
2889
  }), this.resizeObserver.observe(this.container);
2793
2890
  }
2794
2891
  onAllImagesLoaded() {
2795
- if (this.addAllIcons(), this.isReady = !0, this.amountX = this.imagesX.length, this.amountY = this.imagesY.length, this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots && (this.hotspotsInstance = new Tn(this.hotspots, this.innerBox, this.imageAspectRatio, {
2796
- trigger: this.hotspotTrigger,
2797
- onOpen: this.onHotspotOpen,
2798
- onClose: this.onHotspotClose,
2799
- onProductClick: this.onProductClick,
2800
- onNavigate: this.onNavigate
2801
- }), this.addHotspotTimeline(), this.autoplay ? (this.hotspotsInstance.hideHotspots(), this.hideHotspotTimeline()) : (this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), this.showHotspotTimeline())), this.emit("onLoad", { imagesX: this.imagesX.length, imagesY: this.imagesY.length }), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
2802
- const t = this.hints === !0 || this.hints === void 0 ? Se(this.viewerConfig, this.touchDevice) : this.hints;
2803
- t && t.length > 0 && (this.hintsOverlay = Te(this.innerBox, t), Ae(this.hintsOverlay));
2892
+ if (this.addAllIcons(), this.isReady = !0, this.isGridMode || (this.amountX = this.imagesX.length, this.amountY = this.imagesY.length), this.activeImageX = this.autoplayReverse ? this.amountX - 1 : 0, this.activeImageY = this.autoplayReverse ? this.amountY - 1 : 0, this.hotspots)
2893
+ if (this.hotspotsInstance = new On(this.hotspots, this.innerBox, this.imageAspectRatio, {
2894
+ trigger: this.hotspotTrigger,
2895
+ onOpen: this.onHotspotOpen,
2896
+ onClose: this.onHotspotClose,
2897
+ onProductClick: this.onProductClick,
2898
+ onNavigate: this.onNavigate
2899
+ }), this.addHotspotTimeline(), this.autoplay)
2900
+ this.hotspotsInstance.hideHotspots(), this.hideHotspotTimeline();
2901
+ else {
2902
+ const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
2903
+ this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
2904
+ }
2905
+ if (this.emit("onLoad", {
2906
+ imagesX: this.isGridMode ? this.amountX : this.imagesX.length,
2907
+ imagesY: this.isGridMode ? this.amountY : this.imagesY.length,
2908
+ ...this.isGridMode && { imagesGrid: this.imagesGrid.filter(Boolean).length }
2909
+ }), this.emit("onReady"), this.announce("360 degree view loaded. Use mouse drag or arrow keys to rotate."), this.hints !== !1 && !this.autoplay) {
2910
+ const t = this.hints === !0 || this.hints === void 0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
2911
+ t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
2804
2912
  }
2805
- this.autoplay && (this.hideAllIcons(), Uo(this.play.bind(this))());
2913
+ this.autoplay && (this.hideAllIcons(), es(this.play.bind(this))());
2806
2914
  }
2807
2915
  toggleFullscreen(t) {
2808
- t.stopPropagation(), this.hideHotspotPopper(), te() ? Re() : Ko(this.container);
2916
+ t.stopPropagation(), this.hideHotspotPopper(), ce() ? Ge() : os(this.container);
2809
2917
  }
2810
2918
  onFullscreenChange() {
2811
- const t = te() === this.container, i = this.container.classList.contains("cloudimage-360--fullscreen");
2812
- t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t), vo(this.fullscreenIcon, t), t ? (this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.")) : (this.emit("onFullscreenClose"), this.announce("Exited fullscreen mode")));
2919
+ const t = ce() === this.container, i = this.container.classList.contains("cloudimage-360--fullscreen");
2920
+ t !== i && (this.container.classList.toggle("cloudimage-360--fullscreen", t), Po(this.fullscreenIcon, t), t ? (this.emit("onFullscreenOpen"), this.announce("Opened fullscreen mode. Press Escape to exit.")) : (this.emit("onFullscreenClose"), this.announce("Exited fullscreen mode")));
2813
2921
  }
2814
2922
  play() {
2815
2923
  if (this.isClicked) return;
2816
2924
  this.hide360ViewCircleIcon(), this.emit("onAutoplayStart");
2817
- const t = this.speed * 36 / (this.amountX + this.amountY), i = {
2925
+ let t;
2926
+ if (this.isGridMode) {
2927
+ const s = this.autoplayBehavior;
2928
+ s === "spin-x" ? t = this.amountX : s === "spin-y" ? t = this.amountY : t = Math.max(this.amountX, this.amountY);
2929
+ } else
2930
+ t = this.amountX + this.amountY;
2931
+ const i = this.speed * 36 / t, o = {
2818
2932
  left: this.moveLeft.bind(this),
2819
2933
  right: this.moveRight.bind(this),
2820
2934
  top: this.moveTop.bind(this),
2821
2935
  bottom: this.moveBottom.bind(this)
2822
2936
  };
2823
2937
  this.loopTimeoutId = window.setInterval(() => {
2824
- if (this.playOnce && Wo({
2938
+ if (this.playOnce && Ko({
2825
2939
  autoplayBehavior: this.autoplayBehavior,
2826
2940
  activeImageX: this.activeImageX,
2827
2941
  activeImageY: this.activeImageY,
2828
2942
  amountX: this.amountX,
2829
2943
  amountY: this.amountY,
2830
- autoplayReverse: this.autoplayReverse
2944
+ autoplayReverse: this.autoplayReverse,
2945
+ isGridMode: this.isGridMode
2831
2946
  })) {
2832
2947
  this.stopAutoplay();
2833
2948
  return;
2834
2949
  }
2835
- No({
2950
+ if (this.isGridMode) {
2951
+ this.gridAutoplayTick(o);
2952
+ return;
2953
+ }
2954
+ qo({
2836
2955
  autoplayBehavior: this.autoplayBehavior,
2837
2956
  activeImageX: this.activeImageX,
2838
2957
  activeImageY: this.activeImageY,
@@ -2840,24 +2959,62 @@ class $e {
2840
2959
  amountY: this.amountY,
2841
2960
  autoplayReverse: this.autoplayReverse,
2842
2961
  spinDirection: this.spinDirection
2843
- }) && (this.spinDirection = Go(this.spinDirection));
2844
- const n = this.spinDirection === "y";
2845
- Fo({
2962
+ }) && (this.spinDirection = Qo(this.spinDirection));
2963
+ const r = this.spinDirection === "y";
2964
+ $o({
2846
2965
  autoplayBehavior: this.autoplayBehavior,
2847
- spinY: n,
2966
+ spinY: r,
2848
2967
  reversed: this.autoplayReverse,
2849
- loopTriggers: i
2968
+ loopTriggers: o
2850
2969
  });
2851
- }, t);
2970
+ }, i);
2971
+ }
2972
+ gridAutoplayTick(t) {
2973
+ const i = this.autoplayReverse, o = this.autoplayBehavior;
2974
+ if (o === "spin-x") {
2975
+ i ? t.left() : t.right();
2976
+ return;
2977
+ }
2978
+ if (o === "spin-y") {
2979
+ i ? t.bottom() : t.top();
2980
+ return;
2981
+ }
2982
+ if (o === "spin-xy") {
2983
+ const s = i ? 0 : this.amountX - 1, n = this.activeImageX === s;
2984
+ i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX, n && (i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY), this.isZoomed || this.updateView(), this.emit("onSpin", {
2985
+ direction: i ? "left" : "right",
2986
+ activeImageX: this.activeImageX,
2987
+ activeImageY: this.activeImageY,
2988
+ amountX: this.amountX,
2989
+ amountY: this.amountY,
2990
+ isGridMode: !0
2991
+ });
2992
+ return;
2993
+ }
2994
+ if (o === "spin-yx") {
2995
+ const s = i ? 0 : this.amountY - 1, n = this.activeImageY === s;
2996
+ i ? this.activeImageY = (this.activeImageY - 1 + this.amountY) % this.amountY : this.activeImageY = (this.activeImageY + 1) % this.amountY, n && (i ? this.activeImageX = (this.activeImageX - 1 + this.amountX) % this.amountX : this.activeImageX = (this.activeImageX + 1) % this.amountX), this.isZoomed || this.updateView(), this.emit("onSpin", {
2997
+ direction: i ? "down" : "up",
2998
+ activeImageX: this.activeImageX,
2999
+ activeImageY: this.activeImageY,
3000
+ amountX: this.amountX,
3001
+ amountY: this.amountY,
3002
+ isGridMode: !0
3003
+ });
3004
+ }
2852
3005
  }
2853
3006
  stopAutoplay() {
2854
- if (this.showAllIcons(), this.autoplay = !1, window.clearTimeout(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hotspotsInstance && (this.hotspotsInstance.updateHotspotPosition(this.activeImageX, this.orientation), this.showHotspotTimeline()), this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
2855
- const t = this.hints === !0 ? Se(this.viewerConfig, this.touchDevice) : this.hints;
2856
- t && t.length > 0 && (this.hintsOverlay = Te(this.innerBox, t), Ae(this.hintsOverlay));
3007
+ if (this.showAllIcons(), this.autoplay = !1, window.clearInterval(this.loopTimeoutId), this.loopTimeoutId = null, this.emit("onAutoplayStop"), this.hotspotsInstance) {
3008
+ const t = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX, i = this.isGridMode ? "grid" : this.orientation;
3009
+ this.hotspotsInstance.updateHotspotPosition(t, i), this.showHotspotTimeline();
3010
+ }
3011
+ if (this.hints !== !1 && !this.hintsOverlay && !this.hintsHidden) {
3012
+ const t = this.hints === !0 ? Me(this.viewerConfig, this.touchDevice) : this.hints;
3013
+ t && t.length > 0 && (this.hintsOverlay = Le(this.innerBox, t), Oe(this.hintsOverlay));
2857
3014
  }
2858
3015
  }
2859
3016
  destroy() {
2860
- this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), te() === this.container && Re(), this.container && (this.container.classList.remove("ci360-theme-dark", "ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand", "cloudimage-360--fullscreen"), this.container.style.removeProperty("--ci360-hotspot-brand-color"), this.container.innerHTML = "");
3017
+ this.stopAutoplay(), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null), this.removeEvents(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isGridMode = !1, this.isReady = !1, this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), this.canvasWorker && (this.canvasWorker.terminate(), this.canvasWorker = null), this.hotspotsInstance && this.hotspotsInstance.destroy(), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), ce() === this.container && Ge(), this.container && (this.container.classList.remove("ci360-theme-dark", "ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand", "cloudimage-360--fullscreen"), this.container.style.removeProperty("--ci360-hotspot-brand-color"), this.container.innerHTML = "");
2861
3018
  }
2862
3019
  /**
2863
3020
  * Release memory by closing ImageBitmap objects without destroying the viewer.
@@ -2865,7 +3022,7 @@ class $e {
2865
3022
  * Call reloadImages() to restore the images when the viewer becomes visible again.
2866
3023
  */
2867
3024
  releaseMemory() {
2868
- this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.imagesX = [], this.imagesY = [], this.isMemoryReleased = !0;
3025
+ this.stopAutoplay(), this.closeImageBitmaps(this.imagesX), this.closeImageBitmaps(this.imagesY), this.closeImageBitmaps(this.imagesGrid), this.imagesX = [], this.imagesY = [], this.imagesGrid = [], this.isMemoryReleased = !0;
2869
3026
  }
2870
3027
  /**
2871
3028
  * Reload images after memory was released.
@@ -2880,7 +3037,7 @@ class $e {
2880
3037
  });
2881
3038
  }
2882
3039
  addInitialIcon() {
2883
- this.initialIcon || this.hide360Logo || (this.initialIcon = uo(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
3040
+ this.initialIcon || this.hide360Logo || (this.initialIcon = wo(this.logoSrc), this.innerBox.appendChild(this.initialIcon));
2884
3041
  }
2885
3042
  showInitialIcon() {
2886
3043
  !this.initialIcon || this.hasInteracted || (this.initialIcon.style.opacity = 1);
@@ -2889,7 +3046,7 @@ class $e {
2889
3046
  this.initialIcon && (this.initialIcon.style.opacity = 0);
2890
3047
  }
2891
3048
  addFullscreenIcon() {
2892
- !this.fullscreen || !$o() || (this.fullscreenIcon = fo(), this.fullscreenIcon.onclick = this.toggleFullscreen.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
3049
+ !this.fullscreen || !is() || (this.fullscreenIcon = xo(), this.fullscreenIcon.onclick = this.toggleFullscreen.bind(this), this.iconsContainer.appendChild(this.fullscreenIcon));
2893
3050
  }
2894
3051
  showFullscreenIcon() {
2895
3052
  this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 1);
@@ -2898,7 +3055,7 @@ class $e {
2898
3055
  this.fullscreenIcon && (this.fullscreenIcon.style.opacity = 0);
2899
3056
  }
2900
3057
  add360ViewCircleIcon() {
2901
- this.view360CircleIcon || (this.view360CircleIcon = ho(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
3058
+ this.view360CircleIcon || (this.view360CircleIcon = yo(this.bottomCircleOffset), this.innerBox.appendChild(this.view360CircleIcon));
2902
3059
  }
2903
3060
  show360ViewCircleIcon() {
2904
3061
  this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 1);
@@ -2907,7 +3064,7 @@ class $e {
2907
3064
  this.view360CircleIcon && (this.view360CircleIcon.style.opacity = 0);
2908
3065
  }
2909
3066
  addLoadingSpinner() {
2910
- this.loadingSpinner = bo(), this.innerBox.appendChild(this.loadingSpinner);
3067
+ this.loadingSpinner = Ao(), this.innerBox.appendChild(this.loadingSpinner);
2911
3068
  }
2912
3069
  showLoadingSpinner() {
2913
3070
  this.loadingSpinner && (this.hideAllIcons(), this.loadingSpinner.style.opacity = 1);
@@ -2916,28 +3073,32 @@ class $e {
2916
3073
  this.loadingSpinner && (this.loadingSpinner.style.opacity = 0);
2917
3074
  }
2918
3075
  hideHints() {
2919
- !this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Eo(this.hintsOverlay));
3076
+ !this.hintsOverlay || this.hintsHidden || (this.hintsHidden = !0, Mo(this.hintsOverlay));
2920
3077
  }
2921
3078
  addHotspotTimeline() {
2922
3079
  if (!this.hotspots || this.hotspotTimeline) return;
2923
- const t = Oo(this.innerBox, this.amountX, this.hotspots);
2924
- if (!t) return;
2925
- this.hotspotTimeline = t.element, this.hotspotTimelineIndicator = t.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((o) => {
2926
- o.addEventListener("click", (s) => {
2927
- s.stopPropagation(), this.hideAllIcons(), this.hideHints();
2928
- const n = parseInt(o.getAttribute("data-frame"), 10), r = o.getAttribute("data-hotspot-id");
2929
- isNaN(n) || this.animateToFrame(n, r);
3080
+ const t = this.isGridMode ? this.amountX * this.amountY : this.amountX, i = Zo(this.innerBox, t, this.hotspots);
3081
+ if (!i) return;
3082
+ this.hotspotTimeline = i.element, this.hotspotTimelineIndicator = i.indicator, this.innerBox.classList.add("has-hotspot-timeline"), this.hotspotTimeline.querySelectorAll(".cloudimage-360-hotspot-timeline-dot").forEach((s) => {
3083
+ s.addEventListener("click", (n) => {
3084
+ n.stopPropagation(), this.hideAllIcons(), this.hideHints();
3085
+ const r = parseInt(s.getAttribute("data-frame"), 10), a = s.getAttribute("data-hotspot-id");
3086
+ isNaN(r) || this.animateToFrame(r, a);
2930
3087
  });
2931
3088
  }), this.updateHotspotTimelinePosition();
2932
3089
  }
2933
3090
  showHotspotTimeline() {
2934
- Mo(this.hotspotTimeline);
3091
+ Do(this.hotspotTimeline);
2935
3092
  }
2936
3093
  hideHotspotTimeline() {
2937
- Ho(this.hotspotTimeline);
3094
+ Bo(this.hotspotTimeline);
2938
3095
  }
2939
3096
  updateHotspotTimelinePosition() {
2940
- Lo(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
3097
+ if (this.isGridMode) {
3098
+ const t = this.activeImageY * this.amountX + this.activeImageX;
3099
+ He(this.hotspotTimelineIndicator, t, this.amountX * this.amountY);
3100
+ } else
3101
+ He(this.hotspotTimelineIndicator, this.activeImageX, this.amountX);
2941
3102
  }
2942
3103
  /**
2943
3104
  * Animates the viewer to a target frame, optionally showing a hotspot popup on arrival
@@ -2945,30 +3106,45 @@ class $e {
2945
3106
  * @param {string} [hotspotId] - Optional hotspot ID to show popup for after animation
2946
3107
  */
2947
3108
  animateToFrame(t, i) {
2948
- if (this.hotspotsInstance && this.hotspotsInstance.hidePopper(), this.isAnimatingToFrame || t === this.activeImageX) {
2949
- t === this.activeImageX && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
3109
+ this.hotspotsInstance && this.hotspotsInstance.hidePopper();
3110
+ const o = this.isGridMode ? this.activeImageY * this.amountX + this.activeImageX : this.activeImageX;
3111
+ if (this.isAnimatingToFrame || t === o) {
3112
+ t === o && i && this.hotspotsInstance && this.hotspotTimelineOnClick && this.hotspotsInstance.showHotspotById(i);
2950
3113
  return;
2951
3114
  }
2952
- this.isAnimatingToFrame = !0, this.hasInteracted = !0, (this.autoplay || this.loopTimeoutId) && (this.stopAutoplay(), this.autoplay = !1), this.inertiaAnimationId && (cancelAnimationFrame(this.inertiaAnimationId), this.inertiaAnimationId = null);
2953
- const o = this.activeImageX, s = (t - o + this.amountX) % this.amountX, n = (o - t + this.amountX) % this.amountX, r = s <= n, a = r ? s : n;
2954
- if (a === 0) {
3115
+ 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) {
3116
+ const m = this.amountX * this.amountY, p = Math.max(0, Math.min(t, m - 1));
3117
+ this.activeImageY = Math.floor(p / this.amountX), this.activeImageX = p % this.amountX, this.isZoomed || this.updateView(), this.emit("onSpin", {
3118
+ direction: p > o ? "right" : "left",
3119
+ activeImageX: this.activeImageX,
3120
+ activeImageY: this.activeImageY,
3121
+ amountX: this.amountX,
3122
+ amountY: this.amountY,
3123
+ isGridMode: !0
3124
+ }), this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
3125
+ this.hotspotsInstance.showHotspotById(i);
3126
+ }, 50);
3127
+ return;
3128
+ }
3129
+ const s = this.activeImageX, n = (t - s + this.amountX) % this.amountX, r = (s - t + this.amountX) % this.amountX, a = n <= r, l = a ? n : r;
3130
+ if (l === 0) {
2955
3131
  this.isAnimatingToFrame = !1;
2956
3132
  return;
2957
3133
  }
2958
- const l = 30;
2959
- let c = a;
2960
- const h = () => {
2961
- if (c <= 0) {
3134
+ const c = 30;
3135
+ let h = l;
3136
+ const u = () => {
3137
+ if (h <= 0) {
2962
3138
  this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
2963
3139
  this.hotspotsInstance.showHotspotById(i);
2964
3140
  }, 50);
2965
3141
  return;
2966
3142
  }
2967
- r ? this.moveRight() : this.moveLeft(), c--, c > 0 ? setTimeout(h, l) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
3143
+ a ? this.moveRight() : this.moveLeft(), h--, h > 0 ? setTimeout(u, c) : (this.isAnimatingToFrame = !1, i && this.hotspotsInstance && this.hotspotTimelineOnClick && setTimeout(() => {
2968
3144
  this.hotspotsInstance.showHotspotById(i);
2969
3145
  }, 50));
2970
3146
  };
2971
- h();
3147
+ u();
2972
3148
  }
2973
3149
  remove360ViewCircleIcon() {
2974
3150
  this.view360CircleIcon && (this.innerBox.removeChild(this.view360CircleIcon), this.view360CircleIcon = null);
@@ -2992,10 +3168,10 @@ class $e {
2992
3168
  this.removeMouseEvents(), this.removeTouchEvents(), this.removeKeyboardEvents(), this.removeEscKeyHandler(), this.removeFullscreenChangeHandler();
2993
3169
  }
2994
3170
  addMouseEvents() {
2995
- this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ce(this.mouseMove.bind(this), xe), this.boundMouseUp = this.mouseUp.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
3171
+ this.boundMouseClick = this.mouseClick.bind(this), this.boundMouseDown = this.mouseDown.bind(this), this.boundMouseMove = Ee(this.mouseMove.bind(this), Te), this.boundMouseUp = this.mouseUp.bind(this), this.innerBox.addEventListener("click", this.boundMouseClick), this.innerBox.addEventListener("mousedown", this.boundMouseDown), document.addEventListener("mousemove", this.boundMouseMove), document.addEventListener("mouseup", this.boundMouseUp);
2996
3172
  }
2997
3173
  addTouchEvents() {
2998
- this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ce(this.touchMove.bind(this), xe), this.container.addEventListener("touchstart", this.boundTouchStart, { passive: !1 }), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove, { passive: !1 });
3174
+ this.boundTouchStart = this.touchStart.bind(this), this.boundTouchEnd = this.touchEnd.bind(this), this.boundTouchMove = Ee(this.touchMove.bind(this), Te), this.container.addEventListener("touchstart", this.boundTouchStart, { passive: !1 }), this.container.addEventListener("touchend", this.boundTouchEnd), this.container.addEventListener("touchmove", this.boundTouchMove, { passive: !1 });
2999
3175
  }
3000
3176
  addKeyboardEvents() {
3001
3177
  this.boundKeyDown = this.keyDown.bind(this), this.boundKeyUp = this.keyUp.bind(this), document.addEventListener("keydown", this.boundKeyDown), document.addEventListener("keyup", this.boundKeyUp);
@@ -3024,7 +3200,7 @@ class $e {
3024
3200
  document.removeEventListener("keydown", this.boundKeyDown), document.removeEventListener("keyup", this.boundKeyUp);
3025
3201
  }
3026
3202
  createContainers(t) {
3027
- if (this.iconsContainer = ke(this.innerBox), this.canvas = po(this.innerBox, t), this.loader = yo(this.innerBox), this.ariaLiveRegion = Co(this.innerBox), this.useMainThreadCanvas)
3203
+ if (this.iconsContainer = Ye(this.innerBox), this.canvas = Co(this.innerBox, t), this.loader = To(this.innerBox), this.ariaLiveRegion = Xo(this.innerBox), this.useMainThreadCanvas)
3028
3204
  this.canvasWorker.postMessage({
3029
3205
  action: "initCanvas",
3030
3206
  offscreen: this.canvas,
@@ -3041,119 +3217,159 @@ class $e {
3041
3217
  [i]
3042
3218
  );
3043
3219
  }
3044
- ie(this.innerBox, ".cloudimage-360-placeholder");
3220
+ ue(this.innerBox, ".cloudimage-360-placeholder");
3045
3221
  }
3046
3222
  update(t) {
3047
- this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1, ie(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = ke(this.innerBox), this.onAllImagesLoaded());
3223
+ this.isReady && (this.stopAutoplay(), this.zoomPan && (this.zoomPan.destroy(), this.zoomPan = null), this.gestureRecognizer && (this.gestureRecognizer.destroy(), this.gestureRecognizer = null), this.zoomControlsUI && (this.zoomControlsUI.destroy(), this.zoomControlsUI = null), this.scrollHintUI && (this.scrollHintUI.destroy(), this.scrollHintUI = null), this.isZoomed = !1, this.highResLoaded = !1, this.hotspotsInstance && (this.hotspotsInstance.destroy(), this.hotspotsInstance = null), this.hotspotTimeline && this.hotspotTimeline.parentNode && (this.hotspotTimeline.parentNode.removeChild(this.hotspotTimeline), this.hotspotTimeline = null, this.hotspotTimelineIndicator = null), this.innerBox && this.innerBox.classList.remove("has-hotspot-timeline"), this.hintsOverlay && this.hintsOverlay.parentNode && (this.hintsOverlay.parentNode.removeChild(this.hintsOverlay), this.hintsOverlay = null), this.hintsHidden = !1, ue(this.innerBox, ".cloudimage-360-icons-container"), this.init(this.container, t, !0), this.iconsContainer = Ye(this.innerBox), this.onAllImagesLoaded());
3048
3224
  }
3049
3225
  init(t, i, o) {
3050
- const s = i ? to(i) : Ji(t), {
3226
+ const s = i ? lo(i) : ro(t), {
3051
3227
  folder: n,
3052
3228
  apiVersion: r,
3053
3229
  filenameX: a,
3054
3230
  filenameY: l,
3055
- imageListX: c,
3056
- imageListY: h,
3057
- indexZeroBase: u,
3058
- amountX: m,
3059
- amountY: f,
3060
- draggable: C = !0,
3061
- swipeable: y = !0,
3062
- keys: b,
3063
- keysReverse: I,
3064
- bottomCircleOffset: E,
3065
- autoplay: w,
3066
- autoplayBehavior: v,
3067
- playOnce: P,
3068
- speed: p,
3069
- autoplayReverse: g,
3070
- fullscreen: x,
3071
- magnifier: k,
3072
- pointerZoom: S,
3073
- zoomMax: A,
3074
- zoomStep: H,
3075
- zoomControls: O,
3076
- zoomControlsPosition: j,
3077
- scrollHint: U,
3078
- ciToken: X,
3079
- ciFilters: Z,
3080
- ciTransformation: nt,
3081
- lazyload: $,
3082
- dragSpeed: rt,
3083
- stopAtEdges: vt,
3084
- imageInfo: et = "black",
3085
- initialIconShown: at,
3086
- bottomCircle: Q,
3087
- hotspots: N,
3088
- hotspotTrigger: it = "hover",
3089
- dragReverse: lt,
3090
- hide360Logo: K,
3091
- logoSrc: gt,
3092
- inertia: jt,
3093
- pinchZoom: yt,
3094
- hints: Ut,
3095
- theme: bt,
3096
- markerTheme: Lt,
3097
- brandColor: Mt,
3098
- hotspotTimelineOnClick: Ht = !0,
3099
- aspectRatio: Xt,
3100
- cropAspectRatio: $t,
3101
- cropGravity: Kt,
3231
+ filenameGrid: c,
3232
+ imageListX: h,
3233
+ imageListY: u,
3234
+ imageListGrid: m,
3235
+ indexZeroBase: p,
3236
+ amountX: C,
3237
+ amountY: v,
3238
+ draggable: b = !0,
3239
+ swipeable: x = !0,
3240
+ keys: P,
3241
+ keysReverse: w,
3242
+ bottomCircleOffset: g,
3243
+ autoplay: E,
3244
+ autoplayBehavior: f,
3245
+ playOnce: y,
3246
+ speed: I,
3247
+ autoplayReverse: T,
3248
+ fullscreen: k,
3249
+ magnifier: X,
3250
+ pointerZoom: O,
3251
+ zoomMax: M,
3252
+ zoomStep: U,
3253
+ zoomControls: $,
3254
+ zoomControlsPosition: H,
3255
+ scrollHint: Z,
3256
+ ciToken: ct,
3257
+ ciFilters: K,
3258
+ ciTransformation: dt,
3259
+ lazyload: ut,
3260
+ dragSpeed: st,
3261
+ stopAtEdges: et,
3262
+ stopAtEdgesX: it,
3263
+ stopAtEdgesY: W,
3264
+ imageInfo: nt = "black",
3265
+ initialIconShown: pt,
3266
+ bottomCircle: q,
3267
+ hotspots: Ct,
3268
+ hotspotTrigger: te = "hover",
3269
+ dragReverse: It,
3270
+ hide360Logo: ee,
3271
+ logoSrc: Ot,
3272
+ inertia: ie,
3273
+ pinchZoom: oe,
3274
+ hints: Ht,
3275
+ theme: xt,
3276
+ markerTheme: Rt,
3277
+ brandColor: zt,
3278
+ hotspotTimelineOnClick: J = !0,
3279
+ aspectRatio: mt,
3280
+ cropAspectRatio: Zt,
3281
+ cropGravity: Dt,
3102
3282
  // Event callbacks
3103
- onReady: q,
3104
- onLoad: ht,
3105
- onSpin: Yt,
3106
- onAutoplayStart: Rt,
3107
- onAutoplayStop: wt,
3108
- onFullscreenOpen: zt,
3109
- onFullscreenClose: Zt,
3110
- onZoomIn: Dt,
3111
- onZoomOut: Bt,
3112
- onDragStart: di,
3113
- onDragEnd: ui,
3114
- onHotspotOpen: pi,
3115
- onHotspotClose: mi,
3116
- onProductClick: fi,
3117
- onNavigate: vi,
3118
- onError: gi
3119
- } = s, pe = { ciToken: X, ciFilters: Z, ciTransformation: nt, cropAspectRatio: $t, cropGravity: Kt }, qt = oe(c, []), Jt = oe(h, []), yi = s.zoomMax === 5 && S > 1 ? Math.min(S, 5) : A || 5;
3120
- if (this.viewerConfig = s, this.amountX = qt.length || m, this.amountY = Jt.length || f, this.allowSpinX = !!this.amountX, this.allowSpinY = !!this.amountY, this.orientation = this.allowSpinX ? L.X : L.Y, this.activeImageX = g ? this.amountX - 1 : 0, this.activeImageY = g ? this.amountY - 1 : 0, this.bottomCircleOffset = E, this.autoplay = w, this.autoplayBehavior = v, this.playOnce = P, this.speed = p, this.autoplayReverse = g, this.fullscreen = x, this.zoomMax = yi, this.zoomStep = H || 0.5, this.zoomControls = O ?? !0, this.zoomControlsPosition = j || "bottom-left", this.scrollHint = U ?? !0, this.dragSpeed = Math.max(rt, Ki), this.stopAtEdges = vt, this.ciParams = pe, this.apiVersion = r, this.keysReverse = I, this.info = et, this.keys = b, this.innerBox = this.innerBox ?? go(this.container), this.container.style.aspectRatio = Xt || "", this.initialIconShown = at, this.bottomCircle = Q, this.spinDirection = Vo(this.autoplayBehavior, this.allowSpinX, this.allowSpinY), this.dragReverse = lt, this.hotspots = N, this.hotspotTrigger = it, this.onHotspotOpen = pi, this.onHotspotClose = mi, this.onProductClick = fi, this.onNavigate = vi, this.hide360Logo = K, this.logoSrc = gt, this.inertia = jt, this.pinchZoom = yt, this.hints = Ut, this.hotspotTimelineOnClick = Ht, bt === "dark" ? this.container.classList.add("ci360-theme-dark") : bt === "light" && this.container.classList.remove("ci360-theme-dark"), this.container.classList.remove("ci360-hotspot-marker-inverted", "ci360-hotspot-marker-brand"), Lt === "inverted" ? this.container.classList.add("ci360-hotspot-marker-inverted") : Lt === "brand" && (this.container.classList.add("ci360-hotspot-marker-brand"), Mt && this.container.style.setProperty("--ci360-hotspot-brand-color", Mt)), this.onReady = q, this.onLoad = ht, this.onSpin = Yt, this.onAutoplayStart = Rt, this.onAutoplayStop = wt, this.onFullscreenOpen = zt, this.onFullscreenClose = Zt, this.onZoomIn = Dt, this.onZoomOut = Bt, this.onDragStart = di, this.onDragEnd = ui, this.onError = gi, this.srcXConfig = {
3283
+ onReady: Pt,
3284
+ onLoad: Bt,
3285
+ onSpin: Gt,
3286
+ onAutoplayStart: _t,
3287
+ onAutoplayStop: Ft,
3288
+ onFullscreenOpen: gi,
3289
+ onFullscreenClose: vi,
3290
+ onZoomIn: yi,
3291
+ onZoomOut: bi,
3292
+ onDragStart: wi,
3293
+ onDragEnd: Ci,
3294
+ onHotspotOpen: Ii,
3295
+ onHotspotClose: xi,
3296
+ onProductClick: Pi,
3297
+ onNavigate: Ei,
3298
+ onError: Ti
3299
+ } = s, se = { ciToken: ct, ciFilters: K, ciTransformation: dt, cropAspectRatio: Zt, cropGravity: Dt }, ne = Ut(h, []), re = Ut(u, []);
3300
+ let rt = Ut(m, []);
3301
+ rt.length && Array.isArray(rt[0]) && (rt = rt.flat()), this.isGridMode = !!(c || rt.length);
3302
+ const Ai = s.zoomMax === 5 && O > 1 ? Math.min(O, 5) : M || 5;
3303
+ if (this.viewerConfig = s, this.amountX = ne.length || C, this.amountY = re.length || v, 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 = g, this.autoplay = E, this.autoplayBehavior = f, this.playOnce = y, this.speed = I, 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 = It, this.hotspots = Ct, 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, xt === "dark" ? this.container.classList.add("ci360-theme-dark") : xt === "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 = Pt, 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 = {
3121
3304
  folder: n,
3122
3305
  filename: a,
3123
- imageList: qt,
3306
+ imageList: ne,
3124
3307
  container: t,
3125
3308
  innerBox: this.innerBox,
3126
3309
  apiVersion: r,
3127
- ciParams: pe,
3128
- lazyload: $,
3310
+ ciParams: se,
3311
+ lazyload: ut,
3129
3312
  amount: this.amountX,
3130
- indexZeroBase: u,
3131
- autoplayReverse: g,
3313
+ indexZeroBase: p,
3314
+ autoplayReverse: T,
3132
3315
  orientation: L.X
3133
3316
  }, this.srcYConfig = {
3134
3317
  ...this.srcXConfig,
3135
3318
  filename: l,
3136
- imageList: Jt,
3319
+ imageList: re,
3137
3320
  orientation: L.Y,
3138
3321
  amount: this.amountY
3139
- }, o && this.removeEvents(), this.attachEvents(C, y, b), o) return;
3140
- const me = this.container.offsetWidth, fe = this.allowSpinX && !qt.length ? Pt(this.srcXConfig, me) : null, ve = this.allowSpinY && !Jt.length ? Pt(this.srcYConfig, me) : null, ge = (bi) => {
3141
- Ee({
3142
- cdnPathX: fe,
3143
- cdnPathY: ve,
3144
- configX: this.srcXConfig,
3145
- configY: this.srcYConfig,
3146
- onImageLoad: (Ct, wi, Ci) => this.onImageLoad(Ct, wi, Ci),
3147
- onFirstImageLoad: (Ct) => this.onFirstImageLoaded(bi, Ct),
3148
- onAllImagesLoad: this.onAllImagesLoaded.bind(this),
3149
- onError: (Ct) => this.emit("onError", Ct)
3150
- });
3151
- };
3152
- this.allowSpinX ? Le(fe, this.srcXConfig, ge) : this.allowSpinY && Le(ve, this.srcYConfig, ge);
3322
+ }, this.srcGridConfig = {
3323
+ folder: n,
3324
+ filename: c,
3325
+ imageList: rt,
3326
+ container: t,
3327
+ innerBox: this.innerBox,
3328
+ apiVersion: r,
3329
+ ciParams: se,
3330
+ lazyload: ut,
3331
+ amount: this.amountX * this.amountY,
3332
+ amountX: this.amountX,
3333
+ amountY: this.amountY,
3334
+ indexZeroBase: p,
3335
+ autoplayReverse: T
3336
+ }, o && this.removeEvents(), this.attachEvents(b, x, P), o) return;
3337
+ const ae = this.container.offsetWidth;
3338
+ if (this.isGridMode) {
3339
+ const Et = rt.length ? null : at(this.srcGridConfig, ae), Nt = (Wt) => {
3340
+ Se({
3341
+ cdnPath: Et,
3342
+ config: this.srcGridConfig,
3343
+ onImageLoad: (Q, B) => {
3344
+ this.pushImageToSet(Q, B, "grid"), this.updatePercentageInLoader(this.calculatePercentage());
3345
+ },
3346
+ onFirstImageLoad: (Q) => this.onFirstImageLoaded(Wt, Q),
3347
+ onAllImagesLoad: (Q, B) => {
3348
+ this.imagesGrid = Q, B && B.errorCount > 0 && this.emit("onError", { errorCount: B.errorCount, errors: B.errors, totalImages: this.amountX * this.amountY }), this.onAllImagesLoaded();
3349
+ },
3350
+ onError: (Q) => this.emit("onError", Q)
3351
+ });
3352
+ };
3353
+ he(Et, this.srcGridConfig, Nt);
3354
+ } else {
3355
+ const Et = this.allowSpinX && !ne.length ? at(this.srcXConfig, ae) : null, Nt = this.allowSpinY && !re.length ? at(this.srcYConfig, ae) : null, Wt = (Q) => {
3356
+ Xe({
3357
+ cdnPathX: Et,
3358
+ cdnPathY: Nt,
3359
+ configX: this.srcXConfig,
3360
+ configY: this.srcYConfig,
3361
+ onImageLoad: (B, ki, Xi) => this.onImageLoad(B, ki, Xi),
3362
+ onFirstImageLoad: (B) => this.onFirstImageLoaded(Q, B),
3363
+ onAllImagesLoad: this.onAllImagesLoaded.bind(this),
3364
+ onError: (B) => this.emit("onError", B)
3365
+ });
3366
+ };
3367
+ this.allowSpinX ? he(Et, this.srcXConfig, Wt) : this.allowSpinY && he(Nt, this.srcYConfig, Wt);
3368
+ }
3153
3369
  }
3154
3370
  }
3155
- const Ke = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
3156
- class An {
3371
+ const ei = typeof navigator < "u" && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
3372
+ class Rn {
3157
3373
  constructor() {
3158
3374
  this.views = /* @__PURE__ */ new Map(), this.initAll = this.initAll.bind(this), this.getViews = this.getViews.bind(this), this.memoryObserver = null, this.memoryManagementAutoEnabled = !1;
3159
3375
  }
@@ -3164,16 +3380,16 @@ class An {
3164
3380
  if (!t) return;
3165
3381
  const o = t.id || this.generateId();
3166
3382
  t.id || (t.id = o);
3167
- const s = new $e(t, i);
3168
- return this.views.set(o, s), Ke && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), s;
3383
+ const s = new ti(t, i);
3384
+ return this.views.set(o, s), ei && !this.memoryManagementAutoEnabled && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100)), s;
3169
3385
  }
3170
3386
  initAll(t = "cloudimage-360") {
3171
3387
  [...document.querySelectorAll(`.${t}`)].filter(Boolean).forEach((o) => {
3172
3388
  const s = o.id || this.generateId();
3173
3389
  o.id || (o.id = s);
3174
- const n = new $e(o);
3390
+ const n = new ti(o);
3175
3391
  this.views.set(s, n);
3176
- }), Ke && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
3392
+ }), ei && !this.memoryManagementAutoEnabled && this.views.size > 0 && (this.memoryManagementAutoEnabled = !0, setTimeout(() => this.enableMemoryManagement(), 100));
3177
3393
  }
3178
3394
  destroy(t) {
3179
3395
  const i = this.getViewById(t);
@@ -3242,6 +3458,6 @@ class An {
3242
3458
  }
3243
3459
  }
3244
3460
  export {
3245
- An as default
3461
+ Rn as default
3246
3462
  };
3247
- //# sourceMappingURL=ci360-BJ_JCEiA.mjs.map
3463
+ //# sourceMappingURL=ci360-RrBk2Ggj.mjs.map