@arenarium/maps 1.3.7 → 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.js +565 -560
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -18,7 +18,7 @@ class Ht {
|
|
|
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 yi {
|
|
|
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 bi {
|
|
|
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 Mi {
|
|
|
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 Mi {
|
|
|
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,32 +139,32 @@ function Ei(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
|
-
class
|
|
167
|
+
class yt {
|
|
168
168
|
sw;
|
|
169
169
|
ne;
|
|
170
170
|
constructor(e, n, r, i) {
|
|
@@ -179,14 +179,14 @@ class kt {
|
|
|
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;
|
|
186
186
|
ne;
|
|
187
187
|
constructor(e, n, r, i) {
|
|
188
188
|
if (r < e) throw new Error(`Invalid bounds: ${e}, ${n}, ${r}, ${i}`);
|
|
189
|
-
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new
|
|
189
|
+
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: i }, n < i ? (this.blockL = new yt(e, n, r, i), this.blockR = new yt(0, 0, 0, 0)) : (this.blockL = new yt(e, -180, r, i), this.blockR = new yt(e, n, r, 180));
|
|
190
190
|
}
|
|
191
191
|
static bounds(e) {
|
|
192
192
|
const n = e.bounds, r = e.center;
|
|
@@ -194,7 +194,7 @@ class ot {
|
|
|
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 ot {
|
|
|
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 ot {
|
|
|
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 Fi {
|
|
|
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,49 +252,49 @@ class Fi {
|
|
|
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 O = 2,
|
|
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 D = /* @__PURE__ */ Symbol(),
|
|
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
|
|
297
|
+
let is = !1, le = null;
|
|
298
298
|
function Xe(t) {
|
|
299
299
|
le = t;
|
|
300
300
|
}
|
|
@@ -317,33 +317,33 @@ function on(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
328
|
let Ue = [];
|
|
329
|
-
function
|
|
329
|
+
function ss() {
|
|
330
330
|
var t = Ue;
|
|
331
|
-
Ue = [],
|
|
331
|
+
Ue = [], Yi(t);
|
|
332
332
|
}
|
|
333
333
|
function Re(t) {
|
|
334
334
|
if (Ue.length === 0) {
|
|
335
335
|
var e = Ue;
|
|
336
336
|
queueMicrotask(() => {
|
|
337
|
-
e === Ue &&
|
|
337
|
+
e === Ue && ss();
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
Ue.push(t);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function hr(t) {
|
|
343
343
|
var e = b;
|
|
344
344
|
if (e === null)
|
|
345
345
|
return k.f |= Me, t;
|
|
346
|
-
if ((e.f & Je) === 0 && (e.f &
|
|
346
|
+
if ((e.f & Je) === 0 && (e.f & ht) === 0)
|
|
347
347
|
throw t;
|
|
348
348
|
ye(t, e);
|
|
349
349
|
}
|
|
@@ -363,25 +363,25 @@ function ye(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
370
|
function ln(t) {
|
|
371
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 & O) === 0 || (e.f & Le) === 0 || (e.f ^= Le,
|
|
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 & $) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t),
|
|
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
|
-
const
|
|
384
|
+
const bt = /* @__PURE__ */ new Set();
|
|
385
385
|
let x = null, se = null, Q = [], un = null, en = !1;
|
|
386
386
|
class Ee {
|
|
387
387
|
/**
|
|
@@ -461,9 +461,9 @@ class Ee {
|
|
|
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
|
/**
|
|
@@ -478,10 +478,10 @@ class Ee {
|
|
|
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
|
}
|
|
@@ -497,7 +497,7 @@ class Ee {
|
|
|
497
497
|
for (var i = e.first; i !== null; ) {
|
|
498
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 ^= z : (s &
|
|
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 Ee {
|
|
|
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
|
|
@@ -538,7 +538,7 @@ class Ee {
|
|
|
538
538
|
}
|
|
539
539
|
flush() {
|
|
540
540
|
if (this.activate(), Q.length > 0) {
|
|
541
|
-
if (
|
|
541
|
+
if (os(), x !== null && x !== this)
|
|
542
542
|
return;
|
|
543
543
|
} else this.#i === 0 && this.process([]);
|
|
544
544
|
this.deactivate();
|
|
@@ -548,10 +548,10 @@ class Ee {
|
|
|
548
548
|
this.#p.clear();
|
|
549
549
|
}
|
|
550
550
|
#h() {
|
|
551
|
-
if (
|
|
551
|
+
if (bt.size > 1) {
|
|
552
552
|
this.previous.clear();
|
|
553
553
|
var e = se, n = !0;
|
|
554
|
-
for (const i of
|
|
554
|
+
for (const i of bt) {
|
|
555
555
|
if (i === this) {
|
|
556
556
|
n = !1;
|
|
557
557
|
continue;
|
|
@@ -573,7 +573,7 @@ class Ee {
|
|
|
573
573
|
Q = [];
|
|
574
574
|
const u = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
575
575
|
for (const l of s)
|
|
576
|
-
|
|
576
|
+
mr(l, a, u, o);
|
|
577
577
|
if (Q.length > 0) {
|
|
578
578
|
x = i, i.apply();
|
|
579
579
|
for (const l of Q)
|
|
@@ -585,7 +585,7 @@ class Ee {
|
|
|
585
585
|
}
|
|
586
586
|
x = null, se = e;
|
|
587
587
|
}
|
|
588
|
-
this.#t.clear(),
|
|
588
|
+
this.#t.clear(), bt.delete(this);
|
|
589
589
|
}
|
|
590
590
|
/**
|
|
591
591
|
*
|
|
@@ -605,9 +605,9 @@ class Ee {
|
|
|
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,12 +619,12 @@ class Ee {
|
|
|
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
626
|
const e = x = new Ee();
|
|
627
|
-
|
|
627
|
+
bt.add(x), Re(() => {
|
|
628
628
|
x === e && e.flush();
|
|
629
629
|
});
|
|
630
630
|
}
|
|
@@ -633,7 +633,7 @@ class Ee {
|
|
|
633
633
|
apply() {
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function os() {
|
|
637
637
|
en = !0;
|
|
638
638
|
var t = null;
|
|
639
639
|
try {
|
|
@@ -641,7 +641,7 @@ function as() {
|
|
|
641
641
|
var n = Ee.ensure();
|
|
642
642
|
if (e++ > 1e3) {
|
|
643
643
|
var r, i;
|
|
644
|
-
|
|
644
|
+
ls();
|
|
645
645
|
}
|
|
646
646
|
n.process(Q), xe.clear();
|
|
647
647
|
}
|
|
@@ -649,62 +649,62 @@ function as() {
|
|
|
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
|
-
let
|
|
660
|
-
function
|
|
659
|
+
let ve = null;
|
|
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 & (_e | be)) === 0 &&
|
|
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
666
|
xe.clear();
|
|
667
|
-
for (const i of
|
|
667
|
+
for (const i of ve) {
|
|
668
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
675
|
(o.f & (_e | be)) === 0 && Ge(o);
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
|
-
|
|
678
|
+
ve.clear();
|
|
679
679
|
}
|
|
680
680
|
}
|
|
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 & O) !== 0 ?
|
|
688
|
+
(s & O) !== 0 ? mr(
|
|
689
689
|
/** @type {Derived} */
|
|
690
690
|
i,
|
|
691
691
|
e,
|
|
692
692
|
n,
|
|
693
693
|
r
|
|
694
|
-
) : (s & (sn |
|
|
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
705
|
if (Ye.call(e, i))
|
|
706
706
|
return !0;
|
|
707
|
-
if ((i.f & O) !== 0 &&
|
|
707
|
+
if ((i.f & O) !== 0 && vr(
|
|
708
708
|
/** @type {Derived} */
|
|
709
709
|
i,
|
|
710
710
|
e,
|
|
@@ -718,16 +718,16 @@ function dr(t, e, n) {
|
|
|
718
718
|
}
|
|
719
719
|
return n.set(t, !1), !1;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function fe(t) {
|
|
722
722
|
var e = un = t, n = e.b;
|
|
723
|
-
if (n?.is_pending && (t.f & (
|
|
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 (en && e === b && (r &
|
|
730
|
+
if (en && e === b && (r & we) !== 0 && (r & ur) === 0 && (r & Je) !== 0)
|
|
731
731
|
return;
|
|
732
732
|
if ((r & (Fe | Se)) !== 0) {
|
|
733
733
|
if ((r & z) === 0)
|
|
@@ -737,28 +737,28 @@ function ce(t) {
|
|
|
737
737
|
}
|
|
738
738
|
Q.push(e);
|
|
739
739
|
}
|
|
740
|
-
function
|
|
740
|
+
function gr(t, e) {
|
|
741
741
|
if (!((t.f & Se) !== 0 && (t.f & z) !== 0)) {
|
|
742
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
|
|
747
|
+
function us(t) {
|
|
748
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 fs {
|
|
|
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
|
/**
|
|
@@ -818,9 +818,9 @@ class fs {
|
|
|
818
818
|
);
|
|
819
819
|
a.b = this, a.f |= Gt, r(s);
|
|
820
820
|
}, this.parent = /** @type {Effect} */
|
|
821
|
-
b.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n =
|
|
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 fs {
|
|
|
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(() => (Ee.ensure(), Ae(() => this.#o(r)))), this.#l === 0 && (this.#r.before(n), this.#a = null,
|
|
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 fs {
|
|
|
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 fs {
|
|
|
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 fs {
|
|
|
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
|
|
@@ -905,13 +905,13 @@ class fs {
|
|
|
905
905
|
*/
|
|
906
906
|
#v(e) {
|
|
907
907
|
var n = b, r = k, i = le;
|
|
908
|
-
|
|
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
|
/**
|
|
@@ -924,7 +924,7 @@ class fs {
|
|
|
924
924
|
this.parent && this.parent.#w(e);
|
|
925
925
|
return;
|
|
926
926
|
}
|
|
927
|
-
this.#l += e, this.#l === 0 && (this.#m(), this.#e &&
|
|
927
|
+
this.#l += e, this.#l === 0 && (this.#m(), this.#e && Pt(this.#e, () => {
|
|
928
928
|
this.#e = null;
|
|
929
929
|
}), this.#a && (this.#r.before(this.#a), this.#a = null));
|
|
930
930
|
}
|
|
@@ -951,14 +951,14 @@ class fs {
|
|
|
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();
|
|
@@ -1009,8 +1009,8 @@ class fs {
|
|
|
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));
|
|
@@ -1019,7 +1019,7 @@ function hs(t, e, n, r) {
|
|
|
1019
1019
|
var a = (
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
1021
|
b
|
|
1022
|
-
), u =
|
|
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 {
|
|
@@ -1034,20 +1034,20 @@ function hs(t, e, n, r) {
|
|
|
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
|
|
1041
|
+
function ds() {
|
|
1042
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
1047
|
function tn(t = !0) {
|
|
1048
|
-
|
|
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} */
|
|
@@ -1061,7 +1061,7 @@ function ds() {
|
|
|
1061
1061
|
};
|
|
1062
1062
|
}
|
|
1063
1063
|
// @__NO_SIDE_EFFECTS__
|
|
1064
|
-
function
|
|
1064
|
+
function vs(t) {
|
|
1065
1065
|
var e = O | $, n = k !== null && (k.f & O) !== 0 ? (
|
|
1066
1066
|
/** @type {Derived} */
|
|
1067
1067
|
k
|
|
@@ -1070,7 +1070,7 @@ function ms(t) {
|
|
|
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,
|
|
@@ -1085,9 +1085,9 @@ function ms(t) {
|
|
|
1085
1085
|
};
|
|
1086
1086
|
}
|
|
1087
1087
|
// @__NO_SIDE_EFFECTS__
|
|
1088
|
-
function
|
|
1088
|
+
function gs(t, e, n) {
|
|
1089
1089
|
/** @type {Effect | null} */
|
|
1090
|
-
b === null &&
|
|
1090
|
+
b === null && Xi();
|
|
1091
1091
|
var i = (
|
|
1092
1092
|
/** @type {Promise<V>} */
|
|
1093
1093
|
/** @type {unknown} */
|
|
@@ -1096,8 +1096,8 @@ function vs(t, e, n) {
|
|
|
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
1103
|
Promise.resolve(t()).then(o.resolve, o.reject).finally(tn);
|
|
@@ -1109,7 +1109,7 @@ function vs(t, e, n) {
|
|
|
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) => {
|
|
@@ -1125,7 +1125,7 @@ function vs(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,18 +1138,18 @@ function vs(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
1154
|
if ((e.f & O) === 0)
|
|
1155
1155
|
return (e.f & _e) === 0 ? (
|
|
@@ -1162,42 +1162,42 @@ function ws(t) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
function cn(t) {
|
|
1164
1164
|
var e, n = b;
|
|
1165
|
-
|
|
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
|
|
1173
|
+
function wr(t) {
|
|
1174
1174
|
var e = cn(t);
|
|
1175
|
-
if (!t.equals(e) && (t.wv =
|
|
1175
|
+
if (!t.equals(e) && (t.wv = Dr(), (!x?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1176
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
1189
|
e.teardown && Ge(e);
|
|
1190
1190
|
}
|
|
1191
1191
|
let nn = /* @__PURE__ */ new Set();
|
|
1192
1192
|
const xe = /* @__PURE__ */ new Map();
|
|
1193
|
-
let
|
|
1193
|
+
let yr = !1;
|
|
1194
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
|
};
|
|
@@ -1206,12 +1206,12 @@ function Rt(t, e) {
|
|
|
1206
1206
|
// @__NO_SIDE_EFFECTS__
|
|
1207
1207
|
function U(t, e) {
|
|
1208
1208
|
const n = Rt(t);
|
|
1209
|
-
return
|
|
1209
|
+
return zs(n), n;
|
|
1210
1210
|
}
|
|
1211
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 &
|
|
1214
|
+
(!ae || (k.f & $n) !== 0) && fr() && (k.f & (O | we | sn | $n)) !== 0 && (ne === null || !Ye.call(ne, t)) && es();
|
|
1215
1215
|
let r = n ? nt(e) : e;
|
|
1216
1216
|
return At(t, r);
|
|
1217
1217
|
}
|
|
@@ -1227,20 +1227,20 @@ function At(t, e) {
|
|
|
1227
1227
|
);
|
|
1228
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
|
-
|
|
1234
|
+
function bs() {
|
|
1235
|
+
yr = !1;
|
|
1236
1236
|
for (const t of nn)
|
|
1237
|
-
(t.f & z) !== 0 && S(t, oe),
|
|
1237
|
+
(t.f & z) !== 0 && S(t, oe), pt(t) && Ge(t);
|
|
1238
1238
|
nn.clear();
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function ot(t) {
|
|
1241
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++) {
|
|
@@ -1250,29 +1250,29 @@ function kr(t, e) {
|
|
|
1250
1250
|
/** @type {Derived} */
|
|
1251
1251
|
s
|
|
1252
1252
|
);
|
|
1253
|
-
se?.delete(o), (a & Le) === 0 && (a & te && (s.f |= Le),
|
|
1254
|
-
} else u && ((a &
|
|
1253
|
+
se?.delete(o), (a & Le) === 0 && (a & te && (s.f |= Le), br(o, oe));
|
|
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
1263
|
function nt(t) {
|
|
1264
|
-
if (typeof t != "object" || t === null ||
|
|
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
|
-
re(null),
|
|
1273
|
+
re(null), Bn(s);
|
|
1274
1274
|
var c = u();
|
|
1275
|
-
return re(o),
|
|
1275
|
+
return re(o), Bn(l), c;
|
|
1276
1276
|
};
|
|
1277
1277
|
return r && n.set("length", /* @__PURE__ */ U(
|
|
1278
1278
|
/** @type {any[]} */
|
|
@@ -1282,7 +1282,7 @@ function nt(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);
|
|
@@ -1294,17 +1294,17 @@ function nt(t) {
|
|
|
1294
1294
|
if (l === void 0) {
|
|
1295
1295
|
if (o in u) {
|
|
1296
1296
|
const c = a(() => /* @__PURE__ */ U(D));
|
|
1297
|
-
n.set(o, c),
|
|
1297
|
+
n.set(o, c), ot(i);
|
|
1298
1298
|
}
|
|
1299
1299
|
} else
|
|
1300
|
-
B(l, D),
|
|
1300
|
+
B(l, D), ot(i);
|
|
1301
1301
|
return !0;
|
|
1302
1302
|
},
|
|
1303
1303
|
get(u, o, l) {
|
|
1304
|
-
if (o ===
|
|
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 ||
|
|
1307
|
+
if (c === void 0 && (!f || at(u, o)?.writable) && (c = a(() => {
|
|
1308
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) {
|
|
@@ -1331,10 +1331,10 @@ function nt(t) {
|
|
|
1331
1331
|
return l;
|
|
1332
1332
|
},
|
|
1333
1333
|
has(u, o) {
|
|
1334
|
-
if (o ===
|
|
1334
|
+
if (o === St)
|
|
1335
1335
|
return !0;
|
|
1336
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 ||
|
|
1337
|
+
if (l !== void 0 || b !== null && (!c || at(u, o)?.writable)) {
|
|
1338
1338
|
l === void 0 && (l = a(() => {
|
|
1339
1339
|
var h = c ? nt(u[o]) : D, m = /* @__PURE__ */ U(h);
|
|
1340
1340
|
return m;
|
|
@@ -1354,7 +1354,7 @@ function nt(t) {
|
|
|
1354
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
1359
|
h = f.v !== D;
|
|
1360
1360
|
var v = a(() => nt(l));
|
|
@@ -1369,7 +1369,7 @@ function nt(t) {
|
|
|
1369
1369
|
), j = Number(o);
|
|
1370
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
|
},
|
|
@@ -1384,66 +1384,66 @@ function nt(t) {
|
|
|
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
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__ */
|
|
1417
|
+
function Un(t, e) {
|
|
1418
|
+
return /* @__PURE__ */ Sr(t);
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Ms(t, e = 1, n = !1) {
|
|
1421
1421
|
let r = t;
|
|
1422
1422
|
for (; e--; )
|
|
1423
1423
|
r = /** @type {TemplateNode} */
|
|
1424
1424
|
/* @__PURE__ */ fn(r);
|
|
1425
1425
|
return r;
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function Es(t, e, n) {
|
|
1428
1428
|
return (
|
|
1429
1429
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1430
|
-
document.createElementNS(
|
|
1430
|
+
document.createElementNS(ns, t, void 0)
|
|
1431
1431
|
);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function Pr(t) {
|
|
1434
1434
|
var e = k, n = b;
|
|
1435
|
-
re(null),
|
|
1435
|
+
re(null), pe(null);
|
|
1436
1436
|
try {
|
|
1437
1437
|
return t();
|
|
1438
1438
|
} finally {
|
|
1439
|
-
re(e),
|
|
1439
|
+
re(e), pe(n);
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function xs(t, e) {
|
|
1443
1443
|
var n = e.last;
|
|
1444
1444
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function ke(t, e, n) {
|
|
1447
1447
|
var r = b;
|
|
1448
1448
|
r !== null && (r.f & be) !== 0 && (t |= be);
|
|
1449
1449
|
var i = {
|
|
@@ -1466,12 +1466,12 @@ function we(t, e, n) {
|
|
|
1466
1466
|
try {
|
|
1467
1467
|
Ge(i);
|
|
1468
1468
|
} catch (u) {
|
|
1469
|
-
throw
|
|
1469
|
+
throw he(i), u;
|
|
1470
1470
|
}
|
|
1471
|
-
else e !== null &&
|
|
1471
|
+
else e !== null && fe(i);
|
|
1472
1472
|
var s = i;
|
|
1473
1473
|
if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1474
|
-
(s.f & et) === 0 && (s = s.first, (t &
|
|
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)) {
|
|
1475
1475
|
var a = (
|
|
1476
1476
|
/** @type {Derived} */
|
|
1477
1477
|
k
|
|
@@ -1483,52 +1483,52 @@ function we(t, e, n) {
|
|
|
1483
1483
|
function hn() {
|
|
1484
1484
|
return k !== null && !ae;
|
|
1485
1485
|
}
|
|
1486
|
-
function xs(t) {
|
|
1487
|
-
const e = we(Ct, null, !1);
|
|
1488
|
-
return S(e, z), e.teardown = t, e;
|
|
1489
|
-
}
|
|
1490
1486
|
function Ss(t) {
|
|
1491
|
-
|
|
1487
|
+
const e = ke(Ct, null, !1);
|
|
1488
|
+
return S(e, z), e.teardown = t, e;
|
|
1492
1489
|
}
|
|
1493
1490
|
function Ps(t) {
|
|
1491
|
+
return ke(ht | Ji, t, !1);
|
|
1492
|
+
}
|
|
1493
|
+
function Ts(t) {
|
|
1494
1494
|
Ee.ensure();
|
|
1495
|
-
const e =
|
|
1495
|
+
const e = ke(Fe | et, t, !0);
|
|
1496
1496
|
return (n = {}) => new Promise((r) => {
|
|
1497
|
-
n.outro ?
|
|
1498
|
-
|
|
1499
|
-
}) : (
|
|
1497
|
+
n.outro ? Pt(e, () => {
|
|
1498
|
+
he(e), r(void 0);
|
|
1499
|
+
}) : (he(e), r(void 0));
|
|
1500
1500
|
});
|
|
1501
1501
|
}
|
|
1502
|
-
function Ts(t) {
|
|
1503
|
-
return we(ft, t, !1);
|
|
1504
|
-
}
|
|
1505
1502
|
function Is(t) {
|
|
1506
|
-
return
|
|
1503
|
+
return ke(ht, t, !1);
|
|
1504
|
+
}
|
|
1505
|
+
function As(t) {
|
|
1506
|
+
return ke(sn | et, t, !0);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
return
|
|
1508
|
+
function Tr(t, e = 0) {
|
|
1509
|
+
return ke(Ct | e, t, !0);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1512
|
-
|
|
1513
|
-
|
|
1511
|
+
function Ir(t, e = [], n = [], r = []) {
|
|
1512
|
+
ps(r, e, n, (i) => {
|
|
1513
|
+
ke(Ct, () => t(...i.map(E)), !0);
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1517
|
-
var n = we
|
|
1516
|
+
function Ns(t, e = 0) {
|
|
1517
|
+
var n = ke(we | e, t, !0);
|
|
1518
1518
|
return n;
|
|
1519
1519
|
}
|
|
1520
1520
|
function Ae(t) {
|
|
1521
|
-
return
|
|
1521
|
+
return ke(Se | et, t, !0);
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function Ar(t) {
|
|
1524
1524
|
var e = t.teardown;
|
|
1525
1525
|
if (e !== null) {
|
|
1526
1526
|
const n = Ke, r = k;
|
|
1527
|
-
|
|
1527
|
+
Wn(!0), re(null);
|
|
1528
1528
|
try {
|
|
1529
1529
|
e.call(null);
|
|
1530
1530
|
} finally {
|
|
1531
|
-
|
|
1531
|
+
Wn(n), re(r);
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
1534
|
}
|
|
@@ -1536,49 +1536,49 @@ function pn(t, e = !1) {
|
|
|
1536
1536
|
var n = t.first;
|
|
1537
1537
|
for (t.first = t.last = null; n !== null; ) {
|
|
1538
1538
|
const i = n.ac;
|
|
1539
|
-
i !== null &&
|
|
1539
|
+
i !== null && Pr(() => {
|
|
1540
1540
|
i.abort(Ne);
|
|
1541
1541
|
});
|
|
1542
1542
|
var r = n.next;
|
|
1543
|
-
(n.f & Fe) !== 0 ? n.parent = null :
|
|
1543
|
+
(n.f & Fe) !== 0 ? n.parent = null : he(n, e), n = r;
|
|
1544
1544
|
}
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function Cs(t) {
|
|
1547
1547
|
for (var e = t.first; e !== null; ) {
|
|
1548
1548
|
var n = e.next;
|
|
1549
|
-
(e.f & Se) === 0 &&
|
|
1549
|
+
(e.f & Se) === 0 && he(e), e = n;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function he(t, e = !0) {
|
|
1553
1553
|
var n = !1;
|
|
1554
|
-
(e || (t.f &
|
|
1554
|
+
(e || (t.f & ur) !== 0) && t.nodes !== null && t.nodes.end !== null && (Rs(
|
|
1555
1555
|
t.nodes.start,
|
|
1556
1556
|
/** @type {TemplateNode} */
|
|
1557
1557
|
t.nodes.end
|
|
1558
|
-
), n = !0), pn(t, e && !n),
|
|
1558
|
+
), n = !0), pn(t, e && !n), ut(t, 0), S(t, _e);
|
|
1559
1559
|
var r = t.nodes && t.nodes.t;
|
|
1560
1560
|
if (r !== null)
|
|
1561
1561
|
for (const s of r)
|
|
1562
1562
|
s.stop();
|
|
1563
|
-
|
|
1563
|
+
Ar(t);
|
|
1564
1564
|
var i = t.parent;
|
|
1565
|
-
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;
|
|
1566
1566
|
}
|
|
1567
|
-
function
|
|
1567
|
+
function Rs(t, e) {
|
|
1568
1568
|
for (; t !== null; ) {
|
|
1569
1569
|
var n = t === e ? null : /* @__PURE__ */ fn(t);
|
|
1570
1570
|
t.remove(), t = n;
|
|
1571
1571
|
}
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function Nr(t) {
|
|
1574
1574
|
var e = t.parent, n = t.prev, r = t.next;
|
|
1575
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));
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Pt(t, e, n = !0) {
|
|
1578
1578
|
var r = [];
|
|
1579
|
-
|
|
1579
|
+
Cr(t, r, !0);
|
|
1580
1580
|
var i = () => {
|
|
1581
|
-
n &&
|
|
1581
|
+
n && he(t), e && e();
|
|
1582
1582
|
}, s = r.length;
|
|
1583
1583
|
if (s > 0) {
|
|
1584
1584
|
var a = () => --s || i();
|
|
@@ -1587,7 +1587,7 @@ function St(t, e, n = !0) {
|
|
|
1587
1587
|
} else
|
|
1588
1588
|
i();
|
|
1589
1589
|
}
|
|
1590
|
-
function
|
|
1590
|
+
function Cr(t, e, n) {
|
|
1591
1591
|
if ((t.f & be) === 0) {
|
|
1592
1592
|
t.f ^= be;
|
|
1593
1593
|
var r = t.nodes && t.nodes.t;
|
|
@@ -1598,20 +1598,20 @@ function Ar(t, e, n) {
|
|
|
1598
1598
|
var s = i.next, a = (i.f & It) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1599
1599
|
// it means the parent block effect was pruned. In that case,
|
|
1600
1600
|
// transparency information was transferred to the branch effect.
|
|
1601
|
-
(i.f & Se) !== 0 && (t.f &
|
|
1602
|
-
|
|
1601
|
+
(i.f & Se) !== 0 && (t.f & we) !== 0;
|
|
1602
|
+
Cr(i, e, a ? n : !1), i = s;
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function Ds(t, e) {
|
|
1607
1607
|
if (t.nodes)
|
|
1608
1608
|
for (var n = t.nodes.start, r = t.nodes.end; n !== null; ) {
|
|
1609
1609
|
var i = n === r ? null : /* @__PURE__ */ fn(n);
|
|
1610
1610
|
e.append(n), n = i;
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
-
let
|
|
1614
|
-
function
|
|
1613
|
+
let Tt = !1, Ke = !1;
|
|
1614
|
+
function Wn(t) {
|
|
1615
1615
|
Ke = t;
|
|
1616
1616
|
}
|
|
1617
1617
|
let k = null, ae = !1;
|
|
@@ -1619,25 +1619,25 @@ function re(t) {
|
|
|
1619
1619
|
k = t;
|
|
1620
1620
|
}
|
|
1621
1621
|
let b = null;
|
|
1622
|
-
function
|
|
1622
|
+
function pe(t) {
|
|
1623
1623
|
b = t;
|
|
1624
1624
|
}
|
|
1625
1625
|
let ne = null;
|
|
1626
|
-
function
|
|
1626
|
+
function zs(t) {
|
|
1627
1627
|
k !== null && (ne === null ? ne = [t] : ne.push(t));
|
|
1628
1628
|
}
|
|
1629
|
-
let W = null,
|
|
1630
|
-
function
|
|
1629
|
+
let W = null, J = 0, G = null;
|
|
1630
|
+
function Os(t) {
|
|
1631
1631
|
G = t;
|
|
1632
1632
|
}
|
|
1633
|
-
let
|
|
1634
|
-
function
|
|
1633
|
+
let Rr = 1, Ce = 0, De = Ce;
|
|
1634
|
+
function Bn(t) {
|
|
1635
1635
|
De = t;
|
|
1636
1636
|
}
|
|
1637
|
-
function
|
|
1638
|
-
return ++
|
|
1637
|
+
function Dr() {
|
|
1638
|
+
return ++Rr;
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function pt(t) {
|
|
1641
1641
|
var e = t.f;
|
|
1642
1642
|
if ((e & $) !== 0)
|
|
1643
1643
|
return !0;
|
|
@@ -1647,10 +1647,10 @@ function ht(t) {
|
|
|
1647
1647
|
t.deps
|
|
1648
1648
|
), r = n.length, i = 0; i < r; i++) {
|
|
1649
1649
|
var s = n[i];
|
|
1650
|
-
if (
|
|
1650
|
+
if (pt(
|
|
1651
1651
|
/** @type {Derived} */
|
|
1652
1652
|
s
|
|
1653
|
-
) &&
|
|
1653
|
+
) && wr(
|
|
1654
1654
|
/** @type {Derived} */
|
|
1655
1655
|
s
|
|
1656
1656
|
), s.wv > t.wv)
|
|
@@ -1662,26 +1662,26 @@ function ht(t) {
|
|
|
1662
1662
|
}
|
|
1663
1663
|
return !1;
|
|
1664
1664
|
}
|
|
1665
|
-
function
|
|
1665
|
+
function zr(t, e, n = !0) {
|
|
1666
1666
|
var r = t.reactions;
|
|
1667
1667
|
if (r !== null && !(ne !== null && Ye.call(ne, t)))
|
|
1668
1668
|
for (var i = 0; i < r.length; i++) {
|
|
1669
1669
|
var s = r[i];
|
|
1670
|
-
(s.f & O) !== 0 ?
|
|
1670
|
+
(s.f & O) !== 0 ? zr(
|
|
1671
1671
|
/** @type {Derived} */
|
|
1672
1672
|
s,
|
|
1673
1673
|
e,
|
|
1674
1674
|
!1
|
|
1675
|
-
) : e === s && (n ? S(s, $) : (s.f & z) !== 0 && S(s, oe),
|
|
1675
|
+
) : e === s && (n ? S(s, $) : (s.f & z) !== 0 && S(s, oe), fe(
|
|
1676
1676
|
/** @type {Effect} */
|
|
1677
1677
|
s
|
|
1678
1678
|
));
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
1681
|
-
function
|
|
1682
|
-
var e = W, n =
|
|
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
1683
|
W = /** @type {null | Value[]} */
|
|
1684
|
-
null,
|
|
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(() => {
|
|
1685
1685
|
t.ac.abort(Ne);
|
|
1686
1686
|
}), t.ac = null);
|
|
1687
1687
|
try {
|
|
@@ -1694,19 +1694,19 @@ function Dr(t) {
|
|
|
1694
1694
|
var h = t.deps, m = x?.is_fork;
|
|
1695
1695
|
if (W !== null) {
|
|
1696
1696
|
var d;
|
|
1697
|
-
if (m ||
|
|
1698
|
-
for (h.length =
|
|
1699
|
-
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];
|
|
1700
1700
|
else
|
|
1701
1701
|
t.deps = h = W;
|
|
1702
1702
|
if (hn() && (t.f & te) !== 0)
|
|
1703
|
-
for (d =
|
|
1703
|
+
for (d = J; d < h.length; d++)
|
|
1704
1704
|
(h[d].reactions ??= []).push(t);
|
|
1705
|
-
} else !m && h !== null &&
|
|
1706
|
-
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)
|
|
1707
1707
|
for (d = 0; d < /** @type {Source[]} */
|
|
1708
1708
|
G.length; d++)
|
|
1709
|
-
|
|
1709
|
+
zr(
|
|
1710
1710
|
G[d],
|
|
1711
1711
|
/** @type {Effect} */
|
|
1712
1712
|
t
|
|
@@ -1723,15 +1723,15 @@ function Dr(t) {
|
|
|
1723
1723
|
}
|
|
1724
1724
|
return (t.f & Me) !== 0 && (t.f ^= Me), f;
|
|
1725
1725
|
} catch (v) {
|
|
1726
|
-
return
|
|
1726
|
+
return hr(v);
|
|
1727
1727
|
} finally {
|
|
1728
|
-
t.f ^= Qt, W = e,
|
|
1728
|
+
t.f ^= Qt, W = e, J = n, G = r, k = i, ne = s, Xe(a), ae = u, De = o;
|
|
1729
1729
|
}
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Ls(t, e) {
|
|
1732
1732
|
let n = e.reactions;
|
|
1733
1733
|
if (n !== null) {
|
|
1734
|
-
var r =
|
|
1734
|
+
var r = ji.call(n, t);
|
|
1735
1735
|
if (r !== -1) {
|
|
1736
1736
|
var i = n.length - 1;
|
|
1737
1737
|
i === 0 ? n = e.reactions = null : (n[r] = n[i], n.pop());
|
|
@@ -1745,29 +1745,29 @@ function Os(t, e) {
|
|
|
1745
1745
|
/** @type {Derived} */
|
|
1746
1746
|
e
|
|
1747
1747
|
);
|
|
1748
|
-
(s.f & te) !== 0 && (s.f ^= te, s.f &= ~Le), ln(s),
|
|
1748
|
+
(s.f & te) !== 0 && (s.f ^= te, s.f &= ~Le), ln(s), ys(s), ut(s, 0);
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function ut(t, e) {
|
|
1752
1752
|
var n = t.deps;
|
|
1753
1753
|
if (n !== null)
|
|
1754
1754
|
for (var r = e; r < n.length; r++)
|
|
1755
|
-
|
|
1755
|
+
Ls(t, n[r]);
|
|
1756
1756
|
}
|
|
1757
1757
|
function Ge(t) {
|
|
1758
1758
|
var e = t.f;
|
|
1759
1759
|
if ((e & _e) === 0) {
|
|
1760
1760
|
S(t, z);
|
|
1761
|
-
var n = b, r =
|
|
1762
|
-
b = t,
|
|
1761
|
+
var n = b, r = Tt;
|
|
1762
|
+
b = t, Tt = !0;
|
|
1763
1763
|
try {
|
|
1764
|
-
(e & (
|
|
1765
|
-
var i =
|
|
1766
|
-
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;
|
|
1767
1767
|
var s;
|
|
1768
|
-
Kt &&
|
|
1768
|
+
Kt && is && (t.f & $) !== 0 && t.deps;
|
|
1769
1769
|
} finally {
|
|
1770
|
-
|
|
1770
|
+
Tt = r, b = n;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
}
|
|
@@ -1778,7 +1778,7 @@ function E(t) {
|
|
|
1778
1778
|
if (!r && (ne === null || !Ye.call(ne, t))) {
|
|
1779
1779
|
var i = k.deps;
|
|
1780
1780
|
if ((k.f & Qt) !== 0)
|
|
1781
|
-
t.rv < Ce && (t.rv = Ce, W === null && i !== null && i[
|
|
1781
|
+
t.rv < Ce && (t.rv = Ce, W === null && i !== null && i[J] === t ? J++ : W === null ? W = [t] : W.push(t));
|
|
1782
1782
|
else {
|
|
1783
1783
|
(k.deps ??= []).push(t);
|
|
1784
1784
|
var s = t.reactions;
|
|
@@ -1795,10 +1795,10 @@ function E(t) {
|
|
|
1795
1795
|
);
|
|
1796
1796
|
if (Ke) {
|
|
1797
1797
|
var u = a.v;
|
|
1798
|
-
return ((a.f & z) === 0 && a.reactions !== null ||
|
|
1798
|
+
return ((a.f & z) === 0 && a.reactions !== null || Fr(a)) && (u = cn(a)), xe.set(a, u), u;
|
|
1799
1799
|
}
|
|
1800
|
-
var o = (a.f & te) === 0 && !ae && k !== null && (
|
|
1801
|
-
|
|
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));
|
|
1802
1802
|
}
|
|
1803
1803
|
if (se?.has(t))
|
|
1804
1804
|
return se.get(t);
|
|
@@ -1806,22 +1806,22 @@ function E(t) {
|
|
|
1806
1806
|
throw t.v;
|
|
1807
1807
|
return t.v;
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1809
|
+
function Lr(t) {
|
|
1810
1810
|
if (t.f |= te, t.deps !== null)
|
|
1811
1811
|
for (const e of t.deps)
|
|
1812
|
-
(e.reactions ??= []).push(t), (e.f & O) !== 0 && (e.f & te) === 0 && (
|
|
1812
|
+
(e.reactions ??= []).push(t), (e.f & O) !== 0 && (e.f & te) === 0 && (kr(
|
|
1813
1813
|
/** @type {Derived} */
|
|
1814
1814
|
e
|
|
1815
|
-
),
|
|
1815
|
+
), Lr(
|
|
1816
1816
|
/** @type {Derived} */
|
|
1817
1817
|
e
|
|
1818
1818
|
));
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function Fr(t) {
|
|
1821
1821
|
if (t.v === D) return !0;
|
|
1822
1822
|
if (t.deps === null) return !1;
|
|
1823
1823
|
for (const e of t.deps)
|
|
1824
|
-
if (xe.has(e) || (e.f & O) !== 0 &&
|
|
1824
|
+
if (xe.has(e) || (e.f & O) !== 0 && Fr(
|
|
1825
1825
|
/** @type {Derived} */
|
|
1826
1826
|
e
|
|
1827
1827
|
))
|
|
@@ -1836,13 +1836,13 @@ function ee(t) {
|
|
|
1836
1836
|
ae = e;
|
|
1837
1837
|
}
|
|
1838
1838
|
}
|
|
1839
|
-
const
|
|
1840
|
-
function
|
|
1841
|
-
return
|
|
1839
|
+
const Fs = ["touchstart", "touchmove"];
|
|
1840
|
+
function $s(t) {
|
|
1841
|
+
return Fs.includes(t);
|
|
1842
1842
|
}
|
|
1843
|
-
const
|
|
1844
|
-
let
|
|
1845
|
-
function
|
|
1843
|
+
const _t = /* @__PURE__ */ Symbol("events"), Vs = /* @__PURE__ */ new Set(), Hn = /* @__PURE__ */ new Set();
|
|
1844
|
+
let qn = null;
|
|
1845
|
+
function Zn(t) {
|
|
1846
1846
|
var e = this, n = (
|
|
1847
1847
|
/** @type {Node} */
|
|
1848
1848
|
e.ownerDocument
|
|
@@ -1850,13 +1850,13 @@ function Hn(t) {
|
|
|
1850
1850
|
/** @type {null | Element} */
|
|
1851
1851
|
i[0] || t.target
|
|
1852
1852
|
);
|
|
1853
|
-
|
|
1854
|
-
var a = 0, u =
|
|
1853
|
+
qn = t;
|
|
1854
|
+
var a = 0, u = qn === t && t[_t];
|
|
1855
1855
|
if (u) {
|
|
1856
1856
|
var o = i.indexOf(u);
|
|
1857
1857
|
if (o !== -1 && (e === document || e === /** @type {any} */
|
|
1858
1858
|
window)) {
|
|
1859
|
-
t[
|
|
1859
|
+
t[_t] = e;
|
|
1860
1860
|
return;
|
|
1861
1861
|
}
|
|
1862
1862
|
var l = i.indexOf(e);
|
|
@@ -1866,20 +1866,20 @@ function Hn(t) {
|
|
|
1866
1866
|
}
|
|
1867
1867
|
if (s = /** @type {Element} */
|
|
1868
1868
|
i[a] || t.target, s !== e) {
|
|
1869
|
-
|
|
1869
|
+
Wi(t, "currentTarget", {
|
|
1870
1870
|
configurable: !0,
|
|
1871
1871
|
get() {
|
|
1872
1872
|
return s || n;
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
1875
|
var c = k, f = b;
|
|
1876
|
-
re(null),
|
|
1876
|
+
re(null), pe(null);
|
|
1877
1877
|
try {
|
|
1878
1878
|
for (var h, m = []; s !== null; ) {
|
|
1879
1879
|
var d = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1880
1880
|
s.host || null;
|
|
1881
1881
|
try {
|
|
1882
|
-
var v = s[
|
|
1882
|
+
var v = s[_t]?.[r];
|
|
1883
1883
|
v != null && (!/** @type {any} */
|
|
1884
1884
|
s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1885
1885
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
@@ -1899,28 +1899,28 @@ function Hn(t) {
|
|
|
1899
1899
|
throw h;
|
|
1900
1900
|
}
|
|
1901
1901
|
} finally {
|
|
1902
|
-
t[
|
|
1902
|
+
t[_t] = e, delete t.currentTarget, re(c), pe(f);
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
const
|
|
1906
|
+
const js = (
|
|
1907
1907
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1908
1908
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1909
1909
|
/** @param {string} html */
|
|
1910
1910
|
createHTML: (t) => t
|
|
1911
1911
|
})
|
|
1912
1912
|
);
|
|
1913
|
-
function
|
|
1913
|
+
function Us(t) {
|
|
1914
1914
|
return (
|
|
1915
1915
|
/** @type {string} */
|
|
1916
|
-
|
|
1916
|
+
js?.createHTML(t) ?? t
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1920
|
-
var e =
|
|
1921
|
-
return e.innerHTML =
|
|
1919
|
+
function Ws(t) {
|
|
1920
|
+
var e = Es("template");
|
|
1921
|
+
return e.innerHTML = Us(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1922
1922
|
}
|
|
1923
|
-
function
|
|
1923
|
+
function Bs(t, e) {
|
|
1924
1924
|
var n = (
|
|
1925
1925
|
/** @type {Effect} */
|
|
1926
1926
|
b
|
|
@@ -1928,33 +1928,33 @@ function Ws(t, e) {
|
|
|
1928
1928
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1929
1929
|
}
|
|
1930
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1931
|
-
function
|
|
1931
|
+
function $r(t, e) {
|
|
1932
1932
|
var n, r = !t.startsWith("<!>");
|
|
1933
1933
|
return () => {
|
|
1934
|
-
n === void 0 && (n =
|
|
1935
|
-
/* @__PURE__ */
|
|
1934
|
+
n === void 0 && (n = Ws(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1935
|
+
/* @__PURE__ */ Sr(n));
|
|
1936
1936
|
var i = (
|
|
1937
1937
|
/** @type {TemplateNode} */
|
|
1938
|
-
|
|
1938
|
+
_r ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1939
1939
|
);
|
|
1940
|
-
return
|
|
1940
|
+
return Bs(i, i), i;
|
|
1941
1941
|
};
|
|
1942
1942
|
}
|
|
1943
|
-
function
|
|
1943
|
+
function Vr(t, e) {
|
|
1944
1944
|
t !== null && t.before(
|
|
1945
1945
|
/** @type {Node} */
|
|
1946
1946
|
e
|
|
1947
1947
|
);
|
|
1948
1948
|
}
|
|
1949
1949
|
function dn(t, e) {
|
|
1950
|
-
return
|
|
1951
|
-
}
|
|
1952
|
-
const
|
|
1953
|
-
function
|
|
1954
|
-
|
|
1955
|
-
var o = void 0, l =
|
|
1956
|
-
var c = n ?? e.appendChild(
|
|
1957
|
-
|
|
1950
|
+
return Hs(t, e);
|
|
1951
|
+
}
|
|
1952
|
+
const Mt = /* @__PURE__ */ new Map();
|
|
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(
|
|
1958
1958
|
/** @type {TemplateNode} */
|
|
1959
1959
|
c,
|
|
1960
1960
|
{
|
|
@@ -1976,55 +1976,55 @@ function Bs(t, { target: e, anchor: n, props: r = {}, events: i, context: s, int
|
|
|
1976
1976
|
var v = m[d];
|
|
1977
1977
|
if (!f.has(v)) {
|
|
1978
1978
|
f.add(v);
|
|
1979
|
-
var _ =
|
|
1980
|
-
for (const
|
|
1981
|
-
var R =
|
|
1982
|
-
R === void 0 && (R = /* @__PURE__ */ new Map(),
|
|
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
1983
|
var j = R.get(v);
|
|
1984
|
-
j === void 0 ? (
|
|
1984
|
+
j === void 0 ? (Y.addEventListener(v, Zn, { passive: _ }), R.set(v, 1)) : R.set(v, j + 1);
|
|
1985
1985
|
}
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
1988
|
};
|
|
1989
|
-
return h(
|
|
1989
|
+
return h(Ui(Vs)), Hn.add(h), () => {
|
|
1990
1990
|
for (var m of f)
|
|
1991
1991
|
for (const _ of [e, document]) {
|
|
1992
1992
|
var d = (
|
|
1993
1993
|
/** @type {Map<string, number>} */
|
|
1994
|
-
|
|
1994
|
+
Mt.get(_)
|
|
1995
1995
|
), v = (
|
|
1996
1996
|
/** @type {number} */
|
|
1997
1997
|
d.get(m)
|
|
1998
1998
|
);
|
|
1999
|
-
--v == 0 ? (_.removeEventListener(m,
|
|
1999
|
+
--v == 0 ? (_.removeEventListener(m, Zn), d.delete(m), d.size === 0 && Mt.delete(_)) : d.set(m, v);
|
|
2000
2000
|
}
|
|
2001
|
-
|
|
2001
|
+
Hn.delete(h), c !== n && c.parentNode?.removeChild(c);
|
|
2002
2002
|
};
|
|
2003
2003
|
});
|
|
2004
|
-
return
|
|
2004
|
+
return qs.set(o, l), o;
|
|
2005
2005
|
}
|
|
2006
|
-
let
|
|
2007
|
-
function
|
|
2006
|
+
let qs = /* @__PURE__ */ new WeakMap();
|
|
2007
|
+
function jr(t) {
|
|
2008
2008
|
var e, n, r = "";
|
|
2009
2009
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
2010
2010
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
2011
2011
|
var i = t.length;
|
|
2012
|
-
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);
|
|
2013
2013
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
2014
2014
|
return r;
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
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);
|
|
2018
2018
|
return r;
|
|
2019
2019
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return typeof t == "object" ?
|
|
2020
|
+
function Ur(t) {
|
|
2021
|
+
return typeof t == "object" ? Zs(t) : t ?? "";
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Ys(t, e, n) {
|
|
2024
2024
|
var r = t == null ? "" : "" + t;
|
|
2025
2025
|
return e && (r = r ? r + " " + e : e), r === "" ? null : r;
|
|
2026
2026
|
}
|
|
2027
|
-
function
|
|
2027
|
+
function Yn(t, e = !1) {
|
|
2028
2028
|
var n = e ? " !important;" : ";", r = "";
|
|
2029
2029
|
for (var i of Object.keys(t)) {
|
|
2030
2030
|
var s = t[i];
|
|
@@ -2032,17 +2032,17 @@ function qn(t, e = !1) {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
return r;
|
|
2034
2034
|
}
|
|
2035
|
-
function
|
|
2035
|
+
function Js(t, e) {
|
|
2036
2036
|
if (e) {
|
|
2037
2037
|
var n = "", r, i;
|
|
2038
|
-
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;
|
|
2039
2039
|
}
|
|
2040
2040
|
return String(t);
|
|
2041
2041
|
}
|
|
2042
|
-
function
|
|
2042
|
+
function Wr(t, e, n, r, i, s) {
|
|
2043
2043
|
var a = t.__className;
|
|
2044
2044
|
if (a !== n || a === void 0) {
|
|
2045
|
-
var u =
|
|
2045
|
+
var u = Ys(n, r);
|
|
2046
2046
|
u == null ? t.removeAttribute("class") : t.className = u, t.__className = n;
|
|
2047
2047
|
}
|
|
2048
2048
|
return s;
|
|
@@ -2053,27 +2053,27 @@ function qt(t, e = {}, n, r) {
|
|
|
2053
2053
|
e[i] !== s && (n[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, s, r));
|
|
2054
2054
|
}
|
|
2055
2055
|
}
|
|
2056
|
-
function
|
|
2056
|
+
function rt(t, e, n, r) {
|
|
2057
2057
|
var i = t.__style;
|
|
2058
2058
|
if (i !== e) {
|
|
2059
|
-
var s =
|
|
2059
|
+
var s = Js(e, r);
|
|
2060
2060
|
s == null ? t.removeAttribute("style") : t.style.cssText = s, t.__style = e;
|
|
2061
2061
|
} else r && (Array.isArray(r) ? (qt(t, n?.[0], r[0]), qt(t, n?.[1], r[1], "important")) : qt(t, n, r));
|
|
2062
2062
|
return r;
|
|
2063
2063
|
}
|
|
2064
|
-
function
|
|
2065
|
-
return t === e || t?.[
|
|
2064
|
+
function Jn(t, e) {
|
|
2065
|
+
return t === e || t?.[St] === e;
|
|
2066
2066
|
}
|
|
2067
|
-
function
|
|
2068
|
-
return
|
|
2067
|
+
function it(t = {}, e, n, r) {
|
|
2068
|
+
return Is(() => {
|
|
2069
2069
|
var i, s;
|
|
2070
|
-
return
|
|
2070
|
+
return Tr(() => {
|
|
2071
2071
|
i = s, s = [], ee(() => {
|
|
2072
|
-
t !== n(...s) && (e(t, ...s), i &&
|
|
2072
|
+
t !== n(...s) && (e(t, ...s), i && Jn(n(...i), t) && e(null, ...i));
|
|
2073
2073
|
});
|
|
2074
2074
|
}), () => {
|
|
2075
2075
|
Re(() => {
|
|
2076
|
-
s &&
|
|
2076
|
+
s && Jn(n(...s), t) && e(null, ...s);
|
|
2077
2077
|
});
|
|
2078
2078
|
};
|
|
2079
2079
|
}), t;
|
|
@@ -2094,7 +2094,7 @@ class mn {
|
|
|
2094
2094
|
this.marker.update(e);
|
|
2095
2095
|
}
|
|
2096
2096
|
}
|
|
2097
|
-
class
|
|
2097
|
+
class dt {
|
|
2098
2098
|
shown;
|
|
2099
2099
|
id;
|
|
2100
2100
|
lat;
|
|
@@ -2102,16 +2102,16 @@ class pt {
|
|
|
2102
2102
|
rank;
|
|
2103
2103
|
marker;
|
|
2104
2104
|
constructor(e, n, r, i, s) {
|
|
2105
|
-
if (new.target ===
|
|
2105
|
+
if (new.target === dt) throw new Error("Unsupported code");
|
|
2106
2106
|
this.shown = !0, this.id = e, this.lat = n, this.lng = r, this.rank = i, this.marker = s;
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
|
-
const
|
|
2110
|
-
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(
|
|
2111
|
-
function
|
|
2109
|
+
const Xs = "5";
|
|
2110
|
+
typeof window < "u" && ((window.__svelte ??= {}).v ??= /* @__PURE__ */ new Set()).add(Xs);
|
|
2111
|
+
function Br(t) {
|
|
2112
2112
|
return -0.5 * (Math.cos(Math.PI * t) - 1);
|
|
2113
2113
|
}
|
|
2114
|
-
class
|
|
2114
|
+
class Hr {
|
|
2115
2115
|
animating;
|
|
2116
2116
|
animationEasing;
|
|
2117
2117
|
animationCallback;
|
|
@@ -2155,13 +2155,13 @@ class Wr {
|
|
|
2155
2155
|
return performance.now() > this.time.end;
|
|
2156
2156
|
}
|
|
2157
2157
|
}
|
|
2158
|
-
var
|
|
2159
|
-
function
|
|
2158
|
+
var Ks = /* @__PURE__ */ $r("<div></div>");
|
|
2159
|
+
function Gs(t, e) {
|
|
2160
2160
|
an(e, !0);
|
|
2161
2161
|
let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
|
|
2162
2162
|
setDisplayed: j,
|
|
2163
|
-
getDisplayed:
|
|
2164
|
-
setSuppressed:
|
|
2163
|
+
getDisplayed: Y,
|
|
2164
|
+
setSuppressed: de,
|
|
2165
2165
|
setCollapsed: Pe,
|
|
2166
2166
|
getCollapsed: ie,
|
|
2167
2167
|
setScale: Dt
|
|
@@ -2169,30 +2169,30 @@ function Ks(t, e) {
|
|
|
2169
2169
|
function o() {
|
|
2170
2170
|
return u;
|
|
2171
2171
|
}
|
|
2172
|
-
let l, c = s.width, f = s.height, h = s.padding, m = i?.background ??
|
|
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
2173
|
function j(y) {
|
|
2174
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());
|
|
2175
2175
|
}
|
|
2176
|
-
function
|
|
2176
|
+
function Y() {
|
|
2177
2177
|
return E(_);
|
|
2178
2178
|
}
|
|
2179
|
-
let
|
|
2180
|
-
function
|
|
2181
|
-
y != E(
|
|
2179
|
+
let ue = /* @__PURE__ */ U(!0);
|
|
2180
|
+
function de(y) {
|
|
2181
|
+
y != E(ue) && (B(ue, y, !0), y && (K = je, I.set(je)));
|
|
2182
2182
|
}
|
|
2183
|
-
let
|
|
2183
|
+
let me = /* @__PURE__ */ U(!0);
|
|
2184
2184
|
function Pe(y) {
|
|
2185
|
-
y != E(
|
|
2185
|
+
y != E(me) && (B(me, y, !0), I.target(E(me) ? 0 : K));
|
|
2186
2186
|
}
|
|
2187
2187
|
function ie() {
|
|
2188
2188
|
return E(_) ? I.expired() : !0;
|
|
2189
2189
|
}
|
|
2190
|
-
let K = je, I = new
|
|
2190
|
+
let K = je, I = new Hr({
|
|
2191
2191
|
value: je,
|
|
2192
2192
|
min: 0,
|
|
2193
2193
|
max: 1,
|
|
2194
|
-
timespan:
|
|
2195
|
-
easing:
|
|
2194
|
+
timespan: Ai,
|
|
2195
|
+
easing: Br,
|
|
2196
2196
|
callback: zt
|
|
2197
2197
|
});
|
|
2198
2198
|
function Dt(y) {
|
|
@@ -2204,20 +2204,20 @@ function Ks(t, e) {
|
|
|
2204
2204
|
function $e(y) {
|
|
2205
2205
|
return 0.25 + 0.75 * y;
|
|
2206
2206
|
}
|
|
2207
|
-
var Ot = { invoke: o }, Ve =
|
|
2208
|
-
let
|
|
2209
|
-
return
|
|
2207
|
+
var Ot = { invoke: o }, Ve = Ks();
|
|
2208
|
+
let mt;
|
|
2209
|
+
return it(Ve, (y) => l = y, () => l), Ir(
|
|
2210
2210
|
(y) => {
|
|
2211
|
-
|
|
2211
|
+
Wr(
|
|
2212
2212
|
Ve,
|
|
2213
2213
|
1,
|
|
2214
|
-
|
|
2214
|
+
Ur([
|
|
2215
2215
|
"pin",
|
|
2216
2216
|
E(_) && "displayed",
|
|
2217
|
-
E(
|
|
2217
|
+
E(ue) && "suppressed"
|
|
2218
2218
|
]),
|
|
2219
2219
|
"svelte-10kxbrm"
|
|
2220
|
-
),
|
|
2220
|
+
), mt = rt(Ve, "", mt, y);
|
|
2221
2221
|
},
|
|
2222
2222
|
[
|
|
2223
2223
|
() => ({
|
|
@@ -2231,24 +2231,24 @@ function Ks(t, e) {
|
|
|
2231
2231
|
filter: `brightness(${$e(je)})`
|
|
2232
2232
|
})
|
|
2233
2233
|
]
|
|
2234
|
-
),
|
|
2234
|
+
), Vr(t, Ve), on(Ot);
|
|
2235
2235
|
}
|
|
2236
|
-
class
|
|
2236
|
+
class Qs extends dt {
|
|
2237
2237
|
width;
|
|
2238
2238
|
height;
|
|
2239
2239
|
zoom;
|
|
2240
2240
|
component;
|
|
2241
2241
|
constructor(e, n, r, i, s, a) {
|
|
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(
|
|
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, {
|
|
2243
2243
|
target: this.marker.div,
|
|
2244
2244
|
props: a
|
|
2245
2245
|
});
|
|
2246
2246
|
}
|
|
2247
2247
|
get zIndex() {
|
|
2248
|
-
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;
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
|
-
class
|
|
2251
|
+
class Xn {
|
|
2252
2252
|
animating;
|
|
2253
2253
|
animationTimestamp;
|
|
2254
2254
|
animationEnd;
|
|
@@ -2307,21 +2307,21 @@ function rn(t, e, n) {
|
|
|
2307
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);
|
|
2308
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 };
|
|
2309
2309
|
}
|
|
2310
|
-
var
|
|
2311
|
-
function
|
|
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
2312
|
an(e, !0);
|
|
2313
2313
|
let n = ee(() => e.id), r = ee(() => e.element), i = ee(() => e.style), s = ee(() => e.dimensions), a = ee(() => e.initialize), u = {
|
|
2314
2314
|
setDisplayed: Dt,
|
|
2315
2315
|
getDisplayed: zt,
|
|
2316
2316
|
setCollapsed: Ot,
|
|
2317
2317
|
getCollapsed: Ve,
|
|
2318
|
-
getExpanded:
|
|
2319
|
-
setAngle:
|
|
2318
|
+
getExpanded: mt,
|
|
2319
|
+
setAngle: li
|
|
2320
2320
|
};
|
|
2321
2321
|
function o() {
|
|
2322
2322
|
return u;
|
|
2323
2323
|
}
|
|
2324
|
-
let l = s.width + 2 * s.padding, c = s.height + 2 * s.padding, f = s.padding, h, m = i?.filter ??
|
|
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
2325
|
s.width, s.height, i?.radius;
|
|
2326
2326
|
let K = !1, I = /* @__PURE__ */ U(!1);
|
|
2327
2327
|
function Dt(g) {
|
|
@@ -2337,87 +2337,92 @@ function Br(t, e) {
|
|
|
2337
2337
|
function Ve() {
|
|
2338
2338
|
return E(I) ? y.expired() : !0;
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2340
|
+
function mt() {
|
|
2341
2341
|
return E(I) ? y.expired() : !1;
|
|
2342
2342
|
}
|
|
2343
|
-
let y = new
|
|
2343
|
+
let y = new Hr({
|
|
2344
2344
|
value: 0,
|
|
2345
2345
|
min: 0,
|
|
2346
2346
|
max: 1,
|
|
2347
|
-
timespan:
|
|
2348
|
-
easing:
|
|
2349
|
-
callback:
|
|
2347
|
+
timespan: Ni,
|
|
2348
|
+
easing: Br,
|
|
2349
|
+
callback: oi
|
|
2350
2350
|
});
|
|
2351
|
-
function
|
|
2351
|
+
function oi(g) {
|
|
2352
2352
|
h.style.opacity = `${g}`, h.style.scale = `${g}`, ie.style.opacity = `${g}`;
|
|
2353
2353
|
}
|
|
2354
|
-
let
|
|
2354
|
+
let vt = NaN, Lt = /* @__PURE__ */ U(!1), Ft = -l / 2, $t = new Xn({
|
|
2355
2355
|
value: -l / 2,
|
|
2356
2356
|
min: -l,
|
|
2357
2357
|
max: 0,
|
|
2358
2358
|
precision: 1,
|
|
2359
|
-
stiffness:
|
|
2360
|
-
callback:
|
|
2361
|
-
}), Vt = -c / 2, jt = new
|
|
2359
|
+
stiffness: Nn,
|
|
2360
|
+
callback: ui
|
|
2361
|
+
}), Vt = -c / 2, jt = new Xn({
|
|
2362
2362
|
value: -c / 2,
|
|
2363
2363
|
min: -c,
|
|
2364
2364
|
max: 0,
|
|
2365
2365
|
precision: 1,
|
|
2366
|
-
stiffness:
|
|
2367
|
-
callback:
|
|
2366
|
+
stiffness: Nn,
|
|
2367
|
+
callback: ci
|
|
2368
2368
|
});
|
|
2369
|
-
function
|
|
2369
|
+
function li(g, gt) {
|
|
2370
2370
|
if (Number.isNaN(g)) {
|
|
2371
|
-
|
|
2371
|
+
vt = NaN, B(Lt, !1);
|
|
2372
2372
|
return;
|
|
2373
2373
|
}
|
|
2374
|
-
if (E(Lt) == !1 ||
|
|
2375
|
-
B(Lt, !0),
|
|
2374
|
+
if (E(Lt) == !1 || gt == !0) {
|
|
2375
|
+
B(Lt, !0), vt = g;
|
|
2376
2376
|
const Ie = rn(l, c, g);
|
|
2377
2377
|
$t.set(Math.round(Ie.x)), jt.set(Math.round(Ie.y));
|
|
2378
2378
|
return;
|
|
2379
2379
|
}
|
|
2380
|
-
if (
|
|
2381
|
-
|
|
2380
|
+
if (vt != g) {
|
|
2381
|
+
vt = g;
|
|
2382
2382
|
const Ie = rn(l, c, g);
|
|
2383
2383
|
$t.target(Math.round(Ie.x)), jt.target(Math.round(Ie.y));
|
|
2384
2384
|
return;
|
|
2385
2385
|
}
|
|
2386
2386
|
}
|
|
2387
|
-
function
|
|
2387
|
+
function ui(g) {
|
|
2388
2388
|
Ft = g, yn(Ft, Vt);
|
|
2389
2389
|
}
|
|
2390
|
-
function
|
|
2390
|
+
function ci(g) {
|
|
2391
2391
|
Vt = g, yn(Ft, Vt);
|
|
2392
2392
|
}
|
|
2393
|
-
const
|
|
2394
|
-
function yn(g,
|
|
2395
|
-
const Ie = g + l / 2,
|
|
2396
|
-
d.style.transform = `scale(${
|
|
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)`;
|
|
2397
2397
|
}
|
|
2398
|
-
var
|
|
2398
|
+
var mi = { invoke: o }, tt = ea();
|
|
2399
2399
|
let bn;
|
|
2400
|
-
var Ut =
|
|
2400
|
+
var Ut = Un(tt);
|
|
2401
2401
|
let _n;
|
|
2402
|
-
|
|
2403
|
-
var Wt =
|
|
2402
|
+
it(Ut, (g) => d = g, () => d);
|
|
2403
|
+
var Wt = Ms(Ut, 2);
|
|
2404
2404
|
let Mn;
|
|
2405
|
-
var
|
|
2406
|
-
|
|
2407
|
-
|
|
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, {
|
|
2408
2409
|
width: `${v}px`,
|
|
2409
2410
|
height: `${v}px`,
|
|
2410
2411
|
"border-radius": `${_}px`,
|
|
2411
2412
|
"background-color": `rgb(from ${R} r g b / 1)`
|
|
2412
|
-
}), Mn =
|
|
2413
|
-
width: `${
|
|
2414
|
-
height: `${
|
|
2415
|
-
"border-radius": `${
|
|
2413
|
+
}), Mn = rt(Wt, "", Mn, {
|
|
2414
|
+
width: `${Y}px`,
|
|
2415
|
+
height: `${ue}px`,
|
|
2416
|
+
"border-radius": `${de}px`,
|
|
2416
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`
|
|
2417
2422
|
});
|
|
2418
|
-
}),
|
|
2423
|
+
}), Vr(t, tt), on(mi);
|
|
2419
2424
|
}
|
|
2420
|
-
class
|
|
2425
|
+
class ta extends dt {
|
|
2421
2426
|
width;
|
|
2422
2427
|
height;
|
|
2423
2428
|
zoom;
|
|
@@ -2425,32 +2430,32 @@ class ea extends pt {
|
|
|
2425
2430
|
directions;
|
|
2426
2431
|
component;
|
|
2427
2432
|
constructor(e, n, r, i, s, a) {
|
|
2428
|
-
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, {
|
|
2429
2434
|
target: this.marker.div,
|
|
2430
2435
|
props: a
|
|
2431
2436
|
});
|
|
2432
2437
|
}
|
|
2433
2438
|
get zIndex() {
|
|
2434
|
-
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;
|
|
2435
2440
|
}
|
|
2436
2441
|
}
|
|
2437
|
-
class
|
|
2442
|
+
class na extends dt {
|
|
2438
2443
|
width;
|
|
2439
2444
|
height;
|
|
2440
2445
|
padding;
|
|
2441
2446
|
angle;
|
|
2442
2447
|
component;
|
|
2443
2448
|
constructor(e, n, r, i, s, a) {
|
|
2444
|
-
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, {
|
|
2445
2450
|
target: this.marker.div,
|
|
2446
2451
|
props: a
|
|
2447
2452
|
});
|
|
2448
2453
|
}
|
|
2449
2454
|
get zIndex() {
|
|
2450
|
-
return
|
|
2455
|
+
return Cn;
|
|
2451
2456
|
}
|
|
2452
2457
|
}
|
|
2453
|
-
class
|
|
2458
|
+
class ra {
|
|
2454
2459
|
id;
|
|
2455
2460
|
state = void 0;
|
|
2456
2461
|
pin;
|
|
@@ -2458,11 +2463,11 @@ class na {
|
|
|
2458
2463
|
popup;
|
|
2459
2464
|
constructor(e, n) {
|
|
2460
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;
|
|
2461
|
-
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;
|
|
2462
2467
|
}
|
|
2463
2468
|
}
|
|
2464
2469
|
const Zt = 4;
|
|
2465
|
-
class
|
|
2470
|
+
class ia {
|
|
2466
2471
|
// Elements
|
|
2467
2472
|
pins = /* @__PURE__ */ new Set();
|
|
2468
2473
|
// Configuration
|
|
@@ -2491,7 +2496,7 @@ class ra {
|
|
|
2491
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));
|
|
2492
2497
|
}
|
|
2493
2498
|
render(e, n) {
|
|
2494
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2499
|
+
const r = e.zoom, i = n.mapSize, s = lt.offset(e, i, {
|
|
2495
2500
|
top: this.pinMaxHeight,
|
|
2496
2501
|
bottom: this.pinMaxHeight,
|
|
2497
2502
|
right: this.pinMaxWidth,
|
|
@@ -2501,8 +2506,8 @@ class ra {
|
|
|
2501
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());
|
|
2502
2507
|
}
|
|
2503
2508
|
}
|
|
2504
|
-
var
|
|
2505
|
-
class
|
|
2509
|
+
var sa = (t) => 9;
|
|
2510
|
+
class aa {
|
|
2506
2511
|
// Elements
|
|
2507
2512
|
tooltips = /* @__PURE__ */ new Set();
|
|
2508
2513
|
// Configuration
|
|
@@ -2525,7 +2530,7 @@ class sa {
|
|
|
2525
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);
|
|
2526
2531
|
}
|
|
2527
2532
|
render(e, n) {
|
|
2528
|
-
const r = e.zoom, i = n.mapSize, s =
|
|
2533
|
+
const r = e.zoom, i = n.mapSize, s = lt.offset(e, i, {
|
|
2529
2534
|
top: this.tooltipMaxHeight,
|
|
2530
2535
|
bottom: this.tooltipMaxHeight,
|
|
2531
2536
|
right: this.tooltipMaxWidth,
|
|
@@ -2543,7 +2548,7 @@ class sa {
|
|
|
2543
2548
|
a.component.invoke().setDisplayed(!1), a.marker.remove();
|
|
2544
2549
|
}
|
|
2545
2550
|
}
|
|
2546
|
-
class
|
|
2551
|
+
class oa {
|
|
2547
2552
|
// Elements
|
|
2548
2553
|
popups = /* @__PURE__ */ new Set();
|
|
2549
2554
|
// Configuration
|
|
@@ -2562,9 +2567,9 @@ class aa {
|
|
|
2562
2567
|
}
|
|
2563
2568
|
show(e, n) {
|
|
2564
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;
|
|
2565
|
-
const r = e.popup, i = n.getViewport(), s = i.bounds, a = i.zoom, o = n.getParameters().mapSize * Math.pow(2, a), l =
|
|
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;
|
|
2566
2571
|
let K = 0;
|
|
2567
|
-
f < m ? K = (
|
|
2572
|
+
f < m ? K = (de - me) / 2 : (de < 0 && (K = de), me < 0 && (K = -me));
|
|
2568
2573
|
let I = 0;
|
|
2569
2574
|
h < d ? I = (Pe - ie) / 2 : (Pe < 0 && (I = Pe), ie < 0 && (I = -ie)), (K != 0 || I != 0) && n.panBy(K, I);
|
|
2570
2575
|
}
|
|
@@ -2576,14 +2581,14 @@ class aa {
|
|
|
2576
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()));
|
|
2577
2582
|
}
|
|
2578
2583
|
}
|
|
2579
|
-
class
|
|
2584
|
+
class la {
|
|
2580
2585
|
provider;
|
|
2581
2586
|
pinManager;
|
|
2582
2587
|
tooltipManager;
|
|
2583
2588
|
popupManager;
|
|
2584
2589
|
elementsStore;
|
|
2585
2590
|
constructor(e) {
|
|
2586
|
-
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();
|
|
2587
2592
|
}
|
|
2588
2593
|
set configuration(e) {
|
|
2589
2594
|
this.pinManager.configuration = e, this.popupManager.configuration = e;
|
|
@@ -2608,7 +2613,7 @@ class oa {
|
|
|
2608
2613
|
insertElements(e, n) {
|
|
2609
2614
|
for (const r of e) {
|
|
2610
2615
|
let i = this.elementsStore.get(r.properites.id);
|
|
2611
|
-
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);
|
|
2612
2617
|
}
|
|
2613
2618
|
this.pinManager.refresh(), this.tooltipManager.refresh();
|
|
2614
2619
|
}
|
|
@@ -2633,11 +2638,11 @@ class oa {
|
|
|
2633
2638
|
}
|
|
2634
2639
|
//#endregion
|
|
2635
2640
|
}
|
|
2636
|
-
const
|
|
2637
|
-
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) {
|
|
2638
2643
|
let e;
|
|
2639
2644
|
try {
|
|
2640
|
-
if (e =
|
|
2645
|
+
if (e = Kn && (self.URL || self.webkitURL).createObjectURL(Kn), !e) throw "";
|
|
2641
2646
|
const n = new Worker(e, {
|
|
2642
2647
|
name: t?.name
|
|
2643
2648
|
});
|
|
@@ -2646,15 +2651,15 @@ function la(t) {
|
|
|
2646
2651
|
}), n;
|
|
2647
2652
|
} catch {
|
|
2648
2653
|
return new Worker(
|
|
2649
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
2654
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Zr),
|
|
2650
2655
|
{
|
|
2651
2656
|
name: t?.name
|
|
2652
2657
|
}
|
|
2653
2658
|
);
|
|
2654
2659
|
}
|
|
2655
2660
|
}
|
|
2656
|
-
var
|
|
2657
|
-
async function
|
|
2661
|
+
var ca = (t) => new Promise((e) => setTimeout(e, t));
|
|
2662
|
+
async function Yr(t, e) {
|
|
2658
2663
|
let n = 0, r = Math.max(1, e?.retry?.times ?? 1);
|
|
2659
2664
|
for (; n < r; ) try {
|
|
2660
2665
|
return { data: await t(), error: null };
|
|
@@ -2663,34 +2668,34 @@ async function qr(t, e) {
|
|
|
2663
2668
|
if (i instanceof Error)
|
|
2664
2669
|
return (!e?.exceptions || e.exceptions.some((s) => i instanceof s) == !1) && e?.catch?.(i), { data: null, error: i };
|
|
2665
2670
|
throw e?.catch?.(i), i;
|
|
2666
|
-
} else e?.retry?.delay && await
|
|
2671
|
+
} else e?.retry?.delay && await ca(e.retry.delay);
|
|
2667
2672
|
}
|
|
2668
2673
|
throw Error("Unreachable code");
|
|
2669
2674
|
}
|
|
2670
|
-
async function
|
|
2671
|
-
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 } });
|
|
2672
2677
|
if (s.error) throw s.error;
|
|
2673
2678
|
let a = s.data;
|
|
2674
2679
|
if (!a.ok) throw Error(await a.text());
|
|
2675
2680
|
return await a.json();
|
|
2676
2681
|
}
|
|
2677
|
-
async function
|
|
2678
|
-
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 } });
|
|
2679
2684
|
if (s.error) throw s.error;
|
|
2680
2685
|
let a = s.data;
|
|
2681
2686
|
if (!a.ok) throw Error(await a.text());
|
|
2682
2687
|
}
|
|
2683
|
-
const Be = 0xc3a5c85c97cb3127n,
|
|
2688
|
+
const Be = 0xc3a5c85c97cb3127n, ce = 0xb492b66fbe98f273n, He = 0x9ae16a3b2f90404fn, Jr = 0xc949d7c7509e6557n, H = 0xffffffffffffffffn;
|
|
2684
2689
|
function p(t) {
|
|
2685
2690
|
return t & H;
|
|
2686
2691
|
}
|
|
2687
2692
|
function N(t, e) {
|
|
2688
2693
|
return e === 0 ? t & H : (t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H);
|
|
2689
2694
|
}
|
|
2690
|
-
function
|
|
2695
|
+
function pa(t, e) {
|
|
2691
2696
|
return t = t & H, (t >> BigInt(e) | t << BigInt(64 - e)) & H;
|
|
2692
2697
|
}
|
|
2693
|
-
function
|
|
2698
|
+
function ct(t) {
|
|
2694
2699
|
return p(t ^ t >> 47n);
|
|
2695
2700
|
}
|
|
2696
2701
|
function M(t, e = 0) {
|
|
@@ -2699,13 +2704,13 @@ function M(t, e = 0) {
|
|
|
2699
2704
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2700
2705
|
return n & H;
|
|
2701
2706
|
}
|
|
2702
|
-
function
|
|
2707
|
+
function Gn(t, e = 0) {
|
|
2703
2708
|
let n = 0n;
|
|
2704
2709
|
for (let r = 0; r < 4; r++)
|
|
2705
2710
|
e + r < t.length && (n |= BigInt(t[e + r]) << BigInt(r * 8));
|
|
2706
2711
|
return n & 0xffffffffn;
|
|
2707
2712
|
}
|
|
2708
|
-
function
|
|
2713
|
+
function da(t) {
|
|
2709
2714
|
const e = 0x9ddfea08eb382d69n;
|
|
2710
2715
|
let n = (t.first ^ t.second) * e & H;
|
|
2711
2716
|
n ^= n >> 47n, n = n & H;
|
|
@@ -2713,37 +2718,37 @@ function pa(t) {
|
|
|
2713
2718
|
return r ^= r >> 47n, r = r * e & H, r;
|
|
2714
2719
|
}
|
|
2715
2720
|
function qe(t, e) {
|
|
2716
|
-
return
|
|
2721
|
+
return da({ first: t, second: e });
|
|
2717
2722
|
}
|
|
2718
|
-
function
|
|
2723
|
+
function ma(t) {
|
|
2719
2724
|
const e = t.length;
|
|
2720
2725
|
if (e > 8) {
|
|
2721
2726
|
const n = M(t), r = M(t, e - 8);
|
|
2722
|
-
return (qe(n,
|
|
2727
|
+
return (qe(n, pa(r + BigInt(e) & H, e)) ^ r) & H;
|
|
2723
2728
|
}
|
|
2724
2729
|
if (e >= 4) {
|
|
2725
|
-
const n =
|
|
2726
|
-
return qe(BigInt(e) + (n << 3n) & H,
|
|
2730
|
+
const n = Gn(t);
|
|
2731
|
+
return qe(BigInt(e) + (n << 3n) & H, Gn(t, e - 4));
|
|
2727
2732
|
}
|
|
2728
2733
|
if (e > 0) {
|
|
2729
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));
|
|
2730
|
-
return p(
|
|
2735
|
+
return p(ct(p(s * He) ^ p(a * Jr)) * He);
|
|
2731
2736
|
}
|
|
2732
2737
|
return He;
|
|
2733
2738
|
}
|
|
2734
|
-
function
|
|
2735
|
-
const e = t.length, n = p(M(t) *
|
|
2736
|
-
return qe(p(N(p(n - r), 43) + N(i, 30) + s), p(n + N(r ^
|
|
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)));
|
|
2737
2742
|
}
|
|
2738
|
-
function
|
|
2743
|
+
function ga(t, e, n, r, i, s) {
|
|
2739
2744
|
i = p(i + t), s = N(p(s + i + r), 21);
|
|
2740
2745
|
const a = i;
|
|
2741
2746
|
return i = p(i + e), i = p(i + n), s = p(s + N(i, 44)), { first: p(i + r), second: p(s + a) };
|
|
2742
2747
|
}
|
|
2743
|
-
function
|
|
2744
|
-
return
|
|
2748
|
+
function Et(t, e, n, r) {
|
|
2749
|
+
return ga(M(t, e), M(t, e + 8), M(t, e + 16), M(t, e + 24), n, r);
|
|
2745
2750
|
}
|
|
2746
|
-
function
|
|
2751
|
+
function wa(t) {
|
|
2747
2752
|
const e = t.length, n = M(t, 24);
|
|
2748
2753
|
let r = p(M(t) + p((BigInt(e) + M(t, e - 16)) * Be)), i = N(p(r + n), 52), s = N(r, 37);
|
|
2749
2754
|
r = p(r + M(t, 8)), s = p(s + N(r, 7)), r = p(r + M(t, 16));
|
|
@@ -2751,30 +2756,30 @@ function ga(t) {
|
|
|
2751
2756
|
r = p(M(t, 16) + M(t, e - 32));
|
|
2752
2757
|
const o = M(t, e - 8);
|
|
2753
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));
|
|
2754
|
-
const l = p(r + o), c = p(i + N(r, 31) + s), f =
|
|
2755
|
-
return p(
|
|
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);
|
|
2756
2761
|
}
|
|
2757
|
-
function
|
|
2762
|
+
function ka(t) {
|
|
2758
2763
|
let e;
|
|
2759
2764
|
typeof t == "string" ? e = new TextEncoder().encode(t) : e = t;
|
|
2760
2765
|
const n = e.length;
|
|
2761
2766
|
if (n <= 32)
|
|
2762
|
-
return n <= 16 ?
|
|
2767
|
+
return n <= 16 ? ma(e) : va(e);
|
|
2763
2768
|
if (n <= 64)
|
|
2764
|
-
return
|
|
2765
|
-
let r = M(e), i = p(M(e, n - 16) ^
|
|
2766
|
-
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);
|
|
2767
2772
|
let o = n - 1 & -64, l = 0;
|
|
2768
2773
|
for (; o > 0; )
|
|
2769
|
-
r = p(N(p(r + i + a.first + M(e, l + 16)), 37) *
|
|
2770
|
-
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);
|
|
2771
2776
|
}
|
|
2772
|
-
function
|
|
2773
|
-
return
|
|
2777
|
+
function ya(t) {
|
|
2778
|
+
return ka(JSON.stringify(t)).toString();
|
|
2774
2779
|
}
|
|
2775
2780
|
let Yt;
|
|
2776
2781
|
// @__NO_SIDE_EFFECTS__
|
|
2777
|
-
function
|
|
2782
|
+
function Xr(t) {
|
|
2778
2783
|
return {
|
|
2779
2784
|
lang: Yt?.lang,
|
|
2780
2785
|
message: t?.message,
|
|
@@ -2782,20 +2787,20 @@ function Yr(t) {
|
|
|
2782
2787
|
abortPipeEarly: Yt?.abortPipeEarly
|
|
2783
2788
|
};
|
|
2784
2789
|
}
|
|
2785
|
-
let
|
|
2790
|
+
let ba;
|
|
2786
2791
|
// @__NO_SIDE_EFFECTS__
|
|
2787
|
-
function
|
|
2788
|
-
return
|
|
2792
|
+
function _a(t) {
|
|
2793
|
+
return ba?.get(t);
|
|
2789
2794
|
}
|
|
2790
|
-
let
|
|
2795
|
+
let Ma;
|
|
2791
2796
|
// @__NO_SIDE_EFFECTS__
|
|
2792
|
-
function
|
|
2793
|
-
return
|
|
2797
|
+
function Ea(t) {
|
|
2798
|
+
return Ma?.get(t);
|
|
2794
2799
|
}
|
|
2795
|
-
let
|
|
2800
|
+
let xa;
|
|
2796
2801
|
// @__NO_SIDE_EFFECTS__
|
|
2797
|
-
function
|
|
2798
|
-
return
|
|
2802
|
+
function Sa(t, e) {
|
|
2803
|
+
return xa?.get(t)?.get(e);
|
|
2799
2804
|
}
|
|
2800
2805
|
// @__NO_SIDE_EFFECTS__
|
|
2801
2806
|
function Qe(t) {
|
|
@@ -2816,21 +2821,21 @@ function C(t, e, n, r, i) {
|
|
|
2816
2821
|
lang: r.lang,
|
|
2817
2822
|
abortEarly: r.abortEarly,
|
|
2818
2823
|
abortPipeEarly: r.abortPipeEarly
|
|
2819
|
-
}, 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);
|
|
2820
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];
|
|
2821
2826
|
}
|
|
2822
2827
|
// @__NO_SIDE_EFFECTS__
|
|
2823
|
-
function
|
|
2828
|
+
function X(t) {
|
|
2824
2829
|
return {
|
|
2825
2830
|
version: 1,
|
|
2826
2831
|
vendor: "valibot",
|
|
2827
2832
|
validate(e) {
|
|
2828
|
-
return t["~run"]({ value: e }, /* @__PURE__ */
|
|
2833
|
+
return t["~run"]({ value: e }, /* @__PURE__ */ Xr());
|
|
2829
2834
|
}
|
|
2830
2835
|
};
|
|
2831
2836
|
}
|
|
2832
2837
|
// @__NO_SIDE_EFFECTS__
|
|
2833
|
-
function
|
|
2838
|
+
function Pa(t, e) {
|
|
2834
2839
|
const n = [...new Set(t)];
|
|
2835
2840
|
return n.length > 1 ? `(${n.join(` ${e} `)})` : n[0] ?? "never";
|
|
2836
2841
|
}
|
|
@@ -2863,11 +2868,11 @@ function L(t) {
|
|
|
2863
2868
|
};
|
|
2864
2869
|
}
|
|
2865
2870
|
// @__NO_SIDE_EFFECTS__
|
|
2866
|
-
function
|
|
2871
|
+
function Kr(t, e) {
|
|
2867
2872
|
return {
|
|
2868
2873
|
kind: "validation",
|
|
2869
2874
|
type: "check",
|
|
2870
|
-
reference:
|
|
2875
|
+
reference: Kr,
|
|
2871
2876
|
async: !1,
|
|
2872
2877
|
expects: null,
|
|
2873
2878
|
requirement: t,
|
|
@@ -2878,11 +2883,11 @@ function Jr(t, e) {
|
|
|
2878
2883
|
};
|
|
2879
2884
|
}
|
|
2880
2885
|
// @__NO_SIDE_EFFECTS__
|
|
2881
|
-
function
|
|
2886
|
+
function Gr(t, e) {
|
|
2882
2887
|
return {
|
|
2883
2888
|
kind: "validation",
|
|
2884
2889
|
type: "length",
|
|
2885
|
-
reference:
|
|
2890
|
+
reference: Gr,
|
|
2886
2891
|
async: !1,
|
|
2887
2892
|
expects: `${t}`,
|
|
2888
2893
|
requirement: t,
|
|
@@ -2893,11 +2898,11 @@ function Xr(t, e) {
|
|
|
2893
2898
|
};
|
|
2894
2899
|
}
|
|
2895
2900
|
// @__NO_SIDE_EFFECTS__
|
|
2896
|
-
function
|
|
2901
|
+
function ft(t, e) {
|
|
2897
2902
|
return {
|
|
2898
2903
|
kind: "validation",
|
|
2899
2904
|
type: "max_value",
|
|
2900
|
-
reference:
|
|
2905
|
+
reference: ft,
|
|
2901
2906
|
async: !1,
|
|
2902
2907
|
expects: `<=${t instanceof Date ? t.toJSON() : /* @__PURE__ */ Qe(t)}`,
|
|
2903
2908
|
requirement: t,
|
|
@@ -2956,25 +2961,25 @@ function V(t) {
|
|
|
2956
2961
|
};
|
|
2957
2962
|
}
|
|
2958
2963
|
// @__NO_SIDE_EFFECTS__
|
|
2959
|
-
function
|
|
2964
|
+
function Ta(t, e, n) {
|
|
2960
2965
|
return typeof t.fallback == "function" ? t.fallback(e, n) : t.fallback;
|
|
2961
2966
|
}
|
|
2962
2967
|
// @__NO_SIDE_EFFECTS__
|
|
2963
|
-
function
|
|
2968
|
+
function Qr(t, e, n) {
|
|
2964
2969
|
return typeof t.default == "function" ? t.default(e, n) : t.default;
|
|
2965
2970
|
}
|
|
2966
2971
|
// @__NO_SIDE_EFFECTS__
|
|
2967
|
-
function
|
|
2972
|
+
function ei(t, e) {
|
|
2968
2973
|
return {
|
|
2969
2974
|
kind: "schema",
|
|
2970
2975
|
type: "array",
|
|
2971
|
-
reference:
|
|
2976
|
+
reference: ei,
|
|
2972
2977
|
expects: "Array",
|
|
2973
2978
|
async: !1,
|
|
2974
2979
|
item: t,
|
|
2975
2980
|
message: e,
|
|
2976
2981
|
get "~standard"() {
|
|
2977
|
-
return /* @__PURE__ */
|
|
2982
|
+
return /* @__PURE__ */ X(this);
|
|
2978
2983
|
},
|
|
2979
2984
|
"~run"(n, r) {
|
|
2980
2985
|
const i = n.value;
|
|
@@ -3005,16 +3010,16 @@ function Gr(t, e) {
|
|
|
3005
3010
|
};
|
|
3006
3011
|
}
|
|
3007
3012
|
// @__NO_SIDE_EFFECTS__
|
|
3008
|
-
function
|
|
3013
|
+
function ti(t) {
|
|
3009
3014
|
return {
|
|
3010
3015
|
kind: "schema",
|
|
3011
3016
|
type: "boolean",
|
|
3012
|
-
reference:
|
|
3017
|
+
reference: ti,
|
|
3013
3018
|
expects: "boolean",
|
|
3014
3019
|
async: !1,
|
|
3015
3020
|
message: t,
|
|
3016
3021
|
get "~standard"() {
|
|
3017
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ X(this);
|
|
3018
3023
|
},
|
|
3019
3024
|
"~run"(e, n) {
|
|
3020
3025
|
return typeof e.value == "boolean" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
@@ -3022,17 +3027,17 @@ function Qr(t) {
|
|
|
3022
3027
|
};
|
|
3023
3028
|
}
|
|
3024
3029
|
// @__NO_SIDE_EFFECTS__
|
|
3025
|
-
function
|
|
3030
|
+
function ni(t, e) {
|
|
3026
3031
|
return {
|
|
3027
3032
|
kind: "schema",
|
|
3028
3033
|
type: "custom",
|
|
3029
|
-
reference:
|
|
3034
|
+
reference: ni,
|
|
3030
3035
|
expects: "unknown",
|
|
3031
3036
|
async: !1,
|
|
3032
3037
|
check: t,
|
|
3033
3038
|
message: e,
|
|
3034
3039
|
get "~standard"() {
|
|
3035
|
-
return /* @__PURE__ */
|
|
3040
|
+
return /* @__PURE__ */ X(this);
|
|
3036
3041
|
},
|
|
3037
3042
|
"~run"(n, r) {
|
|
3038
3043
|
return this.check(n.value) ? n.typed = !0 : C(this, "type", n, r), n;
|
|
@@ -3049,7 +3054,7 @@ function A(t) {
|
|
|
3049
3054
|
async: !1,
|
|
3050
3055
|
message: t,
|
|
3051
3056
|
get "~standard"() {
|
|
3052
|
-
return /* @__PURE__ */
|
|
3057
|
+
return /* @__PURE__ */ X(this);
|
|
3053
3058
|
},
|
|
3054
3059
|
"~run"(e, n) {
|
|
3055
3060
|
return typeof e.value == "function" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
@@ -3067,7 +3072,7 @@ function ze(t, e) {
|
|
|
3067
3072
|
literal: t,
|
|
3068
3073
|
message: e,
|
|
3069
3074
|
get "~standard"() {
|
|
3070
|
-
return /* @__PURE__ */
|
|
3075
|
+
return /* @__PURE__ */ X(this);
|
|
3071
3076
|
},
|
|
3072
3077
|
"~run"(n, r) {
|
|
3073
3078
|
return n.value === this.literal ? n.typed = !0 : C(this, "type", n, r), n;
|
|
@@ -3084,7 +3089,7 @@ function P(t) {
|
|
|
3084
3089
|
async: !1,
|
|
3085
3090
|
message: t,
|
|
3086
3091
|
get "~standard"() {
|
|
3087
|
-
return /* @__PURE__ */
|
|
3092
|
+
return /* @__PURE__ */ X(this);
|
|
3088
3093
|
},
|
|
3089
3094
|
"~run"(e, n) {
|
|
3090
3095
|
return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : C(this, "type", e, n), e;
|
|
@@ -3102,7 +3107,7 @@ function q(t, e) {
|
|
|
3102
3107
|
entries: t,
|
|
3103
3108
|
message: e,
|
|
3104
3109
|
get "~standard"() {
|
|
3105
|
-
return /* @__PURE__ */
|
|
3110
|
+
return /* @__PURE__ */ X(this);
|
|
3106
3111
|
},
|
|
3107
3112
|
"~run"(n, r) {
|
|
3108
3113
|
const i = n.value;
|
|
@@ -3111,7 +3116,7 @@ function q(t, e) {
|
|
|
3111
3116
|
for (const s in this.entries) {
|
|
3112
3117
|
const a = this.entries[s];
|
|
3113
3118
|
if (s in i || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
3114
|
-
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);
|
|
3115
3120
|
if (o.issues) {
|
|
3116
3121
|
const l = {
|
|
3117
3122
|
type: "object",
|
|
@@ -3128,7 +3133,7 @@ function q(t, e) {
|
|
|
3128
3133
|
}
|
|
3129
3134
|
}
|
|
3130
3135
|
o.typed || (n.typed = !1), n.value[s] = o.value;
|
|
3131
|
-
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */
|
|
3136
|
+
} else if (a.fallback !== void 0) n.value[s] = /* @__PURE__ */ Ta(a);
|
|
3132
3137
|
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (C(this, "key", n, r, {
|
|
3133
3138
|
input: void 0,
|
|
3134
3139
|
expected: `"${s}"`,
|
|
@@ -3158,24 +3163,24 @@ function T(t, e) {
|
|
|
3158
3163
|
wrapped: t,
|
|
3159
3164
|
default: e,
|
|
3160
3165
|
get "~standard"() {
|
|
3161
|
-
return /* @__PURE__ */
|
|
3166
|
+
return /* @__PURE__ */ X(this);
|
|
3162
3167
|
},
|
|
3163
3168
|
"~run"(n, r) {
|
|
3164
|
-
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);
|
|
3165
3170
|
}
|
|
3166
3171
|
};
|
|
3167
3172
|
}
|
|
3168
3173
|
// @__NO_SIDE_EFFECTS__
|
|
3169
|
-
function
|
|
3174
|
+
function ge(t) {
|
|
3170
3175
|
return {
|
|
3171
3176
|
kind: "schema",
|
|
3172
3177
|
type: "string",
|
|
3173
|
-
reference:
|
|
3178
|
+
reference: ge,
|
|
3174
3179
|
expects: "string",
|
|
3175
3180
|
async: !1,
|
|
3176
3181
|
message: t,
|
|
3177
3182
|
get "~standard"() {
|
|
3178
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ X(this);
|
|
3179
3184
|
},
|
|
3180
3185
|
"~run"(e, n) {
|
|
3181
3186
|
return typeof e.value == "string" ? e.typed = !0 : C(this, "type", e, n), e;
|
|
@@ -3193,7 +3198,7 @@ function F(t, e) {
|
|
|
3193
3198
|
items: t,
|
|
3194
3199
|
message: e,
|
|
3195
3200
|
get "~standard"() {
|
|
3196
|
-
return /* @__PURE__ */
|
|
3201
|
+
return /* @__PURE__ */ X(this);
|
|
3197
3202
|
},
|
|
3198
3203
|
"~run"(n, r) {
|
|
3199
3204
|
const i = n.value;
|
|
@@ -3224,7 +3229,7 @@ function F(t, e) {
|
|
|
3224
3229
|
};
|
|
3225
3230
|
}
|
|
3226
3231
|
// @__NO_SIDE_EFFECTS__
|
|
3227
|
-
function
|
|
3232
|
+
function Qn(t) {
|
|
3228
3233
|
let e;
|
|
3229
3234
|
if (t) for (const n of t) e ? e.push(...n.issues) : e = n.issues;
|
|
3230
3235
|
return e;
|
|
@@ -3235,12 +3240,12 @@ function wn(t, e) {
|
|
|
3235
3240
|
kind: "schema",
|
|
3236
3241
|
type: "union",
|
|
3237
3242
|
reference: wn,
|
|
3238
|
-
expects: /* @__PURE__ */
|
|
3243
|
+
expects: /* @__PURE__ */ Pa(t.map((n) => n.expects), "|"),
|
|
3239
3244
|
async: !1,
|
|
3240
3245
|
options: t,
|
|
3241
3246
|
message: e,
|
|
3242
3247
|
get "~standard"() {
|
|
3243
|
-
return /* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ X(this);
|
|
3244
3249
|
},
|
|
3245
3250
|
"~run"(n, r) {
|
|
3246
3251
|
let i, s, a;
|
|
@@ -3256,10 +3261,10 @@ function wn(t, e) {
|
|
|
3256
3261
|
if (i) return i;
|
|
3257
3262
|
if (s) {
|
|
3258
3263
|
if (s.length === 1) return s[0];
|
|
3259
|
-
C(this, "type", n, r, { issues: /* @__PURE__ */
|
|
3264
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ Qn(s) }), n.typed = !0;
|
|
3260
3265
|
} else {
|
|
3261
3266
|
if (a?.length === 1) return a[0];
|
|
3262
|
-
C(this, "type", n, r, { issues: /* @__PURE__ */
|
|
3267
|
+
C(this, "type", n, r, { issues: /* @__PURE__ */ Qn(a) });
|
|
3263
3268
|
}
|
|
3264
3269
|
return n;
|
|
3265
3270
|
}
|
|
@@ -3275,15 +3280,15 @@ function Oe(t) {
|
|
|
3275
3280
|
async: !1,
|
|
3276
3281
|
message: t,
|
|
3277
3282
|
get "~standard"() {
|
|
3278
|
-
return /* @__PURE__ */
|
|
3283
|
+
return /* @__PURE__ */ X(this);
|
|
3279
3284
|
},
|
|
3280
3285
|
"~run"(e, n) {
|
|
3281
3286
|
return e.value === void 0 ? e.typed = !0 : C(this, "type", e, n), e;
|
|
3282
3287
|
}
|
|
3283
3288
|
};
|
|
3284
3289
|
}
|
|
3285
|
-
function
|
|
3286
|
-
const r = t["~run"]({ value: e }, /* @__PURE__ */
|
|
3290
|
+
function xt(t, e, n) {
|
|
3291
|
+
const r = t["~run"]({ value: e }, /* @__PURE__ */ Xr(n));
|
|
3287
3292
|
if (r.issues) throw new vn(r.issues);
|
|
3288
3293
|
return r.value;
|
|
3289
3294
|
}
|
|
@@ -3293,7 +3298,7 @@ function w(...t) {
|
|
|
3293
3298
|
...t[0],
|
|
3294
3299
|
pipe: t,
|
|
3295
3300
|
get "~standard"() {
|
|
3296
|
-
return /* @__PURE__ */
|
|
3301
|
+
return /* @__PURE__ */ X(this);
|
|
3297
3302
|
},
|
|
3298
3303
|
"~run"(e, n) {
|
|
3299
3304
|
for (const r of t) if (r.kind !== "metadata") {
|
|
@@ -3307,16 +3312,16 @@ function w(...t) {
|
|
|
3307
3312
|
}
|
|
3308
3313
|
};
|
|
3309
3314
|
}
|
|
3310
|
-
var
|
|
3311
|
-
const
|
|
3312
|
-
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 {
|
|
3313
3318
|
apiKey;
|
|
3314
3319
|
apiJwt;
|
|
3315
3320
|
markerStatesStore;
|
|
3316
3321
|
markerStatesWorker;
|
|
3317
3322
|
markerStatesWorkerClient;
|
|
3318
3323
|
constructor(e, n) {
|
|
3319
|
-
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);
|
|
3320
3325
|
}
|
|
3321
3326
|
clearStates() {
|
|
3322
3327
|
this.markerStatesStore.clear();
|
|
@@ -3330,7 +3335,7 @@ class La {
|
|
|
3330
3335
|
async updateStates(e, n) {
|
|
3331
3336
|
if (e.length == 0) return;
|
|
3332
3337
|
e.sort((a, u) => a.properites.id.localeCompare(u.properites.id));
|
|
3333
|
-
const r = e.map((a) => a.input), i =
|
|
3338
|
+
const r = e.map((a) => a.input), i = ya(r);
|
|
3334
3339
|
let s = this.markerStatesStore.get(i);
|
|
3335
3340
|
s == null && (s = await this.fetchStates(r, n), this.markerStatesStore.set(i, s));
|
|
3336
3341
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -3340,19 +3345,19 @@ class La {
|
|
|
3340
3345
|
}
|
|
3341
3346
|
async fetchStates(e, n) {
|
|
3342
3347
|
if (e.length == 0) return [];
|
|
3343
|
-
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle:
|
|
3348
|
+
if (e.length == 1) return [{ zoom: 0, directions: [{ zoom: 0, angle: sa() }] }];
|
|
3344
3349
|
const r = {
|
|
3345
3350
|
key: this.apiKey,
|
|
3346
3351
|
jwt: this.apiJwt,
|
|
3347
|
-
version:
|
|
3352
|
+
version: La,
|
|
3348
3353
|
input: e,
|
|
3349
3354
|
parameters: n
|
|
3350
3355
|
}, i = await this.markerStatesWorkerClient.invoke("fetch", r);
|
|
3351
3356
|
return i.jwt && (this.apiJwt = i.jwt), i.states;
|
|
3352
3357
|
}
|
|
3353
3358
|
}
|
|
3354
|
-
const
|
|
3355
|
-
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 {
|
|
3356
3361
|
apiKey;
|
|
3357
3362
|
mapProvider;
|
|
3358
3363
|
mapStateProvider;
|
|
@@ -3363,26 +3368,26 @@ class ii {
|
|
|
3363
3368
|
markerVisibilityProcessor;
|
|
3364
3369
|
markerElementsProcessor;
|
|
3365
3370
|
markerStateProcessor;
|
|
3366
|
-
markerStatesProcessDelay =
|
|
3371
|
+
markerStatesProcessDelay = rr;
|
|
3367
3372
|
markerStatesProcessTimeout = void 0;
|
|
3368
3373
|
constructor(e, n, r, i) {
|
|
3369
|
-
|
|
3374
|
+
xt(za, e), xt(Oa, n), xt(Ca, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new Ei(
|
|
3370
3375
|
this.mapProvider,
|
|
3371
3376
|
this.detached.bind(this),
|
|
3372
3377
|
this.error.bind(this),
|
|
3373
3378
|
this.onMapMove.bind(this),
|
|
3374
3379
|
this.onMapIdle.bind(this),
|
|
3375
3380
|
this.onMapClick.bind(this)
|
|
3376
|
-
), 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;
|
|
3377
3382
|
}
|
|
3378
3383
|
//#region Core
|
|
3379
3384
|
static async create(e, n, r) {
|
|
3380
|
-
let a = (await
|
|
3385
|
+
let a = (await fa($a, { key: e, version: nr })).jwt;
|
|
3381
3386
|
if (!a) throw new Error("Failed to get api jwt");
|
|
3382
|
-
return new
|
|
3387
|
+
return new ai(e, a, n, r);
|
|
3383
3388
|
}
|
|
3384
3389
|
set configuration(e) {
|
|
3385
|
-
this.markerStatesProcessDelay = e?.process?.states?.delay ??
|
|
3390
|
+
this.markerStatesProcessDelay = e?.process?.states?.delay ?? rr, this.markerVisibilityManager.configuration = e, this.markerElementsManager.configuration = e;
|
|
3386
3391
|
}
|
|
3387
3392
|
clear() {
|
|
3388
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();
|
|
@@ -3411,7 +3416,7 @@ class ii {
|
|
|
3411
3416
|
title: n,
|
|
3412
3417
|
level: e,
|
|
3413
3418
|
content: {
|
|
3414
|
-
version:
|
|
3419
|
+
version: nr,
|
|
3415
3420
|
key: this.apiKey,
|
|
3416
3421
|
name: r.name,
|
|
3417
3422
|
message: r.message,
|
|
@@ -3419,7 +3424,7 @@ class ii {
|
|
|
3419
3424
|
stack: r.stack
|
|
3420
3425
|
}
|
|
3421
3426
|
};
|
|
3422
|
-
await
|
|
3427
|
+
await ha(Va, i);
|
|
3423
3428
|
} catch (i) {
|
|
3424
3429
|
console.error(i);
|
|
3425
3430
|
}
|
|
@@ -3487,12 +3492,12 @@ class ii {
|
|
|
3487
3492
|
if (l) return l;
|
|
3488
3493
|
if (o) {
|
|
3489
3494
|
const c = s(o), f = c.width, h = c.height;
|
|
3490
|
-
return { width: f, height: h, padding:
|
|
3495
|
+
return { width: f, height: h, padding: Dn };
|
|
3491
3496
|
} else
|
|
3492
|
-
return { width:
|
|
3497
|
+
return { width: Rn, height: Rn, padding: Dn };
|
|
3493
3498
|
}, u = (o, l) => {
|
|
3494
3499
|
if (l) return l;
|
|
3495
|
-
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);
|
|
3496
3501
|
return { width: f, height: h, padding: m };
|
|
3497
3502
|
};
|
|
3498
3503
|
for (const o of r) {
|
|
@@ -3517,13 +3522,13 @@ class ii {
|
|
|
3517
3522
|
style: o.popup.style,
|
|
3518
3523
|
dimensions: u(o.popup.element, o.popup.dimensions)
|
|
3519
3524
|
});
|
|
3520
|
-
const _ = new
|
|
3525
|
+
const _ = new bi(l, c, f, h, m, d, v);
|
|
3521
3526
|
n.push(_);
|
|
3522
3527
|
}
|
|
3523
3528
|
return n.forEach((o) => this.markers.set(o.properites.id, o)), n.sort((o, l) => l.properites.rank - o.properites.rank), n;
|
|
3524
3529
|
}
|
|
3525
3530
|
async updateMarkers(e) {
|
|
3526
|
-
|
|
3531
|
+
xt(/* @__PURE__ */ ei(Da), e);
|
|
3527
3532
|
try {
|
|
3528
3533
|
const n = this.mapProvider.getParameters(), r = this.getMarkers(e);
|
|
3529
3534
|
await this.markerVisibilityManager.updateMarkers(n, r), this.mapStateProvider.start(), this.markerVisibilityProcessor.run();
|
|
@@ -3563,5 +3568,5 @@ class ii {
|
|
|
3563
3568
|
//#endregion
|
|
3564
3569
|
}
|
|
3565
3570
|
export {
|
|
3566
|
-
|
|
3571
|
+
ai as MapManager
|
|
3567
3572
|
};
|