@car-cutter/react-webplayer 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import be, { createContext as _e, useContext as ze, useRef as Y, useState as F, useCallback as M, useEffect as Z, useMemo as re, Fragment as Rt } from "react";
2
- import { createRoot as Pt } from "react-dom/client";
3
- var Qe = { exports: {} }, fe = {};
1
+ import be, { createContext as Me, useContext as ze, useRef as Z, useState as $, useCallback as I, useEffect as O, useMemo as te, Fragment as Wt } from "react";
2
+ import { createRoot as Yt } from "react-dom/client";
3
+ var ct = { exports: {} }, ge = {};
4
4
  /**
5
5
  * @license React
6
6
  * react-jsx-runtime.production.min.js
@@ -10,31 +10,31 @@ var Qe = { exports: {} }, fe = {};
10
10
  * This source code is licensed under the MIT license found in the
11
11
  * LICENSE file in the root directory of this source tree.
12
12
  */
13
- var We;
14
- function Zt() {
15
- if (We) return fe;
16
- We = 1;
17
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function l(i, s, b) {
19
- var c, m = {}, g = null, _ = null;
20
- b !== void 0 && (g = "" + b), s.key !== void 0 && (g = "" + s.key), s.ref !== void 0 && (_ = s.ref);
21
- for (c in s) o.call(s, c) && !u.hasOwnProperty(c) && (m[c] = s[c]);
22
- if (i && i.defaultProps) for (c in s = i.defaultProps, s) m[c] === void 0 && (m[c] = s[c]);
23
- return { $$typeof: r, type: i, key: g, ref: _, props: m, _owner: a.current };
13
+ var et;
14
+ function Xt() {
15
+ if (et) return ge;
16
+ et = 1;
17
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function f(d, c, v) {
19
+ var l, m = {}, w = null, C = null;
20
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
21
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
22
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
23
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
24
24
  }
25
- return fe.Fragment = n, fe.jsx = l, fe.jsxs = l, fe;
25
+ return ge.Fragment = n, ge.jsx = f, ge.jsxs = f, ge;
26
26
  }
27
- Qe.exports = Zt();
28
- var et = Qe.exports;
29
- const Ze = "cc-webplayer", Ae = "cc-webplayer-icon", tt = "composition-loading", rt = "composition-loaded", nt = "composition-load-error", ot = "extend-mode-on", st = "extend-mode-off", at = "hotspots-on", it = "hotspots-off", lt = "gallery-open", ct = "gallery-close", At = !1, Dt = !1, Ft = !1, Yt = "quality", $t = !1, dt = "cc-webplayer:", Wt = !1;
30
- function wn(e, r) {
27
+ ct.exports = Xt();
28
+ var Ue = ct.exports;
29
+ const Ie = "cc-webplayer", We = "cc-webplayer-custom-media", Ye = "cc-webplayer-icon", dt = "composition-loading", ut = "composition-loaded", mt = "composition-load-error", pt = "item-change", ht = "extend-mode-on", ft = "extend-mode-off", gt = "hotspots-on", xt = "hotspots-off", wt = "gallery-open", vt = "gallery-close", Bt = !1, Gt = !1, Kt = !1, qt = "quality", Jt = 0, Qt = 1 / 0, er = 1, tr = !1, bt = "cc-webplayer:", rr = !1;
30
+ function Hn(e, r) {
31
31
  return `https://cdn.car-cutter.com/gallery/${e}/${r}/composition_v3.json`;
32
32
  }
33
- function Ut(e, r) {
33
+ function nr(e, r) {
34
34
  const n = e.split("/"), o = n.pop();
35
35
  return [n.join("/"), r, o].join("/");
36
36
  }
37
- var ut = { exports: {} }, xe = {};
37
+ var yt = { exports: {} }, xe = {};
38
38
  /**
39
39
  * @license React
40
40
  * react-jsx-runtime.production.min.js
@@ -44,37 +44,37 @@ var ut = { exports: {} }, xe = {};
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
46
  */
47
- var Ue;
48
- function Xt() {
49
- if (Ue) return xe;
50
- Ue = 1;
51
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
52
- function l(i, s, b) {
53
- var c, m = {}, g = null, _ = null;
54
- b !== void 0 && (g = "" + b), s.key !== void 0 && (g = "" + s.key), s.ref !== void 0 && (_ = s.ref);
55
- for (c in s) o.call(s, c) && !u.hasOwnProperty(c) && (m[c] = s[c]);
56
- if (i && i.defaultProps) for (c in s = i.defaultProps, s) m[c] === void 0 && (m[c] = s[c]);
57
- return { $$typeof: r, type: i, key: g, ref: _, props: m, _owner: a.current };
47
+ var tt;
48
+ function or() {
49
+ if (tt) return xe;
50
+ tt = 1;
51
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
52
+ function f(d, c, v) {
53
+ var l, m = {}, w = null, C = null;
54
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
55
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
56
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
57
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
58
58
  }
59
- return xe.Fragment = n, xe.jsx = l, xe.jsxs = l, xe;
59
+ return xe.Fragment = n, xe.jsx = f, xe.jsxs = f, xe;
60
60
  }
61
- ut.exports = Xt();
62
- var t = ut.exports;
63
- async function Bt(e) {
61
+ yt.exports = or();
62
+ var t = yt.exports;
63
+ async function sr(e) {
64
64
  const r = await fetch(e);
65
65
  if (!r.ok)
66
66
  throw new Error(`Failed to fetch composition: ${r.statusText}`);
67
67
  return await r.json();
68
68
  }
69
- const Oe = /* @__PURE__ */ new Map(), Gt = (e) => {
70
- const [r, n] = F({
69
+ const De = /* @__PURE__ */ new Map(), ar = (e) => {
70
+ const [r, n] = $({
71
71
  status: "pending",
72
72
  isSuccess: !1
73
73
  });
74
- return Z(() => {
75
- const o = (u) => n({ status: "success", data: u, isSuccess: !0 }), a = Oe.get(e);
76
- if (a && !(a instanceof Promise)) {
77
- o(a);
74
+ return O(() => {
75
+ const o = (u) => n({ status: "success", data: u, isSuccess: !0 }), s = De.get(e);
76
+ if (s && !(s instanceof Promise)) {
77
+ o(s);
78
78
  return;
79
79
  }
80
80
  n({
@@ -83,11 +83,11 @@ const Oe = /* @__PURE__ */ new Map(), Gt = (e) => {
83
83
  }), async function() {
84
84
  try {
85
85
  let u;
86
- if (a)
87
- u = await a;
86
+ if (s)
87
+ u = await s;
88
88
  else {
89
- const l = Bt(e);
90
- Oe.set(e, l), u = await l, Oe.set(e, u);
89
+ const f = sr(e);
90
+ De.set(e, f), u = await f, De.set(e, u);
91
91
  }
92
92
  o(u);
93
93
  } catch (u) {
@@ -99,240 +99,438 @@ const Oe = /* @__PURE__ */ new Map(), Gt = (e) => {
99
99
  }
100
100
  }();
101
101
  }, [e]), r;
102
- }, mt = _e(null), ne = () => {
103
- const e = ze(mt);
102
+ }, jt = Me(null), re = () => {
103
+ const e = ze(jt);
104
+ if (!e)
105
+ throw new Error(
106
+ "useGlobalContext must be used within a GlobalContextProvider"
107
+ );
108
+ return e;
109
+ }, ir = ({ children: e, ...r }) => /* @__PURE__ */ t.jsx(jt.Provider, { value: r, children: e }), kt = Me(null), oe = () => {
110
+ const e = ze(kt);
104
111
  if (!e)
105
112
  throw new Error(
106
113
  "useCompositionContext must be used within a CompositionContextProvider"
107
114
  );
108
115
  return e;
109
- }, qt = ({ composition: e, children: r }) => {
110
- const { aspectRatio: n, categories: o } = e, a = re(
111
- () => o.flatMap(({ items: l }) => l),
116
+ }, lr = ({ composition: e, children: r }) => {
117
+ const {
118
+ aspectRatio: n,
119
+ categories: o,
120
+ imageHdWidth: s,
121
+ imageSubWidths: u
122
+ } = e, { minMediaWidth: f, maxMediaWidth: d } = re(), c = te(
123
+ () => o.flatMap(({ items: m }) => m),
112
124
  [o]
113
- ), u = {
125
+ ), v = {
114
126
  aspectRatio: n.replace(":", " / ")
115
- };
127
+ }, l = te(() => {
128
+ const m = u.concat(s), w = m.sort((a, h) => a - h), C = w.filter(
129
+ (a) => a >= f && a <= d
130
+ );
131
+ if (C.length === 0) {
132
+ const a = (f + d) / 2, h = m.reduce(
133
+ (x, j) => Math.abs(j - a) < Math.abs(x - a) ? j : x,
134
+ s
135
+ );
136
+ return console.warn(
137
+ `None of available media widths (${w.join("|")}) match the given constraints (${f > 0 ? `${f} ≤ ` : ""}width${d < 1 / 0 ? ` ≤ ${d}` : ""}).`,
138
+ `Using the closest width instead (${h}).`
139
+ ), [h];
140
+ }
141
+ return C;
142
+ }, [u, s, f, d]);
116
143
  return /* @__PURE__ */ t.jsx(
117
- mt.Provider,
144
+ kt.Provider,
118
145
  {
119
146
  value: {
120
147
  ...e,
121
- items: a,
122
- aspectRatioStyle: u
148
+ items: c,
149
+ aspectRatioStyle: v,
150
+ usedMediaWidths: l
123
151
  },
124
152
  children: r
125
153
  }
126
154
  );
127
- }, pt = 500, Pe = 0.75, Le = 1 + Pe * 2;
128
- function ae(e, r, n) {
155
+ }, Et = 500, Ze = 0.75, _e = 1 + Ze * 2;
156
+ function le(e, r, n) {
129
157
  return Math.min(Math.max(e, r), n);
130
158
  }
131
- const Ee = (e, r, n) => e + (r - e) * n, Xe = (e, r) => (e % r + r) % r, ht = _e(null), J = () => {
132
- const e = ze(ht);
159
+ const Le = (e, r, n) => e + (r - e) * n, rt = (e, r) => (e % r + r) % r, Ct = Me(null), Xe = () => ze(Ct), ye = () => {
160
+ const e = Xe();
133
161
  if (!e)
134
162
  throw new Error(
135
- "useGlobalContext must be used within a GlobalContextProvider"
163
+ "useCustomizationContext must be used within a CustomizationContextProvider"
136
164
  );
137
165
  return e;
138
- }, Kt = ({ children: e, ...r }) => /* @__PURE__ */ t.jsx(ht.Provider, { value: r, children: e }), gt = _e(null), K = () => {
139
- const e = ze(gt);
166
+ }, nt = "*:size-full", ot = "*:object-cover *:size-full", cr = ({ children: e }) => {
167
+ const { compositionUrl: r } = re(), n = I(
168
+ () => document.querySelector(
169
+ `${Ie}[composition-url="${r}"]`
170
+ ),
171
+ [r]
172
+ ), o = I((a) => {
173
+ const h = a.querySelectorAll(Ye), x = /* @__PURE__ */ new Map();
174
+ for (const j of h) {
175
+ const k = j.getAttribute("name");
176
+ if (!k) {
177
+ console.warn("Icon element is missing a name attribute");
178
+ continue;
179
+ }
180
+ const g = j.innerHTML, p = g ? /* @__PURE__ */ t.jsx(
181
+ "div",
182
+ {
183
+ className: nt,
184
+ dangerouslySetInnerHTML: { __html: g }
185
+ }
186
+ ) : void 0;
187
+ if (!p) {
188
+ console.warn(`Icon "${k}" customization is empty.`);
189
+ continue;
190
+ }
191
+ x.set(k, { Icon: p });
192
+ }
193
+ return x;
194
+ }, []), [s, u] = $(
195
+ () => {
196
+ const a = n();
197
+ return a ? o(a) : /* @__PURE__ */ new Map();
198
+ }
199
+ );
200
+ O(() => {
201
+ const a = n();
202
+ if (!a)
203
+ return;
204
+ const h = new MutationObserver(() => {
205
+ u(o(a));
206
+ });
207
+ return h.observe(a, {
208
+ childList: !0,
209
+ subtree: !0
210
+ }), () => h.disconnect();
211
+ }, [o, n]);
212
+ const f = I(
213
+ (a) => s.get(a),
214
+ [s]
215
+ ), d = I(
216
+ (a, h) => {
217
+ u((x) => {
218
+ const { Icon: j, ...k } = h;
219
+ return new Map(
220
+ x.set(a, {
221
+ ...k,
222
+ Icon: /* @__PURE__ */ t.jsx("div", { className: nt, children: j })
223
+ })
224
+ );
225
+ });
226
+ },
227
+ []
228
+ ), c = I((a) => {
229
+ u((h) => (h.delete(a), new Map(h)));
230
+ }, []), v = I((a) => {
231
+ const h = a.querySelectorAll(
232
+ We
233
+ ), x = new Array();
234
+ for (const j of h) {
235
+ const k = j.innerHTML;
236
+ if (!k) {
237
+ console.warn("Custom media element is empty");
238
+ continue;
239
+ }
240
+ const g = Number(j.getAttribute("index"));
241
+ if (Number.isNaN(g)) {
242
+ console.warn("Custom media element is missing the 'index' attribute");
243
+ continue;
244
+ }
245
+ const p = j.getAttribute("thumbnail-src") ?? void 0, b = JSON.stringify({ index: g, thumbnailSrc: p });
246
+ x.push({
247
+ id: b,
248
+ Media: /* @__PURE__ */ t.jsx(
249
+ "div",
250
+ {
251
+ className: ot,
252
+ dangerouslySetInnerHTML: { __html: k }
253
+ }
254
+ ),
255
+ index: g,
256
+ thumbnailSrc: p
257
+ });
258
+ }
259
+ return x;
260
+ }, []), [l, m] = $(() => {
261
+ const a = n();
262
+ return a ? v(a) : [];
263
+ });
264
+ O(() => {
265
+ const a = n();
266
+ if (!a)
267
+ return;
268
+ const h = new MutationObserver(() => {
269
+ m(v(a));
270
+ });
271
+ return h.observe(a, {
272
+ childList: !0,
273
+ subtree: !0
274
+ }), () => h.disconnect();
275
+ }, [v, n]);
276
+ const w = I((a) => {
277
+ const { Media: h, ...x } = a, j = /* @__PURE__ */ t.jsx("div", { className: ot, children: h }), k = JSON.stringify(x);
278
+ return m((g) => [
279
+ ...g,
280
+ {
281
+ id: k,
282
+ Media: j,
283
+ ...x
284
+ }
285
+ ]), k;
286
+ }, []), C = I((a) => {
287
+ m(
288
+ (h) => h.filter((x) => x.id !== a)
289
+ );
290
+ }, []);
291
+ return /* @__PURE__ */ t.jsx(
292
+ Ct.Provider,
293
+ {
294
+ value: {
295
+ getIconConfig: f,
296
+ registerIconConfig: d,
297
+ unregisterIconConfig: c,
298
+ customMediaList: l,
299
+ registerCustomMedia: w,
300
+ unregisterCustomMedia: C
301
+ },
302
+ children: e
303
+ }
304
+ );
305
+ }, Nt = Me(null), J = () => {
306
+ const e = ze(Nt);
140
307
  if (!e)
141
308
  throw new Error(
142
309
  "useControlsContext must be used within a ControlsContextProvider"
143
310
  );
144
311
  return e;
145
- }, Jt = ({
312
+ }, dr = ({
146
313
  children: e
147
314
  }) => {
148
315
  const {
149
316
  infiniteCarrousel: r,
150
317
  preventFullScreen: n,
151
318
  emitEvent: o,
152
- isFullScreen: a,
319
+ isFullScreen: s,
153
320
  requestFullscreen: u,
154
- exitFullscreen: l
155
- } = J(), { categories: i, items: s } = ne(), [b, c] = F(s.map(() => null)), m = M(
156
- (P, ee) => {
157
- c(
158
- (ge) => ge.map((oe, Ot) => Ot === P ? ee : oe)
321
+ exitFullscreen: f
322
+ } = re(), { customMediaList: d } = ye(), { categories: c, items: v } = oe(), l = te(() => {
323
+ const P = new Array(
324
+ ...v
325
+ ), K = d.slice().sort((X, B) => X.index < 0 && B.index < 0 ? B.index - X.index : X.index < 0 ? 1 : B.index < 0 ? -1 : X.index - B.index);
326
+ for (const X of K) {
327
+ let B = X.index;
328
+ B < 0 && (B = P.length + B + 1), P.splice(B, 0, {
329
+ type: "custom",
330
+ ...X
331
+ });
332
+ }
333
+ return P;
334
+ }, [v, d]), [m, w] = $(l.map(() => null));
335
+ O(() => {
336
+ w(l.map(() => null));
337
+ }, [l]);
338
+ const C = I(
339
+ (P, K) => {
340
+ w(
341
+ (X) => X.map((B, Ut) => Ut === P ? K : B)
159
342
  );
160
343
  },
161
344
  []
162
- ), [g, _] = F(0), [w, x] = F(null), N = w ?? g, C = s[N], z = b[N], [f, p] = F(
345
+ ), [a, h] = $(0), [x, j] = $(null), k = x ?? a, g = l[k], p = m[k], [b, E] = $(
163
346
  null
164
- ), v = !!f, j = M(() => p(null), []), S = M(() => {
165
- if (v || w !== null)
347
+ ), L = !!b, D = I(() => E(null), []), T = I(() => {
348
+ if (L || x !== null)
166
349
  return;
167
- const P = g - 1;
168
- P >= 0 ? x(P) : r && (p("first_to_last"), x(s.length - 1));
350
+ const P = a - 1;
351
+ P >= 0 ? j(P) : r && (E("first_to_last"), j(l.length - 1));
169
352
  }, [
170
- v,
171
- w,
172
- g,
353
+ L,
354
+ x,
355
+ a,
173
356
  r,
174
- s.length
175
- ]), R = M(() => {
176
- if (v || w !== null)
357
+ l.length
358
+ ]), N = I(() => {
359
+ if (L || x !== null)
177
360
  return;
178
- const P = g + 1;
179
- P < s.length ? x(P) : r && (p("last_to_first"), x(0));
361
+ const P = a + 1;
362
+ P < l.length ? j(P) : r && (E("last_to_first"), j(0));
180
363
  }, [
181
- v,
182
- w,
183
- g,
184
- s.length,
364
+ L,
365
+ x,
366
+ a,
367
+ l.length,
185
368
  r
186
- ]), V = M(
369
+ ]), z = I(
187
370
  (P) => {
188
- const ee = Math.min(g, P), ge = Math.max(g, P);
189
- b.slice(ee, ge + 1).filter((oe) => oe === null).length > 2 && p("instant"), x(P);
371
+ const K = Math.min(a, P), X = Math.max(a, P);
372
+ m.slice(K, X + 1).filter((B) => B === null).length > 2 && E("instant"), j(P);
190
373
  },
191
- [g, b]
192
- ), E = re(() => {
193
- for (const P of i)
194
- if (P.items.includes(C))
195
- return P.id;
374
+ [a, m]
375
+ );
376
+ O(() => {
377
+ o(pt, {
378
+ index: k,
379
+ item: g
380
+ });
381
+ }, [g, o, k]);
382
+ const S = te(() => {
383
+ let P;
384
+ if (g.type === "custom") {
385
+ const K = l.slice(0, k).reverse().find((X) => X.type !== "custom") ?? l.slice(k + 1).find((X) => X.type !== "custom");
386
+ if (!K)
387
+ throw new Error("No non-custom item found");
388
+ P = K;
389
+ } else
390
+ P = g;
391
+ for (const K of c)
392
+ if (K.items.includes(P))
393
+ return K.id;
196
394
  throw new Error("Current item not found in any category");
197
- }, [i, C]), L = M(
395
+ }, [c, g, l, k]), V = I(
198
396
  (P) => {
199
- const ee = i.find(({ id: oe }) => oe === P)?.items[0];
200
- if (ee === void 0)
397
+ const K = c.find(({ id: B }) => B === P)?.items[0];
398
+ if (K === void 0)
201
399
  throw new Error("Failed to find target category");
202
- const ge = s.findIndex((oe) => oe === ee);
203
- V(ge);
400
+ const X = l.findIndex((B) => B === K);
401
+ z(X);
204
402
  },
205
- [i, s, V]
206
- ), I = re(() => {
207
- switch (C.type) {
403
+ [c, l, z]
404
+ ), R = te(() => {
405
+ switch (g.type) {
208
406
  case "image":
209
- return !!C.hotspots?.length;
407
+ return !!g.hotspots?.length;
210
408
  case "360":
211
- return z === "running";
212
- case "video":
409
+ return p === "running";
410
+ default:
213
411
  return !1;
214
412
  }
215
- }, [C, z]), [H, h] = F(!0), T = M(() => {
216
- const P = !H;
217
- h(P), o(P ? at : it);
218
- }, [o, H]), d = re(() => {
219
- switch (C.type) {
220
- case "image":
221
- case "360":
222
- return !0;
413
+ }, [g, p]), [y, i] = $(!0), _ = I(() => {
414
+ const P = !y;
415
+ i(P), o(P ? gt : xt);
416
+ }, [o, y]), M = te(() => {
417
+ switch (g.type) {
223
418
  case "video":
224
- return z !== "running";
419
+ return p !== "running";
420
+ default:
421
+ return !0;
225
422
  }
226
- }, [C, z]), [y, k] = F(!1), A = M(() => {
227
- const P = !y;
228
- k(P), o(P ? lt : ct);
229
- }, [o, y]), [D, $] = F(null), W = M(() => $(null), []), X = !!D, B = re(() => {
230
- switch (C.type) {
423
+ }, [g, p]), [A, F] = $(!1), U = I(() => {
424
+ const P = !A;
425
+ F(P), o(P ? wt : vt);
426
+ }, [o, A]), [W, Y] = $(null), q = I(() => Y(null), []), ee = !!W, fe = te(() => {
427
+ switch (g.type) {
231
428
  case "image":
232
429
  return !0;
233
430
  case "360":
234
- return z === "running";
235
- case "video":
431
+ return p === "running";
432
+ default:
236
433
  return !1;
237
434
  }
238
- }, [C.type, z]), [G, Q] = F(1), pe = G !== 1, ye = G < Le, Ie = G > 1, ie = M((P) => {
239
- Q((ee) => ae(ee + P, 1, Le));
240
- }, []), he = M(() => Q(1), []), St = M(() => ie(Pe), [ie]), Vt = M(() => ie(-Pe), [ie]), Me = M(() => {
241
- he(), W();
242
- }, [he, W]), [le, Tt] = F(!1), [Se, Ye] = F(), [Ve, $e] = F(!1), ce = M(
435
+ }, [g.type, p]), [se, ae] = $(1), je = se !== 1, Se = se < _e, Ve = se > 1, ce = I((P) => {
436
+ ae((K) => le(K + P, 1, _e));
437
+ }, []), Te = I(() => ae(1), []), Dt = I(() => ce(Ze), [ce]), Ft = I(() => ce(-Ze), [ce]), He = I(() => {
438
+ Te(), q();
439
+ }, [Te, q]), [de, $t] = $(!1), [Re, Je] = $(), [Ae, Qe] = $(!1), ue = I(
243
440
  async (P) => {
244
- Me(), Tt(P), o(P ? ot : st);
441
+ He(), $t(P), o(P ? ht : ft);
245
442
  },
246
- [o, Me]
247
- ), de = M(() => {
248
- clearTimeout(Se);
443
+ [o, He]
444
+ ), me = I(() => {
445
+ clearTimeout(Re);
249
446
  const P = setTimeout(() => {
250
- Ye(void 0);
251
- }, pt);
252
- Ye(P);
253
- }, [Se]), Te = M(async () => {
254
- if (de(), !n) {
447
+ Je(void 0);
448
+ }, Et);
449
+ Je(P);
450
+ }, [Re]), Pe = I(async () => {
451
+ if (me(), !n) {
255
452
  const P = await u();
256
- if ($e(!P), P)
453
+ if (Qe(!P), P)
257
454
  return;
258
455
  }
259
- ce(!0);
456
+ ue(!0);
260
457
  }, [
261
458
  n,
262
- ce,
459
+ ue,
263
460
  u,
264
- de
265
- ]), He = M(async () => {
266
- de(), !(!n && ($e(!1), await l())) && ce(!1);
461
+ me
462
+ ]), Oe = I(async () => {
463
+ me(), !(!n && (Qe(!1), await f())) && ue(!1);
267
464
  }, [
268
465
  n,
269
- ce,
270
- l,
271
- de
272
- ]), Ht = M(() => {
273
- le ? He() : Te();
274
- }, [He, Te, le]);
275
- return Z(() => {
276
- n || Ve && le || a !== le && (de(), ce(a));
466
+ ue,
467
+ f,
468
+ me
469
+ ]), Zt = I(() => {
470
+ de ? Oe() : Pe();
471
+ }, [Oe, Pe, de]);
472
+ return O(() => {
473
+ n || Ae && de || s !== de && (me(), ue(s));
277
474
  }, [
278
475
  n,
279
- ce,
280
- le,
281
- Ve,
282
- a,
283
- de
476
+ ue,
477
+ de,
478
+ Ae,
479
+ s,
480
+ me
284
481
  ]), /* @__PURE__ */ t.jsx(
285
- gt.Provider,
482
+ Nt.Provider,
286
483
  {
287
484
  value: {
288
- setItemInteraction: m,
289
- slidable: s.length > 1,
290
- carrouselItemIndex: g,
291
- setCarrouselItemIndex: _,
292
- itemIndexCommand: w,
293
- setItemIndexCommand: x,
294
- masterItemIndex: N,
295
- specialCommand: f,
296
- isRunningSpecialCommand: v,
297
- finishSpecialCommand: j,
298
- prevItem: S,
299
- nextItem: R,
300
- scrollToItemIndex: V,
301
- displayedCategoryId: E,
302
- changeCategory: L,
303
- enableHotspotsControl: I,
304
- showHotspots: H,
305
- toggleHotspots: T,
306
- showGalleryControls: d,
307
- showGallery: y,
308
- toggleGallery: A,
309
- shownDetails: D,
310
- isShowingDetails: X,
311
- setShownDetails: $,
312
- resetShownDetails: W,
313
- showZoomControls: B,
314
- zoom: G,
315
- isZooming: pe,
316
- setZoom: Q,
317
- resetZoom: he,
318
- canZoomIn: ye,
319
- zoomIn: St,
320
- canZoomOut: Ie,
321
- zoomOut: Vt,
322
- resetView: Me,
323
- extendMode: le,
324
- enableExtendMode: Te,
325
- disableExtendMode: He,
326
- toggleExtendMode: Ht,
327
- extendTransition: !!Se,
328
- fakeFullScreen: Ve
485
+ items: l,
486
+ setItemInteraction: C,
487
+ slidable: l.length > 1,
488
+ carrouselItemIndex: a,
489
+ setCarrouselItemIndex: h,
490
+ itemIndexCommand: x,
491
+ setItemIndexCommand: j,
492
+ masterItemIndex: k,
493
+ specialCommand: b,
494
+ isRunningSpecialCommand: L,
495
+ finishSpecialCommand: D,
496
+ prevItem: T,
497
+ nextItem: N,
498
+ scrollToItemIndex: z,
499
+ displayedCategoryId: S,
500
+ changeCategory: V,
501
+ enableHotspotsControl: R,
502
+ showHotspots: y,
503
+ toggleHotspots: _,
504
+ showGalleryControls: M,
505
+ showGallery: A,
506
+ toggleGallery: U,
507
+ shownDetails: W,
508
+ isShowingDetails: ee,
509
+ setShownDetails: Y,
510
+ resetShownDetails: q,
511
+ showZoomControls: fe,
512
+ zoom: se,
513
+ isZooming: je,
514
+ setZoom: ae,
515
+ resetZoom: Te,
516
+ canZoomIn: Se,
517
+ zoomIn: Dt,
518
+ canZoomOut: Ve,
519
+ zoomOut: Ft,
520
+ resetView: He,
521
+ extendMode: de,
522
+ enableExtendMode: Pe,
523
+ disableExtendMode: Oe,
524
+ toggleExtendMode: Zt,
525
+ extendTransition: !!Re,
526
+ fakeFullScreen: Ae
329
527
  },
330
528
  children: e
331
529
  }
332
530
  );
333
- }, ft = ["left", "center", "right", "fullW"], xt = ["top", "middle", "bottom", "fullH"], Qt = [
334
- ...ft,
335
- ...xt,
531
+ }, Lt = ["left", "center", "right", "fullW"], _t = ["top", "middle", "bottom", "fullH"], ur = [
532
+ ...Lt,
533
+ ..._t,
336
534
  "top-left",
337
535
  "top-center",
338
536
  "top-right",
@@ -350,24 +548,24 @@ const Ee = (e, r, n) => e + (r - e) * n, Xe = (e, r) => (e % r + r) % r, ht = _e
350
548
  "fullH-right",
351
549
  "fullW-fullW"
352
550
  ];
353
- function er(e) {
354
- return ft.includes(e);
551
+ function mr(e) {
552
+ return Lt.includes(e);
355
553
  }
356
- function tr(e) {
357
- return xt.includes(e);
554
+ function pr(e) {
555
+ return _t.includes(e);
358
556
  }
359
- function rr(e) {
360
- return Qt.includes(e);
557
+ function hr(e) {
558
+ return ur.includes(e);
361
559
  }
362
- function nr(e) {
363
- if (!rr(e))
560
+ function fr(e) {
561
+ if (!hr(e))
364
562
  throw new Error(`Invalid position: ${e}`);
365
- return tr(e) ? [e, void 0] : er(e) ? [void 0, e] : e.split("-");
563
+ return pr(e) ? [e, void 0] : mr(e) ? [void 0, e] : e.split("-");
366
564
  }
367
- function O(...e) {
565
+ function H(...e) {
368
566
  return e.filter((r) => !!r).map((r) => r.trim()).join(" ");
369
567
  }
370
- function or(e) {
568
+ function gr(e) {
371
569
  switch (e) {
372
570
  case "left":
373
571
  return "left-1 small:left-2";
@@ -379,7 +577,7 @@ function or(e) {
379
577
  return "inset-x-1 small:inset-x-2";
380
578
  }
381
579
  }
382
- function vt(e) {
580
+ function Mt(e) {
383
581
  switch (e) {
384
582
  case "top":
385
583
  return "top-1 small:top-2";
@@ -391,82 +589,25 @@ function vt(e) {
391
589
  return "inset-y-1 small:inset-y-2";
392
590
  }
393
591
  }
394
- function sr({
592
+ function xr({
395
593
  positionX: e,
396
594
  positionY: r
397
595
  }) {
398
596
  const n = new Array();
399
- return e && n.push(or(e)), r && n.push(vt(r)), n.join(" ");
597
+ return e && n.push(gr(e)), r && n.push(Mt(r)), n.join(" ");
400
598
  }
401
- function ue(e) {
402
- const [r, n] = nr(e);
403
- return sr({ positionX: n, positionY: r });
599
+ function pe(e) {
600
+ const [r, n] = fr(e);
601
+ return xr({ positionX: n, positionY: r });
404
602
  }
405
- const wt = _e(null), bt = () => ze(wt), De = () => {
406
- const e = bt();
407
- if (!e)
408
- throw new Error(
409
- "useCustomizationContext must be used within a CustomizationContextProvider"
410
- );
411
- return e;
412
- }, ar = ({ children: e }) => {
413
- const [r, n] = F(
414
- /* @__PURE__ */ new Map()
415
- ), o = M(
416
- (l) => {
417
- const i = r.get(l);
418
- if (i)
419
- return i;
420
- const s = document.querySelector(
421
- `${Ae}[name="${l}"]`
422
- );
423
- if (!s)
424
- return;
425
- const b = s.getAttribute("color") ?? void 0, c = s.innerHTML, m = c ? /* @__PURE__ */ t.jsx(
426
- "div",
427
- {
428
- className: "size-full",
429
- dangerouslySetInnerHTML: { __html: c }
430
- }
431
- ) : void 0;
432
- if (!(!b && !m))
433
- return { Icon: m, color: b };
434
- },
435
- [r]
436
- ), a = M(
437
- (l, i) => {
438
- n((s) => new Map(s.set(l, i)));
439
- },
440
- []
441
- ), u = M((l) => {
442
- n((i) => (i.delete(l), new Map(i)));
443
- }, []);
444
- return /* @__PURE__ */ t.jsx(
445
- wt.Provider,
446
- {
447
- value: {
448
- getIconConfig: o,
449
- setIconConfig: a,
450
- resetIconConfig: u
451
- },
452
- children: e
453
- }
454
- );
455
- }, U = ({
603
+ const G = ({
456
604
  customizationKey: e,
457
- className: r = "",
605
+ className: r,
458
606
  children: n
459
607
  }) => {
460
- const { getIconConfig: o } = De(), a = o(e);
461
- return a ? /* @__PURE__ */ t.jsx(
462
- "div",
463
- {
464
- className: r,
465
- style: { color: a?.color },
466
- children: a?.Icon ?? n
467
- }
468
- ) : n;
469
- }, ir = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_CLOSE", children: /* @__PURE__ */ t.jsx(
608
+ const { getIconConfig: o } = ye(), s = o(e)?.Icon;
609
+ return s ? r ? /* @__PURE__ */ t.jsx("div", { className: r, children: s }) : s : n;
610
+ }, wr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_CLOSE", children: /* @__PURE__ */ t.jsx(
470
611
  "svg",
471
612
  {
472
613
  className: e,
@@ -483,7 +624,7 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
483
624
  }
484
625
  )
485
626
  }
486
- ) }), lr = {
627
+ ) }), vr = {
487
628
  fill: {
488
629
  primary: "bg-primary text-primary-foreground hover:opacity-80",
489
630
  neutral: "bg-background text-neutral-foreground hover:opacity-80"
@@ -492,35 +633,35 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
492
633
  primary: "bg-transparent text-foreground hover:bg-primary/25",
493
634
  neutral: "bg-transparent text-background hover:bg-foreground/25"
494
635
  }
495
- }, cr = {
636
+ }, br = {
496
637
  button: "h-8 px-2",
497
638
  icon: "size-8 p-2"
498
- }, q = ({
639
+ }, Q = ({
499
640
  variant: e = "fill",
500
641
  shape: r = "button",
501
642
  color: n = "primary",
502
643
  className: o,
503
- children: a,
644
+ children: s,
504
645
  ...u
505
646
  }) => {
506
- const l = lr[e][n], i = cr[r];
647
+ const f = vr[e][n], d = br[r];
507
648
  return /* @__PURE__ */ t.jsx(
508
649
  "button",
509
650
  {
510
- className: O(
651
+ className: H(
511
652
  "flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",
512
- l,
513
- i,
653
+ f,
654
+ d,
514
655
  o
515
656
  ),
516
657
  ...u,
517
- children: a
658
+ children: s
518
659
  }
519
660
  );
520
- }, yt = (e) => /* @__PURE__ */ t.jsx(q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(ir, { className: "size-full" }) }), jt = ({ text: e, className: r }) => /* @__PURE__ */ t.jsxs(
661
+ }, zt = (e) => /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(wr, { className: "size-full" }) }), It = ({ text: e, className: r }) => /* @__PURE__ */ t.jsxs(
521
662
  "div",
522
663
  {
523
- className: O(
664
+ className: H(
524
665
  "flex size-full flex-col items-center justify-center gap-y-4",
525
666
  r
526
667
  ),
@@ -535,105 +676,117 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
535
676
  /* @__PURE__ */ t.jsx("div", { className: "text-2xl font-bold", children: e })
536
677
  ]
537
678
  }
538
- ), dr = {
679
+ ), yr = {
539
680
  primary: "border-primary",
540
681
  foreground: "border-foreground",
541
682
  background: "border-background"
542
- }, ur = {
683
+ }, jr = {
543
684
  sm: "size-4 border",
544
685
  md: "size-8 border-2",
545
686
  lg: "size-12 border-4"
546
- }, Ct = ({
687
+ }, St = ({
547
688
  color: e = "foreground",
548
689
  size: r = "md"
549
690
  }) => {
550
- const n = dr[e], o = ur[r];
691
+ const n = yr[e], o = jr[r];
551
692
  return /* @__PURE__ */ t.jsx(
552
693
  "div",
553
694
  {
554
- className: O(
695
+ className: H(
555
696
  "inline-block animate-rotation rounded-full border-b-transparent",
556
697
  o,
557
698
  n
558
699
  )
559
700
  }
560
701
  );
561
- }, me = ({
702
+ }, he = ({
562
703
  src: e,
563
704
  className: r,
564
705
  onLoad: n,
565
706
  imgInPlayerWidthRatio: o = 1,
566
- onlyThumbnail: a,
707
+ onlyThumbnail: s,
567
708
  fadeIn: u,
568
- ...l
709
+ ...f
569
710
  }) => {
570
- const {
571
- minImageWidth: i,
572
- maxImageWidth: s,
573
- imageLoadStrategy: b,
574
- playerInViewportWidthRatio: c
575
- } = J(), { imageHdWidth: m, imageSubWidths: g } = ne(), [_, w] = re(() => {
576
- const C = g.concat(m).sort((p, v) => p - v).filter((p) => !(i && p < i || s && p > s));
577
- if (C.length === 0)
578
- throw new Error("No image widths available for the given constraints");
579
- const z = C.map((p) => `${p !== m ? Ut(e, p) : e} ${p}w`);
580
- let f;
581
- if (a)
582
- f = [`${C.shift()}px`];
711
+ const { mediaLoadStrategy: d, playerInViewportWidthRatio: c } = re(), { imageHdWidth: v, usedMediaWidths: l } = oe(), [m, w] = te(() => {
712
+ const h = l.map((j) => `${j !== v ? nr(e, j) : e} ${j}w`);
713
+ let x;
714
+ if (s)
715
+ x = [`${l[0]}px`];
583
716
  else {
584
- const p = 1 / (o * c);
585
- if (b === "quality") {
586
- const v = C.pop();
587
- f = C.map(
588
- (j) => `(max-width: ${p * j}px) ${j}px`
589
- ), f.push(`${v}px`);
590
- } else {
591
- const v = C.shift();
592
- f = C.reverse().map(
593
- (j) => `(min-width: ${p * j}px) ${j}px`
594
- ), f.push(`${v}px`);
717
+ const j = 1 / (o * c);
718
+ switch (d) {
719
+ case "quality": {
720
+ const k = [...l], g = k.pop();
721
+ x = k.map(
722
+ (p) => `(max-width: ${j * p}px) ${p}px`
723
+ ), x.push(`${g}px`);
724
+ break;
725
+ }
726
+ case "balanced": {
727
+ x = [];
728
+ for (let k = 0; k < l.length - 1; k++) {
729
+ const g = l[k], p = l[k + 1], b = Math.round((g + p) / 2);
730
+ x.push(
731
+ `(max-width: ${j * b}px) ${g}px`
732
+ );
733
+ }
734
+ x.push(`${l[l.length - 1]}px`);
735
+ break;
736
+ }
737
+ case "speed": {
738
+ const k = [...l], g = k.shift();
739
+ x = k.reverse().map(
740
+ (p) => `(min-width: ${j * p}px) ${p}px`
741
+ ), x.push(`${g}px`);
742
+ break;
743
+ }
595
744
  }
596
745
  }
597
- return [z.join(", "), f.join(", ")];
746
+ return [h.join(", "), x.join(", ")];
598
747
  }, [
599
- m,
600
- b,
601
- g,
748
+ v,
602
749
  o,
750
+ d,
603
751
  s,
604
- i,
605
- a,
606
752
  c,
607
- e
608
- ]), [x, N] = F();
609
- return Z(() => {
610
- if (x === !0)
753
+ e,
754
+ l
755
+ ]), [C, a] = $();
756
+ return O(() => {
757
+ if (C === !0)
611
758
  return;
612
- const C = setTimeout(() => {
613
- N((z) => z ?? !1);
759
+ const h = setTimeout(() => {
760
+ a((x) => x ?? !1);
614
761
  }, 30);
615
- return () => clearTimeout(C);
616
- }, [x]), /* @__PURE__ */ t.jsx(
762
+ return () => clearTimeout(h);
763
+ }, [C]), /* @__PURE__ */ t.jsx(
617
764
  "img",
618
765
  {
619
766
  src: e,
620
- srcSet: _,
767
+ srcSet: m,
621
768
  sizes: w,
622
- className: O(
769
+ className: H(
623
770
  r,
624
- u && O(
625
- x !== void 0 && "transition-opacity duration-200",
626
- x === !1 && "opacity-0",
627
- x === !0 && "opacity-100"
771
+ u && H(
772
+ C !== void 0 && "transition-opacity duration-200",
773
+ C === !1 && "opacity-0",
774
+ C === !0 && "opacity-100"
628
775
  )
629
776
  ),
630
- onLoad: (C) => {
631
- N(!0), n?.(C);
777
+ onLoad: (h) => {
778
+ a(!0), n?.(h);
632
779
  },
633
- ...l
780
+ ...f
634
781
  }
635
782
  );
636
- }, Fe = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLAY", children: /* @__PURE__ */ t.jsx(
783
+ }, Vt = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_IMAGE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
784
+ "path",
785
+ {
786
+ d: "M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",
787
+ fill: "currentColor"
788
+ }
789
+ ) }) }), Be = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PLAY", children: /* @__PURE__ */ t.jsx(
637
790
  "svg",
638
791
  {
639
792
  className: e,
@@ -645,7 +798,7 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
645
798
  strokeLinejoin: "round",
646
799
  children: /* @__PURE__ */ t.jsx("polygon", { points: "6 3 20 12 6 21 6 3" })
647
800
  }
648
- ) }), kt = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_360", children: /* @__PURE__ */ t.jsxs(
801
+ ) }), Tt = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_360", children: /* @__PURE__ */ t.jsxs(
649
802
  "svg",
650
803
  {
651
804
  className: e,
@@ -700,416 +853,443 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
700
853
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_134_843", children: /* @__PURE__ */ t.jsx("rect", { width: "56", height: "56", fill: "white" }) }) })
701
854
  ]
702
855
  }
703
- ) }), Be = ({
856
+ ) }), kr = ({
857
+ src: e,
858
+ withCdn: r
859
+ }) => {
860
+ const { permanentGallery: n } = re();
861
+ if (!e)
862
+ return null;
863
+ const o = "size-full object-cover";
864
+ return r ? /* @__PURE__ */ t.jsx(
865
+ he,
866
+ {
867
+ className: o,
868
+ src: e,
869
+ onlyThumbnail: !0,
870
+ fadeIn: !n
871
+ }
872
+ ) : /* @__PURE__ */ t.jsx("img", { className: o, src: e });
873
+ }, Fe = ({
704
874
  children: e
705
875
  }) => {
706
- const { extendMode: r } = K();
876
+ const { extendMode: r } = J();
707
877
  return /* @__PURE__ */ t.jsx(
708
878
  "div",
709
879
  {
710
- className: O(
880
+ className: H(
711
881
  "flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",
712
882
  r && "large:h-3/5 large:p-2"
713
883
  ),
714
884
  children: e
715
885
  }
716
886
  );
717
- }, mr = ({ item: e }) => {
718
- const { permanentGallery: r } = J(), { aspectRatioStyle: n } = ne(), { type: o } = e;
719
- let a;
720
- switch (o) {
887
+ }, Er = ({ item: e }) => {
888
+ const { aspectRatioStyle: r } = oe(), { type: n } = e;
889
+ let o, s;
890
+ switch (n) {
721
891
  case "360":
722
- a = e.images[0].src;
892
+ o = e.images[0].src, s = !0;
723
893
  break;
724
894
  case "image":
725
- a = e.src;
895
+ o = e.src, s = !0;
726
896
  break;
727
897
  case "video":
728
- a = e.poster;
898
+ o = e.poster, s = !0;
899
+ break;
900
+ case "custom":
901
+ o = e.thumbnailSrc, s = !1;
729
902
  break;
730
903
  }
731
- const u = /* @__PURE__ */ t.jsx(
732
- me,
733
- {
734
- className: "size-full object-cover",
735
- src: a,
736
- onlyThumbnail: !0,
737
- fadeIn: !r
738
- }
739
- );
740
- let l;
741
- switch (o) {
904
+ const u = /* @__PURE__ */ t.jsx(kr, { src: o, withCdn: s });
905
+ let f;
906
+ switch (n) {
742
907
  case "360":
743
- l = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(kt, { className: "size-full text-primary-light" }) });
908
+ f = /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Tt, { className: "size-full text-primary-light" }) });
744
909
  break;
745
910
  case "video":
746
- l = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(Fe, { className: "size-full p-0.5 text-background" }) });
911
+ f = /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Be, { className: "size-full p-0.5 text-background" }) });
912
+ break;
913
+ case "custom":
914
+ f = o ? null : /* @__PURE__ */ t.jsx(Fe, { children: /* @__PURE__ */ t.jsx(Vt, { className: "size-full p-0.5 text-background" }) });
747
915
  break;
748
916
  }
749
- return /* @__PURE__ */ t.jsxs("div", { className: "relative bg-foreground/30", style: n, children: [
917
+ return /* @__PURE__ */ t.jsxs("div", { className: "relative bg-foreground/30", style: r, children: [
750
918
  u,
751
- l && /* @__PURE__ */ t.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-foreground/25", children: l })
919
+ f && /* @__PURE__ */ t.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-foreground/25", children: f })
752
920
  ] });
753
- }, pr = {
921
+ }, Cr = {
754
922
  primary: "bg-primary/50",
755
923
  neutral: "bg-neutral/50",
756
924
  background: "bg-background/50",
757
925
  foreground: "bg-foreground/50"
758
- }, Nt = ({
926
+ }, Ht = ({
759
927
  color: e = "neutral",
760
928
  orientation: r = "horizontal"
761
929
  }) => {
762
- const n = pr[e], o = r === "horizontal" ? "h-px w-full" : "w-px h-full";
763
- return /* @__PURE__ */ t.jsx("div", { className: O(n, o) });
764
- }, Et = ({
930
+ const n = Cr[e], o = r === "horizontal" ? "h-px w-full" : "w-px h-full";
931
+ return /* @__PURE__ */ t.jsx("div", { className: H(n, o) });
932
+ }, Rt = ({
765
933
  className: e = "",
766
934
  containerClassName: r = ""
767
935
  }) => {
768
- const { hideCategories: n, infiniteCarrousel: o, permanentGallery: a, isFullScreen: u } = J(), { categories: l, items: i, aspectRatioStyle: s } = ne(), {
769
- extendMode: b,
770
- extendTransition: c,
936
+ const { hideCategories: n, infiniteCarrousel: o, permanentGallery: s, isFullScreen: u } = re(), { categories: f, aspectRatioStyle: d } = oe(), {
937
+ items: c,
938
+ extendMode: v,
939
+ extendTransition: l,
771
940
  masterItemIndex: m,
772
- prevItem: g,
773
- nextItem: _,
774
- scrollToItemIndex: w,
775
- resetView: x
776
- } = K(), N = re(() => {
941
+ prevItem: w,
942
+ nextItem: C,
943
+ scrollToItemIndex: a,
944
+ resetView: h
945
+ } = J(), x = te(() => {
777
946
  if (n)
778
947
  return [];
779
- const E = new Array();
780
- let L = 0;
781
- for (let I = 0; I < l.length - 1; I++) {
782
- const H = l[I].items.length;
783
- E.push(L + H), L += H;
948
+ const N = new Array();
949
+ let z = f[0];
950
+ const S = (V) => f.find(
951
+ (R) => R.items.some((y) => y === V)
952
+ );
953
+ for (let V = 0; V < c.length; V++) {
954
+ const R = c[V], y = S(R);
955
+ y && y !== z && (N.push(V), z = y);
784
956
  }
785
- return E;
786
- }, [l, n]), C = Y(null), z = M(() => {
787
- if (!C.current)
957
+ return N;
958
+ }, [f, n, c]), j = Z(null), k = I(() => {
959
+ if (!j.current)
788
960
  throw new Error("slider.current is null");
789
- return C.current;
790
- }, []), f = Y(!1), p = Y(
961
+ return j.current;
962
+ }, []), g = Z(!1), p = Z(
791
963
  null
792
- ), [v, j] = F(!1), S = M(
793
- (E, L) => {
794
- const I = z(), H = I.clientWidth, h = I.scrollWidth / i.length, T = (E + 1 / 2) * h - H / 2, d = I.scrollWidth - I.clientWidth;
795
- I.scrollTo({
796
- left: ae(T, 0, d),
797
- behavior: L
964
+ ), [b, E] = $(!1), L = I(
965
+ (N, z) => {
966
+ const S = k(), V = S.clientWidth, R = S.scrollWidth / c.length, y = (N + 1 / 2) * R - V / 2, i = S.scrollWidth - S.clientWidth;
967
+ S.scrollTo({
968
+ left: le(y, 0, i),
969
+ behavior: z
798
970
  });
799
971
  },
800
- [i.length, z]
972
+ [c.length, k]
801
973
  );
802
- Z(() => {
803
- const E = C.current;
804
- if (!E)
974
+ O(() => {
975
+ const N = j.current;
976
+ if (!N)
805
977
  return;
806
- const L = (h) => {
807
- h.preventDefault(), f.current = !0, p.current = {
808
- x: h.pageX - E.offsetLeft,
809
- scrollLeft: E.scrollLeft
978
+ const z = (R) => {
979
+ R.preventDefault(), g.current = !0, p.current = {
980
+ x: R.pageX - N.offsetLeft,
981
+ scrollLeft: N.scrollLeft
810
982
  };
811
- }, I = (h) => {
812
- if (!f.current)
983
+ }, S = (R) => {
984
+ if (!g.current)
813
985
  return;
814
986
  if (p.current === null)
815
987
  throw new Error("[onMouseMove] scrollStart is null");
816
- const T = h.pageX - E.offsetLeft - p.current.x;
817
- if (!v && Math.abs(T) < 5)
988
+ const y = R.pageX - N.offsetLeft - p.current.x;
989
+ if (!b && Math.abs(y) < 5)
818
990
  return;
819
- const d = p.current.scrollLeft - T;
820
- j(!0), requestAnimationFrame(() => {
821
- E.scrollLeft = d;
991
+ const i = p.current.scrollLeft - y;
992
+ E(!0), requestAnimationFrame(() => {
993
+ N.scrollLeft = i;
822
994
  });
823
- }, H = () => {
824
- f.current && (f.current = !1, requestAnimationFrame(() => {
825
- j(!1);
995
+ }, V = () => {
996
+ g.current && (g.current = !1, requestAnimationFrame(() => {
997
+ E(!1);
826
998
  }));
827
999
  };
828
- return E.addEventListener("mousedown", L), document.addEventListener("mousemove", I), document.addEventListener("mouseleave", H), document.addEventListener("mouseup", H), document.addEventListener("contextmenu", H), () => {
829
- E.removeEventListener("mousedown", L), document.removeEventListener("mousemove", I), document.removeEventListener("mouseleave", H), document.removeEventListener("mouseup", H), document.removeEventListener("contextmenu", H);
1000
+ return N.addEventListener("mousedown", z), document.addEventListener("mousemove", S), document.addEventListener("mouseleave", V), document.addEventListener("mouseup", V), document.addEventListener("contextmenu", V), () => {
1001
+ N.removeEventListener("mousedown", z), document.removeEventListener("mousemove", S), document.removeEventListener("mouseleave", V), document.removeEventListener("mouseup", V), document.removeEventListener("contextmenu", V);
830
1002
  };
831
- }, [v]);
832
- const R = Y(m);
833
- Z(() => {
834
- C.current && (S(m, "smooth"), R.current = m);
835
- }, [m, S]), Z(() => {
836
- C.current && S(R.current, "instant");
1003
+ }, [b]);
1004
+ const D = Z(m);
1005
+ O(() => {
1006
+ j.current && (L(m, "smooth"), D.current = m);
1007
+ }, [m, L]), O(() => {
1008
+ j.current && L(D.current, "instant");
837
1009
  }, [
838
- S,
1010
+ L,
839
1011
  // - Run the effect when those values change
840
1012
  u,
841
- b,
842
- c
1013
+ v,
1014
+ l
843
1015
  ]);
844
- const V = (E, L) => {
845
- v || (o && L === i.length - 1 && m === 0 ? g() : o && L === 0 && m === i.length - 1 ? _() : w(L), x());
1016
+ const T = (N) => {
1017
+ b || (o && N === c.length - 1 && m === 0 ? w() : o && N === 0 && m === c.length - 1 ? C() : a(N), h());
846
1018
  };
847
1019
  return /* @__PURE__ */ t.jsx(
848
1020
  "div",
849
1021
  {
850
- ref: C,
851
- className: O(
1022
+ ref: j,
1023
+ className: H(
852
1024
  "relative w-full overflow-x-auto no-scrollbar",
853
- v ? "cursor-grab" : "cursor-grabbing",
1025
+ b ? "cursor-grab" : "cursor-grabbing",
854
1026
  e
855
1027
  ),
856
1028
  children: /* @__PURE__ */ t.jsx(
857
1029
  "div",
858
1030
  {
859
- className: O(
1031
+ className: H(
860
1032
  "flex h-10 w-fit gap-1 small:h-12 small:gap-2",
861
- b && "large:h-20 large:gap-4",
1033
+ v && "large:h-20 large:gap-4",
862
1034
  r
863
1035
  ),
864
- children: i.map((E, L) => /* @__PURE__ */ t.jsxs(Rt, { children: [
865
- N.includes(L) && /* @__PURE__ */ t.jsx("div", { className: "my-2", children: /* @__PURE__ */ t.jsx(
866
- Nt,
1036
+ children: c.map((N, z) => /* @__PURE__ */ t.jsxs(Wt, { children: [
1037
+ x.includes(z) && /* @__PURE__ */ t.jsx("div", { className: "my-2", children: /* @__PURE__ */ t.jsx(
1038
+ Ht,
867
1039
  {
868
- color: a && !u ? "neutral" : "background",
1040
+ color: s && !u ? "neutral" : "background",
869
1041
  orientation: "vertical"
870
1042
  }
871
1043
  ) }),
872
1044
  /* @__PURE__ */ t.jsx(
873
1045
  "div",
874
1046
  {
875
- className: O(
1047
+ className: H(
876
1048
  "relative h-full overflow-hidden rounded-gallery transition-radius",
877
- !v && "cursor-pointer",
1049
+ !b && "cursor-pointer",
878
1050
  "after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",
879
- L === m ? "after:opacity-100" : "after:opacity-0 hover:after:opacity-70"
1051
+ z === m ? "after:opacity-100" : "after:opacity-0 hover:after:opacity-70"
880
1052
  ),
881
- style: s,
882
- onClick: () => V(E, L),
883
- children: /* @__PURE__ */ t.jsx(mr, { item: E })
1053
+ style: d,
1054
+ onClick: () => T(z),
1055
+ children: /* @__PURE__ */ t.jsx(Er, { item: N })
884
1056
  }
885
1057
  )
886
- ] }, L))
1058
+ ] }, z))
887
1059
  }
888
1060
  )
889
1061
  }
890
1062
  );
891
- }, Lt = (e) => 1 - Math.pow(1 - e, 2), Ge = (e, r) => Math.sqrt(
1063
+ }, At = (e) => 1 - Math.pow(1 - e, 2), Nr = ({
1064
+ Media: e,
1065
+ itemIndex: r
1066
+ }) => {
1067
+ const { setItemInteraction: n } = J();
1068
+ return O(() => {
1069
+ n(r, "ready");
1070
+ }, [r, n]), e;
1071
+ }, st = (e, r) => Math.sqrt(
892
1072
  (e.clientX - r.clientX) ** 2 + (e.clientY - r.clientY) ** 2
893
- ), hr = ({
1073
+ ), Lr = ({
894
1074
  onlyPreload: e,
895
1075
  ...r
896
1076
  }) => {
897
- const { zoom: n, isZooming: o, setZoom: a } = K(), u = Y(null), l = Y(null), i = M((f) => {
898
- if (!l.current)
1077
+ const { zoom: n, isZooming: o, setZoom: s } = J(), u = Z(null), f = Z(null), d = I((g) => {
1078
+ if (!f.current)
899
1079
  throw new Error(
900
- `[${f ?? "getTransformElementOrThrow"}] transformElementRef.current is null`
1080
+ `[${g ?? "getTransformElementOrThrow"}] transformElementRef.current is null`
901
1081
  );
902
- return l.current;
903
- }, []), s = Y(!1), b = Y(null), c = Y(/* @__PURE__ */ new Map()), m = Y({ x: 0, y: 0, scale: 1 }), g = Y(null), _ = M(
904
- (f) => {
905
- const p = i("setTransformStyle"), {
906
- x: v,
907
- y: j,
908
- scale: S
1082
+ return f.current;
1083
+ }, []), c = Z(!1), v = Z(null), l = Z(/* @__PURE__ */ new Map()), m = Z({ x: 0, y: 0, scale: 1 }), w = Z(null), C = I(
1084
+ (g) => {
1085
+ const p = d("setTransformStyle"), {
1086
+ x: b,
1087
+ y: E,
1088
+ scale: L
909
1089
  } = {
910
1090
  ...m.current,
911
- ...f
912
- }, R = ae(S, 1, Le), V = p.clientWidth, E = p.clientHeight, L = V * R, I = E * R, H = ae(v, -(L - V), 0), h = ae(j, -(I - E), 0);
913
- m.current = { x: H, y: h, scale: R }, p.style.transform = `translate(${H}px, ${h}px) scale(${R})`;
1091
+ ...g
1092
+ }, D = le(L, 1, _e), T = p.clientWidth, N = p.clientHeight, z = T * D, S = N * D, V = le(b, -(z - T), 0), R = le(E, -(S - N), 0);
1093
+ m.current = { x: V, y: R, scale: D }, p.style.transform = `translate(${V}px, ${R}px) scale(${D})`;
914
1094
  },
915
- [i]
916
- ), w = M(
917
- (f, p) => {
1095
+ [d]
1096
+ ), a = I(
1097
+ (g, p) => {
918
1098
  const {
919
- x: v,
920
- y: j,
921
- scale: S
1099
+ x: b,
1100
+ y: E,
1101
+ scale: L
922
1102
  } = m.current, {
923
- x: R,
924
- y: V,
925
- scale: E
1103
+ x: D,
1104
+ y: T,
1105
+ scale: N
926
1106
  } = {
927
1107
  ...m.current,
928
- ...f
1108
+ ...g
929
1109
  };
930
- g.current && (cancelAnimationFrame(g.current), g.current = null);
931
- const L = () => {
932
- _({ x: R, y: V, scale: E }), a(E);
933
- }, I = Math.abs(R - v) < 1 && Math.abs(V - j) < 1 && Math.abs(E - S) < 5e-3;
934
- if (!p || I) {
935
- L();
1110
+ w.current && (cancelAnimationFrame(w.current), w.current = null);
1111
+ const z = () => {
1112
+ C({ x: D, y: T, scale: N }), s(N);
1113
+ }, S = Math.abs(D - b) < 1 && Math.abs(T - E) < 1 && Math.abs(N - L) < 5e-3;
1114
+ if (!p || S) {
1115
+ z();
936
1116
  return;
937
1117
  }
938
- const H = (/* @__PURE__ */ new Date()).getTime(), h = () => {
939
- const T = () => {
940
- const d = (/* @__PURE__ */ new Date()).getTime() - H;
941
- if (d >= p) {
942
- L(), g.current = null;
1118
+ const V = (/* @__PURE__ */ new Date()).getTime(), R = () => {
1119
+ const y = () => {
1120
+ const i = (/* @__PURE__ */ new Date()).getTime() - V;
1121
+ if (i >= p) {
1122
+ z(), w.current = null;
943
1123
  return;
944
1124
  }
945
- const y = Math.min(d / p, 1), k = Lt(y), A = Ee(v, R, k), D = Ee(j, V, k), $ = Ee(S, E, k);
946
- _({ x: A, y: D, scale: $ }), h();
1125
+ const _ = Math.min(i / p, 1), M = At(_), A = Le(b, D, M), F = Le(E, T, M), U = Le(L, N, M);
1126
+ C({ x: A, y: F, scale: U }), R();
947
1127
  };
948
- g.current = requestAnimationFrame(T);
1128
+ w.current = requestAnimationFrame(y);
949
1129
  };
950
- h();
1130
+ R();
951
1131
  },
952
- [_, a]
953
- ), x = M(
954
- (f, p) => {
955
- let { x: v, y: j } = m.current;
956
- f.x && (v += f.x), f.y && (j += f.y), w(
1132
+ [C, s]
1133
+ ), h = I(
1134
+ (g, p) => {
1135
+ let { x: b, y: E } = m.current;
1136
+ g.x && (b += g.x), g.y && (E += g.y), a(
957
1137
  {
958
- x: v,
959
- y: j
1138
+ x: b,
1139
+ y: E
960
1140
  },
961
1141
  p
962
1142
  );
963
1143
  },
964
- [w]
965
- ), N = M(
966
- (f, p, v) => {
967
- const j = m.current.scale, S = ae(f, 1, Le), R = S / j, { x: V, y: E } = m.current, { x: L, y: I } = p, H = -V + L, h = -E + I, T = H * R, d = h * R, y = T - L, k = d - I, A = -y, D = -k;
968
- w(
1144
+ [a]
1145
+ ), x = I(
1146
+ (g, p, b) => {
1147
+ const E = m.current.scale, L = le(g, 1, _e), D = L / E, { x: T, y: N } = m.current, { x: z, y: S } = p, V = -T + z, R = -N + S, y = V * D, i = R * D, _ = y - z, M = i - S, A = -_, F = -M;
1148
+ a(
969
1149
  {
970
1150
  x: A,
971
- y: D,
972
- scale: S
1151
+ y: F,
1152
+ scale: L
973
1153
  },
974
- v
1154
+ b
975
1155
  );
976
1156
  },
977
- [w]
978
- ), C = M(
979
- (f) => {
980
- const p = i(
1157
+ [a]
1158
+ ), j = I(
1159
+ (g) => {
1160
+ const p = d(
981
1161
  "shiftZoomFromButton"
982
- ), v = p.clientWidth, j = p.clientHeight;
983
- N(
984
- f,
1162
+ ), b = p.clientWidth, E = p.clientHeight;
1163
+ x(
1164
+ g,
985
1165
  {
986
- x: v / 2,
987
- y: j / 2
1166
+ x: b / 2,
1167
+ y: E / 2
988
1168
  },
989
1169
  200
990
1170
  );
991
1171
  },
992
- [i, N]
993
- ), z = M(
994
- (f, p, v) => {
995
- const { scale: j } = m.current;
996
- N(
997
- j + f,
1172
+ [d, x]
1173
+ ), k = I(
1174
+ (g, p, b) => {
1175
+ const { scale: E } = m.current;
1176
+ x(
1177
+ E + g,
998
1178
  p,
999
- v
1179
+ b
1000
1180
  );
1001
1181
  },
1002
- [N]
1182
+ [x]
1003
1183
  );
1004
- return Z(() => {
1005
- e || l.current && C(n);
1006
- }, [e, C, n]), Z(() => {
1184
+ return O(() => {
1185
+ e || f.current && j(n);
1186
+ }, [e, j, n]), O(() => {
1007
1187
  if (e || !o)
1008
1188
  return;
1009
- const f = l.current;
1010
- if (!f)
1189
+ const g = f.current;
1190
+ if (!g)
1011
1191
  return;
1012
- const p = (S) => {
1013
- S.preventDefault(), S.stopPropagation(), s.current = !0, b.current = {
1014
- x: S.clientX,
1015
- y: S.clientY
1192
+ const p = (L) => {
1193
+ L.preventDefault(), L.stopPropagation(), c.current = !0, v.current = {
1194
+ x: L.clientX,
1195
+ y: L.clientY
1016
1196
  };
1017
- }, v = (S) => {
1018
- if (!s.current)
1197
+ }, b = (L) => {
1198
+ if (!c.current)
1019
1199
  return;
1020
- if (!b.current)
1200
+ if (!v.current)
1021
1201
  throw new Error("mouseStartXY.current is null");
1022
- S.stopPropagation();
1023
- const R = S.clientX - b.current.x, V = S.clientY - b.current.y;
1024
- x({
1025
- x: R,
1026
- y: V
1027
- }), b.current = {
1028
- x: S.clientX,
1029
- y: S.clientY
1202
+ L.stopPropagation();
1203
+ const D = L.clientX - v.current.x, T = L.clientY - v.current.y;
1204
+ h({
1205
+ x: D,
1206
+ y: T
1207
+ }), v.current = {
1208
+ x: L.clientX,
1209
+ y: L.clientY
1030
1210
  };
1031
- }, j = () => {
1032
- s.current = !1;
1211
+ }, E = () => {
1212
+ c.current = !1;
1033
1213
  };
1034
- return f.addEventListener("mousedown", p), document.addEventListener("mousemove", v), document.addEventListener("mouseleave", j), document.addEventListener("mouseup", j), document.addEventListener("contextmenu", j), () => {
1035
- f.removeEventListener("mousedown", p), document.removeEventListener("mousemove", v), document.removeEventListener("mouseleave", j), document.removeEventListener("mouseup", j), document.removeEventListener("contextmenu", j);
1214
+ return g.addEventListener("mousedown", p), document.addEventListener("mousemove", b), document.addEventListener("mouseleave", E), document.addEventListener("mouseup", E), document.addEventListener("contextmenu", E), () => {
1215
+ g.removeEventListener("mousedown", p), document.removeEventListener("mousemove", b), document.removeEventListener("mouseleave", E), document.removeEventListener("mouseup", E), document.removeEventListener("contextmenu", E);
1036
1216
  };
1037
- }, [o, x, e]), Z(() => {
1217
+ }, [o, h, e]), O(() => {
1038
1218
  if (e)
1039
1219
  return;
1040
- const f = u.current;
1041
- if (!f)
1220
+ const g = u.current;
1221
+ if (!g)
1042
1222
  return;
1043
- const p = (v) => {
1044
- const { ctrlKey: j, clientX: S, clientY: R, deltaX: V, deltaY: E } = v;
1045
- if (j) {
1046
- if (!o && E >= 0)
1223
+ const p = (b) => {
1224
+ const { ctrlKey: E, clientX: L, clientY: D, deltaX: T, deltaY: N } = b;
1225
+ if (E) {
1226
+ if (!o && N >= 0)
1047
1227
  return;
1048
- const { left: L, top: I } = f.getBoundingClientRect(), H = S - L, h = R - I;
1049
- z(-0.01 * E, {
1050
- x: H,
1051
- y: h
1228
+ const { left: z, top: S } = g.getBoundingClientRect(), V = L - z, R = D - S;
1229
+ k(-0.01 * N, {
1230
+ x: V,
1231
+ y: R
1052
1232
  });
1053
1233
  } else {
1054
1234
  if (!o)
1055
1235
  return;
1056
- x({
1057
- x: -2 * V,
1058
- y: -2 * E
1236
+ h({
1237
+ x: -2 * T,
1238
+ y: -2 * N
1059
1239
  });
1060
1240
  }
1061
- v.preventDefault();
1241
+ b.preventDefault();
1062
1242
  };
1063
- return f.addEventListener("wheel", p), () => {
1064
- f.removeEventListener("wheel", p);
1243
+ return g.addEventListener("wheel", p), () => {
1244
+ g.removeEventListener("wheel", p);
1065
1245
  };
1066
- }, [o, x, z, e]), Z(() => {
1067
- const f = u.current, p = l.current;
1068
- if (!f || !p)
1246
+ }, [o, h, k, e]), O(() => {
1247
+ const g = u.current, p = f.current;
1248
+ if (!g || !p)
1069
1249
  return;
1070
- const v = c.current, j = (V) => {
1071
- for (let E = 0; E < V.changedTouches.length; E++) {
1072
- const L = V.changedTouches[E];
1073
- v.set(L.identifier, L);
1250
+ const b = l.current, E = (T) => {
1251
+ for (let N = 0; N < T.changedTouches.length; N++) {
1252
+ const z = T.changedTouches[N];
1253
+ b.set(z.identifier, z);
1074
1254
  }
1075
- }, S = (V) => {
1076
- for (let E = 0; E < V.changedTouches.length; E++) {
1077
- const L = V.changedTouches[E];
1078
- v.delete(L.identifier);
1255
+ }, L = (T) => {
1256
+ for (let N = 0; N < T.changedTouches.length; N++) {
1257
+ const z = T.changedTouches[N];
1258
+ b.delete(z.identifier);
1079
1259
  }
1080
- }, R = (V) => {
1081
- const E = V.touches.length;
1082
- if (E === 1) {
1260
+ }, D = (T) => {
1261
+ const N = T.touches.length;
1262
+ if (N === 1) {
1083
1263
  if (!o)
1084
1264
  return;
1085
- V.preventDefault();
1086
- const L = V.touches[0], I = v.get(L.identifier);
1087
- if (!I)
1265
+ T.preventDefault();
1266
+ const z = T.touches[0], S = b.get(z.identifier);
1267
+ if (!S)
1088
1268
  throw new Error("touchStart is null");
1089
- const H = L.clientX - I.clientX, h = L.clientY - I.clientY;
1090
- x({
1091
- x: H,
1092
- y: h
1093
- }), v.set(L.identifier, L);
1094
- } else if (E === 2) {
1095
- V.preventDefault();
1096
- const [L, I] = V.touches, H = v.get(L.identifier), h = v.get(I.identifier);
1097
- if (!H || !h)
1269
+ const V = z.clientX - S.clientX, R = z.clientY - S.clientY;
1270
+ h({
1271
+ x: V,
1272
+ y: R
1273
+ }), b.set(z.identifier, z);
1274
+ } else if (N === 2) {
1275
+ T.preventDefault();
1276
+ const [z, S] = T.touches, V = b.get(z.identifier), R = b.get(S.identifier);
1277
+ if (!V || !R)
1098
1278
  throw new Error("intialTouch1 or intialTouch2 is null");
1099
- const T = Ge(
1100
- H,
1101
- h
1102
- ), d = Ge(L, I) / T, { left: y, top: k } = f.getBoundingClientRect();
1103
- z(d - 1, {
1104
- x: (L.clientX + I.clientX) / 2 - y,
1105
- y: (L.clientY + I.clientY) / 2 - k
1106
- }), v.set(L.identifier, L), v.set(I.identifier, I);
1279
+ const y = st(
1280
+ V,
1281
+ R
1282
+ ), i = st(z, S) / y, { left: _, top: M } = g.getBoundingClientRect();
1283
+ k(i - 1, {
1284
+ x: (z.clientX + S.clientX) / 2 - _,
1285
+ y: (z.clientY + S.clientY) / 2 - M
1286
+ }), b.set(z.identifier, z), b.set(S.identifier, S);
1107
1287
  }
1108
1288
  };
1109
- return p.addEventListener("touchstart", j), p.addEventListener("touchmove", R), p.addEventListener("touchend", S), p.addEventListener("touchcancel", S), () => {
1110
- p.removeEventListener("touchstart", j), p.removeEventListener("touchmove", R), p.removeEventListener("touchend", S), p.removeEventListener("touchcancel", S);
1289
+ return p.addEventListener("touchstart", E), p.addEventListener("touchmove", D), p.addEventListener("touchend", L), p.addEventListener("touchcancel", L), () => {
1290
+ p.removeEventListener("touchstart", E), p.removeEventListener("touchmove", D), p.removeEventListener("touchend", L), p.removeEventListener("touchcancel", L);
1111
1291
  };
1112
- }, [o, x, z]), /* @__PURE__ */ t.jsx(
1292
+ }, [o, h, k]), /* @__PURE__ */ t.jsx(
1113
1293
  "div",
1114
1294
  {
1115
1295
  ref: u,
@@ -1117,10 +1297,10 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1117
1297
  children: /* @__PURE__ */ t.jsx(
1118
1298
  "div",
1119
1299
  {
1120
- ref: l,
1300
+ ref: f,
1121
1301
  className: "origin-top-left",
1122
1302
  children: /* @__PURE__ */ t.jsx(
1123
- me,
1303
+ he,
1124
1304
  {
1125
1305
  ...r,
1126
1306
  imgInPlayerWidthRatio: e ? 1 : n
@@ -1130,15 +1310,9 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1130
1310
  )
1131
1311
  }
1132
1312
  );
1133
- }, gr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_IMAGE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ t.jsx(
1134
- "path",
1135
- {
1136
- d: "M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",
1137
- fill: "currentColor"
1138
- }
1139
- ) }) }), fr = ({ hotspot: e }) => {
1140
- const { title: r, icon: n, description: o, position: a, detail: u } = e, { getIconConfig: l } = De(), i = n ? l(n) : void 0, { extendMode: s, setShownDetails: b } = K(), c = !!u, m = u?.type === "image", g = !!r || !!o, _ = m ? /* @__PURE__ */ t.jsx(gr, { className: "size-4" }) : /* @__PURE__ */ t.jsx("div", { className: "size-1" }), w = () => {
1141
- m && b({
1313
+ }, _r = ({ hotspot: e }) => {
1314
+ const { title: r, icon: n, description: o, position: s, detail: u } = e, { getIconConfig: f } = ye(), d = n ? f(n) : void 0, { extendMode: c, setShownDetails: v } = J(), l = !!u, m = u?.type === "image", w = !!r || !!o, C = m ? /* @__PURE__ */ t.jsx(Vt, { className: "size-4" }) : /* @__PURE__ */ t.jsx("div", { className: "size-1" }), a = () => {
1315
+ m && v({
1142
1316
  src: u.src,
1143
1317
  title: r,
1144
1318
  text: o
@@ -1147,21 +1321,20 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1147
1321
  return /* @__PURE__ */ t.jsxs(
1148
1322
  "div",
1149
1323
  {
1150
- className: O(
1324
+ className: H(
1151
1325
  "group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",
1152
- c ? "cursor-pointer" : "cursor-help"
1326
+ l ? "cursor-pointer" : "cursor-help"
1153
1327
  ),
1154
1328
  style: {
1155
1329
  top: `${100 * e.position.y}%`,
1156
1330
  left: `${100 * e.position.x}%`
1157
1331
  },
1158
- onClick: w,
1332
+ onClick: a,
1159
1333
  children: [
1160
1334
  /* @__PURE__ */ t.jsxs(
1161
1335
  "div",
1162
1336
  {
1163
1337
  className: "relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",
1164
- style: { backgroundColor: i?.color },
1165
1338
  children: [
1166
1339
  /* @__PURE__ */ t.jsx(
1167
1340
  "div",
@@ -1169,18 +1342,18 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1169
1342
  className: "pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background"
1170
1343
  }
1171
1344
  ),
1172
- i?.Icon ? /* @__PURE__ */ t.jsx("div", { className: "size-5", children: i.Icon }) : /* @__PURE__ */ t.jsx("div", { className: "p-1", children: _ })
1345
+ /* @__PURE__ */ t.jsx("div", { className: "p-1", children: d?.Icon ? /* @__PURE__ */ t.jsx("div", { className: "size-4", children: d.Icon }) : C })
1173
1346
  ]
1174
1347
  }
1175
1348
  ),
1176
- !m && g && /* @__PURE__ */ t.jsx(
1349
+ !m && w && /* @__PURE__ */ t.jsx(
1177
1350
  "div",
1178
1351
  {
1179
- className: O(
1352
+ className: H(
1180
1353
  "absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",
1181
- s && "large:max-w-56",
1182
- a.y < 0.55 ? "-top-1" : "-bottom-1",
1183
- a.x < 0.55 ? "-left-1 pl-6 small:pl-8" : "-right-1 pr-4 small:pr-6",
1354
+ c && "large:max-w-56",
1355
+ s.y < 0.55 ? "-top-1" : "-bottom-1",
1356
+ s.x < 0.55 ? "-left-1 pl-6 small:pl-8" : "-right-1 pr-4 small:pr-6",
1184
1357
  "pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"
1185
1358
  ),
1186
1359
  children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1 text-pretty", children: [
@@ -1192,254 +1365,228 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1192
1365
  ]
1193
1366
  }
1194
1367
  );
1195
- }, xr = ({ hotspot: e }) => {
1196
- const { icon: r, detail: n } = e;
1197
- let o;
1198
- switch (r) {
1199
- case "WINDOW STICKER":
1200
- o = /* @__PURE__ */ t.jsx(
1201
- "img",
1202
- {
1203
- className: "h-10",
1204
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/window_sticker.png",
1205
- alt: "Window sticker"
1206
- }
1207
- );
1208
- break;
1209
- case "CARFAX":
1210
- o = /* @__PURE__ */ t.jsx(
1211
- "img",
1212
- {
1213
- className: "h-10",
1214
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/carfax.png",
1215
- alt: "Carfax"
1216
- }
1217
- );
1218
- break;
1219
- default:
1220
- o = /* @__PURE__ */ t.jsx(fr, { hotspot: e });
1221
- break;
1222
- }
1223
- switch (n?.type) {
1368
+ }, Mr = ({ hotspot: e }) => {
1369
+ const { detail: r } = e, n = /* @__PURE__ */ t.jsx(_r, { hotspot: e });
1370
+ switch (r?.type) {
1224
1371
  case "link":
1225
1372
  case "pdf":
1226
- return /* @__PURE__ */ t.jsx("a", { href: n.src, target: "_blank", rel: "noreferrer", children: o });
1373
+ return /* @__PURE__ */ t.jsx("a", { href: r.src, target: "_blank", rel: "noreferrer", children: n });
1227
1374
  default:
1228
- return o;
1375
+ return n;
1229
1376
  }
1230
- }, _t = ({
1377
+ }, Pt = ({
1231
1378
  hotspots: e,
1232
1379
  itemIndex: r,
1233
1380
  className: n,
1234
1381
  onLoad: o,
1235
- ...a
1382
+ ...s
1236
1383
  }) => {
1237
- const { isShowingDetails: u, showHotspots: l, setItemInteraction: i } = K();
1238
- return /* @__PURE__ */ t.jsx("div", { className: O("relative size-full overflow-hidden", n), children: /* @__PURE__ */ t.jsxs(
1384
+ const { isShowingDetails: u, showHotspots: f, setItemInteraction: d } = J();
1385
+ return /* @__PURE__ */ t.jsx("div", { className: H("relative size-full overflow-hidden", n), children: /* @__PURE__ */ t.jsxs(
1239
1386
  "div",
1240
1387
  {
1241
- className: O(
1388
+ className: H(
1242
1389
  "size-full duration-details",
1243
1390
  u ? "scale-105" : "scale-100"
1244
1391
  ),
1245
1392
  children: [
1246
1393
  /* @__PURE__ */ t.jsx(
1247
- hr,
1394
+ Lr,
1248
1395
  {
1249
1396
  className: "size-full object-cover",
1250
- onLoad: (s) => {
1251
- r !== void 0 && i(r, "ready"), o?.(s);
1397
+ onLoad: (c) => {
1398
+ r !== void 0 && d(r, "ready"), o?.(c);
1252
1399
  },
1253
- ...a
1400
+ ...s
1254
1401
  }
1255
1402
  ),
1256
- l && e?.map((s, b) => /* @__PURE__ */ t.jsx(xr, { hotspot: s }, b))
1403
+ f && e?.map((c, v) => /* @__PURE__ */ t.jsx(Mr, { hotspot: c }, v))
1257
1404
  ]
1258
1405
  }
1259
1406
  ) });
1260
- }, ve = 10, vr = 15, wr = ({
1407
+ }, we = 10, zr = 15, Ir = ({
1261
1408
  images: e,
1262
1409
  onlyPreload: r
1263
1410
  }) => {
1264
- const { reverse360: n } = J(), { isShowingDetails: o, isZooming: a } = K(), u = a || o, l = Y(null), i = Y(null), [s, b] = F(0), c = e.length, m = M(() => {
1265
- b((_) => (_ - 1 + c) % c);
1266
- }, [c]), g = M(() => {
1267
- b((_) => (_ + 1) % c);
1268
- }, [c]);
1269
- return Z(() => {
1411
+ const { reverse360: n } = re(), { isShowingDetails: o, isZooming: s } = J(), u = s || o, f = Z(null), d = Z(null), [c, v] = $(0), l = e.length, m = I(() => {
1412
+ v((C) => (C - 1 + l) % l);
1413
+ }, [l]), w = I(() => {
1414
+ v((C) => (C + 1) % l);
1415
+ }, [l]);
1416
+ return O(() => {
1270
1417
  if (u)
1271
1418
  return;
1272
- const _ = l.current, w = i.current;
1273
- if (!_ || !w)
1419
+ const C = f.current, a = d.current;
1420
+ if (!C || !a)
1274
1421
  return;
1275
- let x = null, N = [], C = null;
1276
- const z = (d) => {
1277
- N.push(d), N.length > 20 && N.shift();
1278
- }, f = () => {
1279
- const d = Date.now(), y = (() => {
1280
- const $ = Date.now(), W = N.filter(
1281
- (G) => $ - G.timestamp < 50
1422
+ let h = null, x = [], j = null;
1423
+ const k = (i) => {
1424
+ x.push(i), x.length > 20 && x.shift();
1425
+ }, g = () => {
1426
+ const i = Date.now(), _ = (() => {
1427
+ const U = Date.now(), W = x.filter(
1428
+ (ee) => U - ee.timestamp < 50
1282
1429
  );
1283
1430
  if (W.length < 2)
1284
1431
  return 0;
1285
- const X = W[0], B = W[W.length - 1];
1286
- return (B.value - X.value) / (1e-3 * Math.max(B.timestamp - X.timestamp, 1));
1432
+ const Y = W[0], q = W[W.length - 1];
1433
+ return (q.value - Y.value) / (1e-3 * Math.max(q.timestamp - Y.timestamp, 1));
1287
1434
  })();
1288
- let k = 0, A = d;
1289
- const D = () => {
1290
- C = requestAnimationFrame(() => {
1291
- const $ = Date.now(), W = ($ - d) / 1e3, X = Math.pow(0.05, W), B = y * X, G = ($ - A) / 1e3;
1292
- if (k += B * G, Math.abs(B) < 5 * ve && Math.abs(k) < ve) {
1293
- C = null;
1435
+ let M = 0, A = i;
1436
+ const F = () => {
1437
+ j = requestAnimationFrame(() => {
1438
+ const U = Date.now(), W = (U - i) / 1e3, Y = Math.pow(0.05, W), q = _ * Y, ee = (U - A) / 1e3;
1439
+ if (M += q * ee, Math.abs(q) < 5 * we && Math.abs(M) < we) {
1440
+ j = null;
1294
1441
  return;
1295
1442
  }
1296
- Math.abs(k) >= ve && (k > 0 !== n ? g() : m(), k = 0), A = $, D();
1443
+ Math.abs(M) >= we && (M > 0 !== n ? w() : m(), M = 0), A = U, F();
1297
1444
  });
1298
1445
  };
1299
- D();
1446
+ F();
1300
1447
  }, p = () => {
1301
- C && (cancelAnimationFrame(C), C = null);
1302
- }, v = (d) => {
1303
- if (d.button !== 0)
1448
+ j && (cancelAnimationFrame(j), j = null);
1449
+ }, b = (i) => {
1450
+ if (i.button !== 0)
1304
1451
  return;
1305
- d.preventDefault(), d.stopPropagation(), p();
1306
- const y = d.clientX;
1307
- x = y, N = [{ timestamp: Date.now(), value: y }];
1308
- }, j = (d) => {
1309
- if (x === null)
1452
+ i.preventDefault(), i.stopPropagation(), p();
1453
+ const _ = i.clientX;
1454
+ h = _, x = [{ timestamp: Date.now(), value: _ }];
1455
+ }, E = (i) => {
1456
+ if (h === null)
1310
1457
  return;
1311
- d.stopPropagation();
1312
- const { clientX: y } = d;
1313
- z({ timestamp: Date.now(), value: y });
1314
- const k = y - x;
1315
- Math.abs(k) < ve || (k > 0 !== n ? g() : m(), x = y);
1316
- }, S = () => {
1317
- x !== null && (x = null, f());
1458
+ i.stopPropagation();
1459
+ const { clientX: _ } = i;
1460
+ k({ timestamp: Date.now(), value: _ });
1461
+ const M = _ - h;
1462
+ Math.abs(M) < we || (M > 0 !== n ? w() : m(), h = _);
1463
+ }, L = () => {
1464
+ h !== null && (h = null, g());
1318
1465
  };
1319
- _.addEventListener("mousedown", v), document.addEventListener("mousemove", j), document.addEventListener("mouseleave", S), document.addEventListener("mouseup", S), document.addEventListener("contextmenu", S);
1320
- const R = () => w.getBoundingClientRect().width, V = () => w.scrollWidth / 2 - R() / 2, E = () => {
1321
- const d = V();
1322
- w.scrollLeft = d;
1466
+ C.addEventListener("mousedown", b), document.addEventListener("mousemove", E), document.addEventListener("mouseleave", L), document.addEventListener("mouseup", L), document.addEventListener("contextmenu", L);
1467
+ const D = () => a.getBoundingClientRect().width, T = () => a.scrollWidth / 2 - D() / 2, N = () => {
1468
+ const i = T();
1469
+ a.scrollLeft = i;
1323
1470
  };
1324
- E();
1325
- const L = () => {
1326
- const d = w.scrollLeft - V();
1327
- Math.abs(d) < vr || (d < 0 !== n ? g() : m(), E());
1471
+ N();
1472
+ const z = () => {
1473
+ const i = a.scrollLeft - T();
1474
+ Math.abs(i) < zr || (i < 0 !== n ? w() : m(), N());
1328
1475
  };
1329
- w.addEventListener("scroll", L);
1330
- let I = null;
1331
- const H = (d) => {
1332
- if (I !== null || d.changedTouches.length !== 1)
1476
+ a.addEventListener("scroll", z);
1477
+ let S = null;
1478
+ const V = (i) => {
1479
+ if (S !== null || i.changedTouches.length !== 1)
1333
1480
  return;
1334
1481
  p();
1335
- const { identifier: y, clientX: k } = d.changedTouches[0];
1336
- I = y, x = k, N = [{ timestamp: Date.now(), value: k }];
1337
- }, h = (d) => {
1338
- if (!x)
1482
+ const { identifier: _, clientX: M } = i.changedTouches[0];
1483
+ S = _, h = M, x = [{ timestamp: Date.now(), value: M }];
1484
+ }, R = (i) => {
1485
+ if (!h)
1339
1486
  return;
1340
- const y = Array.from(d.changedTouches).find(
1341
- ({ identifier: D }) => D === I
1487
+ const _ = Array.from(i.changedTouches).find(
1488
+ ({ identifier: F }) => F === S
1342
1489
  );
1343
- if (!y)
1490
+ if (!_)
1344
1491
  return;
1345
- d.preventDefault();
1346
- const { clientX: k } = y;
1347
- z({ timestamp: Date.now(), value: k });
1348
- const A = k - x;
1349
- Math.abs(A) < ve || (A > 0 !== n ? g() : m(), x = k);
1350
- }, T = (d) => {
1351
- !x || !Array.from(d.changedTouches).some(
1352
- ({ identifier: y }) => y === I
1353
- ) || (I = null, x = null, f());
1492
+ i.preventDefault();
1493
+ const { clientX: M } = _;
1494
+ k({ timestamp: Date.now(), value: M });
1495
+ const A = M - h;
1496
+ Math.abs(A) < we || (A > 0 !== n ? w() : m(), h = M);
1497
+ }, y = (i) => {
1498
+ !h || !Array.from(i.changedTouches).some(
1499
+ ({ identifier: _ }) => _ === S
1500
+ ) || (S = null, h = null, g());
1354
1501
  };
1355
- return w.addEventListener("touchstart", H), w.addEventListener("touchmove", h), w.addEventListener("touchend", T), w.addEventListener("touchcancel", T), () => {
1356
- _.removeEventListener("mousedown", v), document.removeEventListener("mousemove", j), document.removeEventListener("mouseleave", S), document.removeEventListener("mouseup", S), document.removeEventListener("contextmenu", S), w.removeEventListener("scroll", L), w.removeEventListener("touchstart", H), w.removeEventListener("touchmove", h), w.removeEventListener("touchend", T), w.removeEventListener("touchcancel", T);
1502
+ return a.addEventListener("touchstart", V), a.addEventListener("touchmove", R), a.addEventListener("touchend", y), a.addEventListener("touchcancel", y), () => {
1503
+ C.removeEventListener("mousedown", b), document.removeEventListener("mousemove", E), document.removeEventListener("mouseleave", L), document.removeEventListener("mouseup", L), document.removeEventListener("contextmenu", L), a.removeEventListener("scroll", z), a.removeEventListener("touchstart", V), a.removeEventListener("touchmove", R), a.removeEventListener("touchend", y), a.removeEventListener("touchcancel", y);
1357
1504
  };
1358
- }, [g, m, u, n]), /* @__PURE__ */ t.jsx("div", { ref: l, className: "cursor-ew-resize", children: /* @__PURE__ */ t.jsxs("div", { ref: i, className: "overflow-x-scroll no-scrollbar", children: [
1505
+ }, [w, m, u, n]), /* @__PURE__ */ t.jsx("div", { ref: f, className: "cursor-ew-resize", children: /* @__PURE__ */ t.jsxs("div", { ref: d, className: "overflow-x-scroll no-scrollbar", children: [
1359
1506
  /* @__PURE__ */ t.jsxs("div", { className: "sticky left-0 top-0", children: [
1360
- e.map((_) => /* @__PURE__ */ t.jsx(
1361
- me,
1507
+ e.map((C) => /* @__PURE__ */ t.jsx(
1508
+ he,
1362
1509
  {
1363
- src: _.src,
1510
+ src: C.src,
1364
1511
  className: "pointer-events-none !absolute left-0 top-0 -z-10"
1365
1512
  },
1366
- _.src
1513
+ C.src
1367
1514
  )),
1368
- /* @__PURE__ */ t.jsx(_t, { ...e[s], onlyPreload: r })
1515
+ /* @__PURE__ */ t.jsx(Pt, { ...e[c], onlyPreload: r })
1369
1516
  ] }),
1370
1517
  /* @__PURE__ */ t.jsx("div", { className: "pointer-events-none -mt-px h-px w-[calc(100%+1024px)]" })
1371
1518
  ] }) });
1372
- }, br = ({ images: e, onPlaceholderImageLoaded: r, onSpinImagesLoaded: n, onError: o }) => {
1373
- const a = re(() => e.map(({ src: c }) => c), [e]), [u, l] = F(null), i = u ? [...u.values()].filter((c) => c).length / e.length * 100 : null, s = M(() => {
1374
- i === null && l(new Map(a.map((c) => [c, !1])));
1375
- }, [a, i]), b = M((c) => {
1376
- l((m) => {
1377
- const g = new Map(m);
1378
- return g.set(c, !0), g;
1519
+ }, Sr = ({ images: e, onPlaceholderImageLoaded: r, onSpinImagesLoaded: n, onError: o }) => {
1520
+ const s = te(() => e.map(({ src: l }) => l), [e]), [u, f] = $(null), d = u ? [...u.values()].filter((l) => l).length / e.length * 100 : null, c = I(() => {
1521
+ d === null && f(new Map(s.map((l) => [l, !1])));
1522
+ }, [s, d]), v = I((l) => {
1523
+ f((m) => {
1524
+ const w = new Map(m);
1525
+ return w.set(l, !0), w;
1379
1526
  });
1380
1527
  }, []);
1381
- return Z(() => {
1382
- i === 100 && n();
1383
- }, [i, n]), /* @__PURE__ */ t.jsxs("div", { className: "relative size-full", children: [
1384
- i !== null && i !== 100 && // Add images to DOM to preload them
1385
- /* @__PURE__ */ t.jsx("div", { className: "hidden", children: a.map((c) => /* @__PURE__ */ t.jsx(
1386
- me,
1528
+ return O(() => {
1529
+ d === 100 && n();
1530
+ }, [d, n]), /* @__PURE__ */ t.jsxs("div", { className: "relative size-full", children: [
1531
+ d !== null && d !== 100 && // Add images to DOM to preload them
1532
+ /* @__PURE__ */ t.jsx("div", { className: "hidden", children: s.map((l) => /* @__PURE__ */ t.jsx(
1533
+ he,
1387
1534
  {
1388
- src: c,
1389
- onLoad: () => b(c),
1535
+ src: l,
1536
+ onLoad: () => v(l),
1390
1537
  onError: o
1391
1538
  },
1392
- c
1539
+ l
1393
1540
  )) }),
1394
1541
  /* @__PURE__ */ t.jsx(
1395
- me,
1542
+ he,
1396
1543
  {
1397
1544
  className: "size-full",
1398
- src: a[0],
1545
+ src: s[0],
1399
1546
  onLoad: r
1400
1547
  }
1401
1548
  ),
1402
1549
  /* @__PURE__ */ t.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35", children: [
1403
- /* @__PURE__ */ t.jsx(kt, { className: "size-20 text-primary-light" }),
1404
- /* @__PURE__ */ t.jsx(q, { color: "neutral", shape: "icon", onClick: s, children: /* @__PURE__ */ t.jsx(Fe, { className: "size-full" }) }),
1550
+ /* @__PURE__ */ t.jsx(Tt, { className: "size-20 text-primary-light" }),
1551
+ /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", onClick: c, children: /* @__PURE__ */ t.jsx(Be, { className: "size-full" }) }),
1405
1552
  /* @__PURE__ */ t.jsx(
1406
1553
  "div",
1407
1554
  {
1408
- className: O(
1555
+ className: H(
1409
1556
  "relative h-1 w-3/5 overflow-hidden rounded-full bg-background",
1410
- i === null && "invisible"
1557
+ d === null && "invisible"
1411
1558
  ),
1412
1559
  children: /* @__PURE__ */ t.jsx(
1413
1560
  "div",
1414
1561
  {
1415
1562
  className: "h-full bg-primary transition-[width]",
1416
- style: { width: `${i ?? 0}%` }
1563
+ style: { width: `${d ?? 0}%` }
1417
1564
  }
1418
1565
  )
1419
1566
  }
1420
1567
  )
1421
1568
  ] })
1422
1569
  ] });
1423
- }, yr = (e) => {
1424
- const { itemIndex: r } = e, { setItemInteraction: n } = K(), [o, a] = F();
1425
- return Z(() => {
1570
+ }, Vr = (e) => {
1571
+ const { itemIndex: r } = e, { setItemInteraction: n } = J(), [o, s] = $();
1572
+ return O(() => {
1426
1573
  o === null || o === "error" || n(r, o === "spin" ? "running" : "ready");
1427
1574
  }, [r, n, o]), o === "error" ? /* @__PURE__ */ t.jsx(
1428
- jt,
1575
+ It,
1429
1576
  {
1430
1577
  className: "text-background",
1431
1578
  text: "Spin could not be loaded"
1432
1579
  }
1433
1580
  ) : o !== "spin" ? /* @__PURE__ */ t.jsx(
1434
- br,
1581
+ Sr,
1435
1582
  {
1436
1583
  ...e,
1437
- onPlaceholderImageLoaded: () => a("placeholder"),
1438
- onSpinImagesLoaded: () => a("spin"),
1439
- onError: () => a("error")
1584
+ onPlaceholderImageLoaded: () => s("placeholder"),
1585
+ onSpinImagesLoaded: () => s("spin"),
1586
+ onError: () => s("error")
1440
1587
  }
1441
- ) : /* @__PURE__ */ t.jsx(wr, { ...e });
1442
- }, jr = (e) => /* @__PURE__ */ t.jsx(q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(Fe, { className: "size-full" }) }), Cr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PAUSE", children: /* @__PURE__ */ t.jsx(
1588
+ ) : /* @__PURE__ */ t.jsx(Ir, { ...e });
1589
+ }, Tr = (e) => /* @__PURE__ */ t.jsx(Q, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(Be, { className: "size-full" }) }), Hr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PAUSE", children: /* @__PURE__ */ t.jsx(
1443
1590
  "svg",
1444
1591
  {
1445
1592
  className: e,
@@ -1456,7 +1603,7 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1456
1603
  }
1457
1604
  )
1458
1605
  }
1459
- ) }), kr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME", children: /* @__PURE__ */ t.jsx(
1606
+ ) }), Rr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_VOLUME", children: /* @__PURE__ */ t.jsx(
1460
1607
  "svg",
1461
1608
  {
1462
1609
  className: e,
@@ -1473,7 +1620,7 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1473
1620
  }
1474
1621
  )
1475
1622
  }
1476
- ) }), Nr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME_OFF", children: /* @__PURE__ */ t.jsx(
1623
+ ) }), Ar = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_VOLUME_OFF", children: /* @__PURE__ */ t.jsx(
1477
1624
  "svg",
1478
1625
  {
1479
1626
  className: e,
@@ -1490,135 +1637,135 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1490
1637
  }
1491
1638
  )
1492
1639
  }
1493
- ) }), qe = ({ progress: e }) => /* @__PURE__ */ t.jsx("div", { className: "h-1 w-full overflow-hidden rounded-ui-sm bg-background/25", children: /* @__PURE__ */ t.jsx(
1640
+ ) }), at = ({ progress: e }) => /* @__PURE__ */ t.jsx("div", { className: "h-1 w-full overflow-hidden rounded-ui-sm bg-background/25", children: /* @__PURE__ */ t.jsx(
1494
1641
  "div",
1495
1642
  {
1496
1643
  className: "size-full rounded-ui-sm bg-background transition-transform",
1497
1644
  style: { transform: `translateX(-${100 * (1 - e)}%)` }
1498
1645
  }
1499
- ) }), Er = 3e3, Lr = ({ src: e, poster: r, itemIndex: n }) => {
1500
- const { carrouselItemIndex: o, setItemInteraction: a } = K(), u = Y(null), l = Y(null), i = M(() => {
1501
- if (!l.current)
1646
+ ) }), Pr = 3e3, Or = ({ src: e, poster: r, itemIndex: n }) => {
1647
+ const { carrouselItemIndex: o, setItemInteraction: s } = J(), u = Z(null), f = Z(null), d = I(() => {
1648
+ if (!f.current)
1502
1649
  throw new Error("videoRef.current is null");
1503
- return l.current;
1650
+ return f.current;
1504
1651
  }, []);
1505
- Z(() => {
1506
- a(n, "ready");
1507
- }, [n, a]);
1508
- const s = M(() => {
1509
- i().play();
1510
- }, [i]), b = M(() => {
1511
- i().pause();
1512
- }, [i]);
1513
- Z(() => {
1514
- o === n || b();
1515
- }, [o, n, b]);
1516
- const [c, m] = F(!1), [g, _] = F(!0), w = () => {
1517
- m(!0), a(n, "running");
1652
+ O(() => {
1653
+ s(n, "ready");
1654
+ }, [n, s]);
1655
+ const c = I(() => {
1656
+ d().play();
1657
+ }, [d]), v = I(() => {
1658
+ d().pause();
1659
+ }, [d]);
1660
+ O(() => {
1661
+ o === n || v();
1662
+ }, [o, n, v]);
1663
+ const [l, m] = $(!1), [w, C] = $(!0), a = () => {
1664
+ m(!0), s(n, "running");
1665
+ }, h = () => {
1666
+ m(!1), s(n, "ready");
1518
1667
  }, x = () => {
1519
- m(!1), a(n, "ready");
1520
- }, N = () => {
1521
- _(!1);
1522
- }, C = () => {
1523
- _(!0);
1524
- }, [z, f] = F(null), p = (d) => {
1525
- const y = i(), k = d.currentTarget.getBoundingClientRect(), A = (d.clientX - k.left) / k.width, D = Math.min(1, Math.max(0, A));
1526
- y.volume = D, y.muted = !1;
1527
- }, v = (d) => {
1528
- const y = i();
1529
- y.muted = d;
1668
+ C(!1);
1669
+ }, j = () => {
1670
+ C(!0);
1671
+ }, [k, g] = $(null), p = (i) => {
1672
+ const _ = d(), M = i.currentTarget.getBoundingClientRect(), A = (i.clientX - M.left) / M.width, F = Math.min(1, Math.max(0, A));
1673
+ _.volume = F, _.muted = !1;
1674
+ }, b = (i) => {
1675
+ const _ = d();
1676
+ _.muted = i;
1530
1677
  };
1531
- Z(() => {
1532
- const d = l.current;
1533
- if (!d)
1678
+ O(() => {
1679
+ const i = f.current;
1680
+ if (!i)
1534
1681
  return;
1535
- const y = () => {
1536
- f({
1537
- volume: d.volume,
1538
- isMuted: d.muted
1682
+ const _ = () => {
1683
+ g({
1684
+ volume: i.volume,
1685
+ isMuted: i.muted
1539
1686
  });
1540
1687
  };
1541
- return y(), d.addEventListener("volumechange", y), () => {
1542
- d.removeEventListener("volumechange", y);
1688
+ return _(), i.addEventListener("volumechange", _), () => {
1689
+ i.removeEventListener("volumechange", _);
1543
1690
  };
1544
1691
  }, []);
1545
- const [j, S] = F(null), R = j ? j.currentTime / j.duration : 0;
1546
- Z(() => {
1547
- const d = l.current;
1548
- if (!d) return;
1549
- const y = () => {
1550
- const k = d.currentTime, A = d.duration;
1551
- isNaN(k) || isNaN(A) || S({
1552
- currentTime: k,
1692
+ const [E, L] = $(null), D = E ? E.currentTime / E.duration : 0;
1693
+ O(() => {
1694
+ const i = f.current;
1695
+ if (!i) return;
1696
+ const _ = () => {
1697
+ const M = i.currentTime, A = i.duration;
1698
+ isNaN(M) || isNaN(A) || L({
1699
+ currentTime: M,
1553
1700
  duration: A
1554
1701
  });
1555
1702
  };
1556
- return y(), d.addEventListener("timeupdate", y), () => {
1557
- d.removeEventListener("timeupdate", y);
1703
+ return _(), i.addEventListener("timeupdate", _), () => {
1704
+ i.removeEventListener("timeupdate", _);
1558
1705
  };
1559
1706
  }, []);
1560
- const V = (d) => {
1561
- const y = i(), k = d.currentTarget.getBoundingClientRect(), A = (d.clientX - k.left) / k.width, D = y.duration * A;
1562
- y.currentTime = D;
1563
- }, E = (d) => {
1564
- const y = Math.floor(d % 3600 / 60), k = Math.floor(d % 60);
1565
- return `${y}:${k.toString().padStart(2, "0")}`;
1566
- }, [L, I] = F(!1), H = Y(void 0), h = M(
1567
- () => clearTimeout(H.current),
1707
+ const T = (i) => {
1708
+ const _ = d(), M = i.currentTarget.getBoundingClientRect(), A = (i.clientX - M.left) / M.width, F = _.duration * A;
1709
+ _.currentTime = F;
1710
+ }, N = (i) => {
1711
+ const _ = Math.floor(i % 3600 / 60), M = Math.floor(i % 60);
1712
+ return `${_}:${M.toString().padStart(2, "0")}`;
1713
+ }, [z, S] = $(!1), V = Z(void 0), R = I(
1714
+ () => clearTimeout(V.current),
1568
1715
  []
1569
- ), T = M(() => {
1570
- h(), H.current = setTimeout(() => {
1571
- I(!1);
1572
- }, Er);
1573
- }, [h]);
1574
- return Z(() => {
1575
- const d = u.current, y = l.current;
1576
- if (!d || !y)
1716
+ ), y = I(() => {
1717
+ R(), V.current = setTimeout(() => {
1718
+ S(!1);
1719
+ }, Pr);
1720
+ }, [R]);
1721
+ return O(() => {
1722
+ const i = u.current, _ = f.current;
1723
+ if (!i || !_)
1577
1724
  return;
1578
- const k = () => {
1579
- T(), I(!0);
1725
+ const M = () => {
1726
+ y(), S(!0);
1580
1727
  }, A = () => {
1581
- h(), I(!1);
1728
+ R(), S(!1);
1582
1729
  };
1583
- let D = !1;
1584
- const $ = () => {
1585
- D = !0;
1730
+ let F = !1;
1731
+ const U = () => {
1732
+ F = !0;
1586
1733
  }, W = () => {
1587
- D && (D = !1, b());
1588
- }, X = () => {
1589
- D = !1, k();
1590
- }, B = (G) => {
1591
- G.preventDefault(), G.touches.length === 1 && (T(), I((Q) => !Q));
1734
+ F && (F = !1, v());
1735
+ }, Y = () => {
1736
+ F = !1, M();
1737
+ }, q = (ee) => {
1738
+ ee.preventDefault(), ee.touches.length === 1 && (y(), S((fe) => !fe));
1592
1739
  };
1593
- return d.addEventListener("mousedown", $), d.addEventListener("mouseup", W), d.addEventListener("mouseenter", k), d.addEventListener("mousemove", X), d.addEventListener("mouseleave", A), y.addEventListener("touchstart", B), () => {
1594
- d.removeEventListener("mousedown", $), d.removeEventListener("mouseup", W), d.removeEventListener("mouseenter", k), d.removeEventListener("mousemove", k), d.removeEventListener("mouseleave", A), y.removeEventListener("touchstart", B);
1740
+ return i.addEventListener("mousedown", U), i.addEventListener("mouseup", W), i.addEventListener("mouseenter", M), i.addEventListener("mousemove", Y), i.addEventListener("mouseleave", A), _.addEventListener("touchstart", q), () => {
1741
+ i.removeEventListener("mousedown", U), i.removeEventListener("mouseup", W), i.removeEventListener("mouseenter", M), i.removeEventListener("mousemove", M), i.removeEventListener("mouseleave", A), _.removeEventListener("touchstart", q);
1595
1742
  };
1596
- }, [h, b, T]), /* @__PURE__ */ t.jsxs("div", { ref: u, className: "relative size-full", children: [
1743
+ }, [R, v, y]), /* @__PURE__ */ t.jsxs("div", { ref: u, className: "relative size-full", children: [
1597
1744
  /* @__PURE__ */ t.jsx(
1598
1745
  "video",
1599
1746
  {
1600
- ref: l,
1747
+ ref: f,
1601
1748
  className: "size-full",
1602
1749
  src: e,
1603
1750
  poster: r,
1604
1751
  disablePictureInPicture: !0,
1605
1752
  playsInline: !0,
1606
- onPlay: w,
1607
- onPause: x,
1608
- onEnded: x,
1609
- onCanPlay: N,
1610
- onWaiting: C
1753
+ onPlay: a,
1754
+ onPause: h,
1755
+ onEnded: h,
1756
+ onCanPlay: x,
1757
+ onWaiting: j
1611
1758
  }
1612
1759
  ),
1613
- c ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1760
+ l ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1614
1761
  /* @__PURE__ */ t.jsxs(
1615
1762
  "div",
1616
1763
  {
1617
- className: O(
1764
+ className: H(
1618
1765
  "absolute inset-x-0 bottom-0 cursor-auto space-y-2 bg-gradient-to-t from-foreground to-transparent p-4 pr-12 pt-8 transition-opacity duration-300",
1619
- L ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
1766
+ z ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
1620
1767
  ),
1621
- onMouseDownCapture: (d) => d.stopPropagation(),
1768
+ onMouseDownCapture: (i) => i.stopPropagation(),
1622
1769
  children: [
1623
1770
  /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-background", children: [
1624
1771
  /* @__PURE__ */ t.jsxs(
@@ -1627,25 +1774,25 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1627
1774
  className: "flex items-center gap-x-4",
1628
1775
  children: [
1629
1776
  /* @__PURE__ */ t.jsx(
1630
- q,
1777
+ Q,
1631
1778
  {
1632
1779
  shape: "icon",
1633
1780
  variant: "ghost",
1634
1781
  color: "neutral",
1635
- onClick: b,
1636
- children: /* @__PURE__ */ t.jsx(Cr, { className: "size-full" })
1782
+ onClick: v,
1783
+ children: /* @__PURE__ */ t.jsx(Hr, { className: "size-full" })
1637
1784
  }
1638
1785
  ),
1639
- j && /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
1640
- E(j.currentTime),
1786
+ E && /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
1787
+ N(E.currentTime),
1641
1788
  " /",
1642
1789
  " ",
1643
- E(j.duration)
1790
+ N(E.duration)
1644
1791
  ] })
1645
1792
  ]
1646
1793
  }
1647
1794
  ),
1648
- z && /* @__PURE__ */ t.jsxs(
1795
+ k && /* @__PURE__ */ t.jsxs(
1649
1796
  "div",
1650
1797
  {
1651
1798
  className: "group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",
@@ -1653,17 +1800,17 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1653
1800
  /* @__PURE__ */ t.jsx(
1654
1801
  "div",
1655
1802
  {
1656
- className: `w-12 cursor-pointer py-1 opacity-0 transition-opacity ${z.isMuted ? "group-hover/volume:opacity-50" : "group-hover/volume:opacity-100"}`,
1803
+ className: `w-12 cursor-pointer py-1 opacity-0 transition-opacity ${k.isMuted ? "group-hover/volume:opacity-50" : "group-hover/volume:opacity-100"}`,
1657
1804
  onClick: p,
1658
- children: /* @__PURE__ */ t.jsx(qe, { progress: z.volume })
1805
+ children: /* @__PURE__ */ t.jsx(at, { progress: k.volume })
1659
1806
  }
1660
1807
  ),
1661
1808
  /* @__PURE__ */ t.jsx(
1662
1809
  "div",
1663
1810
  {
1664
1811
  className: "size-5 cursor-pointer",
1665
- onClick: () => v(!z.isMuted),
1666
- children: z.isMuted ? /* @__PURE__ */ t.jsx(Nr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(kr, { className: "size-full" })
1812
+ onClick: () => b(!k.isMuted),
1813
+ children: k.isMuted ? /* @__PURE__ */ t.jsx(Ar, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Rr, { className: "size-full" })
1667
1814
  }
1668
1815
  )
1669
1816
  ]
@@ -1674,57 +1821,47 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1674
1821
  "div",
1675
1822
  {
1676
1823
  className: "cursor-pointer py-1",
1677
- onClick: V,
1678
- children: /* @__PURE__ */ t.jsx(qe, { progress: R })
1824
+ onClick: T,
1825
+ children: /* @__PURE__ */ t.jsx(at, { progress: D })
1679
1826
  }
1680
1827
  )
1681
1828
  ]
1682
1829
  }
1683
1830
  ),
1684
- g && /* @__PURE__ */ t.jsx(
1831
+ w && /* @__PURE__ */ t.jsx(
1685
1832
  "div",
1686
1833
  {
1687
1834
  className: "pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",
1688
- children: /* @__PURE__ */ t.jsx(Ct, { size: "lg", color: "background" })
1835
+ children: /* @__PURE__ */ t.jsx(St, { size: "lg", color: "background" })
1689
1836
  }
1690
1837
  )
1691
1838
  ] }) : /* @__PURE__ */ t.jsx(
1692
1839
  "div",
1693
1840
  {
1694
1841
  className: "absolute inset-0 flex items-center justify-center bg-foreground/25",
1695
- children: /* @__PURE__ */ t.jsx(jr, { onClick: s })
1842
+ children: /* @__PURE__ */ t.jsx(Tr, { onClick: c })
1696
1843
  }
1697
1844
  )
1698
1845
  ] });
1699
- }, _r = ({ index: e, item: r, isShown: n, lazy: o }) => {
1700
- const { type: a } = r;
1701
- let u;
1702
- if (o)
1703
- u = null;
1704
- else {
1705
- switch (a) {
1706
- case "image":
1707
- u = /* @__PURE__ */ t.jsx(_t, { itemIndex: e, onlyPreload: !n, ...r });
1708
- break;
1709
- case "video":
1710
- u = /* @__PURE__ */ t.jsx(Lr, { itemIndex: e, ...r });
1711
- break;
1712
- case "360":
1713
- u = /* @__PURE__ */ t.jsx(
1714
- yr,
1715
- {
1716
- itemIndex: e,
1717
- onlyPreload: !n,
1718
- ...r
1719
- }
1720
- );
1721
- break;
1722
- }
1723
- u = /* @__PURE__ */ t.jsx("div", { className: O("-ml-px h-full w-[calc(100%+2px)]"), children: u });
1846
+ }, Dr = ({ index: e, item: r, isShown: n }) => {
1847
+ const { type: o } = r;
1848
+ let s;
1849
+ switch (o) {
1850
+ case "image":
1851
+ s = /* @__PURE__ */ t.jsx(Pt, { itemIndex: e, onlyPreload: !n, ...r });
1852
+ break;
1853
+ case "video":
1854
+ s = /* @__PURE__ */ t.jsx(Or, { itemIndex: e, ...r });
1855
+ break;
1856
+ case "360":
1857
+ s = /* @__PURE__ */ t.jsx(Vr, { itemIndex: e, onlyPreload: !n, ...r });
1858
+ break;
1859
+ case "custom":
1860
+ s = /* @__PURE__ */ t.jsx(Nr, { itemIndex: e, ...r });
1724
1861
  }
1725
- return u;
1726
- }, zr = (e) => {
1727
- Z(() => {
1862
+ return s = /* @__PURE__ */ t.jsx("div", { className: "-ml-px h-full w-[calc(100%+2px)]", children: s }), s;
1863
+ }, Fr = (e) => {
1864
+ O(() => {
1728
1865
  const r = (n) => {
1729
1866
  n.key === "Escape" && e();
1730
1867
  };
@@ -1733,32 +1870,32 @@ const wt = _e(null), bt = () => ze(wt), De = () => {
1733
1870
  };
1734
1871
  }, [e]);
1735
1872
  };
1736
- function Ir(e) {
1873
+ function $r(e) {
1737
1874
  return e.target === e.currentTarget;
1738
1875
  }
1739
- const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", { className: "space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm", children: [
1876
+ const Zr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", { className: "space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm", children: [
1740
1877
  /* @__PURE__ */ t.jsx("span", { children: e + 1 }),
1741
1878
  /* @__PURE__ */ t.jsx("span", { children: "/" }),
1742
1879
  /* @__PURE__ */ t.jsx("span", { children: r + 1 })
1743
- ] }), Ke = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1880
+ ] }), it = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1744
1881
  "path",
1745
1882
  {
1746
1883
  d: "M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",
1747
1884
  fill: "currentColor"
1748
1885
  }
1749
- ) }) }), Sr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_EXTEND", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1886
+ ) }) }), Ur = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_EXTEND", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1750
1887
  "path",
1751
1888
  {
1752
1889
  d: "M4.66683 9.3335H3.3335V12.6668H6.66683V11.3335H4.66683V9.3335ZM3.3335 6.66683H4.66683V4.66683H6.66683V3.3335H3.3335V6.66683ZM11.3335 11.3335H9.3335V12.6668H12.6668V9.3335H11.3335V11.3335ZM9.3335 3.3335V4.66683H11.3335V6.66683H12.6668V3.3335H9.3335Z",
1753
1890
  fill: "currentColor"
1754
1891
  }
1755
- ) }) }), Vr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_GALLERY", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1892
+ ) }) }), Wr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_GALLERY", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1756
1893
  "path",
1757
1894
  {
1758
1895
  d: "M13.3334 2.66683V10.6668H5.33337V2.66683H13.3334ZM13.3334 1.3335H5.33337C4.60004 1.3335 4.00004 1.9335 4.00004 2.66683V10.6668C4.00004 11.4002 4.60004 12.0002 5.33337 12.0002H13.3334C14.0667 12.0002 14.6667 11.4002 14.6667 10.6668V2.66683C14.6667 1.9335 14.0667 1.3335 13.3334 1.3335ZM7.66671 7.78016L8.79337 9.28683L10.4467 7.22016L12.6667 10.0002H6.00004L7.66671 7.78016ZM1.33337 4.00016V13.3335C1.33337 14.0668 1.93337 14.6668 2.66671 14.6668H12V13.3335H2.66671V4.00016H1.33337Z",
1759
1896
  fill: "currentColor"
1760
1897
  }
1761
- ) }) }), Tr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_HOTSPOTS", children: /* @__PURE__ */ t.jsxs(
1898
+ ) }) }), Yr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_HOTSPOTS", children: /* @__PURE__ */ t.jsxs(
1762
1899
  "svg",
1763
1900
  {
1764
1901
  className: e,
@@ -1778,7 +1915,7 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1778
1915
  /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_418_982", children: /* @__PURE__ */ t.jsx("rect", { width: "12", height: "12", fill: "white" }) }) })
1779
1916
  ]
1780
1917
  }
1781
- ) }), Hr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_MINUS", children: /* @__PURE__ */ t.jsx(
1918
+ ) }), Xr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_MINUS", children: /* @__PURE__ */ t.jsx(
1782
1919
  "svg",
1783
1920
  {
1784
1921
  className: e,
@@ -1795,7 +1932,7 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1795
1932
  }
1796
1933
  )
1797
1934
  }
1798
- ) }), Or = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLUS", children: /* @__PURE__ */ t.jsx(
1935
+ ) }), Br = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_PLUS", children: /* @__PURE__ */ t.jsx(
1799
1936
  "svg",
1800
1937
  {
1801
1938
  className: e,
@@ -1812,22 +1949,22 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1812
1949
  }
1813
1950
  )
1814
1951
  }
1815
- ) }), Rr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_REDUCE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1952
+ ) }), Gr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_REDUCE", children: /* @__PURE__ */ t.jsx("svg", { className: e, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ t.jsx(
1816
1953
  "path",
1817
1954
  {
1818
1955
  d: "M3.33325 10.6668H5.33325V12.6668H6.66659V9.3335H3.33325V10.6668ZM5.33325 5.3335H3.33325V6.66683H6.66659V3.3335H5.33325V5.3335ZM9.33325 12.6668H10.6666V10.6668H12.6666V9.3335H9.33325V12.6668ZM10.6666 5.3335V3.3335H9.33325V6.66683H12.6666V5.3335H10.6666Z",
1819
1956
  fill: "currentColor"
1820
1957
  }
1821
- ) }) }), Pr = ({
1958
+ ) }) }), Kr = ({
1822
1959
  enabled: e,
1823
1960
  onToggle: r,
1824
1961
  label: n,
1825
1962
  className: o,
1826
- children: a
1963
+ children: s
1827
1964
  }) => /* @__PURE__ */ t.jsxs(
1828
1965
  "label",
1829
1966
  {
1830
- className: O(
1967
+ className: H(
1831
1968
  "flex cursor-pointer items-center justify-center gap-x-2",
1832
1969
  o
1833
1970
  ),
@@ -1845,25 +1982,25 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1845
1982
  /* @__PURE__ */ t.jsx(
1846
1983
  "div",
1847
1984
  {
1848
- className: O(
1985
+ className: H(
1849
1986
  "flex h-5 w-8 items-center justify-center rounded-full transition-colors",
1850
1987
  e ? "bg-primary" : "bg-background/60"
1851
1988
  ),
1852
1989
  children: /* @__PURE__ */ t.jsx(
1853
1990
  "div",
1854
1991
  {
1855
- className: O(
1992
+ className: H(
1856
1993
  "flex size-4 items-center justify-center rounded-full p-0.5 transition",
1857
1994
  e ? "translate-x-1.5 bg-primary-foreground text-primary" : "-translate-x-1.5 bg-background text-foreground"
1858
1995
  ),
1859
- children: a
1996
+ children: s
1860
1997
  }
1861
1998
  )
1862
1999
  }
1863
2000
  )
1864
2001
  ]
1865
2002
  }
1866
- ), Zr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_BURGER", children: /* @__PURE__ */ t.jsx(
2003
+ ), qr = ({ className: e }) => /* @__PURE__ */ t.jsx(G, { className: e, customizationKey: "UI_BURGER", children: /* @__PURE__ */ t.jsx(
1867
2004
  "svg",
1868
2005
  {
1869
2006
  className: e,
@@ -1880,51 +2017,51 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1880
2017
  }
1881
2018
  )
1882
2019
  }
1883
- ) }), Ar = ({ sharedClassName: e }) => {
1884
- const { categories: r } = ne(), { displayedCategoryId: n, changeCategory: o } = K(), [a, u] = F(!1), l = () => {
1885
- u(!a);
1886
- }, i = () => {
2020
+ ) }), Jr = ({ sharedClassName: e }) => {
2021
+ const { categories: r } = oe(), { displayedCategoryId: n, changeCategory: o } = J(), [s, u] = $(!1), f = () => {
2022
+ u(!s);
2023
+ }, d = () => {
1887
2024
  u(!1);
1888
2025
  };
1889
2026
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1890
- a && /* @__PURE__ */ t.jsx(
2027
+ s && /* @__PURE__ */ t.jsx(
1891
2028
  "div",
1892
2029
  {
1893
- className: O(e, "inset-0 small:hidden"),
1894
- onClick: i
2030
+ className: H(e, "inset-0 small:hidden"),
2031
+ onClick: d
1895
2032
  }
1896
2033
  ),
1897
2034
  /* @__PURE__ */ t.jsxs(
1898
2035
  "div",
1899
2036
  {
1900
- className: O(
2037
+ className: H(
1901
2038
  e,
1902
- ue("top-left"),
2039
+ pe("top-left"),
1903
2040
  "flex gap-x-2 small:hidden"
1904
2041
  ),
1905
2042
  children: [
1906
2043
  /* @__PURE__ */ t.jsx(
1907
- q,
2044
+ Q,
1908
2045
  {
1909
2046
  shape: "icon",
1910
- color: a ? "primary" : "neutral",
1911
- onClick: l,
1912
- children: /* @__PURE__ */ t.jsx(Zr, {})
2047
+ color: s ? "primary" : "neutral",
2048
+ onClick: f,
2049
+ children: /* @__PURE__ */ t.jsx(qr, {})
1913
2050
  }
1914
2051
  ),
1915
- a && /* @__PURE__ */ t.jsx("div", { className: "rounded-ui-md bg-background transition-radius", children: /* @__PURE__ */ t.jsx("ul", { className: "space-y-0.5 p-1", children: r.map(({ id: s, title: b }) => /* @__PURE__ */ t.jsx(
2052
+ s && /* @__PURE__ */ t.jsx("div", { className: "rounded-ui-md bg-background transition-radius", children: /* @__PURE__ */ t.jsx("ul", { className: "space-y-0.5 p-1", children: r.map(({ id: c, title: v }) => /* @__PURE__ */ t.jsx(
1916
2053
  "li",
1917
2054
  {
1918
- className: O(
2055
+ className: H(
1919
2056
  "cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",
1920
- s === n && "bg-primary/50"
2057
+ c === n && "bg-primary/50"
1921
2058
  ),
1922
2059
  onClick: () => {
1923
- o(s), u(!1);
2060
+ o(c), u(!1);
1924
2061
  },
1925
- children: b
2062
+ children: v
1926
2063
  },
1927
- s
2064
+ c
1928
2065
  )) }) })
1929
2066
  ]
1930
2067
  }
@@ -1932,136 +2069,134 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
1932
2069
  /* @__PURE__ */ t.jsx(
1933
2070
  "div",
1934
2071
  {
1935
- className: O(
2072
+ className: H(
1936
2073
  e,
1937
- vt("top"),
2074
+ Mt("top"),
1938
2075
  "w-full overflow-x-auto max-small:hidden"
1939
2076
  ),
1940
- children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow", children: r.map(({ id: s, title: b }) => /* @__PURE__ */ t.jsx(
1941
- q,
2077
+ children: /* @__PURE__ */ t.jsx("div", { className: "mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow", children: r.map(({ id: c, title: v }) => /* @__PURE__ */ t.jsx(
2078
+ Q,
1942
2079
  {
1943
- variant: s === n ? "fill" : "ghost",
1944
- onClick: () => o(s),
1945
- children: b
2080
+ variant: c === n ? "fill" : "ghost",
2081
+ onClick: () => o(c),
2082
+ children: v
1946
2083
  },
1947
- s
2084
+ c
1948
2085
  )) })
1949
2086
  }
1950
2087
  )
1951
2088
  ] });
1952
- }, Dr = () => {
1953
- const { hideCategories: e, infiniteCarrousel: r, permanentGallery: n } = J(), {
1954
- items: { length: o },
1955
- aspectRatioStyle: a
1956
- } = ne(), {
2089
+ }, Qr = () => {
2090
+ const { hideCategories: e, infiniteCarrousel: r, permanentGallery: n } = re(), { aspectRatioStyle: o } = oe(), {
2091
+ items: { length: s },
1957
2092
  slidable: u,
1958
- carrouselItemIndex: l,
1959
- masterItemIndex: i,
1960
- prevItem: s,
1961
- nextItem: b,
1962
- showGalleryControls: c,
2093
+ carrouselItemIndex: f,
2094
+ masterItemIndex: d,
2095
+ prevItem: c,
2096
+ nextItem: v,
2097
+ showGalleryControls: l,
1963
2098
  enableHotspotsControl: m,
1964
- showHotspots: g,
1965
- toggleHotspots: _,
1966
- showGallery: w,
1967
- toggleGallery: x,
1968
- extendMode: N,
1969
- toggleExtendMode: C,
1970
- shownDetails: z,
1971
- isShowingDetails: f,
2099
+ showHotspots: w,
2100
+ toggleHotspots: C,
2101
+ showGallery: a,
2102
+ toggleGallery: h,
2103
+ extendMode: x,
2104
+ toggleExtendMode: j,
2105
+ shownDetails: k,
2106
+ isShowingDetails: g,
1972
2107
  resetShownDetails: p,
1973
- showZoomControls: v,
1974
- isZooming: j,
1975
- canZoomIn: S,
1976
- zoomIn: R,
1977
- canZoomOut: V,
1978
- zoomOut: E,
1979
- resetView: L
1980
- } = K(), I = M(
1981
- (h) => {
1982
- Ir(h) && p();
2108
+ showZoomControls: b,
2109
+ isZooming: E,
2110
+ canZoomIn: L,
2111
+ zoomIn: D,
2112
+ canZoomOut: T,
2113
+ zoomOut: N,
2114
+ resetView: z
2115
+ } = J(), S = I(
2116
+ (R) => {
2117
+ $r(R) && p();
1983
2118
  },
1984
2119
  [p]
1985
2120
  );
1986
- zr(p);
1987
- const H = "absolute z-overlay";
2121
+ Fr(p);
2122
+ const V = "absolute z-overlay";
1988
2123
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1989
2124
  !e && /* @__PURE__ */ t.jsx(
1990
- Ar,
2125
+ Jr,
1991
2126
  {
1992
- sharedClassName: O(
1993
- H,
2127
+ sharedClassName: H(
2128
+ V,
1994
2129
  "transition-opacity",
1995
- j ? "!pointer-events-none opacity-0" : "opacity-100"
2130
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
1996
2131
  )
1997
2132
  }
1998
2133
  ),
1999
- u && !j && /* @__PURE__ */ t.jsx("div", { className: O(H, ue("top-right")), children: /* @__PURE__ */ t.jsx(
2000
- Mr,
2134
+ u && !E && /* @__PURE__ */ t.jsx("div", { className: H(V, pe("top-right")), children: /* @__PURE__ */ t.jsx(
2135
+ Zr,
2001
2136
  {
2002
- currentIndex: l,
2003
- maxIndex: o - 1
2137
+ currentIndex: f,
2138
+ maxIndex: s - 1
2004
2139
  }
2005
2140
  ) }),
2006
2141
  u && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2007
2142
  /* @__PURE__ */ t.jsx(
2008
- q,
2143
+ Q,
2009
2144
  {
2010
2145
  shape: "icon",
2011
2146
  color: "neutral",
2012
- className: O(
2013
- H,
2014
- ue("middle-left"),
2015
- j ? "!pointer-events-none opacity-0" : "opacity-100"
2147
+ className: H(
2148
+ V,
2149
+ pe("middle-left"),
2150
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2016
2151
  ),
2017
- onClick: s,
2018
- disabled: !r && i <= 0,
2019
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_LEFT", children: /* @__PURE__ */ t.jsx(Ke, { className: "size-full rotate-180" }) })
2152
+ onClick: c,
2153
+ disabled: !r && d <= 0,
2154
+ children: /* @__PURE__ */ t.jsx(G, { customizationKey: "CONTROLS_PREV", children: /* @__PURE__ */ t.jsx(it, { className: "size-full -scale-x-100" }) })
2020
2155
  }
2021
2156
  ),
2022
2157
  /* @__PURE__ */ t.jsx(
2023
- q,
2158
+ Q,
2024
2159
  {
2025
2160
  shape: "icon",
2026
2161
  color: "neutral",
2027
- className: O(
2028
- H,
2029
- ue("middle-right"),
2030
- j ? "!pointer-events-none opacity-0" : "opacity-100"
2162
+ className: H(
2163
+ V,
2164
+ pe("middle-right"),
2165
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2031
2166
  ),
2032
- onClick: b,
2033
- disabled: !r && i >= o - 1,
2034
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx(Ke, { className: "size-full" }) })
2167
+ onClick: v,
2168
+ disabled: !r && d >= s - 1,
2169
+ children: /* @__PURE__ */ t.jsx(G, { customizationKey: "CONTROLS_NEXT", children: /* @__PURE__ */ t.jsx(it, { className: "size-full" }) })
2035
2170
  }
2036
2171
  )
2037
2172
  ] }),
2038
2173
  /* @__PURE__ */ t.jsxs(
2039
2174
  "div",
2040
2175
  {
2041
- className: O(
2042
- H,
2043
- ue("bottom-fullW"),
2176
+ className: H(
2177
+ V,
2178
+ pe("bottom-fullW"),
2044
2179
  "pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"
2045
2180
  ),
2046
2181
  children: [
2047
2182
  !n && u && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2048
2183
  /* @__PURE__ */ t.jsx(
2049
- q,
2184
+ Q,
2050
2185
  {
2051
- className: c && !j ? "opacity-100" : "!pointer-events-none opacity-0",
2186
+ className: l && !E ? "opacity-100" : "!pointer-events-none opacity-0",
2052
2187
  variant: "fill",
2053
- color: w ? "primary" : "neutral",
2188
+ color: a ? "primary" : "neutral",
2054
2189
  shape: "icon",
2055
- onClick: x,
2056
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_GALLERY", children: /* @__PURE__ */ t.jsx(Vr, { className: "size-full" }) })
2190
+ onClick: h,
2191
+ children: /* @__PURE__ */ t.jsx(Wr, { className: "size-full" })
2057
2192
  }
2058
2193
  ),
2059
- w && /* @__PURE__ */ t.jsx(
2060
- Et,
2194
+ a && /* @__PURE__ */ t.jsx(
2195
+ Rt,
2061
2196
  {
2062
- className: O(
2197
+ className: H(
2063
2198
  "transition-opacity",
2064
- c && !j ? "opacity-100" : "!pointer-events-none opacity-0",
2199
+ l && !E ? "opacity-100" : "!pointer-events-none opacity-0",
2065
2200
  // Left & Right gradient mask to fade the gallery
2066
2201
  "[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"
2067
2202
  ),
@@ -2071,50 +2206,50 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2071
2206
  ] }),
2072
2207
  /* @__PURE__ */ t.jsxs("div", { className: "col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2", children: [
2073
2208
  m && /* @__PURE__ */ t.jsx(
2074
- Pr,
2209
+ Kr,
2075
2210
  {
2076
- className: O(
2211
+ className: H(
2077
2212
  "transition-opacity",
2078
- j ? "!pointer-events-none opacity-0" : "opacity-100"
2213
+ E ? "!pointer-events-none opacity-0" : "opacity-100"
2079
2214
  ),
2080
- enabled: g,
2081
- onToggle: _,
2082
- children: /* @__PURE__ */ t.jsx(Tr, { className: "size-full" })
2215
+ enabled: w,
2216
+ onToggle: C,
2217
+ children: /* @__PURE__ */ t.jsx(Yr, { className: "size-full" })
2083
2218
  }
2084
2219
  ),
2085
- v && /* @__PURE__ */ t.jsxs("div", { className: "max-small:hidden", children: [
2220
+ b && /* @__PURE__ */ t.jsxs("div", { className: "max-small:hidden", children: [
2086
2221
  /* @__PURE__ */ t.jsx(
2087
- q,
2222
+ Q,
2088
2223
  {
2089
2224
  className: "rounded-b-none",
2090
2225
  color: "neutral",
2091
2226
  shape: "icon",
2092
- disabled: !S,
2093
- onClick: R,
2094
- children: /* @__PURE__ */ t.jsx(Or, { className: "size-full" })
2227
+ disabled: !L,
2228
+ onClick: D,
2229
+ children: /* @__PURE__ */ t.jsx(Br, { className: "size-full" })
2095
2230
  }
2096
2231
  ),
2097
- /* @__PURE__ */ t.jsx(Nt, { color: "background" }),
2232
+ /* @__PURE__ */ t.jsx(Ht, { color: "background" }),
2098
2233
  /* @__PURE__ */ t.jsx(
2099
- q,
2234
+ Q,
2100
2235
  {
2101
2236
  className: "rounded-t-none",
2102
2237
  color: "neutral",
2103
2238
  shape: "icon",
2104
- disabled: !V,
2105
- onClick: E,
2106
- children: /* @__PURE__ */ t.jsx(Hr, { className: "size-full" })
2239
+ disabled: !T,
2240
+ onClick: N,
2241
+ children: /* @__PURE__ */ t.jsx(Xr, { className: "size-full" })
2107
2242
  }
2108
2243
  )
2109
2244
  ] }),
2110
2245
  /* @__PURE__ */ t.jsx(
2111
- q,
2246
+ Q,
2112
2247
  {
2113
2248
  variant: "fill",
2114
- color: N ? "primary" : "neutral",
2249
+ color: x ? "primary" : "neutral",
2115
2250
  shape: "icon",
2116
- onClick: C,
2117
- children: N ? /* @__PURE__ */ t.jsx(Rr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Sr, { className: "size-full" })
2251
+ onClick: j,
2252
+ children: x ? /* @__PURE__ */ t.jsx(Gr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Ur, { className: "size-full" })
2118
2253
  }
2119
2254
  )
2120
2255
  ] })
@@ -2124,55 +2259,55 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2124
2259
  /* @__PURE__ */ t.jsx(
2125
2260
  "div",
2126
2261
  {
2127
- className: O(
2128
- H,
2262
+ className: H(
2263
+ V,
2129
2264
  "inset-0 flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",
2130
- f ? "opacity-100" : "pointer-events-none opacity-0"
2265
+ g ? "opacity-100" : "pointer-events-none opacity-0"
2131
2266
  ),
2132
- onClick: I,
2267
+ onClick: S,
2133
2268
  children: /* @__PURE__ */ t.jsx(
2134
2269
  "div",
2135
2270
  {
2136
- className: O(
2271
+ className: H(
2137
2272
  "h-full w-3/5 bg-background transition-transform duration-details",
2138
- f ? "translate-x-0" : "translate-x-full"
2273
+ g ? "translate-x-0" : "translate-x-full"
2139
2274
  ),
2140
- children: !!z && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2275
+ children: !!k && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2141
2276
  /* @__PURE__ */ t.jsx(
2142
- me,
2277
+ he,
2143
2278
  {
2144
2279
  className: "w-full bg-foreground/65",
2145
- style: a,
2146
- src: z.src,
2280
+ style: o,
2281
+ src: k.src,
2147
2282
  imgInPlayerWidthRatio: 0.6
2148
2283
  }
2149
2284
  ),
2150
2285
  /* @__PURE__ */ t.jsxs(
2151
2286
  "div",
2152
2287
  {
2153
- className: O(
2288
+ className: H(
2154
2289
  "space-y-1 px-2 py-1 small:p-3",
2155
- N && "large:p-4"
2290
+ x && "large:p-4"
2156
2291
  ),
2157
2292
  children: [
2158
- z.title && /* @__PURE__ */ t.jsx(
2293
+ k.title && /* @__PURE__ */ t.jsx(
2159
2294
  "span",
2160
2295
  {
2161
- className: O(
2296
+ className: H(
2162
2297
  "text-sm font-semibold small:text-base small:font-bold",
2163
- N && "large:text-lg"
2298
+ x && "large:text-lg"
2164
2299
  ),
2165
- children: z.title
2300
+ children: k.title
2166
2301
  }
2167
2302
  ),
2168
- z.text && /* @__PURE__ */ t.jsx(
2303
+ k.text && /* @__PURE__ */ t.jsx(
2169
2304
  "p",
2170
2305
  {
2171
- className: O(
2306
+ className: H(
2172
2307
  "text-xs text-foreground/65 small:text-sm",
2173
- N && "large:text-base"
2308
+ x && "large:text-base"
2174
2309
  ),
2175
- children: z.text
2310
+ children: k.text
2176
2311
  }
2177
2312
  )
2178
2313
  ]
@@ -2183,422 +2318,433 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2183
2318
  )
2184
2319
  }
2185
2320
  ),
2186
- (j || f) && /* @__PURE__ */ t.jsx(
2187
- yt,
2321
+ (E || g) && /* @__PURE__ */ t.jsx(
2322
+ zt,
2188
2323
  {
2189
- className: O(H, ue("top-right")),
2190
- onClick: L
2324
+ className: H(V, pe("top-right")),
2325
+ onClick: z
2191
2326
  }
2192
2327
  )
2193
2328
  ] });
2194
- }, Fr = ({ className: e = "" }) => {
2195
- const { infiniteCarrousel: r, isFullScreen: n } = J(), { items: o, aspectRatioStyle: a } = ne(), {
2196
- slidable: u,
2197
- carrouselItemIndex: l,
2198
- setCarrouselItemIndex: i,
2199
- itemIndexCommand: s,
2200
- setItemIndexCommand: b,
2201
- specialCommand: c,
2202
- isRunningSpecialCommand: m,
2203
- finishSpecialCommand: g,
2204
- extendMode: _,
2205
- extendTransition: w
2206
- } = K(), x = Y(null), N = M((h) => {
2329
+ }, en = ({ className: e = "" }) => {
2330
+ const { infiniteCarrousel: r, preloadRange: n, isFullScreen: o } = re(), { aspectRatioStyle: s } = oe(), {
2331
+ items: u,
2332
+ slidable: f,
2333
+ carrouselItemIndex: d,
2334
+ setCarrouselItemIndex: c,
2335
+ itemIndexCommand: v,
2336
+ setItemIndexCommand: l,
2337
+ specialCommand: m,
2338
+ isRunningSpecialCommand: w,
2339
+ finishSpecialCommand: C,
2340
+ extendMode: a,
2341
+ extendTransition: h
2342
+ } = J(), x = Z(null), j = I((y) => {
2207
2343
  if (!x.current)
2208
- throw new Error(`[${h ?? "sliderOrThrow"}] slider.current is null`);
2344
+ throw new Error(`[${y ?? "sliderOrThrow"}] slider.current is null`);
2209
2345
  return x.current;
2210
- }, []), C = Y(!1), z = Y(null), f = Y(null), p = Y(null), v = M(() => {
2211
- p.current && cancelAnimationFrame(p.current);
2212
- }, []), j = M(() => {
2213
- const h = N("computeClosestSnapIndex"), T = Array.from(h.children), d = h.scrollLeft, y = T.reduce(
2214
- (k, A, D) => {
2215
- const $ = A.offsetLeft;
2216
- return Math.abs($ - d) < Math.abs(T[k].offsetLeft - d) ? D : k;
2346
+ }, []), k = Z(!1), g = Z(null), p = Z(null), b = Z(null), E = I(() => {
2347
+ b.current && cancelAnimationFrame(b.current);
2348
+ }, []), L = I(() => {
2349
+ const y = j("computeClosestSnapIndex"), i = Array.from(y.children), _ = y.scrollLeft, M = i.reduce(
2350
+ (A, F, U) => {
2351
+ const W = F.offsetLeft;
2352
+ return Math.abs(W - _) < Math.abs(i[A].offsetLeft - _) ? U : A;
2217
2353
  },
2218
2354
  0
2219
2355
  );
2220
- return c === "first_to_last" ? Xe(y, o.length) : c === "last_to_first" ? Xe(y - 1, o.length) : y;
2221
- }, [c, N, o.length]), S = M(
2222
- (h) => {
2223
- const T = N("setStyleCursor");
2224
- T.style.cursor = h;
2356
+ return m === "first_to_last" ? rt(M, u.length) : m === "last_to_first" ? rt(M - 1, u.length) : M;
2357
+ }, [m, j, u.length]), D = I(
2358
+ (y) => {
2359
+ const i = j("setStyleCursor");
2360
+ i.style.cursor = y;
2225
2361
  },
2226
- [N]
2227
- ), R = M(
2228
- (h) => {
2229
- const T = N("setStyleSnapState");
2230
- h === "mandatory" ? T.style.scrollSnapType = "x mandatory" : T.style.scrollSnapType = "none";
2362
+ [j]
2363
+ ), T = I(
2364
+ (y) => {
2365
+ const i = j("setStyleSnapState");
2366
+ y === "mandatory" ? i.style.scrollSnapType = "x mandatory" : i.style.scrollSnapType = "none";
2231
2367
  },
2232
- [N]
2233
- ), V = M(
2234
- (h, T, d) => {
2235
- v();
2236
- const y = N("scrollToIndex"), k = Array.from(y.children), A = y.scrollLeft, D = k[h].offsetLeft, $ = (pe) => {
2237
- y.scrollTo({
2238
- left: pe,
2368
+ [j]
2369
+ ), N = I(
2370
+ (y, i, _) => {
2371
+ E();
2372
+ const M = j("scrollToIndex"), A = Array.from(M.children), F = M.scrollLeft, U = A[y].offsetLeft, W = (ae) => {
2373
+ M.scrollTo({
2374
+ left: ae,
2239
2375
  behavior: "instant"
2240
2376
  });
2241
- }, W = () => {
2242
- $(D), R("mandatory"), d?.();
2243
- }, X = Math.abs(A - D);
2244
- if (X < 1 || T === "instant") {
2245
- W();
2377
+ }, Y = () => {
2378
+ W(U), T("mandatory"), _?.();
2379
+ }, q = Math.abs(F - U);
2380
+ if (q < 1 || i === "instant") {
2381
+ Y();
2246
2382
  return;
2247
2383
  }
2248
- const B = ae(X / 2.5, 300, 1e3), G = (/* @__PURE__ */ new Date()).getTime();
2249
- R("none");
2250
- const Q = () => {
2251
- const pe = () => {
2252
- const ye = (/* @__PURE__ */ new Date()).getTime() - G;
2253
- if (ye >= B) {
2254
- W();
2384
+ const ee = le(q / 2.5, 300, 1e3), fe = (/* @__PURE__ */ new Date()).getTime();
2385
+ T("none");
2386
+ const se = () => {
2387
+ const ae = () => {
2388
+ const je = (/* @__PURE__ */ new Date()).getTime() - fe;
2389
+ if (je >= ee) {
2390
+ Y();
2255
2391
  return;
2256
2392
  }
2257
- const Ie = Math.min(ye / B, 1), ie = Lt(Ie), he = Ee(A, D, ie);
2258
- $(he), Q();
2393
+ const Se = Math.min(je / ee, 1), Ve = At(Se), ce = Le(F, U, Ve);
2394
+ W(ce), se();
2259
2395
  };
2260
- p.current = requestAnimationFrame(pe);
2396
+ b.current = requestAnimationFrame(ae);
2261
2397
  };
2262
- Q();
2398
+ se();
2263
2399
  },
2264
- [v, N, R]
2265
- ), [E, L] = F(), I = !!E;
2266
- Z(() => {
2267
- const h = () => {
2268
- clearTimeout(E);
2269
- const T = setTimeout(() => {
2270
- L(void 0);
2271
- }, pt);
2272
- L(T);
2400
+ [E, j, T]
2401
+ ), [z, S] = $(), V = !!z;
2402
+ O(() => {
2403
+ const y = () => {
2404
+ clearTimeout(z);
2405
+ const i = setTimeout(() => {
2406
+ S(void 0);
2407
+ }, Et);
2408
+ S(i);
2273
2409
  };
2274
- return addEventListener("resize", h), document.addEventListener("fullscreenchange", h), () => {
2275
- removeEventListener("resize", h), document.removeEventListener("fullscreenchange", h);
2410
+ return addEventListener("resize", y), document.addEventListener("fullscreenchange", y), () => {
2411
+ removeEventListener("resize", y), document.removeEventListener("fullscreenchange", y);
2276
2412
  };
2277
- }, [E]), Z(() => {
2278
- const h = j();
2279
- Number.isNaN(h) || h !== l && V(l, "instant");
2413
+ }, [z]), O(() => {
2414
+ const y = L();
2415
+ Number.isNaN(y) || y !== d && N(d, "instant");
2280
2416
  }, [
2281
- l,
2282
- V,
2283
- j,
2417
+ d,
2418
+ N,
2419
+ L,
2284
2420
  // - Run the effect when those values change
2421
+ u,
2422
+ z,
2285
2423
  o,
2286
- E,
2287
- n,
2288
- _,
2289
- w
2290
- ]), Z(() => {
2291
- if (!u || m) {
2292
- S("auto");
2424
+ a,
2425
+ h
2426
+ ]), O(() => {
2427
+ if (!f || w) {
2428
+ D("auto");
2293
2429
  return;
2294
2430
  }
2295
- const h = x.current;
2296
- if (!h)
2431
+ const y = x.current;
2432
+ if (!y)
2297
2433
  return;
2298
- S("grab"), R("mandatory");
2299
- const T = (k) => {
2300
- k.button === 0 && (k.preventDefault(), k.stopPropagation(), v(), C.current = !0, z.current = k.pageX - h.offsetLeft, f.current = h.scrollLeft, S("grabbing"));
2301
- }, d = (k) => {
2302
- if (!C.current)
2434
+ D("grab"), T("mandatory");
2435
+ const i = (A) => {
2436
+ A.button === 0 && (A.preventDefault(), A.stopPropagation(), E(), k.current = !0, g.current = A.pageX - y.offsetLeft, p.current = y.scrollLeft, D("grabbing"));
2437
+ }, _ = (A) => {
2438
+ if (!k.current)
2303
2439
  return;
2304
- if (z.current === null)
2440
+ if (g.current === null)
2305
2441
  throw new Error("[onMouseMove] startX is null");
2306
- R("none");
2307
- const A = k.pageX - h.offsetLeft - z.current;
2442
+ T("none");
2443
+ const F = A.pageX - y.offsetLeft - g.current;
2308
2444
  requestAnimationFrame(() => {
2309
- if (f.current === null)
2445
+ if (p.current === null)
2310
2446
  throw new Error("[onMouseMove] scrollLeft is null");
2311
- h.scrollLeft = f.current - A;
2447
+ y.scrollLeft = p.current - F;
2312
2448
  });
2313
- }, y = () => {
2314
- if (!C.current)
2449
+ }, M = () => {
2450
+ if (!k.current)
2315
2451
  return;
2316
- C.current = !1, S("grab");
2317
- const k = j();
2318
- V(k, "smooth");
2452
+ k.current = !1, D("grab");
2453
+ const A = L();
2454
+ N(A, "smooth");
2319
2455
  };
2320
- return h.addEventListener("mousedown", T), document.addEventListener("mousemove", d), document.addEventListener("mouseleave", y), document.addEventListener("mouseup", y), document.addEventListener("contextmenu", y), () => {
2321
- h.removeEventListener("mousedown", T), document.removeEventListener("mousemove", d), document.removeEventListener("mouseleave", y), document.removeEventListener("mouseup", y), document.removeEventListener("contextmenu", y);
2456
+ return y.addEventListener("mousedown", i), document.addEventListener("mousemove", _), document.addEventListener("mouseleave", M), document.addEventListener("mouseup", M), document.addEventListener("contextmenu", M), () => {
2457
+ y.removeEventListener("mousedown", i), document.removeEventListener("mousemove", _), document.removeEventListener("mouseleave", M), document.removeEventListener("mouseup", M), document.removeEventListener("contextmenu", M);
2322
2458
  };
2323
2459
  }, [
2324
- v,
2325
- j,
2326
- m,
2327
- V,
2328
- S,
2329
- R,
2330
- u
2331
- ]), Z(() => {
2332
- if (w || I)
2460
+ E,
2461
+ L,
2462
+ w,
2463
+ N,
2464
+ D,
2465
+ T,
2466
+ f
2467
+ ]), O(() => {
2468
+ if (h || V)
2333
2469
  return;
2334
- const h = x.current;
2335
- if (!h)
2470
+ const y = x.current;
2471
+ if (!y)
2336
2472
  return;
2337
- const T = () => {
2338
- const d = j();
2339
- Number.isNaN(d) || (i(d), d === s && b(null));
2473
+ const i = () => {
2474
+ const _ = L();
2475
+ Number.isNaN(_) || (c(_), _ === v && l(null));
2340
2476
  };
2341
- return h.addEventListener("scroll", T), () => {
2342
- h.removeEventListener("scroll", T);
2477
+ return y.addEventListener("scroll", i), () => {
2478
+ y.removeEventListener("scroll", i);
2343
2479
  };
2344
2480
  }, [
2345
- j,
2481
+ L,
2482
+ h,
2346
2483
  w,
2347
- m,
2348
- I,
2349
- s,
2350
- o.length,
2351
- i,
2352
- b
2353
- ]), Z(() => {
2354
- if (s === null)
2484
+ V,
2485
+ v,
2486
+ u.length,
2487
+ c,
2488
+ l
2489
+ ]), O(() => {
2490
+ if (v === null)
2355
2491
  return;
2356
- const h = () => g();
2357
- switch (c) {
2492
+ const y = () => C();
2493
+ switch (m) {
2358
2494
  case "first_to_last":
2359
- V(o.length, "instant"), V(o.length - 1, "smooth", h);
2495
+ N(u.length, "instant"), N(u.length - 1, "smooth", y);
2360
2496
  break;
2361
2497
  case "last_to_first":
2362
- V(0, "instant"), V(1, "smooth", h);
2498
+ N(0, "instant"), N(1, "smooth", y);
2363
2499
  break;
2364
2500
  case "instant":
2365
- V(s, "instant", h);
2501
+ N(v, "instant", y);
2366
2502
  break;
2367
2503
  default:
2368
- V(s, "smooth");
2504
+ N(v, "smooth");
2369
2505
  break;
2370
2506
  }
2371
2507
  }, [
2372
- c,
2373
- g,
2374
- s,
2375
- o.length,
2376
- V
2508
+ m,
2509
+ C,
2510
+ v,
2511
+ u.length,
2512
+ N
2377
2513
  ]);
2378
- const H = () => /* @__PURE__ */ t.jsx("div", { className: "h-full", style: a });
2514
+ const R = () => /* @__PURE__ */ t.jsx("div", { className: "h-full", style: s });
2379
2515
  return /* @__PURE__ */ t.jsxs(
2380
2516
  "div",
2381
2517
  {
2382
- className: O(
2518
+ className: H(
2383
2519
  "relative overflow-hidden rounded-carrousel transition-radius",
2384
2520
  e
2385
2521
  ),
2386
- style: a,
2522
+ style: s,
2387
2523
  children: [
2388
2524
  /* @__PURE__ */ t.jsxs(
2389
2525
  "div",
2390
2526
  {
2391
2527
  ref: x,
2392
- className: `flex size-full ${u ? "overflow-x-auto no-scrollbar *:snap-start *:snap-always" : "justify-center"}`,
2528
+ className: `flex size-full ${f ? "overflow-x-auto no-scrollbar *:snap-start *:snap-always" : "justify-center"}`,
2393
2529
  children: [
2394
- c === "last_to_first" && /* @__PURE__ */ t.jsx(H, {}),
2395
- o.map((h, T) => {
2396
- const d = h.type === "360" ? h.images[0] : h.src, y = T === l, k = T === 0, A = l === o.length - 1, D = T === o.length - 1, $ = l === 0, W = Math.abs(T - l) > 1 && // Not next to the current one
2397
- !(r && k && A) && // Not the last one when the first one is shown (only for infinite carrousel)
2398
- !(r && D && $), X = (() => {
2399
- if (c === "first_to_last" && k)
2530
+ m === "last_to_first" && /* @__PURE__ */ t.jsx(R, {}),
2531
+ u.map((y, i) => {
2532
+ const _ = i === d, M = i === 0, A = i === u.length - 1, F = (() => {
2533
+ if (m === "first_to_last" && M)
2400
2534
  return {
2401
- transform: `translateX(${100 * o.length}%)`
2535
+ transform: `translateX(${100 * u.length}%)`
2402
2536
  };
2403
- if (c === "last_to_first" && D)
2537
+ if (m === "last_to_first" && A)
2404
2538
  return {
2405
- transform: `translateX(-${100 * o.length}%)`
2539
+ transform: `translateX(-${100 * u.length}%)`
2406
2540
  };
2407
2541
  })();
2542
+ let U = Math.abs(i - d) <= n;
2543
+ U ||= i === v, r && (U ||= d < n && u.length - i <= n - d, U ||= d >= u.length - n && i <= n - (u.length - d));
2544
+ const W = (() => {
2545
+ let Y;
2546
+ switch (y.type) {
2547
+ case "360":
2548
+ Y = y.images[0].src;
2549
+ break;
2550
+ case "image":
2551
+ Y = y.src;
2552
+ break;
2553
+ case "video":
2554
+ Y = y.poster ?? "video";
2555
+ break;
2556
+ case "custom":
2557
+ Y = "custom";
2558
+ break;
2559
+ }
2560
+ return `${i}_${Y}`;
2561
+ })();
2408
2562
  return /* @__PURE__ */ t.jsx(
2409
2563
  "div",
2410
2564
  {
2411
- className: O(
2565
+ className: H(
2412
2566
  "h-full bg-foreground/35",
2413
- l === T && "z-1"
2567
+ d === i && "z-1"
2414
2568
  // Give high-ground to the shown item (to avoid 1px vertical line)
2415
2569
  ),
2416
- style: { ...a, ...X },
2417
- children: /* @__PURE__ */ t.jsx(
2418
- _r,
2419
- {
2420
- index: T,
2421
- item: h,
2422
- isShown: y,
2423
- lazy: W
2424
- }
2425
- )
2570
+ style: { ...s, ...F },
2571
+ children: U && /* @__PURE__ */ t.jsx(Dr, { index: i, item: y, isShown: _ })
2426
2572
  },
2427
- `${T}_${d}`
2573
+ W
2428
2574
  );
2429
2575
  }),
2430
- c === "first_to_last" && /* @__PURE__ */ t.jsx(H, {})
2576
+ m === "first_to_last" && /* @__PURE__ */ t.jsx(R, {})
2431
2577
  ]
2432
2578
  }
2433
2579
  ),
2434
- /* @__PURE__ */ t.jsx(Dr, {})
2580
+ /* @__PURE__ */ t.jsx(Qr, {})
2435
2581
  ]
2436
2582
  }
2437
2583
  );
2438
- }, Yr = () => {
2439
- const { permanentGallery: e } = J(), { aspectRatioStyle: r } = ne(), {
2584
+ }, tn = () => {
2585
+ const { permanentGallery: e } = re(), { aspectRatioStyle: r } = oe(), {
2440
2586
  prevItem: n,
2441
2587
  nextItem: o,
2442
- isShowingDetails: a,
2588
+ isShowingDetails: s,
2443
2589
  resetShownDetails: u,
2444
- extendMode: l,
2445
- disableExtendMode: i,
2446
- isZooming: s,
2447
- resetZoom: b,
2448
- fakeFullScreen: c
2449
- } = K(), m = Y(null), g = Y(null), _ = Y(null);
2450
- return Z(() => {
2451
- if (!l)
2590
+ extendMode: f,
2591
+ disableExtendMode: d,
2592
+ isZooming: c,
2593
+ resetZoom: v,
2594
+ fakeFullScreen: l
2595
+ } = J(), m = Z(null), w = Z(null), C = Z(null);
2596
+ return O(() => {
2597
+ if (!f)
2452
2598
  return;
2453
- const w = m.current, x = g.current, N = _.current;
2454
- if (!w || !x || !N)
2599
+ const a = m.current, h = w.current, x = C.current;
2600
+ if (!a || !h || !x)
2455
2601
  return;
2456
- let C = !1;
2457
- const z = (v) => [w, x, N].includes(v.target), f = (v) => {
2458
- C = z(v);
2459
- }, p = (v) => {
2460
- C && (z(v) && i(), C = !1);
2602
+ let j = !1;
2603
+ const k = (b) => [a, h, x].includes(b.target), g = (b) => {
2604
+ j = k(b);
2605
+ }, p = (b) => {
2606
+ j && (k(b) && d(), j = !1);
2461
2607
  };
2462
- return w.addEventListener("mousedown", f), w.addEventListener("mouseup", p), () => {
2463
- w.removeEventListener("mousedown", f), w.removeEventListener("mouseup", p);
2608
+ return a.addEventListener("mousedown", g), a.addEventListener("mouseup", p), () => {
2609
+ a.removeEventListener("mousedown", g), a.removeEventListener("mouseup", p);
2464
2610
  };
2465
- }, [i, l]), Z(() => {
2466
- const w = (x) => {
2467
- x.key === "Escape" && (s ? b() : a ? u() : i());
2611
+ }, [d, f]), O(() => {
2612
+ const a = (h) => {
2613
+ h.key === "Escape" && (c ? v() : s ? u() : d());
2468
2614
  };
2469
- return addEventListener("keydown", w), () => {
2470
- removeEventListener("keydown", w);
2615
+ return addEventListener("keydown", a), () => {
2616
+ removeEventListener("keydown", a);
2471
2617
  };
2472
2618
  }, [
2473
- i,
2474
- a,
2619
+ d,
2475
2620
  s,
2621
+ c,
2476
2622
  o,
2477
2623
  n,
2478
2624
  u,
2479
- b
2625
+ v
2480
2626
  ]), /* @__PURE__ */ t.jsxs(
2481
2627
  "div",
2482
2628
  {
2483
2629
  ref: m,
2484
- className: O(
2485
- c ? "fixed inset-0 z-overlay" : "relative",
2486
- l && "flex size-full items-center justify-center bg-foreground/75"
2630
+ className: H(
2631
+ l ? "fixed inset-0 z-overlay" : "relative",
2632
+ f && "flex size-full items-center justify-center bg-foreground/75"
2487
2633
  ),
2488
2634
  children: [
2489
2635
  /* @__PURE__ */ t.jsxs(
2490
2636
  "div",
2491
2637
  {
2492
- ref: g,
2493
- className: l ? "flex size-full flex-col justify-center gap-y-2 small:gap-y-4" : "space-y-2",
2638
+ ref: w,
2639
+ className: f ? "flex size-full flex-col justify-center gap-y-2 small:gap-y-4" : "space-y-2",
2494
2640
  children: [
2495
2641
  /* @__PURE__ */ t.jsx(
2496
2642
  "div",
2497
2643
  {
2498
- ref: _,
2499
- className: O(
2500
- l && "mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"
2644
+ ref: C,
2645
+ className: H(
2646
+ f && "mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"
2501
2647
  ),
2502
2648
  style: r,
2503
- children: /* @__PURE__ */ t.jsx(Fr, { className: O(l && "h-full min-w-0") })
2649
+ children: /* @__PURE__ */ t.jsx(en, { className: H(f && "h-full min-w-0") })
2504
2650
  }
2505
2651
  ),
2506
- e && /* @__PURE__ */ t.jsx(Et, { className: O(l && "my-2 shrink-0 small:my-4") })
2652
+ e && /* @__PURE__ */ t.jsx(Rt, { className: H(f && "my-2 shrink-0 small:my-4") })
2507
2653
  ]
2508
2654
  }
2509
2655
  ),
2510
- l && /* @__PURE__ */ t.jsx(
2511
- yt,
2656
+ f && /* @__PURE__ */ t.jsx(
2657
+ zt,
2512
2658
  {
2513
2659
  className: "absolute right-2 top-2 small:right-4 small:top-4",
2514
- onClick: i
2660
+ onClick: d
2515
2661
  }
2516
2662
  )
2517
2663
  ]
2518
2664
  }
2519
2665
  );
2520
- }, $r = ({
2521
- compositionUrl: e
2522
- }) => {
2523
- const { emitEvent: r } = J(), {
2666
+ }, rn = () => {
2667
+ const { emitEvent: e, compositionUrl: r } = re(), {
2524
2668
  data: n,
2525
2669
  status: o,
2526
- isSuccess: a,
2670
+ isSuccess: s,
2527
2671
  error: u
2528
- } = Gt(e);
2529
- return Z(() => {
2530
- u ? r(nt, u) : o === "fetching" ? r(tt, e) : a && r(rt, n);
2531
- }, [n, e, r, u, a, o]), u ? /* @__PURE__ */ t.jsx(
2532
- jt,
2672
+ } = ar(r);
2673
+ return O(() => {
2674
+ u ? e(mt, u) : o === "fetching" ? e(dt, r) : s && e(ut, n);
2675
+ }, [n, r, e, u, s, o]), u ? /* @__PURE__ */ t.jsx(
2676
+ It,
2533
2677
  {
2534
2678
  className: "aspect-square text-foreground/70",
2535
2679
  text: "Player could not be loaded"
2536
2680
  }
2537
- ) : a ? /* @__PURE__ */ t.jsx(qt, { composition: n, children: /* @__PURE__ */ t.jsx(Jt, { children: /* @__PURE__ */ t.jsx(Yr, {}) }) }) : /* @__PURE__ */ t.jsxs("div", { className: "flex aspect-square size-full flex-col items-center justify-center gap-y-4", children: [
2681
+ ) : s ? /* @__PURE__ */ t.jsx(lr, { composition: n, children: /* @__PURE__ */ t.jsx(dr, { children: /* @__PURE__ */ t.jsx(tn, {}) }) }) : /* @__PURE__ */ t.jsxs("div", { className: "flex aspect-square size-full flex-col items-center justify-center gap-y-4", children: [
2538
2682
  /* @__PURE__ */ t.jsx("div", { className: "animate-pulse text-xl", children: "Loading Player" }),
2539
- /* @__PURE__ */ t.jsx(Ct, { color: "foreground" })
2683
+ /* @__PURE__ */ t.jsx(St, { color: "foreground" })
2540
2684
  ] });
2541
- }, Wr = ({
2685
+ }, nn = ({
2542
2686
  compositionUrl: e,
2543
- hideCategories: r = At,
2544
- infiniteCarrousel: n = Dt,
2545
- permanentGallery: o = Ft,
2546
- imageLoadStrategy: a = Yt,
2547
- preventFullScreen: u = $t,
2548
- eventPrefix: l = dt,
2549
- reverse360: i = Wt,
2550
- children: s,
2687
+ hideCategories: r = Bt,
2688
+ infiniteCarrousel: n = Gt,
2689
+ permanentGallery: o = Kt,
2690
+ mediaLoadStrategy: s = qt,
2691
+ minMediaWidth: u = Jt,
2692
+ maxMediaWidth: f = Qt,
2693
+ preloadRange: d = er,
2694
+ preventFullScreen: c = tr,
2695
+ eventPrefix: v = bt,
2696
+ reverse360: l = rr,
2697
+ children: m
2551
2698
  // NOTE: use to customize the player, not to display the content
2552
- ...b
2553
2699
  }) => {
2554
- const c = Y(null), [m, g] = F(0.5), [_, w] = F(!1), x = M(
2555
- (z, f) => {
2556
- const p = l + z, v = new CustomEvent(p, { detail: f });
2557
- document.dispatchEvent(v);
2700
+ const w = Z(null), [C, a] = $(0.5), [h, x] = $(!1), j = I(
2701
+ (p, b) => {
2702
+ const E = v + p, L = new CustomEvent(E, { detail: b });
2703
+ document.dispatchEvent(L);
2558
2704
  },
2559
- [l]
2705
+ [v]
2560
2706
  );
2561
- Z(() => {
2562
- if (_) {
2563
- g(1);
2707
+ O(() => {
2708
+ if (h) {
2709
+ a(1);
2564
2710
  return;
2565
2711
  }
2566
- if (!c.current)
2712
+ if (!w.current)
2567
2713
  return;
2568
- const z = c.current, f = () => {
2569
- const p = window.innerWidth, v = z.clientWidth;
2570
- g(v / p);
2714
+ const p = w.current, b = () => {
2715
+ const E = window.innerWidth, L = p.clientWidth;
2716
+ a(L / E);
2571
2717
  };
2572
- return f(), addEventListener("resize", f), () => {
2573
- removeEventListener("resize", f);
2718
+ return b(), addEventListener("resize", b), () => {
2719
+ removeEventListener("resize", b);
2574
2720
  };
2575
- }, [_]), Z(() => {
2576
- if (u)
2721
+ }, [h]), O(() => {
2722
+ if (c)
2577
2723
  return;
2578
- const z = c.current;
2579
- if (!z)
2724
+ const p = w.current;
2725
+ if (!p)
2580
2726
  throw new Error("Wrapper not found");
2581
- const f = () => {
2582
- const { fullscreenElement: p } = document;
2583
- w(
2584
- p === z || // NOTE: For custom element, the web browser is making the whole custom element full-screen and not only the wrapper
2585
- p?.localName === Ze
2727
+ const b = () => {
2728
+ const { fullscreenElement: E } = document;
2729
+ x(
2730
+ E === p || // NOTE: For custom element, the web browser is making the whole custom element full-screen and not only the wrapper
2731
+ E?.localName === Ie
2586
2732
  );
2587
2733
  };
2588
- return document.addEventListener("fullscreenchange", f), () => {
2589
- document.removeEventListener("fullscreenchange", f);
2734
+ return document.addEventListener("fullscreenchange", b), () => {
2735
+ document.removeEventListener("fullscreenchange", b);
2590
2736
  };
2591
- }, [u]);
2592
- const N = M(async () => {
2593
- const z = c.current;
2594
- if (!z)
2737
+ }, [c]);
2738
+ const k = I(async () => {
2739
+ const p = w.current;
2740
+ if (!p)
2595
2741
  throw new Error("Wrapper not found");
2596
2742
  try {
2597
- return await z.requestFullscreen(), !0;
2743
+ return await p.requestFullscreen(), !0;
2598
2744
  } catch {
2599
2745
  return !1;
2600
2746
  }
2601
- }, []), C = M(async () => {
2747
+ }, []), g = I(async () => {
2602
2748
  try {
2603
2749
  return await document.exitFullscreen(), !0;
2604
2750
  } catch {
@@ -2606,47 +2752,63 @@ const Mr = ({ currentIndex: e, maxIndex: r }) => /* @__PURE__ */ t.jsxs("div", {
2606
2752
  }
2607
2753
  }, []);
2608
2754
  return /* @__PURE__ */ t.jsx(
2609
- Kt,
2755
+ ir,
2610
2756
  {
2611
- ...b,
2612
- reverse360: i,
2613
- imageLoadStrategy: a,
2757
+ compositionUrl: e,
2614
2758
  hideCategories: r,
2615
2759
  infiniteCarrousel: n,
2616
- preventFullScreen: u,
2617
2760
  permanentGallery: o,
2618
- emitEvent: x,
2619
- playerInViewportWidthRatio: m,
2620
- isFullScreen: _,
2621
- requestFullscreen: N,
2622
- exitFullscreen: C,
2623
- children: /* @__PURE__ */ t.jsxs(ar, { children: [
2761
+ mediaLoadStrategy: s,
2762
+ minMediaWidth: u,
2763
+ maxMediaWidth: f,
2764
+ preloadRange: d,
2765
+ preventFullScreen: c,
2766
+ reverse360: l,
2767
+ emitEvent: j,
2768
+ playerInViewportWidthRatio: C,
2769
+ isFullScreen: h,
2770
+ requestFullscreen: k,
2771
+ exitFullscreen: g,
2772
+ children: /* @__PURE__ */ t.jsxs(cr, { children: [
2624
2773
  /* @__PURE__ */ t.jsx(
2625
2774
  "div",
2626
2775
  {
2627
2776
  id: "cc-webplayer-wrapper",
2628
- ref: c,
2777
+ ref: w,
2629
2778
  className: "select-none text-foreground",
2630
- children: /* @__PURE__ */ t.jsx($r, { compositionUrl: e })
2779
+ children: /* @__PURE__ */ t.jsx(rn, {})
2631
2780
  }
2632
2781
  ),
2633
- s
2782
+ m
2634
2783
  ] })
2635
2784
  }
2636
2785
  );
2637
- }, Ur = ({ name: e, color: r, children: n }) => {
2638
- const { setIconConfig: o, resetIconConfig: a } = De();
2639
- return Z(() => {
2640
- if (!(!n && !r))
2641
- return o(e, {
2642
- Icon: n,
2643
- color: r
2786
+ }, on = ({ children: e, index: r, thumbnailSrc: n }) => {
2787
+ const { registerCustomMedia: o, unregisterCustomMedia: s } = ye();
2788
+ return O(() => {
2789
+ if (!e)
2790
+ return;
2791
+ const u = o({
2792
+ Media: e,
2793
+ index: r,
2794
+ thumbnailSrc: n
2795
+ });
2796
+ return () => {
2797
+ s(u);
2798
+ };
2799
+ }, [e, s, r, o, n]), null;
2800
+ }, sn = (e) => Xe() ? /* @__PURE__ */ t.jsx(on, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), an = ({ name: e, children: r }) => {
2801
+ const { registerIconConfig: n, unregisterIconConfig: o } = ye();
2802
+ return O(() => {
2803
+ if (r)
2804
+ return n(e, {
2805
+ Icon: r
2644
2806
  }), () => {
2645
- a(e);
2807
+ o(e);
2646
2808
  };
2647
- }, [n, r, e, a, o]), null;
2648
- }, Xr = (e) => bt() ? /* @__PURE__ */ t.jsx(Ur, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), Br = '*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}#cc-webplayer-wrapper{--background: var(--cc-webplayer-background, 0 0% 100%);--foreground: var(--cc-webplayer-foreground, 240 10% 3.9%);--primary: var(--cc-webplayer-primary, 216 100% 52%);--primary-foreground: var( --cc-webplayer-primary-foreground, var(--background) );--primary-light: var(--cc-webplayer-primary-light, var(--primary));--neutral: var(--cc-webplayer-neutral, 0 0% 39%);--neutral-foreground: var( --cc-webplayer-neutral-foreground, var(--foreground) );--radius-ui: var(--cc-webplayer-radius-ui, 1rem);--radius-carrousel: var(--cc-webplayer-radius-carrousel, 0);--radius-gallery: var(--cc-webplayer-radius-gallery, 0)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:.25rem;right:.25rem}.inset-y-1{top:.25rem;bottom:.25rem}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-1{width:.25rem;height:.25rem}.size-12{width:3rem;height:3rem}.size-20{width:5rem;height:5rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-3\\/4{height:75%}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-12{width:3rem}.w-3\\/5{width:60%}.w-8{width:2rem}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-40{max-width:10rem}.max-w-\\[1600px\\]{max-width:1600px}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -.375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: .375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.125rem * var(--tw-space-x-reverse));margin-left:calc(.125rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + .125rem)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - .125rem)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-light{color:hsl(var(--primary-light))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:.5rem;right:.5rem}.small\\:inset-y-2{top:.5rem;bottom:.5rem}.small\\:bottom-2{bottom:.5rem}.small\\:left-2{left:.5rem}.small\\:right-2{right:.5rem}.small\\:right-4{right:1rem}.small\\:top-2{top:.5rem}.small\\:top-4{top:1rem}.small\\:my-4{margin-top:1rem;margin-bottom:1rem}.small\\:hidden{display:none}.small\\:h-12{height:3rem}.small\\:h-28{height:7rem}.small\\:max-w-48{max-width:12rem}.small\\:gap-2{gap:.5rem}.small\\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.small\\:gap-y-2{row-gap:.5rem}.small\\:gap-y-4{row-gap:1rem}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:.75rem}.small\\:px-2{padding-left:.5rem;padding-right:.5rem}.small\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.small\\:pl-8{padding-left:2rem}.small\\:pr-6{padding-right:1.5rem}.small\\:text-base{font-size:1rem;line-height:1.5rem}.small\\:text-sm{font-size:.875rem;line-height:1.25rem}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:5rem}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:14rem}.large\\:gap-4{gap:1rem}.large\\:p-2{padding:.5rem}.large\\:p-4{padding:1rem}.large\\:text-base{font-size:1rem;line-height:1.5rem}.large\\:text-lg{font-size:1.125rem;line-height:1.75rem}}';
2649
- var zt = { exports: {} }, we = {};
2809
+ }, [r, e, n, o]), null;
2810
+ }, ln = (e) => Xe() ? /* @__PURE__ */ t.jsx(an, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), cn = '*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}#cc-webplayer-wrapper{--background: var(--cc-webplayer-background, 0 0% 100%);--foreground: var(--cc-webplayer-foreground, 240 10% 3.9%);--primary: var(--cc-webplayer-primary, 216 100% 52%);--primary-foreground: var( --cc-webplayer-primary-foreground, var(--background) );--primary-light: var(--cc-webplayer-primary-light, var(--primary));--neutral: var(--cc-webplayer-neutral, 0 0% 39%);--neutral-foreground: var( --cc-webplayer-neutral-foreground, var(--foreground) );--radius-ui: var(--cc-webplayer-radius-ui, 1rem);--radius-carrousel: var(--cc-webplayer-radius-carrousel, 0);--radius-gallery: var(--cc-webplayer-radius-gallery, 0)}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:.25rem;right:.25rem}.inset-y-1{top:.25rem;bottom:.25rem}.-bottom-1{bottom:-.25rem}.-left-1{left:-.25rem}.-right-1{right:-.25rem}.-top-1{top:-.25rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.left-0{left:0}.left-1{left:.25rem}.left-1\\/2{left:50%}.right-1{right:.25rem}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\\/2{top:50%}.top-2{top:.5rem}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.size-1{width:.25rem;height:.25rem}.size-12{width:3rem;height:3rem}.size-20{width:5rem;height:5rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-8{width:2rem;height:2rem}.size-full{width:100%;height:100%}.h-1{height:.25rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-3\\/4{height:75%}.h-5{height:1.25rem}.h-8{height:2rem}.h-full{height:100%}.h-px{height:1px}.min-h-0{min-height:0px}.w-12{width:3rem}.w-3\\/5{width:60%}.w-8{width:2rem}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.max-w-40{max-width:10rem}.max-w-\\[1600px\\]{max-width:1600px}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -.375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: .375rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.gap-y-2{row-gap:.5rem}.gap-y-4{row-gap:1rem}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.125rem * var(--tw-space-x-reverse));margin-left:calc(.125rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + .125rem)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - .125rem)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:.125rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-4{padding:1rem}.px-1\\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pl-6{padding-left:1.5rem}.pr-12{padding-right:3rem}.pr-4{padding-right:1rem}.pt-8{padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-primary-light{color:hsl(var(--primary-light))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:size-full>*{width:100%;height:100%}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.\\*\\:object-cover>*{-o-object-fit:cover;object-fit:cover}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:.5rem;right:.5rem}.small\\:inset-y-2{top:.5rem;bottom:.5rem}.small\\:bottom-2{bottom:.5rem}.small\\:left-2{left:.5rem}.small\\:right-2{right:.5rem}.small\\:right-4{right:1rem}.small\\:top-2{top:.5rem}.small\\:top-4{top:1rem}.small\\:my-4{margin-top:1rem;margin-bottom:1rem}.small\\:hidden{display:none}.small\\:h-12{height:3rem}.small\\:h-28{height:7rem}.small\\:max-w-48{max-width:12rem}.small\\:gap-2{gap:.5rem}.small\\:gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.small\\:gap-y-2{row-gap:.5rem}.small\\:gap-y-4{row-gap:1rem}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:.75rem}.small\\:px-2{padding-left:.5rem;padding-right:.5rem}.small\\:py-1{padding-top:.25rem;padding-bottom:.25rem}.small\\:pl-8{padding-left:2rem}.small\\:pr-6{padding-right:1.5rem}.small\\:text-base{font-size:1rem;line-height:1.5rem}.small\\:text-sm{font-size:.875rem;line-height:1.25rem}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:5rem}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:14rem}.large\\:gap-4{gap:1rem}.large\\:p-2{padding:.5rem}.large\\:p-4{padding:1rem}.large\\:text-base{font-size:1rem;line-height:1.5rem}.large\\:text-lg{font-size:1.125rem;line-height:1.75rem}}';
2811
+ var Ot = { exports: {} }, ve = {};
2650
2812
  /**
2651
2813
  * @license React
2652
2814
  * react-jsx-runtime.production.min.js
@@ -2656,32 +2818,32 @@ var zt = { exports: {} }, we = {};
2656
2818
  * This source code is licensed under the MIT license found in the
2657
2819
  * LICENSE file in the root directory of this source tree.
2658
2820
  */
2659
- var Je;
2660
- function Gr() {
2661
- if (Je) return we;
2662
- Je = 1;
2663
- var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, a = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
2664
- function l(i, s, b) {
2665
- var c, m = {}, g = null, _ = null;
2666
- b !== void 0 && (g = "" + b), s.key !== void 0 && (g = "" + s.key), s.ref !== void 0 && (_ = s.ref);
2667
- for (c in s) o.call(s, c) && !u.hasOwnProperty(c) && (m[c] = s[c]);
2668
- if (i && i.defaultProps) for (c in s = i.defaultProps, s) m[c] === void 0 && (m[c] = s[c]);
2669
- return { $$typeof: r, type: i, key: g, ref: _, props: m, _owner: a.current };
2821
+ var lt;
2822
+ function dn() {
2823
+ if (lt) return ve;
2824
+ lt = 1;
2825
+ var e = be, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
2826
+ function f(d, c, v) {
2827
+ var l, m = {}, w = null, C = null;
2828
+ v !== void 0 && (w = "" + v), c.key !== void 0 && (w = "" + c.key), c.ref !== void 0 && (C = c.ref);
2829
+ for (l in c) o.call(c, l) && !u.hasOwnProperty(l) && (m[l] = c[l]);
2830
+ if (d && d.defaultProps) for (l in c = d.defaultProps, c) m[l] === void 0 && (m[l] = c[l]);
2831
+ return { $$typeof: r, type: d, key: w, ref: C, props: m, _owner: s.current };
2670
2832
  }
2671
- return we.Fragment = n, we.jsx = l, we.jsxs = l, we;
2833
+ return ve.Fragment = n, ve.jsx = f, ve.jsxs = f, ve;
2672
2834
  }
2673
- zt.exports = Gr();
2674
- var je = zt.exports, qr = Object.defineProperty, Kr = (e, r, n) => r in e ? qr(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, Ce = (e, r, n) => (Kr(e, typeof r != "symbol" ? r + "" : r, n), n);
2675
- const Jr = {
2835
+ Ot.exports = dn();
2836
+ var ke = Ot.exports, un = Object.defineProperty, mn = (e, r, n) => r in e ? un(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, Ee = (e, r, n) => (mn(e, typeof r != "symbol" ? r + "" : r, n), n);
2837
+ const pn = {
2676
2838
  stringify: (e) => e,
2677
2839
  parse: (e) => e
2678
- }, Qr = {
2840
+ }, hn = {
2679
2841
  stringify: (e) => `${e}`,
2680
2842
  parse: (e) => parseFloat(e)
2681
- }, en = {
2843
+ }, fn = {
2682
2844
  stringify: (e) => e ? "true" : "false",
2683
2845
  parse: (e) => /^[ty1-9]/i.test(e)
2684
- }, tn = {
2846
+ }, gn = {
2685
2847
  stringify: (e) => e.name,
2686
2848
  parse: (e, r, n) => {
2687
2849
  const o = (() => {
@@ -2692,211 +2854,244 @@ const Jr = {
2692
2854
  })();
2693
2855
  return typeof o == "function" ? o.bind(n) : void 0;
2694
2856
  }
2695
- }, rn = {
2857
+ }, xn = {
2696
2858
  stringify: (e) => JSON.stringify(e),
2697
2859
  parse: (e) => JSON.parse(e)
2698
- }, Re = {
2699
- string: Jr,
2700
- number: Qr,
2701
- boolean: en,
2702
- function: tn,
2703
- json: rn
2860
+ }, $e = {
2861
+ string: pn,
2862
+ number: hn,
2863
+ boolean: fn,
2864
+ function: gn,
2865
+ json: xn
2704
2866
  };
2705
- function nn(e) {
2867
+ function wn(e) {
2706
2868
  return e.replace(
2707
2869
  /([a-z0-9])([A-Z])/g,
2708
2870
  (r, n, o) => `${n}-${o.toLowerCase()}`
2709
2871
  );
2710
2872
  }
2711
- const ke = Symbol.for("r2wc.render"), Ne = Symbol.for("r2wc.connected"), se = Symbol.for("r2wc.context"), te = Symbol.for("r2wc.props");
2712
- function on(e, r, n) {
2713
- var o, a, u;
2873
+ const Ce = Symbol.for("r2wc.render"), Ne = Symbol.for("r2wc.connected"), ie = Symbol.for("r2wc.context"), ne = Symbol.for("r2wc.props");
2874
+ function vn(e, r, n) {
2875
+ var o, s, u;
2714
2876
  r.props || (r.props = e.propTypes ? Object.keys(e.propTypes) : []);
2715
- const l = Array.isArray(r.props) ? r.props.slice() : Object.keys(r.props), i = {}, s = {}, b = {};
2716
- for (const m of l) {
2717
- i[m] = Array.isArray(r.props) ? "string" : r.props[m];
2718
- const g = nn(m);
2719
- s[m] = g, b[g] = m;
2877
+ const f = Array.isArray(r.props) ? r.props.slice() : Object.keys(r.props), d = {}, c = {}, v = {};
2878
+ for (const m of f) {
2879
+ d[m] = Array.isArray(r.props) ? "string" : r.props[m];
2880
+ const w = wn(m);
2881
+ c[m] = w, v[w] = m;
2720
2882
  }
2721
- class c extends HTMLElement {
2883
+ class l extends HTMLElement {
2722
2884
  constructor() {
2723
- super(), Ce(this, o, !0), Ce(this, a), Ce(this, u, {}), Ce(this, "container"), r.shadow ? this.container = this.attachShadow({
2885
+ super(), Ee(this, o, !0), Ee(this, s), Ee(this, u, {}), Ee(this, "container"), r.shadow ? this.container = this.attachShadow({
2724
2886
  mode: r.shadow
2725
- }) : this.container = this, this[te].container = this.container;
2726
- for (const g of l) {
2727
- const _ = s[g], w = this.getAttribute(_), x = i[g], N = x ? Re[x] : null;
2728
- N != null && N.parse && w && (this[te][g] = N.parse(w, _, this));
2887
+ }) : this.container = this, this[ne].container = this.container;
2888
+ for (const w of f) {
2889
+ const C = c[w], a = this.getAttribute(C), h = d[w], x = h ? $e[h] : null;
2890
+ x != null && x.parse && a && (this[ne][w] = x.parse(a, C, this));
2729
2891
  }
2730
2892
  }
2731
2893
  static get observedAttributes() {
2732
- return Object.keys(b);
2894
+ return Object.keys(v);
2733
2895
  }
2734
2896
  connectedCallback() {
2735
- this[Ne] = !0, this[ke]();
2897
+ this[Ne] = !0, this[Ce]();
2736
2898
  }
2737
2899
  disconnectedCallback() {
2738
- this[Ne] = !1, this[se] && n.unmount(this[se]), delete this[se];
2900
+ this[Ne] = !1, this[ie] && n.unmount(this[ie]), delete this[ie];
2739
2901
  }
2740
- attributeChangedCallback(g, _, w) {
2741
- const x = b[g], N = i[x], C = N ? Re[N] : null;
2742
- x in i && C != null && C.parse && w && (this[te][x] = C.parse(w, g, this), this[ke]());
2902
+ attributeChangedCallback(w, C, a) {
2903
+ const h = v[w], x = d[h], j = x ? $e[x] : null;
2904
+ h in d && j != null && j.parse && a && (this[ne][h] = j.parse(a, w, this), this[Ce]());
2743
2905
  }
2744
- [(o = Ne, a = se, u = te, ke)]() {
2745
- this[Ne] && (this[se] ? n.update(this[se], this[te]) : this[se] = n.mount(
2906
+ [(o = Ne, s = ie, u = ne, Ce)]() {
2907
+ this[Ne] && (this[ie] ? n.update(this[ie], this[ne]) : this[ie] = n.mount(
2746
2908
  this.container,
2747
2909
  e,
2748
- this[te]
2910
+ this[ne]
2749
2911
  ));
2750
2912
  }
2751
2913
  }
2752
- for (const m of l) {
2753
- const g = s[m], _ = i[m];
2754
- Object.defineProperty(c.prototype, m, {
2914
+ for (const m of f) {
2915
+ const w = c[m], C = d[m];
2916
+ Object.defineProperty(l.prototype, m, {
2755
2917
  enumerable: !0,
2756
2918
  configurable: !0,
2757
2919
  get() {
2758
- return this[te][m];
2920
+ return this[ne][m];
2759
2921
  },
2760
- set(w) {
2761
- this[te][m] = w;
2762
- const x = _ ? Re[_] : null;
2763
- if (x != null && x.stringify) {
2764
- const N = x.stringify(w, g, this);
2765
- this.getAttribute(g) !== N && this.setAttribute(g, N);
2922
+ set(a) {
2923
+ this[ne][m] = a;
2924
+ const h = C ? $e[C] : null;
2925
+ if (h != null && h.stringify) {
2926
+ const x = h.stringify(a, w, this);
2927
+ this.getAttribute(w) !== x && this.setAttribute(w, x);
2766
2928
  } else
2767
- this[ke]();
2929
+ this[Ce]();
2768
2930
  }
2769
2931
  });
2770
2932
  }
2771
- return c;
2933
+ return l;
2772
2934
  }
2773
- function sn(e, r, n) {
2774
- const o = Pt(e), a = be.createElement(r, n);
2775
- return o.render(a), {
2935
+ function bn(e, r, n) {
2936
+ const o = Yt(e), s = be.createElement(r, n);
2937
+ return o.render(s), {
2776
2938
  root: o,
2777
2939
  ReactComponent: r
2778
2940
  };
2779
2941
  }
2780
- function an({ root: e, ReactComponent: r }, n) {
2942
+ function yn({ root: e, ReactComponent: r }, n) {
2781
2943
  const o = be.createElement(r, n);
2782
2944
  e.render(o);
2783
2945
  }
2784
- function ln({ root: e }) {
2946
+ function jn({ root: e }) {
2785
2947
  e.unmount();
2786
2948
  }
2787
- function It(e, r = {}) {
2788
- return on(e, r, { mount: sn, update: an, unmount: ln });
2949
+ function Ge(e, r = {}) {
2950
+ return vn(e, r, { mount: bn, update: yn, unmount: jn });
2789
2951
  }
2790
- function cn(e) {
2952
+ function kn(e) {
2791
2953
  return e.replace(
2792
2954
  /([a-z0-9])([A-Z])/g,
2793
2955
  (r, n, o) => `${n}-${o.toLowerCase()}`
2794
2956
  );
2795
2957
  }
2796
- function dn(e) {
2797
- const r = {};
2798
- return Object.entries(e).forEach(([n, o]) => {
2799
- r[cn(n)] = o.toString();
2800
- }), r;
2958
+ function Ke(e) {
2959
+ return Object.entries(e).reduce((r, [n, o]) => {
2960
+ if (o !== void 0) {
2961
+ const s = kn(n);
2962
+ r[s] = o.toString();
2963
+ }
2964
+ return r;
2965
+ }, {});
2801
2966
  }
2802
- const un = (e) => /* @__PURE__ */ je.jsxs(je.Fragment, { children: [
2803
- /* @__PURE__ */ je.jsx("style", { children: Br }),
2804
- /* @__PURE__ */ je.jsx(Wr, { ...e })
2805
- ] }), mn = It(un, {
2967
+ const En = (e) => /* @__PURE__ */ ke.jsxs(ke.Fragment, { children: [
2968
+ /* @__PURE__ */ ke.jsx("style", { children: cn }),
2969
+ /* @__PURE__ */ ke.jsx(nn, { ...e })
2970
+ ] }), Cn = Ge(En, {
2806
2971
  shadow: "open",
2807
2972
  props: {
2808
2973
  compositionUrl: "string",
2809
2974
  hideCategories: "boolean",
2810
2975
  infiniteCarrousel: "boolean",
2811
2976
  permanentGallery: "boolean",
2812
- minImageWidth: "number",
2813
- maxImageWidth: "number",
2814
- imageLoadStrategy: "string",
2977
+ minMediaWidth: "number",
2978
+ maxMediaWidth: "number",
2979
+ mediaLoadStrategy: "string",
2815
2980
  preventFullScreen: "boolean",
2816
2981
  eventPrefix: "string",
2817
2982
  reverse360: "boolean"
2818
2983
  }
2819
- }), pn = (e) => dn(e), hn = It(Xr, {
2984
+ }), Nn = (e) => Ke(e), Ln = Ge(sn, {
2985
+ shadow: "closed",
2986
+ props: {
2987
+ index: "number",
2988
+ thumbnailSrc: "string"
2989
+ }
2990
+ }), _n = (e) => Ke(e), Mn = Ge(ln, {
2820
2991
  shadow: "closed",
2821
2992
  props: {
2822
- name: "string",
2823
- color: "string"
2993
+ name: "string"
2824
2994
  }
2825
- });
2826
- function gn() {
2827
- return !!customElements.get(Ze) && !!customElements.get(Ae);
2995
+ }), zn = (e) => Ke(e);
2996
+ function In() {
2997
+ return !!customElements.get(Ie) && !!customElements.get(We) && !!customElements.get(Ye);
2828
2998
  }
2829
- function fn() {
2830
- customElements.define(Ze, mn), customElements.define(Ae, hn);
2999
+ function Sn() {
3000
+ customElements.define(Ie, Cn), customElements.define(
3001
+ We,
3002
+ Ln
3003
+ ), customElements.define(Ye, Mn);
2831
3004
  }
2832
- function Mt() {
2833
- gn() || fn();
3005
+ function qe() {
3006
+ In() || Sn();
2834
3007
  }
2835
- Mt();
2836
- const bn = ({
3008
+ qe();
3009
+ const Rn = ({
2837
3010
  onCompositionLoading: e,
2838
3011
  onCompositionLoaded: r,
2839
3012
  onCompositionLoadError: n,
2840
- onExtendModeOn: o,
2841
- onExtendModeOff: a,
2842
- onHotspotsOn: u,
2843
- onHotspotsOff: l,
2844
- onGalleryOpen: i,
2845
- onGalleryClose: s,
2846
- ...b
3013
+ onItemChange: o,
3014
+ onExtendModeOn: s,
3015
+ onExtendModeOff: u,
3016
+ onHotspotsOn: f,
3017
+ onHotspotsOff: d,
3018
+ onGalleryOpen: c,
3019
+ onGalleryClose: v,
3020
+ className: l,
3021
+ style: m = {},
3022
+ children: w,
3023
+ ...C
2847
3024
  }) => {
2848
- const c = pn(b);
2849
- return Z(() => {
2850
- const m = b.eventPrefix ?? dt, g = (x) => `${m}${x}`, _ = {
2851
- [tt]: e,
2852
- [rt]: r,
2853
- [nt]: n,
2854
- [ot]: o,
2855
- [st]: a,
2856
- [at]: u,
2857
- [it]: l,
2858
- [lt]: i,
2859
- [ct]: s
2860
- }, w = /* @__PURE__ */ new Map();
2861
- return Object.entries(_).forEach(([x, N]) => {
2862
- if (!N)
3025
+ const a = te(() => {
3026
+ const h = Nn(C);
3027
+ return l && Object.assign(h, { class: l }), h;
3028
+ }, [l, C]);
3029
+ return O(() => {
3030
+ const h = C.eventPrefix ?? bt, x = (g) => `${h}${g}`, j = {
3031
+ [dt]: e,
3032
+ [ut]: r,
3033
+ [mt]: n,
3034
+ [pt]: o,
3035
+ [ht]: s,
3036
+ [ft]: u,
3037
+ [gt]: f,
3038
+ [xt]: d,
3039
+ [wt]: c,
3040
+ [vt]: v
3041
+ }, k = /* @__PURE__ */ new Map();
3042
+ return Object.entries(j).forEach(([g, p]) => {
3043
+ if (!p)
2863
3044
  return;
2864
- const C = g(x), z = (f) => N(f.detail);
2865
- w.set(C, z), document.addEventListener(C, z);
3045
+ const b = x(g), E = (L) => p(L.detail);
3046
+ k.set(b, E), document.addEventListener(b, E);
2866
3047
  }), () => {
2867
- w.forEach((x, N) => {
2868
- document.removeEventListener(N, x);
3048
+ k.forEach((g, p) => {
3049
+ document.removeEventListener(p, g);
2869
3050
  });
2870
3051
  };
2871
3052
  }, [
2872
- b.eventPrefix,
3053
+ C.eventPrefix,
2873
3054
  e,
2874
3055
  r,
2875
3056
  n,
2876
3057
  o,
2877
- a,
3058
+ s,
2878
3059
  u,
2879
- l,
2880
- i,
2881
- s
2882
- ]), /* @__PURE__ */ et.jsx("cc-webplayer", { ...c });
3060
+ f,
3061
+ d,
3062
+ c,
3063
+ v
3064
+ ]), /* @__PURE__ */ Ue.jsx("cc-webplayer", { style: { display: "block", ...m }, ...a, children: w });
3065
+ };
3066
+ qe();
3067
+ const An = ({ children: e, ...r }) => {
3068
+ const n = _n(r);
3069
+ return /* @__PURE__ */ Ue.jsx("cc-webplayer-custom-media", { ...n, children: e });
3070
+ };
3071
+ qe();
3072
+ const Pn = ({
3073
+ children: e,
3074
+ ...r
3075
+ }) => {
3076
+ const n = zn(r);
3077
+ return /* @__PURE__ */ Ue.jsx("cc-webplayer-icon", { ...n, children: e });
2883
3078
  };
2884
- Mt();
2885
- const yn = ({ name: e, color: r }) => /* @__PURE__ */ et.jsx("cc-webplayer-icon", { name: e, color: r });
2886
3079
  export {
2887
- dt as DEFAULT_EVENT_PREFIX,
2888
- rt as EVENT_COMPOSITION_LOADED,
2889
- tt as EVENT_COMPOSITION_LOADING,
2890
- nt as EVENT_COMPOSITION_LOAD_ERROR,
2891
- st as EVENT_EXTEND_MODE_OFF,
2892
- ot as EVENT_EXTEND_MODE_ON,
2893
- ct as EVENT_GALLERY_CLOSE,
2894
- lt as EVENT_GALLERY_OPEN,
2895
- it as EVENT_HOTSPOTS_OFF,
2896
- at as EVENT_HOTSPOTS_ON,
2897
- Ae as WEB_PLAYER_ICON_WC_TAG,
2898
- Ze as WEB_PLAYER_WC_TAG,
2899
- bn as WebPlayer,
2900
- yn as WebPlayerIcon,
2901
- wn as generateCompositionUrl
3080
+ bt as DEFAULT_EVENT_PREFIX,
3081
+ ut as EVENT_COMPOSITION_LOADED,
3082
+ dt as EVENT_COMPOSITION_LOADING,
3083
+ mt as EVENT_COMPOSITION_LOAD_ERROR,
3084
+ ft as EVENT_EXTEND_MODE_OFF,
3085
+ ht as EVENT_EXTEND_MODE_ON,
3086
+ vt as EVENT_GALLERY_CLOSE,
3087
+ wt as EVENT_GALLERY_OPEN,
3088
+ xt as EVENT_HOTSPOTS_OFF,
3089
+ gt as EVENT_HOTSPOTS_ON,
3090
+ pt as EVENT_ITEM_CHANGE,
3091
+ Ye as WEB_PLAYER_ICON_WC_TAG,
3092
+ Ie as WEB_PLAYER_WC_TAG,
3093
+ Rn as WebPlayer,
3094
+ An as WebPlayerCustomMedia,
3095
+ Pn as WebPlayerIcon,
3096
+ Hn as generateCompositionUrl
2902
3097
  };