@jasonshimmy/custom-elements-runtime 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements-runtime.cjs.js +19 -12
- package/dist/custom-elements-runtime.cjs.js.map +1 -1
- package/dist/custom-elements-runtime.es.js +1081 -1067
- package/dist/custom-elements-runtime.es.js.map +1 -1
- package/dist/custom-elements-runtime.umd.js +19 -12
- package/dist/custom-elements-runtime.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class yt {
|
|
2
2
|
pendingUpdates = /* @__PURE__ */ new Map();
|
|
3
3
|
isFlushScheduled = !1;
|
|
4
4
|
/**
|
|
@@ -29,12 +29,12 @@ class mt {
|
|
|
29
29
|
return this.pendingUpdates.size;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const
|
|
33
|
-
function
|
|
34
|
-
|
|
32
|
+
const bt = new yt();
|
|
33
|
+
function de(e, t) {
|
|
34
|
+
bt.schedule(e, t);
|
|
35
35
|
}
|
|
36
|
-
const
|
|
37
|
-
class
|
|
36
|
+
const Je = /* @__PURE__ */ new WeakSet();
|
|
37
|
+
class wt {
|
|
38
38
|
static cache = /* @__PURE__ */ new WeakMap();
|
|
39
39
|
static arrayHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
40
40
|
static objectHandlerCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -47,7 +47,7 @@ class bt {
|
|
|
47
47
|
return i;
|
|
48
48
|
const s = n ? this.getOrCreateArrayHandler(r) : this.getOrCreateObjectHandler(r), o = new Proxy(t, s);
|
|
49
49
|
try {
|
|
50
|
-
|
|
50
|
+
ct.markAsProxy(o);
|
|
51
51
|
} catch {
|
|
52
52
|
}
|
|
53
53
|
return this.cache.set(t, o), o;
|
|
@@ -71,8 +71,8 @@ class bt {
|
|
|
71
71
|
"fill",
|
|
72
72
|
"copyWithin"
|
|
73
73
|
].includes(i) ? function(...a) {
|
|
74
|
-
const
|
|
75
|
-
return t.triggerUpdate(),
|
|
74
|
+
const h = o.apply(n, a);
|
|
75
|
+
return t.triggerUpdate(), h;
|
|
76
76
|
} : o;
|
|
77
77
|
},
|
|
78
78
|
set: (n, i, s) => (n[i] = t.makeReactiveValue(s), t.triggerUpdate(), !0),
|
|
@@ -118,7 +118,7 @@ class bt {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
class
|
|
121
|
+
class ct {
|
|
122
122
|
// Cache a stable reactiveContext object keyed by onUpdate -> makeReactive
|
|
123
123
|
// This allows handler caches in ReactiveProxyCache to reuse handlers
|
|
124
124
|
// for identical reactive contexts instead of creating a new context object
|
|
@@ -129,7 +129,7 @@ class ot {
|
|
|
129
129
|
*/
|
|
130
130
|
static createReactiveProxy(t, r, n) {
|
|
131
131
|
try {
|
|
132
|
-
if (
|
|
132
|
+
if (Je.has(t)) return t;
|
|
133
133
|
} catch {
|
|
134
134
|
}
|
|
135
135
|
const i = Array.isArray(t);
|
|
@@ -139,7 +139,7 @@ class ot {
|
|
|
139
139
|
return o || (o = {
|
|
140
140
|
triggerUpdate: r,
|
|
141
141
|
makeReactiveValue: n
|
|
142
|
-
}, s.set(n, o)),
|
|
142
|
+
}, s.set(n, o)), wt.getOrCreateProxy(t, o, i);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* Mark an object as a proxy (for optimization)
|
|
@@ -147,12 +147,12 @@ class ot {
|
|
|
147
147
|
static markAsProxy(t) {
|
|
148
148
|
if (t)
|
|
149
149
|
try {
|
|
150
|
-
|
|
150
|
+
Je.add(t);
|
|
151
151
|
} catch {
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
class
|
|
155
|
+
class xt {
|
|
156
156
|
currentComponent = null;
|
|
157
157
|
componentDependencies = /* @__PURE__ */ new Map();
|
|
158
158
|
componentRenderFunctions = /* @__PURE__ */ new Map();
|
|
@@ -218,11 +218,11 @@ class wt {
|
|
|
218
218
|
*/
|
|
219
219
|
getOrCreateState(t) {
|
|
220
220
|
if (!this.currentComponent)
|
|
221
|
-
return new
|
|
221
|
+
return new Fe(t);
|
|
222
222
|
const r = this.currentComponent, n = this.stateIndexCounter.get(r) || 0, i = `${r}:${n}`;
|
|
223
223
|
if (this.stateIndexCounter.set(r, n + 1), this.stateStorage.has(i))
|
|
224
224
|
return this.stateStorage.get(i);
|
|
225
|
-
const s = new
|
|
225
|
+
const s = new Fe(t);
|
|
226
226
|
return this.stateStorage.set(i, s), s;
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
@@ -237,7 +237,7 @@ class wt {
|
|
|
237
237
|
triggerUpdate(t) {
|
|
238
238
|
t.getDependents().forEach((r) => {
|
|
239
239
|
const n = this.componentRenderFunctions.get(r);
|
|
240
|
-
n &&
|
|
240
|
+
n && de(n, r);
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
243
|
/**
|
|
@@ -251,8 +251,8 @@ class wt {
|
|
|
251
251
|
this.stateIndexCounter.delete(t);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
const F = new
|
|
255
|
-
class
|
|
254
|
+
const F = new xt();
|
|
255
|
+
class Fe {
|
|
256
256
|
_value;
|
|
257
257
|
dependents = /* @__PURE__ */ new Set();
|
|
258
258
|
constructor(t) {
|
|
@@ -284,7 +284,7 @@ class Ue {
|
|
|
284
284
|
return this.dependents;
|
|
285
285
|
}
|
|
286
286
|
makeReactive(t) {
|
|
287
|
-
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t :
|
|
287
|
+
return t === null || typeof t != "object" || t instanceof Node || t instanceof Element || t instanceof HTMLElement ? t : ct.createReactiveProxy(
|
|
288
288
|
t,
|
|
289
289
|
() => F.triggerUpdate(this),
|
|
290
290
|
(r) => this.makeReactive(r)
|
|
@@ -308,7 +308,7 @@ function ee(e) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
function mr(e) {
|
|
311
|
-
const t = new
|
|
311
|
+
const t = new Fe(e());
|
|
312
312
|
return {
|
|
313
313
|
get value() {
|
|
314
314
|
return F.trackDependency(t), e();
|
|
@@ -327,23 +327,23 @@ function yr(e, t, r = {}) {
|
|
|
327
327
|
F.cleanup(i);
|
|
328
328
|
};
|
|
329
329
|
}
|
|
330
|
-
const
|
|
331
|
-
function
|
|
332
|
-
if ($e.has(e))
|
|
333
|
-
return $e.get(e);
|
|
334
|
-
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
335
|
-
return $e.size < Fe && $e.set(e, t), t;
|
|
336
|
-
}
|
|
337
|
-
function at(e) {
|
|
330
|
+
const ke = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Map(), _e = /* @__PURE__ */ new Map(), Ve = 500;
|
|
331
|
+
function ie(e) {
|
|
338
332
|
if (ke.has(e))
|
|
339
333
|
return ke.get(e);
|
|
334
|
+
const t = e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
335
|
+
return ke.size < Ve && ke.set(e, t), t;
|
|
336
|
+
}
|
|
337
|
+
function lt(e) {
|
|
338
|
+
if (Ce.has(e))
|
|
339
|
+
return Ce.get(e);
|
|
340
340
|
const t = e.replace(/-([a-z])/g, (r, n) => n.toUpperCase());
|
|
341
|
-
return
|
|
341
|
+
return Ce.size < Ve && Ce.set(e, t), t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function he(e) {
|
|
344
344
|
if (typeof e == "string") {
|
|
345
|
-
if (
|
|
346
|
-
return
|
|
345
|
+
if (_e.has(e))
|
|
346
|
+
return _e.get(e);
|
|
347
347
|
const t = e.replace(
|
|
348
348
|
/[&<>"']/g,
|
|
349
349
|
(r) => ({
|
|
@@ -354,102 +354,102 @@ function pe(e) {
|
|
|
354
354
|
"'": "'"
|
|
355
355
|
})[r]
|
|
356
356
|
);
|
|
357
|
-
return t !== e &&
|
|
357
|
+
return t !== e && _e.size < Ve && _e.set(e, t), t;
|
|
358
358
|
}
|
|
359
359
|
return e;
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function U(e, t) {
|
|
362
362
|
if (typeof t == "string") {
|
|
363
363
|
const r = t.split(".").reduce((n, i) => n?.[i], e);
|
|
364
364
|
return ee(r) ? r.value : r;
|
|
365
365
|
}
|
|
366
366
|
return t;
|
|
367
367
|
}
|
|
368
|
-
function
|
|
368
|
+
function Ae(e, t, r) {
|
|
369
369
|
const n = String(t).split("."), i = n.pop();
|
|
370
370
|
if (!i) return;
|
|
371
371
|
const s = n.reduce((o, c) => (o[c] == null && (o[c] = {}), o[c]), e);
|
|
372
372
|
ee(s[i]) ? s[i].value = r : s[i] = r;
|
|
373
373
|
}
|
|
374
|
-
const
|
|
375
|
-
function
|
|
376
|
-
|
|
374
|
+
const ut = typeof process < "u" && process.env?.NODE_ENV !== "production";
|
|
375
|
+
function oe(e, ...t) {
|
|
376
|
+
ut && console.error(e, ...t);
|
|
377
377
|
}
|
|
378
|
-
function
|
|
379
|
-
|
|
378
|
+
function Pe(e, ...t) {
|
|
379
|
+
ut && console.warn(e, ...t);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function vt(e, t, r) {
|
|
382
382
|
if (r)
|
|
383
383
|
for (const [n, i] of Object.entries(r)) {
|
|
384
384
|
let s, o = {};
|
|
385
385
|
if (Array.isArray(i) ? (s = i[0], o = i[1] || {}) : s = i, t.set(n, {
|
|
386
386
|
callback: s,
|
|
387
387
|
options: o,
|
|
388
|
-
oldValue:
|
|
388
|
+
oldValue: U(e, n)
|
|
389
389
|
}), o.immediate)
|
|
390
390
|
try {
|
|
391
|
-
const c =
|
|
391
|
+
const c = U(e, n);
|
|
392
392
|
s(c, void 0, e);
|
|
393
393
|
} catch (c) {
|
|
394
|
-
|
|
394
|
+
oe(`Error in immediate watcher for "${n}":`, c);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
function
|
|
398
|
+
function $t(e, t, r, n) {
|
|
399
399
|
const i = (o, c) => {
|
|
400
400
|
if (o === c) return !0;
|
|
401
401
|
if (typeof o != typeof c || typeof o != "object" || o === null || c === null) return !1;
|
|
402
402
|
if (Array.isArray(o) && Array.isArray(c))
|
|
403
|
-
return o.length !== c.length ? !1 : o.every((
|
|
404
|
-
const a = Object.keys(o),
|
|
405
|
-
return a.length !==
|
|
403
|
+
return o.length !== c.length ? !1 : o.every((p, x) => i(p, c[x]));
|
|
404
|
+
const a = Object.keys(o), h = Object.keys(c);
|
|
405
|
+
return a.length !== h.length ? !1 : a.every((p) => i(o[p], c[p]));
|
|
406
406
|
}, s = t.get(r);
|
|
407
407
|
if (s && !i(n, s.oldValue))
|
|
408
408
|
try {
|
|
409
409
|
s.callback(n, s.oldValue, e), s.oldValue = n;
|
|
410
410
|
} catch (o) {
|
|
411
|
-
|
|
411
|
+
oe(`Error in watcher for "${r}":`, o);
|
|
412
412
|
}
|
|
413
413
|
for (const [o, c] of t.entries())
|
|
414
414
|
if (c.options.deep && r.startsWith(o + "."))
|
|
415
415
|
try {
|
|
416
|
-
const a =
|
|
416
|
+
const a = U(e, o);
|
|
417
417
|
i(a, c.oldValue) || (c.callback(a, c.oldValue, e), c.oldValue = a);
|
|
418
418
|
} catch (a) {
|
|
419
|
-
|
|
419
|
+
oe(`Error in deep watcher for "${o}":`, a);
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Ze(e, t) {
|
|
423
423
|
return t === Boolean ? e === "true" : t === Number ? Number(e) : e;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function kt(e, t, r) {
|
|
426
426
|
t && Object.entries(t).forEach(([n, i]) => {
|
|
427
|
-
const s =
|
|
427
|
+
const s = ie(n), o = e.getAttribute(s);
|
|
428
428
|
if (i.type === Function && typeof e[n] == "function")
|
|
429
429
|
r[n] = e[n];
|
|
430
430
|
else if (typeof e[n] < "u")
|
|
431
431
|
try {
|
|
432
432
|
const c = e[n];
|
|
433
|
-
i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] =
|
|
433
|
+
i.type === Boolean && typeof c == "boolean" || i.type === Number && typeof c == "number" || i.type === Function && typeof c == "function" ? r[n] = c : r[n] = Ze(String(c), i.type);
|
|
434
434
|
} catch {
|
|
435
435
|
r[n] = e[n];
|
|
436
436
|
}
|
|
437
|
-
else o !== null ? r[n] =
|
|
437
|
+
else o !== null ? r[n] = Ze(o, i.type) : "default" in i && i.default !== void 0 && (r[n] = i.default);
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
t.props &&
|
|
440
|
+
function Ct(e, t, r) {
|
|
441
|
+
t.props && kt(e, t.props, r);
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function _t(e, t, r, n) {
|
|
444
444
|
e.onConnected && !r && (e.onConnected(t), n(!0));
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Et(e, t, r, n, i, s, o, c) {
|
|
447
447
|
e.onDisconnected && e.onDisconnected(t), r.forEach((a) => a()), n(), i(), s(!1), o(null), c(!1);
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function St(e, t, r, n, i) {
|
|
450
450
|
e.onAttributeChanged && e.onAttributeChanged(t, r, n, i);
|
|
451
451
|
}
|
|
452
|
-
class
|
|
452
|
+
class At {
|
|
453
453
|
static cache = /* @__PURE__ */ new Map();
|
|
454
454
|
static maxCacheSize = 1e3;
|
|
455
455
|
// Dangerous patterns to block
|
|
@@ -474,7 +474,7 @@ class St {
|
|
|
474
474
|
const n = this.cache.get(t);
|
|
475
475
|
if (n) {
|
|
476
476
|
if (!n.isSecure) {
|
|
477
|
-
|
|
477
|
+
Pe("Blocked cached dangerous expression:", t);
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
return n.evaluator(r);
|
|
@@ -485,7 +485,7 @@ class St {
|
|
|
485
485
|
s && this.cache.delete(s);
|
|
486
486
|
}
|
|
487
487
|
if (this.cache.set(t, i), !i.isSecure) {
|
|
488
|
-
|
|
488
|
+
Pe("Blocked dangerous expression:", t);
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
491
491
|
return i.evaluator(r);
|
|
@@ -500,7 +500,7 @@ class St {
|
|
|
500
500
|
try {
|
|
501
501
|
return { evaluator: this.createSafeEvaluator(t), isSecure: !0 };
|
|
502
502
|
} catch (r) {
|
|
503
|
-
return
|
|
503
|
+
return Pe("Failed to create evaluator for expression:", t, r), { evaluator: () => {
|
|
504
504
|
}, isSecure: !1 };
|
|
505
505
|
}
|
|
506
506
|
}
|
|
@@ -512,9 +512,9 @@ class St {
|
|
|
512
512
|
return this.createObjectEvaluator(t);
|
|
513
513
|
if (/^ctx\.[a-zA-Z0-9_\.]+$/.test(t.trim())) {
|
|
514
514
|
const r = t.trim().slice(4);
|
|
515
|
-
return (n) =>
|
|
515
|
+
return (n) => U(n, r);
|
|
516
516
|
}
|
|
517
|
-
return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) =>
|
|
517
|
+
return t.includes("ctx") || /[+\-*/%<>=&|?:\[\]]/.test(t) ? this.createSimpleEvaluator(t) : (r) => U(r, t);
|
|
518
518
|
}
|
|
519
519
|
static createObjectEvaluator(t) {
|
|
520
520
|
const r = t.trim().slice(1, -1), n = this.parseObjectProperties(r);
|
|
@@ -524,7 +524,7 @@ class St {
|
|
|
524
524
|
try {
|
|
525
525
|
if (c.startsWith("ctx.")) {
|
|
526
526
|
const a = c.slice(4);
|
|
527
|
-
s[o] =
|
|
527
|
+
s[o] = U(i, a);
|
|
528
528
|
} else
|
|
529
529
|
s[o] = this.evaluateSimpleValue(c, i);
|
|
530
530
|
} catch {
|
|
@@ -548,35 +548,35 @@ class St {
|
|
|
548
548
|
try {
|
|
549
549
|
let n = t;
|
|
550
550
|
const i = [];
|
|
551
|
-
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (
|
|
551
|
+
n = n.replace(/("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')/g, (x) => `<<#${i.push(x) - 1}#>>`);
|
|
552
552
|
const s = n.match(/ctx\.[\w.]+/g) || [];
|
|
553
|
-
for (const
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
n = n.replace(new RegExp(
|
|
553
|
+
for (const x of s) {
|
|
554
|
+
const m = x.slice(4), d = U(r, m);
|
|
555
|
+
if (d === void 0) return;
|
|
556
|
+
const u = i.push(JSON.stringify(d)) - 1;
|
|
557
|
+
n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`);
|
|
558
558
|
}
|
|
559
559
|
const o = /\b[a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)+\b/g, c = n.match(o) || [];
|
|
560
|
-
for (const
|
|
561
|
-
if (
|
|
562
|
-
const
|
|
563
|
-
if (
|
|
564
|
-
const
|
|
565
|
-
n = n.replace(new RegExp(
|
|
560
|
+
for (const x of c) {
|
|
561
|
+
if (x.startsWith("ctx.")) continue;
|
|
562
|
+
const m = U(r, x);
|
|
563
|
+
if (m === void 0) return;
|
|
564
|
+
const d = i.push(JSON.stringify(m)) - 1;
|
|
565
|
+
n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${d}#>>`);
|
|
566
566
|
}
|
|
567
567
|
const a = /\b([a-zA-Z_][a-zA-Z0-9_]*)\b/g;
|
|
568
|
-
let
|
|
569
|
-
const
|
|
570
|
-
for (; (
|
|
571
|
-
const
|
|
572
|
-
if (["true", "false", "null", "undefined"].includes(
|
|
573
|
-
|
|
574
|
-
const
|
|
575
|
-
if (
|
|
576
|
-
const
|
|
577
|
-
|
|
568
|
+
let h;
|
|
569
|
+
const p = /* @__PURE__ */ new Set();
|
|
570
|
+
for (; (h = a.exec(n)) !== null; ) {
|
|
571
|
+
const x = h[1];
|
|
572
|
+
if (["true", "false", "null", "undefined"].includes(x) || /^[0-9]+$/.test(x) || x === "ctx" || p.has(x)) continue;
|
|
573
|
+
p.add(x);
|
|
574
|
+
const m = U(r, x);
|
|
575
|
+
if (m === void 0) return;
|
|
576
|
+
const d = JSON.stringify(m), u = i.push(d) - 1;
|
|
577
|
+
x.includes(".") ? n = n.replace(new RegExp(x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), `<<#${u}#>>`) : n = n.replace(new RegExp("\\b" + x.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + "\\b", "g"), `<<#${u}#>>`);
|
|
578
578
|
}
|
|
579
|
-
n = n.replace(/<<#(\d+)#>>/g, (
|
|
579
|
+
n = n.replace(/<<#(\d+)#>>/g, (x, m) => i[Number(m)]);
|
|
580
580
|
try {
|
|
581
581
|
return this.evaluateBasicExpression(n);
|
|
582
582
|
} catch {
|
|
@@ -599,12 +599,12 @@ class St {
|
|
|
599
599
|
return r[n];
|
|
600
600
|
}
|
|
601
601
|
function s(l) {
|
|
602
|
-
const
|
|
603
|
-
if (l && !
|
|
602
|
+
const f = r[n++];
|
|
603
|
+
if (l && !f)
|
|
604
604
|
throw new Error(`Unexpected token EOF, expected ${l}`);
|
|
605
|
-
if (l &&
|
|
606
|
-
throw new Error(`Unexpected token ${
|
|
607
|
-
return
|
|
605
|
+
if (l && f && f.type !== l && f.value !== l)
|
|
606
|
+
throw new Error(`Unexpected token ${f.type}/${f.value}, expected ${l}`);
|
|
607
|
+
return f;
|
|
608
608
|
}
|
|
609
609
|
function o() {
|
|
610
610
|
return c();
|
|
@@ -613,101 +613,101 @@ class St {
|
|
|
613
613
|
let l = a();
|
|
614
614
|
if (i() && i().value === "?") {
|
|
615
615
|
s("?");
|
|
616
|
-
const
|
|
616
|
+
const f = o();
|
|
617
617
|
s(":");
|
|
618
|
-
const
|
|
619
|
-
return l ?
|
|
618
|
+
const b = o();
|
|
619
|
+
return l ? f : b;
|
|
620
620
|
}
|
|
621
621
|
return l;
|
|
622
622
|
}
|
|
623
623
|
function a() {
|
|
624
|
-
let l =
|
|
624
|
+
let l = h();
|
|
625
625
|
for (; i() && i().value === "||"; ) {
|
|
626
626
|
s("OP");
|
|
627
|
-
const
|
|
628
|
-
l = l ||
|
|
627
|
+
const f = h();
|
|
628
|
+
l = l || f;
|
|
629
629
|
}
|
|
630
630
|
return l;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
633
|
-
let l =
|
|
632
|
+
function h() {
|
|
633
|
+
let l = p();
|
|
634
634
|
for (; i() && i().value === "&&"; ) {
|
|
635
635
|
s("OP");
|
|
636
|
-
const
|
|
637
|
-
l = l &&
|
|
636
|
+
const f = p();
|
|
637
|
+
l = l && f;
|
|
638
638
|
}
|
|
639
639
|
return l;
|
|
640
640
|
}
|
|
641
|
-
function
|
|
642
|
-
let l =
|
|
641
|
+
function p() {
|
|
642
|
+
let l = x();
|
|
643
643
|
for (; i() && ["==", "!=", "===", "!=="].includes(i().value); ) {
|
|
644
|
-
const
|
|
645
|
-
switch (
|
|
644
|
+
const f = s("OP").value, b = x();
|
|
645
|
+
switch (f) {
|
|
646
646
|
case "==":
|
|
647
|
-
l = l ==
|
|
647
|
+
l = l == b;
|
|
648
648
|
break;
|
|
649
649
|
case "!=":
|
|
650
|
-
l = l !=
|
|
650
|
+
l = l != b;
|
|
651
651
|
break;
|
|
652
652
|
case "===":
|
|
653
|
-
l = l ===
|
|
653
|
+
l = l === b;
|
|
654
654
|
break;
|
|
655
655
|
case "!==":
|
|
656
|
-
l = l !==
|
|
656
|
+
l = l !== b;
|
|
657
657
|
break;
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
return l;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
let l =
|
|
662
|
+
function x() {
|
|
663
|
+
let l = m();
|
|
664
664
|
for (; i() && [">", "<", ">=", "<="].includes(i().value); ) {
|
|
665
|
-
const
|
|
666
|
-
switch (
|
|
665
|
+
const f = s("OP").value, b = m();
|
|
666
|
+
switch (f) {
|
|
667
667
|
case ">":
|
|
668
|
-
l = l >
|
|
668
|
+
l = l > b;
|
|
669
669
|
break;
|
|
670
670
|
case "<":
|
|
671
|
-
l = l <
|
|
671
|
+
l = l < b;
|
|
672
672
|
break;
|
|
673
673
|
case ">=":
|
|
674
|
-
l = l >=
|
|
674
|
+
l = l >= b;
|
|
675
675
|
break;
|
|
676
676
|
case "<=":
|
|
677
|
-
l = l <=
|
|
677
|
+
l = l <= b;
|
|
678
678
|
break;
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
681
|
return l;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
684
|
-
let l =
|
|
683
|
+
function m() {
|
|
684
|
+
let l = d();
|
|
685
685
|
for (; i() && (i().value === "+" || i().value === "-"); ) {
|
|
686
|
-
const
|
|
687
|
-
l =
|
|
686
|
+
const f = s("OP").value, b = d();
|
|
687
|
+
l = f === "+" ? l + b : l - b;
|
|
688
688
|
}
|
|
689
689
|
return l;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
let l =
|
|
691
|
+
function d() {
|
|
692
|
+
let l = u();
|
|
693
693
|
for (; i() && (i().value === "*" || i().value === "/" || i().value === "%"); ) {
|
|
694
|
-
const
|
|
695
|
-
switch (
|
|
694
|
+
const f = s("OP").value, b = u();
|
|
695
|
+
switch (f) {
|
|
696
696
|
case "*":
|
|
697
|
-
l = l *
|
|
697
|
+
l = l * b;
|
|
698
698
|
break;
|
|
699
699
|
case "/":
|
|
700
|
-
l = l /
|
|
700
|
+
l = l / b;
|
|
701
701
|
break;
|
|
702
702
|
case "%":
|
|
703
|
-
l = l %
|
|
703
|
+
l = l % b;
|
|
704
704
|
break;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
return l;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return i() && i().value === "!" ? (s("OP"), !
|
|
709
|
+
function u() {
|
|
710
|
+
return i() && i().value === "!" ? (s("OP"), !u()) : i() && i().value === "-" ? (s("OP"), -u()) : y();
|
|
711
711
|
}
|
|
712
712
|
function y() {
|
|
713
713
|
const l = i();
|
|
@@ -720,15 +720,15 @@ class St {
|
|
|
720
720
|
return s("IDENT"), l.value === "true" ? !0 : l.value === "false" ? !1 : l.value === "null" ? null : void 0;
|
|
721
721
|
if (l.value === "[") {
|
|
722
722
|
s("PUNC");
|
|
723
|
-
const
|
|
723
|
+
const f = [];
|
|
724
724
|
for (; i() && i().value !== "]"; )
|
|
725
|
-
|
|
726
|
-
return s("PUNC"),
|
|
725
|
+
f.push(o()), i() && i().value === "," && s("PUNC");
|
|
726
|
+
return s("PUNC"), f;
|
|
727
727
|
}
|
|
728
728
|
if (l.value === "(") {
|
|
729
729
|
s("PUNC");
|
|
730
|
-
const
|
|
731
|
-
return s("PUNC"),
|
|
730
|
+
const f = o();
|
|
731
|
+
return s("PUNC"), f;
|
|
732
732
|
}
|
|
733
733
|
throw new Error("Unexpected token in expression");
|
|
734
734
|
}
|
|
@@ -750,7 +750,7 @@ class St {
|
|
|
750
750
|
if (!isNaN(Number(t))) return Number(t);
|
|
751
751
|
if (t.startsWith("ctx.")) {
|
|
752
752
|
const n = t.slice(4);
|
|
753
|
-
return
|
|
753
|
+
return U(r, n);
|
|
754
754
|
}
|
|
755
755
|
return t.startsWith('"') && t.endsWith('"') || t.startsWith("'") && t.endsWith("'") ? t.slice(1, -1) : t;
|
|
756
756
|
}
|
|
@@ -761,7 +761,7 @@ class St {
|
|
|
761
761
|
return this.cache.size;
|
|
762
762
|
}
|
|
763
763
|
}
|
|
764
|
-
class
|
|
764
|
+
class ae {
|
|
765
765
|
static cleanupFunctions = /* @__PURE__ */ new WeakMap();
|
|
766
766
|
/**
|
|
767
767
|
* Add an event listener with automatic cleanup tracking
|
|
@@ -835,13 +835,13 @@ class oe {
|
|
|
835
835
|
return n ? n.length : 0;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
function
|
|
838
|
+
function fe(e, t) {
|
|
839
839
|
if (t && e instanceof HTMLElement) {
|
|
840
|
-
|
|
840
|
+
ae.cleanup(e);
|
|
841
841
|
for (const r in t)
|
|
842
842
|
t[r] === e && delete t[r];
|
|
843
843
|
for (const r of Array.from(e.childNodes))
|
|
844
|
-
|
|
844
|
+
fe(r, t);
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
847
|
function ye(e, t, r) {
|
|
@@ -849,149 +849,149 @@ function ye(e, t, r) {
|
|
|
849
849
|
const n = e.props?.reactiveRef ?? (e.props?.props && e.props.props.reactiveRef), i = e.props?.ref ?? (e.props?.props && e.props.props.ref);
|
|
850
850
|
n ? n.value = t : i && r && (r[i] = t);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function jt(e, t, r, n, i, s, o, c) {
|
|
853
853
|
if (!s) return;
|
|
854
|
-
const a = t.includes("lazy"),
|
|
855
|
-
if (
|
|
854
|
+
const a = t.includes("lazy"), h = t.includes("trim"), p = t.includes("number"), x = e && typeof e == "object" && "value" in e && typeof e.value < "u", m = () => {
|
|
855
|
+
if (x) {
|
|
856
856
|
const k = e.value;
|
|
857
857
|
return c && typeof k == "object" && k !== null ? k[c] : k;
|
|
858
858
|
}
|
|
859
|
-
return
|
|
860
|
-
},
|
|
861
|
-
let
|
|
862
|
-
o instanceof HTMLInputElement ?
|
|
863
|
-
const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ?
|
|
864
|
-
if (
|
|
865
|
-
if (Array.isArray(
|
|
866
|
-
r[l] =
|
|
859
|
+
return U(s._state || s, e);
|
|
860
|
+
}, d = m();
|
|
861
|
+
let u = "text";
|
|
862
|
+
o instanceof HTMLInputElement ? u = n?.type || o.type || "text" : o instanceof HTMLSelectElement ? u = "select" : o instanceof HTMLTextAreaElement && (u = "textarea");
|
|
863
|
+
const y = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || o instanceof HTMLSelectElement, l = y ? u === "checkbox" || u === "radio" ? "checked" : "value" : c ?? "modelValue";
|
|
864
|
+
if (u === "checkbox")
|
|
865
|
+
if (Array.isArray(d))
|
|
866
|
+
r[l] = d.includes(String(o?.getAttribute("value") ?? n?.value ?? ""));
|
|
867
867
|
else {
|
|
868
868
|
const k = o?.getAttribute("true-value") ?? !0;
|
|
869
|
-
r[l] =
|
|
869
|
+
r[l] = d === k;
|
|
870
870
|
}
|
|
871
|
-
else if (
|
|
872
|
-
r[l] =
|
|
873
|
-
else if (
|
|
871
|
+
else if (u === "radio")
|
|
872
|
+
r[l] = d === (n?.value ?? "");
|
|
873
|
+
else if (u === "select")
|
|
874
874
|
if (o && o.hasAttribute("multiple") && o instanceof HTMLSelectElement) {
|
|
875
|
-
const k = Array.isArray(
|
|
875
|
+
const k = Array.isArray(d) ? d.map(String) : [];
|
|
876
876
|
setTimeout(() => {
|
|
877
877
|
Array.from(o.options).forEach((C) => {
|
|
878
878
|
C.selected = k.includes(C.value);
|
|
879
879
|
});
|
|
880
|
-
}, 0), r[l] = Array.isArray(
|
|
880
|
+
}, 0), r[l] = Array.isArray(d) ? d : [];
|
|
881
881
|
} else
|
|
882
|
-
r[l] =
|
|
882
|
+
r[l] = d;
|
|
883
883
|
else {
|
|
884
|
-
r[l] =
|
|
884
|
+
r[l] = d;
|
|
885
885
|
try {
|
|
886
|
-
const k =
|
|
887
|
-
n && (n[k] =
|
|
886
|
+
const k = ie(l);
|
|
887
|
+
n && (n[k] = d);
|
|
888
888
|
} catch {
|
|
889
889
|
}
|
|
890
890
|
}
|
|
891
|
-
const
|
|
891
|
+
const f = a || u === "checkbox" || u === "radio" || u === "select" ? "change" : "input", b = (k) => {
|
|
892
892
|
if (k.isComposing || i._isComposing) return;
|
|
893
893
|
const C = typeof globalThis.process < "u" && globalThis.process.env?.NODE_ENV === "test" || typeof window < "u" && window.__vitest__;
|
|
894
894
|
if (k.isTrusted === !1 && !C) return;
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
897
|
-
let $ =
|
|
898
|
-
if (
|
|
899
|
-
const
|
|
900
|
-
if (Array.isArray(
|
|
901
|
-
const
|
|
902
|
-
if (
|
|
903
|
-
|
|
895
|
+
const g = k.target;
|
|
896
|
+
if (!g || g._modelUpdating) return;
|
|
897
|
+
let $ = g.value;
|
|
898
|
+
if (u === "checkbox") {
|
|
899
|
+
const A = m();
|
|
900
|
+
if (Array.isArray(A)) {
|
|
901
|
+
const D = g.getAttribute("value") ?? "", S = Array.from(A);
|
|
902
|
+
if (g.checked)
|
|
903
|
+
S.includes(D) || S.push(D);
|
|
904
904
|
else {
|
|
905
|
-
const O =
|
|
906
|
-
O > -1 &&
|
|
905
|
+
const O = S.indexOf(D);
|
|
906
|
+
O > -1 && S.splice(O, 1);
|
|
907
907
|
}
|
|
908
|
-
$ =
|
|
908
|
+
$ = S;
|
|
909
909
|
} else {
|
|
910
|
-
const
|
|
911
|
-
$ =
|
|
910
|
+
const D = g.getAttribute("true-value") ?? !0, S = g.getAttribute("false-value") ?? !1;
|
|
911
|
+
$ = g.checked ? D : S;
|
|
912
912
|
}
|
|
913
|
-
} else if (
|
|
914
|
-
$ =
|
|
915
|
-
else if (
|
|
916
|
-
$ = Array.from(
|
|
917
|
-
else if (
|
|
918
|
-
const
|
|
919
|
-
isNaN(
|
|
913
|
+
} else if (u === "radio")
|
|
914
|
+
$ = g.getAttribute("value") ?? g.value;
|
|
915
|
+
else if (u === "select" && g.multiple)
|
|
916
|
+
$ = Array.from(g.selectedOptions).map((A) => A.value);
|
|
917
|
+
else if (h && typeof $ == "string" && ($ = $.trim()), p) {
|
|
918
|
+
const A = Number($);
|
|
919
|
+
isNaN(A) || ($ = A);
|
|
920
920
|
}
|
|
921
|
-
const
|
|
921
|
+
const j = s._state || s, v = m();
|
|
922
922
|
if (Array.isArray($) && Array.isArray(v) ? JSON.stringify([...$].sort()) !== JSON.stringify([...v].sort()) : $ !== v) {
|
|
923
|
-
|
|
923
|
+
g._modelUpdating = !0;
|
|
924
924
|
try {
|
|
925
|
-
if (
|
|
925
|
+
if (x)
|
|
926
926
|
if (c && typeof e.value == "object" && e.value !== null) {
|
|
927
|
-
const
|
|
928
|
-
|
|
927
|
+
const A = { ...e.value };
|
|
928
|
+
A[c] = $, e.value = A;
|
|
929
929
|
} else
|
|
930
930
|
e.value = $;
|
|
931
931
|
else
|
|
932
|
-
|
|
932
|
+
Ae(j, e, $);
|
|
933
933
|
if (s._requestRender && s._requestRender(), s._triggerWatchers) {
|
|
934
|
-
const
|
|
935
|
-
s._triggerWatchers(
|
|
934
|
+
const A = x ? "reactiveState" : e;
|
|
935
|
+
s._triggerWatchers(A, $);
|
|
936
936
|
}
|
|
937
|
-
if (
|
|
938
|
-
const
|
|
937
|
+
if (g) {
|
|
938
|
+
const A = `update:${ie(l)}`, D = new CustomEvent(A, {
|
|
939
939
|
detail: $,
|
|
940
940
|
bubbles: !0,
|
|
941
941
|
composed: !0
|
|
942
942
|
});
|
|
943
|
-
|
|
943
|
+
g.dispatchEvent(D);
|
|
944
944
|
}
|
|
945
945
|
} finally {
|
|
946
|
-
setTimeout(() =>
|
|
946
|
+
setTimeout(() => g._modelUpdating = !1, 0);
|
|
947
947
|
}
|
|
948
948
|
}
|
|
949
949
|
};
|
|
950
950
|
if (y) {
|
|
951
|
-
if (i[
|
|
952
|
-
const k = i[
|
|
953
|
-
o &&
|
|
951
|
+
if (i[f]) {
|
|
952
|
+
const k = i[f];
|
|
953
|
+
o && ae.removeListener(o, f, k);
|
|
954
954
|
}
|
|
955
|
-
i[
|
|
955
|
+
i[f] = b;
|
|
956
956
|
} else {
|
|
957
|
-
const k = `update:${
|
|
957
|
+
const k = `update:${ie(l)}`;
|
|
958
958
|
if (i[k]) {
|
|
959
959
|
const C = i[k];
|
|
960
|
-
o &&
|
|
960
|
+
o && ae.removeListener(o, k, C);
|
|
961
961
|
}
|
|
962
962
|
i[k] = (C) => {
|
|
963
|
-
const
|
|
964
|
-
if (Array.isArray($) && Array.isArray(
|
|
965
|
-
|
|
966
|
-
const
|
|
967
|
-
if (
|
|
968
|
-
|
|
963
|
+
const g = s._state || s, $ = C.detail !== void 0 ? C.detail : C.target?.value, j = U(g, e);
|
|
964
|
+
if (Array.isArray($) && Array.isArray(j) ? JSON.stringify([...$].sort()) !== JSON.stringify([...j].sort()) : $ !== j) {
|
|
965
|
+
Ae(g, e, $), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, $);
|
|
966
|
+
const _ = C.target;
|
|
967
|
+
if (_) {
|
|
968
|
+
_[l] = $;
|
|
969
969
|
try {
|
|
970
|
-
const
|
|
971
|
-
typeof $ == "boolean" ? $ ?
|
|
970
|
+
const A = ie(l);
|
|
971
|
+
typeof $ == "boolean" ? $ ? _.setAttribute(A, "true") : _.setAttribute(A, "false") : _.setAttribute(A, String($));
|
|
972
972
|
} catch {
|
|
973
973
|
}
|
|
974
974
|
queueMicrotask(() => {
|
|
975
|
-
typeof
|
|
975
|
+
typeof _._applyProps == "function" && _._applyProps(_._cfg), typeof _._requestRender == "function" && _._requestRender();
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
};
|
|
980
980
|
}
|
|
981
|
-
(
|
|
981
|
+
(u === "text" || u === "textarea") && (i.compositionstart = (() => i._isComposing = !0), i.compositionend = (k) => {
|
|
982
982
|
i._isComposing = !1;
|
|
983
983
|
const C = k.target;
|
|
984
984
|
C && setTimeout(() => {
|
|
985
|
-
const
|
|
986
|
-
let v =
|
|
987
|
-
if (
|
|
988
|
-
const
|
|
989
|
-
isNaN(
|
|
985
|
+
const g = C.value, $ = s._state || s, j = U($, e);
|
|
986
|
+
let v = g;
|
|
987
|
+
if (h && (v = v.trim()), p) {
|
|
988
|
+
const A = Number(v);
|
|
989
|
+
isNaN(A) || (v = A);
|
|
990
990
|
}
|
|
991
|
-
if (Array.isArray(v) && Array.isArray(
|
|
991
|
+
if (Array.isArray(v) && Array.isArray(j) ? JSON.stringify([...v].sort()) !== JSON.stringify([...j].sort()) : v !== j) {
|
|
992
992
|
C._modelUpdating = !0;
|
|
993
993
|
try {
|
|
994
|
-
|
|
994
|
+
Ae($, e, v), s._requestRender && s._requestRender(), s._triggerWatchers && s._triggerWatchers(e, v);
|
|
995
995
|
} finally {
|
|
996
996
|
setTimeout(() => C._modelUpdating = !1, 0);
|
|
997
997
|
}
|
|
@@ -999,11 +999,11 @@ function At(e, t, r, n, i, s, o, c) {
|
|
|
999
999
|
}, 0);
|
|
1000
1000
|
});
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function ft(e) {
|
|
1003
1003
|
const t = e.slice(2);
|
|
1004
1004
|
return t ? t.charAt(0).toLowerCase() + t.slice(1) : "";
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Ot(e, t, r, n) {
|
|
1007
1007
|
if (typeof e == "object" && e !== null)
|
|
1008
1008
|
for (const [i, s] of Object.entries(e))
|
|
1009
1009
|
i.startsWith("data-") || i.startsWith("aria-") || i === "class" ? r[i] = s : t[i] = s;
|
|
@@ -1020,12 +1020,12 @@ function jt(e, t, r, n) {
|
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
1022
|
} catch {
|
|
1023
|
-
const i =
|
|
1023
|
+
const i = U(n, e);
|
|
1024
1024
|
r[e] = i;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Tt(e, t, r) {
|
|
1029
1029
|
let n;
|
|
1030
1030
|
if (typeof e == "string") {
|
|
1031
1031
|
if (!r) return;
|
|
@@ -1051,9 +1051,9 @@ function Ot(e, t, r) {
|
|
|
1051
1051
|
s !== i && (s ? t.style = s : delete t.style);
|
|
1052
1052
|
}
|
|
1053
1053
|
function we(e, t) {
|
|
1054
|
-
return
|
|
1054
|
+
return At.evaluate(e, t);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function Rt(e, t, r) {
|
|
1057
1057
|
let n;
|
|
1058
1058
|
if (typeof e == "string") {
|
|
1059
1059
|
if (!r) return;
|
|
@@ -1065,7 +1065,7 @@ function Tt(e, t, r) {
|
|
|
1065
1065
|
const s = t.class || "", o = s ? `${s} ${i.join(" ")}`.trim() : i.join(" ");
|
|
1066
1066
|
o && (t.class = o);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Lt(e, t, r) {
|
|
1069
1069
|
let n;
|
|
1070
1070
|
if (typeof e == "string") {
|
|
1071
1071
|
if (!r) return;
|
|
@@ -1079,10 +1079,10 @@ function Rt(e, t, r) {
|
|
|
1079
1079
|
const o = [];
|
|
1080
1080
|
for (const [c, a] of Object.entries(n))
|
|
1081
1081
|
if (a != null && a !== "") {
|
|
1082
|
-
const
|
|
1082
|
+
const h = c.replace(
|
|
1083
1083
|
/[A-Z]/g,
|
|
1084
|
-
(
|
|
1085
|
-
),
|
|
1084
|
+
(m) => `-${m.toLowerCase()}`
|
|
1085
|
+
), p = [
|
|
1086
1086
|
"width",
|
|
1087
1087
|
"height",
|
|
1088
1088
|
"top",
|
|
@@ -1108,65 +1108,65 @@ function Rt(e, t, r) {
|
|
|
1108
1108
|
"min-height",
|
|
1109
1109
|
"max-height"
|
|
1110
1110
|
];
|
|
1111
|
-
let
|
|
1112
|
-
typeof a == "number" &&
|
|
1111
|
+
let x = String(a);
|
|
1112
|
+
typeof a == "number" && p.includes(h) && (x = `${a}px`), o.push(`${h}: ${x}`);
|
|
1113
1113
|
}
|
|
1114
1114
|
i = o.join("; ") + (o.length > 0 ? ";" : "");
|
|
1115
1115
|
}
|
|
1116
1116
|
const s = t.style || "";
|
|
1117
1117
|
t.style = s + (s && !s.endsWith(";") ? "; " : "") + i;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function Pt(e, t, r) {
|
|
1120
1120
|
let n = e;
|
|
1121
1121
|
typeof e == "string" && r && (n = we(e, r)), ee(n) ? t.reactiveRef = n : t.ref = n;
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function dt(e, t, r, n) {
|
|
1124
1124
|
const i = {}, s = { ...n || {} }, o = {};
|
|
1125
1125
|
for (const [c, a] of Object.entries(e)) {
|
|
1126
|
-
const { value:
|
|
1126
|
+
const { value: h, modifiers: p, arg: x } = a;
|
|
1127
1127
|
if (c === "model" || c.startsWith("model:")) {
|
|
1128
|
-
const
|
|
1129
|
-
|
|
1130
|
-
p,
|
|
1131
|
-
// Pass the original value (could be string or reactive state object)
|
|
1128
|
+
const m = c.split(":"), d = m.length > 1 ? m[1] : x;
|
|
1129
|
+
jt(
|
|
1132
1130
|
h,
|
|
1131
|
+
// Pass the original value (could be string or reactive state object)
|
|
1132
|
+
p,
|
|
1133
1133
|
i,
|
|
1134
1134
|
s,
|
|
1135
1135
|
o,
|
|
1136
1136
|
t,
|
|
1137
1137
|
r,
|
|
1138
|
-
|
|
1138
|
+
d
|
|
1139
1139
|
);
|
|
1140
1140
|
continue;
|
|
1141
1141
|
}
|
|
1142
1142
|
switch (c) {
|
|
1143
1143
|
case "bind":
|
|
1144
|
-
|
|
1144
|
+
Ot(h, i, s, t);
|
|
1145
1145
|
break;
|
|
1146
1146
|
case "show":
|
|
1147
|
-
|
|
1147
|
+
Tt(h, s, t);
|
|
1148
1148
|
break;
|
|
1149
1149
|
case "class":
|
|
1150
|
-
|
|
1150
|
+
Rt(h, s, t);
|
|
1151
1151
|
break;
|
|
1152
1152
|
case "style":
|
|
1153
|
-
|
|
1153
|
+
Lt(h, s, t);
|
|
1154
1154
|
break;
|
|
1155
1155
|
case "ref":
|
|
1156
|
-
|
|
1156
|
+
Pt(h, i, t);
|
|
1157
1157
|
break;
|
|
1158
1158
|
}
|
|
1159
1159
|
}
|
|
1160
1160
|
return { props: i, attrs: s, listeners: o };
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function Ke(e, t) {
|
|
1163
1163
|
if (Array.isArray(e)) {
|
|
1164
1164
|
const s = /* @__PURE__ */ new Set();
|
|
1165
1165
|
return e.map((o) => {
|
|
1166
1166
|
if (!o || typeof o != "object") return o;
|
|
1167
1167
|
let c = o.props?.key ?? o.key;
|
|
1168
1168
|
if (!c) {
|
|
1169
|
-
const
|
|
1169
|
+
const x = o.tag || "node", d = [
|
|
1170
1170
|
// attrs (kebab-case)
|
|
1171
1171
|
o.props?.attrs?.id,
|
|
1172
1172
|
o.props?.attrs?.name,
|
|
@@ -1176,23 +1176,23 @@ function qe(e, t) {
|
|
|
1176
1176
|
o.props?.props?.name,
|
|
1177
1177
|
o.props?.props?.dataKey,
|
|
1178
1178
|
o.props?.props?.["data-key"]
|
|
1179
|
-
].find((
|
|
1180
|
-
c =
|
|
1179
|
+
].find((u) => u != null) ?? "";
|
|
1180
|
+
c = d ? `${t}:${x}:${d}` : `${t}:${x}`;
|
|
1181
1181
|
}
|
|
1182
|
-
let a = c,
|
|
1182
|
+
let a = c, h = 1;
|
|
1183
1183
|
for (; s.has(a); )
|
|
1184
|
-
a = `${c}#${
|
|
1184
|
+
a = `${c}#${h++}`;
|
|
1185
1185
|
s.add(a);
|
|
1186
|
-
let
|
|
1187
|
-
return Array.isArray(
|
|
1186
|
+
let p = o.children;
|
|
1187
|
+
return Array.isArray(p) && (p = Ke(p, a)), { ...o, key: a, children: p };
|
|
1188
1188
|
});
|
|
1189
1189
|
}
|
|
1190
1190
|
const r = e;
|
|
1191
1191
|
let n = r.props?.key ?? r.key ?? t, i = r.children;
|
|
1192
|
-
return Array.isArray(i) && (i =
|
|
1192
|
+
return Array.isArray(i) && (i = Ke(i, n)), { ...r, key: n, children: i };
|
|
1193
1193
|
}
|
|
1194
|
-
function
|
|
1195
|
-
const i = r.directives ?? {}, s =
|
|
1194
|
+
function Ge(e, t, r, n) {
|
|
1195
|
+
const i = r.directives ?? {}, s = dt(
|
|
1196
1196
|
i,
|
|
1197
1197
|
n,
|
|
1198
1198
|
e,
|
|
@@ -1205,39 +1205,39 @@ function Je(e, t, r, n) {
|
|
|
1205
1205
|
...t.attrs,
|
|
1206
1206
|
...r.attrs,
|
|
1207
1207
|
...s.attrs
|
|
1208
|
-
}, a = t.props ?? {},
|
|
1209
|
-
let
|
|
1210
|
-
for (const
|
|
1211
|
-
const y = a[
|
|
1212
|
-
if (y !==
|
|
1213
|
-
if (
|
|
1214
|
-
e.value !==
|
|
1215
|
-
else if (
|
|
1216
|
-
e.checked = !!
|
|
1217
|
-
else if (
|
|
1218
|
-
const l =
|
|
1219
|
-
typeof y == "function" &&
|
|
1220
|
-
} else if (
|
|
1221
|
-
e.removeAttribute(
|
|
1222
|
-
else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) ||
|
|
1208
|
+
}, a = t.props ?? {}, h = o, p = r?.isCustomElement ?? t?.isCustomElement ?? !1;
|
|
1209
|
+
let x = !1;
|
|
1210
|
+
for (const u in { ...a, ...h }) {
|
|
1211
|
+
const y = a[u], w = h[u];
|
|
1212
|
+
if (y !== w)
|
|
1213
|
+
if (x = !0, u === "value" && (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement))
|
|
1214
|
+
e.value !== w && (e.value = w ?? "");
|
|
1215
|
+
else if (u === "checked" && e instanceof HTMLInputElement)
|
|
1216
|
+
e.checked = !!w;
|
|
1217
|
+
else if (u.startsWith("on") && typeof w == "function") {
|
|
1218
|
+
const l = ft(u);
|
|
1219
|
+
typeof y == "function" && ae.removeListener(e, l, y), ae.addListener(e, l, w);
|
|
1220
|
+
} else if (w == null)
|
|
1221
|
+
e.removeAttribute(u);
|
|
1222
|
+
else if ((r?.isCustomElement ?? t?.isCustomElement ?? !1) || u in e)
|
|
1223
1223
|
try {
|
|
1224
|
-
e[
|
|
1224
|
+
e[u] = w;
|
|
1225
1225
|
} catch {
|
|
1226
1226
|
}
|
|
1227
1227
|
else
|
|
1228
|
-
|
|
1228
|
+
w === !1 && e.removeAttribute(u);
|
|
1229
1229
|
}
|
|
1230
|
-
for (const [
|
|
1230
|
+
for (const [u, y] of Object.entries(
|
|
1231
1231
|
s.listeners || {}
|
|
1232
1232
|
))
|
|
1233
|
-
|
|
1234
|
-
const
|
|
1235
|
-
for (const
|
|
1236
|
-
const y =
|
|
1237
|
-
let l = y,
|
|
1238
|
-
if (ee(y) && (l = y.value), ee(
|
|
1239
|
-
if (
|
|
1240
|
-
if (e.removeAttribute(
|
|
1233
|
+
ae.addListener(e, u, y);
|
|
1234
|
+
const m = t.attrs ?? {}, d = c;
|
|
1235
|
+
for (const u in { ...m, ...d }) {
|
|
1236
|
+
const y = m[u], w = d[u];
|
|
1237
|
+
let l = y, f = w;
|
|
1238
|
+
if (ee(y) && (l = y.value), ee(w) && (f = w.value), l !== f)
|
|
1239
|
+
if (x = !0, f == null || f === !1) {
|
|
1240
|
+
if (e.removeAttribute(u), u === "value") {
|
|
1241
1241
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement)
|
|
1242
1242
|
try {
|
|
1243
1243
|
e.value = "";
|
|
@@ -1254,69 +1254,69 @@ function Je(e, t, r, n) {
|
|
|
1254
1254
|
} catch {
|
|
1255
1255
|
}
|
|
1256
1256
|
}
|
|
1257
|
-
if (
|
|
1257
|
+
if (u === "checked" && e instanceof HTMLInputElement)
|
|
1258
1258
|
try {
|
|
1259
1259
|
e.checked = !1;
|
|
1260
1260
|
} catch {
|
|
1261
1261
|
}
|
|
1262
|
-
if (
|
|
1262
|
+
if (u === "disabled")
|
|
1263
1263
|
try {
|
|
1264
1264
|
e.disabled = !1;
|
|
1265
1265
|
} catch {
|
|
1266
1266
|
}
|
|
1267
1267
|
} else {
|
|
1268
|
-
if (
|
|
1268
|
+
if (u === "value") {
|
|
1269
1269
|
if (e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement) {
|
|
1270
1270
|
try {
|
|
1271
|
-
e.value =
|
|
1271
|
+
e.value = f ?? "";
|
|
1272
1272
|
} catch {
|
|
1273
|
-
e.setAttribute(
|
|
1273
|
+
e.setAttribute(u, String(f));
|
|
1274
1274
|
}
|
|
1275
1275
|
continue;
|
|
1276
1276
|
} else if (e instanceof HTMLSelectElement) {
|
|
1277
1277
|
try {
|
|
1278
|
-
e.value =
|
|
1278
|
+
e.value = f ?? "";
|
|
1279
1279
|
} catch {
|
|
1280
1280
|
}
|
|
1281
1281
|
continue;
|
|
1282
1282
|
} else if (e instanceof HTMLProgressElement) {
|
|
1283
1283
|
try {
|
|
1284
|
-
e.value = Number(
|
|
1284
|
+
e.value = Number(f);
|
|
1285
1285
|
} catch {
|
|
1286
1286
|
}
|
|
1287
1287
|
continue;
|
|
1288
1288
|
}
|
|
1289
1289
|
}
|
|
1290
|
-
if (
|
|
1290
|
+
if (u === "checked" && e instanceof HTMLInputElement) {
|
|
1291
1291
|
try {
|
|
1292
|
-
e.checked = !!
|
|
1292
|
+
e.checked = !!f;
|
|
1293
1293
|
} catch {
|
|
1294
1294
|
}
|
|
1295
1295
|
continue;
|
|
1296
1296
|
}
|
|
1297
|
-
if (
|
|
1298
|
-
e.setAttribute(
|
|
1297
|
+
if (u === "style") {
|
|
1298
|
+
e.setAttribute(u, String(f));
|
|
1299
1299
|
continue;
|
|
1300
1300
|
}
|
|
1301
|
-
const
|
|
1302
|
-
if (
|
|
1303
|
-
const k =
|
|
1301
|
+
const b = e.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1302
|
+
if (p && !b && u.includes("-")) {
|
|
1303
|
+
const k = lt(u);
|
|
1304
1304
|
try {
|
|
1305
|
-
e[k] =
|
|
1305
|
+
e[k] = f;
|
|
1306
1306
|
} catch {
|
|
1307
|
-
e.setAttribute(
|
|
1307
|
+
e.setAttribute(u, String(f));
|
|
1308
1308
|
}
|
|
1309
|
-
} else if (!
|
|
1309
|
+
} else if (!b && u in e)
|
|
1310
1310
|
try {
|
|
1311
|
-
e[
|
|
1311
|
+
e[u] = f;
|
|
1312
1312
|
} catch {
|
|
1313
|
-
e.setAttribute(
|
|
1313
|
+
e.setAttribute(u, String(f));
|
|
1314
1314
|
}
|
|
1315
1315
|
else
|
|
1316
|
-
e.setAttribute(
|
|
1316
|
+
e.setAttribute(u, String(f));
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
if (
|
|
1319
|
+
if (p && x)
|
|
1320
1320
|
try {
|
|
1321
1321
|
if (typeof e._applyProps == "function")
|
|
1322
1322
|
try {
|
|
@@ -1331,102 +1331,102 @@ function Z(e, t, r) {
|
|
|
1331
1331
|
if (typeof e == "string")
|
|
1332
1332
|
return document.createTextNode(e);
|
|
1333
1333
|
if (e.tag === "#text") {
|
|
1334
|
-
const
|
|
1334
|
+
const m = document.createTextNode(
|
|
1335
1335
|
typeof e.children == "string" ? e.children : ""
|
|
1336
1336
|
);
|
|
1337
|
-
return e.key != null && (
|
|
1337
|
+
return e.key != null && (m.key = e.key), m;
|
|
1338
1338
|
}
|
|
1339
1339
|
if (e.tag === "#anchor") {
|
|
1340
|
-
const
|
|
1341
|
-
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1344
|
-
for (const l of
|
|
1345
|
-
const
|
|
1346
|
-
|
|
1340
|
+
const m = e, d = Array.isArray(m.children) ? m.children : [], u = document.createTextNode(""), y = document.createTextNode("");
|
|
1341
|
+
m.key != null && (u.key = `${m.key}:start`, y.key = `${m.key}:end`), m._startNode = u, m._endNode = y;
|
|
1342
|
+
const w = document.createDocumentFragment();
|
|
1343
|
+
w.appendChild(u);
|
|
1344
|
+
for (const l of d) {
|
|
1345
|
+
const f = Z(l, t);
|
|
1346
|
+
w.appendChild(f);
|
|
1347
1347
|
}
|
|
1348
|
-
return
|
|
1348
|
+
return w.appendChild(y), w;
|
|
1349
1349
|
}
|
|
1350
1350
|
const n = document.createElement(e.tag);
|
|
1351
1351
|
e.key != null && (n.key = e.key);
|
|
1352
|
-
const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c =
|
|
1352
|
+
const { props: i = {}, attrs: s = {}, directives: o = {} } = e.props ?? {}, c = dt(o, t, n, s), a = {
|
|
1353
1353
|
...i,
|
|
1354
1354
|
...c.props
|
|
1355
|
-
},
|
|
1355
|
+
}, h = {
|
|
1356
1356
|
...s,
|
|
1357
1357
|
...c.attrs
|
|
1358
|
-
},
|
|
1359
|
-
for (const
|
|
1360
|
-
const
|
|
1361
|
-
if (!(typeof
|
|
1362
|
-
if (typeof
|
|
1363
|
-
|
|
1364
|
-
else if (
|
|
1365
|
-
if (!
|
|
1358
|
+
}, p = n.namespaceURI === "http://www.w3.org/2000/svg";
|
|
1359
|
+
for (const m in h) {
|
|
1360
|
+
const d = h[m];
|
|
1361
|
+
if (!(typeof m != "string" || /\[object Object\]/.test(m))) {
|
|
1362
|
+
if (typeof d == "boolean")
|
|
1363
|
+
d && n.setAttribute(m, "");
|
|
1364
|
+
else if (d != null)
|
|
1365
|
+
if (!p && m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement || n instanceof HTMLProgressElement))
|
|
1366
1366
|
try {
|
|
1367
|
-
n instanceof HTMLProgressElement ? n.value = Number(
|
|
1367
|
+
n instanceof HTMLProgressElement ? n.value = Number(d) : n.value = d ?? "";
|
|
1368
1368
|
} catch {
|
|
1369
|
-
n.setAttribute(
|
|
1369
|
+
n.setAttribute(m, String(d));
|
|
1370
1370
|
}
|
|
1371
|
-
else if (!
|
|
1371
|
+
else if (!p && m === "checked" && n instanceof HTMLInputElement)
|
|
1372
1372
|
try {
|
|
1373
|
-
n.checked = !!
|
|
1373
|
+
n.checked = !!d;
|
|
1374
1374
|
} catch {
|
|
1375
|
-
n.setAttribute(
|
|
1375
|
+
n.setAttribute(m, String(d));
|
|
1376
1376
|
}
|
|
1377
|
-
else if (!
|
|
1377
|
+
else if (!p && m in n)
|
|
1378
1378
|
try {
|
|
1379
|
-
n[
|
|
1379
|
+
n[m] = d;
|
|
1380
1380
|
} catch {
|
|
1381
|
-
n.setAttribute(
|
|
1381
|
+
n.setAttribute(m, String(d));
|
|
1382
1382
|
}
|
|
1383
|
-
else if ((e.props?.isCustomElement ?? !1) && !
|
|
1384
|
-
const y =
|
|
1383
|
+
else if ((e.props?.isCustomElement ?? !1) && !p && m.includes("-")) {
|
|
1384
|
+
const y = lt(m);
|
|
1385
1385
|
try {
|
|
1386
|
-
n[y] =
|
|
1386
|
+
n[y] = d;
|
|
1387
1387
|
} catch {
|
|
1388
|
-
n.setAttribute(
|
|
1388
|
+
n.setAttribute(m, String(d));
|
|
1389
1389
|
}
|
|
1390
1390
|
} else
|
|
1391
|
-
n.setAttribute(
|
|
1391
|
+
n.setAttribute(m, String(d));
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
1394
|
-
for (const
|
|
1395
|
-
const
|
|
1396
|
-
if (!(typeof
|
|
1397
|
-
if (
|
|
1398
|
-
const
|
|
1399
|
-
n.value =
|
|
1400
|
-
} else if (
|
|
1401
|
-
const
|
|
1402
|
-
n.checked = !!
|
|
1403
|
-
} else if (
|
|
1404
|
-
|
|
1394
|
+
for (const m in a) {
|
|
1395
|
+
const d = a[m];
|
|
1396
|
+
if (!(typeof m != "string" || /\[object Object\]/.test(m)))
|
|
1397
|
+
if (m === "value" && (n instanceof HTMLInputElement || n instanceof HTMLTextAreaElement || n instanceof HTMLSelectElement)) {
|
|
1398
|
+
const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1399
|
+
n.value = u ?? "";
|
|
1400
|
+
} else if (m === "checked" && n instanceof HTMLInputElement) {
|
|
1401
|
+
const u = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1402
|
+
n.checked = !!u;
|
|
1403
|
+
} else if (m.startsWith("on") && typeof d == "function")
|
|
1404
|
+
ae.addListener(n, ft(m), d);
|
|
1405
1405
|
else {
|
|
1406
|
-
if (
|
|
1406
|
+
if (m.startsWith("on") && d === void 0)
|
|
1407
1407
|
continue;
|
|
1408
|
-
if (
|
|
1409
|
-
n.removeAttribute(
|
|
1410
|
-
else if ((e.props?.isCustomElement ?? !1) ||
|
|
1408
|
+
if (d == null || d === !1)
|
|
1409
|
+
n.removeAttribute(m);
|
|
1410
|
+
else if ((e.props?.isCustomElement ?? !1) || m in n)
|
|
1411
1411
|
try {
|
|
1412
|
-
const y = typeof
|
|
1413
|
-
n[
|
|
1412
|
+
const y = typeof d == "object" && d !== null && typeof d.value < "u" ? d.value : d;
|
|
1413
|
+
n[m] = y;
|
|
1414
1414
|
} catch {
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
}
|
|
1418
|
-
for (const [
|
|
1418
|
+
for (const [m, d] of Object.entries(
|
|
1419
1419
|
c.listeners || {}
|
|
1420
1420
|
))
|
|
1421
|
-
|
|
1422
|
-
const
|
|
1421
|
+
ae.addListener(n, m, d);
|
|
1422
|
+
const x = {
|
|
1423
1423
|
...e,
|
|
1424
1424
|
props: {
|
|
1425
1425
|
...e.props,
|
|
1426
1426
|
...c.props
|
|
1427
1427
|
}
|
|
1428
1428
|
};
|
|
1429
|
-
ye(
|
|
1429
|
+
ye(x, n, r);
|
|
1430
1430
|
try {
|
|
1431
1431
|
if (typeof n._applyProps == "function")
|
|
1432
1432
|
try {
|
|
@@ -1437,126 +1437,126 @@ function Z(e, t, r) {
|
|
|
1437
1437
|
} catch {
|
|
1438
1438
|
}
|
|
1439
1439
|
if (Array.isArray(e.children))
|
|
1440
|
-
for (const
|
|
1441
|
-
n.appendChild(Z(
|
|
1440
|
+
for (const m of e.children)
|
|
1441
|
+
n.appendChild(Z(m, t, r));
|
|
1442
1442
|
else typeof e.children == "string" && (n.textContent = e.children);
|
|
1443
1443
|
try {
|
|
1444
|
-
if (n instanceof HTMLSelectElement &&
|
|
1444
|
+
if (n instanceof HTMLSelectElement && h && h.hasOwnProperty("value"))
|
|
1445
1445
|
try {
|
|
1446
|
-
n.value =
|
|
1446
|
+
n.value = h.value ?? "";
|
|
1447
1447
|
} catch {
|
|
1448
1448
|
}
|
|
1449
1449
|
} catch {
|
|
1450
1450
|
}
|
|
1451
1451
|
return n;
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1453
|
+
function Mt(e, t, r, n, i) {
|
|
1454
1454
|
if (typeof r == "string") {
|
|
1455
1455
|
e.textContent !== r && (e.textContent = r);
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
1458
|
if (!Array.isArray(r)) return;
|
|
1459
1459
|
const s = Array.from(e.childNodes), o = Array.isArray(t) ? t : [], c = /* @__PURE__ */ new Map();
|
|
1460
|
-
for (const
|
|
1461
|
-
|
|
1460
|
+
for (const d of o)
|
|
1461
|
+
d && d.key != null && c.set(d.key, d);
|
|
1462
1462
|
const a = /* @__PURE__ */ new Map();
|
|
1463
|
-
for (const
|
|
1464
|
-
const
|
|
1465
|
-
|
|
1466
|
-
}
|
|
1467
|
-
const
|
|
1468
|
-
let
|
|
1469
|
-
function
|
|
1470
|
-
let y =
|
|
1471
|
-
for (; y && (
|
|
1463
|
+
for (const d of s) {
|
|
1464
|
+
const u = d.key;
|
|
1465
|
+
u != null && a.set(u, d);
|
|
1466
|
+
}
|
|
1467
|
+
const h = /* @__PURE__ */ new Set();
|
|
1468
|
+
let p = e.firstChild;
|
|
1469
|
+
function x(d, u) {
|
|
1470
|
+
let y = d;
|
|
1471
|
+
for (; y && (h.add(y), y !== u); )
|
|
1472
1472
|
y = y.nextSibling;
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1474
|
+
function m(d, u, y, w) {
|
|
1475
1475
|
const l = [];
|
|
1476
|
-
let
|
|
1477
|
-
for (;
|
|
1478
|
-
l.push(
|
|
1479
|
-
const
|
|
1480
|
-
if (
|
|
1481
|
-
const C = /* @__PURE__ */ new Map(),
|
|
1482
|
-
for (const v of
|
|
1476
|
+
let f = d.nextSibling;
|
|
1477
|
+
for (; f && f !== u; )
|
|
1478
|
+
l.push(f), f = f.nextSibling;
|
|
1479
|
+
const b = Array.isArray(y) ? y : [];
|
|
1480
|
+
if (w.some((C) => C && C.key != null) || b.some((C) => C && C.key != null)) {
|
|
1481
|
+
const C = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
|
|
1482
|
+
for (const v of b)
|
|
1483
1483
|
v && v.key != null && C.set(v.key, v);
|
|
1484
1484
|
for (const v of l) {
|
|
1485
|
-
const
|
|
1486
|
-
|
|
1485
|
+
const _ = v.key;
|
|
1486
|
+
_ != null && g.set(_, v);
|
|
1487
1487
|
}
|
|
1488
1488
|
const $ = /* @__PURE__ */ new Set();
|
|
1489
|
-
let
|
|
1490
|
-
for (const v of
|
|
1491
|
-
let
|
|
1492
|
-
if (v.key != null &&
|
|
1493
|
-
const
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1489
|
+
let j = d.nextSibling;
|
|
1490
|
+
for (const v of w) {
|
|
1491
|
+
let _;
|
|
1492
|
+
if (v.key != null && g.has(v.key)) {
|
|
1493
|
+
const A = C.get(v.key);
|
|
1494
|
+
_ = je(
|
|
1495
|
+
g.get(v.key),
|
|
1496
|
+
A,
|
|
1497
1497
|
v,
|
|
1498
1498
|
n
|
|
1499
|
-
), $.add(
|
|
1499
|
+
), $.add(_), _ !== j && e.contains(_) && e.insertBefore(_, j);
|
|
1500
1500
|
} else
|
|
1501
|
-
|
|
1502
|
-
|
|
1501
|
+
_ = Z(v, n), e.insertBefore(_, j), $.add(_);
|
|
1502
|
+
j = _.nextSibling;
|
|
1503
1503
|
}
|
|
1504
1504
|
for (const v of l)
|
|
1505
1505
|
!$.has(v) && e.contains(v) && e.removeChild(v);
|
|
1506
1506
|
} else {
|
|
1507
1507
|
const C = Math.min(
|
|
1508
|
-
|
|
1509
|
-
|
|
1508
|
+
b.length,
|
|
1509
|
+
w.length
|
|
1510
1510
|
);
|
|
1511
|
-
for (let
|
|
1512
|
-
const $ =
|
|
1513
|
-
v !== l[
|
|
1511
|
+
for (let g = 0; g < C; g++) {
|
|
1512
|
+
const $ = b[g], j = w[g], v = je(l[g], $, j, n);
|
|
1513
|
+
v !== l[g] && (e.insertBefore(v, l[g]), e.removeChild(l[g]));
|
|
1514
1514
|
}
|
|
1515
|
-
for (let
|
|
1516
|
-
e.insertBefore(Z(
|
|
1517
|
-
for (let
|
|
1518
|
-
e.removeChild(l[
|
|
1515
|
+
for (let g = C; g < w.length; g++)
|
|
1516
|
+
e.insertBefore(Z(w[g], n), u);
|
|
1517
|
+
for (let g = C; g < l.length; g++)
|
|
1518
|
+
e.removeChild(l[g]);
|
|
1519
1519
|
}
|
|
1520
1520
|
}
|
|
1521
|
-
for (const
|
|
1522
|
-
let
|
|
1523
|
-
if (
|
|
1524
|
-
const y =
|
|
1525
|
-
let
|
|
1526
|
-
const k = Array.isArray(
|
|
1527
|
-
if (
|
|
1528
|
-
e.insertBefore(
|
|
1521
|
+
for (const d of r) {
|
|
1522
|
+
let u;
|
|
1523
|
+
if (d.tag === "#anchor") {
|
|
1524
|
+
const y = d.key, w = `${y}:start`, l = `${y}:end`;
|
|
1525
|
+
let f = a.get(w), b = a.get(l);
|
|
1526
|
+
const k = Array.isArray(d.children) ? d.children : [];
|
|
1527
|
+
if (f || (f = document.createTextNode(""), f.key = w), b || (b = document.createTextNode(""), b.key = l), d._startNode = f, d._endNode = b, !e.contains(f) || !e.contains(b)) {
|
|
1528
|
+
e.insertBefore(f, p);
|
|
1529
1529
|
for (const C of k)
|
|
1530
|
-
e.insertBefore(Z(C, n),
|
|
1531
|
-
e.insertBefore(
|
|
1530
|
+
e.insertBefore(Z(C, n), p);
|
|
1531
|
+
e.insertBefore(b, p);
|
|
1532
1532
|
} else
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1533
|
+
m(
|
|
1534
|
+
f,
|
|
1535
|
+
b,
|
|
1536
1536
|
c.get(y)?.children,
|
|
1537
1537
|
k
|
|
1538
1538
|
);
|
|
1539
|
-
|
|
1539
|
+
x(f, b), p = b.nextSibling;
|
|
1540
1540
|
continue;
|
|
1541
1541
|
}
|
|
1542
|
-
if (
|
|
1543
|
-
const y = c.get(
|
|
1544
|
-
|
|
1545
|
-
a.get(
|
|
1542
|
+
if (d.key != null && a.has(d.key)) {
|
|
1543
|
+
const y = c.get(d.key);
|
|
1544
|
+
u = je(
|
|
1545
|
+
a.get(d.key),
|
|
1546
1546
|
y,
|
|
1547
|
-
|
|
1547
|
+
d,
|
|
1548
1548
|
n,
|
|
1549
1549
|
i
|
|
1550
|
-
),
|
|
1550
|
+
), h.add(u), u !== p && e.contains(u) && (p && !e.contains(p) && (p = null), e.insertBefore(u, p));
|
|
1551
1551
|
} else
|
|
1552
|
-
|
|
1553
|
-
|
|
1552
|
+
u = Z(d, n, i), p && !e.contains(p) && (p = null), e.insertBefore(u, p), h.add(u);
|
|
1553
|
+
p = u.nextSibling;
|
|
1554
1554
|
}
|
|
1555
|
-
for (const
|
|
1556
|
-
!
|
|
1555
|
+
for (const d of s)
|
|
1556
|
+
!h.has(d) && e.contains(d) && (fe(d, i), e.removeChild(d));
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
if (t && typeof t != "string" && t.props?.ref && i &&
|
|
1558
|
+
function je(e, t, r, n, i) {
|
|
1559
|
+
if (t && typeof t != "string" && t.props?.ref && i && fe(e, i), t === r) return e;
|
|
1560
1560
|
if (typeof r == "string") {
|
|
1561
1561
|
if (e.nodeType === Node.TEXT_NODE)
|
|
1562
1562
|
return e.textContent !== r && (e.textContent = r), e;
|
|
@@ -1566,97 +1566,97 @@ function Ae(e, t, r, n, i) {
|
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
if (r && typeof r != "string" && r.tag === "#anchor") {
|
|
1569
|
-
const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""),
|
|
1570
|
-
o.key != null && (a.key = `${o.key}:start`,
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
for (const
|
|
1574
|
-
const
|
|
1575
|
-
|
|
1569
|
+
const o = r, c = Array.isArray(o.children) ? o.children : [], a = o._startNode ?? document.createTextNode(""), h = o._endNode ?? document.createTextNode("");
|
|
1570
|
+
o.key != null && (a.key = `${o.key}:start`, h.key = `${o.key}:end`), o._startNode = a, o._endNode = h;
|
|
1571
|
+
const p = document.createDocumentFragment();
|
|
1572
|
+
p.appendChild(a);
|
|
1573
|
+
for (const x of c) {
|
|
1574
|
+
const m = Z(x, n);
|
|
1575
|
+
p.appendChild(m);
|
|
1576
1576
|
}
|
|
1577
|
-
return
|
|
1577
|
+
return p.appendChild(h), e.parentNode?.replaceChild(p, e), a;
|
|
1578
1578
|
}
|
|
1579
1579
|
if (!r) {
|
|
1580
|
-
|
|
1580
|
+
fe(e, i);
|
|
1581
1581
|
const o = document.createComment("removed");
|
|
1582
1582
|
return e.parentNode?.replaceChild(o, e), o;
|
|
1583
1583
|
}
|
|
1584
1584
|
if (!t || typeof t == "string") {
|
|
1585
|
-
|
|
1585
|
+
fe(e, i);
|
|
1586
1586
|
const o = Z(r, n, i);
|
|
1587
1587
|
return ye(r, o, i), e.parentNode?.replaceChild(o, e), o;
|
|
1588
1588
|
}
|
|
1589
1589
|
if (r.tag === "#anchor") {
|
|
1590
1590
|
const o = Array.isArray(r.children) ? r.children : [], c = r._startNode ?? document.createTextNode(""), a = r._endNode ?? document.createTextNode("");
|
|
1591
1591
|
r.key != null && (c.key = `${r.key}:start`, a.key = `${r.key}:end`), r._startNode = c, r._endNode = a;
|
|
1592
|
-
const
|
|
1593
|
-
|
|
1594
|
-
for (const
|
|
1595
|
-
|
|
1596
|
-
return
|
|
1592
|
+
const h = document.createDocumentFragment();
|
|
1593
|
+
h.appendChild(c);
|
|
1594
|
+
for (const p of o)
|
|
1595
|
+
h.appendChild(Z(p, n));
|
|
1596
|
+
return h.appendChild(a), e.parentNode?.replaceChild(h, e), c;
|
|
1597
1597
|
}
|
|
1598
1598
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && t.key === r.key) {
|
|
1599
1599
|
const o = e;
|
|
1600
|
-
return
|
|
1600
|
+
return Ge(o, t.props || {}, r.props || {}, n), Mt(o, t.children, r.children, n, i), ye(r, o, i), o;
|
|
1601
1601
|
}
|
|
1602
1602
|
if (typeof t != "string" && typeof r != "string" && t.tag === r.tag && (t.tag && String(t.tag).includes("-") || r.props && r.props.isCustomElement || t.props && t.props.isCustomElement))
|
|
1603
1603
|
try {
|
|
1604
1604
|
const c = e;
|
|
1605
|
-
return
|
|
1605
|
+
return Ge(c, t.props || {}, r.props || {}, n), ye(r, c, i), c;
|
|
1606
1606
|
} catch {
|
|
1607
1607
|
}
|
|
1608
|
-
|
|
1608
|
+
fe(e, i);
|
|
1609
1609
|
const s = Z(r, n, i);
|
|
1610
1610
|
return ye(r, s, i), e.parentNode?.replaceChild(s, e), s;
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Wt(e, t, r, n) {
|
|
1613
1613
|
let i;
|
|
1614
1614
|
Array.isArray(t) ? t.length === 1 ? (i = t[0], i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })) : i = { tag: "div", key: "__root__", children: t } : (i = t, i && typeof i == "object" && i.key == null && (i = { ...i, key: "__root__" })), i && typeof i == "object" && i.tag === "#anchor" && (i = {
|
|
1615
1615
|
tag: "div",
|
|
1616
1616
|
key: "__anchor_root__",
|
|
1617
1617
|
props: { attrs: { "data-anchor-block-root": "", key: "__anchor_root__" } },
|
|
1618
1618
|
children: [i]
|
|
1619
|
-
}), i =
|
|
1619
|
+
}), i = Ke(i, String(i.key ?? "root"));
|
|
1620
1620
|
const s = e._prevVNode ?? null, o = e._prevDom ?? e.firstChild ?? null;
|
|
1621
1621
|
let c;
|
|
1622
|
-
s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c =
|
|
1622
|
+
s && o ? typeof s != "string" && typeof i != "string" && s.tag === i.tag && s.key === i.key ? c = je(o, s, i, r, n) : (c = Z(i, r, n), e.replaceChild(c, o)) : (c = Z(i, r, n), e.firstChild ? e.replaceChild(c, e.firstChild) : e.appendChild(c));
|
|
1623
1623
|
const a = [];
|
|
1624
|
-
for (let
|
|
1625
|
-
const
|
|
1626
|
-
|
|
1624
|
+
for (let h = 0; h < e.childNodes.length; h++) {
|
|
1625
|
+
const p = e.childNodes[h];
|
|
1626
|
+
p !== c && p.nodeName !== "STYLE" && (fe(p, n), a.push(p));
|
|
1627
1627
|
}
|
|
1628
|
-
a.forEach((
|
|
1628
|
+
a.forEach((h) => e.removeChild(h)), e._prevVNode = i, e._prevDom = c;
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
if (typeof e == "string") return
|
|
1630
|
+
function Me(e) {
|
|
1631
|
+
if (typeof e == "string") return he(e);
|
|
1632
1632
|
if (e.tag === "#text")
|
|
1633
|
-
return typeof e.children == "string" ?
|
|
1633
|
+
return typeof e.children == "string" ? he(e.children) : "";
|
|
1634
1634
|
if (e.tag === "#anchor")
|
|
1635
|
-
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(
|
|
1635
|
+
return (Array.isArray(e.children) ? e.children.filter(Boolean) : []).map(Me).join("");
|
|
1636
1636
|
let t = "";
|
|
1637
|
-
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${
|
|
1637
|
+
e.props && e.props.attrs && (t = Object.entries(e.props.attrs).map(([i, s]) => ` ${i}="${he(String(s))}"`).join(""));
|
|
1638
1638
|
let r = "";
|
|
1639
|
-
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${
|
|
1640
|
-
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(
|
|
1639
|
+
e.props && (r = Object.entries(e.props).filter(([i]) => i !== "attrs" && i !== "directives" && i !== "ref" && i !== "key").map(([i, s]) => ` ${i}="${he(String(s))}"`).join(""));
|
|
1640
|
+
const n = Array.isArray(e.children) ? e.children.filter(Boolean).map(Me).join("") : typeof e.children == "string" ? he(e.children) : e.children ? Me(e.children) : "";
|
|
1641
1641
|
return `<${e.tag}${t}${r}>${n}</${e.tag}>`;
|
|
1642
1642
|
}
|
|
1643
|
-
function
|
|
1643
|
+
function Dt(e, ...t) {
|
|
1644
1644
|
let r = "";
|
|
1645
1645
|
for (let n = 0; n < e.length; n++)
|
|
1646
1646
|
r += e[n], n < t.length && (r += t[n]);
|
|
1647
1647
|
return r;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1649
|
+
function pt(e) {
|
|
1650
1650
|
return e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/\s+/g, " ").replace(/\s*([{}:;,>+~])\s*/g, "$1").replace(/;}/g, "}").trim();
|
|
1651
1651
|
}
|
|
1652
|
-
let
|
|
1653
|
-
function
|
|
1654
|
-
return
|
|
1652
|
+
let Ee = null;
|
|
1653
|
+
function Xe() {
|
|
1654
|
+
return Ee || (Ee = new CSSStyleSheet(), Ee.replaceSync(pt(Nt))), Ee;
|
|
1655
1655
|
}
|
|
1656
|
-
function
|
|
1656
|
+
function It(e) {
|
|
1657
1657
|
return e.replace(/url\s*\(\s*['"]?javascript:[^)]*\)/gi, "").replace(/<script[\s\S]*?>[\s\S]*?<\/script>/gi, "").replace(/expression\s*\([^)]*\)/gi, "");
|
|
1658
1658
|
}
|
|
1659
|
-
const
|
|
1659
|
+
const Nt = Dt`
|
|
1660
1660
|
:host,
|
|
1661
1661
|
*,
|
|
1662
1662
|
::before,
|
|
@@ -1677,6 +1677,13 @@ const It = Wt`
|
|
|
1677
1677
|
font: 16px/1.5 var(--font-sans, ui-sans-serif, system-ui, sans-serif);
|
|
1678
1678
|
-webkit-text-size-adjust: 100%;
|
|
1679
1679
|
text-size-adjust: 100%;
|
|
1680
|
+
/* Default gradient variables to avoid undefined var() usage in generated utilities */
|
|
1681
|
+
--tw-gradient-from-position: 0%;
|
|
1682
|
+
--tw-gradient-to-position: 100%;
|
|
1683
|
+
--tw-gradient-via-position: 50%;
|
|
1684
|
+
--tw-gradient-from: rgba(255,255,255,0);
|
|
1685
|
+
--tw-gradient-to: rgba(255,255,255,0);
|
|
1686
|
+
--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
|
|
1680
1687
|
}
|
|
1681
1688
|
button,
|
|
1682
1689
|
input,
|
|
@@ -1760,7 +1767,7 @@ const It = Wt`
|
|
|
1760
1767
|
[hidden] {
|
|
1761
1768
|
display: none;
|
|
1762
1769
|
}
|
|
1763
|
-
`,
|
|
1770
|
+
`, Ht = {
|
|
1764
1771
|
// Existing semantic colors
|
|
1765
1772
|
neutral: {
|
|
1766
1773
|
50: "#fafafa",
|
|
@@ -1858,8 +1865,8 @@ const It = Wt`
|
|
|
1858
1865
|
black: { DEFAULT: "#000000" },
|
|
1859
1866
|
transparent: { DEFAULT: "transparent" },
|
|
1860
1867
|
current: { DEFAULT: "currentColor" }
|
|
1861
|
-
},
|
|
1862
|
-
Object.entries(
|
|
1868
|
+
}, ht = Object.fromEntries(
|
|
1869
|
+
Object.entries(Ht).map(([e, t]) => [
|
|
1863
1870
|
e,
|
|
1864
1871
|
Object.fromEntries(
|
|
1865
1872
|
Object.entries(t).map(([r, n]) => [
|
|
@@ -1868,7 +1875,7 @@ const It = Wt`
|
|
|
1868
1875
|
])
|
|
1869
1876
|
)
|
|
1870
1877
|
])
|
|
1871
|
-
),
|
|
1878
|
+
), ue = "0.25rem", Bt = {
|
|
1872
1879
|
"3xs": 64,
|
|
1873
1880
|
"2xs": 72,
|
|
1874
1881
|
xs: 80,
|
|
@@ -1882,7 +1889,7 @@ const It = Wt`
|
|
|
1882
1889
|
"5xl": 256,
|
|
1883
1890
|
"6xl": 288,
|
|
1884
1891
|
"7xl": 320
|
|
1885
|
-
},
|
|
1892
|
+
}, Qe = {
|
|
1886
1893
|
m: ["margin"],
|
|
1887
1894
|
mx: ["margin-inline"],
|
|
1888
1895
|
my: ["margin-block"],
|
|
@@ -2037,8 +2044,8 @@ const It = Wt`
|
|
|
2037
2044
|
["text-7xl", "4.5rem", "1"],
|
|
2038
2045
|
["text-8xl", "6rem", "1"],
|
|
2039
2046
|
["text-9xl", "8rem", "1"]
|
|
2040
|
-
].forEach(([a,
|
|
2041
|
-
e[a] = `font-size:${
|
|
2047
|
+
].forEach(([a, h, p]) => {
|
|
2048
|
+
e[a] = `font-size:${h};line-height:${p};`;
|
|
2042
2049
|
}), [
|
|
2043
2050
|
["tracking-tighter", "-0.05em"],
|
|
2044
2051
|
["tracking-tight", "-0.025em"],
|
|
@@ -2046,8 +2053,8 @@ const It = Wt`
|
|
|
2046
2053
|
["tracking-wide", "0.025em"],
|
|
2047
2054
|
["tracking-wider", "0.05em"],
|
|
2048
2055
|
["tracking-widest", "0.1em"]
|
|
2049
|
-
].forEach(([a,
|
|
2050
|
-
e[a] = `letter-spacing:${
|
|
2056
|
+
].forEach(([a, h]) => {
|
|
2057
|
+
e[a] = `letter-spacing:${h};`;
|
|
2051
2058
|
}), [
|
|
2052
2059
|
["leading-3", "0.75rem"],
|
|
2053
2060
|
["leading-4", "1rem"],
|
|
@@ -2063,15 +2070,15 @@ const It = Wt`
|
|
|
2063
2070
|
["leading-normal", "1.5"],
|
|
2064
2071
|
["leading-relaxed", "1.625"],
|
|
2065
2072
|
["leading-loose", "2"]
|
|
2066
|
-
].forEach(([a,
|
|
2067
|
-
e[a] = `line-height:${
|
|
2073
|
+
].forEach(([a, h]) => {
|
|
2074
|
+
e[a] = `line-height:${h};`;
|
|
2068
2075
|
}), Object.assign(e, {
|
|
2069
2076
|
"font-sans": "font-family:var(--font-sans, ui-sans-serif,system-ui,sans-serif);",
|
|
2070
2077
|
"font-serif": "font-family:var(--font-serif, ui-serif,Georgia,serif);",
|
|
2071
2078
|
"font-mono": "font-family:var(--font-mono, ui-monospace,SFMono-Regular,monospace);"
|
|
2072
2079
|
}), [0, 1, 2, 4, 6, 8].forEach((a) => {
|
|
2073
|
-
const
|
|
2074
|
-
e[`border-${a}`] = `border-width:${
|
|
2080
|
+
const h = `${a}px`;
|
|
2081
|
+
e[`border-${a}`] = `border-width:${h};`, e[`border-t-${a}`] = `border-top-width:${h};`, e[`border-r-${a}`] = `border-right-width:${h};`, e[`border-b-${a}`] = `border-bottom-width:${h};`, e[`border-l-${a}`] = `border-left-width:${h};`, e[`border-x-${a}`] = `border-left-width:${h};border-right-width:${h};`, e[`border-y-${a}`] = `border-top-width:${h};border-bottom-width:${h};`;
|
|
2075
2082
|
}), e.border = "border-width:1px;", e["border-t"] = "border-top-width:1px;", e["border-r"] = "border-right-width:1px;", e["border-b"] = "border-bottom-width:1px;", e["border-l"] = "border-left-width:1px;", e["border-x"] = "border-left-width:1px;border-right-width:1px;", e["border-y"] = "border-top-width:1px;border-bottom-width:1px;", Object.assign(e, {
|
|
2076
2083
|
"border-solid": "border-style:solid;",
|
|
2077
2084
|
"border-dashed": "border-style:dashed;",
|
|
@@ -2089,9 +2096,9 @@ const It = Wt`
|
|
|
2089
2096
|
"3xl": 24,
|
|
2090
2097
|
"4xl": 32,
|
|
2091
2098
|
full: 9999
|
|
2092
|
-
}).forEach(([a,
|
|
2093
|
-
const
|
|
2094
|
-
e[`rounded-${a}`] = `border-radius:${
|
|
2099
|
+
}).forEach(([a, h]) => {
|
|
2100
|
+
const p = h === 9999 ? "9999px" : `${h / 16}rem`;
|
|
2101
|
+
e[`rounded-${a}`] = `border-radius:${p};`, e[`rounded-t-${a}`] = `border-top-left-radius:${p};border-top-right-radius:${p};`, e[`rounded-r-${a}`] = `border-top-right-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-b-${a}`] = `border-bottom-left-radius:${p};border-bottom-right-radius:${p};`, e[`rounded-l-${a}`] = `border-top-left-radius:${p};border-bottom-left-radius:${p};`, e[`rounded-tl-${a}`] = `border-top-left-radius:${p};`, e[`rounded-tr-${a}`] = `border-top-right-radius:${p};`, e[`rounded-br-${a}`] = `border-bottom-right-radius:${p};`, e[`rounded-bl-${a}`] = `border-bottom-left-radius:${p};`;
|
|
2095
2102
|
}), Object.assign(e, {
|
|
2096
2103
|
"shadow-none": "--ce-shadow-color:rgb(0 0 0 / 0);box-shadow:0 0 var(--ce-shadow-color, #0000);",
|
|
2097
2104
|
"shadow-xs": "--ce-shadow-color:rgb(0 0 0 / 0.05);box-shadow:0 1px 2px 0 var(--ce-shadow-color, rgb(0 0 0 / 0.05));",
|
|
@@ -2169,8 +2176,8 @@ const It = Wt`
|
|
|
2169
2176
|
"m-auto": "margin:auto;",
|
|
2170
2177
|
"mx-auto": "margin-inline:auto;",
|
|
2171
2178
|
"my-auto": "margin-block:auto;"
|
|
2172
|
-
}), Object.entries(
|
|
2173
|
-
e[`max-w-${a}`] = `max-width:calc(${
|
|
2179
|
+
}), Object.entries(Bt).forEach(([a, h]) => {
|
|
2180
|
+
e[`max-w-${a}`] = `max-width:calc(${ue} * ${h});`, e[`min-w-${a}`] = `min-width:calc(${ue} * ${h});`, e[`w-${a}`] = `width:calc(${ue} * ${h});`, e[`max-h-${a}`] = `max-height:calc(${ue} * ${h});`, e[`min-h-${a}`] = `min-height:calc(${ue} * ${h});`, e[`h-${a}`] = `height:calc(${ue} * ${h});`;
|
|
2174
2181
|
}), Object.assign(e, {
|
|
2175
2182
|
transition: "transition-property:all;transition-duration:150ms;transition-timing-function:ease-in-out;",
|
|
2176
2183
|
"transition-none": "transition-property:none;",
|
|
@@ -2257,7 +2264,7 @@ const It = Wt`
|
|
|
2257
2264
|
"bg-gradient-to-l": "background-image:linear-gradient(to left, var(--tw-gradient-stops));",
|
|
2258
2265
|
"bg-gradient-to-tl": "background-image:linear-gradient(to top left, var(--tw-gradient-stops));"
|
|
2259
2266
|
}), e;
|
|
2260
|
-
},
|
|
2267
|
+
}, We = zt();
|
|
2261
2268
|
function J(e, t) {
|
|
2262
2269
|
let r = 0;
|
|
2263
2270
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -2269,7 +2276,7 @@ function J(e, t) {
|
|
|
2269
2276
|
}
|
|
2270
2277
|
return e + t;
|
|
2271
2278
|
}
|
|
2272
|
-
const
|
|
2279
|
+
const Ut = {
|
|
2273
2280
|
before: (e, t) => `${e}::before{${t}}`,
|
|
2274
2281
|
after: (e, t) => `${e}::after{${t}}`,
|
|
2275
2282
|
hover: (e, t) => `${J(e, ":hover")}{${t}}`,
|
|
@@ -2292,14 +2299,14 @@ const Bt = {
|
|
|
2292
2299
|
"peer-focus": (e, t) => `.peer:focus ~ ${e}{${t}}`,
|
|
2293
2300
|
"peer-checked": (e, t) => `.peer:checked ~ ${e}{${t}}`,
|
|
2294
2301
|
"peer-disabled": (e, t) => `.peer:disabled ~ ${e}{${t}}`
|
|
2295
|
-
},
|
|
2302
|
+
}, Ye = {
|
|
2296
2303
|
sm: "(min-width:640px)",
|
|
2297
2304
|
md: "(min-width:768px)",
|
|
2298
2305
|
lg: "(min-width:1024px)",
|
|
2299
2306
|
xl: "(min-width:1280px)",
|
|
2300
2307
|
"2xl": "(min-width:1536px)",
|
|
2301
2308
|
dark: "(prefers-color-scheme: dark)"
|
|
2302
|
-
},
|
|
2309
|
+
}, qt = {
|
|
2303
2310
|
xs: "(min-width:20rem)",
|
|
2304
2311
|
sm: "(min-width:24rem)",
|
|
2305
2312
|
md: "(min-width:28rem)",
|
|
@@ -2311,7 +2318,7 @@ const Bt = {
|
|
|
2311
2318
|
"5xl": "(min-width:64rem)",
|
|
2312
2319
|
"6xl": "(min-width:72rem)",
|
|
2313
2320
|
"7xl": "(min-width:80rem)"
|
|
2314
|
-
},
|
|
2321
|
+
}, De = ["sm", "md", "lg", "xl", "2xl"], Ie = [
|
|
2315
2322
|
"xs",
|
|
2316
2323
|
"sm",
|
|
2317
2324
|
"md",
|
|
@@ -2324,19 +2331,19 @@ const Bt = {
|
|
|
2324
2331
|
"6xl",
|
|
2325
2332
|
"7xl"
|
|
2326
2333
|
];
|
|
2327
|
-
function
|
|
2334
|
+
function Ne(e) {
|
|
2328
2335
|
const t = e.startsWith("-"), r = t ? e.slice(1) : e, n = r.lastIndexOf("-");
|
|
2329
2336
|
if (n === -1) return null;
|
|
2330
2337
|
const i = r.slice(0, n), s = r.slice(n + 1), o = parseFloat(s);
|
|
2331
|
-
if (Number.isNaN(o) || !
|
|
2338
|
+
if (Number.isNaN(o) || !Qe[i]) return null;
|
|
2332
2339
|
const c = t ? "-" : "";
|
|
2333
|
-
return
|
|
2340
|
+
return Qe[i].map((a) => `${a}:calc(${c}${ue} * ${o});`).join("");
|
|
2334
2341
|
}
|
|
2335
|
-
function
|
|
2342
|
+
function et(e) {
|
|
2336
2343
|
const t = e.replace("#", ""), r = parseInt(t, 16);
|
|
2337
2344
|
return `${r >> 16 & 255} ${r >> 8 & 255} ${r & 255}`;
|
|
2338
2345
|
}
|
|
2339
|
-
const
|
|
2346
|
+
const Ft = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/, Kt = {
|
|
2340
2347
|
bg: "background-color",
|
|
2341
2348
|
decoration: "text-decoration-color",
|
|
2342
2349
|
text: "color",
|
|
@@ -2347,36 +2354,36 @@ const qt = /^(bg|text|border|decoration|shadow|outline|caret|accent|fill|stroke)
|
|
|
2347
2354
|
fill: "fill",
|
|
2348
2355
|
stroke: "stroke"
|
|
2349
2356
|
};
|
|
2350
|
-
function
|
|
2351
|
-
const t =
|
|
2357
|
+
function Vt(e) {
|
|
2358
|
+
const t = Ft.exec(e);
|
|
2352
2359
|
if (!t) return null;
|
|
2353
|
-
const [, r, n, i = "DEFAULT"] = t, s =
|
|
2360
|
+
const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
|
|
2354
2361
|
if (!s) return null;
|
|
2355
2362
|
if (r === "shadow") return `--ce-shadow-color:${s};`;
|
|
2356
|
-
const o =
|
|
2363
|
+
const o = Kt[r];
|
|
2357
2364
|
return o ? `${o}:${s};` : null;
|
|
2358
2365
|
}
|
|
2359
|
-
function
|
|
2366
|
+
function Jt(e) {
|
|
2360
2367
|
const t = e.indexOf("/");
|
|
2361
2368
|
if (t === -1) return { base: e };
|
|
2362
2369
|
const r = e.slice(0, t), n = e.slice(t + 1), i = parseInt(n, 10);
|
|
2363
2370
|
return isNaN(i) || i < 0 || i > 100 ? { base: r } : { base: r, opacity: i / 100 };
|
|
2364
2371
|
}
|
|
2365
|
-
function
|
|
2366
|
-
const { base: t, opacity: r } =
|
|
2372
|
+
function He(e) {
|
|
2373
|
+
const { base: t, opacity: r } = Jt(e), n = Vt(t);
|
|
2367
2374
|
if (n && r !== void 0) {
|
|
2368
2375
|
const s = /#([0-9a-f]{6})/i.exec(n);
|
|
2369
2376
|
if (s) {
|
|
2370
|
-
const o =
|
|
2377
|
+
const o = et(s[0]);
|
|
2371
2378
|
return n.replace(/#([0-9a-f]{6})/i, `rgb(${o} / ${r})`);
|
|
2372
2379
|
}
|
|
2373
2380
|
}
|
|
2374
2381
|
if (n) return n;
|
|
2375
|
-
const i =
|
|
2382
|
+
const i = Oe(t);
|
|
2376
2383
|
if (i && r !== void 0) {
|
|
2377
2384
|
const s = /#([0-9a-f]{6})/i.exec(i);
|
|
2378
2385
|
if (s) {
|
|
2379
|
-
const o =
|
|
2386
|
+
const o = et(s[0]);
|
|
2380
2387
|
return i.replace(
|
|
2381
2388
|
/#([0-9a-f]{6})/i,
|
|
2382
2389
|
`rgb(${o} / ${r})`
|
|
@@ -2385,10 +2392,10 @@ function Ne(e) {
|
|
|
2385
2392
|
}
|
|
2386
2393
|
return i;
|
|
2387
2394
|
}
|
|
2388
|
-
function
|
|
2395
|
+
function Be(e) {
|
|
2389
2396
|
const t = /^(from|to|via)-([a-z]+)-?(\d{2,3}|DEFAULT)?$/.exec(e);
|
|
2390
2397
|
if (!t) return null;
|
|
2391
|
-
const [, r, n, i = "DEFAULT"] = t, s =
|
|
2398
|
+
const [, r, n, i = "DEFAULT"] = t, s = ht[n]?.[i];
|
|
2392
2399
|
if (!s) return null;
|
|
2393
2400
|
switch (r) {
|
|
2394
2401
|
case "from":
|
|
@@ -2401,19 +2408,19 @@ function Ye(e) {
|
|
|
2401
2408
|
return null;
|
|
2402
2409
|
}
|
|
2403
2410
|
}
|
|
2404
|
-
function
|
|
2411
|
+
function ze(e) {
|
|
2405
2412
|
const t = /^opacity-(\d{1,3})$/.exec(e);
|
|
2406
2413
|
if (!t) return null;
|
|
2407
2414
|
const r = parseInt(t[1], 10);
|
|
2408
2415
|
return r < 0 || r > 100 ? null : `opacity:${r / 100};`;
|
|
2409
2416
|
}
|
|
2410
|
-
function
|
|
2417
|
+
function Oe(e) {
|
|
2411
2418
|
if (e.startsWith("[") && e.endsWith("]") && !e.includes("-[")) {
|
|
2412
2419
|
const o = e.slice(1, -1).trim(), c = o.indexOf(":");
|
|
2413
2420
|
if (c === -1) return null;
|
|
2414
2421
|
const a = o.slice(0, c).trim();
|
|
2415
|
-
let
|
|
2416
|
-
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (
|
|
2422
|
+
let h = o.slice(c + 1).trim();
|
|
2423
|
+
return /^[a-zA-Z][a-zA-Z0-9-]*$/.test(a) ? (h = h.replace(/url\('\s*([^']*?)\s*'\)/g, 'url("$1")'), h = h.replace(/^'([^']*)'$/g, '"$1"'), `${a}:${h};`) : null;
|
|
2417
2424
|
}
|
|
2418
2425
|
const t = e.indexOf("-[");
|
|
2419
2426
|
if (t <= 0 || !e.endsWith("]")) return null;
|
|
@@ -2468,7 +2475,7 @@ function je(e) {
|
|
|
2468
2475
|
const s = i[r] ?? r.replace(/_/g, "-");
|
|
2469
2476
|
return s && n ? `${s}:${n};` : null;
|
|
2470
2477
|
}
|
|
2471
|
-
function
|
|
2478
|
+
function Zt(e) {
|
|
2472
2479
|
if (e.startsWith("[") && e.endsWith("]")) {
|
|
2473
2480
|
const r = e.slice(1, -1);
|
|
2474
2481
|
return r.includes("&") ? r : e;
|
|
@@ -2480,7 +2487,7 @@ function Jt(e) {
|
|
|
2480
2487
|
}
|
|
2481
2488
|
return null;
|
|
2482
2489
|
}
|
|
2483
|
-
function
|
|
2490
|
+
function tt(e) {
|
|
2484
2491
|
return e.replace(/([!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~])/g, "\\$1");
|
|
2485
2492
|
}
|
|
2486
2493
|
function Gt(e) {
|
|
@@ -2492,31 +2499,31 @@ function Gt(e) {
|
|
|
2492
2499
|
}
|
|
2493
2500
|
return r;
|
|
2494
2501
|
}
|
|
2495
|
-
const ge = /* @__PURE__ */ new Map(), Xt = 16,
|
|
2502
|
+
const ge = /* @__PURE__ */ new Map(), Xt = 16, rt = 1e3;
|
|
2496
2503
|
function Qt(e) {
|
|
2497
2504
|
const t = Date.now(), r = ge.get(e);
|
|
2498
2505
|
if (r && t - r.timestamp < Xt) return r.css;
|
|
2499
2506
|
const n = Gt(e);
|
|
2500
2507
|
if (!n.length) return "";
|
|
2501
|
-
const i = new Set(n), s = [[], [], [], []], o = {}, c = (u,
|
|
2502
|
-
const
|
|
2503
|
-
if (
|
|
2504
|
-
const
|
|
2505
|
-
return o[
|
|
2508
|
+
const i = new Set(n), s = [[], [], [], []], o = {}, c = (u, y = !1) => {
|
|
2509
|
+
const w = y ? `dark|${u}` : u;
|
|
2510
|
+
if (w in o) return o[w];
|
|
2511
|
+
const l = x(u, y);
|
|
2512
|
+
return o[w] = l, l;
|
|
2506
2513
|
}, a = (u) => {
|
|
2507
|
-
const
|
|
2508
|
-
(
|
|
2509
|
-
),
|
|
2510
|
-
return u.length ? !
|
|
2511
|
-
},
|
|
2512
|
-
const
|
|
2513
|
-
let
|
|
2514
|
-
for (let
|
|
2515
|
-
const
|
|
2516
|
-
|
|
2514
|
+
const y = u.some((f) => De.includes(f)), w = u.some(
|
|
2515
|
+
(f) => f.startsWith("@") && (Ie.includes(f.slice(1)) || f.match(/^@\[.+\]$/))
|
|
2516
|
+
), l = u.includes("dark");
|
|
2517
|
+
return u.length ? !y && !l && !w ? 1 : l && (y || w) ? 3 : 2 : 0;
|
|
2518
|
+
}, h = (u) => {
|
|
2519
|
+
const y = [];
|
|
2520
|
+
let w = "", l = 0;
|
|
2521
|
+
for (let f = 0; f < u.length; f++) {
|
|
2522
|
+
const b = u[f];
|
|
2523
|
+
b === "[" || b === "(" ? l++ : (b === "]" || b === ")") && l--, b === ":" && l === 0 ? (y.push(w), w = "") : w += b;
|
|
2517
2524
|
}
|
|
2518
|
-
return
|
|
2519
|
-
},
|
|
2525
|
+
return w && y.push(w), y;
|
|
2526
|
+
}, p = {
|
|
2520
2527
|
hover: ":hover",
|
|
2521
2528
|
focus: ":focus",
|
|
2522
2529
|
active: ":active",
|
|
@@ -2529,128 +2536,135 @@ function Qt(e) {
|
|
|
2529
2536
|
even: ":nth-child(even)",
|
|
2530
2537
|
"focus-within": ":focus-within",
|
|
2531
2538
|
"focus-visible": ":focus-visible"
|
|
2532
|
-
},
|
|
2533
|
-
const
|
|
2534
|
-
let
|
|
2535
|
-
for (const
|
|
2536
|
-
let
|
|
2537
|
-
if (
|
|
2538
|
-
|
|
2539
|
+
}, x = (u, y = !1) => {
|
|
2540
|
+
const w = h(u);
|
|
2541
|
+
let l = "", f = !1;
|
|
2542
|
+
for (const E of w) {
|
|
2543
|
+
let T = E;
|
|
2544
|
+
if (T.startsWith("!") && (f = !0, T = T.slice(1)), We[T] || Ne(T) || ze(T) || He(T) || Be(T) || Oe(T)) {
|
|
2545
|
+
l = E;
|
|
2539
2546
|
break;
|
|
2540
2547
|
}
|
|
2541
2548
|
}
|
|
2542
|
-
if (!
|
|
2543
|
-
const
|
|
2544
|
-
if (!
|
|
2545
|
-
const
|
|
2546
|
-
let
|
|
2547
|
-
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2549
|
+
if (!l) return null;
|
|
2550
|
+
const b = l.replace(/^!/, ""), k = We[b] ?? Ne(b) ?? ze(b) ?? He(b) ?? Be(b) ?? Oe(b);
|
|
2551
|
+
if (!k) return null;
|
|
2552
|
+
const C = w.indexOf(l);
|
|
2553
|
+
let g = C >= 0 ? w.slice(0, C) : [];
|
|
2554
|
+
y && (g = g.filter((E) => E !== "dark"));
|
|
2555
|
+
const $ = `.${tt(u)}`, j = f ? k.replace(/;/g, " !important;") : k, v = "__SUBJECT__";
|
|
2556
|
+
let _ = v;
|
|
2550
2557
|
const A = [];
|
|
2551
|
-
for (const
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
`.peer:${
|
|
2555
|
-
), A.push(
|
|
2556
|
-
|
|
2557
|
-
const
|
|
2558
|
-
let
|
|
2559
|
-
for (const
|
|
2560
|
-
if (
|
|
2558
|
+
for (const E of g)
|
|
2559
|
+
E.startsWith("group-") ? (_ = `.group:${E.slice(6)} ${_}`, A.push(E)) : E.startsWith("peer-") && (_ = _.replace(
|
|
2560
|
+
v,
|
|
2561
|
+
`.peer:${E.slice(5)}~${v}`
|
|
2562
|
+
), A.push(E));
|
|
2563
|
+
g = g.filter((E) => !A.includes(E));
|
|
2564
|
+
const D = [], S = [];
|
|
2565
|
+
let O = null;
|
|
2566
|
+
for (const E of g) {
|
|
2567
|
+
if (E === "dark" || De.includes(E) || E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/)))
|
|
2561
2568
|
continue;
|
|
2562
|
-
const
|
|
2563
|
-
if (
|
|
2564
|
-
|
|
2569
|
+
const T = Zt(E);
|
|
2570
|
+
if (T) {
|
|
2571
|
+
O = T;
|
|
2565
2572
|
continue;
|
|
2566
2573
|
}
|
|
2567
|
-
const
|
|
2568
|
-
if (
|
|
2569
|
-
|
|
2574
|
+
const R = p[E];
|
|
2575
|
+
if (R) {
|
|
2576
|
+
O ? S.push(R) : D.push(R);
|
|
2570
2577
|
continue;
|
|
2571
2578
|
}
|
|
2572
|
-
const
|
|
2573
|
-
typeof
|
|
2579
|
+
const B = Ut[E];
|
|
2580
|
+
typeof B == "function" && (_ = B(_, j).split("{")[0]);
|
|
2574
2581
|
}
|
|
2575
|
-
const
|
|
2576
|
-
function
|
|
2577
|
-
if (!
|
|
2578
|
-
let
|
|
2579
|
-
if (
|
|
2580
|
-
let
|
|
2581
|
-
for (;
|
|
2582
|
-
for (;
|
|
2583
|
-
const z =
|
|
2584
|
-
if (z === "[" ?
|
|
2585
|
-
return
|
|
2582
|
+
const H = D.join(""), te = S.join("");
|
|
2583
|
+
function $e(E, T) {
|
|
2584
|
+
if (!T) return E;
|
|
2585
|
+
let R = 0, B = 0;
|
|
2586
|
+
if (E.length && (E[0] === ">" || E[0] === "+" || E[0] === "~" || E[0] === " ")) {
|
|
2587
|
+
let L = 1;
|
|
2588
|
+
for (; L < E.length && E[L] === " "; ) L++;
|
|
2589
|
+
for (; L < E.length; L++) {
|
|
2590
|
+
const z = E[L];
|
|
2591
|
+
if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (E[L] === ">" || E[L] === "+" || E[L] === "~" || E[L] === " "))
|
|
2592
|
+
return E.slice(0, L) + T + E.slice(L);
|
|
2586
2593
|
}
|
|
2587
|
-
return
|
|
2594
|
+
return E + T;
|
|
2588
2595
|
}
|
|
2589
|
-
for (let
|
|
2590
|
-
const z =
|
|
2591
|
-
if (z === "[" ?
|
|
2592
|
-
return
|
|
2596
|
+
for (let L = 0; L < E.length; L++) {
|
|
2597
|
+
const z = E[L];
|
|
2598
|
+
if (z === "[" ? R++ : z === "]" && R > 0 ? R-- : z === "(" ? B++ : z === ")" && B > 0 && B--, R === 0 && B === 0 && (z === ">" || z === "+" || z === "~" || z === " "))
|
|
2599
|
+
return E.slice(0, L) + T + E.slice(L);
|
|
2593
2600
|
}
|
|
2594
|
-
return
|
|
2601
|
+
return E + T;
|
|
2595
2602
|
}
|
|
2596
|
-
if (
|
|
2597
|
-
if (
|
|
2598
|
-
const
|
|
2599
|
-
if (
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
+
if (O)
|
|
2604
|
+
if (O.includes("&")) {
|
|
2605
|
+
const E = O.indexOf("&"), T = O.slice(0, E), R = O.slice(E + 1), B = v + H;
|
|
2606
|
+
if (D.length === 0)
|
|
2607
|
+
_ = _.replace(
|
|
2608
|
+
v,
|
|
2609
|
+
T + B + te + R
|
|
2603
2610
|
);
|
|
2604
2611
|
else {
|
|
2605
|
-
const
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2612
|
+
const L = $e(R, te);
|
|
2613
|
+
_ = _.replace(
|
|
2614
|
+
v,
|
|
2615
|
+
T + B + L
|
|
2609
2616
|
);
|
|
2610
2617
|
}
|
|
2611
2618
|
} else
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
`${
|
|
2615
|
-
),
|
|
2619
|
+
_ = _.replace(
|
|
2620
|
+
v,
|
|
2621
|
+
`${O}${v + H}`
|
|
2622
|
+
), te && (_ = _.replace(v, `${v}${te}`));
|
|
2616
2623
|
else
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2624
|
+
_ = _.replace(
|
|
2625
|
+
v,
|
|
2626
|
+
v + H + te
|
|
2620
2627
|
);
|
|
2621
|
-
|
|
2622
|
-
let
|
|
2623
|
-
const
|
|
2624
|
-
(
|
|
2625
|
-
),
|
|
2626
|
-
(
|
|
2627
|
-
),
|
|
2628
|
-
let
|
|
2629
|
-
if (
|
|
2630
|
-
if (
|
|
2631
|
-
const
|
|
2632
|
-
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(
|
|
2628
|
+
_ = _.replace(new RegExp(v, "g"), $);
|
|
2629
|
+
let N = `${_}{${j}}`;
|
|
2630
|
+
const W = g.filter(
|
|
2631
|
+
(E) => De.includes(E)
|
|
2632
|
+
), V = g.filter(
|
|
2633
|
+
(E) => E.startsWith("@") && (Ie.includes(E.slice(1)) || E.match(/^@\[.+\]$/))
|
|
2634
|
+
), K = W.length ? W[W.length - 1] : null, G = V.length ? V[V.length - 1] : null, I = g.includes("dark");
|
|
2635
|
+
let X = "", re = "";
|
|
2636
|
+
if (I && K ? X = `@media (prefers-color-scheme: dark) and ${Ye[K]}` : I ? X = "@media (prefers-color-scheme: dark)" : K && (X = `@media ${Ye[K]}`), G)
|
|
2637
|
+
if (G.startsWith("@[") && G.endsWith("]")) {
|
|
2638
|
+
const E = G.slice(2, -1);
|
|
2639
|
+
if (!/^-?\d*\.?\d+(px|rem|em|%|vh|vw|ch|ex|cm|mm|in|pt|pc)$/.test(E))
|
|
2633
2640
|
return null;
|
|
2634
|
-
|
|
2641
|
+
re = `@container (min-width:${E})`;
|
|
2635
2642
|
} else {
|
|
2636
|
-
const
|
|
2637
|
-
|
|
2643
|
+
const E = G.slice(1);
|
|
2644
|
+
re = `@container ${qt[E] || `(min-width:${E})`}`;
|
|
2638
2645
|
}
|
|
2639
|
-
return
|
|
2646
|
+
return X && re ? N = `${X}${re}{${N}}` : X ? N = `${X}{${N}}` : re && (N = `${re}{${N}}`), N;
|
|
2640
2647
|
};
|
|
2641
2648
|
for (const u of i) {
|
|
2642
|
-
const
|
|
2643
|
-
(
|
|
2649
|
+
const y = h(u), w = y.find(
|
|
2650
|
+
(C) => We[C.replace(/^!/, "")] || Ne(C.replace(/^!/, "")) || ze(C.replace(/^!/, "")) || He(C.replace(/^!/, "")) || Be(C.replace(/^!/, "")) || Oe(C.replace(/^!/, ""))
|
|
2644
2651
|
);
|
|
2645
|
-
if (!
|
|
2646
|
-
const
|
|
2647
|
-
|
|
2648
|
-
}
|
|
2649
|
-
const
|
|
2650
|
-
|
|
2652
|
+
if (!w) continue;
|
|
2653
|
+
const l = y.indexOf(w), f = l >= 0 ? y.slice(0, l) : [], b = a(f), k = c(u);
|
|
2654
|
+
k && s[b].push(k);
|
|
2655
|
+
}
|
|
2656
|
+
const m = /^(from|via|to)-[a-z]+-?\d{2,3}?$/;
|
|
2657
|
+
for (const u of i)
|
|
2658
|
+
if (m.test(u)) {
|
|
2659
|
+
if (s.flat().join("").includes(`.${tt(u)}`)) continue;
|
|
2660
|
+
const w = c(u);
|
|
2661
|
+
w && s[0].push(w);
|
|
2662
|
+
}
|
|
2663
|
+
const d = s.flat().join("");
|
|
2664
|
+
return ge.size >= rt && Array.from(ge.keys()).slice(
|
|
2651
2665
|
0,
|
|
2652
|
-
Math.floor(
|
|
2653
|
-
).forEach((
|
|
2666
|
+
Math.floor(rt / 2)
|
|
2667
|
+
).forEach((y) => ge.delete(y)), ge.set(e, { css: d, timestamp: t }), d;
|
|
2654
2668
|
}
|
|
2655
2669
|
const be = [];
|
|
2656
2670
|
function Yt(e, t, r, n, i, s, o, c) {
|
|
@@ -2659,21 +2673,21 @@ function Yt(e, t, r, n, i, s, o, c) {
|
|
|
2659
2673
|
try {
|
|
2660
2674
|
const a = t.render(r);
|
|
2661
2675
|
if (a instanceof Promise) {
|
|
2662
|
-
s(!0), a.then((
|
|
2663
|
-
s(!1), o(null),
|
|
2664
|
-
}).catch((
|
|
2665
|
-
s(!1), o(
|
|
2676
|
+
s(!0), a.then((h) => {
|
|
2677
|
+
s(!1), o(null), nt(e, h, r, n, i), c(e.innerHTML);
|
|
2678
|
+
}).catch((h) => {
|
|
2679
|
+
s(!1), o(h);
|
|
2666
2680
|
});
|
|
2667
2681
|
return;
|
|
2668
2682
|
}
|
|
2669
|
-
|
|
2683
|
+
nt(e, a, r, n, i), c(e.innerHTML);
|
|
2670
2684
|
} finally {
|
|
2671
2685
|
be.pop();
|
|
2672
2686
|
}
|
|
2673
2687
|
}
|
|
2674
2688
|
}
|
|
2675
|
-
function
|
|
2676
|
-
e && (
|
|
2689
|
+
function nt(e, t, r, n, i) {
|
|
2690
|
+
e && (Wt(
|
|
2677
2691
|
e,
|
|
2678
2692
|
Array.isArray(t) ? t : [t],
|
|
2679
2693
|
r,
|
|
@@ -2702,38 +2716,38 @@ Stopping runaway component render to prevent browser freeze`
|
|
|
2702
2716
|
}
|
|
2703
2717
|
} else
|
|
2704
2718
|
i(0);
|
|
2705
|
-
const
|
|
2719
|
+
const h = setTimeout(() => {
|
|
2706
2720
|
n(Date.now()), e(), o(null);
|
|
2707
2721
|
}, r > 10 ? 100 : 0);
|
|
2708
|
-
o(
|
|
2722
|
+
o(h);
|
|
2709
2723
|
}
|
|
2710
2724
|
function tr(e, t, r, n, i) {
|
|
2711
2725
|
if (!e) return;
|
|
2712
2726
|
const s = Qt(r);
|
|
2713
2727
|
if ((!s || s.trim() === "") && !t._computedStyle) {
|
|
2714
|
-
i(null), e.adoptedStyleSheets = [
|
|
2728
|
+
i(null), e.adoptedStyleSheets = [Xe()];
|
|
2715
2729
|
return;
|
|
2716
2730
|
}
|
|
2717
2731
|
let o = "";
|
|
2718
2732
|
t._computedStyle && (o = t._computedStyle);
|
|
2719
|
-
let c =
|
|
2733
|
+
let c = It(`${o}
|
|
2720
2734
|
${s}
|
|
2721
2735
|
`);
|
|
2722
|
-
c =
|
|
2736
|
+
c = pt(c);
|
|
2723
2737
|
let a = n;
|
|
2724
|
-
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [
|
|
2738
|
+
a || (a = new CSSStyleSheet()), (a.cssRules.length === 0 || a.toString() !== c) && a.replaceSync(c), e.adoptedStyleSheets = [Xe(), a], i(a);
|
|
2725
2739
|
}
|
|
2726
|
-
let
|
|
2740
|
+
let M = null;
|
|
2727
2741
|
function rr(e) {
|
|
2728
|
-
|
|
2742
|
+
M = e;
|
|
2729
2743
|
}
|
|
2730
2744
|
function nr() {
|
|
2731
|
-
|
|
2745
|
+
M = null;
|
|
2732
2746
|
}
|
|
2733
2747
|
function br() {
|
|
2734
|
-
if (!
|
|
2748
|
+
if (!M)
|
|
2735
2749
|
throw new Error("useEmit must be called during component render");
|
|
2736
|
-
const e =
|
|
2750
|
+
const e = M.emit;
|
|
2737
2751
|
return (t, r) => e(t, r);
|
|
2738
2752
|
}
|
|
2739
2753
|
function xe(e) {
|
|
@@ -2745,39 +2759,39 @@ function xe(e) {
|
|
|
2745
2759
|
});
|
|
2746
2760
|
}
|
|
2747
2761
|
function wr(e) {
|
|
2748
|
-
if (!
|
|
2762
|
+
if (!M)
|
|
2749
2763
|
throw new Error("useOnConnected must be called during component render");
|
|
2750
|
-
xe(
|
|
2764
|
+
xe(M), M._hookCallbacks.onConnected = e;
|
|
2751
2765
|
}
|
|
2752
2766
|
function xr(e) {
|
|
2753
|
-
if (!
|
|
2767
|
+
if (!M)
|
|
2754
2768
|
throw new Error("useOnDisconnected must be called during component render");
|
|
2755
|
-
xe(
|
|
2769
|
+
xe(M), M._hookCallbacks.onDisconnected = e;
|
|
2756
2770
|
}
|
|
2757
2771
|
function vr(e) {
|
|
2758
|
-
if (!
|
|
2772
|
+
if (!M)
|
|
2759
2773
|
throw new Error("useOnAttributeChanged must be called during component render");
|
|
2760
|
-
xe(
|
|
2774
|
+
xe(M), M._hookCallbacks.onAttributeChanged = e;
|
|
2761
2775
|
}
|
|
2762
2776
|
function $r(e) {
|
|
2763
|
-
if (!
|
|
2777
|
+
if (!M)
|
|
2764
2778
|
throw new Error("useOnError must be called during component render");
|
|
2765
|
-
xe(
|
|
2779
|
+
xe(M), M._hookCallbacks.onError = e;
|
|
2766
2780
|
}
|
|
2767
2781
|
function kr(e) {
|
|
2768
|
-
if (!
|
|
2782
|
+
if (!M)
|
|
2769
2783
|
throw new Error("useStyle must be called during component render");
|
|
2770
|
-
xe(
|
|
2784
|
+
xe(M);
|
|
2771
2785
|
try {
|
|
2772
2786
|
const t = e();
|
|
2773
|
-
Object.defineProperty(
|
|
2787
|
+
Object.defineProperty(M, "_computedStyle", {
|
|
2774
2788
|
value: t,
|
|
2775
2789
|
writable: !0,
|
|
2776
2790
|
enumerable: !1,
|
|
2777
2791
|
configurable: !0
|
|
2778
2792
|
});
|
|
2779
2793
|
} catch (t) {
|
|
2780
|
-
console.warn("Error in useStyle callback:", t), Object.defineProperty(
|
|
2794
|
+
console.warn("Error in useStyle callback:", t), Object.defineProperty(M, "_computedStyle", {
|
|
2781
2795
|
value: "",
|
|
2782
2796
|
writable: !0,
|
|
2783
2797
|
enumerable: !1,
|
|
@@ -2785,10 +2799,10 @@ function kr(e) {
|
|
|
2785
2799
|
});
|
|
2786
2800
|
}
|
|
2787
2801
|
}
|
|
2788
|
-
const
|
|
2802
|
+
const Re = /* @__PURE__ */ new Map(), it = Symbol.for("cer.registry");
|
|
2789
2803
|
if (typeof window < "u") {
|
|
2790
2804
|
const e = globalThis;
|
|
2791
|
-
e[
|
|
2805
|
+
e[it] || (e[it] = Re);
|
|
2792
2806
|
}
|
|
2793
2807
|
function ir(e, t) {
|
|
2794
2808
|
if (!t.render)
|
|
@@ -2833,7 +2847,7 @@ function ir(e, t) {
|
|
|
2833
2847
|
_templateLoading = !1;
|
|
2834
2848
|
_templateError = null;
|
|
2835
2849
|
constructor() {
|
|
2836
|
-
super(), this.attachShadow({ mode: "open" }), this._cfg =
|
|
2850
|
+
super(), this.attachShadow({ mode: "open" }), this._cfg = Re.get(e) || t, this._componentId = `${e}-${Math.random().toString(36).substr(2, 9)}`;
|
|
2837
2851
|
const r = this._initContext(t);
|
|
2838
2852
|
Object.defineProperty(r, "refs", {
|
|
2839
2853
|
value: this._refs,
|
|
@@ -2874,7 +2888,7 @@ function ir(e, t) {
|
|
|
2874
2888
|
enumerable: !1,
|
|
2875
2889
|
configurable: !1
|
|
2876
2890
|
});
|
|
2877
|
-
const n =
|
|
2891
|
+
const n = Re.get(e) || t;
|
|
2878
2892
|
Object.keys(n).forEach((i) => {
|
|
2879
2893
|
const s = n[i];
|
|
2880
2894
|
typeof s == "function" && (this.context[i] = (...o) => s(...o, this.context));
|
|
@@ -2895,14 +2909,14 @@ function ir(e, t) {
|
|
|
2895
2909
|
}
|
|
2896
2910
|
connectedCallback() {
|
|
2897
2911
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2898
|
-
this._applyProps(t), this._requestRender(),
|
|
2912
|
+
this._applyProps(t), this._requestRender(), _t(t, this.context, this._mounted, (r) => {
|
|
2899
2913
|
this._mounted = r;
|
|
2900
2914
|
});
|
|
2901
2915
|
});
|
|
2902
2916
|
}
|
|
2903
2917
|
disconnectedCallback() {
|
|
2904
2918
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2905
|
-
|
|
2919
|
+
Et(
|
|
2906
2920
|
t,
|
|
2907
2921
|
this.context,
|
|
2908
2922
|
this._listeners,
|
|
@@ -2926,11 +2940,11 @@ function ir(e, t) {
|
|
|
2926
2940
|
}
|
|
2927
2941
|
attributeChangedCallback(r, n, i) {
|
|
2928
2942
|
this._runLogicWithinErrorBoundary(t, () => {
|
|
2929
|
-
this._applyProps(t), n !== i && this._requestRender(),
|
|
2943
|
+
this._applyProps(t), n !== i && this._requestRender(), St(t, r, n, i, this.context);
|
|
2930
2944
|
});
|
|
2931
2945
|
}
|
|
2932
2946
|
static get observedAttributes() {
|
|
2933
|
-
return t.props ? Object.keys(t.props).map(
|
|
2947
|
+
return t.props ? Object.keys(t.props).map(ie) : [];
|
|
2934
2948
|
}
|
|
2935
2949
|
_applyComputed(r) {
|
|
2936
2950
|
}
|
|
@@ -2960,7 +2974,7 @@ function ir(e, t) {
|
|
|
2960
2974
|
}
|
|
2961
2975
|
_requestRender() {
|
|
2962
2976
|
this._runLogicWithinErrorBoundary(this._cfg, () => {
|
|
2963
|
-
|
|
2977
|
+
de(() => {
|
|
2964
2978
|
er(
|
|
2965
2979
|
() => this._render(this._cfg),
|
|
2966
2980
|
this._lastRenderTime,
|
|
@@ -3007,9 +3021,9 @@ function ir(e, t) {
|
|
|
3007
3021
|
try {
|
|
3008
3022
|
let n = function(s, o = "") {
|
|
3009
3023
|
return Array.isArray(s) ? new Proxy(s, {
|
|
3010
|
-
get(c, a,
|
|
3011
|
-
const
|
|
3012
|
-
return typeof
|
|
3024
|
+
get(c, a, h) {
|
|
3025
|
+
const p = Reflect.get(c, a, h);
|
|
3026
|
+
return typeof p == "function" && typeof a == "string" && [
|
|
3013
3027
|
"push",
|
|
3014
3028
|
"pop",
|
|
3015
3029
|
"shift",
|
|
@@ -3017,29 +3031,29 @@ function ir(e, t) {
|
|
|
3017
3031
|
"splice",
|
|
3018
3032
|
"sort",
|
|
3019
3033
|
"reverse"
|
|
3020
|
-
].includes(a) ? function(...
|
|
3021
|
-
const
|
|
3034
|
+
].includes(a) ? function(...m) {
|
|
3035
|
+
const d = p.apply(c, m);
|
|
3022
3036
|
if (!i._initializing) {
|
|
3023
|
-
const
|
|
3024
|
-
i._triggerWatchers(
|
|
3037
|
+
const u = o || "root";
|
|
3038
|
+
i._triggerWatchers(u, c), de(
|
|
3025
3039
|
() => i._render(r),
|
|
3026
3040
|
i._componentId
|
|
3027
3041
|
);
|
|
3028
3042
|
}
|
|
3029
|
-
return
|
|
3030
|
-
} :
|
|
3043
|
+
return d;
|
|
3044
|
+
} : p;
|
|
3031
3045
|
},
|
|
3032
|
-
set(c, a,
|
|
3033
|
-
if (c[a] =
|
|
3034
|
-
const
|
|
3035
|
-
i._triggerWatchers(
|
|
3046
|
+
set(c, a, h) {
|
|
3047
|
+
if (c[a] = h, !i._initializing) {
|
|
3048
|
+
const p = o ? `${o}.${String(a)}` : String(a);
|
|
3049
|
+
i._triggerWatchers(p, h), de(() => i._render(r), i._componentId);
|
|
3036
3050
|
}
|
|
3037
3051
|
return !0;
|
|
3038
3052
|
},
|
|
3039
3053
|
deleteProperty(c, a) {
|
|
3040
3054
|
if (delete c[a], !i._initializing) {
|
|
3041
|
-
const
|
|
3042
|
-
i._triggerWatchers(
|
|
3055
|
+
const h = o ? `${o}.${String(a)}` : String(a);
|
|
3056
|
+
i._triggerWatchers(h, void 0), de(() => i._render(r), i._componentId);
|
|
3043
3057
|
}
|
|
3044
3058
|
return !0;
|
|
3045
3059
|
}
|
|
@@ -3047,12 +3061,12 @@ function ir(e, t) {
|
|
|
3047
3061
|
const a = o ? `${o}.${c}` : c;
|
|
3048
3062
|
s[c] = n(s[c], a);
|
|
3049
3063
|
}), new Proxy(s, {
|
|
3050
|
-
set(c, a,
|
|
3051
|
-
const
|
|
3052
|
-
return c[a] = n(
|
|
3064
|
+
set(c, a, h) {
|
|
3065
|
+
const p = o ? `${o}.${String(a)}` : String(a);
|
|
3066
|
+
return c[a] = n(h, p), i._initializing || (i._triggerWatchers(p, c[a]), de(() => i._render(r), i._componentId)), !0;
|
|
3053
3067
|
},
|
|
3054
|
-
get(c, a,
|
|
3055
|
-
return Reflect.get(c, a,
|
|
3068
|
+
get(c, a, h) {
|
|
3069
|
+
return Reflect.get(c, a, h);
|
|
3056
3070
|
}
|
|
3057
3071
|
})) : s;
|
|
3058
3072
|
};
|
|
@@ -3073,7 +3087,7 @@ function ir(e, t) {
|
|
|
3073
3087
|
}
|
|
3074
3088
|
_initWatchers(r) {
|
|
3075
3089
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
3076
|
-
|
|
3090
|
+
vt(
|
|
3077
3091
|
this.context,
|
|
3078
3092
|
this._watchers,
|
|
3079
3093
|
{}
|
|
@@ -3082,12 +3096,12 @@ function ir(e, t) {
|
|
|
3082
3096
|
});
|
|
3083
3097
|
}
|
|
3084
3098
|
_triggerWatchers(r, n) {
|
|
3085
|
-
|
|
3099
|
+
$t(this.context, this._watchers, r, n);
|
|
3086
3100
|
}
|
|
3087
3101
|
_applyProps(r) {
|
|
3088
3102
|
this._runLogicWithinErrorBoundary(r, () => {
|
|
3089
3103
|
try {
|
|
3090
|
-
|
|
3104
|
+
Ct(this, r, this.context);
|
|
3091
3105
|
} catch (n) {
|
|
3092
3106
|
this._hasError = !0, r.onError && r.onError(n, this.context);
|
|
3093
3107
|
}
|
|
@@ -3095,8 +3109,8 @@ function ir(e, t) {
|
|
|
3095
3109
|
}
|
|
3096
3110
|
};
|
|
3097
3111
|
}
|
|
3098
|
-
function
|
|
3099
|
-
let r =
|
|
3112
|
+
function st(e, t) {
|
|
3113
|
+
let r = ie(e);
|
|
3100
3114
|
r.includes("-") || (r = `cer-${r}`);
|
|
3101
3115
|
let n = {};
|
|
3102
3116
|
if (typeof window < "u")
|
|
@@ -3105,150 +3119,150 @@ function nt(e, t) {
|
|
|
3105
3119
|
let c = null;
|
|
3106
3120
|
const a = o.indexOf("({");
|
|
3107
3121
|
if (a !== -1) {
|
|
3108
|
-
let
|
|
3109
|
-
for (let
|
|
3110
|
-
const y = o[
|
|
3111
|
-
if (
|
|
3112
|
-
|
|
3122
|
+
let h = 0, p = !1, x = null, m = !1, d = -1;
|
|
3123
|
+
for (let u = a + 2; u < o.length; u++) {
|
|
3124
|
+
const y = o[u];
|
|
3125
|
+
if (m) {
|
|
3126
|
+
m = !1;
|
|
3113
3127
|
continue;
|
|
3114
3128
|
}
|
|
3115
3129
|
if (y === "\\") {
|
|
3116
|
-
|
|
3130
|
+
m = !0;
|
|
3117
3131
|
continue;
|
|
3118
3132
|
}
|
|
3119
|
-
if (!
|
|
3120
|
-
|
|
3133
|
+
if (!p && (y === '"' || y === "'" || y === "`")) {
|
|
3134
|
+
p = !0, x = y;
|
|
3121
3135
|
continue;
|
|
3122
3136
|
}
|
|
3123
|
-
if (
|
|
3124
|
-
|
|
3137
|
+
if (p && y === x) {
|
|
3138
|
+
p = !1, x = null;
|
|
3125
3139
|
continue;
|
|
3126
3140
|
}
|
|
3127
|
-
if (!
|
|
3141
|
+
if (!p) {
|
|
3128
3142
|
if (y === "{")
|
|
3129
|
-
|
|
3143
|
+
h++;
|
|
3130
3144
|
else if (y === "}") {
|
|
3131
|
-
if (
|
|
3132
|
-
|
|
3145
|
+
if (h === 0) {
|
|
3146
|
+
d = u;
|
|
3133
3147
|
break;
|
|
3134
3148
|
}
|
|
3135
|
-
|
|
3149
|
+
h--;
|
|
3136
3150
|
}
|
|
3137
3151
|
}
|
|
3138
3152
|
}
|
|
3139
|
-
if (
|
|
3140
|
-
const
|
|
3141
|
-
c = [
|
|
3153
|
+
if (d !== -1) {
|
|
3154
|
+
const u = o.substring(a, d + 2), y = o.substring(a + 2, d).trim();
|
|
3155
|
+
c = [u, y];
|
|
3142
3156
|
}
|
|
3143
3157
|
}
|
|
3144
3158
|
if (c) {
|
|
3145
|
-
const
|
|
3146
|
-
let
|
|
3147
|
-
for (;
|
|
3148
|
-
const l =
|
|
3159
|
+
const h = c[1];
|
|
3160
|
+
let p = "", x = "", m = !0, d = 0, u = null, y = !1, w = 0;
|
|
3161
|
+
for (; w < h.length; ) {
|
|
3162
|
+
const l = h[w];
|
|
3149
3163
|
if (y) {
|
|
3150
|
-
|
|
3164
|
+
m ? p += l : x += l, y = !1, w++;
|
|
3151
3165
|
continue;
|
|
3152
3166
|
}
|
|
3153
3167
|
if (l === "\\") {
|
|
3154
|
-
y = !0,
|
|
3168
|
+
y = !0, m ? p += l : x += l, w++;
|
|
3155
3169
|
continue;
|
|
3156
3170
|
}
|
|
3157
|
-
if ((l === '"' || l === "'" || l === "`") && !
|
|
3158
|
-
|
|
3171
|
+
if ((l === '"' || l === "'" || l === "`") && !u) {
|
|
3172
|
+
u = l, m ? p += l : x += l, w++;
|
|
3159
3173
|
continue;
|
|
3160
3174
|
}
|
|
3161
|
-
if (l ===
|
|
3162
|
-
|
|
3175
|
+
if (l === u) {
|
|
3176
|
+
u = null, m ? p += l : x += l, w++;
|
|
3163
3177
|
continue;
|
|
3164
3178
|
}
|
|
3165
|
-
if (
|
|
3166
|
-
|
|
3179
|
+
if (u) {
|
|
3180
|
+
m ? p += l : x += l, w++;
|
|
3167
3181
|
continue;
|
|
3168
3182
|
}
|
|
3169
3183
|
if (l === "{" || l === "[") {
|
|
3170
|
-
|
|
3184
|
+
d++, m ? p += l : x += l, w++;
|
|
3171
3185
|
continue;
|
|
3172
3186
|
}
|
|
3173
3187
|
if (l === "}" || l === "]") {
|
|
3174
|
-
|
|
3188
|
+
d--, m ? p += l : x += l, w++;
|
|
3175
3189
|
continue;
|
|
3176
3190
|
}
|
|
3177
|
-
if (l === "=" &&
|
|
3178
|
-
|
|
3191
|
+
if (l === "=" && d === 0 && m) {
|
|
3192
|
+
m = !1, w++;
|
|
3179
3193
|
continue;
|
|
3180
3194
|
}
|
|
3181
|
-
if (l === "," &&
|
|
3182
|
-
if (
|
|
3183
|
-
const
|
|
3195
|
+
if (l === "," && d === 0) {
|
|
3196
|
+
if (p.trim() && x.trim()) {
|
|
3197
|
+
const f = p.trim(), b = x.trim();
|
|
3184
3198
|
try {
|
|
3185
|
-
if (
|
|
3186
|
-
else if (
|
|
3187
|
-
else if (
|
|
3188
|
-
else if (
|
|
3189
|
-
else if (/^\d+$/.test(
|
|
3190
|
-
n[
|
|
3191
|
-
else if (/^'.*'$/s.test(
|
|
3192
|
-
n[
|
|
3193
|
-
else if (/^".*"$/s.test(
|
|
3194
|
-
n[
|
|
3195
|
-
else if (/^`.*`$/s.test(
|
|
3196
|
-
const k =
|
|
3199
|
+
if (b === "true") n[f] = !0;
|
|
3200
|
+
else if (b === "false") n[f] = !1;
|
|
3201
|
+
else if (b === "[]") n[f] = [];
|
|
3202
|
+
else if (b === "{}") n[f] = {};
|
|
3203
|
+
else if (/^\d+$/.test(b))
|
|
3204
|
+
n[f] = parseInt(b);
|
|
3205
|
+
else if (/^'.*'$/s.test(b))
|
|
3206
|
+
n[f] = b.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
|
|
3207
|
+
else if (/^".*"$/s.test(b))
|
|
3208
|
+
n[f] = b.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
|
|
3209
|
+
else if (/^`.*`$/s.test(b)) {
|
|
3210
|
+
const k = b.slice(1, -1);
|
|
3197
3211
|
if (k.includes("${"))
|
|
3198
3212
|
try {
|
|
3199
|
-
n[
|
|
3213
|
+
n[f] = new Function(
|
|
3200
3214
|
`return \`${k}\`;`
|
|
3201
3215
|
)();
|
|
3202
3216
|
} catch {
|
|
3203
|
-
n[
|
|
3217
|
+
n[f] = k;
|
|
3204
3218
|
}
|
|
3205
3219
|
else
|
|
3206
|
-
n[
|
|
3220
|
+
n[f] = k;
|
|
3207
3221
|
} else
|
|
3208
|
-
n[
|
|
3222
|
+
n[f] = b;
|
|
3209
3223
|
} catch {
|
|
3210
|
-
n[
|
|
3224
|
+
n[f] = "";
|
|
3211
3225
|
}
|
|
3212
|
-
} else if (
|
|
3213
|
-
const
|
|
3214
|
-
|
|
3226
|
+
} else if (p.trim()) {
|
|
3227
|
+
const f = p.split(":")[0].trim();
|
|
3228
|
+
f && !f.includes("}") && (n[f] = "");
|
|
3215
3229
|
}
|
|
3216
|
-
|
|
3230
|
+
p = "", x = "", m = !0, w++;
|
|
3217
3231
|
continue;
|
|
3218
3232
|
}
|
|
3219
|
-
|
|
3233
|
+
m ? p += l : x += l, w++;
|
|
3220
3234
|
}
|
|
3221
|
-
if (
|
|
3222
|
-
const l =
|
|
3235
|
+
if (p.trim() && x.trim()) {
|
|
3236
|
+
const l = p.trim(), f = x.trim();
|
|
3223
3237
|
try {
|
|
3224
|
-
if (
|
|
3225
|
-
else if (
|
|
3226
|
-
else if (
|
|
3227
|
-
else if (
|
|
3228
|
-
else if (/^\d+$/.test(
|
|
3229
|
-
else if (/^'.*'$/s.test(
|
|
3230
|
-
n[l] =
|
|
3231
|
-
else if (/^".*"$/s.test(
|
|
3232
|
-
n[l] =
|
|
3233
|
-
else if (/^`.*`$/s.test(
|
|
3234
|
-
const
|
|
3235
|
-
if (
|
|
3238
|
+
if (f === "true") n[l] = !0;
|
|
3239
|
+
else if (f === "false") n[l] = !1;
|
|
3240
|
+
else if (f === "[]") n[l] = [];
|
|
3241
|
+
else if (f === "{}") n[l] = {};
|
|
3242
|
+
else if (/^\d+$/.test(f)) n[l] = parseInt(f);
|
|
3243
|
+
else if (/^'.*'$/s.test(f))
|
|
3244
|
+
n[l] = f.slice(1, -1).replace(/\\'/g, "'").replace(/\\"/g, '"').replace(/\\\//g, "/");
|
|
3245
|
+
else if (/^".*"$/s.test(f))
|
|
3246
|
+
n[l] = f.slice(1, -1).replace(/\\"/g, '"').replace(/\\'/g, "'").replace(/\\\//g, "/");
|
|
3247
|
+
else if (/^`.*`$/s.test(f)) {
|
|
3248
|
+
const b = f.slice(1, -1);
|
|
3249
|
+
if (b.includes("${"))
|
|
3236
3250
|
try {
|
|
3237
3251
|
n[l] = new Function(
|
|
3238
|
-
`return \`${
|
|
3252
|
+
`return \`${b}\`;`
|
|
3239
3253
|
)();
|
|
3240
3254
|
} catch {
|
|
3241
|
-
n[l] =
|
|
3255
|
+
n[l] = b;
|
|
3242
3256
|
}
|
|
3243
3257
|
else
|
|
3244
|
-
n[l] =
|
|
3258
|
+
n[l] = b;
|
|
3245
3259
|
} else
|
|
3246
|
-
n[l] =
|
|
3260
|
+
n[l] = f;
|
|
3247
3261
|
} catch {
|
|
3248
3262
|
n[l] = "";
|
|
3249
3263
|
}
|
|
3250
|
-
} else if (
|
|
3251
|
-
const l =
|
|
3264
|
+
} else if (p.trim()) {
|
|
3265
|
+
const l = p.split(":")[0].trim();
|
|
3252
3266
|
l && !l.includes("}") && (n[l] = "");
|
|
3253
3267
|
}
|
|
3254
3268
|
}
|
|
@@ -3267,7 +3281,7 @@ function nt(e, t) {
|
|
|
3267
3281
|
onDisconnected: (o) => {
|
|
3268
3282
|
i.onDisconnected && i.onDisconnected();
|
|
3269
3283
|
},
|
|
3270
|
-
onAttributeChanged: (o, c, a,
|
|
3284
|
+
onAttributeChanged: (o, c, a, h) => {
|
|
3271
3285
|
i.onAttributeChanged && i.onAttributeChanged(o, c, a);
|
|
3272
3286
|
},
|
|
3273
3287
|
onError: (o, c) => {
|
|
@@ -3281,26 +3295,26 @@ function nt(e, t) {
|
|
|
3281
3295
|
try {
|
|
3282
3296
|
rr(o);
|
|
3283
3297
|
const a = Object.keys(n).length > 0;
|
|
3284
|
-
let
|
|
3298
|
+
let h;
|
|
3285
3299
|
if (a) {
|
|
3286
|
-
const
|
|
3287
|
-
Object.keys(n).forEach((
|
|
3288
|
-
const
|
|
3289
|
-
|
|
3290
|
-
}),
|
|
3300
|
+
const p = {};
|
|
3301
|
+
Object.keys(n).forEach((x) => {
|
|
3302
|
+
const m = o[x], d = n[x];
|
|
3303
|
+
p[x] = m != null && m !== "" ? m : d;
|
|
3304
|
+
}), h = t(p);
|
|
3291
3305
|
} else
|
|
3292
|
-
|
|
3306
|
+
h = t();
|
|
3293
3307
|
if (o._hookCallbacks) {
|
|
3294
|
-
const
|
|
3295
|
-
|
|
3308
|
+
const p = o._hookCallbacks;
|
|
3309
|
+
p.onConnected && (i.onConnected = p.onConnected), p.onDisconnected && (i.onDisconnected = p.onDisconnected), p.onAttributeChanged && (i.onAttributeChanged = p.onAttributeChanged), p.onError && (i.onError = p.onError), p.style && (o._styleCallback = p.style);
|
|
3296
3310
|
}
|
|
3297
|
-
return
|
|
3311
|
+
return h;
|
|
3298
3312
|
} finally {
|
|
3299
3313
|
nr(), F.clearCurrentComponent();
|
|
3300
3314
|
}
|
|
3301
3315
|
}
|
|
3302
3316
|
};
|
|
3303
|
-
|
|
3317
|
+
Re.set(r, s), typeof window < "u" && (customElements.get(r) || customElements.define(
|
|
3304
3318
|
r,
|
|
3305
3319
|
ir(r, s)
|
|
3306
3320
|
));
|
|
@@ -3329,7 +3343,7 @@ class sr {
|
|
|
3329
3343
|
this.map.clear();
|
|
3330
3344
|
}
|
|
3331
3345
|
}
|
|
3332
|
-
const
|
|
3346
|
+
const Ue = new sr(500);
|
|
3333
3347
|
function or(e, t) {
|
|
3334
3348
|
if (e == null) {
|
|
3335
3349
|
console.warn(
|
|
@@ -3347,11 +3361,11 @@ function me(e, t = {}, r, n) {
|
|
|
3347
3361
|
const i = n ?? t.key;
|
|
3348
3362
|
return { tag: e, key: i, props: t, children: r };
|
|
3349
3363
|
}
|
|
3350
|
-
function
|
|
3364
|
+
function Te(e) {
|
|
3351
3365
|
return !!e && typeof e == "object" && (e.type === "AnchorBlock" || e.tag === "#anchor");
|
|
3352
3366
|
}
|
|
3353
|
-
function
|
|
3354
|
-
return typeof e == "object" && e !== null && "tag" in e && !
|
|
3367
|
+
function Se(e) {
|
|
3368
|
+
return typeof e == "object" && e !== null && "tag" in e && !Te(e);
|
|
3355
3369
|
}
|
|
3356
3370
|
function ar(e, t) {
|
|
3357
3371
|
return e.key != null ? e : { ...e, key: t };
|
|
@@ -3360,98 +3374,98 @@ function cr(e, t = [], r = {}) {
|
|
|
3360
3374
|
const n = {}, i = {}, s = {}, o = [], c = /([:@#]?)([a-zA-Z0-9-:\.]+)=("([^"\\]*(\\.[^"\\]*)*)"|'([^'\\]*(\\.[^'\\]*)*)')/g;
|
|
3361
3375
|
let a;
|
|
3362
3376
|
for (; a = c.exec(e); ) {
|
|
3363
|
-
const
|
|
3364
|
-
let
|
|
3365
|
-
|
|
3366
|
-
const
|
|
3367
|
-
if (
|
|
3368
|
-
const [y,
|
|
3369
|
-
if (
|
|
3370
|
-
const
|
|
3377
|
+
const h = a[1], p = a[2], x = (a[4] || a[6]) ?? "", m = x.match(/^{{(\d+)}}$/);
|
|
3378
|
+
let d = m ? t[Number(m[1])] ?? null : x;
|
|
3379
|
+
m || (d === "true" ? d = !0 : d === "false" ? d = !1 : d === "null" ? d = null : isNaN(Number(d)) || (d = Number(d)));
|
|
3380
|
+
const u = ["model", "bind", "show", "class", "style", "ref"];
|
|
3381
|
+
if (h === ":") {
|
|
3382
|
+
const [y, w] = p.split(":"), [l, ...f] = y.split(".");
|
|
3383
|
+
if (u.includes(l)) {
|
|
3384
|
+
const b = [...f], k = l === "model" && w ? `model:${w}` : l;
|
|
3371
3385
|
s[k] = {
|
|
3372
|
-
value:
|
|
3373
|
-
modifiers:
|
|
3374
|
-
arg:
|
|
3386
|
+
value: d,
|
|
3387
|
+
modifiers: b,
|
|
3388
|
+
arg: w
|
|
3375
3389
|
};
|
|
3376
3390
|
} else {
|
|
3377
|
-
let
|
|
3378
|
-
|
|
3391
|
+
let b = d;
|
|
3392
|
+
b && ee(b) && (b = b.value), i[p] = b, o.push(p);
|
|
3379
3393
|
}
|
|
3380
|
-
} else if (
|
|
3381
|
-
const [y, ...
|
|
3382
|
-
or(
|
|
3383
|
-
const
|
|
3384
|
-
if (
|
|
3385
|
-
const
|
|
3394
|
+
} else if (h === "@") {
|
|
3395
|
+
const [y, ...w] = p.split("."), l = w;
|
|
3396
|
+
or(d, y);
|
|
3397
|
+
const f = typeof d == "function" ? d : typeof r[d] == "function" ? r[d] : void 0;
|
|
3398
|
+
if (f) {
|
|
3399
|
+
const b = (C) => {
|
|
3386
3400
|
if (l.includes("prevent") && C.preventDefault(), l.includes("stop") && C.stopPropagation(), !(l.includes("self") && C.target !== C.currentTarget))
|
|
3387
|
-
return l.includes("once") && C.currentTarget?.removeEventListener(y,
|
|
3401
|
+
return l.includes("once") && C.currentTarget?.removeEventListener(y, b), f(C);
|
|
3388
3402
|
}, k = "on" + y.charAt(0).toUpperCase() + y.slice(1);
|
|
3389
|
-
n[k] =
|
|
3403
|
+
n[k] = b;
|
|
3390
3404
|
}
|
|
3391
|
-
} else
|
|
3405
|
+
} else p === "ref" ? n.ref = d : i[p] = d;
|
|
3392
3406
|
}
|
|
3393
3407
|
return { props: n, attrs: i, directives: s, bound: o };
|
|
3394
3408
|
}
|
|
3395
3409
|
function lr(e, t, r) {
|
|
3396
3410
|
const n = be.length > 0 ? be[be.length - 1] : void 0, i = r ?? n, s = !r && t.length === 0, o = s ? e.join("<!--TEMPLATE_DELIM-->") : null;
|
|
3397
3411
|
if (s && o) {
|
|
3398
|
-
const
|
|
3399
|
-
if (
|
|
3412
|
+
const g = Ue.get(o);
|
|
3413
|
+
if (g) return g;
|
|
3400
3414
|
}
|
|
3401
|
-
function c(
|
|
3402
|
-
return me("#text", {},
|
|
3415
|
+
function c(g, $) {
|
|
3416
|
+
return me("#text", {}, g, $);
|
|
3403
3417
|
}
|
|
3404
3418
|
let a = "";
|
|
3405
|
-
for (let
|
|
3406
|
-
a += e[
|
|
3407
|
-
const
|
|
3408
|
-
let
|
|
3409
|
-
function
|
|
3410
|
-
!
|
|
3411
|
-
if ($ === "style" &&
|
|
3412
|
-
const
|
|
3419
|
+
for (let g = 0; g < e.length; g++)
|
|
3420
|
+
a += e[g], g < t.length && (a += `{{${g}}}`);
|
|
3421
|
+
const h = /<!--[\s\S]*?-->|<\/?([a-zA-Z0-9-]+)((?:\s+[^\s=>/]+(?:\s*=\s*(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|[^\s>]+))?)*)\s*\/?>|{{(\d+)}}|([^<]+)/g, p = [];
|
|
3422
|
+
let x, m = [], d = null, u = {}, y, w = 0, l = [];
|
|
3423
|
+
function f(g) {
|
|
3424
|
+
!g || typeof g != "object" || Te(g) || (g.props || g.attrs ? (g.props && (u.props || (u.props = {}), Object.assign(u.props, g.props)), g.attrs && (u.attrs || (u.attrs = {}), Object.keys(g.attrs).forEach(($) => {
|
|
3425
|
+
if ($ === "style" && u.attrs.style) {
|
|
3426
|
+
const j = u.attrs.style.replace(
|
|
3413
3427
|
/;?\s*$/,
|
|
3414
3428
|
""
|
|
3415
|
-
), v =
|
|
3416
|
-
|
|
3417
|
-
} else if ($ === "class" &&
|
|
3418
|
-
const
|
|
3419
|
-
.../* @__PURE__ */ new Set([...
|
|
3429
|
+
), v = g.attrs.style.replace(/^;?\s*/, "");
|
|
3430
|
+
u.attrs.style = j + "; " + v;
|
|
3431
|
+
} else if ($ === "class" && u.attrs.class) {
|
|
3432
|
+
const j = u.attrs.class.trim().split(/\s+/).filter(Boolean), v = g.attrs.class.trim().split(/\s+/).filter(Boolean), _ = [
|
|
3433
|
+
.../* @__PURE__ */ new Set([...j, ...v])
|
|
3420
3434
|
];
|
|
3421
|
-
|
|
3435
|
+
u.attrs.class = _.join(" ");
|
|
3422
3436
|
} else
|
|
3423
|
-
|
|
3424
|
-
}))) : (
|
|
3425
|
-
}
|
|
3426
|
-
function
|
|
3427
|
-
const
|
|
3428
|
-
if (
|
|
3429
|
-
const v =
|
|
3430
|
-
let
|
|
3431
|
-
|
|
3432
|
-
...
|
|
3437
|
+
u.attrs[$] = g.attrs[$];
|
|
3438
|
+
}))) : (u.props || (u.props = {}), Object.assign(u.props, g)));
|
|
3439
|
+
}
|
|
3440
|
+
function b(g, $) {
|
|
3441
|
+
const j = d ? m : l;
|
|
3442
|
+
if (Te(g)) {
|
|
3443
|
+
const v = g.key ?? $;
|
|
3444
|
+
let _ = g.children;
|
|
3445
|
+
j.push({
|
|
3446
|
+
...g,
|
|
3433
3447
|
key: v,
|
|
3434
|
-
children:
|
|
3448
|
+
children: _
|
|
3435
3449
|
});
|
|
3436
3450
|
return;
|
|
3437
3451
|
}
|
|
3438
|
-
if (
|
|
3439
|
-
|
|
3452
|
+
if (Se(g)) {
|
|
3453
|
+
j.push(ar(g, void 0));
|
|
3440
3454
|
return;
|
|
3441
3455
|
}
|
|
3442
|
-
if (Array.isArray(
|
|
3443
|
-
if (
|
|
3444
|
-
for (let v = 0; v <
|
|
3445
|
-
const
|
|
3446
|
-
|
|
3456
|
+
if (Array.isArray(g)) {
|
|
3457
|
+
if (g.length === 0) return;
|
|
3458
|
+
for (let v = 0; v < g.length; v++) {
|
|
3459
|
+
const _ = g[v];
|
|
3460
|
+
Te(_) || Se(_) || Array.isArray(_) ? b(_, `${$}-${v}`) : _ !== null && typeof _ == "object" ? f(_) : j.push(c(String(_), `${$}-${v}`));
|
|
3447
3461
|
}
|
|
3448
3462
|
return;
|
|
3449
3463
|
}
|
|
3450
|
-
if (
|
|
3451
|
-
|
|
3464
|
+
if (g !== null && typeof g == "object") {
|
|
3465
|
+
f(g);
|
|
3452
3466
|
return;
|
|
3453
3467
|
}
|
|
3454
|
-
|
|
3468
|
+
j.push(c(String(g), $));
|
|
3455
3469
|
}
|
|
3456
3470
|
const k = /* @__PURE__ */ new Set([
|
|
3457
3471
|
"area",
|
|
@@ -3469,20 +3483,20 @@ function lr(e, t, r) {
|
|
|
3469
3483
|
"track",
|
|
3470
3484
|
"wbr"
|
|
3471
3485
|
]);
|
|
3472
|
-
for (;
|
|
3473
|
-
if (!(
|
|
3474
|
-
if (
|
|
3475
|
-
const
|
|
3486
|
+
for (; x = h.exec(a); )
|
|
3487
|
+
if (!(x[0].startsWith("<!--") && x[0].endsWith("-->"))) {
|
|
3488
|
+
if (x[1]) {
|
|
3489
|
+
const g = x[1], $ = x[0][1] === "/", j = x[0][x[0].length - 2] === "/" || k.has(g), {
|
|
3476
3490
|
props: v,
|
|
3477
|
-
attrs:
|
|
3478
|
-
directives:
|
|
3479
|
-
bound:
|
|
3480
|
-
} = cr(
|
|
3481
|
-
for (const O in v)
|
|
3482
|
-
for (const O in
|
|
3483
|
-
if (
|
|
3491
|
+
attrs: _,
|
|
3492
|
+
directives: A,
|
|
3493
|
+
bound: D
|
|
3494
|
+
} = cr(x[2] || "", t, i), S = { props: {}, attrs: {} };
|
|
3495
|
+
for (const O in v) S.props[O] = v[O];
|
|
3496
|
+
for (const O in _) S.attrs[O] = _[O];
|
|
3497
|
+
if (S.attrs && Object.prototype.hasOwnProperty.call(S.attrs, "key") && !(S.props && Object.prototype.hasOwnProperty.call(S.props, "key")))
|
|
3484
3498
|
try {
|
|
3485
|
-
|
|
3499
|
+
S.props.key = S.attrs.key;
|
|
3486
3500
|
} catch {
|
|
3487
3501
|
}
|
|
3488
3502
|
try {
|
|
@@ -3495,108 +3509,108 @@ function lr(e, t, r) {
|
|
|
3495
3509
|
audio: ["muted", "autoplay", "controls", "loop"],
|
|
3496
3510
|
img: ["src", "alt", "width", "height"],
|
|
3497
3511
|
button: ["type", "name", "value", "disabled", "autofocus", "form"]
|
|
3498
|
-
}, H =
|
|
3499
|
-
if (
|
|
3500
|
-
for (const
|
|
3501
|
-
if (
|
|
3502
|
-
let
|
|
3503
|
-
|
|
3512
|
+
}, H = g.toLowerCase(), te = O[H] ?? [];
|
|
3513
|
+
if (S.attrs) {
|
|
3514
|
+
for (const N of te)
|
|
3515
|
+
if (D && D.includes(N) && N in S.attrs && !(S.props && N in S.props)) {
|
|
3516
|
+
let W = S.attrs[N];
|
|
3517
|
+
W && ee(W) && (W = W.value), S.props[N] = W, delete S.attrs[N];
|
|
3504
3518
|
}
|
|
3505
3519
|
}
|
|
3506
|
-
if ((
|
|
3507
|
-
const
|
|
3508
|
-
for (const
|
|
3509
|
-
if (
|
|
3510
|
-
const V =
|
|
3511
|
-
let
|
|
3512
|
-
|
|
3520
|
+
if ((g.includes("-") || !!i?.__customElements?.has?.(g)) && (S.isCustomElement = !0, D && S.attrs)) {
|
|
3521
|
+
const N = /* @__PURE__ */ new Set(["id", "name", "data-key", "key"]);
|
|
3522
|
+
for (const W of D)
|
|
3523
|
+
if (W in S.attrs && !(S.props && W in S.props)) {
|
|
3524
|
+
const V = W.includes("-") ? W.split("-").map((G, I) => I === 0 ? G : G.charAt(0).toUpperCase() + G.slice(1)).join("") : W;
|
|
3525
|
+
let K = S.attrs[W];
|
|
3526
|
+
K && ee(K) && (K = K.value), S.props[V] = K, N.has(W) || delete S.attrs[W];
|
|
3513
3527
|
}
|
|
3514
3528
|
}
|
|
3515
3529
|
} catch {
|
|
3516
3530
|
}
|
|
3517
|
-
if (
|
|
3531
|
+
if (A && Object.keys(A).some((O) => O === "model" || O.startsWith("model:")))
|
|
3518
3532
|
try {
|
|
3519
|
-
const O = Symbol.for("cer.registry"), H = globalThis[O],
|
|
3520
|
-
if (!!(
|
|
3521
|
-
for (const V of Object.keys(
|
|
3533
|
+
const O = Symbol.for("cer.registry"), H = globalThis[O], te = !!(H && typeof H.has == "function" && H.has(g)), $e = !!(i && (i.__customElements instanceof Set && i.__customElements.has(g) || Array.isArray(i.__isCustomElements) && i.__isCustomElements.includes(g)));
|
|
3534
|
+
if (!!(g.includes("-") || $e || te))
|
|
3535
|
+
for (const V of Object.keys(A)) {
|
|
3522
3536
|
if (V !== "model" && !V.startsWith("model:")) continue;
|
|
3523
|
-
const
|
|
3524
|
-
let
|
|
3525
|
-
typeof
|
|
3537
|
+
const K = A[V], G = K.arg ?? (V.includes(":") ? V.split(":", 2)[1] : void 0), I = K.value, X = G ?? "modelValue", re = U, E = Ae, T = i ? i._state || i : void 0;
|
|
3538
|
+
let R;
|
|
3539
|
+
typeof I == "string" && i ? R = re(T, I) : (R = I, R && ee(R) && (R = R.value)), S.props[X] = R;
|
|
3526
3540
|
try {
|
|
3527
|
-
const
|
|
3528
|
-
|
|
3541
|
+
const se = ie(X);
|
|
3542
|
+
S.attrs || (S.attrs = {}), R !== void 0 && (S.attrs[se] = R);
|
|
3529
3543
|
} catch {
|
|
3530
3544
|
}
|
|
3531
|
-
|
|
3532
|
-
const
|
|
3533
|
-
|
|
3534
|
-
const Q =
|
|
3535
|
-
if (
|
|
3536
|
-
if (
|
|
3537
|
-
const
|
|
3538
|
-
(Array.isArray(Q) && Array.isArray(
|
|
3545
|
+
S.isCustomElement = !0;
|
|
3546
|
+
const L = `update:${ie(X)}`.replace(/-([a-z])/g, (se, Q) => Q.toUpperCase()), z = "on" + L.charAt(0).toUpperCase() + L.slice(1);
|
|
3547
|
+
S.props[z] = function(se) {
|
|
3548
|
+
const Q = se.detail !== void 0 ? se.detail : se.target ? se.target.value : void 0;
|
|
3549
|
+
if (T)
|
|
3550
|
+
if (I && ee(I)) {
|
|
3551
|
+
const ce = I.value;
|
|
3552
|
+
(Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (I.value = Q, i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
|
|
3539
3553
|
} else {
|
|
3540
|
-
const
|
|
3541
|
-
(Array.isArray(Q) && Array.isArray(
|
|
3554
|
+
const ce = re(T, typeof I == "string" ? I : String(I));
|
|
3555
|
+
(Array.isArray(Q) && Array.isArray(ce) ? JSON.stringify([...Q].sort()) !== JSON.stringify([...ce].sort()) : Q !== ce) && (E(T, typeof I == "string" ? I : String(I), Q), i?.requestRender ? i.requestRender() : i?._requestRender && i._requestRender());
|
|
3542
3556
|
}
|
|
3543
|
-
}, delete
|
|
3557
|
+
}, delete A[V];
|
|
3544
3558
|
}
|
|
3545
3559
|
} catch {
|
|
3546
3560
|
}
|
|
3547
|
-
if (Object.keys(
|
|
3561
|
+
if (Object.keys(A).length > 0 && (S.directives = { ...A }), $) {
|
|
3548
3562
|
const O = me(
|
|
3563
|
+
d,
|
|
3549
3564
|
u,
|
|
3550
|
-
|
|
3551
|
-
g.length === 1 && Ee(g[0]) && g[0].tag === "#text" ? typeof g[0].children == "string" ? g[0].children : "" : g.length ? g : void 0,
|
|
3565
|
+
m.length === 1 && Se(m[0]) && m[0].tag === "#text" ? typeof m[0].children == "string" ? m[0].children : "" : m.length ? m : void 0,
|
|
3552
3566
|
y
|
|
3553
|
-
), H =
|
|
3554
|
-
H ? (
|
|
3555
|
-
} else
|
|
3556
|
-
tag:
|
|
3557
|
-
props:
|
|
3558
|
-
children:
|
|
3567
|
+
), H = p.pop();
|
|
3568
|
+
H ? (d = H.tag, u = H.props, y = H.key, m = H.children, m.push(O)) : (l.push(O), d = null, u = {}, y = void 0, m = []);
|
|
3569
|
+
} else j ? d ? m.push(me(g, S, void 0, void 0)) : l.push(me(g, S, void 0, void 0)) : (d && p.push({
|
|
3570
|
+
tag: d,
|
|
3571
|
+
props: u,
|
|
3572
|
+
children: m,
|
|
3559
3573
|
key: y
|
|
3560
|
-
}),
|
|
3561
|
-
} else if (typeof
|
|
3562
|
-
const
|
|
3563
|
-
|
|
3564
|
-
} else if (
|
|
3565
|
-
const
|
|
3566
|
-
for (const v of
|
|
3574
|
+
}), d = g, u = S, m = []);
|
|
3575
|
+
} else if (typeof x[3] < "u") {
|
|
3576
|
+
const g = Number(x[3]), $ = t[g], j = `interp-${g}`;
|
|
3577
|
+
b($, j);
|
|
3578
|
+
} else if (x[4]) {
|
|
3579
|
+
const g = x[4], $ = d ? m : l, j = g.split(/({{\d+}})/);
|
|
3580
|
+
for (const v of j) {
|
|
3567
3581
|
if (!v) continue;
|
|
3568
|
-
const
|
|
3569
|
-
if (
|
|
3570
|
-
const
|
|
3571
|
-
|
|
3582
|
+
const _ = v.match(/^{{(\d+)}}$/);
|
|
3583
|
+
if (_) {
|
|
3584
|
+
const A = Number(_[1]), D = t[A], S = `interp-${A}`;
|
|
3585
|
+
b(D, S);
|
|
3572
3586
|
} else {
|
|
3573
|
-
const
|
|
3574
|
-
$.push(c(v,
|
|
3587
|
+
const A = `text-${w++}`;
|
|
3588
|
+
$.push(c(v, A));
|
|
3575
3589
|
}
|
|
3576
3590
|
}
|
|
3577
3591
|
}
|
|
3578
3592
|
}
|
|
3579
|
-
const C = l.filter((
|
|
3593
|
+
const C = l.filter((g) => Se(g) && g.tag === "#text" ? typeof g.children == "string" && g.children.trim() !== "" : !0);
|
|
3580
3594
|
if (C.length === 1) {
|
|
3581
|
-
const
|
|
3582
|
-
return s && o &&
|
|
3595
|
+
const g = C[0];
|
|
3596
|
+
return s && o && Ue.set(o, g), g;
|
|
3583
3597
|
} else if (C.length > 1) {
|
|
3584
|
-
const
|
|
3585
|
-
return s && o &&
|
|
3598
|
+
const g = C;
|
|
3599
|
+
return s && o && Ue.set(o, g), g;
|
|
3586
3600
|
}
|
|
3587
3601
|
return me("div", {}, "", "fallback-root");
|
|
3588
3602
|
}
|
|
3589
|
-
function
|
|
3603
|
+
function le(e, ...t) {
|
|
3590
3604
|
const r = t[t.length - 1], n = typeof r == "object" && r && !Array.isArray(r) ? r : void 0;
|
|
3591
3605
|
return lr(e, t, n);
|
|
3592
3606
|
}
|
|
3593
|
-
function
|
|
3594
|
-
return
|
|
3607
|
+
function Le(e, t) {
|
|
3608
|
+
return P(e ? t : [], "when-block");
|
|
3595
3609
|
}
|
|
3596
3610
|
function Cr(e, t) {
|
|
3597
3611
|
return e.map((r, n) => {
|
|
3598
3612
|
const i = typeof r == "object" ? r?.key ?? r?.id ?? `idx-${n}` : String(r);
|
|
3599
|
-
return
|
|
3613
|
+
return P(t(r, n), `each-${i}`);
|
|
3600
3614
|
});
|
|
3601
3615
|
}
|
|
3602
3616
|
function ur() {
|
|
@@ -3616,11 +3630,11 @@ function ur() {
|
|
|
3616
3630
|
function fr(...e) {
|
|
3617
3631
|
for (let t = 0; t < e.length; t++) {
|
|
3618
3632
|
const [r, n] = e[t];
|
|
3619
|
-
if (r) return [
|
|
3633
|
+
if (r) return [P(n, `whenChain-branch-${t}`)];
|
|
3620
3634
|
}
|
|
3621
|
-
return [
|
|
3635
|
+
return [P([], "whenChain-empty")];
|
|
3622
3636
|
}
|
|
3623
|
-
function
|
|
3637
|
+
function P(e, t) {
|
|
3624
3638
|
const r = e ? Array.isArray(e) ? e.filter(Boolean) : [e].filter(Boolean) : [];
|
|
3625
3639
|
return {
|
|
3626
3640
|
tag: "#anchor",
|
|
@@ -3629,15 +3643,15 @@ function W(e, t) {
|
|
|
3629
3643
|
};
|
|
3630
3644
|
}
|
|
3631
3645
|
function _r(e, t) {
|
|
3632
|
-
return
|
|
3646
|
+
return Le(!e, t);
|
|
3633
3647
|
}
|
|
3634
3648
|
function Er(e, t) {
|
|
3635
3649
|
const r = !e || e.length === 0;
|
|
3636
|
-
return
|
|
3650
|
+
return Le(r, t);
|
|
3637
3651
|
}
|
|
3638
3652
|
function Sr(e, t) {
|
|
3639
3653
|
const r = !!(e && e.length > 0);
|
|
3640
|
-
return
|
|
3654
|
+
return Le(r, t);
|
|
3641
3655
|
}
|
|
3642
3656
|
function Ar(e, t, r) {
|
|
3643
3657
|
const n = [];
|
|
@@ -3645,19 +3659,19 @@ function Ar(e, t, r) {
|
|
|
3645
3659
|
t(i, s) && n.push({ item: i, originalIndex: s });
|
|
3646
3660
|
}), n.map(({ item: i, originalIndex: s }, o) => {
|
|
3647
3661
|
const c = typeof i == "object" && i != null ? i?.key ?? i?.id ?? `filtered-${s}` : `filtered-${s}`;
|
|
3648
|
-
return
|
|
3662
|
+
return P(r(i, s, o), `each-where-${c}`);
|
|
3649
3663
|
});
|
|
3650
3664
|
}
|
|
3651
3665
|
function jr(e, t) {
|
|
3652
3666
|
const r = e?.length ?? 0;
|
|
3653
|
-
return r === 0 && t.empty ?
|
|
3667
|
+
return r === 0 && t.empty ? P(t.empty, "switch-length-empty") : r === 1 && t.one ? P(t.one(e[0]), "switch-length-one") : t.exactly?.[r] ? P(t.exactly[r](e), `switch-length-${r}`) : r > 1 && t.many ? P(t.many(e), "switch-length-many") : P([], "switch-length-fallback");
|
|
3654
3668
|
}
|
|
3655
3669
|
function Or(e, t, r) {
|
|
3656
3670
|
const n = /* @__PURE__ */ new Map();
|
|
3657
3671
|
return e.forEach((i) => {
|
|
3658
3672
|
const s = t(i);
|
|
3659
3673
|
n.has(s) || n.set(s, []), n.get(s).push(i);
|
|
3660
|
-
}), Array.from(n.entries()).map(([i, s], o) =>
|
|
3674
|
+
}), Array.from(n.entries()).map(([i, s], o) => P(
|
|
3661
3675
|
r(i, s, o),
|
|
3662
3676
|
`each-group-${i}`
|
|
3663
3677
|
));
|
|
@@ -3665,18 +3679,18 @@ function Or(e, t, r) {
|
|
|
3665
3679
|
function Tr(e, t, r, n) {
|
|
3666
3680
|
const i = r * t, s = Math.min(i + t, e.length);
|
|
3667
3681
|
return e.slice(i, s).map((c, a) => {
|
|
3668
|
-
const
|
|
3669
|
-
return
|
|
3682
|
+
const h = i + a, p = typeof c == "object" && c != null ? c?.key ?? c?.id ?? `page-${h}` : `page-${h}`;
|
|
3683
|
+
return P(n(c, h, a), `each-page-${p}`);
|
|
3670
3684
|
});
|
|
3671
3685
|
}
|
|
3672
3686
|
function Rr(e, t) {
|
|
3673
|
-
return e.loading && t.loading ?
|
|
3687
|
+
return e.loading && t.loading ? P(t.loading, "promise-loading") : e.error && t.error ? P(t.error(e.error), "promise-error") : e.data !== void 0 && t.success ? P(t.success(e.data), "promise-success") : t.idle ? P(t.idle, "promise-idle") : P([], "promise-fallback");
|
|
3674
3688
|
}
|
|
3675
3689
|
function q(e, t) {
|
|
3676
3690
|
const r = typeof window < "u" && window.matchMedia?.(e)?.matches;
|
|
3677
|
-
return
|
|
3691
|
+
return Le(!!r, t);
|
|
3678
3692
|
}
|
|
3679
|
-
const
|
|
3693
|
+
const ne = {
|
|
3680
3694
|
// Responsive breakpoints (matching style.ts)
|
|
3681
3695
|
sm: "(min-width:640px)",
|
|
3682
3696
|
md: "(min-width:768px)",
|
|
@@ -3685,15 +3699,15 @@ const te = {
|
|
|
3685
3699
|
"2xl": "(min-width:1536px)",
|
|
3686
3700
|
// Dark mode (matching style.ts)
|
|
3687
3701
|
dark: "(prefers-color-scheme: dark)"
|
|
3688
|
-
},
|
|
3702
|
+
}, gt = ["sm", "md", "lg", "xl", "2xl"], dr = {
|
|
3689
3703
|
// Breakpoint-based rendering (matching style.ts exactly)
|
|
3690
|
-
sm: (e) => q(
|
|
3691
|
-
md: (e) => q(
|
|
3692
|
-
lg: (e) => q(
|
|
3693
|
-
xl: (e) => q(
|
|
3694
|
-
"2xl": (e) => q(
|
|
3704
|
+
sm: (e) => q(ne.sm, e),
|
|
3705
|
+
md: (e) => q(ne.md, e),
|
|
3706
|
+
lg: (e) => q(ne.lg, e),
|
|
3707
|
+
xl: (e) => q(ne.xl, e),
|
|
3708
|
+
"2xl": (e) => q(ne["2xl"], e),
|
|
3695
3709
|
// Dark mode (matching style.ts)
|
|
3696
|
-
dark: (e) => q(
|
|
3710
|
+
dark: (e) => q(ne.dark, e),
|
|
3697
3711
|
light: (e) => q("(prefers-color-scheme: light)", e),
|
|
3698
3712
|
// Accessibility and interaction preferences
|
|
3699
3713
|
touch: (e) => q("(hover: none) and (pointer: coarse)", e),
|
|
@@ -3706,17 +3720,17 @@ const te = {
|
|
|
3706
3720
|
};
|
|
3707
3721
|
function Lr(e, t) {
|
|
3708
3722
|
const r = [];
|
|
3709
|
-
e.includes("dark") ? r.push(
|
|
3723
|
+
e.includes("dark") ? r.push(ne.dark) : e.includes("light") && r.push("(prefers-color-scheme: light)");
|
|
3710
3724
|
const n = e.filter(
|
|
3711
|
-
(o) =>
|
|
3725
|
+
(o) => gt.includes(o)
|
|
3712
3726
|
), i = n[n.length - 1];
|
|
3713
|
-
i && i in
|
|
3727
|
+
i && i in ne && r.push(ne[i]);
|
|
3714
3728
|
const s = r.length > 0 ? r.join(" and ") : "all";
|
|
3715
3729
|
return q(s, t);
|
|
3716
3730
|
}
|
|
3717
3731
|
function Pr(e) {
|
|
3718
3732
|
const t = [];
|
|
3719
|
-
return e.base && t.push(
|
|
3733
|
+
return e.base && t.push(P(e.base, "responsive-base")), gt.forEach((r) => {
|
|
3720
3734
|
const n = e[r];
|
|
3721
3735
|
n && t.push(dr[r](n));
|
|
3722
3736
|
}), t;
|
|
@@ -3739,13 +3753,13 @@ function Mr(e) {
|
|
|
3739
3753
|
for (let n = 0; n < t.length; n++) {
|
|
3740
3754
|
const { condition: i, content: s } = t[n];
|
|
3741
3755
|
if (i(e))
|
|
3742
|
-
return
|
|
3756
|
+
return P(s, `switch-case-${n}`);
|
|
3743
3757
|
}
|
|
3744
|
-
return
|
|
3758
|
+
return P(r || [], "switch-otherwise");
|
|
3745
3759
|
}
|
|
3746
3760
|
};
|
|
3747
3761
|
}
|
|
3748
|
-
class
|
|
3762
|
+
class pe extends EventTarget {
|
|
3749
3763
|
handlers = {};
|
|
3750
3764
|
static instance;
|
|
3751
3765
|
eventCounters = /* @__PURE__ */ new Map();
|
|
@@ -3753,7 +3767,7 @@ class de extends EventTarget {
|
|
|
3753
3767
|
* Returns the singleton instance of GlobalEventBus
|
|
3754
3768
|
*/
|
|
3755
3769
|
static getInstance() {
|
|
3756
|
-
return
|
|
3770
|
+
return pe.instance || (pe.instance = new pe()), pe.instance;
|
|
3757
3771
|
}
|
|
3758
3772
|
/**
|
|
3759
3773
|
* Emit a global event with optional data. Includes event storm protection.
|
|
@@ -3777,7 +3791,7 @@ class de extends EventTarget {
|
|
|
3777
3791
|
try {
|
|
3778
3792
|
o(r);
|
|
3779
3793
|
} catch (c) {
|
|
3780
|
-
|
|
3794
|
+
oe(`Error in global event handler for "${t}":`, c);
|
|
3781
3795
|
}
|
|
3782
3796
|
});
|
|
3783
3797
|
}
|
|
@@ -3866,8 +3880,8 @@ class de extends EventTarget {
|
|
|
3866
3880
|
this.eventCounters.clear();
|
|
3867
3881
|
}
|
|
3868
3882
|
}
|
|
3869
|
-
const ve =
|
|
3870
|
-
function
|
|
3883
|
+
const ve = pe.getInstance(), Wr = (e, t) => ve.emit(e, t), Dr = (e, t) => ve.on(e, t), Ir = (e, t) => ve.off(e, t), Nr = (e, t) => ve.once(e, t), Hr = (e, t, r) => ve.listen(e, t, r);
|
|
3884
|
+
function ot(e) {
|
|
3871
3885
|
let t = { ...e };
|
|
3872
3886
|
const r = [];
|
|
3873
3887
|
function n(c) {
|
|
@@ -3885,264 +3899,264 @@ function it(e) {
|
|
|
3885
3899
|
}
|
|
3886
3900
|
return { subscribe: n, getState: i, setState: s };
|
|
3887
3901
|
}
|
|
3888
|
-
const
|
|
3902
|
+
const at = (e) => e ? typeof URLSearchParams > "u" ? {} : Object.fromEntries(new URLSearchParams(e)) : {}, Y = (e, t) => {
|
|
3889
3903
|
for (const r of e) {
|
|
3890
3904
|
const n = [], i = r.path.replace(/:[^/]+/g, (c) => (n.push(c.slice(1)), "([^/]+)")), s = new RegExp(`^${i}$`), o = t.match(s);
|
|
3891
3905
|
if (o) {
|
|
3892
3906
|
const c = {};
|
|
3893
|
-
return n.forEach((a,
|
|
3894
|
-
c[a] = o[
|
|
3907
|
+
return n.forEach((a, h) => {
|
|
3908
|
+
c[a] = o[h + 1];
|
|
3895
3909
|
}), { route: r, params: c };
|
|
3896
3910
|
}
|
|
3897
3911
|
}
|
|
3898
3912
|
return { route: null, params: {} };
|
|
3899
|
-
},
|
|
3900
|
-
async function
|
|
3913
|
+
}, qe = {};
|
|
3914
|
+
async function pr(e) {
|
|
3901
3915
|
if (e.component) return e.component;
|
|
3902
3916
|
if (e.load) {
|
|
3903
|
-
if (
|
|
3917
|
+
if (qe[e.path]) return qe[e.path];
|
|
3904
3918
|
try {
|
|
3905
3919
|
const t = await e.load();
|
|
3906
|
-
return
|
|
3920
|
+
return qe[e.path] = t.default, t.default;
|
|
3907
3921
|
} catch {
|
|
3908
3922
|
throw new Error(`Failed to load component for route: ${e.path}`);
|
|
3909
3923
|
}
|
|
3910
3924
|
}
|
|
3911
3925
|
throw new Error(`No component or loader defined for route: ${e.path}`);
|
|
3912
3926
|
}
|
|
3913
|
-
function
|
|
3927
|
+
function hr(e) {
|
|
3914
3928
|
const { routes: t, base: r = "", initialUrl: n } = e;
|
|
3915
|
-
let i, s, o, c, a,
|
|
3916
|
-
const
|
|
3917
|
-
const l = t.find((
|
|
3929
|
+
let i, s, o, c, a, h, p;
|
|
3930
|
+
const x = async (y, w) => {
|
|
3931
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3918
3932
|
if (l?.beforeEnter)
|
|
3919
3933
|
try {
|
|
3920
|
-
const
|
|
3921
|
-
return typeof
|
|
3922
|
-
} catch (
|
|
3923
|
-
return
|
|
3934
|
+
const f = await l.beforeEnter(y, w);
|
|
3935
|
+
return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
|
|
3936
|
+
} catch (f) {
|
|
3937
|
+
return oe("beforeEnter error", f), !1;
|
|
3924
3938
|
}
|
|
3925
3939
|
return !0;
|
|
3926
|
-
},
|
|
3927
|
-
const l = t.find((
|
|
3940
|
+
}, m = async (y, w) => {
|
|
3941
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3928
3942
|
if (l?.onEnter)
|
|
3929
3943
|
try {
|
|
3930
|
-
const
|
|
3931
|
-
return typeof
|
|
3932
|
-
} catch (
|
|
3933
|
-
return
|
|
3944
|
+
const f = await l.onEnter(y, w);
|
|
3945
|
+
return typeof f == "string" ? (await u(f, !0), !1) : f !== !1;
|
|
3946
|
+
} catch (f) {
|
|
3947
|
+
return oe("onEnter error", f), !1;
|
|
3934
3948
|
}
|
|
3935
3949
|
return !0;
|
|
3936
|
-
},
|
|
3937
|
-
const l = t.find((
|
|
3950
|
+
}, d = (y, w) => {
|
|
3951
|
+
const l = t.find((f) => Y([f], y.path).route !== null);
|
|
3938
3952
|
if (l?.afterEnter)
|
|
3939
3953
|
try {
|
|
3940
|
-
l.afterEnter(y,
|
|
3941
|
-
} catch (
|
|
3942
|
-
|
|
3954
|
+
l.afterEnter(y, w);
|
|
3955
|
+
} catch (f) {
|
|
3956
|
+
oe("afterEnter error", f);
|
|
3943
3957
|
}
|
|
3944
|
-
},
|
|
3958
|
+
}, u = async (y, w = !1) => {
|
|
3945
3959
|
try {
|
|
3946
3960
|
const l = {
|
|
3947
3961
|
path: y.replace(r, "") || "/",
|
|
3948
3962
|
query: {}
|
|
3949
|
-
},
|
|
3950
|
-
if (!
|
|
3951
|
-
const
|
|
3963
|
+
}, f = Y(t, l.path);
|
|
3964
|
+
if (!f) throw new Error(`No route found for ${l.path}`);
|
|
3965
|
+
const b = o.getState(), k = {
|
|
3952
3966
|
path: l.path,
|
|
3953
|
-
params:
|
|
3967
|
+
params: f.params,
|
|
3954
3968
|
query: l.query
|
|
3955
3969
|
};
|
|
3956
|
-
if (!await
|
|
3957
|
-
typeof window < "u" && typeof document < "u" && (
|
|
3970
|
+
if (!await x(k, b) || !await m(k, b)) return;
|
|
3971
|
+
typeof window < "u" && typeof document < "u" && (w ? window.history.replaceState({}, "", r + y) : window.history.pushState({}, "", r + y)), o.setState(k), d(k, b);
|
|
3958
3972
|
} catch (l) {
|
|
3959
|
-
|
|
3973
|
+
oe("Navigation error:", l);
|
|
3960
3974
|
}
|
|
3961
3975
|
};
|
|
3962
3976
|
if (typeof window < "u" && typeof document < "u" && typeof n > "u") {
|
|
3963
3977
|
i = () => {
|
|
3964
|
-
const
|
|
3965
|
-
return { path: l, query:
|
|
3978
|
+
const w = new URL(window.location.href), l = w.pathname.replace(r, "") || "/", f = at(w.search);
|
|
3979
|
+
return { path: l, query: f };
|
|
3966
3980
|
}, s = i();
|
|
3967
3981
|
const y = Y(t, s.path);
|
|
3968
|
-
o =
|
|
3982
|
+
o = ot({
|
|
3969
3983
|
path: s.path,
|
|
3970
3984
|
params: y.params,
|
|
3971
3985
|
query: s.query
|
|
3972
|
-
}), c = async (
|
|
3986
|
+
}), c = async (w = !1) => {
|
|
3973
3987
|
const l = i();
|
|
3974
|
-
await
|
|
3975
|
-
}, window.addEventListener("popstate", () => c(!0)), a = (
|
|
3988
|
+
await u(l.path, w);
|
|
3989
|
+
}, window.addEventListener("popstate", () => c(!0)), a = (w) => u(w, !1), h = (w) => u(w, !0), p = () => window.history.back();
|
|
3976
3990
|
} else {
|
|
3977
3991
|
i = () => {
|
|
3978
|
-
const l = new URL(n || "/", "http://localhost"),
|
|
3979
|
-
return { path:
|
|
3992
|
+
const l = new URL(n || "/", "http://localhost"), f = l.pathname.replace(r, "") || "/", b = at(l.search);
|
|
3993
|
+
return { path: f, query: b };
|
|
3980
3994
|
}, s = i();
|
|
3981
3995
|
const y = Y(t, s.path);
|
|
3982
|
-
o =
|
|
3996
|
+
o = ot({
|
|
3983
3997
|
path: s.path,
|
|
3984
3998
|
params: y.params,
|
|
3985
3999
|
query: s.query
|
|
3986
4000
|
}), c = async () => {
|
|
3987
4001
|
const l = i();
|
|
3988
|
-
await
|
|
4002
|
+
await w(l.path);
|
|
3989
4003
|
};
|
|
3990
|
-
const
|
|
4004
|
+
const w = async (l) => {
|
|
3991
4005
|
try {
|
|
3992
|
-
const
|
|
4006
|
+
const f = {
|
|
3993
4007
|
path: l.replace(r, "") || "/",
|
|
3994
4008
|
query: {}
|
|
3995
|
-
},
|
|
3996
|
-
if (!
|
|
4009
|
+
}, b = Y(t, f.path);
|
|
4010
|
+
if (!b) throw new Error(`No route found for ${f.path}`);
|
|
3997
4011
|
const k = o.getState(), C = {
|
|
3998
|
-
path:
|
|
3999
|
-
params:
|
|
4000
|
-
query:
|
|
4001
|
-
},
|
|
4002
|
-
if (
|
|
4012
|
+
path: f.path,
|
|
4013
|
+
params: b.params,
|
|
4014
|
+
query: f.query
|
|
4015
|
+
}, g = t.find(($) => Y([$], C.path).route !== null);
|
|
4016
|
+
if (g?.beforeEnter)
|
|
4003
4017
|
try {
|
|
4004
|
-
const $ = await
|
|
4018
|
+
const $ = await g.beforeEnter(C, k);
|
|
4005
4019
|
if (typeof $ == "string") {
|
|
4006
|
-
await
|
|
4020
|
+
await w($);
|
|
4007
4021
|
return;
|
|
4008
4022
|
}
|
|
4009
4023
|
if ($ === !1) return;
|
|
4010
4024
|
} catch {
|
|
4011
4025
|
return;
|
|
4012
4026
|
}
|
|
4013
|
-
if (
|
|
4027
|
+
if (g?.onEnter)
|
|
4014
4028
|
try {
|
|
4015
|
-
const $ = await
|
|
4029
|
+
const $ = await g.onEnter(C, k);
|
|
4016
4030
|
if (typeof $ == "string") {
|
|
4017
|
-
await
|
|
4031
|
+
await w($);
|
|
4018
4032
|
return;
|
|
4019
4033
|
}
|
|
4020
4034
|
if ($ === !1) return;
|
|
4021
4035
|
} catch {
|
|
4022
4036
|
return;
|
|
4023
4037
|
}
|
|
4024
|
-
if (o.setState(C),
|
|
4038
|
+
if (o.setState(C), g?.afterEnter)
|
|
4025
4039
|
try {
|
|
4026
|
-
|
|
4040
|
+
g.afterEnter(C, k);
|
|
4027
4041
|
} catch {
|
|
4028
4042
|
}
|
|
4029
4043
|
} catch {
|
|
4030
4044
|
}
|
|
4031
4045
|
};
|
|
4032
|
-
a = async (l) =>
|
|
4046
|
+
a = async (l) => w(l), h = async (l) => w(l), p = () => {
|
|
4033
4047
|
};
|
|
4034
4048
|
}
|
|
4035
4049
|
return {
|
|
4036
4050
|
store: o,
|
|
4037
4051
|
push: a,
|
|
4038
|
-
replace:
|
|
4039
|
-
back:
|
|
4052
|
+
replace: h,
|
|
4053
|
+
back: p,
|
|
4040
4054
|
subscribe: o.subscribe,
|
|
4041
4055
|
matchRoute: (y) => Y(t, y),
|
|
4042
4056
|
getCurrent: () => o.getState(),
|
|
4043
|
-
resolveRouteComponent:
|
|
4057
|
+
resolveRouteComponent: pr
|
|
4044
4058
|
};
|
|
4045
4059
|
}
|
|
4046
|
-
function
|
|
4060
|
+
function Br(e, t) {
|
|
4047
4061
|
return Y(e, t);
|
|
4048
4062
|
}
|
|
4049
|
-
function
|
|
4050
|
-
const t =
|
|
4051
|
-
return
|
|
4063
|
+
function zr(e) {
|
|
4064
|
+
const t = hr(e);
|
|
4065
|
+
return st("router-view", (r = {}, n = {}) => {
|
|
4052
4066
|
const { onConnected: i } = n;
|
|
4053
4067
|
if (i && i(() => {
|
|
4054
4068
|
t && typeof t.subscribe == "function" && t.subscribe(() => {
|
|
4055
4069
|
});
|
|
4056
|
-
}), !t) return
|
|
4070
|
+
}), !t) return le`<div>Router not initialized.</div>`;
|
|
4057
4071
|
const s = t.getCurrent(), { path: o } = s, c = t.matchRoute(o);
|
|
4058
4072
|
return c.route ? t.resolveRouteComponent(c.route).then((a) => {
|
|
4059
4073
|
if (typeof a == "string")
|
|
4060
4074
|
return { tag: a, props: {}, children: [] };
|
|
4061
4075
|
if (typeof a == "function") {
|
|
4062
|
-
const
|
|
4063
|
-
return (
|
|
4076
|
+
const h = a();
|
|
4077
|
+
return (h instanceof Promise ? h : Promise.resolve(h)).then((x) => typeof x == "string" ? { tag: x, props: {}, children: [] } : x);
|
|
4064
4078
|
}
|
|
4065
|
-
return
|
|
4066
|
-
}).catch(() =>
|
|
4067
|
-
}),
|
|
4079
|
+
return le`<div>Invalid route component</div>`;
|
|
4080
|
+
}).catch(() => le`<div>Invalid route component</div>`) : le`<div>Not found</div>`;
|
|
4081
|
+
}), st("router-link", (r = {}, n = {}) => {
|
|
4068
4082
|
const {
|
|
4069
4083
|
to: i = "",
|
|
4070
4084
|
tag: s = "a",
|
|
4071
4085
|
replace: o = !1,
|
|
4072
4086
|
exact: c = !1,
|
|
4073
4087
|
activeClass: a = "active",
|
|
4074
|
-
exactActiveClass:
|
|
4075
|
-
ariaCurrentValue:
|
|
4076
|
-
disabled:
|
|
4077
|
-
external:
|
|
4078
|
-
class:
|
|
4079
|
-
} = r,
|
|
4080
|
-
for (const v of
|
|
4088
|
+
exactActiveClass: h = "exact-active",
|
|
4089
|
+
ariaCurrentValue: p = "page",
|
|
4090
|
+
disabled: x = !1,
|
|
4091
|
+
external: m = !1,
|
|
4092
|
+
class: d = ""
|
|
4093
|
+
} = r, u = t.getCurrent(), y = u.path === i, w = c ? y : u && typeof u.path == "string" ? u.path.startsWith(i) : !1, l = y ? `aria-current="${p}"` : "", f = (d || "").split(/\s+/).filter(Boolean), b = {};
|
|
4094
|
+
for (const v of f) b[v] = !0;
|
|
4081
4095
|
const k = {
|
|
4082
|
-
...
|
|
4096
|
+
...b,
|
|
4083
4097
|
// Also include the configurable names (may duplicate the above)
|
|
4084
|
-
[a]:
|
|
4085
|
-
[
|
|
4086
|
-
}, C = s === "button",
|
|
4087
|
-
if (
|
|
4098
|
+
[a]: w,
|
|
4099
|
+
[h]: y
|
|
4100
|
+
}, C = s === "button", g = x ? C ? 'disabled aria-disabled="true" tabindex="-1"' : 'aria-disabled="true" tabindex="-1"' : "", $ = m && (s === "a" || !s) ? 'target="_blank" rel="noopener noreferrer"' : "", j = (v) => {
|
|
4101
|
+
if (x) {
|
|
4088
4102
|
v.preventDefault();
|
|
4089
4103
|
return;
|
|
4090
4104
|
}
|
|
4091
|
-
|
|
4105
|
+
m && (s === "a" || !s) || (v.preventDefault(), o ? t.replace(i) : t.push(i));
|
|
4092
4106
|
};
|
|
4093
|
-
return
|
|
4094
|
-
${ur().when(C,
|
|
4107
|
+
return le`
|
|
4108
|
+
${ur().when(C, le`
|
|
4095
4109
|
<button
|
|
4096
4110
|
part="button"
|
|
4097
4111
|
:class="${k}"
|
|
4098
4112
|
${l}
|
|
4099
|
-
${
|
|
4113
|
+
${g}
|
|
4100
4114
|
${$}
|
|
4101
|
-
@click="${
|
|
4115
|
+
@click="${j}"
|
|
4102
4116
|
><slot></slot></button>
|
|
4103
|
-
`).otherwise(
|
|
4117
|
+
`).otherwise(le`
|
|
4104
4118
|
<a
|
|
4105
4119
|
part="link"
|
|
4106
4120
|
href="${i}"
|
|
4107
4121
|
:class="${k}"
|
|
4108
4122
|
${l}
|
|
4109
|
-
${
|
|
4123
|
+
${g}
|
|
4110
4124
|
${$}
|
|
4111
|
-
@click="${
|
|
4125
|
+
@click="${j}"
|
|
4112
4126
|
><slot></slot></a>
|
|
4113
4127
|
`).done()}
|
|
4114
4128
|
`;
|
|
4115
4129
|
}), t;
|
|
4116
4130
|
}
|
|
4117
4131
|
export {
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4132
|
+
pe as GlobalEventBus,
|
|
4133
|
+
P as anchorBlock,
|
|
4134
|
+
st as component,
|
|
4121
4135
|
mr as computed,
|
|
4122
|
-
|
|
4123
|
-
|
|
4136
|
+
ot as createStore,
|
|
4137
|
+
Dt as css,
|
|
4124
4138
|
Cr as each,
|
|
4125
4139
|
Or as eachGroup,
|
|
4126
4140
|
Tr as eachPage,
|
|
4127
4141
|
Ar as eachWhere,
|
|
4128
4142
|
Wr as emit,
|
|
4129
4143
|
ve as eventBus,
|
|
4130
|
-
|
|
4131
|
-
|
|
4144
|
+
le as html,
|
|
4145
|
+
zr as initRouter,
|
|
4132
4146
|
Hr as listen,
|
|
4133
4147
|
ur as match,
|
|
4134
4148
|
Y as matchRoute,
|
|
4135
|
-
|
|
4136
|
-
|
|
4149
|
+
Br as matchRouteSSR,
|
|
4150
|
+
ne as mediaVariants,
|
|
4137
4151
|
Ir as off,
|
|
4138
4152
|
Dr as on,
|
|
4139
4153
|
Nr as once,
|
|
4140
|
-
|
|
4154
|
+
at as parseQuery,
|
|
4141
4155
|
gr as ref,
|
|
4142
|
-
|
|
4143
|
-
|
|
4156
|
+
Me as renderToString,
|
|
4157
|
+
pr as resolveRouteComponent,
|
|
4144
4158
|
dr as responsive,
|
|
4145
|
-
|
|
4159
|
+
gt as responsiveOrder,
|
|
4146
4160
|
Pr as responsiveSwitch,
|
|
4147
4161
|
Mr as switchOn,
|
|
4148
4162
|
jr as switchOnLength,
|
|
@@ -4153,10 +4167,10 @@ export {
|
|
|
4153
4167
|
wr as useOnConnected,
|
|
4154
4168
|
xr as useOnDisconnected,
|
|
4155
4169
|
$r as useOnError,
|
|
4156
|
-
|
|
4170
|
+
hr as useRouter,
|
|
4157
4171
|
kr as useStyle,
|
|
4158
4172
|
yr as watch,
|
|
4159
|
-
|
|
4173
|
+
Le as when,
|
|
4160
4174
|
Er as whenEmpty,
|
|
4161
4175
|
q as whenMedia,
|
|
4162
4176
|
Sr as whenNotEmpty,
|