@arenarium/maps 1.3.11 → 1.3.12

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