@arenarium/maps 1.1.3 → 1.2.1

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.
@@ -0,0 +1 @@
1
+ (function(oe,Qe){typeof exports=="object"&&typeof module<"u"?Qe(exports):typeof define=="function"&&define.amd?define(["exports"],Qe):(oe=typeof globalThis<"u"?globalThis:oe||self,Qe(oe.ArenariumMaps={}))})(this,(function(oe){"use strict";var er=Array.isArray,gn=Array.prototype.indexOf,_n=Array.from,vt=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,wn=Object.prototype,bn=Array.prototype,kn=Object.getPrototypeOf,tr=Object.isExtensible;function En(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,mt=4,rr=8,we=16,ae=32,de=64,yt=128,j=256,$e=512,L=1024,K=2048,le=4096,be=8192,ke=16384,gt=32768,nr=65536,ir=1<<17,xn=1<<18,Ee=1<<19,Pn=1<<20,_t=1<<21,wt=1<<22,ve=1<<23,et=Symbol("$state"),bt=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 Dn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Cn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function Tn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ln(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function In(){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 vs=!1,z=null;function Me(t){z=t}function kt(t,e=!1,r){z={p:z,c:null,e:null,s:t,x:null,l:null}}function Et(t){var e=z,r=e.e;if(r!==null){e.e=null;for(var n of r)br(n)}return t!==void 0&&(e.x=t),z=e.p,t??{}}function or(){return!0}let xe=[];function jn(){var t=xe;xe=[],En(t)}function tt(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&gt)===0){if((e.f&yt)===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&yt)!==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&&(vt(t,"message",{value:e.message}),vt(t,"stack",{value:e.stack}))}const Mt=new Set;let A=null,xt=new Set,je=[],Pt=null,St=!1;class ie{current=new Map;#e=new Map;#t=new Set;#a=0;#n=null;#c=!1;#o=[];#i=[];#r=[];#s=[];#l=[];#h=[];#f=[];skipped_effects=new Set;process(e){je=[];for(const i of e)this.#p(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:Mt.delete(this),this.#n?.resolve()}else this.#u(this.#r),this.#u(this.#s),this.#u(this.#l);for(const i of this.#o)De(i);for(const i of this.#i)De(i);this.#o=[],this.#i=[]}#p(e){e.f^=L;for(var r=e.first;r!==null;){var n=r.f,i=(n&(ae|de))!==0,s=i&&(n&L)!==0,o=s||(n&be)!==0||this.skipped_effects.has(r);if(!o&&r.fn!==null){if(i)r.f^=L;else if((n&mt)!==0)this.#s.push(r);else if((n&L)===0)if((n&wt)!==0){var l=r.b?.is_pending()?this.#i:this.#o;l.push(r)}else st(r)&&((r.f&we)!==0&&this.#l.push(r),De(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.#h:this.#f).push(r),U(r,L);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 xt)if(xt.delete(e),e(),A!==null)break}neuter(){this.#c=!0}flush(){je.length>0?Bn():this.#d(),A===this&&(this.#a===0&&Mt.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.#h)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;Mt.add(A),ie.enqueue(()=>{A===e&&e.flush()})}return A}static enqueue(e){tt(e)}}function Bn(){var t=Se;St=!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{St=!1,Sr(t),Pt=null}}function Un(){try{Tn()}catch(t){Pe(t,Pt)}}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|be))===0&&st(n)&&(me=[],De(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)De(i);me=[]}}me=null}}function ze(t){for(var e=Pt=t;e.parent!==null;){e=e.parent;var r=e.f;if(St&&e===m&&(r&we)!==0)return;if((r&(de|ae))!==0){if((r&L)===0)return;e.f^=L}}je.push(e)}function Zn(t){let e=0,r=rt(0),n;return()=>{ni()&&(g(r),Ct(()=>(e===0&&(n=Fr(()=>t(()=>Be(r)))),e+=1,()=>{tt(()=>{e-=1,e===0&&(n?.(),n=void 0,Be(r))})})))}}var qn=nr|Ee|yt;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;#h=0;#f=0;#p=!1;#u=null;#d=()=>{this.#u&&nt(this.#u,this.#h)};#g=Zn(()=>(this.#u=rt(this.#h),()=>{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():(it(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),I(this.#o),Me(this.#o.ctx);try{return e()}catch(s){return ar(s),null}finally{$(r),I(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&&it(this.#r,()=>{this.#r=null}),this.#l&&(this.#t.before(this.#l),this.#l=null))}update_pending_count(e){this.#y(e),this.#h+=e,xt.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.#p||!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.#h=0,this.#s!==null&&it(this.#s,()=>{this.#s=null}),this.#e=this.has_pending_snippet(),this.#i=this.#v(()=>(this.#p=!1,ye(()=>this.#c(this.#t)))),this.#f>0?this.#m():this.#e=!1};var l=v;try{I(null),s=!0,r?.(e,o),s=!1}catch(a){Pe(a,this.#o&&this.#o.parent)}finally{I(l)}n&&tt(()=>{this.#s=this.#v(()=>{this.#p=!0;try{return ye(()=>{n(this.#t,()=>e,()=>o)})}catch(a){return Pe(a,this.#o.parent),null}finally{this.#p=!1}})})}}function Vn(t,e){for(var r=t.nodes_start,n=t.nodes_end;r!==null;){var i=r===n?null:Dt(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),I(e),Me(r),n?.activate()}}function fr(){$(null),I(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|=Ee,{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=rt(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,p=n.is_pending();l&&(n.update_pending_count(1),p||f.increment());const h=(c,d=void 0)=>{o=null,p||f.activate(),d?d!==bt&&(s.f|=ve,nt(s,d)):((s.f&ve)!==0&&(s.f^=ve),nt(s,c)),l&&(n.update_pending_count(-1),p||f.decrement()),fr()};if(i.then(h,c=>h(null,c||"unknown")),f)return()=>{queueMicrotask(()=>f.neuter())}}),new Promise(a=>{function u(f){function p(){f===i?a(s):u(i)}f.then(p,p)}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 At(t){var e,r=m;$(Jn(t));try{cr(t),e=Ir(t)}finally{$(r)}return e}function hr(t){var e=At(t);if(t.equals(e)||(t.v=e,t.wv=Tr()),!Ae){var r=(ce||(t.f&j)!==0)&&t.deps!==null?le:L;U(t,r)}}const ue=new Map;function rt(t,e){var r={f:0,v:t,reactions:null,equals:sr,rv:0,wv:0};return r}function D(t,e){const r=rt(t);return ci(r),r}function x(t,e,r=!1){v!==null&&(!V||(v.f&ir)!==0)&&or()&&(v.f&(O|we|wt|ir))!==0&&!se?.includes(t)&&On();let n=r?Ue(e):e;return nt(t,n)}function nt(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&&At(t),U(t,(t.f&j)===0?L:le)),t.wv=Tr(),pr(t,K),m!==null&&(m.f&L)!==0&&(m.f&(ae|de))===0&&(B===null?hi([t]):B.push(t))}return e}function Be(t){x(t,t.v+1)}function pr(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?pr(s,le):l&&((o&we)!==0&&me!==null&&me.push(s),ze(s))}}function Ue(t){if(typeof t!="object"||t===null||et in t)return t;const e=kn(t);if(e!==wn&&e!==bn)return t;var r=new Map,n=er(t),i=D(0),s=ge,o=l=>{if(ge===s)return l();var a=v,u=ge;I(null),Cr(s);var f=l();return I(a),Cr(u),f};return n&&r.set("length",D(t.length)),new Proxy(t,{defineProperty(l,a,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&Ln();var f=r.get(a);return f===void 0?f=o(()=>{var p=D(u.value);return r.set(a,p),p}):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(()=>D(M));r.set(a,f),Be(i)}}else x(u,M),Be(i);return!0},get(l,a,u){if(a===et)return t;var f=r.get(a),p=a in l;if(f===void 0&&(!p||Ne(l,a)?.writable)&&(f=o(()=>{var c=Ue(p?l[a]:M),d=D(c);return d}),r.set(a,f)),f!==void 0){var h=g(f);return h===M?void 0:h}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 p=r.get(a),h=p?.v;if(p!==void 0&&h!==M)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return u},has(l,a){if(a===et)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 h=f?Ue(l[a]):M,c=D(h);return c}),r.set(a,u));var p=g(u);if(p===M)return!1}return f},set(l,a,u,f){var p=r.get(a),h=a in l;if(n&&a==="length")for(var c=u;c<p.v;c+=1){var d=r.get(c+"");d!==void 0?x(d,M):c in l&&(d=o(()=>D(M)),r.set(c+"",d))}if(p===void 0)(!h||Ne(l,a)?.writable)&&(p=o(()=>D(void 0)),x(p,Ue(u)),r.set(a,p));else{h=p.v!==M;var b=o(()=>Ue(u));x(p,b)}var N=Reflect.getOwnPropertyDescriptor(l,a);if(N?.set&&N.set.call(f,u),!h){if(n&&typeof a=="string"){var ne=r.get("length"),E=Number(a);Number.isInteger(E)&&E>=ne.v&&x(ne,E+1)}Be(i)}return!0},ownKeys(l){g(i);var a=Reflect.ownKeys(l).filter(p=>{var h=r.get(p);return h===void 0||h.v!==M});for(var[u,f]of r)f.v!==M&&!(u in l)&&a.push(u);return a},setPrototypeOf(){In()}})}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 Dt(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=Dt(n);return n}function wr(t){var e=v,r=m;I(null),$(null);try{return t()}finally{I(e),$(r)}}function ti(t){m===null&&v===null&&Cn(),v!==null&&(v.f&j)!==0&&m===null&&Dn(),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&be)!==0&&(t|=be);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{De(s),s.f|=gt}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&Ee)===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&gt)===0;if(r){var n=z;(n.e??=[]).push(t)}else return br(t)}function br(t){return fe(mt|Pn,t,!1)}function ii(t){ie.ensure();const e=fe(de|Ee,t,!0);return(r={})=>new Promise(n=>{r.outro?it(e,()=>{Q(e),n(void 0)}):(Q(e),n(void 0))})}function si(t){return fe(mt,t,!1)}function oi(t){return fe(wt|Ee,t,!0)}function Ct(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|Ee,t,!0,e)}function Er(t){var e=t.teardown;if(e!==null){const r=Ae,n=v;Ar(!0),I(null);try{e.call(null)}finally{Ar(r),I(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(bt)});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),ot(t,0),U(t,ke);var n=t.transitions;if(n!==null)for(const s of n)s.stop();Er(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:Dt(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 it(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&be)===0){if(t.f^=be,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 I(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 C=null,F=0,B=null;function hi(t){B=t}let Dr=1,Ze=0,ge=Ze;function Cr(t){ge=t}let ce=!1;function Tr(){return++Dr}function st(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&$e)!==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^=$e),l&&f!==null&&(f.f&j)===0&&(u.f^=j)}for(i=0;i<a;i++)if(s=r[i],st(s)&&hr(s),s.wv>t.wv)return!0}(!n||m!==null&&!ce)&&U(t,L)}return!1}function Lr(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?Lr(s,e,!1):e===s&&(r?U(s,K):(s.f&L)!==0&&U(s,le),ze(s))}}function Ir(t){var e=C,r=F,n=B,i=v,s=ce,o=se,l=z,a=V,u=ge,f=t.f;C=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(bt)}),t.ac=null);try{t.f|=_t;var p=t.fn,h=p(),c=t.deps;if(C!==null){var d;if(ot(t,F),c!==null&&F>0)for(c.length=F+C.length,d=0;d<C.length;d++)c[F+d]=C[d];else t.deps=c=C;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&&(ot(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++)Lr(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),h}catch(b){return ar(b)}finally{t.f^=_t,C=e,F=r,B=n,v=i,ce=s,se=o,Me(l),V=a,ge=u}}function pi(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&&(C===null||!C.includes(e))&&(U(e,le),(e.f&(j|$e))===0&&(e.f^=$e),cr(e),ot(e,0))}function ot(t,e){var r=t.deps;if(r!==null)for(var n=e;n<r.length;n++)pi(t,r[n])}function De(t){var e=t.f;if((e&ke)===0){U(t,L);var r=m,n=Se;m=t,Se=!0;try{(e&we)!==0?li(t):Mr(t),Er(t);var i=Ir(t);t.teardown=typeof i=="function"?i:null,t.wv=Dr;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&_t)!==0)t.rv<Ze&&(t.rv=Ze,C===null&&i!==null&&i[F]===t?F++:C===null?C=[t]:(!ce||!C.includes(t))&&C.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&L)===0&&o.reactions!==null||Or(o))&&(a=At(o)),ue.set(o,a),a}}else r&&(o=t,st(o)&&hr(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 at(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){vt(t,"currentTarget",{configurable:!0,get(){return s||r}});var f=v,p=m;I(null),$(null);try{for(var h,c=[];s!==null;){var d=s.assignedSlot||s.parentNode||s.host||null;try{var b=s["__"+n];if(b!=null&&(!s.disabled||t.target===s))if(er(b)){var[N,...ne]=b;N.apply(s,[t,...ne])}else b.call(s,t)}catch(E){h?c.push(E):h=E}if(t.cancelBubble||d===e||d===null)break;s=d}if(h){for(let E of c)queueMicrotask(()=>{throw E});throw h}}finally{t.__root=e,delete t.currentTarget,I(f),$(p)}}}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 Tt(t,e){return wi(t,e)}const Ce=new Map;function wi(t,{target:e,anchor:r,props:n={},events:i,context:s,intro:o=!0}){Qn();var l=new Set,a=p=>{for(var h=0;h<p.length;h++){var c=p[h];if(!l.has(c)){l.add(c);var d=mi(c);e.addEventListener(c,at,{passive:d});var b=Ce.get(c);b===void 0?(document.addEventListener(c,at,{passive:d}),Ce.set(c,1)):Ce.set(c,b+1)}}};a(_n(yi)),Rr.add(a);var u=void 0,f=ii(()=>{var p=r??e.appendChild($n());return Hn(p,{pending:()=>{}},h=>{if(s){kt({});var c=z;c.c=s}i&&(n.$$events=i),u=t(h,n)||{},s&&Et()}),()=>{for(var h of l){e.removeEventListener(h,at);var c=Ce.get(h);--c===0?(document.removeEventListener(h,at),Ce.delete(h)):Ce.set(h,c)}Rr.delete(a),p!==r&&p.parentNode?.removeChild(p)}});return bi.set(u,f),u}let bi=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 Ei(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=Ei(r,n);l==null?t.removeAttribute("class"):t.className=l,t.__className=r}return s}function Lt(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)?(Lt(t,r?.[0],n[0]),Lt(t,r?.[1],n[1],"important")):Lt(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?.[et]===e}function He(t={},e,r,n){return si(()=>{var i,s;return Ct(()=>{i=s,s=[],Fr(()=>{t!==r(...s)&&(e(t,...s),i&&Yr(r(...i),t)&&e(null,...i))})}),()=>{tt(()=>{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 It(t){return-.5*(Math.cos(Math.PI*t)-1)}function Di(t){const e=Math.cos(t*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Ci(t){return Math.sin(t*Math.PI/2)}const Ti=128,Li=0,Ii=1,Oi=2;class Fi{animationsStarted=!1;animationsCount=0;animationsLimit=Ti;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 he=new Fi;function Vr(t){return Object.prototype.toString.call(t)==="[object Date]"}function Ot(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)=>Ot(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]=Ot(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 Ft{#e;#t;#a;#n=null;constructor(e,r={}){this.#e=D(e),this.#t=D(e),this.#a=r}static of(e,r){const n=new Ft(e(),r);return Ct(()=>{n.set(e())}),n}set(e,r){x(this.#t,e);let{delay:n=0,duration:i=400,easing:s=Ai,interpolate:o=Ot}={...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(p=>{if(p<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 h=p-l;return h>i?(x(this.#e,e),!1):(x(this.#e,a(s(h/i))),!0)}),this.#n.promise}get current(){return g(this.#e)}get target(){return g(this.#t)}set target(e){this.set(e)}}class lt{value;motion;constructor(e,r){this.value=e,this.motion=new Ft(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){kt(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=D(!1);function p(k){x(f,k,!0)}function h(){return g(f)}let c=D(!0),d=0,b=150;function N(k){k!=g(c)&&(x(c,k,!0),d=performance.now())}function ne(){return performance.now()-d<b?W.motion.current==0:W.value==0}let E=0,W=new lt(0,{easing:It});J(()=>{g(f)==!1&&(W.snap(),he.clear(e.priority,e.id))}),J(()=>{W.set(g(c)?0:E,{duration:75})}),J(()=>{ht(W.motion.current)});function ht(k){a&&he.equeue(e.layer,e.priority,e.id,()=>{a.style.scale=k.toString(),a.style.filter=`brightness(${.25+.75*k})`})}function Xt(k){k!=E&&(E=k,W.set(k,{duration:75}))}function Wt(){return W.value}var Gt={getBody:u,setDisplayed:p,getDisplayed:h,setCollapsed:N,getCollapsed:ne,setScale:Xt,getScale:Wt},S=Ri();let pt;return He(S,k=>a=k,()=>a),kr(k=>{qr(S,1,Ur(["pin",g(f)&&"displayed"]),"svelte-zz3jrb"),pt=qe(S,"",pt,k)},[()=>({width:`${r}px`,height:`${n}px`,"border-radius":`${i}px`,"border-color":o,"background-color":s,"box-shadow":l})]),zr(t,S),Et(Gt)}var Ye;(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})(Ye||(Ye={}));var ji=jr('<div><div class="pointer svelte-11extwn"></div> <div class="bubble svelte-11extwn"><div class="body svelte-11extwn"></div></div></div>');function Xr(t,e){kt(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,p;const h=r+2*i,c=n+2*i,d=()=>p;J(()=>{f.style.width=`${i*4}px`,f.style.height=`${i*4}px`});let b=D(!0);function N(y){x(b,y,!0)}function ne(){return g(b)}let E=D(!0),W=0,ht=300;function Xt(y){y!=g(E)&&(x(E,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 lt(0);J(()=>{g(b)==!1&&(S.snap(),he.clear(e.priority,e.id+"_scale"))}),J(()=>{g(E)==!0&&S.value!=0&&(he.stacked()?S.set(0,{duration:0}):S.set(0,{duration:150,easing:Di})),g(E)==!1&&S.value!=1&&S.set(1,{duration:150,easing:Ci})}),J(()=>{pt(S.motion.current)});function pt(y){!a||!u||!f||he.equeue(g(E)?0:e.layer,e.priority,e.id+"_scale",()=>{a.style.opacity=`${y}`,u.style.scale=`${y}`,f.style.scale=`${y}`})}let k=NaN,Kt=D(!1),pe=new lt(-h/2,{easing:It}),dt=new lt(-c/2,{easing:It});J(()=>{g(b)==!1&&(pe.snap(),pe.snap(),he.clear(e.priority,e.id+"_angle"))}),J(()=>{g(E)==!0&&g(Kt)&&(pe.update({duration:75}),pe.update({duration:75}))}),J(()=>{fn(pe.motion.current,dt.motion.current)});function fn(y,Ie){if(!a||!u||!f)return;const G=y+h/2,Oe=Ie+c/2,Fe=c<h?G*c/h:G,Re=c>h?Oe*h/c:Oe,fs=Math.atan2(Re,Fe)/Math.PI*180-45,mn=0,cs=30,$t=Math.sqrt(Fe*Fe+Re*Re),Je=Math.min(h,c)/2,hs=Je*Math.SQRT2,ps=($t-Je)/(hs-Je),yn=mn+ps*(cs-mn),ds=$t<Je?$t/Je:1;he.equeue(e.layer,e.priority,e.id+"_angle",()=>{u.style.transform=`translate(${Math.round(y)}px, ${Math.round(Ie)}px)`,f.style.transform=`scale(${ds}) rotate(${fs}deg) skew(${yn}deg, ${yn}deg)`})}function as(y,Ie){if(g(Kt)==!1||Ie==!0){let G=Ye.getOffsets(h,c,y);pe.set(Math.round(G.x),{duration:0}),dt.set(Math.round(G.y),{duration:0}),fn(pe.value,dt.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=Ye.getOffsets(h,c,y);pe.set(Math.round(Re.x),{duration:Fe}),dt.set(Math.round(Re.y),{duration:Fe}),k=y}}function ls(){return Ye.getOffsets(h,c,k)}var us={getBody:d,setDisplayed:N,getDisplayed:ne,setCollapsed:Xt,getCollapsed:Wt,getExpanded:Gt,setAngle:as,getOffsets:ls},Ke=ji();let cn;var Jt=_r(Ke);let hn;He(Jt,y=>f=y,()=>f);var Qt=ei(Jt,2);let pn;var dn=_r(Qt);let vn;return He(dn,y=>p=y,()=>p),He(Qt,y=>u=y,()=>u),He(Ke,y=>a=y,()=>a),kr((y,Ie,G,Oe)=>{qr(Ke,1,Ur(["anchor",g(b)&&"displayed"]),"svelte-11extwn"),cn=qe(Ke,"",cn,y),hn=qe(Jt,"",hn,Ie),pn=qe(Qt,"",pn,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,Ke),Et(us)}var Ve;(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})(Ve||(Ve={}));var Te;(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}})(Te||(Te={}));class Wr{swLat;swLng;neLat;neLng;constructor(e,r,n,i,s){const o=n*Math.pow(2,r),l=Te.project(e.sw.lat,e.sw.lng,o),a=Te.project(e.ne.lat,e.ne.lng,o),u=l.x-i,f=l.y+s,p=a.x+i,h=a.y-s,c=Te.unproject(u,f,o),d=Te.unproject(p,h,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}}var Rt;function Gr(t){return{lang:t?.lang??Rt?.lang,message:t?.message,abortEarly:t?.abortEarly??Rt?.abortEarly,abortPipeEarly:t?.abortPipeEarly??Rt?.abortPipeEarly}}var zi;function Bi(t){return zi?.get(t)}var Ui;function Zi(t){return Ui?.get(t)}var qi;function Hi(t,e){return qi?.get(t)?.get(e)}function Xe(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??Xe(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??Hi(t.reference,a.lang)??(u?Zi(a.lang):null)??n.message??Bi(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},Gr())}}}var ut=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 ut(s.issues);return n(...s.value)},e}}}function Kr(){return{kind:"transformation",type:"await",reference:Kr,async:!0,async"~run"(t){return t.value=await t.value,t}}}function Jr(t,e){return{kind:"validation",type:"check",reference:Jr,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 Qr(t,e){return{kind:"validation",type:"length",reference:Qr,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():Xe(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():Xe(r.value)}),r}}}function Nt(t,e){return{kind:"validation",type:"min_length",reference:Nt,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():Xe(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():Xe(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 ut(s.issues);return s.value},e}}}function $r(t){return{kind:"transformation",type:"returns",reference:$r,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 ut(s.issues);return s.value},e}}}function Yi(t,e,r){return typeof t.fallback=="function"?t.fallback(e,r):t.fallback}function en(t,e,r){return typeof t.default=="function"?t.default(e,r):t.default}function tn(t,e){return{kind:"schema",type:"array",reference:tn,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 rn(t){return{kind:"schema",type:"boolean",reference:rn,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 nn(t,e){return{kind:"schema",type:"custom",reference:nn,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 T(t,e){return{kind:"schema",type:"object",reference:T,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]:en(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]=Yi(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=en(this,r,n)),r.value===void 0)?(r.typed=!0,r):this.wrapped["~run"](r,n)}}}function sn(t){return{kind:"schema",type:"promise",reference:sn,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 We(t){return{kind:"schema",type:"void",reference:We,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 ft(t,e,r){const n=t["~run"]({value:e},Gr(r));if(n.issues)throw new ut(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 Vi(...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 jt=_(w(),te(-90),Le(90)),zt=_(w(),te(-180),Le(180)),Xi=T({sw:T({lat:jt,lng:zt}),ne:T({lat:jt,lng:zt})}),Bt=nn(t=>t instanceof HTMLElement,"Must be an HTMLElement"),Wi=T({getParameters:_(q(),Z(Y([])),X(T({mapSize:_(w(),te(1)),zoomMin:_(w(),te(0)),zoomMax:_(w(),te(0)),zoomScale:_(w(),te(1),Le(10))}))),getContainer:_(q(),Z(Y([])),X(Bt)),getZoom:_(q(),Z(Y([])),X(w())),getBounds:_(q(),Z(Y([])),X(Xi)),panBy:_(q(),Z(Y([w(),w()])),X(We())),createMarker:_(q(),Z(Y([Bt,jt,zt,w()])),X(T({inserted:_(q(),Z(Y([])),X(rn())),insert:_(q(),Z(Y([])),X(We())),remove:_(q(),Z(Y([])),X(We())),update:_(q(),Z(Y([w()])),X(We()))})))}),Ut=_(q(),Z(Y([re()])),$r(Vi(sn(),Kr(),Bt))),Gi=T({background:H(re()),border:H(re()),shadow:H(re())}),Ki=T({width:w(),height:w(),radius:w()}),on=T({background:H(re()),shadow:H(re())}),an=_(T({width:w(),height:w(),margin:w(),radius:w()}),Jr(t=>Math.min(t.width,t.height)/t.margin>=6,"Tooltip: minimum of width or height must be greater than or equal to 6 * margin")),Ji=tn(T({id:_(re(),Nt(1)),rank:_(w(),te(0)),lat:_(w(),te(-90),Le(90)),lng:_(w(),te(-180),Le(180)),tooltip:T({body:Ut,style:an,colors:H(on)}),pin:H(T({body:Ut,style:H(Ki),colors:H(Gi)})),popup:H(T({body:Ut,style:an,colors:H(on)}))}));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={}));const Qi=_(re(),Qr(32)),$i=_(re(),Nt(1)),ln="1.2.0",Zt="https://maps.api.arenarium.dev",es=`${Zt}/auth`,ts=`${Zt}/states`,rs=`${Zt}/log`;class qt{apiKey;apiToken;apiDevEnvironment;mapProvider;markerDataArray=new Array;markerDataMap=new Map;markerDataUpdating=!1;markerPinProcessor;markerTooltipProcessor;markerPopupProcessor;constructor(e,r,n,i){ft(Qi,e),ft($i,r),ft(Wi,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.markerPinProcessor=new ct(n),this.markerTooltipProcessor=new is(n),this.markerPopupProcessor=new ss(n),this.setConfiguration(i)}static async create(e,r,n){const i={key:e,version:ln};let o=(await Ve.post(es,i)).token;if(!o)throw new Error("Failed to get api token");return new qt(e,o,r,n)}setConfiguration(e){he.setLimit(e?.animation?.queue?.limit??8*navigator.hardwareConcurrency),this.markerPinProcessor.setConfiguration(e)}async updateMarkers(e){ft(Ji,e);try{await this.updateMarkerData(e),this.processMarkerDataCallback()}catch(r){throw console.error(r),this.removeMarkerData(),r instanceof Error&&this.log("error","Failed to update markers",r),r}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove markers",e),e}}showPopup(e){try{for(const r of this.markerDataArray)r.marker.id==e?this.markerPopupProcessor.show(r):this.markerPopupProcessor.hide(r)}catch(r){console.error(r);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw r instanceof Error&&this.log("error","Failed to show popup",r),r}}hidePopup(e){try{if(e){const r=this.markerDataMap.get(e);if(r==null)return;this.markerPopupProcessor.hide(r)}else for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r)}catch(r){console.error(r);for(const n of this.markerDataArray)this.markerPopupProcessor.hide(n);throw r instanceof Error&&this.log("error","Failed to hide popup",r),r}}async updateMarkerData(e){try{let r=this.markerDataArray.map(i=>i.marker);for(let i=0;i<e.length;i++){const s=e[i];this.markerDataMap.get(s.id)||r.push(s)}const n=await this.getMarkerStates(r);try{this.markerDataUpdating=!0;for(let i=0;i<r.length;i++){const s=r[i],o=n[i],l=this.markerDataMap.get(s.id);if(l)l.update(o);else{const a=new ns(this.mapProvider,s,o);a.create(),this.markerDataMap.set(s.id,a),this.markerDataArray.push(a)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip)),this.markerPopupProcessor.updateElements(this.markerDataArray.map(i=>i.popup).filter(i=>i!=null))}finally{this.markerDataUpdating=!1}}catch(r){throw console.error(r),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),r instanceof Error&&this.log("error","Failed to update marker data",r),r}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.removeElements(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","Failed to remove marker data",e),e}finally{this.markerDataUpdating=!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 Ve.post(ts,n,{headers:{"Cache-Control":this.apiDevEnvironment?"no-cache":""}});return i.token&&(this.apiToken=i.token),i.states}processMarkerDataCallback(){if(this.mapProvider.getContainer().parentElement!=null&&this.markerDataArray.length!=0)try{this.processMarkerData(),window.setTimeout(this.processMarkerDataCallback.bind(this),25)}catch(e){console.error(e),e instanceof Error&&this.log("error","Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.mapProvider.getBounds(),r=this.mapProvider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,r),this.markerPinProcessor.process(e,r)}async log(e,r,n){if(!this.apiDevEnvironment)try{const i={key:this.apiKey,title:r,level:e,content:{version:ln,...n}};await Ve.post(rs,i)}catch(i){console.error(i)}}}class ns{marker;zoom;pin;tooltip;popup;constructor(e,r,n){this.marker=r,this.zoom=n[0],this.pin=new Ge(e,r,n),this.tooltip=new Yt(e,r,n),r.popup&&(this.popup=new Vt(e,r))}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()}}class Ht{provider;id;lat;lng;shown;element;component;marker;constructor(e,r){this.provider=e,this.id=r.id,this.lat=r.lat,this.lng=r.lng,this.shown=!0}create(){this.createElement(),this.createMarker(),this.updateZIndex()}createElement(){throw new Error("Create element not implemented")}createMarker(){const e=this.element;if(!e)throw new Error("Failed to create provider marker");this.marker=this.provider.createMarker(e,this.lat,this.lng,this.getZindex())}updateZIndex(){if(this.marker==null)throw new Error("Failed to update provider marker z-index");this.marker.update(this.getZindex())}updateMap(e){const r=this.marker,n=this.component;if(r==null||n==null)throw new Error("Failed to update provider marker map");e?r.inserted()==!1&&r.insert():r.inserted()==!0&&r.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){this.marker?.remove()}}class Ge extends Ht{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:Ge.DEFAULT_SIZE,height:Ge.DEFAULT_SIZE,radius:Ge.DEFAULT_SIZE},this.colors=r.pin?.colors,this.zoom=n[0],this.bodyCallback=r.pin?.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Tt(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.updateZIndex()}updateMap(e){super.updateMap(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}}class ct{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(ct.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=e?.pin?.maxZoom??ct.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.remove()),this.pinElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new Wr(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.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),s++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}}class Yt extends Ht{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=Tt(Xr,{target:this.element,props:{id:this.id+"_tooltip",layer:Ii,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.updateZIndex()}updateMap(e){super.updateMap(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)+Yt.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 is{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.remove()),this.tooltipElements.length=0}process(e,r){const n=this.provider.getParameters().mapSize,i=new Wr(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.updateMap(!0),s.isCollapsed()==!1&&s.isBodyLoaded()==!1&&s.updateBody()):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}}class Vt extends Ht{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=Tt(Xr,{target:this.element,props:{id:this.id+"_popup",layer:Li,priority:0,style:this.style,colors:this.colors}})}updateMap(e){super.updateMap(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 Vt.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}}class ss{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.remove()),this.popupElements.length=0,this.popupPositioned.clear()}process(){for(const e of this.popupElements)if(e.shown){if(e.setCollapsed(!1),e.updateMap(!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,p=this.provider.getContainer().getBoundingClientRect(),h=l-p.left,c=p.right-u,d=a-p.top,b=p.bottom-f,N=Math.min(e.style.width,e.style.height)/4,ne=h<0?h-N:c<0?-c+N:0,E=d<0?d-N:b<0?-b+N:0;this.provider.panBy(ne,E),this.popupPositioned.set(e.id,!0)}}else e.setCollapsed(!0),e.isCollapsed()&&e.updateMap(!1)}}const un=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',os=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${un()}<span>&nbsp;@arenarium/maps</span></a>`;oe.MapManager=qt,oe.getAttributionHtml=os,oe.getImageHtml=un,Object.defineProperty(oe,Symbol.toStringTag,{value:"Module"})}));
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .pin.svelte-zz3jrb{position:absolute;background-color:var(--arenarium-maps-pin-border, white);padding:2px;box-sizing:border-box;box-shadow:var(--arenarium-maps-pin-shadow, 0px 2px 2px rgba(0, 0, 0, .5));transform-origin:0% 0%;transform-style:preserve-3d;transform:translate(-50%,-50%);backface-visibility:hidden;will-change:scale}.pin.svelte-zz3jrb .body:where(.svelte-zz3jrb){background-color:var(--arenarium-maps-pin-background, darkgreen);overflow:hidden;will-change:opacity}.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;filter:drop-shadow(var(--arenarium-maps-tooltip-shadow, 0px 2px 2px rgba(0, 0, 0, .5)));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;background-color:var(--arenarium-maps-tooltip-background, white);cursor:pointer}.anchor.svelte-11extwn .pointer:where(.svelte-11extwn){position:absolute;left:0;top:0;background-color:var(--arenarium-maps-tooltip-background, white);transform-origin:0% 0%}.anchor.svelte-11extwn:hover{transform-style:preserve-3d;backface-visibility:hidden;filter:drop-shadow(var(--arenarium-maps-tooltip-shadow-hover, 0px 2px 4px rgba(0, 0, 0, .5)))}.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}
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arenarium/maps",
3
- "version": "1.1.3",
3
+ "version": "1.2.1",
4
4
  "license": "MIT",
5
5
  "author": "arenarium.dev",
6
6
  "description": "Visualize complex map markers clearly. A JavaScript lib for effective display of map markers, compatible with MapLibre, Mapbox, and Google Maps.",
@@ -15,8 +15,8 @@
15
15
  "module": "./dist/main.es.js",
16
16
  "svelte": "./dist/main.es.js",
17
17
  "types": "./dist/main.d.ts",
18
- "unpkg": "./dist/index.js",
19
- "jsdelivr": "./dist/index.js",
18
+ "unpkg": "./dist/main.js",
19
+ "jsdelivr": "./dist/main.js",
20
20
  "exports": {
21
21
  ".": {
22
22
  "types": "./dist/main.d.ts",
@@ -24,24 +24,6 @@
24
24
  "import": "./dist/main.es.js",
25
25
  "require": "./dist/main.cjs.js"
26
26
  },
27
- "./maplibre": {
28
- "types": "./dist/maplibre.d.ts",
29
- "svelte": "./dist/maplibre.es.js",
30
- "import": "./dist/maplibre.es.js",
31
- "require": "./dist/maplibre.cjs.js"
32
- },
33
- "./mapbox": {
34
- "types": "./dist/mapbox.d.ts",
35
- "svelte": "./dist/mapbox.es.js",
36
- "import": "./dist/mapbox.es.js",
37
- "require": "./dist/mapbox.cjs.js"
38
- },
39
- "./google": {
40
- "types": "./dist/google.d.ts",
41
- "svelte": "./dist/google.es.js",
42
- "import": "./dist/google.es.js",
43
- "require": "./dist/google.cjs.js"
44
- },
45
27
  "./dist/style.css": {
46
28
  "import": "./dist/style.css",
47
29
  "require": "./dist/style.css"
@@ -56,61 +38,46 @@
56
38
  "**/*.css"
57
39
  ],
58
40
  "devDependencies": {
41
+ "@googlemaps/js-api-loader": "^1.16.10",
59
42
  "@rollup/plugin-typescript": "^12.1.4",
60
43
  "@sveltejs/adapter-auto": "^6.1.0",
61
- "@sveltejs/kit": "^2.39.1",
62
- "@sveltejs/package": "^2.5.1",
63
- "@sveltejs/vite-plugin-svelte": "^5.1.1",
64
- "@types/node": "^24.4.0",
44
+ "@sveltejs/kit": "^2.43.4",
45
+ "@sveltejs/package": "^2.5.4",
46
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
47
+ "@types/google.maps": "^3.58.1",
48
+ "@types/node": "^24.5.2",
65
49
  "dts-bundle-generator": "^9.5.1",
66
- "eslint": "^9.35.0",
50
+ "eslint": "^9.36.0",
67
51
  "eslint-config-prettier": "^10.1.8",
68
- "eslint-plugin-svelte": "^3.12.3",
52
+ "eslint-plugin-svelte": "^3.12.4",
69
53
  "globals": "^16.4.0",
70
54
  "less": "^4.4.1",
55
+ "mapbox-gl": "^3.15.0",
56
+ "maplibre-gl": "^5.7.3",
71
57
  "prettier": "^3.6.2",
72
58
  "prettier-plugin-svelte": "^3.4.0",
73
- "publint": "^0.3.12",
74
- "svelte": "^5.38.10",
75
- "svelte-check": "^4.3.1",
59
+ "publint": "^0.3.13",
60
+ "svelte": "^5.39.6",
61
+ "svelte-check": "^4.3.2",
76
62
  "typescript": "^5.9.2",
77
- "typescript-eslint": "^8.43.0",
78
- "vite": "^6.3.6",
63
+ "typescript-eslint": "^8.44.1",
64
+ "vite": "^7.1.7",
79
65
  "vite-plugin-dts": "^4.5.4",
80
- "arenarium-maps-shared": "1.0.0"
81
- },
82
- "peerDependencies": {
83
- "@googlemaps/js-api-loader": "^1.16.10",
84
- "@types/google.maps": "^3.58.1",
85
- "mapbox-gl": "^3.13.0",
86
- "maplibre-gl": "^5.6.1"
87
- },
88
- "peerDependenciesMeta": {
89
- "@googlemaps/js-api-loader": {
90
- "optional": true
91
- },
92
- "@types/google.maps": {
93
- "optional": true
94
- },
95
- "mapbox-gl": {
96
- "optional": true
97
- },
98
- "maplibre-gl": {
99
- "optional": true
100
- }
66
+ "@arenarium/maps-integration-google": "1.0.1",
67
+ "@arenarium/maps-integration-mapbox": "1.0.1",
68
+ "@arenarium/maps-integration-maplibre": "1.0.1",
69
+ "@arenarium/maps-shared": "1.0.0"
101
70
  },
102
71
  "dependencies": {
103
- "zod": "^3.25.76"
72
+ "valibot": "^1.1.0"
104
73
  },
105
74
  "scripts": {
106
75
  "lib_dev": "vite dev --host",
107
76
  "lib_dev_browser": "vite dev --mode browser --host",
108
77
  "lib_check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
109
78
  "lib_check_watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
110
- "lib_build_vite_modular": "vite build -c ./vite/modular/vite.config.ts",
111
- "lib_build_vite_browser": "vite build -c ./vite/browser/vite.config.ts",
112
- "lib_build_types_browser": "dts-bundle-generator --export-referenced-types --umd-module-name=arenarium -o ./dist/index.d.ts ./src/lib/index.ts",
113
- "lib_build": "pnpm run lib_build_vite_modular && pnpm run lib_build_vite_browser && pnpm run lib_build_types_browser",
79
+ "lib_build": "vite build -c ./vite/vite.config.ts",
80
+ "lib_build_dev": "vite build -c ./vite/vite.config.ts --mode development",
114
81
  "lib_patch": "pnpm version patch --no-git-tag-version",
115
82
  "lib_publish_public": "pnpm publish --access public",
116
83
  "lib_build_patch_commit_publish": "pnpm run build && pnpm run lib_patch_push && pnpm run lib_publish_public",
@@ -1 +0,0 @@
1
- "use strict";const t=()=>'<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />',e=()=>`<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${t()}<span>&nbsp;@arenarium/maps</span></a>`;exports.getAttributionHtml=e;
@@ -1,4 +0,0 @@
1
- const t = () => '<img src="https://arenarium.dev/favicon.svg" alt="Arenarium Maps" style="height: 1.25em; vertical-align: middle;" />', a = () => `<a href="https://arenarium.dev" target="_blank" style="color: inherit;">${t()}<span>&nbsp;@arenarium/maps</span></a>`;
2
- export {
3
- a as g
4
- };
@@ -1 +0,0 @@
1
- "use strict";var l=Object.defineProperty;var m=(a,t,e)=>t in a?l(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var r=(a,t,e)=>m(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./attribution-3vg4I3xA.cjs");class p{constructor(t,e,s,i){r(this,"MapClass");r(this,"MapMarkerClass");r(this,"map");r(this,"options");r(this,"attributionObserver");r(this,"attributionElement");this.MapClass=t,this.MapMarkerClass=e,this.options=i,this.map=new this.MapClass(s,{...i}),(i.attribution||i.attribution==null)&&(this.map.addListener("idle",()=>{this.attributionObserver||(this.attributionObserver=new MutationObserver((n,o)=>{this.insertAttributionElement(),this.attributionElement!=null&&(this.updateAttributionElement(),o.disconnect())}),this.attributionObserver.observe(s,{childList:!0,subtree:!0}))}),this.map.addListener("bounds_changed",()=>{this.updateAttributionElement()}))}insertAttributionElement(){var n,o;const t=this.map.getDiv();if(t==null)return;const e=t.getElementsByClassName("gmnoprint")[0];if(e==null||e.parentElement==null)return;const s=e.cloneNode(!0),i=(o=(n=s.childNodes.item(0))==null?void 0:n.childNodes.item(1))==null?void 0:o.childNodes.item(0);i!=null&&(i.title="",i.innerHTML=u.getAttributionHtml(),e.parentElement.insertBefore(s,e),this.attributionElement=i)}updateAttributionElement(){var s,i;const t=this.map.getDiv();if(t==null)return;const e=(i=(s=this.attributionElement)==null?void 0:s.childNodes.item(0))==null?void 0:i.childNodes.item(1);e!=null&&(e.style.display=t.clientWidth>500?"initial":"none")}getParameters(){return{mapSize:256,zoomMin:this.options.minZoom??0,zoomMax:this.options.maxZoom??24,zoomScale:10}}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const t=this.map.getBounds();if(t==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const e=t.getSouthWest(),s=t.getNorthEast();return{sw:{lat:e.lat(),lng:e.lng()},ne:{lat:s.lat(),lng:s.lng()}}}panBy(t,e){this.map.panBy(t,e)}createMarker(t,e,s,i){const n=new this.MapMarkerClass({position:{lat:e,lng:s},content:t,zIndex:i});return{instance:n,inserted:()=>n.map!=null&&n.map==this.map,insert:()=>n.map=this.map,remove:()=>n.map=void 0,update:o=>n.zIndex=o}}}const d=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],h=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100}]},{elementType:"geometry",stylers:[{lightness:-45}]},{elementType:"labels.text.fill",stylers:[{lightness:-100}]},{elementType:"labels.text.stroke",stylers:[{lightness:-15}]},{featureType:"water",elementType:"geometry",stylers:[{lightness:-50}]}];exports.GoogleMapDarkStyle=h;exports.GoogleMapLightStyle=d;exports.GoogleMapsProvider=p;
package/dist/google.d.ts DELETED
@@ -1,311 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export declare const GoogleMapDarkStyle: ({
4
- elementType: string;
5
- stylers: {
6
- visibility: string;
7
- }[];
8
- featureType?: undefined;
9
- } | {
10
- stylers: {
11
- saturation: number;
12
- }[];
13
- elementType?: undefined;
14
- featureType?: undefined;
15
- } | {
16
- elementType: string;
17
- stylers: {
18
- lightness: number;
19
- }[];
20
- featureType?: undefined;
21
- } | {
22
- featureType: string;
23
- elementType: string;
24
- stylers: {
25
- lightness: number;
26
- }[];
27
- })[];
28
-
29
- export declare const GoogleMapLightStyle: ({
30
- elementType: string;
31
- stylers: {
32
- visibility: string;
33
- }[];
34
- featureType?: undefined;
35
- } | {
36
- stylers: ({
37
- saturation: number;
38
- lightness?: undefined;
39
- } | {
40
- lightness: number;
41
- saturation?: undefined;
42
- })[];
43
- elementType?: undefined;
44
- featureType?: undefined;
45
- } | {
46
- featureType: string;
47
- stylers: {
48
- lightness: number;
49
- }[];
50
- elementType?: undefined;
51
- } | {
52
- featureType: string;
53
- elementType: string;
54
- stylers: {
55
- saturation: number;
56
- }[];
57
- })[];
58
-
59
- declare interface GoogleMapsClass {
60
- new (container: HTMLElement, options: google.maps.MapOptions): google.maps.Map;
61
- }
62
-
63
- declare interface GoogleMapsMarkerClass {
64
- new (options: google.maps.marker.AdvancedMarkerElementOptions): google.maps.marker.AdvancedMarkerElement;
65
- }
66
-
67
- declare interface GoogleMapsOptions extends google.maps.MapOptions {
68
- attribution?: boolean;
69
- }
70
-
71
- export declare class GoogleMapsProvider implements MapProvider {
72
- private MapClass;
73
- private MapMarkerClass;
74
- private map;
75
- private options;
76
- private attributionObserver;
77
- private attributionElement;
78
- constructor(mapClass: GoogleMapsClass, mapMarkerClass: GoogleMapsMarkerClass, container: HTMLElement, options: GoogleMapsOptions);
79
- private insertAttributionElement;
80
- private updateAttributionElement;
81
- getParameters(): MapProviderParameters;
82
- getMap(): google.maps.Map;
83
- getContainer(): HTMLElement;
84
- getZoom(): number;
85
- getBounds(): MapBounds;
86
- panBy(x: number, y: number): void;
87
- createMarker(element: HTMLElement, lat: number, lng: number, zIndex: number): MapProviderMarker;
88
- }
89
-
90
- declare type MapBounds = z.infer<typeof mapBoundsSchema>;
91
-
92
- declare const mapBoundsSchema: z.ZodObject<{
93
- sw: z.ZodObject<{
94
- lat: z.ZodNumber;
95
- lng: z.ZodNumber;
96
- }, "strip", z.ZodTypeAny, {
97
- lat: number;
98
- lng: number;
99
- }, {
100
- lat: number;
101
- lng: number;
102
- }>;
103
- ne: z.ZodObject<{
104
- lat: z.ZodNumber;
105
- lng: z.ZodNumber;
106
- }, "strip", z.ZodTypeAny, {
107
- lat: number;
108
- lng: number;
109
- }, {
110
- lat: number;
111
- lng: number;
112
- }>;
113
- }, "strip", z.ZodTypeAny, {
114
- sw: {
115
- lat: number;
116
- lng: number;
117
- };
118
- ne: {
119
- lat: number;
120
- lng: number;
121
- };
122
- }, {
123
- sw: {
124
- lat: number;
125
- lng: number;
126
- };
127
- ne: {
128
- lat: number;
129
- lng: number;
130
- };
131
- }>;
132
-
133
- declare type MapProvider = z.infer<typeof mapProviderSchema>;
134
-
135
- declare type MapProviderMarker = z.infer<typeof mapProviderMarkerSchema>;
136
-
137
- declare const mapProviderMarkerSchema: z.ZodObject<{
138
- instance: z.ZodAny;
139
- inserted: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>;
140
- insert: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
141
- remove: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
142
- update: z.ZodFunction<z.ZodTuple<[z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
143
- }, "strip", z.ZodTypeAny, {
144
- inserted: (...args: unknown[]) => boolean;
145
- insert: (...args: unknown[]) => void;
146
- remove: (...args: unknown[]) => void;
147
- update: (args_0: number, ...args: unknown[]) => void;
148
- instance?: any;
149
- }, {
150
- inserted: (...args: unknown[]) => boolean;
151
- insert: (...args: unknown[]) => void;
152
- remove: (...args: unknown[]) => void;
153
- update: (args_0: number, ...args: unknown[]) => void;
154
- instance?: any;
155
- }>;
156
-
157
- declare type MapProviderParameters = z.infer<typeof mapProviderParametersSchema>;
158
-
159
- declare const mapProviderParametersSchema: z.ZodObject<{
160
- mapSize: z.ZodNumber;
161
- zoomMin: z.ZodNumber;
162
- zoomMax: z.ZodNumber;
163
- zoomScale: z.ZodNumber;
164
- }, "strip", z.ZodTypeAny, {
165
- mapSize: number;
166
- zoomMin: number;
167
- zoomMax: number;
168
- zoomScale: number;
169
- }, {
170
- mapSize: number;
171
- zoomMin: number;
172
- zoomMax: number;
173
- zoomScale: number;
174
- }>;
175
-
176
- declare const mapProviderSchema: z.ZodObject<{
177
- getParameters: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
178
- mapSize: z.ZodNumber;
179
- zoomMin: z.ZodNumber;
180
- zoomMax: z.ZodNumber;
181
- zoomScale: z.ZodNumber;
182
- }, "strip", z.ZodTypeAny, {
183
- mapSize: number;
184
- zoomMin: number;
185
- zoomMax: number;
186
- zoomScale: number;
187
- }, {
188
- mapSize: number;
189
- zoomMin: number;
190
- zoomMax: number;
191
- zoomScale: number;
192
- }>>;
193
- getContainer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodEffects<z.ZodAny, HTMLElement, any>>;
194
- getZoom: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodNumber>;
195
- getBounds: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodObject<{
196
- sw: z.ZodObject<{
197
- lat: z.ZodNumber;
198
- lng: z.ZodNumber;
199
- }, "strip", z.ZodTypeAny, {
200
- lat: number;
201
- lng: number;
202
- }, {
203
- lat: number;
204
- lng: number;
205
- }>;
206
- ne: z.ZodObject<{
207
- lat: z.ZodNumber;
208
- lng: z.ZodNumber;
209
- }, "strip", z.ZodTypeAny, {
210
- lat: number;
211
- lng: number;
212
- }, {
213
- lat: number;
214
- lng: number;
215
- }>;
216
- }, "strip", z.ZodTypeAny, {
217
- sw: {
218
- lat: number;
219
- lng: number;
220
- };
221
- ne: {
222
- lat: number;
223
- lng: number;
224
- };
225
- }, {
226
- sw: {
227
- lat: number;
228
- lng: number;
229
- };
230
- ne: {
231
- lat: number;
232
- lng: number;
233
- };
234
- }>>;
235
- panBy: z.ZodFunction<z.ZodTuple<[z.ZodNumber, z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
236
- createMarker: z.ZodFunction<z.ZodTuple<[z.ZodEffects<z.ZodAny, HTMLElement, any>, z.ZodNumber, z.ZodNumber, z.ZodNumber], z.ZodUnknown>, z.ZodObject<{
237
- instance: z.ZodAny;
238
- inserted: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodBoolean>;
239
- insert: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
240
- remove: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodVoid>;
241
- update: z.ZodFunction<z.ZodTuple<[z.ZodNumber], z.ZodUnknown>, z.ZodVoid>;
242
- }, "strip", z.ZodTypeAny, {
243
- inserted: (...args: unknown[]) => boolean;
244
- insert: (...args: unknown[]) => void;
245
- remove: (...args: unknown[]) => void;
246
- update: (args_0: number, ...args: unknown[]) => void;
247
- instance?: any;
248
- }, {
249
- inserted: (...args: unknown[]) => boolean;
250
- insert: (...args: unknown[]) => void;
251
- remove: (...args: unknown[]) => void;
252
- update: (args_0: number, ...args: unknown[]) => void;
253
- instance?: any;
254
- }>>;
255
- }, "strip", z.ZodTypeAny, {
256
- getParameters: (...args: unknown[]) => {
257
- mapSize: number;
258
- zoomMin: number;
259
- zoomMax: number;
260
- zoomScale: number;
261
- };
262
- getContainer: (...args: unknown[]) => HTMLElement;
263
- getZoom: (...args: unknown[]) => number;
264
- getBounds: (...args: unknown[]) => {
265
- sw: {
266
- lat: number;
267
- lng: number;
268
- };
269
- ne: {
270
- lat: number;
271
- lng: number;
272
- };
273
- };
274
- panBy: (args_0: number, args_1: number, ...args: unknown[]) => void;
275
- createMarker: (args_0: any, args_1: number, args_2: number, args_3: number, ...args: unknown[]) => {
276
- inserted: (...args: unknown[]) => boolean;
277
- insert: (...args: unknown[]) => void;
278
- remove: (...args: unknown[]) => void;
279
- update: (args_0: number, ...args: unknown[]) => void;
280
- instance?: any;
281
- };
282
- }, {
283
- getParameters: (...args: unknown[]) => {
284
- mapSize: number;
285
- zoomMin: number;
286
- zoomMax: number;
287
- zoomScale: number;
288
- };
289
- getContainer: (...args: unknown[]) => any;
290
- getZoom: (...args: unknown[]) => number;
291
- getBounds: (...args: unknown[]) => {
292
- sw: {
293
- lat: number;
294
- lng: number;
295
- };
296
- ne: {
297
- lat: number;
298
- lng: number;
299
- };
300
- };
301
- panBy: (args_0: number, args_1: number, ...args: unknown[]) => void;
302
- createMarker: (args_0: HTMLElement, args_1: number, args_2: number, args_3: number, ...args: unknown[]) => {
303
- inserted: (...args: unknown[]) => boolean;
304
- insert: (...args: unknown[]) => void;
305
- remove: (...args: unknown[]) => void;
306
- update: (args_0: number, ...args: unknown[]) => void;
307
- instance?: any;
308
- };
309
- }>;
310
-
311
- export { }