@pie-players/pie-tool-picture-dictionary 0.3.67

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.
@@ -0,0 +1,2819 @@
1
+ if (typeof window < "u") {
2
+ var ln, fn;
3
+ ((ln = (fn = window).__svelte ?? (fn.__svelte = {})).v ?? (ln.v = /* @__PURE__ */ new Set())).add("5");
4
+ }
5
+ var lt = {}, q = /* @__PURE__ */ Symbol("uninitialized");
6
+ var Pn = Array.isArray, Ui = Array.prototype.indexOf, Qt = Array.prototype.includes, _r = Array.from, er = Object.keys, tr = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, Vi = Object.getOwnPropertyDescriptors, Yi = Object.prototype, Ki = Array.prototype, Nn = Object.getPrototypeOf, un = Object.isExtensible, Gi = () => {
7
+ };
8
+ function Xi(e) {
9
+ for (var t = 0; t < e.length; t++) e[t]();
10
+ }
11
+ function Wn() {
12
+ var e, t;
13
+ return {
14
+ promise: new Promise((r, n) => {
15
+ e = r, t = n;
16
+ }),
17
+ resolve: e,
18
+ reject: t
19
+ };
20
+ }
21
+ function Pt(e) {
22
+ "@babel/helpers - typeof";
23
+ return Pt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
24
+ return typeof t;
25
+ } : function(t) {
26
+ return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
27
+ }, Pt(e);
28
+ }
29
+ function Ji(e, t) {
30
+ if (Pt(e) != "object" || !e) return e;
31
+ var r = e[Symbol.toPrimitive];
32
+ if (r !== void 0) {
33
+ var n = r.call(e, t || "default");
34
+ if (Pt(n) != "object") return n;
35
+ throw new TypeError("@@toPrimitive must return a primitive value.");
36
+ }
37
+ return (t === "string" ? String : Number)(e);
38
+ }
39
+ function Zi(e) {
40
+ var t = Ji(e, "string");
41
+ return Pt(t) == "symbol" ? t : t + "";
42
+ }
43
+ function R(e, t, r) {
44
+ return (t = Zi(t)) in e ? Object.defineProperty(e, t, {
45
+ value: r,
46
+ enumerable: !0,
47
+ configurable: !0,
48
+ writable: !0
49
+ }) : e[t] = r, e;
50
+ }
51
+ var ao = 1 << 24, re = 1024, X = 2048, Ze = 4096, Hr = 8192, Qi = 16384, Br = 32768, cn = 1 << 25, zr = 65536, oo = 1 << 17, lo = 1 << 18, vt = 1 << 19, es = 1 << 20, At = 1 << 25, jt = 65536, dn = 1 << 21, ts = 1 << 22, rr = 1 << 23, Kt = /* @__PURE__ */ Symbol("$state"), Cn = /* @__PURE__ */ Symbol("legacy props"), rs = /* @__PURE__ */ Symbol(""), ns = /* @__PURE__ */ Symbol("proxy path"), Or = /* @__PURE__ */ Symbol("attributes"), is = /* @__PURE__ */ Symbol("class"), ss = /* @__PURE__ */ Symbol("style"), Gt = /* @__PURE__ */ Symbol("text"), Rt = /* @__PURE__ */ Symbol("form reset");
52
+ var qt = new class extends Error {
53
+ constructor(...t) {
54
+ super(...t), R(this, "name", "StaleReactionError"), R(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
55
+ }
56
+ }(), as = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
57
+ function os() {
58
+ throw new Error("https://svelte.dev/e/async_derived_orphan");
59
+ }
60
+ function ls(e, t, r) {
61
+ throw new Error("https://svelte.dev/e/each_key_duplicate");
62
+ }
63
+ function fs(e) {
64
+ throw new Error("https://svelte.dev/e/effect_in_teardown");
65
+ }
66
+ function us() {
67
+ throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
68
+ }
69
+ function cs(e) {
70
+ throw new Error("https://svelte.dev/e/effect_orphan");
71
+ }
72
+ function ds() {
73
+ throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
74
+ }
75
+ function vs() {
76
+ throw new Error("https://svelte.dev/e/hydration_failed");
77
+ }
78
+ function hs(e) {
79
+ throw new Error("https://svelte.dev/e/props_invalid_value");
80
+ }
81
+ function _s() {
82
+ throw new Error("https://svelte.dev/e/state_descriptors_fixed");
83
+ }
84
+ function ps() {
85
+ throw new Error("https://svelte.dev/e/state_prototype_fixed");
86
+ }
87
+ function gs() {
88
+ throw new Error("https://svelte.dev/e/state_unsafe_mutation");
89
+ }
90
+ function ms() {
91
+ throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
92
+ }
93
+ function ys() {
94
+ console.warn("https://svelte.dev/e/derived_inert");
95
+ }
96
+ function pr(e) {
97
+ console.warn("https://svelte.dev/e/hydration_mismatch");
98
+ }
99
+ function ws() {
100
+ console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
101
+ }
102
+ var A = !1;
103
+ function Te(e) {
104
+ A = e;
105
+ }
106
+ var M;
107
+ function Y(e) {
108
+ if (e === null)
109
+ throw pr(), lt;
110
+ return M = e;
111
+ }
112
+ function gr() {
113
+ return Y(/* @__PURE__ */ ke(M));
114
+ }
115
+ function se(e) {
116
+ if (A) {
117
+ if (/* @__PURE__ */ ke(M) !== null)
118
+ throw pr(), lt;
119
+ M = e;
120
+ }
121
+ }
122
+ function bs(e = 1) {
123
+ if (A) {
124
+ for (var t = e, r = M; t--; ) r = /* @__PURE__ */ ke(r);
125
+ M = r;
126
+ }
127
+ }
128
+ function nr(e = !0) {
129
+ for (var t = 0, r = M; ; ) {
130
+ if (r.nodeType === 8) {
131
+ var n = r.data;
132
+ if (n === "]") {
133
+ if (t === 0) return r;
134
+ t -= 1;
135
+ } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (t += 1);
136
+ }
137
+ var i = /* @__PURE__ */ ke(r);
138
+ e && r.remove(), r = i;
139
+ }
140
+ }
141
+ function In(e) {
142
+ if (!e || e.nodeType !== 8)
143
+ throw pr(), lt;
144
+ return e.data;
145
+ }
146
+ function jn(e) {
147
+ return e === this.v;
148
+ }
149
+ function ks(e, t) {
150
+ return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
151
+ }
152
+ function qn(e) {
153
+ return !ks(e, this.v);
154
+ }
155
+ var ve = !1, mr = !1;
156
+ function vn(e, t) {
157
+ return e.label = t, $s(e.v, t), e;
158
+ }
159
+ function $s(e, t) {
160
+ return e?.[ns]?.(t), e;
161
+ }
162
+ var F = null;
163
+ function ft(e) {
164
+ F = e;
165
+ }
166
+ function Fn(e, t = !1, r) {
167
+ F = {
168
+ p: F,
169
+ i: !1,
170
+ c: null,
171
+ e: null,
172
+ s: e,
173
+ x: null,
174
+ r: E,
175
+ l: mr && !t ? {
176
+ s: null,
177
+ u: null,
178
+ $: []
179
+ } : null
180
+ };
181
+ }
182
+ function Dn(e) {
183
+ var t = F, r = t.e;
184
+ if (r !== null) {
185
+ t.e = null;
186
+ for (var n of r) pi(n);
187
+ }
188
+ return e !== void 0 && (t.x = e), t.i = !0, F = t.p, e ?? {};
189
+ }
190
+ function Ft() {
191
+ return !mr || F !== null && F.l === null;
192
+ }
193
+ var qe = [];
194
+ function Hn() {
195
+ var e = qe;
196
+ qe = [], Xi(e);
197
+ }
198
+ function we(e) {
199
+ if (qe.length === 0 && !Ot) {
200
+ var t = qe;
201
+ queueMicrotask(() => {
202
+ t === qe && Hn();
203
+ });
204
+ }
205
+ qe.push(e);
206
+ }
207
+ function Ss() {
208
+ for (; qe.length > 0; ) Hn();
209
+ }
210
+ function Bn(e) {
211
+ var t = E;
212
+ if (t === null)
213
+ return T.f |= rr, e;
214
+ if ((t.f & 32768) === 0 && (t.f & 4) === 0)
215
+ throw e;
216
+ Pe(e, t);
217
+ }
218
+ function Pe(e, t) {
219
+ if (!(t !== null && (t.f & 16384) !== 0)) {
220
+ for (; t !== null; ) {
221
+ if ((t.f & 128) !== 0) {
222
+ if ((t.f & 32768) === 0) throw e;
223
+ try {
224
+ t.b.error(e);
225
+ return;
226
+ } catch (r) {
227
+ e = r;
228
+ }
229
+ }
230
+ t = t.parent;
231
+ }
232
+ throw e;
233
+ }
234
+ }
235
+ var Es = ~(X | Ze | re);
236
+ function P(e, t) {
237
+ e.f = e.f & Es | t;
238
+ }
239
+ function Ur(e) {
240
+ (e.f & 512) !== 0 || e.deps === null ? P(e, re) : P(e, Ze);
241
+ }
242
+ function zn(e) {
243
+ if (e !== null)
244
+ for (const t of e)
245
+ (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= jt, zn(t.deps));
246
+ }
247
+ function Un(e, t, r) {
248
+ (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), zn(e.deps), P(e, re);
249
+ }
250
+ var xs = !1, Ht = !1;
251
+ function Ts(e) {
252
+ var t = Ht;
253
+ try {
254
+ return Ht = !1, [e(), Ht];
255
+ } finally {
256
+ Ht = t;
257
+ }
258
+ }
259
+ var hn = !1;
260
+ function Vn() {
261
+ hn || (hn = !0, document.addEventListener("reset", (e) => {
262
+ Promise.resolve().then(() => {
263
+ if (!e.defaultPrevented) for (const t of e.target.elements) t[Rt]?.();
264
+ });
265
+ }, { capture: !0 }));
266
+ }
267
+ function ht(e) {
268
+ var t = T, r = E;
269
+ ie(null), be(null);
270
+ try {
271
+ return e();
272
+ } finally {
273
+ ie(t), be(r);
274
+ }
275
+ }
276
+ function Ms(e, t, r, n = r) {
277
+ e.addEventListener(t, () => ht(r));
278
+ const i = e[Rt];
279
+ i ? e[Rt] = () => {
280
+ i(), n(!0);
281
+ } : e[Rt] = () => n(!0), Vn();
282
+ }
283
+ function As(e) {
284
+ let t = 0, r = Xe(0), n;
285
+ return () => {
286
+ tn() && ($(r), rn(() => (t === 0 && (n = It(() => e(() => Lt(r)))), t += 1, () => {
287
+ we(() => {
288
+ t -= 1, t === 0 && (n?.(), n = void 0, Lt(r));
289
+ });
290
+ })));
291
+ };
292
+ }
293
+ function Yn(e, t) {
294
+ if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
295
+ }
296
+ function Vr(e, t) {
297
+ Yn(e, t), t.add(e);
298
+ }
299
+ function b(e, t, r) {
300
+ Yn(e, t), t.set(e, r);
301
+ }
302
+ function S(e, t, r) {
303
+ if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
304
+ throw new TypeError("Private element is not present on this object");
305
+ }
306
+ function w(e, t, r) {
307
+ return e.set(S(e, t), r), r;
308
+ }
309
+ function a(e, t) {
310
+ return e.get(S(e, t));
311
+ }
312
+ var Rs = zr | vt;
313
+ function Os(e, t, r, n) {
314
+ new Ls(e, t, r, n);
315
+ }
316
+ var ce = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), Nr = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakSet(), Ls = class {
317
+ constructor(e, t, r, n) {
318
+ Vr(this, D), R(this, "parent", void 0), R(this, "is_pending", !1), R(this, "transform_error", void 0), b(this, ce, void 0), b(this, Lr, A ? M : null), b(this, me, void 0), b(this, Nt, void 0), b(this, ee, void 0), b(this, ye, null), b(this, G, null), b(this, fe, null), b(this, ze, null), b(this, nt, 0), b(this, Ue, 0), b(this, Bt, !1), b(this, Pr, /* @__PURE__ */ new Set()), b(this, Nr, /* @__PURE__ */ new Set()), b(this, We, null), b(this, _n, As(() => (w(We, this, Xe(a(nt, this))), () => {
319
+ w(We, this, null);
320
+ }))), w(ce, this, e), w(me, this, t), w(Nt, this, (i) => {
321
+ var s = E;
322
+ s.b = this, s.f |= 128, r(i);
323
+ }), this.parent = E.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), w(ee, this, nn(() => {
324
+ if (A) {
325
+ const i = a(Lr, this);
326
+ gr();
327
+ const s = i.data === "[!";
328
+ if (i.data.startsWith("[?")) {
329
+ const o = JSON.parse(i.data.slice(2));
330
+ S(D, this, Ns).call(this, o);
331
+ } else s ? S(D, this, Ws).call(this) : S(D, this, Ps).call(this);
332
+ } else S(D, this, Gn).call(this);
333
+ }, Rs)), A && w(ce, this, M);
334
+ }
335
+ defer_effect(e) {
336
+ Un(e, a(Pr, this), a(Nr, this));
337
+ }
338
+ is_rendered() {
339
+ return !this.is_pending && (!this.parent || this.parent.is_rendered());
340
+ }
341
+ has_pending_snippet() {
342
+ return !!a(me, this).pending;
343
+ }
344
+ update_pending_count(e, t) {
345
+ S(D, this, Xn).call(this, e, t), w(nt, this, a(nt, this) + e), !(!a(We, this) || a(Bt, this)) && (w(Bt, this, !0), we(() => {
346
+ w(Bt, this, !1), a(We, this) && ct(a(We, this), a(nt, this));
347
+ }));
348
+ }
349
+ get_effect_pending() {
350
+ return a(_n, this).call(this), $(a(We, this));
351
+ }
352
+ error(e) {
353
+ if (!a(me, this).onerror && !a(me, this).failed) throw e;
354
+ k?.is_fork ? (a(ye, this) && k.skip_effect(a(ye, this)), a(G, this) && k.skip_effect(a(G, this)), a(fe, this) && k.skip_effect(a(fe, this)), k.oncommit(() => {
355
+ S(D, this, pn).call(this, e);
356
+ })) : S(D, this, pn).call(this, e);
357
+ }
358
+ };
359
+ function Ps() {
360
+ try {
361
+ w(ye, this, ne(() => a(Nt, this).call(this, a(ce, this))));
362
+ } catch (e) {
363
+ this.error(e);
364
+ }
365
+ }
366
+ function Ns(e) {
367
+ const t = a(me, this).failed, { reset: r, invoke_onerror: n } = S(D, this, Kn).call(this, e);
368
+ we(n), t && w(fe, this, ne(() => {
369
+ t(a(ce, this), () => e, () => r);
370
+ }));
371
+ }
372
+ function Kn(e) {
373
+ var t = !1, r = !1;
374
+ const n = () => {
375
+ if (t) {
376
+ ws();
377
+ return;
378
+ }
379
+ t = !0, r && ms(), a(fe, this) !== null && et(a(fe, this), () => {
380
+ w(fe, this, null);
381
+ }), S(D, this, Kr).call(this, () => {
382
+ S(D, this, Gn).call(this);
383
+ });
384
+ };
385
+ return {
386
+ reset: n,
387
+ invoke_onerror: () => {
388
+ try {
389
+ r = !0, a(me, this).onerror?.(e, n), r = !1;
390
+ } catch (s) {
391
+ Pe(s, a(ee, this) && a(ee, this).parent);
392
+ }
393
+ }
394
+ };
395
+ }
396
+ function Ws() {
397
+ const e = a(me, this).pending;
398
+ e && (this.is_pending = !0, w(G, this, ne(() => e(a(ce, this)))), we(() => {
399
+ var t = w(ze, this, document.createDocumentFragment()), r = te();
400
+ t.append(r), w(ye, this, S(D, this, Kr).call(this, () => ne(() => a(Nt, this).call(this, r)))), a(Ue, this) === 0 && (a(ce, this).before(t), w(ze, this, null), et(a(G, this), () => {
401
+ w(G, this, null);
402
+ }), S(D, this, Yr).call(this, k));
403
+ }));
404
+ }
405
+ function Gn() {
406
+ try {
407
+ if (this.is_pending = this.has_pending_snippet(), w(Ue, this, 0), w(nt, this, 0), w(ye, this, ne(() => {
408
+ a(Nt, this).call(this, a(ce, this));
409
+ })), a(Ue, this) > 0) {
410
+ var e = w(ze, this, document.createDocumentFragment());
411
+ an(a(ye, this), e);
412
+ const t = a(me, this).pending;
413
+ w(G, this, ne(() => t(a(ce, this))));
414
+ } else S(D, this, Yr).call(this, k);
415
+ } catch (t) {
416
+ this.error(t);
417
+ }
418
+ }
419
+ function Yr(e) {
420
+ this.is_pending = !1, e.transfer_effects(a(Pr, this), a(Nr, this));
421
+ }
422
+ function Kr(e) {
423
+ var t = E, r = T, n = F;
424
+ be(a(ee, this)), ie(a(ee, this)), ft(a(ee, this).ctx);
425
+ try {
426
+ return Qe.ensure(), e();
427
+ } catch (i) {
428
+ return Bn(i), null;
429
+ } finally {
430
+ be(t), ie(r), ft(n);
431
+ }
432
+ }
433
+ function Xn(e, t) {
434
+ if (!this.has_pending_snippet()) {
435
+ if (this.parent) {
436
+ var r;
437
+ S(D, r = this.parent, Xn).call(r, e, t);
438
+ }
439
+ return;
440
+ }
441
+ w(Ue, this, a(Ue, this) + e), a(Ue, this) === 0 && (S(D, this, Yr).call(this, t), a(G, this) && et(a(G, this), () => {
442
+ w(G, this, null);
443
+ }), a(ze, this) && (a(ce, this).before(a(ze, this)), w(ze, this, null)));
444
+ }
445
+ function pn(e) {
446
+ a(ye, this) && (U(a(ye, this)), w(ye, this, null)), a(G, this) && (U(a(G, this)), w(G, this, null)), a(fe, this) && (U(a(fe, this)), w(fe, this, null)), A && (Y(a(Lr, this)), bs(), Y(nr()));
447
+ let t = a(me, this).failed;
448
+ const r = (n) => {
449
+ const { reset: i, invoke_onerror: s } = S(D, this, Kn).call(this, n);
450
+ s(), t && w(fe, this, S(D, this, Kr).call(this, () => {
451
+ try {
452
+ return ne(() => {
453
+ var o = E;
454
+ o.b = this, o.f |= 128, t(a(ce, this), () => n, () => i);
455
+ });
456
+ } catch (o) {
457
+ return Pe(o, a(ee, this).parent), null;
458
+ }
459
+ }));
460
+ };
461
+ we(() => {
462
+ var n;
463
+ try {
464
+ n = this.transform_error(e);
465
+ } catch (i) {
466
+ Pe(i, a(ee, this) && a(ee, this).parent);
467
+ return;
468
+ }
469
+ n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => Pe(i, a(ee, this) && a(ee, this).parent)) : r(n);
470
+ });
471
+ }
472
+ function Cs(e, t, r, n) {
473
+ const i = Ft() ? Wt : Gr;
474
+ var s = e.filter((c) => !c.settled), o = t.map(i);
475
+ if (r.length === 0 && s.length === 0) {
476
+ n(o);
477
+ return;
478
+ }
479
+ var l = E, f = Is(), v = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((c) => c.promise)) : null;
480
+ function _(c) {
481
+ if ((l.f & 16384) === 0) {
482
+ f();
483
+ try {
484
+ n([...o, ...c]);
485
+ } catch (p) {
486
+ Pe(p, l);
487
+ }
488
+ ir();
489
+ }
490
+ }
491
+ var d = Jn();
492
+ if (r.length === 0) {
493
+ v.then(() => _([])).finally(d);
494
+ return;
495
+ }
496
+ function u() {
497
+ Promise.all(r.map((c) => /* @__PURE__ */ js(c))).then(_).catch((c) => Pe(c, l)).finally(d);
498
+ }
499
+ v ? v.then(() => {
500
+ f(), u(), ir();
501
+ }) : u();
502
+ }
503
+ function Is() {
504
+ var e = E, t = T, r = F, n = k;
505
+ if (0) var i;
506
+ return function(o = !0) {
507
+ be(e), ie(t), ft(r), o && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
508
+ };
509
+ }
510
+ function ir(e = !0) {
511
+ be(null), ie(null), ft(null), e && k?.deactivate();
512
+ }
513
+ function Jn() {
514
+ var e = E, t = e.b, r = k, n = !!t?.is_rendered();
515
+ return t?.update_pending_count(1, r), r.increment(n, e), () => {
516
+ t?.update_pending_count(-1, r), r.decrement(n, e);
517
+ };
518
+ }
519
+ // @__NO_SIDE_EFFECTS__
520
+ function Wt(e) {
521
+ var t = 2 | X;
522
+ return E !== null && (E.f |= vt), {
523
+ ctx: F,
524
+ deps: null,
525
+ effects: null,
526
+ equals: jn,
527
+ f: t,
528
+ fn: e,
529
+ reactions: null,
530
+ rv: 0,
531
+ v: q,
532
+ wv: 0,
533
+ parent: E,
534
+ ac: null
535
+ };
536
+ }
537
+ var St = /* @__PURE__ */ Symbol("obsolete");
538
+ // @__NO_SIDE_EFFECTS__
539
+ function js(e, t, r) {
540
+ let n = E;
541
+ n === null && os();
542
+ var i = void 0, s = Xe(q), o = !T, l = /* @__PURE__ */ new Set();
543
+ return ra(() => {
544
+ var f = E, v = Wn();
545
+ i = v.promise;
546
+ try {
547
+ Promise.resolve(e()).then(v.resolve, (c) => {
548
+ c !== qt && v.reject(c);
549
+ }).finally(ir);
550
+ } catch (c) {
551
+ v.reject(c), ir();
552
+ }
553
+ var _ = k;
554
+ if (o) {
555
+ if ((f.f & 32768) !== 0) var d = Jn();
556
+ if (n.b?.is_rendered()) _.async_deriveds.get(f)?.reject(St);
557
+ else for (const c of l.values()) c.reject(St);
558
+ l.add(v), _.async_deriveds.set(f, v);
559
+ }
560
+ const u = (c, p = void 0) => {
561
+ d?.(), l.delete(v), p !== St && (_.activate(), p ? (s.f |= rr, ct(s, p)) : ((s.f & 8388608) !== 0 && (s.f ^= rr), ct(s, c)), _.deactivate());
562
+ };
563
+ v.promise.then(u, (c) => u(null, c || "unknown"));
564
+ }), _i(() => {
565
+ for (const f of l) f.reject(St);
566
+ }), new Promise((f) => {
567
+ function v(_) {
568
+ function d() {
569
+ _ === i ? f(s) : v(i);
570
+ }
571
+ _.then(d, d);
572
+ }
573
+ v(i);
574
+ });
575
+ }
576
+ // @__NO_SIDE_EFFECTS__
577
+ function gn(e) {
578
+ const t = /* @__PURE__ */ Wt(e);
579
+ return ve || bi(t), t;
580
+ }
581
+ // @__NO_SIDE_EFFECTS__
582
+ function Gr(e) {
583
+ const t = /* @__PURE__ */ Wt(e);
584
+ return t.equals = qn, t;
585
+ }
586
+ function qs(e) {
587
+ var t = e.effects;
588
+ if (t !== null) {
589
+ e.effects = null;
590
+ for (var r = 0; r < t.length; r += 1) U(t[r]);
591
+ }
592
+ }
593
+ function Xr(e) {
594
+ var t, r = E, n = e.parent;
595
+ if (!Ae && n !== null && e.v !== q && (n.f & 24576) !== 0)
596
+ return ys(), e.v;
597
+ be(n);
598
+ try {
599
+ e.f &= ~jt, qs(e), t = Ei(e);
600
+ } finally {
601
+ be(r);
602
+ }
603
+ return t;
604
+ }
605
+ function Zn(e) {
606
+ var t = Xr(e);
607
+ if (!e.equals(t) && (e.wv = $i(), (!k?.is_fork || e.deps === null) && (k !== null ? (k.capture(e, t, !0), ar?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
608
+ P(e, re);
609
+ return;
610
+ }
611
+ Ae || (z !== null ? (tn() || k?.is_fork) && z.set(e, t) : Ur(e));
612
+ }
613
+ function Fs(e) {
614
+ if (e.effects !== null)
615
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac !== null && ht(() => {
616
+ t.ac.abort(qt), t.ac = null;
617
+ }), t.fn !== null && (t.teardown = Gi), Ct(t, 0), sn(t));
618
+ }
619
+ function Qn(e) {
620
+ if (e.effects !== null)
621
+ for (const t of e.effects) t.teardown && t.fn !== null && dt(t);
622
+ }
623
+ var ei, sr = null, it = null, k = null, ar = null, z = null, Wr = null, Ot = !1, kr = !1, ut = null, or = null, ti = 0;
624
+ var Ds = 1, lr = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), st = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), Cr = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakSet(), Qe = class ri {
625
+ constructor() {
626
+ Vr(this, W), R(this, "id", Ds++), b(this, lr, !1), R(this, "linked", !0), b(this, Ve, null), b(this, Fe, null), R(this, "async_deriveds", /* @__PURE__ */ new Map()), R(this, "current", /* @__PURE__ */ new Map()), R(this, "previous", /* @__PURE__ */ new Map()), b(this, fr, /* @__PURE__ */ new Set()), b(this, zt, /* @__PURE__ */ new Set()), b(this, st, 0), b(this, Ie, /* @__PURE__ */ new Map()), b(this, Et, null), b(this, Z, []), b(this, Cr, []), b(this, Ge, /* @__PURE__ */ new Set()), b(this, Me, /* @__PURE__ */ new Set()), b(this, Le, /* @__PURE__ */ new Map()), b(this, Xt, /* @__PURE__ */ new Set()), R(this, "is_fork", !1), b(this, xt, !1), it === null ? sr = it = this : (w(Fe, it, this), w(Ve, this, it)), it = this;
627
+ }
628
+ skip_effect(t) {
629
+ a(Le, this).has(t) || a(Le, this).set(t, {
630
+ d: [],
631
+ m: []
632
+ }), a(Xt, this).delete(t);
633
+ }
634
+ unskip_effect(t, r = (n) => this.schedule(n)) {
635
+ var n = a(Le, this).get(t);
636
+ if (n) {
637
+ a(Le, this).delete(t);
638
+ for (var i of n.d)
639
+ P(i, X), r(i);
640
+ for (i of n.m)
641
+ P(i, Ze), r(i);
642
+ }
643
+ a(Xt, this).add(t);
644
+ }
645
+ capture(t, r, n = !1) {
646
+ t.v !== q && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, n]), z?.set(t, r)), this.is_fork || (t.v = r);
647
+ }
648
+ activate() {
649
+ k = this;
650
+ }
651
+ deactivate() {
652
+ k = null, z = null;
653
+ }
654
+ flush() {
655
+ try {
656
+ kr = !0, k = this, S(W, this, ur).call(this);
657
+ } finally {
658
+ ti = 0, Wr = null, ut = null, or = null, kr = !1, k = null, z = null, Ye.clear();
659
+ }
660
+ }
661
+ discard() {
662
+ for (const t of a(zt, this)) t(this);
663
+ a(zt, this).clear();
664
+ for (const t of this.async_deriveds.values()) t.reject(St);
665
+ S(W, this, cr).call(this), a(Et, this)?.resolve();
666
+ }
667
+ register_created_effect(t) {
668
+ a(Cr, this).push(t);
669
+ }
670
+ increment(t, r) {
671
+ if (w(st, this, a(st, this) + 1), t) {
672
+ let n = a(Ie, this).get(r) ?? 0;
673
+ a(Ie, this).set(r, n + 1);
674
+ }
675
+ }
676
+ decrement(t, r) {
677
+ if (w(st, this, a(st, this) - 1), t) {
678
+ let n = a(Ie, this).get(r) ?? 0;
679
+ n === 1 ? a(Ie, this).delete(r) : a(Ie, this).set(r, n - 1);
680
+ }
681
+ a(xt, this) || (w(xt, this, !0), we(() => {
682
+ w(xt, this, !1), this.linked && this.flush();
683
+ }));
684
+ }
685
+ transfer_effects(t, r) {
686
+ for (const n of t) a(Ge, this).add(n);
687
+ for (const n of r) a(Me, this).add(n);
688
+ t.clear(), r.clear();
689
+ }
690
+ oncommit(t) {
691
+ a(fr, this).add(t);
692
+ }
693
+ ondiscard(t) {
694
+ a(zt, this).add(t);
695
+ }
696
+ settled() {
697
+ return (a(Et, this) ?? w(Et, this, Wn())).promise;
698
+ }
699
+ static ensure() {
700
+ if (k === null) {
701
+ const t = k = new ri();
702
+ !kr && !Ot && we(() => {
703
+ a(lr, t) || t.flush();
704
+ });
705
+ }
706
+ return k;
707
+ }
708
+ apply() {
709
+ if (!ve || !this.is_fork && a(Ve, this) === null && a(Fe, this) === null) {
710
+ z = null;
711
+ return;
712
+ }
713
+ z = /* @__PURE__ */ new Map();
714
+ for (const [r, [n]] of this.current) z.set(r, n);
715
+ for (let r = sr; r !== null; r = a(Fe, r))
716
+ if (!(r === this || r.is_fork)) {
717
+ var t = !1;
718
+ if (r.id < this.id) {
719
+ for (const [n, [, i]] of r.current)
720
+ if (!i && this.current.has(n)) {
721
+ t = !0;
722
+ break;
723
+ }
724
+ }
725
+ if (!t)
726
+ for (const [n, i] of r.previous) z.has(n) || z.set(n, i);
727
+ }
728
+ }
729
+ schedule(t) {
730
+ if (Wr = t, t.b?.is_pending && (t.f & 16777228) !== 0 && (t.f & 32768) === 0) {
731
+ t.b.defer_effect(t);
732
+ return;
733
+ }
734
+ for (var r = t; r.parent !== null; ) {
735
+ r = r.parent;
736
+ var n = r.f;
737
+ if (ut !== null && r === E && (ve || (T === null || (T.f & 2) === 0) && !xs))
738
+ return;
739
+ if ((n & 96) !== 0) {
740
+ if ((n & 1024) === 0) return;
741
+ r.f ^= re;
742
+ }
743
+ }
744
+ a(Z, this).push(r);
745
+ }
746
+ };
747
+ ei = Qe;
748
+ function mn() {
749
+ if (this.is_fork) return !0;
750
+ for (const r of a(Ie, this).keys()) {
751
+ for (var e = r, t = !1; e.parent !== null; ) {
752
+ if (a(Le, this).has(e)) {
753
+ t = !0;
754
+ break;
755
+ }
756
+ e = e.parent;
757
+ }
758
+ if (!t) return !0;
759
+ }
760
+ return !1;
761
+ }
762
+ function ur() {
763
+ w(lr, this, !0), ti++ > 1e3 && (S(W, this, cr).call(this), Us());
764
+ for (const l of a(Ge, this))
765
+ a(Me, this).delete(l), P(l, X), this.schedule(l);
766
+ for (const l of a(Me, this))
767
+ P(l, Ze), this.schedule(l);
768
+ const e = a(Z, this);
769
+ w(Z, this, []), this.apply();
770
+ var t = ut = [], r = [], n = or = [];
771
+ for (const l of e) try {
772
+ S(W, this, ni).call(this, l, t, r);
773
+ } catch (f) {
774
+ throw ai(l), S(W, this, mn).call(this) || this.discard(), f;
775
+ }
776
+ if (k = null, n.length > 0) {
777
+ var i = ei.ensure();
778
+ for (const l of n) i.schedule(l);
779
+ }
780
+ if (ut = null, or = null, S(W, this, mn).call(this)) {
781
+ S(W, this, Tt).call(this, r), S(W, this, Tt).call(this, t);
782
+ for (const [l, f] of a(Le, this)) si(l, f);
783
+ n.length > 0 && S(W, k, ur).call(k);
784
+ return;
785
+ }
786
+ const s = S(W, this, Hs).call(this);
787
+ if (s) {
788
+ S(W, this, Tt).call(this, r), S(W, this, Tt).call(this, t), S(W, s, Bs).call(s, this);
789
+ return;
790
+ }
791
+ a(Ge, this).clear(), a(Me, this).clear();
792
+ for (const l of a(fr, this)) l(this);
793
+ a(fr, this).clear(), ar = this, yn(r), yn(t), ar = null, a(Et, this)?.resolve();
794
+ var o = k;
795
+ if (a(st, this) === 0 && (a(Z, this).length === 0 || o !== null) && (S(W, this, cr).call(this), ve && (S(W, this, zs).call(this), k = o)), a(Z, this).length > 0)
796
+ if (o !== null) {
797
+ const l = o;
798
+ a(Z, l).push(...a(Z, this).filter((f) => !a(Z, l).includes(f)));
799
+ } else o = this;
800
+ o !== null && S(W, o, ur).call(o);
801
+ }
802
+ function ni(e, t, r) {
803
+ e.f ^= re;
804
+ for (var n = e.first; n !== null; ) {
805
+ var i = n.f, s = (i & 96) !== 0;
806
+ if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(Le, this).has(n)) && n.fn !== null) {
807
+ s ? n.f ^= re : (i & 4) !== 0 ? t.push(n) : ve && (i & 16777224) !== 0 ? r.push(n) : Dt(n) && ((i & 16) !== 0 && a(Me, this).add(n), dt(n));
808
+ var o = n.first;
809
+ if (o !== null) {
810
+ n = o;
811
+ continue;
812
+ }
813
+ }
814
+ for (; n !== null; ) {
815
+ var l = n.next;
816
+ if (l !== null) {
817
+ n = l;
818
+ break;
819
+ }
820
+ n = n.parent;
821
+ }
822
+ }
823
+ }
824
+ function Hs() {
825
+ for (var e = a(Ve, this); e !== null; ) {
826
+ if (!e.is_fork) {
827
+ for (const [t, [, r]] of this.current) if (e.current.has(t) && !r) return e;
828
+ }
829
+ e = a(Ve, e);
830
+ }
831
+ return null;
832
+ }
833
+ function Bs(e) {
834
+ for (const [r, n] of e.current)
835
+ !this.previous.has(r) && e.previous.has(r) && this.previous.set(r, e.previous.get(r)), this.current.set(r, n);
836
+ for (const [r, n] of e.async_deriveds) {
837
+ const i = this.async_deriveds.get(r);
838
+ i && n.promise.then(i.resolve).catch(i.reject);
839
+ }
840
+ e.async_deriveds.clear(), this.transfer_effects(a(Ge, e), a(Me, e));
841
+ const t = (r) => {
842
+ var n = r.reactions;
843
+ if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
844
+ for (const o of n) {
845
+ var i = o.f;
846
+ if ((i & 2) !== 0) t(o);
847
+ else {
848
+ var s = o;
849
+ i & 4194320 && !this.async_deriveds.has(s) && (a(Me, this).delete(s), P(s, X), this.schedule(s));
850
+ }
851
+ }
852
+ };
853
+ for (const r of this.current.keys()) t(r);
854
+ this.oncommit(() => e.discard()), S(W, e, cr).call(e), k = this, S(W, this, ur).call(this);
855
+ }
856
+ function Tt(e) {
857
+ for (var t = 0; t < e.length; t += 1) Un(e[t], a(Ge, this), a(Me, this));
858
+ }
859
+ function zs() {
860
+ for (let _ = sr; _ !== null; _ = a(Fe, _)) {
861
+ var e = _.id < this.id, t = [];
862
+ for (const [d, [u, c]] of this.current) {
863
+ if (_.current.has(d)) {
864
+ var r = _.current.get(d)[0];
865
+ if (e && u !== r) _.current.set(d, [u, c]);
866
+ else continue;
867
+ }
868
+ t.push(d);
869
+ }
870
+ if (e) for (const [d, u] of this.async_deriveds) {
871
+ const c = _.async_deriveds.get(d);
872
+ c && u.promise.then(c.resolve).catch(c.reject);
873
+ }
874
+ var n = [..._.current.keys()].filter((d) => !_.current.get(d)[1]);
875
+ if (!(!a(lr, _) || n.length === 0)) {
876
+ var i = n.filter((d) => !this.current.has(d));
877
+ if (i.length === 0)
878
+ e && _.discard();
879
+ else if (t.length > 0) {
880
+ if (e) for (const d of a(Xt, this)) _.unskip_effect(d, (u) => {
881
+ (u.f & 4194320) !== 0 ? _.schedule(u) : S(W, _, Tt).call(_, [u]);
882
+ });
883
+ _.activate();
884
+ var s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
885
+ for (var l of t) ii(l, i, s, o);
886
+ o = /* @__PURE__ */ new Map();
887
+ var f = [..._.current].filter(([d, u]) => {
888
+ const c = this.current.get(d);
889
+ return c ? c[0] !== u[0] || c[1] !== u[1] : !0;
890
+ }).map(([d]) => d);
891
+ if (f.length > 0)
892
+ for (const d of a(Cr, this)) (d.f & 155648) === 0 && Jr(d, f, o) && ((d.f & 4194320) !== 0 ? (P(d, X), _.schedule(d)) : a(Ge, _).add(d));
893
+ if (a(Z, _).length > 0 && !a(xt, _)) {
894
+ _.apply();
895
+ for (var v of a(Z, _)) S(W, _, ni).call(_, v, [], []);
896
+ w(Z, _, []);
897
+ }
898
+ _.deactivate();
899
+ }
900
+ }
901
+ }
902
+ }
903
+ function cr() {
904
+ if (this.linked) {
905
+ var e = a(Ve, this), t = a(Fe, this);
906
+ e === null ? sr = t : w(Fe, e, t), t === null ? it = e : w(Ve, t, e), this.linked = !1;
907
+ }
908
+ }
909
+ function le(e) {
910
+ var t = Ot;
911
+ Ot = !0;
912
+ try {
913
+ var r;
914
+ for (e && (k !== null && !k.is_fork && k.flush(), r = e()); ; ) {
915
+ if (Ss(), k === null) return r;
916
+ k.flush();
917
+ }
918
+ } finally {
919
+ Ot = t;
920
+ }
921
+ }
922
+ function Us() {
923
+ if (0) {
924
+ var e;
925
+ for (const r of k.current.keys()) for (const [n, i] of r.updated ?? [])
926
+ var t;
927
+ }
928
+ try {
929
+ ds();
930
+ } catch (r) {
931
+ Pe(r, Wr);
932
+ }
933
+ }
934
+ var ge = null;
935
+ function yn(e) {
936
+ var t = e.length;
937
+ if (t !== 0) {
938
+ for (var r = 0; r < t; ) {
939
+ var n = e[r++];
940
+ if ((n.f & 24576) === 0 && Dt(n) && (ge = /* @__PURE__ */ new Set(), dt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && mi(n), ge?.size > 0)) {
941
+ Ye.clear();
942
+ for (const i of ge) {
943
+ if ((i.f & 24576) !== 0) continue;
944
+ const s = [i];
945
+ let o = i.parent;
946
+ for (; o !== null; )
947
+ ge.has(o) && (ge.delete(o), s.push(o)), o = o.parent;
948
+ for (let l = s.length - 1; l >= 0; l--) {
949
+ const f = s[l];
950
+ (f.f & 24576) === 0 && dt(f);
951
+ }
952
+ }
953
+ ge.clear();
954
+ }
955
+ }
956
+ ge = null;
957
+ }
958
+ }
959
+ function ii(e, t, r, n) {
960
+ if (!r.has(e) && (r.add(e), e.reactions !== null))
961
+ for (const i of e.reactions) {
962
+ const s = i.f;
963
+ (s & 2) !== 0 ? ii(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && Jr(i, t, n) && (P(i, X), Zr(i));
964
+ }
965
+ }
966
+ function Jr(e, t, r) {
967
+ const n = r.get(e);
968
+ if (n !== void 0) return n;
969
+ if (e.deps !== null) for (const i of e.deps) {
970
+ if (Qt.call(t, i)) return !0;
971
+ if ((i.f & 2) !== 0 && Jr(i, t, r))
972
+ return r.set(i, !0), !0;
973
+ }
974
+ return r.set(e, !1), !1;
975
+ }
976
+ function Zr(e) {
977
+ k.schedule(e);
978
+ }
979
+ function si(e, t) {
980
+ if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
981
+ (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), P(e, re);
982
+ for (var r = e.first; r !== null; )
983
+ si(r, t), r = r.next;
984
+ }
985
+ }
986
+ function ai(e) {
987
+ P(e, re);
988
+ for (var t = e.first; t !== null; )
989
+ ai(t), t = t.next;
990
+ }
991
+ var dr = /* @__PURE__ */ new Set(), Ye = /* @__PURE__ */ new Map();
992
+ var oi = !1;
993
+ function Xe(e, t) {
994
+ var r = {
995
+ f: 0,
996
+ v: e,
997
+ reactions: null,
998
+ equals: jn,
999
+ rv: 0,
1000
+ wv: 0
1001
+ };
1002
+ return r;
1003
+ }
1004
+ // @__NO_SIDE_EFFECTS__
1005
+ function pe(e, t) {
1006
+ const r = Xe(e, t);
1007
+ return bi(r), r;
1008
+ }
1009
+ // @__NO_SIDE_EFFECTS__
1010
+ function li(e, t = !1, r = !0) {
1011
+ const n = Xe(e);
1012
+ if (t || (n.equals = qn), mr && r && F !== null && F.l !== null) {
1013
+ var i;
1014
+ ((i = F.l).s ?? (i.s = [])).push(n);
1015
+ }
1016
+ return n;
1017
+ }
1018
+ function Q(e, t, r = !1) {
1019
+ T !== null && (!ue || (T.f & 131072) !== 0) && Ft() && (T.f & 4325394) !== 0 && (de === null || !de.has(e)) && gs();
1020
+ let n = r ? De(t) : t;
1021
+ return ct(e, n, or);
1022
+ }
1023
+ function ct(e, t, r = null) {
1024
+ if (!e.equals(t)) {
1025
+ Ye.set(e, Ae ? t : e.v);
1026
+ var n = Qe.ensure();
1027
+ if (n.capture(e, t), (e.f & 2) !== 0) {
1028
+ const i = e;
1029
+ (e.f & 2048) !== 0 && Xr(i), z === null && Ur(i);
1030
+ }
1031
+ e.wv = $i(), fi(e, X, r), Ft() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (J === null ? aa([e]) : J.push(e)), !n.is_fork && dr.size > 0 && !oi && Vs();
1032
+ }
1033
+ return t;
1034
+ }
1035
+ function Vs() {
1036
+ oi = !1;
1037
+ for (const e of dr) {
1038
+ (e.f & 1024) !== 0 && P(e, Ze);
1039
+ let t;
1040
+ try {
1041
+ t = Dt(e);
1042
+ } catch {
1043
+ t = !0;
1044
+ }
1045
+ t && dt(e);
1046
+ }
1047
+ dr.clear();
1048
+ }
1049
+ function Lt(e) {
1050
+ Q(e, e.v + 1);
1051
+ }
1052
+ function fi(e, t, r) {
1053
+ var n = e.reactions;
1054
+ if (n !== null)
1055
+ for (var i = Ft(), s = n.length, o = 0; o < s; o++) {
1056
+ var l = n[o], f = l.f;
1057
+ if (!(!i && l === E)) {
1058
+ var v = (f & X) === 0;
1059
+ if (v && P(l, t), (f & 131072) !== 0) dr.add(l);
1060
+ else if ((f & 2) !== 0) {
1061
+ var _ = l;
1062
+ z?.delete(_), (f & 65536) === 0 && (f & 512 && (E === null || (E.f & 2097152) === 0) && (l.f |= jt), fi(_, Ze, r));
1063
+ } else if (v) {
1064
+ var d = l;
1065
+ (f & 16) !== 0 && ge !== null && ge.add(d), r !== null ? r.push(d) : Zr(d);
1066
+ }
1067
+ }
1068
+ }
1069
+ }
1070
+ var Ys = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
1071
+ function De(e) {
1072
+ if (typeof e != "object" || e === null || Kt in e) return e;
1073
+ const t = Nn(e);
1074
+ if (t !== Yi && t !== Ki) return e;
1075
+ var r = /* @__PURE__ */ new Map(), n = Pn(e), i = /* @__PURE__ */ pe(0), s = null, o = Ke, l = (d) => {
1076
+ if (Ke === o) return d();
1077
+ var u = T, c = Ke;
1078
+ ie(null), $n(o);
1079
+ var p = d();
1080
+ return ie(u), $n(c), p;
1081
+ };
1082
+ n && r.set("length", /* @__PURE__ */ pe(e.length, s));
1083
+ var f = "";
1084
+ let v = !1;
1085
+ function _(d) {
1086
+ if (!v) {
1087
+ v = !0, f = d, vn(i, `${f} version`);
1088
+ for (const [u, c] of r) vn(c, Ks(f, u));
1089
+ v = !1;
1090
+ }
1091
+ }
1092
+ return new Proxy(e, {
1093
+ defineProperty(d, u, c) {
1094
+ (!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && _s();
1095
+ var p = r.get(u);
1096
+ return p === void 0 ? l(() => {
1097
+ var g = /* @__PURE__ */ pe(c.value, s);
1098
+ return r.set(u, g), g;
1099
+ }) : Q(p, c.value, !0), !0;
1100
+ },
1101
+ deleteProperty(d, u) {
1102
+ var c = r.get(u);
1103
+ if (c === void 0) {
1104
+ if (u in d) {
1105
+ const p = l(() => /* @__PURE__ */ pe(q, s));
1106
+ r.set(u, p), Lt(i);
1107
+ }
1108
+ } else
1109
+ Q(c, q), Lt(i);
1110
+ return !0;
1111
+ },
1112
+ get(d, u, c) {
1113
+ if (u === Kt) return e;
1114
+ var p = r.get(u), g = u in d;
1115
+ if (p === void 0 && (!g || Be(d, u)?.writable) && (p = l(() => {
1116
+ var m = De(g ? d[u] : q), O = /* @__PURE__ */ pe(m, s);
1117
+ return O;
1118
+ }), r.set(u, p)), p !== void 0) {
1119
+ var h = $(p);
1120
+ return h === q ? void 0 : h;
1121
+ }
1122
+ return Reflect.get(d, u, c);
1123
+ },
1124
+ getOwnPropertyDescriptor(d, u) {
1125
+ var c = Reflect.getOwnPropertyDescriptor(d, u);
1126
+ if (c && "value" in c) {
1127
+ var p = r.get(u);
1128
+ p && (c.value = $(p));
1129
+ } else if (c === void 0) {
1130
+ var g = r.get(u), h = g?.v;
1131
+ if (g !== void 0 && h !== q) return {
1132
+ enumerable: !0,
1133
+ configurable: !0,
1134
+ value: h,
1135
+ writable: !0
1136
+ };
1137
+ }
1138
+ return c;
1139
+ },
1140
+ has(d, u) {
1141
+ if (u === Kt) return !0;
1142
+ var c = r.get(u), p = c !== void 0 && c.v !== q || Reflect.has(d, u);
1143
+ return (c !== void 0 || E !== null && (!p || Be(d, u)?.writable)) && (c === void 0 && (c = l(() => {
1144
+ var g = p ? De(d[u]) : q, h = /* @__PURE__ */ pe(g, s);
1145
+ return h;
1146
+ }), r.set(u, c)), $(c) === q) ? !1 : p;
1147
+ },
1148
+ set(d, u, c, p) {
1149
+ var g = r.get(u), h = u in d;
1150
+ if (n && u === "length") for (var m = c; m < g.v; m += 1) {
1151
+ var O = r.get(m + "");
1152
+ O !== void 0 ? Q(O, q) : m in d && (O = l(() => /* @__PURE__ */ pe(q, s)), r.set(m + "", O));
1153
+ }
1154
+ if (g === void 0)
1155
+ (!h || Be(d, u)?.writable) && (g = l(() => /* @__PURE__ */ pe(void 0, s)), Q(g, De(c)), r.set(u, g));
1156
+ else {
1157
+ h = g.v !== q;
1158
+ var C = l(() => De(c));
1159
+ Q(g, C);
1160
+ }
1161
+ var x = Reflect.getOwnPropertyDescriptor(d, u);
1162
+ if (x?.set && x.set.call(p, c), !h) {
1163
+ if (n && typeof u == "string") {
1164
+ var H = r.get("length"), y = Number(u);
1165
+ Number.isInteger(y) && y >= H.v && Q(H, y + 1);
1166
+ }
1167
+ Lt(i);
1168
+ }
1169
+ return !0;
1170
+ },
1171
+ ownKeys(d) {
1172
+ $(i);
1173
+ var u = Reflect.ownKeys(d).filter((g) => {
1174
+ var h = r.get(g);
1175
+ return h === void 0 || h.v !== q;
1176
+ });
1177
+ for (var [c, p] of r) p.v !== q && !(c in d) && u.push(c);
1178
+ return u;
1179
+ },
1180
+ setPrototypeOf() {
1181
+ ps();
1182
+ }
1183
+ });
1184
+ }
1185
+ function Ks(e, t) {
1186
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : Ys.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1187
+ }
1188
+ var wn, Gs, ui, ci, di;
1189
+ function Ir() {
1190
+ if (wn === void 0) {
1191
+ wn = window, Gs = document, ui = /Firefox/.test(navigator.userAgent);
1192
+ var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1193
+ ci = Be(t, "firstChild").get, di = Be(t, "nextSibling").get, un(e) && (e[is] = void 0, e[Or] = null, e[ss] = void 0, e.__e = void 0), un(r) && (r[Gt] = void 0);
1194
+ }
1195
+ }
1196
+ function te(e = "") {
1197
+ return document.createTextNode(e);
1198
+ }
1199
+ // @__NO_SIDE_EFFECTS__
1200
+ function Je(e) {
1201
+ return ci.call(e);
1202
+ }
1203
+ // @__NO_SIDE_EFFECTS__
1204
+ function ke(e) {
1205
+ return di.call(e);
1206
+ }
1207
+ function he(e, t) {
1208
+ if (!A) return /* @__PURE__ */ Je(e);
1209
+ var r = /* @__PURE__ */ Je(M);
1210
+ if (r === null) r = M.appendChild(te());
1211
+ else if (t && r.nodeType !== 3) {
1212
+ var n = te();
1213
+ return r?.before(n), Y(n), n;
1214
+ }
1215
+ return t && en(r), Y(r), r;
1216
+ }
1217
+ function Xs(e, t = !1) {
1218
+ if (!A) {
1219
+ var r = /* @__PURE__ */ Je(e);
1220
+ return r instanceof Comment && r.data === "" ? /* @__PURE__ */ ke(r) : r;
1221
+ }
1222
+ if (t) {
1223
+ if (M?.nodeType !== 3) {
1224
+ var n = te();
1225
+ return M?.before(n), Y(n), n;
1226
+ }
1227
+ en(M);
1228
+ }
1229
+ return M;
1230
+ }
1231
+ function yt(e, t = 1, r = !1) {
1232
+ let n = A ? M : e;
1233
+ for (var i; t--; )
1234
+ i = n, n = /* @__PURE__ */ ke(n);
1235
+ if (!A) return n;
1236
+ if (r) {
1237
+ if (n?.nodeType !== 3) {
1238
+ var s = te();
1239
+ return n === null ? i?.after(s) : n.before(s), Y(s), s;
1240
+ }
1241
+ en(n);
1242
+ }
1243
+ return Y(n), n;
1244
+ }
1245
+ function vi(e) {
1246
+ e.textContent = "";
1247
+ }
1248
+ function hi() {
1249
+ return !ve || ge !== null ? !1 : (E.f & Br) !== 0;
1250
+ }
1251
+ function Qr(e, t, r) {
1252
+ return t == null || t === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(e, { is: r }) : document.createElement(e) : r ? document.createElementNS(t, e, { is: r }) : document.createElementNS(t, e);
1253
+ }
1254
+ function en(e) {
1255
+ if (e.nodeValue.length < 65536) return;
1256
+ let t = e.nextSibling;
1257
+ for (; t !== null && t.nodeType === 3; )
1258
+ t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1259
+ }
1260
+ function Js(e) {
1261
+ E === null && (T === null && cs(e), us()), Ae && fs(e);
1262
+ }
1263
+ function Zs(e, t) {
1264
+ var r = t.last;
1265
+ r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1266
+ }
1267
+ function $e(e, t) {
1268
+ var r = E;
1269
+ r !== null && (r.f & 8192) !== 0 && (e |= Hr);
1270
+ var n = {
1271
+ ctx: F,
1272
+ deps: null,
1273
+ nodes: null,
1274
+ f: e | X | 512,
1275
+ first: null,
1276
+ fn: t,
1277
+ last: null,
1278
+ next: null,
1279
+ parent: r,
1280
+ b: r && r.b,
1281
+ prev: null,
1282
+ teardown: null,
1283
+ wv: 0,
1284
+ ac: null
1285
+ };
1286
+ k?.register_created_effect(n);
1287
+ var i = n;
1288
+ if ((e & 4) !== 0)
1289
+ ut !== null ? ut.push(n) : Qe.ensure().schedule(n);
1290
+ else if (t !== null) {
1291
+ try {
1292
+ dt(n);
1293
+ } catch (o) {
1294
+ throw U(n), o;
1295
+ }
1296
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (e & 16) !== 0 && (e & 65536) !== 0 && i !== null && (i.f |= zr));
1297
+ }
1298
+ if (i !== null && (i.parent = r, r !== null && Zs(i, r), T !== null && (T.f & 2) !== 0 && (e & 64) === 0)) {
1299
+ var s = T;
1300
+ (s.effects ?? (s.effects = [])).push(i);
1301
+ }
1302
+ return n;
1303
+ }
1304
+ function tn() {
1305
+ return T !== null && !ue;
1306
+ }
1307
+ function _i(e) {
1308
+ const t = $e(8, null);
1309
+ return P(t, re), t.teardown = e, t;
1310
+ }
1311
+ function bn(e) {
1312
+ Js("$effect");
1313
+ var t = E.f;
1314
+ if (!T && (t & 32) !== 0 && F !== null && !F.i) {
1315
+ var r = F;
1316
+ (r.e ?? (r.e = [])).push(e);
1317
+ } else return pi(e);
1318
+ }
1319
+ function pi(e) {
1320
+ return $e(4 | es, e);
1321
+ }
1322
+ function Qs(e) {
1323
+ Qe.ensure();
1324
+ const t = $e(64 | vt, e);
1325
+ return () => {
1326
+ U(t);
1327
+ };
1328
+ }
1329
+ function ea(e) {
1330
+ Qe.ensure();
1331
+ const t = $e(64 | vt, e);
1332
+ return (r = {}) => new Promise((n) => {
1333
+ r.outro ? et(t, () => {
1334
+ U(t), n(void 0);
1335
+ }) : (U(t), n(void 0));
1336
+ });
1337
+ }
1338
+ function ta(e) {
1339
+ return $e(4, e);
1340
+ }
1341
+ function ra(e) {
1342
+ return $e(ts | vt, e);
1343
+ }
1344
+ function rn(e, t = 0) {
1345
+ return $e(8 | t, e);
1346
+ }
1347
+ function rt(e, t = [], r = [], n = []) {
1348
+ Cs(n, t, r, (i) => {
1349
+ $e(8, () => {
1350
+ e(...i.map($));
1351
+ });
1352
+ });
1353
+ }
1354
+ function nn(e, t = 0) {
1355
+ var r = $e(16 | t, e);
1356
+ return r;
1357
+ }
1358
+ function ne(e) {
1359
+ return $e(32 | vt, e);
1360
+ }
1361
+ function gi(e) {
1362
+ var t = e.teardown;
1363
+ if (t !== null) {
1364
+ const r = Ae, n = T;
1365
+ kn(!0), ie(null);
1366
+ try {
1367
+ t.call(null);
1368
+ } finally {
1369
+ kn(r), ie(n);
1370
+ }
1371
+ }
1372
+ }
1373
+ function sn(e, t = !1) {
1374
+ var r = e.first;
1375
+ for (e.first = e.last = null; r !== null; ) {
1376
+ const i = r.ac;
1377
+ i !== null && ht(() => {
1378
+ i.abort(qt);
1379
+ });
1380
+ var n = r.next;
1381
+ (r.f & 64) !== 0 ? r.parent = null : U(r, t), r = n;
1382
+ }
1383
+ }
1384
+ function na(e) {
1385
+ for (var t = e.first; t !== null; ) {
1386
+ var r = t.next;
1387
+ (t.f & 32) === 0 && U(t), t = r;
1388
+ }
1389
+ }
1390
+ function U(e, t = !0) {
1391
+ var r = !1;
1392
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ia(e.nodes.start, e.nodes.end), r = !0), e.f |= cn, sn(e, t && !r), Ct(e, 0);
1393
+ var n = e.nodes && e.nodes.t;
1394
+ if (n !== null) for (const s of n) s.stop();
1395
+ gi(e), e.f ^= cn, e.f |= Qi;
1396
+ var i = e.parent;
1397
+ i !== null && i.first !== null && mi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1398
+ }
1399
+ function ia(e, t) {
1400
+ for (; e !== null; ) {
1401
+ var r = e === t ? null : /* @__PURE__ */ ke(e);
1402
+ e.remove(), e = r;
1403
+ }
1404
+ }
1405
+ function mi(e) {
1406
+ var t = e.parent, r = e.prev, n = e.next;
1407
+ r !== null && (r.next = n), n !== null && (n.prev = r), t !== null && (t.first === e && (t.first = n), t.last === e && (t.last = r));
1408
+ }
1409
+ function et(e, t, r = !0) {
1410
+ var n = [];
1411
+ yi(e, n, !0);
1412
+ var i = () => {
1413
+ r && U(e), t && t();
1414
+ }, s = n.length;
1415
+ if (s > 0) {
1416
+ var o = () => --s || i();
1417
+ for (var l of n) l.out(o);
1418
+ } else i();
1419
+ }
1420
+ function yi(e, t, r) {
1421
+ if ((e.f & 8192) === 0) {
1422
+ e.f ^= Hr;
1423
+ var n = e.nodes && e.nodes.t;
1424
+ if (n !== null)
1425
+ for (const l of n) (l.is_global || r) && t.push(l);
1426
+ for (var i = e.first; i !== null; ) {
1427
+ var s = i.next;
1428
+ if ((i.f & 64) === 0) {
1429
+ var o = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
1430
+ yi(i, t, o ? r : !1);
1431
+ }
1432
+ i = s;
1433
+ }
1434
+ }
1435
+ }
1436
+ function vr(e) {
1437
+ wi(e, !0);
1438
+ }
1439
+ function wi(e, t) {
1440
+ if ((e.f & 8192) !== 0) {
1441
+ e.f ^= Hr, (e.f & 1024) === 0 && (P(e, X), Qe.ensure().schedule(e));
1442
+ for (var r = e.first; r !== null; ) {
1443
+ var n = r.next, i = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1444
+ wi(r, i ? t : !1), r = n;
1445
+ }
1446
+ var s = e.nodes && e.nodes.t;
1447
+ if (s !== null)
1448
+ for (const o of s) (o.is_global || t) && o.in();
1449
+ }
1450
+ }
1451
+ function an(e, t) {
1452
+ if (e.nodes)
1453
+ for (var r = e.nodes.start, n = e.nodes.end; r !== null; ) {
1454
+ var i = r === n ? null : /* @__PURE__ */ ke(r);
1455
+ t.append(r), r = i;
1456
+ }
1457
+ }
1458
+ var sa = null, Jt = !1, Ae = !1;
1459
+ function kn(e) {
1460
+ Ae = e;
1461
+ }
1462
+ var T = null, ue = !1;
1463
+ function ie(e) {
1464
+ T = e;
1465
+ }
1466
+ var E = null;
1467
+ function be(e) {
1468
+ E = e;
1469
+ }
1470
+ var de = null;
1471
+ function bi(e) {
1472
+ T !== null && (!ve || (T.f & 2) !== 0) && (de ?? (de = /* @__PURE__ */ new Set())).add(e);
1473
+ }
1474
+ var V = null, K = 0, J = null;
1475
+ function aa(e) {
1476
+ J = e;
1477
+ }
1478
+ var ki = 1, He = 0, Ke = He;
1479
+ function $n(e) {
1480
+ Ke = e;
1481
+ }
1482
+ function $i() {
1483
+ return ++ki;
1484
+ }
1485
+ function Dt(e) {
1486
+ var t = e.f;
1487
+ if ((t & 2048) !== 0) return !0;
1488
+ if (t & 2 && (e.f &= ~jt), (t & 4096) !== 0) {
1489
+ for (var r = e.deps, n = r.length, i = 0; i < n; i++) {
1490
+ var s = r[i];
1491
+ if (Dt(s) && Zn(s), s.wv > e.wv) return !0;
1492
+ }
1493
+ (t & 512) !== 0 && z === null && P(e, re);
1494
+ }
1495
+ return !1;
1496
+ }
1497
+ function Si(e, t, r = !0) {
1498
+ var n = e.reactions;
1499
+ if (n !== null && !(!ve && de !== null && de.has(e)))
1500
+ for (var i = 0; i < n.length; i++) {
1501
+ var s = n[i];
1502
+ (s.f & 2) !== 0 ? Si(s, t, !1) : t === s && (r ? P(s, X) : (s.f & 1024) !== 0 && P(s, Ze), Zr(s));
1503
+ }
1504
+ }
1505
+ function Ei(e) {
1506
+ var t = V, r = K, n = J, i = T, s = de, o = F, l = ue, f = Ke, v = e.f;
1507
+ V = null, K = 0, J = null, T = (v & 96) === 0 ? e : null, de = null, ft(e.ctx), ue = !1, Ke = ++He, e.ac !== null && (ht(() => {
1508
+ e.ac.abort(qt);
1509
+ }), e.ac = null);
1510
+ try {
1511
+ e.f |= dn;
1512
+ var _ = e.fn, d = _();
1513
+ e.f |= Br;
1514
+ var u = e.deps, c = k?.is_fork;
1515
+ if (V !== null) {
1516
+ var p;
1517
+ if (c || Ct(e, K), u !== null && K > 0)
1518
+ for (u.length = K + V.length, p = 0; p < V.length; p++) u[K + p] = V[p];
1519
+ else e.deps = u = V;
1520
+ if (tn() && (e.f & 512) !== 0) for (p = K; p < u.length; p++) {
1521
+ var g;
1522
+ ((g = u[p]).reactions ?? (g.reactions = [])).push(e);
1523
+ }
1524
+ } else !c && u !== null && K < u.length && (Ct(e, K), u.length = K);
1525
+ if (Ft() && J !== null && !ue && u !== null && (e.f & 6146) === 0) for (p = 0; p < J.length; p++) Si(J[p], e);
1526
+ if (i !== null && i !== e) {
1527
+ if (He++, i.deps !== null) for (let h = 0; h < r; h += 1) i.deps[h].rv = He;
1528
+ if (t !== null) for (const h of t) h.rv = He;
1529
+ J !== null && (n === null ? n = J : n.push(...J));
1530
+ }
1531
+ return (e.f & 8388608) !== 0 && (e.f ^= rr), d;
1532
+ } catch (h) {
1533
+ return Bn(h);
1534
+ } finally {
1535
+ e.f ^= dn, V = t, K = r, J = n, T = i, de = s, ft(o), ue = l, Ke = f;
1536
+ }
1537
+ }
1538
+ function oa(e, t) {
1539
+ let r = t.reactions;
1540
+ if (r !== null) {
1541
+ var n = Ui.call(r, e);
1542
+ if (n !== -1) {
1543
+ var i = r.length - 1;
1544
+ i === 0 ? r = t.reactions = null : (r[n] = r[i], r.pop());
1545
+ }
1546
+ }
1547
+ if (r === null && (t.f & 2) !== 0 && (V === null || !Qt.call(V, t))) {
1548
+ var s = t;
1549
+ (s.f & 512) !== 0 && (s.f ^= 512, s.f &= ~jt), s.v !== q && Ur(s), s.ac !== null && ht(() => {
1550
+ s.ac.abort(qt), s.ac = null, P(s, X);
1551
+ }), Fs(s), Ct(s, 0);
1552
+ }
1553
+ }
1554
+ function Ct(e, t) {
1555
+ var r = e.deps;
1556
+ if (r !== null)
1557
+ for (var n = t; n < r.length; n++) oa(e, r[n]);
1558
+ }
1559
+ function dt(e) {
1560
+ var t = e.f;
1561
+ if ((t & 16384) === 0) {
1562
+ P(e, re);
1563
+ var r = E, n = Jt;
1564
+ if (E = e, Jt = (t & 96) === 0, 0)
1565
+ var i, s;
1566
+ try {
1567
+ (t & 16777232) !== 0 ? na(e) : sn(e), gi(e);
1568
+ var o = Ei(e);
1569
+ if (e.teardown = typeof o == "function" ? o : null, e.wv = ki, 0)
1570
+ for (var l of e.deps) ;
1571
+ } finally {
1572
+ Jt = n, E = r;
1573
+ }
1574
+ }
1575
+ }
1576
+ async function la() {
1577
+ if (ve) return new Promise((e) => {
1578
+ requestAnimationFrame(() => e()), setTimeout(() => e());
1579
+ });
1580
+ await Promise.resolve(), le();
1581
+ }
1582
+ function $(e) {
1583
+ var t = (e.f & 2) !== 0;
1584
+ if (sa?.add(e), T !== null && !ue && !(E !== null && (E.f & 16384) !== 0) && (de === null || !de.has(e))) {
1585
+ var r = T.deps;
1586
+ if ((T.f & 2097152) !== 0)
1587
+ e.rv < He && (e.rv = He, V === null && r !== null && r[K] === e ? K++ : V === null ? V = [e] : V.push(e));
1588
+ else {
1589
+ var n;
1590
+ (n = T).deps ?? (n.deps = []), Qt.call(T.deps, e) || T.deps.push(e);
1591
+ var i = e.reactions;
1592
+ i === null ? e.reactions = [T] : Qt.call(i, T) || i.push(T);
1593
+ }
1594
+ }
1595
+ if (0) {
1596
+ if (!ue && reactivity_loss_tracker && k === null && ar === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(e))
1597
+ var s;
1598
+ if (tracing_mode_flag && !ue && tracing_expressions !== null && T !== null && tracing_expressions.reaction === T && !e.trace) {
1599
+ if (s)
1600
+ var o, l;
1601
+ }
1602
+ }
1603
+ if (Ae && Ye.has(e)) return Ye.get(e);
1604
+ if (t) {
1605
+ var f = e;
1606
+ if (Ae) {
1607
+ var v = f.v;
1608
+ return ((f.f & 1024) === 0 && f.reactions !== null || Ti(f)) && (v = Xr(f)), Ye.set(f, v), v;
1609
+ }
1610
+ var _ = (f.f & 512) === 0 && !ue && T !== null && (Jt || (T.f & 512) !== 0), d = (f.f & Br) === 0;
1611
+ Dt(f) && (_ && (f.f |= 512), Zn(f)), _ && !d && (Qn(f), xi(f));
1612
+ }
1613
+ if (z?.has(e)) return z.get(e);
1614
+ if ((e.f & 8388608) !== 0) throw e.v;
1615
+ return e.v;
1616
+ }
1617
+ function xi(e) {
1618
+ if (e.f |= 512, e.deps !== null)
1619
+ for (const t of e.deps)
1620
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (Qn(t), xi(t));
1621
+ }
1622
+ function Ti(e) {
1623
+ if (e.v === q) return !0;
1624
+ if (e.deps === null) return !1;
1625
+ for (const t of e.deps)
1626
+ if (Ye.has(t) || (t.f & 2) !== 0 && Ti(t)) return !0;
1627
+ return !1;
1628
+ }
1629
+ function It(e) {
1630
+ var t = ue;
1631
+ try {
1632
+ return ue = !0, e();
1633
+ } finally {
1634
+ ue = t;
1635
+ }
1636
+ }
1637
+ var Ut = /* @__PURE__ */ Symbol("events"), fa = /* @__PURE__ */ new Set(), Sn = /* @__PURE__ */ new Set();
1638
+ function ua(e, t, r, n = {}) {
1639
+ function i(s) {
1640
+ if (n.capture || jr.call(t, s), !s.cancelBubble) return ht(() => r?.call(this, s));
1641
+ }
1642
+ return e.startsWith("pointer") || e.startsWith("touch") || e === "wheel" ? we(() => {
1643
+ t.addEventListener(e, i, n);
1644
+ }) : t.addEventListener(e, i, n), i;
1645
+ }
1646
+ function ca(e, t, r, n, i) {
1647
+ var s = {
1648
+ capture: n,
1649
+ passive: i
1650
+ }, o = ua(e, t, r, s);
1651
+ (t === document.body || t === window || t === document || t instanceof HTMLMediaElement) && _i(() => {
1652
+ t.removeEventListener(e, o, s);
1653
+ });
1654
+ }
1655
+ var En = null;
1656
+ function jr(e) {
1657
+ var t = this, r = t.ownerDocument, n = e.type, i = e.composedPath?.() || [], s = i[0] || e.target;
1658
+ En = e;
1659
+ var o = 0, l = En === e && e[Ut];
1660
+ if (l) {
1661
+ var f = i.indexOf(l);
1662
+ if (f !== -1 && (t === document || t === window)) {
1663
+ e[Ut] = t;
1664
+ return;
1665
+ }
1666
+ var v = i.indexOf(t);
1667
+ if (v === -1) return;
1668
+ f <= v && (o = f);
1669
+ }
1670
+ if (s = i[o] || e.target, s !== t) {
1671
+ tr(e, "currentTarget", {
1672
+ configurable: !0,
1673
+ get() {
1674
+ return s || r;
1675
+ }
1676
+ });
1677
+ var _ = T, d = E;
1678
+ ie(null), be(null);
1679
+ try {
1680
+ for (var u, c = []; s !== null && s !== t; ) {
1681
+ try {
1682
+ var p = s[Ut]?.[n];
1683
+ p != null && (!s.disabled || e.target === s) && p.call(s, e);
1684
+ } catch (g) {
1685
+ u ? c.push(g) : u = g;
1686
+ }
1687
+ if (e.cancelBubble) break;
1688
+ o++, s = o < i.length ? i[o] : null;
1689
+ }
1690
+ if (u) {
1691
+ for (let g of c) queueMicrotask(() => {
1692
+ throw g;
1693
+ });
1694
+ throw u;
1695
+ }
1696
+ } finally {
1697
+ e[Ut] = t, delete e.currentTarget, ie(_), be(d);
1698
+ }
1699
+ }
1700
+ }
1701
+ var da = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1702
+ function va(e) {
1703
+ return da?.createHTML(e) ?? e;
1704
+ }
1705
+ function ha(e) {
1706
+ var t = Qr("template");
1707
+ return t.innerHTML = va(e.replaceAll("<!>", "<!---->")), t.content;
1708
+ }
1709
+ function ot(e, t) {
1710
+ var r = E;
1711
+ r.nodes === null && (r.nodes = {
1712
+ start: e,
1713
+ end: t,
1714
+ a: null,
1715
+ t: null
1716
+ });
1717
+ }
1718
+ // @__NO_SIDE_EFFECTS__
1719
+ function Ne(e, t) {
1720
+ var r = (t & 1) !== 0, n = (t & 2) !== 0, i, s = !e.startsWith("<!>");
1721
+ return () => {
1722
+ if (A)
1723
+ return ot(M, null), M;
1724
+ i === void 0 && (i = ha(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ Je(i)));
1725
+ var o = n || ui ? document.importNode(i, !0) : i.cloneNode(!0);
1726
+ if (r) {
1727
+ var l = /* @__PURE__ */ Je(o), f = o.lastChild;
1728
+ ot(l, f);
1729
+ } else ot(o, o);
1730
+ return o;
1731
+ };
1732
+ }
1733
+ function _a() {
1734
+ if (A)
1735
+ return ot(M, null), M;
1736
+ var e = document.createDocumentFragment(), t = document.createComment(""), r = te();
1737
+ return e.append(t, r), ot(t, r), e;
1738
+ }
1739
+ function oe(e, t) {
1740
+ if (A) {
1741
+ var r = E;
1742
+ ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = M), gr();
1743
+ return;
1744
+ }
1745
+ e !== null && e.before(t);
1746
+ }
1747
+ var pa = [
1748
+ "allowfullscreen",
1749
+ "async",
1750
+ "autofocus",
1751
+ "autoplay",
1752
+ "checked",
1753
+ "controls",
1754
+ "default",
1755
+ "disabled",
1756
+ "formnovalidate",
1757
+ "indeterminate",
1758
+ "inert",
1759
+ "ismap",
1760
+ "loop",
1761
+ "multiple",
1762
+ "muted",
1763
+ "nomodule",
1764
+ "novalidate",
1765
+ "open",
1766
+ "playsinline",
1767
+ "readonly",
1768
+ "required",
1769
+ "reversed",
1770
+ "seamless",
1771
+ "selected",
1772
+ "webkitdirectory",
1773
+ "defer",
1774
+ "disablepictureinpicture",
1775
+ "disableremoteplayback"
1776
+ ], uo = [
1777
+ ...pa,
1778
+ "formNoValidate",
1779
+ "isMap",
1780
+ "noModule",
1781
+ "playsInline",
1782
+ "readOnly",
1783
+ "value",
1784
+ "volume",
1785
+ "defaultValue",
1786
+ "defaultChecked",
1787
+ "srcObject",
1788
+ "noValidate",
1789
+ "allowFullscreen",
1790
+ "disablePictureInPicture",
1791
+ "disableRemotePlayback"
1792
+ ], ga = ["touchstart", "touchmove"];
1793
+ function ma(e) {
1794
+ return ga.includes(e);
1795
+ }
1796
+ var ya = [
1797
+ "$state",
1798
+ "$state.raw",
1799
+ "$derived",
1800
+ "$derived.by"
1801
+ ], co = [
1802
+ ...ya,
1803
+ "$state.eager",
1804
+ "$state.snapshot",
1805
+ "$props",
1806
+ "$props.id",
1807
+ "$bindable",
1808
+ "$effect",
1809
+ "$effect.pre",
1810
+ "$effect.tracking",
1811
+ "$effect.root",
1812
+ "$effect.pending",
1813
+ "$inspect",
1814
+ "$inspect().with",
1815
+ "$inspect.trace",
1816
+ "$host"
1817
+ ], xn = !0;
1818
+ function wt(e, t) {
1819
+ var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1820
+ r !== (e[Gt] ?? (e[Gt] = e.nodeValue)) && (e[Gt] = r, e.nodeValue = `${r}`);
1821
+ }
1822
+ function Mi(e, t) {
1823
+ return Ai(e, t);
1824
+ }
1825
+ function wa(e, t) {
1826
+ Ir(), t.intro = t.intro ?? !1;
1827
+ const r = t.target, n = A, i = M;
1828
+ try {
1829
+ for (var s = /* @__PURE__ */ Je(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ ke(s);
1830
+ if (!s) throw lt;
1831
+ Te(!0), Y(s);
1832
+ const o = Ai(e, {
1833
+ ...t,
1834
+ anchor: s
1835
+ });
1836
+ return Te(!1), o;
1837
+ } catch (o) {
1838
+ if (o instanceof Error && o.message.split(`
1839
+ `).some((l) => l.startsWith("https://svelte.dev/e/"))) throw o;
1840
+ return o !== lt && console.warn("Failed to hydrate: ", o), t.recover === !1 && vs(), Ir(), vi(r), Te(!1), Mi(e, t);
1841
+ } finally {
1842
+ Te(n), Y(i);
1843
+ }
1844
+ }
1845
+ var Vt = /* @__PURE__ */ new Map();
1846
+ function Ai(e, { target: t, anchor: r, props: n = {}, events: i, context: s, intro: o = !0, transformError: l }) {
1847
+ Ir();
1848
+ var f = void 0, v = ea(() => {
1849
+ var _ = r ?? t.appendChild(te());
1850
+ Os(_, { pending: () => {
1851
+ } }, (c) => {
1852
+ Fn({});
1853
+ var p = F;
1854
+ if (s && (p.c = s), i && (n.$$events = i), A && ot(c, null), xn = o, f = e(c, n) || {}, xn = !0, A && (E.nodes.end = M, M === null || M.nodeType !== 8 || M.data !== "]"))
1855
+ throw pr(), lt;
1856
+ Dn();
1857
+ }, l);
1858
+ var d = /* @__PURE__ */ new Set(), u = (c) => {
1859
+ for (var p = 0; p < c.length; p++) {
1860
+ var g = c[p];
1861
+ if (!d.has(g)) {
1862
+ d.add(g);
1863
+ var h = ma(g);
1864
+ for (const C of [t, document]) {
1865
+ var m = Vt.get(C);
1866
+ m === void 0 && (m = /* @__PURE__ */ new Map(), Vt.set(C, m));
1867
+ var O = m.get(g);
1868
+ O === void 0 ? (C.addEventListener(g, jr, { passive: h }), m.set(g, 1)) : m.set(g, O + 1);
1869
+ }
1870
+ }
1871
+ }
1872
+ };
1873
+ return u(_r(fa)), Sn.add(u), () => {
1874
+ for (var c of d) for (const h of [t, document]) {
1875
+ var p = Vt.get(h), g = p.get(c);
1876
+ --g == 0 ? (h.removeEventListener(c, jr), p.delete(c), p.size === 0 && Vt.delete(h)) : p.set(c, g);
1877
+ }
1878
+ Sn.delete(u), _ !== r && _.parentNode?.removeChild(_);
1879
+ };
1880
+ });
1881
+ return qr.set(f, v), f;
1882
+ }
1883
+ var qr = /* @__PURE__ */ new WeakMap();
1884
+ function ba(e, t) {
1885
+ const r = qr.get(e);
1886
+ return r ? (qr.delete(e), r(t)) : Promise.resolve();
1887
+ }
1888
+ var Ee = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), $r = /* @__PURE__ */ new WeakMap(), Sr = /* @__PURE__ */ new WeakMap(), Tn = /* @__PURE__ */ new WeakMap(), ka = class {
1889
+ constructor(e, t = !0) {
1890
+ R(this, "anchor", void 0), b(this, Ee, /* @__PURE__ */ new Map()), b(this, Re, /* @__PURE__ */ new Map()), b(this, ae, /* @__PURE__ */ new Map()), b(this, bt, /* @__PURE__ */ new Set()), b(this, $r, !0), b(this, Sr, (r) => {
1891
+ if (a(Ee, this).has(r)) {
1892
+ var n = a(Ee, this).get(r), i = a(Re, this).get(n);
1893
+ if (i)
1894
+ vr(i), a(bt, this).delete(n);
1895
+ else {
1896
+ var s = a(ae, this).get(n);
1897
+ s && (vr(s.effect), a(Re, this).set(n, s.effect), a(ae, this).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), i = s.effect);
1898
+ }
1899
+ for (const [o, l] of a(Ee, this)) {
1900
+ if (a(Ee, this).delete(o), o === r) break;
1901
+ const f = a(ae, this).get(l);
1902
+ f && (U(f.effect), a(ae, this).delete(l));
1903
+ }
1904
+ for (const [o, l] of a(Re, this)) {
1905
+ if (o === n || a(bt, this).has(o)) continue;
1906
+ const f = () => {
1907
+ if (Array.from(a(Ee, this).values()).includes(o)) {
1908
+ var v = document.createDocumentFragment();
1909
+ an(l, v), v.append(te()), a(ae, this).set(o, {
1910
+ effect: l,
1911
+ fragment: v
1912
+ });
1913
+ } else U(l);
1914
+ a(bt, this).delete(o), a(Re, this).delete(o);
1915
+ };
1916
+ a($r, this) || !i ? (a(bt, this).add(o), et(l, f, !1)) : f();
1917
+ }
1918
+ }
1919
+ }), b(this, Tn, (r) => {
1920
+ a(Ee, this).delete(r);
1921
+ const n = Array.from(a(Ee, this).values());
1922
+ for (const [i, s] of a(ae, this)) n.includes(i) || (U(s.effect), a(ae, this).delete(i));
1923
+ }), this.anchor = e, w($r, this, t);
1924
+ }
1925
+ ensure(e, t) {
1926
+ var r = k, n = hi();
1927
+ if (t && !a(Re, this).has(e) && !a(ae, this).has(e))
1928
+ if (n) {
1929
+ var i = document.createDocumentFragment(), s = te();
1930
+ i.append(s), a(ae, this).set(e, {
1931
+ effect: ne(() => t(s)),
1932
+ fragment: i
1933
+ });
1934
+ } else a(Re, this).set(e, ne(() => t(this.anchor)));
1935
+ if (a(Ee, this).set(r, e), n) {
1936
+ for (const [o, l] of a(Re, this)) o === e ? r.unskip_effect(l) : r.skip_effect(l);
1937
+ for (const [o, l] of a(ae, this)) o === e ? r.unskip_effect(l.effect) : r.skip_effect(l.effect);
1938
+ r.oncommit(a(Sr, this)), r.ondiscard(a(Tn, this));
1939
+ } else
1940
+ A && (this.anchor = M), a(Sr, this).call(this, r);
1941
+ }
1942
+ };
1943
+ function Er(e, t, r = !1) {
1944
+ var n;
1945
+ A && (n = M, gr());
1946
+ var i = new ka(e), s = r ? zr : 0;
1947
+ function o(l, f) {
1948
+ if (A) {
1949
+ var v = In(n);
1950
+ if (l !== parseInt(v.substring(1))) {
1951
+ var _ = nr();
1952
+ Y(_), i.anchor = _, Te(!1), i.ensure(l, f), Te(!0);
1953
+ return;
1954
+ }
1955
+ }
1956
+ i.ensure(l, f);
1957
+ }
1958
+ nn(() => {
1959
+ var l = !1;
1960
+ t((f, v = 0) => {
1961
+ l = !0, o(v, f);
1962
+ }), l || o(-1, null);
1963
+ }, s);
1964
+ }
1965
+ function $a(e, t, r) {
1966
+ for (var n = [], i = t.length, s, o = t.length, l = 0; l < i; l++) {
1967
+ let d = t[l];
1968
+ et(d, () => {
1969
+ if (s) {
1970
+ if (s.pending.delete(d), s.done.add(d), s.pending.size === 0) {
1971
+ var u = e.outrogroups;
1972
+ Fr(e, _r(s.done)), u.delete(s), u.size === 0 && (e.outrogroups = null);
1973
+ }
1974
+ } else o -= 1;
1975
+ }, !1);
1976
+ }
1977
+ if (o === 0) {
1978
+ var f = n.length === 0 && r !== null;
1979
+ if (f) {
1980
+ var v = r, _ = v.parentNode;
1981
+ vi(_), _.append(v), e.items.clear();
1982
+ }
1983
+ Fr(e, t, !f);
1984
+ } else
1985
+ s = {
1986
+ pending: new Set(t),
1987
+ done: /* @__PURE__ */ new Set()
1988
+ }, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(s);
1989
+ }
1990
+ function Fr(e, t, r = !0) {
1991
+ var n;
1992
+ if (e.pending.size > 0) {
1993
+ n = /* @__PURE__ */ new Set();
1994
+ for (const o of e.pending.values()) for (const l of o) n.add(e.items.get(l).e);
1995
+ }
1996
+ for (var i = 0; i < t.length; i++) {
1997
+ var s = t[i];
1998
+ if (n?.has(s)) {
1999
+ s.f |= At;
2000
+ const o = document.createDocumentFragment();
2001
+ an(s, o);
2002
+ } else U(t[i], r);
2003
+ }
2004
+ }
2005
+ var Yt;
2006
+ function Sa(e, t, r, n, i, s = null) {
2007
+ var o = e, l = /* @__PURE__ */ new Map();
2008
+ if ((t & 4) !== 0) {
2009
+ var f = e;
2010
+ o = A ? Y(/* @__PURE__ */ Je(f)) : f.appendChild(te());
2011
+ }
2012
+ A && gr();
2013
+ var v = null, _ = /* @__PURE__ */ Gr(() => {
2014
+ var m = r();
2015
+ return Pn(m) ? m : m == null ? [] : _r(m);
2016
+ }), d, u = /* @__PURE__ */ new Map(), c = !0;
2017
+ function p(m) {
2018
+ (h.effect.f & 16384) === 0 && (h.pending.delete(m), h.fallback = v, Ea(h, d, o, t, n), v !== null && (d.length === 0 ? (v.f & 33554432) === 0 ? vr(v) : (v.f ^= At, Mt(v, null, o)) : et(v, () => {
2019
+ v = null;
2020
+ })));
2021
+ }
2022
+ function g(m) {
2023
+ h.pending.delete(m);
2024
+ }
2025
+ var h = {
2026
+ effect: nn(() => {
2027
+ d = $(_);
2028
+ var m = d.length;
2029
+ let O = !1;
2030
+ A && In(o) === "[!" != (m === 0) && (o = nr(), Y(o), Te(!1), O = !0);
2031
+ for (var C = /* @__PURE__ */ new Set(), x = k, H = hi(), y = 0; y < m; y += 1) {
2032
+ A && M.nodeType === 8 && M.data === "]" && (o = M, O = !0, Te(!1));
2033
+ var I = d[y], B = n(I, y);
2034
+ if (0)
2035
+ var _t;
2036
+ var N = c ? null : l.get(B);
2037
+ N ? (N.v && ct(N.v, I), N.i && ct(N.i, y), H && x.unskip_effect(N.e)) : (N = xa(l, c ? o : Yt ?? (Yt = te()), I, B, y, i, t, r), c || (N.e.f |= At), l.set(B, N)), C.add(B);
2038
+ }
2039
+ if (m === 0 && s && !v && (c ? v = ne(() => s(o)) : (v = ne(() => s(Yt ?? (Yt = te()))), v.f |= At)), m > C.size && ls("", "", ""), A && m > 0 && Y(nr()), !c)
2040
+ if (u.set(x, C), H) {
2041
+ for (const [yr, pt] of l) C.has(yr) || x.skip_effect(pt.e);
2042
+ x.oncommit(p), x.ondiscard(g);
2043
+ } else p(x);
2044
+ O && Te(!0), $(_);
2045
+ }),
2046
+ flags: t,
2047
+ items: l,
2048
+ pending: u,
2049
+ outrogroups: null,
2050
+ fallback: v
2051
+ };
2052
+ c = !1, A && (o = M);
2053
+ }
2054
+ function kt(e) {
2055
+ for (; e !== null && (e.f & 32) === 0; ) e = e.next;
2056
+ return e;
2057
+ }
2058
+ function Ea(e, t, r, n, i) {
2059
+ var s = (n & 8) !== 0, o = t.length, l = e.items, f = kt(e.effect.first), v, _ = null, d, u = [], c = [], p, g, h, m;
2060
+ if (s) for (m = 0; m < o; m += 1)
2061
+ p = t[m], g = i(p, m), h = l.get(g).e, (h.f & 33554432) === 0 && (h.nodes?.a?.measure(), (d ?? (d = /* @__PURE__ */ new Set())).add(h));
2062
+ for (m = 0; m < o; m += 1) {
2063
+ if (p = t[m], g = i(p, m), h = l.get(g).e, e.outrogroups !== null) for (const N of e.outrogroups)
2064
+ N.pending.delete(h), N.done.delete(h);
2065
+ if ((h.f & 8192) !== 0 && (vr(h), s && (h.nodes?.a?.unfix(), (d ?? (d = /* @__PURE__ */ new Set())).delete(h))), (h.f & 33554432) !== 0)
2066
+ if (h.f ^= At, h === f) Mt(h, null, r);
2067
+ else {
2068
+ var O = _ ? _.next : f;
2069
+ h === e.effect.last && (e.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Oe(e, _, h), Oe(e, h, O), Mt(h, O, r), _ = h, u = [], c = [], f = kt(_.next);
2070
+ continue;
2071
+ }
2072
+ if (h !== f) {
2073
+ if (v !== void 0 && v.has(h)) {
2074
+ if (u.length < c.length) {
2075
+ var C = c[0], x;
2076
+ _ = C.prev;
2077
+ var H = u[0], y = u[u.length - 1];
2078
+ for (x = 0; x < u.length; x += 1) Mt(u[x], C, r);
2079
+ for (x = 0; x < c.length; x += 1) v.delete(c[x]);
2080
+ Oe(e, H.prev, y.next), Oe(e, _, H), Oe(e, y, C), f = C, _ = y, m -= 1, u = [], c = [];
2081
+ } else
2082
+ v.delete(h), Mt(h, f, r), Oe(e, h.prev, h.next), Oe(e, h, _ === null ? e.effect.first : _.next), Oe(e, _, h), _ = h;
2083
+ continue;
2084
+ }
2085
+ for (u = [], c = []; f !== null && f !== h; )
2086
+ (v ?? (v = /* @__PURE__ */ new Set())).add(f), c.push(f), f = kt(f.next);
2087
+ if (f === null) continue;
2088
+ }
2089
+ (h.f & 33554432) === 0 && u.push(h), _ = h, f = kt(h.next);
2090
+ }
2091
+ if (e.outrogroups !== null) {
2092
+ for (const N of e.outrogroups) N.pending.size === 0 && (Fr(e, _r(N.done)), e.outrogroups?.delete(N));
2093
+ e.outrogroups.size === 0 && (e.outrogroups = null);
2094
+ }
2095
+ if (f !== null || v !== void 0) {
2096
+ var I = [];
2097
+ if (v !== void 0)
2098
+ for (h of v) (h.f & 8192) === 0 && I.push(h);
2099
+ for (; f !== null; )
2100
+ (f.f & 8192) === 0 && f !== e.fallback && I.push(f), f = kt(f.next);
2101
+ var B = I.length;
2102
+ if (B > 0) {
2103
+ var _t = (n & 4) !== 0 && o === 0 ? r : null;
2104
+ if (s) {
2105
+ for (m = 0; m < B; m += 1) I[m].nodes?.a?.measure();
2106
+ for (m = 0; m < B; m += 1) I[m].nodes?.a?.fix();
2107
+ }
2108
+ $a(e, I, _t);
2109
+ }
2110
+ }
2111
+ s && we(() => {
2112
+ if (d !== void 0)
2113
+ for (h of d) h.nodes?.a?.apply();
2114
+ });
2115
+ }
2116
+ function xa(e, t, r, n, i, s, o, l) {
2117
+ var f = (o & 1) !== 0 ? (o & 16) === 0 ? /* @__PURE__ */ li(r, !1, !1) : Xe(r) : null, v = (o & 2) !== 0 ? Xe(i) : null;
2118
+ return {
2119
+ v: f,
2120
+ i: v,
2121
+ e: ne(() => (s(t, f ?? r, v ?? i, l), () => {
2122
+ e.delete(n);
2123
+ }))
2124
+ };
2125
+ }
2126
+ function Mt(e, t, r) {
2127
+ if (e.nodes)
2128
+ for (var n = e.nodes.start, i = e.nodes.end, s = t && (t.f & 33554432) === 0 ? t.nodes.start : r; n !== null; ) {
2129
+ var o = /* @__PURE__ */ ke(n);
2130
+ if (s.before(n), n === i) return;
2131
+ n = o;
2132
+ }
2133
+ }
2134
+ function Oe(e, t, r) {
2135
+ t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
2136
+ }
2137
+ function Ta(e, t) {
2138
+ ta(() => {
2139
+ var r = e.getRootNode(), n = r.host ? r : r.head ?? r.ownerDocument.head;
2140
+ if (!n.querySelector("#" + t.hash)) {
2141
+ const i = Qr("style");
2142
+ i.id = t.hash, i.textContent = t.code, n.appendChild(i);
2143
+ }
2144
+ });
2145
+ }
2146
+ var Ma = /* @__PURE__ */ Symbol("is custom element"), Aa = /* @__PURE__ */ Symbol("is html"), Ra = as ? "link" : "LINK";
2147
+ function Oa(e) {
2148
+ if (A) {
2149
+ var t = !1, r = () => {
2150
+ if (!t) {
2151
+ if (t = !0, e.hasAttribute("value")) {
2152
+ var n = e.value;
2153
+ je(e, "value", null), e.value = n;
2154
+ }
2155
+ if (e.hasAttribute("checked")) {
2156
+ var i = e.checked;
2157
+ je(e, "checked", null), e.checked = i;
2158
+ }
2159
+ }
2160
+ };
2161
+ e[Rt] = r, we(r), Vn();
2162
+ }
2163
+ }
2164
+ function je(e, t, r, n) {
2165
+ var i = La(e);
2166
+ if (A && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Ra)) {
2167
+ n || void 0;
2168
+ return;
2169
+ }
2170
+ i[t] !== (i[t] = r) && (t === "loading" && (e[rs] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && Pa(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
2171
+ }
2172
+ function La(e) {
2173
+ return e[Or] ?? (e[Or] = {
2174
+ [Ma]: e.nodeName.includes("-"),
2175
+ [Aa]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2176
+ });
2177
+ }
2178
+ var Mn = /* @__PURE__ */ new Map();
2179
+ function Pa(e) {
2180
+ var t = e.getAttribute("is") || e.nodeName, r = Mn.get(t);
2181
+ if (r) return r;
2182
+ Mn.set(t, r = []);
2183
+ for (var n, i = e, s = Element.prototype; s !== i; ) {
2184
+ n = Vi(i);
2185
+ for (var o in n) n[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && r.push(o);
2186
+ i = Nn(i);
2187
+ }
2188
+ return r;
2189
+ }
2190
+ function Na(e, t, r = t) {
2191
+ var n = /* @__PURE__ */ new WeakSet();
2192
+ Ms(e, "input", async (i) => {
2193
+ var s = i ? e.defaultValue : e.value;
2194
+ if (s = xr(e) ? Tr(s) : s, r(s), k !== null && n.add(k), await la(), s !== (s = t())) {
2195
+ var o = e.selectionStart, l = e.selectionEnd, f = e.value.length;
2196
+ if (e.value = s ?? "", l !== null) {
2197
+ var v = e.value.length;
2198
+ o === l && l === f && v > f ? (e.selectionStart = v, e.selectionEnd = v) : (e.selectionStart = o, e.selectionEnd = Math.min(l, v));
2199
+ }
2200
+ }
2201
+ }), (A && e.defaultValue !== e.value || It(t) == null && e.value) && (r(xr(e) ? Tr(e.value) : e.value), k !== null && n.add(k)), rn(() => {
2202
+ var i = t();
2203
+ if (e === document.activeElement) {
2204
+ var s = ve ? ar : k;
2205
+ if (n.has(s)) return;
2206
+ }
2207
+ xr(e) && i === Tr(e.value) || e.type === "date" && !i && !e.value || i !== e.value && (e.value = i ?? "");
2208
+ });
2209
+ }
2210
+ function xr(e) {
2211
+ var t = e.type;
2212
+ return t === "number" || t === "range";
2213
+ }
2214
+ function Tr(e) {
2215
+ return e === "" ? null : +e;
2216
+ }
2217
+ var Ri, at = /* @__PURE__ */ new WeakMap(), hr = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), An = /* @__PURE__ */ new WeakSet(), Oi = class {
2218
+ constructor(e) {
2219
+ Vr(this, An), b(this, at, /* @__PURE__ */ new WeakMap()), b(this, hr, void 0), b(this, Mr, void 0), w(Mr, this, e);
2220
+ }
2221
+ observe(e, t) {
2222
+ var r = a(at, this).get(e) || /* @__PURE__ */ new Set();
2223
+ return r.add(t), a(at, this).set(e, r), S(An, this, Wa).call(this).observe(e, a(Mr, this)), () => {
2224
+ var n = a(at, this).get(e);
2225
+ n.delete(t), n.size === 0 && (a(at, this).delete(e), a(hr, this).unobserve(e));
2226
+ };
2227
+ }
2228
+ };
2229
+ Ri = Oi;
2230
+ function Wa() {
2231
+ return a(hr, this) ?? w(hr, this, new ResizeObserver((e) => {
2232
+ for (var t of e) {
2233
+ Ri.entries.set(t.target, t);
2234
+ for (var r of a(at, this).get(t.target) || []) r(t);
2235
+ }
2236
+ }));
2237
+ }
2238
+ R(Oi, "entries", /* @__PURE__ */ new WeakMap());
2239
+ function xe(e, t, r, n) {
2240
+ var i = !mr || (r & 2) !== 0, s = (r & 8) !== 0, o = (r & 16) !== 0, l = n, f = !0, v = void 0, _ = () => o && i ? (v ?? (v = /* @__PURE__ */ Wt(n)), $(v)) : (f && (f = !1, l = o ? It(n) : n), l);
2241
+ let d;
2242
+ if (s) {
2243
+ var u = Kt in e || Cn in e;
2244
+ d = Be(e, t)?.set ?? (u && t in e ? (x) => e[t] = x : void 0);
2245
+ }
2246
+ var c, p = !1;
2247
+ s ? [c, p] = Ts(() => e[t]) : c = e[t], c === void 0 && n !== void 0 && (c = _(), d && (i && hs(t), d(c)));
2248
+ var g;
2249
+ if (i ? g = () => {
2250
+ var x = e[t];
2251
+ return x === void 0 ? _() : (f = !0, x);
2252
+ } : g = () => {
2253
+ var x = e[t];
2254
+ return x !== void 0 && (l = void 0), x === void 0 ? l : x;
2255
+ }, i && (r & 4) === 0) return g;
2256
+ if (d) {
2257
+ var h = e.$$legacy;
2258
+ return (function(x, H) {
2259
+ return arguments.length > 0 ? ((!i || !H || h || p) && d(H ? g() : x), x) : g();
2260
+ });
2261
+ }
2262
+ var m = !1, O = ((r & 1) !== 0 ? Wt : Gr)(() => (m = !1, g()));
2263
+ s && $(O);
2264
+ var C = E;
2265
+ return (function(x, H) {
2266
+ if (arguments.length > 0) {
2267
+ const y = H ? $(O) : i && s ? De(x) : x;
2268
+ return Q(O, y), m = !0, l !== void 0 && (l = y), x;
2269
+ }
2270
+ return Ae && m || (C.f & 16384) !== 0 ? O.v : $(O);
2271
+ });
2272
+ }
2273
+ function Ca(e) {
2274
+ return new Ia(e);
2275
+ }
2276
+ var Ce = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), Ia = class {
2277
+ constructor(e) {
2278
+ b(this, Ce, void 0), b(this, _e, void 0);
2279
+ var t = /* @__PURE__ */ new Map(), r = (i, s) => {
2280
+ var o = /* @__PURE__ */ li(s, !1, !1);
2281
+ return t.set(i, o), o;
2282
+ };
2283
+ const n = new Proxy({
2284
+ ...e.props || {},
2285
+ $$events: {}
2286
+ }, {
2287
+ get(i, s) {
2288
+ return $(t.get(s) ?? r(s, Reflect.get(i, s)));
2289
+ },
2290
+ has(i, s) {
2291
+ return s === Cn ? !0 : ($(t.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
2292
+ },
2293
+ set(i, s, o) {
2294
+ return Q(t.get(s) ?? r(s, o), o), Reflect.set(i, s, o);
2295
+ }
2296
+ });
2297
+ w(_e, this, (e.hydrate ? wa : Mi)(e.component, {
2298
+ target: e.target,
2299
+ anchor: e.anchor,
2300
+ props: n,
2301
+ context: e.context,
2302
+ intro: e.intro ?? !1,
2303
+ recover: e.recover,
2304
+ transformError: e.transformError
2305
+ })), !ve && (!e?.props?.$$host || e.sync === !1) && le(), w(Ce, this, n.$$events);
2306
+ for (const i of Object.keys(a(_e, this)))
2307
+ i === "$set" || i === "$destroy" || i === "$on" || tr(this, i, {
2308
+ get() {
2309
+ return a(_e, this)[i];
2310
+ },
2311
+ set(s) {
2312
+ a(_e, this)[i] = s;
2313
+ },
2314
+ enumerable: !0
2315
+ });
2316
+ a(_e, this).$set = (i) => {
2317
+ Object.assign(n, i);
2318
+ }, a(_e, this).$destroy = () => {
2319
+ ba(a(_e, this));
2320
+ };
2321
+ }
2322
+ $set(e) {
2323
+ a(_e, this).$set(e);
2324
+ }
2325
+ $on(e, t) {
2326
+ a(Ce, this)[e] = a(Ce, this)[e] || [];
2327
+ const r = (...n) => t.call(this, ...n);
2328
+ return a(Ce, this)[e].push(r), () => {
2329
+ a(Ce, this)[e] = a(Ce, this)[e].filter((n) => n !== r);
2330
+ };
2331
+ }
2332
+ $destroy() {
2333
+ a(_e, this).$destroy();
2334
+ }
2335
+ }, Li;
2336
+ typeof HTMLElement == "function" && (Li = class extends HTMLElement {
2337
+ constructor(e, t, r) {
2338
+ super(), R(this, "$$ctor", void 0), R(this, "$$s", void 0), R(this, "$$c", void 0), R(this, "$$cn", !1), R(this, "$$d", {}), R(this, "$$r", !1), R(this, "$$p_d", {}), R(this, "$$l", {}), R(this, "$$l_u", /* @__PURE__ */ new Map()), R(this, "$$me", void 0), R(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
2339
+ }
2340
+ addEventListener(e, t, r) {
2341
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
2342
+ const n = this.$$c.$on(e, t);
2343
+ this.$$l_u.set(t, n);
2344
+ }
2345
+ super.addEventListener(e, t, r);
2346
+ }
2347
+ removeEventListener(e, t, r) {
2348
+ if (super.removeEventListener(e, t, r), this.$$c) {
2349
+ const n = this.$$l_u.get(t);
2350
+ n && (n(), this.$$l_u.delete(t));
2351
+ }
2352
+ }
2353
+ async connectedCallback() {
2354
+ if (this.$$cn = !0, !this.$$c) {
2355
+ let e = function(n) {
2356
+ return (i) => {
2357
+ const s = Qr("slot");
2358
+ n !== "default" && (s.name = n), oe(i, s);
2359
+ };
2360
+ };
2361
+ if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2362
+ const t = {}, r = ja(this);
2363
+ for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2364
+ for (const n of this.attributes) {
2365
+ const i = this.$$g_p(n.name);
2366
+ i in this.$$d || (this.$$d[i] = Zt(i, n.value, this.$$p_d, "toProp"));
2367
+ }
2368
+ for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2369
+ this.$$c = Ca({
2370
+ component: this.$$ctor,
2371
+ target: this.$$shadowRoot || this,
2372
+ props: {
2373
+ ...this.$$d,
2374
+ $$slots: t,
2375
+ $$host: this
2376
+ }
2377
+ }), this.$$me = Qs(() => {
2378
+ rn(() => {
2379
+ this.$$r = !0;
2380
+ for (const n of er(this.$$c)) {
2381
+ if (!this.$$p_d[n]?.reflect) continue;
2382
+ this.$$d[n] = this.$$c[n];
2383
+ const i = Zt(n, this.$$d[n], this.$$p_d, "toAttribute");
2384
+ i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
2385
+ }
2386
+ this.$$r = !1;
2387
+ });
2388
+ });
2389
+ for (const n in this.$$l) for (const i of this.$$l[n]) {
2390
+ const s = this.$$c.$on(n, i);
2391
+ this.$$l_u.set(i, s);
2392
+ }
2393
+ this.$$l = {};
2394
+ }
2395
+ }
2396
+ attributeChangedCallback(e, t, r) {
2397
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Zt(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2398
+ }
2399
+ disconnectedCallback() {
2400
+ this.$$cn = !1, Promise.resolve().then(() => {
2401
+ !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$me(), this.$$c = void 0);
2402
+ });
2403
+ }
2404
+ $$g_p(e) {
2405
+ return er(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
2406
+ }
2407
+ });
2408
+ function Zt(e, t, r, n) {
2409
+ const i = r[e]?.type;
2410
+ if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e]) return t;
2411
+ if (n === "toAttribute") switch (i) {
2412
+ case "Object":
2413
+ case "Array":
2414
+ return t == null ? null : JSON.stringify(t);
2415
+ case "Boolean":
2416
+ return t ? "" : null;
2417
+ case "Number":
2418
+ return t ?? null;
2419
+ default:
2420
+ return t;
2421
+ }
2422
+ else switch (i) {
2423
+ case "Object":
2424
+ case "Array":
2425
+ return t && JSON.parse(t);
2426
+ case "Boolean":
2427
+ return t;
2428
+ case "Number":
2429
+ return t != null ? +t : t;
2430
+ default:
2431
+ return t;
2432
+ }
2433
+ }
2434
+ function ja(e) {
2435
+ const t = {};
2436
+ return e.childNodes.forEach((r) => {
2437
+ t[r.slot || "default"] = !0;
2438
+ }), t;
2439
+ }
2440
+ function qa(e, t, r, n, i, s) {
2441
+ let o = class extends Li {
2442
+ constructor() {
2443
+ super(e, r, i), this.$$p_d = t;
2444
+ }
2445
+ static get observedAttributes() {
2446
+ return er(t).map((l) => (t[l].attribute || l).toLowerCase());
2447
+ }
2448
+ };
2449
+ return er(t).forEach((l) => {
2450
+ tr(o.prototype, l, {
2451
+ get() {
2452
+ return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2453
+ },
2454
+ set(f) {
2455
+ f = Zt(l, f, t), this.$$d[l] = f;
2456
+ var v = this.$$c;
2457
+ v && (Be(v, l)?.get ? v[l] = f : v.$set({ [l]: f }));
2458
+ }
2459
+ });
2460
+ }), n.forEach((l) => {
2461
+ tr(o.prototype, l, { get() {
2462
+ return this.$$c?.[l];
2463
+ } });
2464
+ }), s && (o = s(o)), e.element = o, o;
2465
+ }
2466
+ function Dr(e) {
2467
+ return e.replace(/\s+/gu, " ").trim().replace(/^[^\p{L}\p{N}]+/u, "").replace(/[^\p{L}\p{N}]+$/u, "");
2468
+ }
2469
+ function Fa(e) {
2470
+ return !e || e.length > 80 ? !1 : e.split(" ").length <= 4;
2471
+ }
2472
+ function Da(e, t) {
2473
+ if (!e || typeof e != "object") return {
2474
+ status: "error",
2475
+ reason: `The ${t.serviceLabel} returned no data.`
2476
+ };
2477
+ const r = e;
2478
+ let n = null;
2479
+ for (const s of t.keys) if (Array.isArray(r[s])) {
2480
+ n = r[s];
2481
+ break;
2482
+ }
2483
+ if (!n) return {
2484
+ status: "error",
2485
+ reason: `The ${t.serviceLabel} response was unreadable.`
2486
+ };
2487
+ const i = n.map(t.toItem).filter((s) => s !== null);
2488
+ return i.length > 0 ? {
2489
+ status: "ok",
2490
+ items: i
2491
+ } : { status: "empty" };
2492
+ }
2493
+ function Ha(e) {
2494
+ const t = e.fetchImpl ?? globalThis.fetch;
2495
+ return async (r, n) => {
2496
+ if (typeof t != "function") return {
2497
+ status: "error",
2498
+ reason: "No fetch implementation is available."
2499
+ };
2500
+ let i = { "content-type": "application/json" };
2501
+ try {
2502
+ const s = await e.headers?.();
2503
+ s && (i = {
2504
+ ...i,
2505
+ ...s
2506
+ });
2507
+ } catch {
2508
+ return {
2509
+ status: "error",
2510
+ reason: `The ${e.serviceLabel} could not be authorized.`
2511
+ };
2512
+ }
2513
+ try {
2514
+ const s = await t(e.endpoint, {
2515
+ method: "POST",
2516
+ headers: i,
2517
+ credentials: e.credentials ?? "same-origin",
2518
+ body: JSON.stringify(r),
2519
+ signal: n
2520
+ });
2521
+ return s.ok ? e.readResponse(await s.json()) : {
2522
+ status: "error",
2523
+ reason: `The ${e.serviceLabel} is unavailable (${s.status}).`
2524
+ };
2525
+ } catch (s) {
2526
+ return s instanceof DOMException && s.name === "AbortError" ? { status: "empty" } : {
2527
+ status: "error",
2528
+ reason: `The ${e.serviceLabel} could not be reached.`
2529
+ };
2530
+ }
2531
+ };
2532
+ }
2533
+ var Ba = "Look up a single word or short phrase.", $t = /* @__PURE__ */ new WeakMap(), Ar = /* @__PURE__ */ new WeakMap(), Rr = /* @__PURE__ */ new WeakMap(), za = class {
2534
+ constructor(e) {
2535
+ R(this, "options", void 0), b(this, $t, null), b(this, Ar, ""), b(this, Rr, null), this.options = e;
2536
+ }
2537
+ get searchedFor() {
2538
+ return a(Ar, this);
2539
+ }
2540
+ syncConfigured(e) {
2541
+ const t = this.options.resolver();
2542
+ if (!t && e.kind === "idle") {
2543
+ this.options.onState({ kind: "unconfigured" });
2544
+ return;
2545
+ }
2546
+ t && e.kind === "unconfigured" && this.options.onState({ kind: "idle" });
2547
+ }
2548
+ syncRequestedTerm(e) {
2549
+ const t = Dr(e.term);
2550
+ if (!e.visible || !t) return !1;
2551
+ const r = e.requestId === void 0 ? `term:${t}` : `id:${e.requestId}`;
2552
+ return r === a(Rr, this) ? !1 : (w(Rr, this, r), this.run(t), !0);
2553
+ }
2554
+ async run(e) {
2555
+ const t = this.options.resolver();
2556
+ if (!t) {
2557
+ this.options.onState({ kind: "unconfigured" });
2558
+ return;
2559
+ }
2560
+ const r = Dr(e);
2561
+ if (!Fa(r)) {
2562
+ this.options.onState({
2563
+ kind: "error",
2564
+ term: r,
2565
+ reason: Ba
2566
+ });
2567
+ return;
2568
+ }
2569
+ a($t, this)?.abort();
2570
+ const n = new AbortController();
2571
+ w($t, this, n), w(Ar, this, r), this.options.onState({
2572
+ kind: "searching",
2573
+ term: r
2574
+ });
2575
+ const i = await t({
2576
+ keyword: r,
2577
+ language: this.options.language?.() || void 0,
2578
+ max: this.options.max
2579
+ }, n.signal);
2580
+ if (n === a($t, this)) {
2581
+ if (w($t, this, null), i.status === "ok") {
2582
+ this.options.onState({
2583
+ kind: "results",
2584
+ term: r,
2585
+ items: i.items
2586
+ });
2587
+ return;
2588
+ }
2589
+ if (i.status === "empty") {
2590
+ this.options.onState({
2591
+ kind: "empty",
2592
+ term: r
2593
+ });
2594
+ return;
2595
+ }
2596
+ this.options.onState({
2597
+ kind: "error",
2598
+ term: r,
2599
+ reason: i.reason
2600
+ });
2601
+ }
2602
+ }
2603
+ };
2604
+ function Ua(e, t) {
2605
+ return e.kind === "searching" ? `Looking up ${e.term}` : e.kind === "results" ? `${t.countLabel(e.items.length)} for ${e.term}` : e.kind === "empty" ? t.emptyLabel(e.term) : "";
2606
+ }
2607
+ var Pi = "picture dictionary";
2608
+ function Va(e) {
2609
+ const t = e.trim();
2610
+ return t ? t.startsWith("//") || /^https:\/\//iu.test(t) ? !0 : t.startsWith("/") ? Ya(t) : !1 : !1;
2611
+ }
2612
+ var Rn = "https://pie-picture-dictionary.invalid";
2613
+ function Ya(e) {
2614
+ try {
2615
+ return new URL(e, Rn).origin === Rn;
2616
+ } catch {
2617
+ return !1;
2618
+ }
2619
+ }
2620
+ function On(e) {
2621
+ return typeof e == "string" ? e.trim() : "";
2622
+ }
2623
+ function Ka(e) {
2624
+ if (!e || typeof e != "object") return null;
2625
+ const t = e, r = On(t.url) || On(t.image);
2626
+ return Va(r) ? {
2627
+ url: r,
2628
+ caption: typeof t.caption == "string" && t.caption.trim() ? t.caption.trim() : void 0,
2629
+ width: typeof t.width == "number" ? t.width : void 0,
2630
+ height: typeof t.height == "number" ? t.height : void 0
2631
+ } : null;
2632
+ }
2633
+ function Ga(e) {
2634
+ return Da(e, {
2635
+ serviceLabel: Pi,
2636
+ keys: ["pictures", "images"],
2637
+ toItem: Ka
2638
+ });
2639
+ }
2640
+ function Xa(e) {
2641
+ return Ha({
2642
+ ...e,
2643
+ serviceLabel: Pi,
2644
+ readResponse: Ga
2645
+ });
2646
+ }
2647
+ var Ja = /* @__PURE__ */ Ne('<p class="pie-tool-picture-dictionary__notice svelte-wecn6g">No picture dictionary service is configured for this assessment.</p>'), Za = /* @__PURE__ */ Ne('<p class="pie-tool-picture-dictionary__notice svelte-wecn6g">Type a word to see a picture of it.</p>'), Ln = /* @__PURE__ */ Ne('<p class="pie-tool-picture-dictionary__notice svelte-wecn6g"> </p>'), Qa = /* @__PURE__ */ Ne('<p class="pie-tool-picture-dictionary__error svelte-wecn6g" role="alert"> </p>'), eo = /* @__PURE__ */ Ne('<span class="pie-tool-picture-dictionary__caption svelte-wecn6g" aria-hidden="true"> </span>'), to = /* @__PURE__ */ Ne('<li class="pie-tool-picture-dictionary__cell svelte-wecn6g"><img class="pie-tool-picture-dictionary__image svelte-wecn6g" loading="lazy" decoding="async"/> <!></li>'), ro = /* @__PURE__ */ Ne('<ul class="pie-tool-picture-dictionary__grid svelte-wecn6g"></ul>'), no = /* @__PURE__ */ Ne('<div class="pie-tool-picture-dictionary svelte-wecn6g" role="dialog" aria-label="Picture Dictionary"><form class="pie-tool-picture-dictionary__search svelte-wecn6g"><label class="pie-tool-picture-dictionary__label svelte-wecn6g" for="pie-tool-picture-dictionary-term">Word or phrase</label> <div class="pie-tool-picture-dictionary__row svelte-wecn6g"><input id="pie-tool-picture-dictionary-term" class="pie-tool-picture-dictionary__input svelte-wecn6g" type="text" autocomplete="off" spellcheck="false"/> <button class="pie-tool-picture-dictionary__submit svelte-wecn6g" type="submit">Look up</button></div></form> <div class="pie-tool-picture-dictionary__status svelte-wecn6g" role="status" aria-live="polite"> </div> <div class="pie-tool-picture-dictionary__body svelte-wecn6g"><!></div></div>'), io = {
2648
+ hash: "svelte-wecn6g",
2649
+ code: `.pie-tool-picture-dictionary.svelte-wecn6g {display:flex;flex-direction:column;gap:0.5rem;height:100%;min-height:0;padding:0.75rem;box-sizing:border-box;color:var(--pie-text, #1f2937);background:var(--pie-background, #fff);font-size:0.95rem;}.pie-tool-picture-dictionary__search.svelte-wecn6g {display:flex;flex-direction:column;gap:0.25rem;}.pie-tool-picture-dictionary__label.svelte-wecn6g {font-size:0.8rem;font-weight:600;}.pie-tool-picture-dictionary__row.svelte-wecn6g {display:flex;gap:0.5rem;}.pie-tool-picture-dictionary__input.svelte-wecn6g {flex:1 1 auto;min-width:0;padding:0.35rem 0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background, #fff);color:inherit;font:inherit;}.pie-tool-picture-dictionary__submit.svelte-wecn6g {flex:0 0 auto;padding:0.35rem 0.75rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;background:var(--pie-background-light, #f9fafb);color:inherit;font:inherit;cursor:pointer;}.pie-tool-picture-dictionary__submit.svelte-wecn6g:disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-picture-dictionary__input.svelte-wecn6g:focus-visible,
2650
+ .pie-tool-picture-dictionary__submit.svelte-wecn6g:focus-visible {outline:2px solid var(--pie-button-focus-outline, #2563eb);outline-offset:2px;}.pie-tool-picture-dictionary__status.svelte-wecn6g {position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}.pie-tool-picture-dictionary__body.svelte-wecn6g {flex:1 1 auto;min-height:0;overflow-y:auto;}.pie-tool-picture-dictionary__notice.svelte-wecn6g,
2651
+ .pie-tool-picture-dictionary__error.svelte-wecn6g {margin:0.25rem 0;}.pie-tool-picture-dictionary__grid.svelte-wecn6g {display:grid;grid-template-columns:repeat(auto-fill, minmax(9rem, 1fr));gap:0.75rem;margin:0;padding:0;list-style:none;}.pie-tool-picture-dictionary__cell.svelte-wecn6g {display:flex;flex-direction:column;align-items:center;gap:0.25rem;padding:0.5rem;border:1px solid var(--pie-border-light, #e5e7eb);border-radius:0.375rem;}.pie-tool-picture-dictionary__image.svelte-wecn6g {max-width:100%;height:auto;}.pie-tool-picture-dictionary__caption.svelte-wecn6g {text-align:center;font-size:0.85rem;opacity:0.85;}`
2652
+ };
2653
+ function so(e, t) {
2654
+ Fn(t, !0), Ta(e, io);
2655
+ let r = xe(t, "visible", 7, !1), n = xe(t, "toolId", 7, "pictureDictionary"), i = xe(t, "term", 7, ""), s = xe(t, "termRequestId", 7, void 0), o = xe(t, "endpoint", 7, ""), l = xe(t, "language", 7, ""), f = xe(t, "lookup", 7, void 0), v = xe(t, "headers", 7, void 0), _ = xe(t, "credentials", 7, void 0), d = /* @__PURE__ */ pe(""), u = /* @__PURE__ */ pe(De({ kind: "idle" }));
2656
+ const c = /* @__PURE__ */ gn(() => f() ?? (o() ? Xa({
2657
+ endpoint: o(),
2658
+ headers: v(),
2659
+ credentials: _()
2660
+ }) : null)), p = new za({
2661
+ resolver: () => $(c),
2662
+ max: 4,
2663
+ language: () => l(),
2664
+ onState: (y) => {
2665
+ Q(u, y, !0);
2666
+ }
2667
+ });
2668
+ bn(() => {
2669
+ $(c), It(() => p.syncConfigured($(u)));
2670
+ }), bn(() => {
2671
+ const y = Dr(i()), I = s(), B = r();
2672
+ It(() => {
2673
+ p.syncRequestedTerm({
2674
+ term: y,
2675
+ requestId: I,
2676
+ visible: B
2677
+ }) && Q(d, y, !0);
2678
+ });
2679
+ });
2680
+ function g(y) {
2681
+ y.preventDefault(), p.run($(d));
2682
+ }
2683
+ function h(y, I) {
2684
+ return y.caption ?? I;
2685
+ }
2686
+ const m = /* @__PURE__ */ gn(() => Ua($(u), {
2687
+ countLabel: (y) => `${y} ${y === 1 ? "picture" : "pictures"}`,
2688
+ emptyLabel: (y) => `No picture for ${y}`
2689
+ }));
2690
+ var O = {
2691
+ get visible() {
2692
+ return r();
2693
+ },
2694
+ set visible(y = !1) {
2695
+ r(y), le();
2696
+ },
2697
+ get toolId() {
2698
+ return n();
2699
+ },
2700
+ set toolId(y = "pictureDictionary") {
2701
+ n(y), le();
2702
+ },
2703
+ get term() {
2704
+ return i();
2705
+ },
2706
+ set term(y = "") {
2707
+ i(y), le();
2708
+ },
2709
+ get termRequestId() {
2710
+ return s();
2711
+ },
2712
+ set termRequestId(y = void 0) {
2713
+ s(y), le();
2714
+ },
2715
+ get endpoint() {
2716
+ return o();
2717
+ },
2718
+ set endpoint(y = "") {
2719
+ o(y), le();
2720
+ },
2721
+ get language() {
2722
+ return l();
2723
+ },
2724
+ set language(y = "") {
2725
+ l(y), le();
2726
+ },
2727
+ get lookup() {
2728
+ return f();
2729
+ },
2730
+ set lookup(y = void 0) {
2731
+ f(y), le();
2732
+ },
2733
+ get headers() {
2734
+ return v();
2735
+ },
2736
+ set headers(y = void 0) {
2737
+ v(y), le();
2738
+ },
2739
+ get credentials() {
2740
+ return _();
2741
+ },
2742
+ set credentials(y = void 0) {
2743
+ _(y), le();
2744
+ }
2745
+ }, C = _a(), x = Xs(C), H = (y) => {
2746
+ var I = no(), B = he(I), _t = yt(he(B), 2), N = he(_t);
2747
+ Oa(N);
2748
+ var yr = yt(N, 2);
2749
+ se(_t), se(B);
2750
+ var pt = yt(B, 2), Ni = he(pt, !0);
2751
+ se(pt);
2752
+ var on = yt(pt, 2), Wi = he(on), Ci = (L) => {
2753
+ var j = Ja();
2754
+ oe(L, j);
2755
+ }, Ii = (L) => {
2756
+ var j = Za();
2757
+ oe(L, j);
2758
+ }, ji = (L) => {
2759
+ var j = Ln(), Se = he(j);
2760
+ se(j), rt(() => wt(Se, `Looking up “${$(u).term ?? ""}”…`)), oe(L, j);
2761
+ }, qi = (L) => {
2762
+ var j = Ln(), Se = he(j);
2763
+ se(j), rt(() => wt(Se, `No picture for “${$(u).term ?? ""}”.`)), oe(L, j);
2764
+ }, Fi = (L) => {
2765
+ var j = Qa(), Se = he(j, !0);
2766
+ se(j), rt(() => wt(Se, $(u).reason)), oe(L, j);
2767
+ }, Di = (L) => {
2768
+ var j = ro();
2769
+ Sa(j, 21, () => $(u).items, (Se) => Se.url, (Se, tt) => {
2770
+ var wr = to(), gt = he(wr), Hi = yt(gt, 2), Bi = (mt) => {
2771
+ var br = eo(), zi = he(br, !0);
2772
+ se(br), rt(() => wt(zi, $(tt).caption)), oe(mt, br);
2773
+ };
2774
+ Er(Hi, (mt) => {
2775
+ $(tt).caption && mt(Bi);
2776
+ }), se(wr), rt((mt) => {
2777
+ je(gt, "src", $(tt).url), je(gt, "alt", mt), je(gt, "width", $(tt).width), je(gt, "height", $(tt).height);
2778
+ }, [() => h($(tt), $(u).term)]), oe(Se, wr);
2779
+ }), se(j), oe(L, j);
2780
+ };
2781
+ Er(Wi, (L) => {
2782
+ $(u).kind === "unconfigured" ? L(Ci) : $(u).kind === "idle" ? L(Ii, 1) : $(u).kind === "searching" ? L(ji, 2) : $(u).kind === "empty" ? L(qi, 3) : $(u).kind === "error" ? L(Fi, 4) : L(Di, -1);
2783
+ }), se(on), se(I), rt((L) => {
2784
+ je(I, "data-pie-tool-id", n()), N.disabled = $(u).kind === "unconfigured", yr.disabled = L, wt(Ni, $(m));
2785
+ }, [() => $(u).kind === "unconfigured" || !$(d).trim()]), ca("submit", B, g), Na(N, () => $(d), (L) => Q(d, L)), oe(y, I);
2786
+ };
2787
+ return Er(x, (y) => {
2788
+ r() && y(H);
2789
+ }), oe(e, C), Dn(O);
2790
+ }
2791
+ customElements.define("pie-tool-picture-dictionary", qa(so, {
2792
+ visible: {
2793
+ attribute: "visible",
2794
+ type: "Boolean"
2795
+ },
2796
+ toolId: {
2797
+ attribute: "tool-id",
2798
+ type: "String"
2799
+ },
2800
+ term: {
2801
+ attribute: "term",
2802
+ type: "String"
2803
+ },
2804
+ endpoint: {
2805
+ attribute: "endpoint",
2806
+ type: "String"
2807
+ },
2808
+ language: {
2809
+ attribute: "language",
2810
+ type: "String"
2811
+ },
2812
+ termRequestId: {},
2813
+ lookup: {},
2814
+ headers: {},
2815
+ credentials: {}
2816
+ }, [], [], { mode: "open" }));
2817
+ export {
2818
+ so as default
2819
+ };