@arenarium/maps 1.2.25 → 1.2.26
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.js +794 -800
- package/package.json +3 -3
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Bt {
|
|
2
2
|
invoked = !1;
|
|
3
3
|
interval;
|
|
4
4
|
timeout;
|
|
@@ -17,7 +17,7 @@ class Ut {
|
|
|
17
17
|
this.invoked = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
class
|
|
20
|
+
class gs {
|
|
21
21
|
data;
|
|
22
22
|
state;
|
|
23
23
|
constructor(e) {
|
|
@@ -35,7 +35,7 @@ class ws {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
class
|
|
38
|
+
class ws {
|
|
39
39
|
callback;
|
|
40
40
|
timeout;
|
|
41
41
|
id;
|
|
@@ -50,8 +50,8 @@ class ys {
|
|
|
50
50
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
const
|
|
54
|
-
class
|
|
53
|
+
const ys = 100;
|
|
54
|
+
class ks {
|
|
55
55
|
viewport = void 0;
|
|
56
56
|
state = "idle";
|
|
57
57
|
provider;
|
|
@@ -62,7 +62,7 @@ class bs {
|
|
|
62
62
|
onIdle;
|
|
63
63
|
onClick;
|
|
64
64
|
constructor(e, n, r, s, i, a) {
|
|
65
|
-
this.provider = e, this.interval = new
|
|
65
|
+
this.provider = e, this.interval = new ws(this.onInterval.bind(this), ys / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = s, this.onIdle = i, this.onClick = a;
|
|
66
66
|
}
|
|
67
67
|
start() {
|
|
68
68
|
this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
|
|
@@ -86,7 +86,7 @@ class bs {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
|
-
class
|
|
89
|
+
class Gn {
|
|
90
90
|
worker;
|
|
91
91
|
workerInvocations;
|
|
92
92
|
workerInvocationCounter = 0;
|
|
@@ -125,11 +125,11 @@ class je {
|
|
|
125
125
|
return new je([], []);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
const
|
|
128
|
+
const Kn = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Sn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Kn], { type: "text/javascript;charset=utf-8" });
|
|
129
129
|
function _s(t) {
|
|
130
130
|
let e;
|
|
131
131
|
try {
|
|
132
|
-
if (e =
|
|
132
|
+
if (e = Sn && (self.URL || self.webkitURL).createObjectURL(Sn), !e) throw "";
|
|
133
133
|
const n = new Worker(e, {
|
|
134
134
|
name: t?.name
|
|
135
135
|
});
|
|
@@ -138,7 +138,7 @@ function _s(t) {
|
|
|
138
138
|
}), n;
|
|
139
139
|
} catch {
|
|
140
140
|
return new Worker(
|
|
141
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
141
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Kn),
|
|
142
142
|
{
|
|
143
143
|
name: t?.name
|
|
144
144
|
}
|
|
@@ -146,21 +146,21 @@ function _s(t) {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
function st(t, e, n) {
|
|
149
|
-
return { x:
|
|
149
|
+
return { x: bs(e) * n, y: Ms(t) * n };
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
return { lat:
|
|
151
|
+
function Pn(t, e, n) {
|
|
152
|
+
return { lat: xs(e / n), lng: Es(t / n) };
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function bs(t) {
|
|
155
155
|
return (180 + t) / 360;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function Ms(t) {
|
|
158
158
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 360))) / 360;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Es(t) {
|
|
161
161
|
return t * 360 - 180;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function xs(t) {
|
|
164
164
|
return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
|
|
165
165
|
}
|
|
166
166
|
class vt {
|
|
@@ -203,9 +203,9 @@ class ot {
|
|
|
203
203
|
*/
|
|
204
204
|
static offset(e, n, r) {
|
|
205
205
|
const s = this.bounds(e), i = e.zoom, a = n * Math.pow(2, i), o = st(s.sw.lat, s.sw.lng, a), l = st(s.ne.lat, s.ne.lng, a);
|
|
206
|
-
let u = Math.max(o.x - r.left, 0), c = Math.min(o.y + r.bottom, a),
|
|
207
|
-
const m =
|
|
208
|
-
return new ot(m.lat, m.lng,
|
|
206
|
+
let u = Math.max(o.x - r.left, 0), c = Math.min(o.y + r.bottom, a), h = Math.min(l.x + r.right, a), f = Math.max(l.y - r.top, 0);
|
|
207
|
+
const m = Pn(u, c, a), p = Pn(h, f, a);
|
|
208
|
+
return new ot(m.lat, m.lng, p.lat, p.lng);
|
|
209
209
|
}
|
|
210
210
|
contains(e, n) {
|
|
211
211
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -214,8 +214,8 @@ class ot {
|
|
|
214
214
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
|
-
const
|
|
218
|
-
class
|
|
217
|
+
const Ss = 75, Ps = 150, In = 25e-5, Is = 1e6, Ts = 2e6, Tn = 3e6, Qn = 10, Ut = 16, er = 2, Fe = 0.5, Yt = "white", As = "darkgreen", tr = "0px 2px 2px rgba(0, 0, 0, 0.5)", An = 1024;
|
|
218
|
+
class Ns {
|
|
219
219
|
// Services
|
|
220
220
|
provider;
|
|
221
221
|
// State
|
|
@@ -223,12 +223,12 @@ class Cs {
|
|
|
223
223
|
markersVisible;
|
|
224
224
|
markerVisibilityTreeWorker;
|
|
225
225
|
markerVisibilityTreeWorkerClient;
|
|
226
|
-
markerVisibilityTreeLimit =
|
|
226
|
+
markerVisibilityTreeLimit = An;
|
|
227
227
|
constructor(e) {
|
|
228
228
|
this.provider = e;
|
|
229
229
|
}
|
|
230
230
|
set configuration(e) {
|
|
231
|
-
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ??
|
|
231
|
+
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? An;
|
|
232
232
|
}
|
|
233
233
|
getMarkers() {
|
|
234
234
|
return Array.from(this.markersVisible ?? []);
|
|
@@ -244,7 +244,7 @@ class Cs {
|
|
|
244
244
|
return je.empty();
|
|
245
245
|
}
|
|
246
246
|
async updateMarkers(e, n) {
|
|
247
|
-
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new _s(), this.markerVisibilityTreeWorkerClient = new
|
|
247
|
+
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new _s(), this.markerVisibilityTreeWorkerClient = new Gn(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
248
248
|
"update",
|
|
249
249
|
e,
|
|
250
250
|
n.map((r, s) => ({ index: s, lat: r.data.lat, lng: r.data.lng })),
|
|
@@ -255,56 +255,56 @@ class Cs {
|
|
|
255
255
|
this.markers = void 0, this.markersVisible = void 0, this.markerVisibilityTreeWorker = void 0, this.markerVisibilityTreeWorkerClient = void 0;
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
const
|
|
259
|
-
var
|
|
260
|
-
const
|
|
258
|
+
const Xt = !1;
|
|
259
|
+
var Cs = Array.isArray, Rs = Array.prototype.indexOf, He = Array.prototype.includes, Ds = Array.from, Os = Object.defineProperty, it = Object.getOwnPropertyDescriptor, zs = Object.prototype, $s = Array.prototype, Ls = Object.getPrototypeOf, Nn = Object.isExtensible;
|
|
260
|
+
const Fs = () => {
|
|
261
261
|
};
|
|
262
|
-
function
|
|
262
|
+
function Vs(t) {
|
|
263
263
|
for (var e = 0; e < t.length; e++)
|
|
264
264
|
t[e]();
|
|
265
265
|
}
|
|
266
|
-
function
|
|
266
|
+
function nr() {
|
|
267
267
|
var t, e, n = new Promise((r, s) => {
|
|
268
268
|
t = r, e = s;
|
|
269
269
|
});
|
|
270
270
|
return { promise: n, resolve: t, reject: e };
|
|
271
271
|
}
|
|
272
|
-
const
|
|
272
|
+
const z = 2, lt = 4, Pt = 8, rr = 1 << 24, ge = 16, Se = 32, $e = 64, sr = 128, G = 512, O = 1024, F = 2048, se = 4096, _e = 8192, be = 16384, It = 32768, Et = 65536, Cn = 1 << 17, ir = 1 << 18, Ge = 1 << 19, js = 1 << 20, ze = 65536, Jt = 1 << 21, nn = 1 << 22, Me = 1 << 23, _t = /* @__PURE__ */ Symbol("$state"), Ae = new class extends Error {
|
|
273
273
|
name = "StaleReactionError";
|
|
274
274
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
275
275
|
}();
|
|
276
|
-
function
|
|
276
|
+
function Bs() {
|
|
277
277
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Us() {
|
|
280
280
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Ws() {
|
|
283
283
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function Hs() {
|
|
286
286
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function qs() {
|
|
289
289
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function Zs() {
|
|
292
292
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
293
293
|
}
|
|
294
|
-
const
|
|
295
|
-
function
|
|
294
|
+
const C = /* @__PURE__ */ Symbol(), Ys = "http://www.w3.org/1999/xhtml";
|
|
295
|
+
function Xs() {
|
|
296
296
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function ar(t) {
|
|
299
299
|
return t === this.v;
|
|
300
300
|
}
|
|
301
|
-
let
|
|
301
|
+
let Js = !1, ie = null;
|
|
302
302
|
function qe(t) {
|
|
303
|
-
|
|
303
|
+
ie = t;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
306
|
-
|
|
307
|
-
p:
|
|
305
|
+
function rn(t, e = !1, n) {
|
|
306
|
+
ie = {
|
|
307
|
+
p: ie,
|
|
308
308
|
i: !1,
|
|
309
309
|
c: null,
|
|
310
310
|
e: null,
|
|
@@ -313,48 +313,48 @@ function an(t, e = !1, n) {
|
|
|
313
313
|
l: null
|
|
314
314
|
};
|
|
315
315
|
}
|
|
316
|
-
function
|
|
316
|
+
function sn(t) {
|
|
317
317
|
var e = (
|
|
318
318
|
/** @type {ComponentContext} */
|
|
319
|
-
|
|
319
|
+
ie
|
|
320
320
|
), n = e.e;
|
|
321
321
|
if (n !== null) {
|
|
322
322
|
e.e = null;
|
|
323
323
|
for (var r of n)
|
|
324
|
-
|
|
324
|
+
wi(r);
|
|
325
325
|
}
|
|
326
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
326
|
+
return t !== void 0 && (e.x = t), e.i = !0, ie = e.p, t ?? /** @type {T} */
|
|
327
327
|
{};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function or() {
|
|
330
330
|
return !0;
|
|
331
331
|
}
|
|
332
332
|
let Ve = [];
|
|
333
|
-
function
|
|
333
|
+
function Gs() {
|
|
334
334
|
var t = Ve;
|
|
335
|
-
Ve = [],
|
|
335
|
+
Ve = [], Vs(t);
|
|
336
336
|
}
|
|
337
|
-
function
|
|
337
|
+
function Ce(t) {
|
|
338
338
|
if (Ve.length === 0) {
|
|
339
339
|
var e = Ve;
|
|
340
340
|
queueMicrotask(() => {
|
|
341
|
-
e === Ve &&
|
|
341
|
+
e === Ve && Gs();
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
Ve.push(t);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function lr(t) {
|
|
347
347
|
var e = _;
|
|
348
348
|
if (e === null)
|
|
349
349
|
return y.f |= Me, t;
|
|
350
|
-
if ((e.f &
|
|
350
|
+
if ((e.f & It) === 0 && (e.f & lt) === 0)
|
|
351
351
|
throw t;
|
|
352
352
|
Ze(t, e);
|
|
353
353
|
}
|
|
354
354
|
function Ze(t, e) {
|
|
355
355
|
for (; e !== null; ) {
|
|
356
|
-
if ((e.f &
|
|
357
|
-
if ((e.f &
|
|
356
|
+
if ((e.f & sr) !== 0) {
|
|
357
|
+
if ((e.f & It) === 0)
|
|
358
358
|
throw t;
|
|
359
359
|
try {
|
|
360
360
|
e.b.error(t);
|
|
@@ -367,26 +367,26 @@ function Ze(t, e) {
|
|
|
367
367
|
}
|
|
368
368
|
throw t;
|
|
369
369
|
}
|
|
370
|
-
const
|
|
370
|
+
const Ks = -7169;
|
|
371
371
|
function P(t, e) {
|
|
372
|
-
t.f = t.f &
|
|
372
|
+
t.f = t.f & Ks | e;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
(t.f &
|
|
374
|
+
function an(t) {
|
|
375
|
+
(t.f & G) !== 0 || t.deps === null ? P(t, O) : P(t, se);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function ur(t) {
|
|
378
378
|
if (t !== null)
|
|
379
379
|
for (const e of t)
|
|
380
|
-
(e.f &
|
|
380
|
+
(e.f & z) === 0 || (e.f & ze) === 0 || (e.f ^= ze, ur(
|
|
381
381
|
/** @type {Derived} */
|
|
382
382
|
e.deps
|
|
383
383
|
));
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
(t.f & F) !== 0 ? e.add(t) : (t.f &
|
|
385
|
+
function cr(t, e, n) {
|
|
386
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & se) !== 0 && n.add(t), ur(t.deps), P(t, O);
|
|
387
387
|
}
|
|
388
388
|
const gt = /* @__PURE__ */ new Set();
|
|
389
|
-
let S = null,
|
|
389
|
+
let S = null, te = null, J = [], on = null, Gt = !1;
|
|
390
390
|
class Ee {
|
|
391
391
|
committed = !1;
|
|
392
392
|
/**
|
|
@@ -425,12 +425,12 @@ class Ee {
|
|
|
425
425
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
426
426
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
427
427
|
*/
|
|
428
|
-
#
|
|
428
|
+
#i = null;
|
|
429
429
|
/**
|
|
430
430
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
431
431
|
* @type {Set<Effect>}
|
|
432
432
|
*/
|
|
433
|
-
#
|
|
433
|
+
#s = /* @__PURE__ */ new Set();
|
|
434
434
|
/**
|
|
435
435
|
* Deferred effects that are MAYBE_DIRTY
|
|
436
436
|
* @type {Set<Effect>}
|
|
@@ -466,9 +466,9 @@ class Ee {
|
|
|
466
466
|
if (n) {
|
|
467
467
|
this.#t.delete(e);
|
|
468
468
|
for (var r of n.d)
|
|
469
|
-
P(r, F),
|
|
469
|
+
P(r, F), oe(r);
|
|
470
470
|
for (r of n.m)
|
|
471
|
-
P(r,
|
|
471
|
+
P(r, se), oe(r);
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
474
|
/**
|
|
@@ -476,19 +476,19 @@ class Ee {
|
|
|
476
476
|
* @param {Effect[]} root_effects
|
|
477
477
|
*/
|
|
478
478
|
process(e) {
|
|
479
|
-
|
|
479
|
+
J = [], this.apply();
|
|
480
480
|
var n = [], r = [];
|
|
481
481
|
for (const s of e)
|
|
482
|
-
this.#
|
|
482
|
+
this.#l(s, n, r);
|
|
483
483
|
if (this.is_deferred()) {
|
|
484
|
-
this.#
|
|
484
|
+
this.#u(r), this.#u(n);
|
|
485
485
|
for (const [s, i] of this.#t)
|
|
486
|
-
|
|
486
|
+
pr(s, i);
|
|
487
487
|
} else {
|
|
488
488
|
for (const s of this.#n) s();
|
|
489
|
-
this.#n.clear(), this.#r === 0 && this.#
|
|
489
|
+
this.#n.clear(), this.#r === 0 && this.#c(), S = null, Rn(r), Rn(n), this.#i?.resolve();
|
|
490
490
|
}
|
|
491
|
-
|
|
491
|
+
te = null;
|
|
492
492
|
}
|
|
493
493
|
/**
|
|
494
494
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -497,35 +497,29 @@ class Ee {
|
|
|
497
497
|
* @param {Effect[]} effects
|
|
498
498
|
* @param {Effect[]} render_effects
|
|
499
499
|
*/
|
|
500
|
-
#
|
|
501
|
-
e.f ^=
|
|
500
|
+
#l(e, n, r) {
|
|
501
|
+
e.f ^= O;
|
|
502
502
|
for (var s = e.first, i = null; s !== null; ) {
|
|
503
|
-
var a = s.f, o = (a & (Se |
|
|
503
|
+
var a = s.f, o = (a & (Se | $e)) !== 0, l = o && (a & O) !== 0, u = l || (a & _e) !== 0 || this.#t.has(s);
|
|
504
504
|
if (!u && s.fn !== null) {
|
|
505
|
-
o ? s.f ^=
|
|
505
|
+
o ? s.f ^= O : i !== null && (a & (lt | Pt | rr)) !== 0 ? i.b.defer_effect(s) : (a & lt) !== 0 ? n.push(s) : ht(s) && ((a & ge) !== 0 && this.#e.add(s), Xe(s));
|
|
506
506
|
var c = s.first;
|
|
507
507
|
if (c !== null) {
|
|
508
508
|
s = c;
|
|
509
509
|
continue;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
if (d !== null) {
|
|
516
|
-
s = d;
|
|
517
|
-
break;
|
|
518
|
-
}
|
|
519
|
-
s = s.parent;
|
|
520
|
-
}
|
|
512
|
+
var h = s.parent;
|
|
513
|
+
for (s = s.next; s === null && h !== null; )
|
|
514
|
+
h === i && (i = null), s = h.next, h = h.parent;
|
|
521
515
|
}
|
|
522
516
|
}
|
|
523
517
|
/**
|
|
524
518
|
* @param {Effect[]} effects
|
|
525
519
|
*/
|
|
526
|
-
#
|
|
520
|
+
#u(e) {
|
|
527
521
|
for (var n = 0; n < e.length; n += 1)
|
|
528
|
-
|
|
522
|
+
cr(e[n], this.#s, this.#e);
|
|
529
523
|
}
|
|
530
524
|
/**
|
|
531
525
|
* Associate a change to a given source with the current
|
|
@@ -534,17 +528,17 @@ class Ee {
|
|
|
534
528
|
* @param {any} value
|
|
535
529
|
*/
|
|
536
530
|
capture(e, n) {
|
|
537
|
-
n !==
|
|
531
|
+
n !== C && !this.previous.has(e) && this.previous.set(e, n), (e.f & Me) === 0 && (this.current.set(e, e.v), te?.set(e, e.v));
|
|
538
532
|
}
|
|
539
533
|
activate() {
|
|
540
534
|
S = this, this.apply();
|
|
541
535
|
}
|
|
542
536
|
deactivate() {
|
|
543
|
-
S === this && (S = null,
|
|
537
|
+
S === this && (S = null, te = null);
|
|
544
538
|
}
|
|
545
539
|
flush() {
|
|
546
|
-
if (this.activate(),
|
|
547
|
-
if (
|
|
540
|
+
if (this.activate(), J.length > 0) {
|
|
541
|
+
if (Qs(), S !== null && S !== this)
|
|
548
542
|
return;
|
|
549
543
|
} else this.#r === 0 && this.process([]);
|
|
550
544
|
this.deactivate();
|
|
@@ -553,10 +547,10 @@ class Ee {
|
|
|
553
547
|
for (const e of this.#h) e(this);
|
|
554
548
|
this.#h.clear();
|
|
555
549
|
}
|
|
556
|
-
#
|
|
550
|
+
#c() {
|
|
557
551
|
if (gt.size > 1) {
|
|
558
552
|
this.previous.clear();
|
|
559
|
-
var e =
|
|
553
|
+
var e = te, n = !0;
|
|
560
554
|
for (const s of gt) {
|
|
561
555
|
if (s === this) {
|
|
562
556
|
n = !1;
|
|
@@ -575,21 +569,21 @@ class Ee {
|
|
|
575
569
|
continue;
|
|
576
570
|
const a = [...s.current.keys()].filter((o) => !this.current.has(o));
|
|
577
571
|
if (a.length > 0) {
|
|
578
|
-
var r =
|
|
579
|
-
|
|
572
|
+
var r = J;
|
|
573
|
+
J = [];
|
|
580
574
|
const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
581
575
|
for (const u of i)
|
|
582
|
-
|
|
583
|
-
if (
|
|
576
|
+
fr(u, a, o, l);
|
|
577
|
+
if (J.length > 0) {
|
|
584
578
|
S = s, s.apply();
|
|
585
|
-
for (const u of
|
|
586
|
-
s.#
|
|
579
|
+
for (const u of J)
|
|
580
|
+
s.#l(u, [], []);
|
|
587
581
|
s.deactivate();
|
|
588
582
|
}
|
|
589
|
-
|
|
583
|
+
J = r;
|
|
590
584
|
}
|
|
591
585
|
}
|
|
592
|
-
S = null,
|
|
586
|
+
S = null, te = e;
|
|
593
587
|
}
|
|
594
588
|
this.committed = !0, gt.delete(this);
|
|
595
589
|
}
|
|
@@ -605,15 +599,15 @@ class Ee {
|
|
|
605
599
|
* @param {boolean} blocking
|
|
606
600
|
*/
|
|
607
601
|
decrement(e) {
|
|
608
|
-
this.#r -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0,
|
|
609
|
-
this.#a = !1, this.is_deferred() ?
|
|
602
|
+
this.#r -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0, Ce(() => {
|
|
603
|
+
this.#a = !1, this.is_deferred() ? J.length > 0 && this.flush() : this.revive();
|
|
610
604
|
}));
|
|
611
605
|
}
|
|
612
606
|
revive() {
|
|
613
|
-
for (const e of this.#
|
|
614
|
-
this.#e.delete(e), P(e, F),
|
|
607
|
+
for (const e of this.#s)
|
|
608
|
+
this.#e.delete(e), P(e, F), oe(e);
|
|
615
609
|
for (const e of this.#e)
|
|
616
|
-
P(e,
|
|
610
|
+
P(e, se), oe(e);
|
|
617
611
|
this.flush();
|
|
618
612
|
}
|
|
619
613
|
/** @param {() => void} fn */
|
|
@@ -625,12 +619,12 @@ class Ee {
|
|
|
625
619
|
this.#h.add(e);
|
|
626
620
|
}
|
|
627
621
|
settled() {
|
|
628
|
-
return (this.#
|
|
622
|
+
return (this.#i ??= nr()).promise;
|
|
629
623
|
}
|
|
630
624
|
static ensure() {
|
|
631
625
|
if (S === null) {
|
|
632
626
|
const e = S = new Ee();
|
|
633
|
-
gt.add(S),
|
|
627
|
+
gt.add(S), Ce(() => {
|
|
634
628
|
S === e && e.flush();
|
|
635
629
|
});
|
|
636
630
|
}
|
|
@@ -639,46 +633,46 @@ class Ee {
|
|
|
639
633
|
apply() {
|
|
640
634
|
}
|
|
641
635
|
}
|
|
642
|
-
function
|
|
643
|
-
|
|
636
|
+
function Qs() {
|
|
637
|
+
Gt = !0;
|
|
644
638
|
var t = null;
|
|
645
639
|
try {
|
|
646
|
-
for (var e = 0;
|
|
640
|
+
for (var e = 0; J.length > 0; ) {
|
|
647
641
|
var n = Ee.ensure();
|
|
648
642
|
if (e++ > 1e3) {
|
|
649
643
|
var r, s;
|
|
650
|
-
|
|
644
|
+
ei();
|
|
651
645
|
}
|
|
652
|
-
n.process(
|
|
646
|
+
n.process(J), xe.clear();
|
|
653
647
|
}
|
|
654
648
|
} finally {
|
|
655
|
-
|
|
649
|
+
J = [], Gt = !1, on = null;
|
|
656
650
|
}
|
|
657
651
|
}
|
|
658
|
-
function
|
|
652
|
+
function ei() {
|
|
659
653
|
try {
|
|
660
|
-
|
|
654
|
+
Us();
|
|
661
655
|
} catch (t) {
|
|
662
|
-
Ze(t,
|
|
656
|
+
Ze(t, on);
|
|
663
657
|
}
|
|
664
658
|
}
|
|
665
659
|
let ve = null;
|
|
666
|
-
function
|
|
660
|
+
function Rn(t) {
|
|
667
661
|
var e = t.length;
|
|
668
662
|
if (e !== 0) {
|
|
669
663
|
for (var n = 0; n < e; ) {
|
|
670
664
|
var r = t[n++];
|
|
671
|
-
if ((r.f & (
|
|
665
|
+
if ((r.f & (be | _e)) === 0 && ht(r) && (ve = /* @__PURE__ */ new Set(), Xe(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Pr(r), ve?.size > 0)) {
|
|
672
666
|
xe.clear();
|
|
673
667
|
for (const s of ve) {
|
|
674
|
-
if ((s.f & (
|
|
668
|
+
if ((s.f & (be | _e)) !== 0) continue;
|
|
675
669
|
const i = [s];
|
|
676
670
|
let a = s.parent;
|
|
677
671
|
for (; a !== null; )
|
|
678
672
|
ve.has(a) && (ve.delete(a), i.push(a)), a = a.parent;
|
|
679
673
|
for (let o = i.length - 1; o >= 0; o--) {
|
|
680
674
|
const l = i[o];
|
|
681
|
-
(l.f & (
|
|
675
|
+
(l.f & (be | _e)) === 0 && Xe(l);
|
|
682
676
|
}
|
|
683
677
|
}
|
|
684
678
|
ve.clear();
|
|
@@ -687,30 +681,30 @@ function On(t) {
|
|
|
687
681
|
ve = null;
|
|
688
682
|
}
|
|
689
683
|
}
|
|
690
|
-
function
|
|
684
|
+
function fr(t, e, n, r) {
|
|
691
685
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
692
686
|
for (const s of t.reactions) {
|
|
693
687
|
const i = s.f;
|
|
694
|
-
(i &
|
|
688
|
+
(i & z) !== 0 ? fr(
|
|
695
689
|
/** @type {Derived} */
|
|
696
690
|
s,
|
|
697
691
|
e,
|
|
698
692
|
n,
|
|
699
693
|
r
|
|
700
|
-
) : (i & (
|
|
694
|
+
) : (i & (nn | ge)) !== 0 && (i & F) === 0 && hr(s, e, r) && (P(s, F), oe(
|
|
701
695
|
/** @type {Effect} */
|
|
702
696
|
s
|
|
703
697
|
));
|
|
704
698
|
}
|
|
705
699
|
}
|
|
706
|
-
function
|
|
700
|
+
function hr(t, e, n) {
|
|
707
701
|
const r = n.get(t);
|
|
708
702
|
if (r !== void 0) return r;
|
|
709
703
|
if (t.deps !== null)
|
|
710
704
|
for (const s of t.deps) {
|
|
711
705
|
if (He.call(e, s))
|
|
712
706
|
return !0;
|
|
713
|
-
if ((s.f &
|
|
707
|
+
if ((s.f & z) !== 0 && hr(
|
|
714
708
|
/** @type {Derived} */
|
|
715
709
|
s,
|
|
716
710
|
e,
|
|
@@ -724,41 +718,41 @@ function pr(t, e, n) {
|
|
|
724
718
|
}
|
|
725
719
|
return n.set(t, !1), !1;
|
|
726
720
|
}
|
|
727
|
-
function
|
|
728
|
-
for (var e =
|
|
721
|
+
function oe(t) {
|
|
722
|
+
for (var e = on = t; e.parent !== null; ) {
|
|
729
723
|
e = e.parent;
|
|
730
724
|
var n = e.f;
|
|
731
|
-
if (
|
|
725
|
+
if (Gt && e === _ && (n & ge) !== 0 && (n & ir) === 0)
|
|
732
726
|
return;
|
|
733
|
-
if ((n & (
|
|
734
|
-
if ((n &
|
|
735
|
-
e.f ^=
|
|
727
|
+
if ((n & ($e | Se)) !== 0) {
|
|
728
|
+
if ((n & O) === 0) return;
|
|
729
|
+
e.f ^= O;
|
|
736
730
|
}
|
|
737
731
|
}
|
|
738
|
-
|
|
732
|
+
J.push(e);
|
|
739
733
|
}
|
|
740
|
-
function
|
|
741
|
-
if (!((t.f & Se) !== 0 && (t.f &
|
|
742
|
-
(t.f & F) !== 0 ? e.d.push(t) : (t.f &
|
|
734
|
+
function pr(t, e) {
|
|
735
|
+
if (!((t.f & Se) !== 0 && (t.f & O) !== 0)) {
|
|
736
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & se) !== 0 && e.m.push(t), P(t, O);
|
|
743
737
|
for (var n = t.first; n !== null; )
|
|
744
|
-
|
|
738
|
+
pr(n, e), n = n.next;
|
|
745
739
|
}
|
|
746
740
|
}
|
|
747
|
-
function
|
|
748
|
-
let e = 0, n =
|
|
741
|
+
function ti(t) {
|
|
742
|
+
let e = 0, n = Tt(0), r;
|
|
749
743
|
return () => {
|
|
750
|
-
|
|
751
|
-
|
|
744
|
+
cn() && (E(n), Er(() => (e === 0 && (r = Or(() => t(() => at(n)))), e += 1, () => {
|
|
745
|
+
Ce(() => {
|
|
752
746
|
e -= 1, e === 0 && (r?.(), r = void 0, at(n));
|
|
753
747
|
});
|
|
754
748
|
})));
|
|
755
749
|
};
|
|
756
750
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
759
|
-
new
|
|
751
|
+
var ni = Et | Ge | sr;
|
|
752
|
+
function ri(t, e, n) {
|
|
753
|
+
new si(t, e, n);
|
|
760
754
|
}
|
|
761
|
-
class
|
|
755
|
+
class si {
|
|
762
756
|
/** @type {Boundary | null} */
|
|
763
757
|
parent;
|
|
764
758
|
is_pending = !1;
|
|
@@ -771,22 +765,25 @@ class ii {
|
|
|
771
765
|
/** @type {((anchor: Node) => void)} */
|
|
772
766
|
#o;
|
|
773
767
|
/** @type {Effect} */
|
|
774
|
-
#
|
|
768
|
+
#i;
|
|
775
769
|
/** @type {Effect | null} */
|
|
776
|
-
#
|
|
770
|
+
#s = null;
|
|
777
771
|
/** @type {Effect | null} */
|
|
778
772
|
#e = null;
|
|
779
773
|
/** @type {Effect | null} */
|
|
780
774
|
#t = null;
|
|
781
775
|
/** @type {DocumentFragment | null} */
|
|
782
776
|
#a = null;
|
|
777
|
+
/** @type {TemplateNode | null} */
|
|
778
|
+
#l = null;
|
|
783
779
|
#u = 0;
|
|
784
|
-
#
|
|
785
|
-
#
|
|
780
|
+
#c = 0;
|
|
781
|
+
#d = !1;
|
|
782
|
+
#p = !1;
|
|
786
783
|
/** @type {Set<Effect>} */
|
|
787
|
-
#
|
|
784
|
+
#m = /* @__PURE__ */ new Set();
|
|
788
785
|
/** @type {Set<Effect>} */
|
|
789
|
-
#
|
|
786
|
+
#v = /* @__PURE__ */ new Set();
|
|
790
787
|
/**
|
|
791
788
|
* A source containing the number of pending async deriveds/expressions.
|
|
792
789
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -794,9 +791,9 @@ class ii {
|
|
|
794
791
|
* calls followed by no-op flushes
|
|
795
792
|
* @type {Source<number> | null}
|
|
796
793
|
*/
|
|
797
|
-
#
|
|
798
|
-
#
|
|
799
|
-
this.#
|
|
794
|
+
#f = null;
|
|
795
|
+
#_ = ti(() => (this.#f = Tt(this.#u), () => {
|
|
796
|
+
this.#f = null;
|
|
800
797
|
}));
|
|
801
798
|
/**
|
|
802
799
|
* @param {TemplateNode} node
|
|
@@ -804,29 +801,35 @@ class ii {
|
|
|
804
801
|
* @param {((anchor: Node) => void)} children
|
|
805
802
|
*/
|
|
806
803
|
constructor(e, n, r) {
|
|
807
|
-
this.#n = e, this.#r = n, this.#o =
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
804
|
+
this.#n = e, this.#r = n, this.#o = r, this.parent = /** @type {Effect} */
|
|
805
|
+
_.b, this.is_pending = !!this.#r.pending, this.#i = bi(() => {
|
|
806
|
+
_.b = this;
|
|
807
|
+
{
|
|
808
|
+
var s = this.#y();
|
|
809
|
+
try {
|
|
810
|
+
this.#s = Te(() => r(s));
|
|
811
|
+
} catch (i) {
|
|
812
|
+
this.error(i);
|
|
813
|
+
}
|
|
814
|
+
this.#c > 0 ? this.#w() : this.is_pending = !1;
|
|
815
|
+
}
|
|
816
|
+
return () => {
|
|
817
|
+
this.#l?.remove();
|
|
818
|
+
};
|
|
819
|
+
}, ni);
|
|
817
820
|
}
|
|
818
|
-
#
|
|
821
|
+
#b() {
|
|
819
822
|
try {
|
|
820
|
-
this.#
|
|
823
|
+
this.#s = Te(() => this.#o(this.#n));
|
|
821
824
|
} catch (e) {
|
|
822
825
|
this.error(e);
|
|
823
826
|
}
|
|
824
827
|
}
|
|
825
|
-
#
|
|
828
|
+
#M() {
|
|
826
829
|
const e = this.#r.pending;
|
|
827
|
-
e && (this
|
|
828
|
-
var n = this.#
|
|
829
|
-
|
|
830
|
+
e && (this.#e = Te(() => e(this.#n)), Ce(() => {
|
|
831
|
+
var n = this.#y();
|
|
832
|
+
this.#s = this.#g(() => (Ee.ensure(), Te(() => this.#o(n)))), this.#c > 0 ? this.#w() : (bt(
|
|
830
833
|
/** @type {Effect} */
|
|
831
834
|
this.#e,
|
|
832
835
|
() => {
|
|
@@ -835,30 +838,16 @@ class ii {
|
|
|
835
838
|
), this.is_pending = !1);
|
|
836
839
|
}));
|
|
837
840
|
}
|
|
838
|
-
#
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
this.#o(this.#n);
|
|
842
|
-
}), this.#l > 0) {
|
|
843
|
-
var e = this.#a = document.createDocumentFragment();
|
|
844
|
-
Si(this.#i, e);
|
|
845
|
-
const n = (
|
|
846
|
-
/** @type {(anchor: Node) => void} */
|
|
847
|
-
this.#r.pending
|
|
848
|
-
);
|
|
849
|
-
this.#e = Fe(() => n(this.#n));
|
|
850
|
-
} else
|
|
851
|
-
this.is_pending = !1;
|
|
852
|
-
} catch (n) {
|
|
853
|
-
this.error(n);
|
|
854
|
-
}
|
|
841
|
+
#y() {
|
|
842
|
+
var e = this.#n;
|
|
843
|
+
return this.is_pending && (this.#l = _r(), this.#n.before(this.#l), e = this.#l), e;
|
|
855
844
|
}
|
|
856
845
|
/**
|
|
857
846
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
858
847
|
* @param {Effect} effect
|
|
859
848
|
*/
|
|
860
849
|
defer_effect(e) {
|
|
861
|
-
|
|
850
|
+
cr(e, this.#m, this.#v);
|
|
862
851
|
}
|
|
863
852
|
/**
|
|
864
853
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -871,37 +860,46 @@ class ii {
|
|
|
871
860
|
return !!this.#r.pending;
|
|
872
861
|
}
|
|
873
862
|
/**
|
|
874
|
-
* @
|
|
875
|
-
* @param {() => T} fn
|
|
863
|
+
* @param {() => Effect | null} fn
|
|
876
864
|
*/
|
|
877
|
-
#
|
|
878
|
-
var n = _, r = y, s =
|
|
879
|
-
|
|
865
|
+
#g(e) {
|
|
866
|
+
var n = _, r = y, s = ie;
|
|
867
|
+
ce(this.#i), Q(this.#i), qe(this.#i.ctx);
|
|
880
868
|
try {
|
|
881
869
|
return e();
|
|
882
870
|
} catch (i) {
|
|
883
|
-
return
|
|
871
|
+
return lr(i), null;
|
|
884
872
|
} finally {
|
|
885
|
-
|
|
873
|
+
ce(n), Q(r), qe(s);
|
|
886
874
|
}
|
|
887
875
|
}
|
|
876
|
+
#w() {
|
|
877
|
+
const e = (
|
|
878
|
+
/** @type {(anchor: Node) => void} */
|
|
879
|
+
this.#r.pending
|
|
880
|
+
);
|
|
881
|
+
this.#s !== null && (this.#a = document.createDocumentFragment(), this.#a.append(
|
|
882
|
+
/** @type {TemplateNode} */
|
|
883
|
+
this.#l
|
|
884
|
+
), xi(this.#s, this.#a)), this.#e === null && (this.#e = Te(() => e(this.#n)));
|
|
885
|
+
}
|
|
888
886
|
/**
|
|
889
887
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
890
888
|
* if any, such that we can replace the snippet with content once work is done
|
|
891
889
|
* @param {1 | -1} d
|
|
892
890
|
*/
|
|
893
|
-
#
|
|
891
|
+
#k(e) {
|
|
894
892
|
if (!this.has_pending_snippet()) {
|
|
895
|
-
this.parent && this.parent.#
|
|
893
|
+
this.parent && this.parent.#k(e);
|
|
896
894
|
return;
|
|
897
895
|
}
|
|
898
|
-
if (this.#
|
|
896
|
+
if (this.#c += e, this.#c === 0) {
|
|
899
897
|
this.is_pending = !1;
|
|
900
|
-
for (const n of this.#
|
|
901
|
-
P(n, F),
|
|
902
|
-
for (const n of this.#
|
|
903
|
-
P(n,
|
|
904
|
-
this.#
|
|
898
|
+
for (const n of this.#m)
|
|
899
|
+
P(n, F), oe(n);
|
|
900
|
+
for (const n of this.#v)
|
|
901
|
+
P(n, se), oe(n);
|
|
902
|
+
this.#m.clear(), this.#v.clear(), this.#e && bt(this.#e, () => {
|
|
905
903
|
this.#e = null;
|
|
906
904
|
}), this.#a && (this.#n.before(this.#a), this.#a = null);
|
|
907
905
|
}
|
|
@@ -913,50 +911,44 @@ class ii {
|
|
|
913
911
|
* @param {1 | -1} d
|
|
914
912
|
*/
|
|
915
913
|
update_pending_count(e) {
|
|
916
|
-
this.#
|
|
917
|
-
this.#
|
|
914
|
+
this.#k(e), this.#u += e, !(!this.#f || this.#d) && (this.#d = !0, Ce(() => {
|
|
915
|
+
this.#d = !1, this.#f && xt(this.#f, this.#u);
|
|
918
916
|
}));
|
|
919
917
|
}
|
|
920
918
|
get_effect_pending() {
|
|
921
|
-
return this.#
|
|
919
|
+
return this.#_(), E(
|
|
922
920
|
/** @type {Source<number>} */
|
|
923
|
-
this.#
|
|
921
|
+
this.#f
|
|
924
922
|
);
|
|
925
923
|
}
|
|
926
924
|
/** @param {unknown} error */
|
|
927
925
|
error(e) {
|
|
928
926
|
var n = this.#r.onerror;
|
|
929
927
|
let r = this.#r.failed;
|
|
930
|
-
if (!n && !r)
|
|
928
|
+
if (this.#p || !n && !r)
|
|
931
929
|
throw e;
|
|
932
|
-
this.#
|
|
930
|
+
this.#s && (le(this.#s), this.#s = null), this.#e && (le(this.#e), this.#e = null), this.#t && (le(this.#t), this.#t = null);
|
|
933
931
|
var s = !1, i = !1;
|
|
934
932
|
const a = () => {
|
|
935
933
|
if (s) {
|
|
936
|
-
|
|
934
|
+
Xs();
|
|
937
935
|
return;
|
|
938
936
|
}
|
|
939
|
-
s = !0, i &&
|
|
937
|
+
s = !0, i && Zs(), Ee.ensure(), this.#u = 0, this.#t !== null && bt(this.#t, () => {
|
|
940
938
|
this.#t = null;
|
|
941
|
-
}), this.#
|
|
942
|
-
Ee.ensure(), this.#v();
|
|
943
|
-
});
|
|
939
|
+
}), this.is_pending = this.has_pending_snippet(), this.#s = this.#g(() => (this.#p = !1, Te(() => this.#o(this.#n)))), this.#c > 0 ? this.#w() : this.is_pending = !1;
|
|
944
940
|
};
|
|
945
|
-
|
|
941
|
+
Ce(() => {
|
|
946
942
|
try {
|
|
947
943
|
i = !0, n?.(e, a), i = !1;
|
|
948
944
|
} catch (o) {
|
|
949
|
-
Ze(o, this.#
|
|
945
|
+
Ze(o, this.#i && this.#i.parent);
|
|
950
946
|
}
|
|
951
|
-
r && (this.#t = this.#
|
|
952
|
-
Ee.ensure();
|
|
947
|
+
r && (this.#t = this.#g(() => {
|
|
948
|
+
Ee.ensure(), this.#p = !0;
|
|
953
949
|
try {
|
|
954
|
-
return
|
|
955
|
-
|
|
956
|
-
/** @type {Effect} */
|
|
957
|
-
_
|
|
958
|
-
);
|
|
959
|
-
o.b = this, o.f |= Gt, r(
|
|
950
|
+
return Te(() => {
|
|
951
|
+
r(
|
|
960
952
|
this.#n,
|
|
961
953
|
() => e,
|
|
962
954
|
() => a
|
|
@@ -966,15 +958,17 @@ class ii {
|
|
|
966
958
|
return Ze(
|
|
967
959
|
o,
|
|
968
960
|
/** @type {Effect} */
|
|
969
|
-
this.#
|
|
961
|
+
this.#i.parent
|
|
970
962
|
), null;
|
|
963
|
+
} finally {
|
|
964
|
+
this.#p = !1;
|
|
971
965
|
}
|
|
972
966
|
}));
|
|
973
967
|
});
|
|
974
968
|
}
|
|
975
969
|
}
|
|
976
|
-
function
|
|
977
|
-
const s =
|
|
970
|
+
function ii(t, e, n, r) {
|
|
971
|
+
const s = oi;
|
|
978
972
|
var i = t.filter((f) => !f.settled);
|
|
979
973
|
if (n.length === 0 && i.length === 0) {
|
|
980
974
|
r(e.map(s));
|
|
@@ -983,52 +977,52 @@ function ai(t, e, n, r) {
|
|
|
983
977
|
var a = S, o = (
|
|
984
978
|
/** @type {Effect} */
|
|
985
979
|
_
|
|
986
|
-
), l =
|
|
980
|
+
), l = ai(), u = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((f) => f.promise)) : null;
|
|
987
981
|
function c(f) {
|
|
988
982
|
l();
|
|
989
983
|
try {
|
|
990
984
|
r(f);
|
|
991
985
|
} catch (m) {
|
|
992
|
-
(o.f &
|
|
986
|
+
(o.f & be) === 0 && Ze(m, o);
|
|
993
987
|
}
|
|
994
|
-
a?.deactivate(),
|
|
988
|
+
a?.deactivate(), Kt();
|
|
995
989
|
}
|
|
996
990
|
if (n.length === 0) {
|
|
997
991
|
u.then(() => c(e.map(s)));
|
|
998
992
|
return;
|
|
999
993
|
}
|
|
1000
|
-
function
|
|
1001
|
-
l(), Promise.all(n.map((f) => /* @__PURE__ */
|
|
994
|
+
function h() {
|
|
995
|
+
l(), Promise.all(n.map((f) => /* @__PURE__ */ li(f))).then((f) => c([...e.map(s), ...f])).catch((f) => Ze(f, o));
|
|
1002
996
|
}
|
|
1003
|
-
u ? u.then(
|
|
997
|
+
u ? u.then(h) : h();
|
|
1004
998
|
}
|
|
1005
|
-
function
|
|
1006
|
-
var t = _, e = y, n =
|
|
999
|
+
function ai() {
|
|
1000
|
+
var t = _, e = y, n = ie, r = S;
|
|
1007
1001
|
return function(i = !0) {
|
|
1008
|
-
|
|
1002
|
+
ce(t), Q(e), qe(n), i && r?.activate();
|
|
1009
1003
|
};
|
|
1010
1004
|
}
|
|
1011
|
-
function
|
|
1012
|
-
|
|
1005
|
+
function Kt() {
|
|
1006
|
+
ce(null), Q(null), qe(null);
|
|
1013
1007
|
}
|
|
1014
1008
|
// @__NO_SIDE_EFFECTS__
|
|
1015
|
-
function
|
|
1016
|
-
var e =
|
|
1009
|
+
function oi(t) {
|
|
1010
|
+
var e = z | F, n = y !== null && (y.f & z) !== 0 ? (
|
|
1017
1011
|
/** @type {Derived} */
|
|
1018
1012
|
y
|
|
1019
1013
|
) : null;
|
|
1020
1014
|
return _ !== null && (_.f |= Ge), {
|
|
1021
|
-
ctx:
|
|
1015
|
+
ctx: ie,
|
|
1022
1016
|
deps: null,
|
|
1023
1017
|
effects: null,
|
|
1024
|
-
equals:
|
|
1018
|
+
equals: ar,
|
|
1025
1019
|
f: e,
|
|
1026
1020
|
fn: t,
|
|
1027
1021
|
reactions: null,
|
|
1028
1022
|
rv: 0,
|
|
1029
1023
|
v: (
|
|
1030
1024
|
/** @type {V} */
|
|
1031
|
-
|
|
1025
|
+
C
|
|
1032
1026
|
),
|
|
1033
1027
|
wv: 0,
|
|
1034
1028
|
parent: n ?? _,
|
|
@@ -1036,12 +1030,12 @@ function li(t) {
|
|
|
1036
1030
|
};
|
|
1037
1031
|
}
|
|
1038
1032
|
// @__NO_SIDE_EFFECTS__
|
|
1039
|
-
function
|
|
1033
|
+
function li(t, e, n) {
|
|
1040
1034
|
let r = (
|
|
1041
1035
|
/** @type {Effect | null} */
|
|
1042
1036
|
_
|
|
1043
1037
|
);
|
|
1044
|
-
r === null &&
|
|
1038
|
+
r === null && Bs();
|
|
1045
1039
|
var s = (
|
|
1046
1040
|
/** @type {Boundary} */
|
|
1047
1041
|
r.b
|
|
@@ -1049,69 +1043,69 @@ function ui(t, e, n) {
|
|
|
1049
1043
|
/** @type {Promise<V>} */
|
|
1050
1044
|
/** @type {unknown} */
|
|
1051
1045
|
void 0
|
|
1052
|
-
), a =
|
|
1046
|
+
), a = Tt(
|
|
1053
1047
|
/** @type {V} */
|
|
1054
|
-
|
|
1048
|
+
C
|
|
1055
1049
|
), o = !y, l = /* @__PURE__ */ new Map();
|
|
1056
1050
|
return _i(() => {
|
|
1057
|
-
var u =
|
|
1051
|
+
var u = nr();
|
|
1058
1052
|
i = u.promise;
|
|
1059
1053
|
try {
|
|
1060
1054
|
Promise.resolve(t()).then(u.resolve, u.reject).then(() => {
|
|
1061
|
-
c === S && c.committed && c.deactivate(),
|
|
1055
|
+
c === S && c.committed && c.deactivate(), Kt();
|
|
1062
1056
|
});
|
|
1063
1057
|
} catch (m) {
|
|
1064
|
-
u.reject(m),
|
|
1058
|
+
u.reject(m), Kt();
|
|
1065
1059
|
}
|
|
1066
1060
|
var c = (
|
|
1067
1061
|
/** @type {Batch} */
|
|
1068
1062
|
S
|
|
1069
1063
|
);
|
|
1070
1064
|
if (o) {
|
|
1071
|
-
var
|
|
1072
|
-
s.update_pending_count(1), c.increment(
|
|
1065
|
+
var h = s.is_rendered();
|
|
1066
|
+
s.update_pending_count(1), c.increment(h), l.get(c)?.reject(Ae), l.delete(c), l.set(c, u);
|
|
1073
1067
|
}
|
|
1074
|
-
const f = (m,
|
|
1075
|
-
if (c.activate(),
|
|
1076
|
-
|
|
1068
|
+
const f = (m, p = void 0) => {
|
|
1069
|
+
if (c.activate(), p)
|
|
1070
|
+
p !== Ae && (a.f |= Me, xt(a, p));
|
|
1077
1071
|
else {
|
|
1078
|
-
(a.f & Me) !== 0 && (a.f ^= Me),
|
|
1079
|
-
for (const [v,
|
|
1072
|
+
(a.f & Me) !== 0 && (a.f ^= Me), xt(a, m);
|
|
1073
|
+
for (const [v, M] of l) {
|
|
1080
1074
|
if (l.delete(v), v === c) break;
|
|
1081
|
-
|
|
1075
|
+
M.reject(Ae);
|
|
1082
1076
|
}
|
|
1083
1077
|
}
|
|
1084
|
-
o && (s.update_pending_count(-1), c.decrement(
|
|
1078
|
+
o && (s.update_pending_count(-1), c.decrement(h));
|
|
1085
1079
|
};
|
|
1086
1080
|
u.promise.then(f, (m) => f(null, m || "unknown"));
|
|
1087
|
-
}),
|
|
1081
|
+
}), gi(() => {
|
|
1088
1082
|
for (const u of l.values())
|
|
1089
|
-
u.reject(
|
|
1083
|
+
u.reject(Ae);
|
|
1090
1084
|
}), new Promise((u) => {
|
|
1091
|
-
function c(
|
|
1085
|
+
function c(h) {
|
|
1092
1086
|
function f() {
|
|
1093
|
-
|
|
1087
|
+
h === i ? u(a) : c(i);
|
|
1094
1088
|
}
|
|
1095
|
-
|
|
1089
|
+
h.then(f, f);
|
|
1096
1090
|
}
|
|
1097
1091
|
c(i);
|
|
1098
1092
|
});
|
|
1099
1093
|
}
|
|
1100
|
-
function
|
|
1094
|
+
function ui(t) {
|
|
1101
1095
|
var e = t.effects;
|
|
1102
1096
|
if (e !== null) {
|
|
1103
1097
|
t.effects = null;
|
|
1104
1098
|
for (var n = 0; n < e.length; n += 1)
|
|
1105
|
-
|
|
1099
|
+
le(
|
|
1106
1100
|
/** @type {Effect} */
|
|
1107
1101
|
e[n]
|
|
1108
1102
|
);
|
|
1109
1103
|
}
|
|
1110
1104
|
}
|
|
1111
|
-
function
|
|
1105
|
+
function ci(t) {
|
|
1112
1106
|
for (var e = t.parent; e !== null; ) {
|
|
1113
|
-
if ((e.f &
|
|
1114
|
-
return (e.f &
|
|
1107
|
+
if ((e.f & z) === 0)
|
|
1108
|
+
return (e.f & be) === 0 ? (
|
|
1115
1109
|
/** @type {Effect} */
|
|
1116
1110
|
e
|
|
1117
1111
|
) : null;
|
|
@@ -1119,44 +1113,44 @@ function fi(t) {
|
|
|
1119
1113
|
}
|
|
1120
1114
|
return null;
|
|
1121
1115
|
}
|
|
1122
|
-
function
|
|
1116
|
+
function ln(t) {
|
|
1123
1117
|
var e, n = _;
|
|
1124
|
-
|
|
1118
|
+
ce(ci(t));
|
|
1125
1119
|
try {
|
|
1126
|
-
t.f &= ~
|
|
1120
|
+
t.f &= ~ze, ui(t), e = Cr(t);
|
|
1127
1121
|
} finally {
|
|
1128
|
-
|
|
1122
|
+
ce(n);
|
|
1129
1123
|
}
|
|
1130
1124
|
return e;
|
|
1131
1125
|
}
|
|
1132
|
-
function
|
|
1133
|
-
var e =
|
|
1134
|
-
if (!t.equals(e) && (t.wv =
|
|
1135
|
-
P(t,
|
|
1126
|
+
function dr(t) {
|
|
1127
|
+
var e = ln(t);
|
|
1128
|
+
if (!t.equals(e) && (t.wv = Ar(), (!S?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1129
|
+
P(t, O);
|
|
1136
1130
|
return;
|
|
1137
1131
|
}
|
|
1138
|
-
Ye || (
|
|
1132
|
+
Ye || (te !== null ? (cn() || S?.is_fork) && te.set(t, e) : an(t));
|
|
1139
1133
|
}
|
|
1140
|
-
function
|
|
1134
|
+
function fi(t) {
|
|
1141
1135
|
if (t.effects !== null)
|
|
1142
1136
|
for (const e of t.effects)
|
|
1143
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
1137
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ae), e.teardown = Fs, e.ac = null, ut(e, 0), fn(e));
|
|
1144
1138
|
}
|
|
1145
|
-
function
|
|
1139
|
+
function mr(t) {
|
|
1146
1140
|
if (t.effects !== null)
|
|
1147
1141
|
for (const e of t.effects)
|
|
1148
1142
|
e.teardown && Xe(e);
|
|
1149
1143
|
}
|
|
1150
|
-
let
|
|
1144
|
+
let Qt = /* @__PURE__ */ new Set();
|
|
1151
1145
|
const xe = /* @__PURE__ */ new Map();
|
|
1152
|
-
let
|
|
1153
|
-
function
|
|
1146
|
+
let vr = !1;
|
|
1147
|
+
function Tt(t, e) {
|
|
1154
1148
|
var n = {
|
|
1155
1149
|
f: 0,
|
|
1156
1150
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1157
1151
|
v: t,
|
|
1158
1152
|
reactions: null,
|
|
1159
|
-
equals:
|
|
1153
|
+
equals: ar,
|
|
1160
1154
|
rv: 0,
|
|
1161
1155
|
wv: 0
|
|
1162
1156
|
};
|
|
@@ -1164,56 +1158,56 @@ function At(t, e) {
|
|
|
1164
1158
|
}
|
|
1165
1159
|
// @__NO_SIDE_EFFECTS__
|
|
1166
1160
|
function U(t, e) {
|
|
1167
|
-
const n =
|
|
1168
|
-
return
|
|
1161
|
+
const n = Tt(t);
|
|
1162
|
+
return Si(n), n;
|
|
1169
1163
|
}
|
|
1170
1164
|
function H(t, e, n = !1) {
|
|
1171
1165
|
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1172
1166
|
// to ensure we error if state is set inside an inspect effect
|
|
1173
|
-
(!
|
|
1167
|
+
(!ne || (y.f & Cn) !== 0) && or() && (y.f & (z | ge | nn | Cn)) !== 0 && (K === null || !He.call(K, t)) && qs();
|
|
1174
1168
|
let r = n ? tt(e) : e;
|
|
1175
|
-
return
|
|
1169
|
+
return xt(t, r);
|
|
1176
1170
|
}
|
|
1177
|
-
function
|
|
1171
|
+
function xt(t, e) {
|
|
1178
1172
|
if (!t.equals(e)) {
|
|
1179
1173
|
var n = t.v;
|
|
1180
1174
|
Ye ? xe.set(t, e) : xe.set(t, n), t.v = e;
|
|
1181
1175
|
var r = Ee.ensure();
|
|
1182
|
-
if (r.capture(t, n), (t.f &
|
|
1176
|
+
if (r.capture(t, n), (t.f & z) !== 0) {
|
|
1183
1177
|
const s = (
|
|
1184
1178
|
/** @type {Derived} */
|
|
1185
1179
|
t
|
|
1186
1180
|
);
|
|
1187
|
-
(t.f & F) !== 0 &&
|
|
1181
|
+
(t.f & F) !== 0 && ln(s), an(s);
|
|
1188
1182
|
}
|
|
1189
|
-
t.wv =
|
|
1183
|
+
t.wv = Ar(), gr(t, F), _ !== null && (_.f & O) !== 0 && (_.f & (Se | $e)) === 0 && (X === null ? Pi([t]) : X.push(t)), !r.is_fork && Qt.size > 0 && !vr && hi();
|
|
1190
1184
|
}
|
|
1191
1185
|
return e;
|
|
1192
1186
|
}
|
|
1193
|
-
function
|
|
1194
|
-
|
|
1195
|
-
for (const t of
|
|
1196
|
-
(t.f &
|
|
1197
|
-
|
|
1187
|
+
function hi() {
|
|
1188
|
+
vr = !1;
|
|
1189
|
+
for (const t of Qt)
|
|
1190
|
+
(t.f & O) !== 0 && P(t, se), ht(t) && Xe(t);
|
|
1191
|
+
Qt.clear();
|
|
1198
1192
|
}
|
|
1199
1193
|
function at(t) {
|
|
1200
1194
|
H(t, t.v + 1);
|
|
1201
1195
|
}
|
|
1202
|
-
function
|
|
1196
|
+
function gr(t, e) {
|
|
1203
1197
|
var n = t.reactions;
|
|
1204
1198
|
if (n !== null)
|
|
1205
1199
|
for (var r = n.length, s = 0; s < r; s++) {
|
|
1206
1200
|
var i = n[s], a = i.f, o = (a & F) === 0;
|
|
1207
|
-
if (o && P(i, e), (a &
|
|
1201
|
+
if (o && P(i, e), (a & z) !== 0) {
|
|
1208
1202
|
var l = (
|
|
1209
1203
|
/** @type {Derived} */
|
|
1210
1204
|
i
|
|
1211
1205
|
);
|
|
1212
|
-
|
|
1206
|
+
te?.delete(l), (a & ze) === 0 && (a & G && (i.f |= ze), gr(l, se));
|
|
1213
1207
|
} else o && ((a & ge) !== 0 && ve !== null && ve.add(
|
|
1214
1208
|
/** @type {Effect} */
|
|
1215
1209
|
i
|
|
1216
|
-
),
|
|
1210
|
+
), oe(
|
|
1217
1211
|
/** @type {Effect} */
|
|
1218
1212
|
i
|
|
1219
1213
|
));
|
|
@@ -1222,16 +1216,16 @@ function wr(t, e) {
|
|
|
1222
1216
|
function tt(t) {
|
|
1223
1217
|
if (typeof t != "object" || t === null || _t in t)
|
|
1224
1218
|
return t;
|
|
1225
|
-
const e =
|
|
1226
|
-
if (e !==
|
|
1219
|
+
const e = Ls(t);
|
|
1220
|
+
if (e !== zs && e !== $s)
|
|
1227
1221
|
return t;
|
|
1228
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1229
|
-
if (
|
|
1222
|
+
var n = /* @__PURE__ */ new Map(), r = Cs(t), s = /* @__PURE__ */ U(0), i = Re, a = (o) => {
|
|
1223
|
+
if (Re === i)
|
|
1230
1224
|
return o();
|
|
1231
|
-
var l = y, u =
|
|
1232
|
-
|
|
1225
|
+
var l = y, u = Re;
|
|
1226
|
+
Q(null), $n(i);
|
|
1233
1227
|
var c = o();
|
|
1234
|
-
return
|
|
1228
|
+
return Q(l), $n(u), c;
|
|
1235
1229
|
};
|
|
1236
1230
|
return r && n.set("length", /* @__PURE__ */ U(
|
|
1237
1231
|
/** @type {any[]} */
|
|
@@ -1241,34 +1235,34 @@ function tt(t) {
|
|
|
1241
1235
|
t,
|
|
1242
1236
|
{
|
|
1243
1237
|
defineProperty(o, l, u) {
|
|
1244
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
1238
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && Ws();
|
|
1245
1239
|
var c = n.get(l);
|
|
1246
1240
|
return c === void 0 ? a(() => {
|
|
1247
|
-
var
|
|
1248
|
-
return n.set(l,
|
|
1241
|
+
var h = /* @__PURE__ */ U(u.value);
|
|
1242
|
+
return n.set(l, h), h;
|
|
1249
1243
|
}) : H(c, u.value, !0), !0;
|
|
1250
1244
|
},
|
|
1251
1245
|
deleteProperty(o, l) {
|
|
1252
1246
|
var u = n.get(l);
|
|
1253
1247
|
if (u === void 0) {
|
|
1254
1248
|
if (l in o) {
|
|
1255
|
-
const c = a(() => /* @__PURE__ */ U(
|
|
1249
|
+
const c = a(() => /* @__PURE__ */ U(C));
|
|
1256
1250
|
n.set(l, c), at(s);
|
|
1257
1251
|
}
|
|
1258
1252
|
} else
|
|
1259
|
-
H(u,
|
|
1253
|
+
H(u, C), at(s);
|
|
1260
1254
|
return !0;
|
|
1261
1255
|
},
|
|
1262
1256
|
get(o, l, u) {
|
|
1263
1257
|
if (l === _t)
|
|
1264
1258
|
return t;
|
|
1265
|
-
var c = n.get(l),
|
|
1266
|
-
if (c === void 0 && (!
|
|
1267
|
-
var m = tt(
|
|
1268
|
-
return
|
|
1259
|
+
var c = n.get(l), h = l in o;
|
|
1260
|
+
if (c === void 0 && (!h || it(o, l)?.writable) && (c = a(() => {
|
|
1261
|
+
var m = tt(h ? o[l] : C), p = /* @__PURE__ */ U(m);
|
|
1262
|
+
return p;
|
|
1269
1263
|
}), n.set(l, c)), c !== void 0) {
|
|
1270
1264
|
var f = E(c);
|
|
1271
|
-
return f ===
|
|
1265
|
+
return f === C ? void 0 : f;
|
|
1272
1266
|
}
|
|
1273
1267
|
return Reflect.get(o, l, u);
|
|
1274
1268
|
},
|
|
@@ -1278,8 +1272,8 @@ function tt(t) {
|
|
|
1278
1272
|
var c = n.get(l);
|
|
1279
1273
|
c && (u.value = E(c));
|
|
1280
1274
|
} else if (u === void 0) {
|
|
1281
|
-
var
|
|
1282
|
-
if (
|
|
1275
|
+
var h = n.get(l), f = h?.v;
|
|
1276
|
+
if (h !== void 0 && f !== C)
|
|
1283
1277
|
return {
|
|
1284
1278
|
enumerable: !0,
|
|
1285
1279
|
configurable: !0,
|
|
@@ -1292,41 +1286,41 @@ function tt(t) {
|
|
|
1292
1286
|
has(o, l) {
|
|
1293
1287
|
if (l === _t)
|
|
1294
1288
|
return !0;
|
|
1295
|
-
var u = n.get(l), c = u !== void 0 && u.v !==
|
|
1289
|
+
var u = n.get(l), c = u !== void 0 && u.v !== C || Reflect.has(o, l);
|
|
1296
1290
|
if (u !== void 0 || _ !== null && (!c || it(o, l)?.writable)) {
|
|
1297
1291
|
u === void 0 && (u = a(() => {
|
|
1298
|
-
var f = c ? tt(o[l]) :
|
|
1292
|
+
var f = c ? tt(o[l]) : C, m = /* @__PURE__ */ U(f);
|
|
1299
1293
|
return m;
|
|
1300
1294
|
}), n.set(l, u));
|
|
1301
|
-
var
|
|
1302
|
-
if (
|
|
1295
|
+
var h = E(u);
|
|
1296
|
+
if (h === C)
|
|
1303
1297
|
return !1;
|
|
1304
1298
|
}
|
|
1305
1299
|
return c;
|
|
1306
1300
|
},
|
|
1307
1301
|
set(o, l, u, c) {
|
|
1308
|
-
var
|
|
1302
|
+
var h = n.get(l), f = l in o;
|
|
1309
1303
|
if (r && l === "length")
|
|
1310
1304
|
for (var m = u; m < /** @type {Source<number>} */
|
|
1311
|
-
|
|
1312
|
-
var
|
|
1313
|
-
|
|
1305
|
+
h.v; m += 1) {
|
|
1306
|
+
var p = n.get(m + "");
|
|
1307
|
+
p !== void 0 ? H(p, C) : m in o && (p = a(() => /* @__PURE__ */ U(C)), n.set(m + "", p));
|
|
1314
1308
|
}
|
|
1315
|
-
if (
|
|
1316
|
-
(!f || it(o, l)?.writable) && (
|
|
1309
|
+
if (h === void 0)
|
|
1310
|
+
(!f || it(o, l)?.writable) && (h = a(() => /* @__PURE__ */ U(void 0)), H(h, tt(u)), n.set(l, h));
|
|
1317
1311
|
else {
|
|
1318
|
-
f =
|
|
1312
|
+
f = h.v !== C;
|
|
1319
1313
|
var v = a(() => tt(u));
|
|
1320
|
-
H(
|
|
1314
|
+
H(h, v);
|
|
1321
1315
|
}
|
|
1322
|
-
var
|
|
1323
|
-
if (
|
|
1316
|
+
var M = Reflect.getOwnPropertyDescriptor(o, l);
|
|
1317
|
+
if (M?.set && M.set.call(c, u), !f) {
|
|
1324
1318
|
if (r && typeof l == "string") {
|
|
1325
|
-
var
|
|
1319
|
+
var N = (
|
|
1326
1320
|
/** @type {Source<number>} */
|
|
1327
1321
|
n.get("length")
|
|
1328
|
-
),
|
|
1329
|
-
Number.isInteger(
|
|
1322
|
+
), fe = Number(l);
|
|
1323
|
+
Number.isInteger(fe) && fe >= N.v && H(N, fe + 1);
|
|
1330
1324
|
}
|
|
1331
1325
|
at(s);
|
|
1332
1326
|
}
|
|
@@ -1334,82 +1328,82 @@ function tt(t) {
|
|
|
1334
1328
|
},
|
|
1335
1329
|
ownKeys(o) {
|
|
1336
1330
|
E(s);
|
|
1337
|
-
var l = Reflect.ownKeys(o).filter((
|
|
1338
|
-
var f = n.get(
|
|
1339
|
-
return f === void 0 || f.v !==
|
|
1331
|
+
var l = Reflect.ownKeys(o).filter((h) => {
|
|
1332
|
+
var f = n.get(h);
|
|
1333
|
+
return f === void 0 || f.v !== C;
|
|
1340
1334
|
});
|
|
1341
1335
|
for (var [u, c] of n)
|
|
1342
|
-
c.v !==
|
|
1336
|
+
c.v !== C && !(u in o) && l.push(u);
|
|
1343
1337
|
return l;
|
|
1344
1338
|
},
|
|
1345
1339
|
setPrototypeOf() {
|
|
1346
|
-
|
|
1340
|
+
Hs();
|
|
1347
1341
|
}
|
|
1348
1342
|
}
|
|
1349
1343
|
);
|
|
1350
1344
|
}
|
|
1351
|
-
var
|
|
1352
|
-
function
|
|
1353
|
-
if (
|
|
1354
|
-
|
|
1345
|
+
var Dn, wr, yr, kr;
|
|
1346
|
+
function pi() {
|
|
1347
|
+
if (Dn === void 0) {
|
|
1348
|
+
Dn = window, wr = /Firefox/.test(navigator.userAgent);
|
|
1355
1349
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1356
|
-
|
|
1350
|
+
yr = it(e, "firstChild").get, kr = it(e, "nextSibling").get, Nn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Nn(n) && (n.__t = void 0);
|
|
1357
1351
|
}
|
|
1358
1352
|
}
|
|
1359
1353
|
function _r(t = "") {
|
|
1360
1354
|
return document.createTextNode(t);
|
|
1361
1355
|
}
|
|
1362
1356
|
// @__NO_SIDE_EFFECTS__
|
|
1363
|
-
function
|
|
1357
|
+
function br(t) {
|
|
1364
1358
|
return (
|
|
1365
1359
|
/** @type {TemplateNode | null} */
|
|
1366
|
-
|
|
1360
|
+
yr.call(t)
|
|
1367
1361
|
);
|
|
1368
1362
|
}
|
|
1369
1363
|
// @__NO_SIDE_EFFECTS__
|
|
1370
|
-
function
|
|
1364
|
+
function un(t) {
|
|
1371
1365
|
return (
|
|
1372
1366
|
/** @type {TemplateNode | null} */
|
|
1373
|
-
|
|
1367
|
+
kr.call(t)
|
|
1374
1368
|
);
|
|
1375
1369
|
}
|
|
1376
|
-
function
|
|
1377
|
-
return /* @__PURE__ */
|
|
1370
|
+
function On(t, e) {
|
|
1371
|
+
return /* @__PURE__ */ br(t);
|
|
1378
1372
|
}
|
|
1379
|
-
function
|
|
1373
|
+
function di(t, e = 1, n = !1) {
|
|
1380
1374
|
let r = t;
|
|
1381
1375
|
for (; e--; )
|
|
1382
1376
|
r = /** @type {TemplateNode} */
|
|
1383
|
-
/* @__PURE__ */
|
|
1377
|
+
/* @__PURE__ */ un(r);
|
|
1384
1378
|
return r;
|
|
1385
1379
|
}
|
|
1386
|
-
function
|
|
1380
|
+
function mi(t, e, n) {
|
|
1387
1381
|
return (
|
|
1388
1382
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1389
|
-
document.createElementNS(
|
|
1383
|
+
document.createElementNS(Ys, t, void 0)
|
|
1390
1384
|
);
|
|
1391
1385
|
}
|
|
1392
|
-
function
|
|
1386
|
+
function Mr(t) {
|
|
1393
1387
|
var e = y, n = _;
|
|
1394
|
-
|
|
1388
|
+
Q(null), ce(null);
|
|
1395
1389
|
try {
|
|
1396
1390
|
return t();
|
|
1397
1391
|
} finally {
|
|
1398
|
-
|
|
1392
|
+
Q(e), ce(n);
|
|
1399
1393
|
}
|
|
1400
1394
|
}
|
|
1401
|
-
function
|
|
1395
|
+
function vi(t, e) {
|
|
1402
1396
|
var n = e.last;
|
|
1403
1397
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1404
1398
|
}
|
|
1405
1399
|
function we(t, e, n) {
|
|
1406
1400
|
var r = _;
|
|
1407
|
-
r !== null && (r.f &
|
|
1401
|
+
r !== null && (r.f & _e) !== 0 && (t |= _e);
|
|
1408
1402
|
var s = {
|
|
1409
|
-
ctx:
|
|
1403
|
+
ctx: ie,
|
|
1410
1404
|
deps: null,
|
|
1411
1405
|
nodes: null,
|
|
1412
|
-
f: t | F |
|
|
1406
|
+
f: t | F | G,
|
|
1413
1407
|
first: null,
|
|
1414
1408
|
fn: e,
|
|
1415
1409
|
last: null,
|
|
@@ -1425,12 +1419,12 @@ function we(t, e, n) {
|
|
|
1425
1419
|
try {
|
|
1426
1420
|
Xe(s);
|
|
1427
1421
|
} catch (o) {
|
|
1428
|
-
throw
|
|
1422
|
+
throw le(s), o;
|
|
1429
1423
|
}
|
|
1430
|
-
else e !== null &&
|
|
1424
|
+
else e !== null && oe(s);
|
|
1431
1425
|
var i = s;
|
|
1432
1426
|
if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1433
|
-
(i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t &
|
|
1427
|
+
(i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t & Et) !== 0 && i !== null && (i.f |= Et)), i !== null && (i.parent = r, r !== null && vi(i, r), y !== null && (y.f & z) !== 0 && (t & $e) === 0)) {
|
|
1434
1428
|
var a = (
|
|
1435
1429
|
/** @type {Derived} */
|
|
1436
1430
|
y
|
|
@@ -1439,105 +1433,105 @@ function we(t, e, n) {
|
|
|
1439
1433
|
}
|
|
1440
1434
|
return s;
|
|
1441
1435
|
}
|
|
1442
|
-
function
|
|
1443
|
-
return y !== null && !
|
|
1436
|
+
function cn() {
|
|
1437
|
+
return y !== null && !ne;
|
|
1438
|
+
}
|
|
1439
|
+
function gi(t) {
|
|
1440
|
+
const e = we(Pt, null, !1);
|
|
1441
|
+
return P(e, O), e.teardown = t, e;
|
|
1444
1442
|
}
|
|
1445
1443
|
function wi(t) {
|
|
1446
|
-
|
|
1447
|
-
return P(e, D), e.teardown = t, e;
|
|
1444
|
+
return we(lt | js, t, !1);
|
|
1448
1445
|
}
|
|
1449
1446
|
function yi(t) {
|
|
1450
|
-
return we(lt | Bs, t, !1);
|
|
1451
|
-
}
|
|
1452
|
-
function ki(t) {
|
|
1453
1447
|
Ee.ensure();
|
|
1454
|
-
const e = we(
|
|
1448
|
+
const e = we($e | Ge, t, !0);
|
|
1455
1449
|
return (n = {}) => new Promise((r) => {
|
|
1456
|
-
n.outro ?
|
|
1457
|
-
|
|
1458
|
-
}) : (
|
|
1450
|
+
n.outro ? bt(e, () => {
|
|
1451
|
+
le(e), r(void 0);
|
|
1452
|
+
}) : (le(e), r(void 0));
|
|
1459
1453
|
});
|
|
1460
1454
|
}
|
|
1461
|
-
function
|
|
1455
|
+
function ki(t) {
|
|
1462
1456
|
return we(lt, t, !1);
|
|
1463
1457
|
}
|
|
1464
1458
|
function _i(t) {
|
|
1465
|
-
return we(
|
|
1459
|
+
return we(nn | Ge, t, !0);
|
|
1466
1460
|
}
|
|
1467
|
-
function
|
|
1468
|
-
return we(
|
|
1461
|
+
function Er(t, e = 0) {
|
|
1462
|
+
return we(Pt | e, t, !0);
|
|
1469
1463
|
}
|
|
1470
|
-
function
|
|
1471
|
-
|
|
1472
|
-
we(
|
|
1464
|
+
function xr(t, e = [], n = [], r = []) {
|
|
1465
|
+
ii(r, e, n, (s) => {
|
|
1466
|
+
we(Pt, () => t(...s.map(E)), !0);
|
|
1473
1467
|
});
|
|
1474
1468
|
}
|
|
1475
|
-
function
|
|
1469
|
+
function bi(t, e = 0) {
|
|
1476
1470
|
var n = we(ge | e, t, !0);
|
|
1477
1471
|
return n;
|
|
1478
1472
|
}
|
|
1479
|
-
function
|
|
1473
|
+
function Te(t) {
|
|
1480
1474
|
return we(Se | Ge, t, !0);
|
|
1481
1475
|
}
|
|
1482
|
-
function
|
|
1476
|
+
function Sr(t) {
|
|
1483
1477
|
var e = t.teardown;
|
|
1484
1478
|
if (e !== null) {
|
|
1485
1479
|
const n = Ye, r = y;
|
|
1486
|
-
|
|
1480
|
+
zn(!0), Q(null);
|
|
1487
1481
|
try {
|
|
1488
1482
|
e.call(null);
|
|
1489
1483
|
} finally {
|
|
1490
|
-
|
|
1484
|
+
zn(n), Q(r);
|
|
1491
1485
|
}
|
|
1492
1486
|
}
|
|
1493
1487
|
}
|
|
1494
|
-
function
|
|
1488
|
+
function fn(t, e = !1) {
|
|
1495
1489
|
var n = t.first;
|
|
1496
1490
|
for (t.first = t.last = null; n !== null; ) {
|
|
1497
1491
|
const s = n.ac;
|
|
1498
|
-
s !== null &&
|
|
1499
|
-
s.abort(
|
|
1492
|
+
s !== null && Mr(() => {
|
|
1493
|
+
s.abort(Ae);
|
|
1500
1494
|
});
|
|
1501
1495
|
var r = n.next;
|
|
1502
|
-
(n.f &
|
|
1496
|
+
(n.f & $e) !== 0 ? n.parent = null : le(n, e), n = r;
|
|
1503
1497
|
}
|
|
1504
1498
|
}
|
|
1505
|
-
function
|
|
1499
|
+
function Mi(t) {
|
|
1506
1500
|
for (var e = t.first; e !== null; ) {
|
|
1507
1501
|
var n = e.next;
|
|
1508
|
-
(e.f & Se) === 0 &&
|
|
1502
|
+
(e.f & Se) === 0 && le(e), e = n;
|
|
1509
1503
|
}
|
|
1510
1504
|
}
|
|
1511
|
-
function
|
|
1505
|
+
function le(t, e = !0) {
|
|
1512
1506
|
var n = !1;
|
|
1513
|
-
(e || (t.f &
|
|
1507
|
+
(e || (t.f & ir) !== 0) && t.nodes !== null && t.nodes.end !== null && (Ei(
|
|
1514
1508
|
t.nodes.start,
|
|
1515
1509
|
/** @type {TemplateNode} */
|
|
1516
1510
|
t.nodes.end
|
|
1517
|
-
), n = !0),
|
|
1511
|
+
), n = !0), fn(t, e && !n), ut(t, 0), P(t, be);
|
|
1518
1512
|
var r = t.nodes && t.nodes.t;
|
|
1519
1513
|
if (r !== null)
|
|
1520
1514
|
for (const i of r)
|
|
1521
1515
|
i.stop();
|
|
1522
|
-
|
|
1516
|
+
Sr(t);
|
|
1523
1517
|
var s = t.parent;
|
|
1524
|
-
s !== null && s.first !== null &&
|
|
1518
|
+
s !== null && s.first !== null && Pr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1525
1519
|
}
|
|
1526
|
-
function
|
|
1520
|
+
function Ei(t, e) {
|
|
1527
1521
|
for (; t !== null; ) {
|
|
1528
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1522
|
+
var n = t === e ? null : /* @__PURE__ */ un(t);
|
|
1529
1523
|
t.remove(), t = n;
|
|
1530
1524
|
}
|
|
1531
1525
|
}
|
|
1532
|
-
function
|
|
1526
|
+
function Pr(t) {
|
|
1533
1527
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1534
1528
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1535
1529
|
}
|
|
1536
|
-
function
|
|
1530
|
+
function bt(t, e, n = !0) {
|
|
1537
1531
|
var r = [];
|
|
1538
|
-
|
|
1532
|
+
Ir(t, r, !0);
|
|
1539
1533
|
var s = () => {
|
|
1540
|
-
n &&
|
|
1534
|
+
n && le(t), e && e();
|
|
1541
1535
|
}, i = r.length;
|
|
1542
1536
|
if (i > 0) {
|
|
1543
1537
|
var a = () => --i || s();
|
|
@@ -1546,61 +1540,61 @@ function Mt(t, e, n = !0) {
|
|
|
1546
1540
|
} else
|
|
1547
1541
|
s();
|
|
1548
1542
|
}
|
|
1549
|
-
function
|
|
1550
|
-
if ((t.f &
|
|
1551
|
-
t.f ^=
|
|
1543
|
+
function Ir(t, e, n) {
|
|
1544
|
+
if ((t.f & _e) === 0) {
|
|
1545
|
+
t.f ^= _e;
|
|
1552
1546
|
var r = t.nodes && t.nodes.t;
|
|
1553
1547
|
if (r !== null)
|
|
1554
1548
|
for (const o of r)
|
|
1555
1549
|
(o.is_global || n) && e.push(o);
|
|
1556
1550
|
for (var s = t.first; s !== null; ) {
|
|
1557
|
-
var i = s.next, a = (s.f &
|
|
1551
|
+
var i = s.next, a = (s.f & Et) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1558
1552
|
// it means the parent block effect was pruned. In that case,
|
|
1559
1553
|
// transparency information was transferred to the branch effect.
|
|
1560
1554
|
(s.f & Se) !== 0 && (t.f & ge) !== 0;
|
|
1561
|
-
|
|
1555
|
+
Ir(s, e, a ? n : !1), s = i;
|
|
1562
1556
|
}
|
|
1563
1557
|
}
|
|
1564
1558
|
}
|
|
1565
|
-
function
|
|
1559
|
+
function xi(t, e) {
|
|
1566
1560
|
if (t.nodes)
|
|
1567
1561
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1568
|
-
var s = n === r ? null : /* @__PURE__ */
|
|
1562
|
+
var s = n === r ? null : /* @__PURE__ */ un(n);
|
|
1569
1563
|
e.append(n), n = s;
|
|
1570
1564
|
}
|
|
1571
1565
|
}
|
|
1572
|
-
let
|
|
1573
|
-
function
|
|
1566
|
+
let Mt = !1, Ye = !1;
|
|
1567
|
+
function zn(t) {
|
|
1574
1568
|
Ye = t;
|
|
1575
1569
|
}
|
|
1576
|
-
let y = null,
|
|
1577
|
-
function
|
|
1570
|
+
let y = null, ne = !1;
|
|
1571
|
+
function Q(t) {
|
|
1578
1572
|
y = t;
|
|
1579
1573
|
}
|
|
1580
1574
|
let _ = null;
|
|
1581
|
-
function
|
|
1575
|
+
function ce(t) {
|
|
1582
1576
|
_ = t;
|
|
1583
1577
|
}
|
|
1584
|
-
let
|
|
1585
|
-
function
|
|
1586
|
-
y !== null && (
|
|
1578
|
+
let K = null;
|
|
1579
|
+
function Si(t) {
|
|
1580
|
+
y !== null && (K === null ? K = [t] : K.push(t));
|
|
1587
1581
|
}
|
|
1588
|
-
let W = null,
|
|
1589
|
-
function
|
|
1590
|
-
|
|
1582
|
+
let W = null, Y = 0, X = null;
|
|
1583
|
+
function Pi(t) {
|
|
1584
|
+
X = t;
|
|
1591
1585
|
}
|
|
1592
|
-
let
|
|
1593
|
-
function
|
|
1594
|
-
|
|
1586
|
+
let Tr = 1, Ne = 0, Re = Ne;
|
|
1587
|
+
function $n(t) {
|
|
1588
|
+
Re = t;
|
|
1595
1589
|
}
|
|
1596
|
-
function
|
|
1597
|
-
return ++
|
|
1590
|
+
function Ar() {
|
|
1591
|
+
return ++Tr;
|
|
1598
1592
|
}
|
|
1599
1593
|
function ht(t) {
|
|
1600
1594
|
var e = t.f;
|
|
1601
1595
|
if ((e & F) !== 0)
|
|
1602
1596
|
return !0;
|
|
1603
|
-
if (e &
|
|
1597
|
+
if (e & z && (t.f &= ~ze), (e & se) !== 0) {
|
|
1604
1598
|
for (var n = (
|
|
1605
1599
|
/** @type {Value[]} */
|
|
1606
1600
|
t.deps
|
|
@@ -1609,94 +1603,94 @@ function ht(t) {
|
|
|
1609
1603
|
if (ht(
|
|
1610
1604
|
/** @type {Derived} */
|
|
1611
1605
|
i
|
|
1612
|
-
) &&
|
|
1606
|
+
) && dr(
|
|
1613
1607
|
/** @type {Derived} */
|
|
1614
1608
|
i
|
|
1615
1609
|
), i.wv > t.wv)
|
|
1616
1610
|
return !0;
|
|
1617
1611
|
}
|
|
1618
|
-
(e &
|
|
1612
|
+
(e & G) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1619
1613
|
// traversal of the graph in the other batches still happens
|
|
1620
|
-
|
|
1614
|
+
te === null && P(t, O);
|
|
1621
1615
|
}
|
|
1622
1616
|
return !1;
|
|
1623
1617
|
}
|
|
1624
|
-
function
|
|
1618
|
+
function Nr(t, e, n = !0) {
|
|
1625
1619
|
var r = t.reactions;
|
|
1626
|
-
if (r !== null && !(
|
|
1620
|
+
if (r !== null && !(K !== null && He.call(K, t)))
|
|
1627
1621
|
for (var s = 0; s < r.length; s++) {
|
|
1628
1622
|
var i = r[s];
|
|
1629
|
-
(i.f &
|
|
1623
|
+
(i.f & z) !== 0 ? Nr(
|
|
1630
1624
|
/** @type {Derived} */
|
|
1631
1625
|
i,
|
|
1632
1626
|
e,
|
|
1633
1627
|
!1
|
|
1634
|
-
) : e === i && (n ? P(i, F) : (i.f &
|
|
1628
|
+
) : e === i && (n ? P(i, F) : (i.f & O) !== 0 && P(i, se), oe(
|
|
1635
1629
|
/** @type {Effect} */
|
|
1636
1630
|
i
|
|
1637
1631
|
));
|
|
1638
1632
|
}
|
|
1639
1633
|
}
|
|
1640
|
-
function
|
|
1641
|
-
var e = W, n =
|
|
1634
|
+
function Cr(t) {
|
|
1635
|
+
var e = W, n = Y, r = X, s = y, i = K, a = ie, o = ne, l = Re, u = t.f;
|
|
1642
1636
|
W = /** @type {null | Value[]} */
|
|
1643
|
-
null,
|
|
1644
|
-
t.ac.abort(
|
|
1637
|
+
null, Y = 0, X = null, y = (u & (Se | $e)) === 0 ? t : null, K = null, qe(t.ctx), ne = !1, Re = ++Ne, t.ac !== null && (Mr(() => {
|
|
1638
|
+
t.ac.abort(Ae);
|
|
1645
1639
|
}), t.ac = null);
|
|
1646
1640
|
try {
|
|
1647
|
-
t.f |=
|
|
1641
|
+
t.f |= Jt;
|
|
1648
1642
|
var c = (
|
|
1649
1643
|
/** @type {Function} */
|
|
1650
1644
|
t.fn
|
|
1651
|
-
),
|
|
1652
|
-
t.f |=
|
|
1645
|
+
), h = c();
|
|
1646
|
+
t.f |= It;
|
|
1653
1647
|
var f = t.deps, m = S?.is_fork;
|
|
1654
1648
|
if (W !== null) {
|
|
1655
|
-
var
|
|
1656
|
-
if (m || ut(t,
|
|
1657
|
-
for (f.length =
|
|
1658
|
-
f[
|
|
1649
|
+
var p;
|
|
1650
|
+
if (m || ut(t, Y), f !== null && Y > 0)
|
|
1651
|
+
for (f.length = Y + W.length, p = 0; p < W.length; p++)
|
|
1652
|
+
f[Y + p] = W[p];
|
|
1659
1653
|
else
|
|
1660
1654
|
t.deps = f = W;
|
|
1661
|
-
if (
|
|
1662
|
-
for (
|
|
1663
|
-
(f[
|
|
1664
|
-
} else !m && f !== null &&
|
|
1665
|
-
if (
|
|
1666
|
-
for (
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1655
|
+
if (cn() && (t.f & G) !== 0)
|
|
1656
|
+
for (p = Y; p < f.length; p++)
|
|
1657
|
+
(f[p].reactions ??= []).push(t);
|
|
1658
|
+
} else !m && f !== null && Y < f.length && (ut(t, Y), f.length = Y);
|
|
1659
|
+
if (or() && X !== null && !ne && f !== null && (t.f & (z | se | F)) === 0)
|
|
1660
|
+
for (p = 0; p < /** @type {Source[]} */
|
|
1661
|
+
X.length; p++)
|
|
1662
|
+
Nr(
|
|
1663
|
+
X[p],
|
|
1670
1664
|
/** @type {Effect} */
|
|
1671
1665
|
t
|
|
1672
1666
|
);
|
|
1673
1667
|
if (s !== null && s !== t) {
|
|
1674
|
-
if (
|
|
1668
|
+
if (Ne++, s.deps !== null)
|
|
1675
1669
|
for (let v = 0; v < n; v += 1)
|
|
1676
|
-
s.deps[v].rv =
|
|
1670
|
+
s.deps[v].rv = Ne;
|
|
1677
1671
|
if (e !== null)
|
|
1678
1672
|
for (const v of e)
|
|
1679
|
-
v.rv =
|
|
1680
|
-
|
|
1681
|
-
|
|
1673
|
+
v.rv = Ne;
|
|
1674
|
+
X !== null && (r === null ? r = X : r.push(.../** @type {Source[]} */
|
|
1675
|
+
X));
|
|
1682
1676
|
}
|
|
1683
|
-
return (t.f & Me) !== 0 && (t.f ^= Me),
|
|
1677
|
+
return (t.f & Me) !== 0 && (t.f ^= Me), h;
|
|
1684
1678
|
} catch (v) {
|
|
1685
|
-
return
|
|
1679
|
+
return lr(v);
|
|
1686
1680
|
} finally {
|
|
1687
|
-
t.f ^=
|
|
1681
|
+
t.f ^= Jt, W = e, Y = n, X = r, y = s, K = i, qe(a), ne = o, Re = l;
|
|
1688
1682
|
}
|
|
1689
1683
|
}
|
|
1690
|
-
function
|
|
1684
|
+
function Ii(t, e) {
|
|
1691
1685
|
let n = e.reactions;
|
|
1692
1686
|
if (n !== null) {
|
|
1693
|
-
var r =
|
|
1687
|
+
var r = Rs.call(n, t);
|
|
1694
1688
|
if (r !== -1) {
|
|
1695
1689
|
var s = n.length - 1;
|
|
1696
1690
|
s === 0 ? n = e.reactions = null : (n[r] = n[s], n.pop());
|
|
1697
1691
|
}
|
|
1698
1692
|
}
|
|
1699
|
-
if (n === null && (e.f &
|
|
1693
|
+
if (n === null && (e.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1700
1694
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1701
1695
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1702
1696
|
(W === null || !He.call(W, e))) {
|
|
@@ -1704,40 +1698,40 @@ function Ti(t, e) {
|
|
|
1704
1698
|
/** @type {Derived} */
|
|
1705
1699
|
e
|
|
1706
1700
|
);
|
|
1707
|
-
(i.f &
|
|
1701
|
+
(i.f & G) !== 0 && (i.f ^= G, i.f &= ~ze), an(i), fi(i), ut(i, 0);
|
|
1708
1702
|
}
|
|
1709
1703
|
}
|
|
1710
1704
|
function ut(t, e) {
|
|
1711
1705
|
var n = t.deps;
|
|
1712
1706
|
if (n !== null)
|
|
1713
1707
|
for (var r = e; r < n.length; r++)
|
|
1714
|
-
|
|
1708
|
+
Ii(t, n[r]);
|
|
1715
1709
|
}
|
|
1716
1710
|
function Xe(t) {
|
|
1717
1711
|
var e = t.f;
|
|
1718
|
-
if ((e &
|
|
1719
|
-
P(t,
|
|
1720
|
-
var n = _, r =
|
|
1721
|
-
_ = t,
|
|
1712
|
+
if ((e & be) === 0) {
|
|
1713
|
+
P(t, O);
|
|
1714
|
+
var n = _, r = Mt;
|
|
1715
|
+
_ = t, Mt = !0;
|
|
1722
1716
|
try {
|
|
1723
|
-
(e & (ge |
|
|
1724
|
-
var s =
|
|
1725
|
-
t.teardown = typeof s == "function" ? s : null, t.wv =
|
|
1717
|
+
(e & (ge | rr)) !== 0 ? Mi(t) : fn(t), Sr(t);
|
|
1718
|
+
var s = Cr(t);
|
|
1719
|
+
t.teardown = typeof s == "function" ? s : null, t.wv = Tr;
|
|
1726
1720
|
var i;
|
|
1727
|
-
|
|
1721
|
+
Xt && Js && (t.f & F) !== 0 && t.deps;
|
|
1728
1722
|
} finally {
|
|
1729
|
-
|
|
1723
|
+
Mt = r, _ = n;
|
|
1730
1724
|
}
|
|
1731
1725
|
}
|
|
1732
1726
|
}
|
|
1733
1727
|
function E(t) {
|
|
1734
|
-
var e = t.f, n = (e &
|
|
1735
|
-
if (y !== null && !
|
|
1736
|
-
var r = _ !== null && (_.f &
|
|
1737
|
-
if (!r && (
|
|
1728
|
+
var e = t.f, n = (e & z) !== 0;
|
|
1729
|
+
if (y !== null && !ne) {
|
|
1730
|
+
var r = _ !== null && (_.f & be) !== 0;
|
|
1731
|
+
if (!r && (K === null || !He.call(K, t))) {
|
|
1738
1732
|
var s = y.deps;
|
|
1739
|
-
if ((y.f &
|
|
1740
|
-
t.rv <
|
|
1733
|
+
if ((y.f & Jt) !== 0)
|
|
1734
|
+
t.rv < Ne && (t.rv = Ne, W === null && s !== null && s[Y] === t ? Y++ : W === null ? W = [t] : W.push(t));
|
|
1741
1735
|
else {
|
|
1742
1736
|
(y.deps ??= []).push(t);
|
|
1743
1737
|
var i = t.reactions;
|
|
@@ -1754,54 +1748,54 @@ function E(t) {
|
|
|
1754
1748
|
);
|
|
1755
1749
|
if (Ye) {
|
|
1756
1750
|
var o = a.v;
|
|
1757
|
-
return ((a.f &
|
|
1751
|
+
return ((a.f & O) === 0 && a.reactions !== null || Dr(a)) && (o = ln(a)), xe.set(a, o), o;
|
|
1758
1752
|
}
|
|
1759
|
-
var l = (a.f &
|
|
1760
|
-
ht(a) && (l && (a.f |=
|
|
1753
|
+
var l = (a.f & G) === 0 && !ne && y !== null && (Mt || (y.f & G) !== 0), u = (a.f & It) === 0;
|
|
1754
|
+
ht(a) && (l && (a.f |= G), dr(a)), l && !u && (mr(a), Rr(a));
|
|
1761
1755
|
}
|
|
1762
|
-
if (
|
|
1763
|
-
return
|
|
1756
|
+
if (te?.has(t))
|
|
1757
|
+
return te.get(t);
|
|
1764
1758
|
if ((t.f & Me) !== 0)
|
|
1765
1759
|
throw t.v;
|
|
1766
1760
|
return t.v;
|
|
1767
1761
|
}
|
|
1768
|
-
function
|
|
1769
|
-
if (t.f |=
|
|
1762
|
+
function Rr(t) {
|
|
1763
|
+
if (t.f |= G, t.deps !== null)
|
|
1770
1764
|
for (const e of t.deps)
|
|
1771
|
-
(e.reactions ??= []).push(t), (e.f &
|
|
1765
|
+
(e.reactions ??= []).push(t), (e.f & z) !== 0 && (e.f & G) === 0 && (mr(
|
|
1772
1766
|
/** @type {Derived} */
|
|
1773
1767
|
e
|
|
1774
|
-
),
|
|
1768
|
+
), Rr(
|
|
1775
1769
|
/** @type {Derived} */
|
|
1776
1770
|
e
|
|
1777
1771
|
));
|
|
1778
1772
|
}
|
|
1779
|
-
function
|
|
1780
|
-
if (t.v ===
|
|
1773
|
+
function Dr(t) {
|
|
1774
|
+
if (t.v === C) return !0;
|
|
1781
1775
|
if (t.deps === null) return !1;
|
|
1782
1776
|
for (const e of t.deps)
|
|
1783
|
-
if (xe.has(e) || (e.f &
|
|
1777
|
+
if (xe.has(e) || (e.f & z) !== 0 && Dr(
|
|
1784
1778
|
/** @type {Derived} */
|
|
1785
1779
|
e
|
|
1786
1780
|
))
|
|
1787
1781
|
return !0;
|
|
1788
1782
|
return !1;
|
|
1789
1783
|
}
|
|
1790
|
-
function
|
|
1791
|
-
var e =
|
|
1784
|
+
function Or(t) {
|
|
1785
|
+
var e = ne;
|
|
1792
1786
|
try {
|
|
1793
|
-
return
|
|
1787
|
+
return ne = !0, t();
|
|
1794
1788
|
} finally {
|
|
1795
|
-
|
|
1789
|
+
ne = e;
|
|
1796
1790
|
}
|
|
1797
1791
|
}
|
|
1798
|
-
const
|
|
1799
|
-
function
|
|
1800
|
-
return
|
|
1792
|
+
const Ti = ["touchstart", "touchmove"];
|
|
1793
|
+
function Ai(t) {
|
|
1794
|
+
return Ti.includes(t);
|
|
1801
1795
|
}
|
|
1802
|
-
const
|
|
1803
|
-
let
|
|
1804
|
-
function
|
|
1796
|
+
const Ni = /* @__PURE__ */ Symbol("events"), Ci = /* @__PURE__ */ new Set(), Ln = /* @__PURE__ */ new Set();
|
|
1797
|
+
let Fn = null;
|
|
1798
|
+
function Vn(t) {
|
|
1805
1799
|
var e = this, n = (
|
|
1806
1800
|
/** @type {Node} */
|
|
1807
1801
|
e.ownerDocument
|
|
@@ -1809,13 +1803,13 @@ function Bn(t) {
|
|
|
1809
1803
|
/** @type {null | Element} */
|
|
1810
1804
|
s[0] || t.target
|
|
1811
1805
|
);
|
|
1812
|
-
|
|
1813
|
-
var a = 0, o =
|
|
1806
|
+
Fn = t;
|
|
1807
|
+
var a = 0, o = Fn === t && t.__root;
|
|
1814
1808
|
if (o) {
|
|
1815
1809
|
var l = s.indexOf(o);
|
|
1816
1810
|
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
1817
1811
|
window)) {
|
|
1818
|
-
t
|
|
1812
|
+
t.__root = e;
|
|
1819
1813
|
return;
|
|
1820
1814
|
}
|
|
1821
1815
|
var u = s.indexOf(e);
|
|
@@ -1825,49 +1819,49 @@ function Bn(t) {
|
|
|
1825
1819
|
}
|
|
1826
1820
|
if (i = /** @type {Element} */
|
|
1827
1821
|
s[a] || t.target, i !== e) {
|
|
1828
|
-
|
|
1822
|
+
Os(t, "currentTarget", {
|
|
1829
1823
|
configurable: !0,
|
|
1830
1824
|
get() {
|
|
1831
1825
|
return i || n;
|
|
1832
1826
|
}
|
|
1833
1827
|
});
|
|
1834
|
-
var c = y,
|
|
1835
|
-
|
|
1828
|
+
var c = y, h = _;
|
|
1829
|
+
Q(null), ce(null);
|
|
1836
1830
|
try {
|
|
1837
1831
|
for (var f, m = []; i !== null; ) {
|
|
1838
|
-
var
|
|
1832
|
+
var p = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1839
1833
|
i.host || null;
|
|
1840
1834
|
try {
|
|
1841
|
-
var v = i[
|
|
1835
|
+
var v = i[Ni]?.[r];
|
|
1842
1836
|
v != null && (!/** @type {any} */
|
|
1843
1837
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1844
1838
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1845
1839
|
t.target === i) && v.call(i, t);
|
|
1846
|
-
} catch (
|
|
1847
|
-
f ? m.push(
|
|
1840
|
+
} catch (M) {
|
|
1841
|
+
f ? m.push(M) : f = M;
|
|
1848
1842
|
}
|
|
1849
|
-
if (t.cancelBubble ||
|
|
1843
|
+
if (t.cancelBubble || p === e || p === null)
|
|
1850
1844
|
break;
|
|
1851
|
-
i =
|
|
1845
|
+
i = p;
|
|
1852
1846
|
}
|
|
1853
1847
|
if (f) {
|
|
1854
|
-
for (let
|
|
1848
|
+
for (let M of m)
|
|
1855
1849
|
queueMicrotask(() => {
|
|
1856
|
-
throw
|
|
1850
|
+
throw M;
|
|
1857
1851
|
});
|
|
1858
1852
|
throw f;
|
|
1859
1853
|
}
|
|
1860
1854
|
} finally {
|
|
1861
|
-
t
|
|
1855
|
+
t.__root = e, delete t.currentTarget, Q(c), ce(h);
|
|
1862
1856
|
}
|
|
1863
1857
|
}
|
|
1864
1858
|
}
|
|
1865
|
-
const Ri = (
|
|
1866
|
-
|
|
1867
|
-
|
|
1859
|
+
const Ri = /* @__PURE__ */ globalThis?.window?.trustedTypes?.createPolicy(
|
|
1860
|
+
"svelte-trusted-html",
|
|
1861
|
+
{
|
|
1868
1862
|
/** @param {string} html */
|
|
1869
1863
|
createHTML: (t) => t
|
|
1870
|
-
}
|
|
1864
|
+
}
|
|
1871
1865
|
);
|
|
1872
1866
|
function Di(t) {
|
|
1873
1867
|
return (
|
|
@@ -1876,7 +1870,7 @@ function Di(t) {
|
|
|
1876
1870
|
);
|
|
1877
1871
|
}
|
|
1878
1872
|
function Oi(t, e = !1) {
|
|
1879
|
-
var n =
|
|
1873
|
+
var n = mi("template");
|
|
1880
1874
|
return t = t.replaceAll("<!>", "<!---->"), n.innerHTML = e ? Di(t) : t, n.content;
|
|
1881
1875
|
}
|
|
1882
1876
|
function zi(t, e) {
|
|
@@ -1887,102 +1881,102 @@ function zi(t, e) {
|
|
|
1887
1881
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1888
1882
|
}
|
|
1889
1883
|
// @__NO_SIDE_EFFECTS__
|
|
1890
|
-
function
|
|
1884
|
+
function zr(t, e) {
|
|
1891
1885
|
var n, r = !t.startsWith("<!>");
|
|
1892
1886
|
return () => {
|
|
1893
1887
|
n === void 0 && (n = Oi(r ? t : "<!>" + t, !0), n = /** @type {TemplateNode} */
|
|
1894
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ br(n));
|
|
1895
1889
|
var s = (
|
|
1896
1890
|
/** @type {TemplateNode} */
|
|
1897
|
-
|
|
1891
|
+
wr ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1898
1892
|
);
|
|
1899
1893
|
return zi(s, s), s;
|
|
1900
1894
|
};
|
|
1901
1895
|
}
|
|
1902
|
-
function
|
|
1896
|
+
function $r(t, e) {
|
|
1903
1897
|
t !== null && t.before(
|
|
1904
1898
|
/** @type {Node} */
|
|
1905
1899
|
e
|
|
1906
1900
|
);
|
|
1907
1901
|
}
|
|
1908
|
-
function
|
|
1902
|
+
function hn(t, e) {
|
|
1909
1903
|
return $i(t, e);
|
|
1910
1904
|
}
|
|
1911
|
-
const
|
|
1905
|
+
const wt = /* @__PURE__ */ new Map();
|
|
1912
1906
|
function $i(t, { target: e, anchor: n, props: r = {}, events: s, context: i, intro: a = !0 }) {
|
|
1913
|
-
|
|
1914
|
-
var o =
|
|
1915
|
-
var
|
|
1916
|
-
|
|
1907
|
+
pi();
|
|
1908
|
+
var o = /* @__PURE__ */ new Set(), l = (h) => {
|
|
1909
|
+
for (var f = 0; f < h.length; f++) {
|
|
1910
|
+
var m = h[f];
|
|
1911
|
+
if (!o.has(m)) {
|
|
1912
|
+
o.add(m);
|
|
1913
|
+
var p = Ai(m);
|
|
1914
|
+
for (const N of [e, document]) {
|
|
1915
|
+
var v = wt.get(N);
|
|
1916
|
+
v === void 0 && (v = /* @__PURE__ */ new Map(), wt.set(N, v));
|
|
1917
|
+
var M = v.get(m);
|
|
1918
|
+
M === void 0 ? (N.addEventListener(m, Vn, { passive: p }), v.set(m, 1)) : v.set(m, M + 1);
|
|
1919
|
+
}
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
l(Ds(Ci)), Ln.add(l);
|
|
1924
|
+
var u = void 0, c = yi(() => {
|
|
1925
|
+
var h = n ?? e.appendChild(_r());
|
|
1926
|
+
return ri(
|
|
1917
1927
|
/** @type {TemplateNode} */
|
|
1918
|
-
|
|
1928
|
+
h,
|
|
1919
1929
|
{
|
|
1920
1930
|
pending: () => {
|
|
1921
1931
|
}
|
|
1922
1932
|
},
|
|
1923
1933
|
(f) => {
|
|
1924
|
-
|
|
1934
|
+
rn({});
|
|
1925
1935
|
var m = (
|
|
1926
1936
|
/** @type {ComponentContext} */
|
|
1927
|
-
|
|
1937
|
+
ie
|
|
1928
1938
|
);
|
|
1929
|
-
i && (m.c = i), s && (r.$$events = s),
|
|
1939
|
+
i && (m.c = i), s && (r.$$events = s), u = t(f, r) || {}, sn();
|
|
1930
1940
|
}
|
|
1931
|
-
)
|
|
1932
|
-
|
|
1933
|
-
for (var m = 0; m < f.length; m++) {
|
|
1934
|
-
var h = f[m];
|
|
1935
|
-
if (!c.has(h)) {
|
|
1936
|
-
c.add(h);
|
|
1937
|
-
var v = Ni(h);
|
|
1938
|
-
for (const Z of [e, document]) {
|
|
1939
|
-
var b = yt.get(Z);
|
|
1940
|
-
b === void 0 && (b = /* @__PURE__ */ new Map(), yt.set(Z, b));
|
|
1941
|
-
var z = b.get(h);
|
|
1942
|
-
z === void 0 ? (Z.addEventListener(h, Bn, { passive: v }), b.set(h, 1)) : b.set(h, z + 1);
|
|
1943
|
-
}
|
|
1944
|
-
}
|
|
1945
|
-
}
|
|
1946
|
-
};
|
|
1947
|
-
return d(Os(Ci)), Vn.add(d), () => {
|
|
1948
|
-
for (var f of c)
|
|
1941
|
+
), () => {
|
|
1942
|
+
for (var f of o)
|
|
1949
1943
|
for (const v of [e, document]) {
|
|
1950
1944
|
var m = (
|
|
1951
1945
|
/** @type {Map<string, number>} */
|
|
1952
|
-
|
|
1953
|
-
),
|
|
1946
|
+
wt.get(v)
|
|
1947
|
+
), p = (
|
|
1954
1948
|
/** @type {number} */
|
|
1955
1949
|
m.get(f)
|
|
1956
1950
|
);
|
|
1957
|
-
--
|
|
1951
|
+
--p == 0 ? (v.removeEventListener(f, Vn), m.delete(f), m.size === 0 && wt.delete(v)) : m.set(f, p);
|
|
1958
1952
|
}
|
|
1959
|
-
|
|
1953
|
+
Ln.delete(l), h !== n && h.parentNode?.removeChild(h);
|
|
1960
1954
|
};
|
|
1961
1955
|
});
|
|
1962
|
-
return Li.set(
|
|
1956
|
+
return Li.set(u, c), u;
|
|
1963
1957
|
}
|
|
1964
1958
|
let Li = /* @__PURE__ */ new WeakMap();
|
|
1965
|
-
function
|
|
1959
|
+
function Lr(t) {
|
|
1966
1960
|
var e, n, r = "";
|
|
1967
1961
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1968
1962
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1969
1963
|
var s = t.length;
|
|
1970
|
-
for (e = 0; e < s; e++) t[e] && (n =
|
|
1964
|
+
for (e = 0; e < s; e++) t[e] && (n = Lr(t[e])) && (r && (r += " "), r += n);
|
|
1971
1965
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1972
1966
|
return r;
|
|
1973
1967
|
}
|
|
1974
1968
|
function Fi() {
|
|
1975
|
-
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e =
|
|
1969
|
+
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Lr(t)) && (r && (r += " "), r += e);
|
|
1976
1970
|
return r;
|
|
1977
1971
|
}
|
|
1978
|
-
function
|
|
1972
|
+
function Fr(t) {
|
|
1979
1973
|
return typeof t == "object" ? Fi(t) : t ?? "";
|
|
1980
1974
|
}
|
|
1981
1975
|
function Vi(t, e, n) {
|
|
1982
1976
|
var r = t == null ? "" : "" + t;
|
|
1983
1977
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
1984
1978
|
}
|
|
1985
|
-
function
|
|
1979
|
+
function jn(t, e = !1) {
|
|
1986
1980
|
var n = e ? " !important;" : ";", r = "";
|
|
1987
1981
|
for (var s in t) {
|
|
1988
1982
|
var i = t[s];
|
|
@@ -1993,11 +1987,11 @@ function Un(t, e = !1) {
|
|
|
1993
1987
|
function ji(t, e) {
|
|
1994
1988
|
if (e) {
|
|
1995
1989
|
var n = "", r, s;
|
|
1996
|
-
return Array.isArray(e) ? (r = e[0], s = e[1]) : r = e, r && (n +=
|
|
1990
|
+
return Array.isArray(e) ? (r = e[0], s = e[1]) : r = e, r && (n += jn(r)), s && (n += jn(s, !0)), n = n.trim(), n === "" ? null : n;
|
|
1997
1991
|
}
|
|
1998
1992
|
return String(t);
|
|
1999
1993
|
}
|
|
2000
|
-
function
|
|
1994
|
+
function Vr(t, e, n, r, s, i) {
|
|
2001
1995
|
var a = t.__className;
|
|
2002
1996
|
if (a !== n || a === void 0) {
|
|
2003
1997
|
var o = Vi(n, r);
|
|
@@ -2005,7 +1999,7 @@ function jr(t, e, n, r, s, i) {
|
|
|
2005
1999
|
}
|
|
2006
2000
|
return i;
|
|
2007
2001
|
}
|
|
2008
|
-
function
|
|
2002
|
+
function Wt(t, e = {}, n, r) {
|
|
2009
2003
|
for (var s in n) {
|
|
2010
2004
|
var i = n[s];
|
|
2011
2005
|
e[s] !== i && (n[s] == null ? t.style.removeProperty(s) : t.style.setProperty(s, i, r));
|
|
@@ -2016,27 +2010,27 @@ function nt(t, e, n, r) {
|
|
|
2016
2010
|
if (s !== e) {
|
|
2017
2011
|
var i = ji(e, r);
|
|
2018
2012
|
i == null ? t.removeAttribute("style") : t.style.cssText = i, t.__style = e;
|
|
2019
|
-
} else r && (Array.isArray(r) ? (
|
|
2013
|
+
} else r && (Array.isArray(r) ? (Wt(t, n?.[0], r[0]), Wt(t, n?.[1], r[1], "important")) : Wt(t, n, r));
|
|
2020
2014
|
return r;
|
|
2021
2015
|
}
|
|
2022
|
-
function
|
|
2016
|
+
function Bn(t, e) {
|
|
2023
2017
|
return t === e || t?.[_t] === e;
|
|
2024
2018
|
}
|
|
2025
2019
|
function rt(t = {}, e, n, r) {
|
|
2026
|
-
return
|
|
2020
|
+
return ki(() => {
|
|
2027
2021
|
var s, i;
|
|
2028
|
-
return
|
|
2029
|
-
s = i, i = [],
|
|
2030
|
-
t !== n(...i) && (e(t, ...i), s &&
|
|
2022
|
+
return Er(() => {
|
|
2023
|
+
s = i, i = [], Or(() => {
|
|
2024
|
+
t !== n(...i) && (e(t, ...i), s && Bn(n(...s), t) && e(null, ...s));
|
|
2031
2025
|
});
|
|
2032
2026
|
}), () => {
|
|
2033
|
-
|
|
2034
|
-
i &&
|
|
2027
|
+
Ce(() => {
|
|
2028
|
+
i && Bn(n(...i), t) && e(null, ...i);
|
|
2035
2029
|
});
|
|
2036
2030
|
};
|
|
2037
2031
|
}), t;
|
|
2038
2032
|
}
|
|
2039
|
-
class
|
|
2033
|
+
class pn {
|
|
2040
2034
|
div;
|
|
2041
2035
|
marker;
|
|
2042
2036
|
constructor(e, n, r, s) {
|
|
@@ -2066,10 +2060,10 @@ class pt {
|
|
|
2066
2060
|
}
|
|
2067
2061
|
const Bi = "5";
|
|
2068
2062
|
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Bi);
|
|
2069
|
-
function
|
|
2063
|
+
function jr(t) {
|
|
2070
2064
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2071
2065
|
}
|
|
2072
|
-
class
|
|
2066
|
+
class Br {
|
|
2073
2067
|
animating;
|
|
2074
2068
|
animationEasing;
|
|
2075
2069
|
animationCallback;
|
|
@@ -2113,12 +2107,12 @@ class Ur {
|
|
|
2113
2107
|
return performance.now() > this.time.end;
|
|
2114
2108
|
}
|
|
2115
2109
|
}
|
|
2116
|
-
var Ui = /* @__PURE__ */
|
|
2110
|
+
var Ui = /* @__PURE__ */ zr("<div></div>");
|
|
2117
2111
|
function Wi(t, e) {
|
|
2118
|
-
|
|
2112
|
+
rn(e, !0);
|
|
2119
2113
|
let n = e.id, r = e.style, s = e.content, i = {
|
|
2120
|
-
setDisplayed:
|
|
2121
|
-
getDisplayed:
|
|
2114
|
+
setDisplayed: fe,
|
|
2115
|
+
getDisplayed: Le,
|
|
2122
2116
|
setSuppressed: Ie,
|
|
2123
2117
|
setCollapsed: he,
|
|
2124
2118
|
getCollapsed: ye,
|
|
@@ -2127,59 +2121,59 @@ function Wi(t, e) {
|
|
|
2127
2121
|
function a() {
|
|
2128
2122
|
return i;
|
|
2129
2123
|
}
|
|
2130
|
-
let o, l = r.dimensions.width, u = r.dimensions.height, c = r.dimensions.radius,
|
|
2131
|
-
function
|
|
2124
|
+
let o, l = r.dimensions.width, u = r.dimensions.height, c = r.dimensions.radius, h = r.dimensions.padding ?? er, f = r.colors?.border ?? Yt, m = r.colors?.background ?? As, p = r.colors?.shadow ?? tr, v = /* @__PURE__ */ U(!1), M = !1, N = !1;
|
|
2125
|
+
function fe(k) {
|
|
2132
2126
|
if (k != E(v)) {
|
|
2133
2127
|
if (H(v, k, !0), k == !0) {
|
|
2134
|
-
if (s == null ||
|
|
2135
|
-
|
|
2128
|
+
if (s == null || N || M) return;
|
|
2129
|
+
M = !0, s(n).then((ke) => {
|
|
2136
2130
|
ke instanceof HTMLElement ? o.appendChild(ke) : console.error("Failed to load pin content");
|
|
2137
2131
|
}).catch((ke) => console.error(ke)).finally(() => {
|
|
2138
|
-
|
|
2132
|
+
N = !0, M = !1;
|
|
2139
2133
|
});
|
|
2140
2134
|
}
|
|
2141
|
-
k == !1 &&
|
|
2135
|
+
k == !1 && Z.end();
|
|
2142
2136
|
}
|
|
2143
2137
|
}
|
|
2144
|
-
function
|
|
2138
|
+
function Le() {
|
|
2145
2139
|
return E(v);
|
|
2146
2140
|
}
|
|
2147
2141
|
let Pe = /* @__PURE__ */ U(!0);
|
|
2148
2142
|
function Ie(k) {
|
|
2149
|
-
k != E(Pe) && (H(Pe, k, !0), k && (
|
|
2143
|
+
k != E(Pe) && (H(Pe, k, !0), k && (ee = Fe, Z.set(Fe)));
|
|
2150
2144
|
}
|
|
2151
2145
|
let B = /* @__PURE__ */ U(!0);
|
|
2152
2146
|
function he(k) {
|
|
2153
|
-
k != E(B) && (H(B, k, !0),
|
|
2147
|
+
k != E(B) && (H(B, k, !0), Z.target(E(B) ? 0 : ee));
|
|
2154
2148
|
}
|
|
2155
2149
|
function ye() {
|
|
2156
|
-
return E(v) ?
|
|
2150
|
+
return E(v) ? Z.expired() : !0;
|
|
2157
2151
|
}
|
|
2158
|
-
let
|
|
2159
|
-
value:
|
|
2152
|
+
let ee = Fe, Z = new Br({
|
|
2153
|
+
value: Fe,
|
|
2160
2154
|
min: 0,
|
|
2161
2155
|
max: 1,
|
|
2162
|
-
timespan:
|
|
2163
|
-
easing:
|
|
2164
|
-
callback:
|
|
2156
|
+
timespan: Ss,
|
|
2157
|
+
easing: jr,
|
|
2158
|
+
callback: Nt
|
|
2165
2159
|
});
|
|
2166
2160
|
function Ke(k) {
|
|
2167
|
-
|
|
2161
|
+
ee = k, Z.target(k);
|
|
2168
2162
|
}
|
|
2169
|
-
function
|
|
2163
|
+
function Nt(k) {
|
|
2170
2164
|
o.style.scale = k.toString(), o.style.filter = `brightness(${dt(k)})`;
|
|
2171
2165
|
}
|
|
2172
2166
|
function dt(k) {
|
|
2173
2167
|
return 0.25 + 0.75 * k;
|
|
2174
2168
|
}
|
|
2175
|
-
var
|
|
2169
|
+
var Ct = { invoke: a }, pe = Ui();
|
|
2176
2170
|
let mt;
|
|
2177
|
-
return rt(pe, (k) => o = k, () => o),
|
|
2171
|
+
return rt(pe, (k) => o = k, () => o), xr(
|
|
2178
2172
|
(k) => {
|
|
2179
|
-
|
|
2173
|
+
Vr(
|
|
2180
2174
|
pe,
|
|
2181
2175
|
1,
|
|
2182
|
-
|
|
2176
|
+
Fr([
|
|
2183
2177
|
"pin",
|
|
2184
2178
|
E(v) && "displayed",
|
|
2185
2179
|
E(Pe) && "suppressed"
|
|
@@ -2194,13 +2188,13 @@ function Wi(t, e) {
|
|
|
2194
2188
|
"border-radius": `${c}px`,
|
|
2195
2189
|
"border-color": f,
|
|
2196
2190
|
"background-color": m,
|
|
2197
|
-
"border-width": `${
|
|
2198
|
-
"box-shadow":
|
|
2199
|
-
scale:
|
|
2200
|
-
filter: `brightness(${dt(
|
|
2191
|
+
"border-width": `${h}px`,
|
|
2192
|
+
"box-shadow": p,
|
|
2193
|
+
scale: Fe,
|
|
2194
|
+
filter: `brightness(${dt(Fe)})`
|
|
2201
2195
|
})
|
|
2202
2196
|
]
|
|
2203
|
-
),
|
|
2197
|
+
), $r(t, pe), sn(Ct);
|
|
2204
2198
|
}
|
|
2205
2199
|
class Hi extends pt {
|
|
2206
2200
|
width;
|
|
@@ -2208,9 +2202,9 @@ class Hi extends pt {
|
|
|
2208
2202
|
zoom;
|
|
2209
2203
|
component;
|
|
2210
2204
|
constructor(e, n) {
|
|
2211
|
-
super(e, new
|
|
2212
|
-
const r = e.pin?.style.dimensions.width ??
|
|
2213
|
-
this.width = r, this.height = s, this.zoom = NaN, this.component =
|
|
2205
|
+
super(e, new pn(n, e.lat, e.lng, e.rank));
|
|
2206
|
+
const r = e.pin?.style.dimensions.width ?? Ut, s = e.pin?.style.dimensions.height ?? Ut, i = e.pin?.style.dimensions.padding ?? er, a = e.pin?.style.dimensions.radius ?? Ut / 2;
|
|
2207
|
+
this.width = r, this.height = s, this.zoom = NaN, this.component = hn(Wi, {
|
|
2214
2208
|
target: this.marker.div,
|
|
2215
2209
|
props: {
|
|
2216
2210
|
id: this.id,
|
|
@@ -2228,10 +2222,10 @@ class Hi extends pt {
|
|
|
2228
2222
|
});
|
|
2229
2223
|
}
|
|
2230
2224
|
get zIndex() {
|
|
2231
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2225
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * Qn) + Is;
|
|
2232
2226
|
}
|
|
2233
2227
|
}
|
|
2234
|
-
class
|
|
2228
|
+
class Un {
|
|
2235
2229
|
animating;
|
|
2236
2230
|
animationTimestamp;
|
|
2237
2231
|
animationEnd;
|
|
@@ -2285,132 +2279,132 @@ class Hn {
|
|
|
2285
2279
|
return performance.now() > this.animationEnd;
|
|
2286
2280
|
}
|
|
2287
2281
|
}
|
|
2288
|
-
function
|
|
2282
|
+
function en(t, e, n) {
|
|
2289
2283
|
if (t <= 0 || e <= 0) return { x: 0, y: 0 };
|
|
2290
2284
|
let r = t / 2, s = e / 2, i = Math.sqrt(r * r + s * s), a = Math.atan(s / r) * (180 / Math.PI), o = n * (Math.PI / 180);
|
|
2291
2285
|
return n < 180 ? n < 90 ? n < a ? { x: 0, y: i * Math.sin(o) - s } : { x: i * Math.cos(o) - r, y: 0 } : n < 180 - a ? { x: i * Math.cos(o) - r, y: 0 } : { x: -t, y: i * Math.sin(o) - s } : n < 270 ? n < 180 + a ? { x: -t, y: i * Math.sin(o) - s } : { x: i * Math.cos(o) - r, y: -e } : n < 360 - a ? { x: i * Math.cos(o) - r, y: -e } : { x: 0, y: i * Math.sin(o) - s };
|
|
2292
2286
|
}
|
|
2293
|
-
var qi = /* @__PURE__ */
|
|
2294
|
-
function
|
|
2295
|
-
|
|
2287
|
+
var qi = /* @__PURE__ */ zr('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element tooltip svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
|
|
2288
|
+
function Ur(t, e) {
|
|
2289
|
+
rn(e, !0);
|
|
2296
2290
|
let n = e.id, r = e.style, s = e.content, i = {
|
|
2297
|
-
setDisplayed:
|
|
2298
|
-
getDisplayed:
|
|
2299
|
-
setCollapsed:
|
|
2291
|
+
setDisplayed: ee,
|
|
2292
|
+
getDisplayed: Z,
|
|
2293
|
+
setCollapsed: Nt,
|
|
2300
2294
|
getCollapsed: dt,
|
|
2301
|
-
getExpanded:
|
|
2302
|
-
setAngle:
|
|
2295
|
+
getExpanded: Ct,
|
|
2296
|
+
setAngle: ls
|
|
2303
2297
|
};
|
|
2304
2298
|
function a() {
|
|
2305
2299
|
return i;
|
|
2306
2300
|
}
|
|
2307
|
-
let o, l = r.colors?.shadow ??
|
|
2308
|
-
function
|
|
2301
|
+
let o, l = r.colors?.shadow ?? tr, u, c = Math.min(r.dimensions.width, r.dimensions.height) / Math.SQRT2 - r.dimensions.margin, h = r.colors?.background ?? Yt, f = Math.max(1, r.dimensions.radius / c), m, p = r.dimensions.width + 2 * r.dimensions.margin, v = r.dimensions.height + 2 * r.dimensions.margin, M = r.dimensions.margin, N, fe = r.dimensions.width, Le = r.dimensions.height, Pe = r.dimensions.radius, Ie = r.colors?.background ?? Yt, B = /* @__PURE__ */ U(!1), he = !1, ye = !1;
|
|
2302
|
+
function ee(w) {
|
|
2309
2303
|
if (w != E(B)) {
|
|
2310
2304
|
if (H(B, w, !0), w) {
|
|
2311
2305
|
if (s == null || ye || he) return;
|
|
2312
2306
|
he = !0, s(n).then((de) => {
|
|
2313
|
-
de instanceof HTMLElement ?
|
|
2307
|
+
de instanceof HTMLElement ? N.appendChild(de) : console.error("Failed to load tooltip content");
|
|
2314
2308
|
}).catch((de) => console.error(de)).finally(() => {
|
|
2315
2309
|
ye = !0, he = !1;
|
|
2316
2310
|
});
|
|
2317
2311
|
}
|
|
2318
|
-
w == !1 && (pe.end(),
|
|
2312
|
+
w == !1 && (pe.end(), Rt.end(), Dt.end());
|
|
2319
2313
|
}
|
|
2320
2314
|
}
|
|
2321
|
-
function
|
|
2315
|
+
function Z() {
|
|
2322
2316
|
return E(B);
|
|
2323
2317
|
}
|
|
2324
2318
|
let Ke = /* @__PURE__ */ U(!0);
|
|
2325
|
-
function
|
|
2319
|
+
function Nt(w) {
|
|
2326
2320
|
w != E(Ke) && (H(Ke, w, !0), pe.target(E(Ke) ? 0 : 1));
|
|
2327
2321
|
}
|
|
2328
2322
|
function dt() {
|
|
2329
2323
|
return E(B) ? pe.expired() : !0;
|
|
2330
2324
|
}
|
|
2331
|
-
function
|
|
2325
|
+
function Ct() {
|
|
2332
2326
|
return E(B) ? pe.expired() : !1;
|
|
2333
2327
|
}
|
|
2334
|
-
let pe = new
|
|
2328
|
+
let pe = new Br({
|
|
2335
2329
|
value: 0,
|
|
2336
2330
|
min: 0,
|
|
2337
2331
|
max: 1,
|
|
2338
|
-
timespan:
|
|
2339
|
-
easing:
|
|
2332
|
+
timespan: Ps,
|
|
2333
|
+
easing: jr,
|
|
2340
2334
|
callback: mt
|
|
2341
2335
|
});
|
|
2342
2336
|
function mt(w) {
|
|
2343
2337
|
o.style.opacity = `${w}`, m.style.scale = `${w}`, u.style.scale = `${w}`;
|
|
2344
2338
|
}
|
|
2345
|
-
let k = NaN, ke = /* @__PURE__ */ U(!1),
|
|
2346
|
-
value: -
|
|
2347
|
-
min: -
|
|
2339
|
+
let k = NaN, ke = /* @__PURE__ */ U(!1), vn = -p / 2, Rt = new Un({
|
|
2340
|
+
value: -p / 2,
|
|
2341
|
+
min: -p,
|
|
2348
2342
|
max: 0,
|
|
2349
2343
|
precision: 1,
|
|
2350
|
-
stiffness:
|
|
2351
|
-
callback:
|
|
2352
|
-
}),
|
|
2344
|
+
stiffness: In,
|
|
2345
|
+
callback: us
|
|
2346
|
+
}), gn = -v / 2, Dt = new Un({
|
|
2353
2347
|
value: -v / 2,
|
|
2354
2348
|
min: -v,
|
|
2355
2349
|
max: 0,
|
|
2356
2350
|
precision: 1,
|
|
2357
|
-
stiffness:
|
|
2358
|
-
callback:
|
|
2351
|
+
stiffness: In,
|
|
2352
|
+
callback: cs
|
|
2359
2353
|
});
|
|
2360
|
-
function
|
|
2354
|
+
function ls(w, de) {
|
|
2361
2355
|
if (Number.isNaN(w)) {
|
|
2362
2356
|
k = NaN, H(ke, !1);
|
|
2363
2357
|
return;
|
|
2364
2358
|
}
|
|
2365
2359
|
if (E(ke) == !1 || de == !0) {
|
|
2366
2360
|
H(ke, !0), k = w;
|
|
2367
|
-
const me =
|
|
2368
|
-
|
|
2361
|
+
const me = en(p, v, w);
|
|
2362
|
+
Rt.set(Math.round(me.x)), Dt.set(Math.round(me.y));
|
|
2369
2363
|
return;
|
|
2370
2364
|
}
|
|
2371
2365
|
if (k != w) {
|
|
2372
2366
|
k = w;
|
|
2373
|
-
const me =
|
|
2374
|
-
|
|
2367
|
+
const me = en(p, v, w);
|
|
2368
|
+
Rt.target(Math.round(me.x)), Dt.target(Math.round(me.y));
|
|
2375
2369
|
return;
|
|
2376
2370
|
}
|
|
2377
2371
|
}
|
|
2378
|
-
function
|
|
2379
|
-
|
|
2380
|
-
}
|
|
2381
|
-
function fs(w) {
|
|
2382
|
-
yn = w, kn();
|
|
2383
|
-
}
|
|
2384
|
-
function kn() {
|
|
2385
|
-
const w = wn, de = yn, me = w + h / 2, Lt = de + v / 2, Ft = v < h ? me * v / h : me, Vt = v > h ? Lt * h / v : Lt, ps = Math.atan2(Vt, Ft) / Math.PI * 180 - 45, jt = Math.sqrt(Ft * Ft + Vt * Vt), et = Math.min(h, v) / 2, ds = et * Math.SQRT2, Bt = (jt - et) / (ds - et), Sn = 0, Pn = Sn + Bt * (22.5 - Sn), ms = jt < et ? jt / et : 1, vs = -b * (me / h) * Bt, gs = -b * (Lt / v) * Bt;
|
|
2386
|
-
m.style.transform = `translate(${Math.round(w)}px, ${Math.round(de)}px)`, u.style.transform = `scale(${ms}) rotate(${ps}deg) skew(${Pn}deg, ${Pn}deg)`, z.style.transform = `translate(${Math.round(vs)}px, ${Math.round(gs)}px)`;
|
|
2372
|
+
function us(w) {
|
|
2373
|
+
vn = w, wn();
|
|
2387
2374
|
}
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2375
|
+
function cs(w) {
|
|
2376
|
+
gn = w, wn();
|
|
2377
|
+
}
|
|
2378
|
+
function wn() {
|
|
2379
|
+
const w = vn, de = gn, me = w + p / 2, $t = de + v / 2, Lt = v < p ? me * v / p : me, Ft = v > p ? $t * p / v : $t, hs = Math.atan2(Ft, Lt) / Math.PI * 180 - 45, Vt = Math.sqrt(Lt * Lt + Ft * Ft), et = Math.min(p, v) / 2, ps = et * Math.SQRT2, jt = (Vt - et) / (ps - et), En = 0, xn = En + jt * (22.5 - En), ds = Vt < et ? Vt / et : 1, ms = -M * (me / p) * jt, vs = -M * ($t / v) * jt;
|
|
2380
|
+
m.style.transform = `translate(${Math.round(w)}px, ${Math.round(de)}px)`, u.style.transform = `scale(${ds}) rotate(${hs}deg) skew(${xn}deg, ${xn}deg)`, N.style.transform = `translate(${Math.round(ms)}px, ${Math.round(vs)}px)`;
|
|
2381
|
+
}
|
|
2382
|
+
var fs = { invoke: a }, Qe = qi();
|
|
2383
|
+
let yn;
|
|
2384
|
+
var Ot = On(Qe);
|
|
2385
|
+
let kn;
|
|
2386
|
+
rt(Ot, (w) => u = w, () => u);
|
|
2387
|
+
var zt = di(Ot, 2);
|
|
2391
2388
|
let _n;
|
|
2392
|
-
|
|
2393
|
-
var $t = mi(zt, 2);
|
|
2389
|
+
var bn = On(zt);
|
|
2394
2390
|
let Mn;
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
return rt(En, (w) => z = w, () => z), rt($t, (w) => m = w, () => m), rt(Qe, (w) => o = w, () => o), Sr(() => {
|
|
2398
|
-
jr(Qe, 1, Vr(["element anchor", E(B) && "displayed"]), "svelte-1no6o2a"), bn = nt(Qe, "", bn, { filter: `drop-shadow(${l})` }), _n = nt(zt, "", _n, {
|
|
2391
|
+
return rt(bn, (w) => N = w, () => N), rt(zt, (w) => m = w, () => m), rt(Qe, (w) => o = w, () => o), xr(() => {
|
|
2392
|
+
Vr(Qe, 1, Fr(["element anchor", E(B) && "displayed"]), "svelte-1no6o2a"), yn = nt(Qe, "", yn, { filter: `drop-shadow(${l})` }), kn = nt(Ot, "", kn, {
|
|
2399
2393
|
width: `${c}px`,
|
|
2400
2394
|
height: `${c}px`,
|
|
2401
|
-
"background-color":
|
|
2395
|
+
"background-color": h,
|
|
2402
2396
|
"border-radius": `${f}px`
|
|
2403
|
-
}),
|
|
2404
|
-
width: `${
|
|
2397
|
+
}), _n = nt(zt, "", _n, {
|
|
2398
|
+
width: `${p}px`,
|
|
2405
2399
|
height: `${v}px`,
|
|
2406
|
-
padding: `${
|
|
2407
|
-
}),
|
|
2408
|
-
width: `${
|
|
2409
|
-
height: `${
|
|
2400
|
+
padding: `${M}px`
|
|
2401
|
+
}), Mn = nt(bn, "", Mn, {
|
|
2402
|
+
width: `${fe}px`,
|
|
2403
|
+
height: `${Le}px`,
|
|
2410
2404
|
"border-radius": `${Pe}px`,
|
|
2411
2405
|
"background-color": Ie
|
|
2412
2406
|
});
|
|
2413
|
-
}),
|
|
2407
|
+
}), $r(t, Qe), sn(fs);
|
|
2414
2408
|
}
|
|
2415
2409
|
class Zi extends pt {
|
|
2416
2410
|
width;
|
|
@@ -2420,7 +2414,7 @@ class Zi extends pt {
|
|
|
2420
2414
|
states;
|
|
2421
2415
|
component;
|
|
2422
2416
|
constructor(e, n) {
|
|
2423
|
-
super(e, new
|
|
2417
|
+
super(e, new pn(n, e.lat, e.lng, e.rank)), this.width = e.tooltip.style.dimensions.width + e.tooltip.style.dimensions.margin * 2, this.height = e.tooltip.style.dimensions.height + e.tooltip.style.dimensions.margin * 2, this.zoom = NaN, this.angle = NaN, this.states = [], this.component = hn(Ur, {
|
|
2424
2418
|
target: this.marker.div,
|
|
2425
2419
|
props: {
|
|
2426
2420
|
id: this.id,
|
|
@@ -2430,7 +2424,7 @@ class Zi extends pt {
|
|
|
2430
2424
|
});
|
|
2431
2425
|
}
|
|
2432
2426
|
get zIndex() {
|
|
2433
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2427
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * Qn) + Ts;
|
|
2434
2428
|
}
|
|
2435
2429
|
}
|
|
2436
2430
|
class Yi extends pt {
|
|
@@ -2441,7 +2435,7 @@ class Yi extends pt {
|
|
|
2441
2435
|
component;
|
|
2442
2436
|
constructor(e, n) {
|
|
2443
2437
|
if (e.popup == null) throw new Error("Failed to create popup");
|
|
2444
|
-
super(e, new
|
|
2438
|
+
super(e, new pn(n, e.lat, e.lng, Tn)), this.width = e.popup.style.dimensions.width, this.height = e.popup.style.dimensions.height, this.margin = e.popup.style.dimensions.margin, this.angle = NaN, this.shown = !1, this.component = hn(Ur, {
|
|
2445
2439
|
target: this.marker.div,
|
|
2446
2440
|
props: {
|
|
2447
2441
|
id: this.id,
|
|
@@ -2451,7 +2445,7 @@ class Yi extends pt {
|
|
|
2451
2445
|
});
|
|
2452
2446
|
}
|
|
2453
2447
|
get zIndex() {
|
|
2454
|
-
return
|
|
2448
|
+
return Tn;
|
|
2455
2449
|
}
|
|
2456
2450
|
}
|
|
2457
2451
|
class Xi {
|
|
@@ -2464,7 +2458,7 @@ class Xi {
|
|
|
2464
2458
|
this.id = e.id, this.pin = new Hi(e, n), this.tooltip = new Zi(e, n), e.popup != null && (this.popup = new Yi(e, n));
|
|
2465
2459
|
}
|
|
2466
2460
|
}
|
|
2467
|
-
const
|
|
2461
|
+
const Ht = 4;
|
|
2468
2462
|
class Ji {
|
|
2469
2463
|
// Elements
|
|
2470
2464
|
pins = /* @__PURE__ */ new Set();
|
|
@@ -2472,10 +2466,10 @@ class Ji {
|
|
|
2472
2466
|
pinMaxWidth = 0;
|
|
2473
2467
|
pinMaxHeight = 0;
|
|
2474
2468
|
pinFade = !1;
|
|
2475
|
-
pinZoomMax =
|
|
2476
|
-
pinZoomDelta =
|
|
2469
|
+
pinZoomMax = Ht;
|
|
2470
|
+
pinZoomDelta = Ht;
|
|
2477
2471
|
set configuration(e) {
|
|
2478
|
-
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ??
|
|
2472
|
+
this.pinFade = e?.pin?.fade ?? !0, this.pinZoomMax = e?.pin?.maxZoom ?? Ht, this.pinZoomDelta = this.pinZoomMax;
|
|
2479
2473
|
}
|
|
2480
2474
|
insert(e, n) {
|
|
2481
2475
|
this.update(e, n), this.pins.add(e);
|
|
@@ -2504,7 +2498,7 @@ class Ji {
|
|
|
2504
2498
|
i.contains(a.lat, a.lng) ? Number.isNaN(a.zoom) ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setSuppressed(!0), a.component.invoke().setCollapsed(!1), a.marker.insert()) : (a.component.invoke().setSuppressed(!1), a.shown && r < a.zoom && a.zoom < r + this.pinZoomDelta ? (a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setScale(this.pinFade ? Math.max(0, 1 - (a.zoom - r) * 0.2) : 1), a.marker.insert()) : (a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove()))) : (a.component.invoke().setDisplayed(!1), a.marker.remove());
|
|
2505
2499
|
}
|
|
2506
2500
|
}
|
|
2507
|
-
var
|
|
2501
|
+
var Wr = [0, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330], Gi = 270;
|
|
2508
2502
|
class Ki {
|
|
2509
2503
|
// Elements
|
|
2510
2504
|
tooltips = /* @__PURE__ */ new Set();
|
|
@@ -2515,7 +2509,7 @@ class Ki {
|
|
|
2515
2509
|
this.update(e, n), this.tooltips.add(e);
|
|
2516
2510
|
}
|
|
2517
2511
|
update(e, n) {
|
|
2518
|
-
n ? (e.zoom = n[0], e.states = n[1].map((r) => [r[0],
|
|
2512
|
+
n ? (e.zoom = n[0], e.states = n[1].map((r) => [r[0], Wr[r[1]]])) : (e.zoom = NaN, e.states = []), e.marker.update(e.zIndex);
|
|
2519
2513
|
}
|
|
2520
2514
|
remove(e) {
|
|
2521
2515
|
e.shown = !0, e.zoom = NaN, e.angle = NaN, e.states = [], e.component.invoke().setAngle(NaN), e.component.invoke().setCollapsed(!0), e.component.invoke().setDisplayed(!1), e.marker.update(e.zIndex), e.marker.remove(), this.tooltips.delete(e);
|
|
@@ -2565,11 +2559,11 @@ class Qi {
|
|
|
2565
2559
|
}
|
|
2566
2560
|
show(e, n) {
|
|
2567
2561
|
if (!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !1, e.tooltip.shown = !1, e.popup.angle = e.tooltip.angle, e.popup.shown = !0, this.pan == !1)) return;
|
|
2568
|
-
const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l),
|
|
2569
|
-
let
|
|
2570
|
-
|
|
2571
|
-
let
|
|
2572
|
-
f <
|
|
2562
|
+
const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l), h = c.x - u.x, f = c.y - u.y, m = r.width + r.margin * 8, p = r.height + r.margin * 8, v = st(r.lat, r.lng, l), M = en(m, p, e.tooltip.angle), N = v.x + M.x, fe = N + m, Le = v.y + M.y, Pe = Le + p, Ie = N - u.x, B = c.x - fe, he = Le - u.y, ye = c.y - Pe;
|
|
2563
|
+
let ee = 0;
|
|
2564
|
+
h < m ? ee = (Ie - B) / 2 : (Ie < 0 && (ee = Ie), B < 0 && (ee = -B));
|
|
2565
|
+
let Z = 0;
|
|
2566
|
+
f < p ? Z = (he - ye) / 2 : (he < 0 && (Z = he), ye < 0 && (Z = -ye)), (ee != 0 || Z != 0) && n.panBy(ee, Z);
|
|
2573
2567
|
}
|
|
2574
2568
|
hide(e) {
|
|
2575
2569
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2636,11 +2630,11 @@ class ea {
|
|
|
2636
2630
|
}
|
|
2637
2631
|
//#endregion
|
|
2638
2632
|
}
|
|
2639
|
-
const
|
|
2633
|
+
const Hr = '(function(){"use strict";var i=a=>new Promise(t=>setTimeout(t,a));async function h(a,t){let s=0,o=Math.max(1,t?.retry?.times??1);for(;s<o;)try{return{data:await a(),error:null}}catch(r){if(s++,s==o){if(r instanceof Error)return(!t?.exceptions||t.exceptions.some(e=>r instanceof e)==!1)&&t?.catch?.(r),{data:null,error:r};throw t?.catch?.(r),r}else t?.retry?.delay&&await i(t.retry.delay)}throw Error("Unreachable code")}async function l(a,t,s,o,r){let e=await h(async()=>await(await fetch(a,{...s,method:"POST",body:t?JSON.stringify(t):void 0,headers:{...s?.headers,"Content-Type":"application/json"}})).json(),{retry:{times:o,delay:r}});if(e.error)throw e.error;return e.data}const f="https://maps.api.arenarium.dev/states",m=3,d=500,u={async fetch(a){const s={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}};return await l(f,a,s,m,d)}};class y{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:s,method:o,args:r}=t.data;try{const e=this.methods[o];if(typeof e!="function")throw new Error(`Unknown method: ${o}`);const n=await e(...r),c={id:s,result:n};self.postMessage(c)}catch(e){const n=e instanceof Error?e.message:String(e),c={id:s,error:n};self.postMessage(c)}}}new y(u).listen()})();\n', Wn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Hr], { type: "text/javascript;charset=utf-8" });
|
|
2640
2634
|
function ta(t) {
|
|
2641
2635
|
let e;
|
|
2642
2636
|
try {
|
|
2643
|
-
if (e =
|
|
2637
|
+
if (e = Wn && (self.URL || self.webkitURL).createObjectURL(Wn), !e) throw "";
|
|
2644
2638
|
const n = new Worker(e, {
|
|
2645
2639
|
name: t?.name
|
|
2646
2640
|
});
|
|
@@ -2649,7 +2643,7 @@ function ta(t) {
|
|
|
2649
2643
|
}), n;
|
|
2650
2644
|
} catch {
|
|
2651
2645
|
return new Worker(
|
|
2652
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
2646
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Hr),
|
|
2653
2647
|
{
|
|
2654
2648
|
name: t?.name
|
|
2655
2649
|
}
|
|
@@ -2657,7 +2651,7 @@ function ta(t) {
|
|
|
2657
2651
|
}
|
|
2658
2652
|
}
|
|
2659
2653
|
var na = (t) => new Promise((e) => setTimeout(e, t));
|
|
2660
|
-
async function
|
|
2654
|
+
async function qr(t, e) {
|
|
2661
2655
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2662
2656
|
for (; n < r; ) try {
|
|
2663
2657
|
return { data: await t(), error: null };
|
|
@@ -2671,18 +2665,18 @@ async function Zr(t, e) {
|
|
|
2671
2665
|
throw Error("Unreachable code");
|
|
2672
2666
|
}
|
|
2673
2667
|
async function ra(t, e, n, r, s) {
|
|
2674
|
-
let i = await
|
|
2668
|
+
let i = await qr(async () => await (await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0, headers: { ...n?.headers, "Content-Type": "application/json" } })).json(), { retry: { times: r, delay: s } });
|
|
2675
2669
|
if (i.error) throw i.error;
|
|
2676
2670
|
return i.data;
|
|
2677
2671
|
}
|
|
2678
2672
|
async function sa(t, e, n, r, s) {
|
|
2679
|
-
let i = await
|
|
2673
|
+
let i = await qr(async () => {
|
|
2680
2674
|
await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0, headers: { ...n?.headers, "Content-Type": "application/json" } });
|
|
2681
2675
|
}, { retry: { times: r, delay: s } });
|
|
2682
2676
|
if (i.error) throw i.error;
|
|
2683
2677
|
}
|
|
2684
|
-
const Be = 0xc3a5c85c97cb3127n,
|
|
2685
|
-
function
|
|
2678
|
+
const Be = 0xc3a5c85c97cb3127n, ae = 0xb492b66fbe98f273n, Ue = 0x9ae16a3b2f90404fn, Zr = 0xc949d7c7509e6557n, q = 0xffffffffffffffffn;
|
|
2679
|
+
function d(t) {
|
|
2686
2680
|
return t & q;
|
|
2687
2681
|
}
|
|
2688
2682
|
function A(t, e) {
|
|
@@ -2692,15 +2686,15 @@ function ia(t, e) {
|
|
|
2692
2686
|
return t = t & q, (t >> BigInt(e) | t << BigInt(64 - e)) & q;
|
|
2693
2687
|
}
|
|
2694
2688
|
function ct(t) {
|
|
2695
|
-
return
|
|
2689
|
+
return d(t ^ t >> 47n);
|
|
2696
2690
|
}
|
|
2697
|
-
function
|
|
2691
|
+
function b(t, e = 0) {
|
|
2698
2692
|
let n = 0n;
|
|
2699
2693
|
for (let r = 0; r < 8; r++)
|
|
2700
2694
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2701
2695
|
return n & q;
|
|
2702
2696
|
}
|
|
2703
|
-
function
|
|
2697
|
+
function Hn(t, e = 0) {
|
|
2704
2698
|
let n = 0n;
|
|
2705
2699
|
for (let r = 0; r < 4; r++)
|
|
2706
2700
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
@@ -2719,41 +2713,41 @@ function We(t, e) {
|
|
|
2719
2713
|
function oa(t) {
|
|
2720
2714
|
const e = t.length;
|
|
2721
2715
|
if (e > 8) {
|
|
2722
|
-
const n =
|
|
2716
|
+
const n = b(t), r = b(t, e - 8);
|
|
2723
2717
|
return (We(n, ia(r + BigInt(e) & q, e)) ^ r) & q;
|
|
2724
2718
|
}
|
|
2725
2719
|
if (e >= 4) {
|
|
2726
|
-
const n =
|
|
2727
|
-
return We(BigInt(e) + (n << 3n) & q,
|
|
2720
|
+
const n = Hn(t);
|
|
2721
|
+
return We(BigInt(e) + (n << 3n) & q, Hn(t, e - 4));
|
|
2728
2722
|
}
|
|
2729
2723
|
if (e > 0) {
|
|
2730
|
-
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), s = BigInt(t[e - 1]), i =
|
|
2731
|
-
return
|
|
2724
|
+
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), s = BigInt(t[e - 1]), i = d(n + (r << 8n)), a = d(BigInt(e) + (s << 2n));
|
|
2725
|
+
return d(ct(d(i * Ue) ^ d(a * Zr)) * Ue);
|
|
2732
2726
|
}
|
|
2733
2727
|
return Ue;
|
|
2734
2728
|
}
|
|
2735
2729
|
function la(t) {
|
|
2736
|
-
const e = t.length, n =
|
|
2737
|
-
return We(
|
|
2730
|
+
const e = t.length, n = d(b(t) * ae), r = b(t, 8), s = d(b(t, e - 8) * Ue), i = d(b(t, e - 16) * Be);
|
|
2731
|
+
return We(d(A(d(n - r), 43) + A(s, 30) + i), d(n + A(r ^ Zr, 20) - s + BigInt(e)));
|
|
2738
2732
|
}
|
|
2739
2733
|
function ua(t, e, n, r, s, i) {
|
|
2740
|
-
s =
|
|
2734
|
+
s = d(s + t), i = A(d(i + s + r), 21);
|
|
2741
2735
|
const a = s;
|
|
2742
|
-
return s =
|
|
2736
|
+
return s = d(s + e), s = d(s + n), i = d(i + A(s, 44)), { first: d(s + r), second: d(i + a) };
|
|
2743
2737
|
}
|
|
2744
|
-
function
|
|
2745
|
-
return ua(
|
|
2738
|
+
function yt(t, e, n, r) {
|
|
2739
|
+
return ua(b(t, e), b(t, e + 8), b(t, e + 16), b(t, e + 24), n, r);
|
|
2746
2740
|
}
|
|
2747
2741
|
function ca(t) {
|
|
2748
|
-
const e = t.length, n =
|
|
2749
|
-
let r =
|
|
2750
|
-
r =
|
|
2751
|
-
const a =
|
|
2752
|
-
r =
|
|
2753
|
-
const l =
|
|
2754
|
-
s = A(
|
|
2755
|
-
const u =
|
|
2756
|
-
return
|
|
2742
|
+
const e = t.length, n = b(t, 24);
|
|
2743
|
+
let r = d(b(t) + d((BigInt(e) + b(t, e - 16)) * Be)), s = A(d(r + n), 52), i = A(r, 37);
|
|
2744
|
+
r = d(r + b(t, 8)), i = d(i + A(r, 7)), r = d(r + b(t, 16));
|
|
2745
|
+
const a = d(r + n), o = d(s + A(r, 31) + i);
|
|
2746
|
+
r = d(b(t, 16) + b(t, e - 32));
|
|
2747
|
+
const l = b(t, e - 8);
|
|
2748
|
+
s = A(d(r + l), 52), i = A(r, 37), r = d(r + b(t, e - 24)), i = d(i + A(r, 7)), r = d(r + b(t, e - 16));
|
|
2749
|
+
const u = d(r + l), c = d(s + A(r, 31) + i), h = ct(d(d(a + c) * Ue + d(u + o) * Be));
|
|
2750
|
+
return d(ct(d(h * Be + o)) * Ue);
|
|
2757
2751
|
}
|
|
2758
2752
|
function fa(t) {
|
|
2759
2753
|
let e;
|
|
@@ -2763,24 +2757,24 @@ function fa(t) {
|
|
|
2763
2757
|
return n <= 16 ? oa(e) : la(e);
|
|
2764
2758
|
if (n <= 64)
|
|
2765
2759
|
return ca(e);
|
|
2766
|
-
let r =
|
|
2767
|
-
i =
|
|
2760
|
+
let r = b(e), s = d(b(e, n - 16) ^ ae), i = d(b(e, n - 56) ^ Be), a = yt(e, n - 64, BigInt(n), s), o = yt(e, n - 32, d(BigInt(n) * ae), Be);
|
|
2761
|
+
i = d(i + ct(a.second) * ae), r = d(A(d(i + r), 39) * ae), s = d(A(s, 33) * ae);
|
|
2768
2762
|
let l = n - 1 & -64, u = 0;
|
|
2769
2763
|
for (; l > 0; )
|
|
2770
|
-
r =
|
|
2771
|
-
return We(We(a.first, o.first) +
|
|
2764
|
+
r = d(A(d(r + s + a.first + b(e, u + 16)), 37) * ae), s = d(A(d(s + a.second + b(e, u + 48)), 42) * ae), r ^= o.second, s ^= a.first, i = A(i ^ o.first, 33), a = yt(e, u, d(a.second * ae), d(r + o.first)), o = yt(e, u + 32, d(i + o.second), s), [i, r] = [r, i], u += 64, l -= 64;
|
|
2765
|
+
return We(We(a.first, o.first) + d(ct(s) * ae) + i, We(a.second, o.second) + r);
|
|
2772
2766
|
}
|
|
2773
2767
|
function ha(t) {
|
|
2774
2768
|
return fa(JSON.stringify(t)).toString();
|
|
2775
2769
|
}
|
|
2776
|
-
let
|
|
2770
|
+
let qt;
|
|
2777
2771
|
// @__NO_SIDE_EFFECTS__
|
|
2778
|
-
function
|
|
2772
|
+
function Yr(t) {
|
|
2779
2773
|
return {
|
|
2780
|
-
lang:
|
|
2774
|
+
lang: qt?.lang,
|
|
2781
2775
|
message: t?.message,
|
|
2782
|
-
abortEarly:
|
|
2783
|
-
abortPipeEarly:
|
|
2776
|
+
abortEarly: qt?.abortEarly,
|
|
2777
|
+
abortPipeEarly: qt?.abortPipeEarly
|
|
2784
2778
|
};
|
|
2785
2779
|
}
|
|
2786
2780
|
let pa;
|
|
@@ -2826,7 +2820,7 @@ function j(t) {
|
|
|
2826
2820
|
version: 1,
|
|
2827
2821
|
vendor: "valibot",
|
|
2828
2822
|
validate(e) {
|
|
2829
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2823
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ Yr());
|
|
2830
2824
|
}
|
|
2831
2825
|
};
|
|
2832
2826
|
}
|
|
@@ -2835,7 +2829,7 @@ function ya(t, e) {
|
|
|
2835
2829
|
const n = [...new Set(t)];
|
|
2836
2830
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2837
2831
|
}
|
|
2838
|
-
var
|
|
2832
|
+
var At = class extends Error {
|
|
2839
2833
|
/**
|
|
2840
2834
|
* Creates a Valibot error with useful information.
|
|
2841
2835
|
*
|
|
@@ -2857,18 +2851,18 @@ function $(t) {
|
|
|
2857
2851
|
const r = e.value;
|
|
2858
2852
|
return e.value = (...s) => {
|
|
2859
2853
|
const i = this.schema["~run"]({ value: s }, n);
|
|
2860
|
-
if (i.issues) throw new
|
|
2854
|
+
if (i.issues) throw new At(i.issues);
|
|
2861
2855
|
return r(...i.value);
|
|
2862
2856
|
}, e;
|
|
2863
2857
|
}
|
|
2864
2858
|
};
|
|
2865
2859
|
}
|
|
2866
2860
|
// @__NO_SIDE_EFFECTS__
|
|
2867
|
-
function
|
|
2861
|
+
function Xr() {
|
|
2868
2862
|
return {
|
|
2869
2863
|
kind: "transformation",
|
|
2870
2864
|
type: "await",
|
|
2871
|
-
reference:
|
|
2865
|
+
reference: Xr,
|
|
2872
2866
|
async: !0,
|
|
2873
2867
|
async "~run"(t) {
|
|
2874
2868
|
return t.value = await t.value, t;
|
|
@@ -2876,11 +2870,11 @@ function Jr() {
|
|
|
2876
2870
|
};
|
|
2877
2871
|
}
|
|
2878
2872
|
// @__NO_SIDE_EFFECTS__
|
|
2879
|
-
function
|
|
2873
|
+
function Jr(t, e) {
|
|
2880
2874
|
return {
|
|
2881
2875
|
kind: "validation",
|
|
2882
2876
|
type: "check",
|
|
2883
|
-
reference:
|
|
2877
|
+
reference: Jr,
|
|
2884
2878
|
async: !1,
|
|
2885
2879
|
expects: null,
|
|
2886
2880
|
requirement: t,
|
|
@@ -2891,11 +2885,11 @@ function Gr(t, e) {
|
|
|
2891
2885
|
};
|
|
2892
2886
|
}
|
|
2893
2887
|
// @__NO_SIDE_EFFECTS__
|
|
2894
|
-
function
|
|
2888
|
+
function Gr(t, e) {
|
|
2895
2889
|
return {
|
|
2896
2890
|
kind: "validation",
|
|
2897
2891
|
type: "length",
|
|
2898
|
-
reference:
|
|
2892
|
+
reference: Gr,
|
|
2899
2893
|
async: !1,
|
|
2900
2894
|
expects: `${t}`,
|
|
2901
2895
|
requirement: t,
|
|
@@ -2921,11 +2915,11 @@ function ft(t, e) {
|
|
|
2921
2915
|
};
|
|
2922
2916
|
}
|
|
2923
2917
|
// @__NO_SIDE_EFFECTS__
|
|
2924
|
-
function
|
|
2918
|
+
function dn(t, e) {
|
|
2925
2919
|
return {
|
|
2926
2920
|
kind: "validation",
|
|
2927
2921
|
type: "min_length",
|
|
2928
|
-
reference:
|
|
2922
|
+
reference: dn,
|
|
2929
2923
|
async: !1,
|
|
2930
2924
|
expects: `>=${t}`,
|
|
2931
2925
|
requirement: t,
|
|
@@ -2936,11 +2930,11 @@ function vn(t, e) {
|
|
|
2936
2930
|
};
|
|
2937
2931
|
}
|
|
2938
2932
|
// @__NO_SIDE_EFFECTS__
|
|
2939
|
-
function
|
|
2933
|
+
function R(t, e) {
|
|
2940
2934
|
return {
|
|
2941
2935
|
kind: "validation",
|
|
2942
2936
|
type: "min_value",
|
|
2943
|
-
reference:
|
|
2937
|
+
reference: R,
|
|
2944
2938
|
async: !1,
|
|
2945
2939
|
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Je(t)}`,
|
|
2946
2940
|
requirement: t,
|
|
@@ -2962,25 +2956,25 @@ function V(t) {
|
|
|
2962
2956
|
const r = e.value;
|
|
2963
2957
|
return e.value = (...s) => {
|
|
2964
2958
|
const i = this.schema["~run"]({ value: r(...s) }, n);
|
|
2965
|
-
if (i.issues) throw new
|
|
2959
|
+
if (i.issues) throw new At(i.issues);
|
|
2966
2960
|
return i.value;
|
|
2967
2961
|
}, e;
|
|
2968
2962
|
}
|
|
2969
2963
|
};
|
|
2970
2964
|
}
|
|
2971
2965
|
// @__NO_SIDE_EFFECTS__
|
|
2972
|
-
function
|
|
2966
|
+
function Kr(t) {
|
|
2973
2967
|
return {
|
|
2974
2968
|
kind: "transformation",
|
|
2975
2969
|
type: "returns",
|
|
2976
|
-
reference:
|
|
2970
|
+
reference: Kr,
|
|
2977
2971
|
async: !1,
|
|
2978
2972
|
schema: t,
|
|
2979
2973
|
"~run"(e, n) {
|
|
2980
2974
|
const r = e.value;
|
|
2981
2975
|
return e.value = async (...s) => {
|
|
2982
2976
|
const i = await this.schema["~run"]({ value: await r(...s) }, n);
|
|
2983
|
-
if (i.issues) throw new
|
|
2977
|
+
if (i.issues) throw new At(i.issues);
|
|
2984
2978
|
return i.value;
|
|
2985
2979
|
}, e;
|
|
2986
2980
|
}
|
|
@@ -2991,15 +2985,15 @@ function ka(t, e, n) {
|
|
|
2991
2985
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2992
2986
|
}
|
|
2993
2987
|
// @__NO_SIDE_EFFECTS__
|
|
2994
|
-
function
|
|
2988
|
+
function Qr(t, e, n) {
|
|
2995
2989
|
return typeof t.default == "function" ? t.default(e, n) : t.default;
|
|
2996
2990
|
}
|
|
2997
2991
|
// @__NO_SIDE_EFFECTS__
|
|
2998
|
-
function
|
|
2992
|
+
function es(t, e) {
|
|
2999
2993
|
return {
|
|
3000
2994
|
kind: "schema",
|
|
3001
2995
|
type: "array",
|
|
3002
|
-
reference:
|
|
2996
|
+
reference: es,
|
|
3003
2997
|
expects: "Array",
|
|
3004
2998
|
async: !1,
|
|
3005
2999
|
item: t,
|
|
@@ -3036,11 +3030,11 @@ function ts(t, e) {
|
|
|
3036
3030
|
};
|
|
3037
3031
|
}
|
|
3038
3032
|
// @__NO_SIDE_EFFECTS__
|
|
3039
|
-
function
|
|
3033
|
+
function ts(t) {
|
|
3040
3034
|
return {
|
|
3041
3035
|
kind: "schema",
|
|
3042
3036
|
type: "boolean",
|
|
3043
|
-
reference:
|
|
3037
|
+
reference: ts,
|
|
3044
3038
|
expects: "boolean",
|
|
3045
3039
|
async: !1,
|
|
3046
3040
|
message: t,
|
|
@@ -3053,11 +3047,11 @@ function ns(t) {
|
|
|
3053
3047
|
};
|
|
3054
3048
|
}
|
|
3055
3049
|
// @__NO_SIDE_EFFECTS__
|
|
3056
|
-
function
|
|
3050
|
+
function ns(t, e) {
|
|
3057
3051
|
return {
|
|
3058
3052
|
kind: "schema",
|
|
3059
3053
|
type: "custom",
|
|
3060
|
-
reference:
|
|
3054
|
+
reference: ns,
|
|
3061
3055
|
expects: "unknown",
|
|
3062
3056
|
async: !1,
|
|
3063
3057
|
check: t,
|
|
@@ -3088,11 +3082,11 @@ function T(t) {
|
|
|
3088
3082
|
};
|
|
3089
3083
|
}
|
|
3090
3084
|
// @__NO_SIDE_EFFECTS__
|
|
3091
|
-
function
|
|
3085
|
+
function De(t, e) {
|
|
3092
3086
|
return {
|
|
3093
3087
|
kind: "schema",
|
|
3094
3088
|
type: "literal",
|
|
3095
|
-
reference:
|
|
3089
|
+
reference: De,
|
|
3096
3090
|
expects: /* @__PURE__ */ Je(t),
|
|
3097
3091
|
async: !1,
|
|
3098
3092
|
literal: t,
|
|
@@ -3123,11 +3117,11 @@ function x(t) {
|
|
|
3123
3117
|
};
|
|
3124
3118
|
}
|
|
3125
3119
|
// @__NO_SIDE_EFFECTS__
|
|
3126
|
-
function
|
|
3120
|
+
function D(t, e) {
|
|
3127
3121
|
return {
|
|
3128
3122
|
kind: "schema",
|
|
3129
3123
|
type: "object",
|
|
3130
|
-
reference:
|
|
3124
|
+
reference: D,
|
|
3131
3125
|
expects: "Object",
|
|
3132
3126
|
async: !1,
|
|
3133
3127
|
entries: t,
|
|
@@ -3142,7 +3136,7 @@ function R(t, e) {
|
|
|
3142
3136
|
for (const i in this.entries) {
|
|
3143
3137
|
const a = this.entries[i];
|
|
3144
3138
|
if (i in s || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3145
|
-
const o = i in s ? s[i] : /* @__PURE__ */
|
|
3139
|
+
const o = i in s ? s[i] : /* @__PURE__ */ Qr(a), l = a["~run"]({ value: o }, r);
|
|
3146
3140
|
if (l.issues) {
|
|
3147
3141
|
const u = {
|
|
3148
3142
|
type: "object",
|
|
@@ -3179,11 +3173,11 @@ function R(t, e) {
|
|
|
3179
3173
|
};
|
|
3180
3174
|
}
|
|
3181
3175
|
// @__NO_SIDE_EFFECTS__
|
|
3182
|
-
function
|
|
3176
|
+
function re(t, e) {
|
|
3183
3177
|
return {
|
|
3184
3178
|
kind: "schema",
|
|
3185
3179
|
type: "optional",
|
|
3186
|
-
reference:
|
|
3180
|
+
reference: re,
|
|
3187
3181
|
expects: `(${t.expects} | undefined)`,
|
|
3188
3182
|
async: !1,
|
|
3189
3183
|
wrapped: t,
|
|
@@ -3192,16 +3186,16 @@ function se(t, e) {
|
|
|
3192
3186
|
return /* @__PURE__ */ j(this);
|
|
3193
3187
|
},
|
|
3194
3188
|
"~run"(n, r) {
|
|
3195
|
-
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */
|
|
3189
|
+
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */ Qr(this, n, r)), n.value === void 0) ? (n.typed = !0, n) : this.wrapped["~run"](n, r);
|
|
3196
3190
|
}
|
|
3197
3191
|
};
|
|
3198
3192
|
}
|
|
3199
3193
|
// @__NO_SIDE_EFFECTS__
|
|
3200
|
-
function
|
|
3194
|
+
function rs(t) {
|
|
3201
3195
|
return {
|
|
3202
3196
|
kind: "schema",
|
|
3203
3197
|
type: "promise",
|
|
3204
|
-
reference:
|
|
3198
|
+
reference: rs,
|
|
3205
3199
|
expects: "Promise",
|
|
3206
3200
|
async: !1,
|
|
3207
3201
|
message: t,
|
|
@@ -3214,11 +3208,11 @@ function ss(t) {
|
|
|
3214
3208
|
};
|
|
3215
3209
|
}
|
|
3216
3210
|
// @__NO_SIDE_EFFECTS__
|
|
3217
|
-
function
|
|
3211
|
+
function ue(t) {
|
|
3218
3212
|
return {
|
|
3219
3213
|
kind: "schema",
|
|
3220
3214
|
type: "string",
|
|
3221
|
-
reference:
|
|
3215
|
+
reference: ue,
|
|
3222
3216
|
expects: "string",
|
|
3223
3217
|
async: !1,
|
|
3224
3218
|
message: t,
|
|
@@ -3272,17 +3266,17 @@ function L(t, e) {
|
|
|
3272
3266
|
};
|
|
3273
3267
|
}
|
|
3274
3268
|
// @__NO_SIDE_EFFECTS__
|
|
3275
|
-
function
|
|
3269
|
+
function qn(t) {
|
|
3276
3270
|
let e;
|
|
3277
3271
|
if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
|
|
3278
3272
|
return e;
|
|
3279
3273
|
}
|
|
3280
3274
|
// @__NO_SIDE_EFFECTS__
|
|
3281
|
-
function
|
|
3275
|
+
function mn(t, e) {
|
|
3282
3276
|
return {
|
|
3283
3277
|
kind: "schema",
|
|
3284
3278
|
type: "union",
|
|
3285
|
-
reference:
|
|
3279
|
+
reference: mn,
|
|
3286
3280
|
expects: /* @__PURE__ */ ya(t.map((n) => n.expects), "|"),
|
|
3287
3281
|
async: !1,
|
|
3288
3282
|
options: t,
|
|
@@ -3304,21 +3298,21 @@ function gn(t, e) {
|
|
|
3304
3298
|
if (s) return s;
|
|
3305
3299
|
if (i) {
|
|
3306
3300
|
if (i.length === 1) return i[0];
|
|
3307
|
-
I(this, "type", n, r, { issues: /* @__PURE__ */
|
|
3301
|
+
I(this, "type", n, r, { issues: /* @__PURE__ */ qn(i) }), n.typed = !0;
|
|
3308
3302
|
} else {
|
|
3309
3303
|
if (a?.length === 1) return a[0];
|
|
3310
|
-
I(this, "type", n, r, { issues: /* @__PURE__ */
|
|
3304
|
+
I(this, "type", n, r, { issues: /* @__PURE__ */ qn(a) });
|
|
3311
3305
|
}
|
|
3312
3306
|
return n;
|
|
3313
3307
|
}
|
|
3314
3308
|
};
|
|
3315
3309
|
}
|
|
3316
3310
|
// @__NO_SIDE_EFFECTS__
|
|
3317
|
-
function
|
|
3311
|
+
function Oe(t) {
|
|
3318
3312
|
return {
|
|
3319
3313
|
kind: "schema",
|
|
3320
3314
|
type: "void",
|
|
3321
|
-
reference:
|
|
3315
|
+
reference: Oe,
|
|
3322
3316
|
expects: "void",
|
|
3323
3317
|
async: !1,
|
|
3324
3318
|
message: t,
|
|
@@ -3330,9 +3324,9 @@ function De(t) {
|
|
|
3330
3324
|
}
|
|
3331
3325
|
};
|
|
3332
3326
|
}
|
|
3333
|
-
function
|
|
3334
|
-
const r = t["~run"]({ value: e }, /* @__PURE__ */
|
|
3335
|
-
if (r.issues) throw new
|
|
3327
|
+
function kt(t, e, n) {
|
|
3328
|
+
const r = t["~run"]({ value: e }, /* @__PURE__ */ Yr(n));
|
|
3329
|
+
if (r.issues) throw new At(r.issues);
|
|
3336
3330
|
return r.value;
|
|
3337
3331
|
}
|
|
3338
3332
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -3356,7 +3350,7 @@ function g(...t) {
|
|
|
3356
3350
|
};
|
|
3357
3351
|
}
|
|
3358
3352
|
// @__NO_SIDE_EFFECTS__
|
|
3359
|
-
function
|
|
3353
|
+
function _a(...t) {
|
|
3360
3354
|
return {
|
|
3361
3355
|
...t[0],
|
|
3362
3356
|
pipe: t,
|
|
@@ -3376,7 +3370,7 @@ function ba(...t) {
|
|
|
3376
3370
|
}
|
|
3377
3371
|
};
|
|
3378
3372
|
}
|
|
3379
|
-
var
|
|
3373
|
+
var ba = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ Gr(32)), Ma = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), ss = /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(-90), /* @__PURE__ */ ft(90)), is = /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(-180), /* @__PURE__ */ ft(180)), St = /* @__PURE__ */ D({ lat: ss, lng: is }), as = /* @__PURE__ */ D({ sw: St, ne: St }), Ea = /* @__PURE__ */ D({ bounds: as, center: St, zoom: /* @__PURE__ */ x() }), tn = /* @__PURE__ */ ns((t) => t instanceof HTMLElement, "Must be an HTMLElement"), xa = /* @__PURE__ */ D({ mapSize: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(1)), zoomMin: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), zoomMax: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), zoomScale: /* @__PURE__ */ mn([/* @__PURE__ */ De(1), /* @__PURE__ */ De(2), /* @__PURE__ */ De(10)]) }), Sa = /* @__PURE__ */ D({ inserted: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ ts())), insert: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([/* @__PURE__ */ x()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Zn = /* @__PURE__ */ mn([/* @__PURE__ */ De("idle"), /* @__PURE__ */ De("move"), /* @__PURE__ */ De("click")]), Pa = /* @__PURE__ */ D({ getParameters: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(xa)), getContainer: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(tn)), getZoom: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(/* @__PURE__ */ x())), getBounds: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(as)), getCenter: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(St)), getViewport: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([])), /* @__PURE__ */ V(Ea)), panBy: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([/* @__PURE__ */ x(), /* @__PURE__ */ x()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([tn, ss, is, /* @__PURE__ */ x()])), /* @__PURE__ */ V(Sa)), subscribe: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([Zn, /* @__PURE__ */ T()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([Zn, /* @__PURE__ */ T()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Zt = /* @__PURE__ */ g(/* @__PURE__ */ T(), /* @__PURE__ */ $(/* @__PURE__ */ L([/* @__PURE__ */ ue()])), /* @__PURE__ */ Kr(/* @__PURE__ */ _a(/* @__PURE__ */ rs(), /* @__PURE__ */ Xr(), tn))), Ia = /* @__PURE__ */ D({ dimensions: /* @__PURE__ */ D({ width: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), padding: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)) }), colors: /* @__PURE__ */ re(/* @__PURE__ */ D({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), border: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), Yn = /* @__PURE__ */ D({ dimensions: /* @__PURE__ */ g(/* @__PURE__ */ D({ width: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), margin: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)) }), /* @__PURE__ */ Jr((t) => Math.min(t.width, t.height) / t.margin >= 4, "Minimum of width or height must be greater than or equal to 4 * margin")), colors: /* @__PURE__ */ re(/* @__PURE__ */ D({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), Ta = /* @__PURE__ */ D({ id: /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), rank: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(0)), lat: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(-90), /* @__PURE__ */ ft(90)), lng: /* @__PURE__ */ g(/* @__PURE__ */ x(), /* @__PURE__ */ R(-180), /* @__PURE__ */ ft(180)), tooltip: /* @__PURE__ */ D({ style: Yn, body: Zt }), pin: /* @__PURE__ */ re(/* @__PURE__ */ D({ style: Ia, body: /* @__PURE__ */ re(Zt) })), popup: /* @__PURE__ */ re(/* @__PURE__ */ D({ style: Yn, body: Zt })) });
|
|
3380
3374
|
class Aa {
|
|
3381
3375
|
apiKey;
|
|
3382
3376
|
apiJwt;
|
|
@@ -3384,7 +3378,7 @@ class Aa {
|
|
|
3384
3378
|
markerStatesWorker;
|
|
3385
3379
|
markerStatesWorkerClient;
|
|
3386
3380
|
constructor(e, n) {
|
|
3387
|
-
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ta(), this.markerStatesWorkerClient = new
|
|
3381
|
+
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ta(), this.markerStatesWorkerClient = new Gn(this.markerStatesWorker);
|
|
3388
3382
|
}
|
|
3389
3383
|
clearStates() {
|
|
3390
3384
|
this.markerStatesStore.clear();
|
|
@@ -3408,7 +3402,7 @@ class Aa {
|
|
|
3408
3402
|
}
|
|
3409
3403
|
async fetchStates(e, n) {
|
|
3410
3404
|
if (e.length == 0) return [];
|
|
3411
|
-
if (e.length == 1) return [[0, [[0,
|
|
3405
|
+
if (e.length == 1) return [[0, [[0, Wr.indexOf(Gi)]]]];
|
|
3412
3406
|
const r = {
|
|
3413
3407
|
key: this.apiKey,
|
|
3414
3408
|
jwt: this.apiJwt,
|
|
@@ -3418,8 +3412,8 @@ class Aa {
|
|
|
3418
3412
|
return s.jwt && (this.apiJwt = s.jwt), s.states;
|
|
3419
3413
|
}
|
|
3420
3414
|
}
|
|
3421
|
-
const
|
|
3422
|
-
class
|
|
3415
|
+
const Xn = "1.2.25", Na = "https://maps.api.arenarium.dev/auth", Ca = "https://maps.api.arenarium.dev/log", Jn = 500;
|
|
3416
|
+
class os {
|
|
3423
3417
|
apiKey;
|
|
3424
3418
|
mapProvider;
|
|
3425
3419
|
mapStateProvider;
|
|
@@ -3430,26 +3424,26 @@ class ls {
|
|
|
3430
3424
|
markerVisibilityProcessor;
|
|
3431
3425
|
markerElementsProcessor;
|
|
3432
3426
|
markerStateProcessor;
|
|
3433
|
-
markerStatesProcessDelay =
|
|
3427
|
+
markerStatesProcessDelay = Jn;
|
|
3434
3428
|
markerStatesProcessTimeout = void 0;
|
|
3435
3429
|
constructor(e, n, r, s) {
|
|
3436
|
-
|
|
3430
|
+
kt(ba, e), kt(Ma, n), kt(Pa, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new ks(
|
|
3437
3431
|
this.mapProvider,
|
|
3438
3432
|
this.detached.bind(this),
|
|
3439
3433
|
this.error.bind(this),
|
|
3440
3434
|
this.onMapMove.bind(this),
|
|
3441
3435
|
this.onMapIdle.bind(this),
|
|
3442
3436
|
this.onMapClick.bind(this)
|
|
3443
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3437
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new Ns(this.mapProvider), this.markerElementsManager = new ea(this.mapProvider), this.markerStatesManager = new Aa(e, n), this.markerVisibilityProcessor = new Bt(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Bt(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Bt(this.onMarkersStateProcess.bind(this)), this.configuration = s;
|
|
3444
3438
|
}
|
|
3445
3439
|
//#region Core
|
|
3446
3440
|
static async create(e, n, r) {
|
|
3447
|
-
let a = (await ra(Na, { key: e, version:
|
|
3441
|
+
let a = (await ra(Na, { key: e, version: Xn })).jwt;
|
|
3448
3442
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3449
|
-
return new
|
|
3443
|
+
return new os(e, a, n, r);
|
|
3450
3444
|
}
|
|
3451
3445
|
set configuration(e) {
|
|
3452
|
-
this.markerStatesProcessDelay = e?.process?.states?.delay ??
|
|
3446
|
+
this.markerStatesProcessDelay = e?.process?.states?.delay ?? Jn, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
|
|
3453
3447
|
}
|
|
3454
3448
|
clear() {
|
|
3455
3449
|
this.markers.clear(), this.markerVisibilityManager.clearMarkers(), this.markerStatesManager.clearStates(), this.markerElementsManager.clearElements(), this.mapStateProvider.stop(), this.markerVisibilityProcessor.stop(), this.markerStateProcessor.stop(), this.markerElementsProcessor.stop();
|
|
@@ -3478,7 +3472,7 @@ class ls {
|
|
|
3478
3472
|
title: n,
|
|
3479
3473
|
level: e,
|
|
3480
3474
|
content: {
|
|
3481
|
-
version:
|
|
3475
|
+
version: Xn,
|
|
3482
3476
|
key: this.apiKey,
|
|
3483
3477
|
name: r.name,
|
|
3484
3478
|
message: r.message,
|
|
@@ -3537,11 +3531,11 @@ class ls {
|
|
|
3537
3531
|
//#endregion
|
|
3538
3532
|
//#region Public
|
|
3539
3533
|
async updateMarkers(e) {
|
|
3540
|
-
|
|
3534
|
+
kt(/* @__PURE__ */ es(Ta), e);
|
|
3541
3535
|
try {
|
|
3542
3536
|
const n = this.mapProvider.getParameters();
|
|
3543
3537
|
for (const s of e)
|
|
3544
|
-
this.markers.has(s.id) == !1 && this.markers.set(s.id, new
|
|
3538
|
+
this.markers.has(s.id) == !1 && this.markers.set(s.id, new gs(s));
|
|
3545
3539
|
const r = Array.from(this.markers.values());
|
|
3546
3540
|
r.sort((s, i) => i.data.rank - s.data.rank), await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run(), this.markerStateProcessor.run(), this.markerElementsProcessor.run();
|
|
3547
3541
|
} catch (n) {
|
|
@@ -3578,5 +3572,5 @@ class ls {
|
|
|
3578
3572
|
//#endregion
|
|
3579
3573
|
}
|
|
3580
3574
|
export {
|
|
3581
|
-
|
|
3575
|
+
os as MapManager
|
|
3582
3576
|
};
|