@arenarium/maps 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +26 -8
- package/dist/main.es.js +1422 -1377
- package/dist/main.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/main.es.js
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
1
|
+
var br = Array.isArray, kn = Array.prototype.indexOf, Mn = Array.from, Mt = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, xn = Object.prototype, Pn = Array.prototype, Sn = Object.getPrototypeOf, sr = Object.isExtensible;
|
|
2
|
+
function An(t) {
|
|
3
3
|
for (var e = 0; e < t.length; e++)
|
|
4
4
|
t[e]();
|
|
5
5
|
}
|
|
6
|
-
function
|
|
7
|
-
var t, e,
|
|
8
|
-
t =
|
|
6
|
+
function Dn() {
|
|
7
|
+
var t, e, r = new Promise((n, i) => {
|
|
8
|
+
t = n, e = i;
|
|
9
9
|
});
|
|
10
|
-
return { promise:
|
|
10
|
+
return { promise: r, resolve: t, reject: e };
|
|
11
11
|
}
|
|
12
|
-
const
|
|
12
|
+
const R = 2, It = 4, Er = 8, Le = 16, fe = 32, ge = 64, Ft = 128, q = 256, st = 512, L = 1024, re = 2048, ce = 4096, Ae = 8192, Ie = 16384, Ot = 32768, kr = 65536, or = 1 << 17, Cn = 1 << 18, Fe = 1 << 19, Tn = 1 << 20, xt = 1 << 21, Rt = 1 << 22, ve = 1 << 23, rt = Symbol("$state"), Nt = new class extends Error {
|
|
13
13
|
name = "StaleReactionError";
|
|
14
14
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
15
15
|
}();
|
|
16
|
-
function
|
|
16
|
+
function Ln() {
|
|
17
17
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function In(t) {
|
|
20
20
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Fn() {
|
|
23
23
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function On(t) {
|
|
26
26
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function Rn() {
|
|
29
29
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function Nn() {
|
|
32
32
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function jn() {
|
|
35
35
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function zn() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Bn() {
|
|
41
41
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
42
42
|
}
|
|
43
|
-
const
|
|
44
|
-
function
|
|
43
|
+
const Un = 2, x = Symbol();
|
|
44
|
+
function Zn() {
|
|
45
45
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function Mr(t) {
|
|
48
48
|
return t === this.v;
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
function
|
|
52
|
-
|
|
50
|
+
let Y = null;
|
|
51
|
+
function De(t) {
|
|
52
|
+
Y = t;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
|
|
56
|
-
p:
|
|
54
|
+
function jt(t, e = !1, r) {
|
|
55
|
+
Y = {
|
|
56
|
+
p: Y,
|
|
57
57
|
c: null,
|
|
58
58
|
e: null,
|
|
59
59
|
s: t,
|
|
@@ -61,72 +61,72 @@ function Tt(t, e = !1, n) {
|
|
|
61
61
|
l: null
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function zt(t) {
|
|
65
65
|
var e = (
|
|
66
66
|
/** @type {ComponentContext} */
|
|
67
|
-
|
|
68
|
-
),
|
|
69
|
-
if (
|
|
67
|
+
Y
|
|
68
|
+
), r = e.e;
|
|
69
|
+
if (r !== null) {
|
|
70
70
|
e.e = null;
|
|
71
|
-
for (var
|
|
72
|
-
|
|
71
|
+
for (var n of r)
|
|
72
|
+
Nr(n);
|
|
73
73
|
}
|
|
74
|
-
return t !== void 0 && (e.x = t),
|
|
74
|
+
return t !== void 0 && (e.x = t), Y = e.p, t ?? /** @type {T} */
|
|
75
75
|
{};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function xr() {
|
|
78
78
|
return !0;
|
|
79
79
|
}
|
|
80
|
-
let
|
|
81
|
-
function
|
|
82
|
-
var t =
|
|
83
|
-
|
|
80
|
+
let Me = [];
|
|
81
|
+
function qn() {
|
|
82
|
+
var t = Me;
|
|
83
|
+
Me = [], An(t);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
86
|
-
if (
|
|
87
|
-
var e =
|
|
85
|
+
function ut(t) {
|
|
86
|
+
if (Me.length === 0) {
|
|
87
|
+
var e = Me;
|
|
88
88
|
queueMicrotask(() => {
|
|
89
|
-
e ===
|
|
89
|
+
e === Me && qn();
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
Me.push(t);
|
|
93
93
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
94
|
+
const Hn = /* @__PURE__ */ new WeakMap();
|
|
95
|
+
function Pr(t) {
|
|
96
96
|
var e = m;
|
|
97
97
|
if (e === null)
|
|
98
|
-
return v.f |=
|
|
99
|
-
if ((e.f &
|
|
100
|
-
if ((e.f &
|
|
101
|
-
throw !e.parent && t instanceof Error &&
|
|
98
|
+
return v.f |= ve, t;
|
|
99
|
+
if ((e.f & Ot) === 0) {
|
|
100
|
+
if ((e.f & Ft) === 0)
|
|
101
|
+
throw !e.parent && t instanceof Error && Sr(t), t;
|
|
102
102
|
e.b.error(t);
|
|
103
103
|
} else
|
|
104
|
-
|
|
104
|
+
Ce(t, e);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Ce(t, e) {
|
|
107
107
|
for (; e !== null; ) {
|
|
108
|
-
if ((e.f &
|
|
108
|
+
if ((e.f & Ft) !== 0)
|
|
109
109
|
try {
|
|
110
110
|
e.b.error(t);
|
|
111
111
|
return;
|
|
112
|
-
} catch (
|
|
113
|
-
t =
|
|
112
|
+
} catch (r) {
|
|
113
|
+
t = r;
|
|
114
114
|
}
|
|
115
115
|
e = e.parent;
|
|
116
116
|
}
|
|
117
|
-
throw t instanceof Error &&
|
|
117
|
+
throw t instanceof Error && Sr(t), t;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
120
|
-
const e =
|
|
121
|
-
e && (
|
|
119
|
+
function Sr(t) {
|
|
120
|
+
const e = Hn.get(t);
|
|
121
|
+
e && (Mt(t, "message", {
|
|
122
122
|
value: e.message
|
|
123
|
-
}),
|
|
123
|
+
}), Mt(t, "stack", {
|
|
124
124
|
value: e.stack
|
|
125
125
|
}));
|
|
126
126
|
}
|
|
127
|
-
const
|
|
128
|
-
let
|
|
129
|
-
class
|
|
127
|
+
const wt = /* @__PURE__ */ new Set();
|
|
128
|
+
let A = null, Pt = /* @__PURE__ */ new Set(), Xe = [], Bt = null, St = !1;
|
|
129
|
+
class ie {
|
|
130
130
|
/**
|
|
131
131
|
* The current values of any sources that are updated in this batch
|
|
132
132
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -154,7 +154,7 @@ class ee {
|
|
|
154
154
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
155
155
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
156
156
|
*/
|
|
157
|
-
#
|
|
157
|
+
#n = null;
|
|
158
158
|
/**
|
|
159
159
|
* True if an async effect inside this batch resolved and
|
|
160
160
|
* its parent branch was already deleted
|
|
@@ -178,7 +178,7 @@ class ee {
|
|
|
178
178
|
* a batch is committed
|
|
179
179
|
* @type {Effect[]}
|
|
180
180
|
*/
|
|
181
|
-
#
|
|
181
|
+
#r = [];
|
|
182
182
|
/**
|
|
183
183
|
* The same as `#render_effects`, but for `$effect` (which runs after)
|
|
184
184
|
* @type {Effect[]}
|
|
@@ -211,19 +211,19 @@ class ee {
|
|
|
211
211
|
* @param {Effect[]} root_effects
|
|
212
212
|
*/
|
|
213
213
|
process(e) {
|
|
214
|
-
|
|
214
|
+
Xe = [];
|
|
215
215
|
for (const i of e)
|
|
216
216
|
this.#p(i);
|
|
217
217
|
if (this.#o.length === 0 && this.#a === 0) {
|
|
218
218
|
this.#d();
|
|
219
|
-
var
|
|
220
|
-
this.#
|
|
219
|
+
var r = this.#r, n = this.#s;
|
|
220
|
+
this.#r = [], this.#s = [], this.#l = [], A = null, ar(r), ar(n), A === null ? A = this : wt.delete(this), this.#n?.resolve();
|
|
221
221
|
} else
|
|
222
|
-
this.#u(this.#
|
|
222
|
+
this.#u(this.#r), this.#u(this.#s), this.#u(this.#l);
|
|
223
223
|
for (const i of this.#o)
|
|
224
|
-
|
|
224
|
+
Se(i);
|
|
225
225
|
for (const i of this.#i)
|
|
226
|
-
|
|
226
|
+
Se(i);
|
|
227
227
|
this.#o = [], this.#i = [];
|
|
228
228
|
}
|
|
229
229
|
/**
|
|
@@ -232,36 +232,36 @@ class ee {
|
|
|
232
232
|
* @param {Effect} root
|
|
233
233
|
*/
|
|
234
234
|
#p(e) {
|
|
235
|
-
e.f ^=
|
|
236
|
-
for (var
|
|
237
|
-
var
|
|
238
|
-
if (!o &&
|
|
235
|
+
e.f ^= L;
|
|
236
|
+
for (var r = e.first; r !== null; ) {
|
|
237
|
+
var n = r.f, i = (n & (fe | ge)) !== 0, s = i && (n & L) !== 0, o = s || (n & Ae) !== 0 || this.skipped_effects.has(r);
|
|
238
|
+
if (!o && r.fn !== null) {
|
|
239
239
|
if (i)
|
|
240
|
-
|
|
241
|
-
else if ((
|
|
242
|
-
this.#s.push(
|
|
243
|
-
else if ((
|
|
244
|
-
if ((
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
} else
|
|
248
|
-
var
|
|
249
|
-
if (
|
|
250
|
-
|
|
240
|
+
r.f ^= L;
|
|
241
|
+
else if ((n & It) !== 0)
|
|
242
|
+
this.#s.push(r);
|
|
243
|
+
else if ((n & L) === 0)
|
|
244
|
+
if ((n & Rt) !== 0) {
|
|
245
|
+
var l = r.b?.is_pending() ? this.#i : this.#o;
|
|
246
|
+
l.push(r);
|
|
247
|
+
} else ct(r) && ((r.f & Le) !== 0 && this.#l.push(r), Se(r));
|
|
248
|
+
var a = r.first;
|
|
249
|
+
if (a !== null) {
|
|
250
|
+
r = a;
|
|
251
251
|
continue;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
var u =
|
|
255
|
-
for (
|
|
256
|
-
|
|
254
|
+
var u = r.parent;
|
|
255
|
+
for (r = r.next; r === null && u !== null; )
|
|
256
|
+
r = u.next, u = u.parent;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
/**
|
|
260
260
|
* @param {Effect[]} effects
|
|
261
261
|
*/
|
|
262
262
|
#u(e) {
|
|
263
|
-
for (const
|
|
264
|
-
((
|
|
263
|
+
for (const r of e)
|
|
264
|
+
((r.f & re) !== 0 ? this.#h : this.#f).push(r), H(r, L);
|
|
265
265
|
e.length = 0;
|
|
266
266
|
}
|
|
267
267
|
/**
|
|
@@ -270,23 +270,23 @@ class ee {
|
|
|
270
270
|
* @param {Source} source
|
|
271
271
|
* @param {any} value
|
|
272
272
|
*/
|
|
273
|
-
capture(e,
|
|
274
|
-
this.#e.has(e) || this.#e.set(e,
|
|
273
|
+
capture(e, r) {
|
|
274
|
+
this.#e.has(e) || this.#e.set(e, r), this.current.set(e, e.v);
|
|
275
275
|
}
|
|
276
276
|
activate() {
|
|
277
|
-
|
|
277
|
+
A = this;
|
|
278
278
|
}
|
|
279
279
|
deactivate() {
|
|
280
|
-
|
|
281
|
-
for (const e of
|
|
282
|
-
if (
|
|
280
|
+
A = null;
|
|
281
|
+
for (const e of Pt)
|
|
282
|
+
if (Pt.delete(e), e(), A !== null)
|
|
283
283
|
break;
|
|
284
284
|
}
|
|
285
285
|
neuter() {
|
|
286
286
|
this.#c = !0;
|
|
287
287
|
}
|
|
288
288
|
flush() {
|
|
289
|
-
|
|
289
|
+
Xe.length > 0 ? Yn() : this.#d(), A === this && (this.#a === 0 && wt.delete(this), this.deactivate());
|
|
290
290
|
}
|
|
291
291
|
/**
|
|
292
292
|
* Append and remove branches to/from the DOM
|
|
@@ -303,10 +303,10 @@ class ee {
|
|
|
303
303
|
decrement() {
|
|
304
304
|
if (this.#a -= 1, this.#a === 0) {
|
|
305
305
|
for (const e of this.#h)
|
|
306
|
-
|
|
306
|
+
H(e, re), We(e);
|
|
307
307
|
for (const e of this.#f)
|
|
308
|
-
|
|
309
|
-
this.#
|
|
308
|
+
H(e, ce), We(e);
|
|
309
|
+
this.#r = [], this.#s = [], this.flush();
|
|
310
310
|
} else
|
|
311
311
|
this.deactivate();
|
|
312
312
|
}
|
|
@@ -315,90 +315,90 @@ class ee {
|
|
|
315
315
|
this.#t.add(e);
|
|
316
316
|
}
|
|
317
317
|
settled() {
|
|
318
|
-
return (this.#
|
|
318
|
+
return (this.#n ??= Dn()).promise;
|
|
319
319
|
}
|
|
320
320
|
static ensure() {
|
|
321
|
-
if (
|
|
322
|
-
const e =
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
if (A === null) {
|
|
322
|
+
const e = A = new ie();
|
|
323
|
+
wt.add(A), ie.enqueue(() => {
|
|
324
|
+
A === e && e.flush();
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
|
-
return
|
|
327
|
+
return A;
|
|
328
328
|
}
|
|
329
329
|
/** @param {() => void} task */
|
|
330
330
|
static enqueue(e) {
|
|
331
|
-
|
|
331
|
+
ut(e);
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
function
|
|
335
|
-
var t =
|
|
336
|
-
|
|
334
|
+
function Yn() {
|
|
335
|
+
var t = Pe;
|
|
336
|
+
St = !0;
|
|
337
337
|
try {
|
|
338
338
|
var e = 0;
|
|
339
|
-
for (
|
|
340
|
-
var
|
|
339
|
+
for (fr(!0); Xe.length > 0; ) {
|
|
340
|
+
var r = ie.ensure();
|
|
341
341
|
if (e++ > 1e3) {
|
|
342
|
-
var
|
|
343
|
-
|
|
342
|
+
var n, i;
|
|
343
|
+
Vn();
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
r.process(Xe), ue.clear();
|
|
346
346
|
}
|
|
347
347
|
} finally {
|
|
348
|
-
|
|
348
|
+
St = !1, fr(t), Bt = null;
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Vn() {
|
|
352
352
|
try {
|
|
353
|
-
|
|
353
|
+
Rn();
|
|
354
354
|
} catch (t) {
|
|
355
|
-
|
|
355
|
+
Ce(t, Bt);
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
let
|
|
359
|
-
function
|
|
358
|
+
let de = null;
|
|
359
|
+
function ar(t) {
|
|
360
360
|
var e = t.length;
|
|
361
361
|
if (e !== 0) {
|
|
362
|
-
for (var
|
|
363
|
-
var
|
|
364
|
-
if ((
|
|
365
|
-
|
|
366
|
-
for (const i of
|
|
367
|
-
|
|
368
|
-
|
|
362
|
+
for (var r = 0; r < e; ) {
|
|
363
|
+
var n = t[r++];
|
|
364
|
+
if ((n.f & (Ie | Ae)) === 0 && ct(n) && (de = [], Se(n), n.deps === null && n.first === null && n.nodes_start === null && (n.teardown === null && n.ac === null ? Ur(n) : n.fn = null), de?.length > 0)) {
|
|
365
|
+
ue.clear();
|
|
366
|
+
for (const i of de)
|
|
367
|
+
Se(i);
|
|
368
|
+
de = [];
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
|
|
371
|
+
de = null;
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
for (var e =
|
|
374
|
+
function We(t) {
|
|
375
|
+
for (var e = Bt = t; e.parent !== null; ) {
|
|
376
376
|
e = e.parent;
|
|
377
|
-
var
|
|
378
|
-
if (
|
|
377
|
+
var r = e.f;
|
|
378
|
+
if (St && e === m && (r & Le) !== 0)
|
|
379
379
|
return;
|
|
380
|
-
if ((
|
|
381
|
-
if ((
|
|
382
|
-
e.f ^=
|
|
380
|
+
if ((r & (ge | fe)) !== 0) {
|
|
381
|
+
if ((r & L) === 0) return;
|
|
382
|
+
e.f ^= L;
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
|
|
385
|
+
Xe.push(e);
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
let e = 0,
|
|
387
|
+
function Xn(t) {
|
|
388
|
+
let e = 0, r = ft(0), n;
|
|
389
389
|
return () => {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
e -= 1, e === 0 && (
|
|
390
|
+
li() && (g(r), qt(() => (e === 0 && (n = Wr(() => t(() => Ze(r)))), e += 1, () => {
|
|
391
|
+
ut(() => {
|
|
392
|
+
e -= 1, e === 0 && (n?.(), n = void 0, Ze(r));
|
|
393
393
|
});
|
|
394
394
|
})));
|
|
395
395
|
};
|
|
396
396
|
}
|
|
397
|
-
var
|
|
398
|
-
function
|
|
399
|
-
new
|
|
397
|
+
var Wn = kr | Fe | Ft;
|
|
398
|
+
function Gn(t, e, r) {
|
|
399
|
+
new Kn(t, e, r);
|
|
400
400
|
}
|
|
401
|
-
class
|
|
401
|
+
class Kn {
|
|
402
402
|
/** @type {Boundary | null} */
|
|
403
403
|
parent;
|
|
404
404
|
#e = !1;
|
|
@@ -407,7 +407,7 @@ class Rr {
|
|
|
407
407
|
/** @type {TemplateNode | null} */
|
|
408
408
|
#a = null;
|
|
409
409
|
/** @type {BoundaryProps} */
|
|
410
|
-
#
|
|
410
|
+
#n;
|
|
411
411
|
/** @type {((anchor: Node) => void)} */
|
|
412
412
|
#c;
|
|
413
413
|
/** @type {Effect} */
|
|
@@ -415,7 +415,7 @@ class Rr {
|
|
|
415
415
|
/** @type {Effect | null} */
|
|
416
416
|
#i = null;
|
|
417
417
|
/** @type {Effect | null} */
|
|
418
|
-
#
|
|
418
|
+
#r = null;
|
|
419
419
|
/** @type {Effect | null} */
|
|
420
420
|
#s = null;
|
|
421
421
|
/** @type {DocumentFragment | null} */
|
|
@@ -432,9 +432,9 @@ class Rr {
|
|
|
432
432
|
*/
|
|
433
433
|
#u = null;
|
|
434
434
|
#d = () => {
|
|
435
|
-
this.#u &&
|
|
435
|
+
this.#u && ot(this.#u, this.#h);
|
|
436
436
|
};
|
|
437
|
-
#g =
|
|
437
|
+
#g = Xn(() => (this.#u = ft(this.#h), () => {
|
|
438
438
|
this.#u = null;
|
|
439
439
|
}));
|
|
440
440
|
/**
|
|
@@ -442,36 +442,36 @@ class Rr {
|
|
|
442
442
|
* @param {BoundaryProps} props
|
|
443
443
|
* @param {((anchor: Node) => void)} children
|
|
444
444
|
*/
|
|
445
|
-
constructor(e,
|
|
446
|
-
this.#t = e, this.#
|
|
447
|
-
m.b, this.#e = !!this.#
|
|
445
|
+
constructor(e, r, n) {
|
|
446
|
+
this.#t = e, this.#n = r, this.#c = n, this.parent = /** @type {Effect} */
|
|
447
|
+
m.b, this.#e = !!this.#n.pending, this.#o = hi(() => {
|
|
448
448
|
m.b = this;
|
|
449
449
|
{
|
|
450
450
|
try {
|
|
451
|
-
this.#i =
|
|
451
|
+
this.#i = pe(() => n(this.#t));
|
|
452
452
|
} catch (i) {
|
|
453
453
|
this.error(i);
|
|
454
454
|
}
|
|
455
455
|
this.#f > 0 ? this.#m() : this.#e = !1;
|
|
456
456
|
}
|
|
457
|
-
},
|
|
457
|
+
}, Wn);
|
|
458
458
|
}
|
|
459
459
|
#_() {
|
|
460
460
|
try {
|
|
461
|
-
this.#i =
|
|
461
|
+
this.#i = pe(() => this.#c(this.#t));
|
|
462
462
|
} catch (e) {
|
|
463
463
|
this.error(e);
|
|
464
464
|
}
|
|
465
465
|
this.#e = !1;
|
|
466
466
|
}
|
|
467
467
|
#w() {
|
|
468
|
-
const e = this.#
|
|
469
|
-
e && (this.#
|
|
470
|
-
this.#i = this.#v(() => (
|
|
468
|
+
const e = this.#n.pending;
|
|
469
|
+
e && (this.#r = pe(() => e(this.#t)), ie.enqueue(() => {
|
|
470
|
+
this.#i = this.#v(() => (ie.ensure(), pe(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : (nt(
|
|
471
471
|
/** @type {Effect} */
|
|
472
|
-
this.#
|
|
472
|
+
this.#r,
|
|
473
473
|
() => {
|
|
474
|
-
this.#
|
|
474
|
+
this.#r = null;
|
|
475
475
|
}
|
|
476
476
|
), this.#e = !1);
|
|
477
477
|
}));
|
|
@@ -484,28 +484,28 @@ class Rr {
|
|
|
484
484
|
return this.#e || !!this.parent && this.parent.is_pending();
|
|
485
485
|
}
|
|
486
486
|
has_pending_snippet() {
|
|
487
|
-
return !!this.#
|
|
487
|
+
return !!this.#n.pending;
|
|
488
488
|
}
|
|
489
489
|
/**
|
|
490
490
|
* @param {() => Effect | null} fn
|
|
491
491
|
*/
|
|
492
492
|
#v(e) {
|
|
493
|
-
var
|
|
494
|
-
|
|
493
|
+
var r = m, n = v, i = Y;
|
|
494
|
+
ne(this.#o), I(this.#o), De(this.#o.ctx);
|
|
495
495
|
try {
|
|
496
496
|
return e();
|
|
497
497
|
} catch (s) {
|
|
498
|
-
return
|
|
498
|
+
return Pr(s), null;
|
|
499
499
|
} finally {
|
|
500
|
-
|
|
500
|
+
ne(r), I(n), De(i);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
#m() {
|
|
504
504
|
const e = (
|
|
505
505
|
/** @type {(anchor: Node) => void} */
|
|
506
|
-
this.#
|
|
506
|
+
this.#n.pending
|
|
507
507
|
);
|
|
508
|
-
this.#i !== null && (this.#l = document.createDocumentFragment(),
|
|
508
|
+
this.#i !== null && (this.#l = document.createDocumentFragment(), Jn(this.#i, this.#l)), this.#r === null && (this.#r = pe(() => e(this.#t)));
|
|
509
509
|
}
|
|
510
510
|
/**
|
|
511
511
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -517,8 +517,8 @@ class Rr {
|
|
|
517
517
|
this.parent && this.parent.#y(e);
|
|
518
518
|
return;
|
|
519
519
|
}
|
|
520
|
-
this.#f += e, this.#f === 0 && (this.#e = !1, this.#
|
|
521
|
-
this.#
|
|
520
|
+
this.#f += e, this.#f === 0 && (this.#e = !1, this.#r && nt(this.#r, () => {
|
|
521
|
+
this.#r = null;
|
|
522
522
|
}), this.#l && (this.#t.before(this.#l), this.#l = null));
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
@@ -528,53 +528,53 @@ class Rr {
|
|
|
528
528
|
* @param {1 | -1} d
|
|
529
529
|
*/
|
|
530
530
|
update_pending_count(e) {
|
|
531
|
-
this.#y(e), this.#h += e,
|
|
531
|
+
this.#y(e), this.#h += e, Pt.add(this.#d);
|
|
532
532
|
}
|
|
533
533
|
get_effect_pending() {
|
|
534
|
-
return this.#g(),
|
|
534
|
+
return this.#g(), g(
|
|
535
535
|
/** @type {Source<number>} */
|
|
536
536
|
this.#u
|
|
537
537
|
);
|
|
538
538
|
}
|
|
539
539
|
/** @param {unknown} error */
|
|
540
540
|
error(e) {
|
|
541
|
-
var
|
|
542
|
-
let
|
|
543
|
-
if (this.#p || !
|
|
541
|
+
var r = this.#n.onerror;
|
|
542
|
+
let n = this.#n.failed;
|
|
543
|
+
if (this.#p || !r && !n)
|
|
544
544
|
throw e;
|
|
545
|
-
this.#i && (
|
|
545
|
+
this.#i && (ee(this.#i), this.#i = null), this.#r && (ee(this.#r), this.#r = null), this.#s && (ee(this.#s), this.#s = null);
|
|
546
546
|
var i = !1, s = !1;
|
|
547
547
|
const o = () => {
|
|
548
548
|
if (i) {
|
|
549
|
-
|
|
549
|
+
Zn();
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
|
-
i = !0, s &&
|
|
552
|
+
i = !0, s && Bn(), ie.ensure(), this.#h = 0, this.#s !== null && nt(this.#s, () => {
|
|
553
553
|
this.#s = null;
|
|
554
|
-
}), this.#e = this.has_pending_snippet(), this.#i = this.#v(() => (this.#p = !1,
|
|
554
|
+
}), this.#e = this.has_pending_snippet(), this.#i = this.#v(() => (this.#p = !1, pe(() => this.#c(this.#t)))), this.#f > 0 ? this.#m() : this.#e = !1;
|
|
555
555
|
};
|
|
556
|
-
var
|
|
556
|
+
var l = v;
|
|
557
557
|
try {
|
|
558
|
-
|
|
559
|
-
} catch (
|
|
560
|
-
|
|
558
|
+
I(null), s = !0, r?.(e, o), s = !1;
|
|
559
|
+
} catch (a) {
|
|
560
|
+
Ce(a, this.#o && this.#o.parent);
|
|
561
561
|
} finally {
|
|
562
|
-
|
|
562
|
+
I(l);
|
|
563
563
|
}
|
|
564
|
-
|
|
564
|
+
n && ut(() => {
|
|
565
565
|
this.#s = this.#v(() => {
|
|
566
566
|
this.#p = !0;
|
|
567
567
|
try {
|
|
568
|
-
return
|
|
569
|
-
|
|
568
|
+
return pe(() => {
|
|
569
|
+
n(
|
|
570
570
|
this.#t,
|
|
571
571
|
() => e,
|
|
572
572
|
() => o
|
|
573
573
|
);
|
|
574
574
|
});
|
|
575
|
-
} catch (
|
|
576
|
-
return
|
|
577
|
-
|
|
575
|
+
} catch (a) {
|
|
576
|
+
return Ce(
|
|
577
|
+
a,
|
|
578
578
|
/** @type {Effect} */
|
|
579
579
|
this.#o.parent
|
|
580
580
|
), null;
|
|
@@ -585,134 +585,134 @@ class Rr {
|
|
|
585
585
|
});
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
for (var
|
|
590
|
-
var i =
|
|
588
|
+
function Jn(t, e) {
|
|
589
|
+
for (var r = t.nodes_start, n = t.nodes_end; r !== null; ) {
|
|
590
|
+
var i = r === n ? null : (
|
|
591
591
|
/** @type {TemplateNode} */
|
|
592
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ Zt(r)
|
|
593
593
|
);
|
|
594
|
-
e.append(
|
|
594
|
+
e.append(r), r = i;
|
|
595
595
|
}
|
|
596
596
|
}
|
|
597
|
-
function
|
|
598
|
-
const
|
|
597
|
+
function Qn(t, e, r) {
|
|
598
|
+
const n = ei;
|
|
599
599
|
if (e.length === 0) {
|
|
600
|
-
|
|
600
|
+
r(t.map(n));
|
|
601
601
|
return;
|
|
602
602
|
}
|
|
603
|
-
var i =
|
|
603
|
+
var i = A, s = (
|
|
604
604
|
/** @type {Effect} */
|
|
605
605
|
m
|
|
606
|
-
), o =
|
|
607
|
-
Promise.all(e.map((
|
|
606
|
+
), o = $n();
|
|
607
|
+
Promise.all(e.map((l) => /* @__PURE__ */ ti(l))).then((l) => {
|
|
608
608
|
i?.activate(), o();
|
|
609
609
|
try {
|
|
610
|
-
|
|
611
|
-
} catch (
|
|
612
|
-
(s.f &
|
|
610
|
+
r([...t.map(n), ...l]);
|
|
611
|
+
} catch (a) {
|
|
612
|
+
(s.f & Ie) === 0 && Ce(a, s);
|
|
613
613
|
}
|
|
614
|
-
i?.deactivate(),
|
|
615
|
-
}).catch((
|
|
616
|
-
|
|
614
|
+
i?.deactivate(), Ar();
|
|
615
|
+
}).catch((l) => {
|
|
616
|
+
Ce(l, s);
|
|
617
617
|
});
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
var t = m, e = v,
|
|
619
|
+
function $n() {
|
|
620
|
+
var t = m, e = v, r = Y, n = A;
|
|
621
621
|
return function() {
|
|
622
|
-
|
|
622
|
+
ne(t), I(e), De(r), n?.activate();
|
|
623
623
|
};
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
|
|
625
|
+
function Ar() {
|
|
626
|
+
ne(null), I(null), De(null);
|
|
627
627
|
}
|
|
628
628
|
// @__NO_SIDE_EFFECTS__
|
|
629
|
-
function
|
|
630
|
-
var e =
|
|
629
|
+
function ei(t) {
|
|
630
|
+
var e = R | re, r = v !== null && (v.f & R) !== 0 ? (
|
|
631
631
|
/** @type {Derived} */
|
|
632
632
|
v
|
|
633
633
|
) : null;
|
|
634
|
-
return m === null ||
|
|
635
|
-
ctx:
|
|
634
|
+
return m === null || r !== null && (r.f & q) !== 0 ? e |= q : m.f |= Fe, {
|
|
635
|
+
ctx: Y,
|
|
636
636
|
deps: null,
|
|
637
637
|
effects: null,
|
|
638
|
-
equals:
|
|
638
|
+
equals: Mr,
|
|
639
639
|
f: e,
|
|
640
640
|
fn: t,
|
|
641
641
|
reactions: null,
|
|
642
642
|
rv: 0,
|
|
643
643
|
v: (
|
|
644
644
|
/** @type {V} */
|
|
645
|
-
|
|
645
|
+
x
|
|
646
646
|
),
|
|
647
647
|
wv: 0,
|
|
648
|
-
parent:
|
|
648
|
+
parent: r ?? m,
|
|
649
649
|
ac: null
|
|
650
650
|
};
|
|
651
651
|
}
|
|
652
652
|
// @__NO_SIDE_EFFECTS__
|
|
653
|
-
function
|
|
654
|
-
let
|
|
653
|
+
function ti(t, e) {
|
|
654
|
+
let r = (
|
|
655
655
|
/** @type {Effect | null} */
|
|
656
656
|
m
|
|
657
657
|
);
|
|
658
|
-
|
|
659
|
-
var
|
|
658
|
+
r === null && Ln();
|
|
659
|
+
var n = (
|
|
660
660
|
/** @type {Boundary} */
|
|
661
|
-
|
|
661
|
+
r.b
|
|
662
662
|
), i = (
|
|
663
663
|
/** @type {Promise<V>} */
|
|
664
664
|
/** @type {unknown} */
|
|
665
665
|
void 0
|
|
666
|
-
), s =
|
|
666
|
+
), s = ft(
|
|
667
667
|
/** @type {V} */
|
|
668
|
-
|
|
669
|
-
), o = null,
|
|
670
|
-
return
|
|
668
|
+
x
|
|
669
|
+
), o = null, l = !v;
|
|
670
|
+
return ci(() => {
|
|
671
671
|
try {
|
|
672
|
-
var
|
|
673
|
-
o && Promise.resolve(
|
|
672
|
+
var a = t();
|
|
673
|
+
o && Promise.resolve(a).catch(() => {
|
|
674
674
|
});
|
|
675
675
|
} catch (c) {
|
|
676
|
-
|
|
676
|
+
a = Promise.reject(c);
|
|
677
677
|
}
|
|
678
|
-
var u = () =>
|
|
679
|
-
i = o?.then(u, u) ?? Promise.resolve(
|
|
678
|
+
var u = () => a;
|
|
679
|
+
i = o?.then(u, u) ?? Promise.resolve(a), o = i;
|
|
680
680
|
var f = (
|
|
681
681
|
/** @type {Batch} */
|
|
682
|
-
|
|
683
|
-
),
|
|
684
|
-
|
|
685
|
-
const
|
|
686
|
-
o = null,
|
|
682
|
+
A
|
|
683
|
+
), p = n.is_pending();
|
|
684
|
+
l && (n.update_pending_count(1), p || f.increment());
|
|
685
|
+
const h = (c, d = void 0) => {
|
|
686
|
+
o = null, p || f.activate(), d ? d !== Nt && (s.f |= ve, ot(s, d)) : ((s.f & ve) !== 0 && (s.f ^= ve), ot(s, c)), l && (n.update_pending_count(-1), p || f.decrement()), Ar();
|
|
687
687
|
};
|
|
688
|
-
if (i.then(
|
|
688
|
+
if (i.then(h, (c) => h(null, c || "unknown")), f)
|
|
689
689
|
return () => {
|
|
690
690
|
queueMicrotask(() => f.neuter());
|
|
691
691
|
};
|
|
692
|
-
}), new Promise((
|
|
692
|
+
}), new Promise((a) => {
|
|
693
693
|
function u(f) {
|
|
694
|
-
function
|
|
695
|
-
f === i ?
|
|
694
|
+
function p() {
|
|
695
|
+
f === i ? a(s) : u(i);
|
|
696
696
|
}
|
|
697
|
-
f.then(
|
|
697
|
+
f.then(p, p);
|
|
698
698
|
}
|
|
699
699
|
u(i);
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function Dr(t) {
|
|
703
703
|
var e = t.effects;
|
|
704
704
|
if (e !== null) {
|
|
705
705
|
t.effects = null;
|
|
706
|
-
for (var
|
|
707
|
-
|
|
706
|
+
for (var r = 0; r < e.length; r += 1)
|
|
707
|
+
ee(
|
|
708
708
|
/** @type {Effect} */
|
|
709
|
-
e[
|
|
709
|
+
e[r]
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function ri(t) {
|
|
714
714
|
for (var e = t.parent; e !== null; ) {
|
|
715
|
-
if ((e.f &
|
|
715
|
+
if ((e.f & R) === 0)
|
|
716
716
|
return (
|
|
717
717
|
/** @type {Effect} */
|
|
718
718
|
e
|
|
@@ -721,264 +721,264 @@ function Zr(t) {
|
|
|
721
721
|
}
|
|
722
722
|
return null;
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
var e,
|
|
726
|
-
|
|
724
|
+
function Ut(t) {
|
|
725
|
+
var e, r = m;
|
|
726
|
+
ne(ri(t));
|
|
727
727
|
try {
|
|
728
|
-
|
|
728
|
+
Dr(t), e = Vr(t);
|
|
729
729
|
} finally {
|
|
730
|
-
|
|
730
|
+
ne(r);
|
|
731
731
|
}
|
|
732
732
|
return e;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
var e =
|
|
736
|
-
if (t.equals(e) || (t.v = e, t.wv =
|
|
737
|
-
var
|
|
738
|
-
|
|
734
|
+
function Cr(t) {
|
|
735
|
+
var e = Ut(t);
|
|
736
|
+
if (t.equals(e) || (t.v = e, t.wv = Hr()), !Oe) {
|
|
737
|
+
var r = (le || (t.f & q) !== 0) && t.deps !== null ? ce : L;
|
|
738
|
+
H(t, r);
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
const
|
|
742
|
-
function
|
|
743
|
-
var
|
|
741
|
+
const ue = /* @__PURE__ */ new Map();
|
|
742
|
+
function ft(t, e) {
|
|
743
|
+
var r = {
|
|
744
744
|
f: 0,
|
|
745
745
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
746
746
|
v: t,
|
|
747
747
|
reactions: null,
|
|
748
|
-
equals:
|
|
748
|
+
equals: Mr,
|
|
749
749
|
rv: 0,
|
|
750
750
|
wv: 0
|
|
751
751
|
};
|
|
752
|
-
return
|
|
752
|
+
return r;
|
|
753
753
|
}
|
|
754
754
|
// @__NO_SIDE_EFFECTS__
|
|
755
|
-
function
|
|
756
|
-
const
|
|
757
|
-
return
|
|
755
|
+
function D(t, e) {
|
|
756
|
+
const r = ft(t);
|
|
757
|
+
return mi(r), r;
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function P(t, e, r = !1) {
|
|
760
760
|
v !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
761
761
|
// to ensure we error if state is set inside an inspect effect
|
|
762
|
-
(!
|
|
763
|
-
let
|
|
764
|
-
return
|
|
762
|
+
(!G || (v.f & or) !== 0) && xr() && (v.f & (R | Le | Rt | or)) !== 0 && !se?.includes(t) && zn();
|
|
763
|
+
let n = r ? je(e) : e;
|
|
764
|
+
return ot(t, n);
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function ot(t, e) {
|
|
767
767
|
if (!t.equals(e)) {
|
|
768
|
-
var
|
|
769
|
-
|
|
770
|
-
var
|
|
771
|
-
|
|
768
|
+
var r = t.v;
|
|
769
|
+
Oe ? ue.set(t, e) : ue.set(t, r), t.v = e;
|
|
770
|
+
var n = ie.ensure();
|
|
771
|
+
n.capture(t, r), (t.f & R) !== 0 && ((t.f & re) !== 0 && Ut(
|
|
772
772
|
/** @type {Derived} */
|
|
773
773
|
t
|
|
774
|
-
),
|
|
774
|
+
), H(t, (t.f & q) === 0 ? L : ce)), t.wv = Hr(), Tr(t, re), m !== null && (m.f & L) !== 0 && (m.f & (fe | ge)) === 0 && (j === null ? yi([t]) : j.push(t));
|
|
775
775
|
}
|
|
776
776
|
return e;
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
|
|
778
|
+
function Ze(t) {
|
|
779
|
+
P(t, t.v + 1);
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
var
|
|
783
|
-
if (
|
|
784
|
-
for (var
|
|
785
|
-
var s =
|
|
786
|
-
|
|
781
|
+
function Tr(t, e) {
|
|
782
|
+
var r = t.reactions;
|
|
783
|
+
if (r !== null)
|
|
784
|
+
for (var n = r.length, i = 0; i < n; i++) {
|
|
785
|
+
var s = r[i], o = s.f, l = (o & re) === 0;
|
|
786
|
+
l && H(s, e), (o & R) !== 0 ? Tr(
|
|
787
787
|
/** @type {Derived} */
|
|
788
788
|
s,
|
|
789
|
-
|
|
790
|
-
) :
|
|
789
|
+
ce
|
|
790
|
+
) : l && ((o & Le) !== 0 && de !== null && de.push(
|
|
791
791
|
/** @type {Effect} */
|
|
792
792
|
s
|
|
793
|
-
),
|
|
793
|
+
), We(
|
|
794
794
|
/** @type {Effect} */
|
|
795
795
|
s
|
|
796
796
|
));
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
function
|
|
800
|
-
if (typeof t != "object" || t === null ||
|
|
799
|
+
function je(t) {
|
|
800
|
+
if (typeof t != "object" || t === null || rt in t)
|
|
801
801
|
return t;
|
|
802
|
-
const e =
|
|
803
|
-
if (e !==
|
|
802
|
+
const e = Sn(t);
|
|
803
|
+
if (e !== xn && e !== Pn)
|
|
804
804
|
return t;
|
|
805
|
-
var
|
|
806
|
-
if (
|
|
807
|
-
return
|
|
808
|
-
var
|
|
809
|
-
|
|
810
|
-
var f =
|
|
811
|
-
return
|
|
805
|
+
var r = /* @__PURE__ */ new Map(), n = br(t), i = /* @__PURE__ */ D(0), s = me, o = (l) => {
|
|
806
|
+
if (me === s)
|
|
807
|
+
return l();
|
|
808
|
+
var a = v, u = me;
|
|
809
|
+
I(null), hr(s);
|
|
810
|
+
var f = l();
|
|
811
|
+
return I(a), hr(u), f;
|
|
812
812
|
};
|
|
813
|
-
return
|
|
813
|
+
return n && r.set("length", /* @__PURE__ */ D(
|
|
814
814
|
/** @type {any[]} */
|
|
815
815
|
t.length
|
|
816
816
|
)), new Proxy(
|
|
817
817
|
/** @type {any} */
|
|
818
818
|
t,
|
|
819
819
|
{
|
|
820
|
-
defineProperty(
|
|
821
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
822
|
-
var f =
|
|
820
|
+
defineProperty(l, a, u) {
|
|
821
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Nn();
|
|
822
|
+
var f = r.get(a);
|
|
823
823
|
return f === void 0 ? f = o(() => {
|
|
824
|
-
var
|
|
825
|
-
return
|
|
826
|
-
}) :
|
|
824
|
+
var p = /* @__PURE__ */ D(u.value);
|
|
825
|
+
return r.set(a, p), p;
|
|
826
|
+
}) : P(f, u.value, !0), !0;
|
|
827
827
|
},
|
|
828
|
-
deleteProperty(
|
|
829
|
-
var u =
|
|
828
|
+
deleteProperty(l, a) {
|
|
829
|
+
var u = r.get(a);
|
|
830
830
|
if (u === void 0) {
|
|
831
|
-
if (
|
|
832
|
-
const f = o(() => /* @__PURE__ */
|
|
833
|
-
|
|
831
|
+
if (a in l) {
|
|
832
|
+
const f = o(() => /* @__PURE__ */ D(x));
|
|
833
|
+
r.set(a, f), Ze(i);
|
|
834
834
|
}
|
|
835
835
|
} else
|
|
836
|
-
|
|
836
|
+
P(u, x), Ze(i);
|
|
837
837
|
return !0;
|
|
838
838
|
},
|
|
839
|
-
get(
|
|
840
|
-
if (
|
|
839
|
+
get(l, a, u) {
|
|
840
|
+
if (a === rt)
|
|
841
841
|
return t;
|
|
842
|
-
var f =
|
|
843
|
-
if (f === void 0 && (!
|
|
844
|
-
var c =
|
|
842
|
+
var f = r.get(a), p = a in l;
|
|
843
|
+
if (f === void 0 && (!p || Ue(l, a)?.writable) && (f = o(() => {
|
|
844
|
+
var c = je(p ? l[a] : x), d = /* @__PURE__ */ D(c);
|
|
845
845
|
return d;
|
|
846
|
-
}),
|
|
847
|
-
var
|
|
848
|
-
return
|
|
846
|
+
}), r.set(a, f)), f !== void 0) {
|
|
847
|
+
var h = g(f);
|
|
848
|
+
return h === x ? void 0 : h;
|
|
849
849
|
}
|
|
850
|
-
return Reflect.get(
|
|
850
|
+
return Reflect.get(l, a, u);
|
|
851
851
|
},
|
|
852
|
-
getOwnPropertyDescriptor(
|
|
853
|
-
var u = Reflect.getOwnPropertyDescriptor(
|
|
852
|
+
getOwnPropertyDescriptor(l, a) {
|
|
853
|
+
var u = Reflect.getOwnPropertyDescriptor(l, a);
|
|
854
854
|
if (u && "value" in u) {
|
|
855
|
-
var f =
|
|
856
|
-
f && (u.value =
|
|
855
|
+
var f = r.get(a);
|
|
856
|
+
f && (u.value = g(f));
|
|
857
857
|
} else if (u === void 0) {
|
|
858
|
-
var
|
|
859
|
-
if (
|
|
858
|
+
var p = r.get(a), h = p?.v;
|
|
859
|
+
if (p !== void 0 && h !== x)
|
|
860
860
|
return {
|
|
861
861
|
enumerable: !0,
|
|
862
862
|
configurable: !0,
|
|
863
|
-
value:
|
|
863
|
+
value: h,
|
|
864
864
|
writable: !0
|
|
865
865
|
};
|
|
866
866
|
}
|
|
867
867
|
return u;
|
|
868
868
|
},
|
|
869
|
-
has(
|
|
870
|
-
if (
|
|
869
|
+
has(l, a) {
|
|
870
|
+
if (a === rt)
|
|
871
871
|
return !0;
|
|
872
|
-
var u =
|
|
873
|
-
if (u !== void 0 || m !== null && (!f ||
|
|
872
|
+
var u = r.get(a), f = u !== void 0 && u.v !== x || Reflect.has(l, a);
|
|
873
|
+
if (u !== void 0 || m !== null && (!f || Ue(l, a)?.writable)) {
|
|
874
874
|
u === void 0 && (u = o(() => {
|
|
875
|
-
var
|
|
875
|
+
var h = f ? je(l[a]) : x, c = /* @__PURE__ */ D(h);
|
|
876
876
|
return c;
|
|
877
|
-
}),
|
|
878
|
-
var
|
|
879
|
-
if (
|
|
877
|
+
}), r.set(a, u));
|
|
878
|
+
var p = g(u);
|
|
879
|
+
if (p === x)
|
|
880
880
|
return !1;
|
|
881
881
|
}
|
|
882
882
|
return f;
|
|
883
883
|
},
|
|
884
|
-
set(
|
|
885
|
-
var
|
|
886
|
-
if (
|
|
884
|
+
set(l, a, u, f) {
|
|
885
|
+
var p = r.get(a), h = a in l;
|
|
886
|
+
if (n && a === "length")
|
|
887
887
|
for (var c = u; c < /** @type {Source<number>} */
|
|
888
|
-
|
|
889
|
-
var d =
|
|
890
|
-
d !== void 0 ?
|
|
888
|
+
p.v; c += 1) {
|
|
889
|
+
var d = r.get(c + "");
|
|
890
|
+
d !== void 0 ? P(d, x) : c in l && (d = o(() => /* @__PURE__ */ D(x)), r.set(c + "", d));
|
|
891
891
|
}
|
|
892
|
-
if (
|
|
893
|
-
(!
|
|
892
|
+
if (p === void 0)
|
|
893
|
+
(!h || Ue(l, a)?.writable) && (p = o(() => /* @__PURE__ */ D(void 0)), P(p, je(u)), r.set(a, p));
|
|
894
894
|
else {
|
|
895
|
-
|
|
896
|
-
var
|
|
897
|
-
|
|
895
|
+
h = p.v !== x;
|
|
896
|
+
var w = o(() => je(u));
|
|
897
|
+
P(p, w);
|
|
898
898
|
}
|
|
899
|
-
var
|
|
900
|
-
if (
|
|
901
|
-
if (
|
|
902
|
-
var
|
|
899
|
+
var F = Reflect.getOwnPropertyDescriptor(l, a);
|
|
900
|
+
if (F?.set && F.set.call(f, u), !h) {
|
|
901
|
+
if (n && typeof a == "string") {
|
|
902
|
+
var K = (
|
|
903
903
|
/** @type {Source<number>} */
|
|
904
|
-
|
|
905
|
-
),
|
|
906
|
-
Number.isInteger(
|
|
904
|
+
r.get("length")
|
|
905
|
+
), k = Number(a);
|
|
906
|
+
Number.isInteger(k) && k >= K.v && P(K, k + 1);
|
|
907
907
|
}
|
|
908
|
-
|
|
908
|
+
Ze(i);
|
|
909
909
|
}
|
|
910
910
|
return !0;
|
|
911
911
|
},
|
|
912
|
-
ownKeys(
|
|
913
|
-
|
|
914
|
-
var
|
|
915
|
-
var
|
|
916
|
-
return
|
|
912
|
+
ownKeys(l) {
|
|
913
|
+
g(i);
|
|
914
|
+
var a = Reflect.ownKeys(l).filter((p) => {
|
|
915
|
+
var h = r.get(p);
|
|
916
|
+
return h === void 0 || h.v !== x;
|
|
917
917
|
});
|
|
918
|
-
for (var [u, f] of
|
|
919
|
-
f.v !==
|
|
920
|
-
return
|
|
918
|
+
for (var [u, f] of r)
|
|
919
|
+
f.v !== x && !(u in l) && a.push(u);
|
|
920
|
+
return a;
|
|
921
921
|
},
|
|
922
922
|
setPrototypeOf() {
|
|
923
|
-
|
|
923
|
+
jn();
|
|
924
924
|
}
|
|
925
925
|
}
|
|
926
926
|
);
|
|
927
927
|
}
|
|
928
|
-
var
|
|
929
|
-
function
|
|
930
|
-
if (
|
|
931
|
-
|
|
932
|
-
var t = Element.prototype, e = Node.prototype,
|
|
933
|
-
|
|
928
|
+
var lr, Lr, Ir, Fr;
|
|
929
|
+
function ni() {
|
|
930
|
+
if (lr === void 0) {
|
|
931
|
+
lr = window, Lr = /Firefox/.test(navigator.userAgent);
|
|
932
|
+
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
933
|
+
Ir = Ue(e, "firstChild").get, Fr = Ue(e, "nextSibling").get, sr(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), sr(r) && (r.__t = void 0);
|
|
934
934
|
}
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function ii(t = "") {
|
|
937
937
|
return document.createTextNode(t);
|
|
938
938
|
}
|
|
939
939
|
// @__NO_SIDE_EFFECTS__
|
|
940
|
-
function
|
|
941
|
-
return
|
|
940
|
+
function Or(t) {
|
|
941
|
+
return Ir.call(t);
|
|
942
942
|
}
|
|
943
943
|
// @__NO_SIDE_EFFECTS__
|
|
944
|
-
function
|
|
945
|
-
return
|
|
944
|
+
function Zt(t) {
|
|
945
|
+
return Fr.call(t);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
return /* @__PURE__ */
|
|
947
|
+
function ur(t, e) {
|
|
948
|
+
return /* @__PURE__ */ Or(t);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let
|
|
950
|
+
function si(t, e = 1, r = !1) {
|
|
951
|
+
let n = t;
|
|
952
952
|
for (; e--; )
|
|
953
|
-
|
|
954
|
-
/* @__PURE__ */
|
|
955
|
-
return
|
|
953
|
+
n = /** @type {TemplateNode} */
|
|
954
|
+
/* @__PURE__ */ Zt(n);
|
|
955
|
+
return n;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
var e = v,
|
|
959
|
-
|
|
957
|
+
function Rr(t) {
|
|
958
|
+
var e = v, r = m;
|
|
959
|
+
I(null), ne(null);
|
|
960
960
|
try {
|
|
961
961
|
return t();
|
|
962
962
|
} finally {
|
|
963
|
-
|
|
963
|
+
I(e), ne(r);
|
|
964
964
|
}
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
m === null && v === null &&
|
|
966
|
+
function oi(t) {
|
|
967
|
+
m === null && v === null && On(), v !== null && (v.f & q) !== 0 && m === null && Fn(), Oe && In();
|
|
968
968
|
}
|
|
969
|
-
function
|
|
970
|
-
var
|
|
971
|
-
|
|
969
|
+
function ai(t, e) {
|
|
970
|
+
var r = e.last;
|
|
971
|
+
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function he(t, e, r, n = !0) {
|
|
974
974
|
var i = m;
|
|
975
|
-
i !== null && (i.f &
|
|
975
|
+
i !== null && (i.f & Ae) !== 0 && (t |= Ae);
|
|
976
976
|
var s = {
|
|
977
|
-
ctx:
|
|
977
|
+
ctx: Y,
|
|
978
978
|
deps: null,
|
|
979
979
|
nodes_start: null,
|
|
980
980
|
nodes_end: null,
|
|
981
|
-
f: t |
|
|
981
|
+
f: t | re,
|
|
982
982
|
first: null,
|
|
983
983
|
fn: e,
|
|
984
984
|
last: null,
|
|
@@ -991,403 +991,403 @@ function ue(t, e, n, r = !0) {
|
|
|
991
991
|
wv: 0,
|
|
992
992
|
ac: null
|
|
993
993
|
};
|
|
994
|
-
if (
|
|
994
|
+
if (r)
|
|
995
995
|
try {
|
|
996
|
-
|
|
997
|
-
} catch (
|
|
998
|
-
throw
|
|
996
|
+
Se(s), s.f |= Ot;
|
|
997
|
+
} catch (a) {
|
|
998
|
+
throw ee(s), a;
|
|
999
999
|
}
|
|
1000
|
-
else e !== null &&
|
|
1001
|
-
if (
|
|
1000
|
+
else e !== null && We(s);
|
|
1001
|
+
if (n) {
|
|
1002
1002
|
var o = s;
|
|
1003
|
-
if (
|
|
1004
|
-
(o.f &
|
|
1005
|
-
var
|
|
1003
|
+
if (r && o.deps === null && o.teardown === null && o.nodes_start === null && o.first === o.last && // either `null`, or a singular child
|
|
1004
|
+
(o.f & Fe) === 0 && (o = o.first), o !== null && (o.parent = i, i !== null && ai(o, i), v !== null && (v.f & R) !== 0 && (t & ge) === 0)) {
|
|
1005
|
+
var l = (
|
|
1006
1006
|
/** @type {Derived} */
|
|
1007
1007
|
v
|
|
1008
1008
|
);
|
|
1009
|
-
(
|
|
1009
|
+
(l.effects ??= []).push(o);
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
1012
|
return s;
|
|
1013
1013
|
}
|
|
1014
|
-
function
|
|
1015
|
-
return v !== null && !
|
|
1014
|
+
function li() {
|
|
1015
|
+
return v !== null && !G;
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
|
|
1017
|
+
function J(t) {
|
|
1018
|
+
oi();
|
|
1019
1019
|
var e = (
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
1021
|
m.f
|
|
1022
|
-
),
|
|
1023
|
-
if (
|
|
1024
|
-
var
|
|
1022
|
+
), r = !v && (e & fe) !== 0 && (e & Ot) === 0;
|
|
1023
|
+
if (r) {
|
|
1024
|
+
var n = (
|
|
1025
1025
|
/** @type {ComponentContext} */
|
|
1026
|
-
|
|
1026
|
+
Y
|
|
1027
1027
|
);
|
|
1028
|
-
(
|
|
1028
|
+
(n.e ??= []).push(t);
|
|
1029
1029
|
} else
|
|
1030
|
-
return
|
|
1031
|
-
}
|
|
1032
|
-
function
|
|
1033
|
-
return
|
|
1034
|
-
}
|
|
1035
|
-
function
|
|
1036
|
-
|
|
1037
|
-
const e =
|
|
1038
|
-
return (
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
}) : (
|
|
1030
|
+
return Nr(t);
|
|
1031
|
+
}
|
|
1032
|
+
function Nr(t) {
|
|
1033
|
+
return he(It | Tn, t, !1);
|
|
1034
|
+
}
|
|
1035
|
+
function ui(t) {
|
|
1036
|
+
ie.ensure();
|
|
1037
|
+
const e = he(ge | Fe, t, !0);
|
|
1038
|
+
return (r = {}) => new Promise((n) => {
|
|
1039
|
+
r.outro ? nt(e, () => {
|
|
1040
|
+
ee(e), n(void 0);
|
|
1041
|
+
}) : (ee(e), n(void 0));
|
|
1042
1042
|
});
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1045
|
-
return
|
|
1044
|
+
function fi(t) {
|
|
1045
|
+
return he(It, t, !1);
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
return
|
|
1047
|
+
function ci(t) {
|
|
1048
|
+
return he(Rt | Fe, t, !0);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1050
|
+
function qt(t, e = 0) {
|
|
1051
|
+
return he(Er | e, t, !0);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
|
|
1055
|
-
|
|
1053
|
+
function jr(t, e = [], r = []) {
|
|
1054
|
+
Qn(e, r, (n) => {
|
|
1055
|
+
he(Er, () => t(...n.map(g)), !0);
|
|
1056
1056
|
});
|
|
1057
1057
|
}
|
|
1058
|
-
function
|
|
1059
|
-
var
|
|
1060
|
-
return
|
|
1058
|
+
function hi(t, e = 0) {
|
|
1059
|
+
var r = he(Le | e, t, !0);
|
|
1060
|
+
return r;
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
return
|
|
1062
|
+
function pe(t, e = !0) {
|
|
1063
|
+
return he(fe | Fe, t, !0, e);
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function zr(t) {
|
|
1066
1066
|
var e = t.teardown;
|
|
1067
1067
|
if (e !== null) {
|
|
1068
|
-
const
|
|
1069
|
-
|
|
1068
|
+
const r = Oe, n = v;
|
|
1069
|
+
cr(!0), I(null);
|
|
1070
1070
|
try {
|
|
1071
1071
|
e.call(null);
|
|
1072
1072
|
} finally {
|
|
1073
|
-
|
|
1073
|
+
cr(r), I(n);
|
|
1074
1074
|
}
|
|
1075
1075
|
}
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
var
|
|
1079
|
-
for (t.first = t.last = null;
|
|
1080
|
-
const i =
|
|
1081
|
-
i !== null &&
|
|
1082
|
-
i.abort(
|
|
1077
|
+
function Br(t, e = !1) {
|
|
1078
|
+
var r = t.first;
|
|
1079
|
+
for (t.first = t.last = null; r !== null; ) {
|
|
1080
|
+
const i = r.ac;
|
|
1081
|
+
i !== null && Rr(() => {
|
|
1082
|
+
i.abort(Nt);
|
|
1083
1083
|
});
|
|
1084
|
-
var
|
|
1085
|
-
(
|
|
1084
|
+
var n = r.next;
|
|
1085
|
+
(r.f & ge) !== 0 ? r.parent = null : ee(r, e), r = n;
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function pi(t) {
|
|
1089
1089
|
for (var e = t.first; e !== null; ) {
|
|
1090
|
-
var
|
|
1091
|
-
(e.f &
|
|
1090
|
+
var r = e.next;
|
|
1091
|
+
(e.f & fe) === 0 && ee(e), e = r;
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
var
|
|
1096
|
-
(e || (t.f &
|
|
1094
|
+
function ee(t, e = !0) {
|
|
1095
|
+
var r = !1;
|
|
1096
|
+
(e || (t.f & Cn) !== 0) && t.nodes_start !== null && t.nodes_end !== null && (di(
|
|
1097
1097
|
t.nodes_start,
|
|
1098
1098
|
/** @type {TemplateNode} */
|
|
1099
1099
|
t.nodes_end
|
|
1100
|
-
),
|
|
1101
|
-
var
|
|
1102
|
-
if (
|
|
1103
|
-
for (const s of
|
|
1100
|
+
), r = !0), Br(t, e && !r), at(t, 0), H(t, Ie);
|
|
1101
|
+
var n = t.transitions;
|
|
1102
|
+
if (n !== null)
|
|
1103
|
+
for (const s of n)
|
|
1104
1104
|
s.stop();
|
|
1105
|
-
|
|
1105
|
+
zr(t);
|
|
1106
1106
|
var i = t.parent;
|
|
1107
|
-
i !== null && i.first !== null &&
|
|
1107
|
+
i !== null && i.first !== null && Ur(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes_start = t.nodes_end = t.ac = null;
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function di(t, e) {
|
|
1110
1110
|
for (; t !== null; ) {
|
|
1111
|
-
var
|
|
1111
|
+
var r = t === e ? null : (
|
|
1112
1112
|
/** @type {TemplateNode} */
|
|
1113
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ Zt(t)
|
|
1114
1114
|
);
|
|
1115
|
-
t.remove(), t =
|
|
1115
|
+
t.remove(), t = r;
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1119
|
-
var e = t.parent,
|
|
1120
|
-
|
|
1118
|
+
function Ur(t) {
|
|
1119
|
+
var e = t.parent, r = t.prev, n = t.next;
|
|
1120
|
+
r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1123
|
-
var
|
|
1124
|
-
|
|
1125
|
-
|
|
1122
|
+
function nt(t, e) {
|
|
1123
|
+
var r = [];
|
|
1124
|
+
Zr(t, r, !0), vi(r, () => {
|
|
1125
|
+
ee(t), e && e();
|
|
1126
1126
|
});
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1129
|
-
var
|
|
1130
|
-
if (
|
|
1131
|
-
var
|
|
1128
|
+
function vi(t, e) {
|
|
1129
|
+
var r = t.length;
|
|
1130
|
+
if (r > 0) {
|
|
1131
|
+
var n = () => --r || e();
|
|
1132
1132
|
for (var i of t)
|
|
1133
|
-
i.out(
|
|
1133
|
+
i.out(n);
|
|
1134
1134
|
} else
|
|
1135
1135
|
e();
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1138
|
-
if ((t.f &
|
|
1139
|
-
if (t.f ^=
|
|
1137
|
+
function Zr(t, e, r) {
|
|
1138
|
+
if ((t.f & Ae) === 0) {
|
|
1139
|
+
if (t.f ^= Ae, t.transitions !== null)
|
|
1140
1140
|
for (const o of t.transitions)
|
|
1141
|
-
(o.is_global ||
|
|
1142
|
-
for (var
|
|
1143
|
-
var i =
|
|
1144
|
-
|
|
1141
|
+
(o.is_global || r) && e.push(o);
|
|
1142
|
+
for (var n = t.first; n !== null; ) {
|
|
1143
|
+
var i = n.next, s = (n.f & kr) !== 0 || (n.f & fe) !== 0;
|
|
1144
|
+
Zr(n, e, s ? r : !1), n = i;
|
|
1145
1145
|
}
|
|
1146
1146
|
}
|
|
1147
1147
|
}
|
|
1148
|
-
let
|
|
1149
|
-
function
|
|
1150
|
-
|
|
1148
|
+
let Pe = !1;
|
|
1149
|
+
function fr(t) {
|
|
1150
|
+
Pe = t;
|
|
1151
1151
|
}
|
|
1152
|
-
let
|
|
1153
|
-
function
|
|
1154
|
-
|
|
1152
|
+
let Oe = !1;
|
|
1153
|
+
function cr(t) {
|
|
1154
|
+
Oe = t;
|
|
1155
1155
|
}
|
|
1156
|
-
let v = null,
|
|
1157
|
-
function
|
|
1156
|
+
let v = null, G = !1;
|
|
1157
|
+
function I(t) {
|
|
1158
1158
|
v = t;
|
|
1159
1159
|
}
|
|
1160
1160
|
let m = null;
|
|
1161
|
-
function
|
|
1161
|
+
function ne(t) {
|
|
1162
1162
|
m = t;
|
|
1163
1163
|
}
|
|
1164
|
-
let
|
|
1165
|
-
function
|
|
1166
|
-
v !== null && (
|
|
1164
|
+
let se = null;
|
|
1165
|
+
function mi(t) {
|
|
1166
|
+
v !== null && (se === null ? se = [t] : se.push(t));
|
|
1167
1167
|
}
|
|
1168
|
-
let
|
|
1169
|
-
function
|
|
1170
|
-
|
|
1168
|
+
let C = null, O = 0, j = null;
|
|
1169
|
+
function yi(t) {
|
|
1170
|
+
j = t;
|
|
1171
1171
|
}
|
|
1172
|
-
let
|
|
1173
|
-
function
|
|
1174
|
-
|
|
1172
|
+
let qr = 1, Ge = 0, me = Ge;
|
|
1173
|
+
function hr(t) {
|
|
1174
|
+
me = t;
|
|
1175
1175
|
}
|
|
1176
|
-
let
|
|
1177
|
-
function
|
|
1178
|
-
return ++
|
|
1176
|
+
let le = !1;
|
|
1177
|
+
function Hr() {
|
|
1178
|
+
return ++qr;
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function ct(t) {
|
|
1181
1181
|
var e = t.f;
|
|
1182
|
-
if ((e &
|
|
1182
|
+
if ((e & re) !== 0)
|
|
1183
1183
|
return !0;
|
|
1184
|
-
if ((e &
|
|
1185
|
-
var
|
|
1186
|
-
if (
|
|
1187
|
-
var i, s, o = (e &
|
|
1188
|
-
if ((o ||
|
|
1184
|
+
if ((e & ce) !== 0) {
|
|
1185
|
+
var r = t.deps, n = (e & q) !== 0;
|
|
1186
|
+
if (r !== null) {
|
|
1187
|
+
var i, s, o = (e & st) !== 0, l = n && m !== null && !le, a = r.length;
|
|
1188
|
+
if ((o || l) && (m === null || (m.f & Ie) === 0)) {
|
|
1189
1189
|
var u = (
|
|
1190
1190
|
/** @type {Derived} */
|
|
1191
1191
|
t
|
|
1192
1192
|
), f = u.parent;
|
|
1193
|
-
for (i = 0; i <
|
|
1194
|
-
s =
|
|
1195
|
-
o && (u.f ^=
|
|
1193
|
+
for (i = 0; i < a; i++)
|
|
1194
|
+
s = r[i], (o || !s?.reactions?.includes(u)) && (s.reactions ??= []).push(u);
|
|
1195
|
+
o && (u.f ^= st), l && f !== null && (f.f & q) === 0 && (u.f ^= q);
|
|
1196
1196
|
}
|
|
1197
|
-
for (i = 0; i <
|
|
1198
|
-
if (s =
|
|
1197
|
+
for (i = 0; i < a; i++)
|
|
1198
|
+
if (s = r[i], ct(
|
|
1199
1199
|
/** @type {Derived} */
|
|
1200
1200
|
s
|
|
1201
|
-
) &&
|
|
1201
|
+
) && Cr(
|
|
1202
1202
|
/** @type {Derived} */
|
|
1203
1203
|
s
|
|
1204
1204
|
), s.wv > t.wv)
|
|
1205
1205
|
return !0;
|
|
1206
1206
|
}
|
|
1207
|
-
(!
|
|
1207
|
+
(!n || m !== null && !le) && H(t, L);
|
|
1208
1208
|
}
|
|
1209
1209
|
return !1;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
var
|
|
1213
|
-
if (
|
|
1214
|
-
for (var i = 0; i <
|
|
1215
|
-
var s =
|
|
1216
|
-
(s.f &
|
|
1211
|
+
function Yr(t, e, r = !0) {
|
|
1212
|
+
var n = t.reactions;
|
|
1213
|
+
if (n !== null && !se?.includes(t))
|
|
1214
|
+
for (var i = 0; i < n.length; i++) {
|
|
1215
|
+
var s = n[i];
|
|
1216
|
+
(s.f & R) !== 0 ? Yr(
|
|
1217
1217
|
/** @type {Derived} */
|
|
1218
1218
|
s,
|
|
1219
1219
|
e,
|
|
1220
1220
|
!1
|
|
1221
|
-
) : e === s && (
|
|
1221
|
+
) : e === s && (r ? H(s, re) : (s.f & L) !== 0 && H(s, ce), We(
|
|
1222
1222
|
/** @type {Effect} */
|
|
1223
1223
|
s
|
|
1224
1224
|
));
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
var e =
|
|
1229
|
-
|
|
1230
|
-
null,
|
|
1231
|
-
t.ac.abort(
|
|
1227
|
+
function Vr(t) {
|
|
1228
|
+
var e = C, r = O, n = j, i = v, s = le, o = se, l = Y, a = G, u = me, f = t.f;
|
|
1229
|
+
C = /** @type {null | Value[]} */
|
|
1230
|
+
null, O = 0, j = null, le = (f & q) !== 0 && (G || !Pe || v === null), v = (f & (fe | ge)) === 0 ? t : null, se = null, De(t.ctx), G = !1, me = ++Ge, t.ac !== null && (Rr(() => {
|
|
1231
|
+
t.ac.abort(Nt);
|
|
1232
1232
|
}), t.ac = null);
|
|
1233
1233
|
try {
|
|
1234
|
-
t.f |=
|
|
1235
|
-
var
|
|
1234
|
+
t.f |= xt;
|
|
1235
|
+
var p = (
|
|
1236
1236
|
/** @type {Function} */
|
|
1237
1237
|
t.fn
|
|
1238
|
-
),
|
|
1239
|
-
if (
|
|
1238
|
+
), h = p(), c = t.deps;
|
|
1239
|
+
if (C !== null) {
|
|
1240
1240
|
var d;
|
|
1241
|
-
if (
|
|
1242
|
-
for (c.length =
|
|
1243
|
-
c[
|
|
1241
|
+
if (at(t, O), c !== null && O > 0)
|
|
1242
|
+
for (c.length = O + C.length, d = 0; d < C.length; d++)
|
|
1243
|
+
c[O + d] = C[d];
|
|
1244
1244
|
else
|
|
1245
|
-
t.deps = c =
|
|
1246
|
-
if (!
|
|
1247
|
-
(f &
|
|
1245
|
+
t.deps = c = C;
|
|
1246
|
+
if (!le || // Deriveds that already have reactions can cleanup, so we still add them as reactions
|
|
1247
|
+
(f & R) !== 0 && /** @type {import('#client').Derived} */
|
|
1248
1248
|
t.reactions !== null)
|
|
1249
|
-
for (d =
|
|
1249
|
+
for (d = O; d < c.length; d++)
|
|
1250
1250
|
(c[d].reactions ??= []).push(t);
|
|
1251
|
-
} else c !== null &&
|
|
1252
|
-
if (
|
|
1251
|
+
} else c !== null && O < c.length && (at(t, O), c.length = O);
|
|
1252
|
+
if (xr() && j !== null && !G && c !== null && (t.f & (R | ce | re)) === 0)
|
|
1253
1253
|
for (d = 0; d < /** @type {Source[]} */
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1254
|
+
j.length; d++)
|
|
1255
|
+
Yr(
|
|
1256
|
+
j[d],
|
|
1257
1257
|
/** @type {Effect} */
|
|
1258
1258
|
t
|
|
1259
1259
|
);
|
|
1260
|
-
return i !== null && i !== t && (
|
|
1261
|
-
|
|
1262
|
-
} catch (
|
|
1263
|
-
return
|
|
1260
|
+
return i !== null && i !== t && (Ge++, j !== null && (n === null ? n = j : n.push(.../** @type {Source[]} */
|
|
1261
|
+
j))), (t.f & ve) !== 0 && (t.f ^= ve), h;
|
|
1262
|
+
} catch (w) {
|
|
1263
|
+
return Pr(w);
|
|
1264
1264
|
} finally {
|
|
1265
|
-
t.f ^=
|
|
1265
|
+
t.f ^= xt, C = e, O = r, j = n, v = i, le = s, se = o, De(l), G = a, me = u;
|
|
1266
1266
|
}
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1269
|
-
let
|
|
1270
|
-
if (
|
|
1271
|
-
var
|
|
1272
|
-
if (
|
|
1273
|
-
var i =
|
|
1274
|
-
i === 0 ?
|
|
1268
|
+
function gi(t, e) {
|
|
1269
|
+
let r = e.reactions;
|
|
1270
|
+
if (r !== null) {
|
|
1271
|
+
var n = kn.call(r, t);
|
|
1272
|
+
if (n !== -1) {
|
|
1273
|
+
var i = r.length - 1;
|
|
1274
|
+
i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
|
-
|
|
1277
|
+
r === null && (e.f & R) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1278
1278
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1279
1279
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1280
|
-
(
|
|
1280
|
+
(C === null || !C.includes(e)) && (H(e, ce), (e.f & (q | st)) === 0 && (e.f ^= st), Dr(
|
|
1281
1281
|
/** @type {Derived} **/
|
|
1282
1282
|
e
|
|
1283
|
-
),
|
|
1283
|
+
), at(
|
|
1284
1284
|
/** @type {Derived} **/
|
|
1285
1285
|
e,
|
|
1286
1286
|
0
|
|
1287
1287
|
));
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
var
|
|
1291
|
-
if (
|
|
1292
|
-
for (var
|
|
1293
|
-
|
|
1289
|
+
function at(t, e) {
|
|
1290
|
+
var r = t.deps;
|
|
1291
|
+
if (r !== null)
|
|
1292
|
+
for (var n = e; n < r.length; n++)
|
|
1293
|
+
gi(t, r[n]);
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Se(t) {
|
|
1296
1296
|
var e = t.f;
|
|
1297
|
-
if ((e &
|
|
1298
|
-
|
|
1299
|
-
var
|
|
1300
|
-
m = t,
|
|
1297
|
+
if ((e & Ie) === 0) {
|
|
1298
|
+
H(t, L);
|
|
1299
|
+
var r = m, n = Pe;
|
|
1300
|
+
m = t, Pe = !0;
|
|
1301
1301
|
try {
|
|
1302
|
-
(e &
|
|
1303
|
-
var i =
|
|
1304
|
-
t.teardown = typeof i == "function" ? i : null, t.wv =
|
|
1302
|
+
(e & Le) !== 0 ? pi(t) : Br(t), zr(t);
|
|
1303
|
+
var i = Vr(t);
|
|
1304
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = qr;
|
|
1305
1305
|
var s;
|
|
1306
1306
|
} finally {
|
|
1307
|
-
|
|
1307
|
+
Pe = n, m = r;
|
|
1308
1308
|
}
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1312
|
-
var e = t.f,
|
|
1313
|
-
if (v !== null && !
|
|
1314
|
-
var
|
|
1315
|
-
if (!
|
|
1311
|
+
function g(t) {
|
|
1312
|
+
var e = t.f, r = (e & R) !== 0;
|
|
1313
|
+
if (v !== null && !G) {
|
|
1314
|
+
var n = m !== null && (m.f & Ie) !== 0;
|
|
1315
|
+
if (!n && !se?.includes(t)) {
|
|
1316
1316
|
var i = v.deps;
|
|
1317
|
-
if ((v.f &
|
|
1318
|
-
t.rv <
|
|
1317
|
+
if ((v.f & xt) !== 0)
|
|
1318
|
+
t.rv < Ge && (t.rv = Ge, C === null && i !== null && i[O] === t ? O++ : C === null ? C = [t] : (!le || !C.includes(t)) && C.push(t));
|
|
1319
1319
|
else {
|
|
1320
1320
|
(v.deps ??= []).push(t);
|
|
1321
1321
|
var s = t.reactions;
|
|
1322
1322
|
s === null ? t.reactions = [v] : s.includes(v) || s.push(v);
|
|
1323
1323
|
}
|
|
1324
1324
|
}
|
|
1325
|
-
} else if (
|
|
1325
|
+
} else if (r && /** @type {Derived} */
|
|
1326
1326
|
t.deps === null && /** @type {Derived} */
|
|
1327
1327
|
t.effects === null) {
|
|
1328
1328
|
var o = (
|
|
1329
1329
|
/** @type {Derived} */
|
|
1330
1330
|
t
|
|
1331
|
-
),
|
|
1332
|
-
|
|
1331
|
+
), l = o.parent;
|
|
1332
|
+
l !== null && (l.f & q) === 0 && (o.f ^= q);
|
|
1333
1333
|
}
|
|
1334
|
-
if (
|
|
1335
|
-
if (
|
|
1336
|
-
return
|
|
1337
|
-
if (
|
|
1334
|
+
if (Oe) {
|
|
1335
|
+
if (ue.has(t))
|
|
1336
|
+
return ue.get(t);
|
|
1337
|
+
if (r) {
|
|
1338
1338
|
o = /** @type {Derived} */
|
|
1339
1339
|
t;
|
|
1340
|
-
var
|
|
1341
|
-
return ((o.f &
|
|
1340
|
+
var a = o.v;
|
|
1341
|
+
return ((o.f & L) === 0 && o.reactions !== null || Xr(o)) && (a = Ut(o)), ue.set(o, a), a;
|
|
1342
1342
|
}
|
|
1343
|
-
} else
|
|
1344
|
-
t,
|
|
1345
|
-
if ((t.f &
|
|
1343
|
+
} else r && (o = /** @type {Derived} */
|
|
1344
|
+
t, ct(o) && Cr(o));
|
|
1345
|
+
if ((t.f & ve) !== 0)
|
|
1346
1346
|
throw t.v;
|
|
1347
1347
|
return t.v;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1350
|
-
if (t.v ===
|
|
1349
|
+
function Xr(t) {
|
|
1350
|
+
if (t.v === x) return !0;
|
|
1351
1351
|
if (t.deps === null) return !1;
|
|
1352
1352
|
for (const e of t.deps)
|
|
1353
|
-
if (
|
|
1353
|
+
if (ue.has(e) || (e.f & R) !== 0 && Xr(
|
|
1354
1354
|
/** @type {Derived} */
|
|
1355
1355
|
e
|
|
1356
1356
|
))
|
|
1357
1357
|
return !0;
|
|
1358
1358
|
return !1;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
var e =
|
|
1360
|
+
function Wr(t) {
|
|
1361
|
+
var e = G;
|
|
1362
1362
|
try {
|
|
1363
|
-
return
|
|
1363
|
+
return G = !0, t();
|
|
1364
1364
|
} finally {
|
|
1365
|
-
|
|
1365
|
+
G = e;
|
|
1366
1366
|
}
|
|
1367
1367
|
}
|
|
1368
|
-
const
|
|
1369
|
-
function
|
|
1370
|
-
t.f = t.f &
|
|
1368
|
+
const _i = -7169;
|
|
1369
|
+
function H(t, e) {
|
|
1370
|
+
t.f = t.f & _i | e;
|
|
1371
1371
|
}
|
|
1372
|
-
const
|
|
1373
|
-
function
|
|
1374
|
-
return
|
|
1372
|
+
const wi = ["touchstart", "touchmove"];
|
|
1373
|
+
function bi(t) {
|
|
1374
|
+
return wi.includes(t);
|
|
1375
1375
|
}
|
|
1376
|
-
const
|
|
1377
|
-
let
|
|
1378
|
-
function
|
|
1379
|
-
var e = this,
|
|
1376
|
+
const Ei = /* @__PURE__ */ new Set(), pr = /* @__PURE__ */ new Set();
|
|
1377
|
+
let dr = null;
|
|
1378
|
+
function et(t) {
|
|
1379
|
+
var e = this, r = (
|
|
1380
1380
|
/** @type {Node} */
|
|
1381
1381
|
e.ownerDocument
|
|
1382
|
-
),
|
|
1382
|
+
), n = t.type, i = t.composedPath?.() || [], s = (
|
|
1383
1383
|
/** @type {null | Element} */
|
|
1384
1384
|
i[0] || t.target
|
|
1385
1385
|
);
|
|
1386
|
-
|
|
1387
|
-
var o = 0,
|
|
1388
|
-
if (
|
|
1389
|
-
var
|
|
1390
|
-
if (
|
|
1386
|
+
dr = t;
|
|
1387
|
+
var o = 0, l = dr === t && t.__root;
|
|
1388
|
+
if (l) {
|
|
1389
|
+
var a = i.indexOf(l);
|
|
1390
|
+
if (a !== -1 && (e === document || e === /** @type {any} */
|
|
1391
1391
|
window)) {
|
|
1392
1392
|
t.__root = e;
|
|
1393
1393
|
return;
|
|
@@ -1395,176 +1395,194 @@ function Ke(t) {
|
|
|
1395
1395
|
var u = i.indexOf(e);
|
|
1396
1396
|
if (u === -1)
|
|
1397
1397
|
return;
|
|
1398
|
-
|
|
1398
|
+
a <= u && (o = a);
|
|
1399
1399
|
}
|
|
1400
1400
|
if (s = /** @type {Element} */
|
|
1401
1401
|
i[o] || t.target, s !== e) {
|
|
1402
|
-
|
|
1402
|
+
Mt(t, "currentTarget", {
|
|
1403
1403
|
configurable: !0,
|
|
1404
1404
|
get() {
|
|
1405
|
-
return s ||
|
|
1405
|
+
return s || r;
|
|
1406
1406
|
}
|
|
1407
1407
|
});
|
|
1408
|
-
var f = v,
|
|
1409
|
-
|
|
1408
|
+
var f = v, p = m;
|
|
1409
|
+
I(null), ne(null);
|
|
1410
1410
|
try {
|
|
1411
|
-
for (var
|
|
1411
|
+
for (var h, c = []; s !== null; ) {
|
|
1412
1412
|
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1413
1413
|
s.host || null;
|
|
1414
1414
|
try {
|
|
1415
|
-
var
|
|
1416
|
-
if (
|
|
1415
|
+
var w = s["__" + n];
|
|
1416
|
+
if (w != null && (!/** @type {any} */
|
|
1417
1417
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1418
1418
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1419
1419
|
t.target === s))
|
|
1420
|
-
if (
|
|
1421
|
-
var [
|
|
1422
|
-
|
|
1420
|
+
if (br(w)) {
|
|
1421
|
+
var [F, ...K] = w;
|
|
1422
|
+
F.apply(s, [t, ...K]);
|
|
1423
1423
|
} else
|
|
1424
|
-
|
|
1425
|
-
} catch (
|
|
1426
|
-
|
|
1424
|
+
w.call(s, t);
|
|
1425
|
+
} catch (k) {
|
|
1426
|
+
h ? c.push(k) : h = k;
|
|
1427
1427
|
}
|
|
1428
1428
|
if (t.cancelBubble || d === e || d === null)
|
|
1429
1429
|
break;
|
|
1430
1430
|
s = d;
|
|
1431
1431
|
}
|
|
1432
|
-
if (
|
|
1433
|
-
for (let
|
|
1432
|
+
if (h) {
|
|
1433
|
+
for (let k of c)
|
|
1434
1434
|
queueMicrotask(() => {
|
|
1435
|
-
throw
|
|
1435
|
+
throw k;
|
|
1436
1436
|
});
|
|
1437
|
-
throw
|
|
1437
|
+
throw h;
|
|
1438
1438
|
}
|
|
1439
1439
|
} finally {
|
|
1440
|
-
t.__root = e, delete t.currentTarget,
|
|
1440
|
+
t.__root = e, delete t.currentTarget, I(f), ne(p);
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
}
|
|
1444
|
-
function
|
|
1444
|
+
function ki(t) {
|
|
1445
1445
|
var e = document.createElement("template");
|
|
1446
1446
|
return e.innerHTML = t.replaceAll("<!>", "<!---->"), e.content;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1449
|
-
var
|
|
1448
|
+
function Mi(t, e) {
|
|
1449
|
+
var r = (
|
|
1450
1450
|
/** @type {Effect} */
|
|
1451
1451
|
m
|
|
1452
1452
|
);
|
|
1453
|
-
|
|
1453
|
+
r.nodes_start === null && (r.nodes_start = t, r.nodes_end = e);
|
|
1454
1454
|
}
|
|
1455
1455
|
// @__NO_SIDE_EFFECTS__
|
|
1456
|
-
function
|
|
1457
|
-
var
|
|
1456
|
+
function Gr(t, e) {
|
|
1457
|
+
var r = (e & Un) !== 0, n, i = !t.startsWith("<!>");
|
|
1458
1458
|
return () => {
|
|
1459
|
-
|
|
1460
|
-
/* @__PURE__ */
|
|
1459
|
+
n === void 0 && (n = ki(i ? t : "<!>" + t), n = /** @type {Node} */
|
|
1460
|
+
/* @__PURE__ */ Or(n));
|
|
1461
1461
|
var s = (
|
|
1462
1462
|
/** @type {TemplateNode} */
|
|
1463
|
-
|
|
1463
|
+
r || Lr ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1464
1464
|
);
|
|
1465
|
-
return
|
|
1465
|
+
return Mi(s, s), s;
|
|
1466
1466
|
};
|
|
1467
1467
|
}
|
|
1468
|
-
function
|
|
1468
|
+
function Kr(t, e) {
|
|
1469
1469
|
t !== null && t.before(
|
|
1470
1470
|
/** @type {Node} */
|
|
1471
1471
|
e
|
|
1472
1472
|
);
|
|
1473
1473
|
}
|
|
1474
|
-
function
|
|
1475
|
-
return
|
|
1476
|
-
}
|
|
1477
|
-
const
|
|
1478
|
-
function
|
|
1479
|
-
|
|
1480
|
-
var
|
|
1481
|
-
for (var
|
|
1482
|
-
var c = h
|
|
1483
|
-
if (!
|
|
1484
|
-
|
|
1485
|
-
var d =
|
|
1486
|
-
e.addEventListener(c,
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1474
|
+
function Ht(t, e) {
|
|
1475
|
+
return xi(t, e);
|
|
1476
|
+
}
|
|
1477
|
+
const ke = /* @__PURE__ */ new Map();
|
|
1478
|
+
function xi(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: o = !0 }) {
|
|
1479
|
+
ni();
|
|
1480
|
+
var l = /* @__PURE__ */ new Set(), a = (p) => {
|
|
1481
|
+
for (var h = 0; h < p.length; h++) {
|
|
1482
|
+
var c = p[h];
|
|
1483
|
+
if (!l.has(c)) {
|
|
1484
|
+
l.add(c);
|
|
1485
|
+
var d = bi(c);
|
|
1486
|
+
e.addEventListener(c, et, { passive: d });
|
|
1487
|
+
var w = ke.get(c);
|
|
1488
|
+
w === void 0 ? (document.addEventListener(c, et, { passive: d }), ke.set(c, 1)) : ke.set(c, w + 1);
|
|
1489
1489
|
}
|
|
1490
1490
|
}
|
|
1491
1491
|
};
|
|
1492
|
-
|
|
1493
|
-
var u = void 0, f =
|
|
1494
|
-
var
|
|
1495
|
-
return
|
|
1492
|
+
a(Mn(Ei)), pr.add(a);
|
|
1493
|
+
var u = void 0, f = ui(() => {
|
|
1494
|
+
var p = r ?? e.appendChild(ii());
|
|
1495
|
+
return Gn(
|
|
1496
1496
|
/** @type {TemplateNode} */
|
|
1497
|
-
|
|
1497
|
+
p,
|
|
1498
1498
|
{
|
|
1499
1499
|
pending: () => {
|
|
1500
1500
|
}
|
|
1501
1501
|
},
|
|
1502
|
-
(
|
|
1502
|
+
(h) => {
|
|
1503
1503
|
if (s) {
|
|
1504
|
-
|
|
1504
|
+
jt({});
|
|
1505
1505
|
var c = (
|
|
1506
1506
|
/** @type {ComponentContext} */
|
|
1507
|
-
|
|
1507
|
+
Y
|
|
1508
1508
|
);
|
|
1509
1509
|
c.c = s;
|
|
1510
1510
|
}
|
|
1511
|
-
i && (
|
|
1511
|
+
i && (n.$$events = i), u = t(h, n) || {}, s && zt();
|
|
1512
1512
|
}
|
|
1513
1513
|
), () => {
|
|
1514
|
-
for (var
|
|
1515
|
-
e.removeEventListener(
|
|
1514
|
+
for (var h of l) {
|
|
1515
|
+
e.removeEventListener(h, et);
|
|
1516
1516
|
var c = (
|
|
1517
1517
|
/** @type {number} */
|
|
1518
|
-
|
|
1518
|
+
ke.get(h)
|
|
1519
1519
|
);
|
|
1520
|
-
--c === 0 ? (document.removeEventListener(
|
|
1520
|
+
--c === 0 ? (document.removeEventListener(h, et), ke.delete(h)) : ke.set(h, c);
|
|
1521
1521
|
}
|
|
1522
|
-
|
|
1522
|
+
pr.delete(a), p !== r && p.parentNode?.removeChild(p);
|
|
1523
1523
|
};
|
|
1524
1524
|
});
|
|
1525
|
-
return
|
|
1525
|
+
return Pi.set(u, f), u;
|
|
1526
1526
|
}
|
|
1527
|
-
let
|
|
1528
|
-
function
|
|
1529
|
-
var e,
|
|
1530
|
-
if (typeof t == "string" || typeof t == "number")
|
|
1527
|
+
let Pi = /* @__PURE__ */ new WeakMap();
|
|
1528
|
+
function Jr(t) {
|
|
1529
|
+
var e, r, n = "";
|
|
1530
|
+
if (typeof t == "string" || typeof t == "number") n += t;
|
|
1531
1531
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1532
1532
|
var i = t.length;
|
|
1533
|
-
for (e = 0; e < i; e++) t[e] && (
|
|
1534
|
-
} else for (
|
|
1535
|
-
return
|
|
1533
|
+
for (e = 0; e < i; e++) t[e] && (r = Jr(t[e])) && (n && (n += " "), n += r);
|
|
1534
|
+
} else for (r in t) t[r] && (n && (n += " "), n += r);
|
|
1535
|
+
return n;
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
for (var t, e,
|
|
1539
|
-
return
|
|
1537
|
+
function Si() {
|
|
1538
|
+
for (var t, e, r = 0, n = "", i = arguments.length; r < i; r++) (t = arguments[r]) && (e = Jr(t)) && (n && (n += " "), n += e);
|
|
1539
|
+
return n;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1542
|
-
return typeof t == "object" ?
|
|
1541
|
+
function Qr(t) {
|
|
1542
|
+
return typeof t == "object" ? Si(t) : t ?? "";
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
var
|
|
1546
|
-
return e && (
|
|
1544
|
+
function Ai(t, e, r) {
|
|
1545
|
+
var n = t == null ? "" : "" + t;
|
|
1546
|
+
return e && (n = n ? n + " " + e : e), n === "" ? null : n;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1549
|
-
|
|
1548
|
+
function vr(t, e = !1) {
|
|
1549
|
+
var r = e ? " !important;" : ";", n = "";
|
|
1550
|
+
for (var i in t) {
|
|
1551
|
+
var s = t[i];
|
|
1552
|
+
s != null && s !== "" && (n += " " + i + ": " + s + r);
|
|
1553
|
+
}
|
|
1554
|
+
return n;
|
|
1550
1555
|
}
|
|
1551
|
-
function
|
|
1556
|
+
function Di(t, e) {
|
|
1557
|
+
if (e) {
|
|
1558
|
+
var r = "", n, i;
|
|
1559
|
+
return Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, n && (r += vr(n)), i && (r += vr(i, !0)), r = r.trim(), r === "" ? null : r;
|
|
1560
|
+
}
|
|
1561
|
+
return String(t);
|
|
1562
|
+
}
|
|
1563
|
+
function $r(t, e, r, n, i, s) {
|
|
1552
1564
|
var o = t.__className;
|
|
1553
|
-
if (o !==
|
|
1554
|
-
var
|
|
1555
|
-
|
|
1565
|
+
if (o !== r || o === void 0) {
|
|
1566
|
+
var l = Ai(r, n);
|
|
1567
|
+
l == null ? t.removeAttribute("class") : t.className = l, t.__className = r;
|
|
1556
1568
|
}
|
|
1557
1569
|
return s;
|
|
1558
1570
|
}
|
|
1559
|
-
function
|
|
1571
|
+
function bt(t, e = {}, r, n) {
|
|
1572
|
+
for (var i in r) {
|
|
1573
|
+
var s = r[i];
|
|
1574
|
+
e[i] !== s && (r[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, n));
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
function ze(t, e, r, n) {
|
|
1560
1578
|
var i = t.__style;
|
|
1561
1579
|
if (i !== e) {
|
|
1562
|
-
var s =
|
|
1580
|
+
var s = Di(e, n);
|
|
1563
1581
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
1564
|
-
}
|
|
1565
|
-
return
|
|
1582
|
+
} else n && (Array.isArray(n) ? (bt(t, r?.[0], n[0]), bt(t, r?.[1], n[1], "important")) : bt(t, r, n));
|
|
1583
|
+
return n;
|
|
1566
1584
|
}
|
|
1567
|
-
const
|
|
1585
|
+
const Ci = () => performance.now(), Q = {
|
|
1568
1586
|
// don't access requestAnimationFrame eagerly outside method
|
|
1569
1587
|
// this allows basic testing of user code without JSDOM
|
|
1570
1588
|
// bunder will eval and remove ternary when the user's app is built
|
|
@@ -1572,63 +1590,63 @@ const mi = () => performance.now(), W = {
|
|
|
1572
1590
|
/** @param {any} _ */
|
|
1573
1591
|
(t) => requestAnimationFrame(t)
|
|
1574
1592
|
),
|
|
1575
|
-
now: () =>
|
|
1593
|
+
now: () => Ci(),
|
|
1576
1594
|
tasks: /* @__PURE__ */ new Set()
|
|
1577
1595
|
};
|
|
1578
|
-
function
|
|
1579
|
-
const t =
|
|
1580
|
-
|
|
1581
|
-
e.c(t) || (
|
|
1582
|
-
}),
|
|
1596
|
+
function en() {
|
|
1597
|
+
const t = Q.now();
|
|
1598
|
+
Q.tasks.forEach((e) => {
|
|
1599
|
+
e.c(t) || (Q.tasks.delete(e), e.f());
|
|
1600
|
+
}), Q.tasks.size !== 0 && Q.tick(en);
|
|
1583
1601
|
}
|
|
1584
|
-
function
|
|
1602
|
+
function Ti(t) {
|
|
1585
1603
|
let e;
|
|
1586
|
-
return
|
|
1587
|
-
promise: new Promise((
|
|
1588
|
-
|
|
1604
|
+
return Q.tasks.size === 0 && Q.tick(en), {
|
|
1605
|
+
promise: new Promise((r) => {
|
|
1606
|
+
Q.tasks.add(e = { c: t, f: r });
|
|
1589
1607
|
}),
|
|
1590
1608
|
abort() {
|
|
1591
|
-
|
|
1609
|
+
Q.tasks.delete(e);
|
|
1592
1610
|
}
|
|
1593
1611
|
};
|
|
1594
1612
|
}
|
|
1595
|
-
function
|
|
1596
|
-
return t === e || t?.[
|
|
1613
|
+
function mr(t, e) {
|
|
1614
|
+
return t === e || t?.[rt] === e;
|
|
1597
1615
|
}
|
|
1598
|
-
function
|
|
1599
|
-
return
|
|
1616
|
+
function Be(t = {}, e, r, n) {
|
|
1617
|
+
return fi(() => {
|
|
1600
1618
|
var i, s;
|
|
1601
|
-
return
|
|
1602
|
-
i = s, s = [],
|
|
1603
|
-
t !==
|
|
1619
|
+
return qt(() => {
|
|
1620
|
+
i = s, s = [], Wr(() => {
|
|
1621
|
+
t !== r(...s) && (e(t, ...s), i && mr(r(...i), t) && e(null, ...i));
|
|
1604
1622
|
});
|
|
1605
1623
|
}), () => {
|
|
1606
|
-
|
|
1607
|
-
s &&
|
|
1624
|
+
ut(() => {
|
|
1625
|
+
s && mr(r(...s), t) && e(null, ...s);
|
|
1608
1626
|
});
|
|
1609
1627
|
};
|
|
1610
1628
|
}), t;
|
|
1611
1629
|
}
|
|
1612
|
-
const
|
|
1613
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
1614
|
-
function
|
|
1630
|
+
const Li = "5";
|
|
1631
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Li);
|
|
1632
|
+
function Ii(t) {
|
|
1615
1633
|
return t;
|
|
1616
1634
|
}
|
|
1617
|
-
function
|
|
1635
|
+
function At(t) {
|
|
1618
1636
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
1619
1637
|
}
|
|
1620
|
-
function
|
|
1638
|
+
function Fi(t) {
|
|
1621
1639
|
const e = Math.cos(t * Math.PI * 0.5);
|
|
1622
1640
|
return Math.abs(e) < 1e-14 ? 1 : 1 - e;
|
|
1623
1641
|
}
|
|
1624
|
-
function
|
|
1642
|
+
function Oi(t) {
|
|
1625
1643
|
return Math.sin(t * Math.PI / 2);
|
|
1626
1644
|
}
|
|
1627
|
-
const
|
|
1628
|
-
class
|
|
1645
|
+
const Ri = 128, Ni = 0, ji = 1, zi = 2;
|
|
1646
|
+
class Bi {
|
|
1629
1647
|
animationsStarted = !1;
|
|
1630
1648
|
animationsCount = 0;
|
|
1631
|
-
animationsLimit =
|
|
1649
|
+
animationsLimit = Ri;
|
|
1632
1650
|
layers = new Array();
|
|
1633
1651
|
start() {
|
|
1634
1652
|
window.requestAnimationFrame(this.tick.bind(this));
|
|
@@ -1637,12 +1655,12 @@ class Pi {
|
|
|
1637
1655
|
try {
|
|
1638
1656
|
this.animationsCount = 0;
|
|
1639
1657
|
for (let e = 0; e < this.layers.length; e++) {
|
|
1640
|
-
const
|
|
1641
|
-
if (
|
|
1642
|
-
const
|
|
1643
|
-
if (
|
|
1644
|
-
for (let i = 0; i <
|
|
1645
|
-
const s =
|
|
1658
|
+
const r = this.layers[e];
|
|
1659
|
+
if (r == null) continue;
|
|
1660
|
+
const n = r.animations;
|
|
1661
|
+
if (n != null)
|
|
1662
|
+
for (let i = 0; i < n.length; i++) {
|
|
1663
|
+
const s = n[i];
|
|
1646
1664
|
if (s != null) {
|
|
1647
1665
|
for (const o of s.values())
|
|
1648
1666
|
if (!o.executed && (o.executed = !0, o.function(), this.animationsCount++, this.animationsCount == this.animationsLimit))
|
|
@@ -1655,23 +1673,23 @@ class Pi {
|
|
|
1655
1673
|
window.requestAnimationFrame(this.tick.bind(this));
|
|
1656
1674
|
}
|
|
1657
1675
|
}
|
|
1658
|
-
equeue(e,
|
|
1676
|
+
equeue(e, r, n, i) {
|
|
1659
1677
|
let s = this.layers[e];
|
|
1660
1678
|
s == null && (s = this.layers[e] = { animations: new Array() });
|
|
1661
|
-
let o = s.animations[
|
|
1662
|
-
o == null && (o = s.animations[
|
|
1663
|
-
let
|
|
1664
|
-
o.set(
|
|
1665
|
-
}
|
|
1666
|
-
clear(e,
|
|
1667
|
-
for (let
|
|
1668
|
-
let i = this.layers[
|
|
1679
|
+
let o = s.animations[r];
|
|
1680
|
+
o == null && (o = s.animations[r] = /* @__PURE__ */ new Map());
|
|
1681
|
+
let l = { id: n, priority: r, executed: !1, function: i };
|
|
1682
|
+
o.set(n, l), this.animationsStarted == !1 && (this.animationsStarted = !0, this.start());
|
|
1683
|
+
}
|
|
1684
|
+
clear(e, r) {
|
|
1685
|
+
for (let n = 0; n < this.layers.length; n++) {
|
|
1686
|
+
let i = this.layers[n];
|
|
1669
1687
|
if (i == null) continue;
|
|
1670
1688
|
let s = i.animations[e];
|
|
1671
1689
|
if (s == null) return;
|
|
1672
|
-
let o = s.get(
|
|
1690
|
+
let o = s.get(r);
|
|
1673
1691
|
if (o == null || o.executed == !1) return;
|
|
1674
|
-
s.delete(
|
|
1692
|
+
s.delete(r);
|
|
1675
1693
|
}
|
|
1676
1694
|
}
|
|
1677
1695
|
speed() {
|
|
@@ -1684,66 +1702,66 @@ class Pi {
|
|
|
1684
1702
|
this.animationsLimit = e;
|
|
1685
1703
|
}
|
|
1686
1704
|
}
|
|
1687
|
-
const
|
|
1688
|
-
function
|
|
1705
|
+
const ae = new Bi();
|
|
1706
|
+
function yr(t) {
|
|
1689
1707
|
return Object.prototype.toString.call(t) === "[object Date]";
|
|
1690
1708
|
}
|
|
1691
|
-
function
|
|
1709
|
+
function Dt(t, e) {
|
|
1692
1710
|
if (t === e || t !== t) return () => t;
|
|
1693
|
-
const
|
|
1694
|
-
if (
|
|
1711
|
+
const r = typeof t;
|
|
1712
|
+
if (r !== typeof e || Array.isArray(t) !== Array.isArray(e))
|
|
1695
1713
|
throw new Error("Cannot interpolate values of different type");
|
|
1696
1714
|
if (Array.isArray(t)) {
|
|
1697
|
-
const
|
|
1715
|
+
const n = (
|
|
1698
1716
|
/** @type {Array<any>} */
|
|
1699
|
-
e.map((i, s) =>
|
|
1717
|
+
e.map((i, s) => Dt(
|
|
1700
1718
|
/** @type {Array<any>} */
|
|
1701
1719
|
t[s],
|
|
1702
1720
|
i
|
|
1703
1721
|
))
|
|
1704
1722
|
);
|
|
1705
|
-
return (i) =>
|
|
1723
|
+
return (i) => n.map((s) => s(i));
|
|
1706
1724
|
}
|
|
1707
|
-
if (
|
|
1725
|
+
if (r === "object") {
|
|
1708
1726
|
if (!t || !e)
|
|
1709
1727
|
throw new Error("Object cannot be null");
|
|
1710
|
-
if (
|
|
1711
|
-
const s = t.getTime(),
|
|
1712
|
-
return (
|
|
1728
|
+
if (yr(t) && yr(e)) {
|
|
1729
|
+
const s = t.getTime(), l = e.getTime() - s;
|
|
1730
|
+
return (a) => new Date(s + a * l);
|
|
1713
1731
|
}
|
|
1714
|
-
const
|
|
1715
|
-
return
|
|
1716
|
-
i[s] =
|
|
1732
|
+
const n = Object.keys(e), i = {};
|
|
1733
|
+
return n.forEach((s) => {
|
|
1734
|
+
i[s] = Dt(t[s], e[s]);
|
|
1717
1735
|
}), (s) => {
|
|
1718
1736
|
const o = {};
|
|
1719
|
-
return
|
|
1720
|
-
o[
|
|
1737
|
+
return n.forEach((l) => {
|
|
1738
|
+
o[l] = i[l](s);
|
|
1721
1739
|
}), o;
|
|
1722
1740
|
};
|
|
1723
1741
|
}
|
|
1724
|
-
if (
|
|
1725
|
-
const
|
|
1742
|
+
if (r === "number") {
|
|
1743
|
+
const n = (
|
|
1726
1744
|
/** @type {number} */
|
|
1727
1745
|
e - /** @type {number} */
|
|
1728
1746
|
t
|
|
1729
1747
|
);
|
|
1730
|
-
return (i) => t + i *
|
|
1748
|
+
return (i) => t + i * n;
|
|
1731
1749
|
}
|
|
1732
1750
|
return () => e;
|
|
1733
1751
|
}
|
|
1734
|
-
class
|
|
1752
|
+
class Yt {
|
|
1735
1753
|
#e;
|
|
1736
1754
|
#t;
|
|
1737
1755
|
/** @type {TweenedOptions<T>} */
|
|
1738
1756
|
#a;
|
|
1739
1757
|
/** @type {import('../internal/client/types').Task | null} */
|
|
1740
|
-
#
|
|
1758
|
+
#n = null;
|
|
1741
1759
|
/**
|
|
1742
1760
|
* @param {T} value
|
|
1743
1761
|
* @param {TweenedOptions<T>} options
|
|
1744
1762
|
*/
|
|
1745
|
-
constructor(e,
|
|
1746
|
-
this.#e = /* @__PURE__ */
|
|
1763
|
+
constructor(e, r = {}) {
|
|
1764
|
+
this.#e = /* @__PURE__ */ D(e), this.#t = /* @__PURE__ */ D(e), this.#a = r;
|
|
1747
1765
|
}
|
|
1748
1766
|
/**
|
|
1749
1767
|
* Create a tween whose value is bound to the return value of `fn`. This must be called
|
|
@@ -1762,11 +1780,11 @@ class zt {
|
|
|
1762
1780
|
* @param {() => U} fn
|
|
1763
1781
|
* @param {TweenedOptions<U>} [options]
|
|
1764
1782
|
*/
|
|
1765
|
-
static of(e,
|
|
1766
|
-
const
|
|
1767
|
-
return
|
|
1768
|
-
|
|
1769
|
-
}),
|
|
1783
|
+
static of(e, r) {
|
|
1784
|
+
const n = new Yt(e(), r);
|
|
1785
|
+
return qt(() => {
|
|
1786
|
+
n.set(e());
|
|
1787
|
+
}), n;
|
|
1770
1788
|
}
|
|
1771
1789
|
/**
|
|
1772
1790
|
* Sets `tween.target` to `value` and returns a `Promise` that resolves if and when `tween.current` catches up to it.
|
|
@@ -1776,50 +1794,50 @@ class zt {
|
|
|
1776
1794
|
* @param {TweenedOptions<T>} [options]
|
|
1777
1795
|
* @returns
|
|
1778
1796
|
*/
|
|
1779
|
-
set(e,
|
|
1780
|
-
|
|
1797
|
+
set(e, r) {
|
|
1798
|
+
P(this.#t, e);
|
|
1781
1799
|
let {
|
|
1782
|
-
delay:
|
|
1800
|
+
delay: n = 0,
|
|
1783
1801
|
duration: i = 400,
|
|
1784
|
-
easing: s =
|
|
1785
|
-
interpolate: o =
|
|
1786
|
-
} = { ...this.#a, ...
|
|
1802
|
+
easing: s = Ii,
|
|
1803
|
+
interpolate: o = Dt
|
|
1804
|
+
} = { ...this.#a, ...r };
|
|
1787
1805
|
if (i === 0)
|
|
1788
|
-
return this.#
|
|
1789
|
-
const
|
|
1790
|
-
let
|
|
1791
|
-
return this.#
|
|
1792
|
-
if (
|
|
1806
|
+
return this.#n?.abort(), P(this.#e, e), Promise.resolve();
|
|
1807
|
+
const l = Q.now() + n;
|
|
1808
|
+
let a, u = !1, f = this.#n;
|
|
1809
|
+
return this.#n = Ti((p) => {
|
|
1810
|
+
if (p < l)
|
|
1793
1811
|
return !0;
|
|
1794
1812
|
if (!u) {
|
|
1795
1813
|
u = !0;
|
|
1796
1814
|
const c = this.#e.v;
|
|
1797
|
-
|
|
1815
|
+
a = o(c, e), typeof i == "function" && (i = i(c, e)), f?.abort();
|
|
1798
1816
|
}
|
|
1799
|
-
const
|
|
1800
|
-
return
|
|
1801
|
-
i ? (
|
|
1817
|
+
const h = p - l;
|
|
1818
|
+
return h > /** @type {number} */
|
|
1819
|
+
i ? (P(this.#e, e), !1) : (P(this.#e, a(s(h / /** @type {number} */
|
|
1802
1820
|
i))), !0);
|
|
1803
|
-
}), this.#
|
|
1821
|
+
}), this.#n.promise;
|
|
1804
1822
|
}
|
|
1805
1823
|
get current() {
|
|
1806
|
-
return
|
|
1824
|
+
return g(this.#e);
|
|
1807
1825
|
}
|
|
1808
1826
|
get target() {
|
|
1809
|
-
return
|
|
1827
|
+
return g(this.#t);
|
|
1810
1828
|
}
|
|
1811
1829
|
set target(e) {
|
|
1812
1830
|
this.set(e);
|
|
1813
1831
|
}
|
|
1814
1832
|
}
|
|
1815
|
-
class
|
|
1833
|
+
class it {
|
|
1816
1834
|
value;
|
|
1817
1835
|
motion;
|
|
1818
|
-
constructor(e,
|
|
1819
|
-
this.value = e, this.motion = new
|
|
1836
|
+
constructor(e, r) {
|
|
1837
|
+
this.value = e, this.motion = new Yt(e, r);
|
|
1820
1838
|
}
|
|
1821
|
-
set(e,
|
|
1822
|
-
this.value = e, this.motion.set(e,
|
|
1839
|
+
set(e, r) {
|
|
1840
|
+
this.value = e, this.motion.set(e, r);
|
|
1823
1841
|
}
|
|
1824
1842
|
update(e) {
|
|
1825
1843
|
this.motion.set(this.value, e);
|
|
@@ -1828,196 +1846,228 @@ class et {
|
|
|
1828
1846
|
this.motion.set(this.value, { duration: 0 });
|
|
1829
1847
|
}
|
|
1830
1848
|
}
|
|
1831
|
-
var
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1834
|
-
let n,
|
|
1835
|
-
function
|
|
1836
|
-
return
|
|
1849
|
+
var Ui = /* @__PURE__ */ Gr("<div></div>");
|
|
1850
|
+
function Zi(t, e) {
|
|
1851
|
+
jt(e, !0);
|
|
1852
|
+
let r = e.style.width, n = e.style.height, i = e.style.radius, s = e.colors?.background ?? "darkgreen", o = e.colors?.border ?? "white", l = e.colors?.shadow ?? "0px 2px 2px rgba(0, 0, 0, 0.5)", a;
|
|
1853
|
+
function u() {
|
|
1854
|
+
return a;
|
|
1837
1855
|
}
|
|
1838
|
-
let
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1856
|
+
let f = /* @__PURE__ */ D(!1);
|
|
1857
|
+
function p(b) {
|
|
1858
|
+
P(f, b, !0);
|
|
1841
1859
|
}
|
|
1842
|
-
function
|
|
1843
|
-
return
|
|
1844
|
-
}
|
|
1845
|
-
let
|
|
1846
|
-
function
|
|
1847
|
-
b !=
|
|
1848
|
-
}
|
|
1849
|
-
function
|
|
1850
|
-
return performance.now() -
|
|
1851
|
-
}
|
|
1852
|
-
let
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
}),
|
|
1856
|
-
|
|
1857
|
-
}),
|
|
1858
|
-
|
|
1860
|
+
function h() {
|
|
1861
|
+
return g(f);
|
|
1862
|
+
}
|
|
1863
|
+
let c = /* @__PURE__ */ D(!0), d = 0, w = 150;
|
|
1864
|
+
function F(b) {
|
|
1865
|
+
b != g(c) && (P(c, b, !0), d = performance.now());
|
|
1866
|
+
}
|
|
1867
|
+
function K() {
|
|
1868
|
+
return performance.now() - d < w ? V.motion.current == 0 : V.value == 0;
|
|
1869
|
+
}
|
|
1870
|
+
let k = 0, V = new it(0, { easing: At });
|
|
1871
|
+
J(() => {
|
|
1872
|
+
g(f) == !1 && (V.snap(), ae.clear(e.priority, e.id));
|
|
1873
|
+
}), J(() => {
|
|
1874
|
+
V.set(g(c) ? 0 : k, { duration: 75 });
|
|
1875
|
+
}), J(() => {
|
|
1876
|
+
Je(V.motion.current);
|
|
1859
1877
|
});
|
|
1860
|
-
function
|
|
1861
|
-
|
|
1862
|
-
|
|
1878
|
+
function Je(b) {
|
|
1879
|
+
a && ae.equeue(e.layer, e.priority, e.id, () => {
|
|
1880
|
+
a.style.scale = b.toString(), a.style.filter = `brightness(${0.25 + 0.75 * b})`;
|
|
1863
1881
|
});
|
|
1864
1882
|
}
|
|
1865
|
-
function
|
|
1866
|
-
b !=
|
|
1867
|
-
}
|
|
1868
|
-
function
|
|
1869
|
-
return
|
|
1870
|
-
}
|
|
1871
|
-
var
|
|
1872
|
-
getBody:
|
|
1873
|
-
setDisplayed:
|
|
1874
|
-
getDisplayed:
|
|
1875
|
-
setCollapsed:
|
|
1876
|
-
getCollapsed:
|
|
1877
|
-
setScale:
|
|
1878
|
-
getScale:
|
|
1879
|
-
},
|
|
1880
|
-
|
|
1881
|
-
|
|
1883
|
+
function pt(b) {
|
|
1884
|
+
b != k && (k = b, V.set(b, { duration: 75 }));
|
|
1885
|
+
}
|
|
1886
|
+
function dt() {
|
|
1887
|
+
return V.value;
|
|
1888
|
+
}
|
|
1889
|
+
var vt = {
|
|
1890
|
+
getBody: u,
|
|
1891
|
+
setDisplayed: p,
|
|
1892
|
+
getDisplayed: h,
|
|
1893
|
+
setCollapsed: F,
|
|
1894
|
+
getCollapsed: K,
|
|
1895
|
+
setScale: pt,
|
|
1896
|
+
getScale: dt
|
|
1897
|
+
}, M = Ui();
|
|
1898
|
+
let Qe;
|
|
1899
|
+
return Be(
|
|
1900
|
+
M,
|
|
1882
1901
|
(b) => (
|
|
1883
1902
|
//#endregion
|
|
1884
|
-
|
|
1903
|
+
a = b
|
|
1885
1904
|
),
|
|
1886
|
-
() =>
|
|
1887
|
-
),
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
}
|
|
1891
|
-
|
|
1905
|
+
() => a
|
|
1906
|
+
), jr(
|
|
1907
|
+
(b) => {
|
|
1908
|
+
$r(M, 1, Qr(["pin", g(f) && "displayed"]), "svelte-zz3jrb"), Qe = ze(M, "", Qe, b);
|
|
1909
|
+
},
|
|
1910
|
+
[
|
|
1911
|
+
() => ({
|
|
1912
|
+
width: `${r}px`,
|
|
1913
|
+
height: `${n}px`,
|
|
1914
|
+
"border-radius": `${i}px`,
|
|
1915
|
+
"border-color": o,
|
|
1916
|
+
"background-color": s,
|
|
1917
|
+
"box-shadow": l
|
|
1918
|
+
})
|
|
1919
|
+
]
|
|
1920
|
+
), Kr(t, M), zt(vt);
|
|
1921
|
+
}
|
|
1922
|
+
var qe;
|
|
1892
1923
|
((t) => {
|
|
1893
|
-
function e(
|
|
1894
|
-
const s =
|
|
1895
|
-
return i < 180 ? i < 90 ? i <
|
|
1924
|
+
function e(r, n, i) {
|
|
1925
|
+
const s = r / 2, o = n / 2, l = Math.sqrt(s * s + o * o), a = Math.atan(o / s) * (180 / Math.PI), u = i * (Math.PI / 180);
|
|
1926
|
+
return i < 180 ? i < 90 ? i < a ? {
|
|
1896
1927
|
x: 0,
|
|
1897
|
-
y:
|
|
1928
|
+
y: l * Math.sin(u) - o
|
|
1898
1929
|
} : {
|
|
1899
|
-
x:
|
|
1930
|
+
x: l * Math.cos(u) - s,
|
|
1900
1931
|
y: 0
|
|
1901
|
-
} : i < 180 -
|
|
1902
|
-
x:
|
|
1932
|
+
} : i < 180 - a ? {
|
|
1933
|
+
x: l * Math.cos(u) - s,
|
|
1903
1934
|
y: 0
|
|
1904
1935
|
} : {
|
|
1905
|
-
x: -
|
|
1906
|
-
y:
|
|
1907
|
-
} : i < 270 ? i < 180 +
|
|
1908
|
-
x: -
|
|
1909
|
-
y:
|
|
1936
|
+
x: -r,
|
|
1937
|
+
y: l * Math.sin(u) - o
|
|
1938
|
+
} : i < 270 ? i < 180 + a ? {
|
|
1939
|
+
x: -r,
|
|
1940
|
+
y: l * Math.sin(u) - o
|
|
1910
1941
|
} : {
|
|
1911
|
-
x:
|
|
1912
|
-
y: -
|
|
1913
|
-
} : i < 360 -
|
|
1914
|
-
x:
|
|
1915
|
-
y: -
|
|
1942
|
+
x: l * Math.cos(u) - s,
|
|
1943
|
+
y: -n
|
|
1944
|
+
} : i < 360 - a ? {
|
|
1945
|
+
x: l * Math.cos(u) - s,
|
|
1946
|
+
y: -n
|
|
1916
1947
|
} : {
|
|
1917
1948
|
x: 0,
|
|
1918
|
-
y:
|
|
1949
|
+
y: l * Math.sin(u) - o
|
|
1919
1950
|
};
|
|
1920
1951
|
}
|
|
1921
1952
|
t.getOffsets = e;
|
|
1922
|
-
})(
|
|
1923
|
-
var
|
|
1924
|
-
function
|
|
1925
|
-
|
|
1926
|
-
let
|
|
1927
|
-
const
|
|
1928
|
-
|
|
1929
|
-
|
|
1953
|
+
})(qe || (qe = {}));
|
|
1954
|
+
var qi = /* @__PURE__ */ Gr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');
|
|
1955
|
+
function tn(t, e) {
|
|
1956
|
+
jt(e, !0);
|
|
1957
|
+
let r = e.style.width, n = e.style.height, i = e.style.margin, s = e.style.radius, o = e.colors?.background ?? "white", l = e.colors?.shadow ?? "0px 2px 2px rgba(0, 0, 0, 0.5)", a, u, f, p;
|
|
1958
|
+
const h = r + 2 * i, c = n + 2 * i, d = () => p;
|
|
1959
|
+
J(() => {
|
|
1960
|
+
f.style.width = `${i * 4}px`, f.style.height = `${i * 4}px`;
|
|
1930
1961
|
});
|
|
1931
|
-
let
|
|
1932
|
-
function
|
|
1933
|
-
|
|
1934
|
-
}
|
|
1935
|
-
function
|
|
1936
|
-
return
|
|
1937
|
-
}
|
|
1938
|
-
let
|
|
1939
|
-
function
|
|
1940
|
-
y !=
|
|
1941
|
-
}
|
|
1942
|
-
function
|
|
1943
|
-
return performance.now() -
|
|
1944
|
-
}
|
|
1945
|
-
function
|
|
1946
|
-
return performance.now() -
|
|
1947
|
-
}
|
|
1948
|
-
let
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
}),
|
|
1952
|
-
|
|
1953
|
-
}),
|
|
1954
|
-
|
|
1962
|
+
let w = /* @__PURE__ */ D(!0);
|
|
1963
|
+
function F(y) {
|
|
1964
|
+
P(w, y, !0);
|
|
1965
|
+
}
|
|
1966
|
+
function K() {
|
|
1967
|
+
return g(w);
|
|
1968
|
+
}
|
|
1969
|
+
let k = /* @__PURE__ */ D(!0), V = 0, Je = 300;
|
|
1970
|
+
function pt(y) {
|
|
1971
|
+
y != g(k) && (P(k, y, !0), V = performance.now());
|
|
1972
|
+
}
|
|
1973
|
+
function dt() {
|
|
1974
|
+
return performance.now() - V < Je ? M.motion.current == 0 : M.value == 0;
|
|
1975
|
+
}
|
|
1976
|
+
function vt() {
|
|
1977
|
+
return performance.now() - V < Je ? M.motion.current == 1 : M.value == 1;
|
|
1978
|
+
}
|
|
1979
|
+
let M = new it(0);
|
|
1980
|
+
J(() => {
|
|
1981
|
+
g(w) == !1 && (M.snap(), ae.clear(e.priority, e.id + "_scale"));
|
|
1982
|
+
}), J(() => {
|
|
1983
|
+
g(k) == !0 && M.value != 0 && (ae.stacked() ? M.set(0, { duration: 0 }) : M.set(0, { duration: 150, easing: Fi })), g(k) == !1 && M.value != 1 && M.set(1, { duration: 150, easing: Oi });
|
|
1984
|
+
}), J(() => {
|
|
1985
|
+
Qe(M.motion.current);
|
|
1955
1986
|
});
|
|
1956
|
-
function
|
|
1957
|
-
!
|
|
1958
|
-
|
|
1987
|
+
function Qe(y) {
|
|
1988
|
+
!a || !u || !f || ae.equeue(g(k) ? 0 : e.layer, e.priority, e.id + "_scale", () => {
|
|
1989
|
+
a.style.opacity = `${y}`, u.style.scale = `${y}`, f.style.scale = `${y}`;
|
|
1959
1990
|
});
|
|
1960
1991
|
}
|
|
1961
|
-
let
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
}),
|
|
1965
|
-
|
|
1966
|
-
}),
|
|
1967
|
-
|
|
1992
|
+
let b = NaN, mt = /* @__PURE__ */ D(!1), oe = new it(-h / 2, { easing: At }), $e = new it(-c / 2, { easing: At });
|
|
1993
|
+
J(() => {
|
|
1994
|
+
g(w) == !1 && (oe.snap(), oe.snap(), ae.clear(e.priority, e.id + "_angle"));
|
|
1995
|
+
}), J(() => {
|
|
1996
|
+
g(k) == !0 && g(mt) && (oe.update({ duration: 75 }), oe.update({ duration: 75 }));
|
|
1997
|
+
}), J(() => {
|
|
1998
|
+
Jt(oe.motion.current, $e.motion.current);
|
|
1968
1999
|
});
|
|
1969
|
-
function
|
|
1970
|
-
if (!
|
|
1971
|
-
const
|
|
1972
|
-
|
|
1973
|
-
|
|
2000
|
+
function Jt(y, _e) {
|
|
2001
|
+
if (!a || !u || !f) return;
|
|
2002
|
+
const X = y + h / 2, we = _e + c / 2, be = c < h ? X * c / h : X, Ee = c > h ? we * h / c : we, gn = Math.atan2(Ee, be) / Math.PI * 180 - 45, nr = 0, _n = 30, _t = Math.sqrt(be * be + Ee * Ee), Ne = Math.min(h, c) / 2, wn = Ne * Math.SQRT2, bn = (_t - Ne) / (wn - Ne), ir = nr + bn * (_n - nr), En = _t < Ne ? _t / Ne : 1;
|
|
2003
|
+
ae.equeue(e.layer, e.priority, e.id + "_angle", () => {
|
|
2004
|
+
u.style.transform = `translate(${Math.round(y)}px, ${Math.round(_e)}px)`, f.style.transform = `scale(${En}) rotate(${gn}deg) skew(${ir}deg, ${ir}deg)`;
|
|
1974
2005
|
});
|
|
1975
2006
|
}
|
|
1976
|
-
function
|
|
1977
|
-
if (
|
|
1978
|
-
let
|
|
1979
|
-
|
|
1980
|
-
} else if (y !=
|
|
1981
|
-
let
|
|
1982
|
-
|
|
2007
|
+
function vn(y, _e) {
|
|
2008
|
+
if (g(mt) == !1 || _e == !0) {
|
|
2009
|
+
let X = qe.getOffsets(h, c, y);
|
|
2010
|
+
oe.set(Math.round(X.x), { duration: 0 }), $e.set(Math.round(X.y), { duration: 0 }), Jt(oe.value, $e.value), b = y, P(mt, !0);
|
|
2011
|
+
} else if (y != b) {
|
|
2012
|
+
let X = Math.abs(y - b), we = X < 180 ? X : 360 - X, be = Math.log(we) * 75, Ee = qe.getOffsets(h, c, y);
|
|
2013
|
+
oe.set(Math.round(Ee.x), { duration: be }), $e.set(Math.round(Ee.y), { duration: be }), b = y;
|
|
1983
2014
|
}
|
|
1984
2015
|
}
|
|
1985
|
-
function
|
|
1986
|
-
return
|
|
1987
|
-
}
|
|
1988
|
-
var
|
|
1989
|
-
getBody:
|
|
1990
|
-
setDisplayed:
|
|
1991
|
-
getDisplayed:
|
|
1992
|
-
setCollapsed:
|
|
1993
|
-
getCollapsed:
|
|
1994
|
-
getExpanded:
|
|
1995
|
-
setAngle:
|
|
1996
|
-
getOffsets:
|
|
1997
|
-
},
|
|
1998
|
-
|
|
1999
|
-
|
|
2016
|
+
function mn() {
|
|
2017
|
+
return qe.getOffsets(h, c, b);
|
|
2018
|
+
}
|
|
2019
|
+
var yn = {
|
|
2020
|
+
getBody: d,
|
|
2021
|
+
setDisplayed: F,
|
|
2022
|
+
getDisplayed: K,
|
|
2023
|
+
setCollapsed: pt,
|
|
2024
|
+
getCollapsed: dt,
|
|
2025
|
+
getExpanded: vt,
|
|
2026
|
+
setAngle: vn,
|
|
2027
|
+
getOffsets: mn
|
|
2028
|
+
}, Re = qi();
|
|
2029
|
+
let Qt;
|
|
2030
|
+
var yt = ur(Re);
|
|
2031
|
+
let $t;
|
|
2032
|
+
Be(
|
|
2033
|
+
yt,
|
|
2000
2034
|
(y) => (
|
|
2001
2035
|
//#endregion
|
|
2002
|
-
|
|
2036
|
+
f = y
|
|
2003
2037
|
),
|
|
2004
|
-
() =>
|
|
2038
|
+
() => f
|
|
2005
2039
|
);
|
|
2006
|
-
var
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2040
|
+
var gt = si(yt, 2);
|
|
2041
|
+
let er;
|
|
2042
|
+
var tr = ur(gt);
|
|
2043
|
+
let rr;
|
|
2044
|
+
return Be(tr, (y) => p = y, () => p), Be(gt, (y) => u = y, () => u), Be(Re, (y) => a = y, () => a), jr(
|
|
2045
|
+
(y, _e, X, we) => {
|
|
2046
|
+
$r(Re, 1, Qr(["anchor", g(w) && "displayed"]), "svelte-11extwn"), Qt = ze(Re, "", Qt, y), $t = ze(yt, "", $t, _e), er = ze(gt, "", er, X), rr = ze(tr, "", rr, we);
|
|
2047
|
+
},
|
|
2048
|
+
[
|
|
2049
|
+
() => ({ filter: `drop-shadow(${l})` }),
|
|
2050
|
+
() => ({ "background-color": o }),
|
|
2051
|
+
() => ({ margin: `${i}px;` }),
|
|
2052
|
+
() => ({
|
|
2053
|
+
width: `${r}px`,
|
|
2054
|
+
height: `${n}px`,
|
|
2055
|
+
"border-radius": `${s}px;`,
|
|
2056
|
+
"background-color": o
|
|
2057
|
+
})
|
|
2058
|
+
]
|
|
2059
|
+
), Kr(t, Re), zt(yn);
|
|
2060
|
+
}
|
|
2061
|
+
var He;
|
|
2012
2062
|
((t) => {
|
|
2013
|
-
async function e(
|
|
2014
|
-
const s = await fetch(
|
|
2063
|
+
async function e(n, i) {
|
|
2064
|
+
const s = await fetch(n, i);
|
|
2015
2065
|
if (!s.ok) throw new Error(s.statusText);
|
|
2016
2066
|
return s.json();
|
|
2017
2067
|
}
|
|
2018
2068
|
t.get = e;
|
|
2019
|
-
async function n
|
|
2020
|
-
const o = await fetch(
|
|
2069
|
+
async function r(n, i, s) {
|
|
2070
|
+
const o = await fetch(n, {
|
|
2021
2071
|
method: "POST",
|
|
2022
2072
|
body: JSON.stringify(i),
|
|
2023
2073
|
headers: {
|
|
@@ -2029,38 +2079,38 @@ var ze;
|
|
|
2029
2079
|
if (!o.ok) throw new Error(o.statusText);
|
|
2030
2080
|
return o.json();
|
|
2031
2081
|
}
|
|
2032
|
-
t.post =
|
|
2033
|
-
})(
|
|
2034
|
-
var
|
|
2082
|
+
t.post = r;
|
|
2083
|
+
})(He || (He = {}));
|
|
2084
|
+
var xe;
|
|
2035
2085
|
((t) => {
|
|
2036
|
-
function e(
|
|
2086
|
+
function e(l, a, u) {
|
|
2037
2087
|
return {
|
|
2038
|
-
x:
|
|
2039
|
-
y: i(
|
|
2088
|
+
x: n(a) * u,
|
|
2089
|
+
y: i(l) * u
|
|
2040
2090
|
};
|
|
2041
2091
|
}
|
|
2042
2092
|
t.project = e;
|
|
2043
|
-
function
|
|
2093
|
+
function r(l, a, u) {
|
|
2044
2094
|
return {
|
|
2045
|
-
lat: o(
|
|
2046
|
-
lng: s(
|
|
2095
|
+
lat: o(a / u),
|
|
2096
|
+
lng: s(l / u)
|
|
2047
2097
|
};
|
|
2048
2098
|
}
|
|
2049
|
-
t.unproject =
|
|
2050
|
-
function
|
|
2051
|
-
return (180 +
|
|
2099
|
+
t.unproject = r;
|
|
2100
|
+
function n(l) {
|
|
2101
|
+
return (180 + l) / 360;
|
|
2052
2102
|
}
|
|
2053
|
-
function i(
|
|
2054
|
-
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 +
|
|
2103
|
+
function i(l) {
|
|
2104
|
+
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + l * Math.PI / 360))) / 360;
|
|
2055
2105
|
}
|
|
2056
|
-
function s(
|
|
2057
|
-
return
|
|
2106
|
+
function s(l) {
|
|
2107
|
+
return l * 360 - 180;
|
|
2058
2108
|
}
|
|
2059
|
-
function o(
|
|
2060
|
-
return 360 / Math.PI * Math.atan(Math.exp((180 -
|
|
2109
|
+
function o(l) {
|
|
2110
|
+
return 360 / Math.PI * Math.atan(Math.exp((180 - l * 360) * Math.PI / 180)) - 90;
|
|
2061
2111
|
}
|
|
2062
|
-
})(
|
|
2063
|
-
class
|
|
2112
|
+
})(xe || (xe = {}));
|
|
2113
|
+
class rn {
|
|
2064
2114
|
swLat;
|
|
2065
2115
|
swLng;
|
|
2066
2116
|
neLat;
|
|
@@ -2072,75 +2122,75 @@ class qn {
|
|
|
2072
2122
|
* @param offsetX - The x offset of the map in pixels at zoom level n.
|
|
2073
2123
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
2074
2124
|
*/
|
|
2075
|
-
constructor(e,
|
|
2076
|
-
const o =
|
|
2125
|
+
constructor(e, r, n, i, s) {
|
|
2126
|
+
const o = n * Math.pow(2, r), l = xe.project(e.sw.lat, e.sw.lng, o), a = xe.project(e.ne.lat, e.ne.lng, o), u = l.x - i, f = l.y + s, p = a.x + i, h = a.y - s, c = xe.unproject(u, f, o), d = xe.unproject(p, h, o);
|
|
2077
2127
|
this.swLat = c.lat, this.swLng = c.lng, this.neLat = d.lat, this.neLng = d.lng;
|
|
2078
2128
|
}
|
|
2079
|
-
contains(e,
|
|
2080
|
-
return this.swLat <= e && e <= this.neLat ? this.swLng < this.neLng ? this.swLng <=
|
|
2129
|
+
contains(e, r) {
|
|
2130
|
+
return this.swLat <= e && e <= this.neLat ? this.swLng < this.neLng ? this.swLng <= r && r <= this.neLng : r <= this.neLng || this.swLng <= r : !1;
|
|
2081
2131
|
}
|
|
2082
2132
|
}
|
|
2083
|
-
var
|
|
2133
|
+
var Et;
|
|
2084
2134
|
// @__NO_SIDE_EFFECTS__
|
|
2085
|
-
function
|
|
2135
|
+
function nn(t) {
|
|
2086
2136
|
return {
|
|
2087
|
-
lang: t?.lang ??
|
|
2137
|
+
lang: t?.lang ?? Et?.lang,
|
|
2088
2138
|
message: t?.message,
|
|
2089
|
-
abortEarly: t?.abortEarly ??
|
|
2090
|
-
abortPipeEarly: t?.abortPipeEarly ??
|
|
2139
|
+
abortEarly: t?.abortEarly ?? Et?.abortEarly,
|
|
2140
|
+
abortPipeEarly: t?.abortPipeEarly ?? Et?.abortPipeEarly
|
|
2091
2141
|
};
|
|
2092
2142
|
}
|
|
2093
|
-
var
|
|
2143
|
+
var Hi;
|
|
2094
2144
|
// @__NO_SIDE_EFFECTS__
|
|
2095
|
-
function
|
|
2096
|
-
return
|
|
2145
|
+
function Yi(t) {
|
|
2146
|
+
return Hi?.get(t);
|
|
2097
2147
|
}
|
|
2098
|
-
var
|
|
2148
|
+
var Vi;
|
|
2099
2149
|
// @__NO_SIDE_EFFECTS__
|
|
2100
|
-
function
|
|
2101
|
-
return
|
|
2150
|
+
function Xi(t) {
|
|
2151
|
+
return Vi?.get(t);
|
|
2102
2152
|
}
|
|
2103
|
-
var
|
|
2153
|
+
var Wi;
|
|
2104
2154
|
// @__NO_SIDE_EFFECTS__
|
|
2105
|
-
function
|
|
2106
|
-
return
|
|
2155
|
+
function Gi(t, e) {
|
|
2156
|
+
return Wi?.get(t)?.get(e);
|
|
2107
2157
|
}
|
|
2108
2158
|
// @__NO_SIDE_EFFECTS__
|
|
2109
|
-
function
|
|
2159
|
+
function Ke(t) {
|
|
2110
2160
|
const e = typeof t;
|
|
2111
2161
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2112
2162
|
}
|
|
2113
|
-
function
|
|
2114
|
-
const s = i && "input" in i ? i.input :
|
|
2163
|
+
function S(t, e, r, n, i) {
|
|
2164
|
+
const s = i && "input" in i ? i.input : r.value, o = i?.expected ?? t.expects ?? null, l = i?.received ?? /* @__PURE__ */ Ke(s), a = {
|
|
2115
2165
|
kind: t.kind,
|
|
2116
2166
|
type: t.type,
|
|
2117
2167
|
input: s,
|
|
2118
2168
|
expected: o,
|
|
2119
|
-
received:
|
|
2120
|
-
message: `Invalid ${e}: ${o ? `Expected ${o} but r` : "R"}eceived ${
|
|
2169
|
+
received: l,
|
|
2170
|
+
message: `Invalid ${e}: ${o ? `Expected ${o} but r` : "R"}eceived ${l}`,
|
|
2121
2171
|
requirement: t.requirement,
|
|
2122
2172
|
path: i?.path,
|
|
2123
2173
|
issues: i?.issues,
|
|
2124
|
-
lang:
|
|
2125
|
-
abortEarly:
|
|
2126
|
-
abortPipeEarly:
|
|
2127
|
-
}, u = t.kind === "schema", f = i?.message ?? t.message ?? /* @__PURE__ */
|
|
2128
|
-
f !== void 0 && (
|
|
2174
|
+
lang: n.lang,
|
|
2175
|
+
abortEarly: n.abortEarly,
|
|
2176
|
+
abortPipeEarly: n.abortPipeEarly
|
|
2177
|
+
}, u = t.kind === "schema", f = i?.message ?? t.message ?? /* @__PURE__ */ Gi(t.reference, a.lang) ?? (u ? /* @__PURE__ */ Xi(a.lang) : null) ?? n.message ?? /* @__PURE__ */ Yi(a.lang);
|
|
2178
|
+
f !== void 0 && (a.message = typeof f == "function" ? (
|
|
2129
2179
|
// @ts-expect-error
|
|
2130
|
-
f(
|
|
2131
|
-
) : f), u && (
|
|
2180
|
+
f(a)
|
|
2181
|
+
) : f), u && (r.typed = !1), r.issues ? r.issues.push(a) : r.issues = [a];
|
|
2132
2182
|
}
|
|
2133
2183
|
// @__NO_SIDE_EFFECTS__
|
|
2134
|
-
function
|
|
2184
|
+
function N(t) {
|
|
2135
2185
|
return {
|
|
2136
2186
|
version: 1,
|
|
2137
2187
|
vendor: "valibot",
|
|
2138
2188
|
validate(e) {
|
|
2139
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2189
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ nn());
|
|
2140
2190
|
}
|
|
2141
2191
|
};
|
|
2142
2192
|
}
|
|
2143
|
-
var
|
|
2193
|
+
var ht = class extends Error {
|
|
2144
2194
|
/**
|
|
2145
2195
|
* Creates a Valibot error with useful information.
|
|
2146
2196
|
*
|
|
@@ -2158,23 +2208,23 @@ function z(t) {
|
|
|
2158
2208
|
reference: z,
|
|
2159
2209
|
async: !1,
|
|
2160
2210
|
schema: t,
|
|
2161
|
-
"~run"(e,
|
|
2162
|
-
const
|
|
2211
|
+
"~run"(e, r) {
|
|
2212
|
+
const n = e.value;
|
|
2163
2213
|
return e.value = (...i) => {
|
|
2164
|
-
const s = this.schema["~run"]({ value: i },
|
|
2214
|
+
const s = this.schema["~run"]({ value: i }, r);
|
|
2165
2215
|
if (s.issues)
|
|
2166
|
-
throw new
|
|
2167
|
-
return
|
|
2216
|
+
throw new ht(s.issues);
|
|
2217
|
+
return n(...s.value);
|
|
2168
2218
|
}, e;
|
|
2169
2219
|
}
|
|
2170
2220
|
};
|
|
2171
2221
|
}
|
|
2172
2222
|
// @__NO_SIDE_EFFECTS__
|
|
2173
|
-
function
|
|
2223
|
+
function sn() {
|
|
2174
2224
|
return {
|
|
2175
2225
|
kind: "transformation",
|
|
2176
2226
|
type: "await",
|
|
2177
|
-
reference:
|
|
2227
|
+
reference: sn,
|
|
2178
2228
|
async: !0,
|
|
2179
2229
|
async "~run"(t) {
|
|
2180
2230
|
return t.value = await t.value, t;
|
|
@@ -2182,307 +2232,307 @@ function Yn() {
|
|
|
2182
2232
|
};
|
|
2183
2233
|
}
|
|
2184
2234
|
// @__NO_SIDE_EFFECTS__
|
|
2185
|
-
function
|
|
2235
|
+
function on(t, e) {
|
|
2186
2236
|
return {
|
|
2187
2237
|
kind: "validation",
|
|
2188
2238
|
type: "check",
|
|
2189
|
-
reference:
|
|
2239
|
+
reference: on,
|
|
2190
2240
|
async: !1,
|
|
2191
2241
|
expects: null,
|
|
2192
2242
|
requirement: t,
|
|
2193
2243
|
message: e,
|
|
2194
|
-
"~run"(
|
|
2195
|
-
return
|
|
2244
|
+
"~run"(r, n) {
|
|
2245
|
+
return r.typed && !this.requirement(r.value) && S(this, "input", r, n), r;
|
|
2196
2246
|
}
|
|
2197
2247
|
};
|
|
2198
2248
|
}
|
|
2199
2249
|
// @__NO_SIDE_EFFECTS__
|
|
2200
|
-
function
|
|
2250
|
+
function an(t, e) {
|
|
2201
2251
|
return {
|
|
2202
2252
|
kind: "validation",
|
|
2203
2253
|
type: "length",
|
|
2204
|
-
reference:
|
|
2254
|
+
reference: an,
|
|
2205
2255
|
async: !1,
|
|
2206
2256
|
expects: `${t}`,
|
|
2207
2257
|
requirement: t,
|
|
2208
2258
|
message: e,
|
|
2209
|
-
"~run"(
|
|
2210
|
-
return
|
|
2211
|
-
received: `${
|
|
2212
|
-
}),
|
|
2259
|
+
"~run"(r, n) {
|
|
2260
|
+
return r.typed && r.value.length !== this.requirement && S(this, "length", r, n, {
|
|
2261
|
+
received: `${r.value.length}`
|
|
2262
|
+
}), r;
|
|
2213
2263
|
}
|
|
2214
2264
|
};
|
|
2215
2265
|
}
|
|
2216
2266
|
// @__NO_SIDE_EFFECTS__
|
|
2217
|
-
function
|
|
2267
|
+
function Te(t, e) {
|
|
2218
2268
|
return {
|
|
2219
2269
|
kind: "validation",
|
|
2220
2270
|
type: "max_value",
|
|
2221
|
-
reference:
|
|
2271
|
+
reference: Te,
|
|
2222
2272
|
async: !1,
|
|
2223
|
-
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */
|
|
2273
|
+
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ke(t)}`,
|
|
2224
2274
|
requirement: t,
|
|
2225
2275
|
message: e,
|
|
2226
|
-
"~run"(
|
|
2227
|
-
return
|
|
2228
|
-
received:
|
|
2229
|
-
}),
|
|
2276
|
+
"~run"(r, n) {
|
|
2277
|
+
return r.typed && !(r.value <= this.requirement) && S(this, "value", r, n, {
|
|
2278
|
+
received: r.value instanceof Date ? r.value.toJSON() : /* @__PURE__ */ Ke(r.value)
|
|
2279
|
+
}), r;
|
|
2230
2280
|
}
|
|
2231
2281
|
};
|
|
2232
2282
|
}
|
|
2233
2283
|
// @__NO_SIDE_EFFECTS__
|
|
2234
|
-
function
|
|
2284
|
+
function Vt(t, e) {
|
|
2235
2285
|
return {
|
|
2236
2286
|
kind: "validation",
|
|
2237
2287
|
type: "min_length",
|
|
2238
|
-
reference:
|
|
2288
|
+
reference: Vt,
|
|
2239
2289
|
async: !1,
|
|
2240
2290
|
expects: `>=${t}`,
|
|
2241
2291
|
requirement: t,
|
|
2242
2292
|
message: e,
|
|
2243
|
-
"~run"(
|
|
2244
|
-
return
|
|
2245
|
-
received: `${
|
|
2246
|
-
}),
|
|
2293
|
+
"~run"(r, n) {
|
|
2294
|
+
return r.typed && r.value.length < this.requirement && S(this, "length", r, n, {
|
|
2295
|
+
received: `${r.value.length}`
|
|
2296
|
+
}), r;
|
|
2247
2297
|
}
|
|
2248
2298
|
};
|
|
2249
2299
|
}
|
|
2250
2300
|
// @__NO_SIDE_EFFECTS__
|
|
2251
|
-
function
|
|
2301
|
+
function $(t, e) {
|
|
2252
2302
|
return {
|
|
2253
2303
|
kind: "validation",
|
|
2254
2304
|
type: "min_value",
|
|
2255
|
-
reference:
|
|
2305
|
+
reference: $,
|
|
2256
2306
|
async: !1,
|
|
2257
|
-
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */
|
|
2307
|
+
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Ke(t)}`,
|
|
2258
2308
|
requirement: t,
|
|
2259
2309
|
message: e,
|
|
2260
|
-
"~run"(
|
|
2261
|
-
return
|
|
2262
|
-
received:
|
|
2263
|
-
}),
|
|
2310
|
+
"~run"(r, n) {
|
|
2311
|
+
return r.typed && !(r.value >= this.requirement) && S(this, "value", r, n, {
|
|
2312
|
+
received: r.value instanceof Date ? r.value.toJSON() : /* @__PURE__ */ Ke(r.value)
|
|
2313
|
+
}), r;
|
|
2264
2314
|
}
|
|
2265
2315
|
};
|
|
2266
2316
|
}
|
|
2267
2317
|
// @__NO_SIDE_EFFECTS__
|
|
2268
|
-
function
|
|
2318
|
+
function W(t) {
|
|
2269
2319
|
return {
|
|
2270
2320
|
kind: "transformation",
|
|
2271
2321
|
type: "returns",
|
|
2272
|
-
reference:
|
|
2322
|
+
reference: W,
|
|
2273
2323
|
async: !1,
|
|
2274
2324
|
schema: t,
|
|
2275
|
-
"~run"(e,
|
|
2276
|
-
const
|
|
2325
|
+
"~run"(e, r) {
|
|
2326
|
+
const n = e.value;
|
|
2277
2327
|
return e.value = (...i) => {
|
|
2278
2328
|
const s = this.schema["~run"](
|
|
2279
|
-
{ value:
|
|
2280
|
-
|
|
2329
|
+
{ value: n(...i) },
|
|
2330
|
+
r
|
|
2281
2331
|
);
|
|
2282
2332
|
if (s.issues)
|
|
2283
|
-
throw new
|
|
2333
|
+
throw new ht(s.issues);
|
|
2284
2334
|
return s.value;
|
|
2285
2335
|
}, e;
|
|
2286
2336
|
}
|
|
2287
2337
|
};
|
|
2288
2338
|
}
|
|
2289
2339
|
// @__NO_SIDE_EFFECTS__
|
|
2290
|
-
function
|
|
2340
|
+
function ln(t) {
|
|
2291
2341
|
return {
|
|
2292
2342
|
kind: "transformation",
|
|
2293
2343
|
type: "returns",
|
|
2294
|
-
reference:
|
|
2344
|
+
reference: ln,
|
|
2295
2345
|
async: !1,
|
|
2296
2346
|
schema: t,
|
|
2297
|
-
"~run"(e,
|
|
2298
|
-
const
|
|
2347
|
+
"~run"(e, r) {
|
|
2348
|
+
const n = e.value;
|
|
2299
2349
|
return e.value = async (...i) => {
|
|
2300
2350
|
const s = await this.schema["~run"](
|
|
2301
|
-
{ value: await
|
|
2302
|
-
|
|
2351
|
+
{ value: await n(...i) },
|
|
2352
|
+
r
|
|
2303
2353
|
);
|
|
2304
2354
|
if (s.issues)
|
|
2305
|
-
throw new
|
|
2355
|
+
throw new ht(s.issues);
|
|
2306
2356
|
return s.value;
|
|
2307
2357
|
}, e;
|
|
2308
2358
|
}
|
|
2309
2359
|
};
|
|
2310
2360
|
}
|
|
2311
2361
|
// @__NO_SIDE_EFFECTS__
|
|
2312
|
-
function
|
|
2362
|
+
function Ki(t, e, r) {
|
|
2313
2363
|
return typeof t.fallback == "function" ? (
|
|
2314
2364
|
// @ts-expect-error
|
|
2315
|
-
t.fallback(e,
|
|
2365
|
+
t.fallback(e, r)
|
|
2316
2366
|
) : (
|
|
2317
2367
|
// @ts-expect-error
|
|
2318
2368
|
t.fallback
|
|
2319
2369
|
);
|
|
2320
2370
|
}
|
|
2321
2371
|
// @__NO_SIDE_EFFECTS__
|
|
2322
|
-
function
|
|
2372
|
+
function un(t, e, r) {
|
|
2323
2373
|
return typeof t.default == "function" ? (
|
|
2324
2374
|
// @ts-expect-error
|
|
2325
|
-
t.default(e,
|
|
2375
|
+
t.default(e, r)
|
|
2326
2376
|
) : (
|
|
2327
2377
|
// @ts-expect-error
|
|
2328
2378
|
t.default
|
|
2329
2379
|
);
|
|
2330
2380
|
}
|
|
2331
2381
|
// @__NO_SIDE_EFFECTS__
|
|
2332
|
-
function
|
|
2382
|
+
function fn(t, e) {
|
|
2333
2383
|
return {
|
|
2334
2384
|
kind: "schema",
|
|
2335
2385
|
type: "array",
|
|
2336
|
-
reference:
|
|
2386
|
+
reference: fn,
|
|
2337
2387
|
expects: "Array",
|
|
2338
2388
|
async: !1,
|
|
2339
2389
|
item: t,
|
|
2340
2390
|
message: e,
|
|
2341
2391
|
get "~standard"() {
|
|
2342
|
-
return /* @__PURE__ */
|
|
2392
|
+
return /* @__PURE__ */ N(this);
|
|
2343
2393
|
},
|
|
2344
|
-
"~run"(
|
|
2345
|
-
const i =
|
|
2394
|
+
"~run"(r, n) {
|
|
2395
|
+
const i = r.value;
|
|
2346
2396
|
if (Array.isArray(i)) {
|
|
2347
|
-
|
|
2397
|
+
r.typed = !0, r.value = [];
|
|
2348
2398
|
for (let s = 0; s < i.length; s++) {
|
|
2349
|
-
const o = i[s],
|
|
2350
|
-
if (
|
|
2351
|
-
const
|
|
2399
|
+
const o = i[s], l = this.item["~run"]({ value: o }, n);
|
|
2400
|
+
if (l.issues) {
|
|
2401
|
+
const a = {
|
|
2352
2402
|
type: "array",
|
|
2353
2403
|
origin: "value",
|
|
2354
2404
|
input: i,
|
|
2355
2405
|
key: s,
|
|
2356
2406
|
value: o
|
|
2357
2407
|
};
|
|
2358
|
-
for (const u of
|
|
2359
|
-
u.path ? u.path.unshift(
|
|
2360
|
-
if (
|
|
2361
|
-
|
|
2408
|
+
for (const u of l.issues)
|
|
2409
|
+
u.path ? u.path.unshift(a) : u.path = [a], r.issues?.push(u);
|
|
2410
|
+
if (r.issues || (r.issues = l.issues), n.abortEarly) {
|
|
2411
|
+
r.typed = !1;
|
|
2362
2412
|
break;
|
|
2363
2413
|
}
|
|
2364
2414
|
}
|
|
2365
|
-
|
|
2415
|
+
l.typed || (r.typed = !1), r.value.push(l.value);
|
|
2366
2416
|
}
|
|
2367
2417
|
} else
|
|
2368
|
-
|
|
2369
|
-
return
|
|
2418
|
+
S(this, "type", r, n);
|
|
2419
|
+
return r;
|
|
2370
2420
|
}
|
|
2371
2421
|
};
|
|
2372
2422
|
}
|
|
2373
2423
|
// @__NO_SIDE_EFFECTS__
|
|
2374
|
-
function
|
|
2424
|
+
function cn(t) {
|
|
2375
2425
|
return {
|
|
2376
2426
|
kind: "schema",
|
|
2377
2427
|
type: "boolean",
|
|
2378
|
-
reference:
|
|
2428
|
+
reference: cn,
|
|
2379
2429
|
expects: "boolean",
|
|
2380
2430
|
async: !1,
|
|
2381
2431
|
message: t,
|
|
2382
2432
|
get "~standard"() {
|
|
2383
|
-
return /* @__PURE__ */
|
|
2433
|
+
return /* @__PURE__ */ N(this);
|
|
2384
2434
|
},
|
|
2385
|
-
"~run"(e,
|
|
2386
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
2435
|
+
"~run"(e, r) {
|
|
2436
|
+
return typeof e.value == "boolean" ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2387
2437
|
}
|
|
2388
2438
|
};
|
|
2389
2439
|
}
|
|
2390
2440
|
// @__NO_SIDE_EFFECTS__
|
|
2391
|
-
function
|
|
2441
|
+
function hn(t, e) {
|
|
2392
2442
|
return {
|
|
2393
2443
|
kind: "schema",
|
|
2394
2444
|
type: "custom",
|
|
2395
|
-
reference:
|
|
2445
|
+
reference: hn,
|
|
2396
2446
|
expects: "unknown",
|
|
2397
2447
|
async: !1,
|
|
2398
2448
|
check: t,
|
|
2399
2449
|
message: e,
|
|
2400
2450
|
get "~standard"() {
|
|
2401
|
-
return /* @__PURE__ */
|
|
2451
|
+
return /* @__PURE__ */ N(this);
|
|
2402
2452
|
},
|
|
2403
|
-
"~run"(
|
|
2404
|
-
return this.check(
|
|
2453
|
+
"~run"(r, n) {
|
|
2454
|
+
return this.check(r.value) ? r.typed = !0 : S(this, "type", r, n), r;
|
|
2405
2455
|
}
|
|
2406
2456
|
};
|
|
2407
2457
|
}
|
|
2408
2458
|
// @__NO_SIDE_EFFECTS__
|
|
2409
|
-
function
|
|
2459
|
+
function B(t) {
|
|
2410
2460
|
return {
|
|
2411
2461
|
kind: "schema",
|
|
2412
2462
|
type: "function",
|
|
2413
|
-
reference:
|
|
2463
|
+
reference: B,
|
|
2414
2464
|
expects: "Function",
|
|
2415
2465
|
async: !1,
|
|
2416
2466
|
message: t,
|
|
2417
2467
|
get "~standard"() {
|
|
2418
|
-
return /* @__PURE__ */
|
|
2468
|
+
return /* @__PURE__ */ N(this);
|
|
2419
2469
|
},
|
|
2420
|
-
"~run"(e,
|
|
2421
|
-
return typeof e.value == "function" ? e.typed = !0 :
|
|
2470
|
+
"~run"(e, r) {
|
|
2471
|
+
return typeof e.value == "function" ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2422
2472
|
}
|
|
2423
2473
|
};
|
|
2424
2474
|
}
|
|
2425
2475
|
// @__NO_SIDE_EFFECTS__
|
|
2426
|
-
function
|
|
2476
|
+
function E(t) {
|
|
2427
2477
|
return {
|
|
2428
2478
|
kind: "schema",
|
|
2429
2479
|
type: "number",
|
|
2430
|
-
reference:
|
|
2480
|
+
reference: E,
|
|
2431
2481
|
expects: "number",
|
|
2432
2482
|
async: !1,
|
|
2433
2483
|
message: t,
|
|
2434
2484
|
get "~standard"() {
|
|
2435
|
-
return /* @__PURE__ */
|
|
2485
|
+
return /* @__PURE__ */ N(this);
|
|
2436
2486
|
},
|
|
2437
|
-
"~run"(e,
|
|
2438
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
2487
|
+
"~run"(e, r) {
|
|
2488
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2439
2489
|
}
|
|
2440
2490
|
};
|
|
2441
2491
|
}
|
|
2442
2492
|
// @__NO_SIDE_EFFECTS__
|
|
2443
|
-
function
|
|
2493
|
+
function T(t, e) {
|
|
2444
2494
|
return {
|
|
2445
2495
|
kind: "schema",
|
|
2446
2496
|
type: "object",
|
|
2447
|
-
reference:
|
|
2497
|
+
reference: T,
|
|
2448
2498
|
expects: "Object",
|
|
2449
2499
|
async: !1,
|
|
2450
2500
|
entries: t,
|
|
2451
2501
|
message: e,
|
|
2452
2502
|
get "~standard"() {
|
|
2453
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ N(this);
|
|
2454
2504
|
},
|
|
2455
|
-
"~run"(
|
|
2456
|
-
const i =
|
|
2505
|
+
"~run"(r, n) {
|
|
2506
|
+
const i = r.value;
|
|
2457
2507
|
if (i && typeof i == "object") {
|
|
2458
|
-
|
|
2508
|
+
r.typed = !0, r.value = {};
|
|
2459
2509
|
for (const s in this.entries) {
|
|
2460
2510
|
const o = this.entries[s];
|
|
2461
2511
|
if (s in i || (o.type === "exact_optional" || o.type === "optional" || o.type === "nullish") && // @ts-expect-error
|
|
2462
2512
|
o.default !== void 0) {
|
|
2463
|
-
const
|
|
2513
|
+
const l = s in i ? (
|
|
2464
2514
|
// @ts-expect-error
|
|
2465
2515
|
i[s]
|
|
2466
|
-
) : /* @__PURE__ */
|
|
2467
|
-
if (
|
|
2516
|
+
) : /* @__PURE__ */ un(o), a = o["~run"]({ value: l }, n);
|
|
2517
|
+
if (a.issues) {
|
|
2468
2518
|
const u = {
|
|
2469
2519
|
type: "object",
|
|
2470
2520
|
origin: "value",
|
|
2471
2521
|
input: i,
|
|
2472
2522
|
key: s,
|
|
2473
|
-
value:
|
|
2523
|
+
value: l
|
|
2474
2524
|
};
|
|
2475
|
-
for (const f of
|
|
2476
|
-
f.path ? f.path.unshift(u) : f.path = [u],
|
|
2477
|
-
if (
|
|
2478
|
-
|
|
2525
|
+
for (const f of a.issues)
|
|
2526
|
+
f.path ? f.path.unshift(u) : f.path = [u], r.issues?.push(f);
|
|
2527
|
+
if (r.issues || (r.issues = a.issues), n.abortEarly) {
|
|
2528
|
+
r.typed = !1;
|
|
2479
2529
|
break;
|
|
2480
2530
|
}
|
|
2481
2531
|
}
|
|
2482
|
-
|
|
2532
|
+
a.typed || (r.typed = !1), r.value[s] = a.value;
|
|
2483
2533
|
} else if (o.fallback !== void 0)
|
|
2484
|
-
|
|
2485
|
-
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (
|
|
2534
|
+
r.value[s] = /* @__PURE__ */ Ki(o);
|
|
2535
|
+
else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (S(this, "key", r, n, {
|
|
2486
2536
|
input: void 0,
|
|
2487
2537
|
expected: `"${s}"`,
|
|
2488
2538
|
path: [
|
|
@@ -2495,251 +2545,256 @@ function C(t, e) {
|
|
|
2495
2545
|
value: i[s]
|
|
2496
2546
|
}
|
|
2497
2547
|
]
|
|
2498
|
-
}),
|
|
2548
|
+
}), n.abortEarly))
|
|
2499
2549
|
break;
|
|
2500
2550
|
}
|
|
2501
2551
|
} else
|
|
2502
|
-
|
|
2503
|
-
return
|
|
2552
|
+
S(this, "type", r, n);
|
|
2553
|
+
return r;
|
|
2504
2554
|
}
|
|
2505
2555
|
};
|
|
2506
2556
|
}
|
|
2507
2557
|
// @__NO_SIDE_EFFECTS__
|
|
2508
|
-
function
|
|
2558
|
+
function U(t, e) {
|
|
2509
2559
|
return {
|
|
2510
2560
|
kind: "schema",
|
|
2511
2561
|
type: "optional",
|
|
2512
|
-
reference:
|
|
2562
|
+
reference: U,
|
|
2513
2563
|
expects: `(${t.expects} | undefined)`,
|
|
2514
2564
|
async: !1,
|
|
2515
2565
|
wrapped: t,
|
|
2516
2566
|
default: e,
|
|
2517
2567
|
get "~standard"() {
|
|
2518
|
-
return /* @__PURE__ */
|
|
2568
|
+
return /* @__PURE__ */ N(this);
|
|
2519
2569
|
},
|
|
2520
|
-
"~run"(
|
|
2521
|
-
return
|
|
2570
|
+
"~run"(r, n) {
|
|
2571
|
+
return r.value === void 0 && (this.default !== void 0 && (r.value = /* @__PURE__ */ un(this, r, n)), r.value === void 0) ? (r.typed = !0, r) : this.wrapped["~run"](r, n);
|
|
2522
2572
|
}
|
|
2523
2573
|
};
|
|
2524
2574
|
}
|
|
2525
2575
|
// @__NO_SIDE_EFFECTS__
|
|
2526
|
-
function
|
|
2576
|
+
function pn(t) {
|
|
2527
2577
|
return {
|
|
2528
2578
|
kind: "schema",
|
|
2529
2579
|
type: "promise",
|
|
2530
|
-
reference:
|
|
2580
|
+
reference: pn,
|
|
2531
2581
|
expects: "Promise",
|
|
2532
2582
|
async: !1,
|
|
2533
2583
|
message: t,
|
|
2534
2584
|
get "~standard"() {
|
|
2535
|
-
return /* @__PURE__ */
|
|
2585
|
+
return /* @__PURE__ */ N(this);
|
|
2536
2586
|
},
|
|
2537
|
-
"~run"(e,
|
|
2538
|
-
return e.value instanceof Promise ? e.typed = !0 :
|
|
2587
|
+
"~run"(e, r) {
|
|
2588
|
+
return e.value instanceof Promise ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2539
2589
|
}
|
|
2540
2590
|
};
|
|
2541
2591
|
}
|
|
2542
2592
|
// @__NO_SIDE_EFFECTS__
|
|
2543
|
-
function
|
|
2593
|
+
function te(t) {
|
|
2544
2594
|
return {
|
|
2545
2595
|
kind: "schema",
|
|
2546
2596
|
type: "string",
|
|
2547
|
-
reference:
|
|
2597
|
+
reference: te,
|
|
2548
2598
|
expects: "string",
|
|
2549
2599
|
async: !1,
|
|
2550
2600
|
message: t,
|
|
2551
2601
|
get "~standard"() {
|
|
2552
|
-
return /* @__PURE__ */
|
|
2602
|
+
return /* @__PURE__ */ N(this);
|
|
2553
2603
|
},
|
|
2554
|
-
"~run"(e,
|
|
2555
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
2604
|
+
"~run"(e, r) {
|
|
2605
|
+
return typeof e.value == "string" ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2556
2606
|
}
|
|
2557
2607
|
};
|
|
2558
2608
|
}
|
|
2559
2609
|
// @__NO_SIDE_EFFECTS__
|
|
2560
|
-
function
|
|
2610
|
+
function Z(t, e) {
|
|
2561
2611
|
return {
|
|
2562
2612
|
kind: "schema",
|
|
2563
2613
|
type: "tuple",
|
|
2564
|
-
reference:
|
|
2614
|
+
reference: Z,
|
|
2565
2615
|
expects: "Array",
|
|
2566
2616
|
async: !1,
|
|
2567
2617
|
items: t,
|
|
2568
2618
|
message: e,
|
|
2569
2619
|
get "~standard"() {
|
|
2570
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ N(this);
|
|
2571
2621
|
},
|
|
2572
|
-
"~run"(
|
|
2573
|
-
const i =
|
|
2622
|
+
"~run"(r, n) {
|
|
2623
|
+
const i = r.value;
|
|
2574
2624
|
if (Array.isArray(i)) {
|
|
2575
|
-
|
|
2625
|
+
r.typed = !0, r.value = [];
|
|
2576
2626
|
for (let s = 0; s < this.items.length; s++) {
|
|
2577
|
-
const o = i[s],
|
|
2578
|
-
if (
|
|
2579
|
-
const
|
|
2627
|
+
const o = i[s], l = this.items[s]["~run"]({ value: o }, n);
|
|
2628
|
+
if (l.issues) {
|
|
2629
|
+
const a = {
|
|
2580
2630
|
type: "array",
|
|
2581
2631
|
origin: "value",
|
|
2582
2632
|
input: i,
|
|
2583
2633
|
key: s,
|
|
2584
2634
|
value: o
|
|
2585
2635
|
};
|
|
2586
|
-
for (const u of
|
|
2587
|
-
u.path ? u.path.unshift(
|
|
2588
|
-
if (
|
|
2589
|
-
|
|
2636
|
+
for (const u of l.issues)
|
|
2637
|
+
u.path ? u.path.unshift(a) : u.path = [a], r.issues?.push(u);
|
|
2638
|
+
if (r.issues || (r.issues = l.issues), n.abortEarly) {
|
|
2639
|
+
r.typed = !1;
|
|
2590
2640
|
break;
|
|
2591
2641
|
}
|
|
2592
2642
|
}
|
|
2593
|
-
|
|
2643
|
+
l.typed || (r.typed = !1), r.value.push(l.value);
|
|
2594
2644
|
}
|
|
2595
2645
|
} else
|
|
2596
|
-
|
|
2597
|
-
return
|
|
2646
|
+
S(this, "type", r, n);
|
|
2647
|
+
return r;
|
|
2598
2648
|
}
|
|
2599
2649
|
};
|
|
2600
2650
|
}
|
|
2601
2651
|
// @__NO_SIDE_EFFECTS__
|
|
2602
|
-
function
|
|
2652
|
+
function Ye(t) {
|
|
2603
2653
|
return {
|
|
2604
2654
|
kind: "schema",
|
|
2605
2655
|
type: "void",
|
|
2606
|
-
reference:
|
|
2656
|
+
reference: Ye,
|
|
2607
2657
|
expects: "void",
|
|
2608
2658
|
async: !1,
|
|
2609
2659
|
message: t,
|
|
2610
2660
|
get "~standard"() {
|
|
2611
|
-
return /* @__PURE__ */
|
|
2661
|
+
return /* @__PURE__ */ N(this);
|
|
2612
2662
|
},
|
|
2613
|
-
"~run"(e,
|
|
2614
|
-
return e.value === void 0 ? e.typed = !0 :
|
|
2663
|
+
"~run"(e, r) {
|
|
2664
|
+
return e.value === void 0 ? e.typed = !0 : S(this, "type", e, r), e;
|
|
2615
2665
|
}
|
|
2616
2666
|
};
|
|
2617
2667
|
}
|
|
2618
|
-
function
|
|
2619
|
-
const
|
|
2620
|
-
if (
|
|
2621
|
-
throw new
|
|
2622
|
-
return
|
|
2668
|
+
function tt(t, e, r) {
|
|
2669
|
+
const n = t["~run"]({ value: e }, /* @__PURE__ */ nn(r));
|
|
2670
|
+
if (n.issues)
|
|
2671
|
+
throw new ht(n.issues);
|
|
2672
|
+
return n.value;
|
|
2623
2673
|
}
|
|
2624
2674
|
// @__NO_SIDE_EFFECTS__
|
|
2625
|
-
function
|
|
2675
|
+
function _(...t) {
|
|
2626
2676
|
return {
|
|
2627
2677
|
...t[0],
|
|
2628
2678
|
pipe: t,
|
|
2629
2679
|
get "~standard"() {
|
|
2630
|
-
return /* @__PURE__ */
|
|
2680
|
+
return /* @__PURE__ */ N(this);
|
|
2631
2681
|
},
|
|
2632
|
-
"~run"(e,
|
|
2633
|
-
for (const
|
|
2634
|
-
if (
|
|
2635
|
-
if (e.issues && (
|
|
2682
|
+
"~run"(e, r) {
|
|
2683
|
+
for (const n of t)
|
|
2684
|
+
if (n.kind !== "metadata") {
|
|
2685
|
+
if (e.issues && (n.kind === "schema" || n.kind === "transformation")) {
|
|
2636
2686
|
e.typed = !1;
|
|
2637
2687
|
break;
|
|
2638
2688
|
}
|
|
2639
|
-
(!e.issues || !
|
|
2689
|
+
(!e.issues || !r.abortEarly && !r.abortPipeEarly) && (e = n["~run"](e, r));
|
|
2640
2690
|
}
|
|
2641
2691
|
return e;
|
|
2642
2692
|
}
|
|
2643
2693
|
};
|
|
2644
2694
|
}
|
|
2645
2695
|
// @__NO_SIDE_EFFECTS__
|
|
2646
|
-
function
|
|
2696
|
+
function Ji(...t) {
|
|
2647
2697
|
return {
|
|
2648
2698
|
...t[0],
|
|
2649
2699
|
pipe: t,
|
|
2650
2700
|
async: !0,
|
|
2651
2701
|
get "~standard"() {
|
|
2652
|
-
return /* @__PURE__ */
|
|
2702
|
+
return /* @__PURE__ */ N(this);
|
|
2653
2703
|
},
|
|
2654
|
-
async "~run"(e,
|
|
2655
|
-
for (const
|
|
2656
|
-
if (
|
|
2657
|
-
if (e.issues && (
|
|
2704
|
+
async "~run"(e, r) {
|
|
2705
|
+
for (const n of t)
|
|
2706
|
+
if (n.kind !== "metadata") {
|
|
2707
|
+
if (e.issues && (n.kind === "schema" || n.kind === "transformation")) {
|
|
2658
2708
|
e.typed = !1;
|
|
2659
2709
|
break;
|
|
2660
2710
|
}
|
|
2661
|
-
(!e.issues || !
|
|
2711
|
+
(!e.issues || !r.abortEarly && !r.abortPipeEarly) && (e = await n["~run"](e, r));
|
|
2662
2712
|
}
|
|
2663
2713
|
return e;
|
|
2664
2714
|
}
|
|
2665
2715
|
};
|
|
2666
2716
|
}
|
|
2667
|
-
const
|
|
2668
|
-
sw: /* @__PURE__ */
|
|
2669
|
-
ne: /* @__PURE__ */
|
|
2670
|
-
}),
|
|
2671
|
-
mapSize: /* @__PURE__ */
|
|
2672
|
-
zoomMin: /* @__PURE__ */
|
|
2673
|
-
zoomMax: /* @__PURE__ */
|
|
2674
|
-
zoomScale: /* @__PURE__ */
|
|
2675
|
-
}),
|
|
2676
|
-
inserted: /* @__PURE__ */
|
|
2677
|
-
insert: /* @__PURE__ */
|
|
2678
|
-
remove: /* @__PURE__ */
|
|
2679
|
-
update: /* @__PURE__ */
|
|
2680
|
-
}),
|
|
2681
|
-
getParameters: /* @__PURE__ */
|
|
2682
|
-
getContainer: /* @__PURE__ */
|
|
2683
|
-
getZoom: /* @__PURE__ */
|
|
2684
|
-
getBounds: /* @__PURE__ */
|
|
2685
|
-
panBy: /* @__PURE__ */
|
|
2686
|
-
createMarker: /* @__PURE__ */
|
|
2687
|
-
/* @__PURE__ */
|
|
2688
|
-
/* @__PURE__ */ z(/* @__PURE__ */
|
|
2689
|
-
/* @__PURE__ */
|
|
2717
|
+
const Ct = /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-90), /* @__PURE__ */ Te(90)), Tt = /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-180), /* @__PURE__ */ Te(180)), Qi = /* @__PURE__ */ T({
|
|
2718
|
+
sw: /* @__PURE__ */ T({ lat: Ct, lng: Tt }),
|
|
2719
|
+
ne: /* @__PURE__ */ T({ lat: Ct, lng: Tt })
|
|
2720
|
+
}), Lt = /* @__PURE__ */ hn((t) => t instanceof HTMLElement, "Must be an HTMLElement"), $i = /* @__PURE__ */ T({
|
|
2721
|
+
mapSize: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(1)),
|
|
2722
|
+
zoomMin: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
|
|
2723
|
+
zoomMax: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
|
|
2724
|
+
zoomScale: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(1), /* @__PURE__ */ Te(10))
|
|
2725
|
+
}), es = /* @__PURE__ */ T({
|
|
2726
|
+
inserted: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ cn())),
|
|
2727
|
+
insert: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
|
|
2728
|
+
remove: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
|
|
2729
|
+
update: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ E()])), /* @__PURE__ */ W(/* @__PURE__ */ Ye()))
|
|
2730
|
+
}), ts = /* @__PURE__ */ T({
|
|
2731
|
+
getParameters: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W($i)),
|
|
2732
|
+
getContainer: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(Lt)),
|
|
2733
|
+
getZoom: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(/* @__PURE__ */ E())),
|
|
2734
|
+
getBounds: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([])), /* @__PURE__ */ W(Qi)),
|
|
2735
|
+
panBy: /* @__PURE__ */ _(/* @__PURE__ */ B(), /* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ E(), /* @__PURE__ */ E()])), /* @__PURE__ */ W(/* @__PURE__ */ Ye())),
|
|
2736
|
+
createMarker: /* @__PURE__ */ _(
|
|
2737
|
+
/* @__PURE__ */ B(),
|
|
2738
|
+
/* @__PURE__ */ z(/* @__PURE__ */ Z([Lt, Ct, Tt, /* @__PURE__ */ E()])),
|
|
2739
|
+
/* @__PURE__ */ W(es)
|
|
2690
2740
|
)
|
|
2691
|
-
}),
|
|
2692
|
-
/* @__PURE__ */
|
|
2693
|
-
/* @__PURE__ */ z(/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
),
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2741
|
+
}), kt = /* @__PURE__ */ _(
|
|
2742
|
+
/* @__PURE__ */ B(),
|
|
2743
|
+
/* @__PURE__ */ z(/* @__PURE__ */ Z([/* @__PURE__ */ te()])),
|
|
2744
|
+
/* @__PURE__ */ ln(/* @__PURE__ */ Ji(/* @__PURE__ */ pn(), /* @__PURE__ */ sn(), Lt))
|
|
2745
|
+
), rs = /* @__PURE__ */ T({
|
|
2746
|
+
background: /* @__PURE__ */ U(/* @__PURE__ */ te()),
|
|
2747
|
+
border: /* @__PURE__ */ U(/* @__PURE__ */ te()),
|
|
2748
|
+
shadow: /* @__PURE__ */ U(/* @__PURE__ */ te())
|
|
2749
|
+
}), ns = /* @__PURE__ */ T({
|
|
2750
|
+
width: /* @__PURE__ */ E(),
|
|
2751
|
+
height: /* @__PURE__ */ E(),
|
|
2752
|
+
radius: /* @__PURE__ */ E()
|
|
2753
|
+
}), gr = /* @__PURE__ */ T({
|
|
2754
|
+
background: /* @__PURE__ */ U(/* @__PURE__ */ te()),
|
|
2755
|
+
shadow: /* @__PURE__ */ U(/* @__PURE__ */ te())
|
|
2756
|
+
}), _r = /* @__PURE__ */ _(
|
|
2757
|
+
/* @__PURE__ */ T({
|
|
2758
|
+
width: /* @__PURE__ */ E(),
|
|
2759
|
+
height: /* @__PURE__ */ E(),
|
|
2760
|
+
margin: /* @__PURE__ */ E(),
|
|
2761
|
+
radius: /* @__PURE__ */ E()
|
|
2762
|
+
}),
|
|
2763
|
+
/* @__PURE__ */ on(
|
|
2764
|
+
(t) => Math.min(t.width, t.height) / t.margin >= 6,
|
|
2765
|
+
"Tooltip: minimum of width or height must be greater than or equal to 6 * margin"
|
|
2766
|
+
)
|
|
2767
|
+
), is = /* @__PURE__ */ T({
|
|
2768
|
+
id: /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ Vt(1)),
|
|
2769
|
+
rank: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(0)),
|
|
2770
|
+
lat: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-90), /* @__PURE__ */ Te(90)),
|
|
2771
|
+
lng: /* @__PURE__ */ _(/* @__PURE__ */ E(), /* @__PURE__ */ $(-180), /* @__PURE__ */ Te(180)),
|
|
2772
|
+
tooltip: /* @__PURE__ */ T({
|
|
2773
|
+
body: kt,
|
|
2774
|
+
style: _r,
|
|
2775
|
+
colors: /* @__PURE__ */ U(gr)
|
|
2714
2776
|
}),
|
|
2715
|
-
pin: /* @__PURE__ */
|
|
2716
|
-
/* @__PURE__ */
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
radius: /* @__PURE__ */ g()
|
|
2721
|
-
}),
|
|
2722
|
-
body: dt
|
|
2777
|
+
pin: /* @__PURE__ */ U(
|
|
2778
|
+
/* @__PURE__ */ T({
|
|
2779
|
+
body: kt,
|
|
2780
|
+
style: /* @__PURE__ */ U(ns),
|
|
2781
|
+
colors: /* @__PURE__ */ U(rs)
|
|
2723
2782
|
})
|
|
2724
2783
|
),
|
|
2725
|
-
popup: /* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
radius: /* @__PURE__ */ g(),
|
|
2731
|
-
margin: /* @__PURE__ */ g()
|
|
2732
|
-
}),
|
|
2733
|
-
body: dt
|
|
2784
|
+
popup: /* @__PURE__ */ U(
|
|
2785
|
+
/* @__PURE__ */ T({
|
|
2786
|
+
body: kt,
|
|
2787
|
+
style: _r,
|
|
2788
|
+
colors: /* @__PURE__ */ U(gr)
|
|
2734
2789
|
})
|
|
2735
2790
|
)
|
|
2736
|
-
}),
|
|
2737
|
-
var
|
|
2791
|
+
}), ss = /* @__PURE__ */ fn(is);
|
|
2792
|
+
var ye;
|
|
2738
2793
|
((t) => {
|
|
2739
2794
|
t.COUNT = 12, t.DEGREES = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330], t.DEGREES_DEFAULT = 270;
|
|
2740
|
-
})(
|
|
2741
|
-
const
|
|
2742
|
-
class
|
|
2795
|
+
})(ye || (ye = {}));
|
|
2796
|
+
const os = /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ an(32)), as = /* @__PURE__ */ _(/* @__PURE__ */ te(), /* @__PURE__ */ Vt(1)), wr = "1.2.0", Xt = "https://maps.api.arenarium.dev", ls = `${Xt}/auth`, us = `${Xt}/states`, fs = `${Xt}/log`;
|
|
2797
|
+
class dn {
|
|
2743
2798
|
apiKey;
|
|
2744
2799
|
apiToken;
|
|
2745
2800
|
apiDevEnvironment;
|
|
@@ -2750,24 +2805,24 @@ class er {
|
|
|
2750
2805
|
markerPinProcessor;
|
|
2751
2806
|
markerTooltipProcessor;
|
|
2752
2807
|
markerPopupProcessor;
|
|
2753
|
-
constructor(e,
|
|
2754
|
-
|
|
2808
|
+
constructor(e, r, n, i) {
|
|
2809
|
+
tt(os, e), tt(as, r), tt(ts, n), this.apiKey = e, this.apiToken = r, this.apiDevEnvironment = window?.location.host.startsWith("localhost") || window?.location.host.startsWith("127.0.0.1"), this.mapProvider = n, this.markerPinProcessor = new lt(n), this.markerTooltipProcessor = new hs(n), this.markerPopupProcessor = new ps(n), this.setConfiguration(i);
|
|
2755
2810
|
}
|
|
2756
|
-
static async create(e,
|
|
2757
|
-
const i = { key: e, version:
|
|
2758
|
-
let o = (await
|
|
2811
|
+
static async create(e, r, n) {
|
|
2812
|
+
const i = { key: e, version: wr };
|
|
2813
|
+
let o = (await He.post(ls, i)).token;
|
|
2759
2814
|
if (!o) throw new Error("Failed to get api token");
|
|
2760
|
-
return new
|
|
2815
|
+
return new dn(e, o, r, n);
|
|
2761
2816
|
}
|
|
2762
2817
|
setConfiguration(e) {
|
|
2763
|
-
|
|
2818
|
+
ae.setLimit(e?.animation?.queue?.limit ?? 8 * navigator.hardwareConcurrency), this.markerPinProcessor.setConfiguration(e);
|
|
2764
2819
|
}
|
|
2765
2820
|
async updateMarkers(e) {
|
|
2766
|
-
|
|
2821
|
+
tt(ss, e);
|
|
2767
2822
|
try {
|
|
2768
2823
|
await this.updateMarkerData(e), this.processMarkerDataCallback();
|
|
2769
|
-
} catch (
|
|
2770
|
-
throw console.error(
|
|
2824
|
+
} catch (r) {
|
|
2825
|
+
throw console.error(r), this.removeMarkerData(), r instanceof Error && this.log("error", "Failed to update markers", r), r;
|
|
2771
2826
|
}
|
|
2772
2827
|
}
|
|
2773
2828
|
removeMarkers() {
|
|
@@ -2779,56 +2834,56 @@ class er {
|
|
|
2779
2834
|
}
|
|
2780
2835
|
showPopup(e) {
|
|
2781
2836
|
try {
|
|
2782
|
-
for (const n of this.markerDataArray)
|
|
2783
|
-
n.marker.id == e ? this.markerPopupProcessor.show(n) : this.markerPopupProcessor.hide(n);
|
|
2784
|
-
} catch (n) {
|
|
2785
|
-
console.error(n);
|
|
2786
2837
|
for (const r of this.markerDataArray)
|
|
2787
|
-
this.markerPopupProcessor.hide(r);
|
|
2788
|
-
|
|
2838
|
+
r.marker.id == e ? this.markerPopupProcessor.show(r) : this.markerPopupProcessor.hide(r);
|
|
2839
|
+
} catch (r) {
|
|
2840
|
+
console.error(r);
|
|
2841
|
+
for (const n of this.markerDataArray)
|
|
2842
|
+
this.markerPopupProcessor.hide(n);
|
|
2843
|
+
throw r instanceof Error && this.log("error", "Failed to show popup", r), r;
|
|
2789
2844
|
}
|
|
2790
2845
|
}
|
|
2791
2846
|
hidePopup(e) {
|
|
2792
2847
|
try {
|
|
2793
2848
|
if (e) {
|
|
2794
|
-
const
|
|
2795
|
-
if (
|
|
2796
|
-
this.markerPopupProcessor.hide(n);
|
|
2797
|
-
} else
|
|
2798
|
-
for (const n of this.markerDataArray)
|
|
2799
|
-
this.markerPopupProcessor.hide(n);
|
|
2800
|
-
} catch (n) {
|
|
2801
|
-
console.error(n);
|
|
2802
|
-
for (const r of this.markerDataArray)
|
|
2849
|
+
const r = this.markerDataMap.get(e);
|
|
2850
|
+
if (r == null) return;
|
|
2803
2851
|
this.markerPopupProcessor.hide(r);
|
|
2804
|
-
|
|
2852
|
+
} else
|
|
2853
|
+
for (const r of this.markerDataArray)
|
|
2854
|
+
this.markerPopupProcessor.hide(r);
|
|
2855
|
+
} catch (r) {
|
|
2856
|
+
console.error(r);
|
|
2857
|
+
for (const n of this.markerDataArray)
|
|
2858
|
+
this.markerPopupProcessor.hide(n);
|
|
2859
|
+
throw r instanceof Error && this.log("error", "Failed to hide popup", r), r;
|
|
2805
2860
|
}
|
|
2806
2861
|
}
|
|
2807
2862
|
async updateMarkerData(e) {
|
|
2808
2863
|
try {
|
|
2809
|
-
let
|
|
2864
|
+
let r = this.markerDataArray.map((i) => i.marker);
|
|
2810
2865
|
for (let i = 0; i < e.length; i++) {
|
|
2811
2866
|
const s = e[i];
|
|
2812
|
-
this.markerDataMap.get(s.id) ||
|
|
2867
|
+
this.markerDataMap.get(s.id) || r.push(s);
|
|
2813
2868
|
}
|
|
2814
|
-
const
|
|
2869
|
+
const n = await this.getMarkerStates(r);
|
|
2815
2870
|
try {
|
|
2816
2871
|
this.markerDataUpdating = !0;
|
|
2817
|
-
for (let i = 0; i <
|
|
2818
|
-
const s =
|
|
2819
|
-
if (
|
|
2820
|
-
|
|
2872
|
+
for (let i = 0; i < r.length; i++) {
|
|
2873
|
+
const s = r[i], o = n[i], l = this.markerDataMap.get(s.id);
|
|
2874
|
+
if (l)
|
|
2875
|
+
l.update(o);
|
|
2821
2876
|
else {
|
|
2822
|
-
const
|
|
2823
|
-
|
|
2877
|
+
const a = new cs(this.mapProvider, s, o);
|
|
2878
|
+
a.create(), this.markerDataMap.set(s.id, a), this.markerDataArray.push(a);
|
|
2824
2879
|
}
|
|
2825
2880
|
}
|
|
2826
2881
|
this.markerDataArray.sort((i, s) => i.zoom - s.zoom), this.markerPinProcessor.updateElements(this.markerDataArray.map((i) => i.pin)), this.markerTooltipProcessor.updateElements(this.markerDataArray.map((i) => i.tooltip)), this.markerPopupProcessor.updateElements(this.markerDataArray.map((i) => i.popup).filter((i) => i != null));
|
|
2827
2882
|
} finally {
|
|
2828
2883
|
this.markerDataUpdating = !1;
|
|
2829
2884
|
}
|
|
2830
|
-
} catch (
|
|
2831
|
-
throw console.error(
|
|
2885
|
+
} catch (r) {
|
|
2886
|
+
throw console.error(r), this.markerDataArray.forEach((n) => n.remove()), this.markerDataArray.length = 0, this.markerDataMap.clear(), r instanceof Error && this.log("error", "Failed to update marker data", r), r;
|
|
2832
2887
|
} finally {
|
|
2833
2888
|
this.markerDataUpdating = !1;
|
|
2834
2889
|
}
|
|
@@ -2844,8 +2899,8 @@ class er {
|
|
|
2844
2899
|
}
|
|
2845
2900
|
async getMarkerStates(e) {
|
|
2846
2901
|
if (e.length == 0) return [];
|
|
2847
|
-
if (e.length == 1) return [[0, [[0,
|
|
2848
|
-
const
|
|
2902
|
+
if (e.length == 1) return [[0, [[0, ye.DEGREES.indexOf(ye.DEGREES_DEFAULT)]]]];
|
|
2903
|
+
const r = e.map((s) => ({
|
|
2849
2904
|
id: s.id,
|
|
2850
2905
|
rank: s.rank,
|
|
2851
2906
|
lat: s.lat,
|
|
@@ -2853,12 +2908,12 @@ class er {
|
|
|
2853
2908
|
width: s.tooltip.style.width,
|
|
2854
2909
|
height: s.tooltip.style.height,
|
|
2855
2910
|
margin: s.tooltip.style.margin
|
|
2856
|
-
})),
|
|
2911
|
+
})), n = {
|
|
2857
2912
|
key: this.apiKey,
|
|
2858
2913
|
token: this.apiToken,
|
|
2859
2914
|
parameters: this.mapProvider.getParameters(),
|
|
2860
|
-
input:
|
|
2861
|
-
}, i = await
|
|
2915
|
+
input: r
|
|
2916
|
+
}, i = await He.post(us, n, {
|
|
2862
2917
|
headers: { "Cache-Control": this.apiDevEnvironment ? "no-cache" : "" }
|
|
2863
2918
|
});
|
|
2864
2919
|
return i.token && (this.apiToken = i.token), i.states;
|
|
@@ -2873,35 +2928,35 @@ class er {
|
|
|
2873
2928
|
}
|
|
2874
2929
|
processMarkerData() {
|
|
2875
2930
|
if (this.markerDataUpdating) return;
|
|
2876
|
-
const e = this.mapProvider.getBounds(),
|
|
2877
|
-
this.markerPopupProcessor.process(), this.markerTooltipProcessor.process(e,
|
|
2931
|
+
const e = this.mapProvider.getBounds(), r = this.mapProvider.getZoom();
|
|
2932
|
+
this.markerPopupProcessor.process(), this.markerTooltipProcessor.process(e, r), this.markerPinProcessor.process(e, r);
|
|
2878
2933
|
}
|
|
2879
|
-
async log(e,
|
|
2934
|
+
async log(e, r, n) {
|
|
2880
2935
|
if (!this.apiDevEnvironment)
|
|
2881
2936
|
try {
|
|
2882
2937
|
const i = {
|
|
2883
2938
|
key: this.apiKey,
|
|
2884
|
-
title:
|
|
2939
|
+
title: r,
|
|
2885
2940
|
level: e,
|
|
2886
2941
|
content: {
|
|
2887
|
-
version:
|
|
2888
|
-
...
|
|
2942
|
+
version: wr,
|
|
2943
|
+
...n
|
|
2889
2944
|
}
|
|
2890
2945
|
};
|
|
2891
|
-
await
|
|
2946
|
+
await He.post(fs, i);
|
|
2892
2947
|
} catch (i) {
|
|
2893
2948
|
console.error(i);
|
|
2894
2949
|
}
|
|
2895
2950
|
}
|
|
2896
2951
|
}
|
|
2897
|
-
class
|
|
2952
|
+
class cs {
|
|
2898
2953
|
marker;
|
|
2899
2954
|
zoom;
|
|
2900
2955
|
pin;
|
|
2901
2956
|
tooltip;
|
|
2902
2957
|
popup;
|
|
2903
|
-
constructor(e,
|
|
2904
|
-
this.marker =
|
|
2958
|
+
constructor(e, r, n) {
|
|
2959
|
+
this.marker = r, this.zoom = n[0], this.pin = new Ve(e, r, n), this.tooltip = new Gt(e, r, n), r.popup && (this.popup = new Kt(e, r));
|
|
2905
2960
|
}
|
|
2906
2961
|
create() {
|
|
2907
2962
|
this.pin.create(), this.tooltip.create(), this.popup?.create();
|
|
@@ -2913,7 +2968,7 @@ class Gi {
|
|
|
2913
2968
|
this.pin.remove(), this.tooltip.remove(), this.popup?.remove();
|
|
2914
2969
|
}
|
|
2915
2970
|
}
|
|
2916
|
-
class
|
|
2971
|
+
class Wt {
|
|
2917
2972
|
provider;
|
|
2918
2973
|
id;
|
|
2919
2974
|
lat;
|
|
@@ -2922,8 +2977,8 @@ class Ut {
|
|
|
2922
2977
|
element;
|
|
2923
2978
|
component;
|
|
2924
2979
|
marker;
|
|
2925
|
-
constructor(e,
|
|
2926
|
-
this.provider = e, this.id =
|
|
2980
|
+
constructor(e, r) {
|
|
2981
|
+
this.provider = e, this.id = r.id, this.lat = r.lat, this.lng = r.lng, this.shown = !0;
|
|
2927
2982
|
}
|
|
2928
2983
|
create() {
|
|
2929
2984
|
this.createElement(), this.createMarker(), this.updateZIndex();
|
|
@@ -2941,9 +2996,9 @@ class Ut {
|
|
|
2941
2996
|
this.marker.update(this.getZindex());
|
|
2942
2997
|
}
|
|
2943
2998
|
updateMap(e) {
|
|
2944
|
-
const
|
|
2945
|
-
if (
|
|
2946
|
-
e ?
|
|
2999
|
+
const r = this.marker, n = this.component;
|
|
3000
|
+
if (r == null || n == null) throw new Error("Failed to update provider marker map");
|
|
3001
|
+
e ? r.inserted() == !1 && r.insert() : r.inserted() == !0 && r.remove();
|
|
2947
3002
|
}
|
|
2948
3003
|
getZindex() {
|
|
2949
3004
|
throw new Error("Get z-index not implemented");
|
|
@@ -2952,28 +3007,26 @@ class Ut {
|
|
|
2952
3007
|
this.marker?.remove();
|
|
2953
3008
|
}
|
|
2954
3009
|
}
|
|
2955
|
-
class
|
|
3010
|
+
class Ve extends Wt {
|
|
2956
3011
|
static DEFAULT_SIZE = 16;
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
radius;
|
|
3012
|
+
style;
|
|
3013
|
+
colors;
|
|
2960
3014
|
zoom;
|
|
2961
3015
|
bodyLoading = !1;
|
|
2962
3016
|
bodyLoaded = !1;
|
|
2963
3017
|
bodyCallback;
|
|
2964
|
-
constructor(e,
|
|
2965
|
-
super(e,
|
|
3018
|
+
constructor(e, r, n) {
|
|
3019
|
+
super(e, r), this.style = r.pin?.style ?? { width: Ve.DEFAULT_SIZE, height: Ve.DEFAULT_SIZE, radius: Ve.DEFAULT_SIZE }, this.colors = r.pin?.colors, this.zoom = n[0], this.bodyCallback = r.pin?.body;
|
|
2966
3020
|
}
|
|
2967
3021
|
createElement() {
|
|
2968
|
-
this.element = document.createElement("div"), this.element.classList.add("pin"), this.component =
|
|
3022
|
+
this.element = document.createElement("div"), this.element.classList.add("pin"), this.component = Ht(Zi, {
|
|
2969
3023
|
target: this.element,
|
|
2970
3024
|
props: {
|
|
2971
3025
|
id: this.id + "_pin",
|
|
2972
|
-
layer:
|
|
3026
|
+
layer: zi,
|
|
2973
3027
|
priority: this.zoom * this.provider.getParameters().zoomScale,
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
radius: this.radius
|
|
3028
|
+
style: this.style,
|
|
3029
|
+
colors: this.colors
|
|
2977
3030
|
}
|
|
2978
3031
|
});
|
|
2979
3032
|
}
|
|
@@ -2986,9 +3039,9 @@ class Be extends Ut {
|
|
|
2986
3039
|
updateBody() {
|
|
2987
3040
|
if (this.bodyCallback == null || this.bodyLoaded || this.bodyLoading) return;
|
|
2988
3041
|
const e = this.component?.getBody();
|
|
2989
|
-
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((
|
|
2990
|
-
|
|
2991
|
-
}).catch((
|
|
3042
|
+
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
|
|
3043
|
+
r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load pin body");
|
|
3044
|
+
}).catch((r) => console.error(r)).finally(() => {
|
|
2992
3045
|
this.bodyLoaded = !0, this.bodyLoading = !1;
|
|
2993
3046
|
}));
|
|
2994
3047
|
}
|
|
@@ -3014,7 +3067,7 @@ class Be extends Ut {
|
|
|
3014
3067
|
return this.bodyCallback == null || this.bodyLoaded;
|
|
3015
3068
|
}
|
|
3016
3069
|
}
|
|
3017
|
-
class
|
|
3070
|
+
class lt {
|
|
3018
3071
|
static MAP_PINS_MAX_ZOOM = 2;
|
|
3019
3072
|
static MAP_PINS_MAX_COUNT = 128;
|
|
3020
3073
|
provider;
|
|
@@ -3030,52 +3083,48 @@ class st {
|
|
|
3030
3083
|
this.provider = e;
|
|
3031
3084
|
}
|
|
3032
3085
|
setConfiguration(e) {
|
|
3033
|
-
this.pinFade = e?.pin?.fade ?? !0, this.pinMaxCount = e?.pin?.maxCount ?? Math.max(
|
|
3086
|
+
this.pinFade = e?.pin?.fade ?? !0, this.pinMaxCount = e?.pin?.maxCount ?? Math.max(lt.MAP_PINS_MAX_COUNT, 8 * navigator.hardwareConcurrency), this.pinMaxZoomDelta = e?.pin?.maxZoom ?? lt.MAP_PINS_MAX_ZOOM;
|
|
3034
3087
|
}
|
|
3035
3088
|
updateElements(e) {
|
|
3036
|
-
this.pinElements = e, this.pinMaxWidth = e.reduce((
|
|
3089
|
+
this.pinElements = e, this.pinMaxWidth = e.reduce((r, n) => Math.max(r, n.style.width), 0), this.pinMaxHeight = e.reduce((r, n) => Math.max(r, n.style.height), 0);
|
|
3037
3090
|
}
|
|
3038
3091
|
removeElements() {
|
|
3039
3092
|
this.pinElements.forEach((e) => e.remove()), this.pinElements.length = 0;
|
|
3040
3093
|
}
|
|
3041
|
-
process(e,
|
|
3042
|
-
const
|
|
3094
|
+
process(e, r) {
|
|
3095
|
+
const n = this.provider.getParameters().mapSize, i = new rn(e, r, n, this.pinMaxWidth * 2, this.pinMaxHeight * 2);
|
|
3043
3096
|
let s = 0;
|
|
3044
3097
|
for (const o of this.pinElements)
|
|
3045
|
-
i.contains(o.lat, o.lng) ? o.shown &&
|
|
3098
|
+
i.contains(o.lat, o.lng) ? o.shown && r < o.zoom && o.zoom < r + this.pinMaxZoomDelta ? (s < this.pinMaxCount && (o.setCollapsed(!1), o.setScale(this.pinFade ? o.getScaleFromZoomDistance(r) : 1), o.updateMap(!0), o.isBodyLoaded() == !1 && o.updateBody()), s++) : (o.setCollapsed(!0), o.isCollapsed() && o.updateMap(!1)) : o.updateMap(!1);
|
|
3046
3099
|
}
|
|
3047
3100
|
}
|
|
3048
|
-
class
|
|
3101
|
+
class Gt extends Wt {
|
|
3049
3102
|
static Z_INDEX_OFFSET = 1e6;
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
margin;
|
|
3053
|
-
radius;
|
|
3103
|
+
style;
|
|
3104
|
+
colors;
|
|
3054
3105
|
zoom;
|
|
3055
3106
|
angle;
|
|
3056
3107
|
states;
|
|
3057
3108
|
bodyLoading = !1;
|
|
3058
3109
|
bodyLoaded = !1;
|
|
3059
3110
|
bodyCallback;
|
|
3060
|
-
constructor(e,
|
|
3061
|
-
super(e,
|
|
3111
|
+
constructor(e, r, n) {
|
|
3112
|
+
super(e, r), this.style = r.tooltip.style, this.colors = r.tooltip.colors, this.zoom = n[0], this.angle = ye.DEGREES_DEFAULT, this.states = n[1].map((i) => [i[0], ye.DEGREES[i[1]]]), this.bodyCallback = r.tooltip.body;
|
|
3062
3113
|
}
|
|
3063
3114
|
createElement() {
|
|
3064
|
-
this.element = document.createElement("div"), this.element.classList.add("tooltip"), this.component =
|
|
3115
|
+
this.element = document.createElement("div"), this.element.classList.add("tooltip"), this.component = Ht(tn, {
|
|
3065
3116
|
target: this.element,
|
|
3066
3117
|
props: {
|
|
3067
3118
|
id: this.id + "_tooltip",
|
|
3068
|
-
layer:
|
|
3119
|
+
layer: ji,
|
|
3069
3120
|
priority: this.zoom * this.provider.getParameters().zoomScale,
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
margin: this.margin,
|
|
3073
|
-
radius: this.radius
|
|
3121
|
+
style: this.style,
|
|
3122
|
+
colors: this.colors
|
|
3074
3123
|
}
|
|
3075
3124
|
});
|
|
3076
3125
|
}
|
|
3077
3126
|
update(e) {
|
|
3078
|
-
this.zoom = e[0], this.states = e[1].map((
|
|
3127
|
+
this.zoom = e[0], this.states = e[1].map((r) => [r[0], ye.DEGREES[r[1]]]), this.updateZIndex();
|
|
3079
3128
|
}
|
|
3080
3129
|
updateMap(e) {
|
|
3081
3130
|
super.updateMap(e), this.component?.setDisplayed(e);
|
|
@@ -3087,20 +3136,20 @@ class Zt extends Ut {
|
|
|
3087
3136
|
updateBody() {
|
|
3088
3137
|
if (this.bodyLoaded || this.bodyLoading) return;
|
|
3089
3138
|
const e = this.component?.getBody();
|
|
3090
|
-
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((
|
|
3091
|
-
|
|
3092
|
-
}).catch((
|
|
3139
|
+
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
|
|
3140
|
+
r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load tooltip body");
|
|
3141
|
+
}).catch((r) => console.error(r)).finally(() => {
|
|
3093
3142
|
this.bodyLoaded = !0, this.bodyLoading = !1;
|
|
3094
3143
|
}));
|
|
3095
3144
|
}
|
|
3096
3145
|
getAngle(e) {
|
|
3097
|
-
const
|
|
3098
|
-
if (!
|
|
3099
|
-
return
|
|
3146
|
+
const r = this.states.findLast((n) => n[0] <= e);
|
|
3147
|
+
if (!r) throw new Error("Angle not found");
|
|
3148
|
+
return r[1];
|
|
3100
3149
|
}
|
|
3101
3150
|
getZindex() {
|
|
3102
3151
|
const e = this.provider.getParameters();
|
|
3103
|
-
return Math.round((e.zoomMax - this.zoom) * e.zoomScale) +
|
|
3152
|
+
return Math.round((e.zoomMax - this.zoom) * e.zoomScale) + Gt.Z_INDEX_OFFSET;
|
|
3104
3153
|
}
|
|
3105
3154
|
setCollapsed(e) {
|
|
3106
3155
|
if (this.component == null) throw new Error("Failed to set tooltip collapsed");
|
|
@@ -3116,7 +3165,7 @@ class Zt extends Ut {
|
|
|
3116
3165
|
return this.bodyLoaded;
|
|
3117
3166
|
}
|
|
3118
3167
|
}
|
|
3119
|
-
class
|
|
3168
|
+
class hs {
|
|
3120
3169
|
provider;
|
|
3121
3170
|
// Data
|
|
3122
3171
|
tooltipElements = new Array();
|
|
@@ -3127,41 +3176,37 @@ class Ki {
|
|
|
3127
3176
|
this.provider = e;
|
|
3128
3177
|
}
|
|
3129
3178
|
updateElements(e) {
|
|
3130
|
-
this.tooltipElements = e, this.tooltipMaxWidth = this.tooltipElements.reduce((
|
|
3179
|
+
this.tooltipElements = e, this.tooltipMaxWidth = this.tooltipElements.reduce((r, n) => Math.max(r, n.style.width), 0), this.tooltipMaxHeight = this.tooltipElements.reduce((r, n) => Math.max(r, n.style.height), 0);
|
|
3131
3180
|
}
|
|
3132
3181
|
removeElements() {
|
|
3133
3182
|
this.tooltipElements.forEach((e) => e.remove()), this.tooltipElements.length = 0;
|
|
3134
3183
|
}
|
|
3135
|
-
process(e,
|
|
3136
|
-
const
|
|
3184
|
+
process(e, r) {
|
|
3185
|
+
const n = this.provider.getParameters().mapSize, i = new rn(e, r, n, this.tooltipMaxWidth * 2, this.tooltipMaxHeight * 2);
|
|
3137
3186
|
for (const s of this.tooltipElements)
|
|
3138
|
-
i.contains(s.lat, s.lng) ? s.shown && s.zoom <=
|
|
3187
|
+
i.contains(s.lat, s.lng) ? s.shown && s.zoom <= r ? (s.updateState(r), s.setCollapsed(!1), s.updateMap(!0), s.isCollapsed() == !1 && s.isBodyLoaded() == !1 && s.updateBody()) : (s.setCollapsed(!0), s.isCollapsed() && s.updateMap(!1)) : s.updateMap(!1);
|
|
3139
3188
|
}
|
|
3140
3189
|
}
|
|
3141
|
-
class
|
|
3190
|
+
class Kt extends Wt {
|
|
3142
3191
|
static Z_INDEX_OFFSET = 2e6;
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
margin;
|
|
3146
|
-
radius;
|
|
3192
|
+
style;
|
|
3193
|
+
colors;
|
|
3147
3194
|
bodyLoading = !1;
|
|
3148
3195
|
bodyLoaded = !1;
|
|
3149
3196
|
bodyCallback;
|
|
3150
|
-
constructor(e,
|
|
3151
|
-
if (
|
|
3152
|
-
super(e,
|
|
3197
|
+
constructor(e, r) {
|
|
3198
|
+
if (r.popup == null) throw new Error("Failed to create popup");
|
|
3199
|
+
super(e, r), this.shown = !1, this.style = r.popup.style, this.colors = r.popup.colors, this.bodyCallback = r.popup.body;
|
|
3153
3200
|
}
|
|
3154
3201
|
createElement() {
|
|
3155
|
-
this.element = document.createElement("div"), this.element.classList.add("popup"), this.component =
|
|
3202
|
+
this.element = document.createElement("div"), this.element.classList.add("popup"), this.component = Ht(tn, {
|
|
3156
3203
|
target: this.element,
|
|
3157
3204
|
props: {
|
|
3158
3205
|
id: this.id + "_popup",
|
|
3159
|
-
layer:
|
|
3206
|
+
layer: Ni,
|
|
3160
3207
|
priority: 0,
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
margin: this.margin,
|
|
3164
|
-
radius: this.radius
|
|
3208
|
+
style: this.style,
|
|
3209
|
+
colors: this.colors
|
|
3165
3210
|
}
|
|
3166
3211
|
});
|
|
3167
3212
|
}
|
|
@@ -3171,14 +3216,14 @@ class qt extends Ut {
|
|
|
3171
3216
|
updateBody() {
|
|
3172
3217
|
if (this.bodyLoaded || this.bodyLoading) return;
|
|
3173
3218
|
const e = this.component?.getBody();
|
|
3174
|
-
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((
|
|
3175
|
-
|
|
3176
|
-
}).catch((
|
|
3219
|
+
e != null && (this.bodyLoading = !0, this.bodyCallback(this.id).then((r) => {
|
|
3220
|
+
r instanceof HTMLElement ? e.appendChild(r) : console.error("Failed to load popup body");
|
|
3221
|
+
}).catch((r) => console.error(r)).finally(() => {
|
|
3177
3222
|
this.bodyLoaded = !0, this.bodyLoading = !1;
|
|
3178
3223
|
}));
|
|
3179
3224
|
}
|
|
3180
3225
|
getZindex() {
|
|
3181
|
-
return
|
|
3226
|
+
return Kt.Z_INDEX_OFFSET;
|
|
3182
3227
|
}
|
|
3183
3228
|
setCollapsed(e) {
|
|
3184
3229
|
if (this.component == null) throw new Error("Failed to set popup collapsed");
|
|
@@ -3198,7 +3243,7 @@ class qt extends Ut {
|
|
|
3198
3243
|
return this.bodyLoaded;
|
|
3199
3244
|
}
|
|
3200
3245
|
}
|
|
3201
|
-
class
|
|
3246
|
+
class ps {
|
|
3202
3247
|
provider;
|
|
3203
3248
|
// Data
|
|
3204
3249
|
popupElements = new Array();
|
|
@@ -3213,7 +3258,7 @@ class Ji {
|
|
|
3213
3258
|
e.popup && (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
3214
3259
|
}
|
|
3215
3260
|
updateElements(e) {
|
|
3216
|
-
this.popupElements = e, this.popupPositioned = new Map(e.map((
|
|
3261
|
+
this.popupElements = e, this.popupPositioned = new Map(e.map((r) => [r.id, !1]));
|
|
3217
3262
|
}
|
|
3218
3263
|
removeElements() {
|
|
3219
3264
|
this.popupElements.forEach((e) => e.remove()), this.popupElements.length = 0, this.popupPositioned.clear();
|
|
@@ -3222,22 +3267,22 @@ class Ji {
|
|
|
3222
3267
|
for (const e of this.popupElements)
|
|
3223
3268
|
if (e.shown) {
|
|
3224
3269
|
if (e.setCollapsed(!1), e.updateMap(!0), e.isExpanded() && e.isBodyLoaded() == !1 && e.updateBody(), e.isCollapsed() == !1 && this.popupPositioned.get(e.id) == !1) {
|
|
3225
|
-
const
|
|
3226
|
-
if (n == null) continue;
|
|
3227
|
-
const r = e.component?.getOffsets();
|
|
3270
|
+
const r = e.component?.getBody();
|
|
3228
3271
|
if (r == null) continue;
|
|
3229
|
-
const
|
|
3272
|
+
const n = e.component?.getOffsets();
|
|
3273
|
+
if (n == null) continue;
|
|
3274
|
+
const i = r.getBoundingClientRect();
|
|
3230
3275
|
if (i.x == 0 && i.y == 0 && i.width == 0 && i.height == 0) continue;
|
|
3231
|
-
const s = i.x + i.width / 2, o = i.y + i.height / 2,
|
|
3232
|
-
this.provider.panBy(
|
|
3276
|
+
const s = i.x + i.width / 2, o = i.y + i.height / 2, l = s + n.x, a = o + n.y, u = l + e.style.width, f = a + e.style.height, p = this.provider.getContainer().getBoundingClientRect(), h = l - p.left, c = p.right - u, d = a - p.top, w = p.bottom - f, F = Math.min(e.style.width, e.style.height) / 4, K = h < 0 ? h - F : c < 0 ? -c + F : 0, k = d < 0 ? d - F : w < 0 ? -w + F : 0;
|
|
3277
|
+
this.provider.panBy(K, k), this.popupPositioned.set(e.id, !0);
|
|
3233
3278
|
}
|
|
3234
3279
|
} else
|
|
3235
3280
|
e.setCollapsed(!0), e.isCollapsed() && e.updateMap(!1);
|
|
3236
3281
|
}
|
|
3237
3282
|
}
|
|
3238
|
-
const
|
|
3283
|
+
const ds = () => '<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />', ys = () => `<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${ds()}<span> @arenarium/maps</span></a>`;
|
|
3239
3284
|
export {
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3285
|
+
dn as MapManager,
|
|
3286
|
+
ys as getAttributionHtml,
|
|
3287
|
+
ds as getImageHtml
|
|
3243
3288
|
};
|