@arenarium/maps 1.2.21 → 1.2.22
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 +187 -192
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -7,8 +7,8 @@ class Bt {
|
|
|
7
7
|
timeout;
|
|
8
8
|
callback;
|
|
9
9
|
constructor(e, n, r) {
|
|
10
|
-
if ((n ?? 0) < 0) throw new Error("
|
|
11
|
-
if ((r ?? 0) < 0) throw new Error("
|
|
10
|
+
if ((n ?? 0) < 0) throw new Error("Invalid lifespan");
|
|
11
|
+
if ((r ?? 0) < 0) throw new Error("Invalid interval");
|
|
12
12
|
const s = navigator?.hardwareConcurrency ? 200 / navigator.hardwareConcurrency : 100;
|
|
13
13
|
this.interval = r ?? s;
|
|
14
14
|
const i = this.interval;
|
|
@@ -57,12 +57,12 @@ class gs {
|
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
class
|
|
60
|
+
class ws {
|
|
61
61
|
callback;
|
|
62
62
|
timeout;
|
|
63
63
|
id;
|
|
64
64
|
constructor(e, n) {
|
|
65
|
-
if (n <= 0) throw new Error("
|
|
65
|
+
if (n <= 0) throw new Error("Invalid timeout");
|
|
66
66
|
this.callback = e, this.timeout = n;
|
|
67
67
|
}
|
|
68
68
|
start() {
|
|
@@ -72,7 +72,7 @@ class ys {
|
|
|
72
72
|
this.id != null && (window.clearInterval(this.id), this.id = void 0);
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const ys = 100;
|
|
76
76
|
class ks {
|
|
77
77
|
viewport = void 0;
|
|
78
78
|
state = "idle";
|
|
@@ -84,7 +84,7 @@ class ks {
|
|
|
84
84
|
onIdle;
|
|
85
85
|
onClick;
|
|
86
86
|
constructor(e, n, r, s, i, a) {
|
|
87
|
-
this.provider = e, this.interval = new
|
|
87
|
+
this.provider = e, this.interval = new ws(this.onInterval.bind(this), ys / (navigator?.hardwareConcurrency ?? 1)), this.onCancel = n, this.onError = r, this.onMove = s, this.onIdle = i, this.onClick = a;
|
|
88
88
|
}
|
|
89
89
|
start() {
|
|
90
90
|
this.interval.start(), this.provider.getContainer().addEventListener("click", this.onClick.bind(this));
|
|
@@ -111,6 +111,7 @@ class ks {
|
|
|
111
111
|
class Jn {
|
|
112
112
|
worker;
|
|
113
113
|
workerInvocations;
|
|
114
|
+
workerInvocationCounter = 0;
|
|
114
115
|
constructor(e) {
|
|
115
116
|
this.worker = e, this.workerInvocations = /* @__PURE__ */ new Map(), this.worker.onmessage = this.onmessage.bind(this), this.worker.onerror = this.onerror.bind(this);
|
|
116
117
|
}
|
|
@@ -124,12 +125,12 @@ class Jn {
|
|
|
124
125
|
}
|
|
125
126
|
invoke(e, ...n) {
|
|
126
127
|
return new Promise((r, s) => {
|
|
127
|
-
const i =
|
|
128
|
+
const i = `${e.toString()}_${this.workerInvocationCounter++}_${performance.now()}`, a = { id: i, method: e.toString(), args: n };
|
|
128
129
|
this.workerInvocations.set(i, { resolve: r, reject: s }), this.worker.postMessage(a);
|
|
129
130
|
});
|
|
130
131
|
}
|
|
131
132
|
terminate() {
|
|
132
|
-
this.workerInvocations.forEach((e) => e.reject(new Error("Terminated
|
|
133
|
+
this.workerInvocations.forEach((e) => e.reject(new Error("Terminated"))), this.workerInvocations.clear(), this.worker.terminate();
|
|
133
134
|
}
|
|
134
135
|
}
|
|
135
136
|
class Be {
|
|
@@ -146,7 +147,7 @@ class Be {
|
|
|
146
147
|
return new Be([], []);
|
|
147
148
|
}
|
|
148
149
|
}
|
|
149
|
-
const Gn = '(function(){"use strict";function
|
|
150
|
+
const Gn = '(function(){"use strict";function w(l,t,e){return{x:T(t)*e,y:I(l)*e}}function m(l,t,e){return{lat:R(t/e),lng:P(l/e)}}function T(l){return(180+l)/360}function I(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function P(l){return l*360-180}function R(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}class c{sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);if(s<e)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s}}contains(t,e){return!(t<this.sw.lat||this.ne.lat<t||e<this.sw.lng||this.ne.lng<e)}intersects(t){return!(t.ne.lat<this.sw.lat||this.ne.lat<t.sw.lat||t.ne.lng<this.sw.lng||this.ne.lng<t.sw.lng)}}class h{blockL;blockR;sw;ne;constructor(t,e,n,s){if(n<t)throw new Error(`Invalid bounds: ${t}, ${e}, ${n}, ${s}`);this.sw={lat:t,lng:e},this.ne={lat:n,lng:s},e<s?(this.blockL=new c(t,e,n,s),this.blockR=new c(0,0,0,0)):(this.blockL=new c(t,-180,n,s),this.blockR=new c(t,e,n,180))}static bounds(t){const e=t.bounds,n=t.center;return e.sw.lng<=n.lng&&e.ne.lng<=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.sw.lng>=n.lng&&e.ne.lng>=n.lng?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:Math.abs(e.ne.lng-n.lng)+Math.abs(e.sw.lng-n.lng)>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:e.ne.lng-e.sw.lng>360?{sw:{lat:e.sw.lat,lng:-180},ne:{lat:e.ne.lat,lng:180}}:t.bounds}static create(t){const e=this.bounds(t),n=e.sw,s=e.ne;return new h(n.lat,n.lng,s.lat,s.lng)}static offset(t,e,n){const s=this.bounds(t),r=t.zoom,o=e*Math.pow(2,r),i=w(s.sw.lat,s.sw.lng,o),a=w(s.ne.lat,s.ne.lng,o);let g=Math.max(i.x-n.left,0),f=Math.min(i.y+n.bottom,o),D=Math.min(a.x+n.right,o),N=Math.max(a.y-n.top,0);const z=m(g,f,o),C=m(D,N,o);return new h(z.lat,z.lng,C.lat,C.lng)}contains(t,e){return this.blockL.contains(t,e)||this.blockR.contains(t,e)}intersects(t){return this.blockL.intersects(t)||this.blockR.intersects(t)}}class S{id;bounds;markers;constructor(t,e){this.id=t,this.bounds=e,this.markers=[]}belongs(t){const e=this.bounds.sw;if(t.lat<e.lat||t.lng<e.lng)return!1;const n=this.bounds.ne;return!(n.lat<t.lat||n.lng<t.lng)}neighbours(t,e){const n=Math.abs(t.id.length-this.id.length);if(n>e)return!1;const s=Math.min(this.id.length,t.id.length)-e+n;for(let r=0;r<s;r++)if(this.id[r]!=t.id[r])return!1;return!0}}class u{tree;zoom;cell;branches;constructor(t,e,n,s){this.tree=t,this.zoom=n,this.cell=new S(e,s),this.branches=new Array}split(){const t=this.cell.bounds,e=Math.pow(2,this.tree.depth),n=(t.ne.lat-t.sw.lat)/e,s=(t.ne.lng-t.sw.lng)/e;for(let r=0;r<e;r++)for(let o=0;o<e;o++){const i=t.sw.lat+r*n,a=t.sw.lng+o*s,g=i+n,f=a+s;this.branches.push(new u(this.tree,`${this.cell.id}${r*2+o}`,this.zoom+this.tree.depth,{sw:{lat:i,lng:a},ne:{lat:g,lng:f}}))}}add(t){if(this.cell.belongs(t)==!1)return!1;if(this.cell.markers.length<this.tree.capacity)return this.cell.markers.push(t),!0;this.branches.length==0&&this.split();for(let e=0;e<this.branches.length;e++)if(this.branches[e].add(t))return!0;throw new Error("Failed to add marker to branch")}compact(){if(this.branches.length==0)return;for(let s=0;s<this.branches.length;s++)this.branches[s].compact();const t=new Array,e=new Array;for(let s=0;s<this.branches.length;s++){const r=this.branches[s];t.push(...r.branches),e.push(...r.cell.markers)}const n=new u(this.tree,this.cell.id,this.zoom+this.tree.depth,this.cell.bounds);n.branches=t,n.cell.markers=e,this.branches=[n]}cells(t,e,n){if(t<this.zoom||e.intersects(this.cell.bounds)==!1)return n;n.push(this.cell);for(let s=0;s<this.branches.length;s++)this.branches[s].cells(t,e,n);return n}print(t){console.log(`${"---".repeat(t)}|${this.cell.id} zoom=[${this.zoom}] markers=[${this.cell.markers.length}]`);for(let e=0;e<this.branches.length;e++)this.branches[e].print(t+1)}count(){return this.cell.markers.length+this.branches.reduce((t,e)=>t+e.count(),0)}}class x{capacity;depth;root;constructor(t,e,n){this.capacity=n,this.depth=e,this.root=new u(this,"R",t,{sw:{lat:-90,lng:-180},ne:{lat:90,lng:180}})}add(t){return this.root.add(t)}compact(){this.root.compact()}cells(t,e){const n=new Array;return this.root.cells(t,e,n),n}print(){this.root.print(0)}}const A=16,p=2,k=1,M=A*4;let b,d,E=p,$=k,y=M;const v={update(l,t,e){const n=-Math.floor(Math.log2(l.mapSize/y)),s=new x(n,$,E);for(let o=0;o<t.length;o++){const i=t[o];if(!s.add(i))throw new Error("Failed to add marker to tree")}const r=-n;for(let o=0;o<r;o++)s.compact();b=s,d=e},configure(l){E=l?.process?.visibility?.cell?.capacity??p,$=l?.process?.visibility?.cell?.depth??k,y=l?.process?.visibility?.cell?.size??M},filter(l,t){if(!b||!d)return[];const e=h.create(t);let n=[],s=t.zoom;for(;s<l.zoomMax&&n.length<d;)n=b.cells(s,e).flatMap(r=>r.markers),s++;return n.map(r=>r.index)}};class _{methods;constructor(t){this.methods=t}listen(){self.onmessage=this.onmessage.bind(this)}async onmessage(t){const{id:e,method:n,args:s}=t.data;try{const r=this.methods[n];if(typeof r!="function")throw new Error(`Unknown method: ${n}`);const o=await r(...s),i={id:e,result:o};self.postMessage(i)}catch(r){const o=r instanceof Error?r.message:String(r),i={id:e,error:o};self.postMessage(i)}}}new _(v).listen()})();\n', Sn = typeof self < "u" && self.Blob && new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);", Gn], { type: "text/javascript;charset=utf-8" });
|
|
150
151
|
function _s(t) {
|
|
151
152
|
let e;
|
|
152
153
|
try {
|
|
@@ -208,17 +209,12 @@ class ot {
|
|
|
208
209
|
if (r < e) throw new Error(`Invalid bounds: ${e}, ${n}, ${r}, ${s}`);
|
|
209
210
|
this.sw = { lat: e, lng: n }, this.ne = { lat: r, lng: s }, n < s ? (this.blockL = new mt(e, n, r, s), this.blockR = new mt(0, 0, 0, 0)) : (this.blockL = new mt(e, -180, r, s), this.blockR = new mt(e, n, r, 180));
|
|
210
211
|
}
|
|
211
|
-
static
|
|
212
|
+
static bounds(e) {
|
|
212
213
|
const n = e.bounds, r = e.center;
|
|
213
|
-
|
|
214
|
-
n.sw.lng = -180, n.ne.lng = 180;
|
|
215
|
-
return;
|
|
216
|
-
}
|
|
217
|
-
n.sw.lng < -180 && (n.sw.lng += 360), n.sw.lng > 180 && (n.sw.lng -= 360), n.ne.lng < -180 && (n.ne.lng += 360), n.ne.lng > 180 && (n.ne.lng -= 360);
|
|
214
|
+
return n.sw.lng <= r.lng && n.ne.lng <= r.lng ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : n.sw.lng >= r.lng && n.ne.lng >= r.lng ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : Math.abs(n.ne.lng - r.lng) + Math.abs(n.sw.lng - r.lng) > 360 ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : n.ne.lng - n.sw.lng > 360 ? { sw: { lat: n.sw.lat, lng: -180 }, ne: { lat: n.ne.lat, lng: 180 } } : e.bounds;
|
|
218
215
|
}
|
|
219
|
-
static
|
|
220
|
-
this.
|
|
221
|
-
const n = e.bounds, r = n.sw, s = n.ne;
|
|
216
|
+
static create(e) {
|
|
217
|
+
const n = this.bounds(e), r = n.sw, s = n.ne;
|
|
222
218
|
return new ot(r.lat, r.lng, s.lat, s.lng);
|
|
223
219
|
}
|
|
224
220
|
/**
|
|
@@ -228,8 +224,7 @@ class ot {
|
|
|
228
224
|
* @param offsetY - The y offset of the map in pixels at zoom level n.
|
|
229
225
|
*/
|
|
230
226
|
static offset(e, n, r) {
|
|
231
|
-
this.
|
|
232
|
-
const s = e.bounds, i = e.zoom, a = n * Math.pow(2, i), o = st(s.sw.lat, s.sw.lng, a), l = st(s.ne.lat, s.ne.lng, a);
|
|
227
|
+
const s = this.bounds(e), i = e.zoom, a = n * Math.pow(2, i), o = st(s.sw.lat, s.sw.lng, a), l = st(s.ne.lat, s.ne.lng, a);
|
|
233
228
|
let u = Math.max(o.x - r.left, 0), c = Math.min(o.y + r.bottom, a), f = Math.min(l.x + r.right, a), h = Math.max(l.y - r.top, 0);
|
|
234
229
|
const m = Pn(u, c, a), p = Pn(f, h, a);
|
|
235
230
|
return new ot(m.lat, m.lng, p.lat, p.lng);
|
|
@@ -241,7 +236,7 @@ class ot {
|
|
|
241
236
|
return this.blockL.intersects(e) || this.blockR.intersects(e);
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
|
-
const Ss = 75, Ps = 150, In = 25e-5, Is = 1e6, As = 2e6, An = 3e6, Kn = 10, Ut = 16, Qn = 2,
|
|
239
|
+
const Ss = 75, Ps = 150, In = 25e-5, Is = 1e6, As = 2e6, An = 3e6, Kn = 10, Ut = 16, Qn = 2, Fe = 0.5, Yt = "white", Ts = "darkgreen", er = "0px 2px 2px rgba(0, 0, 0, 0.5)", Tn = 1024;
|
|
245
240
|
class Ns {
|
|
246
241
|
// Services
|
|
247
242
|
provider;
|
|
@@ -283,8 +278,8 @@ class Ns {
|
|
|
283
278
|
}
|
|
284
279
|
}
|
|
285
280
|
const Xt = !1;
|
|
286
|
-
var Cs = Array.isArray, Rs = Array.prototype.indexOf, He = Array.prototype.includes, Ds = Array.from, Os = Object.defineProperty, it = Object.getOwnPropertyDescriptor,
|
|
287
|
-
function
|
|
281
|
+
var Cs = Array.isArray, Rs = Array.prototype.indexOf, He = Array.prototype.includes, Ds = Array.from, Os = Object.defineProperty, it = Object.getOwnPropertyDescriptor, $s = Object.prototype, zs = Array.prototype, Fs = Object.getPrototypeOf, Nn = Object.isExtensible;
|
|
282
|
+
function Ls(t) {
|
|
288
283
|
for (var e = 0; e < t.length; e++)
|
|
289
284
|
t[e]();
|
|
290
285
|
}
|
|
@@ -294,7 +289,7 @@ function tr() {
|
|
|
294
289
|
});
|
|
295
290
|
return { promise: n, resolve: t, reject: e };
|
|
296
291
|
}
|
|
297
|
-
const O = 2, Mt = 4, It = 8, nr = 1 << 24, ge = 16, Se = 32,
|
|
292
|
+
const O = 2, Mt = 4, It = 8, nr = 1 << 24, ge = 16, Se = 32, $e = 64, nn = 128, J = 512, D = 1024, F = 2048, se = 4096, _e = 8192, be = 16384, rr = 32768, Et = 65536, Cn = 1 << 17, sr = 1 << 18, Ge = 1 << 19, Vs = 1 << 20, Oe = 32768, Jt = 1 << 21, rn = 1 << 22, Me = 1 << 23, kt = /* @__PURE__ */ Symbol("$state"), Ve = new class extends Error {
|
|
298
293
|
name = "StaleReactionError";
|
|
299
294
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
300
295
|
}();
|
|
@@ -357,7 +352,7 @@ function ar() {
|
|
|
357
352
|
let je = [];
|
|
358
353
|
function Xs() {
|
|
359
354
|
var t = je;
|
|
360
|
-
je = [],
|
|
355
|
+
je = [], Ls(t);
|
|
361
356
|
}
|
|
362
357
|
function Ne(t) {
|
|
363
358
|
if (je.length === 0) {
|
|
@@ -371,7 +366,7 @@ function Ne(t) {
|
|
|
371
366
|
function or(t) {
|
|
372
367
|
var e = _;
|
|
373
368
|
if (e === null)
|
|
374
|
-
return
|
|
369
|
+
return y.f |= Me, t;
|
|
375
370
|
if ((e.f & rr) === 0) {
|
|
376
371
|
if ((e.f & nn) === 0)
|
|
377
372
|
throw t;
|
|
@@ -408,7 +403,7 @@ function lr(t) {
|
|
|
408
403
|
));
|
|
409
404
|
}
|
|
410
405
|
function ur(t, e, n) {
|
|
411
|
-
(t.f &
|
|
406
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & se) !== 0 && n.add(t), lr(t.deps), P(t, D);
|
|
412
407
|
}
|
|
413
408
|
const vt = /* @__PURE__ */ new Set();
|
|
414
409
|
let S = null, te = null, ee = [], ln = null, Gt = !1;
|
|
@@ -491,7 +486,7 @@ class Ee {
|
|
|
491
486
|
if (n) {
|
|
492
487
|
this.#t.delete(e);
|
|
493
488
|
for (var r of n.d)
|
|
494
|
-
P(r,
|
|
489
|
+
P(r, F), oe(r);
|
|
495
490
|
for (r of n.m)
|
|
496
491
|
P(r, se), oe(r);
|
|
497
492
|
}
|
|
@@ -525,7 +520,7 @@ class Ee {
|
|
|
525
520
|
#l(e, n, r) {
|
|
526
521
|
e.f ^= D;
|
|
527
522
|
for (var s = e.first, i = null; s !== null; ) {
|
|
528
|
-
var a = s.f, o = (a & (Se |
|
|
523
|
+
var a = s.f, o = (a & (Se | $e)) !== 0, l = o && (a & D) !== 0, u = l || (a & _e) !== 0 || this.#t.has(s);
|
|
529
524
|
if (!u && s.fn !== null) {
|
|
530
525
|
o ? s.f ^= D : i !== null && (a & (Mt | It | nr)) !== 0 ? i.b.defer_effect(s) : (a & Mt) !== 0 ? n.push(s) : ht(s) && ((a & ge) !== 0 && this.#e.add(s), lt(s));
|
|
531
526
|
var c = s.first;
|
|
@@ -630,7 +625,7 @@ class Ee {
|
|
|
630
625
|
}
|
|
631
626
|
revive() {
|
|
632
627
|
for (const e of this.#s)
|
|
633
|
-
this.#e.delete(e), P(e,
|
|
628
|
+
this.#e.delete(e), P(e, F), oe(e);
|
|
634
629
|
for (const e of this.#e)
|
|
635
630
|
P(e, se), oe(e);
|
|
636
631
|
this.flush();
|
|
@@ -716,7 +711,7 @@ function cr(t, e, n, r) {
|
|
|
716
711
|
e,
|
|
717
712
|
n,
|
|
718
713
|
r
|
|
719
|
-
) : (i & (rn | ge)) !== 0 && (i &
|
|
714
|
+
) : (i & (rn | ge)) !== 0 && (i & F) === 0 && hr(s, e, r) && (P(s, F), oe(
|
|
720
715
|
/** @type {Effect} */
|
|
721
716
|
s
|
|
722
717
|
));
|
|
@@ -749,7 +744,7 @@ function oe(t) {
|
|
|
749
744
|
var n = e.f;
|
|
750
745
|
if (Gt && e === _ && (n & ge) !== 0 && (n & sr) === 0)
|
|
751
746
|
return;
|
|
752
|
-
if ((n & (
|
|
747
|
+
if ((n & ($e | Se)) !== 0) {
|
|
753
748
|
if ((n & D) === 0) return;
|
|
754
749
|
e.f ^= D;
|
|
755
750
|
}
|
|
@@ -758,7 +753,7 @@ function oe(t) {
|
|
|
758
753
|
}
|
|
759
754
|
function fr(t, e) {
|
|
760
755
|
if (!((t.f & Se) !== 0 && (t.f & D) !== 0)) {
|
|
761
|
-
(t.f &
|
|
756
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & se) !== 0 && e.m.push(t), P(t, D);
|
|
762
757
|
for (var n = t.first; n !== null; )
|
|
763
758
|
fr(n, e), n = n.next;
|
|
764
759
|
}
|
|
@@ -830,13 +825,13 @@ class ni {
|
|
|
830
825
|
_.b, this.is_pending = !!this.#r.pending, this.#i = gi(() => {
|
|
831
826
|
_.b = this;
|
|
832
827
|
{
|
|
833
|
-
var s = this.#
|
|
828
|
+
var s = this.#y();
|
|
834
829
|
try {
|
|
835
830
|
this.#s = Ae(() => r(s));
|
|
836
831
|
} catch (i) {
|
|
837
832
|
this.error(i);
|
|
838
833
|
}
|
|
839
|
-
this.#c > 0 ? this.#
|
|
834
|
+
this.#c > 0 ? this.#w() : this.is_pending = !1;
|
|
840
835
|
}
|
|
841
836
|
return () => {
|
|
842
837
|
this.#l?.remove();
|
|
@@ -853,8 +848,8 @@ class ni {
|
|
|
853
848
|
#M() {
|
|
854
849
|
const e = this.#r.pending;
|
|
855
850
|
e && (this.#e = Ae(() => e(this.#n)), Ne(() => {
|
|
856
|
-
var n = this.#
|
|
857
|
-
this.#s = this.#g(() => (Ee.ensure(), Ae(() => this.#o(n)))), this.#c > 0 ? this.#
|
|
851
|
+
var n = this.#y();
|
|
852
|
+
this.#s = this.#g(() => (Ee.ensure(), Ae(() => this.#o(n)))), this.#c > 0 ? this.#w() : (_t(
|
|
858
853
|
/** @type {Effect} */
|
|
859
854
|
this.#e,
|
|
860
855
|
() => {
|
|
@@ -863,7 +858,7 @@ class ni {
|
|
|
863
858
|
), this.is_pending = !1);
|
|
864
859
|
}));
|
|
865
860
|
}
|
|
866
|
-
#
|
|
861
|
+
#y() {
|
|
867
862
|
var e = this.#n;
|
|
868
863
|
return this.is_pending && (this.#l = kr(), this.#n.before(this.#l), e = this.#l), e;
|
|
869
864
|
}
|
|
@@ -888,7 +883,7 @@ class ni {
|
|
|
888
883
|
* @param {() => Effect | null} fn
|
|
889
884
|
*/
|
|
890
885
|
#g(e) {
|
|
891
|
-
var n = _, r =
|
|
886
|
+
var n = _, r = y, s = ie;
|
|
892
887
|
ce(this.#i), K(this.#i), Ze(this.#i.ctx);
|
|
893
888
|
try {
|
|
894
889
|
return e();
|
|
@@ -898,7 +893,7 @@ class ni {
|
|
|
898
893
|
ce(n), K(r), Ze(s);
|
|
899
894
|
}
|
|
900
895
|
}
|
|
901
|
-
#
|
|
896
|
+
#w() {
|
|
902
897
|
const e = (
|
|
903
898
|
/** @type {(anchor: Node) => void} */
|
|
904
899
|
this.#r.pending
|
|
@@ -921,7 +916,7 @@ class ni {
|
|
|
921
916
|
if (this.#c += e, this.#c === 0) {
|
|
922
917
|
this.is_pending = !1;
|
|
923
918
|
for (const n of this.#m)
|
|
924
|
-
P(n,
|
|
919
|
+
P(n, F), oe(n);
|
|
925
920
|
for (const n of this.#v)
|
|
926
921
|
P(n, se), oe(n);
|
|
927
922
|
this.#m.clear(), this.#v.clear(), this.#e && _t(this.#e, () => {
|
|
@@ -961,7 +956,7 @@ class ni {
|
|
|
961
956
|
}
|
|
962
957
|
s = !0, i && Hs(), Ee.ensure(), this.#u = 0, this.#t !== null && _t(this.#t, () => {
|
|
963
958
|
this.#t = null;
|
|
964
|
-
}), this.is_pending = this.has_pending_snippet(), this.#s = this.#g(() => (this.#p = !1, Ae(() => this.#o(this.#n)))), this.#c > 0 ? this.#
|
|
959
|
+
}), this.is_pending = this.has_pending_snippet(), this.#s = this.#g(() => (this.#p = !1, Ae(() => this.#o(this.#n)))), this.#c > 0 ? this.#w() : this.is_pending = !1;
|
|
965
960
|
};
|
|
966
961
|
Ne(() => {
|
|
967
962
|
try {
|
|
@@ -1022,7 +1017,7 @@ function ri(t, e, n, r) {
|
|
|
1022
1017
|
u ? u.then(f) : f();
|
|
1023
1018
|
}
|
|
1024
1019
|
function si() {
|
|
1025
|
-
var t = _, e =
|
|
1020
|
+
var t = _, e = y, n = ie, r = S;
|
|
1026
1021
|
return function(i = !0) {
|
|
1027
1022
|
ce(t), K(e), Ze(n), i && r?.activate();
|
|
1028
1023
|
};
|
|
@@ -1032,9 +1027,9 @@ function Kt() {
|
|
|
1032
1027
|
}
|
|
1033
1028
|
// @__NO_SIDE_EFFECTS__
|
|
1034
1029
|
function ii(t) {
|
|
1035
|
-
var e = O |
|
|
1030
|
+
var e = O | F, n = y !== null && (y.f & O) !== 0 ? (
|
|
1036
1031
|
/** @type {Derived} */
|
|
1037
|
-
|
|
1032
|
+
y
|
|
1038
1033
|
) : null;
|
|
1039
1034
|
return _ !== null && (_.f |= Ge), {
|
|
1040
1035
|
ctx: ie,
|
|
@@ -1071,7 +1066,7 @@ function ai(t, e, n) {
|
|
|
1071
1066
|
), a = At(
|
|
1072
1067
|
/** @type {V} */
|
|
1073
1068
|
N
|
|
1074
|
-
), o = !
|
|
1069
|
+
), o = !y, l = /* @__PURE__ */ new Map();
|
|
1075
1070
|
return vi(() => {
|
|
1076
1071
|
var u = tr();
|
|
1077
1072
|
i = u.promise;
|
|
@@ -1177,9 +1172,9 @@ function B(t, e) {
|
|
|
1177
1172
|
return _i(n), n;
|
|
1178
1173
|
}
|
|
1179
1174
|
function W(t, e, n = !1) {
|
|
1180
|
-
|
|
1175
|
+
y !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1181
1176
|
// to ensure we error if state is set inside an inspect effect
|
|
1182
|
-
(!ne || (
|
|
1177
|
+
(!ne || (y.f & Cn) !== 0) && ar() && (y.f & (O | ge | rn | Cn)) !== 0 && (G === null || !He.call(G, t)) && qs();
|
|
1183
1178
|
let r = n ? tt(e) : e;
|
|
1184
1179
|
return xt(t, r);
|
|
1185
1180
|
}
|
|
@@ -1193,9 +1188,9 @@ function xt(t, e) {
|
|
|
1193
1188
|
/** @type {Derived} */
|
|
1194
1189
|
t
|
|
1195
1190
|
);
|
|
1196
|
-
(t.f &
|
|
1191
|
+
(t.f & F) !== 0 && un(s), on(s);
|
|
1197
1192
|
}
|
|
1198
|
-
t.wv = Tr(), vr(t,
|
|
1193
|
+
t.wv = Tr(), vr(t, F), _ !== null && (_.f & D) !== 0 && (_.f & (Se | $e)) === 0 && (X === null ? bi([t]) : X.push(t)), !r.is_fork && Qt.size > 0 && !mr && li();
|
|
1199
1194
|
}
|
|
1200
1195
|
return e;
|
|
1201
1196
|
}
|
|
@@ -1212,7 +1207,7 @@ function vr(t, e) {
|
|
|
1212
1207
|
var n = t.reactions;
|
|
1213
1208
|
if (n !== null)
|
|
1214
1209
|
for (var r = n.length, s = 0; s < r; s++) {
|
|
1215
|
-
var i = n[s], a = i.f, o = (a &
|
|
1210
|
+
var i = n[s], a = i.f, o = (a & F) === 0;
|
|
1216
1211
|
if (o && P(i, e), (a & O) !== 0) {
|
|
1217
1212
|
var l = (
|
|
1218
1213
|
/** @type {Derived} */
|
|
@@ -1231,16 +1226,16 @@ function vr(t, e) {
|
|
|
1231
1226
|
function tt(t) {
|
|
1232
1227
|
if (typeof t != "object" || t === null || kt in t)
|
|
1233
1228
|
return t;
|
|
1234
|
-
const e =
|
|
1235
|
-
if (e !==
|
|
1229
|
+
const e = Fs(t);
|
|
1230
|
+
if (e !== $s && e !== zs)
|
|
1236
1231
|
return t;
|
|
1237
1232
|
var n = /* @__PURE__ */ new Map(), r = Cs(t), s = /* @__PURE__ */ B(0), i = Ce, a = (o) => {
|
|
1238
1233
|
if (Ce === i)
|
|
1239
1234
|
return o();
|
|
1240
|
-
var l =
|
|
1241
|
-
K(null),
|
|
1235
|
+
var l = y, u = Ce;
|
|
1236
|
+
K(null), zn(i);
|
|
1242
1237
|
var c = o();
|
|
1243
|
-
return K(l),
|
|
1238
|
+
return K(l), zn(u), c;
|
|
1244
1239
|
};
|
|
1245
1240
|
return r && n.set("length", /* @__PURE__ */ B(
|
|
1246
1241
|
/** @type {any[]} */
|
|
@@ -1357,12 +1352,12 @@ function tt(t) {
|
|
|
1357
1352
|
}
|
|
1358
1353
|
);
|
|
1359
1354
|
}
|
|
1360
|
-
var Dn, gr,
|
|
1355
|
+
var Dn, gr, wr, yr;
|
|
1361
1356
|
function ui() {
|
|
1362
1357
|
if (Dn === void 0) {
|
|
1363
1358
|
Dn = window, gr = /Firefox/.test(navigator.userAgent);
|
|
1364
1359
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1365
|
-
|
|
1360
|
+
wr = it(e, "firstChild").get, yr = it(e, "nextSibling").get, Nn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Nn(n) && (n.__t = void 0);
|
|
1366
1361
|
}
|
|
1367
1362
|
}
|
|
1368
1363
|
function kr(t = "") {
|
|
@@ -1372,14 +1367,14 @@ function kr(t = "") {
|
|
|
1372
1367
|
function _r(t) {
|
|
1373
1368
|
return (
|
|
1374
1369
|
/** @type {TemplateNode | null} */
|
|
1375
|
-
|
|
1370
|
+
wr.call(t)
|
|
1376
1371
|
);
|
|
1377
1372
|
}
|
|
1378
1373
|
// @__NO_SIDE_EFFECTS__
|
|
1379
1374
|
function cn(t) {
|
|
1380
1375
|
return (
|
|
1381
1376
|
/** @type {TemplateNode | null} */
|
|
1382
|
-
|
|
1377
|
+
yr.call(t)
|
|
1383
1378
|
);
|
|
1384
1379
|
}
|
|
1385
1380
|
function On(t, e) {
|
|
@@ -1393,7 +1388,7 @@ function ci(t, e = 1, n = !1) {
|
|
|
1393
1388
|
return r;
|
|
1394
1389
|
}
|
|
1395
1390
|
function br(t) {
|
|
1396
|
-
var e =
|
|
1391
|
+
var e = y, n = _;
|
|
1397
1392
|
K(null), ce(null);
|
|
1398
1393
|
try {
|
|
1399
1394
|
return t();
|
|
@@ -1405,14 +1400,14 @@ function hi(t, e) {
|
|
|
1405
1400
|
var n = e.last;
|
|
1406
1401
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1407
1402
|
}
|
|
1408
|
-
function
|
|
1403
|
+
function we(t, e, n) {
|
|
1409
1404
|
var r = _;
|
|
1410
1405
|
r !== null && (r.f & _e) !== 0 && (t |= _e);
|
|
1411
1406
|
var s = {
|
|
1412
1407
|
ctx: ie,
|
|
1413
1408
|
deps: null,
|
|
1414
1409
|
nodes: null,
|
|
1415
|
-
f: t |
|
|
1410
|
+
f: t | F | J,
|
|
1416
1411
|
first: null,
|
|
1417
1412
|
fn: e,
|
|
1418
1413
|
last: null,
|
|
@@ -1433,28 +1428,28 @@ function ye(t, e, n) {
|
|
|
1433
1428
|
else e !== null && oe(s);
|
|
1434
1429
|
var i = s;
|
|
1435
1430
|
if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1436
|
-
(i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t & Et) !== 0 && i !== null && (i.f |= Et)), i !== null && (i.parent = r, r !== null && hi(i, r),
|
|
1431
|
+
(i.f & Ge) === 0 && (i = i.first, (t & ge) !== 0 && (t & Et) !== 0 && i !== null && (i.f |= Et)), i !== null && (i.parent = r, r !== null && hi(i, r), y !== null && (y.f & O) !== 0 && (t & $e) === 0)) {
|
|
1437
1432
|
var a = (
|
|
1438
1433
|
/** @type {Derived} */
|
|
1439
|
-
|
|
1434
|
+
y
|
|
1440
1435
|
);
|
|
1441
1436
|
(a.effects ??= []).push(i);
|
|
1442
1437
|
}
|
|
1443
1438
|
return s;
|
|
1444
1439
|
}
|
|
1445
1440
|
function hn() {
|
|
1446
|
-
return
|
|
1441
|
+
return y !== null && !ne;
|
|
1447
1442
|
}
|
|
1448
1443
|
function fi(t) {
|
|
1449
|
-
const e =
|
|
1444
|
+
const e = we(It, null, !1);
|
|
1450
1445
|
return P(e, D), e.teardown = t, e;
|
|
1451
1446
|
}
|
|
1452
1447
|
function pi(t) {
|
|
1453
|
-
return
|
|
1448
|
+
return we(Mt | Vs, t, !1);
|
|
1454
1449
|
}
|
|
1455
1450
|
function di(t) {
|
|
1456
1451
|
Ee.ensure();
|
|
1457
|
-
const e =
|
|
1452
|
+
const e = we($e | Ge, t, !0);
|
|
1458
1453
|
return (n = {}) => new Promise((r) => {
|
|
1459
1454
|
n.outro ? _t(e, () => {
|
|
1460
1455
|
le(e), r(void 0);
|
|
@@ -1462,35 +1457,35 @@ function di(t) {
|
|
|
1462
1457
|
});
|
|
1463
1458
|
}
|
|
1464
1459
|
function mi(t) {
|
|
1465
|
-
return
|
|
1460
|
+
return we(Mt, t, !1);
|
|
1466
1461
|
}
|
|
1467
1462
|
function vi(t) {
|
|
1468
|
-
return
|
|
1463
|
+
return we(rn | Ge, t, !0);
|
|
1469
1464
|
}
|
|
1470
1465
|
function Mr(t, e = 0) {
|
|
1471
|
-
return
|
|
1466
|
+
return we(It | e, t, !0);
|
|
1472
1467
|
}
|
|
1473
1468
|
function Er(t, e = [], n = [], r = []) {
|
|
1474
1469
|
ri(r, e, n, (s) => {
|
|
1475
|
-
|
|
1470
|
+
we(It, () => t(...s.map(M)), !0);
|
|
1476
1471
|
});
|
|
1477
1472
|
}
|
|
1478
1473
|
function gi(t, e = 0) {
|
|
1479
|
-
var n =
|
|
1474
|
+
var n = we(ge | e, t, !0);
|
|
1480
1475
|
return n;
|
|
1481
1476
|
}
|
|
1482
1477
|
function Ae(t) {
|
|
1483
|
-
return
|
|
1478
|
+
return we(Se | Ge, t, !0);
|
|
1484
1479
|
}
|
|
1485
1480
|
function xr(t) {
|
|
1486
1481
|
var e = t.teardown;
|
|
1487
1482
|
if (e !== null) {
|
|
1488
|
-
const n = Xe, r =
|
|
1489
|
-
|
|
1483
|
+
const n = Xe, r = y;
|
|
1484
|
+
$n(!0), K(null);
|
|
1490
1485
|
try {
|
|
1491
1486
|
e.call(null);
|
|
1492
1487
|
} finally {
|
|
1493
|
-
|
|
1488
|
+
$n(n), K(r);
|
|
1494
1489
|
}
|
|
1495
1490
|
}
|
|
1496
1491
|
}
|
|
@@ -1502,10 +1497,10 @@ function Sr(t, e = !1) {
|
|
|
1502
1497
|
s.abort(Ve);
|
|
1503
1498
|
});
|
|
1504
1499
|
var r = n.next;
|
|
1505
|
-
(n.f &
|
|
1500
|
+
(n.f & $e) !== 0 ? n.parent = null : le(n, e), n = r;
|
|
1506
1501
|
}
|
|
1507
1502
|
}
|
|
1508
|
-
function
|
|
1503
|
+
function wi(t) {
|
|
1509
1504
|
for (var e = t.first; e !== null; ) {
|
|
1510
1505
|
var n = e.next;
|
|
1511
1506
|
(e.f & Se) === 0 && le(e), e = n;
|
|
@@ -1513,7 +1508,7 @@ function yi(t) {
|
|
|
1513
1508
|
}
|
|
1514
1509
|
function le(t, e = !0) {
|
|
1515
1510
|
var n = !1;
|
|
1516
|
-
(e || (t.f & sr) !== 0) && t.nodes !== null && t.nodes.end !== null && (
|
|
1511
|
+
(e || (t.f & sr) !== 0) && t.nodes !== null && t.nodes.end !== null && (yi(
|
|
1517
1512
|
t.nodes.start,
|
|
1518
1513
|
/** @type {TemplateNode} */
|
|
1519
1514
|
t.nodes.end
|
|
@@ -1526,7 +1521,7 @@ function le(t, e = !0) {
|
|
|
1526
1521
|
var s = t.parent;
|
|
1527
1522
|
s !== null && s.first !== null && Pr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1528
1523
|
}
|
|
1529
|
-
function
|
|
1524
|
+
function yi(t, e) {
|
|
1530
1525
|
for (; t !== null; ) {
|
|
1531
1526
|
var n = t === e ? null : /* @__PURE__ */ cn(t);
|
|
1532
1527
|
t.remove(), t = n;
|
|
@@ -1573,12 +1568,12 @@ function ki(t, e) {
|
|
|
1573
1568
|
}
|
|
1574
1569
|
}
|
|
1575
1570
|
let bt = !1, Xe = !1;
|
|
1576
|
-
function
|
|
1571
|
+
function $n(t) {
|
|
1577
1572
|
Xe = t;
|
|
1578
1573
|
}
|
|
1579
|
-
let
|
|
1574
|
+
let y = null, ne = !1;
|
|
1580
1575
|
function K(t) {
|
|
1581
|
-
|
|
1576
|
+
y = t;
|
|
1582
1577
|
}
|
|
1583
1578
|
let _ = null;
|
|
1584
1579
|
function ce(t) {
|
|
@@ -1586,14 +1581,14 @@ function ce(t) {
|
|
|
1586
1581
|
}
|
|
1587
1582
|
let G = null;
|
|
1588
1583
|
function _i(t) {
|
|
1589
|
-
|
|
1584
|
+
y !== null && (G === null ? G = [t] : G.push(t));
|
|
1590
1585
|
}
|
|
1591
1586
|
let U = null, Y = 0, X = null;
|
|
1592
1587
|
function bi(t) {
|
|
1593
1588
|
X = t;
|
|
1594
1589
|
}
|
|
1595
1590
|
let Ar = 1, Te = 0, Ce = Te;
|
|
1596
|
-
function
|
|
1591
|
+
function zn(t) {
|
|
1597
1592
|
Ce = t;
|
|
1598
1593
|
}
|
|
1599
1594
|
function Tr() {
|
|
@@ -1601,7 +1596,7 @@ function Tr() {
|
|
|
1601
1596
|
}
|
|
1602
1597
|
function ht(t) {
|
|
1603
1598
|
var e = t.f;
|
|
1604
|
-
if ((e &
|
|
1599
|
+
if ((e & F) !== 0)
|
|
1605
1600
|
return !0;
|
|
1606
1601
|
if (e & O && (t.f &= ~Oe), (e & se) !== 0) {
|
|
1607
1602
|
for (var n = (
|
|
@@ -1634,16 +1629,16 @@ function Nr(t, e, n = !0) {
|
|
|
1634
1629
|
i,
|
|
1635
1630
|
e,
|
|
1636
1631
|
!1
|
|
1637
|
-
) : e === i && (n ? P(i,
|
|
1632
|
+
) : e === i && (n ? P(i, F) : (i.f & D) !== 0 && P(i, se), oe(
|
|
1638
1633
|
/** @type {Effect} */
|
|
1639
1634
|
i
|
|
1640
1635
|
));
|
|
1641
1636
|
}
|
|
1642
1637
|
}
|
|
1643
1638
|
function Cr(t) {
|
|
1644
|
-
var e = U, n = Y, r = X, s =
|
|
1639
|
+
var e = U, n = Y, r = X, s = y, i = G, a = ie, o = ne, l = Ce, u = t.f;
|
|
1645
1640
|
U = /** @type {null | Value[]} */
|
|
1646
|
-
null, Y = 0, X = null,
|
|
1641
|
+
null, Y = 0, X = null, y = (u & (Se | $e)) === 0 ? t : null, G = null, Ze(t.ctx), ne = !1, Ce = ++Te, t.ac !== null && (br(() => {
|
|
1647
1642
|
t.ac.abort(Ve);
|
|
1648
1643
|
}), t.ac = null);
|
|
1649
1644
|
try {
|
|
@@ -1663,7 +1658,7 @@ function Cr(t) {
|
|
|
1663
1658
|
for (p = Y; p < h.length; p++)
|
|
1664
1659
|
(h[p].reactions ??= []).push(t);
|
|
1665
1660
|
} else !m && h !== null && Y < h.length && (St(t, Y), h.length = Y);
|
|
1666
|
-
if (ar() && X !== null && !ne && h !== null && (t.f & (O | se |
|
|
1661
|
+
if (ar() && X !== null && !ne && h !== null && (t.f & (O | se | F)) === 0)
|
|
1667
1662
|
for (p = 0; p < /** @type {Source[]} */
|
|
1668
1663
|
X.length; p++)
|
|
1669
1664
|
Nr(
|
|
@@ -1685,7 +1680,7 @@ function Cr(t) {
|
|
|
1685
1680
|
} catch (v) {
|
|
1686
1681
|
return or(v);
|
|
1687
1682
|
} finally {
|
|
1688
|
-
t.f ^= Jt, U = e, Y = n, X = r,
|
|
1683
|
+
t.f ^= Jt, U = e, Y = n, X = r, y = s, G = i, Ze(a), ne = o, Ce = l;
|
|
1689
1684
|
}
|
|
1690
1685
|
}
|
|
1691
1686
|
function Mi(t, e) {
|
|
@@ -1721,11 +1716,11 @@ function lt(t) {
|
|
|
1721
1716
|
var n = _, r = bt;
|
|
1722
1717
|
_ = t, bt = !0;
|
|
1723
1718
|
try {
|
|
1724
|
-
(e & (ge | nr)) !== 0 ?
|
|
1719
|
+
(e & (ge | nr)) !== 0 ? wi(t) : Sr(t), xr(t);
|
|
1725
1720
|
var s = Cr(t);
|
|
1726
1721
|
t.teardown = typeof s == "function" ? s : null, t.wv = Ar;
|
|
1727
1722
|
var i;
|
|
1728
|
-
Xt && Ys && (t.f &
|
|
1723
|
+
Xt && Ys && (t.f & F) !== 0 && t.deps;
|
|
1729
1724
|
} finally {
|
|
1730
1725
|
bt = r, _ = n;
|
|
1731
1726
|
}
|
|
@@ -1733,16 +1728,16 @@ function lt(t) {
|
|
|
1733
1728
|
}
|
|
1734
1729
|
function M(t) {
|
|
1735
1730
|
var e = t.f, n = (e & O) !== 0;
|
|
1736
|
-
if (
|
|
1731
|
+
if (y !== null && !ne) {
|
|
1737
1732
|
var r = _ !== null && (_.f & be) !== 0;
|
|
1738
1733
|
if (!r && (G === null || !He.call(G, t))) {
|
|
1739
|
-
var s =
|
|
1740
|
-
if ((
|
|
1734
|
+
var s = y.deps;
|
|
1735
|
+
if ((y.f & Jt) !== 0)
|
|
1741
1736
|
t.rv < Te && (t.rv = Te, U === null && s !== null && s[Y] === t ? Y++ : U === null ? U = [t] : U.push(t));
|
|
1742
1737
|
else {
|
|
1743
|
-
(
|
|
1738
|
+
(y.deps ??= []).push(t);
|
|
1744
1739
|
var i = t.reactions;
|
|
1745
|
-
i === null ? t.reactions = [
|
|
1740
|
+
i === null ? t.reactions = [y] : He.call(i, y) || i.push(y);
|
|
1746
1741
|
}
|
|
1747
1742
|
}
|
|
1748
1743
|
}
|
|
@@ -1757,7 +1752,7 @@ function M(t) {
|
|
|
1757
1752
|
var o = a.v;
|
|
1758
1753
|
return ((a.f & D) === 0 && a.reactions !== null || Dr(a)) && (o = un(a)), xe.set(a, o), o;
|
|
1759
1754
|
}
|
|
1760
|
-
var l = (a.f & J) === 0 && !ne &&
|
|
1755
|
+
var l = (a.f & J) === 0 && !ne && y !== null && (bt || (y.f & J) !== 0), u = a.deps === null;
|
|
1761
1756
|
ht(a) && (l && (a.f |= J), dr(a)), l && !u && Rr(a);
|
|
1762
1757
|
}
|
|
1763
1758
|
if (te?.has(t))
|
|
@@ -1799,8 +1794,8 @@ const Ei = ["touchstart", "touchmove"];
|
|
|
1799
1794
|
function xi(t) {
|
|
1800
1795
|
return Ei.includes(t);
|
|
1801
1796
|
}
|
|
1802
|
-
const Si = /* @__PURE__ */ new Set(),
|
|
1803
|
-
let
|
|
1797
|
+
const Si = /* @__PURE__ */ new Set(), Fn = /* @__PURE__ */ new Set();
|
|
1798
|
+
let Ln = null;
|
|
1804
1799
|
function gt(t) {
|
|
1805
1800
|
var e = this, n = (
|
|
1806
1801
|
/** @type {Node} */
|
|
@@ -1809,8 +1804,8 @@ function gt(t) {
|
|
|
1809
1804
|
/** @type {null | Element} */
|
|
1810
1805
|
s[0] || t.target
|
|
1811
1806
|
);
|
|
1812
|
-
|
|
1813
|
-
var a = 0, o =
|
|
1807
|
+
Ln = t;
|
|
1808
|
+
var a = 0, o = Ln === t && t.__root;
|
|
1814
1809
|
if (o) {
|
|
1815
1810
|
var l = s.indexOf(o);
|
|
1816
1811
|
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1831,7 +1826,7 @@ function gt(t) {
|
|
|
1831
1826
|
return i || n;
|
|
1832
1827
|
}
|
|
1833
1828
|
});
|
|
1834
|
-
var c =
|
|
1829
|
+
var c = y, f = _;
|
|
1835
1830
|
K(null), ce(null);
|
|
1836
1831
|
try {
|
|
1837
1832
|
for (var h, m = []; i !== null; ) {
|
|
@@ -1874,7 +1869,7 @@ function Ii(t, e) {
|
|
|
1874
1869
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1875
1870
|
}
|
|
1876
1871
|
// @__NO_SIDE_EFFECTS__
|
|
1877
|
-
function
|
|
1872
|
+
function $r(t, e) {
|
|
1878
1873
|
var n, r = !t.startsWith("<!>");
|
|
1879
1874
|
return () => {
|
|
1880
1875
|
n === void 0 && (n = Pi(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
@@ -1886,7 +1881,7 @@ function zr(t, e) {
|
|
|
1886
1881
|
return Ii(s, s), s;
|
|
1887
1882
|
};
|
|
1888
1883
|
}
|
|
1889
|
-
function
|
|
1884
|
+
function zr(t, e) {
|
|
1890
1885
|
t !== null && t.before(
|
|
1891
1886
|
/** @type {Node} */
|
|
1892
1887
|
e
|
|
@@ -1895,7 +1890,7 @@ function Lr(t, e) {
|
|
|
1895
1890
|
function fn(t, e) {
|
|
1896
1891
|
return Ai(t, e);
|
|
1897
1892
|
}
|
|
1898
|
-
const
|
|
1893
|
+
const Le = /* @__PURE__ */ new Map();
|
|
1899
1894
|
function Ai(t, { target: e, anchor: n, props: r = {}, events: s, context: i, intro: a = !0 }) {
|
|
1900
1895
|
ui();
|
|
1901
1896
|
var o = /* @__PURE__ */ new Set(), l = (f) => {
|
|
@@ -1905,12 +1900,12 @@ function Ai(t, { target: e, anchor: n, props: r = {}, events: s, context: i, int
|
|
|
1905
1900
|
o.add(m);
|
|
1906
1901
|
var p = xi(m);
|
|
1907
1902
|
e.addEventListener(m, gt, { passive: p });
|
|
1908
|
-
var v =
|
|
1909
|
-
v === void 0 ? (document.addEventListener(m, gt, { passive: p }),
|
|
1903
|
+
var v = Le.get(m);
|
|
1904
|
+
v === void 0 ? (document.addEventListener(m, gt, { passive: p }), Le.set(m, 1)) : Le.set(m, v + 1);
|
|
1910
1905
|
}
|
|
1911
1906
|
}
|
|
1912
1907
|
};
|
|
1913
|
-
l(Ds(Si)),
|
|
1908
|
+
l(Ds(Si)), Fn.add(l);
|
|
1914
1909
|
var u = void 0, c = di(() => {
|
|
1915
1910
|
var f = n ?? e.appendChild(kr());
|
|
1916
1911
|
return ti(
|
|
@@ -1936,30 +1931,30 @@ function Ai(t, { target: e, anchor: n, props: r = {}, events: s, context: i, int
|
|
|
1936
1931
|
e.removeEventListener(h, gt);
|
|
1937
1932
|
var m = (
|
|
1938
1933
|
/** @type {number} */
|
|
1939
|
-
|
|
1934
|
+
Le.get(h)
|
|
1940
1935
|
);
|
|
1941
|
-
--m === 0 ? (document.removeEventListener(h, gt),
|
|
1936
|
+
--m === 0 ? (document.removeEventListener(h, gt), Le.delete(h)) : Le.set(h, m);
|
|
1942
1937
|
}
|
|
1943
|
-
|
|
1938
|
+
Fn.delete(l), f !== n && f.parentNode?.removeChild(f);
|
|
1944
1939
|
};
|
|
1945
1940
|
});
|
|
1946
1941
|
return Ti.set(u, c), u;
|
|
1947
1942
|
}
|
|
1948
1943
|
let Ti = /* @__PURE__ */ new WeakMap();
|
|
1949
|
-
function
|
|
1944
|
+
function Fr(t) {
|
|
1950
1945
|
var e, n, r = "";
|
|
1951
1946
|
if (typeof t == "string" || typeof t == "number") r += t;
|
|
1952
1947
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1953
1948
|
var s = t.length;
|
|
1954
|
-
for (e = 0; e < s; e++) t[e] && (n =
|
|
1949
|
+
for (e = 0; e < s; e++) t[e] && (n = Fr(t[e])) && (r && (r += " "), r += n);
|
|
1955
1950
|
} else for (n in t) t[n] && (r && (r += " "), r += n);
|
|
1956
1951
|
return r;
|
|
1957
1952
|
}
|
|
1958
1953
|
function Ni() {
|
|
1959
|
-
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e =
|
|
1954
|
+
for (var t, e, n = 0, r = "", s = arguments.length; n < s; n++) (t = arguments[n]) && (e = Fr(t)) && (r && (r += " "), r += e);
|
|
1960
1955
|
return r;
|
|
1961
1956
|
}
|
|
1962
|
-
function
|
|
1957
|
+
function Lr(t) {
|
|
1963
1958
|
return typeof t == "object" ? Ni(t) : t ?? "";
|
|
1964
1959
|
}
|
|
1965
1960
|
function Ci(t, e, n) {
|
|
@@ -2044,7 +2039,7 @@ class ft {
|
|
|
2044
2039
|
rank;
|
|
2045
2040
|
marker;
|
|
2046
2041
|
constructor(e, n) {
|
|
2047
|
-
if (new.target === ft) throw new Error("
|
|
2042
|
+
if (new.target === ft) throw new Error("Unsupported code");
|
|
2048
2043
|
this.shown = !0, this.id = e.id, this.lat = e.lat, this.lng = e.lng, this.rank = e.rank, this.marker = n;
|
|
2049
2044
|
}
|
|
2050
2045
|
}
|
|
@@ -2060,8 +2055,8 @@ class Br {
|
|
|
2060
2055
|
value;
|
|
2061
2056
|
time;
|
|
2062
2057
|
constructor(e) {
|
|
2063
|
-
if (e.max <= e.min) throw new Error("
|
|
2064
|
-
if (e.value < e.min || e.max < e.value) throw new Error("
|
|
2058
|
+
if (e.max <= e.min) throw new Error("Invalid min or max");
|
|
2059
|
+
if (e.value < e.min || e.max < e.value) throw new Error("Invalid value");
|
|
2065
2060
|
this.animationEasing = e.easing, this.animationRun = e.callback, this.animating = !1, this.value = { current: e.value, start: e.value, end: e.value, min: e.min, max: e.max }, this.time = { start: 0, end: 0, span: e.timespan };
|
|
2066
2061
|
}
|
|
2067
2062
|
animationFrame() {
|
|
@@ -2097,15 +2092,15 @@ class Br {
|
|
|
2097
2092
|
return performance.now() > this.time.end;
|
|
2098
2093
|
}
|
|
2099
2094
|
}
|
|
2100
|
-
var Oi = /* @__PURE__ */
|
|
2101
|
-
function
|
|
2095
|
+
var Oi = /* @__PURE__ */ $r("<div></div>");
|
|
2096
|
+
function $i(t, e) {
|
|
2102
2097
|
sn(e, !0);
|
|
2103
2098
|
let n = e.id, r = e.style, s = e.content, i = {
|
|
2104
2099
|
setDisplayed: he,
|
|
2105
|
-
getDisplayed:
|
|
2100
|
+
getDisplayed: ze,
|
|
2106
2101
|
setSuppressed: Ie,
|
|
2107
2102
|
setCollapsed: fe,
|
|
2108
|
-
getCollapsed:
|
|
2103
|
+
getCollapsed: ye,
|
|
2109
2104
|
setScale: Ke
|
|
2110
2105
|
};
|
|
2111
2106
|
function a() {
|
|
@@ -2125,22 +2120,22 @@ function zi(t, e) {
|
|
|
2125
2120
|
k == !1 && Z.end();
|
|
2126
2121
|
}
|
|
2127
2122
|
}
|
|
2128
|
-
function
|
|
2123
|
+
function ze() {
|
|
2129
2124
|
return M(v);
|
|
2130
2125
|
}
|
|
2131
2126
|
let Pe = /* @__PURE__ */ B(!0);
|
|
2132
2127
|
function Ie(k) {
|
|
2133
|
-
k != M(Pe) && (W(Pe, k, !0), k && (Q =
|
|
2128
|
+
k != M(Pe) && (W(Pe, k, !0), k && (Q = Fe, Z.set(Fe)));
|
|
2134
2129
|
}
|
|
2135
2130
|
let j = /* @__PURE__ */ B(!0);
|
|
2136
2131
|
function fe(k) {
|
|
2137
2132
|
k != M(j) && (W(j, k, !0), Z.target(M(j) ? 0 : Q));
|
|
2138
2133
|
}
|
|
2139
|
-
function
|
|
2134
|
+
function ye() {
|
|
2140
2135
|
return M(v) ? Z.expired() : !0;
|
|
2141
2136
|
}
|
|
2142
|
-
let Q =
|
|
2143
|
-
value:
|
|
2137
|
+
let Q = Fe, Z = new Br({
|
|
2138
|
+
value: Fe,
|
|
2144
2139
|
min: 0,
|
|
2145
2140
|
max: 1,
|
|
2146
2141
|
timespan: Ss,
|
|
@@ -2163,7 +2158,7 @@ function zi(t, e) {
|
|
|
2163
2158
|
Vr(
|
|
2164
2159
|
pe,
|
|
2165
2160
|
1,
|
|
2166
|
-
|
|
2161
|
+
Lr([
|
|
2167
2162
|
"pin",
|
|
2168
2163
|
M(v) && "displayed",
|
|
2169
2164
|
M(Pe) && "suppressed"
|
|
@@ -2180,13 +2175,13 @@ function zi(t, e) {
|
|
|
2180
2175
|
"background-color": m,
|
|
2181
2176
|
"border-width": `${f}px`,
|
|
2182
2177
|
"box-shadow": p,
|
|
2183
|
-
scale:
|
|
2184
|
-
filter: `brightness(${pt(
|
|
2178
|
+
scale: Fe,
|
|
2179
|
+
filter: `brightness(${pt(Fe)})`
|
|
2185
2180
|
})
|
|
2186
2181
|
]
|
|
2187
|
-
),
|
|
2182
|
+
), zr(t, pe), an(Ct);
|
|
2188
2183
|
}
|
|
2189
|
-
class
|
|
2184
|
+
class zi extends ft {
|
|
2190
2185
|
width;
|
|
2191
2186
|
height;
|
|
2192
2187
|
zoom;
|
|
@@ -2194,7 +2189,7 @@ class Li extends ft {
|
|
|
2194
2189
|
constructor(e, n) {
|
|
2195
2190
|
super(e, new pn(n, e.lat, e.lng, e.rank));
|
|
2196
2191
|
const r = e.pin?.style.dimensions.width ?? Ut, s = e.pin?.style.dimensions.height ?? Ut, i = e.pin?.style.dimensions.padding ?? Qn, a = e.pin?.style.dimensions.radius ?? Ut / 2;
|
|
2197
|
-
this.width = r, this.height = s, this.zoom = NaN, this.component = fn(
|
|
2192
|
+
this.width = r, this.height = s, this.zoom = NaN, this.component = fn($i, {
|
|
2198
2193
|
target: this.marker.div,
|
|
2199
2194
|
props: {
|
|
2200
2195
|
id: this.id,
|
|
@@ -2274,7 +2269,7 @@ function en(t, e, n) {
|
|
|
2274
2269
|
let r = t / 2, s = e / 2, i = Math.sqrt(r * r + s * s), a = Math.atan(s / r) * (180 / Math.PI), o = n * (Math.PI / 180);
|
|
2275
2270
|
return n < 180 ? n < 90 ? n < a ? { x: 0, y: i * Math.sin(o) - s } : { x: i * Math.cos(o) - r, y: 0 } : n < 180 - a ? { x: i * Math.cos(o) - r, y: 0 } : { x: -t, y: i * Math.sin(o) - s } : n < 270 ? n < 180 + a ? { x: -t, y: i * Math.sin(o) - s } : { x: i * Math.cos(o) - r, y: -e } : n < 360 - a ? { x: i * Math.cos(o) - r, y: -e } : { x: 0, y: i * Math.sin(o) - s };
|
|
2276
2271
|
}
|
|
2277
|
-
var
|
|
2272
|
+
var Fi = /* @__PURE__ */ $r('<div><div class="element pointer svelte-1no6o2a"></div> <div class="element tooltip svelte-1no6o2a"><div class="element body svelte-1no6o2a"></div></div></div>');
|
|
2278
2273
|
function Ur(t, e) {
|
|
2279
2274
|
sn(e, !0);
|
|
2280
2275
|
let n = e.id, r = e.style, s = e.content, i = {
|
|
@@ -2288,26 +2283,26 @@ function Ur(t, e) {
|
|
|
2288
2283
|
function a() {
|
|
2289
2284
|
return i;
|
|
2290
2285
|
}
|
|
2291
|
-
let o, l = r.colors?.shadow ?? er, u, c = Math.min(r.dimensions.width, r.dimensions.height) / Math.SQRT2 - r.dimensions.margin, f = r.colors?.background ?? Yt, h = Math.max(1, r.dimensions.radius / c), m, p = r.dimensions.width + 2 * r.dimensions.margin, v = r.dimensions.height + 2 * r.dimensions.margin, x = r.dimensions.margin, H, he = r.dimensions.width,
|
|
2292
|
-
function Q(
|
|
2293
|
-
if (
|
|
2294
|
-
if (W(j,
|
|
2295
|
-
if (s == null ||
|
|
2286
|
+
let o, l = r.colors?.shadow ?? er, u, c = Math.min(r.dimensions.width, r.dimensions.height) / Math.SQRT2 - r.dimensions.margin, f = r.colors?.background ?? Yt, h = Math.max(1, r.dimensions.radius / c), m, p = r.dimensions.width + 2 * r.dimensions.margin, v = r.dimensions.height + 2 * r.dimensions.margin, x = r.dimensions.margin, H, he = r.dimensions.width, ze = r.dimensions.height, Pe = r.dimensions.radius, Ie = r.colors?.background ?? Yt, j = /* @__PURE__ */ B(!1), fe = !1, ye = !1;
|
|
2287
|
+
function Q(w) {
|
|
2288
|
+
if (w != M(j)) {
|
|
2289
|
+
if (W(j, w, !0), w) {
|
|
2290
|
+
if (s == null || ye || fe) return;
|
|
2296
2291
|
fe = !0, s(n).then((de) => {
|
|
2297
2292
|
de instanceof HTMLElement ? H.appendChild(de) : console.error("Failed to load tooltip content");
|
|
2298
2293
|
}).catch((de) => console.error(de)).finally(() => {
|
|
2299
|
-
|
|
2294
|
+
ye = !0, fe = !1;
|
|
2300
2295
|
});
|
|
2301
2296
|
}
|
|
2302
|
-
|
|
2297
|
+
w == !1 && (pe.end(), Rt.end(), Dt.end());
|
|
2303
2298
|
}
|
|
2304
2299
|
}
|
|
2305
2300
|
function Z() {
|
|
2306
2301
|
return M(j);
|
|
2307
2302
|
}
|
|
2308
2303
|
let Ke = /* @__PURE__ */ B(!0);
|
|
2309
|
-
function Nt(
|
|
2310
|
-
|
|
2304
|
+
function Nt(w) {
|
|
2305
|
+
w != M(Ke) && (W(Ke, w, !0), pe.target(M(Ke) ? 0 : 1));
|
|
2311
2306
|
}
|
|
2312
2307
|
function pt() {
|
|
2313
2308
|
return M(j) ? pe.expired() : !0;
|
|
@@ -2323,8 +2318,8 @@ function Ur(t, e) {
|
|
|
2323
2318
|
easing: jr,
|
|
2324
2319
|
callback: dt
|
|
2325
2320
|
});
|
|
2326
|
-
function dt(
|
|
2327
|
-
o.style.opacity = `${
|
|
2321
|
+
function dt(w) {
|
|
2322
|
+
o.style.opacity = `${w}`, m.style.scale = `${w}`, u.style.scale = `${w}`;
|
|
2328
2323
|
}
|
|
2329
2324
|
let k = NaN, ke = /* @__PURE__ */ B(!1), vn = -p / 2, Rt = new Bn({
|
|
2330
2325
|
value: -p / 2,
|
|
@@ -2341,62 +2336,62 @@ function Ur(t, e) {
|
|
|
2341
2336
|
stiffness: In,
|
|
2342
2337
|
callback: cs
|
|
2343
2338
|
});
|
|
2344
|
-
function ls(
|
|
2345
|
-
if (Number.isNaN(
|
|
2339
|
+
function ls(w, de) {
|
|
2340
|
+
if (Number.isNaN(w)) {
|
|
2346
2341
|
k = NaN, W(ke, !1);
|
|
2347
2342
|
return;
|
|
2348
2343
|
}
|
|
2349
2344
|
if (M(ke) == !1 || de == !0) {
|
|
2350
|
-
W(ke, !0), k =
|
|
2351
|
-
const me = en(p, v,
|
|
2345
|
+
W(ke, !0), k = w;
|
|
2346
|
+
const me = en(p, v, w);
|
|
2352
2347
|
Rt.set(Math.round(me.x)), Dt.set(Math.round(me.y));
|
|
2353
2348
|
return;
|
|
2354
2349
|
}
|
|
2355
|
-
if (k !=
|
|
2356
|
-
k =
|
|
2357
|
-
const me = en(p, v,
|
|
2350
|
+
if (k != w) {
|
|
2351
|
+
k = w;
|
|
2352
|
+
const me = en(p, v, w);
|
|
2358
2353
|
Rt.target(Math.round(me.x)), Dt.target(Math.round(me.y));
|
|
2359
2354
|
return;
|
|
2360
2355
|
}
|
|
2361
2356
|
}
|
|
2362
|
-
function us(
|
|
2363
|
-
vn =
|
|
2357
|
+
function us(w) {
|
|
2358
|
+
vn = w, wn();
|
|
2364
2359
|
}
|
|
2365
|
-
function cs(
|
|
2366
|
-
gn =
|
|
2360
|
+
function cs(w) {
|
|
2361
|
+
gn = w, wn();
|
|
2367
2362
|
}
|
|
2368
|
-
function
|
|
2369
|
-
const
|
|
2370
|
-
m.style.transform = `translate(${Math.round(
|
|
2363
|
+
function wn() {
|
|
2364
|
+
const w = vn, de = gn, me = w + p / 2, zt = de + v / 2, Ft = v < p ? me * v / p : me, Lt = v > p ? zt * p / v : zt, fs = Math.atan2(Lt, Ft) / Math.PI * 180 - 45, Vt = Math.sqrt(Ft * Ft + Lt * Lt), et = Math.min(p, v) / 2, ps = et * Math.SQRT2, jt = (Vt - et) / (ps - et), En = 0, xn = En + jt * (22.5 - En), ds = Vt < et ? Vt / et : 1, ms = -x * (me / p) * jt, vs = -x * (zt / v) * jt;
|
|
2365
|
+
m.style.transform = `translate(${Math.round(w)}px, ${Math.round(de)}px)`, u.style.transform = `scale(${ds}) rotate(${fs}deg) skew(${xn}deg, ${xn}deg)`, H.style.transform = `translate(${ms}px, ${vs}px)`;
|
|
2371
2366
|
}
|
|
2372
|
-
var hs = { invoke: a }, Qe =
|
|
2373
|
-
let
|
|
2367
|
+
var hs = { invoke: a }, Qe = Fi();
|
|
2368
|
+
let yn;
|
|
2374
2369
|
var Ot = On(Qe);
|
|
2375
2370
|
let kn;
|
|
2376
|
-
rt(Ot, (
|
|
2377
|
-
var
|
|
2371
|
+
rt(Ot, (w) => u = w, () => u);
|
|
2372
|
+
var $t = ci(Ot, 2);
|
|
2378
2373
|
let _n;
|
|
2379
|
-
var bn = On(
|
|
2374
|
+
var bn = On($t);
|
|
2380
2375
|
let Mn;
|
|
2381
|
-
return rt(bn, (
|
|
2382
|
-
Vr(Qe, 1,
|
|
2376
|
+
return rt(bn, (w) => H = w, () => H), rt($t, (w) => m = w, () => m), rt(Qe, (w) => o = w, () => o), Er(() => {
|
|
2377
|
+
Vr(Qe, 1, Lr(["element anchor", M(j) && "displayed"]), "svelte-1no6o2a"), yn = nt(Qe, "", yn, { filter: `drop-shadow(${l})` }), kn = nt(Ot, "", kn, {
|
|
2383
2378
|
width: `${c}px`,
|
|
2384
2379
|
height: `${c}px`,
|
|
2385
2380
|
"background-color": f,
|
|
2386
2381
|
"border-radius": `${h}px`
|
|
2387
|
-
}), _n = nt(
|
|
2382
|
+
}), _n = nt($t, "", _n, {
|
|
2388
2383
|
width: `${p}px`,
|
|
2389
2384
|
height: `${v}px`,
|
|
2390
2385
|
padding: `${x}px`
|
|
2391
2386
|
}), Mn = nt(bn, "", Mn, {
|
|
2392
2387
|
width: `${he}px`,
|
|
2393
|
-
height: `${
|
|
2388
|
+
height: `${ze}px`,
|
|
2394
2389
|
"border-radius": `${Pe}px`,
|
|
2395
2390
|
"background-color": Ie
|
|
2396
2391
|
});
|
|
2397
|
-
}),
|
|
2392
|
+
}), zr(t, Qe), an(hs);
|
|
2398
2393
|
}
|
|
2399
|
-
class
|
|
2394
|
+
class Li extends ft {
|
|
2400
2395
|
width;
|
|
2401
2396
|
height;
|
|
2402
2397
|
zoom;
|
|
@@ -2445,7 +2440,7 @@ class ji {
|
|
|
2445
2440
|
tooltip;
|
|
2446
2441
|
popup;
|
|
2447
2442
|
constructor(e, n) {
|
|
2448
|
-
this.id = e.id, this.pin = new
|
|
2443
|
+
this.id = e.id, this.pin = new zi(e, n), this.tooltip = new Li(e, n), e.popup != null && (this.popup = new Vi(e, n));
|
|
2449
2444
|
}
|
|
2450
2445
|
}
|
|
2451
2446
|
const qt = 4;
|
|
@@ -2522,7 +2517,7 @@ class Wi {
|
|
|
2522
2517
|
if (i.contains(a.lat, a.lng))
|
|
2523
2518
|
if (Number.isNaN(a.zoom) == !1 && a.shown && a.zoom <= r) {
|
|
2524
2519
|
const o = a.states.findLast((l) => l[0] <= r)?.[1];
|
|
2525
|
-
if (o == null) throw new Error("
|
|
2520
|
+
if (o == null) throw new Error("Failed to find angle");
|
|
2526
2521
|
a.angle = o, a.component.invoke().setDisplayed(!0), a.component.invoke().setCollapsed(!1), a.component.invoke().setAngle(o), a.marker.insert();
|
|
2527
2522
|
} else
|
|
2528
2523
|
a.component.invoke().setCollapsed(!0), a.component.invoke().getCollapsed() && (a.component.invoke().setDisplayed(!1), a.marker.remove());
|
|
@@ -2549,11 +2544,11 @@ class qi {
|
|
|
2549
2544
|
}
|
|
2550
2545
|
show(e, n) {
|
|
2551
2546
|
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;
|
|
2552
|
-
const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l), f = c.x - u.x, h = c.y - u.y, m = r.width + r.margin * 8, p = r.height + r.margin * 8, v = st(r.lat, r.lng, l), x = en(m, p, e.tooltip.angle), H = v.x + x.x, he = H + m,
|
|
2547
|
+
const r = e.popup, s = n.getViewport(), i = s.bounds, a = s.zoom, l = n.getParameters().mapSize * Math.pow(2, a), u = st(i.ne.lat, i.sw.lng, l), c = st(i.sw.lat, i.ne.lng, l), f = c.x - u.x, h = c.y - u.y, m = r.width + r.margin * 8, p = r.height + r.margin * 8, v = st(r.lat, r.lng, l), x = en(m, p, e.tooltip.angle), H = v.x + x.x, he = H + m, ze = v.y + x.y, Pe = ze + p, Ie = H - u.x, j = c.x - he, fe = ze - u.y, ye = c.y - Pe;
|
|
2553
2548
|
let Q = 0;
|
|
2554
2549
|
f < m ? Q = (Ie - j) / 2 : (Ie < 0 && (Q = Ie), j < 0 && (Q = -j));
|
|
2555
2550
|
let Z = 0;
|
|
2556
|
-
h < p ? Z = (fe -
|
|
2551
|
+
h < p ? Z = (fe - ye) / 2 : (fe < 0 && (Z = fe), ye < 0 && (Z = -ye)), (Q != 0 || Z != 0) && n.panBy(Q, Z);
|
|
2557
2552
|
}
|
|
2558
2553
|
hide(e) {
|
|
2559
2554
|
!e.popup || !e.tooltip || !e.pin || (e.pin.shown = !0, e.tooltip.shown = !0, e.popup.shown = !1);
|
|
@@ -2725,7 +2720,7 @@ function ta(t, e, n, r, s, i) {
|
|
|
2725
2720
|
const a = s;
|
|
2726
2721
|
return s = d(s + e), s = d(s + n), i = d(i + T(s, 44)), { first: d(s + r), second: d(i + a) };
|
|
2727
2722
|
}
|
|
2728
|
-
function
|
|
2723
|
+
function wt(t, e, n, r) {
|
|
2729
2724
|
return ta(b(t, e), b(t, e + 8), b(t, e + 16), b(t, e + 24), n, r);
|
|
2730
2725
|
}
|
|
2731
2726
|
function na(t) {
|
|
@@ -2747,11 +2742,11 @@ function ra(t) {
|
|
|
2747
2742
|
return n <= 16 ? Qi(e) : ea(e);
|
|
2748
2743
|
if (n <= 64)
|
|
2749
2744
|
return na(e);
|
|
2750
|
-
let r = b(e), s = d(b(e, n - 16) ^ ae), i = d(b(e, n - 56) ^ Ue), a =
|
|
2745
|
+
let r = b(e), s = d(b(e, n - 16) ^ ae), i = d(b(e, n - 56) ^ Ue), a = wt(e, n - 64, BigInt(n), s), o = wt(e, n - 32, d(BigInt(n) * ae), Ue);
|
|
2751
2746
|
i = d(i + ut(a.second) * ae), r = d(T(d(i + r), 39) * ae), s = d(T(s, 33) * ae);
|
|
2752
2747
|
let l = n - 1 & -64, u = 0;
|
|
2753
2748
|
for (; l > 0; )
|
|
2754
|
-
r = d(T(d(r + s + a.first + b(e, u + 16)), 37) * ae), s = d(T(d(s + a.second + b(e, u + 48)), 42) * ae), r ^= o.second, s ^= a.first, i = T(i ^ o.first, 33), a =
|
|
2749
|
+
r = d(T(d(r + s + a.first + b(e, u + 16)), 37) * ae), s = d(T(d(s + a.second + b(e, u + 48)), 42) * ae), r ^= o.second, s ^= a.first, i = T(i ^ o.first, 33), a = wt(e, u, d(a.second * ae), d(r + o.first)), o = wt(e, u + 32, d(i + o.second), s), [i, r] = [r, i], u += 64, l -= 64;
|
|
2755
2750
|
return qe(qe(a.first, o.first) + d(ut(s) * ae) + i, qe(a.second, o.second) + r);
|
|
2756
2751
|
}
|
|
2757
2752
|
function sa(t) {
|
|
@@ -2830,11 +2825,11 @@ var Tt = class extends Error {
|
|
|
2830
2825
|
}
|
|
2831
2826
|
};
|
|
2832
2827
|
// @__NO_SIDE_EFFECTS__
|
|
2833
|
-
function
|
|
2828
|
+
function $(t) {
|
|
2834
2829
|
return {
|
|
2835
2830
|
kind: "transformation",
|
|
2836
2831
|
type: "args",
|
|
2837
|
-
reference:
|
|
2832
|
+
reference: $,
|
|
2838
2833
|
async: !1,
|
|
2839
2834
|
schema: t,
|
|
2840
2835
|
"~run"(e, n) {
|
|
@@ -2935,11 +2930,11 @@ function C(t, e) {
|
|
|
2935
2930
|
};
|
|
2936
2931
|
}
|
|
2937
2932
|
// @__NO_SIDE_EFFECTS__
|
|
2938
|
-
function
|
|
2933
|
+
function L(t) {
|
|
2939
2934
|
return {
|
|
2940
2935
|
kind: "transformation",
|
|
2941
2936
|
type: "returns",
|
|
2942
|
-
reference:
|
|
2937
|
+
reference: L,
|
|
2943
2938
|
async: !1,
|
|
2944
2939
|
schema: t,
|
|
2945
2940
|
"~run"(e, n) {
|
|
@@ -3215,11 +3210,11 @@ function ue(t) {
|
|
|
3215
3210
|
};
|
|
3216
3211
|
}
|
|
3217
3212
|
// @__NO_SIDE_EFFECTS__
|
|
3218
|
-
function
|
|
3213
|
+
function z(t, e) {
|
|
3219
3214
|
return {
|
|
3220
3215
|
kind: "schema",
|
|
3221
3216
|
type: "tuple",
|
|
3222
|
-
reference:
|
|
3217
|
+
reference: z,
|
|
3223
3218
|
expects: "Array",
|
|
3224
3219
|
async: !1,
|
|
3225
3220
|
items: t,
|
|
@@ -3314,7 +3309,7 @@ function De(t) {
|
|
|
3314
3309
|
}
|
|
3315
3310
|
};
|
|
3316
3311
|
}
|
|
3317
|
-
function
|
|
3312
|
+
function yt(t, e, n) {
|
|
3318
3313
|
const r = t["~run"]({ value: e }, /* @__PURE__ */ Yr(n));
|
|
3319
3314
|
if (r.issues) throw new Tt(r.issues);
|
|
3320
3315
|
return r.value;
|
|
@@ -3360,7 +3355,7 @@ function pa(...t) {
|
|
|
3360
3355
|
}
|
|
3361
3356
|
};
|
|
3362
3357
|
}
|
|
3363
|
-
var da = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ Gr(32)), ma = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), ss = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), is = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), Pt = /* @__PURE__ */ R({ lat: ss, lng: is }), as = /* @__PURE__ */ R({ sw: Pt, ne: Pt }), va = /* @__PURE__ */ R({ bounds: as, center: Pt, zoom: /* @__PURE__ */ E() }), tn = /* @__PURE__ */ ns((t) => t instanceof HTMLElement, "Must be an HTMLElement"), ga = /* @__PURE__ */ R({ mapSize: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(1)), zoomMin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomMax: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomScale: /* @__PURE__ */ mn([/* @__PURE__ */ Re(1), /* @__PURE__ */ Re(2), /* @__PURE__ */ Re(10)]) }),
|
|
3358
|
+
var da = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ Gr(32)), ma = /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), ss = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), is = /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), Pt = /* @__PURE__ */ R({ lat: ss, lng: is }), as = /* @__PURE__ */ R({ sw: Pt, ne: Pt }), va = /* @__PURE__ */ R({ bounds: as, center: Pt, zoom: /* @__PURE__ */ E() }), tn = /* @__PURE__ */ ns((t) => t instanceof HTMLElement, "Must be an HTMLElement"), ga = /* @__PURE__ */ R({ mapSize: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(1)), zoomMin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomMax: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), zoomScale: /* @__PURE__ */ mn([/* @__PURE__ */ Re(1), /* @__PURE__ */ Re(2), /* @__PURE__ */ Re(10)]) }), wa = /* @__PURE__ */ R({ inserted: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ ts())), insert: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), remove: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ De())), update: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Hn = /* @__PURE__ */ mn([/* @__PURE__ */ Re("idle"), /* @__PURE__ */ Re("move"), /* @__PURE__ */ Re("click")]), ya = /* @__PURE__ */ R({ getParameters: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(ga)), getContainer: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(tn)), getZoom: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(/* @__PURE__ */ E())), getBounds: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(as)), getCenter: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(Pt)), getViewport: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([])), /* @__PURE__ */ L(va)), panBy: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ E(), /* @__PURE__ */ E()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), createMarker: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([tn, ss, is, /* @__PURE__ */ E()])), /* @__PURE__ */ L(wa)), subscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())), unsubscribe: /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([Hn, /* @__PURE__ */ A()])), /* @__PURE__ */ L(/* @__PURE__ */ De())) }), Zt = /* @__PURE__ */ g(/* @__PURE__ */ A(), /* @__PURE__ */ $(/* @__PURE__ */ z([/* @__PURE__ */ ue()])), /* @__PURE__ */ Kr(/* @__PURE__ */ pa(/* @__PURE__ */ rs(), /* @__PURE__ */ Xr(), tn))), ka = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), padding: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), border: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), Zn = /* @__PURE__ */ R({ dimensions: /* @__PURE__ */ g(/* @__PURE__ */ R({ width: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), height: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), margin: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), radius: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)) }), /* @__PURE__ */ Jr((t) => Math.min(t.width, t.height) / t.margin >= 4, "Minimum of width or height must be greater than or equal to 4 * margin")), colors: /* @__PURE__ */ re(/* @__PURE__ */ R({ background: /* @__PURE__ */ re(/* @__PURE__ */ ue()), shadow: /* @__PURE__ */ re(/* @__PURE__ */ ue()) })) }), _a = /* @__PURE__ */ R({ id: /* @__PURE__ */ g(/* @__PURE__ */ ue(), /* @__PURE__ */ dn(1)), rank: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(0)), lat: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-90), /* @__PURE__ */ ct(90)), lng: /* @__PURE__ */ g(/* @__PURE__ */ E(), /* @__PURE__ */ C(-180), /* @__PURE__ */ ct(180)), tooltip: /* @__PURE__ */ R({ style: Zn, body: Zt }), pin: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: ka, body: /* @__PURE__ */ re(Zt) })), popup: /* @__PURE__ */ re(/* @__PURE__ */ R({ style: Zn, body: Zt })) });
|
|
3364
3359
|
class ba {
|
|
3365
3360
|
apiKey;
|
|
3366
3361
|
apiJwt;
|
|
@@ -3402,7 +3397,7 @@ class ba {
|
|
|
3402
3397
|
return s.jwt && (this.apiJwt = s.jwt), s.states;
|
|
3403
3398
|
}
|
|
3404
3399
|
}
|
|
3405
|
-
const Yn = "1.2.
|
|
3400
|
+
const Yn = "1.2.21", Ma = "https://maps.api.arenarium.dev/auth", Ea = "https://maps.api.arenarium.dev/log", Xn = 500;
|
|
3406
3401
|
class os {
|
|
3407
3402
|
apiKey;
|
|
3408
3403
|
mapProvider;
|
|
@@ -3417,7 +3412,7 @@ class os {
|
|
|
3417
3412
|
markerStatesProcessDelay = Xn;
|
|
3418
3413
|
markerStatesProcessTimeout = void 0;
|
|
3419
3414
|
constructor(e, n, r, s) {
|
|
3420
|
-
|
|
3415
|
+
yt(da, e), yt(ma, n), yt(ya, r), this.apiKey = e, this.mapProvider = r, this.mapStateProvider = new ks(
|
|
3421
3416
|
this.mapProvider,
|
|
3422
3417
|
this.detached.bind(this),
|
|
3423
3418
|
this.error.bind(this),
|
|
@@ -3521,7 +3516,7 @@ class os {
|
|
|
3521
3516
|
//#endregion
|
|
3522
3517
|
//#region Public
|
|
3523
3518
|
async updateMarkers(e) {
|
|
3524
|
-
|
|
3519
|
+
yt(/* @__PURE__ */ es(_a), e);
|
|
3525
3520
|
try {
|
|
3526
3521
|
const n = this.mapProvider.getParameters();
|
|
3527
3522
|
for (const s of e)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arenarium/maps",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "arenarium",
|
|
6
6
|
"description": "Visualize complex map markers clearly. A JavaScript library for effective display of map markers, compatible with MapLibre, Mapbox, and Google Maps.",
|