etudes 22.2.0 → 22.3.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/build/etudes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
1
|
+
import Bs, { Fragment as Do, cloneElement as Hs, Children as jn, isValidElement as An, forwardRef as Te, useRef as we, useEffect as Ee, useLayoutEffect as $e, useState as Oe, useCallback as he, useMemo as pt, Suspense as Ys } from "react";
|
|
2
|
+
function Bo(e) {
|
|
3
3
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
4
4
|
}
|
|
5
5
|
var Jt = { exports: {} }, St = {};
|
|
@@ -35,7 +35,7 @@ function Us() {
|
|
|
35
35
|
return k.$$typeof === oe ? null : k.displayName || k.name || null;
|
|
36
36
|
if (typeof k == "string") return k;
|
|
37
37
|
switch (k) {
|
|
38
|
-
case
|
|
38
|
+
case C:
|
|
39
39
|
return "Fragment";
|
|
40
40
|
case W:
|
|
41
41
|
return "Profiler";
|
|
@@ -63,7 +63,7 @@ function Us() {
|
|
|
63
63
|
return k = k.displayName, k || (k = U.displayName || U.name || "", k = k !== "" ? "ForwardRef(" + k + ")" : "ForwardRef"), k;
|
|
64
64
|
case M:
|
|
65
65
|
return U = k.displayName || null, U !== null ? U : e(k.type) || "Memo";
|
|
66
|
-
case
|
|
66
|
+
case B:
|
|
67
67
|
U = k._payload, k = k._init;
|
|
68
68
|
try {
|
|
69
69
|
return e(k(U));
|
|
@@ -92,8 +92,8 @@ function Us() {
|
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
function a(k) {
|
|
95
|
-
if (k ===
|
|
96
|
-
if (typeof k == "object" && k !== null && k.$$typeof ===
|
|
95
|
+
if (k === C) return "<>";
|
|
96
|
+
if (typeof k == "object" && k !== null && k.$$typeof === B)
|
|
97
97
|
return "<...>";
|
|
98
98
|
try {
|
|
99
99
|
var U = e(k);
|
|
@@ -134,7 +134,7 @@ function Us() {
|
|
|
134
134
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
135
135
|
)), k = this.props.ref, k !== void 0 ? k : null;
|
|
136
136
|
}
|
|
137
|
-
function b(k, U, Z, G, fe,
|
|
137
|
+
function b(k, U, Z, G, fe, ge) {
|
|
138
138
|
var ue = Z.ref;
|
|
139
139
|
return k = {
|
|
140
140
|
$$typeof: A,
|
|
@@ -164,10 +164,10 @@ function Us() {
|
|
|
164
164
|
configurable: !1,
|
|
165
165
|
enumerable: !1,
|
|
166
166
|
writable: !0,
|
|
167
|
-
value:
|
|
167
|
+
value: ge
|
|
168
168
|
}), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
|
|
169
169
|
}
|
|
170
|
-
function T(k, U, Z, G, fe,
|
|
170
|
+
function T(k, U, Z, G, fe, ge) {
|
|
171
171
|
var ue = U.children;
|
|
172
172
|
if (ue !== void 0)
|
|
173
173
|
if (G)
|
|
@@ -182,8 +182,8 @@ function Us() {
|
|
|
182
182
|
else _(ue);
|
|
183
183
|
if (X.call(U, "key")) {
|
|
184
184
|
ue = e(k);
|
|
185
|
-
var Ne = Object.keys(U).filter(function(
|
|
186
|
-
return
|
|
185
|
+
var Ne = Object.keys(U).filter(function(Be) {
|
|
186
|
+
return Be !== "key";
|
|
187
187
|
});
|
|
188
188
|
G = 0 < Ne.length ? "{key: someKey, " + Ne.join(": ..., ") + ": ...}" : "{key: someKey}", R[ue + G] || (Ne = 0 < Ne.length ? "{" + Ne.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
189
|
`A props object containing a "key" prop is being spread into JSX:
|
|
@@ -212,28 +212,28 @@ React keys must be passed directly to JSX without using spread:
|
|
|
212
212
|
Z,
|
|
213
213
|
c(),
|
|
214
214
|
fe,
|
|
215
|
-
|
|
215
|
+
ge
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
function _(k) {
|
|
219
|
-
I(k) ? k._store && (k._store.validated = 1) : typeof k == "object" && k !== null && k.$$typeof ===
|
|
219
|
+
I(k) ? k._store && (k._store.validated = 1) : typeof k == "object" && k !== null && k.$$typeof === B && (k._payload.status === "fulfilled" ? I(k._payload.value) && k._payload.value._store && (k._payload.value._store.validated = 1) : k._store && (k._store.validated = 1));
|
|
220
220
|
}
|
|
221
221
|
function I(k) {
|
|
222
222
|
return typeof k == "object" && k !== null && k.$$typeof === A;
|
|
223
223
|
}
|
|
224
|
-
var
|
|
224
|
+
var $ = Bs, A = Symbol.for("react.transitional.element"), S = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), W = Symbol.for("react.profiler"), Y = Symbol.for("react.consumer"), J = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), P = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), M = Symbol.for("react.memo"), B = Symbol.for("react.lazy"), K = Symbol.for("react.activity"), oe = Symbol.for("react.client.reference"), Q = $.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, X = Object.prototype.hasOwnProperty, D = Array.isArray, z = console.createTask ? console.createTask : function() {
|
|
225
225
|
return null;
|
|
226
226
|
};
|
|
227
|
-
|
|
227
|
+
$ = {
|
|
228
228
|
react_stack_bottom_frame: function(k) {
|
|
229
229
|
return k();
|
|
230
230
|
}
|
|
231
231
|
};
|
|
232
|
-
var te, ne = {}, ae =
|
|
233
|
-
|
|
232
|
+
var te, ne = {}, ae = $.react_stack_bottom_frame.bind(
|
|
233
|
+
$,
|
|
234
234
|
u
|
|
235
|
-
)(),
|
|
236
|
-
_t.Fragment =
|
|
235
|
+
)(), F = z(a(u)), R = {};
|
|
236
|
+
_t.Fragment = C, _t.jsx = function(k, U, Z) {
|
|
237
237
|
var G = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
238
238
|
return T(
|
|
239
239
|
k,
|
|
@@ -241,7 +241,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
241
241
|
Z,
|
|
242
242
|
!1,
|
|
243
243
|
G ? Error("react-stack-top-frame") : ae,
|
|
244
|
-
G ? z(a(k)) :
|
|
244
|
+
G ? z(a(k)) : F
|
|
245
245
|
);
|
|
246
246
|
}, _t.jsxs = function(k, U, Z) {
|
|
247
247
|
var G = 1e4 > Q.recentlyCreatedOwnerStacks++;
|
|
@@ -251,7 +251,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
251
251
|
Z,
|
|
252
252
|
!0,
|
|
253
253
|
G ? Error("react-stack-top-frame") : ae,
|
|
254
|
-
G ? z(a(k)) :
|
|
254
|
+
G ? z(a(k)) : F
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
257
|
})()), _t;
|
|
@@ -261,17 +261,17 @@ function Ks() {
|
|
|
261
261
|
return Eo || (Eo = 1, process.env.NODE_ENV === "production" ? Jt.exports = /* @__PURE__ */ Xs() : Jt.exports = /* @__PURE__ */ Us()), Jt.exports;
|
|
262
262
|
}
|
|
263
263
|
var w = /* @__PURE__ */ Ks();
|
|
264
|
-
function
|
|
264
|
+
function Ho(e) {
|
|
265
265
|
var r, i, a = "";
|
|
266
266
|
if (typeof e == "string" || typeof e == "number") a += e;
|
|
267
267
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
|
268
268
|
var c = e.length;
|
|
269
|
-
for (r = 0; r < c; r++) e[r] && (i =
|
|
269
|
+
for (r = 0; r < c; r++) e[r] && (i = Ho(e[r])) && (a && (a += " "), a += i);
|
|
270
270
|
} else for (i in e) e[i] && (a && (a += " "), a += i);
|
|
271
271
|
return a;
|
|
272
272
|
}
|
|
273
273
|
function se() {
|
|
274
|
-
for (var e, r, i = 0, a = "", c = arguments.length; i < c; i++) (e = arguments[i]) && (r =
|
|
274
|
+
for (var e, r, i = 0, a = "", c = arguments.length; i < c; i++) (e = arguments[i]) && (r = Ho(e)) && (a && (a += " "), a += r);
|
|
275
275
|
return a;
|
|
276
276
|
}
|
|
277
277
|
function nn({
|
|
@@ -284,7 +284,7 @@ function nn({
|
|
|
284
284
|
process.env.NODE_ENV === "development" && (nn.displayName = "Repeat");
|
|
285
285
|
function gr(e, r = {}, ...i) {
|
|
286
286
|
const { className: a, style: c, ...u } = r, { className: d, style: g, ...m } = e.props;
|
|
287
|
-
return
|
|
287
|
+
return Hs(e, {
|
|
288
288
|
className: `${d ?? ""} ${a ?? ""}`.split(" ").filter(Boolean).join(" ") || void 0,
|
|
289
289
|
style: {
|
|
290
290
|
...g ?? {},
|
|
@@ -294,7 +294,7 @@ function gr(e, r = {}, ...i) {
|
|
|
294
294
|
...u
|
|
295
295
|
}, ...i);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function me({
|
|
298
298
|
children: e,
|
|
299
299
|
element: r,
|
|
300
300
|
...i
|
|
@@ -305,13 +305,13 @@ function ge({
|
|
|
305
305
|
...e ? Array.isArray(e) ? e : [e] : []
|
|
306
306
|
);
|
|
307
307
|
}
|
|
308
|
-
process.env.NODE_ENV === "development" && (
|
|
308
|
+
process.env.NODE_ENV === "development" && (me.displayName = "Styled");
|
|
309
309
|
function Al(e) {
|
|
310
310
|
return e;
|
|
311
311
|
}
|
|
312
312
|
function ze(e, r = {}) {
|
|
313
313
|
const i = Object.keys(r), a = Object.values(r), c = {};
|
|
314
|
-
return
|
|
314
|
+
return jn.forEach(e, (u) => {
|
|
315
315
|
if (u == null)
|
|
316
316
|
return;
|
|
317
317
|
if (!An(u)) {
|
|
@@ -366,7 +366,7 @@ const Yo = /* @__PURE__ */ Te(({
|
|
|
366
366
|
ref: g,
|
|
367
367
|
className: se(r, b.root),
|
|
368
368
|
children: /* @__PURE__ */ w.jsx(nn, { count: c ? 2 : 1, children: (_) => /* @__PURE__ */ w.jsx("div", { "aria-hidden": !0, style: ce(T.section, T[`section${_}`]), children: /* @__PURE__ */ w.jsx(nn, { count: u, children: (I) => /* @__PURE__ */ w.jsx(
|
|
369
|
-
|
|
369
|
+
me,
|
|
370
370
|
{
|
|
371
371
|
"aria-hidden": !0,
|
|
372
372
|
className: se(b.bar),
|
|
@@ -468,7 +468,7 @@ const Uo = /* @__PURE__ */ Te(({
|
|
|
468
468
|
const I = () => {
|
|
469
469
|
const S = !a;
|
|
470
470
|
b?.(S), S ? g?.() : m?.();
|
|
471
|
-
},
|
|
471
|
+
}, $ = {
|
|
472
472
|
root: se({
|
|
473
473
|
active: a
|
|
474
474
|
})
|
|
@@ -479,7 +479,7 @@ const Uo = /* @__PURE__ */ Te(({
|
|
|
479
479
|
...T,
|
|
480
480
|
ref: _,
|
|
481
481
|
"aria-expanded": a,
|
|
482
|
-
className: se(r,
|
|
482
|
+
className: se(r, $.root),
|
|
483
483
|
style: ce(i, A.root),
|
|
484
484
|
onClick: I,
|
|
485
485
|
children: /* @__PURE__ */ w.jsx(
|
|
@@ -514,9 +514,9 @@ process.env.NODE_ENV === "development" && (Uo.displayName = "BurgerButton", Ko.d
|
|
|
514
514
|
var _e;
|
|
515
515
|
((e) => {
|
|
516
516
|
e.zero = r();
|
|
517
|
-
function r(S = 0,
|
|
517
|
+
function r(S = 0, C = 0) {
|
|
518
518
|
if (typeof S == "number")
|
|
519
|
-
return { x: S, y:
|
|
519
|
+
return { x: S, y: C };
|
|
520
520
|
if (!I(S)) throw Error("Invalid parameters passed to constructor");
|
|
521
521
|
return S instanceof Array ? {
|
|
522
522
|
x: S[0],
|
|
@@ -527,38 +527,38 @@ var _e;
|
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
529
|
e.make = r;
|
|
530
|
-
function i(S,
|
|
530
|
+
function i(S, C = {}) {
|
|
531
531
|
return r({
|
|
532
|
-
x: typeof
|
|
533
|
-
y: typeof
|
|
532
|
+
x: typeof C.x == "number" ? C.x : S.x,
|
|
533
|
+
y: typeof C.y == "number" ? C.y : S.y
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
e.clone = i;
|
|
537
|
-
function a(S,
|
|
537
|
+
function a(S, C) {
|
|
538
538
|
return r({
|
|
539
|
-
x: S.x +
|
|
540
|
-
y: S.y +
|
|
539
|
+
x: S.x + C.x,
|
|
540
|
+
y: S.y + C.y
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
e.add = a;
|
|
544
|
-
function c(S,
|
|
544
|
+
function c(S, C) {
|
|
545
545
|
return r({
|
|
546
|
-
x: S.x -
|
|
547
|
-
y: S.y -
|
|
546
|
+
x: S.x - C.x,
|
|
547
|
+
y: S.y - C.y
|
|
548
548
|
});
|
|
549
549
|
}
|
|
550
550
|
e.subtract = c;
|
|
551
|
-
function u(S,
|
|
551
|
+
function u(S, C) {
|
|
552
552
|
return r({
|
|
553
|
-
x: S.x *
|
|
554
|
-
y: S.y *
|
|
553
|
+
x: S.x * C.x,
|
|
554
|
+
y: S.y * C.y
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
557
|
e.multiply = u;
|
|
558
|
-
function d(S,
|
|
558
|
+
function d(S, C) {
|
|
559
559
|
return r({
|
|
560
|
-
x: S.x /
|
|
561
|
-
y: S.y /
|
|
560
|
+
x: S.x / C.x,
|
|
561
|
+
y: S.y / C.y
|
|
562
562
|
});
|
|
563
563
|
}
|
|
564
564
|
e.divide = d;
|
|
@@ -569,8 +569,8 @@ var _e;
|
|
|
569
569
|
});
|
|
570
570
|
}
|
|
571
571
|
e.reflect = g;
|
|
572
|
-
function m(S,
|
|
573
|
-
return !(S.x !==
|
|
572
|
+
function m(S, C) {
|
|
573
|
+
return !(S.x !== C.x || S.y !== C.y);
|
|
574
574
|
}
|
|
575
575
|
e.isEqual = m;
|
|
576
576
|
function b(S) {
|
|
@@ -592,10 +592,10 @@ var _e;
|
|
|
592
592
|
return S instanceof Array ? !(S.length !== 2 || typeof S[0] != "number" || typeof S[1] != "number") : typeof S == "object" ? !(typeof S.x != "number" || typeof S.y != "number") : !1;
|
|
593
593
|
}
|
|
594
594
|
e.isValidDescriptor = I;
|
|
595
|
-
function
|
|
595
|
+
function $(S) {
|
|
596
596
|
return typeof S == "object" && typeof S.x == "number" && typeof S.y == "number";
|
|
597
597
|
}
|
|
598
|
-
e.isPoint =
|
|
598
|
+
e.isPoint = $;
|
|
599
599
|
function A(S) {
|
|
600
600
|
return S.x === 0 && S.y === 0;
|
|
601
601
|
}
|
|
@@ -637,12 +637,12 @@ function Ws(e, r) {
|
|
|
637
637
|
return console.error(i), !1;
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
var
|
|
640
|
+
var je;
|
|
641
641
|
((e) => {
|
|
642
642
|
e.zero = r();
|
|
643
|
-
function r(S = 0,
|
|
643
|
+
function r(S = 0, C = 0) {
|
|
644
644
|
if (typeof S == "number")
|
|
645
|
-
return { width: S, height:
|
|
645
|
+
return { width: S, height: C };
|
|
646
646
|
if (!I(S)) throw Error("Invalid parameters passed to constructor");
|
|
647
647
|
return S instanceof Array ? {
|
|
648
648
|
width: S[0],
|
|
@@ -653,38 +653,38 @@ var Ce;
|
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
e.make = r;
|
|
656
|
-
function i(S,
|
|
656
|
+
function i(S, C = {}) {
|
|
657
657
|
return r({
|
|
658
|
-
width: typeof
|
|
659
|
-
height: typeof
|
|
658
|
+
width: typeof C.width == "number" ? C.width : S.width,
|
|
659
|
+
height: typeof C.height == "number" ? C.height : S.height
|
|
660
660
|
});
|
|
661
661
|
}
|
|
662
662
|
e.clone = i;
|
|
663
|
-
function a(S,
|
|
663
|
+
function a(S, C) {
|
|
664
664
|
return r({
|
|
665
|
-
width: S.width +
|
|
666
|
-
height: S.height +
|
|
665
|
+
width: S.width + C.width,
|
|
666
|
+
height: S.height + C.height
|
|
667
667
|
});
|
|
668
668
|
}
|
|
669
669
|
e.add = a;
|
|
670
|
-
function c(S,
|
|
670
|
+
function c(S, C) {
|
|
671
671
|
return r({
|
|
672
|
-
width: S.width -
|
|
673
|
-
height: S.height -
|
|
672
|
+
width: S.width - C.width,
|
|
673
|
+
height: S.height - C.height
|
|
674
674
|
});
|
|
675
675
|
}
|
|
676
676
|
e.subtract = c;
|
|
677
|
-
function u(S,
|
|
677
|
+
function u(S, C) {
|
|
678
678
|
return r({
|
|
679
|
-
width: S.width *
|
|
680
|
-
height: S.height *
|
|
679
|
+
width: S.width * C.width,
|
|
680
|
+
height: S.height * C.height
|
|
681
681
|
});
|
|
682
682
|
}
|
|
683
683
|
e.multiply = u;
|
|
684
|
-
function d(S,
|
|
684
|
+
function d(S, C) {
|
|
685
685
|
return r({
|
|
686
|
-
width: S.width /
|
|
687
|
-
height: S.height /
|
|
686
|
+
width: S.width / C.width,
|
|
687
|
+
height: S.height / C.height
|
|
688
688
|
});
|
|
689
689
|
}
|
|
690
690
|
e.divide = d;
|
|
@@ -695,8 +695,8 @@ var Ce;
|
|
|
695
695
|
});
|
|
696
696
|
}
|
|
697
697
|
e.rotate = g;
|
|
698
|
-
function m(S,
|
|
699
|
-
return !(S.width !==
|
|
698
|
+
function m(S, C) {
|
|
699
|
+
return !(S.width !== C.width || S.height !== C.height);
|
|
700
700
|
}
|
|
701
701
|
e.isEqual = m;
|
|
702
702
|
function b(S) {
|
|
@@ -718,49 +718,49 @@ var Ce;
|
|
|
718
718
|
return S instanceof Array ? !(S.length !== 2 || typeof S[0] != "number" || typeof S[1] != "number") : typeof S == "object" ? !(typeof S.width != "number" || typeof S.height != "number") : !1;
|
|
719
719
|
}
|
|
720
720
|
e.isValidDescriptor = I;
|
|
721
|
-
function
|
|
721
|
+
function $(S) {
|
|
722
722
|
return typeof S == "object" && typeof S.width == "number" && typeof S.height == "number";
|
|
723
723
|
}
|
|
724
|
-
e.isSize =
|
|
724
|
+
e.isSize = $;
|
|
725
725
|
function A(S) {
|
|
726
726
|
return S.width === 0 && S.height === 0;
|
|
727
727
|
}
|
|
728
728
|
e.isZero = A;
|
|
729
|
-
})(
|
|
729
|
+
})(je || (je = {}));
|
|
730
730
|
var be;
|
|
731
731
|
((e) => {
|
|
732
732
|
e.zero = r();
|
|
733
733
|
function r(x = 0, P = 0, E = 0, M = 0) {
|
|
734
734
|
if (typeof x == "number" && typeof P == "number") {
|
|
735
|
-
const
|
|
735
|
+
const B = x, K = P;
|
|
736
736
|
return {
|
|
737
737
|
top: K,
|
|
738
|
-
right:
|
|
738
|
+
right: B + E,
|
|
739
739
|
bottom: K + M,
|
|
740
|
-
left:
|
|
740
|
+
left: B,
|
|
741
741
|
width: E,
|
|
742
742
|
height: M
|
|
743
743
|
};
|
|
744
|
-
} else if (_e.isPoint(x) &&
|
|
745
|
-
const
|
|
744
|
+
} else if (_e.isPoint(x) && je.isSize(P)) {
|
|
745
|
+
const B = x, K = P;
|
|
746
746
|
return {
|
|
747
|
-
top:
|
|
748
|
-
right:
|
|
749
|
-
bottom:
|
|
750
|
-
left:
|
|
747
|
+
top: B.y,
|
|
748
|
+
right: B.x + K.width,
|
|
749
|
+
bottom: B.y + K.height,
|
|
750
|
+
left: B.x,
|
|
751
751
|
width: K.width,
|
|
752
752
|
height: K.height
|
|
753
753
|
};
|
|
754
754
|
} else {
|
|
755
|
-
const
|
|
756
|
-
if (!W(
|
|
755
|
+
const B = x;
|
|
756
|
+
if (!W(B)) throw Error("Invalid parameters passed to constructor");
|
|
757
757
|
return {
|
|
758
|
-
top:
|
|
759
|
-
right:
|
|
760
|
-
bottom:
|
|
761
|
-
left:
|
|
762
|
-
width:
|
|
763
|
-
height:
|
|
758
|
+
top: B.y,
|
|
759
|
+
right: B.x + B.width,
|
|
760
|
+
bottom: B.y + B.height,
|
|
761
|
+
left: B.x,
|
|
762
|
+
width: B.width,
|
|
763
|
+
height: B.height
|
|
764
764
|
};
|
|
765
765
|
}
|
|
766
766
|
}
|
|
@@ -773,7 +773,7 @@ var be;
|
|
|
773
773
|
}
|
|
774
774
|
e.center = i;
|
|
775
775
|
function a(x) {
|
|
776
|
-
return
|
|
776
|
+
return je.make({
|
|
777
777
|
width: x.width,
|
|
778
778
|
height: x.height
|
|
779
779
|
});
|
|
@@ -784,13 +784,13 @@ var be;
|
|
|
784
784
|
if (x == null) return;
|
|
785
785
|
if (Y(x)) return x;
|
|
786
786
|
if (Tt(x)) return c(document.documentElement || document.body.parentNode || document.body, P);
|
|
787
|
-
const E = x instanceof Array ? x : [x], M = E.length,
|
|
787
|
+
const E = x instanceof Array ? x : [x], M = E.length, B = P.reference || window, K = u(), oe = Tt(B) ? K : c(P.reference);
|
|
788
788
|
if (!K || !oe) return;
|
|
789
789
|
let Q;
|
|
790
790
|
for (let X = 0; X < M; X++) {
|
|
791
791
|
const D = E[X], z = D.getBoundingClientRect(), te = r({
|
|
792
|
-
x: z.left + K.left - (Tt(
|
|
793
|
-
y: z.top + K.top - (Tt(
|
|
792
|
+
x: z.left + K.left - (Tt(B) ? 0 : oe.left),
|
|
793
|
+
y: z.top + K.top - (Tt(B) ? 0 : oe.top),
|
|
794
794
|
width: P.overflow ? D.scrollWidth : D instanceof HTMLElement ? D.offsetWidth : z.width,
|
|
795
795
|
height: P.overflow ? D.scrollHeight : D instanceof HTMLElement ? D.offsetHeight : z.height
|
|
796
796
|
});
|
|
@@ -840,15 +840,15 @@ var be;
|
|
|
840
840
|
function T(...x) {
|
|
841
841
|
try {
|
|
842
842
|
const P = x.length, E = {};
|
|
843
|
-
let M,
|
|
843
|
+
let M, B;
|
|
844
844
|
for (let K = 0; K < P; K++) {
|
|
845
845
|
if (M || (M = c(x[K])), K === 0 && K + 1 === P)
|
|
846
|
-
|
|
846
|
+
B = u();
|
|
847
847
|
else if (K + 1 < P)
|
|
848
|
-
|
|
848
|
+
B = c(x[K + 1]);
|
|
849
849
|
else
|
|
850
850
|
break;
|
|
851
|
-
!M || !
|
|
851
|
+
!M || !B || (E.width = Math.max(0, Math.min(M.right, B.right) - Math.max(M.left, B.left)), E.height = Math.max(0, Math.min(M.bottom, B.bottom) - Math.max(M.top, B.top)), E.y = Math.max(M.top, B.top), E.x = Math.max(M.left, B.left), E.width * E.height === 0 && (E.width = 0, E.height = 0, E.y = NaN, E.x = NaN), M = r(E));
|
|
852
852
|
}
|
|
853
853
|
return r(E);
|
|
854
854
|
} catch (P) {
|
|
@@ -875,7 +875,7 @@ var be;
|
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
e.concat = I;
|
|
878
|
-
function
|
|
878
|
+
function $(x) {
|
|
879
879
|
return r({
|
|
880
880
|
x: x.left,
|
|
881
881
|
y: x.top,
|
|
@@ -883,7 +883,7 @@ var be;
|
|
|
883
883
|
height: x.width
|
|
884
884
|
});
|
|
885
885
|
}
|
|
886
|
-
e.rotate =
|
|
886
|
+
e.rotate = $;
|
|
887
887
|
function A(x, P) {
|
|
888
888
|
return !(x.top !== P.top || x.right !== P.right || x.bottom !== P.bottom || x.left !== P.left || x.width !== P.width || x.height !== P.height);
|
|
889
889
|
}
|
|
@@ -892,10 +892,10 @@ var be;
|
|
|
892
892
|
return Ws(P, x);
|
|
893
893
|
}
|
|
894
894
|
e.contains = S;
|
|
895
|
-
function
|
|
895
|
+
function C(x) {
|
|
896
896
|
return `Rect(top=${x.top}, right=${x.right}, bottom=${x.bottom}, left=${x.left}, width=${x.width}, height=${x.height})`;
|
|
897
897
|
}
|
|
898
|
-
e.toString =
|
|
898
|
+
e.toString = C;
|
|
899
899
|
function q(x) {
|
|
900
900
|
return Object.freeze({
|
|
901
901
|
top: x.top,
|
|
@@ -931,7 +931,7 @@ function Se(e) {
|
|
|
931
931
|
}
|
|
932
932
|
function Js(e, { onChange: r }) {
|
|
933
933
|
const i = Se(r);
|
|
934
|
-
|
|
934
|
+
$e(() => {
|
|
935
935
|
const a = e.current;
|
|
936
936
|
if (!a) return;
|
|
937
937
|
const c = new IntersectionObserver((u) => {
|
|
@@ -948,7 +948,7 @@ function Js(e, { onChange: r }) {
|
|
|
948
948
|
}
|
|
949
949
|
function mr(e, { onResize: r }) {
|
|
950
950
|
const i = Se(r);
|
|
951
|
-
|
|
951
|
+
$e(() => {
|
|
952
952
|
const a = e.current;
|
|
953
953
|
if (!a) return;
|
|
954
954
|
const c = new ResizeObserver(() => {
|
|
@@ -960,8 +960,8 @@ function mr(e, { onResize: r }) {
|
|
|
960
960
|
}, [e.current]);
|
|
961
961
|
}
|
|
962
962
|
function Zs() {
|
|
963
|
-
const [e, r] = Oe(
|
|
964
|
-
return
|
|
963
|
+
const [e, r] = Oe(je.zero);
|
|
964
|
+
return $e(() => {
|
|
965
965
|
const i = () => {
|
|
966
966
|
const a = be.size(be.fromViewport());
|
|
967
967
|
r(a);
|
|
@@ -983,10 +983,10 @@ function nt(e) {
|
|
|
983
983
|
const u = be.from(c);
|
|
984
984
|
u && i(u);
|
|
985
985
|
}
|
|
986
|
-
}),
|
|
986
|
+
}), $e(() => {
|
|
987
987
|
const c = e.current, u = be.from(c);
|
|
988
988
|
u && i(u);
|
|
989
|
-
}, [
|
|
989
|
+
}, [je.toString(a)]), r;
|
|
990
990
|
}
|
|
991
991
|
var on;
|
|
992
992
|
((e) => {
|
|
@@ -1037,7 +1037,7 @@ var on;
|
|
|
1037
1037
|
})(on || (on = {}));
|
|
1038
1038
|
function Qs({ src: e, srcSet: r, sizes: i }, { onLoadStart: a, onLoadComplete: c, onLoadError: u } = {}) {
|
|
1039
1039
|
const d = we(void 0), g = Se(a), m = Se(c), b = Se(u);
|
|
1040
|
-
|
|
1040
|
+
$e(() => {
|
|
1041
1041
|
let T = !1;
|
|
1042
1042
|
const _ = (A) => {
|
|
1043
1043
|
if (T) return;
|
|
@@ -1047,9 +1047,9 @@ function Qs({ src: e, srcSet: r, sizes: i }, { onLoadStart: a, onLoadComplete: c
|
|
|
1047
1047
|
if (T) return;
|
|
1048
1048
|
const S = A.currentTarget;
|
|
1049
1049
|
b.current?.(S);
|
|
1050
|
-
},
|
|
1051
|
-
return
|
|
1052
|
-
T = !0,
|
|
1050
|
+
}, $ = new Image();
|
|
1051
|
+
return $.addEventListener("load", _), $.addEventListener("error", I), g.current?.($), r && ($.srcset = r), i && ($.sizes = i), $.src = e, d.current = $, () => {
|
|
1052
|
+
T = !0, $.removeEventListener("load", _), $.removeEventListener("error", I), d.current = void 0;
|
|
1053
1053
|
};
|
|
1054
1054
|
}, [e, r, i]);
|
|
1055
1055
|
}
|
|
@@ -1063,22 +1063,22 @@ function Go({
|
|
|
1063
1063
|
onLoadComplete: u,
|
|
1064
1064
|
onLoadError: d
|
|
1065
1065
|
} = {}) {
|
|
1066
|
-
const [g, m] = Oe(), b = Se(c), T = Se(u), _ = Se(d), I =
|
|
1066
|
+
const [g, m] = Oe(), b = Se(c), T = Se(u), _ = Se(d), I = he((S) => {
|
|
1067
1067
|
a || m(void 0), b.current?.(S);
|
|
1068
|
-
}, [a]),
|
|
1068
|
+
}, [a]), $ = he((S) => {
|
|
1069
1069
|
m(ea(S)), T.current?.(S);
|
|
1070
|
-
}, []), A =
|
|
1070
|
+
}, []), A = he((S) => {
|
|
1071
1071
|
a || m(void 0), _.current?.(S);
|
|
1072
1072
|
}, [a]);
|
|
1073
1073
|
return Qs({ src: e, srcSet: r, sizes: i }, {
|
|
1074
1074
|
onLoadStart: I,
|
|
1075
|
-
onLoadComplete:
|
|
1075
|
+
onLoadComplete: $,
|
|
1076
1076
|
onLoadError: A
|
|
1077
1077
|
}), g;
|
|
1078
1078
|
}
|
|
1079
1079
|
function ea(e) {
|
|
1080
1080
|
if (e && typeof e.width == "number" && typeof e.height == "number")
|
|
1081
|
-
return
|
|
1081
|
+
return je.make(e.width, e.height);
|
|
1082
1082
|
}
|
|
1083
1083
|
const qo = /* @__PURE__ */ Te(({
|
|
1084
1084
|
alt: e,
|
|
@@ -1100,7 +1100,7 @@ const qo = /* @__PURE__ */ Te(({
|
|
|
1100
1100
|
onLoadStart: u,
|
|
1101
1101
|
onLoadComplete: d,
|
|
1102
1102
|
onLoadError: g
|
|
1103
|
-
}),
|
|
1103
|
+
}), $ = ta();
|
|
1104
1104
|
return Ee(() => {
|
|
1105
1105
|
m?.(I);
|
|
1106
1106
|
}, [I?.width, I?.height]), /* @__PURE__ */ w.jsx(
|
|
@@ -1112,7 +1112,7 @@ const qo = /* @__PURE__ */ Te(({
|
|
|
1112
1112
|
alt: e,
|
|
1113
1113
|
loading: i,
|
|
1114
1114
|
src: a,
|
|
1115
|
-
style: {
|
|
1115
|
+
style: { ...$.root, ...c }
|
|
1116
1116
|
}
|
|
1117
1117
|
);
|
|
1118
1118
|
});
|
|
@@ -1165,8 +1165,8 @@ const Jo = /* @__PURE__ */ Te(({
|
|
|
1165
1165
|
...T
|
|
1166
1166
|
}, _) => {
|
|
1167
1167
|
const I = (P) => {
|
|
1168
|
-
|
|
1169
|
-
},
|
|
1168
|
+
C(P ? P.width / P.height : NaN);
|
|
1169
|
+
}, $ = we(null), A = _ ?? $, [S, C] = Oe(NaN), q = isNaN(i) ? S : i, W = nt(A), Y = W.width / W.height, J = je.make(
|
|
1170
1170
|
Y > 1 ? Math.max(W.width, W.height * q) : Math.max(W.width, Math.max(W.height, W.width / q) * q),
|
|
1171
1171
|
Y > 1 ? Math.max(W.height, Math.max(W.width, W.height * q) / q) : Math.max(W.height, W.width / q)
|
|
1172
1172
|
), x = ze(e, {
|
|
@@ -1198,7 +1198,7 @@ const Jo = /* @__PURE__ */ Te(({
|
|
|
1198
1198
|
}
|
|
1199
1199
|
),
|
|
1200
1200
|
x.viewport && /* @__PURE__ */ w.jsx(
|
|
1201
|
-
|
|
1201
|
+
me,
|
|
1202
1202
|
{
|
|
1203
1203
|
element: x.viewport,
|
|
1204
1204
|
style: ce(ar.viewport, {
|
|
@@ -1240,7 +1240,7 @@ function na(e, {
|
|
|
1240
1240
|
onLoadError: a
|
|
1241
1241
|
} = {}) {
|
|
1242
1242
|
const c = Se(r), u = Se(i), d = Se(a);
|
|
1243
|
-
|
|
1243
|
+
$e(() => {
|
|
1244
1244
|
if (!e) return;
|
|
1245
1245
|
const g = window.document.createElement("video"), m = () => u.current?.(g), b = () => d.current?.(g);
|
|
1246
1246
|
return g.addEventListener("loadedmetadata", m), g.addEventListener("error", b), g.src = e, c.current?.(g), () => {
|
|
@@ -1254,12 +1254,12 @@ function ra(e, {
|
|
|
1254
1254
|
onLoadComplete: a,
|
|
1255
1255
|
onLoadError: c
|
|
1256
1256
|
} = {}) {
|
|
1257
|
-
const [u, d] = Oe(), g = Se(i), m = Se(a), b = Se(c), T =
|
|
1258
|
-
r || d(void 0), g.current?.(
|
|
1259
|
-
}, [r]), _ =
|
|
1260
|
-
d(oa(
|
|
1261
|
-
}, []), I =
|
|
1262
|
-
r || d(void 0), b.current?.(
|
|
1257
|
+
const [u, d] = Oe(), g = Se(i), m = Se(a), b = Se(c), T = he(($) => {
|
|
1258
|
+
r || d(void 0), g.current?.($);
|
|
1259
|
+
}, [r]), _ = he(($) => {
|
|
1260
|
+
d(oa($)), m.current?.($);
|
|
1261
|
+
}, []), I = he(($) => {
|
|
1262
|
+
r || d(void 0), b.current?.($);
|
|
1263
1263
|
}, [r]);
|
|
1264
1264
|
return na(e, {
|
|
1265
1265
|
onLoadStart: T,
|
|
@@ -1269,7 +1269,7 @@ function ra(e, {
|
|
|
1269
1269
|
}
|
|
1270
1270
|
function oa(e) {
|
|
1271
1271
|
if (e && typeof e.videoWidth == "number" && typeof e.videoHeight == "number")
|
|
1272
|
-
return
|
|
1272
|
+
return je.make(e.videoWidth, e.videoHeight);
|
|
1273
1273
|
}
|
|
1274
1274
|
const Zo = /* @__PURE__ */ Te(({
|
|
1275
1275
|
autoLoop: e = !0,
|
|
@@ -1285,17 +1285,17 @@ const Zo = /* @__PURE__ */ Te(({
|
|
|
1285
1285
|
onFullscreenChange: T,
|
|
1286
1286
|
onLoadMetadata: _,
|
|
1287
1287
|
onLoadMetadataComplete: I,
|
|
1288
|
-
onLoadMetadataError:
|
|
1288
|
+
onLoadMetadataError: $,
|
|
1289
1289
|
onPause: A,
|
|
1290
1290
|
onPlay: S,
|
|
1291
|
-
onSizeChange:
|
|
1291
|
+
onSizeChange: C,
|
|
1292
1292
|
onTimeUpdate: q,
|
|
1293
1293
|
...W
|
|
1294
1294
|
}, Y) => {
|
|
1295
1295
|
const J = we(null), x = Y ?? J, P = ra(d, {
|
|
1296
1296
|
onLoadStart: _,
|
|
1297
1297
|
onLoadComplete: I,
|
|
1298
|
-
onLoadError:
|
|
1298
|
+
onLoadError: $
|
|
1299
1299
|
}), E = ia();
|
|
1300
1300
|
Ee(() => {
|
|
1301
1301
|
if (!x.current) return;
|
|
@@ -1314,12 +1314,12 @@ const Zo = /* @__PURE__ */ Te(({
|
|
|
1314
1314
|
D(), x.current?.removeEventListener("webkitfullscreenchange", z), x.current?.removeEventListener("mozfullscreenchange", z), x.current?.removeEventListener("fullscreenchange", z);
|
|
1315
1315
|
};
|
|
1316
1316
|
}, [d]), Ee(() => {
|
|
1317
|
-
|
|
1317
|
+
C?.(P);
|
|
1318
1318
|
}, [P]);
|
|
1319
1319
|
const M = (z) => {
|
|
1320
1320
|
const te = z.currentTarget;
|
|
1321
1321
|
r && te.paused && X(), m?.();
|
|
1322
|
-
},
|
|
1322
|
+
}, B = (z) => {
|
|
1323
1323
|
S?.();
|
|
1324
1324
|
}, K = (z) => {
|
|
1325
1325
|
A?.();
|
|
@@ -1348,7 +1348,7 @@ const Zo = /* @__PURE__ */ Te(({
|
|
|
1348
1348
|
onCanPlay: M,
|
|
1349
1349
|
onEnded: oe,
|
|
1350
1350
|
onPause: K,
|
|
1351
|
-
onPlay:
|
|
1351
|
+
onPlay: B,
|
|
1352
1352
|
onTimeUpdate: Q,
|
|
1353
1353
|
children: /* @__PURE__ */ w.jsx("source", { src: d })
|
|
1354
1354
|
}
|
|
@@ -1376,10 +1376,10 @@ const Qo = /* @__PURE__ */ Te(({
|
|
|
1376
1376
|
src: T,
|
|
1377
1377
|
onCanPlay: _,
|
|
1378
1378
|
onEnd: I,
|
|
1379
|
-
onFullscreenChange:
|
|
1379
|
+
onFullscreenChange: $,
|
|
1380
1380
|
onLoadMetadata: A,
|
|
1381
1381
|
onLoadMetadataComplete: S,
|
|
1382
|
-
onLoadMetadataError:
|
|
1382
|
+
onLoadMetadataError: C,
|
|
1383
1383
|
onPause: q,
|
|
1384
1384
|
onPlay: W,
|
|
1385
1385
|
onSizeChange: Y,
|
|
@@ -1387,7 +1387,7 @@ const Qo = /* @__PURE__ */ Te(({
|
|
|
1387
1387
|
}, x) => {
|
|
1388
1388
|
const P = (z) => {
|
|
1389
1389
|
K(z ? z.width / z.height : NaN), Y?.(z);
|
|
1390
|
-
}, E = x ?? we(null), M = nt(E), [
|
|
1390
|
+
}, E = x ?? we(null), M = nt(E), [B, K] = Oe(NaN), oe = isNaN(a) ? B : a, Q = M.width / M.height, X = je.make(
|
|
1391
1391
|
Q > 1 ? Math.max(M.width, M.height * oe) : Math.max(M.width, Math.max(M.height, M.width / oe) * oe),
|
|
1392
1392
|
Q > 1 ? Math.max(M.height, Math.max(M.width, M.height * oe) / oe) : Math.max(M.height, M.width / oe)
|
|
1393
1393
|
), D = ze(r, {
|
|
@@ -1419,17 +1419,17 @@ const Qo = /* @__PURE__ */ Te(({
|
|
|
1419
1419
|
}),
|
|
1420
1420
|
onCanPlay: _,
|
|
1421
1421
|
onEnd: I,
|
|
1422
|
-
onFullscreenChange:
|
|
1422
|
+
onFullscreenChange: $,
|
|
1423
1423
|
onLoadMetadata: A,
|
|
1424
1424
|
onLoadMetadataComplete: S,
|
|
1425
|
-
onLoadMetadataError:
|
|
1425
|
+
onLoadMetadataError: C,
|
|
1426
1426
|
onPause: q,
|
|
1427
1427
|
onPlay: W,
|
|
1428
1428
|
onSizeChange: (z) => P(z)
|
|
1429
1429
|
}
|
|
1430
1430
|
),
|
|
1431
1431
|
D.viewport && /* @__PURE__ */ w.jsx(
|
|
1432
|
-
|
|
1432
|
+
me,
|
|
1433
1433
|
{
|
|
1434
1434
|
element: D.viewport,
|
|
1435
1435
|
style: ce(cr.viewport, {
|
|
@@ -1443,7 +1443,7 @@ const Qo = /* @__PURE__ */ Te(({
|
|
|
1443
1443
|
]
|
|
1444
1444
|
}
|
|
1445
1445
|
);
|
|
1446
|
-
}), br = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), xr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }),
|
|
1446
|
+
}), br = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), xr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), Ll = /* @__PURE__ */ Object.assign(Qo, {
|
|
1447
1447
|
/**
|
|
1448
1448
|
* Component for optional content inside a {@link CoverVideo}.
|
|
1449
1449
|
*/
|
|
@@ -1520,7 +1520,7 @@ const ca = /* @__PURE__ */ Te(({
|
|
|
1520
1520
|
onChange: a,
|
|
1521
1521
|
...c
|
|
1522
1522
|
}, u) => {
|
|
1523
|
-
const d = i.length - 1, g = i[e], m = typeof g == "string" ? g : g?.label, b =
|
|
1523
|
+
const d = i.length - 1, g = i[e], m = typeof g == "string" ? g : g?.label, b = he(() => {
|
|
1524
1524
|
if (r) return;
|
|
1525
1525
|
const T = e < d ? e + 1 : 0, _ = i[T], I = typeof _ == "string" ? _ : _?.value;
|
|
1526
1526
|
a?.(I, T);
|
|
@@ -1567,7 +1567,7 @@ function la() {
|
|
|
1567
1567
|
}), lr;
|
|
1568
1568
|
}
|
|
1569
1569
|
var ua = /* @__PURE__ */ la();
|
|
1570
|
-
const qe = /* @__PURE__ */
|
|
1570
|
+
const qe = /* @__PURE__ */ Bo(ua);
|
|
1571
1571
|
var en = { exports: {} }, fa = en.exports, So;
|
|
1572
1572
|
function da() {
|
|
1573
1573
|
return So || (So = 1, (function(e, r) {
|
|
@@ -1635,7 +1635,7 @@ function da() {
|
|
|
1635
1635
|
if (n === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1636
1636
|
return n;
|
|
1637
1637
|
}
|
|
1638
|
-
function
|
|
1638
|
+
function $(n) {
|
|
1639
1639
|
var t = (function() {
|
|
1640
1640
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
1641
1641
|
if (typeof Proxy == "function") return !0;
|
|
@@ -1684,7 +1684,7 @@ function da() {
|
|
|
1684
1684
|
})(n, "string");
|
|
1685
1685
|
return typeof t == "symbol" ? t : t + "";
|
|
1686
1686
|
}
|
|
1687
|
-
var
|
|
1687
|
+
var C = function(n) {
|
|
1688
1688
|
return !(!n || !n.Window) && n instanceof n.Window;
|
|
1689
1689
|
}, q = void 0, W = void 0;
|
|
1690
1690
|
function Y(n) {
|
|
@@ -1693,7 +1693,7 @@ function da() {
|
|
|
1693
1693
|
t.ownerDocument !== n.document && typeof n.wrap == "function" && n.wrap(t) === t && (n = n.wrap(n)), W = n;
|
|
1694
1694
|
}
|
|
1695
1695
|
function J(n) {
|
|
1696
|
-
return
|
|
1696
|
+
return C(n) ? n : (n.ownerDocument || n).defaultView || W.window;
|
|
1697
1697
|
}
|
|
1698
1698
|
typeof window < "u" && window && Y(window);
|
|
1699
1699
|
var x = function(n) {
|
|
@@ -1701,7 +1701,7 @@ function da() {
|
|
|
1701
1701
|
}, P = function(n) {
|
|
1702
1702
|
return typeof n == "function";
|
|
1703
1703
|
}, E = { window: function(n) {
|
|
1704
|
-
return n === W ||
|
|
1704
|
+
return n === W || C(n);
|
|
1705
1705
|
}, docFrag: function(n) {
|
|
1706
1706
|
return x(n) && n.nodeType === 11;
|
|
1707
1707
|
}, object: x, func: P, number: function(n) {
|
|
@@ -1726,7 +1726,7 @@ function da() {
|
|
|
1726
1726
|
o === "x" ? (t.coords.cur.page.y = t.coords.start.page.y, t.coords.cur.client.y = t.coords.start.client.y, t.coords.velocity.client.y = 0, t.coords.velocity.page.y = 0) : o === "y" && (t.coords.cur.page.x = t.coords.start.page.x, t.coords.cur.client.x = t.coords.start.client.x, t.coords.velocity.client.x = 0, t.coords.velocity.page.x = 0);
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
|
-
function
|
|
1729
|
+
function B(n) {
|
|
1730
1730
|
var t = n.iEvent, o = n.interaction;
|
|
1731
1731
|
if (o.prepared.name === "drag") {
|
|
1732
1732
|
var s = o.prepared.axis;
|
|
@@ -1739,12 +1739,12 @@ function da() {
|
|
|
1739
1739
|
var K = { id: "actions/drag", install: function(n) {
|
|
1740
1740
|
var t = n.actions, o = n.Interactable, s = n.defaults;
|
|
1741
1741
|
o.prototype.draggable = K.draggable, t.map.drag = K, t.methodDict.drag = "draggable", s.actions.drag = K.defaults;
|
|
1742
|
-
}, listeners: { "interactions:before-action-move": M, "interactions:action-resume": M, "interactions:action-move":
|
|
1742
|
+
}, listeners: { "interactions:before-action-move": M, "interactions:action-resume": M, "interactions:action-move": B, "auto-start:check": function(n) {
|
|
1743
1743
|
var t = n.interaction, o = n.interactable, s = n.buttons, l = o.options.drag;
|
|
1744
1744
|
if (l && l.enabled && (!t.pointerIsDown || !/mouse|pointer/.test(t.pointerType) || (s & o.options.drag.mouseButtons) != 0)) return n.action = { name: "drag", axis: l.lockAxis === "start" ? l.startAxis : l.lockAxis }, !1;
|
|
1745
1745
|
} }, draggable: function(n) {
|
|
1746
1746
|
return E.object(n) ? (this.options.drag.enabled = n.enabled !== !1, this.setPerAction("drag", n), this.setOnEvents("drag", n), /^(xy|x|y|start)$/.test(n.lockAxis) && (this.options.drag.lockAxis = n.lockAxis), /^(xy|x|y)$/.test(n.startAxis) && (this.options.drag.startAxis = n.startAxis), this) : E.bool(n) ? (this.options.drag.enabled = n, this) : this.options.drag;
|
|
1747
|
-
}, beforeMove: M, move:
|
|
1747
|
+
}, beforeMove: M, move: B, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() {
|
|
1748
1748
|
return "move";
|
|
1749
1749
|
}, filterEventType: function(n) {
|
|
1750
1750
|
return n.search("drag") === 0;
|
|
@@ -1769,11 +1769,11 @@ function da() {
|
|
|
1769
1769
|
function ae(n, t) {
|
|
1770
1770
|
for (; E.element(n); ) {
|
|
1771
1771
|
if (R(n, t)) return n;
|
|
1772
|
-
n =
|
|
1772
|
+
n = F(n);
|
|
1773
1773
|
}
|
|
1774
1774
|
return null;
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function F(n) {
|
|
1777
1777
|
var t = n.parentNode;
|
|
1778
1778
|
if (E.docFrag(t)) {
|
|
1779
1779
|
for (; (t = t.host) && E.docFrag(t); ) ;
|
|
@@ -1794,7 +1794,7 @@ function da() {
|
|
|
1794
1794
|
function Z(n, t, o) {
|
|
1795
1795
|
for (; E.element(n); ) {
|
|
1796
1796
|
if (R(n, t)) return !0;
|
|
1797
|
-
if ((n =
|
|
1797
|
+
if ((n = F(n)) === o) return R(n, t);
|
|
1798
1798
|
}
|
|
1799
1799
|
return !1;
|
|
1800
1800
|
}
|
|
@@ -1805,7 +1805,7 @@ function da() {
|
|
|
1805
1805
|
var t = n instanceof D.SVGElement ? n.getBoundingClientRect() : n.getClientRects()[0];
|
|
1806
1806
|
return t && { left: t.left, right: t.right, top: t.top, bottom: t.bottom, width: t.width || t.right - t.left, height: t.height || t.bottom - t.top };
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function ge(n) {
|
|
1809
1809
|
var t, o = fe(n);
|
|
1810
1810
|
if (!te.isIOS7 && o) {
|
|
1811
1811
|
var s = { x: (t = (t = J(n)) || W).scrollX || t.document.documentElement.scrollLeft, y: t.scrollY || t.document.documentElement.scrollTop };
|
|
@@ -1814,7 +1814,7 @@ function da() {
|
|
|
1814
1814
|
return o;
|
|
1815
1815
|
}
|
|
1816
1816
|
function ue(n) {
|
|
1817
|
-
for (var t = []; n; ) t.push(n), n =
|
|
1817
|
+
for (var t = []; n; ) t.push(n), n = F(n);
|
|
1818
1818
|
return t;
|
|
1819
1819
|
}
|
|
1820
1820
|
function Ne(n) {
|
|
@@ -1824,25 +1824,25 @@ function da() {
|
|
|
1824
1824
|
for (var o in t) n[o] = t[o];
|
|
1825
1825
|
return n;
|
|
1826
1826
|
}
|
|
1827
|
-
function
|
|
1828
|
-
return n === "parent" ?
|
|
1827
|
+
function Be(n, t, o) {
|
|
1828
|
+
return n === "parent" ? F(o) : n === "self" ? t.getRect(o) : ae(o, n);
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function Ce(n, t, o, s) {
|
|
1831
1831
|
var l = n;
|
|
1832
|
-
return E.string(l) ? l =
|
|
1832
|
+
return E.string(l) ? l = Be(l, t, o) : E.func(l) && (l = l.apply(void 0, s)), E.element(l) && (l = ge(l)), l;
|
|
1833
1833
|
}
|
|
1834
1834
|
function Ie(n) {
|
|
1835
1835
|
return n && { x: "x" in n ? n.x : n.left, y: "y" in n ? n.y : n.top };
|
|
1836
1836
|
}
|
|
1837
|
-
function
|
|
1837
|
+
function He(n) {
|
|
1838
1838
|
return !n || "x" in n && "y" in n || ((n = ee({}, n)).x = n.left || 0, n.y = n.top || 0, n.width = n.width || (n.right || 0) - n.x, n.height = n.height || (n.bottom || 0) - n.y), n;
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1840
|
+
function Le(n, t, o) {
|
|
1841
1841
|
n.left && (t.left += o.x), n.right && (t.right += o.x), n.top && (t.top += o.y), n.bottom && (t.bottom += o.y), t.width = t.right - t.left, t.height = t.bottom - t.top;
|
|
1842
1842
|
}
|
|
1843
1843
|
function Ye(n, t, o) {
|
|
1844
1844
|
var s = o && n.options[o];
|
|
1845
|
-
return Ie(
|
|
1845
|
+
return Ie(Ce(s && s.origin || n.options.origin, n, t, [n && t])) || { x: 0, y: 0 };
|
|
1846
1846
|
}
|
|
1847
1847
|
function Xe(n, t) {
|
|
1848
1848
|
var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(v) {
|
|
@@ -1868,7 +1868,7 @@ function da() {
|
|
|
1868
1868
|
var ht = function(n, t) {
|
|
1869
1869
|
return Math.sqrt(n * n + t * t);
|
|
1870
1870
|
}, Ii = ["webkit", "moz"];
|
|
1871
|
-
function
|
|
1871
|
+
function Lt(n, t) {
|
|
1872
1872
|
n.__set || (n.__set = {});
|
|
1873
1873
|
var o = function(l) {
|
|
1874
1874
|
if (Ii.some((function(f) {
|
|
@@ -1883,35 +1883,35 @@ function da() {
|
|
|
1883
1883
|
for (var s in t) o(s);
|
|
1884
1884
|
return n;
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function Ft(n, t) {
|
|
1887
1887
|
n.page = n.page || {}, n.page.x = t.page.x, n.page.y = t.page.y, n.client = n.client || {}, n.client.x = t.client.x, n.client.y = t.client.y, n.timeStamp = t.timeStamp;
|
|
1888
1888
|
}
|
|
1889
1889
|
function kr(n) {
|
|
1890
1890
|
n.page.x = 0, n.page.y = 0, n.client.x = 0, n.client.y = 0;
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1892
|
+
function Cr(n) {
|
|
1893
1893
|
return n instanceof D.Event || n instanceof D.Touch;
|
|
1894
1894
|
}
|
|
1895
1895
|
function Vt(n, t, o) {
|
|
1896
1896
|
return n = n || "page", (o = o || {}).x = t[n + "X"], o.y = t[n + "Y"], o;
|
|
1897
1897
|
}
|
|
1898
|
-
function
|
|
1899
|
-
return t = t || { x: 0, y: 0 }, te.isOperaMobile &&
|
|
1898
|
+
function $r(n, t) {
|
|
1899
|
+
return t = t || { x: 0, y: 0 }, te.isOperaMobile && Cr(n) ? (Vt("screen", n, t), t.x += window.scrollX, t.y += window.scrollY) : Vt("page", n, t), t;
|
|
1900
1900
|
}
|
|
1901
1901
|
function gt(n) {
|
|
1902
1902
|
return E.number(n.pointerId) ? n.pointerId : n.identifier;
|
|
1903
1903
|
}
|
|
1904
1904
|
function ki(n, t, o) {
|
|
1905
|
-
var s = t.length > 1 ?
|
|
1906
|
-
|
|
1907
|
-
f = f || {}, te.isOperaMobile &&
|
|
1905
|
+
var s = t.length > 1 ? jr(t) : t[0];
|
|
1906
|
+
$r(s, n.page), (function(l, f) {
|
|
1907
|
+
f = f || {}, te.isOperaMobile && Cr(l) ? Vt("screen", l, f) : Vt("client", l, f);
|
|
1908
1908
|
})(s, n.client), n.timeStamp = o;
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1910
|
+
function Fn(n) {
|
|
1911
1911
|
var t = [];
|
|
1912
1912
|
return E.array(n) ? (t[0] = n[0], t[1] = n[1]) : n.type === "touchend" ? n.touches.length === 1 ? (t[0] = n.touches[0], t[1] = n.changedTouches[0]) : n.touches.length === 0 && (t[0] = n.changedTouches[0], t[1] = n.changedTouches[1]) : (t[0] = n.touches[0], t[1] = n.touches[1]), t;
|
|
1913
1913
|
}
|
|
1914
|
-
function
|
|
1914
|
+
function jr(n) {
|
|
1915
1915
|
for (var t = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, o = 0; o < n.length; o++) {
|
|
1916
1916
|
var s = n[o];
|
|
1917
1917
|
for (var l in t) t[l] += s[l];
|
|
@@ -1921,15 +1921,15 @@ function da() {
|
|
|
1921
1921
|
}
|
|
1922
1922
|
function Vn(n) {
|
|
1923
1923
|
if (!n.length) return null;
|
|
1924
|
-
var t =
|
|
1924
|
+
var t = Fn(n), o = Math.min(t[0].pageX, t[1].pageX), s = Math.min(t[0].pageY, t[1].pageY), l = Math.max(t[0].pageX, t[1].pageX), f = Math.max(t[0].pageY, t[1].pageY);
|
|
1925
1925
|
return { x: o, y: s, left: o, top: s, right: l, bottom: f, width: l - o, height: f - s };
|
|
1926
1926
|
}
|
|
1927
1927
|
function Dn(n, t) {
|
|
1928
|
-
var o = t + "X", s = t + "Y", l =
|
|
1928
|
+
var o = t + "X", s = t + "Y", l = Fn(n), f = l[0][o] - l[1][o], p = l[0][s] - l[1][s];
|
|
1929
1929
|
return ht(f, p);
|
|
1930
1930
|
}
|
|
1931
|
-
function
|
|
1932
|
-
var o = t + "X", s = t + "Y", l =
|
|
1931
|
+
function Bn(n, t) {
|
|
1932
|
+
var o = t + "X", s = t + "Y", l = Fn(n), f = l[1][o] - l[0][o], p = l[1][s] - l[0][s];
|
|
1933
1933
|
return 180 * Math.atan2(p, f) / Math.PI;
|
|
1934
1934
|
}
|
|
1935
1935
|
function Ar(n) {
|
|
@@ -1969,7 +1969,7 @@ function da() {
|
|
|
1969
1969
|
return n[mt(n, t)];
|
|
1970
1970
|
}, ut = (function(n) {
|
|
1971
1971
|
b(o, n);
|
|
1972
|
-
var t =
|
|
1972
|
+
var t = $(o);
|
|
1973
1973
|
function o(s, l, f) {
|
|
1974
1974
|
var p;
|
|
1975
1975
|
u(this, o), (p = t.call(this, l._interaction)).dropzone = void 0, p.dragEvent = void 0, p.relatedTarget = void 0, p.draggable = void 0, p.propagationStopped = !1, p.immediatePropagationStopped = !1;
|
|
@@ -1994,21 +1994,21 @@ function da() {
|
|
|
1994
1994
|
this.immediatePropagationStopped = this.propagationStopped = !0;
|
|
1995
1995
|
} }]), o;
|
|
1996
1996
|
})(Dt);
|
|
1997
|
-
function
|
|
1997
|
+
function Lr(n, t) {
|
|
1998
1998
|
for (var o = 0, s = n.slice(); o < s.length; o++) {
|
|
1999
1999
|
var l = s[o], f = l.dropzone, p = l.element;
|
|
2000
2000
|
t.dropzone = f, t.target = p, f.fire(t), t.propagationStopped = t.immediatePropagationStopped = !1;
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
|
-
function
|
|
2003
|
+
function Hn(n, t) {
|
|
2004
2004
|
for (var o = (function(f, p) {
|
|
2005
2005
|
for (var h = [], v = 0, N = f.interactables.list; v < N.length; v++) {
|
|
2006
2006
|
var y = N[v];
|
|
2007
2007
|
if (y.options.drop.enabled) {
|
|
2008
2008
|
var O = y.options.drop.accept;
|
|
2009
|
-
if (!(E.element(O) && O !== p || E.string(O) && !R(p, O) || E.func(O) && !O({ dropzone: y, draggableElement: p }))) for (var
|
|
2010
|
-
var
|
|
2011
|
-
|
|
2009
|
+
if (!(E.element(O) && O !== p || E.string(O) && !R(p, O) || E.func(O) && !O({ dropzone: y, draggableElement: p }))) for (var j = 0, V = y.getAllElements(); j < V.length; j++) {
|
|
2010
|
+
var L = V[j];
|
|
2011
|
+
L !== p && h.push({ dropzone: y, element: L, rect: y.getRect(L) });
|
|
2012
2012
|
}
|
|
2013
2013
|
}
|
|
2014
2014
|
}
|
|
@@ -2019,14 +2019,14 @@ function da() {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
return o;
|
|
2021
2021
|
}
|
|
2022
|
-
function
|
|
2022
|
+
function Fr(n, t, o) {
|
|
2023
2023
|
for (var s = n.dropState, l = n.interactable, f = n.element, p = [], h = 0, v = s.activeDrops; h < v.length; h++) {
|
|
2024
|
-
var N = v[h], y = N.dropzone, O = N.element,
|
|
2024
|
+
var N = v[h], y = N.dropzone, O = N.element, j = N.rect, V = y.dropCheck(t, o, l, f, O, j);
|
|
2025
2025
|
p.push(V ? O : null);
|
|
2026
2026
|
}
|
|
2027
|
-
var
|
|
2028
|
-
for (var ie, re, le, ve = [], xe = 0; xe <
|
|
2029
|
-
var de =
|
|
2027
|
+
var L = (function(H) {
|
|
2028
|
+
for (var ie, re, le, ve = [], xe = 0; xe < H.length; xe++) {
|
|
2029
|
+
var de = H[xe], ye = H[ie];
|
|
2030
2030
|
if (de && xe !== ie) if (ye) {
|
|
2031
2031
|
var Me = k(de), Pe = k(ye);
|
|
2032
2032
|
if (Me !== de.ownerDocument) if (Pe !== de.ownerDocument) if (Me !== Pe) {
|
|
@@ -2052,7 +2052,7 @@ function da() {
|
|
|
2052
2052
|
}
|
|
2053
2053
|
return ie;
|
|
2054
2054
|
})(p);
|
|
2055
|
-
return s.activeDrops[
|
|
2055
|
+
return s.activeDrops[L] || null;
|
|
2056
2056
|
}
|
|
2057
2057
|
function Yn(n, t, o) {
|
|
2058
2058
|
var s = n.dropState, l = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null };
|
|
@@ -2060,14 +2060,14 @@ function da() {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
function Xn(n, t) {
|
|
2062
2062
|
var o = n.dropState, s = o.activeDrops, l = o.cur, f = o.prev;
|
|
2063
|
-
t.leave && f.dropzone.fire(t.leave), t.enter && l.dropzone.fire(t.enter), t.move && l.dropzone.fire(t.move), t.drop && l.dropzone.fire(t.drop), t.deactivate &&
|
|
2063
|
+
t.leave && f.dropzone.fire(t.leave), t.enter && l.dropzone.fire(t.enter), t.move && l.dropzone.fire(t.move), t.drop && l.dropzone.fire(t.drop), t.deactivate && Lr(s, t.deactivate), o.prev.dropzone = l.dropzone, o.prev.element = l.element;
|
|
2064
2064
|
}
|
|
2065
2065
|
function Vr(n, t) {
|
|
2066
2066
|
var o = n.interaction, s = n.iEvent, l = n.event;
|
|
2067
2067
|
if (s.type === "dragmove" || s.type === "dragend") {
|
|
2068
2068
|
var f = o.dropState;
|
|
2069
|
-
t.dynamicDrop && (f.activeDrops =
|
|
2070
|
-
var p = s, h =
|
|
2069
|
+
t.dynamicDrop && (f.activeDrops = Hn(t, o.element));
|
|
2070
|
+
var p = s, h = Fr(o, p, l);
|
|
2071
2071
|
f.rejected = f.rejected && !!h && h.dropzone === f.cur.dropzone && h.element === f.cur.element, f.cur.dropzone = h && h.dropzone, f.cur.element = h && h.element, f.events = Yn(o, 0, p);
|
|
2072
2072
|
}
|
|
2073
2073
|
}
|
|
@@ -2077,8 +2077,8 @@ function da() {
|
|
|
2077
2077
|
return (function(p, h) {
|
|
2078
2078
|
if (E.object(h)) {
|
|
2079
2079
|
if (p.options.drop.enabled = h.enabled !== !1, h.listeners) {
|
|
2080
|
-
var v = Xe(h.listeners), N = Object.keys(v).reduce((function(O,
|
|
2081
|
-
return O[/^(enter|leave)/.test(
|
|
2080
|
+
var v = Xe(h.listeners), N = Object.keys(v).reduce((function(O, j) {
|
|
2081
|
+
return O[/^(enter|leave)/.test(j) ? "drag".concat(j) : /^(activate|deactivate|move)/.test(j) ? "drop".concat(j) : j] = v[j], O;
|
|
2082
2082
|
}), {}), y = p.options.drop.listeners;
|
|
2083
2083
|
y && p.off(y), p.on(N), p.options.drop.listeners = N;
|
|
2084
2084
|
}
|
|
@@ -2087,22 +2087,22 @@ function da() {
|
|
|
2087
2087
|
return E.bool(h) ? (p.options.drop.enabled = h, p) : p.options.drop;
|
|
2088
2088
|
})(this, f);
|
|
2089
2089
|
}, s.prototype.dropCheck = function(f, p, h, v, N, y) {
|
|
2090
|
-
return (function(O,
|
|
2090
|
+
return (function(O, j, V, L, H, ie, re) {
|
|
2091
2091
|
var le = !1;
|
|
2092
|
-
if (!(re = re || O.getRect(ie))) return !!O.options.drop.checker && O.options.drop.checker(
|
|
2092
|
+
if (!(re = re || O.getRect(ie))) return !!O.options.drop.checker && O.options.drop.checker(j, V, le, O, ie, L, H);
|
|
2093
2093
|
var ve = O.options.drop.overlap;
|
|
2094
2094
|
if (ve === "pointer") {
|
|
2095
|
-
var xe = Ye(
|
|
2095
|
+
var xe = Ye(L, H, "drag"), de = $r(j);
|
|
2096
2096
|
de.x += xe.x, de.y += xe.y;
|
|
2097
2097
|
var ye = de.x > re.left && de.x < re.right, Me = de.y > re.top && de.y < re.bottom;
|
|
2098
2098
|
le = ye && Me;
|
|
2099
2099
|
}
|
|
2100
|
-
var Pe =
|
|
2100
|
+
var Pe = L.getRect(H);
|
|
2101
2101
|
if (Pe && ve === "center") {
|
|
2102
2102
|
var Ve = Pe.left + Pe.width / 2, De = Pe.top + Pe.height / 2;
|
|
2103
2103
|
le = Ve >= re.left && Ve <= re.right && De >= re.top && De <= re.bottom;
|
|
2104
2104
|
}
|
|
2105
|
-
return Pe && E.number(ve) && (le = Math.max(0, Math.min(re.right, Pe.right) - Math.max(re.left, Pe.left)) * Math.max(0, Math.min(re.bottom, Pe.bottom) - Math.max(re.top, Pe.top)) / (Pe.width * Pe.height) >= ve), O.options.drop.checker && (le = O.options.drop.checker(
|
|
2105
|
+
return Pe && E.number(ve) && (le = Math.max(0, Math.min(re.right, Pe.right) - Math.max(re.left, Pe.left)) * Math.max(0, Math.min(re.bottom, Pe.bottom) - Math.max(re.top, Pe.top)) / (Pe.width * Pe.height) >= ve), O.options.drop.checker && (le = O.options.drop.checker(j, V, le, O, ie, L, H)), le;
|
|
2106
2106
|
})(this, f, p, h, v, N, y);
|
|
2107
2107
|
}, o.dynamicDrop = function(f) {
|
|
2108
2108
|
return E.bool(f) ? (n.dynamicDrop = f, o) : n.dynamicDrop;
|
|
@@ -2114,7 +2114,7 @@ function da() {
|
|
|
2114
2114
|
var o = n.interaction, s = n.iEvent;
|
|
2115
2115
|
if (o.prepared.name === "drag") {
|
|
2116
2116
|
var l = o.dropState;
|
|
2117
|
-
l.activeDrops = [], l.events = {}, l.activeDrops =
|
|
2117
|
+
l.activeDrops = [], l.events = {}, l.activeDrops = Hn(t, o.element), l.events = Yn(o, 0, s), l.events.activate && (Lr(l.activeDrops, l.events.activate), t.fire("actions/drop:start", { interaction: o, dragEvent: s }));
|
|
2118
2118
|
}
|
|
2119
2119
|
}, "interactions:action-move": Vr, "interactions:after-action-move": function(n, t) {
|
|
2120
2120
|
var o = n.interaction, s = n.iEvent;
|
|
@@ -2133,20 +2133,20 @@ function da() {
|
|
|
2133
2133
|
var o = t.dropState;
|
|
2134
2134
|
o && (o.activeDrops = null, o.events = null, o.cur.dropzone = null, o.cur.element = null, o.prev.dropzone = null, o.prev.element = null, o.rejected = !1);
|
|
2135
2135
|
}
|
|
2136
|
-
} }, getActiveDrops:
|
|
2136
|
+
} }, getActiveDrops: Hn, getDrop: Fr, getDropEvents: Yn, fireDropEvents: Xn, filterEventType: function(n) {
|
|
2137
2137
|
return n.search("drag") === 0 || n.search("drop") === 0;
|
|
2138
|
-
}, defaults: { enabled: !1, accept: null, overlap: "pointer" } },
|
|
2138
|
+
}, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Ci = Dr;
|
|
2139
2139
|
function Un(n) {
|
|
2140
2140
|
var t = n.interaction, o = n.iEvent, s = n.phase;
|
|
2141
2141
|
if (t.prepared.name === "gesture") {
|
|
2142
2142
|
var l = t.pointers.map((function(N) {
|
|
2143
2143
|
return N.pointer;
|
|
2144
2144
|
})), f = s === "start", p = s === "end", h = t.interactable.options.deltaSource;
|
|
2145
|
-
if (o.touches = [l[0], l[1]], f) o.distance = Dn(l, h), o.box = Vn(l), o.scale = 1, o.ds = 0, o.angle =
|
|
2145
|
+
if (o.touches = [l[0], l[1]], f) o.distance = Dn(l, h), o.box = Vn(l), o.scale = 1, o.ds = 0, o.angle = Bn(l, h), o.da = 0, t.gesture.startDistance = o.distance, t.gesture.startAngle = o.angle;
|
|
2146
2146
|
else if (p || t.pointers.length < 2) {
|
|
2147
2147
|
var v = t.prevEvent;
|
|
2148
2148
|
o.distance = v.distance, o.box = v.box, o.scale = v.scale, o.ds = 0, o.angle = v.angle, o.da = 0;
|
|
2149
|
-
} else o.distance = Dn(l, h), o.box = Vn(l), o.scale = o.distance / t.gesture.startDistance, o.angle =
|
|
2149
|
+
} else o.distance = Dn(l, h), o.box = Vn(l), o.scale = o.distance / t.gesture.startDistance, o.angle = Bn(l, h), o.ds = o.scale - t.gesture.scale, o.da = o.angle - t.gesture.angle;
|
|
2150
2150
|
t.gesture.distance = o.distance, t.gesture.angle = o.angle, E.number(o.scale) && o.scale !== 1 / 0 && !isNaN(o.scale) && (t.gesture.scale = o.scale);
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
@@ -2166,8 +2166,8 @@ function da() {
|
|
|
2166
2166
|
return "";
|
|
2167
2167
|
}, filterEventType: function(n) {
|
|
2168
2168
|
return n.search("gesture") === 0;
|
|
2169
|
-
} },
|
|
2170
|
-
function
|
|
2169
|
+
} }, $i = Kn;
|
|
2170
|
+
function ji(n, t, o, s, l, f, p) {
|
|
2171
2171
|
if (!t) return !1;
|
|
2172
2172
|
if (t === !0) {
|
|
2173
2173
|
var h = E.number(f.width) ? f.width : f.right - f.left, v = E.number(f.height) ? f.height : f.bottom - f.top;
|
|
@@ -2184,7 +2184,7 @@ function da() {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
return !!E.element(s) && (E.element(t) ? t === s : Z(s, t, l));
|
|
2186
2186
|
}
|
|
2187
|
-
function
|
|
2187
|
+
function Br(n) {
|
|
2188
2188
|
var t = n.iEvent, o = n.interaction;
|
|
2189
2189
|
if (o.prepared.name === "resize" && o.resizeAxes) {
|
|
2190
2190
|
var s = t;
|
|
@@ -2209,28 +2209,28 @@ function da() {
|
|
|
2209
2209
|
var l = o, f = s.rect;
|
|
2210
2210
|
s._rects = { start: ee({}, f), corrected: ee({}, f), previous: ee({}, f), delta: { left: 0, right: 0, width: 0, top: 0, bottom: 0, height: 0 } }, l.edges = s.prepared.edges, l.rect = s._rects.corrected, l.deltaRect = s._rects.delta;
|
|
2211
2211
|
}
|
|
2212
|
-
})(n),
|
|
2212
|
+
})(n), Br(n);
|
|
2213
2213
|
}, "interactions:action-move": function(n) {
|
|
2214
2214
|
(function(t) {
|
|
2215
2215
|
var o = t.iEvent, s = t.interaction;
|
|
2216
2216
|
if (s.prepared.name === "resize" && s.prepared.edges) {
|
|
2217
|
-
var l = o, f = s.interactable.options.resize.invert, p = f === "reposition" || f === "negate", h = s.rect, v = s._rects, N = v.start, y = v.corrected, O = v.delta,
|
|
2218
|
-
if (ee(
|
|
2217
|
+
var l = o, f = s.interactable.options.resize.invert, p = f === "reposition" || f === "negate", h = s.rect, v = s._rects, N = v.start, y = v.corrected, O = v.delta, j = v.previous;
|
|
2218
|
+
if (ee(j, y), p) {
|
|
2219
2219
|
if (ee(y, h), f === "reposition") {
|
|
2220
2220
|
if (y.top > y.bottom) {
|
|
2221
2221
|
var V = y.top;
|
|
2222
2222
|
y.top = y.bottom, y.bottom = V;
|
|
2223
2223
|
}
|
|
2224
2224
|
if (y.left > y.right) {
|
|
2225
|
-
var
|
|
2226
|
-
y.left = y.right, y.right =
|
|
2225
|
+
var L = y.left;
|
|
2226
|
+
y.left = y.right, y.right = L;
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
2229
2229
|
} else y.top = Math.min(h.top, N.bottom), y.bottom = Math.max(h.bottom, N.top), y.left = Math.min(h.left, N.right), y.right = Math.max(h.right, N.left);
|
|
2230
|
-
for (var
|
|
2230
|
+
for (var H in y.width = y.right - y.left, y.height = y.bottom - y.top, y) O[H] = y[H] - j[H];
|
|
2231
2231
|
l.edges = s.prepared.edges, l.rect = y, l.deltaRect = O;
|
|
2232
2232
|
}
|
|
2233
|
-
})(n),
|
|
2233
|
+
})(n), Br(n);
|
|
2234
2234
|
}, "interactions:action-end": function(n) {
|
|
2235
2235
|
var t = n.iEvent, o = n.interaction;
|
|
2236
2236
|
if (o.prepared.name === "resize" && o.prepared.edges) {
|
|
@@ -2244,7 +2244,7 @@ function da() {
|
|
|
2244
2244
|
if (h && h.enabled && (!t.pointerIsDown || !/mouse|pointer/.test(t.pointerType) || (f & h.mouseButtons) != 0)) {
|
|
2245
2245
|
if (E.object(h.edges)) {
|
|
2246
2246
|
var v = { left: !1, right: !1, top: !1, bottom: !1 };
|
|
2247
|
-
for (var N in v) v[N] =
|
|
2247
|
+
for (var N in v) v[N] = ji(N, h.edges[N], p, t._latestPointer.eventTarget, s, l, h.margin || Ke.defaultMargin);
|
|
2248
2248
|
v.left = v.left && !v.right, v.top = v.top && !v.bottom, (v.left || v.right || v.top || v.bottom) && (n.action = { name: "resize", edges: v });
|
|
2249
2249
|
} else {
|
|
2250
2250
|
var y = h.axis !== "y" && p.x > l.right - Ke.defaultMargin, O = h.axis !== "x" && p.y > l.bottom - Ke.defaultMargin;
|
|
@@ -2267,8 +2267,8 @@ function da() {
|
|
|
2267
2267
|
}, filterEventType: function(n) {
|
|
2268
2268
|
return n.search("resize") === 0;
|
|
2269
2269
|
}, defaultMargin: null }, Ai = Ke, Mi = { id: "actions", install: function(n) {
|
|
2270
|
-
n.usePlugin(
|
|
2271
|
-
} },
|
|
2270
|
+
n.usePlugin($i), n.usePlugin(Ai), n.usePlugin(oe), n.usePlugin(Ci);
|
|
2271
|
+
} }, Hr = 0, Je = { request: function(n) {
|
|
2272
2272
|
return Ue(n);
|
|
2273
2273
|
}, cancel: function(n) {
|
|
2274
2274
|
return ot(n);
|
|
@@ -2278,10 +2278,10 @@ function da() {
|
|
|
2278
2278
|
Ue = n["".concat(s, "RequestAnimationFrame")], ot = n["".concat(s, "CancelAnimationFrame")] || n["".concat(s, "CancelRequestAnimationFrame")];
|
|
2279
2279
|
}
|
|
2280
2280
|
Ue = Ue && Ue.bind(n), ot = ot && ot.bind(n), Ue || (Ue = function(l) {
|
|
2281
|
-
var f = Date.now(), p = Math.max(0, 16 - (f -
|
|
2281
|
+
var f = Date.now(), p = Math.max(0, 16 - (f - Hr)), h = n.setTimeout((function() {
|
|
2282
2282
|
l(f + p);
|
|
2283
2283
|
}), p);
|
|
2284
|
-
return
|
|
2284
|
+
return Hr = f + p, h;
|
|
2285
2285
|
}, ot = function(l) {
|
|
2286
2286
|
return clearTimeout(l);
|
|
2287
2287
|
});
|
|
@@ -2296,8 +2296,8 @@ function da() {
|
|
|
2296
2296
|
if (N.x || N.y) {
|
|
2297
2297
|
var y = Xr(f);
|
|
2298
2298
|
E.window(f) ? f.scrollBy(N.x, N.y) : f && (f.scrollLeft += N.x, f.scrollTop += N.y);
|
|
2299
|
-
var O = Xr(f),
|
|
2300
|
-
(
|
|
2299
|
+
var O = Xr(f), j = { x: O.x - y.x, y: O.y - y.y };
|
|
2300
|
+
(j.x || j.y) && t.fire({ type: "autoscroll", target: o, interactable: t, delta: j, interaction: n, container: f });
|
|
2301
2301
|
}
|
|
2302
2302
|
pe.prevTime = p;
|
|
2303
2303
|
}
|
|
@@ -2312,14 +2312,14 @@ function da() {
|
|
|
2312
2312
|
var s, l, f, p, h = t.interactable, v = t.element, N = t.prepared.name, y = h.options[N].autoScroll, O = Yr(y.container, h, v);
|
|
2313
2313
|
if (E.window(O)) p = o.clientX < pe.margin, s = o.clientY < pe.margin, l = o.clientX > O.innerWidth - pe.margin, f = o.clientY > O.innerHeight - pe.margin;
|
|
2314
2314
|
else {
|
|
2315
|
-
var
|
|
2316
|
-
p = o.clientX <
|
|
2315
|
+
var j = fe(O);
|
|
2316
|
+
p = o.clientX < j.left + pe.margin, s = o.clientY < j.top + pe.margin, l = o.clientX > j.right - pe.margin, f = o.clientY > j.bottom - pe.margin;
|
|
2317
2317
|
}
|
|
2318
2318
|
pe.x = l ? 1 : p ? -1 : 0, pe.y = f ? 1 : s ? -1 : 0, pe.isScrolling || (pe.margin = y.margin, pe.speed = y.speed, pe.start(t));
|
|
2319
2319
|
}
|
|
2320
2320
|
} };
|
|
2321
2321
|
function Yr(n, t, o) {
|
|
2322
|
-
return (E.string(n) ?
|
|
2322
|
+
return (E.string(n) ? Be(n, t, o) : n) || J(o);
|
|
2323
2323
|
}
|
|
2324
2324
|
function Xr(n) {
|
|
2325
2325
|
return E.window(n) && (n = window.document.body), { x: n.scrollLeft, y: n.scrollTop };
|
|
@@ -2345,35 +2345,35 @@ function da() {
|
|
|
2345
2345
|
function Gn(n, t) {
|
|
2346
2346
|
return n.name = t.name, n.axis = t.axis, n.edges = t.edges, n;
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2348
|
+
function Li(n) {
|
|
2349
2349
|
return E.bool(n) ? (this.options.styleCursor = n, this) : n === null ? (delete this.options.styleCursor, this) : this.options.styleCursor;
|
|
2350
2350
|
}
|
|
2351
|
-
function
|
|
2351
|
+
function Fi(n) {
|
|
2352
2352
|
return E.func(n) ? (this.options.actionChecker = n, this) : n === null ? (delete this.options.actionChecker, this) : this.options.actionChecker;
|
|
2353
2353
|
}
|
|
2354
2354
|
var Vi = { id: "auto-start/interactableMethods", install: function(n) {
|
|
2355
2355
|
var t = n.Interactable;
|
|
2356
2356
|
t.prototype.getAction = function(o, s, l, f) {
|
|
2357
2357
|
var p = (function(h, v, N, y, O) {
|
|
2358
|
-
var
|
|
2359
|
-
return O.fire("auto-start:check",
|
|
2358
|
+
var j = h.getRect(y), V = v.buttons || { 0: 1, 1: 4, 3: 8, 4: 16 }[v.button], L = { action: null, interactable: h, interaction: N, element: y, rect: j, buttons: V };
|
|
2359
|
+
return O.fire("auto-start:check", L), L.action;
|
|
2360
2360
|
})(this, s, l, f, n);
|
|
2361
2361
|
return this.options.actionChecker ? this.options.actionChecker(o, s, p, this, f, l) : p;
|
|
2362
2362
|
}, t.prototype.ignoreFrom = yt((function(o) {
|
|
2363
2363
|
return this._backCompatOption("ignoreFrom", o);
|
|
2364
2364
|
}), "Interactable.ignoreFrom() has been deprecated. Use Interactble.draggable({ignoreFrom: newValue})."), t.prototype.allowFrom = yt((function(o) {
|
|
2365
2365
|
return this._backCompatOption("allowFrom", o);
|
|
2366
|
-
}), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), t.prototype.actionChecker =
|
|
2366
|
+
}), "Interactable.allowFrom() has been deprecated. Use Interactble.draggable({allowFrom: newValue})."), t.prototype.actionChecker = Fi, t.prototype.styleCursor = Li;
|
|
2367
2367
|
} };
|
|
2368
2368
|
function Ur(n, t, o, s, l) {
|
|
2369
|
-
return t.testIgnoreAllow(t.options[n.name], o, s) && t.options[n.name].enabled &&
|
|
2369
|
+
return t.testIgnoreAllow(t.options[n.name], o, s) && t.options[n.name].enabled && Bt(t, o, n, l) ? n : null;
|
|
2370
2370
|
}
|
|
2371
2371
|
function Di(n, t, o, s, l, f, p) {
|
|
2372
2372
|
for (var h = 0, v = s.length; h < v; h++) {
|
|
2373
2373
|
var N = s[h], y = l[h], O = N.getAction(t, o, n, y);
|
|
2374
2374
|
if (O) {
|
|
2375
|
-
var
|
|
2376
|
-
if (
|
|
2375
|
+
var j = Ur(O, N, y, f, p);
|
|
2376
|
+
if (j) return { action: j, interactable: N, element: y };
|
|
2377
2377
|
}
|
|
2378
2378
|
}
|
|
2379
2379
|
return { action: null, interactable: null, element: null };
|
|
@@ -2387,7 +2387,7 @@ function da() {
|
|
|
2387
2387
|
f = [], p = [], l.interactables.forEachMatch(h, v);
|
|
2388
2388
|
var N = Di(n, t, o, f, p, s, l);
|
|
2389
2389
|
if (N.action && !N.interactable.options[N.action.name].manualStart) return N;
|
|
2390
|
-
h =
|
|
2390
|
+
h = F(h);
|
|
2391
2391
|
}
|
|
2392
2392
|
return { action: null, interactable: null, element: null };
|
|
2393
2393
|
}
|
|
@@ -2395,12 +2395,12 @@ function da() {
|
|
|
2395
2395
|
var s = t.action, l = t.interactable, f = t.element;
|
|
2396
2396
|
s = s || { name: null }, n.interactable = l, n.element = f, Gn(n.prepared, s), n.rect = l && s.name ? l.getRect(f) : null, Wr(n, o), o.fire("autoStart:prepared", { interaction: n });
|
|
2397
2397
|
}
|
|
2398
|
-
function
|
|
2398
|
+
function Bt(n, t, o, s) {
|
|
2399
2399
|
var l = n.options, f = l[o.name].max, p = l[o.name].maxPerElement, h = s.autoStart.maxInteractions, v = 0, N = 0, y = 0;
|
|
2400
2400
|
if (!(f && p && h)) return !1;
|
|
2401
|
-
for (var O = 0,
|
|
2402
|
-
var V =
|
|
2403
|
-
if (V.interacting() && (++v >= h || V.interactable === n && ((N +=
|
|
2401
|
+
for (var O = 0, j = s.interactions.list; O < j.length; O++) {
|
|
2402
|
+
var V = j[O], L = V.prepared.name;
|
|
2403
|
+
if (V.interacting() && (++v >= h || V.interactable === n && ((N += L === o.name ? 1 : 0) >= f || V.element === t && (y++, L === o.name && y >= p))))
|
|
2404
2404
|
return !1;
|
|
2405
2405
|
}
|
|
2406
2406
|
return h > 0;
|
|
@@ -2423,11 +2423,11 @@ function da() {
|
|
|
2423
2423
|
qn(n.element, f || "", t);
|
|
2424
2424
|
} else t.autoStart.cursorElement && qn(t.autoStart.cursorElement, "", t);
|
|
2425
2425
|
}
|
|
2426
|
-
var
|
|
2426
|
+
var Bi = { id: "auto-start/base", before: ["actions"], install: function(n) {
|
|
2427
2427
|
var t = n.interactStatic, o = n.defaults;
|
|
2428
2428
|
n.usePlugin(Vi), o.base.actionChecker = null, o.base.styleCursor = !0, ee(o.perAction, { manualStart: !1, max: 1 / 0, maxPerElement: 1, allowFrom: null, ignoreFrom: null, mouseButtons: 1 }), t.maxInteractions = function(s) {
|
|
2429
2429
|
return qr(s, n);
|
|
2430
|
-
}, n.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit:
|
|
2430
|
+
}, n.autoStart = { maxInteractions: 1 / 0, withinInteractionLimit: Bt, cursorElement: null };
|
|
2431
2431
|
}, listeners: { "interactions:down": function(n, t) {
|
|
2432
2432
|
var o = n.interaction, s = n.pointer, l = n.event, f = n.eventTarget;
|
|
2433
2433
|
o.interacting() || Gr(o, Kr(o, s, l, f, t), t);
|
|
@@ -2440,37 +2440,37 @@ function da() {
|
|
|
2440
2440
|
if (l.pointerIsDown && !l.interacting() && l.pointerWasMoved && l.prepared.name) {
|
|
2441
2441
|
s.fire("autoStart:before-start", o);
|
|
2442
2442
|
var f = l.interactable, p = l.prepared.name;
|
|
2443
|
-
p && f && (f.options[p].manualStart || !
|
|
2443
|
+
p && f && (f.options[p].manualStart || !Bt(f, l.element, l.prepared, s) ? l.stop() : (l.start(l.prepared, f, l.element), Wr(l, s)));
|
|
2444
2444
|
}
|
|
2445
2445
|
})(n, t);
|
|
2446
2446
|
}, "interactions:stop": function(n, t) {
|
|
2447
2447
|
var o = n.interaction, s = o.interactable;
|
|
2448
2448
|
s && s.options.styleCursor && qn(o.element, "", t);
|
|
2449
|
-
} }, maxInteractions: qr, withinInteractionLimit:
|
|
2449
|
+
} }, maxInteractions: qr, withinInteractionLimit: Bt, validateAction: Ur }, Wn = Bi, Hi = { id: "auto-start/dragAxis", listeners: { "autoStart:before-start": function(n, t) {
|
|
2450
2450
|
var o = n.interaction, s = n.eventTarget, l = n.dx, f = n.dy;
|
|
2451
2451
|
if (o.prepared.name === "drag") {
|
|
2452
2452
|
var p = Math.abs(l), h = Math.abs(f), v = o.interactable.options.drag, N = v.startAxis, y = p > h ? "x" : p < h ? "y" : "xy";
|
|
2453
2453
|
if (o.prepared.axis = v.lockAxis === "start" ? y[0] : v.lockAxis, y !== "xy" && N !== "xy" && N !== y) {
|
|
2454
2454
|
o.prepared.name = null;
|
|
2455
|
-
for (var O = s,
|
|
2456
|
-
if (
|
|
2457
|
-
var
|
|
2458
|
-
if (!
|
|
2459
|
-
var ie =
|
|
2455
|
+
for (var O = s, j = function(L) {
|
|
2456
|
+
if (L !== o.interactable) {
|
|
2457
|
+
var H = o.interactable.options.drag;
|
|
2458
|
+
if (!H.manualStart && L.testIgnoreAllow(H, O, s)) {
|
|
2459
|
+
var ie = L.getAction(o.downPointer, o.downEvent, o, O);
|
|
2460
2460
|
if (ie && ie.name === "drag" && (function(re, le) {
|
|
2461
2461
|
if (!le) return !1;
|
|
2462
2462
|
var ve = le.options.drag.startAxis;
|
|
2463
2463
|
return re === "xy" || ve === "xy" || ve === re;
|
|
2464
|
-
})(y,
|
|
2464
|
+
})(y, L) && Wn.validateAction(ie, L, O, s, t)) return L;
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
2467
|
}; E.element(O); ) {
|
|
2468
|
-
var V = t.interactables.forEachMatch(O,
|
|
2468
|
+
var V = t.interactables.forEachMatch(O, j);
|
|
2469
2469
|
if (V) {
|
|
2470
2470
|
o.prepared.name = "drag", o.interactable = V, o.element = O;
|
|
2471
2471
|
break;
|
|
2472
2472
|
}
|
|
2473
|
-
O =
|
|
2473
|
+
O = F(O);
|
|
2474
2474
|
}
|
|
2475
2475
|
}
|
|
2476
2476
|
}
|
|
@@ -2498,7 +2498,7 @@ function da() {
|
|
|
2498
2498
|
var t = n.interaction;
|
|
2499
2499
|
Jn(t) > 0 && (t.prepared.name = null);
|
|
2500
2500
|
} }, getHoldDuration: Jn }, Xi = Yi, Ui = { id: "auto-start", install: function(n) {
|
|
2501
|
-
n.usePlugin(Wn), n.usePlugin(Xi), n.usePlugin(
|
|
2501
|
+
n.usePlugin(Wn), n.usePlugin(Xi), n.usePlugin(Hi);
|
|
2502
2502
|
} }, Ki = function(n) {
|
|
2503
2503
|
return /^(always|never|auto)$/.test(n) ? (this.options.preventDefault = n, this) : E.bool(n) ? (this.options.preventDefault = n ? "always" : "never", this) : this.options.preventDefault;
|
|
2504
2504
|
};
|
|
@@ -2528,7 +2528,7 @@ function da() {
|
|
|
2528
2528
|
}, listeners: ["down", "move", "up", "cancel"].reduce((function(n, t) {
|
|
2529
2529
|
return n["interactions:".concat(t)] = Gi, n;
|
|
2530
2530
|
}), {}) };
|
|
2531
|
-
function
|
|
2531
|
+
function Ht(n, t) {
|
|
2532
2532
|
if (t.phaselessTypes[n]) return !0;
|
|
2533
2533
|
for (var o in t.map) if (n.indexOf(o) === 0 && n.substr(o.length) in t.phases) return !0;
|
|
2534
2534
|
return !1;
|
|
@@ -2548,11 +2548,11 @@ function da() {
|
|
|
2548
2548
|
return g(n, [{ key: "start", value: function(t, o) {
|
|
2549
2549
|
var s, l, f = t.phase, p = this.interaction, h = (function(N) {
|
|
2550
2550
|
var y = N.interactable.options[N.prepared.name], O = y.modifiers;
|
|
2551
|
-
return O && O.length ? O : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(
|
|
2552
|
-
var V = y[
|
|
2551
|
+
return O && O.length ? O : ["snap", "snapSize", "snapEdges", "restrict", "restrictEdges", "restrictSize"].map((function(j) {
|
|
2552
|
+
var V = y[j];
|
|
2553
2553
|
return V && V.enabled && { options: V, methods: V._methods };
|
|
2554
|
-
})).filter((function(
|
|
2555
|
-
return !!
|
|
2554
|
+
})).filter((function(j) {
|
|
2555
|
+
return !!j;
|
|
2556
2556
|
}));
|
|
2557
2557
|
})(p);
|
|
2558
2558
|
this.prepareStates(h), this.startEdges = ee({}, p.edges), this.edges = ee({}, this.startEdges), this.startOffset = (s = p.rect, l = o, s ? { left: l.x - s.left, top: l.y - s.top, right: s.right - l.x, bottom: s.bottom - l.y } : { left: 0, top: 0, right: 0, bottom: 0 }), this.startDelta = { x: 0, y: 0 };
|
|
@@ -2570,25 +2570,25 @@ function da() {
|
|
|
2570
2570
|
var o = t.phase, s = t.preEnd, l = t.skipModifiers, f = t.rect, p = t.edges;
|
|
2571
2571
|
t.coords = ee({}, t.pageCoords), t.rect = ee({}, f), t.edges = ee({}, p);
|
|
2572
2572
|
for (var h = l ? this.states.slice(l) : this.states, v = Yt(t.coords, t.rect), N = 0; N < h.length; N++) {
|
|
2573
|
-
var y, O = h[N],
|
|
2574
|
-
(y = O.methods) != null && y.set && this.shouldDo(
|
|
2573
|
+
var y, O = h[N], j = O.options, V = ee({}, t.coords), L = null;
|
|
2574
|
+
(y = O.methods) != null && y.set && this.shouldDo(j, s, o) && (t.state = O, L = O.methods.set(t), Le(t.edges, t.rect, { x: t.coords.x - V.x, y: t.coords.y - V.y })), v.eventProps.push(L);
|
|
2575
2575
|
}
|
|
2576
2576
|
ee(this.edges, t.edges), v.delta.x = t.coords.x - t.pageCoords.x, v.delta.y = t.coords.y - t.pageCoords.y, v.rectDelta.left = t.rect.left - f.left, v.rectDelta.right = t.rect.right - f.right, v.rectDelta.top = t.rect.top - f.top, v.rectDelta.bottom = t.rect.bottom - f.bottom;
|
|
2577
|
-
var
|
|
2578
|
-
if (
|
|
2577
|
+
var H = this.result.coords, ie = this.result.rect;
|
|
2578
|
+
if (H && ie) {
|
|
2579
2579
|
var re = v.rect.left !== ie.left || v.rect.right !== ie.right || v.rect.top !== ie.top || v.rect.bottom !== ie.bottom;
|
|
2580
|
-
v.changed = re ||
|
|
2580
|
+
v.changed = re || H.x !== v.coords.x || H.y !== v.coords.y;
|
|
2581
2581
|
}
|
|
2582
2582
|
return v;
|
|
2583
2583
|
} }, { key: "applyToInteraction", value: function(t) {
|
|
2584
2584
|
var o = this.interaction, s = t.phase, l = o.coords.cur, f = o.coords.start, p = this.result, h = this.startDelta, v = p.delta;
|
|
2585
2585
|
s === "start" && ee(this.startDelta, p.delta);
|
|
2586
2586
|
for (var N = 0, y = [[f, h], [l, v]]; N < y.length; N++) {
|
|
2587
|
-
var O = y[N],
|
|
2588
|
-
|
|
2587
|
+
var O = y[N], j = O[0], V = O[1];
|
|
2588
|
+
j.page.x += V.x, j.page.y += V.y, j.client.x += V.x, j.client.y += V.y;
|
|
2589
2589
|
}
|
|
2590
|
-
var
|
|
2591
|
-
|
|
2590
|
+
var L = this.result.rectDelta, H = t.rect || o.rect;
|
|
2591
|
+
H.left += L.left, H.right += L.right, H.top += L.top, H.bottom += L.bottom, H.width = H.right - H.left, H.height = H.bottom - H.top;
|
|
2592
2592
|
} }, { key: "setAndApply", value: function(t) {
|
|
2593
2593
|
var o = this.interaction, s = t.phase, l = t.preEnd, f = t.skipModifiers, p = this.setAll(this.fillArg({ preEnd: l, phase: s, pageCoords: t.modifiedCoords || o.coords.cur.page }));
|
|
2594
2594
|
if (this.result = p, !p.changed && (!f || f < this.states.length) && o.interacting()) return !1;
|
|
@@ -2631,8 +2631,8 @@ function da() {
|
|
|
2631
2631
|
var o = t.interaction, s = o.coords, l = o.rect, f = o.modification;
|
|
2632
2632
|
if (f.result) {
|
|
2633
2633
|
for (var p = f.startDelta, h = f.result, v = h.delta, N = h.rectDelta, y = 0, O = [[s.start, p], [s.cur, v]]; y < O.length; y++) {
|
|
2634
|
-
var
|
|
2635
|
-
V.page.x -=
|
|
2634
|
+
var j = O[y], V = j[0], L = j[1];
|
|
2635
|
+
V.page.x -= L.x, V.page.y -= L.y, V.client.x -= L.x, V.client.y -= L.y;
|
|
2636
2636
|
}
|
|
2637
2637
|
l.left -= N.left, l.right -= N.right, l.top -= N.top, l.bottom -= N.bottom;
|
|
2638
2638
|
}
|
|
@@ -2688,12 +2688,12 @@ function da() {
|
|
|
2688
2688
|
return n.interaction.modification.stop(n);
|
|
2689
2689
|
} } }, Zr = qi, Qr = { base: { preventDefault: "auto", deltaSource: "page" }, perAction: { enabled: !1, origin: { x: 0, y: 0 } }, actions: {} }, Qn = (function(n) {
|
|
2690
2690
|
b(o, n);
|
|
2691
|
-
var t =
|
|
2691
|
+
var t = $(o);
|
|
2692
2692
|
function o(s, l, f, p, h, v, N) {
|
|
2693
2693
|
var y;
|
|
2694
2694
|
u(this, o), (y = t.call(this, s)).relatedTarget = null, y.screenX = void 0, y.screenY = void 0, y.button = void 0, y.buttons = void 0, y.ctrlKey = void 0, y.shiftKey = void 0, y.altKey = void 0, y.metaKey = void 0, y.page = void 0, y.client = void 0, y.delta = void 0, y.rect = void 0, y.x0 = void 0, y.y0 = void 0, y.t0 = void 0, y.dt = void 0, y.duration = void 0, y.clientX0 = void 0, y.clientY0 = void 0, y.velocity = void 0, y.speed = void 0, y.swipe = void 0, y.axes = void 0, y.preEnd = void 0, h = h || s.element;
|
|
2695
|
-
var O = s.interactable,
|
|
2696
|
-
return y.page = ee({}, re.page), y.client = ee({}, re.client), y.rect = ee({}, s.rect), y.timeStamp = re.timeStamp,
|
|
2695
|
+
var O = s.interactable, j = (O && O.options || Qr).deltaSource, V = Ye(O, h, f), L = p === "start", H = p === "end", ie = L ? I(y) : s.prevEvent, re = L ? s.coords.start : H ? { page: ie.page, client: ie.client, timeStamp: s.coords.cur.timeStamp } : s.coords.cur;
|
|
2696
|
+
return y.page = ee({}, re.page), y.client = ee({}, re.client), y.rect = ee({}, s.rect), y.timeStamp = re.timeStamp, H || (y.page.x -= V.x, y.page.y -= V.y, y.client.x -= V.x, y.client.y -= V.y), y.ctrlKey = l.ctrlKey, y.altKey = l.altKey, y.shiftKey = l.shiftKey, y.metaKey = l.metaKey, y.button = l.button, y.buttons = l.buttons, y.target = h, y.currentTarget = h, y.preEnd = v, y.type = N || f + (p || ""), y.interactable = O, y.t0 = L ? s.pointers[s.pointers.length - 1].downTime : ie.t0, y.x0 = s.coords.start.page.x - V.x, y.y0 = s.coords.start.page.y - V.y, y.clientX0 = s.coords.start.client.x - V.x, y.clientY0 = s.coords.start.client.y - V.y, y.delta = L || H ? { x: 0, y: 0 } : { x: y[j].x - ie[j].x, y: y[j].y - ie[j].y }, y.dt = s.coords.delta.timeStamp, y.duration = y.timeStamp - y.t0, y.velocity = ee({}, s.coords.velocity[j]), y.speed = ht(y.velocity.x, y.velocity.y), y.swipe = H || p === "inertiastart" ? y.getSwipe() : null, y;
|
|
2697
2697
|
}
|
|
2698
2698
|
return g(o, [{ key: "getSwipe", value: function() {
|
|
2699
2699
|
var s = this._interaction;
|
|
@@ -2782,7 +2782,7 @@ function da() {
|
|
|
2782
2782
|
var l, f, p = this.coords.cur.page.x === this.coords.prev.page.x && this.coords.cur.page.y === this.coords.prev.page.y && this.coords.cur.client.x === this.coords.prev.client.x && this.coords.cur.client.y === this.coords.prev.client.y;
|
|
2783
2783
|
this.pointerIsDown && !this.pointerWasMoved && (l = this.coords.cur.client.x - this.coords.start.client.x, f = this.coords.cur.client.y - this.coords.start.client.y, this.pointerWasMoved = ht(l, f) > this.pointerMoveTolerance);
|
|
2784
2784
|
var h, v, N, y = this.getPointerIndex(t), O = { pointer: t, pointerIndex: y, pointerInfo: this.pointers[y], event: o, type: "move", eventTarget: s, dx: l, dy: f, duplicate: p, interaction: this };
|
|
2785
|
-
p || (h = this.coords.velocity, v = this.coords.delta, N = Math.max(v.timeStamp / 1e3, 1e-3), h.page.x = v.page.x / N, h.page.y = v.page.y / N, h.client.x = v.client.x / N, h.client.y = v.client.y / N, h.timeStamp = N), this._scopeFire("interactions:move", O), p || this.simulation || (this.interacting() && (O.type = null, this.move(O)), this.pointerWasMoved &&
|
|
2785
|
+
p || (h = this.coords.velocity, v = this.coords.delta, N = Math.max(v.timeStamp / 1e3, 1e-3), h.page.x = v.page.x / N, h.page.y = v.page.y / N, h.client.x = v.client.x / N, h.client.y = v.client.y / N, h.timeStamp = N), this._scopeFire("interactions:move", O), p || this.simulation || (this.interacting() && (O.type = null, this.move(O)), this.pointerWasMoved && Ft(this.coords.prev, this.coords.cur));
|
|
2786
2786
|
} }, { key: "move", value: function(t) {
|
|
2787
2787
|
t && t.event || kr(this.coords.delta), (t = ee({ pointer: this._latestPointer.pointer, event: this._latestPointer.event, eventTarget: this._latestPointer.eventTarget, interaction: this }, t || {})).phase = "move", this._doPhase(t);
|
|
2788
2788
|
} }, { key: "pointerUp", value: function(t, o, s, l) {
|
|
@@ -2812,7 +2812,7 @@ function da() {
|
|
|
2812
2812
|
var f, p, h, v = gt(t), N = this.getPointerIndex(t), y = this.pointers[N];
|
|
2813
2813
|
return l = l !== !1 && (l || /(down|start)$/i.test(o.type)), y ? y.pointer = t : (y = new Wi(v, t, o, null, null), N = this.pointers.length, this.pointers.push(y)), ki(this.coords.cur, this.pointers.map((function(O) {
|
|
2814
2814
|
return O.pointer;
|
|
2815
|
-
})), this._now()), f = this.coords.delta, p = this.coords.prev, h = this.coords.cur, f.page.x = h.page.x - p.page.x, f.page.y = h.page.y - p.page.y, f.client.x = h.client.x - p.client.x, f.client.y = h.client.y - p.client.y, f.timeStamp = h.timeStamp - p.timeStamp, l && (this.pointerIsDown = !0, y.downTime = this.coords.cur.timeStamp, y.downTarget = s,
|
|
2815
|
+
})), this._now()), f = this.coords.delta, p = this.coords.prev, h = this.coords.cur, f.page.x = h.page.x - p.page.x, f.page.y = h.page.y - p.page.y, f.client.x = h.client.x - p.client.x, f.client.y = h.client.y - p.client.y, f.timeStamp = h.timeStamp - p.timeStamp, l && (this.pointerIsDown = !0, y.downTime = this.coords.cur.timeStamp, y.downTarget = s, Lt(this.downPointer, t), this.interacting() || (Ft(this.coords.start, this.coords.cur), Ft(this.coords.prev, this.coords.cur), this.downEvent = o, this.pointerWasMoved = !1)), this._updateLatestPointer(t, o, s), this._scopeFire("interactions:update-pointer", { pointer: t, event: o, eventTarget: s, down: l, pointerInfo: y, pointerIndex: N, interaction: this }), N;
|
|
2816
2816
|
} }, { key: "removePointer", value: function(t, o) {
|
|
2817
2817
|
var s = this.getPointerIndex(t);
|
|
2818
2818
|
if (s !== -1) {
|
|
@@ -2830,7 +2830,7 @@ function da() {
|
|
|
2830
2830
|
(o = this.interactable) == null || o.fire(t), (!this.prevEvent || t.timeStamp >= this.prevEvent.timeStamp) && (this.prevEvent = t);
|
|
2831
2831
|
} }, { key: "_doPhase", value: function(t) {
|
|
2832
2832
|
var o = t.event, s = t.phase, l = t.preEnd, f = t.type, p = this.rect;
|
|
2833
|
-
if (p && s === "move" && (
|
|
2833
|
+
if (p && s === "move" && (Le(this.edges, p, this.coords.delta[this.interactable.options.deltaSource]), p.width = p.right - p.left, p.height = p.bottom - p.top), this._scopeFire("interactions:before-action-".concat(s), t) === !1) return !1;
|
|
2834
2834
|
var h = t.iEvent = this._createPreparedEvent(o, s, l, f);
|
|
2835
2835
|
return this._scopeFire("interactions:action-".concat(s), t), s === "start" && (this.prevEvent = h), this._fireEvent(h), this._scopeFire("interactions:after-action-".concat(s), t), !0;
|
|
2836
2836
|
} }, { key: "_now", value: function() {
|
|
@@ -2845,7 +2845,7 @@ function da() {
|
|
|
2845
2845
|
return !(!o.offset.pending.x && !o.offset.pending.y);
|
|
2846
2846
|
})(n)) return !1;
|
|
2847
2847
|
var t = n.offset.pending;
|
|
2848
|
-
return er(n.coords.cur, t), er(n.coords.delta, t),
|
|
2848
|
+
return er(n.coords.cur, t), er(n.coords.delta, t), Le(n.edges, n.rect, t), t.x = 0, t.y = 0, !0;
|
|
2849
2849
|
}
|
|
2850
2850
|
function es(n) {
|
|
2851
2851
|
var t = n.x, o = n.y;
|
|
@@ -2904,10 +2904,10 @@ function da() {
|
|
|
2904
2904
|
} }, { key: "inertiaTick", value: function() {
|
|
2905
2905
|
var t, o, s, l, f, p, h, v = this, N = this.interaction, y = Xt(N).resistance, O = (N._now() - this.t0) / 1e3;
|
|
2906
2906
|
if (O < this.te) {
|
|
2907
|
-
var
|
|
2908
|
-
this.isModified ? (t = 0, o = 0, s = this.targetOffset.x, l = this.targetOffset.y, f = this.modifiedOffset.x, p = this.modifiedOffset.y,
|
|
2909
|
-
var
|
|
2910
|
-
this.currentOffset.x +=
|
|
2907
|
+
var j, V = 1 - (Math.exp(-y * O) - this.lambda_v0) / this.one_ve_v0;
|
|
2908
|
+
this.isModified ? (t = 0, o = 0, s = this.targetOffset.x, l = this.targetOffset.y, f = this.modifiedOffset.x, p = this.modifiedOffset.y, j = { x: oo(h = V, t, s, f), y: oo(h, o, l, p) }) : j = { x: this.targetOffset.x * V, y: this.targetOffset.y * V };
|
|
2909
|
+
var L = { x: j.x - this.currentOffset.x, y: j.y - this.currentOffset.y };
|
|
2910
|
+
this.currentOffset.x += L.x, this.currentOffset.y += L.y, N.offsetBy(L), N.move(), this.onNextFrame((function() {
|
|
2911
2911
|
return v.inertiaTick();
|
|
2912
2912
|
}));
|
|
2913
2913
|
} else N.offsetBy({ x: this.modifiedOffset.x - this.currentOffset.x, y: this.modifiedOffset.y - this.currentOffset.y }), this.end();
|
|
@@ -2921,7 +2921,7 @@ function da() {
|
|
|
2921
2921
|
} else o.offsetBy({ x: this.targetOffset.x - this.currentOffset.x, y: this.targetOffset.y - this.currentOffset.y }), this.end();
|
|
2922
2922
|
} }, { key: "resume", value: function(t) {
|
|
2923
2923
|
var o = t.pointer, s = t.event, l = t.eventTarget, f = this.interaction;
|
|
2924
|
-
f.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), f.updatePointer(o, s, l, !0), f._doPhase({ interaction: f, event: s, phase: "resume" }),
|
|
2924
|
+
f.offsetBy({ x: -this.currentOffset.x, y: -this.currentOffset.y }), f.updatePointer(o, s, l, !0), f._doPhase({ interaction: f, event: s, phase: "resume" }), Ft(f.coords.prev, f.coords.cur), this.stop();
|
|
2925
2925
|
} }, { key: "end", value: function() {
|
|
2926
2926
|
this.interaction.move(), this.interaction.end(), this.stop();
|
|
2927
2927
|
} }, { key: "stop", value: function() {
|
|
@@ -2948,7 +2948,7 @@ function da() {
|
|
|
2948
2948
|
s.resume(n);
|
|
2949
2949
|
break;
|
|
2950
2950
|
}
|
|
2951
|
-
l =
|
|
2951
|
+
l = F(l);
|
|
2952
2952
|
}
|
|
2953
2953
|
}, "interactions:stop": function(n) {
|
|
2954
2954
|
var t = n.interaction.inertia;
|
|
@@ -3002,7 +3002,7 @@ function da() {
|
|
|
3002
3002
|
} }]), n;
|
|
3003
3003
|
})(), is = (function() {
|
|
3004
3004
|
function n(t) {
|
|
3005
|
-
u(this, n), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = t,
|
|
3005
|
+
u(this, n), this.currentTarget = void 0, this.originalEvent = void 0, this.type = void 0, this.originalEvent = t, Lt(this, t);
|
|
3006
3006
|
}
|
|
3007
3007
|
return g(n, [{ key: "preventOriginalDefault", value: function() {
|
|
3008
3008
|
this.originalEvent.preventDefault();
|
|
@@ -3019,29 +3019,29 @@ function da() {
|
|
|
3019
3019
|
return n === t || (typeof n == "boolean" ? !!t.capture === n && !t.passive : !!n.capture == !!t.capture && !!n.passive == !!t.passive);
|
|
3020
3020
|
}
|
|
3021
3021
|
var ss = { id: "events", install: function(n) {
|
|
3022
|
-
var t, o = [], s = {}, l = [], f = { add: p, remove: h, addDelegate: function(y, O,
|
|
3023
|
-
var
|
|
3024
|
-
if (!s[
|
|
3025
|
-
s[
|
|
3022
|
+
var t, o = [], s = {}, l = [], f = { add: p, remove: h, addDelegate: function(y, O, j, V, L) {
|
|
3023
|
+
var H = xt(L);
|
|
3024
|
+
if (!s[j]) {
|
|
3025
|
+
s[j] = [];
|
|
3026
3026
|
for (var ie = 0; ie < l.length; ie++) {
|
|
3027
3027
|
var re = l[ie];
|
|
3028
|
-
p(re,
|
|
3028
|
+
p(re, j, v), p(re, j, N, !0);
|
|
3029
3029
|
}
|
|
3030
3030
|
}
|
|
3031
|
-
var le = s[
|
|
3031
|
+
var le = s[j], ve = vt(le, (function(xe) {
|
|
3032
3032
|
return xe.selector === y && xe.context === O;
|
|
3033
3033
|
}));
|
|
3034
|
-
ve || (ve = { selector: y, context: O, listeners: [] }, le.push(ve)), ve.listeners.push({ func: V, options:
|
|
3035
|
-
}, removeDelegate: function(y, O,
|
|
3036
|
-
var
|
|
3034
|
+
ve || (ve = { selector: y, context: O, listeners: [] }, le.push(ve)), ve.listeners.push({ func: V, options: H });
|
|
3035
|
+
}, removeDelegate: function(y, O, j, V, L) {
|
|
3036
|
+
var H, ie = xt(L), re = s[j], le = !1;
|
|
3037
3037
|
if (re)
|
|
3038
|
-
for (
|
|
3039
|
-
var ve = re[
|
|
3038
|
+
for (H = re.length - 1; H >= 0; H--) {
|
|
3039
|
+
var ve = re[H];
|
|
3040
3040
|
if (ve.selector === y && ve.context === O) {
|
|
3041
3041
|
for (var xe = ve.listeners, de = xe.length - 1; de >= 0; de--) {
|
|
3042
3042
|
var ye = xe[de];
|
|
3043
3043
|
if (ye.func === V && Ut(ye.options, ie)) {
|
|
3044
|
-
xe.splice(de, 1), xe.length || (re.splice(
|
|
3044
|
+
xe.splice(de, 1), xe.length || (re.splice(H, 1), h(O, j, v), h(O, j, N, !0)), le = !0;
|
|
3045
3045
|
break;
|
|
3046
3046
|
}
|
|
3047
3047
|
}
|
|
@@ -3049,25 +3049,25 @@ function da() {
|
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
3051
|
}, delegateListener: v, delegateUseCapture: N, delegatedEvents: s, documents: l, targets: o, supportsOptions: !1, supportsPassive: !1 };
|
|
3052
|
-
function p(y, O,
|
|
3052
|
+
function p(y, O, j, V) {
|
|
3053
3053
|
if (y.addEventListener) {
|
|
3054
|
-
var
|
|
3054
|
+
var L = xt(V), H = vt(o, (function(ie) {
|
|
3055
3055
|
return ie.eventTarget === y;
|
|
3056
3056
|
}));
|
|
3057
|
-
|
|
3058
|
-
return ie.func ===
|
|
3059
|
-
})) || (y.addEventListener(O,
|
|
3057
|
+
H || (H = { eventTarget: y, events: {} }, o.push(H)), H.events[O] || (H.events[O] = []), vt(H.events[O], (function(ie) {
|
|
3058
|
+
return ie.func === j && Ut(ie.options, L);
|
|
3059
|
+
})) || (y.addEventListener(O, j, f.supportsOptions ? L : L.capture), H.events[O].push({ func: j, options: L }));
|
|
3060
3060
|
}
|
|
3061
3061
|
}
|
|
3062
|
-
function h(y, O,
|
|
3062
|
+
function h(y, O, j, V) {
|
|
3063
3063
|
if (y.addEventListener && y.removeEventListener) {
|
|
3064
|
-
var
|
|
3064
|
+
var L = mt(o, (function(Me) {
|
|
3065
3065
|
return Me.eventTarget === y;
|
|
3066
|
-
})),
|
|
3067
|
-
if (
|
|
3068
|
-
var ie = !1, re =
|
|
3066
|
+
})), H = o[L];
|
|
3067
|
+
if (H && H.events) if (O !== "all") {
|
|
3068
|
+
var ie = !1, re = H.events[O];
|
|
3069
3069
|
if (re) {
|
|
3070
|
-
if (
|
|
3070
|
+
if (j === "all") {
|
|
3071
3071
|
for (var le = re.length - 1; le >= 0; le--) {
|
|
3072
3072
|
var ve = re[le];
|
|
3073
3073
|
h(y, O, ve.func, ve.options);
|
|
@@ -3076,30 +3076,30 @@ function da() {
|
|
|
3076
3076
|
}
|
|
3077
3077
|
for (var xe = xt(V), de = 0; de < re.length; de++) {
|
|
3078
3078
|
var ye = re[de];
|
|
3079
|
-
if (ye.func ===
|
|
3080
|
-
y.removeEventListener(O,
|
|
3079
|
+
if (ye.func === j && Ut(ye.options, xe)) {
|
|
3080
|
+
y.removeEventListener(O, j, f.supportsOptions ? xe : xe.capture), re.splice(de, 1), re.length === 0 && (delete H.events[O], ie = !0);
|
|
3081
3081
|
break;
|
|
3082
3082
|
}
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
ie && !Object.keys(
|
|
3086
|
-
} else for (O in
|
|
3085
|
+
ie && !Object.keys(H.events).length && o.splice(L, 1);
|
|
3086
|
+
} else for (O in H.events) H.events.hasOwnProperty(O) && h(y, O, "all");
|
|
3087
3087
|
}
|
|
3088
3088
|
}
|
|
3089
3089
|
function v(y, O) {
|
|
3090
|
-
for (var
|
|
3091
|
-
for (var re = 0; re <
|
|
3092
|
-
var le =
|
|
3093
|
-
if (R(ie, ve) && ne(xe,
|
|
3090
|
+
for (var j = xt(O), V = new is(y), L = s[y.type], H = Mr(y)[0], ie = H; E.element(ie); ) {
|
|
3091
|
+
for (var re = 0; re < L.length; re++) {
|
|
3092
|
+
var le = L[re], ve = le.selector, xe = le.context;
|
|
3093
|
+
if (R(ie, ve) && ne(xe, H) && ne(xe, ie)) {
|
|
3094
3094
|
var de = le.listeners;
|
|
3095
3095
|
V.currentTarget = ie;
|
|
3096
3096
|
for (var ye = 0; ye < de.length; ye++) {
|
|
3097
3097
|
var Me = de[ye];
|
|
3098
|
-
Ut(Me.options,
|
|
3098
|
+
Ut(Me.options, j) && Me.func(V);
|
|
3099
3099
|
}
|
|
3100
3100
|
}
|
|
3101
3101
|
}
|
|
3102
|
-
ie =
|
|
3102
|
+
ie = F(ie);
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
3105
|
function N(y) {
|
|
@@ -3123,7 +3123,7 @@ function da() {
|
|
|
3123
3123
|
var h = p[f], v = s;
|
|
3124
3124
|
if (h.simulation && h.simulation.allowResume && h.pointerType === t) for (; v; ) {
|
|
3125
3125
|
if (v === h.element) return h;
|
|
3126
|
-
v =
|
|
3126
|
+
v = F(v);
|
|
3127
3127
|
}
|
|
3128
3128
|
}
|
|
3129
3129
|
return null;
|
|
@@ -3173,16 +3173,16 @@ function da() {
|
|
|
3173
3173
|
if (/^touch/.test(o.type)) {
|
|
3174
3174
|
t.prevTouchTime = t.now();
|
|
3175
3175
|
for (var N = 0, y = o.changedTouches; N < y.length; N++) {
|
|
3176
|
-
var O = y[N],
|
|
3177
|
-
v.push([
|
|
3176
|
+
var O = y[N], j = { pointer: O, pointerId: gt(O), pointerType: l, eventType: o.type, eventTarget: p, curEventTarget: h, scope: t }, V = uo(j);
|
|
3177
|
+
v.push([j.pointer, j.eventTarget, j.curEventTarget, V]);
|
|
3178
3178
|
}
|
|
3179
3179
|
} else {
|
|
3180
|
-
var
|
|
3180
|
+
var L = !1;
|
|
3181
3181
|
if (!te.supportsPointerEvent && /mouse/.test(o.type)) {
|
|
3182
|
-
for (var
|
|
3183
|
-
|
|
3182
|
+
for (var H = 0; H < s.length && !L; H++) L = s[H].pointerType !== "mouse" && s[H].pointerIsDown;
|
|
3183
|
+
L = L || t.now() - t.prevTouchTime < 500 || o.timeStamp === 0;
|
|
3184
3184
|
}
|
|
3185
|
-
if (!
|
|
3185
|
+
if (!L) {
|
|
3186
3186
|
var ie = { pointer: o, pointerId: gt(o), pointerType: l, eventType: o.type, curEventTarget: h, eventTarget: p, scope: t }, re = uo(ie);
|
|
3187
3187
|
v.push([ie.pointer, ie.eventTarget, ie.curEventTarget, re]);
|
|
3188
3188
|
}
|
|
@@ -3215,11 +3215,11 @@ function da() {
|
|
|
3215
3215
|
for (var h = 0, v = n.interactions.list; h < v.length; h++) {
|
|
3216
3216
|
var N = v[h];
|
|
3217
3217
|
if (N.pointerIsDown && N.pointerType === "touch" && !N._interacting) for (var y = function() {
|
|
3218
|
-
var V =
|
|
3219
|
-
n.documents.some((function(
|
|
3220
|
-
return ne(
|
|
3218
|
+
var V = j[O];
|
|
3219
|
+
n.documents.some((function(L) {
|
|
3220
|
+
return ne(L.doc, V.downTarget);
|
|
3221
3221
|
})) || N.removePointer(V.pointer, V.event);
|
|
3222
|
-
}, O = 0,
|
|
3222
|
+
}, O = 0, j = N.pointers; O < j.length; O++) y();
|
|
3223
3223
|
}
|
|
3224
3224
|
}
|
|
3225
3225
|
(l = D.PointerEvent ? [{ type: f.down, listener: p }, { type: f.down, listener: t.pointerDown }, { type: f.move, listener: t.pointerMove }, { type: f.up, listener: t.pointerUp }, { type: f.cancel, listener: t.pointerUp }] : [{ type: "mousedown", listener: t.pointerDown }, { type: "mousemove", listener: t.pointerMove }, { type: "mouseup", listener: t.pointerUp }, { type: "touchstart", listener: p }, { type: "touchstart", listener: t.pointerDown }, { type: "touchmove", listener: t.pointerMove }, { type: "touchend", listener: t.pointerUp }, { type: "touchcancel", listener: t.pointerUp }]).push({ type: "blur", listener: function(h) {
|
|
@@ -3227,7 +3227,7 @@ function da() {
|
|
|
3227
3227
|
N[v].documentBlur(h);
|
|
3228
3228
|
} }), n.prevTouchTime = 0, n.Interaction = (function(h) {
|
|
3229
3229
|
b(N, h);
|
|
3230
|
-
var v =
|
|
3230
|
+
var v = $(N);
|
|
3231
3231
|
function N() {
|
|
3232
3232
|
return u(this, N), v.apply(this, arguments);
|
|
3233
3233
|
}
|
|
@@ -3266,7 +3266,7 @@ function da() {
|
|
|
3266
3266
|
return E.func(o.onstart) && this.on("".concat(t, "start"), o.onstart), E.func(o.onmove) && this.on("".concat(t, "move"), o.onmove), E.func(o.onend) && this.on("".concat(t, "end"), o.onend), E.func(o.oninertiastart) && this.on("".concat(t, "inertiastart"), o.oninertiastart), this;
|
|
3267
3267
|
} }, { key: "updatePerActionListeners", value: function(t, o, s) {
|
|
3268
3268
|
var l, f = this, p = (l = this._actions.map[t]) == null ? void 0 : l.filterEventType, h = function(v) {
|
|
3269
|
-
return (p == null || p(v)) &&
|
|
3269
|
+
return (p == null || p(v)) && Ht(v, f._actions);
|
|
3270
3270
|
};
|
|
3271
3271
|
(E.array(o) || E.object(o)) && this._onOff(Qe.Off, t, o, void 0, h), (E.array(s) || E.object(s)) && this._onOff(Qe.On, t, s, void 0, h);
|
|
3272
3272
|
} }, { key: "setPerAction", value: function(t, o) {
|
|
@@ -3276,7 +3276,7 @@ function da() {
|
|
|
3276
3276
|
f === "listeners" && this.updatePerActionListeners(t, p.listeners, h), E.array(h) ? p[f] = zr(h) : E.plainObject(h) ? (p[f] = ee(p[f] || {}, ft(h)), E.object(s.perAction[f]) && "enabled" in s.perAction[f] && (p[f].enabled = h.enabled !== !1)) : E.bool(h) && E.object(s.perAction[f]) ? p[f].enabled = h : p[f] = h;
|
|
3277
3277
|
}
|
|
3278
3278
|
} }, { key: "getRect", value: function(t) {
|
|
3279
|
-
return t = t || (E.element(this.target) ? this.target : null), E.string(this.target) && (t = t || this._context.querySelector(this.target)),
|
|
3279
|
+
return t = t || (E.element(this.target) ? this.target : null), E.string(this.target) && (t = t || this._context.querySelector(this.target)), ge(t);
|
|
3280
3280
|
} }, { key: "rectChecker", value: function(t) {
|
|
3281
3281
|
var o = this;
|
|
3282
3282
|
return E.func(t) ? (this.getRect = function(s) {
|
|
@@ -3315,7 +3315,7 @@ function da() {
|
|
|
3315
3315
|
h === "wheel" && (h = te.wheelEvent);
|
|
3316
3316
|
for (var v = 0, N = p[h]; v < N.length; v++) {
|
|
3317
3317
|
var y = N[v];
|
|
3318
|
-
|
|
3318
|
+
Ht(h, this._actions) ? this.events[t === Qe.On ? "on" : "off"](h, y) : E.string(this.target) ? this._scopeEvents[t === Qe.On ? "addDelegate" : "removeDelegate"](this.target, this._context, h, y, l) : this._scopeEvents[t === Qe.On ? "add" : "remove"](this.target, h, y, l);
|
|
3319
3319
|
}
|
|
3320
3320
|
}
|
|
3321
3321
|
return this;
|
|
@@ -3372,7 +3372,7 @@ function da() {
|
|
|
3372
3372
|
var v = s.interactables.getExisting(p, h);
|
|
3373
3373
|
return v || ((v = s.interactables.new(p, h)).events.global = f.globalEvents), v;
|
|
3374
3374
|
};
|
|
3375
|
-
return l.getPointerAverage =
|
|
3375
|
+
return l.getPointerAverage = jr, l.getTouchBBox = Vn, l.getTouchDistance = Dn, l.getTouchAngle = Bn, l.getElementRect = ge, l.getElementClientRect = fe, l.matchesSelector = R, l.closest = ae, l.globalEvents = {}, l.version = "1.10.27", l.scope = s, l.use = function(f, p) {
|
|
3376
3376
|
return this.scope.usePlugin(f, p), this;
|
|
3377
3377
|
}, l.isSet = function(f, p) {
|
|
3378
3378
|
return !!this.scope.interactables.get(f, p && p.context);
|
|
@@ -3388,7 +3388,7 @@ function da() {
|
|
|
3388
3388
|
for (var O in f) this.on(O, f[O], p);
|
|
3389
3389
|
return this;
|
|
3390
3390
|
}
|
|
3391
|
-
return
|
|
3391
|
+
return Ht(f, this.scope.actions) ? this.globalEvents[f] ? this.globalEvents[f].push(p) : this.globalEvents[f] = [p] : this.scope.events.add(this.scope.document, f, p, { options: h }), this;
|
|
3392
3392
|
}), "The interact.on() method is being deprecated"), l.off = yt((function(f, p, h) {
|
|
3393
3393
|
if (E.string(f) && f.search(" ") !== -1 && (f = f.trim().split(/ +/)), E.array(f)) {
|
|
3394
3394
|
for (var v = 0, N = f; v < N.length; v++) {
|
|
@@ -3401,8 +3401,8 @@ function da() {
|
|
|
3401
3401
|
for (var O in f) this.off(O, f[O], p);
|
|
3402
3402
|
return this;
|
|
3403
3403
|
}
|
|
3404
|
-
var
|
|
3405
|
-
return
|
|
3404
|
+
var j;
|
|
3405
|
+
return Ht(f, this.scope.actions) ? f in this.globalEvents && (j = this.globalEvents[f].indexOf(p)) !== -1 && this.globalEvents[f].splice(j, 1) : this.scope.events.remove(this.scope.document, f, p, h), this;
|
|
3406
3406
|
}), "The interact.off() method is being deprecated"), l.debug = function() {
|
|
3407
3407
|
return this.scope;
|
|
3408
3408
|
}, l.supportsTouch = function() {
|
|
@@ -3425,7 +3425,7 @@ function da() {
|
|
|
3425
3425
|
var o = this;
|
|
3426
3426
|
this.Interactable = (function(s) {
|
|
3427
3427
|
b(f, s);
|
|
3428
|
-
var l =
|
|
3428
|
+
var l = $(f);
|
|
3429
3429
|
function f() {
|
|
3430
3430
|
return u(this, f), l.apply(this, arguments);
|
|
3431
3431
|
}
|
|
@@ -3497,8 +3497,8 @@ function da() {
|
|
|
3497
3497
|
return l in n || f in n;
|
|
3498
3498
|
})), o = function(s, l) {
|
|
3499
3499
|
for (var f = n.range, p = n.limits, h = p === void 0 ? { left: -1 / 0, right: 1 / 0, top: -1 / 0, bottom: 1 / 0 } : p, v = n.offset, N = v === void 0 ? { x: 0, y: 0 } : v, y = { range: f, grid: n, x: null, y: null }, O = 0; O < t.length; O++) {
|
|
3500
|
-
var
|
|
3501
|
-
y[V] = Math.max(h.left, Math.min(h.right,
|
|
3500
|
+
var j = t[O], V = j[0], L = j[1], H = Math.round((s - N.x) / n[V]), ie = Math.round((l - N.y) / n[L]);
|
|
3501
|
+
y[V] = Math.max(h.left, Math.min(h.right, H * n[V] + N.x)), y[L] = Math.max(h.top, Math.min(h.bottom, ie * n[L] + N.y));
|
|
3502
3502
|
}
|
|
3503
3503
|
return y;
|
|
3504
3504
|
};
|
|
@@ -3511,8 +3511,8 @@ function da() {
|
|
|
3511
3511
|
p === "preserve" && (p = o.width / o.height), t.startCoords = ee({}, l), t.startRect = ee({}, o), t.ratio = p, t.equalDelta = N;
|
|
3512
3512
|
var O = t.linkedEdges = { top: s.top || s.left && !s.bottom, left: s.left || s.top && !s.right, bottom: s.bottom || s.right && !s.top, right: s.right || s.bottom && !s.left };
|
|
3513
3513
|
if (t.xIsPrimaryAxis = !(!s.left && !s.right), t.equalDelta) {
|
|
3514
|
-
var
|
|
3515
|
-
t.edgeSign = { x:
|
|
3514
|
+
var j = (O.left ? 1 : -1) * (O.top ? 1 : -1);
|
|
3515
|
+
t.edgeSign = { x: j, y: j };
|
|
3516
3516
|
} else t.edgeSign = { x: O.left ? -1 : 1, y: O.top ? -1 : 1 };
|
|
3517
3517
|
if (h !== !1 && ee(s, O), y != null && y.length) {
|
|
3518
3518
|
var V = new Zn(n.interaction);
|
|
@@ -3522,7 +3522,7 @@ function da() {
|
|
|
3522
3522
|
var t = n.state, o = n.rect, s = n.coords, l = t.linkedEdges, f = ee({}, s), p = t.equalDelta ? ys : bs;
|
|
3523
3523
|
if (ee(n.edges, l), p(t, t.xIsPrimaryAxis, s, o), !t.subModification) return null;
|
|
3524
3524
|
var h = ee({}, o);
|
|
3525
|
-
|
|
3525
|
+
Le(l, h, { x: s.x - f.x, y: s.y - f.y });
|
|
3526
3526
|
var v = t.subModification.setAll(a(a({}, n), {}, { rect: h, edges: l, pageCoords: s, prevCoords: s, prevRect: h })), N = v.delta;
|
|
3527
3527
|
return v.changed && (p(t, Math.abs(N.x) > Math.abs(N.y), v.coords, v.rect), ee(s, v.coords)), v.eventProps;
|
|
3528
3528
|
}, defaults: { ratio: "preserve", equalDelta: !1, modifiers: [], enabled: !1 } };
|
|
@@ -3545,7 +3545,7 @@ function da() {
|
|
|
3545
3545
|
ho._defaults = {};
|
|
3546
3546
|
var Kt = ho;
|
|
3547
3547
|
function it(n, t, o) {
|
|
3548
|
-
return E.func(n) ?
|
|
3548
|
+
return E.func(n) ? Ce(n, t.interactable, t.element, [o.x, o.y, t]) : Ce(n, t.interactable, t.element);
|
|
3549
3549
|
}
|
|
3550
3550
|
var Gt = { start: function(n) {
|
|
3551
3551
|
var t = n.rect, o = n.startOffset, s = n.state, l = n.interaction, f = n.pageCoords, p = s.options, h = p.elementRect, v = ee({ left: 0, top: 0, right: 0, bottom: 0 }, p.offset || {});
|
|
@@ -3591,29 +3591,29 @@ function da() {
|
|
|
3591
3591
|
}, set: function(n) {
|
|
3592
3592
|
var t = n.interaction, o = n.state, s = n.rect, l = n.edges, f = o.options;
|
|
3593
3593
|
if (l) {
|
|
3594
|
-
var p =
|
|
3594
|
+
var p = He(it(f.min, t, n.coords)) || _s, h = He(it(f.max, t, n.coords)) || Ts;
|
|
3595
3595
|
o.options = { endOnly: f.endOnly, inner: ee({}, wt.noInner), outer: ee({}, wt.noOuter) }, l.top ? (o.options.inner.top = s.bottom - p.height, o.options.outer.top = s.bottom - h.height) : l.bottom && (o.options.inner.bottom = s.top + p.height, o.options.outer.bottom = s.top + h.height), l.left ? (o.options.inner.left = s.right - p.width, o.options.outer.left = s.right - h.width) : l.right && (o.options.inner.right = s.left + p.width, o.options.outer.right = s.left + h.width), wt.set(n), o.options = f;
|
|
3596
3596
|
}
|
|
3597
3597
|
}, defaults: { min: null, max: null, endOnly: !1, enabled: !1 } }, "restrictSize"), or = { start: function(n) {
|
|
3598
|
-
var t, o = n.interaction, s = n.interactable, l = n.element, f = n.rect, p = n.state, h = n.startOffset, v = p.options, N = v.offsetWithOrigin ? (function(
|
|
3599
|
-
var V =
|
|
3600
|
-
return
|
|
3598
|
+
var t, o = n.interaction, s = n.interactable, l = n.element, f = n.rect, p = n.state, h = n.startOffset, v = p.options, N = v.offsetWithOrigin ? (function(j) {
|
|
3599
|
+
var V = j.interaction.element, L = Ie(Ce(j.state.options.origin, null, null, [V])), H = L || Ye(j.interactable, V, j.interaction.prepared.name);
|
|
3600
|
+
return H;
|
|
3601
3601
|
})(n) : { x: 0, y: 0 };
|
|
3602
3602
|
if (v.offset === "startCoords") t = { x: o.coords.start.page.x, y: o.coords.start.page.y };
|
|
3603
3603
|
else {
|
|
3604
|
-
var y =
|
|
3604
|
+
var y = Ce(v.offset, s, l, [o]);
|
|
3605
3605
|
(t = Ie(y) || { x: 0, y: 0 }).x += N.x, t.y += N.y;
|
|
3606
3606
|
}
|
|
3607
3607
|
var O = v.relativePoints;
|
|
3608
|
-
p.offsets = f && O && O.length ? O.map((function(
|
|
3609
|
-
return { index: V, relativePoint:
|
|
3608
|
+
p.offsets = f && O && O.length ? O.map((function(j, V) {
|
|
3609
|
+
return { index: V, relativePoint: j, x: h.left - f.width * j.x + t.x, y: h.top - f.height * j.y + t.y };
|
|
3610
3610
|
})) : [{ index: 0, relativePoint: null, x: t.x, y: t.y }];
|
|
3611
3611
|
}, set: function(n) {
|
|
3612
3612
|
var t = n.interaction, o = n.coords, s = n.state, l = s.options, f = s.offsets, p = Ye(t.interactable, t.element, t.prepared.name), h = ee({}, o), v = [];
|
|
3613
3613
|
l.offsetWithOrigin || (h.x -= p.x, h.y -= p.y);
|
|
3614
|
-
for (var N = 0, y = f; N < y.length; N++) for (var O = y[N],
|
|
3615
|
-
var ie = l.targets[
|
|
3616
|
-
(re = E.func(ie) ? ie(
|
|
3614
|
+
for (var N = 0, y = f; N < y.length; N++) for (var O = y[N], j = h.x - O.x, V = h.y - O.y, L = 0, H = l.targets.length; L < H; L++) {
|
|
3615
|
+
var ie = l.targets[L], re = void 0;
|
|
3616
|
+
(re = E.func(ie) ? ie(j, V, t._proxy, O, L) : ie) && v.push({ x: (E.number(re.x) ? re.x : j) + O.x, y: (E.number(re.y) ? re.y : V) + O.y, range: E.number(re.range) ? re.range : l.range, source: ie, index: L, offset: O });
|
|
3617
3617
|
}
|
|
3618
3618
|
for (var le = { target: null, inRange: !1, distance: 0, range: 0, delta: { x: 0, y: 0 } }, ve = 0; ve < v.length; ve++) {
|
|
3619
3619
|
var xe = v[ve], de = xe.range, ye = xe.x - h.x, Me = xe.y - h.y, Pe = ht(ye, Me), Ve = Pe <= de;
|
|
@@ -3630,10 +3630,10 @@ function da() {
|
|
|
3630
3630
|
for (var h = 0, v = l.targets || []; h < v.length; h++) {
|
|
3631
3631
|
var N = v[h], y = void 0;
|
|
3632
3632
|
if (y = E.func(N) ? N(p.x, p.y, t) : N) {
|
|
3633
|
-
for (var O = 0,
|
|
3634
|
-
var V =
|
|
3635
|
-
if (
|
|
3636
|
-
y.x = y[
|
|
3633
|
+
for (var O = 0, j = o.targetFields; O < j.length; O++) {
|
|
3634
|
+
var V = j[O], L = V[0], H = V[1];
|
|
3635
|
+
if (L in y || H in y) {
|
|
3636
|
+
y.x = y[L], y.y = y[H];
|
|
3637
3637
|
break;
|
|
3638
3638
|
}
|
|
3639
3639
|
}
|
|
@@ -3651,12 +3651,12 @@ function da() {
|
|
|
3651
3651
|
var s = ir[o], l = s._defaults, f = s._methods;
|
|
3652
3652
|
l._methods = f, n.defaults.perAction[o] = l;
|
|
3653
3653
|
}
|
|
3654
|
-
} },
|
|
3654
|
+
} }, Cs = ks, yo = (function(n) {
|
|
3655
3655
|
b(o, n);
|
|
3656
|
-
var t =
|
|
3656
|
+
var t = $(o);
|
|
3657
3657
|
function o(s, l, f, p, h, v) {
|
|
3658
3658
|
var N;
|
|
3659
|
-
if (u(this, o),
|
|
3659
|
+
if (u(this, o), Lt(I(N = t.call(this, h)), f), f !== l && Lt(I(N), l), N.timeStamp = v, N.originalEvent = f, N.type = s, N.pointerId = gt(l), N.pointerType = Ar(l), N.target = p, N.currentTarget = null, s === "tap") {
|
|
3660
3660
|
var y = h.getPointerIndex(l);
|
|
3661
3661
|
N.dt = N.timeStamp - h.pointers[y].downTime;
|
|
3662
3662
|
var O = N.timeStamp - h.tapTime;
|
|
@@ -3686,18 +3686,18 @@ function da() {
|
|
|
3686
3686
|
n.duplicate || o.pointerIsDown && !o.pointerWasMoved || (o.pointerIsDown && sr(n), et({ interaction: o, pointer: s, event: l, eventTarget: f, type: "move" }, t));
|
|
3687
3687
|
}, "interactions:down": function(n, t) {
|
|
3688
3688
|
(function(o, s) {
|
|
3689
|
-
for (var l = o.interaction, f = o.pointer, p = o.event, h = o.eventTarget, v = o.pointerIndex, N = l.pointers[v].hold, y = ue(h), O = { interaction: l, pointer: f, event: p, eventTarget: h, type: "hold", targets: [], path: y, node: null },
|
|
3690
|
-
var V = y[
|
|
3689
|
+
for (var l = o.interaction, f = o.pointer, p = o.event, h = o.eventTarget, v = o.pointerIndex, N = l.pointers[v].hold, y = ue(h), O = { interaction: l, pointer: f, event: p, eventTarget: h, type: "hold", targets: [], path: y, node: null }, j = 0; j < y.length; j++) {
|
|
3690
|
+
var V = y[j];
|
|
3691
3691
|
O.node = V, s.fire("pointerEvents:collect-targets", O);
|
|
3692
3692
|
}
|
|
3693
3693
|
if (O.targets.length) {
|
|
3694
|
-
for (var
|
|
3695
|
-
var re = ie[
|
|
3696
|
-
re <
|
|
3694
|
+
for (var L = 1 / 0, H = 0, ie = O.targets; H < ie.length; H++) {
|
|
3695
|
+
var re = ie[H].eventable.options.holdDuration;
|
|
3696
|
+
re < L && (L = re);
|
|
3697
3697
|
}
|
|
3698
|
-
N.duration =
|
|
3698
|
+
N.duration = L, N.timeout = setTimeout((function() {
|
|
3699
3699
|
et({ interaction: l, eventTarget: h, pointer: f, event: p, type: "hold" }, s);
|
|
3700
|
-
}),
|
|
3700
|
+
}), L);
|
|
3701
3701
|
}
|
|
3702
3702
|
})(n, t), et(n, t);
|
|
3703
3703
|
}, "interactions:up": function(n, t) {
|
|
@@ -3712,14 +3712,14 @@ function da() {
|
|
|
3712
3712
|
var o = n.interaction, s = n.pointer, l = n.event, f = n.eventTarget, p = n.type, h = n.targets, v = h === void 0 ? bo(n, t) : h, N = new yo(p, s, l, f, o, t.now());
|
|
3713
3713
|
t.fire("pointerEvents:new", { pointerEvent: N });
|
|
3714
3714
|
for (var y = { interaction: o, pointer: s, event: l, eventTarget: f, targets: v, type: p, pointerEvent: N }, O = 0; O < v.length; O++) {
|
|
3715
|
-
var
|
|
3716
|
-
for (var V in
|
|
3717
|
-
var
|
|
3718
|
-
if (N._subtractOrigin(
|
|
3715
|
+
var j = v[O];
|
|
3716
|
+
for (var V in j.props || {}) N[V] = j.props[V];
|
|
3717
|
+
var L = Ye(j.eventable, j.node);
|
|
3718
|
+
if (N._subtractOrigin(L), N.eventable = j.eventable, N.currentTarget = j.node, j.eventable.fire(N), N._addOrigin(L), N.immediatePropagationStopped || N.propagationStopped && O + 1 < v.length && v[O + 1].node !== N.currentTarget) break;
|
|
3719
3719
|
}
|
|
3720
3720
|
if (t.fire("pointerEvents:fired", y), p === "tap") {
|
|
3721
|
-
var
|
|
3722
|
-
o.prevTap =
|
|
3721
|
+
var H = N.double ? et({ interaction: o, pointer: s, event: l, eventTarget: f, type: "doubletap" }, t) : N;
|
|
3722
|
+
o.prevTap = H, o.tapTime = H.timeStamp;
|
|
3723
3723
|
}
|
|
3724
3724
|
return N;
|
|
3725
3725
|
}
|
|
@@ -3727,20 +3727,20 @@ function da() {
|
|
|
3727
3727
|
var o = n.interaction, s = n.pointer, l = n.event, f = n.eventTarget, p = n.type, h = o.getPointerIndex(s), v = o.pointers[h];
|
|
3728
3728
|
if (p === "tap" && (o.pointerWasMoved || !v || v.downTarget !== f)) return [];
|
|
3729
3729
|
for (var N = ue(f), y = { interaction: o, pointer: s, event: l, eventTarget: f, type: p, path: N, targets: [], node: null }, O = 0; O < N.length; O++) {
|
|
3730
|
-
var
|
|
3731
|
-
y.node =
|
|
3730
|
+
var j = N[O];
|
|
3731
|
+
y.node = j, t.fire("pointerEvents:collect-targets", y);
|
|
3732
3732
|
}
|
|
3733
3733
|
return p === "hold" && (y.targets = y.targets.filter((function(V) {
|
|
3734
|
-
var
|
|
3735
|
-
return V.eventable.options.holdDuration === ((
|
|
3734
|
+
var L, H;
|
|
3735
|
+
return V.eventable.options.holdDuration === ((L = o.pointers[h]) == null || (H = L.hold) == null ? void 0 : H.duration);
|
|
3736
3736
|
}))), y.targets;
|
|
3737
3737
|
}
|
|
3738
3738
|
function sr(n) {
|
|
3739
3739
|
var t = n.interaction, o = n.pointerIndex, s = t.pointers[o].hold;
|
|
3740
3740
|
s && s.timeout && (clearTimeout(s.timeout), s.timeout = null);
|
|
3741
3741
|
}
|
|
3742
|
-
var
|
|
3743
|
-
function
|
|
3742
|
+
var $s = Object.freeze({ __proto__: null, default: Et });
|
|
3743
|
+
function js(n) {
|
|
3744
3744
|
var t = n.interaction;
|
|
3745
3745
|
t.holdIntervalHandle && (clearInterval(t.holdIntervalHandle), t.holdIntervalHandle = null);
|
|
3746
3746
|
}
|
|
@@ -3749,7 +3749,7 @@ function da() {
|
|
|
3749
3749
|
var t = n.pointerEvents;
|
|
3750
3750
|
t.defaults.holdRepeatInterval = 0, t.types.holdrepeat = n.actions.phaselessTypes.holdrepeat = !0;
|
|
3751
3751
|
}, listeners: ["move", "up", "cancel", "endall"].reduce((function(n, t) {
|
|
3752
|
-
return n["pointerEvents:".concat(t)] =
|
|
3752
|
+
return n["pointerEvents:".concat(t)] = js, n;
|
|
3753
3753
|
}), { "pointerEvents:new": function(n) {
|
|
3754
3754
|
var t = n.pointerEvent;
|
|
3755
3755
|
t.type === "hold" && (t.count = (t.count || 0) + 1);
|
|
@@ -3785,23 +3785,23 @@ function da() {
|
|
|
3785
3785
|
}, "interactable:set": function(n, t) {
|
|
3786
3786
|
var o = n.interactable, s = n.options;
|
|
3787
3787
|
ee(o.events.options, t.pointerEvents.defaults), ee(o.events.options, s.pointerEvents || {});
|
|
3788
|
-
} } }, zs = Rs,
|
|
3789
|
-
n.usePlugin(
|
|
3790
|
-
} },
|
|
3788
|
+
} } }, zs = Rs, Ls = { id: "pointer-events", install: function(n) {
|
|
3789
|
+
n.usePlugin($s), n.usePlugin(Ms), n.usePlugin(zs);
|
|
3790
|
+
} }, Fs = Ls, Vs = { id: "reflow", install: function(n) {
|
|
3791
3791
|
var t = n.Interactable;
|
|
3792
3792
|
n.actions.phases.reflow = !0, t.prototype.reflow = function(o) {
|
|
3793
3793
|
return (function(s, l, f) {
|
|
3794
3794
|
for (var p = s.getAllElements(), h = f.window.Promise, v = h ? [] : null, N = function() {
|
|
3795
|
-
var O = p[y],
|
|
3796
|
-
if (!
|
|
3797
|
-
var V,
|
|
3795
|
+
var O = p[y], j = s.getRect(O);
|
|
3796
|
+
if (!j) return 1;
|
|
3797
|
+
var V, L = vt(f.interactions.list, (function(re) {
|
|
3798
3798
|
return re.interacting() && re.interactable === s && re.element === O && re.prepared.name === l.name;
|
|
3799
3799
|
}));
|
|
3800
|
-
if (
|
|
3801
|
-
|
|
3800
|
+
if (L) L.move(), v && (V = L._reflowPromise || new h((function(re) {
|
|
3801
|
+
L._reflowResolve = re;
|
|
3802
3802
|
})));
|
|
3803
3803
|
else {
|
|
3804
|
-
var
|
|
3804
|
+
var H = He(j), ie = /* @__PURE__ */ (function(re) {
|
|
3805
3805
|
return { coords: re, get page() {
|
|
3806
3806
|
return this.coords.page;
|
|
3807
3807
|
}, get client() {
|
|
@@ -3828,7 +3828,7 @@ function da() {
|
|
|
3828
3828
|
return this.coords.buttons;
|
|
3829
3829
|
}, preventDefault: function() {
|
|
3830
3830
|
} };
|
|
3831
|
-
})({ page: { x:
|
|
3831
|
+
})({ page: { x: H.x, y: H.y }, client: { x: H.x, y: H.y }, timeStamp: f.now() });
|
|
3832
3832
|
V = (function(re, le, ve, xe, de) {
|
|
3833
3833
|
var ye = re.interactions.new({ pointerType: "reflow" }), Me = { interaction: ye, event: de, pointer: de, eventTarget: ve, phase: "reflow" };
|
|
3834
3834
|
ye.interactable = le, ye.element = ve, ye.prevEvent = de, ye.updatePointer(de, de, ve, !0), kr(ye.coords.delta), Gn(ye.prepared, xe), ye._doPhase(Me);
|
|
@@ -3851,7 +3851,7 @@ function da() {
|
|
|
3851
3851
|
s.splice(s.indexOf(l), 1);
|
|
3852
3852
|
})(t.interactions.list, o));
|
|
3853
3853
|
} } }, Ds = Vs;
|
|
3854
|
-
if (Ae.use(Jr), Ae.use(ro), Ae.use(
|
|
3854
|
+
if (Ae.use(Jr), Ae.use(ro), Ae.use(Fs), Ae.use(os), Ae.use(Cs), Ae.use(Ui), Ae.use(Mi), Ae.use(zi), Ae.use(Ds), Ae.default = Ae, c(e) === "object" && e) try {
|
|
3855
3855
|
e.exports = Ae;
|
|
3856
3856
|
} catch {
|
|
3857
3857
|
}
|
|
@@ -3860,7 +3860,7 @@ function da() {
|
|
|
3860
3860
|
})(en)), en.exports;
|
|
3861
3861
|
}
|
|
3862
3862
|
var pa = /* @__PURE__ */ da();
|
|
3863
|
-
const ha = /* @__PURE__ */
|
|
3863
|
+
const ha = /* @__PURE__ */ Bo(pa);
|
|
3864
3864
|
function We(e) {
|
|
3865
3865
|
return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "function" ? e.toString() : e instanceof Date ? e.toISOString() : e instanceof RegExp ? e.toString() : e instanceof Map ? JSON.stringify(Array.from(e.entries())) : e instanceof Set ? JSON.stringify(Array.from(e.values())) : e instanceof WeakMap || e instanceof WeakSet ? "" : e instanceof ArrayBuffer ? e.toString() : Array.isArray(e) ? JSON.stringify(e.map(We)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([r], [i]) => r.localeCompare(i))) : "";
|
|
3866
3866
|
}
|
|
@@ -3872,7 +3872,7 @@ function ga(e, {
|
|
|
3872
3872
|
...u
|
|
3873
3873
|
}) {
|
|
3874
3874
|
const d = Se(i), g = Se(a), m = Se(c);
|
|
3875
|
-
|
|
3875
|
+
$e(() => {
|
|
3876
3876
|
if (!r) return;
|
|
3877
3877
|
const b = e.current;
|
|
3878
3878
|
if (!b) return;
|
|
@@ -3883,12 +3883,12 @@ function ga(e, {
|
|
|
3883
3883
|
const I = _e.make(_);
|
|
3884
3884
|
d.current?.(I);
|
|
3885
3885
|
},
|
|
3886
|
-
onmove: ({ client: _, clientX0: I, clientY0:
|
|
3887
|
-
const
|
|
3888
|
-
g.current?.(W, q,
|
|
3886
|
+
onmove: ({ client: _, clientX0: I, clientY0: $, dx: A, dy: S }) => {
|
|
3887
|
+
const C = _e.make(I, $), q = _e.make(_), W = _e.make(A, S);
|
|
3888
|
+
g.current?.(W, q, C);
|
|
3889
3889
|
},
|
|
3890
|
-
onend: ({ client: _, clientX0: I, clientY0:
|
|
3891
|
-
const A = _e.make(I,
|
|
3890
|
+
onend: ({ client: _, clientX0: I, clientY0: $ }) => {
|
|
3891
|
+
const A = _e.make(I, $), S = _e.make(_);
|
|
3892
3892
|
m.current?.(S, A);
|
|
3893
3893
|
}
|
|
3894
3894
|
});
|
|
@@ -3905,17 +3905,17 @@ function zt(e, {
|
|
|
3905
3905
|
onDragEnd: u,
|
|
3906
3906
|
...d
|
|
3907
3907
|
}) {
|
|
3908
|
-
const g = we(r), [m, b] = Oe(!1), [T, _] = Oe(!1), [I,
|
|
3908
|
+
const g = we(r), [m, b] = Oe(!1), [T, _] = Oe(!1), [I, $] = Oe(r), A = Se(a), S = Se(c), C = Se(u), q = Se(i);
|
|
3909
3909
|
return ga(e, {
|
|
3910
3910
|
onDragStart: (x) => {
|
|
3911
3911
|
b(!0), _(!1), A.current?.(x);
|
|
3912
3912
|
},
|
|
3913
3913
|
onDragMove: (x, P, E) => {
|
|
3914
3914
|
const M = q.current(g.current, x.x, x.y);
|
|
3915
|
-
_o(g, M) &&
|
|
3915
|
+
_o(g, M) && $(M), b(!0), _(!1), S.current?.(x, P, E);
|
|
3916
3916
|
},
|
|
3917
3917
|
onDragEnd: (x, P) => {
|
|
3918
|
-
b(!1), _(!0),
|
|
3918
|
+
b(!1), _(!0), C.current?.(x, P);
|
|
3919
3919
|
},
|
|
3920
3920
|
...d
|
|
3921
3921
|
}), Ee(() => {
|
|
@@ -3924,7 +3924,7 @@ function zt(e, {
|
|
|
3924
3924
|
isDragging: m,
|
|
3925
3925
|
isReleasing: T,
|
|
3926
3926
|
value: I,
|
|
3927
|
-
setValue:
|
|
3927
|
+
setValue: $
|
|
3928
3928
|
};
|
|
3929
3929
|
}
|
|
3930
3930
|
function _o(e, r) {
|
|
@@ -3944,8 +3944,8 @@ const ti = /* @__PURE__ */ Te(({
|
|
|
3944
3944
|
onLoadImageError: T,
|
|
3945
3945
|
onImageSizeChange: _,
|
|
3946
3946
|
...I
|
|
3947
|
-
},
|
|
3948
|
-
const A =
|
|
3947
|
+
}, $) => {
|
|
3948
|
+
const A = he((M, B, K) => M - B * r, [r]), S = we(null), C = nt(S), q = Go({ src: i }, {
|
|
3949
3949
|
onLoadStart: m,
|
|
3950
3950
|
onLoadComplete: b,
|
|
3951
3951
|
onLoadError: T
|
|
@@ -3957,13 +3957,13 @@ const ti = /* @__PURE__ */ Te(({
|
|
|
3957
3957
|
});
|
|
3958
3958
|
Ee(() => {
|
|
3959
3959
|
if (J || !q) return;
|
|
3960
|
-
const M = va(e, q, be.size(
|
|
3960
|
+
const M = va(e, q, be.size(C), a);
|
|
3961
3961
|
M !== x && P(M), e !== W && Y(e);
|
|
3962
|
-
}, [e, q,
|
|
3962
|
+
}, [e, q, C.width, C.height, a]), Ee(() => {
|
|
3963
3963
|
if (!J || !q) return;
|
|
3964
|
-
const M = ya(x, q, be.size(
|
|
3964
|
+
const M = ya(x, q, be.size(C), a);
|
|
3965
3965
|
W !== M && Y(M);
|
|
3966
|
-
}, [x, q,
|
|
3966
|
+
}, [x, q, C.width, C.height, a]), Ee(() => {
|
|
3967
3967
|
c?.(W, J), u?.(W / 360, J);
|
|
3968
3968
|
}, [W]), Ee(() => {
|
|
3969
3969
|
_?.(q);
|
|
@@ -3973,7 +3973,7 @@ const ti = /* @__PURE__ */ Te(({
|
|
|
3973
3973
|
"div",
|
|
3974
3974
|
{
|
|
3975
3975
|
...I,
|
|
3976
|
-
ref:
|
|
3976
|
+
ref: $,
|
|
3977
3977
|
"aria-valuenow": W,
|
|
3978
3978
|
role: "slider",
|
|
3979
3979
|
children: /* @__PURE__ */ w.jsx("div", { ref: S, style: E.body })
|
|
@@ -3995,9 +3995,9 @@ function ma({ src: e = "", displacement: r = NaN }) {
|
|
|
3995
3995
|
}
|
|
3996
3996
|
function ni(e, r) {
|
|
3997
3997
|
const { width: i, height: a } = e, { height: c } = r;
|
|
3998
|
-
if (a <= 0) return
|
|
3998
|
+
if (a <= 0) return je.zero;
|
|
3999
3999
|
const d = c / a * i;
|
|
4000
|
-
return
|
|
4000
|
+
return je.make(d, c);
|
|
4001
4001
|
}
|
|
4002
4002
|
function va(e, r, i, a) {
|
|
4003
4003
|
const { width: c } = ni(r, i), { width: u } = i, d = u * a;
|
|
@@ -4024,36 +4024,36 @@ const ri = /* @__PURE__ */ Te(({
|
|
|
4024
4024
|
onAngleChange: T,
|
|
4025
4025
|
onDragEnd: _,
|
|
4026
4026
|
onDragStart: I,
|
|
4027
|
-
onLoadImageComplete:
|
|
4027
|
+
onLoadImageComplete: $,
|
|
4028
4028
|
onLoadImageError: A,
|
|
4029
4029
|
onLoadImageStart: S,
|
|
4030
|
-
onImageSizeChange:
|
|
4030
|
+
onImageSizeChange: C,
|
|
4031
4031
|
onPositionChange: q,
|
|
4032
4032
|
...W
|
|
4033
4033
|
}, Y) => {
|
|
4034
|
-
const J = we(null), x = nt(J), [P, E] = Oe(), [M,
|
|
4034
|
+
const J = we(null), x = nt(J), [P, E] = Oe(), [M, B] = Oe(!1), oe = he(() => {
|
|
4035
4035
|
if (!P) return 0;
|
|
4036
4036
|
const { width: R, height: k } = P;
|
|
4037
4037
|
return k === 0 ? 0 : R / k;
|
|
4038
|
-
}, [P?.width, P?.height])(), X =
|
|
4038
|
+
}, [P?.width, P?.height])(), X = he(() => {
|
|
4039
4039
|
const R = Math.min(360, Math.max(0, u ?? (m ? m.width / (m.height * oe) * 360 : 0)));
|
|
4040
4040
|
return x.width * (R / 360);
|
|
4041
|
-
}, [m?.width, m?.height, oe, x.width, u])(), z =
|
|
4042
|
-
|
|
4043
|
-
}, [I]), ne =
|
|
4044
|
-
|
|
4041
|
+
}, [m?.width, m?.height, oe, x.width, u])(), z = he(() => x.width <= 0 ? b : ((x.width - X) * 0.5 + b * X) / x.width, [x.width, X, b])(), te = he(() => {
|
|
4042
|
+
B(!0), I?.();
|
|
4043
|
+
}, [I]), ne = he(() => {
|
|
4044
|
+
B(!1), _?.();
|
|
4045
4045
|
}, [_]), ae = ze(c, {
|
|
4046
|
-
track:
|
|
4046
|
+
track: Ct,
|
|
4047
4047
|
reticle: an,
|
|
4048
4048
|
indicator: sn
|
|
4049
|
-
}),
|
|
4049
|
+
}), F = ba({ autoDimension: a, panoramaRect: x, aspectRatio: oe, reticleWidth: X });
|
|
4050
4050
|
return /* @__PURE__ */ w.jsxs(
|
|
4051
4051
|
"div",
|
|
4052
4052
|
{
|
|
4053
4053
|
...W,
|
|
4054
4054
|
ref: Y,
|
|
4055
4055
|
className: se(e, { dragging: M }),
|
|
4056
|
-
style: ce(r,
|
|
4056
|
+
style: ce(r, F.root),
|
|
4057
4057
|
children: [
|
|
4058
4058
|
/* @__PURE__ */ w.jsx(
|
|
4059
4059
|
ti,
|
|
@@ -4062,28 +4062,28 @@ const ri = /* @__PURE__ */ Te(({
|
|
|
4062
4062
|
angle: i,
|
|
4063
4063
|
speed: d,
|
|
4064
4064
|
src: g,
|
|
4065
|
-
style:
|
|
4065
|
+
style: F.panorama,
|
|
4066
4066
|
zeroAnchor: z,
|
|
4067
4067
|
onAngleChange: T,
|
|
4068
4068
|
onDragEnd: ne,
|
|
4069
4069
|
onDragStart: te,
|
|
4070
4070
|
onImageSizeChange: E,
|
|
4071
|
-
onLoadImageComplete:
|
|
4071
|
+
onLoadImageComplete: $,
|
|
4072
4072
|
onLoadImageError: A,
|
|
4073
4073
|
onLoadImageStart: S,
|
|
4074
4074
|
onPositionChange: q
|
|
4075
4075
|
}
|
|
4076
4076
|
),
|
|
4077
|
-
/* @__PURE__ */ w.jsx("div", { style:
|
|
4078
|
-
/* @__PURE__ */ w.jsx(
|
|
4079
|
-
/* @__PURE__ */ w.jsx(
|
|
4080
|
-
/* @__PURE__ */ w.jsx(
|
|
4077
|
+
/* @__PURE__ */ w.jsx("div", { style: F.body, children: /* @__PURE__ */ w.jsxs("div", { style: F.controls, children: [
|
|
4078
|
+
/* @__PURE__ */ w.jsx(me, { className: se({ dragging: M }), element: ae.track ?? /* @__PURE__ */ w.jsx(Ct, {}), style: F.track }),
|
|
4079
|
+
/* @__PURE__ */ w.jsx(me, { className: se({ dragging: M }), element: ae.reticle ?? /* @__PURE__ */ w.jsx(an, {}), style: F.reticle }),
|
|
4080
|
+
/* @__PURE__ */ w.jsx(me, { className: se({ dragging: M }), element: ae.track ?? /* @__PURE__ */ w.jsx(Ct, {}), style: F.track })
|
|
4081
4081
|
] }) }),
|
|
4082
|
-
/* @__PURE__ */ w.jsx(
|
|
4082
|
+
/* @__PURE__ */ w.jsx(me, { className: se({ dragging: M }), element: ae.indicator ?? /* @__PURE__ */ w.jsx(sn, {}), style: F.indicator })
|
|
4083
4083
|
]
|
|
4084
4084
|
}
|
|
4085
4085
|
);
|
|
4086
|
-
}), sn = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), an = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }),
|
|
4086
|
+
}), sn = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), an = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Ct = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Fl = /* @__PURE__ */ Object.assign(ri, {
|
|
4087
4087
|
/**
|
|
4088
4088
|
* Component for the active indicator of a {@link PanoramaSlider}.
|
|
4089
4089
|
*/
|
|
@@ -4095,7 +4095,7 @@ const ri = /* @__PURE__ */ Te(({
|
|
|
4095
4095
|
/**
|
|
4096
4096
|
* Component for the slide track of a {@link PanoramaSlider}.
|
|
4097
4097
|
*/
|
|
4098
|
-
Track:
|
|
4098
|
+
Track: Ct
|
|
4099
4099
|
});
|
|
4100
4100
|
function ba({ autoDimension: e = "width", panoramaRect: r = be.zero, aspectRatio: i = 0, reticleWidth: a = 0 }) {
|
|
4101
4101
|
return {
|
|
@@ -4141,7 +4141,7 @@ function ba({ autoDimension: e = "width", panoramaRect: r = be.zero, aspectRatio
|
|
|
4141
4141
|
}
|
|
4142
4142
|
};
|
|
4143
4143
|
}
|
|
4144
|
-
process.env.NODE_ENV === "development" && (ri.displayName = "PanoramaSlider", sn.displayName = "PanoramaSlider.Indicator", an.displayName = "PanoramaSlider.Reticle",
|
|
4144
|
+
process.env.NODE_ENV === "development" && (ri.displayName = "PanoramaSlider", sn.displayName = "PanoramaSlider.Indicator", an.displayName = "PanoramaSlider.Reticle", Ct.displayName = "PanoramaSlider.Track");
|
|
4145
4145
|
const xa = /* @__PURE__ */ Te(({
|
|
4146
4146
|
children: e,
|
|
4147
4147
|
className: r,
|
|
@@ -4201,7 +4201,7 @@ function oi({
|
|
|
4201
4201
|
children: e,
|
|
4202
4202
|
condition: r
|
|
4203
4203
|
}) {
|
|
4204
|
-
const i =
|
|
4204
|
+
const i = jn.toArray(e);
|
|
4205
4205
|
if (i.length === 0)
|
|
4206
4206
|
return console.error("[etudes::Switch] `Switch` must have at least one child"), /* @__PURE__ */ w.jsx(w.Fragment, {});
|
|
4207
4207
|
if (!Ea(i))
|
|
@@ -4246,7 +4246,7 @@ process.env.NODE_ENV === "development" && (oi.displayName = "Switch", wr.display
|
|
|
4246
4246
|
const ii = /* @__PURE__ */ Te(({
|
|
4247
4247
|
children: e,
|
|
4248
4248
|
...r
|
|
4249
|
-
}, i) => (Array.isArray(e) && console.error(`[etudes::ExtractChild] Only one child is expected, but found ${e.length}. Only the first child is extracted while the rest are discarded.`),
|
|
4249
|
+
}, i) => (Array.isArray(e) && console.error(`[etudes::ExtractChild] Only one child is expected, but found ${e.length}. Only the first child is extracted while the rest are discarded.`), jn.map(e, (a, c) => {
|
|
4250
4250
|
if (!(c > 0))
|
|
4251
4251
|
return An(a) ? gr(a, { ...r, ref: i }) : a;
|
|
4252
4252
|
})));
|
|
@@ -4263,24 +4263,24 @@ function Na({
|
|
|
4263
4263
|
maxWidth: m = 200,
|
|
4264
4264
|
threshold: b = 100
|
|
4265
4265
|
}) {
|
|
4266
|
-
const T = we(null), _ = we(void 0), I = nt(T),
|
|
4267
|
-
const
|
|
4268
|
-
|
|
4269
|
-
const q = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa(
|
|
4270
|
-
Object.keys(J).forEach((P) =>
|
|
4266
|
+
const T = we(null), _ = we(void 0), I = nt(T), $ = he(() => {
|
|
4267
|
+
const C = window.document.createElement("span");
|
|
4268
|
+
C.className = se(r), C.innerHTML = g, C.role = "tooltip";
|
|
4269
|
+
const q = a ?? (T.current ? _a(T.current, b) : "tl"), W = Sa(C), Y = Pa({ alignment: q, arrowSize: je.make(u, c), gap: d, maxDialogWidth: m, fullDialogWidth: W.width, targetWidth: I.width }), J = ce(i, Y.dialog);
|
|
4270
|
+
Object.keys(J).forEach((P) => C.style[P] = J[P]);
|
|
4271
4271
|
const x = window.document.createElement("span");
|
|
4272
|
-
return Object.keys(Y.arrow).forEach((P) => x.style[P] = Y.arrow[P]),
|
|
4273
|
-
}, [r, a, g, m, We(i), I.width, b, c, u, d]), A =
|
|
4272
|
+
return Object.keys(Y.arrow).forEach((P) => x.style[P] = Y.arrow[P]), C.appendChild(x), C;
|
|
4273
|
+
}, [r, a, g, m, We(i), I.width, b, c, u, d]), A = he(() => {
|
|
4274
4274
|
_.current && (_.current.style.opacity = "1", _.current.ariaHidden = "false");
|
|
4275
|
-
}, []), S =
|
|
4275
|
+
}, []), S = he(() => {
|
|
4276
4276
|
_.current && (_.current.style.opacity = "0", _.current.ariaHidden = "true");
|
|
4277
4277
|
}, []);
|
|
4278
4278
|
return Ee(() => {
|
|
4279
|
-
const
|
|
4280
|
-
return T.current?.appendChild(
|
|
4281
|
-
T.current?.removeChild(
|
|
4279
|
+
const C = $();
|
|
4280
|
+
return T.current?.appendChild(C), _.current = C, () => {
|
|
4281
|
+
T.current?.removeChild(C), _.current = void 0;
|
|
4282
4282
|
};
|
|
4283
|
-
}, [
|
|
4283
|
+
}, [$]), /* @__PURE__ */ w.jsx(
|
|
4284
4284
|
ii,
|
|
4285
4285
|
{
|
|
4286
4286
|
ref: T,
|
|
@@ -4291,11 +4291,11 @@ function Na({
|
|
|
4291
4291
|
);
|
|
4292
4292
|
}
|
|
4293
4293
|
function Sa(e) {
|
|
4294
|
-
if (typeof window > "u") return
|
|
4294
|
+
if (typeof window > "u") return je.zero;
|
|
4295
4295
|
const r = e.cloneNode(!1);
|
|
4296
4296
|
r.innerHTML = e.innerHTML, r.style.visibility = "hidden", r.style.whiteSpace = "pre", window.document.body.appendChild(r);
|
|
4297
4297
|
const i = r.getBoundingClientRect();
|
|
4298
|
-
return window.document.body.removeChild(r),
|
|
4298
|
+
return window.document.body.removeChild(r), je.make(i.width, i.height);
|
|
4299
4299
|
}
|
|
4300
4300
|
function _a(e, r) {
|
|
4301
4301
|
const i = be.fromViewport(), a = be.intersecting(e);
|
|
@@ -4490,8 +4490,8 @@ function Dl() {
|
|
|
4490
4490
|
}
|
|
4491
4491
|
}, [e]);
|
|
4492
4492
|
}
|
|
4493
|
-
function
|
|
4494
|
-
|
|
4493
|
+
function Bl(e, { element: r, isEnabled: i = !0 } = {}) {
|
|
4494
|
+
$e(() => {
|
|
4495
4495
|
if (!i) return;
|
|
4496
4496
|
const a = r ?? window.document.documentElement, c = a.className;
|
|
4497
4497
|
return a.classList.add(e), () => {
|
|
@@ -4499,9 +4499,9 @@ function Hl(e, { element: r, isEnabled: i = !0 } = {}) {
|
|
|
4499
4499
|
};
|
|
4500
4500
|
}, [e, r, i]);
|
|
4501
4501
|
}
|
|
4502
|
-
function
|
|
4502
|
+
function Hl(e, r) {
|
|
4503
4503
|
const i = Se(r);
|
|
4504
|
-
|
|
4504
|
+
$e(() => {
|
|
4505
4505
|
const a = (c) => {
|
|
4506
4506
|
if (!(c.target instanceof Node)) return;
|
|
4507
4507
|
let u = !0, d = c.target;
|
|
@@ -4521,10 +4521,26 @@ function Bl(e, r) {
|
|
|
4521
4521
|
};
|
|
4522
4522
|
}, []);
|
|
4523
4523
|
}
|
|
4524
|
+
function Yl() {
|
|
4525
|
+
return he(async (e) => {
|
|
4526
|
+
const r = e.type, i = new ClipboardItem({ [r]: e });
|
|
4527
|
+
try {
|
|
4528
|
+
await navigator.clipboard.write([i]);
|
|
4529
|
+
} catch (a) {
|
|
4530
|
+
console.error("[etudes::useCopyBlobToClipboard] Failed to copy blob to clipboard:", a);
|
|
4531
|
+
}
|
|
4532
|
+
}, []);
|
|
4533
|
+
}
|
|
4534
|
+
function Xl() {
|
|
4535
|
+
return he((e, r) => {
|
|
4536
|
+
const i = URL.createObjectURL(e), a = document.createElement("a");
|
|
4537
|
+
a.href = i, a.download = r, document.body.appendChild(a), a.click(), document.body.removeChild(a), URL.revokeObjectURL(i);
|
|
4538
|
+
}, []);
|
|
4539
|
+
}
|
|
4524
4540
|
function Ia() {
|
|
4525
4541
|
return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
|
|
4526
4542
|
}
|
|
4527
|
-
function
|
|
4543
|
+
function Ul() {
|
|
4528
4544
|
return pt(() => Ia(), []);
|
|
4529
4545
|
}
|
|
4530
4546
|
function ka(e, {
|
|
@@ -4534,43 +4550,43 @@ function ka(e, {
|
|
|
4534
4550
|
onDragMove: c,
|
|
4535
4551
|
onDragEnd: u
|
|
4536
4552
|
}) {
|
|
4537
|
-
const d = we(void 0), g = we(void 0), m = Se(a), b = Se(c), T = Se(u), _ =
|
|
4553
|
+
const d = we(void 0), g = we(void 0), m = Se(a), b = Se(c), T = Se(u), _ = he((A) => {
|
|
4538
4554
|
if (!d.current) return;
|
|
4539
|
-
const S = _e.make(A.clientX, A.clientY),
|
|
4540
|
-
g.current = S, b.current?.(
|
|
4541
|
-
}, []), I =
|
|
4555
|
+
const S = _e.make(A.clientX, A.clientY), C = _e.subtract(S, g.current ?? d.current);
|
|
4556
|
+
g.current = S, b.current?.(C, S, d.current);
|
|
4557
|
+
}, []), I = he((A) => {
|
|
4542
4558
|
const S = e.current;
|
|
4543
4559
|
if (!S || !d.current) return;
|
|
4544
|
-
const
|
|
4545
|
-
T.current?.(
|
|
4546
|
-
}, [i, _]),
|
|
4560
|
+
const C = _e.make(A.clientX, A.clientY), q = _e.subtract(g.current ?? d.current, C);
|
|
4561
|
+
T.current?.(C, q, d.current), d.current = void 0, g.current = void 0, S.removeEventListener("mousemove", _), S.removeEventListener("mouseup", I, { capture: !0 }), S.removeEventListener("mouseleave", I), i && (S.style.cursor = "grab");
|
|
4562
|
+
}, [i, _]), $ = he((A) => {
|
|
4547
4563
|
const S = e.current;
|
|
4548
4564
|
if (!S) return;
|
|
4549
4565
|
A.preventDefault();
|
|
4550
|
-
const
|
|
4551
|
-
d.current =
|
|
4566
|
+
const C = _e.make(A.clientX, A.clientY);
|
|
4567
|
+
d.current = C, g.current = C, S.addEventListener("mousemove", _), S.addEventListener("mouseup", I, { capture: !0 }), S.addEventListener("mouseleave", I), i && (S.style.cursor = "grabbing"), m.current?.(C);
|
|
4552
4568
|
}, [i, _, I]);
|
|
4553
|
-
|
|
4569
|
+
$e(() => {
|
|
4554
4570
|
const A = e.current;
|
|
4555
4571
|
if (!A || !r || !i) return;
|
|
4556
4572
|
const S = A.style.cursor;
|
|
4557
4573
|
return A.style.cursor = "grab", () => {
|
|
4558
4574
|
A.style.cursor = S;
|
|
4559
4575
|
};
|
|
4560
|
-
}, [r, i]),
|
|
4576
|
+
}, [r, i]), $e(() => {
|
|
4561
4577
|
const A = e.current;
|
|
4562
4578
|
if (!(!A || !r))
|
|
4563
|
-
return A.addEventListener("mousedown",
|
|
4564
|
-
A.removeEventListener("mousedown",
|
|
4579
|
+
return A.addEventListener("mousedown", $), () => {
|
|
4580
|
+
A.removeEventListener("mousedown", $), A.removeEventListener("mousemove", _), A.removeEventListener("mouseup", I, { capture: !0 }), A.removeEventListener("mouseleave", I);
|
|
4565
4581
|
};
|
|
4566
|
-
}, [r, _, I,
|
|
4582
|
+
}, [r, _, I, $]);
|
|
4567
4583
|
}
|
|
4568
|
-
function
|
|
4569
|
-
const [r, i] = Oe(!1), a =
|
|
4584
|
+
function Kl(e) {
|
|
4585
|
+
const [r, i] = Oe(!1), a = he((d) => {
|
|
4570
4586
|
d.preventDefault(), d.stopPropagation(), i(!0);
|
|
4571
|
-
}, []), c =
|
|
4587
|
+
}, []), c = he((d) => {
|
|
4572
4588
|
d.preventDefault(), d.stopPropagation(), i(!1);
|
|
4573
|
-
}, []), u =
|
|
4589
|
+
}, []), u = he((d) => {
|
|
4574
4590
|
d.preventDefault(), d.stopPropagation(), i(!1);
|
|
4575
4591
|
const g = d.dataTransfer.files;
|
|
4576
4592
|
if (g && g.length > 0) {
|
|
@@ -4585,33 +4601,33 @@ function Xl(e) {
|
|
|
4585
4601
|
onDrop: u
|
|
4586
4602
|
};
|
|
4587
4603
|
}
|
|
4588
|
-
function
|
|
4604
|
+
function Ca(e, {
|
|
4589
4605
|
autoStarts: r = !0,
|
|
4590
4606
|
shouldInvokeInitially: i = !1,
|
|
4591
4607
|
onInterval: a
|
|
4592
4608
|
}, c = []) {
|
|
4593
|
-
const u = we(void 0), d = Se(a), g =
|
|
4609
|
+
const u = we(void 0), d = Se(a), g = he(() => {
|
|
4594
4610
|
clearInterval(u.current), u.current = void 0;
|
|
4595
|
-
}, []), m =
|
|
4611
|
+
}, []), m = he(() => {
|
|
4596
4612
|
g(), !(e < 0) && (i && d.current(), u.current = setInterval(() => {
|
|
4597
4613
|
d.current();
|
|
4598
4614
|
}, e));
|
|
4599
4615
|
}, [e, i, g]);
|
|
4600
4616
|
return Ee(() => (r && e > 0 && m(), g), [r, e, m, g, ...c]), { start: m, stop: g };
|
|
4601
4617
|
}
|
|
4602
|
-
function
|
|
4618
|
+
function Gl() {
|
|
4603
4619
|
const [e, r] = Oe(!1);
|
|
4604
4620
|
return Ee(() => (r(!0), () => {
|
|
4605
4621
|
r(!1);
|
|
4606
4622
|
}), []), e;
|
|
4607
4623
|
}
|
|
4608
|
-
function
|
|
4624
|
+
function $a() {
|
|
4609
4625
|
return typeof window > "u" ? !1 : !!(typeof window.navigator < "u" && (window.navigator.maxTouchPoints > 0 || "msMaxTouchPoints" in window.navigator && window.navigator.msMaxTouchPoints > 0) || window.matchMedia("(pointer: coarse)").matches || window.matchMedia("(hover: none)").matches || "ontouchstart" in window || "ontouchstart" in window.document.documentElement);
|
|
4610
4626
|
}
|
|
4611
|
-
function
|
|
4612
|
-
return pt(() =>
|
|
4627
|
+
function ja() {
|
|
4628
|
+
return pt(() => $a(), []);
|
|
4613
4629
|
}
|
|
4614
|
-
function
|
|
4630
|
+
function ql(e, r, {
|
|
4615
4631
|
isEnabled: i = !0,
|
|
4616
4632
|
preventDefault: a = !0,
|
|
4617
4633
|
capture: c = !0,
|
|
@@ -4671,14 +4687,14 @@ function za(e, r, i) {
|
|
|
4671
4687
|
};
|
|
4672
4688
|
return Er?.setItem(r, JSON.stringify(a)), e;
|
|
4673
4689
|
}
|
|
4674
|
-
function
|
|
4690
|
+
function Wl(e) {
|
|
4675
4691
|
return pt(() => Aa({ defaultTTL: e }), [e]);
|
|
4676
4692
|
}
|
|
4677
|
-
function
|
|
4693
|
+
function Jl(e, r = []) {
|
|
4678
4694
|
const i = Se(e), a = we(void 0), c = we(!1);
|
|
4679
|
-
|
|
4695
|
+
$e(() => {
|
|
4680
4696
|
const u = () => {
|
|
4681
|
-
const g =
|
|
4697
|
+
const g = La();
|
|
4682
4698
|
g && (i.current(g, a.current), a.current = g);
|
|
4683
4699
|
}, d = () => {
|
|
4684
4700
|
c.current || typeof requestAnimationFrame == "function" && (c.current = !0, requestAnimationFrame(() => {
|
|
@@ -4690,7 +4706,7 @@ function ql(e, r = []) {
|
|
|
4690
4706
|
};
|
|
4691
4707
|
}, [...r]);
|
|
4692
4708
|
}
|
|
4693
|
-
function
|
|
4709
|
+
function La() {
|
|
4694
4710
|
const e = be.fromViewport(), r = be.clone(e, { x: 0, y: 0 }), i = be.from(window, { overflow: !0 });
|
|
4695
4711
|
if (!i) return;
|
|
4696
4712
|
const a = be.clone(r, { x: i.width - e.width, y: i.height - e.height }), c = _e.make(e.left / a.left, e.top / a.top);
|
|
@@ -4701,7 +4717,7 @@ function Fa() {
|
|
|
4701
4717
|
step: c
|
|
4702
4718
|
};
|
|
4703
4719
|
}
|
|
4704
|
-
function
|
|
4720
|
+
function Fa(e) {
|
|
4705
4721
|
const r = we(void 0);
|
|
4706
4722
|
return Ee(() => {
|
|
4707
4723
|
r.current = e;
|
|
@@ -4710,9 +4726,9 @@ function La(e) {
|
|
|
4710
4726
|
const Nr = typeof window < "u" ? window.sessionStorage : void 0;
|
|
4711
4727
|
function Va({ defaultTTL: e = 300 } = {}) {
|
|
4712
4728
|
return {
|
|
4713
|
-
get:
|
|
4729
|
+
get: Ba,
|
|
4714
4730
|
invalidate: ai,
|
|
4715
|
-
set: (r, i, a = e) =>
|
|
4731
|
+
set: (r, i, a = e) => Ha(r, i, a)
|
|
4716
4732
|
};
|
|
4717
4733
|
}
|
|
4718
4734
|
function ai(e) {
|
|
@@ -4722,7 +4738,7 @@ function Da(e) {
|
|
|
4722
4738
|
const { timestamp: r, ttl: i } = e;
|
|
4723
4739
|
return (Date.now() - r) / 1e3 >= i;
|
|
4724
4740
|
}
|
|
4725
|
-
function
|
|
4741
|
+
function Ba(e) {
|
|
4726
4742
|
const r = Nr?.getItem(e);
|
|
4727
4743
|
if (!r) return;
|
|
4728
4744
|
const i = JSON.parse(r);
|
|
@@ -4733,7 +4749,7 @@ function Ha(e) {
|
|
|
4733
4749
|
} else
|
|
4734
4750
|
return i.value;
|
|
4735
4751
|
}
|
|
4736
|
-
function
|
|
4752
|
+
function Ha(e, r, i) {
|
|
4737
4753
|
const a = {
|
|
4738
4754
|
value: e,
|
|
4739
4755
|
timestamp: Date.now(),
|
|
@@ -4741,7 +4757,7 @@ function Ba(e, r, i) {
|
|
|
4741
4757
|
};
|
|
4742
4758
|
return Nr?.setItem(r, JSON.stringify(a)), e;
|
|
4743
4759
|
}
|
|
4744
|
-
function
|
|
4760
|
+
function Zl(e) {
|
|
4745
4761
|
return pt(() => Va({ defaultTTL: e }), [e]);
|
|
4746
4762
|
}
|
|
4747
4763
|
function ci(e) {
|
|
@@ -4763,8 +4779,8 @@ function To(e, r, { element: i } = {}) {
|
|
|
4763
4779
|
const a = i ?? window.document.documentElement;
|
|
4764
4780
|
r === void 0 ? a.style.removeProperty(e) : a.style.setProperty(e, r);
|
|
4765
4781
|
}
|
|
4766
|
-
function
|
|
4767
|
-
|
|
4782
|
+
function Ql(e, r, { element: i, isEnabled: a = !0 } = {}) {
|
|
4783
|
+
$e(() => {
|
|
4768
4784
|
if (!a) return;
|
|
4769
4785
|
const c = i ?? window.document.documentElement, u = Ya(e, { element: c, computed: !1 });
|
|
4770
4786
|
return To(e, r, { element: c }), () => {
|
|
@@ -4772,25 +4788,25 @@ function Jl(e, r, { element: i, isEnabled: a = !0 } = {}) {
|
|
|
4772
4788
|
};
|
|
4773
4789
|
}, [e, r, i, a]);
|
|
4774
4790
|
}
|
|
4775
|
-
function
|
|
4776
|
-
const [
|
|
4777
|
-
return
|
|
4778
|
-
const
|
|
4779
|
-
function
|
|
4780
|
-
|
|
4791
|
+
function eu(e = "light") {
|
|
4792
|
+
const [r, i] = Oe(e);
|
|
4793
|
+
return $e(() => {
|
|
4794
|
+
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4795
|
+
function c(u) {
|
|
4796
|
+
i(u.matches ? "dark" : "light");
|
|
4781
4797
|
}
|
|
4782
|
-
return
|
|
4783
|
-
|
|
4798
|
+
return i(a.matches ? "dark" : "light"), a.addEventListener("change", c), () => {
|
|
4799
|
+
a.removeEventListener("change", c);
|
|
4784
4800
|
};
|
|
4785
|
-
}, []),
|
|
4801
|
+
}, []), r;
|
|
4786
4802
|
}
|
|
4787
|
-
function
|
|
4803
|
+
function tu(e, {
|
|
4788
4804
|
autoStarts: r = !0,
|
|
4789
4805
|
onTimeout: i
|
|
4790
4806
|
}, a = []) {
|
|
4791
|
-
const c = we(void 0), u = Se(i), d =
|
|
4807
|
+
const c = we(void 0), u = Se(i), d = he(() => {
|
|
4792
4808
|
c.current !== void 0 && (clearTimeout(c.current), c.current = void 0);
|
|
4793
|
-
}, []), g =
|
|
4809
|
+
}, []), g = he(() => {
|
|
4794
4810
|
d(), !(e < 0) && (c.current = setTimeout(() => {
|
|
4795
4811
|
d(), u.current();
|
|
4796
4812
|
}, e));
|
|
@@ -4811,15 +4827,15 @@ const li = /* @__PURE__ */ Te(({
|
|
|
4811
4827
|
selection: T,
|
|
4812
4828
|
selectionMode: _ = "none",
|
|
4813
4829
|
onActivateAt: I,
|
|
4814
|
-
onDeselectAt:
|
|
4830
|
+
onDeselectAt: $,
|
|
4815
4831
|
onCustomEvent: A,
|
|
4816
4832
|
onSelectAt: S,
|
|
4817
|
-
onSelectionChange:
|
|
4833
|
+
onSelectionChange: C,
|
|
4818
4834
|
ItemComponent: q,
|
|
4819
4835
|
...W
|
|
4820
4836
|
}, Y) => {
|
|
4821
4837
|
const J = Ua(T ?? [], d), x = Ka({ itemLength: c, itemPadding: u, layout: g, numSegments: m, orientation: b }), P = (X) => J.indexOf(X) >= 0, E = (X) => {
|
|
4822
|
-
P(X) ?
|
|
4838
|
+
P(X) ? B(X) : M(X);
|
|
4823
4839
|
}, M = (X) => {
|
|
4824
4840
|
if (P(X)) return;
|
|
4825
4841
|
let D;
|
|
@@ -4837,7 +4853,7 @@ const li = /* @__PURE__ */ Te(({
|
|
|
4837
4853
|
}
|
|
4838
4854
|
const z = J, te = D(J);
|
|
4839
4855
|
oe(z, te);
|
|
4840
|
-
},
|
|
4856
|
+
}, B = (X) => {
|
|
4841
4857
|
if (!P(X)) return;
|
|
4842
4858
|
const D = (ne) => ne.filter((ae) => ae !== X), z = J, te = D(J);
|
|
4843
4859
|
oe(z, te);
|
|
@@ -4846,7 +4862,7 @@ const li = /* @__PURE__ */ Te(({
|
|
|
4846
4862
|
}, oe = (X, D) => {
|
|
4847
4863
|
if (qe(X, D)) return;
|
|
4848
4864
|
const z = X?.filter((ne) => D.indexOf(ne) === -1) ?? [], te = D.filter((ne) => X?.indexOf(ne) === -1);
|
|
4849
|
-
z.forEach((ne) =>
|
|
4865
|
+
z.forEach((ne) => $?.(ne)), te.forEach((ne) => S?.(ne)), C?.(D);
|
|
4850
4866
|
};
|
|
4851
4867
|
Ee(() => {
|
|
4852
4868
|
const X = J;
|
|
@@ -4901,10 +4917,10 @@ const li = /* @__PURE__ */ Te(({
|
|
|
4901
4917
|
role: z,
|
|
4902
4918
|
style: ne,
|
|
4903
4919
|
onClick: () => K(D),
|
|
4904
|
-
onCustomEvent: (ae,
|
|
4920
|
+
onCustomEvent: (ae, F) => A?.(D, ae, F)
|
|
4905
4921
|
}
|
|
4906
4922
|
) : /* @__PURE__ */ w.jsx(
|
|
4907
|
-
|
|
4923
|
+
me,
|
|
4908
4924
|
{
|
|
4909
4925
|
"aria-selected": te,
|
|
4910
4926
|
className: se({ active: te }),
|
|
@@ -4990,31 +5006,31 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
4990
5006
|
onCollapseSectionAt: T,
|
|
4991
5007
|
onDeselectAt: _,
|
|
4992
5008
|
onExpandedSectionsChange: I,
|
|
4993
|
-
onExpandSectionAt:
|
|
5009
|
+
onExpandSectionAt: $,
|
|
4994
5010
|
onHeaderCustomEvent: A,
|
|
4995
5011
|
onItemCustomEvent: S,
|
|
4996
|
-
onSelectAt:
|
|
5012
|
+
onSelectAt: C,
|
|
4997
5013
|
onSelectionChange: q,
|
|
4998
5014
|
HeaderComponent: W,
|
|
4999
5015
|
ItemComponent: Y,
|
|
5000
5016
|
...J
|
|
5001
5017
|
}, x) => {
|
|
5002
|
-
const P = Wa(g ?? {}, d), E = qa(a ?? [], d), M = Ja({ orientation: c }),
|
|
5018
|
+
const P = Wa(g ?? {}, d), E = qa(a ?? [], d), M = Ja({ orientation: c }), B = d.map(() => we(null)), K = B.map((F) => ci(F)), oe = (F, R) => (P[R]?.indexOf(F) ?? -1) >= 0, Q = (F) => E.indexOf(F) >= 0, X = (F) => {
|
|
5003
5019
|
let R;
|
|
5004
|
-
Q(
|
|
5005
|
-
}, D = (
|
|
5006
|
-
if (oe(
|
|
5020
|
+
Q(F) ? R = (k) => k.filter((U) => U !== F) : i ? R = (k) => [F] : R = (k) => [...k.filter((U) => U !== F), F], te(E, R(E));
|
|
5021
|
+
}, D = (F, R) => {
|
|
5022
|
+
if (oe(F, R)) return;
|
|
5007
5023
|
let k;
|
|
5008
5024
|
switch (m) {
|
|
5009
5025
|
case "multiple":
|
|
5010
5026
|
k = (Z) => ({
|
|
5011
5027
|
...Z,
|
|
5012
|
-
[R]: fn([...(Z[R] ?? []).filter((G) => G !==
|
|
5028
|
+
[R]: fn([...(Z[R] ?? []).filter((G) => G !== F), F])
|
|
5013
5029
|
});
|
|
5014
5030
|
break;
|
|
5015
5031
|
case "single":
|
|
5016
5032
|
k = (Z) => ({
|
|
5017
|
-
[R]: [
|
|
5033
|
+
[R]: [F]
|
|
5018
5034
|
});
|
|
5019
5035
|
break;
|
|
5020
5036
|
default:
|
|
@@ -5022,26 +5038,26 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5022
5038
|
}
|
|
5023
5039
|
const U = k(P);
|
|
5024
5040
|
ne(P, U);
|
|
5025
|
-
}, z = (
|
|
5026
|
-
if (!oe(
|
|
5041
|
+
}, z = (F, R) => {
|
|
5042
|
+
if (!oe(F, R)) return;
|
|
5027
5043
|
const U = ((Z) => ({
|
|
5028
5044
|
...Z,
|
|
5029
|
-
[R]: (Z[R] ?? []).filter((G) => G !==
|
|
5045
|
+
[R]: (Z[R] ?? []).filter((G) => G !== F)
|
|
5030
5046
|
}))(P);
|
|
5031
5047
|
ne(P, U);
|
|
5032
|
-
}, te = (
|
|
5033
|
-
if (qe(
|
|
5034
|
-
const k =
|
|
5035
|
-
k.forEach((Z) => T?.(Z)), U.forEach((Z) =>
|
|
5036
|
-
}, ne = (
|
|
5037
|
-
if (qe(
|
|
5048
|
+
}, te = (F, R) => {
|
|
5049
|
+
if (qe(F, R)) return;
|
|
5050
|
+
const k = F?.filter((Z) => R.indexOf(Z) === -1) ?? [], U = R.filter((Z) => F?.indexOf(Z) === -1);
|
|
5051
|
+
k.forEach((Z) => T?.(Z)), U.forEach((Z) => $?.(Z)), I?.(R);
|
|
5052
|
+
}, ne = (F, R) => {
|
|
5053
|
+
if (qe(F, R)) return;
|
|
5038
5054
|
const k = d.length;
|
|
5039
5055
|
let U = [], Z = [];
|
|
5040
5056
|
for (let G = 0; G < k; G++) {
|
|
5041
|
-
const fe =
|
|
5057
|
+
const fe = F?.[G] ?? [], ge = R[G] ?? [], ue = fe.filter((ee) => ge.indexOf(ee) === -1), Ne = ge.filter((ee) => fe?.indexOf(ee) === -1);
|
|
5042
5058
|
U = [...U, ...ue.map((ee) => [ee, G])], Z = [...Z, ...Ne.map((ee) => [ee, G])];
|
|
5043
5059
|
}
|
|
5044
|
-
U.forEach((G) => _?.(G[0], G[1])), Z.forEach((G) =>
|
|
5060
|
+
U.forEach((G) => _?.(G[0], G[1])), Z.forEach((G) => C?.(G[0], G[1])), q?.(R);
|
|
5045
5061
|
}, ae = ze(e, {
|
|
5046
5062
|
collapseIcon: _r,
|
|
5047
5063
|
expandIcon: Sr,
|
|
@@ -5049,23 +5065,23 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5049
5065
|
item: un,
|
|
5050
5066
|
section: dr
|
|
5051
5067
|
});
|
|
5052
|
-
return /* @__PURE__ */ w.jsx("div", { ...J, ref: x, style: ce(r, M.root), children: /* @__PURE__ */ w.jsx(Mn, { in: d, children: (
|
|
5053
|
-
const { collectionPadding: k = 0, items: U = [], itemLength: Z = 50, itemPadding: G = 0, isSelectionTogglable: fe, layout:
|
|
5068
|
+
return /* @__PURE__ */ w.jsx("div", { ...J, ref: x, style: ce(r, M.root), children: /* @__PURE__ */ w.jsx(Mn, { in: d, children: (F, R) => {
|
|
5069
|
+
const { collectionPadding: k = 0, items: U = [], itemLength: Z = 50, itemPadding: G = 0, isSelectionTogglable: fe, layout: ge = "list", maxVisible: ue = -1, numSegments: Ne = 1 } = F, ee = ge === "list" ? U.length : Math.ceil(U.length / Ne), Be = ue < 0 ? ee : Math.min(ee, ue), Ce = Z * Be + G * (Be - 1), Ie = !Q(R), He = K[R];
|
|
5054
5070
|
return /* @__PURE__ */ w.jsxs(
|
|
5055
|
-
|
|
5071
|
+
me,
|
|
5056
5072
|
{
|
|
5057
5073
|
element: ae.section ?? /* @__PURE__ */ w.jsx(dr, {}),
|
|
5058
5074
|
style: ce(M.section, c === "vertical" ? {
|
|
5059
5075
|
marginTop: R === 0 ? "0px" : `${u}px`,
|
|
5060
|
-
...
|
|
5061
|
-
height: Ie ? `${
|
|
5076
|
+
...He.height > 0 ? {
|
|
5077
|
+
height: Ie ? `${He.height}px` : `${Ce + He.height + k}px`
|
|
5062
5078
|
} : {
|
|
5063
5079
|
visibility: "hidden"
|
|
5064
5080
|
}
|
|
5065
5081
|
} : {
|
|
5066
5082
|
marginLeft: R === 0 ? "0px" : `${u}px`,
|
|
5067
|
-
...
|
|
5068
|
-
width: Ie ? `${
|
|
5083
|
+
...He.width > 0 ? {
|
|
5084
|
+
width: Ie ? `${He.width}px` : `${Ce + He.width + k}px`
|
|
5069
5085
|
} : {
|
|
5070
5086
|
visibility: "hidden"
|
|
5071
5087
|
}
|
|
@@ -5074,7 +5090,7 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5074
5090
|
/* @__PURE__ */ w.jsx(
|
|
5075
5091
|
"div",
|
|
5076
5092
|
{
|
|
5077
|
-
ref:
|
|
5093
|
+
ref: B[R],
|
|
5078
5094
|
style: ce(M.headerContainer),
|
|
5079
5095
|
children: W ? /* @__PURE__ */ w.jsx(
|
|
5080
5096
|
W,
|
|
@@ -5084,13 +5100,13 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5084
5100
|
index: R,
|
|
5085
5101
|
isCollapsed: Ie,
|
|
5086
5102
|
role: "button",
|
|
5087
|
-
section:
|
|
5103
|
+
section: F,
|
|
5088
5104
|
style: ce(M.header),
|
|
5089
5105
|
onClick: () => X(R),
|
|
5090
|
-
onCustomEvent: (
|
|
5106
|
+
onCustomEvent: (Le, Ye) => A?.(R, Le, Ye)
|
|
5091
5107
|
}
|
|
5092
5108
|
) : /* @__PURE__ */ w.jsxs(
|
|
5093
|
-
|
|
5109
|
+
me,
|
|
5094
5110
|
{
|
|
5095
5111
|
"aria-expanded": !Ie,
|
|
5096
5112
|
className: se({ collapsed: Ie, expanded: !Ie }),
|
|
@@ -5099,9 +5115,9 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5099
5115
|
style: ce(M.header),
|
|
5100
5116
|
onClick: () => X(R),
|
|
5101
5117
|
children: [
|
|
5102
|
-
/* @__PURE__ */ w.jsx("span", { dangerouslySetInnerHTML: { __html:
|
|
5118
|
+
/* @__PURE__ */ w.jsx("span", { dangerouslySetInnerHTML: { __html: F.label } }),
|
|
5103
5119
|
ae.expandIcon && /* @__PURE__ */ w.jsx(
|
|
5104
|
-
|
|
5120
|
+
me,
|
|
5105
5121
|
{
|
|
5106
5122
|
className: se({ collapsed: Ie, expanded: !Ie }),
|
|
5107
5123
|
element: Ie ? ae.collapseIcon ?? ae.expandIcon : ae.expandIcon,
|
|
@@ -5121,13 +5137,13 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5121
5137
|
pointerEvents: Ie ? "none" : "auto"
|
|
5122
5138
|
}, c === "vertical" ? {
|
|
5123
5139
|
width: "100%",
|
|
5124
|
-
height: `${
|
|
5140
|
+
height: `${Ce}px`,
|
|
5125
5141
|
marginTop: `${k}px`,
|
|
5126
5142
|
overflowY: ue < 0 || ue >= ee ? "hidden" : "scroll"
|
|
5127
5143
|
} : {
|
|
5128
5144
|
marginLeft: `${k}px`,
|
|
5129
5145
|
overflowX: ue < 0 || ue >= ee ? "hidden" : "scroll",
|
|
5130
|
-
width: `${
|
|
5146
|
+
width: `${Ce}px`,
|
|
5131
5147
|
height: "100%"
|
|
5132
5148
|
}),
|
|
5133
5149
|
children: /* @__PURE__ */ w.jsx(
|
|
@@ -5139,16 +5155,16 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5139
5155
|
itemLength: Z,
|
|
5140
5156
|
itemPadding: G,
|
|
5141
5157
|
items: U,
|
|
5142
|
-
layout:
|
|
5158
|
+
layout: ge,
|
|
5143
5159
|
numSegments: Ne,
|
|
5144
5160
|
orientation: c,
|
|
5145
5161
|
selection: P[R] ?? [],
|
|
5146
5162
|
selectionMode: m,
|
|
5147
5163
|
style: ce(c === "vertical" ? { width: "100%" } : { height: "100%" }),
|
|
5148
|
-
onActivateAt: (
|
|
5149
|
-
onCustomEvent: (
|
|
5150
|
-
onDeselectAt: (
|
|
5151
|
-
onSelectAt: (
|
|
5164
|
+
onActivateAt: (Le) => b?.(Le, R),
|
|
5165
|
+
onCustomEvent: (Le, Ye, Xe) => S?.(Le, R, Ye, Xe),
|
|
5166
|
+
onDeselectAt: (Le) => z(Le, R),
|
|
5167
|
+
onSelectAt: (Le) => D(Le, R),
|
|
5152
5168
|
children: !Y && (ae.item ?? /* @__PURE__ */ w.jsx(un, {}))
|
|
5153
5169
|
}
|
|
5154
5170
|
)
|
|
@@ -5158,7 +5174,7 @@ const fi = /* @__PURE__ */ Te(({
|
|
|
5158
5174
|
}
|
|
5159
5175
|
);
|
|
5160
5176
|
} }) });
|
|
5161
|
-
}), ln = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Sr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), _r = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), dr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), un = zn.Item,
|
|
5177
|
+
}), ln = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Sr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), _r = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, children: e }), dr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), un = zn.Item, nu = /* @__PURE__ */ Object.assign(fi, {
|
|
5162
5178
|
/**
|
|
5163
5179
|
* Component for each section header of an {@link Accordion}.
|
|
5164
5180
|
*/
|
|
@@ -5277,64 +5293,64 @@ const Za = /* @__PURE__ */ Te(({
|
|
|
5277
5293
|
ItemComponent: b,
|
|
5278
5294
|
...T
|
|
5279
5295
|
}, _) => {
|
|
5280
|
-
const I = we(void 0),
|
|
5281
|
-
|
|
5282
|
-
}, []), z =
|
|
5283
|
-
D(),
|
|
5284
|
-
clearTimeout(
|
|
5296
|
+
const I = we(void 0), $ = we(null), A = we(void 0), S = we(void 0), C = we(void 0), q = 1e3, W = Se(d), Y = Se(g), J = Se(m), x = we(!1), P = we(!1), E = ja(), [M, B] = Oe(Oo($, c)), [K, oe] = Oe(!1), Q = tc({ scrollSnapEnabled: E || !K, orientation: c }), X = e > 0, D = he(() => {
|
|
5297
|
+
C.current !== void 0 && (clearTimeout(C.current), C.current = void 0);
|
|
5298
|
+
}, []), z = he(() => {
|
|
5299
|
+
D(), C.current = setTimeout(() => {
|
|
5300
|
+
clearTimeout(C.current), C.current = void 0;
|
|
5285
5301
|
}, q);
|
|
5286
|
-
}, [q, D]), te =
|
|
5287
|
-
Qa(
|
|
5288
|
-
}, [r, c]), ne =
|
|
5289
|
-
|
|
5290
|
-
}, [c]), ae =
|
|
5302
|
+
}, [q, D]), te = he(() => {
|
|
5303
|
+
Qa($, r, c), z();
|
|
5304
|
+
}, [r, c]), ne = he(() => {
|
|
5305
|
+
B(Oo($, c));
|
|
5306
|
+
}, [c]), ae = he((G) => {
|
|
5291
5307
|
E || (A.current = _e.make(G.clientX, G.clientY), oe(!0));
|
|
5292
|
-
}, [E]),
|
|
5308
|
+
}, [E]), F = he((G) => {
|
|
5293
5309
|
E || (S.current = _e.make(G.clientX, G.clientY), te(), oe(!1));
|
|
5294
|
-
}, [E, te]), R =
|
|
5295
|
-
const fe = A.current,
|
|
5296
|
-
if (!fe || !
|
|
5297
|
-
const ue = 5, Ne = _e.subtract(fe,
|
|
5310
|
+
}, [E, te]), R = he((G) => {
|
|
5311
|
+
const fe = A.current, ge = S.current;
|
|
5312
|
+
if (!fe || !ge) return;
|
|
5313
|
+
const ue = 5, Ne = _e.subtract(fe, ge);
|
|
5298
5314
|
(Math.abs(Ne.x) > ue || Math.abs(Ne.y) > ue) && G.stopPropagation(), A.current = void 0, S.current = void 0;
|
|
5299
|
-
}, []), k =
|
|
5315
|
+
}, []), k = he(() => {
|
|
5300
5316
|
const G = (r + a.length + 1) % a.length;
|
|
5301
5317
|
J.current?.(G);
|
|
5302
|
-
}, [K, r, a.length]), U =
|
|
5303
|
-
const
|
|
5304
|
-
!
|
|
5318
|
+
}, [K, r, a.length]), U = he(({ x: G, y: fe }) => {
|
|
5319
|
+
const ge = $.current;
|
|
5320
|
+
!ge || x.current || (D(), x.current = !0, requestAnimationFrame(() => {
|
|
5305
5321
|
switch (c) {
|
|
5306
5322
|
case "horizontal":
|
|
5307
|
-
|
|
5323
|
+
ge.scrollLeft -= G * 1.5;
|
|
5308
5324
|
break;
|
|
5309
5325
|
case "vertical":
|
|
5310
|
-
|
|
5326
|
+
ge.scrollTop -= fe * 1.5;
|
|
5311
5327
|
default:
|
|
5312
5328
|
console.error(`[etudes::Carousel] Unsupported orientation: ${c}`);
|
|
5313
5329
|
}
|
|
5314
5330
|
x.current = !1;
|
|
5315
5331
|
}));
|
|
5316
|
-
}, [c]), Z =
|
|
5317
|
-
const G =
|
|
5332
|
+
}, [c]), Z = he(() => {
|
|
5333
|
+
const G = $.current;
|
|
5318
5334
|
!G || P.current || (P.current = !0, requestAnimationFrame(() => {
|
|
5319
|
-
if (u && ne(), !(
|
|
5320
|
-
const
|
|
5335
|
+
if (u && ne(), !(C.current !== void 0)) {
|
|
5336
|
+
const ge = Math.round(c === "horizontal" ? G.scrollLeft / G.clientWidth : G.scrollTop / G.clientHeight), ue = Math.max(0, Math.min(a.length - 1, ge));
|
|
5321
5337
|
ue !== r && (I.current = ue, J.current?.(ue));
|
|
5322
5338
|
}
|
|
5323
5339
|
P.current = !1;
|
|
5324
5340
|
}));
|
|
5325
5341
|
}, [a.length, r, c, u, ne]);
|
|
5326
|
-
return ka(
|
|
5342
|
+
return ka($, {
|
|
5327
5343
|
isEnabled: !E && i && a.length > 1,
|
|
5328
5344
|
onDragMove: U
|
|
5329
|
-
}),
|
|
5345
|
+
}), Ca(K || !X ? -1 : e, {
|
|
5330
5346
|
onInterval: k
|
|
5331
|
-
}, [r]),
|
|
5347
|
+
}, [r]), $e(() => {
|
|
5332
5348
|
!X || E || (K ? W.current?.() : Y.current?.());
|
|
5333
|
-
}, [E, K, X]),
|
|
5334
|
-
const G =
|
|
5349
|
+
}, [E, K, X]), $e(() => {
|
|
5350
|
+
const G = $.current;
|
|
5335
5351
|
if (!G) return;
|
|
5336
|
-
const fe = I.current === void 0,
|
|
5337
|
-
return G.addEventListener("scroll", Z), u && ne(),
|
|
5352
|
+
const fe = I.current === void 0, ge = I.current === r;
|
|
5353
|
+
return G.addEventListener("scroll", Z), u && ne(), ge || (I.current = r, fe || (J.current?.(r), te())), () => {
|
|
5338
5354
|
G.removeEventListener("scroll", Z);
|
|
5339
5355
|
};
|
|
5340
5356
|
}, [r, u, te, Z, ne]), /* @__PURE__ */ w.jsx(
|
|
@@ -5344,15 +5360,15 @@ const Za = /* @__PURE__ */ Te(({
|
|
|
5344
5360
|
ref: _,
|
|
5345
5361
|
role: "region",
|
|
5346
5362
|
onClick: R,
|
|
5347
|
-
onPointerCancel:
|
|
5363
|
+
onPointerCancel: F,
|
|
5348
5364
|
onPointerDown: ae,
|
|
5349
|
-
onPointerLeave:
|
|
5350
|
-
onPointerUp:
|
|
5351
|
-
children: /* @__PURE__ */ w.jsx("div", { ref:
|
|
5365
|
+
onPointerLeave: F,
|
|
5366
|
+
onPointerUp: F,
|
|
5367
|
+
children: /* @__PURE__ */ w.jsx("div", { ref: $, style: ce(Q.viewport), children: /* @__PURE__ */ w.jsx(Mn, { in: a, children: ({ style: G, ...fe }, ge) => /* @__PURE__ */ w.jsx("div", { style: ce(Q.itemContainer), children: /* @__PURE__ */ w.jsx(
|
|
5352
5368
|
b,
|
|
5353
5369
|
{
|
|
5354
|
-
"aria-hidden":
|
|
5355
|
-
exposure: u ? M?.[
|
|
5370
|
+
"aria-hidden": ge !== r,
|
|
5371
|
+
exposure: u ? M?.[ge] : void 0,
|
|
5356
5372
|
style: ce(G, Q.item),
|
|
5357
5373
|
...fe
|
|
5358
5374
|
}
|
|
@@ -5439,20 +5455,20 @@ const pi = /* @__PURE__ */ Te(({
|
|
|
5439
5455
|
onChange: T,
|
|
5440
5456
|
..._
|
|
5441
5457
|
}, I) => {
|
|
5442
|
-
const
|
|
5458
|
+
const $ = rc(b, g), A = we([]), S = nc(), C = ze(e, {
|
|
5443
5459
|
field: dn
|
|
5444
5460
|
}), q = (x) => {
|
|
5445
5461
|
x < 0 ? A.current[0]?.focus() : x >= g ? A.current[g - 1]?.focus() : A.current[x]?.focus();
|
|
5446
5462
|
}, W = (x) => (P) => {
|
|
5447
|
-
const E =
|
|
5448
|
-
T(
|
|
5463
|
+
const E = $[x], M = oc(P.target.value, E), B = Po($.slice(), M.split("").slice(0, g), x);
|
|
5464
|
+
T(B);
|
|
5449
5465
|
const K = Math.min(x + M.length, g - 1);
|
|
5450
5466
|
q(K);
|
|
5451
5467
|
}, Y = (x) => (P) => {
|
|
5452
5468
|
switch (P.key) {
|
|
5453
5469
|
case "Backspace": {
|
|
5454
|
-
if (P.preventDefault(),
|
|
5455
|
-
const E =
|
|
5470
|
+
if (P.preventDefault(), $[x]) {
|
|
5471
|
+
const E = $.slice();
|
|
5456
5472
|
E[x] = "", T(E), q(x - 1);
|
|
5457
5473
|
} else
|
|
5458
5474
|
q(x - 1);
|
|
@@ -5469,29 +5485,29 @@ const pi = /* @__PURE__ */ Te(({
|
|
|
5469
5485
|
}
|
|
5470
5486
|
}, J = (x) => (P) => {
|
|
5471
5487
|
P.preventDefault();
|
|
5472
|
-
const E = P.clipboardData.getData("text").trim(), M = Po(
|
|
5488
|
+
const E = P.clipboardData.getData("text").trim(), M = Po($.slice(), E.split("").slice(0, g), x);
|
|
5473
5489
|
T(M);
|
|
5474
|
-
const
|
|
5475
|
-
q(
|
|
5490
|
+
const B = Math.min(x + E.length, g - 1);
|
|
5491
|
+
q(B);
|
|
5476
5492
|
};
|
|
5477
5493
|
return Ee(() => {
|
|
5478
5494
|
if (!i) return;
|
|
5479
|
-
const x =
|
|
5495
|
+
const x = $.findIndex((P) => P === "");
|
|
5480
5496
|
x !== -1 && q(x);
|
|
5481
5497
|
}, [i]), /* @__PURE__ */ w.jsx("div", { ..._, ref: I, style: ce(m, S.root), children: /* @__PURE__ */ w.jsx(nn, { count: g, children: (x) => /* @__PURE__ */ w.jsx(
|
|
5482
|
-
|
|
5498
|
+
me,
|
|
5483
5499
|
{
|
|
5484
5500
|
ref: (P) => A.current[x] = P,
|
|
5485
5501
|
"aria-disabled": c,
|
|
5486
5502
|
"aria-required": u,
|
|
5487
5503
|
autoComplete: r,
|
|
5488
5504
|
disabled: c,
|
|
5489
|
-
element:
|
|
5505
|
+
element: C.field ?? /* @__PURE__ */ w.jsx(dn, {}),
|
|
5490
5506
|
inputMode: a,
|
|
5491
5507
|
placeholder: d,
|
|
5492
5508
|
required: u,
|
|
5493
5509
|
style: ce(S.field),
|
|
5494
|
-
value:
|
|
5510
|
+
value: $[x],
|
|
5495
5511
|
onChange: W(x),
|
|
5496
5512
|
onKeyDown: Y(x),
|
|
5497
5513
|
onPaste: J(x)
|
|
@@ -5505,7 +5521,7 @@ const pi = /* @__PURE__ */ Te(({
|
|
|
5505
5521
|
autoCorrect: "off",
|
|
5506
5522
|
type: "text"
|
|
5507
5523
|
}
|
|
5508
|
-
),
|
|
5524
|
+
), ru = /* @__PURE__ */ Object.assign(pi, {
|
|
5509
5525
|
/**
|
|
5510
5526
|
* Component for the each field in a {@link CodeInput}.
|
|
5511
5527
|
*/
|
|
@@ -5557,7 +5573,7 @@ const hi = /* @__PURE__ */ Te(({
|
|
|
5557
5573
|
onChange: T,
|
|
5558
5574
|
..._
|
|
5559
5575
|
}, I) => {
|
|
5560
|
-
const
|
|
5576
|
+
const $ = he((A) => {
|
|
5561
5577
|
const S = (g?.(A) ?? A) || r;
|
|
5562
5578
|
T?.(S);
|
|
5563
5579
|
}, [T, g]);
|
|
@@ -5576,7 +5592,7 @@ const hi = /* @__PURE__ */ Te(({
|
|
|
5576
5592
|
type: u,
|
|
5577
5593
|
value: d || r,
|
|
5578
5594
|
onBlur: ({ target: A }) => b?.(A.value),
|
|
5579
|
-
onChange: ({ target: A }) =>
|
|
5595
|
+
onChange: ({ target: A }) => $(A.value),
|
|
5580
5596
|
onFocus: ({ target: A }) => m?.(A.value)
|
|
5581
5597
|
}
|
|
5582
5598
|
);
|
|
@@ -5600,18 +5616,18 @@ const gi = /* @__PURE__ */ Te(({
|
|
|
5600
5616
|
q(P);
|
|
5601
5617
|
}, I = (P) => {
|
|
5602
5618
|
const E = A(P);
|
|
5603
|
-
E !== u ? d?.(E) : q(
|
|
5604
|
-
},
|
|
5619
|
+
E !== u ? d?.(E) : q($(E));
|
|
5620
|
+
}, $ = (P) => P.toLocaleString(), A = (P) => {
|
|
5605
5621
|
const E = parseInt(P, 10);
|
|
5606
5622
|
return E.toString() !== P.replace(/^0+/, "") ? u : S(E);
|
|
5607
5623
|
}, S = (P) => {
|
|
5608
5624
|
let E = P;
|
|
5609
5625
|
return isNaN(c) || (E = Math.max(c, E)), isNaN(a) || (E = Math.min(a, E)), E;
|
|
5610
|
-
}, [
|
|
5626
|
+
}, [C, q] = Oe($(u)), W = Fa(u), Y = !isNaN(a) && u + 1 > a, J = !isNaN(c) && u - 1 < c;
|
|
5611
5627
|
Ee(() => {
|
|
5612
5628
|
if (W === void 0 || W === u) return;
|
|
5613
5629
|
const P = S(u);
|
|
5614
|
-
q(
|
|
5630
|
+
q($(P));
|
|
5615
5631
|
}, [u, c, a]);
|
|
5616
5632
|
const x = ze(e, {
|
|
5617
5633
|
textField: pn,
|
|
@@ -5620,7 +5636,7 @@ const gi = /* @__PURE__ */ Te(({
|
|
|
5620
5636
|
});
|
|
5621
5637
|
return /* @__PURE__ */ w.jsxs("div", { ...g, ref: m, style: ce(r, Zt.root), children: [
|
|
5622
5638
|
/* @__PURE__ */ w.jsx(
|
|
5623
|
-
|
|
5639
|
+
me,
|
|
5624
5640
|
{
|
|
5625
5641
|
className: se({ disabled: J }),
|
|
5626
5642
|
element: x.subscribeButton ?? /* @__PURE__ */ w.jsx(gn, {}),
|
|
@@ -5629,18 +5645,18 @@ const gi = /* @__PURE__ */ Te(({
|
|
|
5629
5645
|
}
|
|
5630
5646
|
),
|
|
5631
5647
|
/* @__PURE__ */ w.jsx(
|
|
5632
|
-
|
|
5648
|
+
me,
|
|
5633
5649
|
{
|
|
5634
5650
|
element: x.textField ?? /* @__PURE__ */ w.jsx(pn, {}),
|
|
5635
5651
|
isDisabled: !i,
|
|
5636
5652
|
style: ce(Zt.textField),
|
|
5637
|
-
value:
|
|
5653
|
+
value: C,
|
|
5638
5654
|
onChange: _,
|
|
5639
5655
|
onUnfocus: I
|
|
5640
5656
|
}
|
|
5641
5657
|
),
|
|
5642
5658
|
/* @__PURE__ */ w.jsx(
|
|
5643
|
-
|
|
5659
|
+
me,
|
|
5644
5660
|
{
|
|
5645
5661
|
className: se({ disabled: Y }),
|
|
5646
5662
|
element: x.addButton ?? /* @__PURE__ */ w.jsx(hn, {}),
|
|
@@ -5649,7 +5665,7 @@ const gi = /* @__PURE__ */ Te(({
|
|
|
5649
5665
|
}
|
|
5650
5666
|
)
|
|
5651
5667
|
] });
|
|
5652
|
-
}), pn = ({ ...e }) => /* @__PURE__ */ w.jsx(hi, { ...e }), hn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), gn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }),
|
|
5668
|
+
}), pn = ({ ...e }) => /* @__PURE__ */ w.jsx(hi, { ...e }), hn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), gn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), ou = /* @__PURE__ */ Object.assign(gi, {
|
|
5653
5669
|
/**
|
|
5654
5670
|
* Component for the text field in a {@link Counter}.
|
|
5655
5671
|
*/
|
|
@@ -5694,10 +5710,10 @@ const ic = /* @__PURE__ */ Te(({
|
|
|
5694
5710
|
const T = u * 2, _ = Math.max(0, Math.min(360, a)), I = ze(e, {
|
|
5695
5711
|
track: mn,
|
|
5696
5712
|
knob: vn
|
|
5697
|
-
}),
|
|
5698
|
-
return /* @__PURE__ */ w.jsxs("div", { ...m, ref: b, style: ce(r,
|
|
5699
|
-
/* @__PURE__ */ w.jsx("div", { style:
|
|
5700
|
-
|
|
5713
|
+
}), $ = cc({ angle: i, diameter: T });
|
|
5714
|
+
return /* @__PURE__ */ w.jsxs("div", { ...m, ref: b, style: ce(r, $.root), children: [
|
|
5715
|
+
/* @__PURE__ */ w.jsx("div", { style: $.trackContainer, children: /* @__PURE__ */ w.jsx("svg", { height: T, style: $.svgContainer, viewBox: `0 0 ${T} ${T}`, width: T, children: /* @__PURE__ */ w.jsx(
|
|
5716
|
+
me,
|
|
5701
5717
|
{
|
|
5702
5718
|
cx: u,
|
|
5703
5719
|
cy: u,
|
|
@@ -5708,8 +5724,8 @@ const ic = /* @__PURE__ */ Te(({
|
|
|
5708
5724
|
strokeWidth: g
|
|
5709
5725
|
}
|
|
5710
5726
|
) }) }),
|
|
5711
|
-
/* @__PURE__ */ w.jsx("div", { style: ce(
|
|
5712
|
-
|
|
5727
|
+
/* @__PURE__ */ w.jsx("div", { style: ce($.knobContainer), children: /* @__PURE__ */ w.jsx("svg", { style: $.svgContainer, viewBox: `0 0 ${T} ${T}`, xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ w.jsx(
|
|
5728
|
+
me,
|
|
5713
5729
|
{
|
|
5714
5730
|
d: ac(u, u, u - c / 2 - (g - c) / 2, -_ / 2, _ / 2),
|
|
5715
5731
|
element: I.knob ?? /* @__PURE__ */ w.jsx(vn, {}),
|
|
@@ -5800,10 +5816,10 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5800
5816
|
itemLength: T,
|
|
5801
5817
|
itemPadding: _ = 0,
|
|
5802
5818
|
items: I = [],
|
|
5803
|
-
maxVisibleItems:
|
|
5819
|
+
maxVisibleItems: $ = -1,
|
|
5804
5820
|
numSegments: A = 1,
|
|
5805
5821
|
orientation: S = "vertical",
|
|
5806
|
-
selection:
|
|
5822
|
+
selection: C = [],
|
|
5807
5823
|
selectionMode: q = "single",
|
|
5808
5824
|
onActivateAt: W,
|
|
5809
5825
|
onCollapse: Y,
|
|
@@ -5812,11 +5828,11 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5812
5828
|
onSelectAt: P,
|
|
5813
5829
|
onSelectionChange: E,
|
|
5814
5830
|
onToggleCustomEvent: M,
|
|
5815
|
-
ItemComponent:
|
|
5831
|
+
ItemComponent: B,
|
|
5816
5832
|
ToggleComponent: K,
|
|
5817
5833
|
...oe
|
|
5818
5834
|
}, Q) => {
|
|
5819
|
-
const X = we(null), D = nt(X), z = I.length, te = dc(I,
|
|
5835
|
+
const X = we(null), D = nt(X), z = I.length, te = dc(I, $, A, m), ne = T ?? (S === "vertical" ? D.height : D.width), ae = ne * te + _ * (te - 1), F = uc(C, I), [R, k] = Oe(u ?? !0), U = pc({ isCollapsed: R, collectionPadding: c, isInverted: d, maxVisibleItems: $, menuLength: ae, numItems: z, orientation: S }), Z = ze(e, {
|
|
5820
5836
|
collapseIcon: Tr,
|
|
5821
5837
|
collection: yn,
|
|
5822
5838
|
expandIcon: Or,
|
|
@@ -5826,7 +5842,7 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5826
5842
|
R && (k(!1), x?.());
|
|
5827
5843
|
}, fe = () => {
|
|
5828
5844
|
R || (k(!0), Y?.());
|
|
5829
|
-
},
|
|
5845
|
+
}, ge = () => {
|
|
5830
5846
|
R ? G() : fe();
|
|
5831
5847
|
}, ue = (Ne) => {
|
|
5832
5848
|
P?.(Ne), q === "single" && a && fe();
|
|
@@ -5836,16 +5852,16 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5836
5852
|
}, [u]), Ee(() => {
|
|
5837
5853
|
const Ne = (ee) => {
|
|
5838
5854
|
if (R || !(ee.target instanceof Node)) return;
|
|
5839
|
-
let
|
|
5840
|
-
for (;
|
|
5841
|
-
if (
|
|
5842
|
-
|
|
5855
|
+
let Be = !0, Ce = ee.target;
|
|
5856
|
+
for (; Ce; ) {
|
|
5857
|
+
if (Ce === X.current) {
|
|
5858
|
+
Be = !1;
|
|
5843
5859
|
break;
|
|
5844
5860
|
}
|
|
5845
|
-
if (
|
|
5846
|
-
|
|
5861
|
+
if (!Ce.parentNode) break;
|
|
5862
|
+
Ce = Ce.parentNode;
|
|
5847
5863
|
}
|
|
5848
|
-
|
|
5864
|
+
Be && fe();
|
|
5849
5865
|
};
|
|
5850
5866
|
return window.addEventListener("click", Ne), () => {
|
|
5851
5867
|
window.removeEventListener("click", Ne);
|
|
@@ -5865,22 +5881,22 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5865
5881
|
"aria-haspopup": "listbox",
|
|
5866
5882
|
className: se({ collapsed: R, expanded: !R }),
|
|
5867
5883
|
style: ce(U.toggle),
|
|
5868
|
-
onClick:
|
|
5884
|
+
onClick: ge,
|
|
5869
5885
|
onCustomEvent: (Ne, ee) => M?.(Ne, ee)
|
|
5870
5886
|
}
|
|
5871
5887
|
) : /* @__PURE__ */ w.jsxs(
|
|
5872
|
-
|
|
5888
|
+
me,
|
|
5873
5889
|
{
|
|
5874
5890
|
"aria-expanded": !R,
|
|
5875
5891
|
"aria-haspopup": "listbox",
|
|
5876
5892
|
className: se({ collapsed: R, expanded: !R }),
|
|
5877
5893
|
element: Z.toggle ?? /* @__PURE__ */ w.jsx(xn, {}),
|
|
5878
5894
|
style: ce(U.toggle),
|
|
5879
|
-
onClick:
|
|
5895
|
+
onClick: ge,
|
|
5880
5896
|
children: [
|
|
5881
|
-
/* @__PURE__ */ w.jsx("span", { dangerouslySetInnerHTML: { __html: g?.(
|
|
5897
|
+
/* @__PURE__ */ w.jsx("span", { dangerouslySetInnerHTML: { __html: g?.(F) ?? (F.length > 0 ? F.map((Ne) => I[Ne]).join(", ") : "") } }),
|
|
5882
5898
|
Z.expandIcon && /* @__PURE__ */ w.jsx(
|
|
5883
|
-
|
|
5899
|
+
me,
|
|
5884
5900
|
{
|
|
5885
5901
|
className: se({ collapsed: R, expanded: !R }),
|
|
5886
5902
|
element: R ? Z.collapseIcon ?? Z.expandIcon : Z.expandIcon,
|
|
@@ -5891,31 +5907,31 @@ const mi = /* @__PURE__ */ Te(({
|
|
|
5891
5907
|
}
|
|
5892
5908
|
),
|
|
5893
5909
|
/* @__PURE__ */ w.jsx(
|
|
5894
|
-
|
|
5910
|
+
me,
|
|
5895
5911
|
{
|
|
5896
5912
|
element: Z.collection ?? /* @__PURE__ */ w.jsx(yn, {}),
|
|
5897
5913
|
isSelectionTogglable: b,
|
|
5898
|
-
ItemComponent:
|
|
5914
|
+
ItemComponent: B,
|
|
5899
5915
|
itemLength: ne,
|
|
5900
5916
|
itemPadding: _,
|
|
5901
5917
|
items: I,
|
|
5902
5918
|
layout: m,
|
|
5903
5919
|
numSegments: A,
|
|
5904
5920
|
orientation: S,
|
|
5905
|
-
selection:
|
|
5921
|
+
selection: F,
|
|
5906
5922
|
selectionMode: q,
|
|
5907
5923
|
style: ce(U.collection),
|
|
5908
5924
|
onActivateAt: W,
|
|
5909
5925
|
onDeselectAt: J,
|
|
5910
5926
|
onSelectAt: ue,
|
|
5911
5927
|
onSelectionChange: E,
|
|
5912
|
-
children: !
|
|
5928
|
+
children: !B && (Z.item ?? /* @__PURE__ */ w.jsx(bn, {}))
|
|
5913
5929
|
}
|
|
5914
5930
|
)
|
|
5915
5931
|
] })
|
|
5916
5932
|
}
|
|
5917
5933
|
);
|
|
5918
|
-
}), yn = zn, bn = zn.Item, xn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Tr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), Or = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }),
|
|
5934
|
+
}), yn = zn, bn = zn.Item, xn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("button", { ...r, children: e }), Tr = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), Or = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("figure", { ...r, "aria-hidden": !0, children: e }), iu = /* @__PURE__ */ Object.assign(mi, {
|
|
5919
5935
|
/**
|
|
5920
5936
|
* Component containing the items in a {@link Dropdown}.
|
|
5921
5937
|
*/
|
|
@@ -6035,7 +6051,7 @@ function yi(e, r) {
|
|
|
6035
6051
|
}
|
|
6036
6052
|
return i;
|
|
6037
6053
|
}
|
|
6038
|
-
const
|
|
6054
|
+
const Ln = function(e) {
|
|
6039
6055
|
const r = mc.exec(e);
|
|
6040
6056
|
return !(r === null || typeof r > "u");
|
|
6041
6057
|
};
|
|
@@ -6054,11 +6070,11 @@ function bc(e, r) {
|
|
|
6054
6070
|
e[0] === "\uFEFF" && (e = e.substr(1));
|
|
6055
6071
|
for (let u = 0; u < e.length; u++)
|
|
6056
6072
|
if (e[u] === "<" && e[u + 1] === "?") {
|
|
6057
|
-
if (u += 2, u =
|
|
6073
|
+
if (u += 2, u = Co(e, u), u.err) return u;
|
|
6058
6074
|
} else if (e[u] === "<") {
|
|
6059
6075
|
let d = u;
|
|
6060
6076
|
if (u++, e[u] === "!") {
|
|
6061
|
-
u =
|
|
6077
|
+
u = $o(e, u);
|
|
6062
6078
|
continue;
|
|
6063
6079
|
} else {
|
|
6064
6080
|
let g = !1;
|
|
@@ -6078,7 +6094,7 @@ function bc(e, r) {
|
|
|
6078
6094
|
if (u = b.index, T[T.length - 1] === "/") {
|
|
6079
6095
|
const _ = u - T.length;
|
|
6080
6096
|
T = T.substring(0, T.length - 1);
|
|
6081
|
-
const I =
|
|
6097
|
+
const I = jo(T, r);
|
|
6082
6098
|
if (I === !0)
|
|
6083
6099
|
a = !0;
|
|
6084
6100
|
else
|
|
@@ -6103,7 +6119,7 @@ function bc(e, r) {
|
|
|
6103
6119
|
}
|
|
6104
6120
|
} else return ke("InvalidTag", "Closing tag '" + m + "' doesn't have proper closing.", Re(e, u));
|
|
6105
6121
|
else {
|
|
6106
|
-
const _ =
|
|
6122
|
+
const _ = jo(T, r);
|
|
6107
6123
|
if (_ !== !0)
|
|
6108
6124
|
return ke(_.err.code, _.err.msg, Re(e, u - T.length + _.err.line));
|
|
6109
6125
|
if (c === !0)
|
|
@@ -6113,10 +6129,10 @@ function bc(e, r) {
|
|
|
6113
6129
|
for (u++; u < e.length; u++)
|
|
6114
6130
|
if (e[u] === "<")
|
|
6115
6131
|
if (e[u + 1] === "!") {
|
|
6116
|
-
u++, u =
|
|
6132
|
+
u++, u = $o(e, u);
|
|
6117
6133
|
continue;
|
|
6118
6134
|
} else if (e[u + 1] === "?") {
|
|
6119
|
-
if (u =
|
|
6135
|
+
if (u = Co(e, ++u), u.err) return u;
|
|
6120
6136
|
} else
|
|
6121
6137
|
break;
|
|
6122
6138
|
else if (e[u] === "&") {
|
|
@@ -6145,7 +6161,7 @@ function ko(e) {
|
|
|
6145
6161
|
return e === " " || e === " " || e === `
|
|
6146
6162
|
` || e === "\r";
|
|
6147
6163
|
}
|
|
6148
|
-
function
|
|
6164
|
+
function Co(e, r) {
|
|
6149
6165
|
const i = r;
|
|
6150
6166
|
for (; r < e.length; r++)
|
|
6151
6167
|
if (e[r] == "?" || e[r] == " ") {
|
|
@@ -6160,7 +6176,7 @@ function $o(e, r) {
|
|
|
6160
6176
|
}
|
|
6161
6177
|
return r;
|
|
6162
6178
|
}
|
|
6163
|
-
function
|
|
6179
|
+
function $o(e, r) {
|
|
6164
6180
|
if (e.length > r + 5 && e[r + 1] === "-" && e[r + 2] === "-") {
|
|
6165
6181
|
for (r += 3; r < e.length; r++)
|
|
6166
6182
|
if (e[r] === "-" && e[r + 1] === "-" && e[r + 2] === ">") {
|
|
@@ -6202,7 +6218,7 @@ function Ec(e, r) {
|
|
|
6202
6218
|
};
|
|
6203
6219
|
}
|
|
6204
6220
|
const Nc = new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`, "g");
|
|
6205
|
-
function
|
|
6221
|
+
function jo(e, r) {
|
|
6206
6222
|
const i = yi(e, Nc), a = {};
|
|
6207
6223
|
for (let c = 0; c < i.length; c++) {
|
|
6208
6224
|
if (i[c][1].length === 0)
|
|
@@ -6256,10 +6272,10 @@ function ke(e, r, i) {
|
|
|
6256
6272
|
};
|
|
6257
6273
|
}
|
|
6258
6274
|
function Tc(e) {
|
|
6259
|
-
return
|
|
6275
|
+
return Ln(e);
|
|
6260
6276
|
}
|
|
6261
6277
|
function Oc(e) {
|
|
6262
|
-
return
|
|
6278
|
+
return Ln(e);
|
|
6263
6279
|
}
|
|
6264
6280
|
function Re(e, r) {
|
|
6265
6281
|
const i = e.substring(0, r).split(/\r?\n/);
|
|
@@ -6378,11 +6394,11 @@ class kc {
|
|
|
6378
6394
|
return { entities: a, i };
|
|
6379
6395
|
}
|
|
6380
6396
|
readEntityExp(r, i) {
|
|
6381
|
-
i =
|
|
6397
|
+
i = Fe(r, i);
|
|
6382
6398
|
let a = "";
|
|
6383
6399
|
for (; i < r.length && !/\s/.test(r[i]) && r[i] !== '"' && r[i] !== "'"; )
|
|
6384
6400
|
a += r[i], i++;
|
|
6385
|
-
if (Pt(a), i =
|
|
6401
|
+
if (Pt(a), i = Fe(r, i), !this.suppressValidationErr) {
|
|
6386
6402
|
if (r.substring(i, i + 6).toUpperCase() === "SYSTEM")
|
|
6387
6403
|
throw new Error("External entities are not supported");
|
|
6388
6404
|
if (r[i] === "%")
|
|
@@ -6392,18 +6408,18 @@ class kc {
|
|
|
6392
6408
|
return [i, c] = this.readIdentifierVal(r, i, "entity"), i--, [a, c, i];
|
|
6393
6409
|
}
|
|
6394
6410
|
readNotationExp(r, i) {
|
|
6395
|
-
i =
|
|
6411
|
+
i = Fe(r, i);
|
|
6396
6412
|
let a = "";
|
|
6397
6413
|
for (; i < r.length && !/\s/.test(r[i]); )
|
|
6398
6414
|
a += r[i], i++;
|
|
6399
|
-
!this.suppressValidationErr && Pt(a), i =
|
|
6415
|
+
!this.suppressValidationErr && Pt(a), i = Fe(r, i);
|
|
6400
6416
|
const c = r.substring(i, i + 6).toUpperCase();
|
|
6401
6417
|
if (!this.suppressValidationErr && c !== "SYSTEM" && c !== "PUBLIC")
|
|
6402
6418
|
throw new Error(`Expected SYSTEM or PUBLIC, found "${c}"`);
|
|
6403
|
-
i += c.length, i =
|
|
6419
|
+
i += c.length, i = Fe(r, i);
|
|
6404
6420
|
let u = null, d = null;
|
|
6405
6421
|
if (c === "PUBLIC")
|
|
6406
|
-
[i, u] = this.readIdentifierVal(r, i, "publicIdentifier"), i =
|
|
6422
|
+
[i, u] = this.readIdentifierVal(r, i, "publicIdentifier"), i = Fe(r, i), (r[i] === '"' || r[i] === "'") && ([i, d] = this.readIdentifierVal(r, i, "systemIdentifier"));
|
|
6407
6423
|
else if (c === "SYSTEM" && ([i, d] = this.readIdentifierVal(r, i, "systemIdentifier"), !this.suppressValidationErr && !d))
|
|
6408
6424
|
throw new Error("Missing mandatory system identifier for SYSTEM notation");
|
|
6409
6425
|
return { notationName: a, publicIdentifier: u, systemIdentifier: d, index: --i };
|
|
@@ -6420,13 +6436,13 @@ class kc {
|
|
|
6420
6436
|
return i++, [i, c];
|
|
6421
6437
|
}
|
|
6422
6438
|
readElementExp(r, i) {
|
|
6423
|
-
i =
|
|
6439
|
+
i = Fe(r, i);
|
|
6424
6440
|
let a = "";
|
|
6425
6441
|
for (; i < r.length && !/\s/.test(r[i]); )
|
|
6426
6442
|
a += r[i], i++;
|
|
6427
|
-
if (!this.suppressValidationErr && !
|
|
6443
|
+
if (!this.suppressValidationErr && !Ln(a))
|
|
6428
6444
|
throw new Error(`Invalid element name: "${a}"`);
|
|
6429
|
-
i =
|
|
6445
|
+
i = Fe(r, i);
|
|
6430
6446
|
let c = "";
|
|
6431
6447
|
if (r[i] === "E" && st(r, "MPTY", i)) i += 4;
|
|
6432
6448
|
else if (r[i] === "A" && st(r, "NY", i)) i += 2;
|
|
@@ -6444,20 +6460,20 @@ class kc {
|
|
|
6444
6460
|
};
|
|
6445
6461
|
}
|
|
6446
6462
|
readAttlistExp(r, i) {
|
|
6447
|
-
i =
|
|
6463
|
+
i = Fe(r, i);
|
|
6448
6464
|
let a = "";
|
|
6449
6465
|
for (; i < r.length && !/\s/.test(r[i]); )
|
|
6450
6466
|
a += r[i], i++;
|
|
6451
|
-
Pt(a), i =
|
|
6467
|
+
Pt(a), i = Fe(r, i);
|
|
6452
6468
|
let c = "";
|
|
6453
6469
|
for (; i < r.length && !/\s/.test(r[i]); )
|
|
6454
6470
|
c += r[i], i++;
|
|
6455
6471
|
if (!Pt(c))
|
|
6456
6472
|
throw new Error(`Invalid attribute name: "${c}"`);
|
|
6457
|
-
i =
|
|
6473
|
+
i = Fe(r, i);
|
|
6458
6474
|
let u = "";
|
|
6459
6475
|
if (r.substring(i, i + 8).toUpperCase() === "NOTATION") {
|
|
6460
|
-
if (u = "NOTATION", i += 8, i =
|
|
6476
|
+
if (u = "NOTATION", i += 8, i = Fe(r, i), r[i] !== "(")
|
|
6461
6477
|
throw new Error(`Expected '(', found "${r[i]}"`);
|
|
6462
6478
|
i++;
|
|
6463
6479
|
let g = [];
|
|
@@ -6467,7 +6483,7 @@ class kc {
|
|
|
6467
6483
|
m += r[i], i++;
|
|
6468
6484
|
if (m = m.trim(), !Pt(m))
|
|
6469
6485
|
throw new Error(`Invalid notation name: "${m}"`);
|
|
6470
|
-
g.push(m), r[i] === "|" && (i++, i =
|
|
6486
|
+
g.push(m), r[i] === "|" && (i++, i = Fe(r, i));
|
|
6471
6487
|
}
|
|
6472
6488
|
if (r[i] !== ")")
|
|
6473
6489
|
throw new Error("Unterminated list of notations");
|
|
@@ -6479,7 +6495,7 @@ class kc {
|
|
|
6479
6495
|
if (!this.suppressValidationErr && !g.includes(u.toUpperCase()))
|
|
6480
6496
|
throw new Error(`Invalid attribute type: "${u}"`);
|
|
6481
6497
|
}
|
|
6482
|
-
i =
|
|
6498
|
+
i = Fe(r, i);
|
|
6483
6499
|
let d = "";
|
|
6484
6500
|
return r.substring(i, i + 8).toUpperCase() === "#REQUIRED" ? (d = "#REQUIRED", i += 8) : r.substring(i, i + 7).toUpperCase() === "#IMPLIED" ? (d = "#IMPLIED", i += 7) : [i, d] = this.readIdentifierVal(r, i, "ATTLIST"), {
|
|
6485
6501
|
elementName: a,
|
|
@@ -6490,7 +6506,7 @@ class kc {
|
|
|
6490
6506
|
};
|
|
6491
6507
|
}
|
|
6492
6508
|
}
|
|
6493
|
-
const
|
|
6509
|
+
const Fe = (e, r) => {
|
|
6494
6510
|
for (; r < e.length && /\s/.test(e[r]); )
|
|
6495
6511
|
r++;
|
|
6496
6512
|
return r;
|
|
@@ -6501,11 +6517,11 @@ function st(e, r, i) {
|
|
|
6501
6517
|
return !0;
|
|
6502
6518
|
}
|
|
6503
6519
|
function Pt(e) {
|
|
6504
|
-
if (
|
|
6520
|
+
if (Ln(e))
|
|
6505
6521
|
return e;
|
|
6506
6522
|
throw new Error(`Invalid entity name ${e}`);
|
|
6507
6523
|
}
|
|
6508
|
-
const
|
|
6524
|
+
const Cc = /^[-+]?0x[a-fA-F0-9]+$/, $c = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, jc = {
|
|
6509
6525
|
hex: !0,
|
|
6510
6526
|
// oct: false,
|
|
6511
6527
|
leadingZeros: !0,
|
|
@@ -6514,16 +6530,16 @@ const $c = /^[-+]?0x[a-fA-F0-9]+$/, jc = /^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/, C
|
|
|
6514
6530
|
//skipLike: /regex/
|
|
6515
6531
|
};
|
|
6516
6532
|
function Ac(e, r = {}) {
|
|
6517
|
-
if (r = Object.assign({},
|
|
6533
|
+
if (r = Object.assign({}, jc, r), !e || typeof e != "string") return e;
|
|
6518
6534
|
let i = e.trim();
|
|
6519
6535
|
if (r.skipLike !== void 0 && r.skipLike.test(i)) return e;
|
|
6520
6536
|
if (e === "0") return 0;
|
|
6521
|
-
if (r.hex &&
|
|
6522
|
-
return
|
|
6537
|
+
if (r.hex && Cc.test(i))
|
|
6538
|
+
return Lc(i, 16);
|
|
6523
6539
|
if (i.search(/.+[eE].+/) !== -1)
|
|
6524
6540
|
return Rc(e, i, r);
|
|
6525
6541
|
{
|
|
6526
|
-
const a =
|
|
6542
|
+
const a = $c.exec(i);
|
|
6527
6543
|
if (a) {
|
|
6528
6544
|
const c = a[1] || "", u = a[2];
|
|
6529
6545
|
let d = zc(a[3]);
|
|
@@ -6564,7 +6580,7 @@ function Rc(e, r, i) {
|
|
|
6564
6580
|
function zc(e) {
|
|
6565
6581
|
return e && e.indexOf(".") !== -1 && (e = e.replace(/0+$/, ""), e === "." ? e = "0" : e[0] === "." ? e = "0" + e : e[e.length - 1] === "." && (e = e.substring(0, e.length - 1))), e;
|
|
6566
6582
|
}
|
|
6567
|
-
function
|
|
6583
|
+
function Lc(e, r) {
|
|
6568
6584
|
if (parseInt) return parseInt(e, r);
|
|
6569
6585
|
if (Number.parseInt) return Number.parseInt(e, r);
|
|
6570
6586
|
if (window && window.parseInt) return window.parseInt(e, r);
|
|
@@ -6577,7 +6593,7 @@ function bi(e) {
|
|
|
6577
6593
|
return !0;
|
|
6578
6594
|
} : () => !1;
|
|
6579
6595
|
}
|
|
6580
|
-
class
|
|
6596
|
+
class Fc {
|
|
6581
6597
|
constructor(r) {
|
|
6582
6598
|
if (this.options = r, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
6583
6599
|
apos: { regex: /&(apos|#39|#x27);/g, val: "'" },
|
|
@@ -6600,7 +6616,7 @@ class Lc {
|
|
|
6600
6616
|
inr: { regex: /&(inr|#8377);/g, val: "₹" },
|
|
6601
6617
|
num_dec: { regex: /&#([0-9]{1,7});/g, val: (i, a) => String.fromCodePoint(Number.parseInt(a, 10)) },
|
|
6602
6618
|
num_hex: { regex: /&#x([0-9a-fA-F]{1,6});/g, val: (i, a) => String.fromCodePoint(Number.parseInt(a, 16)) }
|
|
6603
|
-
}, this.addExternalEntities = Vc, this.parseXml = Xc, this.parseTextData = Dc, this.resolveNameSpace =
|
|
6619
|
+
}, this.addExternalEntities = Vc, this.parseXml = Xc, this.parseTextData = Dc, this.resolveNameSpace = Bc, this.buildAttributesMap = Yc, this.isItStopNode = qc, this.replaceEntitiesValue = Kc, this.readStopNodeData = Jc, this.saveTextToParentTag = Gc, this.addChild = Uc, this.ignoreAttributesFn = bi(this.options.ignoreAttributes), this.options.stopNodes && this.options.stopNodes.length > 0) {
|
|
6604
6620
|
this.stopNodesExact = /* @__PURE__ */ new Set(), this.stopNodesWildcard = /* @__PURE__ */ new Set();
|
|
6605
6621
|
for (let i = 0; i < this.options.stopNodes.length; i++) {
|
|
6606
6622
|
const a = this.options.stopNodes[i];
|
|
@@ -6626,7 +6642,7 @@ function Dc(e, r, i, a, c, u, d) {
|
|
|
6626
6642
|
return g == null ? e : typeof g != typeof e || g !== e ? g : this.options.trimValues ? hr(e, this.options.parseTagValue, this.options.numberParseOptions) : e.trim() === e ? hr(e, this.options.parseTagValue, this.options.numberParseOptions) : e;
|
|
6627
6643
|
}
|
|
6628
6644
|
}
|
|
6629
|
-
function
|
|
6645
|
+
function Bc(e) {
|
|
6630
6646
|
if (this.options.removeNSPrefix) {
|
|
6631
6647
|
const r = e.split(":"), i = e.charAt(0) === "/" ? "/" : "";
|
|
6632
6648
|
if (r[0] === "xmlns")
|
|
@@ -6635,10 +6651,10 @@ function Hc(e) {
|
|
|
6635
6651
|
}
|
|
6636
6652
|
return e;
|
|
6637
6653
|
}
|
|
6638
|
-
const
|
|
6654
|
+
const Hc = new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`, "gm");
|
|
6639
6655
|
function Yc(e, r, i) {
|
|
6640
6656
|
if (this.options.ignoreAttributes !== !0 && typeof e == "string") {
|
|
6641
|
-
const a = yi(e,
|
|
6657
|
+
const a = yi(e, Hc), c = a.length, u = {};
|
|
6642
6658
|
for (let d = 0; d < c; d++) {
|
|
6643
6659
|
const g = this.resolveNameSpace(a[d][1]);
|
|
6644
6660
|
if (this.ignoreAttributesFn(g, r))
|
|
@@ -6711,34 +6727,34 @@ const Xc = function(e) {
|
|
|
6711
6727
|
} else {
|
|
6712
6728
|
let m = pr(e, d, this.options.removeNSPrefix), b = m.tagName;
|
|
6713
6729
|
const T = m.rawTagName;
|
|
6714
|
-
let _ = m.tagExp, I = m.attrExpPresent,
|
|
6730
|
+
let _ = m.tagExp, I = m.attrExpPresent, $ = m.closeIndex;
|
|
6715
6731
|
this.options.transformTagName && (b = this.options.transformTagName(b)), i && a && i.tagname !== "!xml" && (a = this.saveTextToParentTag(a, i, c, !1));
|
|
6716
6732
|
const A = i;
|
|
6717
6733
|
A && this.options.unpairedTags.indexOf(A.tagname) !== -1 && (i = this.tagsNodeStack.pop(), c = c.substring(0, c.lastIndexOf("."))), b !== r.tagname && (c += c ? "." + b : b);
|
|
6718
6734
|
const S = d;
|
|
6719
6735
|
if (this.isItStopNode(this.stopNodesExact, this.stopNodesWildcard, c, b)) {
|
|
6720
|
-
let
|
|
6736
|
+
let C = "";
|
|
6721
6737
|
if (_.length > 0 && _.lastIndexOf("/") === _.length - 1)
|
|
6722
6738
|
b[b.length - 1] === "/" ? (b = b.substr(0, b.length - 1), c = c.substr(0, c.length - 1), _ = b) : _ = _.substr(0, _.length - 1), d = m.closeIndex;
|
|
6723
6739
|
else if (this.options.unpairedTags.indexOf(b) !== -1)
|
|
6724
6740
|
d = m.closeIndex;
|
|
6725
6741
|
else {
|
|
6726
|
-
const W = this.readStopNodeData(e, T,
|
|
6742
|
+
const W = this.readStopNodeData(e, T, $ + 1);
|
|
6727
6743
|
if (!W) throw new Error(`Unexpected end of ${T}`);
|
|
6728
|
-
d = W.i,
|
|
6744
|
+
d = W.i, C = W.tagContent;
|
|
6729
6745
|
}
|
|
6730
6746
|
const q = new ct(b);
|
|
6731
|
-
b !== _ && I && (q[":@"] = this.buildAttributesMap(_, c, b)),
|
|
6747
|
+
b !== _ && I && (q[":@"] = this.buildAttributesMap(_, c, b)), C && (C = this.parseTextData(C, b, c, !0, I, !0, !0)), c = c.substr(0, c.lastIndexOf(".")), q.add(this.options.textNodeName, C), this.addChild(i, q, c, S);
|
|
6732
6748
|
} else {
|
|
6733
6749
|
if (_.length > 0 && _.lastIndexOf("/") === _.length - 1) {
|
|
6734
6750
|
b[b.length - 1] === "/" ? (b = b.substr(0, b.length - 1), c = c.substr(0, c.length - 1), _ = b) : _ = _.substr(0, _.length - 1), this.options.transformTagName && (b = this.options.transformTagName(b));
|
|
6735
|
-
const
|
|
6736
|
-
b !== _ && I && (
|
|
6751
|
+
const C = new ct(b);
|
|
6752
|
+
b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c, b)), this.addChild(i, C, c, S), c = c.substr(0, c.lastIndexOf("."));
|
|
6737
6753
|
} else {
|
|
6738
|
-
const
|
|
6739
|
-
this.tagsNodeStack.push(i), b !== _ && I && (
|
|
6754
|
+
const C = new ct(b);
|
|
6755
|
+
this.tagsNodeStack.push(i), b !== _ && I && (C[":@"] = this.buildAttributesMap(_, c, b)), this.addChild(i, C, c, S), i = C;
|
|
6740
6756
|
}
|
|
6741
|
-
a = "", d =
|
|
6757
|
+
a = "", d = $;
|
|
6742
6758
|
}
|
|
6743
6759
|
}
|
|
6744
6760
|
else
|
|
@@ -6927,7 +6943,7 @@ class nl {
|
|
|
6927
6943
|
if (u !== !0)
|
|
6928
6944
|
throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`);
|
|
6929
6945
|
}
|
|
6930
|
-
const a = new
|
|
6946
|
+
const a = new Fc(this.options);
|
|
6931
6947
|
a.addExternalEntities(this.externalEntities);
|
|
6932
6948
|
const c = a.parseXml(r);
|
|
6933
6949
|
return this.options.preserveOrder || c === void 0 ? c : Zc(c, this.options);
|
|
@@ -6984,14 +7000,14 @@ function wi(e, r, i, a) {
|
|
|
6984
7000
|
continue;
|
|
6985
7001
|
} else if (m[0] === "?") {
|
|
6986
7002
|
const A = Ao(g[":@"], r), S = m === "?xml" ? "" : a;
|
|
6987
|
-
let
|
|
6988
|
-
|
|
7003
|
+
let C = g[m][0][r.textNodeName];
|
|
7004
|
+
C = C.length !== 0 ? " " + C : "", c += S + `<${m}${C}${A}?>`, u = !0;
|
|
6989
7005
|
continue;
|
|
6990
7006
|
}
|
|
6991
7007
|
let T = a;
|
|
6992
7008
|
T !== "" && (T += r.indentBy);
|
|
6993
|
-
const _ = Ao(g[":@"], r), I = a + `<${m}${_}`,
|
|
6994
|
-
r.unpairedTags.indexOf(m) !== -1 ? r.suppressUnpairedNode ? c += I + ">" : c += I + "/>" : (
|
|
7009
|
+
const _ = Ao(g[":@"], r), I = a + `<${m}${_}`, $ = wi(g[m], r, b, T);
|
|
7010
|
+
r.unpairedTags.indexOf(m) !== -1 ? r.suppressUnpairedNode ? c += I + ">" : c += I + "/>" : (!$ || $.length === 0) && r.suppressEmptyNode ? c += I + "/>" : $ && $.endsWith(">") ? c += I + `>${$}${a}</${m}>` : (c += I + ">", $ && a !== "" && ($.includes("/>") || $.includes("</")) ? c += a + r.indentBy + $ + a : c += $, c += `</${m}>`), u = !0;
|
|
6995
7011
|
}
|
|
6996
7012
|
return c;
|
|
6997
7013
|
}
|
|
@@ -7179,7 +7195,7 @@ const fl = /* @__PURE__ */ Te(({
|
|
|
7179
7195
|
shouldStripStyles: u = !0,
|
|
7180
7196
|
...d
|
|
7181
7197
|
}, g) => {
|
|
7182
|
-
const b = ["id"].map((A) => `@_${A}`), T = ["class"].map((A) => `@_${A}`), _ = ["fill", "stroke", "style"].map((A) => `@_${A}`), I = ["x", "y"].map((A) => `@_${A}`),
|
|
7198
|
+
const b = ["id"].map((A) => `@_${A}`), T = ["class"].map((A) => `@_${A}`), _ = ["fill", "stroke", "style"].map((A) => `@_${A}`), I = ["x", "y"].map((A) => `@_${A}`), $ = () => {
|
|
7183
7199
|
const A = new nl({
|
|
7184
7200
|
attributeNamePrefix: "@_",
|
|
7185
7201
|
ignoreAttributes: !1,
|
|
@@ -7210,15 +7226,15 @@ const fl = /* @__PURE__ */ Te(({
|
|
|
7210
7226
|
attributeNamePrefix: "@_",
|
|
7211
7227
|
format: !1,
|
|
7212
7228
|
ignoreAttributes: !1
|
|
7213
|
-
}),
|
|
7214
|
-
return S.build(
|
|
7229
|
+
}), C = A.parse(r);
|
|
7230
|
+
return S.build(C);
|
|
7215
7231
|
};
|
|
7216
7232
|
return /* @__PURE__ */ w.jsx(
|
|
7217
7233
|
"figure",
|
|
7218
7234
|
{
|
|
7219
7235
|
...d,
|
|
7220
7236
|
ref: g,
|
|
7221
|
-
dangerouslySetInnerHTML: { __html:
|
|
7237
|
+
dangerouslySetInnerHTML: { __html: $() },
|
|
7222
7238
|
role: "img"
|
|
7223
7239
|
}
|
|
7224
7240
|
);
|
|
@@ -7249,10 +7265,10 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
|
|
|
7249
7265
|
verticalSpacing: g = 0,
|
|
7250
7266
|
...m
|
|
7251
7267
|
}, b) => {
|
|
7252
|
-
const T = we(null), [_, I] = Oe(NaN), [
|
|
7253
|
-
const
|
|
7254
|
-
if (!
|
|
7255
|
-
const K =
|
|
7268
|
+
const T = we(null), [_, I] = Oe(NaN), [$, A] = Oe(NaN), [S, C] = Oe(NaN), [q, W] = Oe(NaN), Y = () => be.from(T.current)?.width ?? 0, J = () => be.from(T.current)?.height ?? 0, x = () => {
|
|
7269
|
+
const B = T.current;
|
|
7270
|
+
if (!B) return;
|
|
7271
|
+
const K = B.children, oe = d;
|
|
7256
7272
|
if (oe <= 0) {
|
|
7257
7273
|
console.error("[etudes::MasonryGrid] You must specify a minimum of 1 section(s) (a.k.a. row(s) for horizontal orientation, column(s) for vertical orientation) for a MasonryGrid instance");
|
|
7258
7274
|
return;
|
|
@@ -7263,16 +7279,16 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
|
|
|
7263
7279
|
if (!(z instanceof HTMLElement)) continue;
|
|
7264
7280
|
const te = zo(z, d), [ne, ae] = Ro(Q, te);
|
|
7265
7281
|
z.role = "gridcell", z.style.position = "absolute", z.style.width = `calc(${100 / oe * te}% - ${a * (oe - 1) / oe * te}px + ${a * (te - 1)}px)`, z.style.height = "", z.style.left = `calc(${100 / oe * ne}% - ${a * (oe - 1) / oe * ne}px + ${a * ne}px)`, z.style.top = `${ae + (ae === 0 ? 0 : g)}px`;
|
|
7266
|
-
for (let
|
|
7267
|
-
Q[ne +
|
|
7282
|
+
for (let F = 0; F < te; F++)
|
|
7283
|
+
Q[ne + F] = ae + (ae === 0 ? 0 : g) + (be.from(z)?.height ?? 0);
|
|
7268
7284
|
if (e && ne + te === oe) {
|
|
7269
|
-
const
|
|
7285
|
+
const F = kt(Q);
|
|
7270
7286
|
for (let R = 0; R < oe; R++)
|
|
7271
|
-
Q[R] =
|
|
7287
|
+
Q[R] = F;
|
|
7272
7288
|
}
|
|
7273
7289
|
}
|
|
7274
7290
|
const X = Y(), D = kt(Q, oe);
|
|
7275
|
-
if (I(X), A(D), isNaN(D) || (
|
|
7291
|
+
if (I(X), A(D), isNaN(D) || (B.style.height = `${D}px`), c)
|
|
7276
7292
|
for (const z of Array.from(K))
|
|
7277
7293
|
z instanceof HTMLElement && (z.style.left = `calc(${X}px - ${z.style.left} - ${z.getBoundingClientRect().width}px)`);
|
|
7278
7294
|
} else {
|
|
@@ -7281,35 +7297,35 @@ const Mo = "base-", pl = /* @__PURE__ */ Te(({
|
|
|
7281
7297
|
if (!(z instanceof HTMLElement)) continue;
|
|
7282
7298
|
const te = zo(z, d), [ne, ae] = Ro(Q, te);
|
|
7283
7299
|
z.style.position = "absolute", z.style.width = "", z.style.height = `calc(${100 / oe * te}% - ${g * (oe - 1) / oe * te}px + ${g * (te - 1)}px)`, z.style.top = `calc(${100 / oe * ne}% - ${g * (oe - 1) / oe * ne}px + ${g * ne}px)`, z.style.left = `${ae + (ae === 0 ? 0 : a)}px`;
|
|
7284
|
-
for (let
|
|
7285
|
-
Q[ne +
|
|
7300
|
+
for (let F = 0; F < te; F++)
|
|
7301
|
+
Q[ne + F] = ae + (ae === 0 ? 0 : a) + (be.from(z)?.width ?? 0);
|
|
7286
7302
|
if (e && ne + te === oe) {
|
|
7287
|
-
const
|
|
7303
|
+
const F = kt(Q);
|
|
7288
7304
|
for (let R = 0; R < oe; R++)
|
|
7289
|
-
Q[R] =
|
|
7305
|
+
Q[R] = F;
|
|
7290
7306
|
}
|
|
7291
7307
|
}
|
|
7292
7308
|
const X = J(), D = kt(Q, oe);
|
|
7293
|
-
if (A(X), I(D), isNaN(D) || (
|
|
7309
|
+
if (A(X), I(D), isNaN(D) || (B.style.width = `${D}px`), c)
|
|
7294
7310
|
for (const z of Array.from(K))
|
|
7295
7311
|
z instanceof HTMLElement && (z.style.top = `calc(${X}px - ${z.style.top} - ${z.getBoundingClientRect().height}px)`);
|
|
7296
7312
|
}
|
|
7297
|
-
}, P =
|
|
7298
|
-
const K = be.size(be.from(
|
|
7299
|
-
(_ !== oe ||
|
|
7313
|
+
}, P = he((B) => {
|
|
7314
|
+
const K = be.size(be.from(B) ?? be.zero), oe = Y(), Q = J();
|
|
7315
|
+
(_ !== oe || $ !== Q || K.width !== S || K.height !== q) && (x(), C(K.width), W(K.height));
|
|
7300
7316
|
}, [e, a, c, d, g, u]);
|
|
7301
7317
|
mr(T, {
|
|
7302
7318
|
onResize: P
|
|
7303
7319
|
}), Ee(() => {
|
|
7304
|
-
const
|
|
7305
|
-
if (
|
|
7306
|
-
const K =
|
|
7320
|
+
const B = ml(T.current?.innerHTML);
|
|
7321
|
+
if (B.length === 0) return x();
|
|
7322
|
+
const K = B.length;
|
|
7307
7323
|
for (let oe = 0; oe < K; oe++) {
|
|
7308
|
-
const Q =
|
|
7324
|
+
const Q = B[oe], X = new Image();
|
|
7309
7325
|
X.src = Q, X.onload = () => x();
|
|
7310
7326
|
}
|
|
7311
7327
|
}, [r]);
|
|
7312
|
-
const E = hl({ orientation: u }), M = gl({ orientation: u, minHeight:
|
|
7328
|
+
const E = hl({ orientation: u }), M = gl({ orientation: u, minHeight: $, minWidth: _ });
|
|
7313
7329
|
return /* @__PURE__ */ w.jsx(
|
|
7314
7330
|
"div",
|
|
7315
7331
|
{
|
|
@@ -7386,24 +7402,24 @@ const Ni = /* @__PURE__ */ Te(({
|
|
|
7386
7402
|
range: T,
|
|
7387
7403
|
steps: _ = -1,
|
|
7388
7404
|
onChange: I,
|
|
7389
|
-
|
|
7405
|
+
...$
|
|
7390
7406
|
}, A) => {
|
|
7391
|
-
const S = we(null),
|
|
7407
|
+
const S = we(null), C = nt(S), q = we(null), W = we(null), [Y, J] = Oe(T ?? [m, g]), x = Nl(m, g, _), [P, E] = Y.map((U) => at(U, m, g, b, C, d, c, a)), M = E - P, B = ze(e, {
|
|
7392
7408
|
gutter: En,
|
|
7393
7409
|
highlight: Nn,
|
|
7394
|
-
knob:
|
|
7410
|
+
knob: jt,
|
|
7395
7411
|
knobContainer: tn,
|
|
7396
|
-
label:
|
|
7397
|
-
}), K =
|
|
7398
|
-
const fe = b === "horizontal" ? Z : G,
|
|
7399
|
-
return
|
|
7400
|
-
}, [d, c, a, m, g, b, Y[1], be.toString(
|
|
7401
|
-
const fe = b === "horizontal" ? Z : G,
|
|
7402
|
-
return
|
|
7403
|
-
}, [d, c, a, m, g, b, Y[0], be.toString(
|
|
7412
|
+
label: $t
|
|
7413
|
+
}), K = he((U, Z, G) => {
|
|
7414
|
+
const fe = b === "horizontal" ? Z : G, ge = at(m, m, g, b, C, d, c, a), ue = at(Y[1], m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
|
|
7415
|
+
return Lo(Math.max(ge, Math.min(ue, Ne)), m, g, b, C, d, c, a);
|
|
7416
|
+
}, [d, c, a, m, g, b, Y[1], be.toString(C)]), oe = he((U, Z, G) => {
|
|
7417
|
+
const fe = b === "horizontal" ? Z : G, ge = at(Y[0], m, g, b, C, d, c, a), ue = at(g, m, g, b, C, d, c, a), Ne = at(U, m, g, b, C, d, c, a) + fe;
|
|
7418
|
+
return Lo(Math.max(ge, Math.min(ue, Ne)), m, g, b, C, d, c, a);
|
|
7419
|
+
}, [d, c, a, m, g, b, Y[0], be.toString(C)]), { isDragging: Q, isReleasing: X, value: D, setValue: z } = zt(q, {
|
|
7404
7420
|
initialValue: T?.[0] ?? m,
|
|
7405
7421
|
transform: K
|
|
7406
|
-
}), { isDragging: te, isReleasing: ne, value: ae, setValue:
|
|
7422
|
+
}), { isDragging: te, isReleasing: ne, value: ae, setValue: F } = zt(W, {
|
|
7407
7423
|
initialValue: T?.[1] ?? g,
|
|
7408
7424
|
transform: oe
|
|
7409
7425
|
}), R = vl({ isDraggingEndKnob: te, isDraggingStartKnob: Q, isReleasingEndKnob: ne, isReleasingStartKnob: X }), k = yl({ orientation: b, highlightLength: M, start: P, knobPadding: u, knobWidth: d, knobHeight: c });
|
|
@@ -7412,71 +7428,71 @@ const Ni = /* @__PURE__ */ Te(({
|
|
|
7412
7428
|
}, [D, ae]), Ee(() => {
|
|
7413
7429
|
I?.(Y);
|
|
7414
7430
|
}, [Y[0], Y[1]]), Ee(() => {
|
|
7415
|
-
Q || te || ne || qe(T, Y) || (J(T ?? [m, g]), z(T?.[0] ?? m),
|
|
7431
|
+
Q || te || ne || qe(T, Y) || (J(T ?? [m, g]), z(T?.[0] ?? m), F(T?.[1] ?? g));
|
|
7416
7432
|
}, [T?.[0], T?.[1], Q, te, ne]), Ee(() => {
|
|
7417
|
-
x && z(
|
|
7433
|
+
x && z(Fo(D, x));
|
|
7418
7434
|
}, [X, We(x)]), Ee(() => {
|
|
7419
|
-
!x || !ne ||
|
|
7435
|
+
!x || !ne || F(Fo(ae, x));
|
|
7420
7436
|
}, [ne, We(x)]), /* @__PURE__ */ w.jsx(
|
|
7421
7437
|
"div",
|
|
7422
7438
|
{
|
|
7423
|
-
|
|
7439
|
+
...$,
|
|
7424
7440
|
ref: A,
|
|
7425
7441
|
"aria-valuemax": g,
|
|
7426
7442
|
"aria-valuemin": m,
|
|
7427
7443
|
className: se(r, b),
|
|
7428
7444
|
role: "slider",
|
|
7429
7445
|
children: /* @__PURE__ */ w.jsxs("div", { ref: S, style: k.body, children: [
|
|
7430
|
-
/* @__PURE__ */ w.jsx(
|
|
7431
|
-
/* @__PURE__ */ w.jsx(
|
|
7446
|
+
/* @__PURE__ */ w.jsx(me, { element: B.gutter ?? /* @__PURE__ */ w.jsx(En, {}), style: ce(k.gutter) }),
|
|
7447
|
+
/* @__PURE__ */ w.jsx(me, { element: B.highlight ?? /* @__PURE__ */ w.jsx(Nn, {}), style: ce(k.highlight) }),
|
|
7432
7448
|
/* @__PURE__ */ w.jsx(
|
|
7433
|
-
|
|
7449
|
+
me,
|
|
7434
7450
|
{
|
|
7435
7451
|
ref: q,
|
|
7436
7452
|
className: R.startKnobContainer,
|
|
7437
7453
|
disabled: qe([D, ae], [m, m]),
|
|
7438
|
-
element:
|
|
7454
|
+
element: B.knobContainer ?? /* @__PURE__ */ w.jsx(tn, {}),
|
|
7439
7455
|
style: ce(k.knobContainer, {
|
|
7440
7456
|
pointerEvents: qe([D, ae], [m, m]) ? "none" : "auto"
|
|
7441
7457
|
}, b === "horizontal" ? {
|
|
7442
7458
|
left: `${P}px`,
|
|
7443
|
-
top: `${
|
|
7459
|
+
top: `${C.height * 0.5}px`
|
|
7444
7460
|
} : {
|
|
7445
|
-
left: `${
|
|
7461
|
+
left: `${C.width * 0.5}px`,
|
|
7446
7462
|
top: `${P}px`
|
|
7447
7463
|
}),
|
|
7448
|
-
children: /* @__PURE__ */ w.jsxs(
|
|
7464
|
+
children: /* @__PURE__ */ w.jsxs(me, { className: R.startKnob, element: B.knob ?? /* @__PURE__ */ w.jsx(jt, {}), style: ce(k.knob), children: [
|
|
7449
7465
|
/* @__PURE__ */ w.jsx("div", { style: k.knobHitBox }),
|
|
7450
|
-
|
|
7466
|
+
B.label && /* @__PURE__ */ w.jsx(me, { className: R.startLabel, element: B.label ?? /* @__PURE__ */ w.jsx($t, {}), style: ce(k.label), children: Number(D.toFixed(i)).toLocaleString() })
|
|
7451
7467
|
] })
|
|
7452
7468
|
}
|
|
7453
7469
|
),
|
|
7454
7470
|
/* @__PURE__ */ w.jsx(
|
|
7455
|
-
|
|
7471
|
+
me,
|
|
7456
7472
|
{
|
|
7457
7473
|
ref: W,
|
|
7458
7474
|
className: R.endKnobContainer,
|
|
7459
7475
|
disabled: qe([D, ae], [g, g]),
|
|
7460
|
-
element:
|
|
7476
|
+
element: B.knobContainer ?? /* @__PURE__ */ w.jsx(tn, {}),
|
|
7461
7477
|
style: ce(k.knobContainer, {
|
|
7462
7478
|
pointerEvents: qe([D, ae], [g, g]) ? "none" : "auto"
|
|
7463
7479
|
}, b === "horizontal" ? {
|
|
7464
7480
|
left: `${E}px`,
|
|
7465
|
-
top: `${
|
|
7481
|
+
top: `${C.height * 0.5}px`
|
|
7466
7482
|
} : {
|
|
7467
|
-
left: `${
|
|
7483
|
+
left: `${C.width * 0.5}px`,
|
|
7468
7484
|
top: `${E}px`
|
|
7469
7485
|
}),
|
|
7470
|
-
children: /* @__PURE__ */ w.jsxs(
|
|
7486
|
+
children: /* @__PURE__ */ w.jsxs(me, { className: R.endKnob, element: B.knob ?? /* @__PURE__ */ w.jsx(jt, {}), style: ce(k.knob), children: [
|
|
7471
7487
|
/* @__PURE__ */ w.jsx("div", { style: k.knobHitBox }),
|
|
7472
|
-
|
|
7488
|
+
B.label && /* @__PURE__ */ w.jsx(me, { className: R.endLabel, element: B.label ?? /* @__PURE__ */ w.jsx($t, {}), style: ce(k.label), children: Number(ae.toFixed(i)).toLocaleString() })
|
|
7473
7489
|
] })
|
|
7474
7490
|
}
|
|
7475
7491
|
)
|
|
7476
7492
|
] })
|
|
7477
7493
|
}
|
|
7478
7494
|
);
|
|
7479
|
-
}), En = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }),
|
|
7495
|
+
}), En = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), $t = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Nn = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), jt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), su = /* @__PURE__ */ Object.assign(Ni, {
|
|
7480
7496
|
/**
|
|
7481
7497
|
* Component for the gutter of a {@link RangeSlider}.
|
|
7482
7498
|
*/
|
|
@@ -7488,7 +7504,7 @@ const Ni = /* @__PURE__ */ Te(({
|
|
|
7488
7504
|
/**
|
|
7489
7505
|
* Component for the knob of a {@link RangeSlider}.
|
|
7490
7506
|
*/
|
|
7491
|
-
Knob:
|
|
7507
|
+
Knob: jt,
|
|
7492
7508
|
/**
|
|
7493
7509
|
* Component for the container of the knob of a {@link RangeSlider}.
|
|
7494
7510
|
*/
|
|
@@ -7496,7 +7512,7 @@ const Ni = /* @__PURE__ */ Te(({
|
|
|
7496
7512
|
/**
|
|
7497
7513
|
* Component for the label of a {@link RangeSlider}.
|
|
7498
7514
|
*/
|
|
7499
|
-
Label:
|
|
7515
|
+
Label: $t
|
|
7500
7516
|
});
|
|
7501
7517
|
function vl({ isDraggingStartKnob: e = !1, isReleasingStartKnob: r = !1, isDraggingEndKnob: i = !1, isReleasingEndKnob: a = !1 }) {
|
|
7502
7518
|
return {
|
|
@@ -7603,7 +7619,7 @@ function xl(e, r, i, a, c, u) {
|
|
|
7603
7619
|
function wl(e, r, i) {
|
|
7604
7620
|
return e * (i - r) + r;
|
|
7605
7621
|
}
|
|
7606
|
-
function
|
|
7622
|
+
function Lo(e, r, i, a, c, u, d, g) {
|
|
7607
7623
|
const m = xl(e, a, c, u, d, g);
|
|
7608
7624
|
return wl(m, r, i);
|
|
7609
7625
|
}
|
|
@@ -7625,7 +7641,7 @@ function at(e, r, i, a, c, u, d, g) {
|
|
|
7625
7641
|
const m = bl(e, r, i);
|
|
7626
7642
|
return El(m, a, c, u, d, g);
|
|
7627
7643
|
}
|
|
7628
|
-
function
|
|
7644
|
+
function Fo(e, r) {
|
|
7629
7645
|
const i = r.length;
|
|
7630
7646
|
let a = 0, c = 1 / 0;
|
|
7631
7647
|
for (let u = 0; u < i; u++) {
|
|
@@ -7642,7 +7658,7 @@ function Nl(e, r, i) {
|
|
|
7642
7658
|
r
|
|
7643
7659
|
];
|
|
7644
7660
|
}
|
|
7645
|
-
process.env.NODE_ENV === "development" && (Ni.displayName = "RangeSlider", En.displayName = "RangeSlider.Gutter",
|
|
7661
|
+
process.env.NODE_ENV === "development" && (Ni.displayName = "RangeSlider", En.displayName = "RangeSlider.Gutter", $t.displayName = "RangeSlider.Label", Nn.displayName = "RangeSlider.Highlight", jt.displayName = "RangeSlider.Knob");
|
|
7646
7662
|
const Si = /* @__PURE__ */ Te(({
|
|
7647
7663
|
children: e,
|
|
7648
7664
|
id: r,
|
|
@@ -7661,7 +7677,7 @@ const Si = /* @__PURE__ */ Te(({
|
|
|
7661
7677
|
});
|
|
7662
7678
|
return /* @__PURE__ */ w.jsxs("div", { ...m, ref: b, style: fr.root, children: [
|
|
7663
7679
|
/* @__PURE__ */ w.jsxs(
|
|
7664
|
-
|
|
7680
|
+
me,
|
|
7665
7681
|
{
|
|
7666
7682
|
"aria-required": i ? "true" : void 0,
|
|
7667
7683
|
element: T.toggle ?? /* @__PURE__ */ w.jsx(Sn, {}),
|
|
@@ -7671,14 +7687,14 @@ const Si = /* @__PURE__ */ Te(({
|
|
|
7671
7687
|
value: d,
|
|
7672
7688
|
onChange: (_) => g?.(_.target.value),
|
|
7673
7689
|
children: [
|
|
7674
|
-
u !== void 0 && /* @__PURE__ */ w.jsx(
|
|
7675
|
-
c.map((_, I) => /* @__PURE__ */ w.jsx(
|
|
7690
|
+
u !== void 0 && /* @__PURE__ */ w.jsx(me, { disabled: !0, hidden: !0, element: T.option ?? /* @__PURE__ */ w.jsx(At, {}), value: "", children: u }),
|
|
7691
|
+
c.map((_, I) => /* @__PURE__ */ w.jsx(me, { element: T.option ?? /* @__PURE__ */ w.jsx(At, {}), value: _, children: _ }, `${I}-${_}`))
|
|
7676
7692
|
]
|
|
7677
7693
|
}
|
|
7678
7694
|
),
|
|
7679
|
-
T.expandIcon && /* @__PURE__ */ w.jsx(
|
|
7695
|
+
T.expandIcon && /* @__PURE__ */ w.jsx(me, { element: T.expandIcon, style: fr.expandIcon })
|
|
7680
7696
|
] });
|
|
7681
|
-
}), Pr = ({ children: e, style: r, ...i }) => /* @__PURE__ */ w.jsx("figure", { ...i, "aria-hidden": !0, style: ce(r, { pointerEvents: "none" }), children: e }), Sn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("select", { ...r, children: e }), At = ({ ...e }) => /* @__PURE__ */ w.jsx("option", { ...e }),
|
|
7697
|
+
}), Pr = ({ children: e, style: r, ...i }) => /* @__PURE__ */ w.jsx("figure", { ...i, "aria-hidden": !0, style: ce(r, { pointerEvents: "none" }), children: e }), Sn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("select", { ...r, children: e }), At = ({ ...e }) => /* @__PURE__ */ w.jsx("option", { ...e }), au = /* @__PURE__ */ Object.assign(Si, {
|
|
7682
7698
|
/**
|
|
7683
7699
|
* Component for the expand icon of a {@link Select}.
|
|
7684
7700
|
*/
|
|
@@ -7728,50 +7744,50 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7728
7744
|
position: T = 0,
|
|
7729
7745
|
trackPadding: _ = 0,
|
|
7730
7746
|
labelProvider: I,
|
|
7731
|
-
onDragEnd:
|
|
7747
|
+
onDragEnd: $,
|
|
7732
7748
|
onDragStart: A,
|
|
7733
7749
|
onChange: S,
|
|
7734
|
-
|
|
7750
|
+
...C
|
|
7735
7751
|
}, q) => {
|
|
7736
|
-
const W = we(null), Y = we(null), J =
|
|
7737
|
-
const
|
|
7752
|
+
const W = we(null), Y = we(null), J = he((te, ne, ae) => {
|
|
7753
|
+
const F = be.from(W.current) ?? be.zero, R = a ? 1 - te : te;
|
|
7738
7754
|
switch (b) {
|
|
7739
7755
|
case "horizontal": {
|
|
7740
|
-
const k = i ?
|
|
7756
|
+
const k = i ? F.width - g : F.width, U = R * k + ne, Z = Math.max(0, Math.min(1, U / k));
|
|
7741
7757
|
return a ? 1 - Z : Z;
|
|
7742
7758
|
}
|
|
7743
7759
|
case "vertical": {
|
|
7744
|
-
const k = i ?
|
|
7760
|
+
const k = i ? F.height - u : F.height, U = R * k + ae, Z = Math.max(0, Math.min(1, U / k));
|
|
7745
7761
|
return a ? 1 - Z : Z;
|
|
7746
7762
|
}
|
|
7747
7763
|
default:
|
|
7748
7764
|
return console.error(`[etudes::Slider] Invalid orientation: ${b}`), NaN;
|
|
7749
7765
|
}
|
|
7750
|
-
}, [W.current, i, a, g, u, b]), x =
|
|
7766
|
+
}, [W.current, i, a, g, u, b]), x = he((te) => {
|
|
7751
7767
|
if (!c) return;
|
|
7752
7768
|
const ne = be.from(W.current) ?? be.zero, ae = be.fromViewport();
|
|
7753
7769
|
switch (b) {
|
|
7754
7770
|
case "horizontal": {
|
|
7755
|
-
const
|
|
7756
|
-
|
|
7771
|
+
const F = (te.clientX + ae.left - ne.left) / ne.width, R = a ? 1 - F : F;
|
|
7772
|
+
B(R);
|
|
7757
7773
|
break;
|
|
7758
7774
|
}
|
|
7759
7775
|
case "vertical": {
|
|
7760
|
-
const
|
|
7761
|
-
|
|
7776
|
+
const F = (te.clientY + ae.top - ne.top) / ne.height, R = a ? 1 - F : F;
|
|
7777
|
+
B(R);
|
|
7762
7778
|
break;
|
|
7763
7779
|
}
|
|
7764
7780
|
default:
|
|
7765
7781
|
console.error(`[etudes::Slider] Invalid orientation: ${b}`);
|
|
7766
7782
|
}
|
|
7767
|
-
}, [W.current, a, c, b]), { isDragging: P, isReleasing: E, value: M, setValue:
|
|
7783
|
+
}, [W.current, a, c, b]), { isDragging: P, isReleasing: E, value: M, setValue: B } = zt(Y, {
|
|
7768
7784
|
initialValue: T,
|
|
7769
7785
|
transform: J,
|
|
7770
7786
|
onDragStart: A,
|
|
7771
|
-
onDragEnd:
|
|
7787
|
+
onDragEnd: $
|
|
7772
7788
|
}), K = a ? 1 - M : M, X = Sl({ orientation: b, isAtEnd: a ? M === 0 : M === 1, isAtStart: a ? M === 1 : M === 0, isDragging: P, isReleasing: E }), D = _l({ orientation: b, isClipped: i, naturalPosition: K, knobPadding: d, knobHeight: u, knobWidth: g, isTrackInteractive: c });
|
|
7773
7789
|
Ee(() => {
|
|
7774
|
-
P || T === M ||
|
|
7790
|
+
P || T === M || B(T);
|
|
7775
7791
|
}, [T]), Ee(() => {
|
|
7776
7792
|
P && m || S?.(M, P);
|
|
7777
7793
|
}, [M]), Ee(() => {
|
|
@@ -7786,7 +7802,7 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7786
7802
|
return /* @__PURE__ */ w.jsx(
|
|
7787
7803
|
"div",
|
|
7788
7804
|
{
|
|
7789
|
-
|
|
7805
|
+
...C,
|
|
7790
7806
|
ref: q,
|
|
7791
7807
|
"aria-orientation": b,
|
|
7792
7808
|
"aria-valuenow": M,
|
|
@@ -7794,7 +7810,7 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7794
7810
|
role: "slider",
|
|
7795
7811
|
children: /* @__PURE__ */ w.jsxs("div", { ref: W, style: D.body, children: [
|
|
7796
7812
|
/* @__PURE__ */ w.jsx(
|
|
7797
|
-
|
|
7813
|
+
me,
|
|
7798
7814
|
{
|
|
7799
7815
|
className: se(a ? "end" : "start", X.track),
|
|
7800
7816
|
element: z.track ?? /* @__PURE__ */ w.jsx(Mt, {}),
|
|
@@ -7810,7 +7826,7 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7810
7826
|
}
|
|
7811
7827
|
),
|
|
7812
7828
|
/* @__PURE__ */ w.jsx(
|
|
7813
|
-
|
|
7829
|
+
me,
|
|
7814
7830
|
{
|
|
7815
7831
|
className: se(a ? "start" : "end", X.track),
|
|
7816
7832
|
element: z.track ?? /* @__PURE__ */ w.jsx(Mt, {}),
|
|
@@ -7826,22 +7842,22 @@ const _i = /* @__PURE__ */ Te(({
|
|
|
7826
7842
|
}
|
|
7827
7843
|
),
|
|
7828
7844
|
/* @__PURE__ */ w.jsx(
|
|
7829
|
-
|
|
7845
|
+
me,
|
|
7830
7846
|
{
|
|
7831
7847
|
ref: Y,
|
|
7832
7848
|
className: se(X.knobContainer),
|
|
7833
7849
|
element: z.knobContainer ?? /* @__PURE__ */ w.jsx(Tn, {}),
|
|
7834
7850
|
style: D.knobContainer,
|
|
7835
|
-
children: /* @__PURE__ */ w.jsxs(
|
|
7851
|
+
children: /* @__PURE__ */ w.jsxs(me, { className: se(X.knob), element: z.knob ?? /* @__PURE__ */ w.jsx(_n, {}), style: ce(D.knob), children: [
|
|
7836
7852
|
/* @__PURE__ */ w.jsx("div", { style: D.knobHitBox }),
|
|
7837
|
-
I && /* @__PURE__ */ w.jsx(
|
|
7853
|
+
I && /* @__PURE__ */ w.jsx(me, { className: se(X.label), element: z.label ?? /* @__PURE__ */ w.jsx(On, {}), style: ce(D.label), children: I(M) })
|
|
7838
7854
|
] })
|
|
7839
7855
|
}
|
|
7840
7856
|
)
|
|
7841
7857
|
] })
|
|
7842
7858
|
}
|
|
7843
7859
|
);
|
|
7844
|
-
}), Mt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), _n = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), On = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }),
|
|
7860
|
+
}), Mt = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), _n = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), Tn = ({ ...e }) => /* @__PURE__ */ w.jsx("button", { ...e }), On = ({ ...e }) => /* @__PURE__ */ w.jsx("div", { ...e }), cu = /* @__PURE__ */ Object.assign(_i, {
|
|
7845
7861
|
/**
|
|
7846
7862
|
* Component for the slide track on either side of the knob of a
|
|
7847
7863
|
* {@link Slider}.
|
|
@@ -7974,22 +7990,22 @@ const Ti = /* @__PURE__ */ Te(({
|
|
|
7974
7990
|
onlyDispatchesOnDragEnd: T = !1,
|
|
7975
7991
|
orientation: _ = "vertical",
|
|
7976
7992
|
steps: I = Oi(10),
|
|
7977
|
-
trackPadding:
|
|
7993
|
+
trackPadding: $ = 0,
|
|
7978
7994
|
onDragEnd: A,
|
|
7979
7995
|
onDragStart: S,
|
|
7980
|
-
onIndexChange:
|
|
7996
|
+
onIndexChange: C,
|
|
7981
7997
|
onPositionChange: q,
|
|
7982
7998
|
...W
|
|
7983
7999
|
}, Y) => {
|
|
7984
|
-
const J = we(null), x = we(null), P = nt(J), [E, M] = Oe(i),
|
|
8000
|
+
const J = we(null), x = we(null), P = nt(J), [E, M] = Oe(i), B = he((k, U, Z) => {
|
|
7985
8001
|
const G = c ? tt(k) : k;
|
|
7986
8002
|
switch (_) {
|
|
7987
8003
|
case "horizontal": {
|
|
7988
|
-
const fe = a ? P.width - m : P.width,
|
|
8004
|
+
const fe = a ? P.width - m : P.width, ge = G * fe + U, ue = Qt(ge / fe);
|
|
7989
8005
|
return c ? tt(ue) : ue;
|
|
7990
8006
|
}
|
|
7991
8007
|
case "vertical": {
|
|
7992
|
-
const fe = a ? P.height - d : P.height,
|
|
8008
|
+
const fe = a ? P.height - d : P.height, ge = G * fe + Z, ue = Qt(ge / fe);
|
|
7993
8009
|
return c ? tt(ue) : ue;
|
|
7994
8010
|
}
|
|
7995
8011
|
default:
|
|
@@ -7997,18 +8013,18 @@ const Ti = /* @__PURE__ */ Te(({
|
|
|
7997
8013
|
}
|
|
7998
8014
|
}, [P.width, P.height, a, c, m, d, _]), { isDragging: K, isReleasing: oe, value: Q, setValue: X } = zt(x, {
|
|
7999
8015
|
initialValue: dt(i, I),
|
|
8000
|
-
transform:
|
|
8016
|
+
transform: B,
|
|
8001
8017
|
onDragStart: S,
|
|
8002
8018
|
onDragEnd: A
|
|
8003
|
-
}), D =
|
|
8019
|
+
}), D = he((k) => {
|
|
8004
8020
|
if (!u) return;
|
|
8005
8021
|
const U = be.fromViewport();
|
|
8006
8022
|
switch (_) {
|
|
8007
8023
|
case "horizontal": {
|
|
8008
8024
|
const Z = (k.clientX + U.left - P.left) / P.width, G = c ? tt(Z) : Z, fe = It(G, I);
|
|
8009
8025
|
if (fe === E) {
|
|
8010
|
-
const
|
|
8011
|
-
M(Qt(
|
|
8026
|
+
const ge = G > Q ? fe + 1 : fe - 1;
|
|
8027
|
+
M(Qt(ge, I.length - 1));
|
|
8012
8028
|
} else
|
|
8013
8029
|
M(fe);
|
|
8014
8030
|
break;
|
|
@@ -8016,18 +8032,18 @@ const Ti = /* @__PURE__ */ Te(({
|
|
|
8016
8032
|
case "vertical": {
|
|
8017
8033
|
const Z = (k.clientY + U.top - P.top) / P.height, G = c ? tt(Z) : Z, fe = It(G, I);
|
|
8018
8034
|
if (fe === E) {
|
|
8019
|
-
const
|
|
8020
|
-
X(ue), M(Qt(
|
|
8035
|
+
const ge = G > Q ? fe + 1 : fe - 1, ue = dt(ge, I);
|
|
8036
|
+
X(ue), M(Qt(ge, I.length - 1));
|
|
8021
8037
|
} else {
|
|
8022
|
-
const
|
|
8023
|
-
X(
|
|
8038
|
+
const ge = dt(fe, I);
|
|
8039
|
+
X(ge), M(fe);
|
|
8024
8040
|
}
|
|
8025
8041
|
break;
|
|
8026
8042
|
}
|
|
8027
8043
|
default:
|
|
8028
8044
|
console.error(`[etudes::StepSlider] Invalid orientation: ${_}`);
|
|
8029
8045
|
}
|
|
8030
|
-
}, [P.width, P.left, P.top, P.height, E, Q, c, u, _, We(I)]), z = c ? tt(Q) : Q, ae = Tl({ orientation: _, isAtEnd: c ? Q === 0 : Q === 1, isAtStart: c ? Q === 1 : Q === 0, isDragging: K, isReleasing: oe }),
|
|
8046
|
+
}, [P.width, P.left, P.top, P.height, E, Q, c, u, _, We(I)]), z = c ? tt(Q) : Q, ae = Tl({ orientation: _, isAtEnd: c ? Q === 0 : Q === 1, isAtStart: c ? Q === 1 : Q === 0, isDragging: K, isReleasing: oe }), F = Ol({ orientation: _, naturalPosition: z, isClipped: a, knobPadding: g, knobHeight: d, knobWidth: m, isTrackInteractive: u }), R = ze(e, {
|
|
8031
8047
|
knob: Pn,
|
|
8032
8048
|
knobContainer: In,
|
|
8033
8049
|
label: kn,
|
|
@@ -8046,7 +8062,7 @@ const Ti = /* @__PURE__ */ Te(({
|
|
|
8046
8062
|
}, [Q, K, T, We(I)]), Ee(() => {
|
|
8047
8063
|
q?.(Q, K);
|
|
8048
8064
|
}, [Q, K]), Ee(() => {
|
|
8049
|
-
|
|
8065
|
+
C?.(E, K);
|
|
8050
8066
|
}, [E, K]), /* @__PURE__ */ w.jsx(
|
|
8051
8067
|
"div",
|
|
8052
8068
|
{
|
|
@@ -8055,49 +8071,49 @@ const Ti = /* @__PURE__ */ Te(({
|
|
|
8055
8071
|
"aria-valuenow": E,
|
|
8056
8072
|
className: se(r, ae.root),
|
|
8057
8073
|
role: "slider",
|
|
8058
|
-
children: /* @__PURE__ */ w.jsxs("div", { ref: J, style:
|
|
8074
|
+
children: /* @__PURE__ */ w.jsxs("div", { ref: J, style: F.body, children: [
|
|
8059
8075
|
/* @__PURE__ */ w.jsx(
|
|
8060
|
-
|
|
8076
|
+
me,
|
|
8061
8077
|
{
|
|
8062
8078
|
className: se(c ? "end" : "start", ae.track),
|
|
8063
8079
|
element: R.track ?? /* @__PURE__ */ w.jsx(Rt, {}),
|
|
8064
|
-
style: ce(
|
|
8065
|
-
height: `calc(${z * 100}% - ${
|
|
8080
|
+
style: ce(F.track, _ === "vertical" ? {
|
|
8081
|
+
height: `calc(${z * 100}% - ${$ <= 0 ? 0 : d * 0.5}px - ${$}px)`,
|
|
8066
8082
|
top: "0"
|
|
8067
8083
|
} : {
|
|
8068
8084
|
left: "0",
|
|
8069
|
-
width: `calc(${z * 100}% - ${
|
|
8085
|
+
width: `calc(${z * 100}% - ${$ <= 0 ? 0 : m * 0.5}px - ${$}px)`
|
|
8070
8086
|
}),
|
|
8071
8087
|
onClick: D,
|
|
8072
|
-
children: /* @__PURE__ */ w.jsx("div", { style:
|
|
8088
|
+
children: /* @__PURE__ */ w.jsx("div", { style: F.trackHitBox })
|
|
8073
8089
|
}
|
|
8074
8090
|
),
|
|
8075
8091
|
/* @__PURE__ */ w.jsx(
|
|
8076
|
-
|
|
8092
|
+
me,
|
|
8077
8093
|
{
|
|
8078
8094
|
className: se(c ? "start" : "end", ae.track),
|
|
8079
8095
|
element: R.track ?? /* @__PURE__ */ w.jsx(Rt, {}),
|
|
8080
|
-
style: ce(
|
|
8096
|
+
style: ce(F.track, _ === "vertical" ? {
|
|
8081
8097
|
bottom: "0",
|
|
8082
|
-
height: `calc(${tt(z) * 100}% - ${
|
|
8098
|
+
height: `calc(${tt(z) * 100}% - ${$ <= 0 ? 0 : d * 0.5}px - ${$}px)`
|
|
8083
8099
|
} : {
|
|
8084
8100
|
right: "0",
|
|
8085
|
-
width: `calc(${tt(z) * 100}% - ${
|
|
8101
|
+
width: `calc(${tt(z) * 100}% - ${$ <= 0 ? 0 : m * 0.5}px - ${$}px)`
|
|
8086
8102
|
}),
|
|
8087
8103
|
onClick: D,
|
|
8088
|
-
children: /* @__PURE__ */ w.jsx("div", { style:
|
|
8104
|
+
children: /* @__PURE__ */ w.jsx("div", { style: F.trackHitBox })
|
|
8089
8105
|
}
|
|
8090
8106
|
),
|
|
8091
8107
|
/* @__PURE__ */ w.jsx(
|
|
8092
|
-
|
|
8108
|
+
me,
|
|
8093
8109
|
{
|
|
8094
8110
|
ref: x,
|
|
8095
8111
|
className: se(ae.knobContainer),
|
|
8096
8112
|
element: R.knobContainer ?? /* @__PURE__ */ w.jsx(In, {}),
|
|
8097
|
-
style: ce(
|
|
8098
|
-
children: /* @__PURE__ */ w.jsxs(
|
|
8099
|
-
/* @__PURE__ */ w.jsx("div", { style:
|
|
8100
|
-
I && b && /* @__PURE__ */ w.jsx(
|
|
8113
|
+
style: ce(F.knobContainer),
|
|
8114
|
+
children: /* @__PURE__ */ w.jsxs(me, { className: se(ae.knob), element: R.knob ?? /* @__PURE__ */ w.jsx(Pn, {}), style: ce(F.knob), children: [
|
|
8115
|
+
/* @__PURE__ */ w.jsx("div", { style: F.knobHitBox }),
|
|
8116
|
+
I && b && /* @__PURE__ */ w.jsx(me, { className: se(ae.label), element: R.label ?? /* @__PURE__ */ w.jsx(kn, {}), style: ce(F.label), children: b(Q, It(Q, I)) })
|
|
8101
8117
|
] })
|
|
8102
8118
|
}
|
|
8103
8119
|
)
|
|
@@ -8113,7 +8129,7 @@ function Oi(e) {
|
|
|
8113
8129
|
const r = 1 / (e - 1);
|
|
8114
8130
|
return Array(e).fill(null).map((i, a) => r * a);
|
|
8115
8131
|
}
|
|
8116
|
-
const
|
|
8132
|
+
const lu = /* @__PURE__ */ Object.assign(Ti, {
|
|
8117
8133
|
/**
|
|
8118
8134
|
* Component for the knob of a {@link StepSlider}.
|
|
8119
8135
|
*/
|
|
@@ -8269,19 +8285,19 @@ const Pl = /* @__PURE__ */ Te(({
|
|
|
8269
8285
|
onSwipeUp: d,
|
|
8270
8286
|
...g
|
|
8271
8287
|
}, m) => {
|
|
8272
|
-
const [b, T] = Oe(void 0), [_, I] = Oe(void 0), [
|
|
8288
|
+
const [b, T] = Oe(void 0), [_, I] = Oe(void 0), [$, A] = Oe(NaN), S = (Y, J) => {
|
|
8273
8289
|
if (isNaN(Y) || isNaN(J)) return W();
|
|
8274
8290
|
T(_e.make(Y, J));
|
|
8275
|
-
},
|
|
8291
|
+
}, C = (Y, J) => {
|
|
8276
8292
|
const x = b;
|
|
8277
8293
|
if (x === void 0) return;
|
|
8278
|
-
const P = x.x !== Y || x.y !== J, E = !isNaN(
|
|
8294
|
+
const P = x.x !== Y || x.y !== J, E = !isNaN($);
|
|
8279
8295
|
P && (E || A(Date.now()), I(_e.make(Y, J)));
|
|
8280
8296
|
}, q = () => {
|
|
8281
|
-
const Y =
|
|
8297
|
+
const Y = $, J = b, x = _;
|
|
8282
8298
|
if (isNaN(Y) || J === void 0 || x === void 0) return;
|
|
8283
|
-
const P = Date.now() - Y, E = x.x - J.x, M = x.y - J.y,
|
|
8284
|
-
r && (Math.abs(
|
|
8299
|
+
const P = Date.now() - Y, E = x.x - J.x, M = x.y - J.y, B = E / P, K = M / P;
|
|
8300
|
+
r && (Math.abs(B) >= i && Math.abs(B) > Math.abs(K) ? B > 0 ? u?.() : c?.() : Math.abs(K) >= i && Math.abs(K) > Math.abs(B) && (K > 0 ? a?.() : d?.())), W();
|
|
8285
8301
|
}, W = () => {
|
|
8286
8302
|
T(void 0), I(void 0), A(NaN);
|
|
8287
8303
|
};
|
|
@@ -8292,10 +8308,10 @@ const Pl = /* @__PURE__ */ Te(({
|
|
|
8292
8308
|
ref: m,
|
|
8293
8309
|
onMouseDown: (Y) => S(Y.clientX, Y.clientY),
|
|
8294
8310
|
onMouseLeave: () => W(),
|
|
8295
|
-
onMouseMove: (Y) =>
|
|
8311
|
+
onMouseMove: (Y) => C(Y.clientX, Y.clientY),
|
|
8296
8312
|
onMouseUp: () => q(),
|
|
8297
8313
|
onTouchEnd: () => q(),
|
|
8298
|
-
onTouchMove: (Y) =>
|
|
8314
|
+
onTouchMove: (Y) => C(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
|
|
8299
8315
|
onTouchStart: (Y) => S(Y.targetTouches[0].clientX, Y.targetTouches[0].clientY),
|
|
8300
8316
|
children: e
|
|
8301
8317
|
}
|
|
@@ -8325,22 +8341,22 @@ const Pi = /* @__PURE__ */ Te(({
|
|
|
8325
8341
|
...g
|
|
8326
8342
|
}, m) => {
|
|
8327
8343
|
const b = we(null), T = ci(b), _ = ze(r, {
|
|
8328
|
-
knob:
|
|
8329
|
-
track:
|
|
8330
|
-
}), I = kl({ isOn: a }),
|
|
8331
|
-
return /* @__PURE__ */ w.jsxs("label", { ...g, ref: m, className: se(e, I.root), style: ce(u,
|
|
8332
|
-
/* @__PURE__ */ w.jsx("input", { checked: a, style:
|
|
8333
|
-
/* @__PURE__ */ w.jsx(
|
|
8344
|
+
knob: $n,
|
|
8345
|
+
track: Cn
|
|
8346
|
+
}), I = kl({ isOn: a }), $ = Cl({ isOn: a, isInverted: i, orientation: c, knobSize: T });
|
|
8347
|
+
return /* @__PURE__ */ w.jsxs("label", { ...g, ref: m, className: se(e, I.root), style: ce(u, $.root), children: [
|
|
8348
|
+
/* @__PURE__ */ w.jsx("input", { checked: a, style: $.input, type: "checkbox", onChange: (A) => d?.(A.target.checked) }),
|
|
8349
|
+
/* @__PURE__ */ w.jsx(me, { className: I.track, element: _.track ?? /* @__PURE__ */ w.jsx(Cn, {}), style: $.track, children: /* @__PURE__ */ w.jsx("div", { style: { position: "relative", width: "100%", height: "100%" }, children: /* @__PURE__ */ w.jsx(me, { ref: b, className: I.knob, element: _.knob ?? /* @__PURE__ */ w.jsx($n, {}), style: $.knob }) }) })
|
|
8334
8350
|
] });
|
|
8335
|
-
}),
|
|
8351
|
+
}), Cn = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), $n = ({ children: e, ...r }) => /* @__PURE__ */ w.jsx("div", { ...r, children: e }), uu = /* @__PURE__ */ Object.assign(Pi, {
|
|
8336
8352
|
/**
|
|
8337
8353
|
* Component for the knob of a {@link Toggle}.
|
|
8338
8354
|
*/
|
|
8339
|
-
Knob:
|
|
8355
|
+
Knob: $n,
|
|
8340
8356
|
/**
|
|
8341
8357
|
* Component for the track of a {@link Toggle}.
|
|
8342
8358
|
*/
|
|
8343
|
-
Track:
|
|
8359
|
+
Track: Cn
|
|
8344
8360
|
});
|
|
8345
8361
|
function kl({ isOn: e = !1 }) {
|
|
8346
8362
|
return {
|
|
@@ -8349,7 +8365,7 @@ function kl({ isOn: e = !1 }) {
|
|
|
8349
8365
|
track: se({ active: e })
|
|
8350
8366
|
};
|
|
8351
8367
|
}
|
|
8352
|
-
function
|
|
8368
|
+
function Cl({ isOn: e = !1, isInverted: r = !1, knobSize: i = je.zero, orientation: a = "horizontal" }) {
|
|
8353
8369
|
return {
|
|
8354
8370
|
root: {
|
|
8355
8371
|
alignItems: "center",
|
|
@@ -8409,18 +8425,18 @@ function $l({ isOn: e = !1, isInverted: r = !1, knobSize: i = Ce.zero, orientati
|
|
|
8409
8425
|
}
|
|
8410
8426
|
};
|
|
8411
8427
|
}
|
|
8412
|
-
process.env.NODE_ENV === "development" && (Pi.displayName = "Toggle",
|
|
8428
|
+
process.env.NODE_ENV === "development" && (Pi.displayName = "Toggle", $n.displayName = "Toggle.Knob", Cn.displayName = "Toggle.Track");
|
|
8413
8429
|
function Vo(e) {
|
|
8414
8430
|
return e == null ? "" : Array.isArray(e) ? JSON.stringify(e.map(Vo)) : typeof e == "object" ? JSON.stringify(Object.entries(e).sort(([r], [i]) => r.localeCompare(i)).map(([r, i]) => [r, Vo(i)])) : We(e);
|
|
8415
8431
|
}
|
|
8416
|
-
function
|
|
8432
|
+
function $l({
|
|
8417
8433
|
children: e,
|
|
8418
8434
|
...r
|
|
8419
8435
|
}) {
|
|
8420
|
-
return /* @__PURE__ */ w.jsx(w.Fragment, { children:
|
|
8436
|
+
return /* @__PURE__ */ w.jsx(w.Fragment, { children: jn.map(e, (i) => An(i) ? gr(i, { ...r }) : i) });
|
|
8421
8437
|
}
|
|
8422
|
-
process.env.NODE_ENV === "development" && (
|
|
8423
|
-
function
|
|
8438
|
+
process.env.NODE_ENV === "development" && ($l.displayName = "ExtractChildren");
|
|
8439
|
+
function fu({
|
|
8424
8440
|
children: e,
|
|
8425
8441
|
fallback: r = void 0
|
|
8426
8442
|
}) {
|
|
@@ -8431,44 +8447,44 @@ function lu({
|
|
|
8431
8447
|
return /* @__PURE__ */ w.jsx(Ys, { fallback: r, children: e });
|
|
8432
8448
|
}
|
|
8433
8449
|
export {
|
|
8434
|
-
|
|
8450
|
+
nu as Accordion,
|
|
8435
8451
|
Xo as Burger,
|
|
8436
8452
|
Rl as BurgerButton,
|
|
8437
8453
|
ei as Button,
|
|
8438
8454
|
Za as Carousel,
|
|
8439
|
-
|
|
8455
|
+
ru as CodeInput,
|
|
8440
8456
|
zn as Collection,
|
|
8441
8457
|
wa as Conditional,
|
|
8442
|
-
|
|
8458
|
+
ou as Counter,
|
|
8443
8459
|
zl as CoverImage,
|
|
8444
|
-
|
|
8460
|
+
Ll as CoverVideo,
|
|
8445
8461
|
sc as Dial,
|
|
8446
|
-
|
|
8462
|
+
iu as Dropdown,
|
|
8447
8463
|
Mn as Each,
|
|
8448
8464
|
ii as ExtractChild,
|
|
8449
|
-
|
|
8465
|
+
$l as ExtractChildren,
|
|
8450
8466
|
fl as FlatSVG,
|
|
8451
8467
|
dl as Form,
|
|
8452
8468
|
qo as Image,
|
|
8453
8469
|
on as ImageSource,
|
|
8454
8470
|
pl as MasonryGrid,
|
|
8455
|
-
|
|
8471
|
+
fu as NoSSR,
|
|
8456
8472
|
ca as OptionButton,
|
|
8457
8473
|
ti as Panorama,
|
|
8458
|
-
|
|
8474
|
+
Fl as PanoramaSlider,
|
|
8459
8475
|
Wo as Picture,
|
|
8460
|
-
|
|
8476
|
+
su as RangeSlider,
|
|
8461
8477
|
nn as Repeat,
|
|
8462
|
-
|
|
8478
|
+
au as Select,
|
|
8463
8479
|
xa as SelectableButton,
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8480
|
+
cu as Slider,
|
|
8481
|
+
lu as StepSlider,
|
|
8482
|
+
me as Styled,
|
|
8467
8483
|
Pl as SwipeRegion,
|
|
8468
8484
|
Vl as Switch,
|
|
8469
8485
|
Il as TextArea,
|
|
8470
8486
|
hi as TextField,
|
|
8471
|
-
|
|
8487
|
+
uu as Toggle,
|
|
8472
8488
|
Zo as Video,
|
|
8473
8489
|
Na as WithTooltip,
|
|
8474
8490
|
vr as _Content,
|
|
@@ -8486,35 +8502,37 @@ export {
|
|
|
8486
8502
|
Aa as createLocalCache,
|
|
8487
8503
|
Va as createSessionCache,
|
|
8488
8504
|
Ya as getStyle,
|
|
8489
|
-
|
|
8505
|
+
$a as isTouchDevice,
|
|
8490
8506
|
To as setStyle,
|
|
8491
8507
|
ce as styles,
|
|
8492
8508
|
Dl as useAgent,
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
|
-
Yl as
|
|
8509
|
+
Bl as useClassName,
|
|
8510
|
+
Hl as useClickOutside,
|
|
8511
|
+
Yl as useCopyBlobToClipboard,
|
|
8512
|
+
Ul as useDPR,
|
|
8513
|
+
Xl as useDownloadBlob,
|
|
8496
8514
|
ka as useDrag,
|
|
8497
|
-
|
|
8515
|
+
Kl as useDropzone,
|
|
8498
8516
|
Qs as useImageLoader,
|
|
8499
8517
|
Go as useImageSize,
|
|
8500
8518
|
ga as useInertiaDrag,
|
|
8501
8519
|
zt as useInertiaDragValue,
|
|
8502
8520
|
Js as useIntersectionObserver,
|
|
8503
|
-
|
|
8504
|
-
|
|
8505
|
-
|
|
8506
|
-
|
|
8521
|
+
Ca as useInterval,
|
|
8522
|
+
Gl as useIsMounted,
|
|
8523
|
+
ja as useIsTouchDevice,
|
|
8524
|
+
ql as useKeyboardShortcut,
|
|
8507
8525
|
Se as useLatest,
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8526
|
+
Wl as useLocalCache,
|
|
8527
|
+
Jl as usePosition,
|
|
8528
|
+
Fa as usePrevious,
|
|
8511
8529
|
nt as useRect,
|
|
8512
|
-
|
|
8530
|
+
Zl as useSessionCache,
|
|
8513
8531
|
ci as useSize,
|
|
8514
8532
|
mr as useSizeObserver,
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8533
|
+
Ql as useStyle,
|
|
8534
|
+
eu as useSystemColorScheme,
|
|
8535
|
+
tu as useTimeout,
|
|
8518
8536
|
na as useVideoMetadataLoader,
|
|
8519
8537
|
ra as useVideoSize,
|
|
8520
8538
|
Zs as useViewportSize
|