kss-modern 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +15 -0
  2. package/dist/node/lib/index.d.mts +86 -0
  3. package/dist/node/lib/index.d.ts +86 -0
  4. package/dist/node/lib/index.mjs +1900 -0
  5. package/dist/node/lib/vite-pug/worker.d.mts +24 -0
  6. package/dist/node/lib/vite-pug/worker.d.ts +24 -0
  7. package/dist/node/lib/vite-pug/worker.mjs +107 -0
  8. package/dist/styleguide-assets/.vite/manifest.json +63 -0
  9. package/dist/styleguide-assets/assets/worker-D4V8OS0H.js +12 -0
  10. package/dist/styleguide-assets/browser-BSX_g1yp.js +22671 -0
  11. package/dist/styleguide-assets/client-BZlkq2d8.js +1 -0
  12. package/dist/styleguide-assets/client-fullpage-1rKiNQVN.js +62 -0
  13. package/dist/styleguide-assets/clipboard-DhKzwemV.js +19 -0
  14. package/dist/styleguide-assets/fonts/geist-mono-latin-300-normal.woff2 +0 -0
  15. package/dist/styleguide-assets/fonts/geist-mono-latin-400-normal.woff2 +0 -0
  16. package/dist/styleguide-assets/fonts/geist-mono-latin-600-normal.woff2 +0 -0
  17. package/dist/styleguide-assets/fonts/geist-sans-latin-300-normal.woff2 +0 -0
  18. package/dist/styleguide-assets/fonts/geist-sans-latin-400-normal.woff2 +0 -0
  19. package/dist/styleguide-assets/fonts/geist-sans-latin-600-normal.woff2 +0 -0
  20. package/dist/styleguide-assets/html-validator-DqoaRE1y.js +136 -0
  21. package/dist/styleguide-assets/icons/external-link.svg +4 -0
  22. package/dist/styleguide-assets/icons/figma.svg +1 -0
  23. package/dist/styleguide-assets/icons/phpstorm.svg +1 -0
  24. package/dist/styleguide-assets/icons/vscode.svg +1 -0
  25. package/dist/styleguide-assets/icons-oK5xUF8R.js +37 -0
  26. package/dist/styleguide-assets/main-B97JcbYk.js +3603 -0
  27. package/dist/styleguide-assets/styleguide-BQbUioN5.css +1 -0
  28. package/package.json +42 -0
