@arenarium/maps 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.umd.js DELETED
@@ -1 +0,0 @@
1
- (function(oe,$e){typeof exports=="object"&&typeof module<"u"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(oe=typeof globalThis<"u"?globalThis:oe||self,$e(oe.ArenariumMaps={}))})(this,(function(oe){"use strict";var er=Array.isArray,gn=Array.prototype.indexOf,_n=Array.from,mt=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,wn=Object.prototype,En=Array.prototype,kn=Object.getPrototypeOf,tr=Object.isExtensible;function bn(t){for(var e=0;e<t.length;e++)t[e]()}function Mn(){var t,e,r=new Promise((n,i)=>{t=n,e=i});return{promise:r,resolve:t,reject:e}}const O=2,yt=4,rr=8,we=16,ae=32,de=64,gt=128,j=256,et=512,I=1024,K=2048,le=4096,Ee=8192,ke=16384,_t=32768,nr=65536,ir=1<<17,xn=1<<18,be=1<<19,Pn=1<<20,wt=1<<21,Et=1<<22,ve=1<<23,tt=Symbol("$state"),kt=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function Sn(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function An(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Cn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Tn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Ln(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function In(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Dn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function On(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Fn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Rn=2,M=Symbol();function Nn(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function sr(t){return t===this.v}let ms=!1,z=null;function Me(t){z=t}function bt(t,e=!1,r){z={p:z,c:null,e:null,s:t,x:null,l:null}}function Mt(t){var e=z,r=e.e;if(r!==null){e.e=null;for(var n of r)Er(n)}return t!==void 0&&(e.x=t),z=e.p,t??{}}function or(){return!0}let xe=[];function jn(){var t=xe;xe=[],bn(t)}function rt(t){if(xe.length===0){var e=xe;queueMicrotask(()=>{e===xe&&jn()})}xe.push(t)}const zn=new WeakMap;function ar(t){var e=m;if(e===null)return v.f|=ve,t;if((e.f&_t)===0){if((e.f&gt)===0)throw!e.parent&&t instanceof Error&&lr(t),t;e.b.error(t)}else Pe(t,e)}function Pe(t,e){for(;e!==null;){if((e.f&gt)!==0)try{e.b.error(t);return}catch(r){t=r}e=e.parent}throw t instanceof Error&&lr(t),t}function lr(t){const e=zn.get(t);e&&(mt(t,"message",{value:e.message}),mt(t,"stack",{value:e.stack}))}const xt=new Set;let A=null,Pt=new Set,je=[],St=null,At=!1;class ie{current=new Map;#e=new Map;#t=new Set;#a=0;#n=null;#c=!1;#o=[];#i=[];#r=[];#s=[];#l=[];#p=[];#f=[];skipped_effects=new Set;process(e){je=[];for(const i of e)this.#h(i);if(this.#o.length===0&&this.#a===0){this.#d();var r=this.#r,n=this.#s;this.#r=[],this.#s=[],this.#l=[],A=null,ur(r),ur(n),A===null?A=this:xt.delete(this),this.#n?.resolve()}else this.#u(this.#r),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)Ce(i);for(const i of this.#i)Ce(i);this.#o=[],this.#i=[]}#h(e){e.f^=I;for(var r=e.first;r!==null;){var n=r.f,i=(n&(ae|de))!==0,s=i&&(n&I)!==0,o=s||(n&Ee)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=I;else if((n&yt)!==0)this.#s.push(r);else if((n&I)===0)if((n&Et)!==0){var l=r.b?.is_pending()?this.#i:this.#o;l.push(r)}else ot(r)&&((r.f&we)!==0&&this.#l.push(r),Ce(r));var a=r.first;if(a!==null){r=a;continue}}var u=r.parent;for(r=r.next;r===null&&u!==null;)r=u.next,u=u.parent}}#u(e){for(const r of e)((r.f&K)!==0?this.#p:this.#f).push(r),U(r,I);e.length=0}capture(e,r){this.#e.has(e)||this.#e.set(e,r),this.current.set(e,e.v)}activate(){A=this}deactivate(){A=null;for(const e of Pt)if(Pt.delete(e),e(),A!==null)break}neuter(){this.#c=!0}flush(){je.length>0?Bn():this.#d(),A===this&&(this.#a===0&&xt.delete(this),this.deactivate())}#d(){if(!this.#c)for(const e of this.#t)e();this.#t.clear()}increment(){this.#a+=1}decrement(){if(this.#a-=1,this.#a===0){for(const e of this.#p)U(e,K),ze(e);for(const e of this.#f)U(e,le),ze(e);this.#r=[],this.#s=[],this.flush()}else this.deactivate()}add_callback(e){this.#t.add(e)}settled(){return(this.#n??=Mn()).promise}static ensure(){if(A===null){const e=A=new ie;xt.add(A),ie.enqueue(()=>{A===e&&e.flush()})}return A}static enqueue(e){rt(e)}}function Bn(){var t=Se;At=!0;try{var e=0;for(Sr(!0);je.length>0;){var r=ie.ensure();if(e++>1e3){var n,i;Un()}r.process(je),ue.clear()}}finally{At=!1,Sr(t),St=null}}function Un(){try{Ln()}catch(t){Pe(t,St)}}let me=null;function ur(t){var e=t.length;if(e!==0){for(var r=0;r<e;){var n=t[r++];if((n.f&(ke|Ee))===0&&ot(n)&&(me=[],Ce(n),n.deps===null&&n.first===null&&n.nodes_start===null&&(n.teardown===null&&n.ac===null?xr(n):n.fn=null),me?.length>0)){ue.clear();for(const i of me)Ce(i);me=[]}}me=null}}function ze(t){for(var e=St=t;e.parent!==null;){e=e.parent;var r=e.f;if(At&&e===m&&(r&we)!==0)return;if((r&(de|ae))!==0){if((r&I)===0)return;e.f^=I}}je.push(e)}function Zn(t){let e=0,r=nt(0),n;return()=>{ni()&&(g(r),Lt(()=>(e===0&&(n=Fr(()=>t(()=>Be(r)))),e+=1,()=>{rt(()=>{e-=1,e===0&&(n?.(),n=void 0,Be(r))})})))}}var qn=nr|be|gt;function Hn(t,e,r){new Yn(t,e,r)}class Yn{parent;#e=!1;#t;#a=null;#n;#c;#o;#i=null;#r=null;#s=null;#l=null;#p=0;#f=0;#h=!1;#u=null;#d=()=>{this.#u&&it(this.#u,this.#p)};#g=Zn(()=>(this.#u=nt(this.#p),()=>{this.#u=null}));constructor(e,r,n){this.#t=e,this.#n=r,this.#c=n,this.parent=m.b,this.#e=!!this.#n.pending,this.#o=ai(()=>{m.b=this;{try{this.#i=ye(()=>n(this.#t))}catch(i){this.error(i)}this.#f>0?this.#m():this.#e=!1}},qn)}#_(){try{this.#i=ye(()=>this.#c(this.#t))}catch(e){this.error(e)}this.#e=!1}#w(){const e=this.#n.pending;e&&(this.#r=ye(()=>e(this.#t)),ie.enqueue(()=>{this.#i=this.#v(()=>(ie.ensure(),ye(()=>this.#c(this.#t)))),this.#f>0?this.#m():(st(this.#r,()=>{this.#r=null}),this.#e=!1)}))}is_pending(){return this.#e||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#v(e){var r=m,n=v,i=z;$(this.#o),D(this.#o),Me(this.#o.ctx);try{return e()}catch(s){return ar(s),null}finally{$(r),D(n),Me(i)}}#m(){const e=this.#n.pending;this.#i!==null&&(this.#l=document.createDocumentFragment(),Vn(this.#i,this.#l)),this.#r===null&&(this.#r=ye(()=>e(this.#t)))}#y(e){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(e);return}this.#f+=e,this.#f===0&&(this.#e=!1,this.#r&&st(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#p+=e,Pt.add(this.#d)}get_effect_pending(){return this.#g(),g(this.#u)}error(e){var r=this.#n.onerror;let n=this.#n.failed;if(this.#h||!r&&!n)throw e;this.#i&&(Q(this.#i),this.#i=null),this.#r&&(Q(this.#r),this.#r=null),this.#s&&(Q(this.#s),this.#s=null);var i=!1,s=!1;const o=()=>{if(i){Nn();return}i=!0,s&&Fn(),ie.ensure(),this.#p=0,this.#s!==null&&st(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#h=!1,ye(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var l=v;try{D(null),s=!0,r?.(e,o),s=!1}catch(a){Pe(a,this.#o&&this.#o.parent)}finally{D(l)}n&&rt(()=>{this.#s=this.#v(()=>{this.#h=!0;try{return ye(()=>{n(this.#t,()=>e,()=>o)})}catch(a){return Pe(a,this.#o.parent),null}finally{this.#h=!1}})})}}function Vn(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var i=r===n?null:Tt(r);e.append(r),r=i}}function Xn(t,e,r){const n=Gn;if(e.length===0){r(t.map(n));return}var i=A,s=m,o=Wn();Promise.all(e.map(l=>Kn(l))).then(l=>{i?.activate(),o();try{r([...t.map(n),...l])}catch(a){(s.f&ke)===0&&Pe(a,s)}i?.deactivate(),fr()}).catch(l=>{Pe(l,s)})}function Wn(){var t=m,e=v,r=z,n=A;return function(){$(t),D(e),Me(r),n?.activate()}}function fr(){$(null),D(null),Me(null)}function Gn(t){var e=O|K,r=v!==null&&(v.f&O)!==0?v:null;return m===null||r!==null&&(r.f&j)!==0?e|=j:m.f|=be,{ctx:z,deps:null,effects:null,equals:sr,f:e,fn:t,reactions:null,rv:0,v:M,wv:0,parent:r??m,ac:null}}function Kn(t,e){let r=m;r===null&&Sn();var n=r.b,i=void 0,s=nt(M),o=null,l=!v;return oi(()=>{try{var a=t();o&&Promise.resolve(a).catch(()=>{})}catch(c){a=Promise.reject(c)}var u=()=>a;i=o?.then(u,u)??Promise.resolve(a),o=i;var f=A,h=n.is_pending();l&&(n.update_pending_count(1),h||f.increment());const p=(c,d=void 0)=>{o=null,h||f.activate(),d?d!==kt&&(s.f|=ve,it(s,d)):((s.f&ve)!==0&&(s.f^=ve),it(s,c)),l&&(n.update_pending_count(-1),h||f.decrement()),fr()};if(i.then(p,c=>p(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(a=>{function u(f){function h(){f===i?a(s):u(i)}f.then(h,h)}u(i)})}function cr(t){var e=t.effects;if(e!==null){t.effects=null;for(var r=0;r<e.length;r+=1)Q(e[r])}}function Jn(t){for(var e=t.parent;e!==null;){if((e.f&O)===0)return e;e=e.parent}return null}function Ct(t){var e,r=m;$(Jn(t));try{cr(t),e=Dr(t)}finally{$(r)}return e}function pr(t){var e=Ct(t);if(t.equals(e)||(t.v=e,t.wv=Lr()),!Ae){var r=(ce||(t.f&j)!==0)&&t.deps!==null?le:I;U(t,r)}}const ue=new Map;function nt(t,e){var r={f:0,v:t,reactions:null,equals:sr,rv:0,wv:0};return r}function C(t,e){const r=nt(t);return ci(r),r}function x(t,e,r=!1){v!==null&&(!V||(v.f&ir)!==0)&&or()&&(v.f&(O|we|Et|ir))!==0&&!se?.includes(t)&&On();let n=r?Ue(e):e;return it(t,n)}function it(t,e){if(!t.equals(e)){var r=t.v;Ae?ue.set(t,e):ue.set(t,r),t.v=e;var n=ie.ensure();n.capture(t,r),(t.f&O)!==0&&((t.f&K)!==0&&Ct(t),U(t,(t.f&j)===0?I:le)),t.wv=Lr(),hr(t,K),m!==null&&(m.f&I)!==0&&(m.f&(ae|de))===0&&(B===null?pi([t]):B.push(t))}return e}function Be(t){x(t,t.v+1)}function hr(t,e){var r=t.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],o=s.f,l=(o&K)===0;l&&U(s,e),(o&O)!==0?hr(s,le):l&&((o&we)!==0&&me!==null&&me.push(s),ze(s))}}function Ue(t){if(typeof t!="object"||t===null||tt in t)return t;const e=kn(t);if(e!==wn&&e!==En)return t;var r=new Map,n=er(t),i=C(0),s=ge,o=l=>{if(ge===s)return l();var a=v,u=ge;D(null),Tr(s);var f=l();return D(a),Tr(u),f};return n&&r.set("length",C(t.length)),new Proxy(t,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&In();var f=r.get(a);return f===void 0?f=o(()=>{var h=C(u.value);return r.set(a,h),h}):x(f,u.value,!0),!0},deleteProperty(l,a){var u=r.get(a);if(u===void 0){if(a in l){const f=o(()=>C(M));r.set(a,f),Be(i)}}else x(u,M),Be(i);return!0},get(l,a,u){if(a===tt)return t;var f=r.get(a),h=a in l;if(f===void 0&&(!h||Ne(l,a)?.writable)&&(f=o(()=>{var c=Ue(h?l[a]:M),d=C(c);return d}),r.set(a,f)),f!==void 0){var p=g(f);return p===M?void 0:p}return Reflect.get(l,a,u)},getOwnPropertyDescriptor(l,a){var u=Reflect.getOwnPropertyDescriptor(l,a);if(u&&"value"in u){var f=r.get(a);f&&(u.value=g(f))}else if(u===void 0){var h=r.get(a),p=h?.v;if(h!==void 0&&p!==M)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(l,a){if(a===tt)return!0;var u=r.get(a),f=u!==void 0&&u.v!==M||Reflect.has(l,a);if(u!==void 0||m!==null&&(!f||Ne(l,a)?.writable)){u===void 0&&(u=o(()=>{var p=f?Ue(l[a]):M,c=C(p);return c}),r.set(a,u));var h=g(u);if(h===M)return!1}return f},set(l,a,u,f){var h=r.get(a),p=a in l;if(n&&a==="length")for(var c=u;c<h.v;c+=1){var d=r.get(c+"");d!==void 0?x(d,M):c in l&&(d=o(()=>C(M)),r.set(c+"",d))}if(h===void 0)(!p||Ne(l,a)?.writable)&&(h=o(()=>C(void 0)),x(h,Ue(u)),r.set(a,h));else{p=h.v!==M;var E=o(()=>Ue(u));x(h,E)}var N=Reflect.getOwnPropertyDescriptor(l,a);if(N?.set&&N.set.call(f,u),!p){if(n&&typeof a=="string"){var ne=r.get("length"),b=Number(a);Number.isInteger(b)&&b>=ne.v&&x(ne,b+1)}Be(i)}return!0},ownKeys(l){g(i);var a=Reflect.ownKeys(l).filter(h=>{var p=r.get(h);return p===void 0||p.v!==M});for(var[u,f]of r)f.v!==M&&!(u in l)&&a.push(u);return a},setPrototypeOf(){Dn()}})}var dr,vr,mr,yr;function Qn(){if(dr===void 0){dr=window,vr=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,r=Text.prototype;mr=Ne(e,"firstChild").get,yr=Ne(e,"nextSibling").get,tr(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),tr(r)&&(r.__t=void 0)}}function $n(t=""){return document.createTextNode(t)}function gr(t){return mr.call(t)}function Tt(t){return yr.call(t)}function _r(t,e){return gr(t)}function ei(t,e=1,r=!1){let n=t;for(;e--;)n=Tt(n);return n}function wr(t){var e=v,r=m;D(null),$(null);try{return t()}finally{D(e),$(r)}}function ti(t){m===null&&v===null&&Tn(),v!==null&&(v.f&j)!==0&&m===null&&Cn(),Ae&&An()}function ri(t,e){var r=e.last;r===null?e.last=e.first=t:(r.next=t,t.prev=r,e.last=t)}function fe(t,e,r,n=!0){var i=m;i!==null&&(i.f&Ee)!==0&&(t|=Ee);var s={ctx:z,deps:null,nodes_start:null,nodes_end:null,f:t|K,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(r)try{Ce(s),s.f|=_t}catch(a){throw Q(s),a}else e!==null&&ze(s);if(n){var o=s;if(r&&o.deps===null&&o.teardown===null&&o.nodes_start===null&&o.first===o.last&&(o.f&be)===0&&(o=o.first),o!==null&&(o.parent=i,i!==null&&ri(o,i),v!==null&&(v.f&O)!==0&&(t&de)===0)){var l=v;(l.effects??=[]).push(o)}}return s}function ni(){return v!==null&&!V}function J(t){ti();var e=m.f,r=!v&&(e&ae)!==0&&(e&_t)===0;if(r){var n=z;(n.e??=[]).push(t)}else return Er(t)}function Er(t){return fe(yt|Pn,t,!1)}function ii(t){ie.ensure();const e=fe(de|be,t,!0);return(r={})=>new Promise(n=>{r.outro?st(e,()=>{Q(e),n(void 0)}):(Q(e),n(void 0))})}function si(t){return fe(yt,t,!1)}function oi(t){return fe(Et|be,t,!0)}function Lt(t,e=0){return fe(rr|e,t,!0)}function kr(t,e=[],r=[]){Xn(e,r,n=>{fe(rr,()=>t(...n.map(g)),!0)})}function ai(t,e=0){var r=fe(we|e,t,!0);return r}function ye(t,e=!0){return fe(ae|be,t,!0,e)}function br(t){var e=t.teardown;if(e!==null){const r=Ae,n=v;Ar(!0),D(null);try{e.call(null)}finally{Ar(r),D(n)}}}function Mr(t,e=!1){var r=t.first;for(t.first=t.last=null;r!==null;){const i=r.ac;i!==null&&wr(()=>{i.abort(kt)});var n=r.next;(r.f&de)!==0?r.parent=null:Q(r,e),r=n}}function li(t){for(var e=t.first;e!==null;){var r=e.next;(e.f&ae)===0&&Q(e),e=r}}function Q(t,e=!0){var r=!1;(e||(t.f&xn)!==0)&&t.nodes_start!==null&&t.nodes_end!==null&&(ui(t.nodes_start,t.nodes_end),r=!0),Mr(t,e&&!r),at(t,0),U(t,ke);var n=t.transitions;if(n!==null)for(const s of n)s.stop();br(t);var i=t.parent;i!==null&&i.first!==null&&xr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ui(t,e){for(;t!==null;){var r=t===e?null:Tt(t);t.remove(),t=r}}function xr(t){var e=t.parent,r=t.prev,n=t.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),e!==null&&(e.first===t&&(e.first=n),e.last===t&&(e.last=r))}function st(t,e){var r=[];Pr(t,r,!0),fi(r,()=>{Q(t),e&&e()})}function fi(t,e){var r=t.length;if(r>0){var n=()=>--r||e();for(var i of t)i.out(n)}else e()}function Pr(t,e,r){if((t.f&Ee)===0){if(t.f^=Ee,t.transitions!==null)for(const o of t.transitions)(o.is_global||r)&&e.push(o);for(var n=t.first;n!==null;){var i=n.next,s=(n.f&nr)!==0||(n.f&ae)!==0;Pr(n,e,s?r:!1),n=i}}}let Se=!1;function Sr(t){Se=t}let Ae=!1;function Ar(t){Ae=t}let v=null,V=!1;function D(t){v=t}let m=null;function $(t){m=t}let se=null;function ci(t){v!==null&&(se===null?se=[t]:se.push(t))}let T=null,F=0,B=null;function pi(t){B=t}let Cr=1,Ze=0,ge=Ze;function Tr(t){ge=t}let ce=!1;function Lr(){return++Cr}function ot(t){var e=t.f;if((e&K)!==0)return!0;if((e&le)!==0){var r=t.deps,n=(e&j)!==0;if(r!==null){var i,s,o=(e&et)!==0,l=n&&m!==null&&!ce,a=r.length;if((o||l)&&(m===null||(m.f&ke)===0)){var u=t,f=u.parent;for(i=0;i<a;i++)s=r[i],(o||!s?.reactions?.includes(u))&&(s.reactions??=[]).push(u);o&&(u.f^=et),l&&f!==null&&(f.f&j)===0&&(u.f^=j)}for(i=0;i<a;i++)if(s=r[i],ot(s)&&pr(s),s.wv>t.wv)return!0}(!n||m!==null&&!ce)&&U(t,I)}return!1}function Ir(t,e,r=!0){var n=t.reactions;if(n!==null&&!se?.includes(t))for(var i=0;i<n.length;i++){var s=n[i];(s.f&O)!==0?Ir(s,e,!1):e===s&&(r?U(s,K):(s.f&I)!==0&&U(s,le),ze(s))}}function Dr(t){var e=T,r=F,n=B,i=v,s=ce,o=se,l=z,a=V,u=ge,f=t.f;T=null,F=0,B=null,ce=(f&j)!==0&&(V||!Se||v===null),v=(f&(ae|de))===0?t:null,se=null,Me(t.ctx),V=!1,ge=++Ze,t.ac!==null&&(wr(()=>{t.ac.abort(kt)}),t.ac=null);try{t.f|=wt;var h=t.fn,p=h(),c=t.deps;if(T!==null){var d;if(at(t,F),c!==null&&F>0)for(c.length=F+T.length,d=0;d<T.length;d++)c[F+d]=T[d];else t.deps=c=T;if(!ce||(f&O)!==0&&t.reactions!==null)for(d=F;d<c.length;d++)(c[d].reactions??=[]).push(t)}else c!==null&&F<c.length&&(at(t,F),c.length=F);if(or()&&B!==null&&!V&&c!==null&&(t.f&(O|le|K))===0)for(d=0;d<B.length;d++)Ir(B[d],t);return i!==null&&i!==t&&(Ze++,B!==null&&(n===null?n=B:n.push(...B))),(t.f&ve)!==0&&(t.f^=ve),p}catch(E){return ar(E)}finally{t.f^=wt,T=e,F=r,B=n,v=i,ce=s,se=o,Me(l),V=a,ge=u}}function hi(t,e){let r=e.reactions;if(r!==null){var n=gn.call(r,t);if(n!==-1){var i=r.length-1;i===0?r=e.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(e.f&O)!==0&&(T===null||!T.includes(e))&&(U(e,le),(e.f&(j|et))===0&&(e.f^=et),cr(e),at(e,0))}function at(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)hi(t,r[n])}function Ce(t){var e=t.f;if((e&ke)===0){U(t,I);var r=m,n=Se;m=t,Se=!0;try{(e&we)!==0?li(t):Mr(t),br(t);var i=Dr(t);t.teardown=typeof i=="function"?i:null,t.wv=Cr;var s}finally{Se=n,m=r}}}function g(t){var e=t.f,r=(e&O)!==0;if(v!==null&&!V){var n=m!==null&&(m.f&ke)!==0;if(!n&&!se?.includes(t)){var i=v.deps;if((v.f&wt)!==0)t.rv<Ze&&(t.rv=Ze,T===null&&i!==null&&i[F]===t?F++:T===null?T=[t]:(!ce||!T.includes(t))&&T.push(t));else{(v.deps??=[]).push(t);var s=t.reactions;s===null?t.reactions=[v]:s.includes(v)||s.push(v)}}}else if(r&&t.deps===null&&t.effects===null){var o=t,l=o.parent;l!==null&&(l.f&j)===0&&(o.f^=j)}if(Ae){if(ue.has(t))return ue.get(t);if(r){o=t;var a=o.v;return((o.f&I)===0&&o.reactions!==null||Or(o))&&(a=Ct(o)),ue.set(o,a),a}}else r&&(o=t,ot(o)&&pr(o));if((t.f&ve)!==0)throw t.v;return t.v}function Or(t){if(t.v===M)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(ue.has(e)||(e.f&O)!==0&&Or(e))return!0;return!1}function Fr(t){var e=V;try{return V=!0,t()}finally{V=e}}const di=-7169;function U(t,e){t.f=t.f&di|e}const vi=["touchstart","touchmove"];function mi(t){return vi.includes(t)}const yi=new Set,Rr=new Set;let Nr=null;function lt(t){var e=this,r=e.ownerDocument,n=t.type,i=t.composedPath?.()||[],s=i[0]||t.target;Nr=t;var o=0,l=Nr===t&&t.__root;if(l){var a=i.indexOf(l);if(a!==-1&&(e===document||e===window)){t.__root=e;return}var u=i.indexOf(e);if(u===-1)return;a<=u&&(o=a)}if(s=i[o]||t.target,s!==e){mt(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=v,h=m;D(null),$(null);try{for(var p,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var E=s["__"+n];if(E!=null&&(!s.disabled||t.target===s))if(er(E)){var[N,...ne]=E;N.apply(s,[t,...ne])}else E.call(s,t)}catch(b){p?c.push(b):p=b}if(t.cancelBubble||d===e||d===null)break;s=d}if(p){for(let b of c)queueMicrotask(()=>{throw b});throw p}}finally{t.__root=e,delete t.currentTarget,D(f),$(h)}}}function gi(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function _i(t,e){var r=m;r.nodes_start===null&&(r.nodes_start=t,r.nodes_end=e)}function jr(t,e){var r=(e&Rn)!==0,n,i=!t.startsWith("<!>");return()=>{n===void 0&&(n=gi(i?t:"<!>"+t),n=gr(n));var s=r||vr?document.importNode(n,!0):n.cloneNode(!0);return _i(s,s),s}}function zr(t,e){t!==null&&t.before(e)}function It(t,e){return wi(t,e)}const Te=new Map;function wi(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){Qn();var l=new Set,a=h=>{for(var p=0;p<h.length;p++){var c=h[p];if(!l.has(c)){l.add(c);var d=mi(c);e.addEventListener(c,lt,{passive:d});var E=Te.get(c);E===void 0?(document.addEventListener(c,lt,{passive:d}),Te.set(c,1)):Te.set(c,E+1)}}};a(_n(yi)),Rr.add(a);var u=void 0,f=ii(()=>{var h=r??e.appendChild($n());return Hn(h,{pending:()=>{}},p=>{if(s){bt({});var c=z;c.c=s}i&&(n.$$events=i),u=t(p,n)||{},s&&Mt()}),()=>{for(var p of l){e.removeEventListener(p,lt);var c=Te.get(p);--c===0?(document.removeEventListener(p,lt),Te.delete(p)):Te.set(p,c)}Rr.delete(a),h!==r&&h.parentNode?.removeChild(h)}});return Ei.set(u,f),u}let Ei=new WeakMap;function Br(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=Br(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function ki(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=Br(t))&&(n&&(n+=" "),n+=e);return n}function Ur(t){return typeof t=="object"?ki(t):t??""}function bi(t,e,r){var n=t==null?"":""+t;return e&&(n=n?n+" "+e:e),n===""?null:n}function Zr(t,e=!1){var r=e?" !important;":";",n="";for(var i in t){var s=t[i];s!=null&&s!==""&&(n+=" "+i+": "+s+r)}return n}function Mi(t,e){if(e){var r="",n,i;return Array.isArray(e)?(n=e[0],i=e[1]):n=e,n&&(r+=Zr(n)),i&&(r+=Zr(i,!0)),r=r.trim(),r===""?null:r}return String(t)}function qr(t,e,r,n,i,s){var o=t.__className;if(o!==r||o===void 0){var l=bi(r,n);l==null?t.removeAttribute("class"):t.className=l,t.__className=r}return s}function Dt(t,e={},r,n){for(var i in r){var s=r[i];e[i]!==s&&(r[i]==null?t.style.removeProperty(i):t.style.setProperty(i,s,n))}}function qe(t,e,r,n){var i=t.__style;if(i!==e){var s=Mi(e,n);s==null?t.removeAttribute("style"):t.style.cssText=s,t.__style=e}else n&&(Array.isArray(n)?(Dt(t,r?.[0],n[0]),Dt(t,r?.[1],n[1],"important")):Dt(t,r,n));return n}const xi=()=>performance.now(),ee={tick:t=>requestAnimationFrame(t),now:()=>xi(),tasks:new Set};function Hr(){const t=ee.now();ee.tasks.forEach(e=>{e.c(t)||(ee.tasks.delete(e),e.f())}),ee.tasks.size!==0&&ee.tick(Hr)}function Pi(t){let e;return ee.tasks.size===0&&ee.tick(Hr),{promise:new Promise(r=>{ee.tasks.add(e={c:t,f:r})}),abort(){ee.tasks.delete(e)}}}function Yr(t,e){return t===e||t?.[tt]===e}function He(t={},e,r,n){return si(()=>{var i,s;return Lt(()=>{i=s,s=[],Fr(()=>{t!==r(...s)&&(e(t,...s),i&&Yr(r(...i),t)&&e(null,...i))})}),()=>{rt(()=>{s&&Yr(r(...s),t)&&e(null,...s)})}}),t}const Si="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Si);function Ai(t){return t}function Ot(t){return-.5*(Math.cos(Math.PI*t)-1)}function Ci(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ti(t){return Math.sin(t*Math.PI/2)}const Li=128,Ii=0,Di=1,Oi=2;class Fi{animationsStarted=!1;animationsCount=0;animationsLimit=Li;layers=new Array;start(){window.requestAnimationFrame(this.tick.bind(this))}tick(){try{this.animationsCount=0;for(let e=0;e<this.layers.length;e++){const r=this.layers[e];if(r==null)continue;const n=r.animations;if(n!=null)for(let i=0;i<n.length;i++){const s=n[i];if(s!=null){for(const o of s.values())if(!o.executed&&(o.executed=!0,o.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,r,n,i){let s=this.layers[e];s==null&&(s=this.layers[e]={animations:new Array});let o=s.animations[r];o==null&&(o=s.animations[r]=new Map);let l={id:n,priority:r,executed:!1,function:i};o.set(n,l),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,r){for(let n=0;n<this.layers.length;n++){let i=this.layers[n];if(i==null)continue;let s=i.animations[e];if(s==null)return;let o=s.get(r);if(o==null||o.executed==!1)return;s.delete(r)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const pe=new Fi;function Vr(t){return Object.prototype.toString.call(t)==="[object Date]"}function Ft(t,e){if(t===e||t!==t)return()=>t;const r=typeof t;if(r!==typeof e||Array.isArray(t)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(t)){const n=e.map((i,s)=>Ft(t[s],i));return i=>n.map(s=>s(i))}if(r==="object"){if(!t||!e)throw new Error("Object cannot be null");if(Vr(t)&&Vr(e)){const s=t.getTime(),l=e.getTime()-s;return a=>new Date(s+a*l)}const n=Object.keys(e),i={};return n.forEach(s=>{i[s]=Ft(t[s],e[s])}),s=>{const o={};return n.forEach(l=>{o[l]=i[l](s)}),o}}if(r==="number"){const n=e-t;return i=>t+i*n}return()=>e}class Rt{#e;#t;#a;#n=null;constructor(e,r={}){this.#e=C(e),this.#t=C(e),this.#a=r}static of(e,r){const n=new Rt(e(),r);return Lt(()=>{n.set(e())}),n}set(e,r){x(this.#t,e);let{delay:n=0,duration:i=400,easing:s=Ai,interpolate:o=Ft}={...this.#a,...r};if(i===0)return this.#n?.abort(),x(this.#e,e),Promise.resolve();const l=ee.now()+n;let a,u=!1,f=this.#n;return this.#n=Pi(h=>{if(h<l)return!0;if(!u){u=!0;const c=this.#e.v;a=o(c,e),typeof i=="function"&&(i=i(c,e)),f?.abort()}const p=h-l;return p>i?(x(this.#e,e),!1):(x(this.#e,a(s(p/i))),!0)}),this.#n.promise}get current(){return g(this.#e)}get target(){return g(this.#t)}set target(e){this.set(e)}}class ut{value;motion;constructor(e,r){this.value=e,this.motion=new Rt(e,r)}set(e,r){this.value=e,this.motion.set(e,r)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Ri=jr("<div></div>");function Ni(t,e){bt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.radius,s=e.colors?.background??"darkgreen",o=e.colors?.border??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a;function u(){return a}let f=C(!1);function h(k){x(f,k,!0)}function p(){return g(f)}let c=C(!0),d=0,E=150;function N(k){k!=g(c)&&(x(c,k,!0),d=performance.now())}function ne(){return performance.now()-d<E?W.motion.current==0:W.value==0}let b=0,W=new ut(0,{easing:Ot});J(()=>{g(f)==!1&&(W.snap(),pe.clear(e.priority,e.id))}),J(()=>{W.set(g(c)?0:b,{duration:75})}),J(()=>{ht(W.motion.current)});function ht(k){a&&pe.equeue(e.layer,e.priority,e.id,()=>{a.style.scale=k.toString(),a.style.filter=`brightness(${.25+.75*k})`})}function Xt(k){k!=b&&(b=k,W.set(k,{duration:75}))}function Wt(){return W.value}var Gt={getBody:u,setDisplayed:h,getDisplayed:p,setCollapsed:N,getCollapsed:ne,setScale:Xt,getScale:Wt},S=Ri();let dt;return He(S,k=>a=k,()=>a),kr(k=>{qr(S,1,Ur(["pin",g(f)&&"displayed"]),"svelte-zz3jrb"),dt=qe(S,"",dt,k)},[()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${i}px`,"border-color":o,"background-color":s,"box-shadow":l})]),zr(t,S),Mt(Gt)}class Ye{provider;providerMarker;id;lat;lng;shown;element;component;constructor(e,r){if(new.target===Ye)throw new Error("Cannot instantiate an abstract class directly.");this.provider=e,this.id=r.id,this.lat=r.lat,this.lng=r.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.setZIndex()}remove(){this.removeMarker()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.providerMarker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateMarker(e){if(this.providerMarker==null)throw new Error("Failed to update provider marker map");e?this.providerMarker.inserted()==!1&&this.providerMarker.insert():this.providerMarker.inserted()==!0&&this.providerMarker.remove()}removeMarker(){this.providerMarker?.remove()}setZIndex(){if(this.providerMarker==null)throw new Error("Failed to update provider marker z-index");this.providerMarker.update(this.getZindex())}getZindex(){throw new Error("Get z-index not implemented")}}var Nt;function Xr(t){return{lang:t?.lang??Nt?.lang,message:t?.message,abortEarly:t?.abortEarly??Nt?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Nt?.abortPipeEarly}}var ji;function zi(t){return ji?.get(t)}var Bi;function Ui(t){return Bi?.get(t)}var Zi;function qi(t,e){return Zi?.get(t)?.get(e)}function Ve(t){const e=typeof t;return e==="string"?`"${t}"`:e==="number"||e==="bigint"||e==="boolean"?`${t}`:e==="object"||e==="function"?(t&&Object.getPrototypeOf(t)?.constructor?.name)??"null":e}function P(t,e,r,n,i){const s=i&&"input"in i?i.input:r.value,o=i?.expected??t.expects??null,l=i?.received??Ve(s),a={kind:t.kind,type:t.type,input:s,expected:o,received:l,message:`Invalid ${e}: ${o?`Expected ${o} but r`:"R"}eceived ${l}`,requirement:t.requirement,path:i?.path,issues:i?.issues,lang:n.lang,abortEarly:n.abortEarly,abortPipeEarly:n.abortPipeEarly},u=t.kind==="schema",f=i?.message??t.message??qi(t.reference,a.lang)??(u?Ui(a.lang):null)??n.message??zi(a.lang);f!==void 0&&(a.message=typeof f=="function"?f(a):f),u&&(r.typed=!1),r.issues?r.issues.push(a):r.issues=[a]}function R(t){return{version:1,vendor:"valibot",validate(e){return t["~run"]({value:e},Xr())}}}var ft=class extends Error{constructor(t){super(t[0].message),this.name="ValiError",this.issues=t}};function Z(t){return{kind:"transformation",type:"args",reference:Z,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:i},r);if(s.issues)throw new ft(s.issues);return n(...s.value)},e}}}function Wr(){return{kind:"transformation",type:"await",reference:Wr,async:!0,async"~run"(t){return t.value=await t.value,t}}}function Gr(t,e){return{kind:"validation",type:"check",reference:Gr,async:!1,expects:null,requirement:t,message:e,"~run"(r,n){return r.typed&&!this.requirement(r.value)&&P(this,"input",r,n),r}}}function Kr(t,e){return{kind:"validation",type:"length",reference:Kr,async:!1,expects:`${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length!==this.requirement&&P(this,"length",r,n,{received:`${r.value.length}`}),r}}}function Le(t,e){return{kind:"validation",type:"max_value",reference:Le,async:!1,expects:`<=${t instanceof Date?t.toJSON():Ve(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value<=this.requirement)&&P(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ve(r.value)}),r}}}function jt(t,e){return{kind:"validation",type:"min_length",reference:jt,async:!1,expects:`>=${t}`,requirement:t,message:e,"~run"(r,n){return r.typed&&r.value.length<this.requirement&&P(this,"length",r,n,{received:`${r.value.length}`}),r}}}function te(t,e){return{kind:"validation",type:"min_value",reference:te,async:!1,expects:`>=${t instanceof Date?t.toJSON():Ve(t)}`,requirement:t,message:e,"~run"(r,n){return r.typed&&!(r.value>=this.requirement)&&P(this,"value",r,n,{received:r.value instanceof Date?r.value.toJSON():Ve(r.value)}),r}}}function X(t){return{kind:"transformation",type:"returns",reference:X,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=(...i)=>{const s=this.schema["~run"]({value:n(...i)},r);if(s.issues)throw new ft(s.issues);return s.value},e}}}function Jr(t){return{kind:"transformation",type:"returns",reference:Jr,async:!1,schema:t,"~run"(e,r){const n=e.value;return e.value=async(...i)=>{const s=await this.schema["~run"]({value:await n(...i)},r);if(s.issues)throw new ft(s.issues);return s.value},e}}}function Hi(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function Qr(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function $r(t,e){return{kind:"schema",type:"array",reference:$r,expects:"Array",async:!1,item:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<i.length;s++){const o=i[s],l=this.item["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else P(this,"type",r,n);return r}}}function en(t){return{kind:"schema",type:"boolean",reference:en,expects:"boolean",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="boolean"?e.typed=!0:P(this,"type",e,r),e}}}function tn(t,e){return{kind:"schema",type:"custom",reference:tn,expects:"unknown",async:!1,check:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){return this.check(r.value)?r.typed=!0:P(this,"type",r,n),r}}}function q(t){return{kind:"schema",type:"function",reference:q,expects:"Function",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="function"?e.typed=!0:P(this,"type",e,r),e}}}function w(t){return{kind:"schema",type:"number",reference:w,expects:"number",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="number"&&!isNaN(e.value)?e.typed=!0:P(this,"type",e,r),e}}}function L(t,e){return{kind:"schema",type:"object",reference:L,expects:"Object",async:!1,entries:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(i&&typeof i=="object"){r.typed=!0,r.value={};for(const s in this.entries){const o=this.entries[s];if(s in i||(o.type==="exact_optional"||o.type==="optional"||o.type==="nullish")&&o.default!==void 0){const l=s in i?i[s]:Qr(o),a=o["~run"]({value:l},n);if(a.issues){const u={type:"object",origin:"value",input:i,key:s,value:l};for(const f of a.issues)f.path?f.path.unshift(u):f.path=[u],r.issues?.push(f);if(r.issues||(r.issues=a.issues),n.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),r.value[s]=a.value}else if(o.fallback!==void 0)r.value[s]=Hi(o);else if(o.type!=="exact_optional"&&o.type!=="optional"&&o.type!=="nullish"&&(P(this,"key",r,n,{input:void 0,expected:`"${s}"`,path:[{type:"object",origin:"key",input:i,key:s,value:i[s]}]}),n.abortEarly))break}}else P(this,"type",r,n);return r}}}function H(t,e){return{kind:"schema",type:"optional",reference:H,expects:`(${t.expects} | undefined)`,async:!1,wrapped:t,default:e,get"~standard"(){return R(this)},"~run"(r,n){return r.value===void 0&&(this.default!==void 0&&(r.value=Qr(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function rn(t){return{kind:"schema",type:"promise",reference:rn,expects:"Promise",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return e.value instanceof Promise?e.typed=!0:P(this,"type",e,r),e}}}function re(t){return{kind:"schema",type:"string",reference:re,expects:"string",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return typeof e.value=="string"?e.typed=!0:P(this,"type",e,r),e}}}function Y(t,e){return{kind:"schema",type:"tuple",reference:Y,expects:"Array",async:!1,items:t,message:e,get"~standard"(){return R(this)},"~run"(r,n){const i=r.value;if(Array.isArray(i)){r.typed=!0,r.value=[];for(let s=0;s<this.items.length;s++){const o=i[s],l=this.items[s]["~run"]({value:o},n);if(l.issues){const a={type:"array",origin:"value",input:i,key:s,value:o};for(const u of l.issues)u.path?u.path.unshift(a):u.path=[a],r.issues?.push(u);if(r.issues||(r.issues=l.issues),n.abortEarly){r.typed=!1;break}}l.typed||(r.typed=!1),r.value.push(l.value)}}else P(this,"type",r,n);return r}}}function Xe(t){return{kind:"schema",type:"void",reference:Xe,expects:"void",async:!1,message:t,get"~standard"(){return R(this)},"~run"(e,r){return e.value===void 0?e.typed=!0:P(this,"type",e,r),e}}}function ct(t,e,r){const n=t["~run"]({value:e},Xr(r));if(n.issues)throw new ft(n.issues);return n.value}function _(...t){return{...t[0],pipe:t,get"~standard"(){return R(this)},"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=n["~run"](e,r))}return e}}}function Yi(...t){return{...t[0],pipe:t,async:!0,get"~standard"(){return R(this)},async"~run"(e,r){for(const n of t)if(n.kind!=="metadata"){if(e.issues&&(n.kind==="schema"||n.kind==="transformation")){e.typed=!1;break}(!e.issues||!r.abortEarly&&!r.abortPipeEarly)&&(e=await n["~run"](e,r))}return e}}}const zt=_(w(),te(-90),Le(90)),Bt=_(w(),te(-180),Le(180)),Vi=L({sw:L({lat:zt,lng:Bt}),ne:L({lat:zt,lng:Bt})}),Ut=tn(t=>t instanceof HTMLElement,"Must be an HTMLElement"),Xi=L({getParameters:_(q(),Z(Y([])),X(L({mapSize:_(w(),te(1)),zoomMin:_(w(),te(0)),zoomMax:_(w(),te(0)),zoomScale:_(w(),te(1),Le(10))}))),getContainer:_(q(),Z(Y([])),X(Ut)),getZoom:_(q(),Z(Y([])),X(w())),getBounds:_(q(),Z(Y([])),X(Vi)),panBy:_(q(),Z(Y([w(),w()])),X(Xe())),createMarker:_(q(),Z(Y([Ut,zt,Bt,w()])),X(L({inserted:_(q(),Z(Y([])),X(en())),insert:_(q(),Z(Y([])),X(Xe())),remove:_(q(),Z(Y([])),X(Xe())),update:_(q(),Z(Y([w()])),X(Xe()))})))}),Zt=_(q(),Z(Y([re()])),Jr(Yi(rn(),Wr(),Ut))),Wi=L({background:H(re()),border:H(re()),shadow:H(re())}),Gi=L({width:w(),height:w(),radius:w()}),nn=L({background:H(re()),shadow:H(re())}),sn=_(L({width:w(),height:w(),margin:w(),radius:w()}),Gr(t=>Math.min(t.width,t.height)/t.margin>=6,"Minimum of width or height must be greater than or equal to 6 * margin")),Ki=$r(L({id:_(re(),jt(1)),rank:_(w(),te(0)),lat:_(w(),te(-90),Le(90)),lng:_(w(),te(-180),Le(180)),tooltip:L({body:Zt,style:sn,colors:H(nn)}),pin:H(L({body:Zt,style:H(Gi),colors:H(Wi)})),popup:H(L({body:Zt,style:sn,colors:H(nn)}))}));class We extends Ye{static DEFAULT_SIZE=16;style;colors;zoom;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.pin?.style??{width:We.DEFAULT_SIZE,height:We.DEFAULT_SIZE,radius:We.DEFAULT_SIZE},this.colors=r.pin?.colors,this.zoom=n,this.bodyCallback=r.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=It(Ni,{target:this.element,props:{id:this.id+"_pin",layer:Oi,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.setZIndex()}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load pin body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(e){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setCollapsed(e)}setScale(e){if(this.component==null)throw new Error("Failed to set pin scale");this.component.setScale(e)}getScaleFromZoomDistance(e){return this.zoom<e?1:Math.max(0,1-(this.zoom-e)*.125)}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}}var Ge;(t=>{function e(r,n,i){const s=r/2,o=n/2,l=Math.sqrt(s*s+o*o),a=Math.atan(o/s)*(180/Math.PI),u=i*(Math.PI/180);return i<180?i<90?i<a?{x:0,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:0}:i<180-a?{x:l*Math.cos(u)-s,y:0}:{x:-r,y:l*Math.sin(u)-o}:i<270?i<180+a?{x:-r,y:l*Math.sin(u)-o}:{x:l*Math.cos(u)-s,y:-n}:i<360-a?{x:l*Math.cos(u)-s,y:-n}:{x:0,y:l*Math.sin(u)-o}}t.getOffsets=e})(Ge||(Ge={}));var Ji=jr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function on(t,e){bt(e,!0);let r=e.style.width,n=e.style.height,i=e.style.margin,s=e.style.radius,o=e.colors?.background??"white",l=e.colors?.shadow??"0px 2px 2px rgba(0, 0, 0, 0.5)",a,u,f,h;const p=r+2*i,c=n+2*i,d=()=>h;J(()=>{f.style.width=`${i*4}px`,f.style.height=`${i*4}px`});let E=C(!0);function N(y){x(E,y,!0)}function ne(){return g(E)}let b=C(!0),W=0,ht=300;function Xt(y){y!=g(b)&&(x(b,y,!0),W=performance.now())}function Wt(){return performance.now()-W<ht?S.motion.current==0:S.value==0}function Gt(){return performance.now()-W<ht?S.motion.current==1:S.value==1}let S=new ut(0);J(()=>{g(E)==!1&&(S.snap(),pe.clear(e.priority,e.id+"_scale"))}),J(()=>{g(b)==!0&&S.value!=0&&(pe.stacked()?S.set(0,{duration:0}):S.set(0,{duration:150,easing:Ci})),g(b)==!1&&S.value!=1&&S.set(1,{duration:150,easing:Ti})}),J(()=>{dt(S.motion.current)});function dt(y){!a||!u||!f||pe.equeue(g(b)?0:e.layer,e.priority,e.id+"_scale",()=>{a.style.opacity=`${y}`,u.style.scale=`${y}`,f.style.scale=`${y}`})}let k=NaN,Kt=C(!1),he=new ut(-p/2,{easing:Ot}),vt=new ut(-c/2,{easing:Ot});J(()=>{g(E)==!1&&(he.snap(),he.snap(),pe.clear(e.priority,e.id+"_angle"))}),J(()=>{g(b)==!0&&g(Kt)&&(he.update({duration:75}),he.update({duration:75}))}),J(()=>{fn(he.motion.current,vt.motion.current)});function fn(y,De){if(!a||!u||!f)return;const G=y+p/2,Oe=De+c/2,Fe=c<p?G*c/p:G,Re=c>p?Oe*p/c:Oe,cs=Math.atan2(Re,Fe)/Math.PI*180-45,mn=0,ps=30,$t=Math.sqrt(Fe*Fe+Re*Re),Qe=Math.min(p,c)/2,hs=Qe*Math.SQRT2,ds=($t-Qe)/(hs-Qe),yn=mn+ds*(ps-mn),vs=$t<Qe?$t/Qe:1;pe.equeue(e.layer,e.priority,e.id+"_angle",()=>{u.style.transform=`translate(${Math.round(y)}px, ${Math.round(De)}px)`,f.style.transform=`scale(${vs}) rotate(${cs}deg) skew(${yn}deg, ${yn}deg)`})}function ls(y,De){if(g(Kt)==!1||De==!0){let G=Ge.getOffsets(p,c,y);he.set(Math.round(G.x),{duration:0}),vt.set(Math.round(G.y),{duration:0}),fn(he.value,vt.value),k=y,x(Kt,!0)}else if(y!=k){let G=Math.abs(y-k),Oe=G<180?G:360-G,Fe=Math.log(Oe)*75,Re=Ge.getOffsets(p,c,y);he.set(Math.round(Re.x),{duration:Fe}),vt.set(Math.round(Re.y),{duration:Fe}),k=y}}function us(){return Ge.getOffsets(p,c,k)}var fs={getBody:d,setDisplayed:N,getDisplayed:ne,setCollapsed:Xt,getCollapsed:Wt,getExpanded:Gt,setAngle:ls,getOffsets:us},Je=Ji();let cn;var Jt=_r(Je);let pn;He(Jt,y=>f=y,()=>f);var Qt=ei(Jt,2);let hn;var dn=_r(Qt);let vn;return He(dn,y=>h=y,()=>h),He(Qt,y=>u=y,()=>u),He(Je,y=>a=y,()=>a),kr((y,De,G,Oe)=>{qr(Je,1,Ur(["anchor",g(E)&&"displayed"]),"svelte-11extwn"),cn=qe(Je,"",cn,y),pn=qe(Jt,"",pn,De),hn=qe(Qt,"",hn,G),vn=qe(dn,"",vn,Oe)},[()=>({filter:`drop-shadow(${l})`}),()=>({"background-color":o}),()=>({margin:`${i}px;`}),()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${s}px;`,"background-color":o})]),zr(t,Je),Mt(fs)}class qt extends Ye{static Z_INDEX_OFFSET=2e6;style;colors;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r){if(r.popup==null)throw new Error("Failed to create popup");super(e,r),this.shown=!1,this.style=r.popup.style,this.colors=r.popup.colors,this.bodyCallback=r.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=It(on,{target:this.element,props:{id:this.id+"_popup",layer:Ii,priority:0,style:this.style,colors:this.colors}})}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load popup body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return qt.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(e)}setAngle(e){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(e,!0)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}var _e;(t=>{t.COUNT=12,t.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330],t.DEGREES_DEFAULT=270})(_e||(_e={}));class Ht extends Ye{static Z_INDEX_OFFSET=1e6;style;colors;zoom;angle;states;bodyLoading=!1;bodyLoaded=!1;bodyCallback;constructor(e,r,n){super(e,r),this.style=r.tooltip.style,this.colors=r.tooltip.colors,this.zoom=n[0],this.angle=_e.DEGREES_DEFAULT,this.states=n[1].map(i=>[i[0],_e.DEGREES[i[1]]]),this.bodyCallback=r.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=It(on,{target:this.element,props:{id:this.id+"_tooltip",layer:Di,priority:this.zoom*this.provider.getParameters().zoomScale,style:this.style,colors:this.colors}})}update(e){this.zoom=e[0],this.states=e[1].map(r=>[r[0],_e.DEGREES[r[1]]]),this.setZIndex()}updateMarker(e){super.updateMarker(e),this.component?.setDisplayed(e)}updateState(e){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(e),this.component.setAngle(this.angle)}updateBody(){if(this.bodyLoaded||this.bodyLoading)return;const e=this.component?.getBody();e!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(r=>{r instanceof HTMLElement?e.appendChild(r):console.error("Failed to load tooltip body")}).catch(r=>console.error(r)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(e){const r=this.states.findLast(n=>n[0]<=e);if(!r)throw new Error("Angle not found");return r[1]}getZindex(){const e=this.provider.getParameters();return Math.round((e.zoomMax-this.zoom)*e.zoomScale)+Ht.Z_INDEX_OFFSET}setCollapsed(e){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(e)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}}class Qi{marker;zoom;pin;tooltip;popup;constructor(e,r,n){this.marker=r,this.zoom=n[0],this.pin=new We(e,r,n[0]),this.tooltip=new Ht(e,r,n),this.popup=r.popup?new qt(e,r):void 0}create(){this.pin.create(),this.tooltip.create(),this.popup?.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove(),this.popup?.remove()}}var Ie;(t=>{function e(l,a,u){return{x:n(a)*u,y:i(l)*u}}t.project=e;function r(l,a,u){return{lat:o(a/u),lng:s(l/u)}}t.unproject=r;function n(l){return(180+l)/360}function i(l){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+l*Math.PI/360)))/360}function s(l){return l*360-180}function o(l){return 360/Math.PI*Math.atan(Math.exp((180-l*360)*Math.PI/180))-90}})(Ie||(Ie={}));class an{swLat;swLng;neLat;neLng;constructor(e,r,n,i,s){const o=n*Math.pow(2,r),l=Ie.project(e.sw.lat,e.sw.lng,o),a=Ie.project(e.ne.lat,e.ne.lng,o),u=l.x-i,f=l.y+s,h=a.x+i,p=a.y-s,c=Ie.unproject(u,f,o),d=Ie.unproject(h,p,o);this.swLat=c.lat,this.swLng=c.lng,this.neLat=d.lat,this.neLng=d.lng}contains(e,r){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=r&&r<=this.neLng:r<=this.neLng||this.swLng<=r:!1}}class pt{static MAP_PINS_MAX_ZOOM=2;static MAP_PINS_MAX_COUNT=128;provider;pinElements=new Array;pinMaxWidth=0;pinMaxHeight=0;pinFade=!1;pinMaxCount=0;pinMaxZoomDelta=0;constructor(e){this.provider=e}setConfiguration(e){this.pinFade=e?.pin?.fade??!0,this.pinMaxCount=e?.pin?.maxCount??Math.max(pt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??pt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((r,n)=>Math.max(r,n.style.width),0),this.pinMaxHeight=e.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.pinElements.forEach(e=>e.removeMarker()),this.pinElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new an(e,r,n,this.pinMaxWidth*2,this.pinMaxHeight*2);let s=0;for(const o of this.pinElements)i.contains(o.lat,o.lng)?o.shown&&r<o.zoom&&o.zoom<r+this.pinMaxZoomDelta?(s<this.pinMaxCount&&(o.setCollapsed(!1),o.setScale(this.pinFade?o.getScaleFromZoomDistance(r):1),o.updateMarker(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMarker(!1)):o.updateMarker(!1)}}class $i{provider;tooltipElements=new Array;tooltipMaxWidth=0;tooltipMaxHeight=0;constructor(e){this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((r,n)=>Math.max(r,n.style.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.removeMarker()),this.tooltipElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new an(e,r,n,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const s of this.tooltipElements)i.contains(s.lat,s.lng)?s.shown&&s.zoom<=r?(s.updateState(r),s.setCollapsed(!1),s.updateMarker(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMarker(!1)):s.updateMarker(!1)}}class es{provider;popupElements=new Array;popupPositioned=new Map;constructor(e){this.provider=e}show(e){e.popup&&(e.pin.shown=!1,e.tooltip.shown=!1,this.popupPositioned.set(e.marker.id,!1),e.popup.setAngle(e.tooltip.angle),e.popup.shown=!0)}hide(e){e.popup&&(e.pin.shown=!0,e.tooltip.shown=!0,e.popup.shown=!1)}updateElements(e){this.popupElements=e,this.popupPositioned=new Map(e.map(r=>[r.id,!1]))}removeElements(){this.popupElements.forEach(e=>e.removeMarker()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMarker(!0),e.isExpanded()&&e.isBodyLoaded()==!1&&e.updateBody(),e.isCollapsed()==!1&&this.popupPositioned.get(e.id)==!1){const r=e.component?.getBody();if(r==null)continue;const n=e.component?.getOffsets();if(n==null)continue;const i=r.getBoundingClientRect();if(i.x==0&&i.y==0&&i.width==0&&i.height==0)continue;const s=i.x+i.width/2,o=i.y+i.height/2,l=s+n.x,a=o+n.y,u=l+e.style.width,f=a+e.style.height,h=this.provider.getContainer().getBoundingClientRect(),p=l-h.left,c=h.right-u,d=a-h.top,E=h.bottom-f,N=Math.min(e.style.width,e.style.height)/4,ne=p<0?p-N:c<0?-c+N:0,b=d<0?d-N:E<0?-E+N:0;this.provider.panBy(ne,b),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMarker(!1)}}class ts{markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e){this.markerPinProcessor=new pt(e),this.markerTooltipProcessor=new $i(e),this.markerPopupProcessor=new es(e)}setConfiguration(e){this.markerPinProcessor.setConfiguration(e)}updateElements(e){this.markerPinProcessor.updateElements(e.map(r=>r.pin)),this.markerTooltipProcessor.updateElements(e.map(r=>r.tooltip)),this.markerPopupProcessor.updateElements(e.map(r=>r.popup).filter(r=>r!=null))}removeElements(){this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements()}processElements(e,r){this.markerPinProcessor.process(e,r),this.markerTooltipProcessor.process(e,r),this.markerPopupProcessor.process()}showPopup(e){this.markerPopupProcessor.show(e)}hidePopup(e){this.markerPopupProcessor.hide(e)}}var Ke;(t=>{async function e(n,i){const s=await fetch(n,i);if(!s.ok)throw new Error(s.statusText);return s.json()}t.get=e;async function r(n,i,s){const o=await fetch(n,{method:"POST",body:JSON.stringify(i),headers:{"Content-Type":"application/json",...s?.headers},...s});if(!o.ok)throw new Error(o.statusText);return o.json()}t.post=r})(Ke||(Ke={}));const rs=_(re(),Kr(32)),ns=_(re(),jt(1)),ln="1.2.1",Yt="https://maps.api.arenarium.dev",is=`${Yt}/auth`,ss=`${Yt}/states`,os=`${Yt}/log`;class Vt{apiKey;apiToken;apiDevEnvironment;mapProvider;mapMarkerProcessor;mapMarkerElementArray=new Array;mapMarkerElementMap=new Map;mapMarkerElementsUpdating=!1;constructor(e,r,n,i){ct(rs,e),ct(ns,r),ct(Xi,n),this.apiKey=e,this.apiToken=r,this.apiDevEnvironment=window?.location.host.startsWith("localhost")||window?.location.host.startsWith("127.0.0.1"),this.mapProvider=n,this.mapMarkerProcessor=new ts(n),this.setConfiguration(i)}static async create(e,r,n){const i={key:e,version:ln};let o=(await Ke.post(is,i)).token;if(!o)throw new Error("Failed to get api token");return new Vt(e,o,r,n)}setConfiguration(e){pe.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.mapMarkerProcessor.setConfiguration(e)}async updateMarkers(e){ct(Ki,e);try{await this.updateMarkerElements(e),this.processMarkerElementsCallback()}catch(r){throw this.removeMarkerElements(),this.log("error","Failed to update markers",r),r}}removeMarkers(){try{this.removeMarkerElements()}catch(e){throw this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const r of this.mapMarkerElementArray)r.marker.id==e?this.mapMarkerProcessor.showPopup(r):this.mapMarkerProcessor.hidePopup(r)}catch(r){for(const n of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(n);throw this.log("error","Failed to show popup",r),r}}hidePopup(e){try{if(e){const r=this.mapMarkerElementMap.get(e);if(r==null)return;this.mapMarkerProcessor.hidePopup(r)}else for(const r of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(r)}catch(r){for(const n of this.mapMarkerElementArray)this.mapMarkerProcessor.hidePopup(n);throw this.log("error","Failed to hide popup",r),r}}async updateMarkerElements(e){try{let r=this.mapMarkerElementArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.mapMarkerElementMap.get(s.id)||r.push(s)}const n=await this.getMarkerStates(r);try{this.mapMarkerElementsUpdating=!0;for(let i=0;i<r.length;i++){const s=r[i],o=n[i],l=this.mapMarkerElementMap.get(s.id);if(l)l.update(o);else{const a=new Qi(this.mapProvider,s,o);a.create(),this.mapMarkerElementMap.set(s.id,a),this.mapMarkerElementArray.push(a)}}this.mapMarkerElementArray.sort((i,s)=>i.zoom-s.zoom),this.mapMarkerProcessor.updateElements(this.mapMarkerElementArray)}finally{this.mapMarkerElementsUpdating=!1}}catch(r){throw this.mapMarkerProcessor.removeElements(),this.mapMarkerElementArray.length=0,this.mapMarkerElementMap.clear(),r}finally{this.mapMarkerElementsUpdating=!1}}removeMarkerElements(){try{this.mapMarkerElementsUpdating=!0,this.mapMarkerProcessor.removeElements(),this.mapMarkerElementArray.length=0,this.mapMarkerElementMap.clear()}finally{this.mapMarkerElementsUpdating=!1}}async getMarkerStates(e){if(e.length==0)return[];if(e.length==1)return[[0,[[0,_e.DEGREES.indexOf(_e.DEGREES_DEFAULT)]]]];const r=e.map(s=>({id:s.id,rank:s.rank,lat:s.lat,lng:s.lng,width:s.tooltip.style.width,height:s.tooltip.style.height,margin:s.tooltip.style.margin})),n={key:this.apiKey,token:this.apiToken,parameters:this.mapProvider.getParameters(),input:r},i=await Ke.post(ss,n,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerElementsCallback(){if(this.mapProvider.getContainer().parentElement!=null&&this.mapMarkerElementArray.length!=0)try{this.processMarkerElements(),window.setTimeout(this.processMarkerElementsCallback.bind(this),25)}catch(e){this.log("error","Failed to process marker elements",e)}}processMarkerElements(){if(this.mapMarkerElementsUpdating)return;const e=this.mapProvider.getBounds(),r=this.mapProvider.getZoom();this.mapMarkerProcessor.processElements(e,r)}async log(e,r,n){switch(e){case"info":console.info(n);break;case"warn":console.warn(n);break;case"error":console.error(n);break}if(n instanceof Error&&!this.apiDevEnvironment)try{const i={key:this.apiKey,title:r,level:e,content:{version:ln,...n}};await Ke.post(os,i)}catch(i){console.error(i)}}}const un=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',as=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${un()}<span>&nbsp;@arenarium/maps</span></a>`;oe.MapManager=Vt,oe.getAttributionHtml=as,oe.getImageHtml=un,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})}));
package/dist/style.css DELETED
@@ -1 +0,0 @@
1
- .pin.svelte-zz3jrb{position:absolute;border-width:2px;border-style:solid;box-sizing:border-box;transform-origin:0% 0%;transform-style:preserve-3d;transform:translate(-50%,-50%);backface-visibility:hidden;will-change:scale}.pin.svelte-zz3jrb{scale:0;filter:brightness(0)}.pin.svelte-zz3jrb{display:none;content-visibility:hidden}.pin.displayed.svelte-zz3jrb{display:initial;content-visibility:initial}.anchor.svelte-11extwn{display:block;position:absolute;width:0px;height:0px;transition:filter ease-in-out 125ms}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn){position:absolute;left:0;top:0}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn) .body:where(.svelte-11extwn){position:relative;cursor:pointer}.anchor.svelte-11extwn .pointer:where(.svelte-11extwn){position:absolute;left:0;top:0;transform-origin:0% 0%}.anchor.svelte-11extwn:hover{transform-style:preserve-3d;backface-visibility:hidden}.anchor.svelte-11extwn:hover .bubble:where(.svelte-11extwn){transform-style:preserve-3d;backface-visibility:hidden}.anchor.svelte-11extwn{opacity:0;will-change:opacity}.anchor.svelte-11extwn .bubble:where(.svelte-11extwn){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-11extwn .pointer:where(.svelte-11extwn){scale:0;transform-origin:0% 0%;will-change:transform,scale}.anchor.svelte-11extwn{display:none;content-visibility:hidden}.anchor.displayed.svelte-11extwn{display:initial;content-visibility:initial}