@arenarium/maps 1.2.27 → 1.2.29

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