@arenarium/maps 1.3.6 → 1.3.8
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.css +1 -1
- package/dist/main.js +826 -841
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class
|
|
1
|
+
class Ht {
|
|
2
2
|
invoked = !1;
|
|
3
3
|
running = !1;
|
|
4
4
|
interval;
|
|
@@ -18,7 +18,7 @@ class qt {
|
|
|
18
18
|
this.invoked = !1, this.running = !1, this.timeout && window.clearTimeout(this.timeout), this.timeout = void 0;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
class
|
|
21
|
+
class bi {
|
|
22
22
|
properites;
|
|
23
23
|
state;
|
|
24
24
|
constructor(e, n, r, i, s, a, u) {
|
|
@@ -36,7 +36,7 @@ class xi {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
class
|
|
39
|
+
class _i {
|
|
40
40
|
callback;
|
|
41
41
|
timeout;
|
|
42
42
|
id;
|
|
@@ -51,8 +51,8 @@ class Si {
|
|
|
51
51
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
class
|
|
54
|
+
const Mi = 100;
|
|
55
|
+
class Ei {
|
|
56
56
|
viewport = void 0;
|
|
57
57
|
state = "idle";
|
|
58
58
|
provider;
|
|
@@ -63,7 +63,7 @@ class Ti {
|
|
|
63
63
|
onIdle;
|
|
64
64
|
onClick;
|
|
65
65
|
constructor(e, n, r, i, s, a) {
|
|
66
|
-
this.provider = e, this.interval = new
|
|
66
|
+
this.provider = e, this.interval = new _i(this.onInterval.bind(this), Mi / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = i, this.onIdle = s, this.onClick = a;
|
|
67
67
|
}
|
|
68
68
|
start() {
|
|
69
69
|
this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
|
|
@@ -87,7 +87,7 @@ class Ti {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
class
|
|
90
|
+
class ir {
|
|
91
91
|
worker;
|
|
92
92
|
workerInvocations;
|
|
93
93
|
workerInvocationCounter = 0;
|
|
@@ -126,11 +126,11 @@ class We {
|
|
|
126
126
|
return new We([], []);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const
|
|
130
|
-
function
|
|
129
|
+
const sr = '(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', In = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", sr], { type: "text/javascript;charset=utf-8" });
|
|
130
|
+
function xi(t) {
|
|
131
131
|
let e;
|
|
132
132
|
try {
|
|
133
|
-
if (e =
|
|
133
|
+
if (e = In && (self.URL || self.webkitURL).createObjectURL(In), !e) throw "";
|
|
134
134
|
const n = new Worker(e, {
|
|
135
135
|
name: t?.name
|
|
136
136
|
});
|
|
@@ -139,29 +139,29 @@ function Ii(t) {
|
|
|
139
139
|
}), n;
|
|
140
140
|
} catch {
|
|
141
141
|
return new Worker(
|
|
142
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
142
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(sr),
|
|
143
143
|
{
|
|
144
144
|
name: t?.name
|
|
145
145
|
}
|
|
146
146
|
);
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
return { x:
|
|
149
|
+
function st(t, e, n) {
|
|
150
|
+
return { x: Si(e) * n, y: Pi(t) * n };
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
return { lat:
|
|
152
|
+
function An(t, e, n) {
|
|
153
|
+
return { lat: Ii(e / n), lng: Ti(t / n) };
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function Si(t) {
|
|
156
156
|
return (180 + t) / 360;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Pi(t) {
|
|
159
159
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 360))) / 360;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Ti(t) {
|
|
162
162
|
return t * 360 - 180;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function Ii(t) {
|
|
165
165
|
return 360 / Math.PI * Math.atan(Math.exp((180 - t * 360) * Math.PI / 180)) - 90;
|
|
166
166
|
}
|
|
167
167
|
class yt {
|
|
@@ -179,7 +179,7 @@ class yt {
|
|
|
179
179
|
return !(e.ne.lat < this.sw.lat || this.ne.lat < e.sw.lat || e.ne.lng < this.sw.lng || this.ne.lng < e.sw.lng);
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
class
|
|
182
|
+
class lt {
|
|
183
183
|
blockL;
|
|
184
184
|
blockR;
|
|
185
185
|
sw;
|
|
@@ -194,7 +194,7 @@ class ut {
|
|
|
194
194
|
}
|
|
195
195
|
static create(e) {
|
|
196
196
|
const n = this.bounds(e), r = n.sw, i = n.ne;
|
|
197
|
-
return new
|
|
197
|
+
return new lt(r.lat, r.lng, i.lat, i.lng);
|
|
198
198
|
}
|
|
199
199
|
/**
|
|
200
200
|
* @param viewport - The viewport of the map.
|
|
@@ -203,10 +203,10 @@ class ut {
|
|
|
203
203
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
204
204
|
*/
|
|
205
205
|
static offset(e, n, r) {
|
|
206
|
-
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u =
|
|
206
|
+
const i = this.bounds(e), s = e.zoom, a = n * Math.pow(2, s), u = st(i.sw.lat, i.sw.lng, a), o = st(i.ne.lat, i.ne.lng, a);
|
|
207
207
|
let l = Math.max(u.x - r.left, 0), c = Math.min(u.y + r.bottom, a), f = Math.min(o.x + r.right, a), h = Math.max(o.y - r.top, 0);
|
|
208
|
-
const m =
|
|
209
|
-
return new
|
|
208
|
+
const m = An(l, c, a), d = An(f, h, a);
|
|
209
|
+
return new lt(m.lat, m.lng, d.lat, d.lng);
|
|
210
210
|
}
|
|
211
211
|
contains(e, n) {
|
|
212
212
|
return this.blockL.contains(e, n) || this.blockR.contains(e, n);
|
|
@@ -215,16 +215,16 @@ class ut {
|
|
|
215
215
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
|
-
const
|
|
219
|
-
class
|
|
218
|
+
const Ai = 75, Ni = 150, Nn = 25e-5, Ci = 1e6, Ri = 2e6, Cn = 3e6, ar = 10, Rn = 16, Di = 8, Dn = 2, je = 0.5, zi = "0px 2px 2px rgba(0, 0, 0, 0.5)", zn = 8, Oi = 8, Li = "drop-shadow(0px 2px 2px rgba(0, 0, 0, 0.5))", On = "white", Fi = "darkgreen", Ln = 1024;
|
|
219
|
+
class $i {
|
|
220
220
|
// State
|
|
221
221
|
markers;
|
|
222
222
|
markersVisible;
|
|
223
223
|
markerVisibilityTreeWorker;
|
|
224
224
|
markerVisibilityTreeWorkerClient;
|
|
225
|
-
markerVisibilityTreeLimit =
|
|
225
|
+
markerVisibilityTreeLimit = Ln;
|
|
226
226
|
set configuration(e) {
|
|
227
|
-
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ??
|
|
227
|
+
this.markerVisibilityTreeWorkerClient?.invoke("configure", e), this.markerVisibilityTreeLimit = e?.process?.visibility?.limit ?? Ln;
|
|
228
228
|
}
|
|
229
229
|
getMarkers() {
|
|
230
230
|
return Array.from(this.markersVisible ?? []);
|
|
@@ -240,7 +240,7 @@ class Wi {
|
|
|
240
240
|
return We.empty();
|
|
241
241
|
}
|
|
242
242
|
async updateMarkers(e, n) {
|
|
243
|
-
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new
|
|
243
|
+
this.markers = n, n.length > this.markerVisibilityTreeLimit ? (this.markerVisibilityTreeWorker = new xi(), this.markerVisibilityTreeWorkerClient = new ir(this.markerVisibilityTreeWorker), await this.markerVisibilityTreeWorkerClient.invoke(
|
|
244
244
|
"update",
|
|
245
245
|
e,
|
|
246
246
|
n.map((r, i) => ({ index: i, lat: r.properites.lat, lng: r.properites.lng })),
|
|
@@ -252,53 +252,53 @@ class Wi {
|
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
254
|
const Kt = !1;
|
|
255
|
-
var
|
|
256
|
-
const
|
|
255
|
+
var Vi = Array.isArray, ji = Array.prototype.indexOf, Ye = Array.prototype.includes, Ui = Array.from, Wi = Object.defineProperty, at = Object.getOwnPropertyDescriptor, Bi = Object.prototype, Hi = Array.prototype, qi = Object.getPrototypeOf, Fn = Object.isExtensible;
|
|
256
|
+
const Zi = () => {
|
|
257
257
|
};
|
|
258
|
-
function
|
|
258
|
+
function Yi(t) {
|
|
259
259
|
for (var e = 0; e < t.length; e++)
|
|
260
260
|
t[e]();
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function or() {
|
|
263
263
|
var t, e, n = new Promise((r, i) => {
|
|
264
264
|
t = r, e = i;
|
|
265
265
|
});
|
|
266
266
|
return { promise: n, resolve: t, reject: e };
|
|
267
267
|
}
|
|
268
|
-
const
|
|
268
|
+
const O = 2, ht = 4, Ct = 8, lr = 1 << 24, we = 16, Se = 32, Fe = 64, Gt = 128, te = 512, z = 1024, $ = 2048, oe = 4096, be = 8192, _e = 16384, Je = 32768, It = 65536, $n = 1 << 17, ur = 1 << 18, et = 1 << 19, Ji = 1 << 20, Le = 65536, Qt = 1 << 21, sn = 1 << 22, Me = 1 << 23, St = /* @__PURE__ */ Symbol("$state"), Ne = new class extends Error {
|
|
269
269
|
name = "StaleReactionError";
|
|
270
270
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
271
271
|
}();
|
|
272
|
-
function
|
|
272
|
+
function Xi() {
|
|
273
273
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Ki() {
|
|
276
276
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function Gi() {
|
|
279
279
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
280
280
|
}
|
|
281
|
-
function
|
|
281
|
+
function Qi() {
|
|
282
282
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function es() {
|
|
285
285
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ts() {
|
|
288
288
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
289
289
|
}
|
|
290
|
-
const
|
|
291
|
-
function
|
|
290
|
+
const D = /* @__PURE__ */ Symbol(), ns = "http://www.w3.org/1999/xhtml";
|
|
291
|
+
function rs() {
|
|
292
292
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function cr(t) {
|
|
295
295
|
return t === this.v;
|
|
296
296
|
}
|
|
297
|
-
let
|
|
298
|
-
function
|
|
297
|
+
let is = !1, le = null;
|
|
298
|
+
function Xe(t) {
|
|
299
299
|
le = t;
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function an(t, e = !1, n) {
|
|
302
302
|
le = {
|
|
303
303
|
p: le,
|
|
304
304
|
i: !1,
|
|
@@ -309,7 +309,7 @@ function on(t, e = !1, n) {
|
|
|
309
309
|
l: null
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function on(t) {
|
|
313
313
|
var e = (
|
|
314
314
|
/** @type {ComponentContext} */
|
|
315
315
|
le
|
|
@@ -317,40 +317,40 @@ function ln(t) {
|
|
|
317
317
|
if (n !== null) {
|
|
318
318
|
e.e = null;
|
|
319
319
|
for (var r of n)
|
|
320
|
-
|
|
320
|
+
Ps(r);
|
|
321
321
|
}
|
|
322
322
|
return t !== void 0 && (e.x = t), e.i = !0, le = e.p, t ?? /** @type {T} */
|
|
323
323
|
{};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function fr() {
|
|
326
326
|
return !0;
|
|
327
327
|
}
|
|
328
|
-
let
|
|
329
|
-
function
|
|
330
|
-
var t =
|
|
331
|
-
|
|
328
|
+
let Ue = [];
|
|
329
|
+
function ss() {
|
|
330
|
+
var t = Ue;
|
|
331
|
+
Ue = [], Yi(t);
|
|
332
332
|
}
|
|
333
333
|
function Re(t) {
|
|
334
|
-
if (
|
|
335
|
-
var e =
|
|
334
|
+
if (Ue.length === 0) {
|
|
335
|
+
var e = Ue;
|
|
336
336
|
queueMicrotask(() => {
|
|
337
|
-
e ===
|
|
337
|
+
e === Ue && ss();
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
|
-
|
|
340
|
+
Ue.push(t);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
var e =
|
|
342
|
+
function hr(t) {
|
|
343
|
+
var e = b;
|
|
344
344
|
if (e === null)
|
|
345
|
-
return k.f |=
|
|
346
|
-
if ((e.f &
|
|
345
|
+
return k.f |= Me, t;
|
|
346
|
+
if ((e.f & Je) === 0 && (e.f & ht) === 0)
|
|
347
347
|
throw t;
|
|
348
|
-
|
|
348
|
+
ye(t, e);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function ye(t, e) {
|
|
351
351
|
for (; e !== null; ) {
|
|
352
|
-
if ((e.f &
|
|
353
|
-
if ((e.f &
|
|
352
|
+
if ((e.f & Gt) !== 0) {
|
|
353
|
+
if ((e.f & Je) === 0)
|
|
354
354
|
throw t;
|
|
355
355
|
try {
|
|
356
356
|
e.b.error(t);
|
|
@@ -363,27 +363,27 @@ function _e(t, e) {
|
|
|
363
363
|
}
|
|
364
364
|
throw t;
|
|
365
365
|
}
|
|
366
|
-
const
|
|
366
|
+
const as = -7169;
|
|
367
367
|
function S(t, e) {
|
|
368
|
-
t.f = t.f &
|
|
368
|
+
t.f = t.f & as | e;
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
(t.f &
|
|
370
|
+
function ln(t) {
|
|
371
|
+
(t.f & te) !== 0 || t.deps === null ? S(t, z) : S(t, oe);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function pr(t) {
|
|
374
374
|
if (t !== null)
|
|
375
375
|
for (const e of t)
|
|
376
|
-
(e.f &
|
|
376
|
+
(e.f & O) === 0 || (e.f & Le) === 0 || (e.f ^= Le, pr(
|
|
377
377
|
/** @type {Derived} */
|
|
378
378
|
e.deps
|
|
379
379
|
));
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
(t.f &
|
|
381
|
+
function dr(t, e, n) {
|
|
382
|
+
(t.f & $) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t), pr(t.deps), S(t, z);
|
|
383
383
|
}
|
|
384
384
|
const bt = /* @__PURE__ */ new Set();
|
|
385
|
-
let x = null, se = null,
|
|
386
|
-
class
|
|
385
|
+
let x = null, se = null, Q = [], un = null, en = !1;
|
|
386
|
+
class Ee {
|
|
387
387
|
/**
|
|
388
388
|
* The current values of any sources that are updated in this batch
|
|
389
389
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -461,9 +461,9 @@ class Se {
|
|
|
461
461
|
if (n) {
|
|
462
462
|
this.#t.delete(e);
|
|
463
463
|
for (var r of n.d)
|
|
464
|
-
S(r,
|
|
464
|
+
S(r, $), fe(r);
|
|
465
465
|
for (r of n.m)
|
|
466
|
-
S(r, oe),
|
|
466
|
+
S(r, oe), fe(r);
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
@@ -471,17 +471,17 @@ class Se {
|
|
|
471
471
|
* @param {Effect[]} root_effects
|
|
472
472
|
*/
|
|
473
473
|
process(e) {
|
|
474
|
-
|
|
474
|
+
Q = [], this.apply();
|
|
475
475
|
var n = [], r = [];
|
|
476
476
|
for (const i of e)
|
|
477
477
|
this.#l(i, n, r);
|
|
478
478
|
if (this.#u()) {
|
|
479
479
|
this.#c(r), this.#c(n);
|
|
480
480
|
for (const [i, s] of this.#t)
|
|
481
|
-
|
|
481
|
+
gr(i, s);
|
|
482
482
|
} else {
|
|
483
483
|
for (const i of this.#r) i();
|
|
484
|
-
this.#r.clear(), this.#i === 0 && this.#h(), x = null,
|
|
484
|
+
this.#r.clear(), this.#i === 0 && this.#h(), x = null, Vn(r), Vn(n), this.#s.clear(), this.#e.clear(), this.#n?.resolve();
|
|
485
485
|
}
|
|
486
486
|
se = null;
|
|
487
487
|
}
|
|
@@ -493,11 +493,11 @@ class Se {
|
|
|
493
493
|
* @param {Effect[]} render_effects
|
|
494
494
|
*/
|
|
495
495
|
#l(e, n, r) {
|
|
496
|
-
e.f ^=
|
|
496
|
+
e.f ^= z;
|
|
497
497
|
for (var i = e.first; i !== null; ) {
|
|
498
|
-
var s = i.f, a = (s & (
|
|
498
|
+
var s = i.f, a = (s & (Se | Fe)) !== 0, u = a && (s & z) !== 0, o = u || (s & be) !== 0 || this.#t.has(i);
|
|
499
499
|
if (!o && i.fn !== null) {
|
|
500
|
-
a ? i.f ^=
|
|
500
|
+
a ? i.f ^= z : (s & ht) !== 0 ? n.push(i) : pt(i) && ((s & we) !== 0 && this.#e.add(i), Ge(i));
|
|
501
501
|
var l = i.first;
|
|
502
502
|
if (l !== null) {
|
|
503
503
|
i = l;
|
|
@@ -519,7 +519,7 @@ class Se {
|
|
|
519
519
|
*/
|
|
520
520
|
#c(e) {
|
|
521
521
|
for (var n = 0; n < e.length; n += 1)
|
|
522
|
-
|
|
522
|
+
dr(e[n], this.#s, this.#e);
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
525
|
* Associate a change to a given source with the current
|
|
@@ -528,7 +528,7 @@ class Se {
|
|
|
528
528
|
* @param {any} value
|
|
529
529
|
*/
|
|
530
530
|
capture(e, n) {
|
|
531
|
-
n !==
|
|
531
|
+
n !== D && !this.previous.has(e) && this.previous.set(e, n), (e.f & Me) === 0 && (this.current.set(e, e.v), se?.set(e, e.v));
|
|
532
532
|
}
|
|
533
533
|
activate() {
|
|
534
534
|
x = this, this.apply();
|
|
@@ -537,8 +537,8 @@ class Se {
|
|
|
537
537
|
x === this && (x = null, se = null);
|
|
538
538
|
}
|
|
539
539
|
flush() {
|
|
540
|
-
if (this.activate(),
|
|
541
|
-
if (
|
|
540
|
+
if (this.activate(), Q.length > 0) {
|
|
541
|
+
if (os(), x !== null && x !== this)
|
|
542
542
|
return;
|
|
543
543
|
} else this.#i === 0 && this.process([]);
|
|
544
544
|
this.deactivate();
|
|
@@ -569,18 +569,18 @@ class Se {
|
|
|
569
569
|
continue;
|
|
570
570
|
const a = [...i.current.keys()].filter((u) => !this.current.has(u));
|
|
571
571
|
if (a.length > 0) {
|
|
572
|
-
var r =
|
|
573
|
-
|
|
572
|
+
var r = Q;
|
|
573
|
+
Q = [];
|
|
574
574
|
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
575
575
|
for (const l of s)
|
|
576
|
-
|
|
577
|
-
if (
|
|
576
|
+
mr(l, a, u, o);
|
|
577
|
+
if (Q.length > 0) {
|
|
578
578
|
x = i, i.apply();
|
|
579
|
-
for (const l of
|
|
579
|
+
for (const l of Q)
|
|
580
580
|
i.#l(l, [], []);
|
|
581
581
|
i.deactivate();
|
|
582
582
|
}
|
|
583
|
-
|
|
583
|
+
Q = r;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
x = null, se = e;
|
|
@@ -600,14 +600,14 @@ class Se {
|
|
|
600
600
|
*/
|
|
601
601
|
decrement(e) {
|
|
602
602
|
this.#i -= 1, e && (this.#o -= 1), !this.#a && (this.#a = !0, Re(() => {
|
|
603
|
-
this.#a = !1, this.#u() ?
|
|
603
|
+
this.#a = !1, this.#u() ? Q.length > 0 && this.flush() : this.revive();
|
|
604
604
|
}));
|
|
605
605
|
}
|
|
606
606
|
revive() {
|
|
607
607
|
for (const e of this.#s)
|
|
608
|
-
this.#e.delete(e), S(e,
|
|
608
|
+
this.#e.delete(e), S(e, $), fe(e);
|
|
609
609
|
for (const e of this.#e)
|
|
610
|
-
S(e, oe),
|
|
610
|
+
S(e, oe), fe(e);
|
|
611
611
|
this.flush();
|
|
612
612
|
}
|
|
613
613
|
/** @param {() => void} fn */
|
|
@@ -619,11 +619,11 @@ class Se {
|
|
|
619
619
|
this.#p.add(e);
|
|
620
620
|
}
|
|
621
621
|
settled() {
|
|
622
|
-
return (this.#n ??=
|
|
622
|
+
return (this.#n ??= or()).promise;
|
|
623
623
|
}
|
|
624
624
|
static ensure() {
|
|
625
625
|
if (x === null) {
|
|
626
|
-
const e = x = new
|
|
626
|
+
const e = x = new Ee();
|
|
627
627
|
bt.add(x), Re(() => {
|
|
628
628
|
x === e && e.flush();
|
|
629
629
|
});
|
|
@@ -633,46 +633,46 @@ class Se {
|
|
|
633
633
|
apply() {
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
637
|
-
|
|
636
|
+
function os() {
|
|
637
|
+
en = !0;
|
|
638
638
|
var t = null;
|
|
639
639
|
try {
|
|
640
|
-
for (var e = 0;
|
|
641
|
-
var n =
|
|
640
|
+
for (var e = 0; Q.length > 0; ) {
|
|
641
|
+
var n = Ee.ensure();
|
|
642
642
|
if (e++ > 1e3) {
|
|
643
643
|
var r, i;
|
|
644
|
-
|
|
644
|
+
ls();
|
|
645
645
|
}
|
|
646
|
-
n.process(
|
|
646
|
+
n.process(Q), xe.clear();
|
|
647
647
|
}
|
|
648
648
|
} finally {
|
|
649
|
-
|
|
649
|
+
Q = [], en = !1, un = null;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
function
|
|
652
|
+
function ls() {
|
|
653
653
|
try {
|
|
654
|
-
|
|
654
|
+
Ki();
|
|
655
655
|
} catch (t) {
|
|
656
|
-
|
|
656
|
+
ye(t, un);
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
659
|
let ve = null;
|
|
660
|
-
function
|
|
660
|
+
function Vn(t) {
|
|
661
661
|
var e = t.length;
|
|
662
662
|
if (e !== 0) {
|
|
663
663
|
for (var n = 0; n < e; ) {
|
|
664
664
|
var r = t[n++];
|
|
665
|
-
if ((r.f & (
|
|
666
|
-
|
|
665
|
+
if ((r.f & (_e | be)) === 0 && pt(r) && (ve = /* @__PURE__ */ new Set(), Ge(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Nr(r), ve?.size > 0)) {
|
|
666
|
+
xe.clear();
|
|
667
667
|
for (const i of ve) {
|
|
668
|
-
if ((i.f & (
|
|
668
|
+
if ((i.f & (_e | be)) !== 0) continue;
|
|
669
669
|
const s = [i];
|
|
670
670
|
let a = i.parent;
|
|
671
671
|
for (; a !== null; )
|
|
672
672
|
ve.has(a) && (ve.delete(a), s.push(a)), a = a.parent;
|
|
673
673
|
for (let u = s.length - 1; u >= 0; u--) {
|
|
674
674
|
const o = s[u];
|
|
675
|
-
(o.f & (
|
|
675
|
+
(o.f & (_e | be)) === 0 && Ge(o);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
ve.clear();
|
|
@@ -681,30 +681,30 @@ function qn(t) {
|
|
|
681
681
|
ve = null;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function mr(t, e, n, r) {
|
|
685
685
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
686
686
|
for (const i of t.reactions) {
|
|
687
687
|
const s = i.f;
|
|
688
|
-
(s &
|
|
688
|
+
(s & O) !== 0 ? mr(
|
|
689
689
|
/** @type {Derived} */
|
|
690
690
|
i,
|
|
691
691
|
e,
|
|
692
692
|
n,
|
|
693
693
|
r
|
|
694
|
-
) : (s & (
|
|
694
|
+
) : (s & (sn | we)) !== 0 && (s & $) === 0 && vr(i, e, r) && (S(i, $), fe(
|
|
695
695
|
/** @type {Effect} */
|
|
696
696
|
i
|
|
697
697
|
));
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function vr(t, e, n) {
|
|
701
701
|
const r = n.get(t);
|
|
702
702
|
if (r !== void 0) return r;
|
|
703
703
|
if (t.deps !== null)
|
|
704
704
|
for (const i of t.deps) {
|
|
705
|
-
if (
|
|
705
|
+
if (Ye.call(e, i))
|
|
706
706
|
return !0;
|
|
707
|
-
if ((i.f &
|
|
707
|
+
if ((i.f & O) !== 0 && vr(
|
|
708
708
|
/** @type {Derived} */
|
|
709
709
|
i,
|
|
710
710
|
e,
|
|
@@ -718,47 +718,47 @@ function Mr(t, e, n) {
|
|
|
718
718
|
}
|
|
719
719
|
return n.set(t, !1), !1;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
var e =
|
|
723
|
-
if (n?.is_pending && (t.f & (
|
|
721
|
+
function fe(t) {
|
|
722
|
+
var e = un = t, n = e.b;
|
|
723
|
+
if (n?.is_pending && (t.f & (ht | Ct | lr)) !== 0 && (t.f & Je) === 0) {
|
|
724
724
|
n.defer_effect(t);
|
|
725
725
|
return;
|
|
726
726
|
}
|
|
727
727
|
for (; e.parent !== null; ) {
|
|
728
728
|
e = e.parent;
|
|
729
729
|
var r = e.f;
|
|
730
|
-
if (
|
|
730
|
+
if (en && e === b && (r & we) !== 0 && (r & ur) === 0 && (r & Je) !== 0)
|
|
731
731
|
return;
|
|
732
|
-
if ((r & (Fe |
|
|
733
|
-
if ((r &
|
|
732
|
+
if ((r & (Fe | Se)) !== 0) {
|
|
733
|
+
if ((r & z) === 0)
|
|
734
734
|
return;
|
|
735
|
-
e.f ^=
|
|
735
|
+
e.f ^= z;
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
|
|
738
|
+
Q.push(e);
|
|
739
739
|
}
|
|
740
|
-
function
|
|
741
|
-
if (!((t.f &
|
|
742
|
-
(t.f &
|
|
740
|
+
function gr(t, e) {
|
|
741
|
+
if (!((t.f & Se) !== 0 && (t.f & z) !== 0)) {
|
|
742
|
+
(t.f & $) !== 0 ? e.d.push(t) : (t.f & oe) !== 0 && e.m.push(t), S(t, z);
|
|
743
743
|
for (var n = t.first; n !== null; )
|
|
744
|
-
|
|
744
|
+
gr(n, e), n = n.next;
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
|
-
function
|
|
748
|
-
let e = 0, n =
|
|
747
|
+
function us(t) {
|
|
748
|
+
let e = 0, n = Rt(0), r;
|
|
749
749
|
return () => {
|
|
750
|
-
hn() && (E(n),
|
|
750
|
+
hn() && (E(n), Tr(() => (e === 0 && (r = ee(() => t(() => ot(n)))), e += 1, () => {
|
|
751
751
|
Re(() => {
|
|
752
|
-
e -= 1, e === 0 && (r?.(), r = void 0,
|
|
752
|
+
e -= 1, e === 0 && (r?.(), r = void 0, ot(n));
|
|
753
753
|
});
|
|
754
754
|
})));
|
|
755
755
|
};
|
|
756
756
|
}
|
|
757
|
-
var
|
|
758
|
-
function
|
|
759
|
-
new
|
|
757
|
+
var cs = It | et;
|
|
758
|
+
function fs(t, e, n, r) {
|
|
759
|
+
new hs(t, e, n, r);
|
|
760
760
|
}
|
|
761
|
-
class
|
|
761
|
+
class hs {
|
|
762
762
|
/** @type {Boundary | null} */
|
|
763
763
|
parent;
|
|
764
764
|
is_pending = !1;
|
|
@@ -801,7 +801,7 @@ class ws {
|
|
|
801
801
|
* @type {Source<number> | null}
|
|
802
802
|
*/
|
|
803
803
|
#f = null;
|
|
804
|
-
#k =
|
|
804
|
+
#k = us(() => (this.#f = Rt(this.#u), () => {
|
|
805
805
|
this.#f = null;
|
|
806
806
|
}));
|
|
807
807
|
/**
|
|
@@ -814,13 +814,13 @@ class ws {
|
|
|
814
814
|
this.#r = e, this.#i = n, this.#o = (s) => {
|
|
815
815
|
var a = (
|
|
816
816
|
/** @type {Effect} */
|
|
817
|
-
|
|
817
|
+
b
|
|
818
818
|
);
|
|
819
|
-
a.b = this, a.f |=
|
|
819
|
+
a.b = this, a.f |= Gt, r(s);
|
|
820
820
|
}, this.parent = /** @type {Effect} */
|
|
821
|
-
|
|
821
|
+
b.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = Ns(() => {
|
|
822
822
|
this.#g();
|
|
823
|
-
},
|
|
823
|
+
}, cs);
|
|
824
824
|
}
|
|
825
825
|
#y() {
|
|
826
826
|
try {
|
|
@@ -846,8 +846,8 @@ class ws {
|
|
|
846
846
|
#_() {
|
|
847
847
|
const e = this.#i.pending;
|
|
848
848
|
e && (this.is_pending = !0, this.#e = Ae(() => e(this.#r)), Re(() => {
|
|
849
|
-
var n = this.#a = document.createDocumentFragment(), r =
|
|
850
|
-
n.append(r), this.#s = this.#v(() => (
|
|
849
|
+
var n = this.#a = document.createDocumentFragment(), r = xr();
|
|
850
|
+
n.append(r), this.#s = this.#v(() => (Ee.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null, Pt(
|
|
851
851
|
/** @type {Effect} */
|
|
852
852
|
this.#e,
|
|
853
853
|
() => {
|
|
@@ -862,7 +862,7 @@ class ws {
|
|
|
862
862
|
this.#o(this.#r);
|
|
863
863
|
}), this.#l > 0) {
|
|
864
864
|
var e = this.#a = document.createDocumentFragment();
|
|
865
|
-
|
|
865
|
+
Ds(this.#s, e);
|
|
866
866
|
const n = (
|
|
867
867
|
/** @type {(anchor: Node) => void} */
|
|
868
868
|
this.#i.pending
|
|
@@ -877,9 +877,9 @@ class ws {
|
|
|
877
877
|
#m() {
|
|
878
878
|
this.is_pending = !1;
|
|
879
879
|
for (const e of this.#h)
|
|
880
|
-
S(e,
|
|
880
|
+
S(e, $), fe(e);
|
|
881
881
|
for (const e of this.#d)
|
|
882
|
-
S(e, oe),
|
|
882
|
+
S(e, oe), fe(e);
|
|
883
883
|
this.#h.clear(), this.#d.clear();
|
|
884
884
|
}
|
|
885
885
|
/**
|
|
@@ -887,7 +887,7 @@ class ws {
|
|
|
887
887
|
* @param {Effect} effect
|
|
888
888
|
*/
|
|
889
889
|
defer_effect(e) {
|
|
890
|
-
|
|
890
|
+
dr(e, this.#h, this.#d);
|
|
891
891
|
}
|
|
892
892
|
/**
|
|
893
893
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -904,14 +904,14 @@ class ws {
|
|
|
904
904
|
* @param {() => T} fn
|
|
905
905
|
*/
|
|
906
906
|
#v(e) {
|
|
907
|
-
var n =
|
|
908
|
-
|
|
907
|
+
var n = b, r = k, i = le;
|
|
908
|
+
pe(this.#n), re(this.#n), Xe(this.#n.ctx);
|
|
909
909
|
try {
|
|
910
910
|
return e();
|
|
911
911
|
} catch (s) {
|
|
912
|
-
return
|
|
912
|
+
return hr(s), null;
|
|
913
913
|
} finally {
|
|
914
|
-
|
|
914
|
+
pe(n), re(r), Xe(i);
|
|
915
915
|
}
|
|
916
916
|
}
|
|
917
917
|
/**
|
|
@@ -951,40 +951,40 @@ class ws {
|
|
|
951
951
|
let r = this.#i.failed;
|
|
952
952
|
if (!n && !r)
|
|
953
953
|
throw e;
|
|
954
|
-
this.#s && (
|
|
954
|
+
this.#s && (he(this.#s), this.#s = null), this.#e && (he(this.#e), this.#e = null), this.#t && (he(this.#t), this.#t = null);
|
|
955
955
|
var i = !1, s = !1;
|
|
956
956
|
const a = () => {
|
|
957
957
|
if (i) {
|
|
958
|
-
|
|
958
|
+
rs();
|
|
959
959
|
return;
|
|
960
960
|
}
|
|
961
|
-
i = !0, s &&
|
|
961
|
+
i = !0, s && ts(), this.#t !== null && Pt(this.#t, () => {
|
|
962
962
|
this.#t = null;
|
|
963
963
|
}), this.#v(() => {
|
|
964
|
-
|
|
964
|
+
Ee.ensure(), this.#g();
|
|
965
965
|
});
|
|
966
966
|
}, u = (o) => {
|
|
967
967
|
try {
|
|
968
968
|
s = !0, n?.(o, a), s = !1;
|
|
969
969
|
} catch (l) {
|
|
970
|
-
|
|
970
|
+
ye(l, this.#n && this.#n.parent);
|
|
971
971
|
}
|
|
972
972
|
r && (this.#t = this.#v(() => {
|
|
973
|
-
|
|
973
|
+
Ee.ensure();
|
|
974
974
|
try {
|
|
975
975
|
return Ae(() => {
|
|
976
976
|
var l = (
|
|
977
977
|
/** @type {Effect} */
|
|
978
|
-
|
|
978
|
+
b
|
|
979
979
|
);
|
|
980
|
-
l.b = this, l.f |=
|
|
980
|
+
l.b = this, l.f |= Gt, r(
|
|
981
981
|
this.#r,
|
|
982
982
|
() => o,
|
|
983
983
|
() => a
|
|
984
984
|
);
|
|
985
985
|
});
|
|
986
986
|
} catch (l) {
|
|
987
|
-
return
|
|
987
|
+
return ye(
|
|
988
988
|
l,
|
|
989
989
|
/** @type {Effect} */
|
|
990
990
|
this.#n.parent
|
|
@@ -997,20 +997,20 @@ class ws {
|
|
|
997
997
|
try {
|
|
998
998
|
o = this.transform_error(e);
|
|
999
999
|
} catch (l) {
|
|
1000
|
-
|
|
1000
|
+
ye(l, this.#n && this.#n.parent);
|
|
1001
1001
|
return;
|
|
1002
1002
|
}
|
|
1003
1003
|
o !== null && typeof o == "object" && typeof /** @type {any} */
|
|
1004
1004
|
o.then == "function" ? o.then(
|
|
1005
1005
|
u,
|
|
1006
1006
|
/** @param {unknown} e */
|
|
1007
|
-
(l) =>
|
|
1007
|
+
(l) => ye(l, this.#n && this.#n.parent)
|
|
1008
1008
|
) : u(o);
|
|
1009
1009
|
});
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
const i =
|
|
1012
|
+
function ps(t, e, n, r) {
|
|
1013
|
+
const i = vs;
|
|
1014
1014
|
var s = t.filter((f) => !f.settled);
|
|
1015
1015
|
if (n.length === 0 && s.length === 0) {
|
|
1016
1016
|
r(e.map(i));
|
|
@@ -1018,40 +1018,40 @@ function ks(t, e, n, r) {
|
|
|
1018
1018
|
}
|
|
1019
1019
|
var a = (
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
|
-
|
|
1022
|
-
), u =
|
|
1021
|
+
b
|
|
1022
|
+
), u = ds(), o = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((f) => f.promise)) : null;
|
|
1023
1023
|
function l(f) {
|
|
1024
1024
|
u();
|
|
1025
1025
|
try {
|
|
1026
1026
|
r(f);
|
|
1027
1027
|
} catch (h) {
|
|
1028
|
-
(a.f &
|
|
1028
|
+
(a.f & _e) === 0 && ye(h, a);
|
|
1029
1029
|
}
|
|
1030
|
-
|
|
1030
|
+
tn();
|
|
1031
1031
|
}
|
|
1032
1032
|
if (n.length === 0) {
|
|
1033
1033
|
o.then(() => l(e.map(i)));
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
1036
1036
|
function c() {
|
|
1037
|
-
u(), Promise.all(n.map((f) => /* @__PURE__ */
|
|
1037
|
+
u(), Promise.all(n.map((f) => /* @__PURE__ */ gs(f))).then((f) => l([...e.map(i), ...f])).catch((f) => ye(f, a));
|
|
1038
1038
|
}
|
|
1039
1039
|
o ? o.then(c) : c();
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1042
|
-
var t =
|
|
1041
|
+
function ds() {
|
|
1042
|
+
var t = b, e = k, n = le, r = x;
|
|
1043
1043
|
return function(s = !0) {
|
|
1044
|
-
|
|
1044
|
+
pe(t), re(e), Xe(n), s && r?.activate();
|
|
1045
1045
|
};
|
|
1046
1046
|
}
|
|
1047
|
-
function
|
|
1048
|
-
|
|
1047
|
+
function tn(t = !0) {
|
|
1048
|
+
pe(null), re(null), Xe(null), t && x?.deactivate();
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function ms() {
|
|
1051
1051
|
var t = (
|
|
1052
1052
|
/** @type {Boundary} */
|
|
1053
1053
|
/** @type {Effect} */
|
|
1054
|
-
|
|
1054
|
+
b.b
|
|
1055
1055
|
), e = (
|
|
1056
1056
|
/** @type {Batch} */
|
|
1057
1057
|
x
|
|
@@ -1061,62 +1061,62 @@ function bs() {
|
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
// @__NO_SIDE_EFFECTS__
|
|
1064
|
-
function
|
|
1065
|
-
var e =
|
|
1064
|
+
function vs(t) {
|
|
1065
|
+
var e = O | $, n = k !== null && (k.f & O) !== 0 ? (
|
|
1066
1066
|
/** @type {Derived} */
|
|
1067
1067
|
k
|
|
1068
1068
|
) : null;
|
|
1069
|
-
return
|
|
1069
|
+
return b !== null && (b.f |= et), {
|
|
1070
1070
|
ctx: le,
|
|
1071
1071
|
deps: null,
|
|
1072
1072
|
effects: null,
|
|
1073
|
-
equals:
|
|
1073
|
+
equals: cr,
|
|
1074
1074
|
f: e,
|
|
1075
1075
|
fn: t,
|
|
1076
1076
|
reactions: null,
|
|
1077
1077
|
rv: 0,
|
|
1078
1078
|
v: (
|
|
1079
1079
|
/** @type {V} */
|
|
1080
|
-
|
|
1080
|
+
D
|
|
1081
1081
|
),
|
|
1082
1082
|
wv: 0,
|
|
1083
|
-
parent: n ??
|
|
1083
|
+
parent: n ?? b,
|
|
1084
1084
|
ac: null
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
// @__NO_SIDE_EFFECTS__
|
|
1088
|
-
function
|
|
1088
|
+
function gs(t, e, n) {
|
|
1089
1089
|
/** @type {Effect | null} */
|
|
1090
|
-
|
|
1090
|
+
b === null && Xi();
|
|
1091
1091
|
var i = (
|
|
1092
1092
|
/** @type {Promise<V>} */
|
|
1093
1093
|
/** @type {unknown} */
|
|
1094
1094
|
void 0
|
|
1095
|
-
), s =
|
|
1095
|
+
), s = Rt(
|
|
1096
1096
|
/** @type {V} */
|
|
1097
|
-
|
|
1097
|
+
D
|
|
1098
1098
|
), a = !k, u = /* @__PURE__ */ new Map();
|
|
1099
|
-
return
|
|
1100
|
-
var o =
|
|
1099
|
+
return As(() => {
|
|
1100
|
+
var o = or();
|
|
1101
1101
|
i = o.promise;
|
|
1102
1102
|
try {
|
|
1103
|
-
Promise.resolve(t()).then(o.resolve, o.reject).finally(
|
|
1103
|
+
Promise.resolve(t()).then(o.resolve, o.reject).finally(tn);
|
|
1104
1104
|
} catch (h) {
|
|
1105
|
-
o.reject(h),
|
|
1105
|
+
o.reject(h), tn();
|
|
1106
1106
|
}
|
|
1107
1107
|
var l = (
|
|
1108
1108
|
/** @type {Batch} */
|
|
1109
1109
|
x
|
|
1110
1110
|
);
|
|
1111
1111
|
if (a) {
|
|
1112
|
-
var c =
|
|
1112
|
+
var c = ms();
|
|
1113
1113
|
u.get(l)?.reject(Ne), u.delete(l), u.set(l, o);
|
|
1114
1114
|
}
|
|
1115
1115
|
const f = (h, m = void 0) => {
|
|
1116
1116
|
if (l.activate(), m)
|
|
1117
|
-
m !== Ne && (s.f |=
|
|
1117
|
+
m !== Ne && (s.f |= Me, At(s, m));
|
|
1118
1118
|
else {
|
|
1119
|
-
(s.f &
|
|
1119
|
+
(s.f & Me) !== 0 && (s.f ^= Me), At(s, h);
|
|
1120
1120
|
for (const [d, v] of u) {
|
|
1121
1121
|
if (u.delete(d), d === l) break;
|
|
1122
1122
|
v.reject(Ne);
|
|
@@ -1125,7 +1125,7 @@ function Ms(t, e, n) {
|
|
|
1125
1125
|
c && c();
|
|
1126
1126
|
};
|
|
1127
1127
|
o.promise.then(f, (h) => f(null, h || "unknown"));
|
|
1128
|
-
}),
|
|
1128
|
+
}), Ss(() => {
|
|
1129
1129
|
for (const o of u.values())
|
|
1130
1130
|
o.reject(Ne);
|
|
1131
1131
|
}), new Promise((o) => {
|
|
@@ -1138,21 +1138,21 @@ function Ms(t, e, n) {
|
|
|
1138
1138
|
l(i);
|
|
1139
1139
|
});
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function ws(t) {
|
|
1142
1142
|
var e = t.effects;
|
|
1143
1143
|
if (e !== null) {
|
|
1144
1144
|
t.effects = null;
|
|
1145
1145
|
for (var n = 0; n < e.length; n += 1)
|
|
1146
|
-
|
|
1146
|
+
he(
|
|
1147
1147
|
/** @type {Effect} */
|
|
1148
1148
|
e[n]
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function ks(t) {
|
|
1153
1153
|
for (var e = t.parent; e !== null; ) {
|
|
1154
|
-
if ((e.f &
|
|
1155
|
-
return (e.f &
|
|
1154
|
+
if ((e.f & O) === 0)
|
|
1155
|
+
return (e.f & _e) === 0 ? (
|
|
1156
1156
|
/** @type {Effect} */
|
|
1157
1157
|
e
|
|
1158
1158
|
) : null;
|
|
@@ -1160,44 +1160,44 @@ function xs(t) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
return null;
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
var e, n =
|
|
1165
|
-
|
|
1163
|
+
function cn(t) {
|
|
1164
|
+
var e, n = b;
|
|
1165
|
+
pe(ks(t));
|
|
1166
1166
|
try {
|
|
1167
|
-
t.f &= ~Le,
|
|
1167
|
+
t.f &= ~Le, ws(t), e = Or(t);
|
|
1168
1168
|
} finally {
|
|
1169
|
-
|
|
1169
|
+
pe(n);
|
|
1170
1170
|
}
|
|
1171
1171
|
return e;
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1174
|
-
var e =
|
|
1175
|
-
if (!t.equals(e) && (t.wv =
|
|
1176
|
-
S(t,
|
|
1173
|
+
function wr(t) {
|
|
1174
|
+
var e = cn(t);
|
|
1175
|
+
if (!t.equals(e) && (t.wv = Dr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1176
|
+
S(t, z);
|
|
1177
1177
|
return;
|
|
1178
1178
|
}
|
|
1179
|
-
|
|
1179
|
+
Ke || (se !== null ? (hn() || x?.is_fork) && se.set(t, e) : ln(t));
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function ys(t) {
|
|
1182
1182
|
if (t.effects !== null)
|
|
1183
1183
|
for (const e of t.effects)
|
|
1184
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown =
|
|
1184
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ne), e.teardown = Zi, e.ac = null, ut(e, 0), pn(e));
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1186
|
+
function kr(t) {
|
|
1187
1187
|
if (t.effects !== null)
|
|
1188
1188
|
for (const e of t.effects)
|
|
1189
|
-
e.teardown &&
|
|
1189
|
+
e.teardown && Ge(e);
|
|
1190
1190
|
}
|
|
1191
|
-
let
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
function
|
|
1191
|
+
let nn = /* @__PURE__ */ new Set();
|
|
1192
|
+
const xe = /* @__PURE__ */ new Map();
|
|
1193
|
+
let yr = !1;
|
|
1194
|
+
function Rt(t, e) {
|
|
1195
1195
|
var n = {
|
|
1196
1196
|
f: 0,
|
|
1197
1197
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1198
1198
|
v: t,
|
|
1199
1199
|
reactions: null,
|
|
1200
|
-
equals:
|
|
1200
|
+
equals: cr,
|
|
1201
1201
|
rv: 0,
|
|
1202
1202
|
wv: 0
|
|
1203
1203
|
};
|
|
@@ -1205,74 +1205,74 @@ function Dt(t, e) {
|
|
|
1205
1205
|
}
|
|
1206
1206
|
// @__NO_SIDE_EFFECTS__
|
|
1207
1207
|
function U(t, e) {
|
|
1208
|
-
const n =
|
|
1209
|
-
return
|
|
1208
|
+
const n = Rt(t);
|
|
1209
|
+
return zs(n), n;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function B(t, e, n = !1) {
|
|
1212
1212
|
k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1213
1213
|
// to ensure we error if state is set inside an inspect effect
|
|
1214
|
-
(!ae || (k.f &
|
|
1215
|
-
let r = n ?
|
|
1214
|
+
(!ae || (k.f & $n) !== 0) && fr() && (k.f & (O | we | sn | $n)) !== 0 && (ne === null || !Ye.call(ne, t)) && es();
|
|
1215
|
+
let r = n ? nt(e) : e;
|
|
1216
1216
|
return At(t, r);
|
|
1217
1217
|
}
|
|
1218
1218
|
function At(t, e) {
|
|
1219
1219
|
if (!t.equals(e)) {
|
|
1220
1220
|
var n = t.v;
|
|
1221
|
-
|
|
1222
|
-
var r =
|
|
1223
|
-
if (r.capture(t, n), (t.f &
|
|
1221
|
+
Ke ? xe.set(t, e) : xe.set(t, n), t.v = e;
|
|
1222
|
+
var r = Ee.ensure();
|
|
1223
|
+
if (r.capture(t, n), (t.f & O) !== 0) {
|
|
1224
1224
|
const i = (
|
|
1225
1225
|
/** @type {Derived} */
|
|
1226
1226
|
t
|
|
1227
1227
|
);
|
|
1228
|
-
(t.f &
|
|
1228
|
+
(t.f & $) !== 0 && cn(i), ln(i);
|
|
1229
1229
|
}
|
|
1230
|
-
t.wv =
|
|
1230
|
+
t.wv = Dr(), br(t, $), b !== null && (b.f & z) !== 0 && (b.f & (Se | Fe)) === 0 && (G === null ? Os([t]) : G.push(t)), !r.is_fork && nn.size > 0 && !yr && bs();
|
|
1231
1231
|
}
|
|
1232
1232
|
return e;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1235
|
-
|
|
1236
|
-
for (const t of
|
|
1237
|
-
(t.f &
|
|
1238
|
-
|
|
1234
|
+
function bs() {
|
|
1235
|
+
yr = !1;
|
|
1236
|
+
for (const t of nn)
|
|
1237
|
+
(t.f & z) !== 0 && S(t, oe), pt(t) && Ge(t);
|
|
1238
|
+
nn.clear();
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1241
|
-
|
|
1240
|
+
function ot(t) {
|
|
1241
|
+
B(t, t.v + 1);
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function br(t, e) {
|
|
1244
1244
|
var n = t.reactions;
|
|
1245
1245
|
if (n !== null)
|
|
1246
1246
|
for (var r = n.length, i = 0; i < r; i++) {
|
|
1247
|
-
var s = n[i], a = s.f, u = (a &
|
|
1248
|
-
if (u && S(s, e), (a &
|
|
1247
|
+
var s = n[i], a = s.f, u = (a & $) === 0;
|
|
1248
|
+
if (u && S(s, e), (a & O) !== 0) {
|
|
1249
1249
|
var o = (
|
|
1250
1250
|
/** @type {Derived} */
|
|
1251
1251
|
s
|
|
1252
1252
|
);
|
|
1253
|
-
se?.delete(o), (a & Le) === 0 && (a &
|
|
1253
|
+
se?.delete(o), (a & Le) === 0 && (a & te && (s.f |= Le), br(o, oe));
|
|
1254
1254
|
} else u && ((a & we) !== 0 && ve !== null && ve.add(
|
|
1255
1255
|
/** @type {Effect} */
|
|
1256
1256
|
s
|
|
1257
|
-
),
|
|
1257
|
+
), fe(
|
|
1258
1258
|
/** @type {Effect} */
|
|
1259
1259
|
s
|
|
1260
1260
|
));
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function nt(t) {
|
|
1264
1264
|
if (typeof t != "object" || t === null || St in t)
|
|
1265
1265
|
return t;
|
|
1266
|
-
const e =
|
|
1267
|
-
if (e !==
|
|
1266
|
+
const e = qi(t);
|
|
1267
|
+
if (e !== Bi && e !== Hi)
|
|
1268
1268
|
return t;
|
|
1269
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
1269
|
+
var n = /* @__PURE__ */ new Map(), r = Vi(t), i = /* @__PURE__ */ U(0), s = De, a = (u) => {
|
|
1270
1270
|
if (De === s)
|
|
1271
1271
|
return u();
|
|
1272
1272
|
var o = k, l = De;
|
|
1273
|
-
|
|
1273
|
+
re(null), Bn(s);
|
|
1274
1274
|
var c = u();
|
|
1275
|
-
return
|
|
1275
|
+
return re(o), Bn(l), c;
|
|
1276
1276
|
};
|
|
1277
1277
|
return r && n.set("length", /* @__PURE__ */ U(
|
|
1278
1278
|
/** @type {any[]} */
|
|
@@ -1282,34 +1282,34 @@ function rt(t) {
|
|
|
1282
1282
|
t,
|
|
1283
1283
|
{
|
|
1284
1284
|
defineProperty(u, o, l) {
|
|
1285
|
-
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) &&
|
|
1285
|
+
(!("value" in l) || l.configurable === !1 || l.enumerable === !1 || l.writable === !1) && Gi();
|
|
1286
1286
|
var c = n.get(o);
|
|
1287
1287
|
return c === void 0 ? a(() => {
|
|
1288
1288
|
var f = /* @__PURE__ */ U(l.value);
|
|
1289
1289
|
return n.set(o, f), f;
|
|
1290
|
-
}) :
|
|
1290
|
+
}) : B(c, l.value, !0), !0;
|
|
1291
1291
|
},
|
|
1292
1292
|
deleteProperty(u, o) {
|
|
1293
1293
|
var l = n.get(o);
|
|
1294
1294
|
if (l === void 0) {
|
|
1295
1295
|
if (o in u) {
|
|
1296
|
-
const c = a(() => /* @__PURE__ */ U(
|
|
1297
|
-
n.set(o, c),
|
|
1296
|
+
const c = a(() => /* @__PURE__ */ U(D));
|
|
1297
|
+
n.set(o, c), ot(i);
|
|
1298
1298
|
}
|
|
1299
1299
|
} else
|
|
1300
|
-
|
|
1300
|
+
B(l, D), ot(i);
|
|
1301
1301
|
return !0;
|
|
1302
1302
|
},
|
|
1303
1303
|
get(u, o, l) {
|
|
1304
1304
|
if (o === St)
|
|
1305
1305
|
return t;
|
|
1306
1306
|
var c = n.get(o), f = o in u;
|
|
1307
|
-
if (c === void 0 && (!f ||
|
|
1308
|
-
var m =
|
|
1307
|
+
if (c === void 0 && (!f || at(u, o)?.writable) && (c = a(() => {
|
|
1308
|
+
var m = nt(f ? u[o] : D), d = /* @__PURE__ */ U(m);
|
|
1309
1309
|
return d;
|
|
1310
1310
|
}), n.set(o, c)), c !== void 0) {
|
|
1311
1311
|
var h = E(c);
|
|
1312
|
-
return h ===
|
|
1312
|
+
return h === D ? void 0 : h;
|
|
1313
1313
|
}
|
|
1314
1314
|
return Reflect.get(u, o, l);
|
|
1315
1315
|
},
|
|
@@ -1320,7 +1320,7 @@ function rt(t) {
|
|
|
1320
1320
|
c && (l.value = E(c));
|
|
1321
1321
|
} else if (l === void 0) {
|
|
1322
1322
|
var f = n.get(o), h = f?.v;
|
|
1323
|
-
if (f !== void 0 && h !==
|
|
1323
|
+
if (f !== void 0 && h !== D)
|
|
1324
1324
|
return {
|
|
1325
1325
|
enumerable: !0,
|
|
1326
1326
|
configurable: !0,
|
|
@@ -1333,14 +1333,14 @@ function rt(t) {
|
|
|
1333
1333
|
has(u, o) {
|
|
1334
1334
|
if (o === St)
|
|
1335
1335
|
return !0;
|
|
1336
|
-
var l = n.get(o), c = l !== void 0 && l.v !==
|
|
1337
|
-
if (l !== void 0 ||
|
|
1336
|
+
var l = n.get(o), c = l !== void 0 && l.v !== D || Reflect.has(u, o);
|
|
1337
|
+
if (l !== void 0 || b !== null && (!c || at(u, o)?.writable)) {
|
|
1338
1338
|
l === void 0 && (l = a(() => {
|
|
1339
|
-
var h = c ?
|
|
1339
|
+
var h = c ? nt(u[o]) : D, m = /* @__PURE__ */ U(h);
|
|
1340
1340
|
return m;
|
|
1341
1341
|
}), n.set(o, l));
|
|
1342
1342
|
var f = E(l);
|
|
1343
|
-
if (f ===
|
|
1343
|
+
if (f === D)
|
|
1344
1344
|
return !1;
|
|
1345
1345
|
}
|
|
1346
1346
|
return c;
|
|
@@ -1351,25 +1351,25 @@ function rt(t) {
|
|
|
1351
1351
|
for (var m = l; m < /** @type {Source<number>} */
|
|
1352
1352
|
f.v; m += 1) {
|
|
1353
1353
|
var d = n.get(m + "");
|
|
1354
|
-
d !== void 0 ?
|
|
1354
|
+
d !== void 0 ? B(d, D) : m in u && (d = a(() => /* @__PURE__ */ U(D)), n.set(m + "", d));
|
|
1355
1355
|
}
|
|
1356
1356
|
if (f === void 0)
|
|
1357
|
-
(!h ||
|
|
1357
|
+
(!h || at(u, o)?.writable) && (f = a(() => /* @__PURE__ */ U(void 0)), B(f, nt(l)), n.set(o, f));
|
|
1358
1358
|
else {
|
|
1359
|
-
h = f.v !==
|
|
1360
|
-
var v = a(() =>
|
|
1361
|
-
|
|
1359
|
+
h = f.v !== D;
|
|
1360
|
+
var v = a(() => nt(l));
|
|
1361
|
+
B(f, v);
|
|
1362
1362
|
}
|
|
1363
|
-
var
|
|
1364
|
-
if (
|
|
1363
|
+
var _ = Reflect.getOwnPropertyDescriptor(u, o);
|
|
1364
|
+
if (_?.set && _.set.call(c, l), !h) {
|
|
1365
1365
|
if (r && typeof o == "string") {
|
|
1366
|
-
var
|
|
1366
|
+
var R = (
|
|
1367
1367
|
/** @type {Source<number>} */
|
|
1368
1368
|
n.get("length")
|
|
1369
|
-
),
|
|
1370
|
-
Number.isInteger(
|
|
1369
|
+
), j = Number(o);
|
|
1370
|
+
Number.isInteger(j) && j >= R.v && B(R, j + 1);
|
|
1371
1371
|
}
|
|
1372
|
-
|
|
1372
|
+
ot(i);
|
|
1373
1373
|
}
|
|
1374
1374
|
return !0;
|
|
1375
1375
|
},
|
|
@@ -1377,86 +1377,80 @@ function rt(t) {
|
|
|
1377
1377
|
E(i);
|
|
1378
1378
|
var o = Reflect.ownKeys(u).filter((f) => {
|
|
1379
1379
|
var h = n.get(f);
|
|
1380
|
-
return h === void 0 || h.v !==
|
|
1380
|
+
return h === void 0 || h.v !== D;
|
|
1381
1381
|
});
|
|
1382
1382
|
for (var [l, c] of n)
|
|
1383
|
-
c.v !==
|
|
1383
|
+
c.v !== D && !(l in u) && o.push(l);
|
|
1384
1384
|
return o;
|
|
1385
1385
|
},
|
|
1386
1386
|
setPrototypeOf() {
|
|
1387
|
-
|
|
1387
|
+
Qi();
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
);
|
|
1391
1391
|
}
|
|
1392
|
-
var
|
|
1393
|
-
function
|
|
1394
|
-
if (
|
|
1395
|
-
|
|
1392
|
+
var jn, _r, Mr, Er;
|
|
1393
|
+
function _s() {
|
|
1394
|
+
if (jn === void 0) {
|
|
1395
|
+
jn = window, _r = /Firefox/.test(navigator.userAgent);
|
|
1396
1396
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1397
|
-
|
|
1397
|
+
Mr = at(e, "firstChild").get, Er = at(e, "nextSibling").get, Fn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Fn(n) && (n.__t = void 0);
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function xr(t = "") {
|
|
1401
1401
|
return document.createTextNode(t);
|
|
1402
1402
|
}
|
|
1403
1403
|
// @__NO_SIDE_EFFECTS__
|
|
1404
|
-
function
|
|
1404
|
+
function Sr(t) {
|
|
1405
1405
|
return (
|
|
1406
1406
|
/** @type {TemplateNode | null} */
|
|
1407
|
-
|
|
1407
|
+
Mr.call(t)
|
|
1408
1408
|
);
|
|
1409
1409
|
}
|
|
1410
1410
|
// @__NO_SIDE_EFFECTS__
|
|
1411
|
-
function
|
|
1411
|
+
function fn(t) {
|
|
1412
1412
|
return (
|
|
1413
1413
|
/** @type {TemplateNode | null} */
|
|
1414
|
-
|
|
1414
|
+
Er.call(t)
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1418
|
-
return /* @__PURE__ */
|
|
1419
|
-
}
|
|
1420
|
-
function As(t, e = !1) {
|
|
1421
|
-
{
|
|
1422
|
-
var n = /* @__PURE__ */ Nt(t);
|
|
1423
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ zt(n) : n;
|
|
1424
|
-
}
|
|
1417
|
+
function Un(t, e) {
|
|
1418
|
+
return /* @__PURE__ */ Sr(t);
|
|
1425
1419
|
}
|
|
1426
|
-
function
|
|
1420
|
+
function Ms(t, e = 1, n = !1) {
|
|
1427
1421
|
let r = t;
|
|
1428
1422
|
for (; e--; )
|
|
1429
1423
|
r = /** @type {TemplateNode} */
|
|
1430
|
-
/* @__PURE__ */
|
|
1424
|
+
/* @__PURE__ */ fn(r);
|
|
1431
1425
|
return r;
|
|
1432
1426
|
}
|
|
1433
|
-
function
|
|
1427
|
+
function Es(t, e, n) {
|
|
1434
1428
|
return (
|
|
1435
1429
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1436
|
-
document.createElementNS(
|
|
1430
|
+
document.createElementNS(ns, t, void 0)
|
|
1437
1431
|
);
|
|
1438
1432
|
}
|
|
1439
|
-
function
|
|
1440
|
-
var e = k, n =
|
|
1441
|
-
|
|
1433
|
+
function Pr(t) {
|
|
1434
|
+
var e = k, n = b;
|
|
1435
|
+
re(null), pe(null);
|
|
1442
1436
|
try {
|
|
1443
1437
|
return t();
|
|
1444
1438
|
} finally {
|
|
1445
|
-
|
|
1439
|
+
re(e), pe(n);
|
|
1446
1440
|
}
|
|
1447
1441
|
}
|
|
1448
|
-
function
|
|
1442
|
+
function xs(t, e) {
|
|
1449
1443
|
var n = e.last;
|
|
1450
1444
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1451
1445
|
}
|
|
1452
1446
|
function ke(t, e, n) {
|
|
1453
|
-
var r =
|
|
1454
|
-
r !== null && (r.f &
|
|
1447
|
+
var r = b;
|
|
1448
|
+
r !== null && (r.f & be) !== 0 && (t |= be);
|
|
1455
1449
|
var i = {
|
|
1456
1450
|
ctx: le,
|
|
1457
1451
|
deps: null,
|
|
1458
1452
|
nodes: null,
|
|
1459
|
-
f: t |
|
|
1453
|
+
f: t | $ | te,
|
|
1460
1454
|
first: null,
|
|
1461
1455
|
fn: e,
|
|
1462
1456
|
last: null,
|
|
@@ -1470,14 +1464,14 @@ function ke(t, e, n) {
|
|
|
1470
1464
|
};
|
|
1471
1465
|
if (n)
|
|
1472
1466
|
try {
|
|
1473
|
-
|
|
1467
|
+
Ge(i);
|
|
1474
1468
|
} catch (u) {
|
|
1475
|
-
throw
|
|
1469
|
+
throw he(i), u;
|
|
1476
1470
|
}
|
|
1477
|
-
else e !== null &&
|
|
1471
|
+
else e !== null && fe(i);
|
|
1478
1472
|
var s = i;
|
|
1479
1473
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1480
|
-
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t & It) !== 0 && s !== null && (s.f |= It)), s !== null && (s.parent = r, r !== null &&
|
|
1474
|
+
(s.f & et) === 0 && (s = s.first, (t & we) !== 0 && (t & It) !== 0 && s !== null && (s.f |= It)), s !== null && (s.parent = r, r !== null && xs(s, r), k !== null && (k.f & O) !== 0 && (t & Fe) === 0)) {
|
|
1481
1475
|
var a = (
|
|
1482
1476
|
/** @type {Derived} */
|
|
1483
1477
|
k
|
|
@@ -1489,52 +1483,52 @@ function ke(t, e, n) {
|
|
|
1489
1483
|
function hn() {
|
|
1490
1484
|
return k !== null && !ae;
|
|
1491
1485
|
}
|
|
1492
|
-
function
|
|
1493
|
-
const e = ke(
|
|
1494
|
-
return S(e,
|
|
1486
|
+
function Ss(t) {
|
|
1487
|
+
const e = ke(Ct, null, !1);
|
|
1488
|
+
return S(e, z), e.teardown = t, e;
|
|
1495
1489
|
}
|
|
1496
|
-
function
|
|
1497
|
-
return ke(
|
|
1490
|
+
function Ps(t) {
|
|
1491
|
+
return ke(ht | Ji, t, !1);
|
|
1498
1492
|
}
|
|
1499
|
-
function
|
|
1500
|
-
|
|
1493
|
+
function Ts(t) {
|
|
1494
|
+
Ee.ensure();
|
|
1501
1495
|
const e = ke(Fe | et, t, !0);
|
|
1502
1496
|
return (n = {}) => new Promise((r) => {
|
|
1503
1497
|
n.outro ? Pt(e, () => {
|
|
1504
|
-
|
|
1505
|
-
}) : (
|
|
1498
|
+
he(e), r(void 0);
|
|
1499
|
+
}) : (he(e), r(void 0));
|
|
1506
1500
|
});
|
|
1507
1501
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return ke(
|
|
1502
|
+
function Is(t) {
|
|
1503
|
+
return ke(ht, t, !1);
|
|
1510
1504
|
}
|
|
1511
|
-
function
|
|
1512
|
-
return ke(
|
|
1505
|
+
function As(t) {
|
|
1506
|
+
return ke(sn | et, t, !0);
|
|
1513
1507
|
}
|
|
1514
|
-
function
|
|
1515
|
-
return ke(
|
|
1508
|
+
function Tr(t, e = 0) {
|
|
1509
|
+
return ke(Ct | e, t, !0);
|
|
1516
1510
|
}
|
|
1517
|
-
function
|
|
1518
|
-
|
|
1519
|
-
ke(
|
|
1511
|
+
function Ir(t, e = [], n = [], r = []) {
|
|
1512
|
+
ps(r, e, n, (i) => {
|
|
1513
|
+
ke(Ct, () => t(...i.map(E)), !0);
|
|
1520
1514
|
});
|
|
1521
1515
|
}
|
|
1522
|
-
function
|
|
1516
|
+
function Ns(t, e = 0) {
|
|
1523
1517
|
var n = ke(we | e, t, !0);
|
|
1524
1518
|
return n;
|
|
1525
1519
|
}
|
|
1526
1520
|
function Ae(t) {
|
|
1527
|
-
return ke(
|
|
1521
|
+
return ke(Se | et, t, !0);
|
|
1528
1522
|
}
|
|
1529
|
-
function
|
|
1523
|
+
function Ar(t) {
|
|
1530
1524
|
var e = t.teardown;
|
|
1531
1525
|
if (e !== null) {
|
|
1532
|
-
const n =
|
|
1533
|
-
|
|
1526
|
+
const n = Ke, r = k;
|
|
1527
|
+
Wn(!0), re(null);
|
|
1534
1528
|
try {
|
|
1535
1529
|
e.call(null);
|
|
1536
1530
|
} finally {
|
|
1537
|
-
|
|
1531
|
+
Wn(n), re(r);
|
|
1538
1532
|
}
|
|
1539
1533
|
}
|
|
1540
1534
|
}
|
|
@@ -1542,49 +1536,49 @@ function pn(t, e = !1) {
|
|
|
1542
1536
|
var n = t.first;
|
|
1543
1537
|
for (t.first = t.last = null; n !== null; ) {
|
|
1544
1538
|
const i = n.ac;
|
|
1545
|
-
i !== null &&
|
|
1539
|
+
i !== null && Pr(() => {
|
|
1546
1540
|
i.abort(Ne);
|
|
1547
1541
|
});
|
|
1548
1542
|
var r = n.next;
|
|
1549
|
-
(n.f & Fe) !== 0 ? n.parent = null :
|
|
1543
|
+
(n.f & Fe) !== 0 ? n.parent = null : he(n, e), n = r;
|
|
1550
1544
|
}
|
|
1551
1545
|
}
|
|
1552
|
-
function
|
|
1546
|
+
function Cs(t) {
|
|
1553
1547
|
for (var e = t.first; e !== null; ) {
|
|
1554
1548
|
var n = e.next;
|
|
1555
|
-
(e.f &
|
|
1549
|
+
(e.f & Se) === 0 && he(e), e = n;
|
|
1556
1550
|
}
|
|
1557
1551
|
}
|
|
1558
|
-
function
|
|
1552
|
+
function he(t, e = !0) {
|
|
1559
1553
|
var n = !1;
|
|
1560
|
-
(e || (t.f &
|
|
1554
|
+
(e || (t.f & ur) !== 0) && t.nodes !== null && t.nodes.end !== null && (Rs(
|
|
1561
1555
|
t.nodes.start,
|
|
1562
1556
|
/** @type {TemplateNode} */
|
|
1563
1557
|
t.nodes.end
|
|
1564
|
-
), n = !0), pn(t, e && !n),
|
|
1558
|
+
), n = !0), pn(t, e && !n), ut(t, 0), S(t, _e);
|
|
1565
1559
|
var r = t.nodes && t.nodes.t;
|
|
1566
1560
|
if (r !== null)
|
|
1567
1561
|
for (const s of r)
|
|
1568
1562
|
s.stop();
|
|
1569
|
-
|
|
1563
|
+
Ar(t);
|
|
1570
1564
|
var i = t.parent;
|
|
1571
|
-
i !== null && i.first !== null &&
|
|
1565
|
+
i !== null && i.first !== null && Nr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1572
1566
|
}
|
|
1573
|
-
function
|
|
1567
|
+
function Rs(t, e) {
|
|
1574
1568
|
for (; t !== null; ) {
|
|
1575
|
-
var n = t === e ? null : /* @__PURE__ */
|
|
1569
|
+
var n = t === e ? null : /* @__PURE__ */ fn(t);
|
|
1576
1570
|
t.remove(), t = n;
|
|
1577
1571
|
}
|
|
1578
1572
|
}
|
|
1579
|
-
function
|
|
1573
|
+
function Nr(t) {
|
|
1580
1574
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1581
1575
|
n !== null && (n.next = r), r !== null && (r.prev = n), e !== null && (e.first === t && (e.first = r), e.last === t && (e.last = n));
|
|
1582
1576
|
}
|
|
1583
1577
|
function Pt(t, e, n = !0) {
|
|
1584
1578
|
var r = [];
|
|
1585
|
-
|
|
1579
|
+
Cr(t, r, !0);
|
|
1586
1580
|
var i = () => {
|
|
1587
|
-
n &&
|
|
1581
|
+
n && he(t), e && e();
|
|
1588
1582
|
}, s = r.length;
|
|
1589
1583
|
if (s > 0) {
|
|
1590
1584
|
var a = () => --s || i();
|
|
@@ -1593,9 +1587,9 @@ function Pt(t, e, n = !0) {
|
|
|
1593
1587
|
} else
|
|
1594
1588
|
i();
|
|
1595
1589
|
}
|
|
1596
|
-
function
|
|
1597
|
-
if ((t.f &
|
|
1598
|
-
t.f ^=
|
|
1590
|
+
function Cr(t, e, n) {
|
|
1591
|
+
if ((t.f & be) === 0) {
|
|
1592
|
+
t.f ^= be;
|
|
1599
1593
|
var r = t.nodes && t.nodes.t;
|
|
1600
1594
|
if (r !== null)
|
|
1601
1595
|
for (const u of r)
|
|
@@ -1604,115 +1598,115 @@ function Fr(t, e, n) {
|
|
|
1604
1598
|
var s = i.next, a = (i.f & It) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1605
1599
|
// it means the parent block effect was pruned. In that case,
|
|
1606
1600
|
// transparency information was transferred to the branch effect.
|
|
1607
|
-
(i.f &
|
|
1608
|
-
|
|
1601
|
+
(i.f & Se) !== 0 && (t.f & we) !== 0;
|
|
1602
|
+
Cr(i, e, a ? n : !1), i = s;
|
|
1609
1603
|
}
|
|
1610
1604
|
}
|
|
1611
1605
|
}
|
|
1612
|
-
function
|
|
1606
|
+
function Ds(t, e) {
|
|
1613
1607
|
if (t.nodes)
|
|
1614
1608
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1615
|
-
var i = n === r ? null : /* @__PURE__ */
|
|
1609
|
+
var i = n === r ? null : /* @__PURE__ */ fn(n);
|
|
1616
1610
|
e.append(n), n = i;
|
|
1617
1611
|
}
|
|
1618
1612
|
}
|
|
1619
|
-
let Tt = !1,
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1613
|
+
let Tt = !1, Ke = !1;
|
|
1614
|
+
function Wn(t) {
|
|
1615
|
+
Ke = t;
|
|
1622
1616
|
}
|
|
1623
1617
|
let k = null, ae = !1;
|
|
1624
|
-
function
|
|
1618
|
+
function re(t) {
|
|
1625
1619
|
k = t;
|
|
1626
1620
|
}
|
|
1627
|
-
let
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1621
|
+
let b = null;
|
|
1622
|
+
function pe(t) {
|
|
1623
|
+
b = t;
|
|
1630
1624
|
}
|
|
1631
|
-
let
|
|
1632
|
-
function
|
|
1633
|
-
k !== null && (
|
|
1625
|
+
let ne = null;
|
|
1626
|
+
function zs(t) {
|
|
1627
|
+
k !== null && (ne === null ? ne = [t] : ne.push(t));
|
|
1634
1628
|
}
|
|
1635
|
-
let
|
|
1636
|
-
function
|
|
1629
|
+
let W = null, J = 0, G = null;
|
|
1630
|
+
function Os(t) {
|
|
1637
1631
|
G = t;
|
|
1638
1632
|
}
|
|
1639
|
-
let
|
|
1640
|
-
function
|
|
1633
|
+
let Rr = 1, Ce = 0, De = Ce;
|
|
1634
|
+
function Bn(t) {
|
|
1641
1635
|
De = t;
|
|
1642
1636
|
}
|
|
1643
|
-
function
|
|
1644
|
-
return
|
|
1637
|
+
function Dr() {
|
|
1638
|
+
return ++Rr;
|
|
1645
1639
|
}
|
|
1646
|
-
function
|
|
1640
|
+
function pt(t) {
|
|
1647
1641
|
var e = t.f;
|
|
1648
|
-
if ((e &
|
|
1642
|
+
if ((e & $) !== 0)
|
|
1649
1643
|
return !0;
|
|
1650
|
-
if (e &
|
|
1644
|
+
if (e & O && (t.f &= ~Le), (e & oe) !== 0) {
|
|
1651
1645
|
for (var n = (
|
|
1652
1646
|
/** @type {Value[]} */
|
|
1653
1647
|
t.deps
|
|
1654
1648
|
), r = n.length, i = 0; i < r; i++) {
|
|
1655
1649
|
var s = n[i];
|
|
1656
|
-
if (
|
|
1650
|
+
if (pt(
|
|
1657
1651
|
/** @type {Derived} */
|
|
1658
1652
|
s
|
|
1659
|
-
) &&
|
|
1653
|
+
) && wr(
|
|
1660
1654
|
/** @type {Derived} */
|
|
1661
1655
|
s
|
|
1662
1656
|
), s.wv > t.wv)
|
|
1663
1657
|
return !0;
|
|
1664
1658
|
}
|
|
1665
|
-
(e &
|
|
1659
|
+
(e & te) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1666
1660
|
// traversal of the graph in the other batches still happens
|
|
1667
|
-
se === null && S(t,
|
|
1661
|
+
se === null && S(t, z);
|
|
1668
1662
|
}
|
|
1669
1663
|
return !1;
|
|
1670
1664
|
}
|
|
1671
|
-
function
|
|
1665
|
+
function zr(t, e, n = !0) {
|
|
1672
1666
|
var r = t.reactions;
|
|
1673
|
-
if (r !== null && !(
|
|
1667
|
+
if (r !== null && !(ne !== null && Ye.call(ne, t)))
|
|
1674
1668
|
for (var i = 0; i < r.length; i++) {
|
|
1675
1669
|
var s = r[i];
|
|
1676
|
-
(s.f &
|
|
1670
|
+
(s.f & O) !== 0 ? zr(
|
|
1677
1671
|
/** @type {Derived} */
|
|
1678
1672
|
s,
|
|
1679
1673
|
e,
|
|
1680
1674
|
!1
|
|
1681
|
-
) : e === s && (n ? S(s,
|
|
1675
|
+
) : e === s && (n ? S(s, $) : (s.f & z) !== 0 && S(s, oe), fe(
|
|
1682
1676
|
/** @type {Effect} */
|
|
1683
1677
|
s
|
|
1684
1678
|
));
|
|
1685
1679
|
}
|
|
1686
1680
|
}
|
|
1687
|
-
function
|
|
1688
|
-
var e =
|
|
1689
|
-
|
|
1690
|
-
null,
|
|
1681
|
+
function Or(t) {
|
|
1682
|
+
var e = W, n = J, r = G, i = k, s = ne, a = le, u = ae, o = De, l = t.f;
|
|
1683
|
+
W = /** @type {null | Value[]} */
|
|
1684
|
+
null, J = 0, G = null, k = (l & (Se | Fe)) === 0 ? t : null, ne = null, Xe(t.ctx), ae = !1, De = ++Ce, t.ac !== null && (Pr(() => {
|
|
1691
1685
|
t.ac.abort(Ne);
|
|
1692
1686
|
}), t.ac = null);
|
|
1693
1687
|
try {
|
|
1694
|
-
t.f |=
|
|
1688
|
+
t.f |= Qt;
|
|
1695
1689
|
var c = (
|
|
1696
1690
|
/** @type {Function} */
|
|
1697
1691
|
t.fn
|
|
1698
1692
|
), f = c();
|
|
1699
|
-
t.f |=
|
|
1693
|
+
t.f |= Je;
|
|
1700
1694
|
var h = t.deps, m = x?.is_fork;
|
|
1701
|
-
if (
|
|
1695
|
+
if (W !== null) {
|
|
1702
1696
|
var d;
|
|
1703
|
-
if (m ||
|
|
1704
|
-
for (h.length =
|
|
1705
|
-
h[
|
|
1697
|
+
if (m || ut(t, J), h !== null && J > 0)
|
|
1698
|
+
for (h.length = J + W.length, d = 0; d < W.length; d++)
|
|
1699
|
+
h[J + d] = W[d];
|
|
1706
1700
|
else
|
|
1707
|
-
t.deps = h =
|
|
1708
|
-
if (hn() && (t.f &
|
|
1709
|
-
for (d =
|
|
1701
|
+
t.deps = h = W;
|
|
1702
|
+
if (hn() && (t.f & te) !== 0)
|
|
1703
|
+
for (d = J; d < h.length; d++)
|
|
1710
1704
|
(h[d].reactions ??= []).push(t);
|
|
1711
|
-
} else !m && h !== null &&
|
|
1712
|
-
if (
|
|
1705
|
+
} else !m && h !== null && J < h.length && (ut(t, J), h.length = J);
|
|
1706
|
+
if (fr() && G !== null && !ae && h !== null && (t.f & (O | oe | $)) === 0)
|
|
1713
1707
|
for (d = 0; d < /** @type {Source[]} */
|
|
1714
1708
|
G.length; d++)
|
|
1715
|
-
|
|
1709
|
+
zr(
|
|
1716
1710
|
G[d],
|
|
1717
1711
|
/** @type {Effect} */
|
|
1718
1712
|
t
|
|
@@ -1727,114 +1721,114 @@ function jr(t) {
|
|
|
1727
1721
|
G !== null && (r === null ? r = G : r.push(.../** @type {Source[]} */
|
|
1728
1722
|
G));
|
|
1729
1723
|
}
|
|
1730
|
-
return (t.f &
|
|
1724
|
+
return (t.f & Me) !== 0 && (t.f ^= Me), f;
|
|
1731
1725
|
} catch (v) {
|
|
1732
|
-
return
|
|
1726
|
+
return hr(v);
|
|
1733
1727
|
} finally {
|
|
1734
|
-
t.f ^=
|
|
1728
|
+
t.f ^= Qt, W = e, J = n, G = r, k = i, ne = s, Xe(a), ae = u, De = o;
|
|
1735
1729
|
}
|
|
1736
1730
|
}
|
|
1737
|
-
function
|
|
1731
|
+
function Ls(t, e) {
|
|
1738
1732
|
let n = e.reactions;
|
|
1739
1733
|
if (n !== null) {
|
|
1740
|
-
var r =
|
|
1734
|
+
var r = ji.call(n, t);
|
|
1741
1735
|
if (r !== -1) {
|
|
1742
1736
|
var i = n.length - 1;
|
|
1743
1737
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
1744
1738
|
}
|
|
1745
1739
|
}
|
|
1746
|
-
if (n === null && (e.f &
|
|
1740
|
+
if (n === null && (e.f & O) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1747
1741
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1748
1742
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1749
|
-
(
|
|
1743
|
+
(W === null || !Ye.call(W, e))) {
|
|
1750
1744
|
var s = (
|
|
1751
1745
|
/** @type {Derived} */
|
|
1752
1746
|
e
|
|
1753
1747
|
);
|
|
1754
|
-
(s.f &
|
|
1748
|
+
(s.f & te) !== 0 && (s.f ^= te, s.f &= ~Le), ln(s), ys(s), ut(s, 0);
|
|
1755
1749
|
}
|
|
1756
1750
|
}
|
|
1757
|
-
function
|
|
1751
|
+
function ut(t, e) {
|
|
1758
1752
|
var n = t.deps;
|
|
1759
1753
|
if (n !== null)
|
|
1760
1754
|
for (var r = e; r < n.length; r++)
|
|
1761
|
-
|
|
1755
|
+
Ls(t, n[r]);
|
|
1762
1756
|
}
|
|
1763
|
-
function
|
|
1757
|
+
function Ge(t) {
|
|
1764
1758
|
var e = t.f;
|
|
1765
|
-
if ((e &
|
|
1766
|
-
S(t,
|
|
1767
|
-
var n =
|
|
1768
|
-
|
|
1759
|
+
if ((e & _e) === 0) {
|
|
1760
|
+
S(t, z);
|
|
1761
|
+
var n = b, r = Tt;
|
|
1762
|
+
b = t, Tt = !0;
|
|
1769
1763
|
try {
|
|
1770
|
-
(e & (we |
|
|
1771
|
-
var i =
|
|
1772
|
-
t.teardown = typeof i == "function" ? i : null, t.wv =
|
|
1764
|
+
(e & (we | lr)) !== 0 ? Cs(t) : pn(t), Ar(t);
|
|
1765
|
+
var i = Or(t);
|
|
1766
|
+
t.teardown = typeof i == "function" ? i : null, t.wv = Rr;
|
|
1773
1767
|
var s;
|
|
1774
|
-
Kt &&
|
|
1768
|
+
Kt && is && (t.f & $) !== 0 && t.deps;
|
|
1775
1769
|
} finally {
|
|
1776
|
-
Tt = r,
|
|
1770
|
+
Tt = r, b = n;
|
|
1777
1771
|
}
|
|
1778
1772
|
}
|
|
1779
1773
|
}
|
|
1780
1774
|
function E(t) {
|
|
1781
|
-
var e = t.f, n = (e &
|
|
1775
|
+
var e = t.f, n = (e & O) !== 0;
|
|
1782
1776
|
if (k !== null && !ae) {
|
|
1783
|
-
var r =
|
|
1784
|
-
if (!r && (
|
|
1777
|
+
var r = b !== null && (b.f & _e) !== 0;
|
|
1778
|
+
if (!r && (ne === null || !Ye.call(ne, t))) {
|
|
1785
1779
|
var i = k.deps;
|
|
1786
|
-
if ((k.f &
|
|
1787
|
-
t.rv < Ce && (t.rv = Ce,
|
|
1780
|
+
if ((k.f & Qt) !== 0)
|
|
1781
|
+
t.rv < Ce && (t.rv = Ce, W === null && i !== null && i[J] === t ? J++ : W === null ? W = [t] : W.push(t));
|
|
1788
1782
|
else {
|
|
1789
1783
|
(k.deps ??= []).push(t);
|
|
1790
1784
|
var s = t.reactions;
|
|
1791
|
-
s === null ? t.reactions = [k] :
|
|
1785
|
+
s === null ? t.reactions = [k] : Ye.call(s, k) || s.push(k);
|
|
1792
1786
|
}
|
|
1793
1787
|
}
|
|
1794
1788
|
}
|
|
1795
|
-
if (
|
|
1796
|
-
return
|
|
1789
|
+
if (Ke && xe.has(t))
|
|
1790
|
+
return xe.get(t);
|
|
1797
1791
|
if (n) {
|
|
1798
1792
|
var a = (
|
|
1799
1793
|
/** @type {Derived} */
|
|
1800
1794
|
t
|
|
1801
1795
|
);
|
|
1802
|
-
if (
|
|
1796
|
+
if (Ke) {
|
|
1803
1797
|
var u = a.v;
|
|
1804
|
-
return ((a.f &
|
|
1798
|
+
return ((a.f & z) === 0 && a.reactions !== null || Fr(a)) && (u = cn(a)), xe.set(a, u), u;
|
|
1805
1799
|
}
|
|
1806
|
-
var o = (a.f &
|
|
1807
|
-
|
|
1800
|
+
var o = (a.f & te) === 0 && !ae && k !== null && (Tt || (k.f & te) !== 0), l = (a.f & Je) === 0;
|
|
1801
|
+
pt(a) && (o && (a.f |= te), wr(a)), o && !l && (kr(a), Lr(a));
|
|
1808
1802
|
}
|
|
1809
1803
|
if (se?.has(t))
|
|
1810
1804
|
return se.get(t);
|
|
1811
|
-
if ((t.f &
|
|
1805
|
+
if ((t.f & Me) !== 0)
|
|
1812
1806
|
throw t.v;
|
|
1813
1807
|
return t.v;
|
|
1814
1808
|
}
|
|
1815
|
-
function
|
|
1816
|
-
if (t.f |=
|
|
1809
|
+
function Lr(t) {
|
|
1810
|
+
if (t.f |= te, t.deps !== null)
|
|
1817
1811
|
for (const e of t.deps)
|
|
1818
|
-
(e.reactions ??= []).push(t), (e.f &
|
|
1812
|
+
(e.reactions ??= []).push(t), (e.f & O) !== 0 && (e.f & te) === 0 && (kr(
|
|
1819
1813
|
/** @type {Derived} */
|
|
1820
1814
|
e
|
|
1821
|
-
),
|
|
1815
|
+
), Lr(
|
|
1822
1816
|
/** @type {Derived} */
|
|
1823
1817
|
e
|
|
1824
1818
|
));
|
|
1825
1819
|
}
|
|
1826
|
-
function
|
|
1827
|
-
if (t.v ===
|
|
1820
|
+
function Fr(t) {
|
|
1821
|
+
if (t.v === D) return !0;
|
|
1828
1822
|
if (t.deps === null) return !1;
|
|
1829
1823
|
for (const e of t.deps)
|
|
1830
|
-
if (
|
|
1824
|
+
if (xe.has(e) || (e.f & O) !== 0 && Fr(
|
|
1831
1825
|
/** @type {Derived} */
|
|
1832
1826
|
e
|
|
1833
1827
|
))
|
|
1834
1828
|
return !0;
|
|
1835
1829
|
return !1;
|
|
1836
1830
|
}
|
|
1837
|
-
function
|
|
1831
|
+
function ee(t) {
|
|
1838
1832
|
var e = ae;
|
|
1839
1833
|
try {
|
|
1840
1834
|
return ae = !0, t();
|
|
@@ -1842,13 +1836,13 @@ function Q(t) {
|
|
|
1842
1836
|
ae = e;
|
|
1843
1837
|
}
|
|
1844
1838
|
}
|
|
1845
|
-
const
|
|
1846
|
-
function
|
|
1847
|
-
return
|
|
1839
|
+
const Fs = ["touchstart", "touchmove"];
|
|
1840
|
+
function $s(t) {
|
|
1841
|
+
return Fs.includes(t);
|
|
1848
1842
|
}
|
|
1849
|
-
const _t = /* @__PURE__ */ Symbol("events"),
|
|
1850
|
-
let
|
|
1851
|
-
function
|
|
1843
|
+
const _t = /* @__PURE__ */ Symbol("events"), Vs = /* @__PURE__ */ new Set(), Hn = /* @__PURE__ */ new Set();
|
|
1844
|
+
let qn = null;
|
|
1845
|
+
function Zn(t) {
|
|
1852
1846
|
var e = this, n = (
|
|
1853
1847
|
/** @type {Node} */
|
|
1854
1848
|
e.ownerDocument
|
|
@@ -1856,8 +1850,8 @@ function Qn(t) {
|
|
|
1856
1850
|
/** @type {null | Element} */
|
|
1857
1851
|
i[0] || t.target
|
|
1858
1852
|
);
|
|
1859
|
-
|
|
1860
|
-
var a = 0, u =
|
|
1853
|
+
qn = t;
|
|
1854
|
+
var a = 0, u = qn === t && t[_t];
|
|
1861
1855
|
if (u) {
|
|
1862
1856
|
var o = i.indexOf(u);
|
|
1863
1857
|
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1872,14 +1866,14 @@ function Qn(t) {
|
|
|
1872
1866
|
}
|
|
1873
1867
|
if (s = /** @type {Element} */
|
|
1874
1868
|
i[a] || t.target, s !== e) {
|
|
1875
|
-
|
|
1869
|
+
Wi(t, "currentTarget", {
|
|
1876
1870
|
configurable: !0,
|
|
1877
1871
|
get() {
|
|
1878
1872
|
return s || n;
|
|
1879
1873
|
}
|
|
1880
1874
|
});
|
|
1881
|
-
var c = k, f =
|
|
1882
|
-
|
|
1875
|
+
var c = k, f = b;
|
|
1876
|
+
re(null), pe(null);
|
|
1883
1877
|
try {
|
|
1884
1878
|
for (var h, m = []; s !== null; ) {
|
|
1885
1879
|
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
@@ -1890,88 +1884,77 @@ function Qn(t) {
|
|
|
1890
1884
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1891
1885
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1892
1886
|
t.target === s) && v.call(s, t);
|
|
1893
|
-
} catch (
|
|
1894
|
-
h ? m.push(
|
|
1887
|
+
} catch (_) {
|
|
1888
|
+
h ? m.push(_) : h = _;
|
|
1895
1889
|
}
|
|
1896
1890
|
if (t.cancelBubble || d === e || d === null)
|
|
1897
1891
|
break;
|
|
1898
1892
|
s = d;
|
|
1899
1893
|
}
|
|
1900
1894
|
if (h) {
|
|
1901
|
-
for (let
|
|
1895
|
+
for (let _ of m)
|
|
1902
1896
|
queueMicrotask(() => {
|
|
1903
|
-
throw
|
|
1897
|
+
throw _;
|
|
1904
1898
|
});
|
|
1905
1899
|
throw h;
|
|
1906
1900
|
}
|
|
1907
1901
|
} finally {
|
|
1908
|
-
t[_t] = e, delete t.currentTarget,
|
|
1902
|
+
t[_t] = e, delete t.currentTarget, re(c), pe(f);
|
|
1909
1903
|
}
|
|
1910
1904
|
}
|
|
1911
1905
|
}
|
|
1912
|
-
const
|
|
1906
|
+
const js = (
|
|
1913
1907
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1914
1908
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1915
1909
|
/** @param {string} html */
|
|
1916
1910
|
createHTML: (t) => t
|
|
1917
1911
|
})
|
|
1918
1912
|
);
|
|
1919
|
-
function
|
|
1913
|
+
function Us(t) {
|
|
1920
1914
|
return (
|
|
1921
1915
|
/** @type {string} */
|
|
1922
|
-
|
|
1916
|
+
js?.createHTML(t) ?? t
|
|
1923
1917
|
);
|
|
1924
1918
|
}
|
|
1925
|
-
function
|
|
1926
|
-
var e =
|
|
1927
|
-
return e.innerHTML =
|
|
1919
|
+
function Ws(t) {
|
|
1920
|
+
var e = Es("template");
|
|
1921
|
+
return e.innerHTML = Us(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1928
1922
|
}
|
|
1929
|
-
function
|
|
1923
|
+
function Bs(t, e) {
|
|
1930
1924
|
var n = (
|
|
1931
1925
|
/** @type {Effect} */
|
|
1932
|
-
|
|
1926
|
+
b
|
|
1933
1927
|
);
|
|
1934
1928
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1935
1929
|
}
|
|
1936
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1937
|
-
function
|
|
1938
|
-
var n
|
|
1931
|
+
function $r(t, e) {
|
|
1932
|
+
var n, r = !t.startsWith("<!>");
|
|
1939
1933
|
return () => {
|
|
1940
|
-
|
|
1941
|
-
/* @__PURE__ */
|
|
1942
|
-
var
|
|
1934
|
+
n === void 0 && (n = Ws(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1935
|
+
/* @__PURE__ */ Sr(n));
|
|
1936
|
+
var i = (
|
|
1943
1937
|
/** @type {TemplateNode} */
|
|
1944
|
-
|
|
1938
|
+
_r ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1945
1939
|
);
|
|
1946
|
-
|
|
1947
|
-
var u = (
|
|
1948
|
-
/** @type {TemplateNode} */
|
|
1949
|
-
/* @__PURE__ */ Nt(a)
|
|
1950
|
-
), o = (
|
|
1951
|
-
/** @type {TemplateNode} */
|
|
1952
|
-
a.lastChild
|
|
1953
|
-
);
|
|
1954
|
-
er(u, o);
|
|
1955
|
-
} else
|
|
1956
|
-
er(a, a);
|
|
1957
|
-
return a;
|
|
1940
|
+
return Bs(i, i), i;
|
|
1958
1941
|
};
|
|
1959
1942
|
}
|
|
1960
|
-
function
|
|
1943
|
+
function Vr(t, e) {
|
|
1961
1944
|
t !== null && t.before(
|
|
1962
1945
|
/** @type {Node} */
|
|
1963
1946
|
e
|
|
1964
1947
|
);
|
|
1965
1948
|
}
|
|
1966
1949
|
function dn(t, e) {
|
|
1967
|
-
return
|
|
1950
|
+
return Hs(t, e);
|
|
1968
1951
|
}
|
|
1969
1952
|
const Mt = /* @__PURE__ */ new Map();
|
|
1970
|
-
function
|
|
1971
|
-
|
|
1972
|
-
var o = void 0, l =
|
|
1973
|
-
var c = n ?? e.appendChild(
|
|
1974
|
-
|
|
1953
|
+
function Hs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, intro: a = !0, transformError: u }) {
|
|
1954
|
+
_s();
|
|
1955
|
+
var o = void 0, l = Ts(() => {
|
|
1956
|
+
var c = n ?? e.appendChild(xr());
|
|
1957
|
+
fs(
|
|
1975
1958
|
/** @type {TemplateNode} */
|
|
1976
1959
|
c,
|
|
1977
1960
|
{
|
|
@@ -1979,12 +1962,12 @@ function Gs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1979
1962
|
}
|
|
1980
1963
|
},
|
|
1981
1964
|
(m) => {
|
|
1982
|
-
|
|
1965
|
+
an({});
|
|
1983
1966
|
var d = (
|
|
1984
1967
|
/** @type {ComponentContext} */
|
|
1985
1968
|
le
|
|
1986
1969
|
);
|
|
1987
|
-
s && (d.c = s), i && (r.$$events = i), o = t(m, r) || {},
|
|
1970
|
+
s && (d.c = s), i && (r.$$events = i), o = t(m, r) || {}, on();
|
|
1988
1971
|
},
|
|
1989
1972
|
u
|
|
1990
1973
|
);
|
|
@@ -1993,55 +1976,55 @@ function Gs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1993
1976
|
var v = m[d];
|
|
1994
1977
|
if (!f.has(v)) {
|
|
1995
1978
|
f.add(v);
|
|
1996
|
-
var
|
|
1997
|
-
for (const
|
|
1998
|
-
var
|
|
1999
|
-
|
|
2000
|
-
var
|
|
2001
|
-
|
|
1979
|
+
var _ = $s(v);
|
|
1980
|
+
for (const Y of [e, document]) {
|
|
1981
|
+
var R = Mt.get(Y);
|
|
1982
|
+
R === void 0 && (R = /* @__PURE__ */ new Map(), Mt.set(Y, R));
|
|
1983
|
+
var j = R.get(v);
|
|
1984
|
+
j === void 0 ? (Y.addEventListener(v, Zn, { passive: _ }), R.set(v, 1)) : R.set(v, j + 1);
|
|
2002
1985
|
}
|
|
2003
1986
|
}
|
|
2004
1987
|
}
|
|
2005
1988
|
};
|
|
2006
|
-
return h(
|
|
1989
|
+
return h(Ui(Vs)), Hn.add(h), () => {
|
|
2007
1990
|
for (var m of f)
|
|
2008
|
-
for (const
|
|
1991
|
+
for (const _ of [e, document]) {
|
|
2009
1992
|
var d = (
|
|
2010
1993
|
/** @type {Map<string, number>} */
|
|
2011
|
-
Mt.get(
|
|
1994
|
+
Mt.get(_)
|
|
2012
1995
|
), v = (
|
|
2013
1996
|
/** @type {number} */
|
|
2014
1997
|
d.get(m)
|
|
2015
1998
|
);
|
|
2016
|
-
--v == 0 ? (
|
|
1999
|
+
--v == 0 ? (_.removeEventListener(m, Zn), d.delete(m), d.size === 0 && Mt.delete(_)) : d.set(m, v);
|
|
2017
2000
|
}
|
|
2018
|
-
|
|
2001
|
+
Hn.delete(h), c !== n && c.parentNode?.removeChild(c);
|
|
2019
2002
|
};
|
|
2020
2003
|
});
|
|
2021
|
-
return
|
|
2004
|
+
return qs.set(o, l), o;
|
|
2022
2005
|
}
|
|
2023
|
-
let
|
|
2024
|
-
function
|
|
2006
|
+
let qs = /* @__PURE__ */ new WeakMap();
|
|
2007
|
+
function jr(t) {
|
|
2025
2008
|
var e, n, r = "";
|
|
2026
2009
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
2027
2010
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
2028
2011
|
var i = t.length;
|
|
2029
|
-
for (e = 0; e < i; e++) t[e] && (n =
|
|
2012
|
+
for (e = 0; e < i; e++) t[e] && (n = jr(t[e])) && (r && (r += " "), r += n);
|
|
2030
2013
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2031
2014
|
return r;
|
|
2032
2015
|
}
|
|
2033
|
-
function
|
|
2034
|
-
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e =
|
|
2016
|
+
function Zs() {
|
|
2017
|
+
for (var t, e, n = 0, r = "", i = arguments.length; n < i; n++) (t = arguments[n]) && (e = jr(t)) && (r && (r += " "), r += e);
|
|
2035
2018
|
return r;
|
|
2036
2019
|
}
|
|
2037
|
-
function
|
|
2038
|
-
return typeof t == "object" ?
|
|
2020
|
+
function Ur(t) {
|
|
2021
|
+
return typeof t == "object" ? Zs(t) : t ?? "";
|
|
2039
2022
|
}
|
|
2040
|
-
function
|
|
2023
|
+
function Ys(t, e, n) {
|
|
2041
2024
|
var r = t == null ? "" : "" + t;
|
|
2042
2025
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
2043
2026
|
}
|
|
2044
|
-
function
|
|
2027
|
+
function Yn(t, e = !1) {
|
|
2045
2028
|
var n = e ? " !important;" : ";", r = "";
|
|
2046
2029
|
for (var i of Object.keys(t)) {
|
|
2047
2030
|
var s = t[i];
|
|
@@ -2049,48 +2032,48 @@ function tr(t, e = !1) {
|
|
|
2049
2032
|
}
|
|
2050
2033
|
return r;
|
|
2051
2034
|
}
|
|
2052
|
-
function
|
|
2035
|
+
function Js(t, e) {
|
|
2053
2036
|
if (e) {
|
|
2054
2037
|
var n = "", r, i;
|
|
2055
|
-
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n +=
|
|
2038
|
+
return Array.isArray(e) ? (r = e[0], i = e[1]) : r = e, r && (n += Yn(r)), i && (n += Yn(i, !0)), n = n.trim(), n === "" ? null : n;
|
|
2056
2039
|
}
|
|
2057
2040
|
return String(t);
|
|
2058
2041
|
}
|
|
2059
|
-
function
|
|
2042
|
+
function Wr(t, e, n, r, i, s) {
|
|
2060
2043
|
var a = t.__className;
|
|
2061
2044
|
if (a !== n || a === void 0) {
|
|
2062
|
-
var u =
|
|
2045
|
+
var u = Ys(n, r);
|
|
2063
2046
|
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2064
2047
|
}
|
|
2065
2048
|
return s;
|
|
2066
2049
|
}
|
|
2067
|
-
function
|
|
2050
|
+
function qt(t, e = {}, n, r) {
|
|
2068
2051
|
for (var i in n) {
|
|
2069
2052
|
var s = n[i];
|
|
2070
2053
|
e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
|
|
2071
2054
|
}
|
|
2072
2055
|
}
|
|
2073
|
-
function
|
|
2056
|
+
function rt(t, e, n, r) {
|
|
2074
2057
|
var i = t.__style;
|
|
2075
2058
|
if (i !== e) {
|
|
2076
|
-
var s =
|
|
2059
|
+
var s = Js(e, r);
|
|
2077
2060
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
2078
|
-
} else r && (Array.isArray(r) ? (
|
|
2061
|
+
} else r && (Array.isArray(r) ? (qt(t, n?.[0], r[0]), qt(t, n?.[1], r[1], "important")) : qt(t, n, r));
|
|
2079
2062
|
return r;
|
|
2080
2063
|
}
|
|
2081
|
-
function
|
|
2064
|
+
function Jn(t, e) {
|
|
2082
2065
|
return t === e || t?.[St] === e;
|
|
2083
2066
|
}
|
|
2084
|
-
function
|
|
2085
|
-
return
|
|
2067
|
+
function it(t = {}, e, n, r) {
|
|
2068
|
+
return Is(() => {
|
|
2086
2069
|
var i, s;
|
|
2087
|
-
return
|
|
2088
|
-
i = s, s = [],
|
|
2089
|
-
t !== n(...s) && (e(t, ...s), i &&
|
|
2070
|
+
return Tr(() => {
|
|
2071
|
+
i = s, s = [], ee(() => {
|
|
2072
|
+
t !== n(...s) && (e(t, ...s), i && Jn(n(...i), t) && e(null, ...i));
|
|
2090
2073
|
});
|
|
2091
2074
|
}), () => {
|
|
2092
2075
|
Re(() => {
|
|
2093
|
-
s &&
|
|
2076
|
+
s && Jn(n(...s), t) && e(null, ...s);
|
|
2094
2077
|
});
|
|
2095
2078
|
};
|
|
2096
2079
|
}), t;
|
|
@@ -2111,7 +2094,7 @@ class mn {
|
|
|
2111
2094
|
this.marker.update(e);
|
|
2112
2095
|
}
|
|
2113
2096
|
}
|
|
2114
|
-
class
|
|
2097
|
+
class dt {
|
|
2115
2098
|
shown;
|
|
2116
2099
|
id;
|
|
2117
2100
|
lat;
|
|
@@ -2119,16 +2102,16 @@ class mt {
|
|
|
2119
2102
|
rank;
|
|
2120
2103
|
marker;
|
|
2121
2104
|
constructor(e, n, r, i, s) {
|
|
2122
|
-
if (new.target ===
|
|
2105
|
+
if (new.target === dt) throw new Error("Unsupported code");
|
|
2123
2106
|
this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
|
|
2124
2107
|
}
|
|
2125
2108
|
}
|
|
2126
|
-
const
|
|
2127
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
2128
|
-
function
|
|
2109
|
+
const Xs = "5";
|
|
2110
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Xs);
|
|
2111
|
+
function Br(t) {
|
|
2129
2112
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2130
2113
|
}
|
|
2131
|
-
class
|
|
2114
|
+
class Hr {
|
|
2132
2115
|
animating;
|
|
2133
2116
|
animationEasing;
|
|
2134
2117
|
animationCallback;
|
|
@@ -2172,69 +2155,69 @@ class Gr {
|
|
|
2172
2155
|
return performance.now() > this.time.end;
|
|
2173
2156
|
}
|
|
2174
2157
|
}
|
|
2175
|
-
var
|
|
2176
|
-
function
|
|
2177
|
-
|
|
2178
|
-
let n =
|
|
2179
|
-
setDisplayed:
|
|
2180
|
-
getDisplayed:
|
|
2181
|
-
setSuppressed:
|
|
2182
|
-
setCollapsed:
|
|
2183
|
-
getCollapsed:
|
|
2184
|
-
setScale:
|
|
2158
|
+
var Ks = /* @__PURE__ */ $r("<div></div>");
|
|
2159
|
+
function Gs(t, e) {
|
|
2160
|
+
an(e, !0);
|
|
2161
|
+
let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
|
|
2162
|
+
setDisplayed: j,
|
|
2163
|
+
getDisplayed: Y,
|
|
2164
|
+
setSuppressed: de,
|
|
2165
|
+
setCollapsed: Pe,
|
|
2166
|
+
getCollapsed: ie,
|
|
2167
|
+
setScale: Dt
|
|
2185
2168
|
};
|
|
2186
2169
|
function o() {
|
|
2187
2170
|
return u;
|
|
2188
2171
|
}
|
|
2189
|
-
let l, c = s.width, f = s.height, h = s.padding, m = i?.background ??
|
|
2190
|
-
function
|
|
2191
|
-
|
|
2172
|
+
let l, c = s.width, f = s.height, h = s.padding, m = i?.background ?? Fi, d = i?.radius ?? Di, v = i?.shadow ?? zi, _ = /* @__PURE__ */ U(!1), R = !1;
|
|
2173
|
+
function j(y) {
|
|
2174
|
+
y == !0 && (l && r && r.parentElement != l && l.appendChild(r), R == !1 && a && r && (R = !0, setTimeout(async () => await a(n, r), 0))), y != E(_) && (B(_, y, !0), y == !1 && I.end());
|
|
2192
2175
|
}
|
|
2193
|
-
function
|
|
2194
|
-
return E(
|
|
2176
|
+
function Y() {
|
|
2177
|
+
return E(_);
|
|
2195
2178
|
}
|
|
2196
|
-
let
|
|
2197
|
-
function
|
|
2198
|
-
|
|
2179
|
+
let ue = /* @__PURE__ */ U(!0);
|
|
2180
|
+
function de(y) {
|
|
2181
|
+
y != E(ue) && (B(ue, y, !0), y && (K = je, I.set(je)));
|
|
2199
2182
|
}
|
|
2200
|
-
let
|
|
2201
|
-
function
|
|
2202
|
-
|
|
2183
|
+
let me = /* @__PURE__ */ U(!0);
|
|
2184
|
+
function Pe(y) {
|
|
2185
|
+
y != E(me) && (B(me, y, !0), I.target(E(me) ? 0 : K));
|
|
2203
2186
|
}
|
|
2204
|
-
function
|
|
2205
|
-
return E(
|
|
2187
|
+
function ie() {
|
|
2188
|
+
return E(_) ? I.expired() : !0;
|
|
2206
2189
|
}
|
|
2207
|
-
let
|
|
2208
|
-
value:
|
|
2190
|
+
let K = je, I = new Hr({
|
|
2191
|
+
value: je,
|
|
2209
2192
|
min: 0,
|
|
2210
2193
|
max: 1,
|
|
2211
|
-
timespan:
|
|
2212
|
-
easing:
|
|
2213
|
-
callback:
|
|
2194
|
+
timespan: Ai,
|
|
2195
|
+
easing: Br,
|
|
2196
|
+
callback: zt
|
|
2214
2197
|
});
|
|
2215
|
-
function
|
|
2216
|
-
|
|
2198
|
+
function Dt(y) {
|
|
2199
|
+
K = y, I.target(y);
|
|
2217
2200
|
}
|
|
2218
|
-
function
|
|
2219
|
-
l.style.scale =
|
|
2201
|
+
function zt(y) {
|
|
2202
|
+
l.style.scale = y.toString(), l.style.filter = `brightness(${$e(y)})`;
|
|
2220
2203
|
}
|
|
2221
|
-
function
|
|
2222
|
-
return 0.25 + 0.75 *
|
|
2204
|
+
function $e(y) {
|
|
2205
|
+
return 0.25 + 0.75 * y;
|
|
2223
2206
|
}
|
|
2224
|
-
var
|
|
2225
|
-
let
|
|
2226
|
-
return
|
|
2227
|
-
(
|
|
2228
|
-
|
|
2229
|
-
|
|
2207
|
+
var Ot = { invoke: o }, Ve = Ks();
|
|
2208
|
+
let mt;
|
|
2209
|
+
return it(Ve, (y) => l = y, () => l), Ir(
|
|
2210
|
+
(y) => {
|
|
2211
|
+
Wr(
|
|
2212
|
+
Ve,
|
|
2230
2213
|
1,
|
|
2231
|
-
|
|
2214
|
+
Ur([
|
|
2232
2215
|
"pin",
|
|
2233
|
-
E(
|
|
2234
|
-
E(
|
|
2216
|
+
E(_) && "displayed",
|
|
2217
|
+
E(ue) && "suppressed"
|
|
2235
2218
|
]),
|
|
2236
2219
|
"svelte-10kxbrm"
|
|
2237
|
-
),
|
|
2220
|
+
), mt = rt(Ve, "", mt, y);
|
|
2238
2221
|
},
|
|
2239
2222
|
[
|
|
2240
2223
|
() => ({
|
|
@@ -2244,28 +2227,28 @@ function ia(t, e) {
|
|
|
2244
2227
|
"border-radius": `${d}px`,
|
|
2245
2228
|
"background-color": `rgb(from ${m} r g b / 1)`,
|
|
2246
2229
|
"box-shadow": v,
|
|
2247
|
-
scale:
|
|
2248
|
-
filter: `brightness(${
|
|
2230
|
+
scale: je,
|
|
2231
|
+
filter: `brightness(${$e(je)})`
|
|
2249
2232
|
})
|
|
2250
2233
|
]
|
|
2251
|
-
),
|
|
2234
|
+
), Vr(t, Ve), on(Ot);
|
|
2252
2235
|
}
|
|
2253
|
-
class
|
|
2236
|
+
class Qs extends dt {
|
|
2254
2237
|
width;
|
|
2255
2238
|
height;
|
|
2256
2239
|
zoom;
|
|
2257
2240
|
component;
|
|
2258
2241
|
constructor(e, n, r, i, s, a) {
|
|
2259
|
-
super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = dn(
|
|
2242
|
+
super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.zoom = NaN, this.component = dn(Gs, {
|
|
2260
2243
|
target: this.marker.div,
|
|
2261
2244
|
props: a
|
|
2262
2245
|
});
|
|
2263
2246
|
}
|
|
2264
2247
|
get zIndex() {
|
|
2265
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2248
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * ar) + Ci;
|
|
2266
2249
|
}
|
|
2267
2250
|
}
|
|
2268
|
-
class
|
|
2251
|
+
class Xn {
|
|
2269
2252
|
animating;
|
|
2270
2253
|
animationTimestamp;
|
|
2271
2254
|
animationEnd;
|
|
@@ -2319,125 +2302,127 @@ class rr {
|
|
|
2319
2302
|
return performance.now() > this.animationEnd;
|
|
2320
2303
|
}
|
|
2321
2304
|
}
|
|
2322
|
-
function
|
|
2305
|
+
function rn(t, e, n) {
|
|
2323
2306
|
if (t <= 0 || e <= 0) return { x: 0, y: 0 };
|
|
2324
2307
|
let r = t / 2, i = e / 2, s = Math.sqrt(r * r + i * i), a = Math.atan(i / r) * (180 / Math.PI), u = n * (Math.PI / 180);
|
|
2325
2308
|
return n < 180 ? n < 90 ? n < a ? { x: 0, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: 0 } : n < 180 - a ? { x: s * Math.cos(u) - r, y: 0 } : { x: -t, y: s * Math.sin(u) - i } : n < 270 ? n < 180 + a ? { x: -t, y: s * Math.sin(u) - i } : { x: s * Math.cos(u) - r, y: -e } : n < 360 - a ? { x: s * Math.cos(u) - r, y: -e } : { x: 0, y: s * Math.sin(u) - i };
|
|
2326
2309
|
}
|
|
2327
|
-
var
|
|
2328
|
-
function
|
|
2329
|
-
|
|
2330
|
-
let n =
|
|
2331
|
-
setDisplayed:
|
|
2332
|
-
getDisplayed:
|
|
2333
|
-
setCollapsed:
|
|
2334
|
-
getCollapsed:
|
|
2335
|
-
getExpanded:
|
|
2336
|
-
setAngle:
|
|
2310
|
+
var ea = /* @__PURE__ */ $r('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element bubble svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
|
|
2311
|
+
function qr(t, e) {
|
|
2312
|
+
an(e, !0);
|
|
2313
|
+
let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
|
|
2314
|
+
setDisplayed: Dt,
|
|
2315
|
+
getDisplayed: zt,
|
|
2316
|
+
setCollapsed: Ot,
|
|
2317
|
+
getCollapsed: Ve,
|
|
2318
|
+
getExpanded: mt,
|
|
2319
|
+
setAngle: li
|
|
2337
2320
|
};
|
|
2338
2321
|
function o() {
|
|
2339
2322
|
return u;
|
|
2340
2323
|
}
|
|
2341
|
-
let l = s.width + 2 * s.padding, c = s.height + 2 * s.padding, f = s.padding, h, m = i?.filter ??
|
|
2342
|
-
|
|
2343
|
-
|
|
2324
|
+
let l = s.width + 2 * s.padding, c = s.height + 2 * s.padding, f = s.padding, h, m = i?.filter ?? Li, d, v = s.padding * 2, _ = Math.max(2, (i?.radius ?? zn) / v), R = i?.background ?? On, j, Y = s.width, ue = s.height, de = Math.min(i?.radius ?? zn, Math.min(Y, ue) / 2), me = Math.min(1, 2 * de / Math.min(ue, Y)), Pe = i?.background ?? On, ie;
|
|
2325
|
+
s.width, s.height, i?.radius;
|
|
2326
|
+
let K = !1, I = /* @__PURE__ */ U(!1);
|
|
2327
|
+
function Dt(g) {
|
|
2328
|
+
g != E(I) && (B(I, g, !0), g == !0 && (r && r.parentElement != ie && ie.appendChild(r), K == !1 && a && r && (K = !0, setTimeout(async () => await a(n, r), 0))), g == !1 && (y.end(), $t.end(), jt.end()));
|
|
2344
2329
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return E(
|
|
2330
|
+
function zt() {
|
|
2331
|
+
return E(I);
|
|
2347
2332
|
}
|
|
2348
|
-
let
|
|
2349
|
-
function
|
|
2350
|
-
g != E(
|
|
2333
|
+
let $e = /* @__PURE__ */ U(!0);
|
|
2334
|
+
function Ot(g) {
|
|
2335
|
+
g != E($e) && (B($e, g, !0), y.target(E($e) ? 0 : 1));
|
|
2351
2336
|
}
|
|
2352
|
-
function
|
|
2353
|
-
return E(
|
|
2337
|
+
function Ve() {
|
|
2338
|
+
return E(I) ? y.expired() : !0;
|
|
2354
2339
|
}
|
|
2355
|
-
function
|
|
2356
|
-
return E(
|
|
2340
|
+
function mt() {
|
|
2341
|
+
return E(I) ? y.expired() : !1;
|
|
2357
2342
|
}
|
|
2358
|
-
let
|
|
2343
|
+
let y = new Hr({
|
|
2359
2344
|
value: 0,
|
|
2360
2345
|
min: 0,
|
|
2361
2346
|
max: 1,
|
|
2362
|
-
timespan:
|
|
2363
|
-
easing:
|
|
2364
|
-
callback:
|
|
2347
|
+
timespan: Ni,
|
|
2348
|
+
easing: Br,
|
|
2349
|
+
callback: oi
|
|
2365
2350
|
});
|
|
2366
|
-
function
|
|
2367
|
-
h.style.opacity = `${g}`, h.style.scale = `${g}`,
|
|
2351
|
+
function oi(g) {
|
|
2352
|
+
h.style.opacity = `${g}`, h.style.scale = `${g}`, ie.style.opacity = `${g}`;
|
|
2368
2353
|
}
|
|
2369
|
-
let
|
|
2354
|
+
let vt = NaN, Lt = /* @__PURE__ */ U(!1), Ft = -l / 2, $t = new Xn({
|
|
2370
2355
|
value: -l / 2,
|
|
2371
2356
|
min: -l,
|
|
2372
2357
|
max: 0,
|
|
2373
2358
|
precision: 1,
|
|
2374
|
-
stiffness:
|
|
2375
|
-
callback:
|
|
2376
|
-
}),
|
|
2359
|
+
stiffness: Nn,
|
|
2360
|
+
callback: ui
|
|
2361
|
+
}), Vt = -c / 2, jt = new Xn({
|
|
2377
2362
|
value: -c / 2,
|
|
2378
2363
|
min: -c,
|
|
2379
2364
|
max: 0,
|
|
2380
2365
|
precision: 1,
|
|
2381
|
-
stiffness:
|
|
2382
|
-
callback:
|
|
2366
|
+
stiffness: Nn,
|
|
2367
|
+
callback: ci
|
|
2383
2368
|
});
|
|
2384
|
-
function
|
|
2369
|
+
function li(g, gt) {
|
|
2385
2370
|
if (Number.isNaN(g)) {
|
|
2386
|
-
|
|
2371
|
+
vt = NaN, B(Lt, !1);
|
|
2387
2372
|
return;
|
|
2388
2373
|
}
|
|
2389
|
-
if (E(
|
|
2390
|
-
|
|
2391
|
-
const
|
|
2392
|
-
$t.set(Math.round(
|
|
2374
|
+
if (E(Lt) == !1 || gt == !0) {
|
|
2375
|
+
B(Lt, !0), vt = g;
|
|
2376
|
+
const Ie = rn(l, c, g);
|
|
2377
|
+
$t.set(Math.round(Ie.x)), jt.set(Math.round(Ie.y));
|
|
2393
2378
|
return;
|
|
2394
2379
|
}
|
|
2395
|
-
if (
|
|
2396
|
-
|
|
2397
|
-
const
|
|
2398
|
-
$t.target(Math.round(
|
|
2380
|
+
if (vt != g) {
|
|
2381
|
+
vt = g;
|
|
2382
|
+
const Ie = rn(l, c, g);
|
|
2383
|
+
$t.target(Math.round(Ie.x)), jt.target(Math.round(Ie.y));
|
|
2399
2384
|
return;
|
|
2400
2385
|
}
|
|
2401
2386
|
}
|
|
2402
|
-
function
|
|
2403
|
-
|
|
2387
|
+
function ui(g) {
|
|
2388
|
+
Ft = g, yn(Ft, Vt);
|
|
2404
2389
|
}
|
|
2405
|
-
function
|
|
2406
|
-
|
|
2390
|
+
function ci(g) {
|
|
2391
|
+
Vt = g, yn(Ft, Vt);
|
|
2407
2392
|
}
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2393
|
+
const fi = c < l ? c / l : 1, hi = l < c ? l / c : 1, Te = Math.min(l, c) / 2, pi = Te * Math.SQRT2, kn = 15, di = 15 * Math.SQRT2;
|
|
2394
|
+
function yn(g, gt) {
|
|
2395
|
+
const Ie = g + l / 2, vi = gt + c / 2, wt = Ie * fi, kt = vi * hi, Bt = Math.sqrt(wt * wt + kt * kt), Sn = (Bt - Te) / (pi - Te), gi = Math.atan2(kt, wt) / Math.PI * 180 - 45, Pn = kn + Sn * (di - kn), wi = Bt < Te ? Bt / Te : 1, Tn = 0.5 * ((1 + 0.5 * me) * Sn), ki = g + f * (1 - Tn * (wt / Te)), yi = gt + f * (1 - Tn * (kt / Te));
|
|
2396
|
+
d.style.transform = `scale(${wi}) rotate(${gi}deg) skew(${Pn}deg, ${Pn}deg)`, j.style.transform = `translate(${Math.round(ki)}px, ${Math.round(yi)}px)`;
|
|
2411
2397
|
}
|
|
2412
|
-
var
|
|
2398
|
+
var mi = { invoke: o }, tt = ea();
|
|
2399
|
+
let bn;
|
|
2400
|
+
var Ut = Un(tt);
|
|
2401
|
+
let _n;
|
|
2402
|
+
it(Ut, (g) => d = g, () => d);
|
|
2403
|
+
var Wt = Ms(Ut, 2);
|
|
2413
2404
|
let Mn;
|
|
2414
|
-
var
|
|
2415
|
-
let
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
let Sn;
|
|
2419
|
-
st(xn, (g) => V = g, () => V), st(tt, (g) => h = g, () => h);
|
|
2420
|
-
var Pn = Zn(tt, 2);
|
|
2421
|
-
let Tn;
|
|
2422
|
-
return st(Pn, (g) => Y = g, () => Y), zr(() => {
|
|
2423
|
-
Xr(tt, 1, Zr(["element anchor", E(de) && "displayed"]), "svelte-1no6o2a"), Mn = it(tt, "", Mn, { filter: m }), En = it(Ut, "", En, {
|
|
2405
|
+
var En = Un(Wt);
|
|
2406
|
+
let xn;
|
|
2407
|
+
return it(En, (g) => ie = g, () => ie), it(Wt, (g) => j = g, () => j), it(tt, (g) => h = g, () => h), Ir(() => {
|
|
2408
|
+
Wr(tt, 1, Ur(["element anchor", E(I) && "displayed"]), "svelte-1no6o2a"), bn = rt(tt, "", bn, { filter: m }), _n = rt(Ut, "", _n, {
|
|
2424
2409
|
width: `${v}px`,
|
|
2425
2410
|
height: `${v}px`,
|
|
2426
|
-
"border-radius": `${
|
|
2427
|
-
"background-color": `rgb(from ${
|
|
2428
|
-
}),
|
|
2429
|
-
width: `${
|
|
2430
|
-
height: `${
|
|
2431
|
-
"border-radius": `${
|
|
2432
|
-
"background-color": `rgb(from ${
|
|
2433
|
-
}),
|
|
2434
|
-
width: `${
|
|
2435
|
-
height: `${
|
|
2436
|
-
"border-radius": `${
|
|
2411
|
+
"border-radius": `${_}px`,
|
|
2412
|
+
"background-color": `rgb(from ${R} r g b / 1)`
|
|
2413
|
+
}), Mn = rt(Wt, "", Mn, {
|
|
2414
|
+
width: `${Y}px`,
|
|
2415
|
+
height: `${ue}px`,
|
|
2416
|
+
"border-radius": `${de}px`,
|
|
2417
|
+
"background-color": `rgb(from ${Pe} r g b / 1)`
|
|
2418
|
+
}), xn = rt(En, "", xn, {
|
|
2419
|
+
width: `${Y}px`,
|
|
2420
|
+
height: `${ue}px`,
|
|
2421
|
+
"border-radius": `${de}px`
|
|
2437
2422
|
});
|
|
2438
|
-
}),
|
|
2423
|
+
}), Vr(t, tt), on(mi);
|
|
2439
2424
|
}
|
|
2440
|
-
class
|
|
2425
|
+
class ta extends dt {
|
|
2441
2426
|
width;
|
|
2442
2427
|
height;
|
|
2443
2428
|
zoom;
|
|
@@ -2445,32 +2430,32 @@ class oa extends mt {
|
|
|
2445
2430
|
directions;
|
|
2446
2431
|
component;
|
|
2447
2432
|
constructor(e, n, r, i, s, a) {
|
|
2448
|
-
super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = dn(
|
|
2433
|
+
super(n, r, i, s, new mn(e, r, i, s)), this.width = a.dimensions.width + a.dimensions.padding * 2, this.height = a.dimensions.height + a.dimensions.padding * 2, this.zoom = NaN, this.angle = NaN, this.directions = [], this.component = dn(qr, {
|
|
2449
2434
|
target: this.marker.div,
|
|
2450
2435
|
props: a
|
|
2451
2436
|
});
|
|
2452
2437
|
}
|
|
2453
2438
|
get zIndex() {
|
|
2454
|
-
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom *
|
|
2439
|
+
return Number.isNaN(this.zoom) ? this.rank : Math.round(-this.zoom * ar) + Ri;
|
|
2455
2440
|
}
|
|
2456
2441
|
}
|
|
2457
|
-
class
|
|
2442
|
+
class na extends dt {
|
|
2458
2443
|
width;
|
|
2459
2444
|
height;
|
|
2460
2445
|
padding;
|
|
2461
2446
|
angle;
|
|
2462
2447
|
component;
|
|
2463
2448
|
constructor(e, n, r, i, s, a) {
|
|
2464
|
-
super(n, r, i, s, new mn(e, r, i,
|
|
2449
|
+
super(n, r, i, s, new mn(e, r, i, Cn)), this.width = a.dimensions.width, this.height = a.dimensions.height, this.padding = a.dimensions.padding, this.angle = NaN, this.shown = !1, this.component = dn(qr, {
|
|
2465
2450
|
target: this.marker.div,
|
|
2466
2451
|
props: a
|
|
2467
2452
|
});
|
|
2468
2453
|
}
|
|
2469
2454
|
get zIndex() {
|
|
2470
|
-
return
|
|
2455
|
+
return Cn;
|
|
2471
2456
|
}
|
|
2472
2457
|
}
|
|
2473
|
-
class
|
|
2458
|
+
class ra {
|
|
2474
2459
|
id;
|
|
2475
2460
|
state = void 0;
|
|
2476
2461
|
pin;
|
|
@@ -2478,11 +2463,11 @@ class ua {
|
|
|
2478
2463
|
popup;
|
|
2479
2464
|
constructor(e, n) {
|
|
2480
2465
|
const r = n.properites.id, i = n.properites.lat, s = n.properites.lng, a = n.properites.rank, u = n.properites.pin, o = n.properites.tooltip, l = n.properites.popup;
|
|
2481
|
-
this.id = r, this.pin = new
|
|
2466
|
+
this.id = r, this.pin = new Qs(e, r, i, s, a, u), this.tooltip = new ta(e, r, i, s, a, o), this.popup = l ? new na(e, r, i, s, a, l) : void 0;
|
|
2482
2467
|
}
|
|
2483
2468
|
}
|
|
2484
2469
|
const Zt = 4;
|
|
2485
|
-
class
|
|
2470
|
+
class ia {
|
|
2486
2471
|
// Elements
|
|
2487
2472
|
pins = /* @__PURE__ */ new Set();
|
|
2488
2473
|
// Configuration
|
|
@@ -2511,7 +2496,7 @@ class ca {
|
|
|
2511
2496
|
this.pinMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.pinMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0), this.pinZoomDelta = Math.max(1, this.pinZoomMax - Math.log10(e.length));
|
|
2512
2497
|
}
|
|
2513
2498
|
render(e, n) {
|
|
2514
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2499
|
+
const r = e.zoom, i = n.mapSize, s = lt.offset(e, i, {
|
|
2515
2500
|
top: this.pinMaxHeight,
|
|
2516
2501
|
bottom: this.pinMaxHeight,
|
|
2517
2502
|
right: this.pinMaxWidth,
|
|
@@ -2521,8 +2506,8 @@ class ca {
|
|
|
2521
2506
|
s.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());
|
|
2522
2507
|
}
|
|
2523
2508
|
}
|
|
2524
|
-
var
|
|
2525
|
-
class
|
|
2509
|
+
var sa = (t) => 9;
|
|
2510
|
+
class aa {
|
|
2526
2511
|
// Elements
|
|
2527
2512
|
tooltips = /* @__PURE__ */ new Set();
|
|
2528
2513
|
// Configuration
|
|
@@ -2545,7 +2530,7 @@ class ha {
|
|
|
2545
2530
|
this.tooltipMaxWidth = e.reduce((n, r) => Math.max(n, r.width), 0), this.tooltipMaxHeight = e.reduce((n, r) => Math.max(n, r.height), 0);
|
|
2546
2531
|
}
|
|
2547
2532
|
render(e, n) {
|
|
2548
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2533
|
+
const r = e.zoom, i = n.mapSize, s = lt.offset(e, i, {
|
|
2549
2534
|
top: this.tooltipMaxHeight,
|
|
2550
2535
|
bottom: this.tooltipMaxHeight,
|
|
2551
2536
|
right: this.tooltipMaxWidth,
|
|
@@ -2563,7 +2548,7 @@ class ha {
|
|
|
2563
2548
|
a.component.invoke().setDisplayed(!1), a.marker.remove();
|
|
2564
2549
|
}
|
|
2565
2550
|
}
|
|
2566
|
-
class
|
|
2551
|
+
class oa {
|
|
2567
2552
|
// Elements
|
|
2568
2553
|
popups = /* @__PURE__ */ new Set();
|
|
2569
2554
|
// Configuration
|
|
@@ -2582,11 +2567,11 @@ class pa {
|
|
|
2582
2567
|
}
|
|
2583
2568
|
show(e, n) {
|
|
2584
2569
|
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;
|
|
2585
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l =
|
|
2586
|
-
let
|
|
2587
|
-
f < m ?
|
|
2588
|
-
let
|
|
2589
|
-
h < d ?
|
|
2570
|
+
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l = st(s.ne.lat, s.sw.lng, o), c = st(s.sw.lat, s.ne.lng, o), f = c.x - l.x, h = c.y - l.y, m = r.width + r.padding * 8, d = r.height + r.padding * 8, v = st(r.lat, r.lng, o), _ = rn(m, d, e.tooltip.angle), R = v.x + _.x, j = R + m, Y = v.y + _.y, ue = Y + d, de = R - l.x, me = c.x - j, Pe = Y - l.y, ie = c.y - ue;
|
|
2571
|
+
let K = 0;
|
|
2572
|
+
f < m ? K = (de - me) / 2 : (de < 0 && (K = de), me < 0 && (K = -me));
|
|
2573
|
+
let I = 0;
|
|
2574
|
+
h < d ? I = (Pe - ie) / 2 : (Pe < 0 && (I = Pe), ie < 0 && (I = -ie)), (K != 0 || I != 0) && n.panBy(K, I);
|
|
2590
2575
|
}
|
|
2591
2576
|
hide(e) {
|
|
2592
2577
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2596,14 +2581,14 @@ class pa {
|
|
|
2596
2581
|
e.shown ? (e.component.invoke().setDisplayed(!0), e.component.invoke().setCollapsed(!1), e.component.invoke().setAngle(e.angle, !0), e.marker.insert()) : (e.component.invoke().setCollapsed(!0), e.component.invoke().getCollapsed() && (e.component.invoke().setDisplayed(!1), e.marker.remove()));
|
|
2597
2582
|
}
|
|
2598
2583
|
}
|
|
2599
|
-
class
|
|
2584
|
+
class la {
|
|
2600
2585
|
provider;
|
|
2601
2586
|
pinManager;
|
|
2602
2587
|
tooltipManager;
|
|
2603
2588
|
popupManager;
|
|
2604
2589
|
elementsStore;
|
|
2605
2590
|
constructor(e) {
|
|
2606
|
-
this.provider = e, this.pinManager = new
|
|
2591
|
+
this.provider = e, this.pinManager = new ia(), this.tooltipManager = new aa(), this.popupManager = new oa(), this.elementsStore = /* @__PURE__ */ new Map();
|
|
2607
2592
|
}
|
|
2608
2593
|
set configuration(e) {
|
|
2609
2594
|
this.pinManager.configuration = e, this.popupManager.configuration = e;
|
|
@@ -2628,7 +2613,7 @@ class da {
|
|
|
2628
2613
|
insertElements(e, n) {
|
|
2629
2614
|
for (const r of e) {
|
|
2630
2615
|
let i = this.elementsStore.get(r.properites.id);
|
|
2631
|
-
i == null && (i = new
|
|
2616
|
+
i == null && (i = new ra(this.provider, r), i.tooltip.marker.div.addEventListener("click", (s) => n(s, r.properites.id)), this.elementsStore.set(r.properites.id, i)), this.pinManager.insert(i.pin, r.state), this.tooltipManager.insert(i.tooltip, r.state), i.popup != null && this.popupManager.insert(i.popup);
|
|
2632
2617
|
}
|
|
2633
2618
|
this.pinManager.refresh(), this.tooltipManager.refresh();
|
|
2634
2619
|
}
|
|
@@ -2653,11 +2638,11 @@ class da {
|
|
|
2653
2638
|
}
|
|
2654
2639
|
//#endregion
|
|
2655
2640
|
}
|
|
2656
|
-
const
|
|
2657
|
-
function
|
|
2641
|
+
const Zr = '(function(){"use strict";var h=[0,30,60,90,120,150,180,210,240,270,300,330],l=",";function i(e,t){return parseFloat(e[t]+e[t+1]+"."+e[t+2])}function f(e,t){return h[parseInt(e[t],16)]}function m(e){if(!e||e.length===0)return[];let t=[],n=e.split(l);for(let o=0;o<n.length;o++){let s=n[o],r=i(s,0),a=[];for(let c=3;c<s.length;c+=4){let v=i(s,c),T=f(s,c+3);a.push({zoom:v,angle:T})}t.push({zoom:r,directions:a})}return t}var d=e=>new Promise(t=>setTimeout(t,e));async function u(e,t){let n=0,o=Math.max(1,t?.retry?.times??1);for(;n<o;)try{return{data:await e(),error:null}}catch(s){if(n++,n==o){if(s instanceof Error)return(!t?.exceptions||t.exceptions.some(r=>s instanceof r)==!1)&&t?.catch?.(s),{data:null,error:s};throw t?.catch?.(s),s}else t?.retry?.delay&&await d(t.retry.delay)}throw Error("Unreachable code")}async function w(e,t,n,o,s){let r=await u(async()=>await fetch(e,{...n,method:"POST",body:t?JSON.stringify(t):void 0}),{retry:{times:o,delay:s}});if(r.error)throw r.error;let a=r.data;if(!a.ok)throw Error(await a.text());return await a.json()}const y="https://maps.api.arenarium.dev/states",p=3,E=500,S={async fetch(e){const n={headers:{"Cache-Control":self?.location.host.startsWith("localhost")||self?.location.host.startsWith("127.0.0.1")?"no-cache":""}},o=await w(y,e,n,p,E),s=m(o.states),r=o.jwt;return{states:s,jwt:r}}};class k{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:n,method:o,args:s}=t.data;try{const r=this.methods[o];if(typeof r!="function")throw new Error(`Unknown method: ${o}`);const a=await r(...s),c={id:n,result:a};self.postMessage(c)}catch(r){const a=r instanceof Error?r.message:String(r),c={id:n,error:a};self.postMessage(c)}}}new k(S).listen()})();\n', Kn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Zr], { type: "text/javascript;charset=utf-8" });
|
|
2642
|
+
function ua(t) {
|
|
2658
2643
|
let e;
|
|
2659
2644
|
try {
|
|
2660
|
-
if (e =
|
|
2645
|
+
if (e = Kn && (self.URL || self.webkitURL).createObjectURL(Kn), !e) throw "";
|
|
2661
2646
|
const n = new Worker(e, {
|
|
2662
2647
|
name: t?.name
|
|
2663
2648
|
});
|
|
@@ -2666,15 +2651,15 @@ function ma(t) {
|
|
|
2666
2651
|
}), n;
|
|
2667
2652
|
} catch {
|
|
2668
2653
|
return new Worker(
|
|
2669
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
2654
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Zr),
|
|
2670
2655
|
{
|
|
2671
2656
|
name: t?.name
|
|
2672
2657
|
}
|
|
2673
2658
|
);
|
|
2674
2659
|
}
|
|
2675
2660
|
}
|
|
2676
|
-
var
|
|
2677
|
-
async function
|
|
2661
|
+
var ca = (t) => new Promise((e) => setTimeout(e, t));
|
|
2662
|
+
async function Yr(t, e) {
|
|
2678
2663
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2679
2664
|
for (; n < r; ) try {
|
|
2680
2665
|
return { data: await t(), error: null };
|
|
@@ -2683,146 +2668,146 @@ async function ei(t, e) {
|
|
|
2683
2668
|
if (i instanceof Error)
|
|
2684
2669
|
return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
|
|
2685
2670
|
throw e?.catch?.(i), i;
|
|
2686
|
-
} else e?.retry?.delay && await
|
|
2671
|
+
} else e?.retry?.delay && await ca(e.retry.delay);
|
|
2687
2672
|
}
|
|
2688
2673
|
throw Error("Unreachable code");
|
|
2689
2674
|
}
|
|
2690
|
-
async function
|
|
2691
|
-
let s = await
|
|
2675
|
+
async function fa(t, e, n, r, i) {
|
|
2676
|
+
let s = await Yr(async () => await fetch(t, { ...n, method: "POST", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2692
2677
|
if (s.error) throw s.error;
|
|
2693
2678
|
let a = s.data;
|
|
2694
2679
|
if (!a.ok) throw Error(await a.text());
|
|
2695
2680
|
return await a.json();
|
|
2696
2681
|
}
|
|
2697
|
-
async function
|
|
2698
|
-
let s = await
|
|
2682
|
+
async function ha(t, e, n, r, i) {
|
|
2683
|
+
let s = await Yr(async () => await fetch(t, { ...n, method: "PUT", body: e ? JSON.stringify(e) : void 0 }), { retry: { times: r, delay: i } });
|
|
2699
2684
|
if (s.error) throw s.error;
|
|
2700
2685
|
let a = s.data;
|
|
2701
2686
|
if (!a.ok) throw Error(await a.text());
|
|
2702
2687
|
}
|
|
2703
|
-
const Be = 0xc3a5c85c97cb3127n,
|
|
2688
|
+
const Be = 0xc3a5c85c97cb3127n, ce = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Jr = 0xc949d7c7509e6557n, H = 0xffffffffffffffffn;
|
|
2704
2689
|
function p(t) {
|
|
2705
|
-
return t &
|
|
2690
|
+
return t & H;
|
|
2706
2691
|
}
|
|
2707
|
-
function
|
|
2708
|
-
return e === 0 ? t &
|
|
2692
|
+
function N(t, e) {
|
|
2693
|
+
return e === 0 ? t & H : (t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H);
|
|
2709
2694
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return t = t &
|
|
2695
|
+
function pa(t, e) {
|
|
2696
|
+
return t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H;
|
|
2712
2697
|
}
|
|
2713
|
-
function
|
|
2698
|
+
function ct(t) {
|
|
2714
2699
|
return p(t ^ t >> 47n);
|
|
2715
2700
|
}
|
|
2716
2701
|
function M(t, e = 0) {
|
|
2717
2702
|
let n = 0n;
|
|
2718
2703
|
for (let r = 0; r < 8; r++)
|
|
2719
2704
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2720
|
-
return n &
|
|
2705
|
+
return n & H;
|
|
2721
2706
|
}
|
|
2722
|
-
function
|
|
2707
|
+
function Gn(t, e = 0) {
|
|
2723
2708
|
let n = 0n;
|
|
2724
2709
|
for (let r = 0; r < 4; r++)
|
|
2725
2710
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2726
2711
|
return n & 0xffffffffn;
|
|
2727
2712
|
}
|
|
2728
|
-
function
|
|
2713
|
+
function da(t) {
|
|
2729
2714
|
const e = 0x9ddfea08eb382d69n;
|
|
2730
|
-
let n = (t.first ^ t.second) * e &
|
|
2731
|
-
n ^= n >> 47n, n = n &
|
|
2732
|
-
let r = (t.second ^ n) * e &
|
|
2733
|
-
return r ^= r >> 47n, r = r * e &
|
|
2715
|
+
let n = (t.first ^ t.second) * e & H;
|
|
2716
|
+
n ^= n >> 47n, n = n & H;
|
|
2717
|
+
let r = (t.second ^ n) * e & H;
|
|
2718
|
+
return r ^= r >> 47n, r = r * e & H, r;
|
|
2734
2719
|
}
|
|
2735
2720
|
function qe(t, e) {
|
|
2736
|
-
return
|
|
2721
|
+
return da({ first: t, second: e });
|
|
2737
2722
|
}
|
|
2738
|
-
function
|
|
2723
|
+
function ma(t) {
|
|
2739
2724
|
const e = t.length;
|
|
2740
2725
|
if (e > 8) {
|
|
2741
2726
|
const n = M(t), r = M(t, e - 8);
|
|
2742
|
-
return (qe(n,
|
|
2727
|
+
return (qe(n, pa(r + BigInt(e) & H, e)) ^ r) & H;
|
|
2743
2728
|
}
|
|
2744
2729
|
if (e >= 4) {
|
|
2745
|
-
const n =
|
|
2746
|
-
return qe(BigInt(e) + (n << 3n) &
|
|
2730
|
+
const n = Gn(t);
|
|
2731
|
+
return qe(BigInt(e) + (n << 3n) & H, Gn(t, e - 4));
|
|
2747
2732
|
}
|
|
2748
2733
|
if (e > 0) {
|
|
2749
2734
|
const n = BigInt(t[0]), r = BigInt(t[e >> 1]), i = BigInt(t[e - 1]), s = p(n + (r << 8n)), a = p(BigInt(e) + (i << 2n));
|
|
2750
|
-
return p(
|
|
2735
|
+
return p(ct(p(s * He) ^ p(a * Jr)) * He);
|
|
2751
2736
|
}
|
|
2752
2737
|
return He;
|
|
2753
2738
|
}
|
|
2754
|
-
function
|
|
2755
|
-
const e = t.length, n = p(M(t) *
|
|
2756
|
-
return qe(p(
|
|
2739
|
+
function va(t) {
|
|
2740
|
+
const e = t.length, n = p(M(t) * ce), r = M(t, 8), i = p(M(t, e - 8) * He), s = p(M(t, e - 16) * Be);
|
|
2741
|
+
return qe(p(N(p(n - r), 43) + N(i, 30) + s), p(n + N(r ^ Jr, 20) - i + BigInt(e)));
|
|
2757
2742
|
}
|
|
2758
|
-
function
|
|
2759
|
-
i = p(i + t), s =
|
|
2743
|
+
function ga(t, e, n, r, i, s) {
|
|
2744
|
+
i = p(i + t), s = N(p(s + i + r), 21);
|
|
2760
2745
|
const a = i;
|
|
2761
|
-
return i = p(i + e), i = p(i + n), s = p(s +
|
|
2746
|
+
return i = p(i + e), i = p(i + n), s = p(s + N(i, 44)), { first: p(i + r), second: p(s + a) };
|
|
2762
2747
|
}
|
|
2763
2748
|
function Et(t, e, n, r) {
|
|
2764
|
-
return
|
|
2749
|
+
return ga(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2765
2750
|
}
|
|
2766
|
-
function
|
|
2751
|
+
function wa(t) {
|
|
2767
2752
|
const e = t.length, n = M(t, 24);
|
|
2768
|
-
let r = p(M(t) + p((BigInt(e) + M(t, e - 16)) * Be)), i =
|
|
2769
|
-
r = p(r + M(t, 8)), s = p(s +
|
|
2770
|
-
const a = p(r + n), u = p(i +
|
|
2753
|
+
let r = p(M(t) + p((BigInt(e) + M(t, e - 16)) * Be)), i = N(p(r + n), 52), s = N(r, 37);
|
|
2754
|
+
r = p(r + M(t, 8)), s = p(s + N(r, 7)), r = p(r + M(t, 16));
|
|
2755
|
+
const a = p(r + n), u = p(i + N(r, 31) + s);
|
|
2771
2756
|
r = p(M(t, 16) + M(t, e - 32));
|
|
2772
2757
|
const o = M(t, e - 8);
|
|
2773
|
-
i =
|
|
2774
|
-
const l = p(r + o), c = p(i +
|
|
2775
|
-
return p(
|
|
2758
|
+
i = N(p(r + o), 52), s = N(r, 37), r = p(r + M(t, e - 24)), s = p(s + N(r, 7)), r = p(r + M(t, e - 16));
|
|
2759
|
+
const l = p(r + o), c = p(i + N(r, 31) + s), f = ct(p(p(a + c) * He + p(l + u) * Be));
|
|
2760
|
+
return p(ct(p(f * Be + u)) * He);
|
|
2776
2761
|
}
|
|
2777
|
-
function
|
|
2762
|
+
function ka(t) {
|
|
2778
2763
|
let e;
|
|
2779
2764
|
typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
|
|
2780
2765
|
const n = e.length;
|
|
2781
2766
|
if (n <= 32)
|
|
2782
|
-
return n <= 16 ?
|
|
2767
|
+
return n <= 16 ? ma(e) : va(e);
|
|
2783
2768
|
if (n <= 64)
|
|
2784
|
-
return
|
|
2785
|
-
let r = M(e), i = p(M(e, n - 16) ^
|
|
2786
|
-
s = p(s +
|
|
2769
|
+
return wa(e);
|
|
2770
|
+
let r = M(e), i = p(M(e, n - 16) ^ ce), s = p(M(e, n - 56) ^ Be), a = Et(e, n - 64, BigInt(n), i), u = Et(e, n - 32, p(BigInt(n) * ce), Be);
|
|
2771
|
+
s = p(s + ct(a.second) * ce), r = p(N(p(s + r), 39) * ce), i = p(N(i, 33) * ce);
|
|
2787
2772
|
let o = n - 1 & -64, l = 0;
|
|
2788
2773
|
for (; o > 0; )
|
|
2789
|
-
r = p(
|
|
2790
|
-
return qe(qe(a.first, u.first) + p(
|
|
2774
|
+
r = p(N(p(r + i + a.first + M(e, l + 16)), 37) * ce), i = p(N(p(i + a.second + M(e, l + 48)), 42) * ce), r ^= u.second, i ^= a.first, s = N(s ^ u.first, 33), a = Et(e, l, p(a.second * ce), p(r + u.first)), u = Et(e, l + 32, p(s + u.second), i), [s, r] = [r, s], l += 64, o -= 64;
|
|
2775
|
+
return qe(qe(a.first, u.first) + p(ct(i) * ce) + s, qe(a.second, u.second) + r);
|
|
2791
2776
|
}
|
|
2792
|
-
function
|
|
2793
|
-
return
|
|
2777
|
+
function ya(t) {
|
|
2778
|
+
return ka(JSON.stringify(t)).toString();
|
|
2794
2779
|
}
|
|
2795
|
-
let
|
|
2780
|
+
let Yt;
|
|
2796
2781
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2782
|
+
function Xr(t) {
|
|
2798
2783
|
return {
|
|
2799
|
-
lang:
|
|
2784
|
+
lang: Yt?.lang,
|
|
2800
2785
|
message: t?.message,
|
|
2801
|
-
abortEarly:
|
|
2802
|
-
abortPipeEarly:
|
|
2786
|
+
abortEarly: Yt?.abortEarly,
|
|
2787
|
+
abortPipeEarly: Yt?.abortPipeEarly
|
|
2803
2788
|
};
|
|
2804
2789
|
}
|
|
2805
|
-
let
|
|
2790
|
+
let ba;
|
|
2806
2791
|
// @__NO_SIDE_EFFECTS__
|
|
2807
|
-
function
|
|
2808
|
-
return
|
|
2792
|
+
function _a(t) {
|
|
2793
|
+
return ba?.get(t);
|
|
2809
2794
|
}
|
|
2810
|
-
let
|
|
2795
|
+
let Ma;
|
|
2811
2796
|
// @__NO_SIDE_EFFECTS__
|
|
2812
|
-
function
|
|
2813
|
-
return
|
|
2797
|
+
function Ea(t) {
|
|
2798
|
+
return Ma?.get(t);
|
|
2814
2799
|
}
|
|
2815
|
-
let
|
|
2800
|
+
let xa;
|
|
2816
2801
|
// @__NO_SIDE_EFFECTS__
|
|
2817
|
-
function
|
|
2818
|
-
return
|
|
2802
|
+
function Sa(t, e) {
|
|
2803
|
+
return xa?.get(t)?.get(e);
|
|
2819
2804
|
}
|
|
2820
2805
|
// @__NO_SIDE_EFFECTS__
|
|
2821
2806
|
function Qe(t) {
|
|
2822
2807
|
const e = typeof t;
|
|
2823
2808
|
return e === "string" ? `"${t}"` : e === "number" || e === "bigint" || e === "boolean" ? `${t}` : e === "object" || e === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : e;
|
|
2824
2809
|
}
|
|
2825
|
-
function
|
|
2810
|
+
function C(t, e, n, r, i) {
|
|
2826
2811
|
const s = i && "input" in i ? i.input : n.value, a = i?.expected ?? t.expects ?? null, u = i?.received ?? /* @__PURE__ */ Qe(s), o = {
|
|
2827
2812
|
kind: t.kind,
|
|
2828
2813
|
type: t.type,
|
|
@@ -2836,21 +2821,21 @@ function N(t, e, n, r, i) {
|
|
|
2836
2821
|
lang: r.lang,
|
|
2837
2822
|
abortEarly: r.abortEarly,
|
|
2838
2823
|
abortPipeEarly: r.abortPipeEarly
|
|
2839
|
-
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */
|
|
2824
|
+
}, l = t.kind === "schema", c = i?.message ?? t.message ?? /* @__PURE__ */ Sa(t.reference, o.lang) ?? (l ? /* @__PURE__ */ Ea(o.lang) : null) ?? r.message ?? /* @__PURE__ */ _a(o.lang);
|
|
2840
2825
|
c !== void 0 && (o.message = typeof c == "function" ? c(o) : c), l && (n.typed = !1), n.issues ? n.issues.push(o) : n.issues = [o];
|
|
2841
2826
|
}
|
|
2842
2827
|
// @__NO_SIDE_EFFECTS__
|
|
2843
|
-
function
|
|
2828
|
+
function X(t) {
|
|
2844
2829
|
return {
|
|
2845
2830
|
version: 1,
|
|
2846
2831
|
vendor: "valibot",
|
|
2847
2832
|
validate(e) {
|
|
2848
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2833
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ Xr());
|
|
2849
2834
|
}
|
|
2850
2835
|
};
|
|
2851
2836
|
}
|
|
2852
2837
|
// @__NO_SIDE_EFFECTS__
|
|
2853
|
-
function
|
|
2838
|
+
function Pa(t, e) {
|
|
2854
2839
|
const n = [...new Set(t)];
|
|
2855
2840
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2856
2841
|
}
|
|
@@ -2865,11 +2850,11 @@ var vn = class extends Error {
|
|
|
2865
2850
|
}
|
|
2866
2851
|
};
|
|
2867
2852
|
// @__NO_SIDE_EFFECTS__
|
|
2868
|
-
function
|
|
2853
|
+
function L(t) {
|
|
2869
2854
|
return {
|
|
2870
2855
|
kind: "transformation",
|
|
2871
2856
|
type: "args",
|
|
2872
|
-
reference:
|
|
2857
|
+
reference: L,
|
|
2873
2858
|
async: !1,
|
|
2874
2859
|
schema: t,
|
|
2875
2860
|
"~run"(e, n) {
|
|
@@ -2883,47 +2868,47 @@ function O(t) {
|
|
|
2883
2868
|
};
|
|
2884
2869
|
}
|
|
2885
2870
|
// @__NO_SIDE_EFFECTS__
|
|
2886
|
-
function
|
|
2871
|
+
function Kr(t, e) {
|
|
2887
2872
|
return {
|
|
2888
2873
|
kind: "validation",
|
|
2889
2874
|
type: "check",
|
|
2890
|
-
reference:
|
|
2875
|
+
reference: Kr,
|
|
2891
2876
|
async: !1,
|
|
2892
2877
|
expects: null,
|
|
2893
2878
|
requirement: t,
|
|
2894
2879
|
message: e,
|
|
2895
2880
|
"~run"(n, r) {
|
|
2896
|
-
return n.typed && !this.requirement(n.value) &&
|
|
2881
|
+
return n.typed && !this.requirement(n.value) && C(this, "input", n, r), n;
|
|
2897
2882
|
}
|
|
2898
2883
|
};
|
|
2899
2884
|
}
|
|
2900
2885
|
// @__NO_SIDE_EFFECTS__
|
|
2901
|
-
function
|
|
2886
|
+
function Gr(t, e) {
|
|
2902
2887
|
return {
|
|
2903
2888
|
kind: "validation",
|
|
2904
2889
|
type: "length",
|
|
2905
|
-
reference:
|
|
2890
|
+
reference: Gr,
|
|
2906
2891
|
async: !1,
|
|
2907
2892
|
expects: `${t}`,
|
|
2908
2893
|
requirement: t,
|
|
2909
2894
|
message: e,
|
|
2910
2895
|
"~run"(n, r) {
|
|
2911
|
-
return n.typed && n.value.length !== this.requirement &&
|
|
2896
|
+
return n.typed && n.value.length !== this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2912
2897
|
}
|
|
2913
2898
|
};
|
|
2914
2899
|
}
|
|
2915
2900
|
// @__NO_SIDE_EFFECTS__
|
|
2916
|
-
function
|
|
2901
|
+
function ft(t, e) {
|
|
2917
2902
|
return {
|
|
2918
2903
|
kind: "validation",
|
|
2919
2904
|
type: "max_value",
|
|
2920
|
-
reference:
|
|
2905
|
+
reference: ft,
|
|
2921
2906
|
async: !1,
|
|
2922
2907
|
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2923
2908
|
requirement: t,
|
|
2924
2909
|
message: e,
|
|
2925
2910
|
"~run"(n, r) {
|
|
2926
|
-
return n.typed && !(n.value <= this.requirement) &&
|
|
2911
|
+
return n.typed && !(n.value <= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2927
2912
|
}
|
|
2928
2913
|
};
|
|
2929
2914
|
}
|
|
@@ -2938,31 +2923,31 @@ function gn(t, e) {
|
|
|
2938
2923
|
requirement: t,
|
|
2939
2924
|
message: e,
|
|
2940
2925
|
"~run"(n, r) {
|
|
2941
|
-
return n.typed && n.value.length < this.requirement &&
|
|
2926
|
+
return n.typed && n.value.length < this.requirement && C(this, "length", n, r, { received: `${n.value.length}` }), n;
|
|
2942
2927
|
}
|
|
2943
2928
|
};
|
|
2944
2929
|
}
|
|
2945
2930
|
// @__NO_SIDE_EFFECTS__
|
|
2946
|
-
function
|
|
2931
|
+
function Z(t, e) {
|
|
2947
2932
|
return {
|
|
2948
2933
|
kind: "validation",
|
|
2949
2934
|
type: "min_value",
|
|
2950
|
-
reference:
|
|
2935
|
+
reference: Z,
|
|
2951
2936
|
async: !1,
|
|
2952
2937
|
expects: `>=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2953
2938
|
requirement: t,
|
|
2954
2939
|
message: e,
|
|
2955
2940
|
"~run"(n, r) {
|
|
2956
|
-
return n.typed && !(n.value >= this.requirement) &&
|
|
2941
|
+
return n.typed && !(n.value >= this.requirement) && C(this, "value", n, r, { received: n.value instanceof Date ? n.value.toJSON() : /* @__PURE__ */ Qe(n.value) }), n;
|
|
2957
2942
|
}
|
|
2958
2943
|
};
|
|
2959
2944
|
}
|
|
2960
2945
|
// @__NO_SIDE_EFFECTS__
|
|
2961
|
-
function
|
|
2946
|
+
function V(t) {
|
|
2962
2947
|
return {
|
|
2963
2948
|
kind: "transformation",
|
|
2964
2949
|
type: "returns",
|
|
2965
|
-
reference:
|
|
2950
|
+
reference: V,
|
|
2966
2951
|
async: !1,
|
|
2967
2952
|
schema: t,
|
|
2968
2953
|
"~run"(e, n) {
|
|
@@ -2976,25 +2961,25 @@ function $(t) {
|
|
|
2976
2961
|
};
|
|
2977
2962
|
}
|
|
2978
2963
|
// @__NO_SIDE_EFFECTS__
|
|
2979
|
-
function
|
|
2964
|
+
function Ta(t, e, n) {
|
|
2980
2965
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2981
2966
|
}
|
|
2982
2967
|
// @__NO_SIDE_EFFECTS__
|
|
2983
|
-
function
|
|
2968
|
+
function Qr(t, e, n) {
|
|
2984
2969
|
return typeof t.default == "function" ? t.default(e, n) : t.default;
|
|
2985
2970
|
}
|
|
2986
2971
|
// @__NO_SIDE_EFFECTS__
|
|
2987
|
-
function
|
|
2972
|
+
function ei(t, e) {
|
|
2988
2973
|
return {
|
|
2989
2974
|
kind: "schema",
|
|
2990
2975
|
type: "array",
|
|
2991
|
-
reference:
|
|
2976
|
+
reference: ei,
|
|
2992
2977
|
expects: "Array",
|
|
2993
2978
|
async: !1,
|
|
2994
2979
|
item: t,
|
|
2995
2980
|
message: e,
|
|
2996
2981
|
get "~standard"() {
|
|
2997
|
-
return /* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ X(this);
|
|
2998
2983
|
},
|
|
2999
2984
|
"~run"(n, r) {
|
|
3000
2985
|
const i = n.value;
|
|
@@ -3019,60 +3004,60 @@ function ai(t, e) {
|
|
|
3019
3004
|
}
|
|
3020
3005
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3021
3006
|
}
|
|
3022
|
-
} else
|
|
3007
|
+
} else C(this, "type", n, r);
|
|
3023
3008
|
return n;
|
|
3024
3009
|
}
|
|
3025
3010
|
};
|
|
3026
3011
|
}
|
|
3027
3012
|
// @__NO_SIDE_EFFECTS__
|
|
3028
|
-
function
|
|
3013
|
+
function ti(t) {
|
|
3029
3014
|
return {
|
|
3030
3015
|
kind: "schema",
|
|
3031
3016
|
type: "boolean",
|
|
3032
|
-
reference:
|
|
3017
|
+
reference: ti,
|
|
3033
3018
|
expects: "boolean",
|
|
3034
3019
|
async: !1,
|
|
3035
3020
|
message: t,
|
|
3036
3021
|
get "~standard"() {
|
|
3037
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ X(this);
|
|
3038
3023
|
},
|
|
3039
3024
|
"~run"(e, n) {
|
|
3040
|
-
return typeof e.value == "boolean" ? e.typed = !0 :
|
|
3025
|
+
return typeof e.value == "boolean" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3041
3026
|
}
|
|
3042
3027
|
};
|
|
3043
3028
|
}
|
|
3044
3029
|
// @__NO_SIDE_EFFECTS__
|
|
3045
|
-
function
|
|
3030
|
+
function ni(t, e) {
|
|
3046
3031
|
return {
|
|
3047
3032
|
kind: "schema",
|
|
3048
3033
|
type: "custom",
|
|
3049
|
-
reference:
|
|
3034
|
+
reference: ni,
|
|
3050
3035
|
expects: "unknown",
|
|
3051
3036
|
async: !1,
|
|
3052
3037
|
check: t,
|
|
3053
3038
|
message: e,
|
|
3054
3039
|
get "~standard"() {
|
|
3055
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ X(this);
|
|
3056
3041
|
},
|
|
3057
3042
|
"~run"(n, r) {
|
|
3058
|
-
return this.check(n.value) ? n.typed = !0 :
|
|
3043
|
+
return this.check(n.value) ? n.typed = !0 : C(this, "type", n, r), n;
|
|
3059
3044
|
}
|
|
3060
3045
|
};
|
|
3061
3046
|
}
|
|
3062
3047
|
// @__NO_SIDE_EFFECTS__
|
|
3063
|
-
function
|
|
3048
|
+
function A(t) {
|
|
3064
3049
|
return {
|
|
3065
3050
|
kind: "schema",
|
|
3066
3051
|
type: "function",
|
|
3067
|
-
reference:
|
|
3052
|
+
reference: A,
|
|
3068
3053
|
expects: "Function",
|
|
3069
3054
|
async: !1,
|
|
3070
3055
|
message: t,
|
|
3071
3056
|
get "~standard"() {
|
|
3072
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ X(this);
|
|
3073
3058
|
},
|
|
3074
3059
|
"~run"(e, n) {
|
|
3075
|
-
return typeof e.value == "function" ? e.typed = !0 :
|
|
3060
|
+
return typeof e.value == "function" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3076
3061
|
}
|
|
3077
3062
|
};
|
|
3078
3063
|
}
|
|
@@ -3087,10 +3072,10 @@ function ze(t, e) {
|
|
|
3087
3072
|
literal: t,
|
|
3088
3073
|
message: e,
|
|
3089
3074
|
get "~standard"() {
|
|
3090
|
-
return /* @__PURE__ */
|
|
3075
|
+
return /* @__PURE__ */ X(this);
|
|
3091
3076
|
},
|
|
3092
3077
|
"~run"(n, r) {
|
|
3093
|
-
return n.value === this.literal ? n.typed = !0 :
|
|
3078
|
+
return n.value === this.literal ? n.typed = !0 : C(this, "type", n, r), n;
|
|
3094
3079
|
}
|
|
3095
3080
|
};
|
|
3096
3081
|
}
|
|
@@ -3104,25 +3089,25 @@ function P(t) {
|
|
|
3104
3089
|
async: !1,
|
|
3105
3090
|
message: t,
|
|
3106
3091
|
get "~standard"() {
|
|
3107
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ X(this);
|
|
3108
3093
|
},
|
|
3109
3094
|
"~run"(e, n) {
|
|
3110
|
-
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 :
|
|
3095
|
+
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3111
3096
|
}
|
|
3112
3097
|
};
|
|
3113
3098
|
}
|
|
3114
3099
|
// @__NO_SIDE_EFFECTS__
|
|
3115
|
-
function
|
|
3100
|
+
function q(t, e) {
|
|
3116
3101
|
return {
|
|
3117
3102
|
kind: "schema",
|
|
3118
3103
|
type: "object",
|
|
3119
|
-
reference:
|
|
3104
|
+
reference: q,
|
|
3120
3105
|
expects: "Object",
|
|
3121
3106
|
async: !1,
|
|
3122
3107
|
entries: t,
|
|
3123
3108
|
message: e,
|
|
3124
3109
|
get "~standard"() {
|
|
3125
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ X(this);
|
|
3126
3111
|
},
|
|
3127
3112
|
"~run"(n, r) {
|
|
3128
3113
|
const i = n.value;
|
|
@@ -3131,7 +3116,7 @@ function H(t, e) {
|
|
|
3131
3116
|
for (const s in this.entries) {
|
|
3132
3117
|
const a = this.entries[s];
|
|
3133
3118
|
if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3134
|
-
const u = s in i ? i[s] : /* @__PURE__ */
|
|
3119
|
+
const u = s in i ? i[s] : /* @__PURE__ */ Qr(a), o = a["~run"]({ value: u }, r);
|
|
3135
3120
|
if (o.issues) {
|
|
3136
3121
|
const l = {
|
|
3137
3122
|
type: "object",
|
|
@@ -3148,8 +3133,8 @@ function H(t, e) {
|
|
|
3148
3133
|
}
|
|
3149
3134
|
}
|
|
3150
3135
|
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3151
|
-
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */
|
|
3152
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (
|
|
3136
|
+
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Ta(a);
|
|
3137
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (C(this, "key", n, r, {
|
|
3153
3138
|
input: void 0,
|
|
3154
3139
|
expected: `"${s}"`,
|
|
3155
3140
|
path: [{
|
|
@@ -3162,7 +3147,7 @@ function H(t, e) {
|
|
|
3162
3147
|
}), r.abortEarly))
|
|
3163
3148
|
break;
|
|
3164
3149
|
}
|
|
3165
|
-
} else
|
|
3150
|
+
} else C(this, "type", n, r);
|
|
3166
3151
|
return n;
|
|
3167
3152
|
}
|
|
3168
3153
|
};
|
|
@@ -3178,10 +3163,10 @@ function T(t, e) {
|
|
|
3178
3163
|
wrapped: t,
|
|
3179
3164
|
default: e,
|
|
3180
3165
|
get "~standard"() {
|
|
3181
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ X(this);
|
|
3182
3167
|
},
|
|
3183
3168
|
"~run"(n, r) {
|
|
3184
|
-
return n.value === void 0 && (this.default !== void 0 && (n.value = /* @__PURE__ */
|
|
3169
|
+
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);
|
|
3185
3170
|
}
|
|
3186
3171
|
};
|
|
3187
3172
|
}
|
|
@@ -3195,25 +3180,25 @@ function ge(t) {
|
|
|
3195
3180
|
async: !1,
|
|
3196
3181
|
message: t,
|
|
3197
3182
|
get "~standard"() {
|
|
3198
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ X(this);
|
|
3199
3184
|
},
|
|
3200
3185
|
"~run"(e, n) {
|
|
3201
|
-
return typeof e.value == "string" ? e.typed = !0 :
|
|
3186
|
+
return typeof e.value == "string" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3202
3187
|
}
|
|
3203
3188
|
};
|
|
3204
3189
|
}
|
|
3205
3190
|
// @__NO_SIDE_EFFECTS__
|
|
3206
|
-
function
|
|
3191
|
+
function F(t, e) {
|
|
3207
3192
|
return {
|
|
3208
3193
|
kind: "schema",
|
|
3209
3194
|
type: "tuple",
|
|
3210
|
-
reference:
|
|
3195
|
+
reference: F,
|
|
3211
3196
|
expects: "Array",
|
|
3212
3197
|
async: !1,
|
|
3213
3198
|
items: t,
|
|
3214
3199
|
message: e,
|
|
3215
3200
|
get "~standard"() {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3201
|
+
return /* @__PURE__ */ X(this);
|
|
3217
3202
|
},
|
|
3218
3203
|
"~run"(n, r) {
|
|
3219
3204
|
const i = n.value;
|
|
@@ -3238,13 +3223,13 @@ function L(t, e) {
|
|
|
3238
3223
|
}
|
|
3239
3224
|
u.typed || (n.typed = !1), n.value.push(u.value);
|
|
3240
3225
|
}
|
|
3241
|
-
} else
|
|
3226
|
+
} else C(this, "type", n, r);
|
|
3242
3227
|
return n;
|
|
3243
3228
|
}
|
|
3244
3229
|
};
|
|
3245
3230
|
}
|
|
3246
3231
|
// @__NO_SIDE_EFFECTS__
|
|
3247
|
-
function
|
|
3232
|
+
function Qn(t) {
|
|
3248
3233
|
let e;
|
|
3249
3234
|
if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
|
|
3250
3235
|
return e;
|
|
@@ -3255,12 +3240,12 @@ function wn(t, e) {
|
|
|
3255
3240
|
kind: "schema",
|
|
3256
3241
|
type: "union",
|
|
3257
3242
|
reference: wn,
|
|
3258
|
-
expects: /* @__PURE__ */
|
|
3243
|
+
expects: /* @__PURE__ */ Pa(t.map((n) => n.expects), "|"),
|
|
3259
3244
|
async: !1,
|
|
3260
3245
|
options: t,
|
|
3261
3246
|
message: e,
|
|
3262
3247
|
get "~standard"() {
|
|
3263
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ X(this);
|
|
3264
3249
|
},
|
|
3265
3250
|
"~run"(n, r) {
|
|
3266
3251
|
let i, s, a;
|
|
@@ -3276,10 +3261,10 @@ function wn(t, e) {
|
|
|
3276
3261
|
if (i) return i;
|
|
3277
3262
|
if (s) {
|
|
3278
3263
|
if (s.length === 1) return s[0];
|
|
3279
|
-
|
|
3264
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ Qn(s) }), n.typed = !0;
|
|
3280
3265
|
} else {
|
|
3281
3266
|
if (a?.length === 1) return a[0];
|
|
3282
|
-
|
|
3267
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ Qn(a) });
|
|
3283
3268
|
}
|
|
3284
3269
|
return n;
|
|
3285
3270
|
}
|
|
@@ -3295,15 +3280,15 @@ function Oe(t) {
|
|
|
3295
3280
|
async: !1,
|
|
3296
3281
|
message: t,
|
|
3297
3282
|
get "~standard"() {
|
|
3298
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ X(this);
|
|
3299
3284
|
},
|
|
3300
3285
|
"~run"(e, n) {
|
|
3301
|
-
return e.value === void 0 ? e.typed = !0 :
|
|
3286
|
+
return e.value === void 0 ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3302
3287
|
}
|
|
3303
3288
|
};
|
|
3304
3289
|
}
|
|
3305
3290
|
function xt(t, e, n) {
|
|
3306
|
-
const r = t["~run"]({ value: e }, /* @__PURE__ */
|
|
3291
|
+
const r = t["~run"]({ value: e }, /* @__PURE__ */ Xr(n));
|
|
3307
3292
|
if (r.issues) throw new vn(r.issues);
|
|
3308
3293
|
return r.value;
|
|
3309
3294
|
}
|
|
@@ -3313,7 +3298,7 @@ function w(...t) {
|
|
|
3313
3298
|
...t[0],
|
|
3314
3299
|
pipe: t,
|
|
3315
3300
|
get "~standard"() {
|
|
3316
|
-
return /* @__PURE__ */
|
|
3301
|
+
return /* @__PURE__ */ X(this);
|
|
3317
3302
|
},
|
|
3318
3303
|
"~run"(e, n) {
|
|
3319
3304
|
for (const r of t) if (r.kind !== "metadata") {
|
|
@@ -3327,16 +3312,16 @@ function w(...t) {
|
|
|
3327
3312
|
}
|
|
3328
3313
|
};
|
|
3329
3314
|
}
|
|
3330
|
-
var
|
|
3331
|
-
const
|
|
3332
|
-
class
|
|
3315
|
+
var ri = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-90), /* @__PURE__ */ ft(90)), ii = /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-180), /* @__PURE__ */ ft(180)), Nt = /* @__PURE__ */ q({ lat: ri, lng: ii }), si = /* @__PURE__ */ q({ sw: Nt, ne: Nt }), Ia = /* @__PURE__ */ q({ bounds: si, center: Nt, zoom: /* @__PURE__ */ P() }), Ze = /* @__PURE__ */ ni((t) => t instanceof HTMLElement, "Must be an HTMLElement"), Aa = /* @__PURE__ */ q({ mapSize: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(1)), zoomMin: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), zoomMax: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), zoomScale: /* @__PURE__ */ wn([/* @__PURE__ */ ze(1), /* @__PURE__ */ ze(2), /* @__PURE__ */ ze(10)]) }), Na = /* @__PURE__ */ q({ inserted: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ ti())), insert: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), remove: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), update: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), er = /* @__PURE__ */ wn([/* @__PURE__ */ ze("idle"), /* @__PURE__ */ ze("move"), /* @__PURE__ */ ze("click")]), Ca = /* @__PURE__ */ q({ getParameters: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Aa)), getContainer: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Ze)), getZoom: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(/* @__PURE__ */ P())), getBounds: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(si)), getCenter: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Nt)), getViewport: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([])), /* @__PURE__ */ V(Ia)), panBy: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ P(), /* @__PURE__ */ P()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), createMarker: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([Ze, ri, ii, /* @__PURE__ */ P()])), /* @__PURE__ */ V(Na)), subscribe: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([er, /* @__PURE__ */ A()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())), unsubscribe: /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([er, /* @__PURE__ */ A()])), /* @__PURE__ */ V(/* @__PURE__ */ Oe())) }), Jt = /* @__PURE__ */ w(/* @__PURE__ */ A(), /* @__PURE__ */ L(/* @__PURE__ */ F([/* @__PURE__ */ ge(), Ze]))), Xt = /* @__PURE__ */ w(/* @__PURE__ */ q({ width: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), height: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), padding: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)) }), /* @__PURE__ */ Kr((t) => Math.min(t.width, t.height) / t.padding >= 4, "Minimum of width or height must be greater than or equal to 4 * padding")), Ra = /* @__PURE__ */ q({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0))), shadow: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), tr = /* @__PURE__ */ q({ background: /* @__PURE__ */ T(/* @__PURE__ */ ge()), radius: /* @__PURE__ */ T(/* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0))), filter: /* @__PURE__ */ T(/* @__PURE__ */ ge()) }), Da = /* @__PURE__ */ q({ id: /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ gn(1)), rank: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(0)), lat: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-90), /* @__PURE__ */ ft(90)), lng: /* @__PURE__ */ w(/* @__PURE__ */ P(), /* @__PURE__ */ Z(-180), /* @__PURE__ */ ft(180)), tooltip: /* @__PURE__ */ q({ element: Ze, style: /* @__PURE__ */ T(tr), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) }), pin: /* @__PURE__ */ T(/* @__PURE__ */ q({ element: /* @__PURE__ */ T(Ze), style: /* @__PURE__ */ T(Ra), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) })), popup: /* @__PURE__ */ T(/* @__PURE__ */ q({ element: Ze, style: /* @__PURE__ */ T(tr), dimensions: /* @__PURE__ */ T(Xt), initialize: /* @__PURE__ */ T(Jt) })) }), za = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ Gr(32)), Oa = /* @__PURE__ */ w(/* @__PURE__ */ ge(), /* @__PURE__ */ gn(1));
|
|
3316
|
+
const La = "1.3.7";
|
|
3317
|
+
class Fa {
|
|
3333
3318
|
apiKey;
|
|
3334
3319
|
apiJwt;
|
|
3335
3320
|
markerStatesStore;
|
|
3336
3321
|
markerStatesWorker;
|
|
3337
3322
|
markerStatesWorkerClient;
|
|
3338
3323
|
constructor(e, n) {
|
|
3339
|
-
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new
|
|
3324
|
+
this.apiKey = e, this.apiJwt = n, this.markerStatesStore = /* @__PURE__ */ new Map(), this.markerStatesWorker = new ua(), this.markerStatesWorkerClient = new ir(this.markerStatesWorker);
|
|
3340
3325
|
}
|
|
3341
3326
|
clearStates() {
|
|
3342
3327
|
this.markerStatesStore.clear();
|
|
@@ -3350,7 +3335,7 @@ class Ba {
|
|
|
3350
3335
|
async updateStates(e, n) {
|
|
3351
3336
|
if (e.length == 0) return;
|
|
3352
3337
|
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3353
|
-
const r = e.map((a) => a.input), i =
|
|
3338
|
+
const r = e.map((a) => a.input), i = ya(r);
|
|
3354
3339
|
let s = this.markerStatesStore.get(i);
|
|
3355
3340
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3356
3341
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -3360,19 +3345,19 @@ class Ba {
|
|
|
3360
3345
|
}
|
|
3361
3346
|
async fetchStates(e, n) {
|
|
3362
3347
|
if (e.length == 0) return [];
|
|
3363
|
-
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle:
|
|
3348
|
+
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: sa() }] }];
|
|
3364
3349
|
const r = {
|
|
3365
3350
|
key: this.apiKey,
|
|
3366
3351
|
jwt: this.apiJwt,
|
|
3367
|
-
version:
|
|
3352
|
+
version: La,
|
|
3368
3353
|
input: e,
|
|
3369
3354
|
parameters: n
|
|
3370
3355
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3371
3356
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3372
3357
|
}
|
|
3373
3358
|
}
|
|
3374
|
-
const
|
|
3375
|
-
class
|
|
3359
|
+
const nr = "1.3.7", $a = "https://maps.api.arenarium.dev/auth", Va = "https://maps.api.arenarium.dev/log", rr = 500;
|
|
3360
|
+
class ai {
|
|
3376
3361
|
apiKey;
|
|
3377
3362
|
mapProvider;
|
|
3378
3363
|
mapStateProvider;
|
|
@@ -3383,26 +3368,26 @@ class hi {
|
|
|
3383
3368
|
markerVisibilityProcessor;
|
|
3384
3369
|
markerElementsProcessor;
|
|
3385
3370
|
markerStateProcessor;
|
|
3386
|
-
markerStatesProcessDelay =
|
|
3371
|
+
markerStatesProcessDelay = rr;
|
|
3387
3372
|
markerStatesProcessTimeout = void 0;
|
|
3388
3373
|
constructor(e, n, r, i) {
|
|
3389
|
-
xt(
|
|
3374
|
+
xt(za, e), xt(Oa, n), xt(Ca, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Ei(
|
|
3390
3375
|
this.mapProvider,
|
|
3391
3376
|
this.detached.bind(this),
|
|
3392
3377
|
this.error.bind(this),
|
|
3393
3378
|
this.onMapMove.bind(this),
|
|
3394
3379
|
this.onMapIdle.bind(this),
|
|
3395
3380
|
this.onMapClick.bind(this)
|
|
3396
|
-
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new
|
|
3381
|
+
), this.markers = /* @__PURE__ */ new Map(), this.markerVisibilityManager = new $i(), this.markerElementsManager = new la(this.mapProvider), this.markerStatesManager = new Fa(e, n), this.markerVisibilityProcessor = new Ht(this.onMarkersVisiblityProcess.bind(this)), this.markerElementsProcessor = new Ht(this.onMarkersRenderProcess.bind(this)), this.markerStateProcessor = new Ht(this.onMarkersStateProcess.bind(this)), this.configuration = i;
|
|
3397
3382
|
}
|
|
3398
3383
|
//#region Core
|
|
3399
3384
|
static async create(e, n, r) {
|
|
3400
|
-
let a = (await
|
|
3385
|
+
let a = (await fa($a, { key: e, version: nr })).jwt;
|
|
3401
3386
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3402
|
-
return new
|
|
3387
|
+
return new ai(e, a, n, r);
|
|
3403
3388
|
}
|
|
3404
3389
|
set configuration(e) {
|
|
3405
|
-
this.markerStatesProcessDelay = e?.process?.states?.delay ??
|
|
3390
|
+
this.markerStatesProcessDelay = e?.process?.states?.delay ?? rr, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
|
|
3406
3391
|
}
|
|
3407
3392
|
clear() {
|
|
3408
3393
|
this.markers.clear(), this.markerVisibilityManager.clearMarkers(), this.markerStatesManager.clearStates(), this.markerElementsManager.clearElements(), this.mapStateProvider.stop(), this.markerVisibilityProcessor.stop(), this.markerStateProcessor.stop(), this.markerElementsProcessor.stop();
|
|
@@ -3431,7 +3416,7 @@ class hi {
|
|
|
3431
3416
|
title: n,
|
|
3432
3417
|
level: e,
|
|
3433
3418
|
content: {
|
|
3434
|
-
version:
|
|
3419
|
+
version: nr,
|
|
3435
3420
|
key: this.apiKey,
|
|
3436
3421
|
name: r.name,
|
|
3437
3422
|
message: r.message,
|
|
@@ -3439,7 +3424,7 @@ class hi {
|
|
|
3439
3424
|
stack: r.stack
|
|
3440
3425
|
}
|
|
3441
3426
|
};
|
|
3442
|
-
await
|
|
3427
|
+
await ha(Va, i);
|
|
3443
3428
|
} catch (i) {
|
|
3444
3429
|
console.error(i);
|
|
3445
3430
|
}
|
|
@@ -3497,7 +3482,7 @@ class hi {
|
|
|
3497
3482
|
}
|
|
3498
3483
|
const i = this.mapProvider.getContainer(), s = (o) => {
|
|
3499
3484
|
const l = document.createElement("div");
|
|
3500
|
-
l.style.position = "absolute", l.style.visibility = "hidden", l.style.zIndex = "-1";
|
|
3485
|
+
l.style.position = "absolute", l.style.visibility = "hidden", l.style.width = "max-content", l.style.zIndex = "-1";
|
|
3501
3486
|
try {
|
|
3502
3487
|
return l.appendChild(o), i.appendChild(l), l.getBoundingClientRect();
|
|
3503
3488
|
} finally {
|
|
@@ -3507,12 +3492,12 @@ class hi {
|
|
|
3507
3492
|
if (l) return l;
|
|
3508
3493
|
if (o) {
|
|
3509
3494
|
const c = s(o), f = c.width, h = c.height;
|
|
3510
|
-
return { width: f, height: h, padding:
|
|
3495
|
+
return { width: f, height: h, padding: Dn };
|
|
3511
3496
|
} else
|
|
3512
|
-
return { width:
|
|
3497
|
+
return { width: Rn, height: Rn, padding: Dn };
|
|
3513
3498
|
}, u = (o, l) => {
|
|
3514
3499
|
if (l) return l;
|
|
3515
|
-
const c = s(o), f = c.width, h = c.height, m = Math.min(Math.round(Math.min(f, h) / 4),
|
|
3500
|
+
const c = s(o), f = c.width, h = c.height, m = Math.min(Math.round(Math.min(f, h) / 4), Oi);
|
|
3516
3501
|
return { width: f, height: h, padding: m };
|
|
3517
3502
|
};
|
|
3518
3503
|
for (const o of r) {
|
|
@@ -3537,13 +3522,13 @@ class hi {
|
|
|
3537
3522
|
style: o.popup.style,
|
|
3538
3523
|
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3539
3524
|
});
|
|
3540
|
-
const
|
|
3541
|
-
n.push(
|
|
3525
|
+
const _ = new bi(l, c, f, h, m, d, v);
|
|
3526
|
+
n.push(_);
|
|
3542
3527
|
}
|
|
3543
3528
|
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3544
3529
|
}
|
|
3545
3530
|
async updateMarkers(e) {
|
|
3546
|
-
xt(/* @__PURE__ */
|
|
3531
|
+
xt(/* @__PURE__ */ ei(Da), e);
|
|
3547
3532
|
try {
|
|
3548
3533
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3549
3534
|
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|
|
@@ -3583,5 +3568,5 @@ class hi {
|
|
|
3583
3568
|
//#endregion
|
|
3584
3569
|
}
|
|
3585
3570
|
export {
|
|
3586
|
-
|
|
3571
|
+
ai as MapManager
|
|
3587
3572
|
};
|