mertani-web-toolkit 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/index.es.js +1664 -0
  2. package/dist/index.umd.js +2 -0
  3. package/dist/mertani-web-toolkit.css +1 -0
  4. package/package.json +7 -9
  5. package/.storybook/main.ts +0 -17
  6. package/.storybook/preview.ts +0 -14
  7. package/.storybook/vitest.setup.ts +0 -6
  8. package/.yarn/releases/yarn-4.9.2.cjs +0 -942
  9. package/.yarnrc.yml +0 -3
  10. package/index.html +0 -13
  11. package/src/App.svelte +0 -49
  12. package/src/app.css +0 -79
  13. package/src/assets/font/OpenSans-Light-webfont.eot +0 -0
  14. package/src/assets/font/OpenSans-Light-webfont.svg +0 -252
  15. package/src/assets/font/OpenSans-Light-webfont.ttf +0 -0
  16. package/src/assets/font/OpenSans-Light-webfont.woff +0 -0
  17. package/src/assets/font/OpenSans-Regular-webfont.eot +0 -0
  18. package/src/assets/font/OpenSans-Regular-webfont.svg +0 -252
  19. package/src/assets/font/OpenSans-Regular-webfont.ttf +0 -0
  20. package/src/assets/font/OpenSans-Regular-webfont.woff +0 -0
  21. package/src/assets/icon/percolate.eot +0 -0
  22. package/src/assets/icon/percolate.svg +0 -139
  23. package/src/assets/icon/percolate.ttf +0 -0
  24. package/src/assets/icon/percolate.woff +0 -0
  25. package/src/assets/icon/todos.eot +0 -0
  26. package/src/assets/icon/todos.svg +0 -27
  27. package/src/assets/icon/todos.ttf +0 -0
  28. package/src/assets/icon/todos.woff +0 -0
  29. package/src/assets/svelte.svg +0 -1
  30. package/src/index.css +0 -466
  31. package/src/index.ts +0 -3
  32. package/src/lib/Button.svelte +0 -30
  33. package/src/lib/Counter.svelte +0 -10
  34. package/src/lib/button.css +0 -30
  35. package/src/main.ts +0 -9
  36. package/src/stories/Button.stories.svelte +0 -31
  37. package/src/stories/Button.svelte +0 -30
  38. package/src/stories/Configure.mdx +0 -364
  39. package/src/stories/Header.stories.svelte +0 -26
  40. package/src/stories/Header.svelte +0 -45
  41. package/src/stories/Page.stories.svelte +0 -30
  42. package/src/stories/Page.svelte +0 -70
  43. package/src/stories/assets/accessibility.png +0 -0
  44. package/src/stories/assets/accessibility.svg +0 -1
  45. package/src/stories/assets/addon-library.png +0 -0
  46. package/src/stories/assets/assets.png +0 -0
  47. package/src/stories/assets/avif-test-image.avif +0 -0
  48. package/src/stories/assets/context.png +0 -0
  49. package/src/stories/assets/discord.svg +0 -1
  50. package/src/stories/assets/docs.png +0 -0
  51. package/src/stories/assets/figma-plugin.png +0 -0
  52. package/src/stories/assets/github.svg +0 -1
  53. package/src/stories/assets/share.png +0 -0
  54. package/src/stories/assets/styling.png +0 -0
  55. package/src/stories/assets/testing.png +0 -0
  56. package/src/stories/assets/theming.png +0 -0
  57. package/src/stories/assets/tutorials.svg +0 -1
  58. package/src/stories/assets/youtube.svg +0 -1
  59. package/src/stories/button.css +0 -30
  60. package/src/stories/header.css +0 -32
  61. package/src/stories/page.css +0 -68
  62. package/src/vite-env.d.ts +0 -2
  63. package/svelte.config.js +0 -7
  64. package/tsconfig.app.json +0 -20
  65. package/tsconfig.json +0 -7
  66. package/tsconfig.node.json +0 -25
  67. package/vite.config.ts +0 -55
  68. package/vitest.shims.d.ts +0 -1
  69. /package/{public → dist}/vite.svg +0 -0