@@ -0,0 +1,3603 @@
1
+ var Ws = Object.defineProperty;
2
+ var Ft = (e) => {
3
+ throw TypeError(e);
4
+ };
5
+ var _s = (e, t, n) => t in e ? Ws(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var H = (e, t, n) => _s(e, typeof t != "symbol" ? t + "" : t, n), Pt = (e, t, n) => t.has(e) || Ft("Cannot " + n);
7
+ var ce = (e, t, n) => (Pt(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Nt = (e, t, n) => t.has(e) ? Ft("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ne = (e, t, n, s) => (Pt(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
8
+ function Us(e, t) {
9
+ e.indexOf(t) === -1 && e.push(t);
10
+ }
11
+ function En(e, t) {
12
+ const n = e.indexOf(t);
13
+ n > -1 && e.splice(n, 1);
14
+ }
15
+ const z = (e, t, n) => n > t ? t : n < e ? e : n;
16
+ let lt = () => {
17
+ };
18
+ const K = {}, Vn = (e) => /^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);
19
+ function Mn(e) {
20
+ return typeof e == "object" && e !== null;
21
+ }
22
+ const kn = (e) => /^0[^.\s]+$/u.test(e);
23
+ // @__NO_SIDE_EFFECTS__
24
+ function ct(e) {
25
+ let t;
26
+ return () => (t === void 0 && (t = e()), t);
27
+ }
28
+ const te = /* @__NO_SIDE_EFFECTS__ */ (e) => e, js = (e, t) => (n) => t(e(n)), ut = (...e) => e.reduce(js), ft = /* @__NO_SIDE_EFFECTS__ */ (e, t, n) => {
29
+ const s = t - e;
30
+ return s === 0 ? 1 : (n - e) / s;
31
+ };
32
+ class Ln {
33
+ constructor() {
34
+ this.subscriptions = [];
35
+ }
36
+ add(t) {
37
+ return Us(this.subscriptions, t), () => En(this.subscriptions, t);
38
+ }
39
+ notify(t, n, s) {
40
+ const r = this.subscriptions.length;
41
+ if (r)
42
+ if (r === 1)
43
+ this.subscriptions[0](t, n, s);
44
+ else
45
+ for (let i = 0; i < r; i++) {
46
+ const o = this.subscriptions[i];
47
+ o && o(t, n, s);
48
+ }
49
+ }
50
+ getSize() {
51
+ return this.subscriptions.length;
52
+ }
53
+ clear() {
54
+ this.subscriptions.length = 0;
55
+ }
56
+ }
57
+ const O = /* @__NO_SIDE_EFFECTS__ */ (e) => e * 1e3, N = /* @__NO_SIDE_EFFECTS__ */ (e) => e / 1e3;
58
+ function Cn(e, t) {
59
+ return t ? e * (1e3 / t) : 0;
60
+ }
61
+ const Gs = (e, t, n) => {
62
+ const s = t - e;
63
+ return ((n - e) % s + s) % s + e;
64
+ }, In = (e, t, n) => (((1 - 3 * n + 3 * t) * e + (3 * n - 6 * t)) * e + 3 * t) * e, zs = 1e-7, Ys = 12;
65
+ function Xs(e, t, n, s, r) {
66
+ let i, o, a = 0;
67
+ do
68
+ o = t + (n - t) / 2, i = In(o, s, r) - e, i > 0 ? n = o : t = o;
69
+ while (Math.abs(i) > zs && ++a < Ys);
70
+ return o;
71
+ }
72
+ function be(e, t, n, s) {
73
+ if (e === t && n === s)
74
+ return te;
75
+ const r = (i) => Xs(i, 0, 1, e, n);
76
+ return (i) => i === 0 || i === 1 ? i : In(r(i), t, s);
77
+ }
78
+ const Dn = (e) => (t) => t <= 0.5 ? e(2 * t) / 2 : (2 - e(2 * (1 - t))) / 2, Rn = (e) => (t) => 1 - e(1 - t), On = /* @__PURE__ */ be(0.33, 1.53, 0.69, 0.99), dt = /* @__PURE__ */ Rn(On), Fn = /* @__PURE__ */ Dn(dt), Pn = (e) => (e *= 2) < 1 ? 0.5 * dt(e) : 0.5 * (2 - Math.pow(2, -10 * (e - 1))), ht = (e) => 1 - Math.sin(Math.acos(e)), Zs = Rn(ht), Nn = Dn(ht), Js = /* @__PURE__ */ be(0.42, 0, 1, 1), Qs = /* @__PURE__ */ be(0, 0, 0.58, 1), Kn = /* @__PURE__ */ be(0.42, 0, 0.58, 1), Bn = (e) => Array.isArray(e) && typeof e[0] != "number";
79
+ function qn(e, t) {
80
+ return Bn(e) ? e[Gs(0, e.length, t)] : e;
81
+ }
82
+ const $n = (e) => Array.isArray(e) && typeof e[0] == "number", er = {
83
+ linear: te,
84
+ easeIn: Js,
85
+ easeInOut: Kn,
86
+ easeOut: Qs,
87
+ circIn: ht,
88
+ circInOut: Nn,
89
+ circOut: Zs,
90
+ backIn: dt,
91
+ backInOut: Fn,
92
+ backOut: On,
93
+ anticipate: Pn
94
+ }, tr = (e) => typeof e == "string", Kt = (e) => {
95
+ if ($n(e)) {
96
+ lt(e.length === 4);
97
+ const [t, n, s, r] = e;
98
+ return be(t, n, s, r);
99
+ } else if (tr(e))
100
+ return er[e];
101
+ return e;
102
+ }, xe = [
103
+ "setup",
104
+ // Compute
105
+ "read",
106
+ // Read
107
+ "resolveKeyframes",
108
+ // Write/Read/Write/Read
109
+ "preUpdate",
110
+ // Compute
111
+ "update",
112
+ // Compute
113
+ "preRender",
114
+ // Compute
115
+ "render",
116
+ // Write
117
+ "postRender"
118
+ // Compute
119
+ ];
120
+ function nr(e, t) {
121
+ let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = !1, i = !1;
122
+ const o = /* @__PURE__ */ new WeakSet();
123
+ let a = {
124
+ delta: 0,
125
+ timestamp: 0,
126
+ isProcessing: !1
127
+ };
128
+ function l(c) {
129
+ o.has(c) && (f.schedule(c), e()), c(a);
130
+ }
131
+ const f = {
132
+ /**
133
+ * Schedule a process to run on the next frame.
134
+ */
135
+ schedule: (c, u = !1, d = !1) => {
136
+ const p = d && r ? n : s;
137
+ return u && o.add(c), p.has(c) || p.add(c), c;
138
+ },
139
+ /**
140
+ * Cancel the provided callback from running on the next frame.
141
+ */
142
+ cancel: (c) => {
143
+ s.delete(c), o.delete(c);
144
+ },
145
+ /**
146
+ * Execute all schedule callbacks.
147
+ */
148
+ process: (c) => {
149
+ if (a = c, r) {
150
+ i = !0;
151
+ return;
152
+ }
153
+ r = !0, [n, s] = [s, n], n.forEach(l), n.clear(), r = !1, i && (i = !1, f.process(c));
154
+ }
155
+ };
156
+ return f;
157
+ }
158
+ const sr = 40;
159
+ function rr(e, t) {
160
+ let n = !1, s = !0;
161
+ const r = {
162
+ delta: 0,
163
+ timestamp: 0,
164
+ isProcessing: !1
165
+ }, i = () => n = !0, o = xe.reduce((v, A) => (v[A] = nr(i), v), {}), { setup: a, read: l, resolveKeyframes: f, preUpdate: c, update: u, preRender: d, render: h, postRender: p } = o, y = () => {
166
+ const v = K.useManualTiming ? r.timestamp : performance.now();
167
+ n = !1, K.useManualTiming || (r.delta = s ? 1e3 / 60 : Math.max(Math.min(v - r.timestamp, sr), 1)), r.timestamp = v, r.isProcessing = !0, a.process(r), l.process(r), f.process(r), c.process(r), u.process(r), d.process(r), h.process(r), p.process(r), r.isProcessing = !1, n && t && (s = !1, e(y));
168
+ }, b = () => {
169
+ n = !0, s = !0, r.isProcessing || e(y);
170
+ };
171
+ return { schedule: xe.reduce((v, A) => {
172
+ const m = o[A];
173
+ return v[A] = (x, V = !1, T = !1) => (n || b(), m.schedule(x, V, T)), v;
174
+ }, {}), cancel: (v) => {
175
+ for (let A = 0; A < xe.length; A++)
176
+ o[xe[A]].cancel(v);
177
+ }, state: r, steps: o };
178
+ }
179
+ const { schedule: B, cancel: Ge, state: Re } = /* @__PURE__ */ rr(typeof requestAnimationFrame < "u" ? requestAnimationFrame : te, !0);
180
+ let Ie;
181
+ function ir() {
182
+ Ie = void 0;
183
+ }
184
+ const D = {
185
+ now: () => (Ie === void 0 && D.set(Re.isProcessing || K.useManualTiming ? Re.timestamp : performance.now()), Ie),
186
+ set: (e) => {
187
+ Ie = e, queueMicrotask(ir);
188
+ }
189
+ }, Hn = (e) => (t) => typeof t == "string" && t.startsWith(e), Wn = /* @__PURE__ */ Hn("--"), or = /* @__PURE__ */ Hn("var(--"), mt = (e) => or(e) ? ar.test(e.split("/*")[0].trim()) : !1, ar = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu, ne = {
190
+ test: (e) => typeof e == "number",
191
+ parse: parseFloat,
192
+ transform: (e) => e
193
+ }, me = {
194
+ ...ne,
195
+ transform: (e) => z(0, 1, e)
196
+ }, Ee = {
197
+ ...ne,
198
+ default: 1
199
+ }, de = (e) => Math.round(e * 1e5) / 1e5, pt = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
200
+ function lr(e) {
201
+ return e == null;
202
+ }
203
+ const cr = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, gt = (e, t) => (n) => !!(typeof n == "string" && cr.test(n) && n.startsWith(e) || t && !lr(n) && Object.prototype.hasOwnProperty.call(n, t)), _n = (e, t, n) => (s) => {
204
+ if (typeof s != "string")
205
+ return s;
206
+ const [r, i, o, a] = s.match(pt);
207
+ return {
208
+ [e]: parseFloat(r),
209
+ [t]: parseFloat(i),
210
+ [n]: parseFloat(o),
211
+ alpha: a !== void 0 ? parseFloat(a) : 1
212
+ };
213
+ }, ur = (e) => z(0, 255, e), Ke = {
214
+ ...ne,
215
+ transform: (e) => Math.round(ur(e))
216
+ }, W = {
217
+ test: /* @__PURE__ */ gt("rgb", "red"),
218
+ parse: /* @__PURE__ */ _n("red", "green", "blue"),
219
+ transform: ({ red: e, green: t, blue: n, alpha: s = 1 }) => "rgba(" + Ke.transform(e) + ", " + Ke.transform(t) + ", " + Ke.transform(n) + ", " + de(me.transform(s)) + ")"
220
+ };
221
+ function fr(e) {
222
+ let t = "", n = "", s = "", r = "";
223
+ return e.length > 5 ? (t = e.substring(1, 3), n = e.substring(3, 5), s = e.substring(5, 7), r = e.substring(7, 9)) : (t = e.substring(1, 2), n = e.substring(2, 3), s = e.substring(3, 4), r = e.substring(4, 5), t += t, n += n, s += s, r += r), {
224
+ red: parseInt(t, 16),
225
+ green: parseInt(n, 16),
226
+ blue: parseInt(s, 16),
227
+ alpha: r ? parseInt(r, 16) / 255 : 1
228
+ };
229
+ }
230
+ const ze = {
231
+ test: /* @__PURE__ */ gt("#"),
232
+ parse: fr,
233
+ transform: W.transform
234
+ }, we = /* @__NO_SIDE_EFFECTS__ */ (e) => ({
235
+ test: (t) => typeof t == "string" && t.endsWith(e) && t.split(" ").length === 1,
236
+ parse: parseFloat,
237
+ transform: (t) => `${t}${e}`
238
+ }), $ = /* @__PURE__ */ we("deg"), J = /* @__PURE__ */ we("%"), g = /* @__PURE__ */ we("px"), dr = /* @__PURE__ */ we("vh"), hr = /* @__PURE__ */ we("vw"), Bt = {
239
+ ...J,
240
+ parse: (e) => J.parse(e) / 100,
241
+ transform: (e) => J.transform(e * 100)
242
+ }, X = {
243
+ test: /* @__PURE__ */ gt("hsl", "hue"),
244
+ parse: /* @__PURE__ */ _n("hue", "saturation", "lightness"),
245
+ transform: ({ hue: e, saturation: t, lightness: n, alpha: s = 1 }) => "hsla(" + Math.round(e) + ", " + J.transform(de(t)) + ", " + J.transform(de(n)) + ", " + de(me.transform(s)) + ")"
246
+ }, k = {
247
+ test: (e) => W.test(e) || ze.test(e) || X.test(e),
248
+ parse: (e) => W.test(e) ? W.parse(e) : X.test(e) ? X.parse(e) : ze.parse(e),
249
+ transform: (e) => typeof e == "string" ? e : e.hasOwnProperty("red") ? W.transform(e) : X.transform(e),
250
+ getAnimatableNone: (e) => {
251
+ const t = k.parse(e);
252
+ return t.alpha = 0, k.transform(t);
253
+ }
254
+ }, mr = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
255
+ function pr(e) {
256
+ var t, n;
257
+ return isNaN(e) && typeof e == "string" && (((t = e.match(pt)) == null ? void 0 : t.length) || 0) + (((n = e.match(mr)) == null ? void 0 : n.length) || 0) > 0;
258
+ }
259
+ const Un = "number", jn = "color", gr = "var", yr = "var(", qt = "${}", br = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
260
+ function pe(e) {
261
+ const t = e.toString(), n = [], s = {
262
+ color: [],
263
+ number: [],
264
+ var: []
265
+ }, r = [];
266
+ let i = 0;
267
+ const a = t.replace(br, (l) => (k.test(l) ? (s.color.push(i), r.push(jn), n.push(k.parse(l))) : l.startsWith(yr) ? (s.var.push(i), r.push(gr), n.push(l)) : (s.number.push(i), r.push(Un), n.push(parseFloat(l))), ++i, qt)).split(qt);
268
+ return { values: n, split: a, indexes: s, types: r };
269
+ }
270
+ function Gn(e) {
271
+ return pe(e).values;
272
+ }
273
+ function zn(e) {
274
+ const { split: t, types: n } = pe(e), s = t.length;
275
+ return (r) => {
276
+ let i = "";
277
+ for (let o = 0; o < s; o++)
278
+ if (i += t[o], r[o] !== void 0) {
279
+ const a = n[o];
280
+ a === Un ? i += de(r[o]) : a === jn ? i += k.transform(r[o]) : i += r[o];
281
+ }
282
+ return i;
283
+ };
284
+ }
285
+ const wr = (e) => typeof e == "number" ? 0 : k.test(e) ? k.getAnimatableNone(e) : e;
286
+ function Tr(e) {
287
+ const t = Gn(e);
288
+ return zn(e)(t.map(wr));
289
+ }
290
+ const se = {
291
+ test: pr,
292
+ parse: Gn,
293
+ createTransformer: zn,
294
+ getAnimatableNone: Tr
295
+ };
296
+ function Be(e, t, n) {
297
+ return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
298
+ }
299
+ function vr({ hue: e, saturation: t, lightness: n, alpha: s }) {
300
+ e /= 360, t /= 100, n /= 100;
301
+ let r = 0, i = 0, o = 0;
302
+ if (!t)
303
+ r = i = o = n;
304
+ else {
305
+ const a = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - a;
306
+ r = Be(l, a, e + 1 / 3), i = Be(l, a, e), o = Be(l, a, e - 1 / 3);
307
+ }
308
+ return {
309
+ red: Math.round(r * 255),
310
+ green: Math.round(i * 255),
311
+ blue: Math.round(o * 255),
312
+ alpha: s
313
+ };
314
+ }
315
+ function Oe(e, t) {
316
+ return (n) => n > 0 ? t : e;
317
+ }
318
+ const Te = (e, t, n) => e + (t - e) * n, qe = (e, t, n) => {
319
+ const s = e * e, r = n * (t * t - s) + s;
320
+ return r < 0 ? 0 : Math.sqrt(r);
321
+ }, Sr = [ze, W, X], Ar = (e) => Sr.find((t) => t.test(e));
322
+ function $t(e) {
323
+ const t = Ar(e);
324
+ if (!t)
325
+ return !1;
326
+ let n = t.parse(e);
327
+ return t === X && (n = vr(n)), n;
328
+ }
329
+ const Ht = (e, t) => {
330
+ const n = $t(e), s = $t(t);
331
+ if (!n || !s)
332
+ return Oe(e, t);
333
+ const r = { ...n };
334
+ return (i) => (r.red = qe(n.red, s.red, i), r.green = qe(n.green, s.green, i), r.blue = qe(n.blue, s.blue, i), r.alpha = Te(n.alpha, s.alpha, i), W.transform(r));
335
+ }, Ye = /* @__PURE__ */ new Set(["none", "hidden"]);
336
+ function xr(e, t) {
337
+ return Ye.has(e) ? (n) => n <= 0 ? e : t : (n) => n >= 1 ? t : e;
338
+ }
339
+ function Er(e, t) {
340
+ return (n) => Te(e, t, n);
341
+ }
342
+ function yt(e) {
343
+ return typeof e == "number" ? Er : typeof e == "string" ? mt(e) ? Oe : k.test(e) ? Ht : kr : Array.isArray(e) ? Yn : typeof e == "object" ? k.test(e) ? Ht : Vr : Oe;
344
+ }
345
+ function Yn(e, t) {
346
+ const n = [...e], s = n.length, r = e.map((i, o) => yt(i)(i, t[o]));
347
+ return (i) => {
348
+ for (let o = 0; o < s; o++)
349
+ n[o] = r[o](i);
350
+ return n;
351
+ };
352
+ }
353
+ function Vr(e, t) {
354
+ const n = { ...e, ...t }, s = {};
355
+ for (const r in n)
356
+ e[r] !== void 0 && t[r] !== void 0 && (s[r] = yt(e[r])(e[r], t[r]));
357
+ return (r) => {
358
+ for (const i in s)
359
+ n[i] = s[i](r);
360
+ return n;
361
+ };
362
+ }
363
+ function Mr(e, t) {
364
+ const n = [], s = { color: 0, var: 0, number: 0 };
365
+ for (let r = 0; r < t.values.length; r++) {
366
+ const i = t.types[r], o = e.indexes[i][s[i]], a = e.values[o] ?? 0;
367
+ n[r] = a, s[i]++;
368
+ }
369
+ return n;
370
+ }
371
+ const kr = (e, t) => {
372
+ const n = se.createTransformer(t), s = pe(e), r = pe(t);
373
+ return s.indexes.var.length === r.indexes.var.length && s.indexes.color.length === r.indexes.color.length && s.indexes.number.length >= r.indexes.number.length ? Ye.has(e) && !r.values.length || Ye.has(t) && !s.values.length ? xr(e, t) : ut(Yn(Mr(s, r), r.values), n) : Oe(e, t);
374
+ };
375
+ function Xn(e, t, n) {
376
+ return typeof e == "number" && typeof t == "number" && typeof n == "number" ? Te(e, t, n) : yt(e)(e, t);
377
+ }
378
+ const Lr = (e) => {
379
+ const t = ({ timestamp: n }) => e(n);
380
+ return {
381
+ start: (n = !0) => B.update(t, n),
382
+ stop: () => Ge(t),
383
+ /**
384
+ * If we're processing this frame we can use the
385
+ * framelocked timestamp to keep things in sync.
386
+ */
387
+ now: () => Re.isProcessing ? Re.timestamp : D.now()
388
+ };
389
+ }, Zn = (e, t, n = 10) => {
390
+ let s = "";
391
+ const r = Math.max(Math.round(t / n), 2);
392
+ for (let i = 0; i < r; i++)
393
+ s += Math.round(e(i / (r - 1)) * 1e4) / 1e4 + ", ";
394
+ return `linear(${s.substring(0, s.length - 2)})`;
395
+ }, Fe = 2e4;
396
+ function bt(e) {
397
+ let t = 0;
398
+ const n = 50;
399
+ let s = e.next(t);
400
+ for (; !s.done && t < Fe; )
401
+ t += n, s = e.next(t);
402
+ return t >= Fe ? 1 / 0 : t;
403
+ }
404
+ function Jn(e, t = 100, n) {
405
+ const s = n({ ...e, keyframes: [0, t] }), r = Math.min(bt(s), Fe);
406
+ return {
407
+ type: "keyframes",
408
+ ease: (i) => s.next(r * i).value / t,
409
+ duration: /* @__PURE__ */ N(r)
410
+ };
411
+ }
412
+ const Cr = 5;
413
+ function Qn(e, t, n) {
414
+ const s = Math.max(t - Cr, 0);
415
+ return Cn(n - e(s), t - s);
416
+ }
417
+ const M = {
418
+ // Default spring physics
419
+ stiffness: 100,
420
+ damping: 10,
421
+ mass: 1,
422
+ velocity: 0,
423
+ // Default duration/bounce-based options
424
+ duration: 800,
425
+ // in ms
426
+ bounce: 0.3,
427
+ visualDuration: 0.3,
428
+ // in seconds
429
+ // Rest thresholds
430
+ restSpeed: {
431
+ granular: 0.01,
432
+ default: 2
433
+ },
434
+ restDelta: {
435
+ granular: 5e-3,
436
+ default: 0.5
437
+ },
438
+ // Limits
439
+ minDuration: 0.01,
440
+ // in seconds
441
+ maxDuration: 10,
442
+ // in seconds
443
+ minDamping: 0.05,
444
+ maxDamping: 1
445
+ }, $e = 1e-3;
446
+ function Ir({ duration: e = M.duration, bounce: t = M.bounce, velocity: n = M.velocity, mass: s = M.mass }) {
447
+ let r, i, o = 1 - t;
448
+ o = z(M.minDamping, M.maxDamping, o), e = z(M.minDuration, M.maxDuration, /* @__PURE__ */ N(e)), o < 1 ? (r = (f) => {
449
+ const c = f * o, u = c * e, d = c - n, h = Xe(f, o), p = Math.exp(-u);
450
+ return $e - d / h * p;
451
+ }, i = (f) => {
452
+ const u = f * o * e, d = u * n + n, h = Math.pow(o, 2) * Math.pow(f, 2) * e, p = Math.exp(-u), y = Xe(Math.pow(f, 2), o);
453
+ return (-r(f) + $e > 0 ? -1 : 1) * ((d - h) * p) / y;
454
+ }) : (r = (f) => {
455
+ const c = Math.exp(-f * e), u = (f - n) * e + 1;
456
+ return -$e + c * u;
457
+ }, i = (f) => {
458
+ const c = Math.exp(-f * e), u = (n - f) * (e * e);
459
+ return c * u;
460
+ });
461
+ const a = 5 / e, l = Rr(r, i, a);
462
+ if (e = /* @__PURE__ */ O(e), isNaN(l))
463
+ return {
464
+ stiffness: M.stiffness,
465
+ damping: M.damping,
466
+ duration: e
467
+ };
468
+ {
469
+ const f = Math.pow(l, 2) * s;
470
+ return {
471
+ stiffness: f,
472
+ damping: o * 2 * Math.sqrt(s * f),
473
+ duration: e
474
+ };
475
+ }
476
+ }
477
+ const Dr = 12;
478
+ function Rr(e, t, n) {
479
+ let s = n;
480
+ for (let r = 1; r < Dr; r++)
481
+ s = s - e(s) / t(s);
482
+ return s;
483
+ }
484
+ function Xe(e, t) {
485
+ return e * Math.sqrt(1 - t * t);
486
+ }
487
+ const Or = ["duration", "bounce"], Fr = ["stiffness", "damping", "mass"];
488
+ function Wt(e, t) {
489
+ return t.some((n) => e[n] !== void 0);
490
+ }
491
+ function Pr(e) {
492
+ let t = {
493
+ velocity: M.velocity,
494
+ stiffness: M.stiffness,
495
+ damping: M.damping,
496
+ mass: M.mass,
497
+ isResolvedFromDuration: !1,
498
+ ...e
499
+ };
500
+ if (!Wt(e, Fr) && Wt(e, Or))
501
+ if (e.visualDuration) {
502
+ const n = e.visualDuration, s = 2 * Math.PI / (n * 1.2), r = s * s, i = 2 * z(0.05, 1, 1 - (e.bounce || 0)) * Math.sqrt(r);
503
+ t = {
504
+ ...t,
505
+ mass: M.mass,
506
+ stiffness: r,
507
+ damping: i
508
+ };
509
+ } else {
510
+ const n = Ir(e);
511
+ t = {
512
+ ...t,
513
+ ...n,
514
+ mass: M.mass
515
+ }, t.isResolvedFromDuration = !0;
516
+ }
517
+ return t;
518
+ }
519
+ function ee(e = M.visualDuration, t = M.bounce) {
520
+ const n = typeof e != "object" ? {
521
+ visualDuration: e,
522
+ keyframes: [0, 1],
523
+ bounce: t
524
+ } : e;
525
+ let { restSpeed: s, restDelta: r } = n;
526
+ const i = n.keyframes[0], o = n.keyframes[n.keyframes.length - 1], a = { done: !1, value: i }, { stiffness: l, damping: f, mass: c, duration: u, velocity: d, isResolvedFromDuration: h } = Pr({
527
+ ...n,
528
+ velocity: -/* @__PURE__ */ N(n.velocity || 0)
529
+ }), p = d || 0, y = f / (2 * Math.sqrt(l * c)), b = o - i, w = /* @__PURE__ */ N(Math.sqrt(l / c)), S = Math.abs(b) < 5;
530
+ s || (s = S ? M.restSpeed.granular : M.restSpeed.default), r || (r = S ? M.restDelta.granular : M.restDelta.default);
531
+ let v;
532
+ if (y < 1) {
533
+ const m = Xe(w, y);
534
+ v = (x) => {
535
+ const V = Math.exp(-y * w * x);
536
+ return o - V * ((p + y * w * b) / m * Math.sin(m * x) + b * Math.cos(m * x));
537
+ };
538
+ } else if (y === 1)
539
+ v = (m) => o - Math.exp(-w * m) * (b + (p + w * b) * m);
540
+ else {
541
+ const m = w * Math.sqrt(y * y - 1);
542
+ v = (x) => {
543
+ const V = Math.exp(-y * w * x), T = Math.min(m * x, 300);
544
+ return o - V * ((p + y * w * b) * Math.sinh(T) + m * b * Math.cosh(T)) / m;
545
+ };
546
+ }
547
+ const A = {
548
+ calculatedDuration: h && u || null,
549
+ next: (m) => {
550
+ const x = v(m);
551
+ if (h)
552
+ a.done = m >= u;
553
+ else {
554
+ let V = m === 0 ? p : 0;
555
+ y < 1 && (V = m === 0 ? /* @__PURE__ */ O(p) : Qn(v, m, x));
556
+ const T = Math.abs(V) <= s, E = Math.abs(o - x) <= r;
557
+ a.done = T && E;
558
+ }
559
+ return a.value = a.done ? o : x, a;
560
+ },
561
+ toString: () => {
562
+ const m = Math.min(bt(A), Fe), x = Zn((V) => A.next(m * V).value, m, 30);
563
+ return m + "ms " + x;
564
+ },
565
+ toTransition: () => {
566
+ }
567
+ };
568
+ return A;
569
+ }
570
+ ee.applyToOptions = (e) => {
571
+ const t = Jn(e, 100, ee);
572
+ return e.ease = t.ease, e.duration = /* @__PURE__ */ O(t.duration), e.type = "keyframes", e;
573
+ };
574
+ function Ze({ keyframes: e, velocity: t = 0, power: n = 0.8, timeConstant: s = 325, bounceDamping: r = 10, bounceStiffness: i = 500, modifyTarget: o, min: a, max: l, restDelta: f = 0.5, restSpeed: c }) {
575
+ const u = e[0], d = {
576
+ done: !1,
577
+ value: u
578
+ }, h = (T) => a !== void 0 && T < a || l !== void 0 && T > l, p = (T) => a === void 0 ? l : l === void 0 || Math.abs(a - T) < Math.abs(l - T) ? a : l;
579
+ let y = n * t;
580
+ const b = u + y, w = o === void 0 ? b : o(b);
581
+ w !== b && (y = w - u);
582
+ const S = (T) => -y * Math.exp(-T / s), v = (T) => w + S(T), A = (T) => {
583
+ const E = S(T), I = v(T);
584
+ d.done = Math.abs(E) <= f, d.value = d.done ? w : I;
585
+ };
586
+ let m, x;
587
+ const V = (T) => {
588
+ h(d.value) && (m = T, x = ee({
589
+ keyframes: [d.value, p(d.value)],
590
+ velocity: Qn(v, T, d.value),
591
+ // TODO: This should be passing * 1000
592
+ damping: r,
593
+ stiffness: i,
594
+ restDelta: f,
595
+ restSpeed: c
596
+ }));
597
+ };
598
+ return V(0), {
599
+ calculatedDuration: null,
600
+ next: (T) => {
601
+ let E = !1;
602
+ return !x && m === void 0 && (E = !0, A(T), V(T)), m !== void 0 && T >= m ? x.next(T - m) : (!E && A(T), d);
603
+ }
604
+ };
605
+ }
606
+ function Nr(e, t, n) {
607
+ const s = [], r = n || K.mix || Xn, i = e.length - 1;
608
+ for (let o = 0; o < i; o++) {
609
+ let a = r(e[o], e[o + 1]);
610
+ if (t) {
611
+ const l = Array.isArray(t) ? t[o] || te : t;
612
+ a = ut(l, a);
613
+ }
614
+ s.push(a);
615
+ }
616
+ return s;
617
+ }
618
+ function Kr(e, t, { clamp: n = !0, ease: s, mixer: r } = {}) {
619
+ const i = e.length;
620
+ if (lt(i === t.length), i === 1)
621
+ return () => t[0];
622
+ if (i === 2 && t[0] === t[1])
623
+ return () => t[1];
624
+ const o = e[0] === e[1];
625
+ e[0] > e[i - 1] && (e = [...e].reverse(), t = [...t].reverse());
626
+ const a = Nr(t, s, r), l = a.length, f = (c) => {
627
+ if (o && c < e[0])
628
+ return t[0];
629
+ let u = 0;
630
+ if (l > 1)
631
+ for (; u < e.length - 2 && !(c < e[u + 1]); u++)
632
+ ;
633
+ const d = /* @__PURE__ */ ft(e[u], e[u + 1], c);
634
+ return a[u](d);
635
+ };
636
+ return n ? (c) => f(z(e[0], e[i - 1], c)) : f;
637
+ }
638
+ function es(e, t) {
639
+ const n = e[e.length - 1];
640
+ for (let s = 1; s <= t; s++) {
641
+ const r = /* @__PURE__ */ ft(0, t, s);
642
+ e.push(Te(n, 1, r));
643
+ }
644
+ }
645
+ function ts(e) {
646
+ const t = [0];
647
+ return es(t, e.length - 1), t;
648
+ }
649
+ function Br(e, t) {
650
+ return e.map((n) => n * t);
651
+ }
652
+ function qr(e, t) {
653
+ return e.map(() => t || Kn).splice(0, e.length - 1);
654
+ }
655
+ function he({ duration: e = 300, keyframes: t, times: n, ease: s = "easeInOut" }) {
656
+ const r = Bn(s) ? s.map(Kt) : Kt(s), i = {
657
+ done: !1,
658
+ value: t[0]
659
+ }, o = Br(
660
+ // Only use the provided offsets if they're the correct length
661
+ // TODO Maybe we should warn here if there's a length mismatch
662
+ n && n.length === t.length ? n : ts(t),
663
+ e
664
+ ), a = Kr(o, t, {
665
+ ease: Array.isArray(r) ? r : qr(t, r)
666
+ });
667
+ return {
668
+ calculatedDuration: e,
669
+ next: (l) => (i.value = a(l), i.done = l >= e, i)
670
+ };
671
+ }
672
+ const $r = (e) => e !== null;
673
+ function wt(e, { repeat: t, repeatType: n = "loop" }, s, r = 1) {
674
+ const i = e.filter($r), a = r < 0 || t && n !== "loop" && t % 2 === 1 ? 0 : i.length - 1;
675
+ return !a || s === void 0 ? i[a] : s;
676
+ }
677
+ const Hr = {
678
+ decay: Ze,
679
+ inertia: Ze,
680
+ tween: he,
681
+ keyframes: he,
682
+ spring: ee
683
+ };
684
+ function ns(e) {
685
+ typeof e.type == "string" && (e.type = Hr[e.type]);
686
+ }
687
+ class Tt {
688
+ constructor() {
689
+ this.updateFinished();
690
+ }
691
+ get finished() {
692
+ return this._finished;
693
+ }
694
+ updateFinished() {
695
+ this._finished = new Promise((t) => {
696
+ this.resolve = t;
697
+ });
698
+ }
699
+ notifyFinished() {
700
+ this.resolve();
701
+ }
702
+ /**
703
+ * Allows the animation to be awaited.
704
+ *
705
+ * @deprecated Use `finished` instead.
706
+ */
707
+ then(t, n) {
708
+ return this.finished.then(t, n);
709
+ }
710
+ }
711
+ const Wr = (e) => e / 100;
712
+ class vt extends Tt {
713
+ constructor(t) {
714
+ super(), this.state = "idle", this.startTime = null, this.isStopped = !1, this.currentTime = 0, this.holdTime = null, this.playbackSpeed = 1, this.stop = () => {
715
+ var s, r;
716
+ const { motionValue: n } = this.options;
717
+ n && n.updatedAt !== D.now() && this.tick(D.now()), this.isStopped = !0, this.state !== "idle" && (this.teardown(), (r = (s = this.options).onStop) == null || r.call(s));
718
+ }, this.options = t, this.initAnimation(), this.play(), t.autoplay === !1 && this.pause();
719
+ }
720
+ initAnimation() {
721
+ const { options: t } = this;
722
+ ns(t);
723
+ const { type: n = he, repeat: s = 0, repeatDelay: r = 0, repeatType: i, velocity: o = 0 } = t;
724
+ let { keyframes: a } = t;
725
+ const l = n || he;
726
+ l !== he && typeof a[0] != "number" && (this.mixKeyframes = ut(Wr, Xn(a[0], a[1])), a = [0, 100]);
727
+ const f = l({ ...t, keyframes: a });
728
+ i === "mirror" && (this.mirroredGenerator = l({
729
+ ...t,
730
+ keyframes: [...a].reverse(),
731
+ velocity: -o
732
+ })), f.calculatedDuration === null && (f.calculatedDuration = bt(f));
733
+ const { calculatedDuration: c } = f;
734
+ this.calculatedDuration = c, this.resolvedDuration = c + r, this.totalDuration = this.resolvedDuration * (s + 1) - r, this.generator = f;
735
+ }
736
+ updateTime(t) {
737
+ const n = Math.round(t - this.startTime) * this.playbackSpeed;
738
+ this.holdTime !== null ? this.currentTime = this.holdTime : this.currentTime = n;
739
+ }
740
+ tick(t, n = !1) {
741
+ const { generator: s, totalDuration: r, mixKeyframes: i, mirroredGenerator: o, resolvedDuration: a, calculatedDuration: l } = this;
742
+ if (this.startTime === null)
743
+ return s.next(0);
744
+ const { delay: f = 0, keyframes: c, repeat: u, repeatType: d, repeatDelay: h, type: p, onUpdate: y, finalKeyframe: b } = this.options;
745
+ this.speed > 0 ? this.startTime = Math.min(this.startTime, t) : this.speed < 0 && (this.startTime = Math.min(t - r / this.speed, this.startTime)), n ? this.currentTime = t : this.updateTime(t);
746
+ const w = this.currentTime - f * (this.playbackSpeed >= 0 ? 1 : -1), S = this.playbackSpeed >= 0 ? w < 0 : w > r;
747
+ this.currentTime = Math.max(w, 0), this.state === "finished" && this.holdTime === null && (this.currentTime = r);
748
+ let v = this.currentTime, A = s;
749
+ if (u) {
750
+ const T = Math.min(this.currentTime, r) / a;
751
+ let E = Math.floor(T), I = T % 1;
752
+ !I && T >= 1 && (I = 1), I === 1 && E--, E = Math.min(E, u + 1), !!(E % 2) && (d === "reverse" ? (I = 1 - I, h && (I -= h / a)) : d === "mirror" && (A = o)), v = z(0, 1, I) * a;
753
+ }
754
+ const m = S ? { done: !1, value: c[0] } : A.next(v);
755
+ i && (m.value = i(m.value));
756
+ let { done: x } = m;
757
+ !S && l !== null && (x = this.playbackSpeed >= 0 ? this.currentTime >= r : this.currentTime <= 0);
758
+ const V = this.holdTime === null && (this.state === "finished" || this.state === "running" && x);
759
+ return V && p !== Ze && (m.value = wt(c, this.options, b, this.speed)), y && y(m.value), V && this.finish(), m;
760
+ }
761
+ /**
762
+ * Allows the returned animation to be awaited or promise-chained. Currently
763
+ * resolves when the animation finishes at all but in a future update could/should
764
+ * reject if its cancels.
765
+ */
766
+ then(t, n) {
767
+ return this.finished.then(t, n);
768
+ }
769
+ get duration() {
770
+ return /* @__PURE__ */ N(this.calculatedDuration);
771
+ }
772
+ get time() {
773
+ return /* @__PURE__ */ N(this.currentTime);
774
+ }
775
+ set time(t) {
776
+ var n;
777
+ t = /* @__PURE__ */ O(t), this.currentTime = t, this.startTime === null || this.holdTime !== null || this.playbackSpeed === 0 ? this.holdTime = t : this.driver && (this.startTime = this.driver.now() - t / this.playbackSpeed), (n = this.driver) == null || n.start(!1);
778
+ }
779
+ get speed() {
780
+ return this.playbackSpeed;
781
+ }
782
+ set speed(t) {
783
+ this.updateTime(D.now());
784
+ const n = this.playbackSpeed !== t;
785
+ this.playbackSpeed = t, n && (this.time = /* @__PURE__ */ N(this.currentTime));
786
+ }
787
+ play() {
788
+ var r, i;
789
+ if (this.isStopped)
790
+ return;
791
+ const { driver: t = Lr, startTime: n } = this.options;
792
+ this.driver || (this.driver = t((o) => this.tick(o))), (i = (r = this.options).onPlay) == null || i.call(r);
793
+ const s = this.driver.now();
794
+ this.state === "finished" ? (this.updateFinished(), this.startTime = s) : this.holdTime !== null ? this.startTime = s - this.holdTime : this.startTime || (this.startTime = n ?? s), this.state === "finished" && this.speed < 0 && (this.startTime += this.calculatedDuration), this.holdTime = null, this.state = "running", this.driver.start();
795
+ }
796
+ pause() {
797
+ this.state = "paused", this.updateTime(D.now()), this.holdTime = this.currentTime;
798
+ }
799
+ complete() {
800
+ this.state !== "running" && this.play(), this.state = "finished", this.holdTime = null;
801
+ }
802
+ finish() {
803
+ var t, n;
804
+ this.notifyFinished(), this.teardown(), this.state = "finished", (n = (t = this.options).onComplete) == null || n.call(t);
805
+ }
806
+ cancel() {
807
+ var t, n;
808
+ this.holdTime = null, this.startTime = 0, this.tick(0), this.teardown(), (n = (t = this.options).onCancel) == null || n.call(t);
809
+ }
810
+ teardown() {
811
+ this.state = "idle", this.stopDriver(), this.startTime = this.holdTime = null;
812
+ }
813
+ stopDriver() {
814
+ this.driver && (this.driver.stop(), this.driver = void 0);
815
+ }
816
+ sample(t) {
817
+ return this.startTime = 0, this.tick(t, !0);
818
+ }
819
+ attachTimeline(t) {
820
+ var n;
821
+ return this.options.allowFlatten && (this.options.type = "keyframes", this.options.ease = "linear", this.initAnimation()), (n = this.driver) == null || n.stop(), t.observe(this);
822
+ }
823
+ }
824
+ function _r(e) {
825
+ for (let t = 1; t < e.length; t++)
826
+ e[t] ?? (e[t] = e[t - 1]);
827
+ }
828
+ const _ = (e) => e * 180 / Math.PI, Je = (e) => {
829
+ const t = _(Math.atan2(e[1], e[0]));
830
+ return Qe(t);
831
+ }, Ur = {
832
+ x: 4,
833
+ y: 5,
834
+ translateX: 4,
835
+ translateY: 5,
836
+ scaleX: 0,
837
+ scaleY: 3,
838
+ scale: (e) => (Math.abs(e[0]) + Math.abs(e[3])) / 2,
839
+ rotate: Je,
840
+ rotateZ: Je,
841
+ skewX: (e) => _(Math.atan(e[1])),
842
+ skewY: (e) => _(Math.atan(e[2])),
843
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[2])) / 2
844
+ }, Qe = (e) => (e = e % 360, e < 0 && (e += 360), e), _t = Je, Ut = (e) => Math.sqrt(e[0] * e[0] + e[1] * e[1]), jt = (e) => Math.sqrt(e[4] * e[4] + e[5] * e[5]), jr = {
845
+ x: 12,
846
+ y: 13,
847
+ z: 14,
848
+ translateX: 12,
849
+ translateY: 13,
850
+ translateZ: 14,
851
+ scaleX: Ut,
852
+ scaleY: jt,
853
+ scale: (e) => (Ut(e) + jt(e)) / 2,
854
+ rotateX: (e) => Qe(_(Math.atan2(e[6], e[5]))),
855
+ rotateY: (e) => Qe(_(Math.atan2(-e[2], e[0]))),
856
+ rotateZ: _t,
857
+ rotate: _t,
858
+ skewX: (e) => _(Math.atan(e[4])),
859
+ skewY: (e) => _(Math.atan(e[1])),
860
+ skew: (e) => (Math.abs(e[1]) + Math.abs(e[4])) / 2
861
+ };
862
+ function et(e) {
863
+ return e.includes("scale") ? 1 : 0;
864
+ }
865
+ function tt(e, t) {
866
+ if (!e || e === "none")
867
+ return et(t);
868
+ const n = e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);
869
+ let s, r;
870
+ if (n)
871
+ s = jr, r = n;
872
+ else {
873
+ const a = e.match(/^matrix\(([-\d.e\s,]+)\)$/u);
874
+ s = Ur, r = a;
875
+ }
876
+ if (!r)
877
+ return et(t);
878
+ const i = s[t], o = r[1].split(",").map(zr);
879
+ return typeof i == "function" ? i(o) : o[i];
880
+ }
881
+ const Gr = (e, t) => {
882
+ const { transform: n = "none" } = getComputedStyle(e);
883
+ return tt(n, t);
884
+ };
885
+ function zr(e) {
886
+ return parseFloat(e.trim());
887
+ }
888
+ const re = [
889
+ "transformPerspective",
890
+ "x",
891
+ "y",
892
+ "z",
893
+ "translateX",
894
+ "translateY",
895
+ "translateZ",
896
+ "scale",
897
+ "scaleX",
898
+ "scaleY",
899
+ "rotate",
900
+ "rotateX",
901
+ "rotateY",
902
+ "rotateZ",
903
+ "skew",
904
+ "skewX",
905
+ "skewY"
906
+ ], ie = new Set(re), Gt = (e) => e === ne || e === g, Yr = /* @__PURE__ */ new Set(["x", "y", "z"]), Xr = re.filter((e) => !Yr.has(e));
907
+ function Zr(e) {
908
+ const t = [];
909
+ return Xr.forEach((n) => {
910
+ const s = e.getValue(n);
911
+ s !== void 0 && (t.push([n, s.get()]), s.set(n.startsWith("scale") ? 1 : 0));
912
+ }), t;
913
+ }
914
+ const U = {
915
+ // Dimensions
916
+ width: ({ x: e }, { paddingLeft: t = "0", paddingRight: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
917
+ height: ({ y: e }, { paddingTop: t = "0", paddingBottom: n = "0" }) => e.max - e.min - parseFloat(t) - parseFloat(n),
918
+ top: (e, { top: t }) => parseFloat(t),
919
+ left: (e, { left: t }) => parseFloat(t),
920
+ bottom: ({ y: e }, { top: t }) => parseFloat(t) + (e.max - e.min),
921
+ right: ({ x: e }, { left: t }) => parseFloat(t) + (e.max - e.min),
922
+ // Transform
923
+ x: (e, { transform: t }) => tt(t, "x"),
924
+ y: (e, { transform: t }) => tt(t, "y")
925
+ };
926
+ U.translateX = U.x;
927
+ U.translateY = U.y;
928
+ const j = /* @__PURE__ */ new Set();
929
+ let nt = !1, st = !1, rt = !1;
930
+ function ss() {
931
+ if (st) {
932
+ const e = Array.from(j).filter((s) => s.needsMeasurement), t = new Set(e.map((s) => s.element)), n = /* @__PURE__ */ new Map();
933
+ t.forEach((s) => {
934
+ const r = Zr(s);
935
+ r.length && (n.set(s, r), s.render());
936
+ }), e.forEach((s) => s.measureInitialState()), t.forEach((s) => {
937
+ s.render();
938
+ const r = n.get(s);
939
+ r && r.forEach(([i, o]) => {
940
+ var a;
941
+ (a = s.getValue(i)) == null || a.set(o);
942
+ });
943
+ }), e.forEach((s) => s.measureEndState()), e.forEach((s) => {
944
+ s.suspendedScrollY !== void 0 && window.scrollTo(0, s.suspendedScrollY);
945
+ });
946
+ }
947
+ st = !1, nt = !1, j.forEach((e) => e.complete(rt)), j.clear();
948
+ }
949
+ function rs() {
950
+ j.forEach((e) => {
951
+ e.readKeyframes(), e.needsMeasurement && (st = !0);
952
+ });
953
+ }
954
+ function Jr() {
955
+ rt = !0, rs(), ss(), rt = !1;
956
+ }
957
+ class St {
958
+ constructor(t, n, s, r, i, o = !1) {
959
+ this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...t], this.onComplete = n, this.name = s, this.motionValue = r, this.element = i, this.isAsync = o;
960
+ }
961
+ scheduleResolve() {
962
+ this.state = "scheduled", this.isAsync ? (j.add(this), nt || (nt = !0, B.read(rs), B.resolveKeyframes(ss))) : (this.readKeyframes(), this.complete());
963
+ }
964
+ readKeyframes() {
965
+ const { unresolvedKeyframes: t, name: n, element: s, motionValue: r } = this;
966
+ if (t[0] === null) {
967
+ const i = r == null ? void 0 : r.get(), o = t[t.length - 1];
968
+ if (i !== void 0)
969
+ t[0] = i;
970
+ else if (s && n) {
971
+ const a = s.readValue(n, o);
972
+ a != null && (t[0] = a);
973
+ }
974
+ t[0] === void 0 && (t[0] = o), r && i === void 0 && r.set(t[0]);
975
+ }
976
+ _r(t);
977
+ }
978
+ setFinalKeyframe() {
979
+ }
980
+ measureInitialState() {
981
+ }
982
+ renderEndStyles() {
983
+ }
984
+ measureEndState() {
985
+ }
986
+ complete(t = !1) {
987
+ this.state = "complete", this.onComplete(this.unresolvedKeyframes, this.finalKeyframe, t), j.delete(this);
988
+ }
989
+ cancel() {
990
+ this.state === "scheduled" && (j.delete(this), this.state = "pending");
991
+ }
992
+ resume() {
993
+ this.state === "pending" && this.scheduleResolve();
994
+ }
995
+ }
996
+ const Qr = (e) => e.startsWith("--");
997
+ function ei(e, t, n) {
998
+ Qr(t) ? e.style.setProperty(t, n) : e.style[t] = n;
999
+ }
1000
+ const ti = /* @__PURE__ */ ct(() => window.ScrollTimeline !== void 0), ni = {};
1001
+ function si(e, t) {
1002
+ const n = /* @__PURE__ */ ct(e);
1003
+ return () => ni[t] ?? n();
1004
+ }
1005
+ const is = /* @__PURE__ */ si(() => {
1006
+ try {
1007
+ document.createElement("div").animate({ opacity: 0 }, { easing: "linear(0, 1)" });
1008
+ } catch {
1009
+ return !1;
1010
+ }
1011
+ return !0;
1012
+ }, "linearEasing"), fe = ([e, t, n, s]) => `cubic-bezier(${e}, ${t}, ${n}, ${s})`, zt = {
1013
+ linear: "linear",
1014
+ ease: "ease",
1015
+ easeIn: "ease-in",
1016
+ easeOut: "ease-out",
1017
+ easeInOut: "ease-in-out",
1018
+ circIn: /* @__PURE__ */ fe([0, 0.65, 0.55, 1]),
1019
+ circOut: /* @__PURE__ */ fe([0.55, 0, 1, 0.45]),
1020
+ backIn: /* @__PURE__ */ fe([0.31, 0.01, 0.66, -0.59]),
1021
+ backOut: /* @__PURE__ */ fe([0.33, 1.53, 0.69, 0.99])
1022
+ };
1023
+ function os(e, t) {
1024
+ if (e)
1025
+ return typeof e == "function" ? is() ? Zn(e, t) : "ease-out" : $n(e) ? fe(e) : Array.isArray(e) ? e.map((n) => os(n, t) || zt.easeOut) : zt[e];
1026
+ }
1027
+ function ri(e, t, n, { delay: s = 0, duration: r = 300, repeat: i = 0, repeatType: o = "loop", ease: a = "easeOut", times: l } = {}, f = void 0) {
1028
+ const c = {
1029
+ [t]: n
1030
+ };
1031
+ l && (c.offset = l);
1032
+ const u = os(a, r);
1033
+ Array.isArray(u) && (c.easing = u);
1034
+ const d = {
1035
+ delay: s,
1036
+ duration: r,
1037
+ easing: Array.isArray(u) ? "linear" : u,
1038
+ fill: "both",
1039
+ iterations: i + 1,
1040
+ direction: o === "reverse" ? "alternate" : "normal"
1041
+ };
1042
+ return f && (d.pseudoElement = f), e.animate(c, d);
1043
+ }
1044
+ function At(e) {
1045
+ return typeof e == "function" && "applyToOptions" in e;
1046
+ }
1047
+ function ii({ type: e, ...t }) {
1048
+ return At(e) && is() ? e.applyToOptions(t) : (t.duration ?? (t.duration = 300), t.ease ?? (t.ease = "easeOut"), t);
1049
+ }
1050
+ class oi extends Tt {
1051
+ constructor(t) {
1052
+ if (super(), this.finishedTime = null, this.isStopped = !1, !t)
1053
+ return;
1054
+ const { element: n, name: s, keyframes: r, pseudoElement: i, allowFlatten: o = !1, finalKeyframe: a, onComplete: l } = t;
1055
+ this.isPseudoElement = !!i, this.allowFlatten = o, this.options = t, lt(typeof t.type != "string");
1056
+ const f = ii(t);
1057
+ this.animation = ri(n, s, r, f, i), f.autoplay === !1 && this.animation.pause(), this.animation.onfinish = () => {
1058
+ if (this.finishedTime = this.time, !i) {
1059
+ const c = wt(r, this.options, a, this.speed);
1060
+ this.updateMotionValue ? this.updateMotionValue(c) : ei(n, s, c), this.animation.cancel();
1061
+ }
1062
+ l == null || l(), this.notifyFinished();
1063
+ };
1064
+ }
1065
+ play() {
1066
+ this.isStopped || (this.animation.play(), this.state === "finished" && this.updateFinished());
1067
+ }
1068
+ pause() {
1069
+ this.animation.pause();
1070
+ }
1071
+ complete() {
1072
+ var t, n;
1073
+ (n = (t = this.animation).finish) == null || n.call(t);
1074
+ }
1075
+ cancel() {
1076
+ try {
1077
+ this.animation.cancel();
1078
+ } catch {
1079
+ }
1080
+ }
1081
+ stop() {
1082
+ if (this.isStopped)
1083
+ return;
1084
+ this.isStopped = !0;
1085
+ const { state: t } = this;
1086
+ t === "idle" || t === "finished" || (this.updateMotionValue ? this.updateMotionValue() : this.commitStyles(), this.isPseudoElement || this.cancel());
1087
+ }
1088
+ /**
1089
+ * WAAPI doesn't natively have any interruption capabilities.
1090
+ *
1091
+ * In this method, we commit styles back to the DOM before cancelling
1092
+ * the animation.
1093
+ *
1094
+ * This is designed to be overridden by NativeAnimationExtended, which
1095
+ * will create a renderless JS animation and sample it twice to calculate
1096
+ * its current value, "previous" value, and therefore allow
1097
+ * Motion to also correctly calculate velocity for any subsequent animation
1098
+ * while deferring the commit until the next animation frame.
1099
+ */
1100
+ commitStyles() {
1101
+ var t, n;
1102
+ this.isPseudoElement || (n = (t = this.animation).commitStyles) == null || n.call(t);
1103
+ }
1104
+ get duration() {
1105
+ var n, s;
1106
+ const t = ((s = (n = this.animation.effect) == null ? void 0 : n.getComputedTiming) == null ? void 0 : s.call(n).duration) || 0;
1107
+ return /* @__PURE__ */ N(Number(t));
1108
+ }
1109
+ get time() {
1110
+ return /* @__PURE__ */ N(Number(this.animation.currentTime) || 0);
1111
+ }
1112
+ set time(t) {
1113
+ this.finishedTime = null, this.animation.currentTime = /* @__PURE__ */ O(t);
1114
+ }
1115
+ /**
1116
+ * The playback speed of the animation.
1117
+ * 1 = normal speed, 2 = double speed, 0.5 = half speed.
1118
+ */
1119
+ get speed() {
1120
+ return this.animation.playbackRate;
1121
+ }
1122
+ set speed(t) {
1123
+ t < 0 && (this.finishedTime = null), this.animation.playbackRate = t;
1124
+ }
1125
+ get state() {
1126
+ return this.finishedTime !== null ? "finished" : this.animation.playState;
1127
+ }
1128
+ get startTime() {
1129
+ return Number(this.animation.startTime);
1130
+ }
1131
+ set startTime(t) {
1132
+ this.animation.startTime = t;
1133
+ }
1134
+ /**
1135
+ * Attaches a timeline to the animation, for instance the `ScrollTimeline`.
1136
+ */
1137
+ attachTimeline({ timeline: t, observe: n }) {
1138
+ var s;
1139
+ return this.allowFlatten && ((s = this.animation.effect) == null || s.updateTiming({ easing: "linear" })), this.animation.onfinish = null, t && ti() ? (this.animation.timeline = t, te) : n(this);
1140
+ }
1141
+ }
1142
+ const as = {
1143
+ anticipate: Pn,
1144
+ backInOut: Fn,
1145
+ circInOut: Nn
1146
+ };
1147
+ function ai(e) {
1148
+ return e in as;
1149
+ }
1150
+ function li(e) {
1151
+ typeof e.ease == "string" && ai(e.ease) && (e.ease = as[e.ease]);
1152
+ }
1153
+ const Yt = 10;
1154
+ class ci extends oi {
1155
+ constructor(t) {
1156
+ li(t), ns(t), super(t), t.startTime && (this.startTime = t.startTime), this.options = t;
1157
+ }
1158
+ /**
1159
+ * WAAPI doesn't natively have any interruption capabilities.
1160
+ *
1161
+ * Rather than read commited styles back out of the DOM, we can
1162
+ * create a renderless JS animation and sample it twice to calculate
1163
+ * its current value, "previous" value, and therefore allow
1164
+ * Motion to calculate velocity for any subsequent animation.
1165
+ */
1166
+ updateMotionValue(t) {
1167
+ const { motionValue: n, onUpdate: s, onComplete: r, element: i, ...o } = this.options;
1168
+ if (!n)
1169
+ return;
1170
+ if (t !== void 0) {
1171
+ n.set(t);
1172
+ return;
1173
+ }
1174
+ const a = new vt({
1175
+ ...o,
1176
+ autoplay: !1
1177
+ }), l = /* @__PURE__ */ O(this.finishedTime ?? this.time);
1178
+ n.setWithVelocity(a.sample(l - Yt).value, a.sample(l).value, Yt), a.stop();
1179
+ }
1180
+ }
1181
+ const Xt = (e, t) => t === "zIndex" ? !1 : !!(typeof e == "number" || Array.isArray(e) || typeof e == "string" && // It's animatable if we have a string
1182
+ (se.test(e) || e === "0") && // And it contains numbers and/or colors
1183
+ !e.startsWith("url("));
1184
+ function ui(e) {
1185
+ const t = e[0];
1186
+ if (e.length === 1)
1187
+ return !0;
1188
+ for (let n = 0; n < e.length; n++)
1189
+ if (e[n] !== t)
1190
+ return !0;
1191
+ }
1192
+ function fi(e, t, n, s) {
1193
+ const r = e[0];
1194
+ if (r === null)
1195
+ return !1;
1196
+ if (t === "display" || t === "visibility")
1197
+ return !0;
1198
+ const i = e[e.length - 1], o = Xt(r, t), a = Xt(i, t);
1199
+ return !o || !a ? !1 : ui(e) || (n === "spring" || At(n)) && s;
1200
+ }
1201
+ function di(e) {
1202
+ return Mn(e) && "offsetHeight" in e;
1203
+ }
1204
+ const hi = /* @__PURE__ */ new Set([
1205
+ "opacity",
1206
+ "clipPath",
1207
+ "filter",
1208
+ "transform"
1209
+ // TODO: Could be re-enabled now we have support for linear() easing
1210
+ // "background-color"
1211
+ ]), mi = /* @__PURE__ */ ct(() => Object.hasOwnProperty.call(Element.prototype, "animate"));
1212
+ function pi(e) {
1213
+ var f;
1214
+ const { motionValue: t, name: n, repeatDelay: s, repeatType: r, damping: i, type: o } = e;
1215
+ if (!di((f = t == null ? void 0 : t.owner) == null ? void 0 : f.current))
1216
+ return !1;
1217
+ const { onUpdate: a, transformTemplate: l } = t.owner.getProps();
1218
+ return mi() && n && hi.has(n) && (n !== "transform" || !l) && /**
1219
+ * If we're outputting values to onUpdate then we can't use WAAPI as there's
1220
+ * no way to read the value from WAAPI every frame.
1221
+ */
1222
+ !a && !s && r !== "mirror" && i !== 0 && o !== "inertia";
1223
+ }
1224
+ const gi = 40;
1225
+ class yi extends Tt {
1226
+ constructor({ autoplay: t = !0, delay: n = 0, type: s = "keyframes", repeat: r = 0, repeatDelay: i = 0, repeatType: o = "loop", keyframes: a, name: l, motionValue: f, element: c, ...u }) {
1227
+ var p;
1228
+ super(), this.stop = () => {
1229
+ var y, b;
1230
+ this._animation && (this._animation.stop(), (y = this.stopTimeline) == null || y.call(this)), (b = this.keyframeResolver) == null || b.cancel();
1231
+ }, this.createdAt = D.now();
1232
+ const d = {
1233
+ autoplay: t,
1234
+ delay: n,
1235
+ type: s,
1236
+ repeat: r,
1237
+ repeatDelay: i,
1238
+ repeatType: o,
1239
+ name: l,
1240
+ motionValue: f,
1241
+ element: c,
1242
+ ...u
1243
+ }, h = (c == null ? void 0 : c.KeyframeResolver) || St;
1244
+ this.keyframeResolver = new h(a, (y, b, w) => this.onKeyframesResolved(y, b, d, !w), l, f, c), (p = this.keyframeResolver) == null || p.scheduleResolve();
1245
+ }
1246
+ onKeyframesResolved(t, n, s, r) {
1247
+ this.keyframeResolver = void 0;
1248
+ const { name: i, type: o, velocity: a, delay: l, isHandoff: f, onUpdate: c } = s;
1249
+ this.resolvedAt = D.now(), fi(t, i, o, a) || ((K.instantAnimations || !l) && (c == null || c(wt(t, s, n))), t[0] = t[t.length - 1], s.duration = 0, s.repeat = 0);
1250
+ const d = {
1251
+ startTime: r ? this.resolvedAt ? this.resolvedAt - this.createdAt > gi ? this.resolvedAt : this.createdAt : this.createdAt : void 0,
1252
+ finalKeyframe: n,
1253
+ ...s,
1254
+ keyframes: t
1255
+ }, h = !f && pi(d) ? new ci({
1256
+ ...d,
1257
+ element: d.motionValue.owner.current
1258
+ }) : new vt(d);
1259
+ h.finished.then(() => this.notifyFinished()).catch(te), this.pendingTimeline && (this.stopTimeline = h.attachTimeline(this.pendingTimeline), this.pendingTimeline = void 0), this._animation = h;
1260
+ }
1261
+ get finished() {
1262
+ return this._animation ? this.animation.finished : this._finished;
1263
+ }
1264
+ then(t, n) {
1265
+ return this.finished.finally(t).then(() => {
1266
+ });
1267
+ }
1268
+ get animation() {
1269
+ var t;
1270
+ return this._animation || ((t = this.keyframeResolver) == null || t.resume(), Jr()), this._animation;
1271
+ }
1272
+ get duration() {
1273
+ return this.animation.duration;
1274
+ }
1275
+ get time() {
1276
+ return this.animation.time;
1277
+ }
1278
+ set time(t) {
1279
+ this.animation.time = t;
1280
+ }
1281
+ get speed() {
1282
+ return this.animation.speed;
1283
+ }
1284
+ get state() {
1285
+ return this.animation.state;
1286
+ }
1287
+ set speed(t) {
1288
+ this.animation.speed = t;
1289
+ }
1290
+ get startTime() {
1291
+ return this.animation.startTime;
1292
+ }
1293
+ attachTimeline(t) {
1294
+ return this._animation ? this.stopTimeline = this.animation.attachTimeline(t) : this.pendingTimeline = t, () => this.stop();
1295
+ }
1296
+ play() {
1297
+ this.animation.play();
1298
+ }
1299
+ pause() {
1300
+ this.animation.pause();
1301
+ }
1302
+ complete() {
1303
+ this.animation.complete();
1304
+ }
1305
+ cancel() {
1306
+ var t;
1307
+ this._animation && this.animation.cancel(), (t = this.keyframeResolver) == null || t.cancel();
1308
+ }
1309
+ }
1310
+ class bi {
1311
+ constructor(t) {
1312
+ this.stop = () => this.runAll("stop"), this.animations = t.filter(Boolean);
1313
+ }
1314
+ get finished() {
1315
+ return Promise.all(this.animations.map((t) => t.finished));
1316
+ }
1317
+ /**
1318
+ * TODO: Filter out cancelled or stopped animations before returning
1319
+ */
1320
+ getAll(t) {
1321
+ return this.animations[0][t];
1322
+ }
1323
+ setAll(t, n) {
1324
+ for (let s = 0; s < this.animations.length; s++)
1325
+ this.animations[s][t] = n;
1326
+ }
1327
+ attachTimeline(t) {
1328
+ const n = this.animations.map((s) => s.attachTimeline(t));
1329
+ return () => {
1330
+ n.forEach((s, r) => {
1331
+ s && s(), this.animations[r].stop();
1332
+ });
1333
+ };
1334
+ }
1335
+ get time() {
1336
+ return this.getAll("time");
1337
+ }
1338
+ set time(t) {
1339
+ this.setAll("time", t);
1340
+ }
1341
+ get speed() {
1342
+ return this.getAll("speed");
1343
+ }
1344
+ set speed(t) {
1345
+ this.setAll("speed", t);
1346
+ }
1347
+ get state() {
1348
+ return this.getAll("state");
1349
+ }
1350
+ get startTime() {
1351
+ return this.getAll("startTime");
1352
+ }
1353
+ get duration() {
1354
+ let t = 0;
1355
+ for (let n = 0; n < this.animations.length; n++)
1356
+ t = Math.max(t, this.animations[n].duration);
1357
+ return t;
1358
+ }
1359
+ runAll(t) {
1360
+ this.animations.forEach((n) => n[t]());
1361
+ }
1362
+ play() {
1363
+ this.runAll("play");
1364
+ }
1365
+ pause() {
1366
+ this.runAll("pause");
1367
+ }
1368
+ cancel() {
1369
+ this.runAll("cancel");
1370
+ }
1371
+ complete() {
1372
+ this.runAll("complete");
1373
+ }
1374
+ }
1375
+ class wi extends bi {
1376
+ then(t, n) {
1377
+ return this.finished.finally(t).then(() => {
1378
+ });
1379
+ }
1380
+ }
1381
+ const Ti = (
1382
+ // eslint-disable-next-line redos-detector/no-unsafe-regex -- false positive, as it can match a lot of words
1383
+ /^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u
1384
+ );
1385
+ function vi(e) {
1386
+ const t = Ti.exec(e);
1387
+ if (!t)
1388
+ return [,];
1389
+ const [, n, s, r] = t;
1390
+ return [`--${n ?? s}`, r];
1391
+ }
1392
+ function ls(e, t, n = 1) {
1393
+ const [s, r] = vi(e);
1394
+ if (!s)
1395
+ return;
1396
+ const i = window.getComputedStyle(t).getPropertyValue(s);
1397
+ if (i) {
1398
+ const o = i.trim();
1399
+ return Vn(o) ? parseFloat(o) : o;
1400
+ }
1401
+ return mt(r) ? ls(r, t, n + 1) : r;
1402
+ }
1403
+ function cs(e, t) {
1404
+ return (e == null ? void 0 : e[t]) ?? (e == null ? void 0 : e.default) ?? e;
1405
+ }
1406
+ const us = /* @__PURE__ */ new Set([
1407
+ "width",
1408
+ "height",
1409
+ "top",
1410
+ "left",
1411
+ "right",
1412
+ "bottom",
1413
+ ...re
1414
+ ]), Si = {
1415
+ test: (e) => e === "auto",
1416
+ parse: (e) => e
1417
+ }, fs = (e) => (t) => t.test(e), ds = [ne, g, J, $, hr, dr, Si], Zt = (e) => ds.find(fs(e));
1418
+ function Ai(e) {
1419
+ return typeof e == "number" ? e === 0 : e !== null ? e === "none" || e === "0" || kn(e) : !0;
1420
+ }
1421
+ const xi = /* @__PURE__ */ new Set(["brightness", "contrast", "saturate", "opacity"]);
1422
+ function Ei(e) {
1423
+ const [t, n] = e.slice(0, -1).split("(");
1424
+ if (t === "drop-shadow")
1425
+ return e;
1426
+ const [s] = n.match(pt) || [];
1427
+ if (!s)
1428
+ return e;
1429
+ const r = n.replace(s, "");
1430
+ let i = xi.has(t) ? 1 : 0;
1431
+ return s !== n && (i *= 100), t + "(" + i + r + ")";
1432
+ }
1433
+ const Vi = /\b([a-z-]*)\(.*?\)/gu, it = {
1434
+ ...se,
1435
+ getAnimatableNone: (e) => {
1436
+ const t = e.match(Vi);
1437
+ return t ? t.map(Ei).join(" ") : e;
1438
+ }
1439
+ }, Jt = {
1440
+ ...ne,
1441
+ transform: Math.round
1442
+ }, Mi = {
1443
+ rotate: $,
1444
+ rotateX: $,
1445
+ rotateY: $,
1446
+ rotateZ: $,
1447
+ scale: Ee,
1448
+ scaleX: Ee,
1449
+ scaleY: Ee,
1450
+ scaleZ: Ee,
1451
+ skew: $,
1452
+ skewX: $,
1453
+ skewY: $,
1454
+ distance: g,
1455
+ translateX: g,
1456
+ translateY: g,
1457
+ translateZ: g,
1458
+ x: g,
1459
+ y: g,
1460
+ z: g,
1461
+ perspective: g,
1462
+ transformPerspective: g,
1463
+ opacity: me,
1464
+ originX: Bt,
1465
+ originY: Bt,
1466
+ originZ: g
1467
+ }, xt = {
1468
+ // Border props
1469
+ borderWidth: g,
1470
+ borderTopWidth: g,
1471
+ borderRightWidth: g,
1472
+ borderBottomWidth: g,
1473
+ borderLeftWidth: g,
1474
+ borderRadius: g,
1475
+ radius: g,
1476
+ borderTopLeftRadius: g,
1477
+ borderTopRightRadius: g,
1478
+ borderBottomRightRadius: g,
1479
+ borderBottomLeftRadius: g,
1480
+ // Positioning props
1481
+ width: g,
1482
+ maxWidth: g,
1483
+ height: g,
1484
+ maxHeight: g,
1485
+ top: g,
1486
+ right: g,
1487
+ bottom: g,
1488
+ left: g,
1489
+ // Spacing props
1490
+ padding: g,
1491
+ paddingTop: g,
1492
+ paddingRight: g,
1493
+ paddingBottom: g,
1494
+ paddingLeft: g,
1495
+ margin: g,
1496
+ marginTop: g,
1497
+ marginRight: g,
1498
+ marginBottom: g,
1499
+ marginLeft: g,
1500
+ // Misc
1501
+ backgroundPositionX: g,
1502
+ backgroundPositionY: g,
1503
+ ...Mi,
1504
+ zIndex: Jt,
1505
+ // SVG
1506
+ fillOpacity: me,
1507
+ strokeOpacity: me,
1508
+ numOctaves: Jt
1509
+ }, ki = {
1510
+ ...xt,
1511
+ // Color props
1512
+ color: k,
1513
+ backgroundColor: k,
1514
+ outlineColor: k,
1515
+ fill: k,
1516
+ stroke: k,
1517
+ // Border props
1518
+ borderColor: k,
1519
+ borderTopColor: k,
1520
+ borderRightColor: k,
1521
+ borderBottomColor: k,
1522
+ borderLeftColor: k,
1523
+ filter: it,
1524
+ WebkitFilter: it
1525
+ }, hs = (e) => ki[e];
1526
+ function ms(e, t) {
1527
+ let n = hs(e);
1528
+ return n !== it && (n = se), n.getAnimatableNone ? n.getAnimatableNone(t) : void 0;
1529
+ }
1530
+ const Li = /* @__PURE__ */ new Set(["auto", "none", "0"]);
1531
+ function Ci(e, t, n) {
1532
+ let s = 0, r;
1533
+ for (; s < e.length && !r; ) {
1534
+ const i = e[s];
1535
+ typeof i == "string" && !Li.has(i) && pe(i).values.length && (r = e[s]), s++;
1536
+ }
1537
+ if (r && n)
1538
+ for (const i of t)
1539
+ e[i] = ms(n, r);
1540
+ }
1541
+ class Ii extends St {
1542
+ constructor(t, n, s, r, i) {
1543
+ super(t, n, s, r, i, !0);
1544
+ }
1545
+ readKeyframes() {
1546
+ const { unresolvedKeyframes: t, element: n, name: s } = this;
1547
+ if (!n || !n.current)
1548
+ return;
1549
+ super.readKeyframes();
1550
+ for (let l = 0; l < t.length; l++) {
1551
+ let f = t[l];
1552
+ if (typeof f == "string" && (f = f.trim(), mt(f))) {
1553
+ const c = ls(f, n.current);
1554
+ c !== void 0 && (t[l] = c), l === t.length - 1 && (this.finalKeyframe = f);
1555
+ }
1556
+ }
1557
+ if (this.resolveNoneKeyframes(), !us.has(s) || t.length !== 2)
1558
+ return;
1559
+ const [r, i] = t, o = Zt(r), a = Zt(i);
1560
+ if (o !== a)
1561
+ if (Gt(o) && Gt(a))
1562
+ for (let l = 0; l < t.length; l++) {
1563
+ const f = t[l];
1564
+ typeof f == "string" && (t[l] = parseFloat(f));
1565
+ }
1566
+ else U[s] && (this.needsMeasurement = !0);
1567
+ }
1568
+ resolveNoneKeyframes() {
1569
+ const { unresolvedKeyframes: t, name: n } = this, s = [];
1570
+ for (let r = 0; r < t.length; r++)
1571
+ (t[r] === null || Ai(t[r])) && s.push(r);
1572
+ s.length && Ci(t, s, n);
1573
+ }
1574
+ measureInitialState() {
1575
+ const { element: t, unresolvedKeyframes: n, name: s } = this;
1576
+ if (!t || !t.current)
1577
+ return;
1578
+ s === "height" && (this.suspendedScrollY = window.pageYOffset), this.measuredOrigin = U[s](t.measureViewportBox(), window.getComputedStyle(t.current)), n[0] = this.measuredOrigin;
1579
+ const r = n[n.length - 1];
1580
+ r !== void 0 && t.getValue(s, r).jump(r, !1);
1581
+ }
1582
+ measureEndState() {
1583
+ var a;
1584
+ const { element: t, name: n, unresolvedKeyframes: s } = this;
1585
+ if (!t || !t.current)
1586
+ return;
1587
+ const r = t.getValue(n);
1588
+ r && r.jump(this.measuredOrigin, !1);
1589
+ const i = s.length - 1, o = s[i];
1590
+ s[i] = U[n](t.measureViewportBox(), window.getComputedStyle(t.current)), o !== null && this.finalKeyframe === void 0 && (this.finalKeyframe = o), (a = this.removedTransforms) != null && a.length && this.removedTransforms.forEach(([l, f]) => {
1591
+ t.getValue(l).set(f);
1592
+ }), this.resolveNoneKeyframes();
1593
+ }
1594
+ }
1595
+ function Di(e, t, n) {
1596
+ if (e instanceof EventTarget)
1597
+ return [e];
1598
+ if (typeof e == "string") {
1599
+ let s = document;
1600
+ const r = (n == null ? void 0 : n[e]) ?? s.querySelectorAll(e);
1601
+ return r ? Array.from(r) : [];
1602
+ }
1603
+ return Array.from(e);
1604
+ }
1605
+ const ps = (e, t) => t && typeof e == "number" ? t.transform(e) : e, Qt = 30, Ri = (e) => !isNaN(parseFloat(e));
1606
+ class Oi {
1607
+ /**
1608
+ * @param init - The initiating value
1609
+ * @param config - Optional configuration options
1610
+ *
1611
+ * - `transformer`: A function to transform incoming values with.
1612
+ */
1613
+ constructor(t, n = {}) {
1614
+ this.canTrackVelocity = null, this.events = {}, this.updateAndNotify = (s, r = !0) => {
1615
+ var o, a;
1616
+ const i = D.now();
1617
+ if (this.updatedAt !== i && this.setPrevFrameValue(), this.prev = this.current, this.setCurrent(s), this.current !== this.prev && ((o = this.events.change) == null || o.notify(this.current), this.dependents))
1618
+ for (const l of this.dependents)
1619
+ l.dirty();
1620
+ r && ((a = this.events.renderRequest) == null || a.notify(this.current));
1621
+ }, this.hasAnimated = !1, this.setCurrent(t), this.owner = n.owner;
1622
+ }
1623
+ setCurrent(t) {
1624
+ this.current = t, this.updatedAt = D.now(), this.canTrackVelocity === null && t !== void 0 && (this.canTrackVelocity = Ri(this.current));
1625
+ }
1626
+ setPrevFrameValue(t = this.current) {
1627
+ this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt;
1628
+ }
1629
+ /**
1630
+ * Adds a function that will be notified when the `MotionValue` is updated.
1631
+ *
1632
+ * It returns a function that, when called, will cancel the subscription.
1633
+ *
1634
+ * When calling `onChange` inside a React component, it should be wrapped with the
1635
+ * `useEffect` hook. As it returns an unsubscribe function, this should be returned
1636
+ * from the `useEffect` function to ensure you don't add duplicate subscribers..
1637
+ *
1638
+ * ```jsx
1639
+ * export const MyComponent = () => {
1640
+ * const x = useMotionValue(0)
1641
+ * const y = useMotionValue(0)
1642
+ * const opacity = useMotionValue(1)
1643
+ *
1644
+ * useEffect(() => {
1645
+ * function updateOpacity() {
1646
+ * const maxXY = Math.max(x.get(), y.get())
1647
+ * const newOpacity = transform(maxXY, [0, 100], [1, 0])
1648
+ * opacity.set(newOpacity)
1649
+ * }
1650
+ *
1651
+ * const unsubscribeX = x.on("change", updateOpacity)
1652
+ * const unsubscribeY = y.on("change", updateOpacity)
1653
+ *
1654
+ * return () => {
1655
+ * unsubscribeX()
1656
+ * unsubscribeY()
1657
+ * }
1658
+ * }, [])
1659
+ *
1660
+ * return <motion.div style={{ x }} />
1661
+ * }
1662
+ * ```
1663
+ *
1664
+ * @param subscriber - A function that receives the latest value.
1665
+ * @returns A function that, when called, will cancel this subscription.
1666
+ *
1667
+ * @deprecated
1668
+ */
1669
+ onChange(t) {
1670
+ return this.on("change", t);
1671
+ }
1672
+ on(t, n) {
1673
+ this.events[t] || (this.events[t] = new Ln());
1674
+ const s = this.events[t].add(n);
1675
+ return t === "change" ? () => {
1676
+ s(), B.read(() => {
1677
+ this.events.change.getSize() || this.stop();
1678
+ });
1679
+ } : s;
1680
+ }
1681
+ clearListeners() {
1682
+ for (const t in this.events)
1683
+ this.events[t].clear();
1684
+ }
1685
+ /**
1686
+ * Attaches a passive effect to the `MotionValue`.
1687
+ */
1688
+ attach(t, n) {
1689
+ this.passiveEffect = t, this.stopPassiveEffect = n;
1690
+ }
1691
+ /**
1692
+ * Sets the state of the `MotionValue`.
1693
+ *
1694
+ * @remarks
1695
+ *
1696
+ * ```jsx
1697
+ * const x = useMotionValue(0)
1698
+ * x.set(10)
1699
+ * ```
1700
+ *
1701
+ * @param latest - Latest value to set.
1702
+ * @param render - Whether to notify render subscribers. Defaults to `true`
1703
+ *
1704
+ * @public
1705
+ */
1706
+ set(t, n = !0) {
1707
+ !n || !this.passiveEffect ? this.updateAndNotify(t, n) : this.passiveEffect(t, this.updateAndNotify);
1708
+ }
1709
+ setWithVelocity(t, n, s) {
1710
+ this.set(n), this.prev = void 0, this.prevFrameValue = t, this.prevUpdatedAt = this.updatedAt - s;
1711
+ }
1712
+ /**
1713
+ * Set the state of the `MotionValue`, stopping any active animations,
1714
+ * effects, and resets velocity to `0`.
1715
+ */
1716
+ jump(t, n = !0) {
1717
+ this.updateAndNotify(t), this.prev = t, this.prevUpdatedAt = this.prevFrameValue = void 0, n && this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1718
+ }
1719
+ dirty() {
1720
+ var t;
1721
+ (t = this.events.change) == null || t.notify(this.current);
1722
+ }
1723
+ addDependent(t) {
1724
+ this.dependents || (this.dependents = /* @__PURE__ */ new Set()), this.dependents.add(t);
1725
+ }
1726
+ removeDependent(t) {
1727
+ this.dependents && this.dependents.delete(t);
1728
+ }
1729
+ /**
1730
+ * Returns the latest state of `MotionValue`
1731
+ *
1732
+ * @returns - The latest state of `MotionValue`
1733
+ *
1734
+ * @public
1735
+ */
1736
+ get() {
1737
+ return this.current;
1738
+ }
1739
+ /**
1740
+ * @public
1741
+ */
1742
+ getPrevious() {
1743
+ return this.prev;
1744
+ }
1745
+ /**
1746
+ * Returns the latest velocity of `MotionValue`
1747
+ *
1748
+ * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
1749
+ *
1750
+ * @public
1751
+ */
1752
+ getVelocity() {
1753
+ const t = D.now();
1754
+ if (!this.canTrackVelocity || this.prevFrameValue === void 0 || t - this.updatedAt > Qt)
1755
+ return 0;
1756
+ const n = Math.min(this.updatedAt - this.prevUpdatedAt, Qt);
1757
+ return Cn(parseFloat(this.current) - parseFloat(this.prevFrameValue), n);
1758
+ }
1759
+ /**
1760
+ * Registers a new animation to control this `MotionValue`. Only one
1761
+ * animation can drive a `MotionValue` at one time.
1762
+ *
1763
+ * ```jsx
1764
+ * value.start()
1765
+ * ```
1766
+ *
1767
+ * @param animation - A function that starts the provided animation
1768
+ */
1769
+ start(t) {
1770
+ return this.stop(), new Promise((n) => {
1771
+ this.hasAnimated = !0, this.animation = t(n), this.events.animationStart && this.events.animationStart.notify();
1772
+ }).then(() => {
1773
+ this.events.animationComplete && this.events.animationComplete.notify(), this.clearAnimation();
1774
+ });
1775
+ }
1776
+ /**
1777
+ * Stop the currently active animation.
1778
+ *
1779
+ * @public
1780
+ */
1781
+ stop() {
1782
+ this.animation && (this.animation.stop(), this.events.animationCancel && this.events.animationCancel.notify()), this.clearAnimation();
1783
+ }
1784
+ /**
1785
+ * Returns `true` if this value is currently animating.
1786
+ *
1787
+ * @public
1788
+ */
1789
+ isAnimating() {
1790
+ return !!this.animation;
1791
+ }
1792
+ clearAnimation() {
1793
+ delete this.animation;
1794
+ }
1795
+ /**
1796
+ * Destroy and clean up subscribers to this `MotionValue`.
1797
+ *
1798
+ * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
1799
+ * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
1800
+ * created a `MotionValue` via the `motionValue` function.
1801
+ *
1802
+ * @public
1803
+ */
1804
+ destroy() {
1805
+ var t, n;
1806
+ (t = this.dependents) == null || t.clear(), (n = this.events.destroy) == null || n.notify(), this.clearListeners(), this.stop(), this.stopPassiveEffect && this.stopPassiveEffect();
1807
+ }
1808
+ }
1809
+ function ge(e, t) {
1810
+ return new Oi(e, t);
1811
+ }
1812
+ function gs(e) {
1813
+ return Mn(e) && "ownerSVGElement" in e;
1814
+ }
1815
+ function Fi(e) {
1816
+ return gs(e) && e.tagName === "svg";
1817
+ }
1818
+ const C = (e) => !!(e && e.getVelocity), Pi = [...ds, k, se], Ni = (e) => Pi.find(fs(e));
1819
+ function Et(e) {
1820
+ return typeof e == "object" && !Array.isArray(e);
1821
+ }
1822
+ function ys(e, t, n, s) {
1823
+ return typeof e == "string" && Et(t) ? Di(e, n, s) : e instanceof NodeList ? Array.from(e) : Array.isArray(e) ? e : [e];
1824
+ }
1825
+ function Ki(e, t, n) {
1826
+ return e * (t + 1);
1827
+ }
1828
+ function en(e, t, n, s) {
1829
+ return typeof t == "number" ? t : t.startsWith("-") || t.startsWith("+") ? Math.max(0, e + parseFloat(t)) : t === "<" ? n : t.startsWith("<") ? Math.max(0, n + parseFloat(t.slice(1))) : s.get(t) ?? e;
1830
+ }
1831
+ function Bi(e, t, n) {
1832
+ for (let s = 0; s < e.length; s++) {
1833
+ const r = e[s];
1834
+ r.at > t && r.at < n && (En(e, r), s--);
1835
+ }
1836
+ }
1837
+ function qi(e, t, n, s, r, i) {
1838
+ Bi(e, r, i);
1839
+ for (let o = 0; o < t.length; o++)
1840
+ e.push({
1841
+ value: t[o],
1842
+ at: Te(r, i, s[o]),
1843
+ easing: qn(n, o)
1844
+ });
1845
+ }
1846
+ function $i(e, t) {
1847
+ for (let n = 0; n < e.length; n++)
1848
+ e[n] = e[n] / (t + 1);
1849
+ }
1850
+ function Hi(e, t) {
1851
+ return e.at === t.at ? e.value === null ? 1 : t.value === null ? -1 : 0 : e.at - t.at;
1852
+ }
1853
+ const Wi = "easeInOut";
1854
+ function _i(e, { defaultTransition: t = {}, ...n } = {}, s, r) {
1855
+ const i = t.duration || 0.3, o = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), l = {}, f = /* @__PURE__ */ new Map();
1856
+ let c = 0, u = 0, d = 0;
1857
+ for (let h = 0; h < e.length; h++) {
1858
+ const p = e[h];
1859
+ if (typeof p == "string") {
1860
+ f.set(p, u);
1861
+ continue;
1862
+ } else if (!Array.isArray(p)) {
1863
+ f.set(p.name, en(u, p.at, c, f));
1864
+ continue;
1865
+ }
1866
+ let [y, b, w = {}] = p;
1867
+ w.at !== void 0 && (u = en(u, w.at, c, f));
1868
+ let S = 0;
1869
+ const v = (A, m, x, V = 0, T = 0) => {
1870
+ const E = Ui(A), { delay: I = 0, times: R = ts(E), type: Pe = "keyframes", repeat: ve, repeatType: Ba, repeatDelay: qa = 0, ...Hs } = m;
1871
+ let { ease: q = t.ease || "easeOut", duration: F } = m;
1872
+ const Lt = typeof I == "function" ? I(V, T) : I, Ct = E.length, It = At(Pe) ? Pe : r == null ? void 0 : r[Pe || "keyframes"];
1873
+ if (Ct <= 2 && It) {
1874
+ let oe = 100;
1875
+ if (Ct === 2 && zi(E)) {
1876
+ const ae = E[1] - E[0];
1877
+ oe = Math.abs(ae);
1878
+ }
1879
+ const Se = { ...Hs };
1880
+ F !== void 0 && (Se.duration = /* @__PURE__ */ O(F));
1881
+ const Ae = Jn(Se, oe, It);
1882
+ q = Ae.ease, F = Ae.duration;
1883
+ }
1884
+ F ?? (F = i);
1885
+ const Dt = u + Lt;
1886
+ R.length === 1 && R[0] === 0 && (R[1] = 1);
1887
+ const Rt = R.length - E.length;
1888
+ if (Rt > 0 && es(R, Rt), E.length === 1 && E.unshift(null), ve) {
1889
+ F = Ki(F, ve);
1890
+ const oe = [...E], Se = [...R];
1891
+ q = Array.isArray(q) ? [...q] : [q];
1892
+ const Ae = [...q];
1893
+ for (let ae = 0; ae < ve; ae++) {
1894
+ E.push(...oe);
1895
+ for (let le = 0; le < oe.length; le++)
1896
+ R.push(Se[le] + (ae + 1)), q.push(le === 0 ? "linear" : qn(Ae, le - 1));
1897
+ }
1898
+ $i(R, ve);
1899
+ }
1900
+ const Ot = Dt + F;
1901
+ qi(x, E, q, R, Dt, Ot), S = Math.max(Lt + F, S), d = Math.max(Ot, d);
1902
+ };
1903
+ if (C(y)) {
1904
+ const A = tn(y, a);
1905
+ v(b, w, nn("default", A));
1906
+ } else {
1907
+ const A = ys(y, b, s, l), m = A.length;
1908
+ for (let x = 0; x < m; x++) {
1909
+ b = b, w = w;
1910
+ const V = A[x], T = tn(V, a);
1911
+ for (const E in b)
1912
+ v(b[E], ji(w, E), nn(E, T), x, m);
1913
+ }
1914
+ }
1915
+ c = u, u += S;
1916
+ }
1917
+ return a.forEach((h, p) => {
1918
+ for (const y in h) {
1919
+ const b = h[y];
1920
+ b.sort(Hi);
1921
+ const w = [], S = [], v = [];
1922
+ for (let m = 0; m < b.length; m++) {
1923
+ const { at: x, value: V, easing: T } = b[m];
1924
+ w.push(V), S.push(/* @__PURE__ */ ft(0, d, x)), v.push(T || "easeOut");
1925
+ }
1926
+ S[0] !== 0 && (S.unshift(0), w.unshift(w[0]), v.unshift(Wi)), S[S.length - 1] !== 1 && (S.push(1), w.push(null)), o.has(p) || o.set(p, {
1927
+ keyframes: {},
1928
+ transition: {}
1929
+ });
1930
+ const A = o.get(p);
1931
+ A.keyframes[y] = w, A.transition[y] = {
1932
+ ...t,
1933
+ duration: d,
1934
+ ease: v,
1935
+ times: S,
1936
+ ...n
1937
+ };
1938
+ }
1939
+ }), o;
1940
+ }
1941
+ function tn(e, t) {
1942
+ return !t.has(e) && t.set(e, {}), t.get(e);
1943
+ }
1944
+ function nn(e, t) {
1945
+ return t[e] || (t[e] = []), t[e];
1946
+ }
1947
+ function Ui(e) {
1948
+ return Array.isArray(e) ? e : [e];
1949
+ }
1950
+ function ji(e, t) {
1951
+ return e && e[t] ? {
1952
+ ...e,
1953
+ ...e[t]
1954
+ } : { ...e };
1955
+ }
1956
+ const Gi = (e) => typeof e == "number", zi = (e) => e.every(Gi), ye = /* @__PURE__ */ new WeakMap(), Yi = (e) => Array.isArray(e);
1957
+ function sn(e) {
1958
+ const t = [{}, {}];
1959
+ return e == null || e.values.forEach((n, s) => {
1960
+ t[0][s] = n.get(), t[1][s] = n.getVelocity();
1961
+ }), t;
1962
+ }
1963
+ function bs(e, t, n, s) {
1964
+ if (typeof t == "function") {
1965
+ const [r, i] = sn(s);
1966
+ t = t(n !== void 0 ? n : e.custom, r, i);
1967
+ }
1968
+ if (typeof t == "string" && (t = e.variants && e.variants[t]), typeof t == "function") {
1969
+ const [r, i] = sn(s);
1970
+ t = t(n !== void 0 ? n : e.custom, r, i);
1971
+ }
1972
+ return t;
1973
+ }
1974
+ function Xi(e, t, n) {
1975
+ const s = e.getProps();
1976
+ return bs(s, t, s.custom, e);
1977
+ }
1978
+ function Zi(e, t, n) {
1979
+ e.hasValue(t) ? e.getValue(t).set(n) : e.addValue(t, ge(n));
1980
+ }
1981
+ function Ji(e) {
1982
+ return Yi(e) ? e[e.length - 1] || 0 : e;
1983
+ }
1984
+ function Qi(e, t) {
1985
+ const n = Xi(e, t);
1986
+ let { transitionEnd: s = {}, transition: r = {}, ...i } = n || {};
1987
+ i = { ...i, ...s };
1988
+ for (const o in i) {
1989
+ const a = Ji(i[o]);
1990
+ Zi(e, o, a);
1991
+ }
1992
+ }
1993
+ function eo(e) {
1994
+ return !!(C(e) && e.add);
1995
+ }
1996
+ function to(e, t) {
1997
+ const n = e.getValue("willChange");
1998
+ if (eo(n))
1999
+ return n.add(t);
2000
+ if (!n && K.WillChange) {
2001
+ const s = new K.WillChange("auto");
2002
+ e.addValue("willChange", s), s.add(t);
2003
+ }
2004
+ }
2005
+ const Vt = (e) => e.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase(), no = "framerAppearId", so = "data-" + Vt(no);
2006
+ function ro(e) {
2007
+ return e.props[so];
2008
+ }
2009
+ const io = (e) => e !== null;
2010
+ function oo(e, { repeat: t, repeatType: n = "loop" }, s) {
2011
+ const r = e.filter(io), i = t && n !== "loop" && t % 2 === 1 ? 0 : r.length - 1;
2012
+ return r[i];
2013
+ }
2014
+ const ao = {
2015
+ type: "spring",
2016
+ stiffness: 500,
2017
+ damping: 25,
2018
+ restSpeed: 10
2019
+ }, lo = (e) => ({
2020
+ type: "spring",
2021
+ stiffness: 550,
2022
+ damping: e === 0 ? 2 * Math.sqrt(550) : 30,
2023
+ restSpeed: 10
2024
+ }), co = {
2025
+ type: "keyframes",
2026
+ duration: 0.8
2027
+ }, uo = {
2028
+ type: "keyframes",
2029
+ ease: [0.25, 0.1, 0.35, 1],
2030
+ duration: 0.3
2031
+ }, fo = (e, { keyframes: t }) => t.length > 2 ? co : ie.has(e) ? e.startsWith("scale") ? lo(t[1]) : ao : uo;
2032
+ function ho({ when: e, delay: t, delayChildren: n, staggerChildren: s, staggerDirection: r, repeat: i, repeatType: o, repeatDelay: a, from: l, elapsed: f, ...c }) {
2033
+ return !!Object.keys(c).length;
2034
+ }
2035
+ const ws = (e, t, n, s = {}, r, i) => (o) => {
2036
+ const a = cs(s, e) || {}, l = a.delay || s.delay || 0;
2037
+ let { elapsed: f = 0 } = s;
2038
+ f = f - /* @__PURE__ */ O(l);
2039
+ const c = {
2040
+ keyframes: Array.isArray(n) ? n : [null, n],
2041
+ ease: "easeOut",
2042
+ velocity: t.getVelocity(),
2043
+ ...a,
2044
+ delay: -f,
2045
+ onUpdate: (d) => {
2046
+ t.set(d), a.onUpdate && a.onUpdate(d);
2047
+ },
2048
+ onComplete: () => {
2049
+ o(), a.onComplete && a.onComplete();
2050
+ },
2051
+ name: e,
2052
+ motionValue: t,
2053
+ element: i ? void 0 : r
2054
+ };
2055
+ ho(a) || Object.assign(c, fo(e, c)), c.duration && (c.duration = /* @__PURE__ */ O(c.duration)), c.repeatDelay && (c.repeatDelay = /* @__PURE__ */ O(c.repeatDelay)), c.from !== void 0 && (c.keyframes[0] = c.from);
2056
+ let u = !1;
2057
+ if ((c.type === !1 || c.duration === 0 && !c.repeatDelay) && (c.duration = 0, c.delay === 0 && (u = !0)), (K.instantAnimations || K.skipAnimations) && (u = !0, c.duration = 0, c.delay = 0), c.allowFlatten = !a.type && !a.ease, u && !i && t.get() !== void 0) {
2058
+ const d = oo(c.keyframes, a);
2059
+ if (d !== void 0) {
2060
+ B.update(() => {
2061
+ c.onUpdate(d), c.onComplete();
2062
+ });
2063
+ return;
2064
+ }
2065
+ }
2066
+ return a.isSync ? new vt(c) : new yi(c);
2067
+ };
2068
+ function mo({ protectedKeys: e, needsAnimating: t }, n) {
2069
+ const s = e.hasOwnProperty(n) && t[n] !== !0;
2070
+ return t[n] = !1, s;
2071
+ }
2072
+ function po(e, t, { delay: n = 0, transitionOverride: s, type: r } = {}) {
2073
+ let { transition: i = e.getDefaultTransition(), transitionEnd: o, ...a } = t;
2074
+ s && (i = s);
2075
+ const l = [], f = r && e.animationState && e.animationState.getState()[r];
2076
+ for (const c in a) {
2077
+ const u = e.getValue(c, e.latestValues[c] ?? null), d = a[c];
2078
+ if (d === void 0 || f && mo(f, c))
2079
+ continue;
2080
+ const h = {
2081
+ delay: n,
2082
+ ...cs(i || {}, c)
2083
+ }, p = u.get();
2084
+ if (p !== void 0 && !u.isAnimating && !Array.isArray(d) && d === p && !h.velocity)
2085
+ continue;
2086
+ let y = !1;
2087
+ if (window.MotionHandoffAnimation) {
2088
+ const w = ro(e);
2089
+ if (w) {
2090
+ const S = window.MotionHandoffAnimation(w, c, B);
2091
+ S !== null && (h.startTime = S, y = !0);
2092
+ }
2093
+ }
2094
+ to(e, c), u.start(ws(c, u, d, e.shouldReduceMotion && us.has(c) ? { type: !1 } : h, e, y));
2095
+ const b = u.animation;
2096
+ b && l.push(b);
2097
+ }
2098
+ return o && Promise.all(l).then(() => {
2099
+ B.update(() => {
2100
+ o && Qi(e, o);
2101
+ });
2102
+ }), l;
2103
+ }
2104
+ function go({ top: e, left: t, right: n, bottom: s }) {
2105
+ return {
2106
+ x: { min: t, max: n },
2107
+ y: { min: e, max: s }
2108
+ };
2109
+ }
2110
+ function yo(e, t) {
2111
+ if (!t)
2112
+ return e;
2113
+ const n = t({ x: e.left, y: e.top }), s = t({ x: e.right, y: e.bottom });
2114
+ return {
2115
+ top: n.y,
2116
+ left: n.x,
2117
+ bottom: s.y,
2118
+ right: s.x
2119
+ };
2120
+ }
2121
+ function bo(e, t) {
2122
+ return go(yo(e.getBoundingClientRect(), t));
2123
+ }
2124
+ const rn = {
2125
+ animation: [
2126
+ "animate",
2127
+ "variants",
2128
+ "whileHover",
2129
+ "whileTap",
2130
+ "exit",
2131
+ "whileInView",
2132
+ "whileFocus",
2133
+ "whileDrag"
2134
+ ],
2135
+ exit: ["exit"],
2136
+ drag: ["drag", "dragControls"],
2137
+ focus: ["whileFocus"],
2138
+ hover: ["whileHover", "onHoverStart", "onHoverEnd"],
2139
+ tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
2140
+ pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
2141
+ inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
2142
+ layout: ["layout", "layoutId"]
2143
+ }, ot = {};
2144
+ for (const e in rn)
2145
+ ot[e] = {
2146
+ isEnabled: (t) => rn[e].some((n) => !!t[n])
2147
+ };
2148
+ const on = () => ({ min: 0, max: 0 }), Mt = () => ({
2149
+ x: on(),
2150
+ y: on()
2151
+ }), wo = typeof window < "u", at = { current: null }, Ts = { current: !1 };
2152
+ function To() {
2153
+ if (Ts.current = !0, !!wo)
2154
+ if (window.matchMedia) {
2155
+ const e = window.matchMedia("(prefers-reduced-motion)"), t = () => at.current = e.matches;
2156
+ e.addListener(t), t();
2157
+ } else
2158
+ at.current = !1;
2159
+ }
2160
+ function vo(e) {
2161
+ return e !== null && typeof e == "object" && typeof e.start == "function";
2162
+ }
2163
+ function So(e) {
2164
+ return typeof e == "string" || Array.isArray(e);
2165
+ }
2166
+ const Ao = [
2167
+ "animate",
2168
+ "whileInView",
2169
+ "whileFocus",
2170
+ "whileHover",
2171
+ "whileTap",
2172
+ "whileDrag",
2173
+ "exit"
2174
+ ], xo = ["initial", ...Ao];
2175
+ function vs(e) {
2176
+ return vo(e.animate) || xo.some((t) => So(e[t]));
2177
+ }
2178
+ function Eo(e) {
2179
+ return !!(vs(e) || e.variants);
2180
+ }
2181
+ function Vo(e, t, n) {
2182
+ for (const s in t) {
2183
+ const r = t[s], i = n[s];
2184
+ if (C(r))
2185
+ e.addValue(s, r);
2186
+ else if (C(i))
2187
+ e.addValue(s, ge(r, { owner: e }));
2188
+ else if (i !== r)
2189
+ if (e.hasValue(s)) {
2190
+ const o = e.getValue(s);
2191
+ o.liveStyle === !0 ? o.jump(r) : o.hasAnimated || o.set(r);
2192
+ } else {
2193
+ const o = e.getStaticValue(s);
2194
+ e.addValue(s, ge(o !== void 0 ? o : r, { owner: e }));
2195
+ }
2196
+ }
2197
+ for (const s in n)
2198
+ t[s] === void 0 && e.removeValue(s);
2199
+ return t;
2200
+ }
2201
+ const an = [
2202
+ "AnimationStart",
2203
+ "AnimationComplete",
2204
+ "Update",
2205
+ "BeforeLayoutMeasure",
2206
+ "LayoutMeasure",
2207
+ "LayoutAnimationStart",
2208
+ "LayoutAnimationComplete"
2209
+ ];
2210
+ class Ss {
2211
+ /**
2212
+ * This method takes React props and returns found MotionValues. For example, HTML
2213
+ * MotionValues will be found within the style prop, whereas for Three.js within attribute arrays.
2214
+ *
2215
+ * This isn't an abstract method as it needs calling in the constructor, but it is
2216
+ * intended to be one.
2217
+ */
2218
+ scrapeMotionValuesFromProps(t, n, s) {
2219
+ return {};
2220
+ }
2221
+ constructor({ parent: t, props: n, presenceContext: s, reducedMotionConfig: r, blockInitialAnimation: i, visualState: o }, a = {}) {
2222
+ this.current = null, this.children = /* @__PURE__ */ new Set(), this.isVariantNode = !1, this.isControllingVariants = !1, this.shouldReduceMotion = null, this.values = /* @__PURE__ */ new Map(), this.KeyframeResolver = St, this.features = {}, this.valueSubscriptions = /* @__PURE__ */ new Map(), this.prevMotionValues = {}, this.events = {}, this.propEventSubscriptions = {}, this.notifyUpdate = () => this.notify("Update", this.latestValues), this.render = () => {
2223
+ this.current && (this.triggerBuild(), this.renderInstance(this.current, this.renderState, this.props.style, this.projection));
2224
+ }, this.renderScheduledAt = 0, this.scheduleRender = () => {
2225
+ const d = D.now();
2226
+ this.renderScheduledAt < d && (this.renderScheduledAt = d, B.render(this.render, !1, !0));
2227
+ };
2228
+ const { latestValues: l, renderState: f } = o;
2229
+ this.latestValues = l, this.baseTarget = { ...l }, this.initialValues = n.initial ? { ...l } : {}, this.renderState = f, this.parent = t, this.props = n, this.presenceContext = s, this.depth = t ? t.depth + 1 : 0, this.reducedMotionConfig = r, this.options = a, this.blockInitialAnimation = !!i, this.isControllingVariants = vs(n), this.isVariantNode = Eo(n), this.isVariantNode && (this.variantChildren = /* @__PURE__ */ new Set()), this.manuallyAnimateOnMount = !!(t && t.current);
2230
+ const { willChange: c, ...u } = this.scrapeMotionValuesFromProps(n, {}, this);
2231
+ for (const d in u) {
2232
+ const h = u[d];
2233
+ l[d] !== void 0 && C(h) && h.set(l[d], !1);
2234
+ }
2235
+ }
2236
+ mount(t) {
2237
+ this.current = t, ye.set(t, this), this.projection && !this.projection.instance && this.projection.mount(t), this.parent && this.isVariantNode && !this.isControllingVariants && (this.removeFromVariantTree = this.parent.addVariantChild(this)), this.values.forEach((n, s) => this.bindToMotionValue(s, n)), Ts.current || To(), this.shouldReduceMotion = this.reducedMotionConfig === "never" ? !1 : this.reducedMotionConfig === "always" ? !0 : at.current, this.parent && this.parent.children.add(this), this.update(this.props, this.presenceContext);
2238
+ }
2239
+ unmount() {
2240
+ this.projection && this.projection.unmount(), Ge(this.notifyUpdate), Ge(this.render), this.valueSubscriptions.forEach((t) => t()), this.valueSubscriptions.clear(), this.removeFromVariantTree && this.removeFromVariantTree(), this.parent && this.parent.children.delete(this);
2241
+ for (const t in this.events)
2242
+ this.events[t].clear();
2243
+ for (const t in this.features) {
2244
+ const n = this.features[t];
2245
+ n && (n.unmount(), n.isMounted = !1);
2246
+ }
2247
+ this.current = null;
2248
+ }
2249
+ bindToMotionValue(t, n) {
2250
+ this.valueSubscriptions.has(t) && this.valueSubscriptions.get(t)();
2251
+ const s = ie.has(t);
2252
+ s && this.onBindTransform && this.onBindTransform();
2253
+ const r = n.on("change", (a) => {
2254
+ this.latestValues[t] = a, this.props.onUpdate && B.preRender(this.notifyUpdate), s && this.projection && (this.projection.isTransformDirty = !0);
2255
+ }), i = n.on("renderRequest", this.scheduleRender);
2256
+ let o;
2257
+ window.MotionCheckAppearSync && (o = window.MotionCheckAppearSync(this, t, n)), this.valueSubscriptions.set(t, () => {
2258
+ r(), i(), o && o(), n.owner && n.stop();
2259
+ });
2260
+ }
2261
+ sortNodePosition(t) {
2262
+ return !this.current || !this.sortInstanceNodePosition || this.type !== t.type ? 0 : this.sortInstanceNodePosition(this.current, t.current);
2263
+ }
2264
+ updateFeatures() {
2265
+ let t = "animation";
2266
+ for (t in ot) {
2267
+ const n = ot[t];
2268
+ if (!n)
2269
+ continue;
2270
+ const { isEnabled: s, Feature: r } = n;
2271
+ if (!this.features[t] && r && s(this.props) && (this.features[t] = new r(this)), this.features[t]) {
2272
+ const i = this.features[t];
2273
+ i.isMounted ? i.update() : (i.mount(), i.isMounted = !0);
2274
+ }
2275
+ }
2276
+ }
2277
+ triggerBuild() {
2278
+ this.build(this.renderState, this.latestValues, this.props);
2279
+ }
2280
+ /**
2281
+ * Measure the current viewport box with or without transforms.
2282
+ * Only measures axis-aligned boxes, rotate and skew must be manually
2283
+ * removed with a re-render to work.
2284
+ */
2285
+ measureViewportBox() {
2286
+ return this.current ? this.measureInstanceViewportBox(this.current, this.props) : Mt();
2287
+ }
2288
+ getStaticValue(t) {
2289
+ return this.latestValues[t];
2290
+ }
2291
+ setStaticValue(t, n) {
2292
+ this.latestValues[t] = n;
2293
+ }
2294
+ /**
2295
+ * Update the provided props. Ensure any newly-added motion values are
2296
+ * added to our map, old ones removed, and listeners updated.
2297
+ */
2298
+ update(t, n) {
2299
+ (t.transformTemplate || this.props.transformTemplate) && this.scheduleRender(), this.prevProps = this.props, this.props = t, this.prevPresenceContext = this.presenceContext, this.presenceContext = n;
2300
+ for (let s = 0; s < an.length; s++) {
2301
+ const r = an[s];
2302
+ this.propEventSubscriptions[r] && (this.propEventSubscriptions[r](), delete this.propEventSubscriptions[r]);
2303
+ const i = "on" + r, o = t[i];
2304
+ o && (this.propEventSubscriptions[r] = this.on(r, o));
2305
+ }
2306
+ this.prevMotionValues = Vo(this, this.scrapeMotionValuesFromProps(t, this.prevProps, this), this.prevMotionValues), this.handleChildMotionValue && this.handleChildMotionValue();
2307
+ }
2308
+ getProps() {
2309
+ return this.props;
2310
+ }
2311
+ /**
2312
+ * Returns the variant definition with a given name.
2313
+ */
2314
+ getVariant(t) {
2315
+ return this.props.variants ? this.props.variants[t] : void 0;
2316
+ }
2317
+ /**
2318
+ * Returns the defined default transition on this component.
2319
+ */
2320
+ getDefaultTransition() {
2321
+ return this.props.transition;
2322
+ }
2323
+ getTransformPagePoint() {
2324
+ return this.props.transformPagePoint;
2325
+ }
2326
+ getClosestVariantNode() {
2327
+ return this.isVariantNode ? this : this.parent ? this.parent.getClosestVariantNode() : void 0;
2328
+ }
2329
+ /**
2330
+ * Add a child visual element to our set of children.
2331
+ */
2332
+ addVariantChild(t) {
2333
+ const n = this.getClosestVariantNode();
2334
+ if (n)
2335
+ return n.variantChildren && n.variantChildren.add(t), () => n.variantChildren.delete(t);
2336
+ }
2337
+ /**
2338
+ * Add a motion value and bind it to this visual element.
2339
+ */
2340
+ addValue(t, n) {
2341
+ const s = this.values.get(t);
2342
+ n !== s && (s && this.removeValue(t), this.bindToMotionValue(t, n), this.values.set(t, n), this.latestValues[t] = n.get());
2343
+ }
2344
+ /**
2345
+ * Remove a motion value and unbind any active subscriptions.
2346
+ */
2347
+ removeValue(t) {
2348
+ this.values.delete(t);
2349
+ const n = this.valueSubscriptions.get(t);
2350
+ n && (n(), this.valueSubscriptions.delete(t)), delete this.latestValues[t], this.removeValueFromRenderState(t, this.renderState);
2351
+ }
2352
+ /**
2353
+ * Check whether we have a motion value for this key
2354
+ */
2355
+ hasValue(t) {
2356
+ return this.values.has(t);
2357
+ }
2358
+ getValue(t, n) {
2359
+ if (this.props.values && this.props.values[t])
2360
+ return this.props.values[t];
2361
+ let s = this.values.get(t);
2362
+ return s === void 0 && n !== void 0 && (s = ge(n === null ? void 0 : n, { owner: this }), this.addValue(t, s)), s;
2363
+ }
2364
+ /**
2365
+ * If we're trying to animate to a previously unencountered value,
2366
+ * we need to check for it in our state and as a last resort read it
2367
+ * directly from the instance (which might have performance implications).
2368
+ */
2369
+ readValue(t, n) {
2370
+ let s = this.latestValues[t] !== void 0 || !this.current ? this.latestValues[t] : this.getBaseTargetFromProps(this.props, t) ?? this.readValueFromInstance(this.current, t, this.options);
2371
+ return s != null && (typeof s == "string" && (Vn(s) || kn(s)) ? s = parseFloat(s) : !Ni(s) && se.test(n) && (s = ms(t, n)), this.setBaseTarget(t, C(s) ? s.get() : s)), C(s) ? s.get() : s;
2372
+ }
2373
+ /**
2374
+ * Set the base target to later animate back to. This is currently
2375
+ * only hydrated on creation and when we first read a value.
2376
+ */
2377
+ setBaseTarget(t, n) {
2378
+ this.baseTarget[t] = n;
2379
+ }
2380
+ /**
2381
+ * Find the base target for a value thats been removed from all animation
2382
+ * props.
2383
+ */
2384
+ getBaseTarget(t) {
2385
+ var i;
2386
+ const { initial: n } = this.props;
2387
+ let s;
2388
+ if (typeof n == "string" || typeof n == "object") {
2389
+ const o = bs(this.props, n, (i = this.presenceContext) == null ? void 0 : i.custom);
2390
+ o && (s = o[t]);
2391
+ }
2392
+ if (n && s !== void 0)
2393
+ return s;
2394
+ const r = this.getBaseTargetFromProps(this.props, t);
2395
+ return r !== void 0 && !C(r) ? r : this.initialValues[t] !== void 0 && s === void 0 ? void 0 : this.baseTarget[t];
2396
+ }
2397
+ on(t, n) {
2398
+ return this.events[t] || (this.events[t] = new Ln()), this.events[t].add(n);
2399
+ }
2400
+ notify(t, ...n) {
2401
+ this.events[t] && this.events[t].notify(...n);
2402
+ }
2403
+ }
2404
+ class As extends Ss {
2405
+ constructor() {
2406
+ super(...arguments), this.KeyframeResolver = Ii;
2407
+ }
2408
+ sortInstanceNodePosition(t, n) {
2409
+ return t.compareDocumentPosition(n) & 2 ? 1 : -1;
2410
+ }
2411
+ getBaseTargetFromProps(t, n) {
2412
+ return t.style ? t.style[n] : void 0;
2413
+ }
2414
+ removeValueFromRenderState(t, { vars: n, style: s }) {
2415
+ delete n[t], delete s[t];
2416
+ }
2417
+ handleChildMotionValue() {
2418
+ this.childSubscription && (this.childSubscription(), delete this.childSubscription);
2419
+ const { children: t } = this.props;
2420
+ C(t) && (this.childSubscription = t.on("change", (n) => {
2421
+ this.current && (this.current.textContent = `${n}`);
2422
+ }));
2423
+ }
2424
+ }
2425
+ const Mo = {
2426
+ x: "translateX",
2427
+ y: "translateY",
2428
+ z: "translateZ",
2429
+ transformPerspective: "perspective"
2430
+ }, ko = re.length;
2431
+ function Lo(e, t, n) {
2432
+ let s = "", r = !0;
2433
+ for (let i = 0; i < ko; i++) {
2434
+ const o = re[i], a = e[o];
2435
+ if (a === void 0)
2436
+ continue;
2437
+ let l = !0;
2438
+ if (typeof a == "number" ? l = a === (o.startsWith("scale") ? 1 : 0) : l = parseFloat(a) === 0, !l || n) {
2439
+ const f = ps(a, xt[o]);
2440
+ if (!l) {
2441
+ r = !1;
2442
+ const c = Mo[o] || o;
2443
+ s += `${c}(${f}) `;
2444
+ }
2445
+ n && (t[o] = f);
2446
+ }
2447
+ }
2448
+ return s = s.trim(), n ? s = n(t, r ? "" : s) : r && (s = "none"), s;
2449
+ }
2450
+ function xs(e, t, n) {
2451
+ const { style: s, vars: r, transformOrigin: i } = e;
2452
+ let o = !1, a = !1;
2453
+ for (const l in t) {
2454
+ const f = t[l];
2455
+ if (ie.has(l)) {
2456
+ o = !0;
2457
+ continue;
2458
+ } else if (Wn(l)) {
2459
+ r[l] = f;
2460
+ continue;
2461
+ } else {
2462
+ const c = ps(f, xt[l]);
2463
+ l.startsWith("origin") ? (a = !0, i[l] = c) : s[l] = c;
2464
+ }
2465
+ }
2466
+ if (t.transform || (o || n ? s.transform = Lo(t, e.transform, n) : s.transform && (s.transform = "none")), a) {
2467
+ const { originX: l = "50%", originY: f = "50%", originZ: c = 0 } = i;
2468
+ s.transformOrigin = `${l} ${f} ${c}`;
2469
+ }
2470
+ }
2471
+ function Es(e, { style: t, vars: n }, s, r) {
2472
+ Object.assign(e.style, t, r && r.getProjectionStyles(s));
2473
+ for (const i in n)
2474
+ e.style.setProperty(i, n[i]);
2475
+ }
2476
+ const Co = {};
2477
+ function Io(e, { layout: t, layoutId: n }) {
2478
+ return ie.has(e) || e.startsWith("origin") || (t || n !== void 0) && (!!Co[e] || e === "opacity");
2479
+ }
2480
+ function Vs(e, t, n) {
2481
+ var i;
2482
+ const { style: s } = e, r = {};
2483
+ for (const o in s)
2484
+ (C(s[o]) || t.style && C(t.style[o]) || Io(o, e) || ((i = n == null ? void 0 : n.getValue(o)) == null ? void 0 : i.liveStyle) !== void 0) && (r[o] = s[o]);
2485
+ return r;
2486
+ }
2487
+ function Do(e) {
2488
+ return window.getComputedStyle(e);
2489
+ }
2490
+ class Ro extends As {
2491
+ constructor() {
2492
+ super(...arguments), this.type = "html", this.renderInstance = Es;
2493
+ }
2494
+ readValueFromInstance(t, n) {
2495
+ var s;
2496
+ if (ie.has(n))
2497
+ return (s = this.projection) != null && s.isProjecting ? et(n) : Gr(t, n);
2498
+ {
2499
+ const r = Do(t), i = (Wn(n) ? r.getPropertyValue(n) : r[n]) || 0;
2500
+ return typeof i == "string" ? i.trim() : i;
2501
+ }
2502
+ }
2503
+ measureInstanceViewportBox(t, { transformPagePoint: n }) {
2504
+ return bo(t, n);
2505
+ }
2506
+ build(t, n, s) {
2507
+ xs(t, n, s.transformTemplate);
2508
+ }
2509
+ scrapeMotionValuesFromProps(t, n, s) {
2510
+ return Vs(t, n, s);
2511
+ }
2512
+ }
2513
+ function Oo(e, t) {
2514
+ return e in t;
2515
+ }
2516
+ class Fo extends Ss {
2517
+ constructor() {
2518
+ super(...arguments), this.type = "object";
2519
+ }
2520
+ readValueFromInstance(t, n) {
2521
+ if (Oo(n, t)) {
2522
+ const s = t[n];
2523
+ if (typeof s == "string" || typeof s == "number")
2524
+ return s;
2525
+ }
2526
+ }
2527
+ getBaseTargetFromProps() {
2528
+ }
2529
+ removeValueFromRenderState(t, n) {
2530
+ delete n.output[t];
2531
+ }
2532
+ measureInstanceViewportBox() {
2533
+ return Mt();
2534
+ }
2535
+ build(t, n) {
2536
+ Object.assign(t.output, n);
2537
+ }
2538
+ renderInstance(t, { output: n }) {
2539
+ Object.assign(t, n);
2540
+ }
2541
+ sortInstanceNodePosition() {
2542
+ return 0;
2543
+ }
2544
+ }
2545
+ const Po = {
2546
+ offset: "stroke-dashoffset",
2547
+ array: "stroke-dasharray"
2548
+ }, No = {
2549
+ offset: "strokeDashoffset",
2550
+ array: "strokeDasharray"
2551
+ };
2552
+ function Ko(e, t, n = 1, s = 0, r = !0) {
2553
+ e.pathLength = 1;
2554
+ const i = r ? Po : No;
2555
+ e[i.offset] = g.transform(-s);
2556
+ const o = g.transform(t), a = g.transform(n);
2557
+ e[i.array] = `${o} ${a}`;
2558
+ }
2559
+ function Bo(e, {
2560
+ attrX: t,
2561
+ attrY: n,
2562
+ attrScale: s,
2563
+ pathLength: r,
2564
+ pathSpacing: i = 1,
2565
+ pathOffset: o = 0,
2566
+ // This is object creation, which we try to avoid per-frame.
2567
+ ...a
2568
+ }, l, f, c) {
2569
+ if (xs(e, a, f), l) {
2570
+ e.style.viewBox && (e.attrs.viewBox = e.style.viewBox);
2571
+ return;
2572
+ }
2573
+ e.attrs = e.style, e.style = {};
2574
+ const { attrs: u, style: d } = e;
2575
+ u.transform && (d.transform = u.transform, delete u.transform), (d.transform || u.transformOrigin) && (d.transformOrigin = u.transformOrigin ?? "50% 50%", delete u.transformOrigin), d.transform && (d.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete u.transformBox), t !== void 0 && (u.x = t), n !== void 0 && (u.y = n), s !== void 0 && (u.scale = s), r !== void 0 && Ko(u, r, i, o, !1);
2576
+ }
2577
+ const Ms = /* @__PURE__ */ new Set([
2578
+ "baseFrequency",
2579
+ "diffuseConstant",
2580
+ "kernelMatrix",
2581
+ "kernelUnitLength",
2582
+ "keySplines",
2583
+ "keyTimes",
2584
+ "limitingConeAngle",
2585
+ "markerHeight",
2586
+ "markerWidth",
2587
+ "numOctaves",
2588
+ "targetX",
2589
+ "targetY",
2590
+ "surfaceScale",
2591
+ "specularConstant",
2592
+ "specularExponent",
2593
+ "stdDeviation",
2594
+ "tableValues",
2595
+ "viewBox",
2596
+ "gradientTransform",
2597
+ "pathLength",
2598
+ "startOffset",
2599
+ "textLength",
2600
+ "lengthAdjust"
2601
+ ]), qo = (e) => typeof e == "string" && e.toLowerCase() === "svg";
2602
+ function $o(e, t, n, s) {
2603
+ Es(e, t, void 0, s);
2604
+ for (const r in t.attrs)
2605
+ e.setAttribute(Ms.has(r) ? r : Vt(r), t.attrs[r]);
2606
+ }
2607
+ function Ho(e, t, n) {
2608
+ const s = Vs(e, t, n);
2609
+ for (const r in e)
2610
+ if (C(e[r]) || C(t[r])) {
2611
+ const i = re.indexOf(r) !== -1 ? "attr" + r.charAt(0).toUpperCase() + r.substring(1) : r;
2612
+ s[i] = e[r];
2613
+ }
2614
+ return s;
2615
+ }
2616
+ class Wo extends As {
2617
+ constructor() {
2618
+ super(...arguments), this.type = "svg", this.isSVGTag = !1, this.measureInstanceViewportBox = Mt;
2619
+ }
2620
+ getBaseTargetFromProps(t, n) {
2621
+ return t[n];
2622
+ }
2623
+ readValueFromInstance(t, n) {
2624
+ if (ie.has(n)) {
2625
+ const s = hs(n);
2626
+ return s && s.default || 0;
2627
+ }
2628
+ return n = Ms.has(n) ? n : Vt(n), t.getAttribute(n);
2629
+ }
2630
+ scrapeMotionValuesFromProps(t, n, s) {
2631
+ return Ho(t, n, s);
2632
+ }
2633
+ build(t, n, s) {
2634
+ Bo(t, n, this.isSVGTag, s.transformTemplate, s.style);
2635
+ }
2636
+ renderInstance(t, n, s, r) {
2637
+ $o(t, n, s, r);
2638
+ }
2639
+ mount(t) {
2640
+ this.isSVGTag = qo(t.tagName), super.mount(t);
2641
+ }
2642
+ }
2643
+ function _o(e) {
2644
+ const t = {
2645
+ presenceContext: null,
2646
+ props: {},
2647
+ visualState: {
2648
+ renderState: {
2649
+ transform: {},
2650
+ transformOrigin: {},
2651
+ style: {},
2652
+ vars: {},
2653
+ attrs: {}
2654
+ },
2655
+ latestValues: {}
2656
+ }
2657
+ }, n = gs(e) && !Fi(e) ? new Wo(t) : new Ro(t);
2658
+ n.mount(e), ye.set(e, n);
2659
+ }
2660
+ function Uo(e) {
2661
+ const t = {
2662
+ presenceContext: null,
2663
+ props: {},
2664
+ visualState: {
2665
+ renderState: {
2666
+ output: {}
2667
+ },
2668
+ latestValues: {}
2669
+ }
2670
+ }, n = new Fo(t);
2671
+ n.mount(e), ye.set(e, n);
2672
+ }
2673
+ function jo(e, t, n) {
2674
+ const s = C(e) ? e : ge(e);
2675
+ return s.start(ws("", s, t, n)), s.animation;
2676
+ }
2677
+ function Go(e, t) {
2678
+ return C(e) || typeof e == "number" || typeof e == "string" && !Et(t);
2679
+ }
2680
+ function ks(e, t, n, s) {
2681
+ const r = [];
2682
+ if (Go(e, t))
2683
+ r.push(jo(e, Et(t) && t.default || t, n && (n.default || n)));
2684
+ else {
2685
+ const i = ys(e, t, s), o = i.length;
2686
+ for (let a = 0; a < o; a++) {
2687
+ const l = i[a], f = l instanceof Element ? _o : Uo;
2688
+ ye.has(l) || f(l);
2689
+ const c = ye.get(l), u = { ...n };
2690
+ "delay" in u && typeof u.delay == "function" && (u.delay = u.delay(a, o)), r.push(...po(c, { ...t, transition: u }, {}));
2691
+ }
2692
+ }
2693
+ return r;
2694
+ }
2695
+ function zo(e, t, n) {
2696
+ const s = [];
2697
+ return _i(e, t, n, { spring: ee }).forEach(({ keyframes: i, transition: o }, a) => {
2698
+ s.push(...ks(a, i, o));
2699
+ }), s;
2700
+ }
2701
+ function Yo(e) {
2702
+ return Array.isArray(e) && e.some(Array.isArray);
2703
+ }
2704
+ function Xo(e) {
2705
+ function t(n, s, r) {
2706
+ let i = [];
2707
+ return Yo(n) ? i = zo(n, s, e) : i = ks(n, s, r, e), new wi(i);
2708
+ }
2709
+ return t;
2710
+ }
2711
+ const L = Xo();
2712
+ function Zo(e) {
2713
+ return new Worker(
2714
+ "" + new URL("assets/worker-D4V8OS0H.js", import.meta.url).href,
2715
+ {
2716
+ name: e == null ? void 0 : e.name
2717
+ }
2718
+ );
2719
+ }
2720
+ const ln = "data-highlighted", cn = Array.from({ length: 5 }, () => ({
2721
+ worker: new Zo(),
2722
+ isBusy: !1
2723
+ }));
2724
+ function Jo() {
2725
+ return new Promise((e) => {
2726
+ const t = cn.find((s) => !s.isBusy);
2727
+ t && (t.isBusy = !0, e(t));
2728
+ const n = setInterval(() => {
2729
+ const s = cn.find((r) => !r.isBusy);
2730
+ s && (s.isBusy = !0, clearInterval(n), e(s));
2731
+ }, Math.random() * 100);
2732
+ });
2733
+ }
2734
+ async function Qo(e) {
2735
+ const t = await Jo();
2736
+ return t.isBusy = !0, t.worker.postMessage({ html: e }), new Promise((n) => {
2737
+ t.worker.onmessage = (s) => {
2738
+ t.isBusy = !1, n(s.data);
2739
+ };
2740
+ });
2741
+ }
2742
+ async function ea(e, t) {
2743
+ if (e.getAttribute(ln) === "true")
2744
+ return;
2745
+ let s = e.getAttribute("data-source-code");
2746
+ if (!s)
2747
+ throw new Error("No source code provided");
2748
+ s = decodeURIComponent(s).trim();
2749
+ const r = await Qo(s);
2750
+ e.insertAdjacentHTML("beforeend", r), e.setAttribute(ln, "true");
2751
+ }
2752
+ const un = () => window.matchMedia("(max-width: 768px)").matches;
2753
+ function Ls(e, t) {
2754
+ let n;
2755
+ const s = async (o, a) => {
2756
+ if (!e.open)
2757
+ return;
2758
+ const l = un();
2759
+ o == null || o(l), l ? (L(e, { opacity: 0, y: [0, 250] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "easeOut" })) : (L(e, { opacity: 0, scale: [1, 0.98] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: 0 }, { duration: 0.3, ease: "linear" }).then(() => t.style.display = "none")), a == null || a(l), e.close(), n && n.abort();
2760
+ };
2761
+ async function r(o) {
2762
+ const a = o.target;
2763
+ if (!(a instanceof HTMLElement))
2764
+ throw new Error("Clicked element is not an HTMLElement");
2765
+ a.closest("dialog") !== null || await s();
2766
+ }
2767
+ return { show: async (o, a) => {
2768
+ n = new AbortController();
2769
+ const l = window.scrollY;
2770
+ e.showModal(), await new Promise((c) => setTimeout(c, 50)), window.scrollTo(0, l), setTimeout(() => window.scrollTo(0, l), 0), setTimeout(() => window.scrollTo(0, l), 50), t.style.display = "block";
2771
+ const f = un();
2772
+ o == null || o(f), f ? (e.style.overflowY = "hidden", L(e, { opacity: [0, 1], y: [250, 0] }, { duration: 0.3, ease: "easeOut" }), await L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" }), e.style.overflowY = "auto") : (L(e, { opacity: [0, 1], scale: [0.98, 1] }, { duration: 0.3, ease: "easeOut" }), L(t, { opacity: [0, 1] }, { duration: 0.3, ease: "easeOut" })), a == null || a(f), setTimeout(() => document.addEventListener("click", r, {
2773
+ signal: n == null ? void 0 : n.signal
2774
+ }), 0), e.addEventListener("keydown", async (c) => {
2775
+ c.key === "Escape" && (c.preventDefault(), await s());
2776
+ }, { signal: n == null ? void 0 : n.signal });
2777
+ }, close: s };
2778
+ }
2779
+ var P;
2780
+ class ta extends EventTarget {
2781
+ constructor(n) {
2782
+ super();
2783
+ Nt(this, P);
2784
+ Ne(this, P, n);
2785
+ }
2786
+ get value() {
2787
+ return ce(this, P);
2788
+ }
2789
+ set value(n) {
2790
+ ce(this, P) !== n && (Ne(this, P, n), this.dispatchEvent(new CustomEvent("change")));
2791
+ }
2792
+ effect(n) {
2793
+ return n(), this.addEventListener("change", n), () => this.removeEventListener("change", n);
2794
+ }
2795
+ valueOf() {
2796
+ return ce(this, P);
2797
+ }
2798
+ toString() {
2799
+ return String(ce(this, P));
2800
+ }
2801
+ }
2802
+ P = new WeakMap();
2803
+ const Cs = (e) => new ta(e);
2804
+ function na(e) {
2805
+ const t = Cs(!1);
2806
+ return new ResizeObserver(() => {
2807
+ const n = e.scrollHeight > e.clientHeight;
2808
+ t.value !== n && (t.value = n);
2809
+ }).observe(e), { $isOverflowingVertically: t };
2810
+ }
2811
+ function sa(e, t, n) {
2812
+ var s = n || {}, r = s.noTrailing, i = r === void 0 ? !1 : r, o = s.noLeading, a = o === void 0 ? !1 : o, l = s.debounceMode, f = l === void 0 ? void 0 : l, c, u = !1, d = 0;
2813
+ function h() {
2814
+ c && clearTimeout(c);
2815
+ }
2816
+ function p(b) {
2817
+ var w = b || {}, S = w.upcomingOnly, v = S === void 0 ? !1 : S;
2818
+ h(), u = !v;
2819
+ }
2820
+ function y() {
2821
+ for (var b = arguments.length, w = new Array(b), S = 0; S < b; S++)
2822
+ w[S] = arguments[S];
2823
+ var v = this, A = Date.now() - d;
2824
+ if (u)
2825
+ return;
2826
+ function m() {
2827
+ d = Date.now(), t.apply(v, w);
2828
+ }
2829
+ function x() {
2830
+ c = void 0;
2831
+ }
2832
+ !a && f && !c && m(), h(), f === void 0 && A > e ? a ? (d = Date.now(), i || (c = setTimeout(f ? x : m, e))) : m() : i !== !0 && (c = setTimeout(f ? x : m, f === void 0 ? e - A : e));
2833
+ }
2834
+ return y.cancel = p, y;
2835
+ }
2836
+ function ra(e, t, n) {
2837
+ var s = n || {}, r = s.atBegin, i = r === void 0 ? !1 : r;
2838
+ return sa(e, t, {
2839
+ debounceMode: i !== !1
2840
+ });
2841
+ }
2842
+ function ia(...e) {
2843
+ return ra(...e);
2844
+ }
2845
+ class oa {
2846
+ /**
2847
+ * Creates a new PausableInterval instance
2848
+ * @param callback The function to call on each interval
2849
+ * @param interval The interval duration in milliseconds
2850
+ */
2851
+ constructor(t, n) {
2852
+ H(this, "callback");
2853
+ H(this, "interval");
2854
+ H(this, "isRunning");
2855
+ H(this, "timeoutId");
2856
+ H(this, "remaining");
2857
+ H(this, "startTime");
2858
+ this.callback = t, this.interval = n, this.isRunning = !1, this.timeoutId = null, this.remaining = n, this.startTime = null;
2859
+ }
2860
+ /**
2861
+ * Start the interval timer
2862
+ */
2863
+ start() {
2864
+ this.isRunning || (this.isRunning = !0, this.startTime = Date.now(), this.timeoutId = window.setTimeout(() => {
2865
+ this.callback(), this.remaining = this.interval, this.isRunning && this.start();
2866
+ }, this.remaining));
2867
+ }
2868
+ /**
2869
+ * Pause the interval timer
2870
+ */
2871
+ pause() {
2872
+ !this.isRunning || this.timeoutId === null || this.startTime === null || (this.isRunning = !1, window.clearTimeout(this.timeoutId), this.remaining -= Date.now() - this.startTime, this.remaining < 0 && (this.remaining = 0));
2873
+ }
2874
+ /**
2875
+ * Resume the interval timer
2876
+ */
2877
+ resume() {
2878
+ this.start();
2879
+ }
2880
+ /**
2881
+ * Stop and reset the interval timer
2882
+ */
2883
+ stop() {
2884
+ this.isRunning = !1, this.timeoutId !== null && (window.clearTimeout(this.timeoutId), this.timeoutId = null), this.remaining = this.interval;
2885
+ }
2886
+ /**
2887
+ * Check if the interval is currently running
2888
+ * @returns True if the interval is running, false otherwise
2889
+ */
2890
+ isActive() {
2891
+ return this.isRunning;
2892
+ }
2893
+ /**
2894
+ * Change the interval duration
2895
+ * @param newInterval The new interval duration in milliseconds
2896
+ */
2897
+ setInterval(t) {
2898
+ const n = this.isRunning;
2899
+ n && this.pause(), this.interval = t, this.remaining = t, n && this.resume();
2900
+ }
2901
+ }
2902
+ const Is = 3e3, De = document.querySelector("#alerts");
2903
+ if (!De)
2904
+ throw new Error("Alert container not found");
2905
+ const G = [], Z = Cs(!1);
2906
+ Z.effect(ia(50, () => {
2907
+ G.toReversed().forEach(({ element: e, interval: t }, n) => {
2908
+ Z.value ? (t.setInterval(Is - n * 250), t.pause()) : t.resume();
2909
+ const s = 1 - n * 0.1, r = n === 0 ? 0 : -10 * n, i = G.slice(0, n), o = 5;
2910
+ L(e, {
2911
+ y: Z.value ? i.reduce((a, { element: l }) => a + l.offsetHeight + o, 0) * -1 : r,
2912
+ scale: Z.value ? 1 : s
2913
+ }, {
2914
+ ease: "easeOut",
2915
+ duration: 0.3
2916
+ });
2917
+ });
2918
+ }));
2919
+ function fn(e, t) {
2920
+ const n = G.length - 1, s = G.shift();
2921
+ if (!s)
2922
+ throw new Error("First alert not found");
2923
+ s.interval.stop();
2924
+ let r = -10 * (n + 1), i = n === 1 ? 1 : 1 - n * 0.1;
2925
+ t && (r += 10, i -= 0.1), L(s.element, {
2926
+ y: e === "top" ? r : "50%",
2927
+ scale: i,
2928
+ opacity: 0
2929
+ }, {
2930
+ duration: e === "top" ? 0.2 : 0.3,
2931
+ ease: "easeOut"
2932
+ }).then(() => {
2933
+ s.element.remove();
2934
+ });
2935
+ }
2936
+ function aa(e, t) {
2937
+ G.length === 3 && fn("top", !0);
2938
+ const n = document.createElement("div");
2939
+ n.setAttribute("role", "alert"), n.classList.add("c-toast", "z-50"), n.style.opacity = "0%";
2940
+ const s = document.createElement("span");
2941
+ if (s.textContent = e, n.append(s), t) {
2942
+ const i = document.createElement("div");
2943
+ i.innerHTML = t, n.prepend(i);
2944
+ }
2945
+ n.addEventListener("mouseenter", () => Z.value = !0), n.addEventListener("mouseleave", () => Z.value = !1), De == null || De.append(n), L(n, {
2946
+ y: ["100%", 0],
2947
+ scale: 1,
2948
+ opacity: 1
2949
+ }, {
2950
+ ease: "easeOut",
2951
+ duration: 0.3
2952
+ }), G.toReversed().forEach(({ element: i }, o) => {
2953
+ const a = 1 - (o + 1) * 0.1, l = -10 * (o + 1);
2954
+ L(i, {
2955
+ y: l,
2956
+ scale: a
2957
+ }, { ease: "easeOut", duration: 0.3 });
2958
+ });
2959
+ const r = new oa(() => fn("bottom", !1), Is);
2960
+ G.push({ element: n, interval: r }), r.start();
2961
+ }
2962
+ const la = 5e3;
2963
+ async function ca(e) {
2964
+ const t = (n) => {
2965
+ var o;
2966
+ const s = (o = n.contentWindow) == null ? void 0 : o.document;
2967
+ if (!s)
2968
+ return !1;
2969
+ const r = s.body && s.body.children.length > 0, i = s.readyState === "complete";
2970
+ return r && i && s.body.children.length > 0;
2971
+ };
2972
+ await Promise.allSettled(
2973
+ e.map((n) => new Promise((s) => {
2974
+ const r = setInterval(() => {
2975
+ if (t(n))
2976
+ return clearInterval(r), s();
2977
+ }, 100);
2978
+ setTimeout(() => (clearInterval(r), s()), la);
2979
+ }))
2980
+ );
2981
+ }
2982
+ function He(e) {
2983
+ var s;
2984
+ const t = (s = e.contentWindow) == null ? void 0 : s.document;
2985
+ if (!t)
2986
+ throw new Error("iFrame was not fully loaded yet");
2987
+ e.style.height = "0px", e.offsetHeight;
2988
+ const n = Math.max(
2989
+ t.documentElement.scrollHeight,
2990
+ t.body.scrollHeight,
2991
+ t.documentElement.offsetHeight,
2992
+ t.body.offsetHeight,
2993
+ t.documentElement.clientHeight,
2994
+ t.body.clientHeight
2995
+ );
2996
+ e.style.height = `${n}px`;
2997
+ }
2998
+ function Ds() {
2999
+ document.body.classList.add("js-loaded");
3000
+ }
3001
+ const ua = async (e) => {
3002
+ if (await ca(e), e.forEach((t) => {
3003
+ He(t);
3004
+ const n = t.contentWindow;
3005
+ if (!n)
3006
+ return;
3007
+ new ResizeObserver(() => He(t)).observe(n.document.body);
3008
+ }), window.addEventListener("resize", () => {
3009
+ e.forEach((t) => He(t));
3010
+ }), window.location.hash) {
3011
+ const t = document.querySelector(window.location.hash);
3012
+ t && (await new Promise((n) => setTimeout(n, 200)), t.scrollIntoView());
3013
+ }
3014
+ Ds();
3015
+ };
3016
+ function fa(e) {
3017
+ e.forEach((t) => {
3018
+ const n = t.querySelectorAll('[role="tab"]'), s = Array.from(t.querySelectorAll('[role="tabpanel"]')), r = t.querySelector(".tab-trigger-background");
3019
+ if (!r)
3020
+ throw new Error("No tab trigger background found");
3021
+ const i = (l, f) => {
3022
+ const c = l.offsetWidth;
3023
+ if (f) {
3024
+ const d = l === n[0] ? l.offsetLeft : l.offsetLeft + 1;
3025
+ L(r, {
3026
+ width: c,
3027
+ x: `${d}px`
3028
+ }, {
3029
+ duration: 0.3,
3030
+ easing: "ease-out",
3031
+ type: ee,
3032
+ bounce: 0.1
3033
+ });
3034
+ } else
3035
+ r.style.width = `${c}px`, r.style.transform = "translateX(2px)";
3036
+ }, o = n[0];
3037
+ i(o, !1), n.forEach((l) => l.addEventListener("click", () => {
3038
+ n.forEach((f) => {
3039
+ const c = f === l;
3040
+ f.setAttribute("aria-selected", c.toString());
3041
+ const u = s.find((d) => d.getAttribute("aria-labelledby") === f.id);
3042
+ u == null || u.setAttribute("tab-index", c ? "0" : "-1"), u == null || u.classList.toggle("hidden", !c), c && i(l, !0);
3043
+ });
3044
+ })), window.innerWidth < 768 || n.forEach((l) => {
3045
+ const f = s.find((u) => u.getAttribute("aria-labelledby") === l.id);
3046
+ if (!f)
3047
+ throw new Error(`No content found for trigger ${l.id}`);
3048
+ const c = f.querySelector("iframe");
3049
+ !c || c.loading !== "lazy" || (l.addEventListener("mouseenter", () => {
3050
+ c.loading = "eager";
3051
+ }), setTimeout(() => {
3052
+ requestIdleCallback(() => {
3053
+ c.loading === "lazy" && (c.loading = "eager");
3054
+ });
3055
+ }, 5e3));
3056
+ });
3057
+ });
3058
+ }
3059
+ const We = "in2theme", Ve = {
3060
+ normal: "theme-normal",
3061
+ light: "theme-light",
3062
+ dark: "theme-dark"
3063
+ }, da = (e) => {
3064
+ const t = window.matchMedia("(prefers-color-scheme: dark)");
3065
+ function n() {
3066
+ const o = localStorage.getItem(We);
3067
+ return o || localStorage.setItem(We, "normal"), o;
3068
+ }
3069
+ function s() {
3070
+ const o = n();
3071
+ let a = Ve[o];
3072
+ o === "normal" && t.matches && (a = Ve.dark);
3073
+ const l = (u) => {
3074
+ Object.values(Ve).forEach((d) => u.classList.remove(d)), u.classList.remove("dark");
3075
+ }, f = (u) => {
3076
+ u.classList.add(a), a === Ve.dark && u.classList.add("dark");
3077
+ };
3078
+ l(e), f(e);
3079
+ const c = document.querySelectorAll("iframe");
3080
+ c && c.forEach((u) => {
3081
+ l(u), f(u);
3082
+ }), l(document.body), f(document.body), Array.from(document.querySelectorAll("iframe")).filter((u) => u.src.includes("embed.figma.com")).forEach((u) => {
3083
+ const d = new URL(u.src);
3084
+ o === "normal" ? d.searchParams.set("theme", "system") : d.searchParams.set("theme", o), u.src = d.href;
3085
+ });
3086
+ }
3087
+ t.addEventListener("change", () => {
3088
+ n() === "normal" && s();
3089
+ }), s(), e.addEventListener("change", () => {
3090
+ const o = e.querySelector('input[name="theme"]:checked');
3091
+ if (!o)
3092
+ throw new Error("No selected theme found");
3093
+ const a = o.value;
3094
+ localStorage.setItem(We, a), s();
3095
+ });
3096
+ const r = n(), i = e.querySelector(`input[value="${r}"]`);
3097
+ if (!i)
3098
+ throw new Error("No current theme input found");
3099
+ i.checked = !0;
3100
+ };
3101
+ function dn(e, t, n, s) {
3102
+ return t.navigator.platform.indexOf("Mac") === 0 && !e.includes("meta+ctrl") ? e.replace(n, s) : e;
3103
+ }
3104
+ function ha() {
3105
+ return [
3106
+ (e, t) => dn(e, t, "meta", "ctrl"),
3107
+ (e, t) => dn(e, t, "ctrl", "meta")
3108
+ ];
3109
+ }
3110
+ function Y(e, t) {
3111
+ t && (t.tabIndex = 0, t.focus(), e.tabIndex = -1);
3112
+ }
3113
+ function Me(e) {
3114
+ let t = e.closest('[focusgroup]:not([focusgroup="none"])');
3115
+ if (t) return t;
3116
+ }
3117
+ function ke(e) {
3118
+ if (e.hasAttribute("focusgroup"))
3119
+ return [...e.querySelectorAll('*:not([focusgroup="none"])')].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
3120
+ }
3121
+ function ma(e) {
3122
+ let t = e.getAttribute("focusgroup");
3123
+ if (t !== null) return !t.split(" ").includes("block");
3124
+ }
3125
+ function pa() {
3126
+ return (e) => {
3127
+ let t = !1;
3128
+ function n(a) {
3129
+ let l = Me(a.target);
3130
+ if (!l) {
3131
+ s();
3132
+ return;
3133
+ }
3134
+ let f = ke(l), c = Array.from(f).indexOf(a.target), u = "ArrowDown", d = "ArrowUp";
3135
+ ma(l) && (e.document.dir === "rtl" ? (u = "ArrowLeft", d = "ArrowRight") : (u = "ArrowRight", d = "ArrowLeft")), a.key === u ? (a.preventDefault(), f[c + 1] ? Y(a.target, f[c + 1]) : l.getAttribute("focusgroup").includes("wrap") && Y(a.target, f[0])) : a.key === d ? (a.preventDefault(), f[c - 1] ? Y(a.target, f[c - 1]) : l.getAttribute("focusgroup").includes("wrap") && Y(a.target, f[f.length - 1])) : a.key === "Home" ? (a.preventDefault(), Y(a.target, f[0])) : a.key === "End" && (a.preventDefault(), Y(a.target, f[f.length - 1]));
3136
+ }
3137
+ function s() {
3138
+ t = !1, e.removeEventListener("keydown", n);
3139
+ }
3140
+ function r(a) {
3141
+ var f;
3142
+ let l = Me(a.target);
3143
+ if (l) {
3144
+ t || (t = !0, e.addEventListener("keydown", n));
3145
+ let c = ke(l);
3146
+ c.some((u) => u.getAttribute("tabindex") === "0") ? c.forEach((u) => {
3147
+ u !== a.target && u.setAttribute("tabindex", -1);
3148
+ }) : (c.forEach(
3149
+ (u, d) => u.setAttribute("tabindex", d === 0 ? 0 : -1)
3150
+ ), (f = c[0]) == null || f.focus());
3151
+ } else t && s();
3152
+ }
3153
+ function i(a) {
3154
+ var f;
3155
+ let l = Me(a.target);
3156
+ (f = l == null ? void 0 : l.getAttribute("focusgroup")) != null && f.includes("no-memory") && ke(l).forEach((u, d) => {
3157
+ u.setAttribute("tabindex", d === 0 ? 0 : -1);
3158
+ }), (!a.relatedTarget || a.relatedTarget === e.document) && s();
3159
+ }
3160
+ function o(a) {
3161
+ let l = Me(a.target);
3162
+ if (l) {
3163
+ let f = ke(l);
3164
+ for (let c of f)
3165
+ c !== a.target && c.setAttribute("tabindex", -1);
3166
+ a.target.setAttribute("tabindex", 0);
3167
+ }
3168
+ }
3169
+ return e.addEventListener("click", o), e.addEventListener("focusin", r), e.addEventListener("focusout", i), () => {
3170
+ s(), e.removeEventListener("click", o), e.removeEventListener("focusin", r), e.removeEventListener("focusout", i);
3171
+ };
3172
+ };
3173
+ }
3174
+ let ga = {
3175
+ button: ["toolbar"],
3176
+ checkbox: ["toolbar"],
3177
+ menuitem: ["menu", "menubar"],
3178
+ option: ["listbox"],
3179
+ tab: ["tablist"]
3180
+ };
3181
+ function ue(e, t) {
3182
+ t.tabIndex = 0, t.focus(), e.tabIndex = -1;
3183
+ }
3184
+ function _e(e) {
3185
+ let t = e.role || e.type || e.tagName;
3186
+ if (!t) return null;
3187
+ let n = ga[t.toLowerCase()];
3188
+ if (!n) return null;
3189
+ for (let s of n) {
3190
+ let r = e.closest(`[role=${s}]`);
3191
+ if (r) return r;
3192
+ }
3193
+ }
3194
+ function Ue(e, t) {
3195
+ return t.role === "toolbar" ? ya(t) : t.querySelectorAll(`[role=${e.role}]`);
3196
+ }
3197
+ function ya(e) {
3198
+ return [...e.querySelectorAll("*")].filter((n) => n.role === "button" || n.type === "button" || n.role === "checkbox" || n.type === "checkbox");
3199
+ }
3200
+ function ba(e) {
3201
+ let t = e.getAttribute("aria-orientation");
3202
+ if (t === "vertical") return !1;
3203
+ if (t === "horizontal") return !0;
3204
+ let n = e.role;
3205
+ return n === "menubar" || n === "tablist" || n === "toolbar";
3206
+ }
3207
+ function wa(e) {
3208
+ return (t) => {
3209
+ let n = !1, s = 300, r = 0, i = "";
3210
+ function o(u) {
3211
+ let d = _e(u.target);
3212
+ if (!d) {
3213
+ a();
3214
+ return;
3215
+ }
3216
+ let h = Ue(u.target, d), p = Array.from(h).indexOf(u.target), y = "ArrowDown", b = "ArrowUp";
3217
+ if (ba(d) && (t.document.dir === "rtl" ? (y = "ArrowLeft", b = "ArrowRight") : (y = "ArrowRight", b = "ArrowLeft")), u.key === y)
3218
+ u.preventDefault(), ue(u.target, h[p + 1] || h[0]);
3219
+ else if (u.key === b)
3220
+ u.preventDefault(), ue(u.target, h[p - 1] || h[h.length - 1]);
3221
+ else if (u.key === "Home")
3222
+ u.preventDefault(), ue(u.target, h[0]);
3223
+ else if (u.key === "End")
3224
+ u.preventDefault(), ue(u.target, h[h.length - 1]);
3225
+ else if (u.key.length === 1 && d.role !== "tablist") {
3226
+ u.timeStamp - r <= s ? i += u.key.toLowerCase() : i = u.key.toLowerCase(), r = u.timeStamp;
3227
+ let w = Array.from(h).find((S) => {
3228
+ var v, A, m;
3229
+ return (m = (A = (v = S.textContent) == null ? void 0 : v.trim()) == null ? void 0 : A.toLowerCase()) == null ? void 0 : m.startsWith(i);
3230
+ });
3231
+ w && (u.preventDefault(), ue(u.target, w));
3232
+ }
3233
+ }
3234
+ function a() {
3235
+ n = !1, t.removeEventListener("keydown", o);
3236
+ }
3237
+ function l(u) {
3238
+ let d = _e(u.target);
3239
+ if (d) {
3240
+ n || (n = !0, t.addEventListener("keydown", o));
3241
+ let h = Ue(u.target, d);
3242
+ for (let p of h)
3243
+ p !== u.target && p.setAttribute("tabindex", -1);
3244
+ } else n && a();
3245
+ }
3246
+ function f(u) {
3247
+ (!u.relatedTarget || u.relatedTarget === t.document) && a();
3248
+ }
3249
+ function c(u) {
3250
+ let d = _e(u.target);
3251
+ if (d) {
3252
+ let h = Ue(u.target, d);
3253
+ for (let p of h)
3254
+ p !== u.target && p.setAttribute("tabindex", -1);
3255
+ u.target.setAttribute("tabindex", 0);
3256
+ }
3257
+ }
3258
+ return t.addEventListener("click", c), t.addEventListener("focusin", l), t.addEventListener("focusout", f), () => {
3259
+ a(), t.removeEventListener("click", c), t.removeEventListener("focusin", l), t.removeEventListener("focusout", f);
3260
+ };
3261
+ };
3262
+ }
3263
+ function Ta() {
3264
+ return (e) => {
3265
+ let t, n;
3266
+ function s(i) {
3267
+ if (i.target.getAttribute("aria-hidden") === "true") {
3268
+ t = i.target, t.setAttribute("aria-hidden", "false"), n = t.hidden, n && (t.hidden = !1);
3269
+ let o = i.target.querySelector(
3270
+ 'a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])'
3271
+ );
3272
+ o && (o.tabIndex = 0);
3273
+ }
3274
+ }
3275
+ function r(i) {
3276
+ t && t.contains(i.target) && (!i.relatedTarget || !t.contains(i.relatedTarget)) && (i.target.tabIndex = -1, t.setAttribute("aria-hidden", "true"), n && (t.hidden = !0), t = null);
3277
+ }
3278
+ return e.addEventListener("keyuxJump", s), e.addEventListener("focusout", r), () => {
3279
+ e.removeEventListener("keyuxJump", s), e.removeEventListener("focusout", r);
3280
+ };
3281
+ };
3282
+ }
3283
+ let va = /^[^\x00-\x7F]$/, Sa = {
3284
+ checkbox: !0,
3285
+ file: !0,
3286
+ radio: !0
3287
+ }, Aa = {
3288
+ button: !0,
3289
+ reset: !0,
3290
+ submit: !0
3291
+ }, xa = {
3292
+ " ": "space",
3293
+ "+": "plus"
3294
+ };
3295
+ function Rs(e, t) {
3296
+ if (t.tagName !== "BODY" && e !== t)
3297
+ return t.hasAttribute("data-keyux-ignore-hotkeys") || t.getAttribute("aria-hidden") === "true" || t.hasAttribute("inert") ? !0 : Rs(e, t.parentNode);
3298
+ }
3299
+ function hn(e, t) {
3300
+ for (let n of t)
3301
+ if (!Rs(e, n))
3302
+ return n;
3303
+ }
3304
+ function mn(e, t, n) {
3305
+ let s = t;
3306
+ for (let [a] of n)
3307
+ if (s = a(s, e), !s) return !1;
3308
+ let r = e.document, i = r.activeElement, o = i.getAttribute("data-keyux-hotkeys");
3309
+ if (o) {
3310
+ let a = r.querySelector(`#${o}`);
3311
+ if (a) {
3312
+ let l = a.querySelector(`[aria-keyshortcuts="${s}" i]`);
3313
+ if (l) return l;
3314
+ }
3315
+ }
3316
+ return hn(
3317
+ i,
3318
+ i.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
3319
+ ) || hn(
3320
+ r,
3321
+ r.querySelectorAll(`[aria-keyshortcuts="${s}" i]`)
3322
+ );
3323
+ }
3324
+ function Ea(e, t, n) {
3325
+ let s = "";
3326
+ e.metaKey && (s += "meta+"), e.ctrlKey && (s += "ctrl+"), e.altKey && (s += "alt+"), e.shiftKey && (s += "shift+");
3327
+ let r = s;
3328
+ r += xa[e.key] ?? e.key.toLowerCase();
3329
+ let i = mn(t, r, n);
3330
+ if (!i && (e.key.length > 1 || va.test(e.key)) && /^(Key.|Digit\d)$/.test(e.code)) {
3331
+ let o = e.code.replace(/^Key|^Digit/, "").toLowerCase();
3332
+ i = mn(t, s + o, n);
3333
+ }
3334
+ return i;
3335
+ }
3336
+ function Va(e = []) {
3337
+ return (t) => {
3338
+ function n(s) {
3339
+ let r = s.ctrlKey || s.metaKey || s.altKey, i = s.target.isContentEditable || s.target.tagName === "TEXTAREA" || s.target.tagName === "INPUT" && !Sa[s.target.type], o = s.target.role === "menuitem";
3340
+ if (!r && (i || o))
3341
+ return;
3342
+ let a = Ea(s, t, e);
3343
+ a && (a.tagName === "TEXTAREA" || a.tagName === "INPUT" && !Aa[a.type] ? setTimeout(() => {
3344
+ a.focus();
3345
+ }) : a.click());
3346
+ }
3347
+ return t.addEventListener("keydown", n), () => {
3348
+ t.removeEventListener("keydown", n);
3349
+ };
3350
+ };
3351
+ }
3352
+ function Ma() {
3353
+ return (e) => {
3354
+ let t = [];
3355
+ function n(l) {
3356
+ let f = e.document.activeElement;
3357
+ f && f !== e.document.body && t.push(new WeakRef(f)), l.focus({ focusVisible: !0 });
3358
+ }
3359
+ function s() {
3360
+ let l = t.pop();
3361
+ if (!l) {
3362
+ e.document.activeElement.blur();
3363
+ return;
3364
+ }
3365
+ let f = l.deref();
3366
+ f && f.isConnected ? f.focus() : s();
3367
+ }
3368
+ let r = 0, i;
3369
+ function o(l) {
3370
+ clearInterval(i);
3371
+ let f = l.getAttribute("aria-controls");
3372
+ i = setInterval(() => {
3373
+ if (r++ > 50) {
3374
+ clearInterval(i);
3375
+ return;
3376
+ }
3377
+ let c = e.document.getElementById(f);
3378
+ if (c) {
3379
+ let u = c.querySelector(
3380
+ 'a, button, select, textarea, input:not([type=radio]), [type=radio]:checked, [tabindex]:not([tabindex="-1"])'
3381
+ );
3382
+ u && (clearInterval(i), c.dispatchEvent(
3383
+ new e.CustomEvent("keyuxJump", { bubbles: !0 })
3384
+ ), n(u));
3385
+ }
3386
+ }, 50);
3387
+ }
3388
+ function a(l) {
3389
+ l.target.getAttribute("aria-controls") && l.key === "Enter" && o(l.target), l.key === "Escape" && s();
3390
+ }
3391
+ return e.addEventListener("keydown", a), () => {
3392
+ e.removeEventListener("keydown", a);
3393
+ };
3394
+ };
3395
+ }
3396
+ function ka(e, t) {
3397
+ let n = t.map((s) => s(e));
3398
+ return () => {
3399
+ n.forEach((s) => s());
3400
+ };
3401
+ }
3402
+ const La = ha();
3403
+ ka(window, [
3404
+ Va([La]),
3405
+ wa(),
3406
+ pa(),
3407
+ Ma(),
3408
+ Ta()
3409
+ ]);
3410
+ function Ca() {
3411
+ const e = navigator.userAgent.toLowerCase();
3412
+ return e.includes("mac") ? "mac" : e.includes("linux") ? "linux" : e.includes("win") ? "windows" : "unknown";
3413
+ }
3414
+ function Ia() {
3415
+ const e = document.querySelectorAll("iframe"), t = document.querySelector("#styleguide-previous"), n = document.querySelector("#styleguide-next"), s = (r) => {
3416
+ document.activeElement instanceof HTMLButtonElement || r.metaKey || r.ctrlKey || (t && r.key === "ArrowLeft" && (r.preventDefault(), t.click()), n && r.key === "ArrowRight" && (r.preventDefault(), n.click()));
3417
+ };
3418
+ e.forEach((r) => {
3419
+ const i = r.contentWindow;
3420
+ i && i.addEventListener("keydown", s);
3421
+ }), window.addEventListener("keydown", s);
3422
+ }
3423
+ function Da() {
3424
+ const e = document.querySelectorAll("iframe"), t = (n) => {
3425
+ n.key === "k" && (n.metaKey || n.ctrlKey) && (n.preventDefault(), window.dispatchEvent(new Event("styleguideOpenSearch")));
3426
+ };
3427
+ e.forEach((n) => {
3428
+ const s = n.contentWindow;
3429
+ s && s.addEventListener("keydown", t);
3430
+ }), window.addEventListener("keydown", t);
3431
+ }
3432
+ const Ra = Ca();
3433
+ document.body.setAttribute("data-os", Ra);
3434
+ const Oa = "ontouchstart" in window || navigator.maxTouchPoints > 0;
3435
+ document.body.setAttribute("data-is-mobile", String(Oa));
3436
+ Ia();
3437
+ Da();
3438
+ function Fa() {
3439
+ const e = document.querySelector("header");
3440
+ if (!e)
3441
+ throw new Error("No header found");
3442
+ const t = () => e.getBoundingClientRect().height;
3443
+ document.documentElement.style.setProperty("--header-height", `${t()}px`), window.addEventListener("resize", () => {
3444
+ document.documentElement.style.setProperty("--header-height", `${t()}px`);
3445
+ });
3446
+ }
3447
+ function Pa() {
3448
+ const e = document.querySelector("aside");
3449
+ if (!e)
3450
+ throw new Error("No aside menu found");
3451
+ e.addEventListener("scroll", () => {
3452
+ const n = e.scrollTop / (e.scrollHeight - e.clientHeight) * 100;
3453
+ sessionStorage.setItem("asideScrollPercentage", n.toString());
3454
+ });
3455
+ function t() {
3456
+ const n = sessionStorage.getItem("asideScrollPercentage");
3457
+ if (n) {
3458
+ const s = Number.parseFloat(n), r = (e.scrollHeight - e.clientHeight) * s / 100;
3459
+ e.scrollTop = r;
3460
+ }
3461
+ }
3462
+ window.addEventListener("resize", t), t();
3463
+ }
3464
+ Fa();
3465
+ Pa();
3466
+ const Os = document.querySelector("#search-dialog");
3467
+ if (!Os)
3468
+ throw new Error("No search dialog found");
3469
+ const Fs = document.querySelector(".dialog-backdrop");
3470
+ if (!Fs)
3471
+ throw new Error("No dialog backdrop found");
3472
+ const kt = document.querySelectorAll("[data-open-search]");
3473
+ if (kt.length === 0)
3474
+ throw new Error("No open search buttons found");
3475
+ const Q = document.querySelector("#search-input");
3476
+ if (!Q)
3477
+ throw new Error("No search input found");
3478
+ const Ps = document.querySelector("#search-list");
3479
+ if (!Ps)
3480
+ throw new Error("No search list found");
3481
+ const Ns = document.querySelectorAll(".search-category__item--active");
3482
+ if (!Ns)
3483
+ throw new Error("No search results found");
3484
+ const Ks = document.querySelector("#search-no-results");
3485
+ if (!Ks)
3486
+ throw new Error("No search no results element found");
3487
+ const { show: Na } = Ls(Os, Fs);
3488
+ async function Bs() {
3489
+ await Na(
3490
+ (e) => {
3491
+ e && Q.setAttribute("inert", "");
3492
+ },
3493
+ (e) => {
3494
+ e && Q.removeAttribute("inert"), kt.forEach((t) => t.ariaExpanded = "true"), Q.ariaExpanded = "true", qs();
3495
+ }
3496
+ );
3497
+ }
3498
+ function qs() {
3499
+ const e = Q.value.toLowerCase().trim();
3500
+ let t = !1;
3501
+ Ns.forEach((n) => {
3502
+ var i, o;
3503
+ let s;
3504
+ const r = ((i = n.getAttribute("data-search-keywords")) == null ? void 0 : i.split(",")) || [];
3505
+ if (r.length > 0)
3506
+ s = r.some((a) => a.toLowerCase().includes(e));
3507
+ else {
3508
+ const a = ((o = n.textContent) == null ? void 0 : o.toLowerCase()) ?? "";
3509
+ s = a == null ? void 0 : a.includes(e);
3510
+ }
3511
+ n.classList.toggle("search-category__item--active", s), s && (t = !0);
3512
+ }), Ps.classList.toggle("hidden", !t), Ks.classList.toggle("hidden", t);
3513
+ }
3514
+ Q.addEventListener("input", qs);
3515
+ kt.forEach((e) => e.addEventListener("click", Bs));
3516
+ window.addEventListener("styleguideOpenSearch", Bs);
3517
+ const pn = Array.from(document.querySelectorAll(".preview-iframe"));
3518
+ pn.length > 0 ? ua(pn).catch(console.error) : Ds();
3519
+ const gn = document.querySelector(".theme-select");
3520
+ gn && da(gn);
3521
+ const Ka = document.querySelectorAll(".styleguide-section");
3522
+ Ka.forEach((e) => {
3523
+ new ResizeObserver(() => {
3524
+ const t = e.scrollHeight > 600;
3525
+ e.classList.toggle("styleguide-section--large", t);
3526
+ }).observe(e);
3527
+ });
3528
+ const yn = document.querySelectorAll(".tabs");
3529
+ yn.length > 0 && fa(yn);
3530
+ const bn = document.querySelectorAll("details:has(.code-highlight)");
3531
+ bn.length > 0 && bn.forEach((e) => {
3532
+ const t = e.querySelector(".code-highlight");
3533
+ if (!t)
3534
+ throw new Error("No code element found");
3535
+ ea(t).catch(console.error);
3536
+ });
3537
+ const Le = document.querySelectorAll("[data-code-audit-iframe]"), je = document.querySelector("#code-audit-dialog"), wn = document.querySelector(".dialog-backdrop");
3538
+ Le.length > 0 && je && wn && (async () => {
3539
+ const { createHtmlValidator: e, auditCode: t } = await import("./html-validator-DqoaRE1y.js"), { show: n, close: s } = Ls(je, wn);
3540
+ Le.forEach((r) => r.addEventListener("click", async () => {
3541
+ Le.forEach((o) => o.setAttribute("aria-expanded", "false")), r.setAttribute("disabled", "");
3542
+ const { isValid: i } = await t(r, je, s);
3543
+ i ? (r.classList.add("text-green-500", "!cursor-not-allowed"), aa(
3544
+ "Scanned HTML, no issues found!",
3545
+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="size-4 text-green-500/50"><path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14Zm3.844-8.791a.75.75 0 0 0-1.188-.918l-3.7 4.79-1.649-1.833a.75.75 0 1 0-1.114 1.004l2.25 2.5a.75.75 0 0 0 1.15-.043l4.25-5.5Z" clip-rule="evenodd" /></svg>'
3546
+ ), setTimeout(() => {
3547
+ r.classList.remove("text-green-500", "!cursor-not-allowed"), r.removeAttribute("disabled");
3548
+ }, 5e3)) : (r.setAttribute("aria-expanded", "true"), r.removeAttribute("disabled"), r.classList.add("text-red-500"), await n(
3549
+ void 0,
3550
+ () => {
3551
+ Le.forEach((o) => {
3552
+ o.setAttribute("aria-expanded", "false"), setTimeout(() => o.classList.remove("text-red-500"), 2500);
3553
+ });
3554
+ }
3555
+ ));
3556
+ })), setTimeout(() => {
3557
+ requestIdleCallback(e);
3558
+ }, 8e3);
3559
+ })();
3560
+ const Tn = document.querySelector("#icon-search-input"), vn = document.querySelector("#icon-search-input-reset"), Sn = document.querySelector("#icon-search-list");
3561
+ Tn && Sn && vn && import("./icons-oK5xUF8R.js").then(({ default: e }) => e(Tn, Sn, vn)).catch(console.error);
3562
+ const $s = "data-clipboard-value", An = document.querySelectorAll(`button[${$s}]`);
3563
+ An.length > 0 && import("./clipboard-DhKzwemV.js").then(({ default: e }) => e(An, $s)).catch(console.error);
3564
+ const xn = document.querySelectorAll(".markdown-container-folded");
3565
+ xn.length > 0 && xn.forEach((e) => {
3566
+ const t = e.querySelector(".markdown-container");
3567
+ if (!t)
3568
+ throw new Error("No markdown container found");
3569
+ const n = e.querySelector(".markdown-show-more-container");
3570
+ if (!n)
3571
+ throw new Error("No show more container found");
3572
+ const s = e.querySelector(".markdown-show-more");
3573
+ if (!s)
3574
+ throw new Error("No show more button found");
3575
+ const { $isOverflowingVertically: r } = na(e), i = () => {
3576
+ const a = t.scrollHeight > t.clientHeight;
3577
+ n.classList.toggle("hidden", !a);
3578
+ };
3579
+ i();
3580
+ const o = r.effect(i);
3581
+ s.addEventListener("click", async () => {
3582
+ o();
3583
+ const a = t.scrollHeight;
3584
+ L(t, {
3585
+ maxHeight: `${a}px`
3586
+ }, { duration: 0.5 }).then(() => {
3587
+ t.classList.remove("max-h-[400px]"), t.style.maxHeight = "";
3588
+ }), L(n, {
3589
+ opacity: 0
3590
+ }, { duration: 0.5 }).then(() => n.classList.add("hidden"));
3591
+ });
3592
+ });
3593
+ let Ce;
3594
+ window.addEventListener("scroll", () => {
3595
+ Ce && (clearTimeout(Ce), Ce = void 0), document.body.classList.contains("is-scrolling") || document.body.classList.add("is-scrolling"), Ce = setTimeout(() => {
3596
+ document.body.classList.remove("is-scrolling");
3597
+ }, 250);
3598
+ });
3599
+ export {
3600
+ L as a,
3601
+ aa as r,
3602
+ ee as s
3603
+ };