@car-cutter/react-webplayer 0.7.0 → 0.9.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,2813 +1,127 @@
1
- import be, { createContext as ze, useContext as Ie, useRef as W, useState as F, useCallback as M, useEffect as Z, useMemo as te, Fragment as Pt } from "react";
2
- import { createRoot as Dt } from "react-dom/client";
3
- var et = { exports: {} }, fe = {};
4
- /**
5
- * @license React
6
- * react-jsx-runtime.production.min.js
7
- *
8
- * Copyright (c) Facebook, Inc. and its affiliates.
9
- *
10
- * This source code is licensed under the MIT license found in the
11
- * LICENSE file in the root directory of this source tree.
12
- */
13
- var Ue;
14
- function Zt() {
15
- if (Ue) return fe;
16
- Ue = 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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
18
- function d(a, l, w) {
19
- var m, c = {}, f = null, _ = null;
20
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
21
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
22
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
23
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
24
- }
25
- return fe.Fragment = n, fe.jsx = d, fe.jsxs = d, fe;
26
- }
27
- et.exports = Zt();
28
- var tt = et.exports;
29
- const Ze = "cc-webplayer", Ae = "cc-webplayer-icon", rt = "composition-loading", nt = "composition-loaded", ot = "composition-load-error", st = "item-change", at = "extend-mode-on", it = "extend-mode-off", lt = "hotspots-on", ct = "hotspots-off", dt = "gallery-open", ut = "gallery-close", At = !1, Ft = !1, Wt = !1, $t = "quality", Yt = 1, Ut = !1, mt = "cc-webplayer:", Xt = !1;
30
- function yn(e, r) {
31
- return `https://cdn.car-cutter.com/gallery/${e}/${r}/composition_v3.json`;
32
- }
33
- function Gt(e, r) {
34
- const n = e.split("/"), o = n.pop();
35
- return [n.join("/"), r, o].join("/");
36
- }
37
- var pt = { exports: {} }, xe = {};
38
- /**
39
- * @license React
40
- * react-jsx-runtime.production.min.js
41
- *
42
- * Copyright (c) Facebook, Inc. and its affiliates.
43
- *
44
- * This source code is licensed under the MIT license found in the
45
- * LICENSE file in the root directory of this source tree.
46
- */
47
- var Xe;
48
- function Bt() {
49
- if (Xe) return xe;
50
- Xe = 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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
52
- function d(a, l, w) {
53
- var m, c = {}, f = null, _ = null;
54
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
55
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
56
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
57
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
58
- }
59
- return xe.Fragment = n, xe.jsx = d, xe.jsxs = d, xe;
60
- }
61
- pt.exports = Bt();
62
- var t = pt.exports;
63
- async function qt(e) {
64
- const r = await fetch(e);
65
- if (!r.ok)
66
- throw new Error(`Failed to fetch composition: ${r.statusText}`);
67
- return await r.json();
68
- }
69
- const Oe = /* @__PURE__ */ new Map(), Kt = (e) => {
70
- const [r, n] = F({
71
- status: "pending",
72
- isSuccess: !1
73
- });
74
- return Z(() => {
75
- const o = (p) => n({ status: "success", data: p, isSuccess: !0 }), s = Oe.get(e);
76
- if (s && !(s instanceof Promise)) {
77
- o(s);
78
- return;
79
- }
80
- n({
81
- status: "fetching",
82
- isSuccess: !1
83
- }), async function() {
84
- try {
85
- let p;
86
- if (s)
87
- p = await s;
88
- else {
89
- const d = qt(e);
90
- Oe.set(e, d), p = await d, Oe.set(e, p);
91
- }
92
- o(p);
93
- } catch (p) {
94
- n({
95
- status: "error",
96
- isSuccess: !1,
97
- error: p
98
- });
99
- }
100
- }();
101
- }, [e]), r;
102
- }, ht = ze(null), re = () => {
103
- const e = Ie(ht);
104
- if (!e)
105
- throw new Error(
106
- "useCompositionContext must be used within a CompositionContextProvider"
107
- );
108
- return e;
109
- }, Jt = ({ composition: e, children: r }) => {
110
- const { aspectRatio: n, categories: o } = e, s = te(
111
- () => o.flatMap(({ items: d }) => d),
112
- [o]
113
- ), p = {
114
- aspectRatio: n.replace(":", " / ")
115
- };
116
- return /* @__PURE__ */ t.jsx(
117
- ht.Provider,
118
- {
119
- value: {
120
- ...e,
121
- items: s,
122
- aspectRatioStyle: p
123
- },
124
- children: r
125
- }
126
- );
127
- }, gt = 500, De = 0.75, _e = 1 + De * 2;
128
- function ae(e, r, n) {
129
- return Math.min(Math.max(e, r), n);
130
- }
131
- const Le = (e, r, n) => e + (r - e) * n, Ge = (e, r) => (e % r + r) % r, ft = ze(null), J = () => {
132
- const e = Ie(ft);
133
- if (!e)
134
- throw new Error(
135
- "useGlobalContext must be used within a GlobalContextProvider"
136
- );
137
- return e;
138
- }, Qt = ({ children: e, ...r }) => /* @__PURE__ */ t.jsx(ft.Provider, { value: r, children: e }), xt = ze(null), q = () => {
139
- const e = Ie(xt);
140
- if (!e)
141
- throw new Error(
142
- "useControlsContext must be used within a ControlsContextProvider"
143
- );
144
- return e;
145
- }, er = ({
146
- children: e
147
- }) => {
148
- const {
149
- infiniteCarrousel: r,
150
- preventFullScreen: n,
151
- emitEvent: o,
152
- isFullScreen: s,
153
- requestFullscreen: p,
154
- exitFullscreen: d
155
- } = J(), { categories: a, items: l } = re(), [w, m] = F(l.map(() => null)), c = M(
156
- (D, Q) => {
157
- m(
158
- (ge) => ge.map((oe, Ot) => Ot === D ? Q : oe)
159
- );
160
- },
161
- []
162
- ), [f, _] = F(0), [b, y] = F(null), L = b ?? f, x = l[L], T = w[L], [h, u] = F(
163
- null
164
- ), g = !!h, v = M(() => u(null), []), z = M(() => {
165
- if (g || b !== null)
166
- return;
167
- const D = f - 1;
168
- D >= 0 ? y(D) : r && (u("first_to_last"), y(l.length - 1));
169
- }, [
170
- g,
171
- b,
172
- f,
173
- r,
174
- l.length
175
- ]), H = M(() => {
176
- if (g || b !== null)
177
- return;
178
- const D = f + 1;
179
- D < l.length ? y(D) : r && (u("last_to_first"), y(0));
180
- }, [
181
- g,
182
- b,
183
- f,
184
- l.length,
185
- r
186
- ]), S = M(
187
- (D) => {
188
- const Q = Math.min(f, D), ge = Math.max(f, D);
189
- w.slice(Q, ge + 1).filter((oe) => oe === null).length > 2 && u("instant"), y(D);
190
- },
191
- [f, w]
192
- );
193
- Z(() => {
194
- o(st, {
195
- index: L,
196
- item: x
197
- });
198
- }, [x, o, L]);
199
- const j = te(() => {
200
- for (const D of a)
201
- if (D.items.includes(x))
202
- return D.id;
203
- throw new Error("Current item not found in any category");
204
- }, [a, x]), E = M(
205
- (D) => {
206
- const Q = a.find(({ id: oe }) => oe === D)?.items[0];
207
- if (Q === void 0)
208
- throw new Error("Failed to find target category");
209
- const ge = l.findIndex((oe) => oe === Q);
210
- S(ge);
211
- },
212
- [a, l, S]
213
- ), I = te(() => {
214
- switch (x.type) {
215
- case "image":
216
- return !!x.hotspots?.length;
217
- case "360":
218
- return T === "running";
219
- case "video":
220
- return !1;
221
- }
222
- }, [x, T]), [V, P] = F(!0), C = M(() => {
223
- const D = !V;
224
- P(D), o(D ? lt : ct);
225
- }, [o, V]), i = te(() => {
226
- switch (x.type) {
227
- case "image":
228
- case "360":
229
- return !0;
230
- case "video":
231
- return T !== "running";
232
- }
233
- }, [x, T]), [k, N] = F(!1), O = M(() => {
234
- const D = !k;
235
- N(D), o(D ? dt : ut);
236
- }, [o, k]), [A, Y] = F(null), $ = M(() => Y(null), []), K = !!A, G = te(() => {
237
- switch (x.type) {
238
- case "image":
239
- return !0;
240
- case "360":
241
- return T === "running";
242
- case "video":
243
- return !1;
244
- }
245
- }, [x.type, T]), [X, ne] = F(1), ye = X !== 1, pe = X < _e, je = X > 1, ie = M((D) => {
246
- ne((Q) => ae(Q + D, 1, _e));
247
- }, []), he = M(() => ne(1), []), Me = M(() => ie(De), [ie]), St = M(() => ie(-De), [ie]), Te = M(() => {
248
- he(), $();
249
- }, [he, $]), [le, Rt] = F(!1), [Ve, $e] = F(), [Se, Ye] = F(!1), ce = M(
250
- async (D) => {
251
- Te(), Rt(D), o(D ? at : it);
252
- },
253
- [o, Te]
254
- ), de = M(() => {
255
- clearTimeout(Ve);
256
- const D = setTimeout(() => {
257
- $e(void 0);
258
- }, gt);
259
- $e(D);
260
- }, [Ve]), Re = M(async () => {
261
- if (de(), !n) {
262
- const D = await p();
263
- if (Ye(!D), D)
264
- return;
265
- }
266
- ce(!0);
267
- }, [
268
- n,
269
- ce,
270
- p,
271
- de
272
- ]), He = M(async () => {
273
- de(), !(!n && (Ye(!1), await d())) && ce(!1);
274
- }, [
275
- n,
276
- ce,
277
- d,
278
- de
279
- ]), Ht = M(() => {
280
- le ? He() : Re();
281
- }, [He, Re, le]);
282
- return Z(() => {
283
- n || Se && le || s !== le && (de(), ce(s));
284
- }, [
285
- n,
286
- ce,
287
- le,
288
- Se,
289
- s,
290
- de
291
- ]), /* @__PURE__ */ t.jsx(
292
- xt.Provider,
293
- {
294
- value: {
295
- setItemInteraction: c,
296
- slidable: l.length > 1,
297
- carrouselItemIndex: f,
298
- setCarrouselItemIndex: _,
299
- itemIndexCommand: b,
300
- setItemIndexCommand: y,
301
- masterItemIndex: L,
302
- specialCommand: h,
303
- isRunningSpecialCommand: g,
304
- finishSpecialCommand: v,
305
- prevItem: z,
306
- nextItem: H,
307
- scrollToItemIndex: S,
308
- displayedCategoryId: j,
309
- changeCategory: E,
310
- enableHotspotsControl: I,
311
- showHotspots: V,
312
- toggleHotspots: C,
313
- showGalleryControls: i,
314
- showGallery: k,
315
- toggleGallery: O,
316
- shownDetails: A,
317
- isShowingDetails: K,
318
- setShownDetails: Y,
319
- resetShownDetails: $,
320
- showZoomControls: G,
321
- zoom: X,
322
- isZooming: ye,
323
- setZoom: ne,
324
- resetZoom: he,
325
- canZoomIn: pe,
326
- zoomIn: Me,
327
- canZoomOut: je,
328
- zoomOut: St,
329
- resetView: Te,
330
- extendMode: le,
331
- enableExtendMode: Re,
332
- disableExtendMode: He,
333
- toggleExtendMode: Ht,
334
- extendTransition: !!Ve,
335
- fakeFullScreen: Se
336
- },
337
- children: e
338
- }
339
- );
340
- }, wt = ["left", "center", "right", "fullW"], vt = ["top", "middle", "bottom", "fullH"], tr = [
341
- ...wt,
342
- ...vt,
343
- "top-left",
344
- "top-center",
345
- "top-right",
346
- "top-fullW",
347
- "middle-left",
348
- "middle-center",
349
- "middle-right",
350
- "middle-fullW",
351
- "bottom-left",
352
- "bottom-center",
353
- "bottom-right",
354
- "bottom-fullW",
355
- "fullH-left",
356
- "fullH-center",
357
- "fullH-right",
358
- "fullW-fullW"
359
- ];
360
- function rr(e) {
361
- return wt.includes(e);
362
- }
363
- function nr(e) {
364
- return vt.includes(e);
365
- }
366
- function or(e) {
367
- return tr.includes(e);
368
- }
369
- function sr(e) {
370
- if (!or(e))
371
- throw new Error(`Invalid position: ${e}`);
372
- return nr(e) ? [e, void 0] : rr(e) ? [void 0, e] : e.split("-");
373
- }
374
- function R(...e) {
375
- return e.filter((r) => !!r).map((r) => r.trim()).join(" ");
376
- }
377
- function ar(e) {
378
- switch (e) {
379
- case "left":
380
- return "left-1 small:left-2";
381
- case "right":
382
- return "right-1 small:right-2";
383
- case "center":
384
- return "left-1/2 -translate-x-1/2";
385
- case "fullW":
386
- return "inset-x-1 small:inset-x-2";
387
- }
388
- }
389
- function bt(e) {
390
- switch (e) {
391
- case "top":
392
- return "top-1 small:top-2";
393
- case "bottom":
394
- return "bottom-1 small:bottom-2";
395
- case "middle":
396
- return "top-1/2 -translate-y-1/2";
397
- case "fullH":
398
- return "inset-y-1 small:inset-y-2";
399
- }
400
- }
401
- function ir({
402
- positionX: e,
403
- positionY: r
404
- }) {
405
- const n = new Array();
406
- return e && n.push(ar(e)), r && n.push(bt(r)), n.join(" ");
407
- }
408
- function ue(e) {
409
- const [r, n] = sr(e);
410
- return ir({ positionX: n, positionY: r });
411
- }
412
- const yt = ze(null), jt = () => Ie(yt), Fe = () => {
413
- const e = jt();
414
- if (!e)
415
- throw new Error(
416
- "useCustomizationContext must be used within a CustomizationContextProvider"
417
- );
418
- return e;
419
- }, lr = ({ children: e }) => {
420
- const [r, n] = F(
421
- /* @__PURE__ */ new Map()
422
- ), o = M(
423
- (d) => {
424
- const a = r.get(d);
425
- if (a)
426
- return a;
427
- const l = document.querySelector(
428
- `${Ae}[name="${d}"]`
429
- );
430
- if (!l)
431
- return;
432
- const w = l.getAttribute("color") ?? void 0, m = l.innerHTML, c = m ? /* @__PURE__ */ t.jsx(
433
- "div",
434
- {
435
- className: "size-full",
436
- dangerouslySetInnerHTML: { __html: m }
437
- }
438
- ) : void 0;
439
- if (!(!w && !c))
440
- return { Icon: c, color: w };
441
- },
442
- [r]
443
- ), s = M(
444
- (d, a) => {
445
- n((l) => new Map(l.set(d, a)));
446
- },
447
- []
448
- ), p = M((d) => {
449
- n((a) => (a.delete(d), new Map(a)));
450
- }, []);
451
- return /* @__PURE__ */ t.jsx(
452
- yt.Provider,
453
- {
454
- value: {
455
- getIconConfig: o,
456
- setIconConfig: s,
457
- resetIconConfig: p
458
- },
459
- children: e
460
- }
461
- );
462
- }, U = ({
463
- customizationKey: e,
464
- className: r = "",
465
- children: n
466
- }) => {
467
- const { getIconConfig: o } = Fe(), s = o(e);
468
- return s ? /* @__PURE__ */ t.jsx(
469
- "div",
470
- {
471
- className: r,
472
- style: { color: s?.color },
473
- children: s?.Icon ?? n
474
- }
475
- ) : n;
476
- }, cr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_CLOSE", children: /* @__PURE__ */ t.jsx(
477
- "svg",
478
- {
479
- className: e,
480
- width: "24",
481
- height: "24",
482
- viewBox: "0 0 24 24",
483
- fill: "none",
484
- xmlns: "http://www.w3.org/2000/svg",
485
- children: /* @__PURE__ */ t.jsx(
486
- "path",
487
- {
488
- d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",
489
- fill: "currentColor"
490
- }
491
- )
492
- }
493
- ) }), dr = {
494
- fill: {
495
- primary: "bg-primary text-primary-foreground hover:opacity-80",
496
- neutral: "bg-background text-neutral-foreground hover:opacity-80"
497
- },
498
- ghost: {
499
- primary: "bg-transparent text-foreground hover:bg-primary/25",
500
- neutral: "bg-transparent text-background hover:bg-foreground/25"
501
- }
502
- }, ur = {
503
- button: "h-8 px-2",
504
- icon: "size-8 p-2"
505
- }, B = ({
506
- variant: e = "fill",
507
- shape: r = "button",
508
- color: n = "primary",
509
- className: o,
510
- children: s,
511
- ...p
512
- }) => {
513
- const d = dr[e][n], a = ur[r];
514
- return /* @__PURE__ */ t.jsx(
515
- "button",
516
- {
517
- className: R(
518
- "flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",
519
- d,
520
- a,
521
- o
522
- ),
523
- ...p,
524
- children: s
525
- }
526
- );
527
- }, Ct = (e) => /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(cr, { className: "size-full" }) }), kt = ({ text: e, className: r }) => /* @__PURE__ */ t.jsxs(
528
- "div",
529
- {
530
- className: R(
531
- "flex size-full flex-col items-center justify-center gap-y-4",
532
- r
533
- ),
534
- children: [
535
- /* @__PURE__ */ t.jsx(
536
- "img",
537
- {
538
- className: "h-20 small:h-28",
539
- src: "https://cdn.car-cutter.com/libs/web-player/v3/assets/car_placeholder.png"
540
- }
541
- ),
542
- /* @__PURE__ */ t.jsx("div", { className: "text-2xl font-bold", children: e })
543
- ]
544
- }
545
- ), mr = {
546
- primary: "border-primary",
547
- foreground: "border-foreground",
548
- background: "border-background"
549
- }, pr = {
550
- sm: "size-4 border",
551
- md: "size-8 border-2",
552
- lg: "size-12 border-4"
553
- }, Et = ({
554
- color: e = "foreground",
555
- size: r = "md"
556
- }) => {
557
- const n = mr[e], o = pr[r];
558
- return /* @__PURE__ */ t.jsx(
559
- "div",
560
- {
561
- className: R(
562
- "inline-block animate-rotation rounded-full border-b-transparent",
563
- o,
564
- n
565
- )
566
- }
567
- );
568
- }, me = ({
569
- src: e,
570
- className: r,
571
- onLoad: n,
572
- imgInPlayerWidthRatio: o = 1,
573
- onlyThumbnail: s,
574
- fadeIn: p,
575
- ...d
576
- }) => {
577
- const {
578
- minMediaWidth: a,
579
- maxMediaWidth: l,
580
- mediaLoadStrategy: w,
581
- playerInViewportWidthRatio: m
582
- } = J(), { imageHdWidth: c, imageSubWidths: f } = re(), [_, b] = te(() => {
583
- const x = f.concat(c).sort((u, g) => u - g).filter((u) => !(a && u < a || l && u > l));
584
- if (x.length === 0)
585
- throw new Error("No image widths available for the given constraints");
586
- const T = x.map((u) => `${u !== c ? Gt(e, u) : e} ${u}w`);
587
- let h;
588
- if (s)
589
- h = [`${x.shift()}px`];
590
- else {
591
- const u = 1 / (o * m);
592
- switch (w) {
593
- case "quality": {
594
- const g = x.pop();
595
- h = x.map(
596
- (v) => `(max-width: ${u * v}px) ${v}px`
597
- ), h.push(`${g}px`);
598
- break;
599
- }
600
- case "speed": {
601
- const g = x.shift();
602
- h = x.reverse().map(
603
- (v) => `(min-width: ${u * v}px) ${v}px`
604
- ), h.push(`${g}px`);
605
- break;
606
- }
607
- case "balanced": {
608
- h = [];
609
- for (let g = 0; g < x.length - 1; g++) {
610
- const v = x[g], z = x[g + 1], H = (v + z) / 2;
611
- h.push(
612
- `(max-width: ${u * H}px) ${v}px`
613
- );
614
- }
615
- h.push(`${x[x.length - 1]}px`);
616
- break;
617
- }
618
- }
619
- }
620
- return [T.join(", "), h.join(", ")];
621
- }, [
622
- c,
623
- w,
624
- f,
625
- o,
626
- l,
627
- a,
628
- s,
629
- m,
630
- e
631
- ]), [y, L] = F();
632
- return Z(() => {
633
- if (y === !0)
634
- return;
635
- const x = setTimeout(() => {
636
- L((T) => T ?? !1);
637
- }, 30);
638
- return () => clearTimeout(x);
639
- }, [y]), /* @__PURE__ */ t.jsx(
640
- "img",
641
- {
642
- src: e,
643
- srcSet: _,
644
- sizes: b,
645
- className: R(
646
- r,
647
- p && R(
648
- y !== void 0 && "transition-opacity duration-200",
649
- y === !1 && "opacity-0",
650
- y === !0 && "opacity-100"
651
- )
652
- ),
653
- onLoad: (x) => {
654
- L(!0), n?.(x);
655
- },
656
- ...d
657
- }
658
- );
659
- }, We = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLAY", children: /* @__PURE__ */ t.jsx(
660
- "svg",
661
- {
662
- className: e,
663
- viewBox: "0 0 24 24",
664
- fill: "none",
665
- stroke: "currentColor",
666
- strokeWidth: "1.5",
667
- strokeLinecap: "round",
668
- strokeLinejoin: "round",
669
- children: /* @__PURE__ */ t.jsx("polygon", { points: "6 3 20 12 6 21 6 3" })
670
- }
671
- ) }), Nt = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_360", children: /* @__PURE__ */ t.jsxs(
672
- "svg",
673
- {
674
- className: e,
675
- viewBox: "0 0 56 56",
676
- fill: "none",
677
- xmlns: "http://www.w3.org/2000/svg",
678
- children: [
679
- /* @__PURE__ */ t.jsxs("g", { clipPath: "url(#clip0_134_843)", children: [
680
- /* @__PURE__ */ t.jsx(
681
- "path",
682
- {
683
- d: "M35.2497 43.93C34.4358 43.93 33.7296 43.325 33.6241 42.4966C33.51 41.5977 34.1457 40.7765 35.0442 40.662C40.2284 40.0015 44.8709 38.5967 48.1162 36.7057C51.0843 34.9767 52.7185 32.9438 52.7185 30.9819C52.7185 28.8196 50.8062 27.0504 49.2014 25.9464C48.455 25.4329 48.2662 24.4117 48.7798 23.6649C49.2933 22.9185 50.3148 22.7297 51.0612 23.2432C54.2921 25.4657 55.9998 28.1416 55.9998 30.9823C55.9998 34.2063 53.8452 37.1659 49.7684 39.5409C46.0988 41.6789 41.1509 43.1922 35.4591 43.9172C35.3886 43.9257 35.3185 43.93 35.2497 43.93Z",
684
- fill: "currentColor"
685
- }
686
- ),
687
- /* @__PURE__ */ t.jsx(
688
- "path",
689
- {
690
- d: "M27.6 41.5797L23.225 37.2047C22.5842 36.5638 21.5455 36.5638 20.9047 37.2047C20.2642 37.8451 20.2642 38.8842 20.9047 39.5246L22.183 40.8029C17.2816 40.2966 12.8289 39.1555 9.38102 37.4973C5.50463 35.6333 3.28124 33.2582 3.28124 30.9818C3.28124 29.0511 4.87316 27.0443 7.76347 25.3311C8.5432 24.8692 8.8004 23.8626 8.33854 23.0833C7.87627 22.3036 6.86968 22.0464 6.09038 22.5083C1.05658 25.4922 0 28.7631 0 30.9818C0 34.622 2.82665 37.9861 7.95915 40.4547C11.9428 42.3701 17.0958 43.6531 22.7098 44.1495L20.9047 45.9546C20.2642 46.5951 20.2642 47.6341 20.9047 48.275C21.2251 48.595 21.6451 48.7552 22.0651 48.7552C22.4846 48.7552 22.9046 48.595 23.225 48.275L27.6 43.9C28.2405 43.2592 28.2405 42.2201 27.6 41.5797Z",
691
- fill: "currentColor"
692
- }
693
- ),
694
- /* @__PURE__ */ t.jsx(
695
- "path",
696
- {
697
- d: "M17.1827 27.6963V27.3016C17.1827 25.9092 16.3303 25.6391 15.1874 25.6391C14.4808 25.6391 14.2522 25.0158 14.2522 24.3924C14.2522 23.7687 14.4808 23.1453 15.1874 23.1453C15.977 23.1453 16.8084 23.0415 16.8084 21.3581C16.8084 20.1529 16.1227 19.8619 15.2703 19.8619C14.2522 19.8619 13.7327 20.1114 13.7327 20.9219C13.7327 21.6282 13.4208 22.1063 12.2155 22.1063C10.7193 22.1063 10.5326 21.7944 10.5326 20.7967C10.5326 19.1762 11.696 17.0771 15.2703 17.0771C17.9098 17.0771 19.9046 18.0329 19.9046 20.8386C19.9046 22.3553 19.3437 23.7687 18.3046 24.2468C19.5308 24.7039 20.4242 25.6182 20.4242 27.3016V27.6963C20.4242 31.1045 18.076 32.393 15.1665 32.393C11.5922 32.393 10.2207 30.2111 10.2207 28.4654C10.2207 27.5301 10.6155 27.2806 11.7584 27.2806C13.0884 27.2806 13.4208 27.5716 13.4208 28.3616C13.4208 29.3382 14.3355 29.5668 15.2703 29.5668C16.6836 29.5668 17.1827 29.0473 17.1827 27.6963Z",
698
- fill: "white"
699
- }
700
- ),
701
- /* @__PURE__ */ t.jsx(
702
- "path",
703
- {
704
- d: "M33.0384 27.3016V27.4887C33.0384 31.063 30.8146 32.393 27.9469 32.393C25.0792 32.393 22.8345 31.063 22.8345 27.4887V21.9815C22.8345 18.4072 25.1412 17.0771 28.134 17.0771C31.646 17.0771 33.0384 19.2591 33.0384 20.9839C33.0384 21.9815 32.5603 22.293 31.5212 22.293C30.6279 22.293 29.8379 22.0644 29.8379 21.1086C29.8379 20.3191 29.0069 19.9034 28.0302 19.9034C26.804 19.9034 26.0764 20.5477 26.0764 21.9815V23.8515C26.7416 23.1244 27.6769 22.9372 28.6745 22.9372C31.0431 22.9372 33.0384 23.9763 33.0384 27.3016ZM26.0764 27.7173C26.0764 29.1511 26.7831 29.7745 27.9469 29.7745C29.1107 29.7745 29.7964 29.1511 29.7964 27.7173V27.5301C29.7964 26.013 29.1107 25.4311 27.926 25.4311C26.804 25.4311 26.0764 25.9715 26.0764 27.343V27.7173Z",
705
- fill: "white"
706
- }
707
- ),
708
- /* @__PURE__ */ t.jsx(
709
- "path",
710
- {
711
- d: "M35.5527 27.4887V21.9815C35.5527 18.4072 37.7761 17.0771 40.6442 17.0771C43.5119 17.0771 45.7562 18.4072 45.7562 21.9815V27.4887C45.7562 31.063 43.5119 32.393 40.6442 32.393C37.7761 32.393 35.5527 31.063 35.5527 27.4887ZM42.5143 21.9815C42.5143 20.5477 41.808 19.9034 40.6442 19.9034C39.4804 19.9034 38.7947 20.5477 38.7947 21.9815V27.4887C38.7947 28.9225 39.4804 29.5668 40.6442 29.5668C41.808 29.5668 42.5143 28.9225 42.5143 27.4887V21.9815Z",
712
- fill: "white"
713
- }
714
- ),
715
- /* @__PURE__ */ t.jsx(
716
- "path",
717
- {
718
- d: "M49.6948 17.0625C46.9805 17.0625 44.7729 14.8545 44.7729 12.1406C44.7729 9.42675 46.9805 7.21875 49.6948 7.21875C52.4087 7.21875 54.6167 9.42675 54.6167 12.1406C54.6167 14.8545 52.4087 17.0625 49.6948 17.0625ZM49.6948 10.5C48.7899 10.5 48.0542 11.2361 48.0542 12.1406C48.0542 13.0455 48.7899 13.7812 49.6948 13.7812C50.5993 13.7812 51.3354 13.0455 51.3354 12.1406C51.3354 11.2361 50.5993 10.5 49.6948 10.5Z",
719
- fill: "white"
720
- }
721
- )
722
- ] }),
723
- /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_134_843", children: /* @__PURE__ */ t.jsx("rect", { width: "56", height: "56", fill: "white" }) }) })
724
- ]
725
- }
726
- ) }), Be = ({
727
- children: e
728
- }) => {
729
- const { extendMode: r } = q();
730
- return /* @__PURE__ */ t.jsx(
731
- "div",
732
- {
733
- className: R(
734
- "flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",
735
- r && "large:h-3/5 large:p-2"
736
- ),
737
- children: e
738
- }
739
- );
740
- }, hr = ({ item: e }) => {
741
- const { permanentGallery: r } = J(), { aspectRatioStyle: n } = re(), { type: o } = e;
742
- let s;
743
- switch (o) {
744
- case "360":
745
- s = e.images[0].src;
746
- break;
747
- case "image":
748
- s = e.src;
749
- break;
750
- case "video":
751
- s = e.poster;
752
- break;
753
- }
754
- const p = /* @__PURE__ */ t.jsx(
755
- me,
756
- {
757
- className: "size-full object-cover",
758
- src: s,
759
- onlyThumbnail: !0,
760
- fadeIn: !r
761
- }
762
- );
763
- let d;
764
- switch (o) {
765
- case "360":
766
- d = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(Nt, { className: "size-full text-primary-light" }) });
767
- break;
768
- case "video":
769
- d = /* @__PURE__ */ t.jsx(Be, { children: /* @__PURE__ */ t.jsx(We, { className: "size-full p-0.5 text-background" }) });
770
- break;
771
- }
772
- return /* @__PURE__ */ t.jsxs("div", { className: "relative bg-foreground/30", style: n, children: [
773
- p,
774
- d && /* @__PURE__ */ t.jsx("div", { className: "absolute inset-0 flex items-center justify-center bg-foreground/25", children: d })
775
- ] });
776
- }, gr = {
777
- primary: "bg-primary/50",
778
- neutral: "bg-neutral/50",
779
- background: "bg-background/50",
780
- foreground: "bg-foreground/50"
781
- }, Lt = ({
782
- color: e = "neutral",
783
- orientation: r = "horizontal"
784
- }) => {
785
- const n = gr[e], o = r === "horizontal" ? "h-px w-full" : "w-px h-full";
786
- return /* @__PURE__ */ t.jsx("div", { className: R(n, o) });
787
- }, _t = ({
788
- className: e = "",
789
- containerClassName: r = ""
790
- }) => {
791
- const { hideCategories: n, infiniteCarrousel: o, permanentGallery: s, isFullScreen: p } = J(), { categories: d, items: a, aspectRatioStyle: l } = re(), {
792
- extendMode: w,
793
- extendTransition: m,
794
- masterItemIndex: c,
795
- prevItem: f,
796
- nextItem: _,
797
- scrollToItemIndex: b,
798
- resetView: y
799
- } = q(), L = te(() => {
800
- if (n)
801
- return [];
802
- const j = new Array();
803
- let E = 0;
804
- for (let I = 0; I < d.length - 1; I++) {
805
- const V = d[I].items.length;
806
- j.push(E + V), E += V;
807
- }
808
- return j;
809
- }, [d, n]), x = W(null), T = M(() => {
810
- if (!x.current)
811
- throw new Error("slider.current is null");
812
- return x.current;
813
- }, []), h = W(!1), u = W(
814
- null
815
- ), [g, v] = F(!1), z = M(
816
- (j, E) => {
817
- const I = T(), V = I.clientWidth, P = I.scrollWidth / a.length, C = (j + 1 / 2) * P - V / 2, i = I.scrollWidth - I.clientWidth;
818
- I.scrollTo({
819
- left: ae(C, 0, i),
820
- behavior: E
821
- });
822
- },
823
- [a.length, T]
824
- );
825
- Z(() => {
826
- const j = x.current;
827
- if (!j)
828
- return;
829
- const E = (P) => {
830
- P.preventDefault(), h.current = !0, u.current = {
831
- x: P.pageX - j.offsetLeft,
832
- scrollLeft: j.scrollLeft
833
- };
834
- }, I = (P) => {
835
- if (!h.current)
836
- return;
837
- if (u.current === null)
838
- throw new Error("[onMouseMove] scrollStart is null");
839
- const C = P.pageX - j.offsetLeft - u.current.x;
840
- if (!g && Math.abs(C) < 5)
841
- return;
842
- const i = u.current.scrollLeft - C;
843
- v(!0), requestAnimationFrame(() => {
844
- j.scrollLeft = i;
845
- });
846
- }, V = () => {
847
- h.current && (h.current = !1, requestAnimationFrame(() => {
848
- v(!1);
849
- }));
850
- };
851
- return j.addEventListener("mousedown", E), document.addEventListener("mousemove", I), document.addEventListener("mouseleave", V), document.addEventListener("mouseup", V), document.addEventListener("contextmenu", V), () => {
852
- j.removeEventListener("mousedown", E), document.removeEventListener("mousemove", I), document.removeEventListener("mouseleave", V), document.removeEventListener("mouseup", V), document.removeEventListener("contextmenu", V);
853
- };
854
- }, [g]);
855
- const H = W(c);
856
- Z(() => {
857
- x.current && (z(c, "smooth"), H.current = c);
858
- }, [c, z]), Z(() => {
859
- x.current && z(H.current, "instant");
860
- }, [
861
- z,
862
- // - Run the effect when those values change
863
- p,
864
- w,
865
- m
866
- ]);
867
- const S = (j, E) => {
868
- g || (o && E === a.length - 1 && c === 0 ? f() : o && E === 0 && c === a.length - 1 ? _() : b(E), y());
869
- };
870
- return /* @__PURE__ */ t.jsx(
871
- "div",
872
- {
873
- ref: x,
874
- className: R(
875
- "relative w-full overflow-x-auto no-scrollbar",
876
- g ? "cursor-grab" : "cursor-grabbing",
877
- e
878
- ),
879
- children: /* @__PURE__ */ t.jsx(
880
- "div",
881
- {
882
- className: R(
883
- "flex h-10 w-fit gap-1 small:h-12 small:gap-2",
884
- w && "large:h-20 large:gap-4",
885
- r
886
- ),
887
- children: a.map((j, E) => /* @__PURE__ */ t.jsxs(Pt, { children: [
888
- L.includes(E) && /* @__PURE__ */ t.jsx("div", { className: "my-2", children: /* @__PURE__ */ t.jsx(
889
- Lt,
890
- {
891
- color: s && !p ? "neutral" : "background",
892
- orientation: "vertical"
893
- }
894
- ) }),
895
- /* @__PURE__ */ t.jsx(
896
- "div",
897
- {
898
- className: R(
899
- "relative h-full overflow-hidden rounded-gallery transition-radius",
900
- !g && "cursor-pointer",
901
- "after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",
902
- E === c ? "after:opacity-100" : "after:opacity-0 hover:after:opacity-70"
903
- ),
904
- style: l,
905
- onClick: () => S(j, E),
906
- children: /* @__PURE__ */ t.jsx(hr, { item: j })
907
- }
908
- )
909
- ] }, E))
910
- }
911
- )
912
- }
913
- );
914
- }, zt = (e) => 1 - Math.pow(1 - e, 2), qe = (e, r) => Math.sqrt(
915
- (e.clientX - r.clientX) ** 2 + (e.clientY - r.clientY) ** 2
916
- ), fr = ({
917
- onlyPreload: e,
918
- ...r
919
- }) => {
920
- const { zoom: n, isZooming: o, setZoom: s } = q(), p = W(null), d = W(null), a = M((h) => {
921
- if (!d.current)
922
- throw new Error(
923
- `[${h ?? "getTransformElementOrThrow"}] transformElementRef.current is null`
924
- );
925
- return d.current;
926
- }, []), l = W(!1), w = W(null), m = W(/* @__PURE__ */ new Map()), c = W({ x: 0, y: 0, scale: 1 }), f = W(null), _ = M(
927
- (h) => {
928
- const u = a("setTransformStyle"), {
929
- x: g,
930
- y: v,
931
- scale: z
932
- } = {
933
- ...c.current,
934
- ...h
935
- }, H = ae(z, 1, _e), S = u.clientWidth, j = u.clientHeight, E = S * H, I = j * H, V = ae(g, -(E - S), 0), P = ae(v, -(I - j), 0);
936
- c.current = { x: V, y: P, scale: H }, u.style.transform = `translate(${V}px, ${P}px) scale(${H})`;
937
- },
938
- [a]
939
- ), b = M(
940
- (h, u) => {
941
- const {
942
- x: g,
943
- y: v,
944
- scale: z
945
- } = c.current, {
946
- x: H,
947
- y: S,
948
- scale: j
949
- } = {
950
- ...c.current,
951
- ...h
952
- };
953
- f.current && (cancelAnimationFrame(f.current), f.current = null);
954
- const E = () => {
955
- _({ x: H, y: S, scale: j }), s(j);
956
- }, I = Math.abs(H - g) < 1 && Math.abs(S - v) < 1 && Math.abs(j - z) < 5e-3;
957
- if (!u || I) {
958
- E();
959
- return;
960
- }
961
- const V = (/* @__PURE__ */ new Date()).getTime(), P = () => {
962
- const C = () => {
963
- const i = (/* @__PURE__ */ new Date()).getTime() - V;
964
- if (i >= u) {
965
- E(), f.current = null;
966
- return;
967
- }
968
- const k = Math.min(i / u, 1), N = zt(k), O = Le(g, H, N), A = Le(v, S, N), Y = Le(z, j, N);
969
- _({ x: O, y: A, scale: Y }), P();
970
- };
971
- f.current = requestAnimationFrame(C);
972
- };
973
- P();
974
- },
975
- [_, s]
976
- ), y = M(
977
- (h, u) => {
978
- let { x: g, y: v } = c.current;
979
- h.x && (g += h.x), h.y && (v += h.y), b(
980
- {
981
- x: g,
982
- y: v
983
- },
984
- u
985
- );
986
- },
987
- [b]
988
- ), L = M(
989
- (h, u, g) => {
990
- const v = c.current.scale, z = ae(h, 1, _e), H = z / v, { x: S, y: j } = c.current, { x: E, y: I } = u, V = -S + E, P = -j + I, C = V * H, i = P * H, k = C - E, N = i - I, O = -k, A = -N;
991
- b(
992
- {
993
- x: O,
994
- y: A,
995
- scale: z
996
- },
997
- g
998
- );
999
- },
1000
- [b]
1001
- ), x = M(
1002
- (h) => {
1003
- const u = a(
1004
- "shiftZoomFromButton"
1005
- ), g = u.clientWidth, v = u.clientHeight;
1006
- L(
1007
- h,
1008
- {
1009
- x: g / 2,
1010
- y: v / 2
1011
- },
1012
- 200
1013
- );
1014
- },
1015
- [a, L]
1016
- ), T = M(
1017
- (h, u, g) => {
1018
- const { scale: v } = c.current;
1019
- L(
1020
- v + h,
1021
- u,
1022
- g
1023
- );
1024
- },
1025
- [L]
1026
- );
1027
- return Z(() => {
1028
- e || d.current && x(n);
1029
- }, [e, x, n]), Z(() => {
1030
- if (e || !o)
1031
- return;
1032
- const h = d.current;
1033
- if (!h)
1034
- return;
1035
- const u = (z) => {
1036
- z.preventDefault(), z.stopPropagation(), l.current = !0, w.current = {
1037
- x: z.clientX,
1038
- y: z.clientY
1039
- };
1040
- }, g = (z) => {
1041
- if (!l.current)
1042
- return;
1043
- if (!w.current)
1044
- throw new Error("mouseStartXY.current is null");
1045
- z.stopPropagation();
1046
- const H = z.clientX - w.current.x, S = z.clientY - w.current.y;
1047
- y({
1048
- x: H,
1049
- y: S
1050
- }), w.current = {
1051
- x: z.clientX,
1052
- y: z.clientY
1053
- };
1054
- }, v = () => {
1055
- l.current = !1;
1056
- };
1057
- return h.addEventListener("mousedown", u), document.addEventListener("mousemove", g), document.addEventListener("mouseleave", v), document.addEventListener("mouseup", v), document.addEventListener("contextmenu", v), () => {
1058
- h.removeEventListener("mousedown", u), document.removeEventListener("mousemove", g), document.removeEventListener("mouseleave", v), document.removeEventListener("mouseup", v), document.removeEventListener("contextmenu", v);
1059
- };
1060
- }, [o, y, e]), Z(() => {
1061
- if (e)
1062
- return;
1063
- const h = p.current;
1064
- if (!h)
1065
- return;
1066
- const u = (g) => {
1067
- const { ctrlKey: v, clientX: z, clientY: H, deltaX: S, deltaY: j } = g;
1068
- if (v) {
1069
- if (!o && j >= 0)
1070
- return;
1071
- const { left: E, top: I } = h.getBoundingClientRect(), V = z - E, P = H - I;
1072
- T(-0.01 * j, {
1073
- x: V,
1074
- y: P
1075
- });
1076
- } else {
1077
- if (!o)
1078
- return;
1079
- y({
1080
- x: -2 * S,
1081
- y: -2 * j
1082
- });
1083
- }
1084
- g.preventDefault();
1085
- };
1086
- return h.addEventListener("wheel", u), () => {
1087
- h.removeEventListener("wheel", u);
1088
- };
1089
- }, [o, y, T, e]), Z(() => {
1090
- const h = p.current, u = d.current;
1091
- if (!h || !u)
1092
- return;
1093
- const g = m.current, v = (S) => {
1094
- for (let j = 0; j < S.changedTouches.length; j++) {
1095
- const E = S.changedTouches[j];
1096
- g.set(E.identifier, E);
1097
- }
1098
- }, z = (S) => {
1099
- for (let j = 0; j < S.changedTouches.length; j++) {
1100
- const E = S.changedTouches[j];
1101
- g.delete(E.identifier);
1102
- }
1103
- }, H = (S) => {
1104
- const j = S.touches.length;
1105
- if (j === 1) {
1106
- if (!o)
1107
- return;
1108
- S.preventDefault();
1109
- const E = S.touches[0], I = g.get(E.identifier);
1110
- if (!I)
1111
- throw new Error("touchStart is null");
1112
- const V = E.clientX - I.clientX, P = E.clientY - I.clientY;
1113
- y({
1114
- x: V,
1115
- y: P
1116
- }), g.set(E.identifier, E);
1117
- } else if (j === 2) {
1118
- S.preventDefault();
1119
- const [E, I] = S.touches, V = g.get(E.identifier), P = g.get(I.identifier);
1120
- if (!V || !P)
1121
- throw new Error("intialTouch1 or intialTouch2 is null");
1122
- const C = qe(
1123
- V,
1124
- P
1125
- ), i = qe(E, I) / C, { left: k, top: N } = h.getBoundingClientRect();
1126
- T(i - 1, {
1127
- x: (E.clientX + I.clientX) / 2 - k,
1128
- y: (E.clientY + I.clientY) / 2 - N
1129
- }), g.set(E.identifier, E), g.set(I.identifier, I);
1130
- }
1131
- };
1132
- return u.addEventListener("touchstart", v), u.addEventListener("touchmove", H), u.addEventListener("touchend", z), u.addEventListener("touchcancel", z), () => {
1133
- u.removeEventListener("touchstart", v), u.removeEventListener("touchmove", H), u.removeEventListener("touchend", z), u.removeEventListener("touchcancel", z);
1134
- };
1135
- }, [o, y, T]), /* @__PURE__ */ t.jsx(
1136
- "div",
1137
- {
1138
- ref: p,
1139
- className: `relative size-full overflow-hidden ${o ? "z-zoomed-image cursor-move" : ""}`,
1140
- children: /* @__PURE__ */ t.jsx(
1141
- "div",
1142
- {
1143
- ref: d,
1144
- className: "origin-top-left",
1145
- children: /* @__PURE__ */ t.jsx(
1146
- me,
1147
- {
1148
- ...r,
1149
- imgInPlayerWidthRatio: e ? 1 : n
1150
- }
1151
- )
1152
- }
1153
- )
1154
- }
1155
- );
1156
- }, xr = ({ 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(
1157
- "path",
1158
- {
1159
- 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",
1160
- fill: "currentColor"
1161
- }
1162
- ) }) }), wr = ({ hotspot: e }) => {
1163
- const { title: r, icon: n, description: o, position: s, detail: p } = e, { getIconConfig: d } = Fe(), a = n ? d(n) : void 0, { extendMode: l, setShownDetails: w } = q(), m = !!p, c = p?.type === "image", f = !!r || !!o, _ = c ? /* @__PURE__ */ t.jsx(xr, { className: "size-4" }) : /* @__PURE__ */ t.jsx("div", { className: "size-1" }), b = () => {
1164
- c && w({
1165
- src: p.src,
1166
- title: r,
1167
- text: o
1168
- });
1169
- };
1170
- return /* @__PURE__ */ t.jsxs(
1171
- "div",
1172
- {
1173
- className: R(
1174
- "group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",
1175
- m ? "cursor-pointer" : "cursor-help"
1176
- ),
1177
- style: {
1178
- top: `${100 * e.position.y}%`,
1179
- left: `${100 * e.position.x}%`
1180
- },
1181
- onClick: b,
1182
- children: [
1183
- /* @__PURE__ */ t.jsxs(
1184
- "div",
1185
- {
1186
- className: "relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",
1187
- style: { backgroundColor: a?.color },
1188
- children: [
1189
- /* @__PURE__ */ t.jsx(
1190
- "div",
1191
- {
1192
- className: "pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background"
1193
- }
1194
- ),
1195
- a?.Icon ? /* @__PURE__ */ t.jsx("div", { className: "size-5", children: a.Icon }) : /* @__PURE__ */ t.jsx("div", { className: "p-1", children: _ })
1196
- ]
1197
- }
1198
- ),
1199
- !c && f && /* @__PURE__ */ t.jsx(
1200
- "div",
1201
- {
1202
- className: R(
1203
- "absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",
1204
- l && "large:max-w-56",
1205
- s.y < 0.55 ? "-top-1" : "-bottom-1",
1206
- s.x < 0.55 ? "-left-1 pl-6 small:pl-8" : "-right-1 pr-4 small:pr-6",
1207
- "pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"
1208
- ),
1209
- children: /* @__PURE__ */ t.jsxs("div", { className: "space-y-1 text-pretty", children: [
1210
- r && /* @__PURE__ */ t.jsx("div", { className: "text-sm font-semibold small:text-base small:font-bold", children: r }),
1211
- o && /* @__PURE__ */ t.jsx("div", { className: "text-xs text-foreground/65 small:text-sm", children: o })
1212
- ] })
1213
- }
1214
- )
1215
- ]
1216
- }
1217
- );
1218
- }, vr = ({ hotspot: e }) => {
1219
- const { icon: r, detail: n } = e;
1220
- let o;
1221
- switch (r) {
1222
- case "WINDOW STICKER":
1223
- o = /* @__PURE__ */ t.jsx(
1224
- "img",
1225
- {
1226
- className: "h-10",
1227
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/window_sticker.png",
1228
- alt: "Window sticker"
1229
- }
1230
- );
1231
- break;
1232
- case "CARFAX":
1233
- o = /* @__PURE__ */ t.jsx(
1234
- "img",
1235
- {
1236
- className: "h-10",
1237
- src: "https://cdn.car-cutter.com/libs/web-player/v2/assets/images/customers/autonation/carfax.png",
1238
- alt: "Carfax"
1239
- }
1240
- );
1241
- break;
1242
- default:
1243
- o = /* @__PURE__ */ t.jsx(wr, { hotspot: e });
1244
- break;
1245
- }
1246
- switch (n?.type) {
1247
- case "link":
1248
- case "pdf":
1249
- return /* @__PURE__ */ t.jsx("a", { href: n.src, target: "_blank", rel: "noreferrer", children: o });
1250
- default:
1251
- return o;
1252
- }
1253
- }, It = ({
1254
- hotspots: e,
1255
- itemIndex: r,
1256
- className: n,
1257
- onLoad: o,
1258
- ...s
1259
- }) => {
1260
- const { isShowingDetails: p, showHotspots: d, setItemInteraction: a } = q();
1261
- return /* @__PURE__ */ t.jsx("div", { className: R("relative size-full overflow-hidden", n), children: /* @__PURE__ */ t.jsxs(
1262
- "div",
1263
- {
1264
- className: R(
1265
- "size-full duration-details",
1266
- p ? "scale-105" : "scale-100"
1267
- ),
1268
- children: [
1269
- /* @__PURE__ */ t.jsx(
1270
- fr,
1271
- {
1272
- className: "size-full object-cover",
1273
- onLoad: (l) => {
1274
- r !== void 0 && a(r, "ready"), o?.(l);
1275
- },
1276
- ...s
1277
- }
1278
- ),
1279
- d && e?.map((l, w) => /* @__PURE__ */ t.jsx(vr, { hotspot: l }, w))
1280
- ]
1281
- }
1282
- ) });
1283
- }, we = 10, br = 15, yr = ({
1284
- images: e,
1285
- onlyPreload: r
1286
- }) => {
1287
- const { reverse360: n } = J(), { isShowingDetails: o, isZooming: s } = q(), p = s || o, d = W(null), a = W(null), [l, w] = F(0), m = e.length, c = M(() => {
1288
- w((_) => (_ - 1 + m) % m);
1289
- }, [m]), f = M(() => {
1290
- w((_) => (_ + 1) % m);
1291
- }, [m]);
1292
- return Z(() => {
1293
- if (p)
1294
- return;
1295
- const _ = d.current, b = a.current;
1296
- if (!_ || !b)
1297
- return;
1298
- let y = null, L = [], x = null;
1299
- const T = (i) => {
1300
- L.push(i), L.length > 20 && L.shift();
1301
- }, h = () => {
1302
- const i = Date.now(), k = (() => {
1303
- const Y = Date.now(), $ = L.filter(
1304
- (X) => Y - X.timestamp < 50
1305
- );
1306
- if ($.length < 2)
1307
- return 0;
1308
- const K = $[0], G = $[$.length - 1];
1309
- return (G.value - K.value) / (1e-3 * Math.max(G.timestamp - K.timestamp, 1));
1310
- })();
1311
- let N = 0, O = i;
1312
- const A = () => {
1313
- x = requestAnimationFrame(() => {
1314
- const Y = Date.now(), $ = (Y - i) / 1e3, K = Math.pow(0.05, $), G = k * K, X = (Y - O) / 1e3;
1315
- if (N += G * X, Math.abs(G) < 5 * we && Math.abs(N) < we) {
1316
- x = null;
1317
- return;
1318
- }
1319
- Math.abs(N) >= we && (N > 0 !== n ? f() : c(), N = 0), O = Y, A();
1320
- });
1321
- };
1322
- A();
1323
- }, u = () => {
1324
- x && (cancelAnimationFrame(x), x = null);
1325
- }, g = (i) => {
1326
- if (i.button !== 0)
1327
- return;
1328
- i.preventDefault(), i.stopPropagation(), u();
1329
- const k = i.clientX;
1330
- y = k, L = [{ timestamp: Date.now(), value: k }];
1331
- }, v = (i) => {
1332
- if (y === null)
1333
- return;
1334
- i.stopPropagation();
1335
- const { clientX: k } = i;
1336
- T({ timestamp: Date.now(), value: k });
1337
- const N = k - y;
1338
- Math.abs(N) < we || (N > 0 !== n ? f() : c(), y = k);
1339
- }, z = () => {
1340
- y !== null && (y = null, h());
1341
- };
1342
- _.addEventListener("mousedown", g), document.addEventListener("mousemove", v), document.addEventListener("mouseleave", z), document.addEventListener("mouseup", z), document.addEventListener("contextmenu", z);
1343
- const H = () => b.getBoundingClientRect().width, S = () => b.scrollWidth / 2 - H() / 2, j = () => {
1344
- const i = S();
1345
- b.scrollLeft = i;
1346
- };
1347
- j();
1348
- const E = () => {
1349
- const i = b.scrollLeft - S();
1350
- Math.abs(i) < br || (i < 0 !== n ? f() : c(), j());
1351
- };
1352
- b.addEventListener("scroll", E);
1353
- let I = null;
1354
- const V = (i) => {
1355
- if (I !== null || i.changedTouches.length !== 1)
1356
- return;
1357
- u();
1358
- const { identifier: k, clientX: N } = i.changedTouches[0];
1359
- I = k, y = N, L = [{ timestamp: Date.now(), value: N }];
1360
- }, P = (i) => {
1361
- if (!y)
1362
- return;
1363
- const k = Array.from(i.changedTouches).find(
1364
- ({ identifier: A }) => A === I
1365
- );
1366
- if (!k)
1367
- return;
1368
- i.preventDefault();
1369
- const { clientX: N } = k;
1370
- T({ timestamp: Date.now(), value: N });
1371
- const O = N - y;
1372
- Math.abs(O) < we || (O > 0 !== n ? f() : c(), y = N);
1373
- }, C = (i) => {
1374
- !y || !Array.from(i.changedTouches).some(
1375
- ({ identifier: k }) => k === I
1376
- ) || (I = null, y = null, h());
1377
- };
1378
- return b.addEventListener("touchstart", V), b.addEventListener("touchmove", P), b.addEventListener("touchend", C), b.addEventListener("touchcancel", C), () => {
1379
- _.removeEventListener("mousedown", g), document.removeEventListener("mousemove", v), document.removeEventListener("mouseleave", z), document.removeEventListener("mouseup", z), document.removeEventListener("contextmenu", z), b.removeEventListener("scroll", E), b.removeEventListener("touchstart", V), b.removeEventListener("touchmove", P), b.removeEventListener("touchend", C), b.removeEventListener("touchcancel", C);
1380
- };
1381
- }, [f, c, p, n]), /* @__PURE__ */ t.jsx("div", { ref: d, className: "cursor-ew-resize", children: /* @__PURE__ */ t.jsxs("div", { ref: a, className: "overflow-x-scroll no-scrollbar", children: [
1382
- /* @__PURE__ */ t.jsxs("div", { className: "sticky left-0 top-0", children: [
1383
- e.map((_) => /* @__PURE__ */ t.jsx(
1384
- me,
1385
- {
1386
- src: _.src,
1387
- className: "pointer-events-none !absolute left-0 top-0 -z-10"
1388
- },
1389
- _.src
1390
- )),
1391
- /* @__PURE__ */ t.jsx(It, { ...e[l], onlyPreload: r })
1392
- ] }),
1393
- /* @__PURE__ */ t.jsx("div", { className: "pointer-events-none -mt-px h-px w-[calc(100%+1024px)]" })
1394
- ] }) });
1395
- }, jr = ({ images: e, onPlaceholderImageLoaded: r, onSpinImagesLoaded: n, onError: o }) => {
1396
- const s = te(() => e.map(({ src: m }) => m), [e]), [p, d] = F(null), a = p ? [...p.values()].filter((m) => m).length / e.length * 100 : null, l = M(() => {
1397
- a === null && d(new Map(s.map((m) => [m, !1])));
1398
- }, [s, a]), w = M((m) => {
1399
- d((c) => {
1400
- const f = new Map(c);
1401
- return f.set(m, !0), f;
1402
- });
1403
- }, []);
1404
- return Z(() => {
1405
- a === 100 && n();
1406
- }, [a, n]), /* @__PURE__ */ t.jsxs("div", { className: "relative size-full", children: [
1407
- a !== null && a !== 100 && // Add images to DOM to preload them
1408
- /* @__PURE__ */ t.jsx("div", { className: "hidden", children: s.map((m) => /* @__PURE__ */ t.jsx(
1409
- me,
1410
- {
1411
- src: m,
1412
- onLoad: () => w(m),
1413
- onError: o
1414
- },
1415
- m
1416
- )) }),
1417
- /* @__PURE__ */ t.jsx(
1418
- me,
1419
- {
1420
- className: "size-full",
1421
- src: s[0],
1422
- onLoad: r
1423
- }
1424
- ),
1425
- /* @__PURE__ */ t.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35", children: [
1426
- /* @__PURE__ */ t.jsx(Nt, { className: "size-20 text-primary-light" }),
1427
- /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", onClick: l, children: /* @__PURE__ */ t.jsx(We, { className: "size-full" }) }),
1428
- /* @__PURE__ */ t.jsx(
1429
- "div",
1430
- {
1431
- className: R(
1432
- "relative h-1 w-3/5 overflow-hidden rounded-full bg-background",
1433
- a === null && "invisible"
1434
- ),
1435
- children: /* @__PURE__ */ t.jsx(
1436
- "div",
1437
- {
1438
- className: "h-full bg-primary transition-[width]",
1439
- style: { width: `${a ?? 0}%` }
1440
- }
1441
- )
1442
- }
1443
- )
1444
- ] })
1445
- ] });
1446
- }, Cr = (e) => {
1447
- const { itemIndex: r } = e, { setItemInteraction: n } = q(), [o, s] = F();
1448
- return Z(() => {
1449
- o === null || o === "error" || n(r, o === "spin" ? "running" : "ready");
1450
- }, [r, n, o]), o === "error" ? /* @__PURE__ */ t.jsx(
1451
- kt,
1452
- {
1453
- className: "text-background",
1454
- text: "Spin could not be loaded"
1455
- }
1456
- ) : o !== "spin" ? /* @__PURE__ */ t.jsx(
1457
- jr,
1458
- {
1459
- ...e,
1460
- onPlaceholderImageLoaded: () => s("placeholder"),
1461
- onSpinImagesLoaded: () => s("spin"),
1462
- onError: () => s("error")
1463
- }
1464
- ) : /* @__PURE__ */ t.jsx(yr, { ...e });
1465
- }, kr = (e) => /* @__PURE__ */ t.jsx(B, { color: "neutral", shape: "icon", ...e, children: /* @__PURE__ */ t.jsx(We, { className: "size-full" }) }), Er = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PAUSE", children: /* @__PURE__ */ t.jsx(
1466
- "svg",
1467
- {
1468
- className: e,
1469
- width: "16",
1470
- height: "16",
1471
- viewBox: "0 0 16 16",
1472
- fill: "none",
1473
- xmlns: "http://www.w3.org/2000/svg",
1474
- children: /* @__PURE__ */ t.jsx(
1475
- "path",
1476
- {
1477
- d: "M4 12.6667H6.66667V3.33333H4V12.6667ZM9.33333 3.33333V12.6667H12V3.33333H9.33333Z",
1478
- fill: "currentColor"
1479
- }
1480
- )
1481
- }
1482
- ) }), Nr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME", children: /* @__PURE__ */ t.jsx(
1483
- "svg",
1484
- {
1485
- className: e,
1486
- width: "16",
1487
- height: "16",
1488
- viewBox: "0 0 16 16",
1489
- fill: "none",
1490
- xmlns: "http://www.w3.org/2000/svg",
1491
- children: /* @__PURE__ */ t.jsx(
1492
- "path",
1493
- {
1494
- d: "M2 6V10H4.66667L8 13.3333V2.66667L4.66667 6H2ZM11 8C11 6.82 10.32 5.80667 9.33333 5.31334V10.68C10.32 10.1933 11 9.18 11 8ZM9.33333 2.15334V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 8C14 5.14667 12.0067 2.76 9.33333 2.15334Z",
1495
- fill: "currentColor"
1496
- }
1497
- )
1498
- }
1499
- ) }), Lr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_VOLUME_OFF", children: /* @__PURE__ */ t.jsx(
1500
- "svg",
1501
- {
1502
- className: e,
1503
- width: "16",
1504
- height: "16",
1505
- viewBox: "0 0 16 16",
1506
- fill: "none",
1507
- xmlns: "http://www.w3.org/2000/svg",
1508
- children: /* @__PURE__ */ t.jsx(
1509
- "path",
1510
- {
1511
- d: "M11 8C11 6.82 10.32 5.80667 9.33333 5.31333V6.78667L10.9667 8.42C10.9867 8.28667 11 8.14667 11 8ZM12.6667 8C12.6667 8.62667 12.5333 9.21333 12.3067 9.76L13.3133 10.7667C13.7533 9.94 14 9 14 8C14 5.14667 12.0067 2.76 9.33333 2.15333V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8ZM2.84667 2L2 2.84667L5.15333 6H2V10H4.66667L8 13.3333V8.84667L10.8333 11.68C10.3867 12.0267 9.88667 12.3 9.33333 12.4667V13.84C10.2533 13.6333 11.0867 13.2067 11.7933 12.6333L13.1533 14L14 13.1533L2.84667 2ZM8 2.66667L6.60667 4.06L8 5.45333V2.66667Z",
1512
- fill: "currentColor"
1513
- }
1514
- )
1515
- }
1516
- ) }), Ke = ({ progress: e }) => /* @__PURE__ */ t.jsx("div", { className: "h-1 w-full overflow-hidden rounded-ui-sm bg-background/25", children: /* @__PURE__ */ t.jsx(
1517
- "div",
1518
- {
1519
- className: "size-full rounded-ui-sm bg-background transition-transform",
1520
- style: { transform: `translateX(-${100 * (1 - e)}%)` }
1521
- }
1522
- ) }), _r = 3e3, zr = ({ src: e, poster: r, itemIndex: n }) => {
1523
- const { carrouselItemIndex: o, setItemInteraction: s } = q(), p = W(null), d = W(null), a = M(() => {
1524
- if (!d.current)
1525
- throw new Error("videoRef.current is null");
1526
- return d.current;
1527
- }, []);
1528
- Z(() => {
1529
- s(n, "ready");
1530
- }, [n, s]);
1531
- const l = M(() => {
1532
- a().play();
1533
- }, [a]), w = M(() => {
1534
- a().pause();
1535
- }, [a]);
1536
- Z(() => {
1537
- o === n || w();
1538
- }, [o, n, w]);
1539
- const [m, c] = F(!1), [f, _] = F(!0), b = () => {
1540
- c(!0), s(n, "running");
1541
- }, y = () => {
1542
- c(!1), s(n, "ready");
1543
- }, L = () => {
1544
- _(!1);
1545
- }, x = () => {
1546
- _(!0);
1547
- }, [T, h] = F(null), u = (i) => {
1548
- const k = a(), N = i.currentTarget.getBoundingClientRect(), O = (i.clientX - N.left) / N.width, A = Math.min(1, Math.max(0, O));
1549
- k.volume = A, k.muted = !1;
1550
- }, g = (i) => {
1551
- const k = a();
1552
- k.muted = i;
1553
- };
1554
- Z(() => {
1555
- const i = d.current;
1556
- if (!i)
1557
- return;
1558
- const k = () => {
1559
- h({
1560
- volume: i.volume,
1561
- isMuted: i.muted
1562
- });
1563
- };
1564
- return k(), i.addEventListener("volumechange", k), () => {
1565
- i.removeEventListener("volumechange", k);
1566
- };
1567
- }, []);
1568
- const [v, z] = F(null), H = v ? v.currentTime / v.duration : 0;
1569
- Z(() => {
1570
- const i = d.current;
1571
- if (!i) return;
1572
- const k = () => {
1573
- const N = i.currentTime, O = i.duration;
1574
- isNaN(N) || isNaN(O) || z({
1575
- currentTime: N,
1576
- duration: O
1577
- });
1578
- };
1579
- return k(), i.addEventListener("timeupdate", k), () => {
1580
- i.removeEventListener("timeupdate", k);
1581
- };
1582
- }, []);
1583
- const S = (i) => {
1584
- const k = a(), N = i.currentTarget.getBoundingClientRect(), O = (i.clientX - N.left) / N.width, A = k.duration * O;
1585
- k.currentTime = A;
1586
- }, j = (i) => {
1587
- const k = Math.floor(i % 3600 / 60), N = Math.floor(i % 60);
1588
- return `${k}:${N.toString().padStart(2, "0")}`;
1589
- }, [E, I] = F(!1), V = W(void 0), P = M(
1590
- () => clearTimeout(V.current),
1591
- []
1592
- ), C = M(() => {
1593
- P(), V.current = setTimeout(() => {
1594
- I(!1);
1595
- }, _r);
1596
- }, [P]);
1597
- return Z(() => {
1598
- const i = p.current, k = d.current;
1599
- if (!i || !k)
1600
- return;
1601
- const N = () => {
1602
- C(), I(!0);
1603
- }, O = () => {
1604
- P(), I(!1);
1605
- };
1606
- let A = !1;
1607
- const Y = () => {
1608
- A = !0;
1609
- }, $ = () => {
1610
- A && (A = !1, w());
1611
- }, K = () => {
1612
- A = !1, N();
1613
- }, G = (X) => {
1614
- X.preventDefault(), X.touches.length === 1 && (C(), I((ne) => !ne));
1615
- };
1616
- return i.addEventListener("mousedown", Y), i.addEventListener("mouseup", $), i.addEventListener("mouseenter", N), i.addEventListener("mousemove", K), i.addEventListener("mouseleave", O), k.addEventListener("touchstart", G), () => {
1617
- i.removeEventListener("mousedown", Y), i.removeEventListener("mouseup", $), i.removeEventListener("mouseenter", N), i.removeEventListener("mousemove", N), i.removeEventListener("mouseleave", O), k.removeEventListener("touchstart", G);
1618
- };
1619
- }, [P, w, C]), /* @__PURE__ */ t.jsxs("div", { ref: p, className: "relative size-full", children: [
1620
- /* @__PURE__ */ t.jsx(
1621
- "video",
1622
- {
1623
- ref: d,
1624
- className: "size-full",
1625
- src: e,
1626
- poster: r,
1627
- disablePictureInPicture: !0,
1628
- playsInline: !0,
1629
- onPlay: b,
1630
- onPause: y,
1631
- onEnded: y,
1632
- onCanPlay: L,
1633
- onWaiting: x
1634
- }
1635
- ),
1636
- m ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1637
- /* @__PURE__ */ t.jsxs(
1638
- "div",
1639
- {
1640
- className: R(
1641
- "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",
1642
- E ? "pointer-events-auto opacity-100" : "pointer-events-none opacity-0"
1643
- ),
1644
- onMouseDownCapture: (i) => i.stopPropagation(),
1645
- children: [
1646
- /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between text-background", children: [
1647
- /* @__PURE__ */ t.jsxs(
1648
- "div",
1649
- {
1650
- className: "flex items-center gap-x-4",
1651
- children: [
1652
- /* @__PURE__ */ t.jsx(
1653
- B,
1654
- {
1655
- shape: "icon",
1656
- variant: "ghost",
1657
- color: "neutral",
1658
- onClick: w,
1659
- children: /* @__PURE__ */ t.jsx(Er, { className: "size-full" })
1660
- }
1661
- ),
1662
- v && /* @__PURE__ */ t.jsxs("span", { className: "text-sm", children: [
1663
- j(v.currentTime),
1664
- " /",
1665
- " ",
1666
- j(v.duration)
1667
- ] })
1668
- ]
1669
- }
1670
- ),
1671
- T && /* @__PURE__ */ t.jsxs(
1672
- "div",
1673
- {
1674
- className: "group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",
1675
- children: [
1676
- /* @__PURE__ */ t.jsx(
1677
- "div",
1678
- {
1679
- className: `w-12 cursor-pointer py-1 opacity-0 transition-opacity ${T.isMuted ? "group-hover/volume:opacity-50" : "group-hover/volume:opacity-100"}`,
1680
- onClick: u,
1681
- children: /* @__PURE__ */ t.jsx(Ke, { progress: T.volume })
1682
- }
1683
- ),
1684
- /* @__PURE__ */ t.jsx(
1685
- "div",
1686
- {
1687
- className: "size-5 cursor-pointer",
1688
- onClick: () => g(!T.isMuted),
1689
- children: T.isMuted ? /* @__PURE__ */ t.jsx(Lr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Nr, { className: "size-full" })
1690
- }
1691
- )
1692
- ]
1693
- }
1694
- )
1695
- ] }),
1696
- /* @__PURE__ */ t.jsx(
1697
- "div",
1698
- {
1699
- className: "cursor-pointer py-1",
1700
- onClick: S,
1701
- children: /* @__PURE__ */ t.jsx(Ke, { progress: H })
1702
- }
1703
- )
1704
- ]
1705
- }
1706
- ),
1707
- f && /* @__PURE__ */ t.jsx(
1708
- "div",
1709
- {
1710
- className: "pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",
1711
- children: /* @__PURE__ */ t.jsx(Et, { size: "lg", color: "background" })
1712
- }
1713
- )
1714
- ] }) : /* @__PURE__ */ t.jsx(
1715
- "div",
1716
- {
1717
- className: "absolute inset-0 flex items-center justify-center bg-foreground/25",
1718
- children: /* @__PURE__ */ t.jsx(kr, { onClick: l })
1719
- }
1720
- )
1721
- ] });
1722
- }, Ir = ({ index: e, item: r, isShown: n }) => {
1723
- const { type: o } = r;
1724
- let s;
1725
- switch (o) {
1726
- case "image":
1727
- s = /* @__PURE__ */ t.jsx(It, { itemIndex: e, onlyPreload: !n, ...r });
1728
- break;
1729
- case "video":
1730
- s = /* @__PURE__ */ t.jsx(zr, { itemIndex: e, ...r });
1731
- break;
1732
- case "360":
1733
- s = /* @__PURE__ */ t.jsx(Cr, { itemIndex: e, onlyPreload: !n, ...r });
1734
- break;
1735
- }
1736
- return s = /* @__PURE__ */ t.jsx("div", { className: R("-ml-px h-full w-[calc(100%+2px)]"), children: s }), s;
1737
- }, Mr = (e) => {
1738
- Z(() => {
1739
- const r = (n) => {
1740
- n.key === "Escape" && e();
1741
- };
1742
- return addEventListener("keydown", r), () => {
1743
- removeEventListener("keydown", r);
1744
- };
1745
- }, [e]);
1746
- };
1747
- function Tr(e) {
1748
- return e.target === e.currentTarget;
1749
- }
1750
- const Vr = ({ 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: [
1751
- /* @__PURE__ */ t.jsx("span", { children: e + 1 }),
1752
- /* @__PURE__ */ t.jsx("span", { children: "/" }),
1753
- /* @__PURE__ */ t.jsx("span", { children: r + 1 })
1754
- ] }), Je = ({ 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(
1755
- "path",
1756
- {
1757
- d: "M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",
1758
- fill: "currentColor"
1759
- }
1760
- ) }) }), 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(
1761
- "path",
1762
- {
1763
- 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",
1764
- fill: "currentColor"
1765
- }
1766
- ) }) }), Rr = ({ 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(
1767
- "path",
1768
- {
1769
- 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",
1770
- fill: "currentColor"
1771
- }
1772
- ) }) }), Hr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_HOTSPOTS", children: /* @__PURE__ */ t.jsxs(
1773
- "svg",
1774
- {
1775
- className: e,
1776
- width: "12",
1777
- height: "12",
1778
- viewBox: "0 0 12 12",
1779
- fill: "none",
1780
- xmlns: "http://www.w3.org/2000/svg",
1781
- children: [
1782
- /* @__PURE__ */ t.jsx("g", { clipPath: "url(#clip0_418_982)", children: /* @__PURE__ */ t.jsx(
1783
- "path",
1784
- {
1785
- d: "M6 4C4.895 4 4 4.895 4 6C4 7.105 4.895 8 6 8C7.105 8 8 7.105 8 6C8 4.895 7.105 4 6 4ZM10.47 5.5C10.24 3.415 8.585 1.76 6.5 1.53V0.5H5.5V1.53C3.415 1.76 1.76 3.415 1.53 5.5H0.5V6.5H1.53C1.76 8.585 3.415 10.24 5.5 10.47V11.5H6.5V10.47C8.585 10.24 10.24 8.585 10.47 6.5H11.5V5.5H10.47ZM6 9.5C4.065 9.5 2.5 7.935 2.5 6C2.5 4.065 4.065 2.5 6 2.5C7.935 2.5 9.5 4.065 9.5 6C9.5 7.935 7.935 9.5 6 9.5Z",
1786
- fill: "currentColor"
1787
- }
1788
- ) }),
1789
- /* @__PURE__ */ t.jsx("defs", { children: /* @__PURE__ */ t.jsx("clipPath", { id: "clip0_418_982", children: /* @__PURE__ */ t.jsx("rect", { width: "12", height: "12", fill: "white" }) }) })
1790
- ]
1791
- }
1792
- ) }), Or = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_MINUS", children: /* @__PURE__ */ t.jsx(
1793
- "svg",
1794
- {
1795
- className: e,
1796
- width: "16",
1797
- height: "16",
1798
- viewBox: "0 0 16 16",
1799
- fill: "none",
1800
- xmlns: "http://www.w3.org/2000/svg",
1801
- children: /* @__PURE__ */ t.jsx(
1802
- "path",
1803
- {
1804
- d: "M12.6666 8.66634H3.33325V7.33301H12.6666V8.66634Z",
1805
- fill: "currentColor"
1806
- }
1807
- )
1808
- }
1809
- ) }), Pr = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_PLUS", children: /* @__PURE__ */ t.jsx(
1810
- "svg",
1811
- {
1812
- className: e,
1813
- width: "16",
1814
- height: "16",
1815
- viewBox: "0 0 16 16",
1816
- fill: "none",
1817
- xmlns: "http://www.w3.org/2000/svg",
1818
- children: /* @__PURE__ */ t.jsx(
1819
- "path",
1820
- {
1821
- d: "M12.6666 8.66634H8.66659V12.6663H7.33325V8.66634H3.33325V7.33301H7.33325V3.33301H8.66659V7.33301H12.6666V8.66634Z",
1822
- fill: "currentColor"
1823
- }
1824
- )
1825
- }
1826
- ) }), Dr = ({ 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(
1827
- "path",
1828
- {
1829
- 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",
1830
- fill: "currentColor"
1831
- }
1832
- ) }) }), Zr = ({
1833
- enabled: e,
1834
- onToggle: r,
1835
- label: n,
1836
- className: o,
1837
- children: s
1838
- }) => /* @__PURE__ */ t.jsxs(
1839
- "label",
1840
- {
1841
- className: R(
1842
- "flex cursor-pointer items-center justify-center gap-x-2",
1843
- o
1844
- ),
1845
- children: [
1846
- /* @__PURE__ */ t.jsx(
1847
- "input",
1848
- {
1849
- type: "checkbox",
1850
- className: "sr-only",
1851
- checked: e,
1852
- onChange: r
1853
- }
1854
- ),
1855
- n && /* @__PURE__ */ t.jsx("div", { className: "text-xs text-background", children: n }),
1856
- /* @__PURE__ */ t.jsx(
1857
- "div",
1858
- {
1859
- className: R(
1860
- "flex h-5 w-8 items-center justify-center rounded-full transition-colors",
1861
- e ? "bg-primary" : "bg-background/60"
1862
- ),
1863
- children: /* @__PURE__ */ t.jsx(
1864
- "div",
1865
- {
1866
- className: R(
1867
- "flex size-4 items-center justify-center rounded-full p-0.5 transition",
1868
- e ? "translate-x-1.5 bg-primary-foreground text-primary" : "-translate-x-1.5 bg-background text-foreground"
1869
- ),
1870
- children: s
1871
- }
1872
- )
1873
- }
1874
- )
1875
- ]
1876
- }
1877
- ), Ar = ({ className: e }) => /* @__PURE__ */ t.jsx(U, { className: e, customizationKey: "UI_BURGER", children: /* @__PURE__ */ t.jsx(
1878
- "svg",
1879
- {
1880
- className: e,
1881
- width: "16",
1882
- height: "16",
1883
- viewBox: "0 0 16 16",
1884
- fill: "none",
1885
- xmlns: "http://www.w3.org/2000/svg",
1886
- children: /* @__PURE__ */ t.jsx(
1887
- "path",
1888
- {
1889
- d: "M2 12H14V10.6667H2V12ZM2 8.66667H14V7.33333H2V8.66667ZM2 4V5.33333H14V4H2Z",
1890
- fill: "currentColor"
1891
- }
1892
- )
1893
- }
1894
- ) }), Fr = ({ sharedClassName: e }) => {
1895
- const { categories: r } = re(), { displayedCategoryId: n, changeCategory: o } = q(), [s, p] = F(!1), d = () => {
1896
- p(!s);
1897
- }, a = () => {
1898
- p(!1);
1899
- };
1900
- return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1901
- s && /* @__PURE__ */ t.jsx(
1902
- "div",
1903
- {
1904
- className: R(e, "inset-0 small:hidden"),
1905
- onClick: a
1906
- }
1907
- ),
1908
- /* @__PURE__ */ t.jsxs(
1909
- "div",
1910
- {
1911
- className: R(
1912
- e,
1913
- ue("top-left"),
1914
- "flex gap-x-2 small:hidden"
1915
- ),
1916
- children: [
1917
- /* @__PURE__ */ t.jsx(
1918
- B,
1919
- {
1920
- shape: "icon",
1921
- color: s ? "primary" : "neutral",
1922
- onClick: d,
1923
- children: /* @__PURE__ */ t.jsx(Ar, {})
1924
- }
1925
- ),
1926
- 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: l, title: w }) => /* @__PURE__ */ t.jsx(
1927
- "li",
1928
- {
1929
- className: R(
1930
- "cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",
1931
- l === n && "bg-primary/50"
1932
- ),
1933
- onClick: () => {
1934
- o(l), p(!1);
1935
- },
1936
- children: w
1937
- },
1938
- l
1939
- )) }) })
1940
- ]
1941
- }
1942
- ),
1943
- /* @__PURE__ */ t.jsx(
1944
- "div",
1945
- {
1946
- className: R(
1947
- e,
1948
- bt("top"),
1949
- "w-full overflow-x-auto max-small:hidden"
1950
- ),
1951
- 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: l, title: w }) => /* @__PURE__ */ t.jsx(
1952
- B,
1953
- {
1954
- variant: l === n ? "fill" : "ghost",
1955
- onClick: () => o(l),
1956
- children: w
1957
- },
1958
- l
1959
- )) })
1960
- }
1961
- )
1962
- ] });
1963
- }, Wr = () => {
1964
- const { hideCategories: e, infiniteCarrousel: r, permanentGallery: n } = J(), {
1965
- items: { length: o },
1966
- aspectRatioStyle: s
1967
- } = re(), {
1968
- slidable: p,
1969
- carrouselItemIndex: d,
1970
- masterItemIndex: a,
1971
- prevItem: l,
1972
- nextItem: w,
1973
- showGalleryControls: m,
1974
- enableHotspotsControl: c,
1975
- showHotspots: f,
1976
- toggleHotspots: _,
1977
- showGallery: b,
1978
- toggleGallery: y,
1979
- extendMode: L,
1980
- toggleExtendMode: x,
1981
- shownDetails: T,
1982
- isShowingDetails: h,
1983
- resetShownDetails: u,
1984
- showZoomControls: g,
1985
- isZooming: v,
1986
- canZoomIn: z,
1987
- zoomIn: H,
1988
- canZoomOut: S,
1989
- zoomOut: j,
1990
- resetView: E
1991
- } = q(), I = M(
1992
- (P) => {
1993
- Tr(P) && u();
1994
- },
1995
- [u]
1996
- );
1997
- Mr(u);
1998
- const V = "absolute z-overlay";
1999
- return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2000
- !e && /* @__PURE__ */ t.jsx(
2001
- Fr,
2002
- {
2003
- sharedClassName: R(
2004
- V,
2005
- "transition-opacity",
2006
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2007
- )
2008
- }
2009
- ),
2010
- p && !v && /* @__PURE__ */ t.jsx("div", { className: R(V, ue("top-right")), children: /* @__PURE__ */ t.jsx(
2011
- Vr,
2012
- {
2013
- currentIndex: d,
2014
- maxIndex: o - 1
2015
- }
2016
- ) }),
2017
- p && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2018
- /* @__PURE__ */ t.jsx(
2019
- B,
2020
- {
2021
- shape: "icon",
2022
- color: "neutral",
2023
- className: R(
2024
- V,
2025
- ue("middle-left"),
2026
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2027
- ),
2028
- onClick: l,
2029
- disabled: !r && a <= 0,
2030
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_LEFT", children: /* @__PURE__ */ t.jsx(Je, { className: "size-full rotate-180" }) })
2031
- }
2032
- ),
2033
- /* @__PURE__ */ t.jsx(
2034
- B,
2035
- {
2036
- shape: "icon",
2037
- color: "neutral",
2038
- className: R(
2039
- V,
2040
- ue("middle-right"),
2041
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2042
- ),
2043
- onClick: w,
2044
- disabled: !r && a >= o - 1,
2045
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_ARROW_RIGHT", children: /* @__PURE__ */ t.jsx(Je, { className: "size-full" }) })
2046
- }
2047
- )
2048
- ] }),
2049
- /* @__PURE__ */ t.jsxs(
2050
- "div",
2051
- {
2052
- className: R(
2053
- V,
2054
- ue("bottom-fullW"),
2055
- "pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"
2056
- ),
2057
- children: [
2058
- !n && p && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2059
- /* @__PURE__ */ t.jsx(
2060
- B,
2061
- {
2062
- className: m && !v ? "opacity-100" : "!pointer-events-none opacity-0",
2063
- variant: "fill",
2064
- color: b ? "primary" : "neutral",
2065
- shape: "icon",
2066
- onClick: y,
2067
- children: /* @__PURE__ */ t.jsx(U, { customizationKey: "CONTROLS_GALLERY", children: /* @__PURE__ */ t.jsx(Rr, { className: "size-full" }) })
2068
- }
2069
- ),
2070
- b && /* @__PURE__ */ t.jsx(
2071
- _t,
2072
- {
2073
- className: R(
2074
- "transition-opacity",
2075
- m && !v ? "opacity-100" : "!pointer-events-none opacity-0",
2076
- // Left & Right gradient mask to fade the gallery
2077
- "[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"
2078
- ),
2079
- containerClassName: "mx-1"
2080
- }
2081
- )
2082
- ] }),
2083
- /* @__PURE__ */ t.jsxs("div", { className: "col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2", children: [
2084
- c && /* @__PURE__ */ t.jsx(
2085
- Zr,
2086
- {
2087
- className: R(
2088
- "transition-opacity",
2089
- v ? "!pointer-events-none opacity-0" : "opacity-100"
2090
- ),
2091
- enabled: f,
2092
- onToggle: _,
2093
- children: /* @__PURE__ */ t.jsx(Hr, { className: "size-full" })
2094
- }
2095
- ),
2096
- g && /* @__PURE__ */ t.jsxs("div", { className: "max-small:hidden", children: [
2097
- /* @__PURE__ */ t.jsx(
2098
- B,
2099
- {
2100
- className: "rounded-b-none",
2101
- color: "neutral",
2102
- shape: "icon",
2103
- disabled: !z,
2104
- onClick: H,
2105
- children: /* @__PURE__ */ t.jsx(Pr, { className: "size-full" })
2106
- }
2107
- ),
2108
- /* @__PURE__ */ t.jsx(Lt, { color: "background" }),
2109
- /* @__PURE__ */ t.jsx(
2110
- B,
2111
- {
2112
- className: "rounded-t-none",
2113
- color: "neutral",
2114
- shape: "icon",
2115
- disabled: !S,
2116
- onClick: j,
2117
- children: /* @__PURE__ */ t.jsx(Or, { className: "size-full" })
2118
- }
2119
- )
2120
- ] }),
2121
- /* @__PURE__ */ t.jsx(
2122
- B,
2123
- {
2124
- variant: "fill",
2125
- color: L ? "primary" : "neutral",
2126
- shape: "icon",
2127
- onClick: x,
2128
- children: L ? /* @__PURE__ */ t.jsx(Dr, { className: "size-full" }) : /* @__PURE__ */ t.jsx(Sr, { className: "size-full" })
2129
- }
2130
- )
2131
- ] })
2132
- ]
2133
- }
2134
- ),
2135
- /* @__PURE__ */ t.jsx(
2136
- "div",
2137
- {
2138
- className: R(
2139
- V,
2140
- "inset-0 flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",
2141
- h ? "opacity-100" : "pointer-events-none opacity-0"
2142
- ),
2143
- onClick: I,
2144
- children: /* @__PURE__ */ t.jsx(
2145
- "div",
2146
- {
2147
- className: R(
2148
- "h-full w-3/5 bg-background transition-transform duration-details",
2149
- h ? "translate-x-0" : "translate-x-full"
2150
- ),
2151
- children: !!T && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2152
- /* @__PURE__ */ t.jsx(
2153
- me,
2154
- {
2155
- className: "w-full bg-foreground/65",
2156
- style: s,
2157
- src: T.src,
2158
- imgInPlayerWidthRatio: 0.6
2159
- }
2160
- ),
2161
- /* @__PURE__ */ t.jsxs(
2162
- "div",
2163
- {
2164
- className: R(
2165
- "space-y-1 px-2 py-1 small:p-3",
2166
- L && "large:p-4"
2167
- ),
2168
- children: [
2169
- T.title && /* @__PURE__ */ t.jsx(
2170
- "span",
2171
- {
2172
- className: R(
2173
- "text-sm font-semibold small:text-base small:font-bold",
2174
- L && "large:text-lg"
2175
- ),
2176
- children: T.title
2177
- }
2178
- ),
2179
- T.text && /* @__PURE__ */ t.jsx(
2180
- "p",
2181
- {
2182
- className: R(
2183
- "text-xs text-foreground/65 small:text-sm",
2184
- L && "large:text-base"
2185
- ),
2186
- children: T.text
2187
- }
2188
- )
2189
- ]
2190
- }
2191
- )
2192
- ] })
2193
- }
2194
- )
2195
- }
2196
- ),
2197
- (v || h) && /* @__PURE__ */ t.jsx(
2198
- Ct,
2199
- {
2200
- className: R(V, ue("top-right")),
2201
- onClick: E
2202
- }
2203
- )
2204
- ] });
2205
- }, $r = ({ className: e = "" }) => {
2206
- const { infiniteCarrousel: r, preloadRange: n, isFullScreen: o } = J(), { items: s, aspectRatioStyle: p } = re(), {
2207
- slidable: d,
2208
- carrouselItemIndex: a,
2209
- setCarrouselItemIndex: l,
2210
- itemIndexCommand: w,
2211
- setItemIndexCommand: m,
2212
- specialCommand: c,
2213
- isRunningSpecialCommand: f,
2214
- finishSpecialCommand: _,
2215
- extendMode: b,
2216
- extendTransition: y
2217
- } = q(), L = W(null), x = M((C) => {
2218
- if (!L.current)
2219
- throw new Error(`[${C ?? "sliderOrThrow"}] slider.current is null`);
2220
- return L.current;
2221
- }, []), T = W(!1), h = W(null), u = W(null), g = W(null), v = M(() => {
2222
- g.current && cancelAnimationFrame(g.current);
2223
- }, []), z = M(() => {
2224
- const C = x("computeClosestSnapIndex"), i = Array.from(C.children), k = C.scrollLeft, N = i.reduce(
2225
- (O, A, Y) => {
2226
- const $ = A.offsetLeft;
2227
- return Math.abs($ - k) < Math.abs(i[O].offsetLeft - k) ? Y : O;
2228
- },
2229
- 0
2230
- );
2231
- return c === "first_to_last" ? Ge(N, s.length) : c === "last_to_first" ? Ge(N - 1, s.length) : N;
2232
- }, [c, x, s.length]), H = M(
2233
- (C) => {
2234
- const i = x("setStyleCursor");
2235
- i.style.cursor = C;
2236
- },
2237
- [x]
2238
- ), S = M(
2239
- (C) => {
2240
- const i = x("setStyleSnapState");
2241
- C === "mandatory" ? i.style.scrollSnapType = "x mandatory" : i.style.scrollSnapType = "none";
2242
- },
2243
- [x]
2244
- ), j = M(
2245
- (C, i, k) => {
2246
- v();
2247
- const N = x("scrollToIndex"), O = Array.from(N.children), A = N.scrollLeft, Y = O[C].offsetLeft, $ = (pe) => {
2248
- N.scrollTo({
2249
- left: pe,
2250
- behavior: "instant"
2251
- });
2252
- }, K = () => {
2253
- $(Y), S("mandatory"), k?.();
2254
- }, G = Math.abs(A - Y);
2255
- if (G < 1 || i === "instant") {
2256
- K();
2257
- return;
2258
- }
2259
- const X = ae(G / 2.5, 300, 1e3), ne = (/* @__PURE__ */ new Date()).getTime();
2260
- S("none");
2261
- const ye = () => {
2262
- const pe = () => {
2263
- const je = (/* @__PURE__ */ new Date()).getTime() - ne;
2264
- if (je >= X) {
2265
- K();
2266
- return;
2267
- }
2268
- const ie = Math.min(je / X, 1), he = zt(ie), Me = Le(A, Y, he);
2269
- $(Me), ye();
2270
- };
2271
- g.current = requestAnimationFrame(pe);
2272
- };
2273
- ye();
2274
- },
2275
- [v, x, S]
2276
- ), [E, I] = F(), V = !!E;
2277
- Z(() => {
2278
- const C = () => {
2279
- clearTimeout(E);
2280
- const i = setTimeout(() => {
2281
- I(void 0);
2282
- }, gt);
2283
- I(i);
2284
- };
2285
- return addEventListener("resize", C), document.addEventListener("fullscreenchange", C), () => {
2286
- removeEventListener("resize", C), document.removeEventListener("fullscreenchange", C);
2287
- };
2288
- }, [E]), Z(() => {
2289
- const C = z();
2290
- Number.isNaN(C) || C !== a && j(a, "instant");
2291
- }, [
2292
- a,
2293
- j,
2294
- z,
2295
- // - Run the effect when those values change
2296
- s,
2297
- E,
2298
- o,
2299
- b,
2300
- y
2301
- ]), Z(() => {
2302
- if (!d || f) {
2303
- H("auto");
2304
- return;
2305
- }
2306
- const C = L.current;
2307
- if (!C)
2308
- return;
2309
- H("grab"), S("mandatory");
2310
- const i = (O) => {
2311
- O.button === 0 && (O.preventDefault(), O.stopPropagation(), v(), T.current = !0, h.current = O.pageX - C.offsetLeft, u.current = C.scrollLeft, H("grabbing"));
2312
- }, k = (O) => {
2313
- if (!T.current)
2314
- return;
2315
- if (h.current === null)
2316
- throw new Error("[onMouseMove] startX is null");
2317
- S("none");
2318
- const A = O.pageX - C.offsetLeft - h.current;
2319
- requestAnimationFrame(() => {
2320
- if (u.current === null)
2321
- throw new Error("[onMouseMove] scrollLeft is null");
2322
- C.scrollLeft = u.current - A;
2323
- });
2324
- }, N = () => {
2325
- if (!T.current)
2326
- return;
2327
- T.current = !1, H("grab");
2328
- const O = z();
2329
- j(O, "smooth");
2330
- };
2331
- return C.addEventListener("mousedown", i), document.addEventListener("mousemove", k), document.addEventListener("mouseleave", N), document.addEventListener("mouseup", N), document.addEventListener("contextmenu", N), () => {
2332
- C.removeEventListener("mousedown", i), document.removeEventListener("mousemove", k), document.removeEventListener("mouseleave", N), document.removeEventListener("mouseup", N), document.removeEventListener("contextmenu", N);
2333
- };
2334
- }, [
2335
- v,
2336
- z,
2337
- f,
2338
- j,
2339
- H,
2340
- S,
2341
- d
2342
- ]), Z(() => {
2343
- if (y || V)
2344
- return;
2345
- const C = L.current;
2346
- if (!C)
2347
- return;
2348
- const i = () => {
2349
- const k = z();
2350
- Number.isNaN(k) || (l(k), k === w && m(null));
2351
- };
2352
- return C.addEventListener("scroll", i), () => {
2353
- C.removeEventListener("scroll", i);
2354
- };
2355
- }, [
2356
- z,
2357
- y,
2358
- f,
2359
- V,
2360
- w,
2361
- s.length,
2362
- l,
2363
- m
2364
- ]), Z(() => {
2365
- if (w === null)
2366
- return;
2367
- const C = () => _();
2368
- switch (c) {
2369
- case "first_to_last":
2370
- j(s.length, "instant"), j(s.length - 1, "smooth", C);
2371
- break;
2372
- case "last_to_first":
2373
- j(0, "instant"), j(1, "smooth", C);
2374
- break;
2375
- case "instant":
2376
- j(w, "instant", C);
2377
- break;
2378
- default:
2379
- j(w, "smooth");
2380
- break;
2381
- }
2382
- }, [
2383
- c,
2384
- _,
2385
- w,
2386
- s.length,
2387
- j
2388
- ]);
2389
- const P = () => /* @__PURE__ */ t.jsx("div", { className: "h-full", style: p });
2390
- return /* @__PURE__ */ t.jsxs(
2391
- "div",
2392
- {
2393
- className: R(
2394
- "relative overflow-hidden rounded-carrousel transition-radius",
2395
- e
2396
- ),
2397
- style: p,
2398
- children: [
2399
- /* @__PURE__ */ t.jsxs(
2400
- "div",
2401
- {
2402
- ref: L,
2403
- className: `flex size-full ${d ? "overflow-x-auto no-scrollbar *:snap-start *:snap-always" : "justify-center"}`,
2404
- children: [
2405
- c === "last_to_first" && /* @__PURE__ */ t.jsx(P, {}),
2406
- s.map((C, i) => {
2407
- const k = C.type === "360" ? C.images[0] : C.src, N = i === a, O = i === 0, A = i === s.length - 1, Y = (() => {
2408
- if (c === "first_to_last" && O)
2409
- return {
2410
- transform: `translateX(${100 * s.length}%)`
2411
- };
2412
- if (c === "last_to_first" && A)
2413
- return {
2414
- transform: `translateX(-${100 * s.length}%)`
2415
- };
2416
- })();
2417
- let $ = Math.abs(i - a) <= n;
2418
- return $ ||= i === w, r && ($ ||= a < n && s.length - i <= n - a, $ ||= a >= s.length - n && i <= n - (s.length - a)), /* @__PURE__ */ t.jsx(
2419
- "div",
2420
- {
2421
- className: R(
2422
- "h-full bg-foreground/35",
2423
- a === i && "z-1"
2424
- // Give high-ground to the shown item (to avoid 1px vertical line)
2425
- ),
2426
- style: { ...p, ...Y },
2427
- children: $ && /* @__PURE__ */ t.jsx(Ir, { index: i, item: C, isShown: N })
2428
- },
2429
- `${i}_${k}`
2430
- );
2431
- }),
2432
- c === "first_to_last" && /* @__PURE__ */ t.jsx(P, {})
2433
- ]
2434
- }
2435
- ),
2436
- /* @__PURE__ */ t.jsx(Wr, {})
2437
- ]
2438
- }
2439
- );
2440
- }, Yr = () => {
2441
- const { permanentGallery: e } = J(), { aspectRatioStyle: r } = re(), {
2442
- prevItem: n,
2443
- nextItem: o,
2444
- isShowingDetails: s,
2445
- resetShownDetails: p,
2446
- extendMode: d,
2447
- disableExtendMode: a,
2448
- isZooming: l,
2449
- resetZoom: w,
2450
- fakeFullScreen: m
2451
- } = q(), c = W(null), f = W(null), _ = W(null);
2452
- return Z(() => {
2453
- if (!d)
2454
- return;
2455
- const b = c.current, y = f.current, L = _.current;
2456
- if (!b || !y || !L)
2457
- return;
2458
- let x = !1;
2459
- const T = (g) => [b, y, L].includes(g.target), h = (g) => {
2460
- x = T(g);
2461
- }, u = (g) => {
2462
- x && (T(g) && a(), x = !1);
2463
- };
2464
- return b.addEventListener("mousedown", h), b.addEventListener("mouseup", u), () => {
2465
- b.removeEventListener("mousedown", h), b.removeEventListener("mouseup", u);
2466
- };
2467
- }, [a, d]), Z(() => {
2468
- const b = (y) => {
2469
- y.key === "Escape" && (l ? w() : s ? p() : a());
2470
- };
2471
- return addEventListener("keydown", b), () => {
2472
- removeEventListener("keydown", b);
2473
- };
2474
- }, [
2475
- a,
2476
- s,
2477
- l,
2478
- o,
2479
- n,
2480
- p,
2481
- w
2482
- ]), /* @__PURE__ */ t.jsxs(
2483
- "div",
2484
- {
2485
- ref: c,
2486
- className: R(
2487
- m ? "fixed inset-0 z-overlay" : "relative",
2488
- d && "flex size-full items-center justify-center bg-foreground/75"
2489
- ),
2490
- children: [
2491
- /* @__PURE__ */ t.jsxs(
2492
- "div",
2493
- {
2494
- ref: f,
2495
- className: d ? "flex size-full flex-col justify-center gap-y-2 small:gap-y-4" : "space-y-2",
2496
- children: [
2497
- /* @__PURE__ */ t.jsx(
2498
- "div",
2499
- {
2500
- ref: _,
2501
- className: R(
2502
- d && "mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"
2503
- ),
2504
- style: r,
2505
- children: /* @__PURE__ */ t.jsx($r, { className: R(d && "h-full min-w-0") })
2506
- }
2507
- ),
2508
- e && /* @__PURE__ */ t.jsx(_t, { className: R(d && "my-2 shrink-0 small:my-4") })
2509
- ]
2510
- }
2511
- ),
2512
- d && /* @__PURE__ */ t.jsx(
2513
- Ct,
2514
- {
2515
- className: "absolute right-2 top-2 small:right-4 small:top-4",
2516
- onClick: a
2517
- }
2518
- )
2519
- ]
2520
- }
2521
- );
2522
- }, Ur = ({
2523
- compositionUrl: e
2524
- }) => {
2525
- const { emitEvent: r } = J(), {
2526
- data: n,
2527
- status: o,
2528
- isSuccess: s,
2529
- error: p
2530
- } = Kt(e);
2531
- return Z(() => {
2532
- p ? r(ot, p) : o === "fetching" ? r(rt, e) : s && r(nt, n);
2533
- }, [n, e, r, p, s, o]), p ? /* @__PURE__ */ t.jsx(
2534
- kt,
2535
- {
2536
- className: "aspect-square text-foreground/70",
2537
- text: "Player could not be loaded"
2538
- }
2539
- ) : s ? /* @__PURE__ */ t.jsx(Jt, { composition: n, children: /* @__PURE__ */ t.jsx(er, { 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: [
2540
- /* @__PURE__ */ t.jsx("div", { className: "animate-pulse text-xl", children: "Loading Player" }),
2541
- /* @__PURE__ */ t.jsx(Et, { color: "foreground" })
2542
- ] });
2543
- }, Xr = ({
2544
- compositionUrl: e,
2545
- hideCategories: r = At,
2546
- infiniteCarrousel: n = Ft,
2547
- permanentGallery: o = Wt,
2548
- mediaLoadStrategy: s = $t,
2549
- preloadRange: p = Yt,
2550
- preventFullScreen: d = Ut,
2551
- eventPrefix: a = mt,
2552
- reverse360: l = Xt,
2553
- children: w,
2554
- // NOTE: use to customize the player, not to display the content
2555
- ...m
2556
- // Contains the rest of the props (minMediaWidth / maxMediaWidth)
2557
- }) => {
2558
- const c = W(null), [f, _] = F(0.5), [b, y] = F(!1), L = M(
2559
- (h, u) => {
2560
- const g = a + h, v = new CustomEvent(g, { detail: u });
2561
- document.dispatchEvent(v);
2562
- },
2563
- [a]
2564
- );
2565
- Z(() => {
2566
- if (b) {
2567
- _(1);
2568
- return;
2569
- }
2570
- if (!c.current)
2571
- return;
2572
- const h = c.current, u = () => {
2573
- const g = window.innerWidth, v = h.clientWidth;
2574
- _(v / g);
2575
- };
2576
- return u(), addEventListener("resize", u), () => {
2577
- removeEventListener("resize", u);
2578
- };
2579
- }, [b]), Z(() => {
2580
- if (d)
2581
- return;
2582
- const h = c.current;
2583
- if (!h)
2584
- throw new Error("Wrapper not found");
2585
- const u = () => {
2586
- const { fullscreenElement: g } = document;
2587
- y(
2588
- g === h || // NOTE: For custom element, the web browser is making the whole custom element full-screen and not only the wrapper
2589
- g?.localName === Ze
2590
- );
2591
- };
2592
- return document.addEventListener("fullscreenchange", u), () => {
2593
- document.removeEventListener("fullscreenchange", u);
2594
- };
2595
- }, [d]);
2596
- const x = M(async () => {
2597
- const h = c.current;
2598
- if (!h)
2599
- throw new Error("Wrapper not found");
2600
- try {
2601
- return await h.requestFullscreen(), !0;
2602
- } catch {
2603
- return !1;
2604
- }
2605
- }, []), T = M(async () => {
2606
- try {
2607
- return await document.exitFullscreen(), !0;
2608
- } catch {
2609
- return !1;
2610
- }
2611
- }, []);
2612
- return /* @__PURE__ */ t.jsx(
2613
- Qt,
2614
- {
2615
- ...m,
2616
- hideCategories: r,
2617
- infiniteCarrousel: n,
2618
- permanentGallery: o,
2619
- mediaLoadStrategy: s,
2620
- preloadRange: p,
2621
- preventFullScreen: d,
2622
- reverse360: l,
2623
- emitEvent: L,
2624
- playerInViewportWidthRatio: f,
2625
- isFullScreen: b,
2626
- requestFullscreen: x,
2627
- exitFullscreen: T,
2628
- children: /* @__PURE__ */ t.jsxs(lr, { children: [
2629
- /* @__PURE__ */ t.jsx(
2630
- "div",
2631
- {
2632
- id: "cc-webplayer-wrapper",
2633
- ref: c,
2634
- className: "select-none text-foreground",
2635
- children: /* @__PURE__ */ t.jsx(Ur, { compositionUrl: e })
2636
- }
2637
- ),
2638
- w
2639
- ] })
2640
- }
2641
- );
2642
- }, Gr = ({ name: e, color: r, children: n }) => {
2643
- const { setIconConfig: o, resetIconConfig: s } = Fe();
2644
- return Z(() => {
2645
- if (!(!n && !r))
2646
- return o(e, {
2647
- Icon: n,
2648
- color: r
2649
- }), () => {
2650
- s(e);
2651
- };
2652
- }, [n, r, e, s, o]), null;
2653
- }, Br = (e) => jt() ? /* @__PURE__ */ t.jsx(Gr, { ...e }) : /* @__PURE__ */ t.jsx("slot", {}), qr = '*,: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}}';
2654
- var Mt = { exports: {} }, ve = {};
2655
- /**
2656
- * @license React
2657
- * react-jsx-runtime.production.min.js
2658
- *
2659
- * Copyright (c) Facebook, Inc. and its affiliates.
2660
- *
2661
- * This source code is licensed under the MIT license found in the
2662
- * LICENSE file in the root directory of this source tree.
2663
- */
2664
- var Qe;
2665
- function Kr() {
2666
- if (Qe) return ve;
2667
- Qe = 1;
2668
- 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, p = { key: !0, ref: !0, __self: !0, __source: !0 };
2669
- function d(a, l, w) {
2670
- var m, c = {}, f = null, _ = null;
2671
- w !== void 0 && (f = "" + w), l.key !== void 0 && (f = "" + l.key), l.ref !== void 0 && (_ = l.ref);
2672
- for (m in l) o.call(l, m) && !p.hasOwnProperty(m) && (c[m] = l[m]);
2673
- if (a && a.defaultProps) for (m in l = a.defaultProps, l) c[m] === void 0 && (c[m] = l[m]);
2674
- return { $$typeof: r, type: a, key: f, ref: _, props: c, _owner: s.current };
2675
- }
2676
- return ve.Fragment = n, ve.jsx = d, ve.jsxs = d, ve;
2677
- }
2678
- Mt.exports = Kr();
2679
- var Ce = Mt.exports, Jr = Object.defineProperty, Qr = (e, r, n) => r in e ? Jr(e, r, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[r] = n, ke = (e, r, n) => (Qr(e, typeof r != "symbol" ? r + "" : r, n), n);
2680
- const en = {
1
+ import { W as P, a as W, b as S, c as w, d as I, e as L, f as M } from "./shared-Bn2By-os.js";
2
+ import { D as oe, j as se, E as re, k as ie, n as ae, m as ce, r as le, q as ue, p as pe, o as me, l as fe, g as Ee, h as be, i as he, s as de } from "./shared-Bn2By-os.js";
3
+ import "react/jsx-runtime";
4
+ import A from "react";
5
+ import { createRoot as D } from "react-dom/client";
6
+ var R = Object.defineProperty, V = (e, t, n) => t in e ? R(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, E = (e, t, n) => (V(e, typeof t != "symbol" ? t + "" : t, n), n);
7
+ const v = {
2681
8
  stringify: (e) => e,
2682
9
  parse: (e) => e
2683
- }, tn = {
10
+ }, j = {
2684
11
  stringify: (e) => `${e}`,
2685
12
  parse: (e) => parseFloat(e)
2686
- }, rn = {
13
+ }, k = {
2687
14
  stringify: (e) => e ? "true" : "false",
2688
15
  parse: (e) => /^[ty1-9]/i.test(e)
2689
- }, nn = {
16
+ }, x = {
2690
17
  stringify: (e) => e.name,
2691
- parse: (e, r, n) => {
2692
- const o = (() => {
18
+ parse: (e, t, n) => {
19
+ const s = (() => {
2693
20
  if (typeof window < "u" && e in window)
2694
21
  return window[e];
2695
22
  if (typeof global < "u" && e in global)
2696
23
  return global[e];
2697
24
  })();
2698
- return typeof o == "function" ? o.bind(n) : void 0;
25
+ return typeof s == "function" ? s.bind(n) : void 0;
2699
26
  }
2700
- }, on = {
27
+ }, F = {
2701
28
  stringify: (e) => JSON.stringify(e),
2702
29
  parse: (e) => JSON.parse(e)
2703
- }, Pe = {
2704
- string: en,
2705
- number: tn,
2706
- boolean: rn,
2707
- function: nn,
2708
- json: on
30
+ }, g = {
31
+ string: v,
32
+ number: j,
33
+ boolean: k,
34
+ function: x,
35
+ json: F
2709
36
  };
2710
- function sn(e) {
37
+ function G(e) {
2711
38
  return e.replace(
2712
39
  /([a-z0-9])([A-Z])/g,
2713
- (r, n, o) => `${n}-${o.toLowerCase()}`
40
+ (t, n, s) => `${n}-${s.toLowerCase()}`
2714
41
  );
2715
42
  }
2716
- const Ee = Symbol.for("r2wc.render"), Ne = Symbol.for("r2wc.connected"), se = Symbol.for("r2wc.context"), ee = Symbol.for("r2wc.props");
2717
- function an(e, r, n) {
2718
- var o, s, p;
2719
- r.props || (r.props = e.propTypes ? Object.keys(e.propTypes) : []);
2720
- const d = Array.isArray(r.props) ? r.props.slice() : Object.keys(r.props), a = {}, l = {}, w = {};
2721
- for (const c of d) {
2722
- a[c] = Array.isArray(r.props) ? "string" : r.props[c];
2723
- const f = sn(c);
2724
- l[c] = f, w[f] = c;
43
+ const b = Symbol.for("r2wc.render"), h = Symbol.for("r2wc.connected"), u = Symbol.for("r2wc.context"), l = Symbol.for("r2wc.props");
44
+ function Y(e, t, n) {
45
+ var s, f, C;
46
+ t.props || (t.props = e.propTypes ? Object.keys(e.propTypes) : []);
47
+ const d = Array.isArray(t.props) ? t.props.slice() : Object.keys(t.props), m = {}, y = {}, _ = {};
48
+ for (const r of d) {
49
+ m[r] = Array.isArray(t.props) ? "string" : t.props[r];
50
+ const o = G(r);
51
+ y[r] = o, _[o] = r;
2725
52
  }
2726
- class m extends HTMLElement {
53
+ class N extends HTMLElement {
2727
54
  constructor() {
2728
- super(), ke(this, o, !0), ke(this, s), ke(this, p, {}), ke(this, "container"), r.shadow ? this.container = this.attachShadow({
2729
- mode: r.shadow
2730
- }) : this.container = this, this[ee].container = this.container;
2731
- for (const f of d) {
2732
- const _ = l[f], b = this.getAttribute(_), y = a[f], L = y ? Pe[y] : null;
2733
- L != null && L.parse && b && (this[ee][f] = L.parse(b, _, this));
55
+ super(), E(this, s, !0), E(this, f), E(this, C, {}), E(this, "container"), t.shadow ? this.container = this.attachShadow({
56
+ mode: t.shadow
57
+ }) : this.container = this, this[l].container = this.container;
58
+ for (const o of d) {
59
+ const p = y[o], c = this.getAttribute(p), i = m[o], a = i ? g[i] : null;
60
+ a != null && a.parse && c && (this[l][o] = a.parse(c, p, this));
2734
61
  }
2735
62
  }
2736
63
  static get observedAttributes() {
2737
- return Object.keys(w);
64
+ return Object.keys(_);
2738
65
  }
2739
66
  connectedCallback() {
2740
- this[Ne] = !0, this[Ee]();
67
+ this[h] = !0, this[b]();
2741
68
  }
2742
69
  disconnectedCallback() {
2743
- this[Ne] = !1, this[se] && n.unmount(this[se]), delete this[se];
70
+ this[h] = !1, this[u] && n.unmount(this[u]), delete this[u];
2744
71
  }
2745
- attributeChangedCallback(f, _, b) {
2746
- const y = w[f], L = a[y], x = L ? Pe[L] : null;
2747
- y in a && x != null && x.parse && b && (this[ee][y] = x.parse(b, f, this), this[Ee]());
72
+ attributeChangedCallback(o, p, c) {
73
+ const i = _[o], a = m[i], O = a ? g[a] : null;
74
+ i in m && O != null && O.parse && c && (this[l][i] = O.parse(c, o, this), this[b]());
2748
75
  }
2749
- [(o = Ne, s = se, p = ee, Ee)]() {
2750
- this[Ne] && (this[se] ? n.update(this[se], this[ee]) : this[se] = n.mount(
76
+ [(s = h, f = u, C = l, b)]() {
77
+ this[h] && (this[u] ? n.update(this[u], this[l]) : this[u] = n.mount(
2751
78
  this.container,
2752
79
  e,
2753
- this[ee]
80
+ this[l]
2754
81
  ));
2755
82
  }
2756
83
  }
2757
- for (const c of d) {
2758
- const f = l[c], _ = a[c];
2759
- Object.defineProperty(m.prototype, c, {
84
+ for (const r of d) {
85
+ const o = y[r], p = m[r];
86
+ Object.defineProperty(N.prototype, r, {
2760
87
  enumerable: !0,
2761
88
  configurable: !0,
2762
89
  get() {
2763
- return this[ee][c];
90
+ return this[l][r];
2764
91
  },
2765
- set(b) {
2766
- this[ee][c] = b;
2767
- const y = _ ? Pe[_] : null;
2768
- if (y != null && y.stringify) {
2769
- const L = y.stringify(b, f, this);
2770
- this.getAttribute(f) !== L && this.setAttribute(f, L);
92
+ set(c) {
93
+ this[l][r] = c;
94
+ const i = p ? g[p] : null;
95
+ if (i != null && i.stringify) {
96
+ const a = i.stringify(c, o, this);
97
+ this.getAttribute(o) !== a && this.setAttribute(o, a);
2771
98
  } else
2772
- this[Ee]();
99
+ this[b]();
2773
100
  }
2774
101
  });
2775
102
  }
2776
- return m;
103
+ return N;
2777
104
  }
2778
- function ln(e, r, n) {
2779
- const o = Dt(e), s = be.createElement(r, n);
2780
- return o.render(s), {
2781
- root: o,
2782
- ReactComponent: r
105
+ function H(e, t, n) {
106
+ const s = D(e), f = A.createElement(t, n);
107
+ return s.render(f), {
108
+ root: s,
109
+ ReactComponent: t
2783
110
  };
2784
111
  }
2785
- function cn({ root: e, ReactComponent: r }, n) {
2786
- const o = be.createElement(r, n);
2787
- e.render(o);
2788
- }
2789
- function dn({ root: e }) {
2790
- e.unmount();
112
+ function U({ root: e, ReactComponent: t }, n) {
113
+ const s = A.createElement(t, n);
114
+ e.render(s);
2791
115
  }
2792
- function Tt(e, r = {}) {
2793
- return an(e, r, { mount: ln, update: cn, unmount: dn });
116
+ function $({ root: e }) {
117
+ setTimeout(() => {
118
+ e.unmount();
119
+ }, 0);
2794
120
  }
2795
- function un(e) {
2796
- return e.replace(
2797
- /([a-z0-9])([A-Z])/g,
2798
- (r, n, o) => `${n}-${o.toLowerCase()}`
2799
- );
121
+ function T(e, t = {}) {
122
+ return Y(e, t, { mount: H, update: U, unmount: $ });
2800
123
  }
2801
- function mn(e) {
2802
- const r = {};
2803
- return Object.entries(e).forEach(([n, o]) => {
2804
- r[un(n)] = o.toString();
2805
- }), r;
2806
- }
2807
- const pn = (e) => /* @__PURE__ */ Ce.jsxs(Ce.Fragment, { children: [
2808
- /* @__PURE__ */ Ce.jsx("style", { children: qr }),
2809
- /* @__PURE__ */ Ce.jsx(Xr, { ...e })
2810
- ] }), hn = Tt(pn, {
124
+ const B = T(P, {
2811
125
  shadow: "open",
2812
126
  props: {
2813
127
  compositionUrl: "string",
@@ -2821,91 +135,44 @@ const pn = (e) => /* @__PURE__ */ Ce.jsxs(Ce.Fragment, { children: [
2821
135
  eventPrefix: "string",
2822
136
  reverse360: "boolean"
2823
137
  }
2824
- }), gn = (e) => mn(e), fn = Tt(Br, {
138
+ }), J = T(W, {
2825
139
  shadow: "closed",
2826
140
  props: {
2827
- name: "string",
2828
- color: "string"
141
+ index: "number",
142
+ thumbnailSrc: "string"
143
+ }
144
+ }), X = T(S, {
145
+ shadow: "closed",
146
+ props: {
147
+ name: "string"
2829
148
  }
2830
149
  });
2831
- function xn() {
2832
- return !!customElements.get(Ze) && !!customElements.get(Ae);
150
+ function q() {
151
+ customElements.define(I, B), customElements.define(
152
+ L,
153
+ J
154
+ ), customElements.define(M, X);
2833
155
  }
2834
- function wn() {
2835
- customElements.define(Ze, hn), customElements.define(Ae, fn);
156
+ function z() {
157
+ w() || q();
2836
158
  }
2837
- function Vt() {
2838
- xn() || wn();
2839
- }
2840
- Vt();
2841
- const jn = ({
2842
- onCompositionLoading: e,
2843
- onCompositionLoaded: r,
2844
- onCompositionLoadError: n,
2845
- onItemChange: o,
2846
- onExtendModeOn: s,
2847
- onExtendModeOff: p,
2848
- onHotspotsOn: d,
2849
- onHotspotsOff: a,
2850
- onGalleryOpen: l,
2851
- onGalleryClose: w,
2852
- ...m
2853
- }) => {
2854
- const c = gn(m);
2855
- return Z(() => {
2856
- const f = m.eventPrefix ?? mt, _ = (L) => `${f}${L}`, b = {
2857
- [rt]: e,
2858
- [nt]: r,
2859
- [ot]: n,
2860
- [st]: o,
2861
- [at]: s,
2862
- [it]: p,
2863
- [lt]: d,
2864
- [ct]: a,
2865
- [dt]: l,
2866
- [ut]: w
2867
- }, y = /* @__PURE__ */ new Map();
2868
- return Object.entries(b).forEach(([L, x]) => {
2869
- if (!x)
2870
- return;
2871
- const T = _(L), h = (u) => x(u.detail);
2872
- y.set(T, h), document.addEventListener(T, h);
2873
- }), () => {
2874
- y.forEach((L, x) => {
2875
- document.removeEventListener(x, L);
2876
- });
2877
- };
2878
- }, [
2879
- m.eventPrefix,
2880
- e,
2881
- r,
2882
- n,
2883
- o,
2884
- s,
2885
- p,
2886
- d,
2887
- a,
2888
- l,
2889
- w
2890
- ]), /* @__PURE__ */ tt.jsx("cc-webplayer", { ...c });
2891
- };
2892
- Vt();
2893
- const Cn = ({ name: e, color: r }) => /* @__PURE__ */ tt.jsx("cc-webplayer-icon", { name: e, color: r });
159
+ z();
2894
160
  export {
2895
- mt as DEFAULT_EVENT_PREFIX,
2896
- nt as EVENT_COMPOSITION_LOADED,
2897
- rt as EVENT_COMPOSITION_LOADING,
2898
- ot as EVENT_COMPOSITION_LOAD_ERROR,
2899
- it as EVENT_EXTEND_MODE_OFF,
2900
- at as EVENT_EXTEND_MODE_ON,
2901
- ut as EVENT_GALLERY_CLOSE,
2902
- dt as EVENT_GALLERY_OPEN,
2903
- ct as EVENT_HOTSPOTS_OFF,
2904
- lt as EVENT_HOTSPOTS_ON,
2905
- st as EVENT_ITEM_CHANGE,
2906
- Ae as WEB_PLAYER_ICON_WC_TAG,
2907
- Ze as WEB_PLAYER_WC_TAG,
2908
- jn as WebPlayer,
2909
- Cn as WebPlayerIcon,
2910
- yn as generateCompositionUrl
161
+ oe as DEFAULT_EVENT_PREFIX,
162
+ se as EVENT_COMPOSITION_LOADED,
163
+ re as EVENT_COMPOSITION_LOADING,
164
+ ie as EVENT_COMPOSITION_LOAD_ERROR,
165
+ ae as EVENT_EXTEND_MODE_OFF,
166
+ ce as EVENT_EXTEND_MODE_ON,
167
+ le as EVENT_GALLERY_CLOSE,
168
+ ue as EVENT_GALLERY_OPEN,
169
+ pe as EVENT_HOTSPOTS_OFF,
170
+ me as EVENT_HOTSPOTS_ON,
171
+ fe as EVENT_ITEM_CHANGE,
172
+ M as WEB_PLAYER_ICON_WC_TAG,
173
+ I as WEB_PLAYER_WC_TAG,
174
+ Ee as WebPlayer,
175
+ be as WebPlayerCustomMedia,
176
+ he as WebPlayerIcon,
177
+ de as generateCompositionUrl
2911
178
  };