@@ -0,0 +1,1664 @@
1
+ typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add("5");
2
+ const Be = 2, E = Symbol(), Ye = "http://www.w3.org/1999/xhtml", Ke = "@attach", Xt = !1;
3
+ var Pt = Array.isArray, $e = Array.prototype.indexOf, Tt = Object.defineProperty, yt = Object.getOwnPropertyDescriptor, He = Object.getOwnPropertyDescriptors, We = Object.prototype, ze = Array.prototype, te = Object.getPrototypeOf;
4
+ function Ge(t) {
5
+ for (var e = 0; e < t.length; e++)
6
+ t[e]();
7
+ }
8
+ function Ze() {
9
+ var t, e, r = new Promise((n, i) => {
10
+ t = n, e = i;
11
+ });
12
+ return { promise: r, resolve: t, reject: e };
13
+ }
14
+ const C = 2, Rt = 4, ee = 8, X = 16, tt = 32, et = 64, re = 128, R = 256, vt = 512, T = 1024, I = 2048, B = 4096, _t = 8192, rt = 16384, ne = 32768, xt = 1 << 17, Je = 1 << 18, gt = 1 << 19, Qe = 1 << 20, St = 1 << 21, It = 1 << 22, H = 1 << 23, lt = Symbol("$state"), Xe = Symbol(""), Dt = new class extends Error {
15
+ name = "StaleReactionError";
16
+ message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
17
+ }();
18
+ function tr() {
19
+ throw new Error("https://svelte.dev/e/await_outside_boundary");
20
+ }
21
+ function er() {
22
+ throw new Error("https://svelte.dev/e/async_derived_orphan");
23
+ }
24
+ function rr() {
25
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
26
+ }
27
+ function nr() {
28
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
29
+ }
30
+ function ir() {
31
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
32
+ }
33
+ function ur() {
34
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
35
+ }
36
+ function lr() {
37
+ console.warn("https://svelte.dev/e/select_multiple_invalid_value");
38
+ }
39
+ function ie(t) {
40
+ return t === this.v;
41
+ }
42
+ let fr = !1, F = null;
43
+ function dt(t) {
44
+ F = t;
45
+ }
46
+ function sr(t, e = !1, r) {
47
+ F = {
48
+ p: F,
49
+ c: null,
50
+ e: null,
51
+ s: t,
52
+ x: null,
53
+ l: null
54
+ };
55
+ }
56
+ function ar(t) {
57
+ var e = (
58
+ /** @type {ComponentContext} */
59
+ F
60
+ ), r = e.e;
61
+ if (r !== null) {
62
+ e.e = null;
63
+ for (var n of r)
64
+ Or(n);
65
+ }
66
+ return F = e.p, /** @type {T} */
67
+ {};
68
+ }
69
+ function ue() {
70
+ return !0;
71
+ }
72
+ const or = /* @__PURE__ */ new WeakMap();
73
+ function cr(t) {
74
+ var e = b;
75
+ if (e === null)
76
+ return p.f |= H, t;
77
+ if ((e.f & ne) === 0) {
78
+ if ((e.f & re) === 0)
79
+ throw !e.parent && t instanceof Error && le(t), t;
80
+ e.b.error(t);
81
+ } else
82
+ Lt(t, e);
83
+ }
84
+ function Lt(t, e) {
85
+ for (; e !== null; ) {
86
+ if ((e.f & re) !== 0)
87
+ try {
88
+ e.b.error(t);
89
+ return;
90
+ } catch (r) {
91
+ t = r;
92
+ }
93
+ e = e.parent;
94
+ }
95
+ throw t instanceof Error && le(t), t;
96
+ }
97
+ function le(t) {
98
+ const e = or.get(t);
99
+ e && (Tt(t, "message", {
100
+ value: e.message
101
+ }), Tt(t, "stack", {
102
+ value: e.stack
103
+ }));
104
+ }
105
+ let ht = [];
106
+ function vr() {
107
+ var t = ht;
108
+ ht = [], Ge(t);
109
+ }
110
+ function fe(t) {
111
+ ht.length === 0 && queueMicrotask(vr), ht.push(t);
112
+ }
113
+ function _r() {
114
+ for (var t = (
115
+ /** @type {Effect} */
116
+ b.b
117
+ ); t !== null && !t.has_pending_snippet(); )
118
+ t = t.parent;
119
+ return t === null && tr(), t;
120
+ }
121
+ // @__NO_SIDE_EFFECTS__
122
+ function se(t) {
123
+ var e = C | I, r = p !== null && (p.f & C) !== 0 ? (
124
+ /** @type {Derived} */
125
+ p
126
+ ) : null;
127
+ return b === null || r !== null && (r.f & R) !== 0 ? e |= R : b.f |= gt, {
128
+ ctx: F,
129
+ deps: null,
130
+ effects: null,
131
+ equals: ie,
132
+ f: e,
133
+ fn: t,
134
+ reactions: null,
135
+ rv: 0,
136
+ v: (
137
+ /** @type {V} */
138
+ E
139
+ ),
140
+ wv: 0,
141
+ parent: r ?? b,
142
+ ac: null
143
+ };
144
+ }
145
+ // @__NO_SIDE_EFFECTS__
146
+ function dr(t, e) {
147
+ let r = (
148
+ /** @type {Effect | null} */
149
+ b
150
+ );
151
+ r === null && er();
152
+ var n = (
153
+ /** @type {Boundary} */
154
+ r.b
155
+ ), i = (
156
+ /** @type {Promise<V>} */
157
+ /** @type {unknown} */
158
+ void 0
159
+ ), u = de(
160
+ /** @type {V} */
161
+ E
162
+ ), f = null, s = !p;
163
+ return Nr(() => {
164
+ try {
165
+ var l = t();
166
+ f && Promise.resolve(l).catch(() => {
167
+ });
168
+ } catch (_) {
169
+ l = Promise.reject(_);
170
+ }
171
+ var a = () => l;
172
+ i = f?.then(a, a) ?? Promise.resolve(l), f = i;
173
+ var o = (
174
+ /** @type {Batch} */
175
+ k
176
+ ), c = n.pending;
177
+ s && (n.update_pending_count(1), c || o.increment());
178
+ const v = (_, d = void 0) => {
179
+ f = null, c || o.activate(), d ? d !== Dt && (u.f |= H, Nt(u, d)) : ((u.f & H) !== 0 && (u.f ^= H), Nt(u, _)), s && (n.update_pending_count(-1), c || o.decrement()), ve();
180
+ };
181
+ if (i.then(v, (_) => v(null, _ || "unknown")), o)
182
+ return () => {
183
+ queueMicrotask(() => o.neuter());
184
+ };
185
+ }), new Promise((l) => {
186
+ function a(o) {
187
+ function c() {
188
+ o === i ? l(u) : a(i);
189
+ }
190
+ o.then(c, c);
191
+ }
192
+ a(i);
193
+ });
194
+ }
195
+ // @__NO_SIDE_EFFECTS__
196
+ function Vt(t) {
197
+ const e = /* @__PURE__ */ se(t);
198
+ return Te(e), e;
199
+ }
200
+ function ae(t) {
201
+ var e = t.effects;
202
+ if (e !== null) {
203
+ t.effects = null;
204
+ for (var r = 0; r < e.length; r += 1)
205
+ z(
206
+ /** @type {Effect} */
207
+ e[r]
208
+ );
209
+ }
210
+ }
211
+ function hr(t) {
212
+ for (var e = t.parent; e !== null; ) {
213
+ if ((e.f & C) === 0)
214
+ return (
215
+ /** @type {Effect} */
216
+ e
217
+ );
218
+ e = e.parent;
219
+ }
220
+ return null;
221
+ }
222
+ function Mt(t) {
223
+ var e, r = b;
224
+ U(hr(t));
225
+ try {
226
+ ae(t), e = Ce(t);
227
+ } finally {
228
+ U(r);
229
+ }
230
+ return e;
231
+ }
232
+ function oe(t) {
233
+ var e = Mt(t);
234
+ if (t.equals(e) || (t.v = e, t.wv = Oe()), !ct) {
235
+ var r = (V || (t.f & R) !== 0) && t.deps !== null ? B : T;
236
+ N(t, r);
237
+ }
238
+ }
239
+ function ce(t, e, r) {
240
+ const n = se;
241
+ if (e.length === 0) {
242
+ r(t.map(n));
243
+ return;
244
+ }
245
+ var i = k, u = (
246
+ /** @type {Effect} */
247
+ b
248
+ ), f = pr(), s = _r();
249
+ Promise.all(e.map((l) => /* @__PURE__ */ dr(l))).then((l) => {
250
+ i?.activate(), f();
251
+ try {
252
+ r([...t.map(n), ...l]);
253
+ } catch (a) {
254
+ (u.f & rt) === 0 && Lt(a, u);
255
+ }
256
+ i?.deactivate(), ve();
257
+ }).catch((l) => {
258
+ s.error(l);
259
+ });
260
+ }
261
+ function pr() {
262
+ var t = b, e = p, r = F, n = k;
263
+ return function() {
264
+ U(t), L(e), dt(r), n?.activate();
265
+ };
266
+ }
267
+ function ve() {
268
+ U(null), L(null), dt(null);
269
+ }
270
+ const Et = /* @__PURE__ */ new Set();
271
+ let k = null, qt = /* @__PURE__ */ new Set(), pt = [];
272
+ function _e() {
273
+ const t = (
274
+ /** @type {() => void} */
275
+ pt.shift()
276
+ );
277
+ pt.length > 0 && queueMicrotask(_e), t();
278
+ }
279
+ let ft = [], jt = null, Ot = !1;
280
+ class st {
281
+ /**
282
+ * The current values of any sources that are updated in this batch
283
+ * They keys of this map are identical to `this.#previous`
284
+ * @type {Map<Source, any>}
285
+ */
286
+ current = /* @__PURE__ */ new Map();
287
+ /**
288
+ * The values of any sources that are updated in this batch _before_ those updates took place.
289
+ * They keys of this map are identical to `this.#current`
290
+ * @type {Map<Source, any>}
291
+ */
292
+ #s = /* @__PURE__ */ new Map();
293
+ /**
294
+ * When the batch is committed (and the DOM is updated), we need to remove old branches
295
+ * and append new ones by calling the functions added inside (if/each/key/etc) blocks
296
+ * @type {Set<() => void>}
297
+ */
298
+ #i = /* @__PURE__ */ new Set();
299
+ /**
300
+ * The number of async effects that are currently in flight
301
+ */
302
+ #t = 0;
303
+ /**
304
+ * A deferred that resolves when the batch is committed, used with `settled()`
305
+ * TODO replace with Promise.withResolvers once supported widely enough
306
+ * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
307
+ */
308
+ #a = null;
309
+ /**
310
+ * True if an async effect inside this batch resolved and
311
+ * its parent branch was already deleted
312
+ */
313
+ #o = !1;
314
+ /**
315
+ * Async effects (created inside `async_derived`) encountered during processing.
316
+ * These run after the rest of the batch has updated, since they should
317
+ * always have the latest values
318
+ * @type {Effect[]}
319
+ */
320
+ #r = [];
321
+ /**
322
+ * The same as `#async_effects`, but for effects inside a newly-created
323
+ * `<svelte:boundary>` — these do not prevent the batch from committing
324
+ * @type {Effect[]}
325
+ */
326
+ #u = [];
327
+ /**
328
+ * Template effects and `$effect.pre` effects, which run when
329
+ * a batch is committed
330
+ * @type {Effect[]}
331
+ */
332
+ #n = [];
333
+ /**
334
+ * The same as `#render_effects`, but for `$effect` (which runs after)
335
+ * @type {Effect[]}
336
+ */
337
+ #e = [];
338
+ /**
339
+ * Block effects, which may need to re-run on subsequent flushes
340
+ * in order to update internal sources (e.g. each block items)
341
+ * @type {Effect[]}
342
+ */
343
+ #l = [];
344
+ /**
345
+ * Deferred effects (which run after async work has completed) that are DIRTY
346
+ * @type {Effect[]}
347
+ */
348
+ #c = [];
349
+ /**
350
+ * Deferred effects that are MAYBE_DIRTY
351
+ * @type {Effect[]}
352
+ */
353
+ #v = [];
354
+ /**
355
+ * A set of branches that still exist, but will be destroyed when this batch
356
+ * is committed — we skip over these during `process`
357
+ * @type {Set<Effect>}
358
+ */
359
+ skipped_effects = /* @__PURE__ */ new Set();
360
+ /**
361
+ *
362
+ * @param {Effect[]} root_effects
363
+ */
364
+ process(e) {
365
+ ft = [];
366
+ for (const i of e)
367
+ this.#d(i);
368
+ if (this.#r.length === 0 && this.#t === 0) {
369
+ this.#_();
370
+ var r = this.#n, n = this.#e;
371
+ this.#n = [], this.#e = [], this.#l = [], k = null, Ut(r), Ut(n), k === null ? k = this : Et.delete(this), this.#a?.resolve();
372
+ } else
373
+ this.#f(this.#n), this.#f(this.#e), this.#f(this.#l);
374
+ for (const i of this.#r)
375
+ Q(i);
376
+ for (const i of this.#u)
377
+ Q(i);
378
+ this.#r = [], this.#u = [];
379
+ }
380
+ /**
381
+ * Traverse the effect tree, executing effects or stashing
382
+ * them for later execution as appropriate
383
+ * @param {Effect} root
384
+ */
385
+ #d(e) {
386
+ e.f ^= T;
387
+ for (var r = e.first; r !== null; ) {
388
+ var n = r.f, i = (n & (tt | et)) !== 0, u = i && (n & T) !== 0, f = u || (n & _t) !== 0 || this.skipped_effects.has(r);
389
+ if (!f && r.fn !== null) {
390
+ if (i)
391
+ r.f ^= T;
392
+ else if ((n & Rt) !== 0)
393
+ this.#e.push(r);
394
+ else if ((n & T) === 0)
395
+ if ((n & It) !== 0) {
396
+ var s = r.b?.pending ? this.#u : this.#r;
397
+ s.push(r);
398
+ } else wt(r) && ((r.f & X) !== 0 && this.#l.push(r), Q(r));
399
+ var l = r.first;
400
+ if (l !== null) {
401
+ r = l;
402
+ continue;
403
+ }
404
+ }
405
+ var a = r.parent;
406
+ for (r = r.next; r === null && a !== null; )
407
+ r = a.next, a = a.parent;
408
+ }
409
+ }
410
+ /**
411
+ * @param {Effect[]} effects
412
+ */
413
+ #f(e) {
414
+ for (const r of e)
415
+ ((r.f & I) !== 0 ? this.#c : this.#v).push(r), N(r, T);
416
+ e.length = 0;
417
+ }
418
+ /**
419
+ * Associate a change to a given source with the current
420
+ * batch, noting its previous and current values
421
+ * @param {Source} source
422
+ * @param {any} value
423
+ */
424
+ capture(e, r) {
425
+ this.#s.has(e) || this.#s.set(e, r), this.current.set(e, e.v);
426
+ }
427
+ activate() {
428
+ k = this;
429
+ }
430
+ deactivate() {
431
+ k = null;
432
+ for (const e of qt)
433
+ if (qt.delete(e), e(), k !== null)
434
+ break;
435
+ }
436
+ neuter() {
437
+ this.#o = !0;
438
+ }
439
+ flush() {
440
+ ft.length > 0 ? br() : this.#_(), k === this && (this.#t === 0 && Et.delete(this), this.deactivate());
441
+ }
442
+ /**
443
+ * Append and remove branches to/from the DOM
444
+ */
445
+ #_() {
446
+ if (!this.#o)
447
+ for (const e of this.#i)
448
+ e();
449
+ this.#i.clear();
450
+ }
451
+ increment() {
452
+ this.#t += 1;
453
+ }
454
+ decrement() {
455
+ if (this.#t -= 1, this.#t === 0) {
456
+ for (const e of this.#c)
457
+ N(e, I), at(e);
458
+ for (const e of this.#v)
459
+ N(e, B), at(e);
460
+ this.#n = [], this.#e = [], this.flush();
461
+ } else
462
+ this.deactivate();
463
+ }
464
+ /** @param {() => void} fn */
465
+ add_callback(e) {
466
+ this.#i.add(e);
467
+ }
468
+ settled() {
469
+ return (this.#a ??= Ze()).promise;
470
+ }
471
+ static ensure() {
472
+ if (k === null) {
473
+ const e = k = new st();
474
+ Et.add(k), st.enqueue(() => {
475
+ k === e && e.flush();
476
+ });
477
+ }
478
+ return k;
479
+ }
480
+ /** @param {() => void} task */
481
+ static enqueue(e) {
482
+ pt.length === 0 && queueMicrotask(_e), pt.unshift(e);
483
+ }
484
+ }
485
+ function br() {
486
+ var t = J;
487
+ Ot = !0;
488
+ try {
489
+ var e = 0;
490
+ for (Yt(!0); ft.length > 0; ) {
491
+ var r = st.ensure();
492
+ if (e++ > 1e3) {
493
+ var n, i;
494
+ gr();
495
+ }
496
+ r.process(ft), q.clear();
497
+ }
498
+ } finally {
499
+ Ot = !1, Yt(t), jt = null;
500
+ }
501
+ }
502
+ function gr() {
503
+ try {
504
+ rr();
505
+ } catch (t) {
506
+ Lt(t, jt);
507
+ }
508
+ }
509
+ let K = null;
510
+ function Ut(t) {
511
+ var e = t.length;
512
+ if (e !== 0) {
513
+ for (var r = 0; r < e; ) {
514
+ var n = t[r++];
515
+ if ((n.f & (rt | _t)) === 0 && wt(n) && (K = [], Q(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? me(n) : n.fn = null), K?.length > 0)) {
516
+ q.clear();
517
+ for (const i of K)
518
+ Q(i);
519
+ K = [];
520
+ }
521
+ }
522
+ K = null;
523
+ }
524
+ }
525
+ function at(t) {
526
+ for (var e = jt = t; e.parent !== null; ) {
527
+ e = e.parent;
528
+ var r = e.f;
529
+ if (Ot && e === b && (r & X) !== 0)
530
+ return;
531
+ if ((r & (et | tt)) !== 0) {
532
+ if ((r & T) === 0) return;
533
+ e.f ^= T;
534
+ }
535
+ }
536
+ ft.push(e);
537
+ }
538
+ const q = /* @__PURE__ */ new Map();
539
+ function de(t, e) {
540
+ var r = {
541
+ f: 0,
542
+ // TODO ideally we could skip this altogether, but it causes type errors
543
+ v: t,
544
+ reactions: null,
545
+ equals: ie,
546
+ rv: 0,
547
+ wv: 0
548
+ };
549
+ return r;
550
+ }
551
+ // @__NO_SIDE_EFFECTS__
552
+ function M(t, e) {
553
+ const r = de(t);
554
+ return Te(r), r;
555
+ }
556
+ function x(t, e, r = !1) {
557
+ p !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
558
+ // to ensure we error if state is set inside an inspect effect
559
+ (!$ || (p.f & xt) !== 0) && ue() && (p.f & (C | X | It | xt)) !== 0 && !j?.includes(t) && ur();
560
+ let n = r ? ut(e) : e;
561
+ return Nt(t, n);
562
+ }
563
+ function Nt(t, e) {
564
+ if (!t.equals(e)) {
565
+ var r = t.v;
566
+ ct ? q.set(t, e) : q.set(t, r), t.v = e;
567
+ var n = st.ensure();
568
+ n.capture(t, r), (t.f & C) !== 0 && ((t.f & I) !== 0 && Mt(
569
+ /** @type {Derived} */
570
+ t
571
+ ), N(t, (t.f & R) === 0 ? T : B)), t.wv = Oe(), he(t, I), b !== null && (b.f & T) !== 0 && (b.f & (tt | et)) === 0 && (P === null ? Rr([t]) : P.push(t));
572
+ }
573
+ return e;
574
+ }
575
+ function At(t) {
576
+ x(t, t.v + 1);
577
+ }
578
+ function he(t, e) {
579
+ var r = t.reactions;
580
+ if (r !== null)
581
+ for (var n = r.length, i = 0; i < n; i++) {
582
+ var u = r[i], f = u.f, s = (f & I) === 0;
583
+ s && N(u, e), (f & C) !== 0 ? he(
584
+ /** @type {Derived} */
585
+ u,
586
+ B
587
+ ) : s && ((f & X) !== 0 && K !== null && K.push(
588
+ /** @type {Effect} */
589
+ u
590
+ ), at(
591
+ /** @type {Effect} */
592
+ u
593
+ ));
594
+ }
595
+ }
596
+ function ut(t) {
597
+ if (typeof t != "object" || t === null || lt in t)
598
+ return t;
599
+ const e = te(t);
600
+ if (e !== We && e !== ze)
601
+ return t;
602
+ var r = /* @__PURE__ */ new Map(), n = Pt(t), i = /* @__PURE__ */ M(0), u = W, f = (s) => {
603
+ if (W === u)
604
+ return s();
605
+ var l = p, a = W;
606
+ L(null), $t(u);
607
+ var o = s();
608
+ return L(l), $t(a), o;
609
+ };
610
+ return n && r.set("length", /* @__PURE__ */ M(
611
+ /** @type {any[]} */
612
+ t.length
613
+ )), new Proxy(
614
+ /** @type {any} */
615
+ t,
616
+ {
617
+ defineProperty(s, l, a) {
618
+ (!("value" in a) || a.configurable === !1 || a.enumerable === !1 || a.writable === !1) && nr();
619
+ var o = r.get(l);
620
+ return o === void 0 ? o = f(() => {
621
+ var c = /* @__PURE__ */ M(a.value);
622
+ return r.set(l, c), c;
623
+ }) : x(o, a.value, !0), !0;
624
+ },
625
+ deleteProperty(s, l) {
626
+ var a = r.get(l);
627
+ if (a === void 0) {
628
+ if (l in s) {
629
+ const o = f(() => /* @__PURE__ */ M(E));
630
+ r.set(l, o), At(i);
631
+ }
632
+ } else
633
+ x(a, E), At(i);
634
+ return !0;
635
+ },
636
+ get(s, l, a) {
637
+ if (l === lt)
638
+ return t;
639
+ var o = r.get(l), c = l in s;
640
+ if (o === void 0 && (!c || yt(s, l)?.writable) && (o = f(() => {
641
+ var _ = ut(c ? s[l] : E), d = /* @__PURE__ */ M(_);
642
+ return d;
643
+ }), r.set(l, o)), o !== void 0) {
644
+ var v = D(o);
645
+ return v === E ? void 0 : v;
646
+ }
647
+ return Reflect.get(s, l, a);
648
+ },
649
+ getOwnPropertyDescriptor(s, l) {
650
+ var a = Reflect.getOwnPropertyDescriptor(s, l);
651
+ if (a && "value" in a) {
652
+ var o = r.get(l);
653
+ o && (a.value = D(o));
654
+ } else if (a === void 0) {
655
+ var c = r.get(l), v = c?.v;
656
+ if (c !== void 0 && v !== E)
657
+ return {
658
+ enumerable: !0,
659
+ configurable: !0,
660
+ value: v,
661
+ writable: !0
662
+ };
663
+ }
664
+ return a;
665
+ },
666
+ has(s, l) {
667
+ if (l === lt)
668
+ return !0;
669
+ var a = r.get(l), o = a !== void 0 && a.v !== E || Reflect.has(s, l);
670
+ if (a !== void 0 || b !== null && (!o || yt(s, l)?.writable)) {
671
+ a === void 0 && (a = f(() => {
672
+ var v = o ? ut(s[l]) : E, _ = /* @__PURE__ */ M(v);
673
+ return _;
674
+ }), r.set(l, a));
675
+ var c = D(a);
676
+ if (c === E)
677
+ return !1;
678
+ }
679
+ return o;
680
+ },
681
+ set(s, l, a, o) {
682
+ var c = r.get(l), v = l in s;
683
+ if (n && l === "length")
684
+ for (var _ = a; _ < /** @type {Source<number>} */
685
+ c.v; _ += 1) {
686
+ var d = r.get(_ + "");
687
+ d !== void 0 ? x(d, E) : _ in s && (d = f(() => /* @__PURE__ */ M(E)), r.set(_ + "", d));
688
+ }
689
+ if (c === void 0)
690
+ (!v || yt(s, l)?.writable) && (c = f(() => /* @__PURE__ */ M(void 0)), x(c, ut(a)), r.set(l, c));
691
+ else {
692
+ v = c.v !== E;
693
+ var g = f(() => ut(a));
694
+ x(c, g);
695
+ }
696
+ var y = Reflect.getOwnPropertyDescriptor(s, l);
697
+ if (y?.set && y.set.call(o, a), !v) {
698
+ if (n && typeof l == "string") {
699
+ var Y = (
700
+ /** @type {Source<number>} */
701
+ r.get("length")
702
+ ), h = Number(l);
703
+ Number.isInteger(h) && h >= Y.v && x(Y, h + 1);
704
+ }
705
+ At(i);
706
+ }
707
+ return !0;
708
+ },
709
+ ownKeys(s) {
710
+ D(i);
711
+ var l = Reflect.ownKeys(s).filter((c) => {
712
+ var v = r.get(c);
713
+ return v === void 0 || v.v !== E;
714
+ });
715
+ for (var [a, o] of r)
716
+ o.v !== E && !(a in s) && l.push(a);
717
+ return l;
718
+ },
719
+ setPrototypeOf() {
720
+ ir();
721
+ }
722
+ }
723
+ );
724
+ }
725
+ function Bt(t) {
726
+ try {
727
+ if (t !== null && typeof t == "object" && lt in t)
728
+ return t[lt];
729
+ } catch {
730
+ }
731
+ return t;
732
+ }
733
+ function wr(t, e) {
734
+ return Object.is(Bt(t), Bt(e));
735
+ }
736
+ var yr, Er, Ar;
737
+ // @__NO_SIDE_EFFECTS__
738
+ function pe(t) {
739
+ return Er.call(t);
740
+ }
741
+ // @__NO_SIDE_EFFECTS__
742
+ function kr(t) {
743
+ return Ar.call(t);
744
+ }
745
+ function be(t, e) {
746
+ return /* @__PURE__ */ pe(t);
747
+ }
748
+ function mr(t, e) {
749
+ if (e) {
750
+ const r = document.body;
751
+ t.autofocus = !0, fe(() => {
752
+ document.activeElement === r && t.focus();
753
+ });
754
+ }
755
+ }
756
+ function Ft(t) {
757
+ var e = p, r = b;
758
+ L(null), U(null);
759
+ try {
760
+ return t();
761
+ } finally {
762
+ L(e), U(r);
763
+ }
764
+ }
765
+ function Tr(t, e) {
766
+ var r = e.last;
767
+ r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
768
+ }
769
+ function G(t, e, r, n = !0) {
770
+ var i = b;
771
+ i !== null && (i.f & _t) !== 0 && (t |= _t);
772
+ var u = {
773
+ ctx: F,
774
+ deps: null,
775
+ nodes_start: null,
776
+ nodes_end: null,
777
+ f: t | I,
778
+ first: null,
779
+ fn: e,
780
+ last: null,
781
+ next: null,
782
+ parent: i,
783
+ b: i && i.b,
784
+ prev: null,
785
+ teardown: null,
786
+ transitions: null,
787
+ wv: 0,
788
+ ac: null
789
+ };
790
+ if (r)
791
+ try {
792
+ Q(u), u.f |= ne;
793
+ } catch (l) {
794
+ throw z(u), l;
795
+ }
796
+ else e !== null && at(u);
797
+ if (n) {
798
+ var f = u;
799
+ if (r && f.deps === null && f.teardown === null && f.nodes_start === null && f.first === f.last && // either `null`, or a singular child
800
+ (f.f & gt) === 0 && (f = f.first), f !== null && (f.parent = i, i !== null && Tr(f, i), p !== null && (p.f & C) !== 0 && (t & et) === 0)) {
801
+ var s = (
802
+ /** @type {Derived} */
803
+ p
804
+ );
805
+ (s.effects ??= []).push(f);
806
+ }
807
+ }
808
+ return u;
809
+ }
810
+ function Sr(t) {
811
+ const e = G(ee, null, !1);
812
+ return N(e, T), e.teardown = t, e;
813
+ }
814
+ function Or(t) {
815
+ return G(Rt | Qe, t, !1);
816
+ }
817
+ function ge(t) {
818
+ return G(Rt, t, !1);
819
+ }
820
+ function Nr(t) {
821
+ return G(It | gt, t, !0);
822
+ }
823
+ function we(t, e = [], r = []) {
824
+ ce(e, r, (n) => {
825
+ G(ee, () => t(...n.map(D)), !0);
826
+ });
827
+ }
828
+ function ye(t, e = 0) {
829
+ var r = G(X | e, t, !0);
830
+ return r;
831
+ }
832
+ function Ee(t, e = !0) {
833
+ return G(tt | gt, t, !0, e);
834
+ }
835
+ function Ae(t) {
836
+ var e = t.teardown;
837
+ if (e !== null) {
838
+ const r = ct, n = p;
839
+ Kt(!0), L(null);
840
+ try {
841
+ e.call(null);
842
+ } finally {
843
+ Kt(r), L(n);
844
+ }
845
+ }
846
+ }
847
+ function ke(t, e = !1) {
848
+ var r = t.first;
849
+ for (t.first = t.last = null; r !== null; ) {
850
+ const i = r.ac;
851
+ i !== null && Ft(() => {
852
+ i.abort(Dt);
853
+ });
854
+ var n = r.next;
855
+ (r.f & et) !== 0 ? r.parent = null : z(r, e), r = n;
856
+ }
857
+ }
858
+ function Cr(t) {
859
+ for (var e = t.first; e !== null; ) {
860
+ var r = e.next;
861
+ (e.f & tt) === 0 && z(e), e = r;
862
+ }
863
+ }
864
+ function z(t, e = !0) {
865
+ var r = !1;
866
+ (e || (t.f & Je) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (Pr(
867
+ t.nodes_start,
868
+ /** @type {TemplateNode} */
869
+ t.nodes_end
870
+ ), r = !0), ke(t, e && !r), bt(t, 0), N(t, rt);
871
+ var n = t.transitions;
872
+ if (n !== null)
873
+ for (const u of n)
874
+ u.stop();
875
+ Ae(t);
876
+ var i = t.parent;
877
+ i !== null && i.first !== null && me(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
878
+ }
879
+ function Pr(t, e) {
880
+ for (; t !== null; ) {
881
+ var r = t === e ? null : (
882
+ /** @type {TemplateNode} */
883
+ /* @__PURE__ */ kr(t)
884
+ );
885
+ t.remove(), t = r;
886
+ }
887
+ }
888
+ function me(t) {
889
+ var e = t.parent, r = t.prev, n = t.next;
890
+ r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
891
+ }
892
+ let J = !1;
893
+ function Yt(t) {
894
+ J = t;
895
+ }
896
+ let ct = !1;
897
+ function Kt(t) {
898
+ ct = t;
899
+ }
900
+ let p = null, $ = !1;
901
+ function L(t) {
902
+ p = t;
903
+ }
904
+ let b = null;
905
+ function U(t) {
906
+ b = t;
907
+ }
908
+ let j = null;
909
+ function Te(t) {
910
+ p !== null && (j === null ? j = [t] : j.push(t));
911
+ }
912
+ let m = null, O = 0, P = null;
913
+ function Rr(t) {
914
+ P = t;
915
+ }
916
+ let Se = 1, ot = 0, W = ot;
917
+ function $t(t) {
918
+ W = t;
919
+ }
920
+ let V = !1;
921
+ function Oe() {
922
+ return ++Se;
923
+ }
924
+ function wt(t) {
925
+ var e = t.f;
926
+ if ((e & I) !== 0)
927
+ return !0;
928
+ if ((e & B) !== 0) {
929
+ var r = t.deps, n = (e & R) !== 0;
930
+ if (r !== null) {
931
+ var i, u, f = (e & vt) !== 0, s = n && b !== null && !V, l = r.length;
932
+ if ((f || s) && (b === null || (b.f & rt) === 0)) {
933
+ var a = (
934
+ /** @type {Derived} */
935
+ t
936
+ ), o = a.parent;
937
+ for (i = 0; i < l; i++)
938
+ u = r[i], (f || !u?.reactions?.includes(a)) && (u.reactions ??= []).push(a);
939
+ f && (a.f ^= vt), s && o !== null && (o.f & R) === 0 && (a.f ^= R);
940
+ }
941
+ for (i = 0; i < l; i++)
942
+ if (u = r[i], wt(
943
+ /** @type {Derived} */
944
+ u
945
+ ) && oe(
946
+ /** @type {Derived} */
947
+ u
948
+ ), u.wv > t.wv)
949
+ return !0;
950
+ }
951
+ (!n || b !== null && !V) && N(t, T);
952
+ }
953
+ return !1;
954
+ }
955
+ function Ne(t, e, r = !0) {
956
+ var n = t.reactions;
957
+ if (n !== null && !j?.includes(t))
958
+ for (var i = 0; i < n.length; i++) {
959
+ var u = n[i];
960
+ (u.f & C) !== 0 ? Ne(
961
+ /** @type {Derived} */
962
+ u,
963
+ e,
964
+ !1
965
+ ) : e === u && (r ? N(u, I) : (u.f & T) !== 0 && N(u, B), at(
966
+ /** @type {Effect} */
967
+ u
968
+ ));
969
+ }
970
+ }
971
+ function Ce(t) {
972
+ var e = m, r = O, n = P, i = p, u = V, f = j, s = F, l = $, a = W, o = t.f;
973
+ m = /** @type {null | Value[]} */
974
+ null, O = 0, P = null, V = (o & R) !== 0 && ($ || !J || p === null), p = (o & (tt | et)) === 0 ? t : null, j = null, dt(t.ctx), $ = !1, W = ++ot, t.ac !== null && (Ft(() => {
975
+ t.ac.abort(Dt);
976
+ }), t.ac = null);
977
+ try {
978
+ t.f |= St;
979
+ var c = (
980
+ /** @type {Function} */
981
+ t.fn
982
+ ), v = c(), _ = t.deps;
983
+ if (m !== null) {
984
+ var d;
985
+ if (bt(t, O), _ !== null && O > 0)
986
+ for (_.length = O + m.length, d = 0; d < m.length; d++)
987
+ _[O + d] = m[d];
988
+ else
989
+ t.deps = _ = m;
990
+ if (!V || // Deriveds that already have reactions can cleanup, so we still add them as reactions
991
+ (o & C) !== 0 && /** @type {import('#client').Derived} */
992
+ t.reactions !== null)
993
+ for (d = O; d < _.length; d++)
994
+ (_[d].reactions ??= []).push(t);
995
+ } else _ !== null && O < _.length && (bt(t, O), _.length = O);
996
+ if (ue() && P !== null && !$ && _ !== null && (t.f & (C | B | I)) === 0)
997
+ for (d = 0; d < /** @type {Source[]} */
998
+ P.length; d++)
999
+ Ne(
1000
+ P[d],
1001
+ /** @type {Effect} */
1002
+ t
1003
+ );
1004
+ return i !== null && i !== t && (ot++, P !== null && (n === null ? n = P : n.push(.../** @type {Source[]} */
1005
+ P))), (t.f & H) !== 0 && (t.f ^= H), v;
1006
+ } catch (g) {
1007
+ return cr(g);
1008
+ } finally {
1009
+ t.f ^= St, m = e, O = r, P = n, p = i, V = u, j = f, dt(s), $ = l, W = a;
1010
+ }
1011
+ }
1012
+ function Ir(t, e) {
1013
+ let r = e.reactions;
1014
+ if (r !== null) {
1015
+ var n = $e.call(r, t);
1016
+ if (n !== -1) {
1017
+ var i = r.length - 1;
1018
+ i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
1019
+ }
1020
+ }
1021
+ r === null && (e.f & C) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1022
+ // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1023
+ // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1024
+ (m === null || !m.includes(e)) && (N(e, B), (e.f & (R | vt)) === 0 && (e.f ^= vt), ae(
1025
+ /** @type {Derived} **/
1026
+ e
1027
+ ), bt(
1028
+ /** @type {Derived} **/
1029
+ e,
1030
+ 0
1031
+ ));
1032
+ }
1033
+ function bt(t, e) {
1034
+ var r = t.deps;
1035
+ if (r !== null)
1036
+ for (var n = e; n < r.length; n++)
1037
+ Ir(t, r[n]);
1038
+ }
1039
+ function Q(t) {
1040
+ var e = t.f;
1041
+ if ((e & rt) === 0) {
1042
+ N(t, T);
1043
+ var r = b, n = J;
1044
+ b = t, J = !0;
1045
+ try {
1046
+ (e & X) !== 0 ? Cr(t) : ke(t), Ae(t);
1047
+ var i = Ce(t);
1048
+ t.teardown = typeof i == "function" ? i : null, t.wv = Se;
1049
+ var u;
1050
+ Xt && fr && (t.f & I) !== 0 && t.deps;
1051
+ } finally {
1052
+ J = n, b = r;
1053
+ }
1054
+ }
1055
+ }
1056
+ function D(t) {
1057
+ var e = t.f, r = (e & C) !== 0;
1058
+ if (p !== null && !$) {
1059
+ var n = b !== null && (b.f & rt) !== 0;
1060
+ if (!n && !j?.includes(t)) {
1061
+ var i = p.deps;
1062
+ if ((p.f & St) !== 0)
1063
+ t.rv < ot && (t.rv = ot, m === null && i !== null && i[O] === t ? O++ : m === null ? m = [t] : (!V || !m.includes(t)) && m.push(t));
1064
+ else {
1065
+ (p.deps ??= []).push(t);
1066
+ var u = t.reactions;
1067
+ u === null ? t.reactions = [p] : u.includes(p) || u.push(p);
1068
+ }
1069
+ }
1070
+ } else if (r && /** @type {Derived} */
1071
+ t.deps === null && /** @type {Derived} */
1072
+ t.effects === null) {
1073
+ var f = (
1074
+ /** @type {Derived} */
1075
+ t
1076
+ ), s = f.parent;
1077
+ s !== null && (s.f & R) === 0 && (f.f ^= R);
1078
+ }
1079
+ if (ct) {
1080
+ if (q.has(t))
1081
+ return q.get(t);
1082
+ if (r) {
1083
+ f = /** @type {Derived} */
1084
+ t;
1085
+ var l = f.v;
1086
+ return ((f.f & T) === 0 && f.reactions !== null || Pe(f)) && (l = Mt(f)), q.set(f, l), l;
1087
+ }
1088
+ } else r && (f = /** @type {Derived} */
1089
+ t, wt(f) && oe(f));
1090
+ if ((t.f & H) !== 0)
1091
+ throw t.v;
1092
+ return t.v;
1093
+ }
1094
+ function Pe(t) {
1095
+ if (t.v === E) return !0;
1096
+ if (t.deps === null) return !1;
1097
+ for (const e of t.deps)
1098
+ if (q.has(e) || (e.f & C) !== 0 && Pe(
1099
+ /** @type {Derived} */
1100
+ e
1101
+ ))
1102
+ return !0;
1103
+ return !1;
1104
+ }
1105
+ const Dr = -7169;
1106
+ function N(t, e) {
1107
+ t.f = t.f & Dr | e;
1108
+ }
1109
+ const Lr = /* @__PURE__ */ new Set(), Mr = /* @__PURE__ */ new Set();
1110
+ function jr(t, e, r, n = {}) {
1111
+ function i(u) {
1112
+ if (n.capture || Fr.call(e, u), !u.cancelBubble)
1113
+ return Ft(() => r?.call(this, u));
1114
+ }
1115
+ return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? fe(() => {
1116
+ e.addEventListener(t, i, n);
1117
+ }) : e.addEventListener(t, i, n), i;
1118
+ }
1119
+ function Re(t) {
1120
+ for (var e = 0; e < t.length; e++)
1121
+ Lr.add(t[e]);
1122
+ for (var r of Mr)
1123
+ r(t);
1124
+ }
1125
+ let Ht = null;
1126
+ function Fr(t) {
1127
+ var e = this, r = (
1128
+ /** @type {Node} */
1129
+ e.ownerDocument
1130
+ ), n = t.type, i = t.composedPath?.() || [], u = (
1131
+ /** @type {null | Element} */
1132
+ i[0] || t.target
1133
+ );
1134
+ Ht = t;
1135
+ var f = 0, s = Ht === t && t.__root;
1136
+ if (s) {
1137
+ var l = i.indexOf(s);
1138
+ if (l !== -1 && (e === document || e === /** @type {any} */
1139
+ window)) {
1140
+ t.__root = e;
1141
+ return;
1142
+ }
1143
+ var a = i.indexOf(e);
1144
+ if (a === -1)
1145
+ return;
1146
+ l <= a && (f = l);
1147
+ }
1148
+ if (u = /** @type {Element} */
1149
+ i[f] || t.target, u !== e) {
1150
+ Tt(t, "currentTarget", {
1151
+ configurable: !0,
1152
+ get() {
1153
+ return u || r;
1154
+ }
1155
+ });
1156
+ var o = p, c = b;
1157
+ L(null), U(null);
1158
+ try {
1159
+ for (var v, _ = []; u !== null; ) {
1160
+ var d = u.assignedSlot || u.parentNode || /** @type {any} */
1161
+ u.host || null;
1162
+ try {
1163
+ var g = u["__" + n];
1164
+ if (g != null && (!/** @type {any} */
1165
+ u.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1166
+ // -> the target could not have been disabled because it emits the event in the first place
1167
+ t.target === u))
1168
+ if (Pt(g)) {
1169
+ var [y, ...Y] = g;
1170
+ y.apply(u, [t, ...Y]);
1171
+ } else
1172
+ g.call(u, t);
1173
+ } catch (h) {
1174
+ v ? _.push(h) : v = h;
1175
+ }
1176
+ if (t.cancelBubble || d === e || d === null)
1177
+ break;
1178
+ u = d;
1179
+ }
1180
+ if (v) {
1181
+ for (let h of _)
1182
+ queueMicrotask(() => {
1183
+ throw h;
1184
+ });
1185
+ throw v;
1186
+ }
1187
+ } finally {
1188
+ t.__root = e, delete t.currentTarget, L(o), U(c);
1189
+ }
1190
+ }
1191
+ }
1192
+ function xr(t) {
1193
+ var e = document.createElement("template");
1194
+ return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
1195
+ }
1196
+ function Vr(t, e) {
1197
+ var r = (
1198
+ /** @type {Effect} */
1199
+ b
1200
+ );
1201
+ r.nodes_start === null && (r.nodes_start = t, r.nodes_end = e);
1202
+ }
1203
+ // @__NO_SIDE_EFFECTS__
1204
+ function Ie(t, e) {
1205
+ var r = (e & Be) !== 0, n, i = !t.startsWith("<!>");
1206
+ return () => {
1207
+ n === void 0 && (n = xr(i ? t : "<!>" + t), n = /** @type {Node} */
1208
+ /* @__PURE__ */ pe(n));
1209
+ var u = (
1210
+ /** @type {TemplateNode} */
1211
+ r || yr ? document.importNode(n, !0) : n.cloneNode(!0)
1212
+ );
1213
+ return Vr(u, u), u;
1214
+ };
1215
+ }
1216
+ function De(t, e) {
1217
+ t !== null && t.before(
1218
+ /** @type {Node} */
1219
+ e
1220
+ );
1221
+ }
1222
+ function qr(t) {
1223
+ return t.endsWith("capture") && t !== "gotpointercapture" && t !== "lostpointercapture";
1224
+ }
1225
+ const Ur = [
1226
+ "beforeinput",
1227
+ "click",
1228
+ "change",
1229
+ "dblclick",
1230
+ "contextmenu",
1231
+ "focusin",
1232
+ "focusout",
1233
+ "input",
1234
+ "keydown",
1235
+ "keyup",
1236
+ "mousedown",
1237
+ "mousemove",
1238
+ "mouseout",
1239
+ "mouseover",
1240
+ "mouseup",
1241
+ "pointerdown",
1242
+ "pointermove",
1243
+ "pointerout",
1244
+ "pointerover",
1245
+ "pointerup",
1246
+ "touchend",
1247
+ "touchmove",
1248
+ "touchstart"
1249
+ ];
1250
+ function Br(t) {
1251
+ return Ur.includes(t);
1252
+ }
1253
+ const Yr = {
1254
+ // no `class: 'className'` because we handle that separately
1255
+ formnovalidate: "formNoValidate",
1256
+ ismap: "isMap",
1257
+ nomodule: "noModule",
1258
+ playsinline: "playsInline",
1259
+ readonly: "readOnly",
1260
+ defaultvalue: "defaultValue",
1261
+ defaultchecked: "defaultChecked",
1262
+ srcobject: "srcObject",
1263
+ novalidate: "noValidate",
1264
+ allowfullscreen: "allowFullscreen",
1265
+ disablepictureinpicture: "disablePictureInPicture",
1266
+ disableremoteplayback: "disableRemotePlayback"
1267
+ };
1268
+ function Kr(t) {
1269
+ return t = t.toLowerCase(), Yr[t] ?? t;
1270
+ }
1271
+ function Le(t, e) {
1272
+ var r = e == null ? "" : typeof e == "object" ? e + "" : e;
1273
+ r !== (t.__t ??= t.nodeValue) && (t.__t = r, t.nodeValue = r + "");
1274
+ }
1275
+ function $r(t, e) {
1276
+ var r = void 0, n;
1277
+ ye(() => {
1278
+ r !== (r = e()) && (n && (z(n), n = null), r && (n = Ee(() => {
1279
+ ge(() => (
1280
+ /** @type {(node: Element) => void} */
1281
+ r(t)
1282
+ ));
1283
+ })));
1284
+ });
1285
+ }
1286
+ function Me(t) {
1287
+ var e, r, n = "";
1288
+ if (typeof t == "string" || typeof t == "number") n += t;
1289
+ else if (typeof t == "object") if (Array.isArray(t)) {
1290
+ var i = t.length;
1291
+ for (e = 0; e < i; e++) t[e] && (r = Me(t[e])) && (n && (n += " "), n += r);
1292
+ } else for (r in t) t[r] && (n && (n += " "), n += r);
1293
+ return n;
1294
+ }
1295
+ function Hr() {
1296
+ for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = Me(t)) && (n && (n += " "), n += e);
1297
+ return n;
1298
+ }
1299
+ function Wr(t) {
1300
+ return typeof t == "object" ? Hr(t) : t ?? "";
1301
+ }
1302
+ const Wt = [...`
1303
+ \r\f \v\uFEFF`];
1304
+ function zr(t, e, r) {
1305
+ var n = t == null ? "" : "" + t;
1306
+ if (r) {
1307
+ for (var i in r)
1308
+ if (r[i])
1309
+ n = n ? n + " " + i : i;
1310
+ else if (n.length)
1311
+ for (var u = i.length, f = 0; (f = n.indexOf(i, f)) >= 0; ) {
1312
+ var s = f + u;
1313
+ (f === 0 || Wt.includes(n[f - 1])) && (s === n.length || Wt.includes(n[s])) ? n = (f === 0 ? "" : n.substring(0, f)) + n.substring(s + 1) : f = s;
1314
+ }
1315
+ }
1316
+ return n === "" ? null : n;
1317
+ }
1318
+ function zt(t, e = !1) {
1319
+ var r = e ? " !important;" : ";", n = "";
1320
+ for (var i in t) {
1321
+ var u = t[i];
1322
+ u != null && u !== "" && (n += " " + i + ": " + u + r);
1323
+ }
1324
+ return n;
1325
+ }
1326
+ function kt(t) {
1327
+ return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
1328
+ }
1329
+ function Gr(t, e) {
1330
+ if (e) {
1331
+ var r = "", n, i;
1332
+ if (Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, t) {
1333
+ t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1334
+ var u = !1, f = 0, s = !1, l = [];
1335
+ n && l.push(...Object.keys(n).map(kt)), i && l.push(...Object.keys(i).map(kt));
1336
+ var a = 0, o = -1;
1337
+ const g = t.length;
1338
+ for (var c = 0; c < g; c++) {
1339
+ var v = t[c];
1340
+ if (s ? v === "/" && t[c - 1] === "*" && (s = !1) : u ? u === v && (u = !1) : v === "/" && t[c + 1] === "*" ? s = !0 : v === '"' || v === "'" ? u = v : v === "(" ? f++ : v === ")" && f--, !s && u === !1 && f === 0) {
1341
+ if (v === ":" && o === -1)
1342
+ o = c;
1343
+ else if (v === ";" || c === g - 1) {
1344
+ if (o !== -1) {
1345
+ var _ = kt(t.substring(a, o).trim());
1346
+ if (!l.includes(_)) {
1347
+ v !== ";" && c++;
1348
+ var d = t.substring(a, c).trim();
1349
+ r += " " + d + ";";
1350
+ }
1351
+ }
1352
+ a = c + 1, o = -1;
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ return n && (r += zt(n)), i && (r += zt(i, !0)), r = r.trim(), r === "" ? null : r;
1358
+ }
1359
+ return t == null ? null : String(t);
1360
+ }
1361
+ function Zr(t, e, r, n, i, u) {
1362
+ var f = t.__className;
1363
+ if (f !== r || f === void 0) {
1364
+ var s = zr(r, n, u);
1365
+ s == null ? t.removeAttribute("class") : e ? t.className = s : t.setAttribute("class", s), t.__className = r;
1366
+ } else if (u && i !== u)
1367
+ for (var l in u) {
1368
+ var a = !!u[l];
1369
+ (i == null || a !== !!i[l]) && t.classList.toggle(l, a);
1370
+ }
1371
+ return u;
1372
+ }
1373
+ function mt(t, e = {}, r, n) {
1374
+ for (var i in r) {
1375
+ var u = r[i];
1376
+ e[i] !== u && (r[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, u, n));
1377
+ }
1378
+ }
1379
+ function Jr(t, e, r, n) {
1380
+ var i = t.__style;
1381
+ if (i !== e) {
1382
+ var u = Gr(e, n);
1383
+ u == null ? t.removeAttribute("style") : t.style.cssText = u, t.__style = e;
1384
+ } else n && (Array.isArray(n) ? (mt(t, r?.[0], n[0]), mt(t, r?.[1], n[1], "important")) : mt(t, r, n));
1385
+ return n;
1386
+ }
1387
+ function Ct(t, e, r = !1) {
1388
+ if (t.multiple) {
1389
+ if (e == null)
1390
+ return;
1391
+ if (!Pt(e))
1392
+ return lr();
1393
+ for (var n of t.options)
1394
+ n.selected = e.includes(Gt(n));
1395
+ return;
1396
+ }
1397
+ for (n of t.options) {
1398
+ var i = Gt(n);
1399
+ if (wr(i, e)) {
1400
+ n.selected = !0;
1401
+ return;
1402
+ }
1403
+ }
1404
+ (!r || e !== void 0) && (t.selectedIndex = -1);
1405
+ }
1406
+ function Qr(t) {
1407
+ var e = new MutationObserver(() => {
1408
+ Ct(t, t.__value);
1409
+ });
1410
+ e.observe(t, {
1411
+ // Listen to option element changes
1412
+ childList: !0,
1413
+ subtree: !0,
1414
+ // because of <optgroup>
1415
+ // Listen to option element value attribute changes
1416
+ // (doesn't get notified of select value changes,
1417
+ // because that property is not reflected as an attribute)
1418
+ attributes: !0,
1419
+ attributeFilter: ["value"]
1420
+ }), Sr(() => {
1421
+ e.disconnect();
1422
+ });
1423
+ }
1424
+ function Gt(t) {
1425
+ return "__value" in t ? t.__value : t.value;
1426
+ }
1427
+ const nt = Symbol("class"), it = Symbol("style"), je = Symbol("is custom element"), Fe = Symbol("is html");
1428
+ function Xr(t, e) {
1429
+ e ? t.hasAttribute("selected") || t.setAttribute("selected", "") : t.removeAttribute("selected");
1430
+ }
1431
+ function Zt(t, e, r, n) {
1432
+ var i = xe(t);
1433
+ i[e] !== (i[e] = r) && (e === "loading" && (t[Xe] = r), r == null ? t.removeAttribute(e) : typeof r != "string" && Ve(t).includes(e) ? t[e] = r : t.setAttribute(e, r));
1434
+ }
1435
+ function tn(t, e, r, n, i = !1) {
1436
+ var u = xe(t), f = u[je], s = !u[Fe], l = e || {}, a = t.tagName === "OPTION";
1437
+ for (var o in e)
1438
+ o in r || (r[o] = null);
1439
+ r.class ? r.class = Wr(r.class) : r[nt] && (r.class = null), r[it] && (r.style ??= null);
1440
+ var c = Ve(t);
1441
+ for (const h in r) {
1442
+ let w = r[h];
1443
+ if (a && h === "value" && w == null) {
1444
+ t.value = t.__value = "", l[h] = w;
1445
+ continue;
1446
+ }
1447
+ if (h === "class") {
1448
+ var v = t.namespaceURI === "http://www.w3.org/1999/xhtml";
1449
+ Zr(t, v, w, n, e?.[nt], r[nt]), l[h] = w, l[nt] = r[nt];
1450
+ continue;
1451
+ }
1452
+ if (h === "style") {
1453
+ Jr(t, w, e?.[it], r[it]), l[h] = w, l[it] = r[it];
1454
+ continue;
1455
+ }
1456
+ var _ = l[h];
1457
+ if (!(w === _ && !(w === void 0 && t.hasAttribute(h)))) {
1458
+ l[h] = w;
1459
+ var d = h[0] + h[1];
1460
+ if (d !== "$$")
1461
+ if (d === "on") {
1462
+ const S = {}, Z = "$$" + h;
1463
+ let A = h.slice(2);
1464
+ var g = Br(A);
1465
+ if (qr(A) && (A = A.slice(0, -7), S.capture = !0), !g && _) {
1466
+ if (w != null) continue;
1467
+ t.removeEventListener(A, l[Z], S), l[Z] = null;
1468
+ }
1469
+ if (w != null)
1470
+ if (g)
1471
+ t[`__${A}`] = w, Re([A]);
1472
+ else {
1473
+ let qe = function(Ue) {
1474
+ l[h].call(this, Ue);
1475
+ };
1476
+ l[Z] = jr(A, t, qe, S);
1477
+ }
1478
+ else g && (t[`__${A}`] = void 0);
1479
+ } else if (h === "style")
1480
+ Zt(t, h, w);
1481
+ else if (h === "autofocus")
1482
+ mr(
1483
+ /** @type {HTMLElement} */
1484
+ t,
1485
+ !!w
1486
+ );
1487
+ else if (!f && (h === "__value" || h === "value" && w != null))
1488
+ t.value = t.__value = w;
1489
+ else if (h === "selected" && a)
1490
+ Xr(
1491
+ /** @type {HTMLOptionElement} */
1492
+ t,
1493
+ w
1494
+ );
1495
+ else {
1496
+ var y = h;
1497
+ s || (y = Kr(y));
1498
+ var Y = y === "defaultValue" || y === "defaultChecked";
1499
+ if (w == null && !f && !Y)
1500
+ if (u[h] = null, y === "value" || y === "checked") {
1501
+ let S = (
1502
+ /** @type {HTMLInputElement} */
1503
+ t
1504
+ );
1505
+ const Z = e === void 0;
1506
+ if (y === "value") {
1507
+ let A = S.defaultValue;
1508
+ S.removeAttribute(y), S.defaultValue = A, S.value = S.__value = Z ? A : null;
1509
+ } else {
1510
+ let A = S.defaultChecked;
1511
+ S.removeAttribute(y), S.defaultChecked = A, S.checked = Z ? A : !1;
1512
+ }
1513
+ } else
1514
+ t.removeAttribute(h);
1515
+ else Y || c.includes(y) && (f || typeof w != "string") ? (t[y] = w, y in u && (u[y] = E)) : typeof w != "function" && Zt(t, y, w);
1516
+ }
1517
+ }
1518
+ }
1519
+ return l;
1520
+ }
1521
+ function en(t, e, r = [], n = [], i, u = !1) {
1522
+ ce(r, n, (f) => {
1523
+ var s = void 0, l = {}, a = t.nodeName === "SELECT", o = !1;
1524
+ if (ye(() => {
1525
+ var v = e(...f.map(D)), _ = tn(t, s, v, i, u);
1526
+ o && a && "value" in v && Ct(
1527
+ /** @type {HTMLSelectElement} */
1528
+ t,
1529
+ v.value
1530
+ );
1531
+ for (let g of Object.getOwnPropertySymbols(l))
1532
+ v[g] || z(l[g]);
1533
+ for (let g of Object.getOwnPropertySymbols(v)) {
1534
+ var d = v[g];
1535
+ g.description === Ke && (!s || d !== s[g]) && (l[g] && z(l[g]), l[g] = Ee(() => $r(t, () => d))), _[g] = d;
1536
+ }
1537
+ s = _;
1538
+ }), a) {
1539
+ var c = (
1540
+ /** @type {HTMLSelectElement} */
1541
+ t
1542
+ );
1543
+ ge(() => {
1544
+ Ct(
1545
+ c,
1546
+ /** @type {Record<string | symbol, any>} */
1547
+ s.value,
1548
+ !0
1549
+ ), Qr(c);
1550
+ });
1551
+ }
1552
+ o = !0;
1553
+ });
1554
+ }
1555
+ function xe(t) {
1556
+ return (
1557
+ /** @type {Record<string | symbol, unknown>} **/
1558
+ // @ts-expect-error
1559
+ t.__attributes ??= {
1560
+ [je]: t.nodeName.includes("-"),
1561
+ [Fe]: t.namespaceURI === Ye
1562
+ }
1563
+ );
1564
+ }
1565
+ var Jt = /* @__PURE__ */ new Map();
1566
+ function Ve(t) {
1567
+ var e = t.getAttribute("is") || t.nodeName, r = Jt.get(e);
1568
+ if (r) return r;
1569
+ Jt.set(e, r = []);
1570
+ for (var n, i = t, u = Element.prototype; u !== i; ) {
1571
+ n = He(i);
1572
+ for (var f in n)
1573
+ n[f].set && r.push(f);
1574
+ i = te(i);
1575
+ }
1576
+ return r;
1577
+ }
1578
+ const rn = {
1579
+ get(t, e) {
1580
+ if (!t.exclude.includes(e))
1581
+ return t.props[e];
1582
+ },
1583
+ set(t, e) {
1584
+ return !1;
1585
+ },
1586
+ getOwnPropertyDescriptor(t, e) {
1587
+ if (!t.exclude.includes(e) && e in t.props)
1588
+ return {
1589
+ enumerable: !0,
1590
+ configurable: !0,
1591
+ value: t.props[e]
1592
+ };
1593
+ },
1594
+ has(t, e) {
1595
+ return t.exclude.includes(e) ? !1 : e in t.props;
1596
+ },
1597
+ ownKeys(t) {
1598
+ return Reflect.ownKeys(t.props).filter((e) => !t.exclude.includes(e));
1599
+ }
1600
+ };
1601
+ // @__NO_SIDE_EFFECTS__
1602
+ function nn(t, e, r) {
1603
+ return new Proxy(
1604
+ { props: t, exclude: e },
1605
+ rn
1606
+ );
1607
+ }
1608
+ function Qt(t, e, r, n) {
1609
+ var i = (
1610
+ /** @type {V} */
1611
+ n
1612
+ ), u = !0, f = () => (u && (u = !1, i = /** @type {V} */
1613
+ n), i), s;
1614
+ s = /** @type {V} */
1615
+ t[e], s === void 0 && n !== void 0 && (s = f());
1616
+ var l;
1617
+ return l = () => {
1618
+ var a = (
1619
+ /** @type {V} */
1620
+ t[e]
1621
+ );
1622
+ return a === void 0 ? f() : (u = !0, a);
1623
+ }, l;
1624
+ }
1625
+ const un = (t, e) => {
1626
+ x(e, D(e) + 1);
1627
+ };
1628
+ var ln = /* @__PURE__ */ Ie("<button> </button>");
1629
+ function an(t) {
1630
+ let e = /* @__PURE__ */ M(0);
1631
+ var r = ln();
1632
+ r.__click = [un, e];
1633
+ var n = be(r);
1634
+ we(() => Le(n, `count is ${D(e) ?? ""}`)), De(t, r);
1635
+ }
1636
+ Re(["click"]);
1637
+ var fn = /* @__PURE__ */ Ie("<button> </button>");
1638
+ function on(t, e) {
1639
+ sr(e, !0);
1640
+ const r = Qt(e, "primary", 3, !1), n = Qt(e, "size", 3, "medium"), i = /* @__PURE__ */ nn(e, [
1641
+ "$$slots",
1642
+ "$$events",
1643
+ "$$legacy",
1644
+ "primary",
1645
+ "backgroundColor",
1646
+ "size",
1647
+ "label"
1648
+ ]);
1649
+ let u = /* @__PURE__ */ Vt(() => r() ? "storybook-button--primary" : "storybook-button--secondary"), f = /* @__PURE__ */ Vt(() => e.backgroundColor ? `background-color: ${e.backgroundColor}` : "");
1650
+ var s = fn();
1651
+ en(s, (a) => ({ type: "button", class: a, style: D(f), ...i }), [
1652
+ () => [
1653
+ "storybook-button",
1654
+ `storybook-button--${n()}`,
1655
+ D(u)
1656
+ ].join(" ")
1657
+ ]);
1658
+ var l = be(s);
1659
+ we(() => Le(l, e.label)), De(t, s), ar();
1660
+ }
1661
+ export {
1662
+ on as Button,
1663
+ an as Counter
1664
+ };