@arenarium/maps 1.0.182 → 1.0.183
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/index.js +1 -1
- package/dist/main.cjs.js +1 -1
- package/dist/main.es.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(N,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(N=typeof globalThis<"u"?globalThis:N||self,F(N.arenarium={}))})(this,function(N){"use strict";var Fo=Object.defineProperty;var Ca=N=>{throw TypeError(N)};var Bo=(N,F,V)=>F in N?Fo(N,F,{enumerable:!0,configurable:!0,writable:!0,value:V}):N[F]=V;var p=(N,F,V)=>Bo(N,typeof F!="symbol"?F+"":F,V),mr=(N,F,V)=>F.has(N)||Ca("Cannot "+V);var C=(N,F,V)=>(mr(N,F,"read from private field"),V?V.call(N):F.get(N)),Y=(N,F,V)=>F.has(N)?Ca("Cannot add the same private member more than once"):F instanceof WeakSet?F.add(N):F.set(N,V),J=(N,F,V,Wt)=>(mr(N,F,"write to private field"),Wt?Wt.call(N,V):F.set(N,V),V),$t=(N,F,V)=>(mr(N,F,"access private method"),V);var jt,yt,vt,Fe,Zt,Ft,Qe,_t,Be,Se,et,ze,Na,Ta,gr,Ma,Ee,xt,Bt,tt;var V=Array.isArray,Wt=Array.prototype.indexOf,Ia=Array.from,_n=Object.defineProperty,Et=Object.getOwnPropertyDescriptor,Oa=Object.prototype,Ra=Array.prototype,La=Object.getPrototypeOf,yr=Object.isExtensible;function Pa(n){for(var e=0;e<n.length;e++)n[e]()}function Da(){var n,e,t=new Promise((r,a)=>{n=r,e=a});return{promise:t,resolve:n,reject:e}}const ae=2,xn=4,vr=8,qt=16,Ae=32,nt=64,_r=128,ie=256,Yt=512,X=1024,pe=2048,$e=4096,rt=8192,at=16384,bn=32768,ja=65536,xr=1<<17,Za=1<<18,wn=1<<19,br=1<<20,kn=1<<21,Sn=1<<22,We=1<<23,Xt=Symbol("$state"),zn=new class extends Error{constructor(){super(...arguments);p(this,"name","StaleReactionError");p(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Fa(){throw new Error("https://svelte.dev/e/await_outside_boundary")}function Ba(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Va(n){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ua(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $a(n){throw new Error("https://svelte.dev/e/effect_orphan")}function Wa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function qa(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Ya(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function Xa(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const Ha=2,H=Symbol();function wr(n){return n===this.v}let Vo=!1,he=null;function Ht(n){he=n}function En(n,e=!1,t){he={p:he,c:null,e:null,s:n,x:null,l:null}}function Mn(n){var e=he,t=e.e;if(t!==null){e.e=null;for(var r of t)Dr(r)}return n!==void 0&&(e.x=n),he=e.p,n??{}}function kr(){return!0}const Ga=new WeakMap;function Ja(n){var e=j;if(e===null)return R.f|=We,n;if((e.f&bn)===0){if((e.f&_r)===0)throw!e.parent&&n instanceof Error&&Sr(n),n;e.b.error(n)}else An(n,e)}function An(n,e){for(;e!==null;){if((e.f&_r)!==0)try{e.b.error(n);return}catch{}e=e.parent}throw n instanceof Error&&Sr(n),n}function Sr(n){const e=Ga.get(n);e&&(_n(n,"message",{value:e.message}),_n(n,"stack",{value:e.stack}))}let Gt=[];function Ka(){var n=Gt;Gt=[],Pa(n)}function Qa(n){Gt.length===0&&queueMicrotask(Ka),Gt.push(n)}function ei(){for(var n=j.b;n!==null&&!n.has_pending_snippet();)n=n.parent;return n===null&&Fa(),n}function ti(n){var e=ae|pe,t=R!==null&&(R.f&ae)!==0?R:null;return j===null||t!==null&&(t.f&ie)!==0?e|=ie:j.f|=wn,{ctx:he,deps:null,effects:null,equals:wr,f:e,fn:n,reactions:null,rv:0,v:H,wv:0,parent:t??j,ac:null}}function ni(n,e){let t=j;t===null&&Ba();var r=t.b,a=void 0,i=Cr(H),o=null,s=!R;return fi(()=>{try{var l=n()}catch(m){l=Promise.reject(m)}var c=()=>l;a=(o==null?void 0:o.then(c,c))??Promise.resolve(l),o=a;var u=fe,d=r.pending;s&&(r.update_pending_count(1),d||u.increment());const f=(m,E=void 0)=>{o=null,d||u.activate(),E?E!==zn&&(i.f|=We,Tn(i,E)):((i.f&We)!==0&&(i.f^=We),Tn(i,m)),s&&(r.update_pending_count(-1),d||u.decrement()),Mr()};if(a.then(f,m=>f(null,m||"unknown")),u)return()=>{queueMicrotask(()=>u.neuter())}}),new Promise(l=>{function c(u){function d(){u===a?l(i):c(a)}u.then(d,d)}c(a)})}function zr(n){var e=n.effects;if(e!==null){n.effects=null;for(var t=0;t<e.length;t+=1)He(e[t])}}function ri(n){for(var e=n.parent;e!==null;){if((e.f&ae)===0)return e;e=e.parent}return null}function Cn(n){var e,t=j;st(ri(n));try{zr(n),e=Hr(n)}finally{st(t)}return e}function Er(n){var e=Cn(n);if(n.equals(e)||(n.v=e,n.wv=Yr()),!ot)if(Ce!==null)Ce.set(n,n.v);else{var t=(Te||(n.f&ie)!==0)&&n.deps!==null?$e:X;ee(n,t)}}function ai(n,e,t){const r=ti;if(e.length===0){t(n.map(r));return}var a=fe,i=j,o=ii(),s=ei();Promise.all(e.map(l=>ni(l))).then(l=>{a==null||a.activate(),o();try{t([...n.map(r),...l])}catch(c){(i.f&at)===0&&An(c,i)}a==null||a.deactivate(),Mr()}).catch(l=>{s.error(l)})}function ii(){var n=j,e=R,t=he;return function(){st(n),Ne(e),Ht(t)}}function Mr(){st(null),Ne(null),Ht(null)}const Jt=new Set;let fe=null,Ce=null,Uo=[],Mt=[],Kt=null,Nn=!1;const pr=class pr{constructor(){Y(this,ze);Y(this,jt,new Map);Y(this,yt,new Map);Y(this,vt,new Set);Y(this,Fe,0);Y(this,Zt,null);Y(this,Ft,!1);Y(this,Qe,[]);Y(this,_t,[]);Y(this,Be,[]);Y(this,Se,[]);Y(this,et,[]);p(this,"skipped_effects",new Set)}capture(e,t){C(this,yt).has(e)||C(this,yt).set(e,t),C(this,jt).set(e,e.v)}activate(){fe=this}deactivate(){fe=null}neuter(){J(this,Ft,!0)}flush(){Mt.length>0?this.flush_effects():$t(this,ze,gr).call(this),fe===this&&(C(this,Fe)===0&&Jt.delete(this),fe=null)}flush_effects(){var e=it;Nn=!0;try{var t=0;for($r(!0);Mt.length>0;)t++>1e3&&oi(),$t(this,ze,Na).call(this,Mt),Ye.clear()}finally{Nn=!1,$r(e),Kt=null}}increment(){J(this,Fe,C(this,Fe)+1)}decrement(){if(J(this,Fe,C(this,Fe)-1),C(this,Fe)===0){for(const e of C(this,Be))ee(e,pe),qe(e);for(const e of C(this,Se))ee(e,pe),qe(e);for(const e of C(this,et))ee(e,pe),qe(e);J(this,Be,[]),J(this,Se,[]),this.flush()}}add_callback(e){C(this,vt).add(e)}settled(){return(C(this,Zt)??J(this,Zt,Da())).promise}static ensure(){if(fe===null){const e=fe=new pr;Jt.add(fe),queueMicrotask(()=>{fe===e&&e.flush()})}return fe}};jt=new WeakMap,yt=new WeakMap,vt=new WeakMap,Fe=new WeakMap,Zt=new WeakMap,Ft=new WeakMap,Qe=new WeakMap,_t=new WeakMap,Be=new WeakMap,Se=new WeakMap,et=new WeakMap,ze=new WeakSet,Na=function(e){var i;Mt=[];var t=null;if(Jt.size>1){t=new Map,Ce=new Map;for(const[o,s]of C(this,jt))t.set(o,{v:o.v,wv:o.wv}),o.v=s;for(const o of Jt)if(o!==this)for(const[s,l]of C(o,yt))t.has(s)||(t.set(s,{v:s.v,wv:s.wv}),s.v=l)}for(const o of e)$t(this,ze,Ta).call(this,o);if(C(this,Qe).length===0&&C(this,Fe)===0){var r=C(this,Be),a=C(this,Se);J(this,Be,[]),J(this,Se,[]),J(this,et,[]),$t(this,ze,gr).call(this),Ar(r),Ar(a),(i=C(this,Zt))==null||i.resolve()}else{for(const o of C(this,Be))ee(o,X);for(const o of C(this,Se))ee(o,X);for(const o of C(this,et))ee(o,X)}if(t){for(const[o,{v:s,wv:l}]of t)o.wv<=l&&(o.v=s);Ce=null}for(const o of C(this,Qe))Nt(o);for(const o of C(this,_t))Nt(o);J(this,Qe,[]),J(this,_t,[])},Ta=function(e){var u;e.f^=X;for(var t=e.first;t!==null;){var r=t.f,a=(r&(Ae|nt))!==0,i=a&&(r&X)!==0,o=i||(r&rt)!==0||this.skipped_effects.has(t);if(!o&&t.fn!==null){if(a)t.f^=X;else if((r&xn)!==0)C(this,Se).push(t);else if(tn(t))if((r&Sn)!==0){var s=(u=t.b)!=null&&u.pending?C(this,_t):C(this,Qe);s.push(t)}else(t.f&qt)!==0&&C(this,et).push(t),Nt(t);var l=t.first;if(l!==null){t=l;continue}}var c=t.parent;for(t=t.next;t===null&&c!==null;)t=c.next,c=c.parent}},gr=function(){if(!C(this,Ft))for(const e of C(this,vt))e();C(this,vt).clear()};let Qt=pr;function oi(){try{Wa()}catch(n){if(Kt!==null)An(n,Kt);else throw n}}function Ar(n){var e=n.length;if(e!==0){for(var t=0;t<e;t++){var r=n[t];if((r.f&(at|rt))===0&&tn(r)){var a=en;if(Nt(r),r.deps===null&&r.first===null&&r.nodes_start===null&&(r.teardown===null?Vr(r):r.fn=null),en>a&&(r.f&br)!==0)break}}for(;t<e;t+=1)qe(n[t])}}function qe(n){for(var e=Kt=n;e.parent!==null;){e=e.parent;var t=e.f;if(Nn&&e===j&&(t&qt)!==0)return;if((t&(nt|Ae))!==0){if((t&X)===0)return;e.f^=X}}Mt.push(e)}const Ye=new Map;function Cr(n,e){var t={f:0,v:n,reactions:null,equals:wr,rv:0,wv:0};return t}function te(n,e){const t=Cr(n);return xi(t),t}function G(n,e,t=!1){R!==null&&(!ge||(R.f&xr)!==0)&&kr()&&(R.f&(ae|qt|Sn|xr))!==0&&!(K!=null&&K.includes(n))&&Xa();let r=t?At(e):e;return Tn(n,r)}function Tn(n,e){if(!n.equals(e)){var t=n.v;ot?Ye.set(n,e):Ye.set(n,t),n.v=e,Qt.ensure().capture(n,t),(n.f&ae)!==0&&((n.f&pe)!==0&&Cn(n),ee(n,(n.f&ie)===0?X:$e)),n.wv=Yr(),Nr(n,pe),j!==null&&(j.f&X)!==0&&(j.f&(Ae|nt))===0&&(ue===null?bi([n]):ue.push(n))}return e}function In(n){G(n,n.v+1)}function Nr(n,e){var t=n.reactions;if(t!==null)for(var r=t.length,a=0;a<r;a++){var i=t[a],o=i.f;(o&pe)===0&&(ee(i,e),(o&(X|ie))!==0&&((o&ae)!==0?Nr(i,$e):qe(i)))}}function At(n){if(typeof n!="object"||n===null||Xt in n)return n;const e=La(n);if(e!==Oa&&e!==Ra)return n;var t=new Map,r=V(n),a=te(0),i=Ge,o=s=>{if(Ge===i)return s();var l=R,c=Ge;Ne(null),qr(i);var u=s();return Ne(l),qr(c),u};return r&&t.set("length",te(n.length)),new Proxy(n,{defineProperty(s,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&qa();var u=t.get(l);return u===void 0?u=o(()=>{var d=te(c.value);return t.set(l,d),d}):G(u,c.value,!0),!0},deleteProperty(s,l){var c=t.get(l);if(c===void 0){if(l in s){const f=o(()=>te(H));t.set(l,f),In(a)}}else{if(r&&typeof l=="string"){var u=t.get("length"),d=Number(l);Number.isInteger(d)&&d<u.v&&G(u,d)}G(c,H),In(a)}return!0},get(s,l,c){var m;if(l===Xt)return n;var u=t.get(l),d=l in s;if(u===void 0&&(!d||(m=Et(s,l))!=null&&m.writable)&&(u=o(()=>{var E=At(d?s[l]:H),x=te(E);return x}),t.set(l,u)),u!==void 0){var f=U(u);return f===H?void 0:f}return Reflect.get(s,l,c)},getOwnPropertyDescriptor(s,l){var c=Reflect.getOwnPropertyDescriptor(s,l);if(c&&"value"in c){var u=t.get(l);u&&(c.value=U(u))}else if(c===void 0){var d=t.get(l),f=d==null?void 0:d.v;if(d!==void 0&&f!==H)return{enumerable:!0,configurable:!0,value:f,writable:!0}}return c},has(s,l){var f;if(l===Xt)return!0;var c=t.get(l),u=c!==void 0&&c.v!==H||Reflect.has(s,l);if(c!==void 0||j!==null&&(!u||(f=Et(s,l))!=null&&f.writable)){c===void 0&&(c=o(()=>{var m=u?At(s[l]):H,E=te(m);return E}),t.set(l,c));var d=U(c);if(d===H)return!1}return u},set(s,l,c,u){var v;var d=t.get(l),f=l in s;if(r&&l==="length")for(var m=c;m<d.v;m+=1){var E=t.get(m+"");E!==void 0?G(E,H):m in s&&(E=o(()=>te(H)),t.set(m+"",E))}if(d===void 0)(!f||(v=Et(s,l))!=null&&v.writable)&&(d=o(()=>te(void 0)),G(d,At(c)),t.set(l,d));else{f=d.v!==H;var x=o(()=>At(c));G(d,x)}var h=Reflect.getOwnPropertyDescriptor(s,l);if(h!=null&&h.set&&h.set.call(u,c),!f){if(r&&typeof l=="string"){var _=t.get("length"),g=Number(l);Number.isInteger(g)&&g>=_.v&&G(_,g+1)}In(a)}return!0},ownKeys(s){U(a);var l=Reflect.ownKeys(s).filter(d=>{var f=t.get(d);return f===void 0||f.v!==H});for(var[c,u]of t)u.v!==H&&!(c in s)&&l.push(c);return l},setPrototypeOf(){Ya()}})}var Tr,Ir,Or,Rr;function si(){if(Tr===void 0){Tr=window,Ir=/Firefox/.test(navigator.userAgent);var n=Element.prototype,e=Node.prototype,t=Text.prototype;Or=Et(e,"firstChild").get,Rr=Et(e,"nextSibling").get,yr(n)&&(n.__click=void 0,n.__className=void 0,n.__attributes=null,n.__style=void 0,n.__e=void 0),yr(t)&&(t.__t=void 0)}}function li(n=""){return document.createTextNode(n)}function Lr(n){return Or.call(n)}function Pr(n){return Rr.call(n)}function On(n,e){return Lr(n)}function ci(n,e=1,t=!1){let r=n;for(;e--;)r=Pr(r);return r}function ui(n){j===null&&R===null&&$a(),R!==null&&(R.f&ie)!==0&&j===null&&Ua(),ot&&Va()}function di(n,e){var t=e.last;t===null?e.last=e.first=n:(t.next=n,n.prev=t,e.last=n)}function Xe(n,e,t,r=!0){var a=j;a!==null&&(a.f&rt)!==0&&(n|=rt);var i={ctx:he,deps:null,nodes_start:null,nodes_end:null,f:n|pe,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(t)try{Nt(i),i.f|=bn}catch(l){throw He(i),l}else e!==null&&qe(i);var o=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&wn)===0;if(!o&&r&&(a!==null&&di(i,a),R!==null&&(R.f&ae)!==0)){var s=R;(s.effects??(s.effects=[])).push(i)}return i}function we(n){ui();var e=j.f,t=!R&&(e&Ae)!==0&&(e&bn)===0;if(t){var r=he;(r.e??(r.e=[])).push(n)}else return Dr(n)}function Dr(n){return Xe(xn|br,n,!1)}function pi(n){Qt.ensure();const e=Xe(nt,n,!0);return(t={})=>new Promise(r=>{t.outro?vi(e,()=>{He(e),r(void 0)}):(He(e),r(void 0))})}function hi(n){return Xe(xn,n,!1)}function fi(n){return Xe(Sn|wn,n,!0)}function jr(n,e=0){return Xe(vr|e,n,!0)}function Zr(n,e=[],t=[]){ai(e,t,r=>{Xe(vr,()=>n(...r.map(U)),!0)})}function mi(n,e=!0){return Xe(Ae,n,!0,e)}function Fr(n){var e=n.teardown;if(e!==null){const t=ot,r=R;Wr(!0),Ne(null);try{e.call(null)}finally{Wr(t),Ne(r)}}}function Br(n,e=!1){var a;var t=n.first;for(n.first=n.last=null;t!==null;){(a=t.ac)==null||a.abort(zn);var r=t.next;(t.f&nt)!==0?t.parent=null:He(t,e),t=r}}function gi(n){for(var e=n.first;e!==null;){var t=e.next;(e.f&Ae)===0&&He(e),e=t}}function He(n,e=!0){var t=!1;(e||(n.f&Za)!==0)&&n.nodes_start!==null&&n.nodes_end!==null&&(yi(n.nodes_start,n.nodes_end),t=!0),Br(n,e&&!t),nn(n,0),ee(n,at);var r=n.transitions;if(r!==null)for(const i of r)i.stop();Fr(n);var a=n.parent;a!==null&&a.first!==null&&Vr(n),n.next=n.prev=n.teardown=n.ctx=n.deps=n.fn=n.nodes_start=n.nodes_end=n.ac=null}function yi(n,e){for(;n!==null;){var t=n===e?null:Pr(n);n.remove(),n=t}}function Vr(n){var e=n.parent,t=n.prev,r=n.next;t!==null&&(t.next=r),r!==null&&(r.prev=t),e!==null&&(e.first===n&&(e.first=r),e.last===n&&(e.last=t))}function vi(n,e){var t=[];Ur(n,t,!0),_i(t,()=>{He(n),e&&e()})}function _i(n,e){var t=n.length;if(t>0){var r=()=>--t||e();for(var a of n)a.out(r)}else e()}function Ur(n,e,t){if((n.f&rt)===0){if(n.f^=rt,n.transitions!==null)for(const o of n.transitions)(o.is_global||t)&&e.push(o);for(var r=n.first;r!==null;){var a=r.next,i=(r.f&ja)!==0||(r.f&Ae)!==0;Ur(r,e,i?t:!1),r=a}}}let it=!1;function $r(n){it=n}let ot=!1;function Wr(n){ot=n}let R=null,ge=!1;function Ne(n){R=n}let j=null;function st(n){j=n}let K=null;function xi(n){R!==null&&(K===null?K=[n]:K.push(n))}let Q=null,oe=0,ue=null;function bi(n){ue=n}let en=1,Ct=0,Ge=Ct;function qr(n){Ge=n}let Te=!1;function Yr(){return++en}function tn(n){var d;var e=n.f;if((e&pe)!==0)return!0;if((e&$e)!==0){var t=n.deps,r=(e&ie)!==0;if(t!==null){var a,i,o=(e&Yt)!==0,s=r&&j!==null&&!Te,l=t.length;if((o||s)&&(j===null||(j.f&at)===0)){var c=n,u=c.parent;for(a=0;a<l;a++)i=t[a],(o||!((d=i==null?void 0:i.reactions)!=null&&d.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);o&&(c.f^=Yt),s&&u!==null&&(u.f&ie)===0&&(c.f^=ie)}for(a=0;a<l;a++)if(i=t[a],tn(i)&&Er(i),i.wv>n.wv)return!0}(!r||j!==null&&!Te)&&ee(n,X)}return!1}function Xr(n,e,t=!0){var r=n.reactions;if(r!==null&&!(K!=null&&K.includes(n)))for(var a=0;a<r.length;a++){var i=r[a];(i.f&ae)!==0?Xr(i,e,!1):e===i&&(t?ee(i,pe):(i.f&X)!==0&&ee(i,$e),qe(i))}}function Hr(n){var E;var e=Q,t=oe,r=ue,a=R,i=Te,o=K,s=he,l=ge,c=Ge,u=n.f;Q=null,oe=0,ue=null,Te=(u&ie)!==0&&(ge||!it||R===null),R=(u&(Ae|nt))===0?n:null,K=null,Ht(n.ctx),ge=!1,Ge=++Ct,n.ac!==null&&(n.ac.abort(zn),n.ac=null);try{n.f|=kn;var d=(0,n.fn)(),f=n.deps;if(Q!==null){var m;if(nn(n,oe),f!==null&&oe>0)for(f.length=oe+Q.length,m=0;m<Q.length;m++)f[oe+m]=Q[m];else n.deps=f=Q;if(!Te||(u&ae)!==0&&n.reactions!==null)for(m=oe;m<f.length;m++)((E=f[m]).reactions??(E.reactions=[])).push(n)}else f!==null&&oe<f.length&&(nn(n,oe),f.length=oe);if(kr()&&ue!==null&&!ge&&f!==null&&(n.f&(ae|$e|pe))===0)for(m=0;m<ue.length;m++)Xr(ue[m],n);return a!==null&&a!==n&&(Ct++,ue!==null&&(r===null?r=ue:r.push(...ue))),(n.f&We)!==0&&(n.f^=We),d}catch(x){return Ja(x)}finally{n.f^=kn,Q=e,oe=t,ue=r,R=a,Te=i,K=o,Ht(s),ge=l,Ge=c}}function wi(n,e){let t=e.reactions;if(t!==null){var r=Wt.call(t,n);if(r!==-1){var a=t.length-1;a===0?t=e.reactions=null:(t[r]=t[a],t.pop())}}t===null&&(e.f&ae)!==0&&(Q===null||!Q.includes(e))&&(ee(e,$e),(e.f&(ie|Yt))===0&&(e.f^=Yt),zr(e),nn(e,0))}function nn(n,e){var t=n.deps;if(t!==null)for(var r=e;r<t.length;r++)wi(n,t[r])}function Nt(n){var e=n.f;if((e&at)===0){ee(n,X);var t=j,r=it;j=n,it=!0;try{(e&qt)!==0?gi(n):Br(n),Fr(n);var a=Hr(n);n.teardown=typeof a=="function"?a:null,n.wv=en;var i}finally{it=r,j=t}}}function U(n){var e=n.f,t=(e&ae)!==0;if(R!==null&&!ge){var r=j!==null&&(j.f&at)!==0;if(!r&&!(K!=null&&K.includes(n))){var a=R.deps;if((R.f&kn)!==0)n.rv<Ct&&(n.rv=Ct,Q===null&&a!==null&&a[oe]===n?oe++:Q===null?Q=[n]:(!Te||!Q.includes(n))&&Q.push(n));else{(R.deps??(R.deps=[])).push(n);var i=n.reactions;i===null?n.reactions=[R]:i.includes(R)||i.push(R)}}}else if(t&&n.deps===null&&n.effects===null){var o=n,s=o.parent;s!==null&&(s.f&ie)===0&&(o.f^=ie)}if(ot){if(Ye.has(n))return Ye.get(n);if(t){o=n;var l=o.v;return((o.f&X)!==0||Gr(o))&&(l=Cn(o)),Ye.set(o,l),l}}else if(t){if(o=n,Ce!=null&&Ce.has(o))return Ce.get(o);tn(o)&&Er(o)}if((n.f&We)!==0)throw n.v;return n.v}function Gr(n){if(n.v===H)return!0;if(n.deps===null)return!1;for(const e of n.deps)if(Ye.has(e)||(e.f&ae)!==0&&Gr(e))return!0;return!1}function ki(n){var e=ge;try{return ge=!0,n()}finally{ge=e}}const Si=-7169;function ee(n,e){n.f=n.f&Si|e}const zi=["touchstart","touchmove"];function Ei(n){return zi.includes(n)}const Mi=new Set,Jr=new Set;function rn(n){var g;var e=this,t=e.ownerDocument,r=n.type,a=((g=n.composedPath)==null?void 0:g.call(n))||[],i=a[0]||n.target,o=0,s=n.__root;if(s){var l=a.indexOf(s);if(l!==-1&&(e===document||e===window)){n.__root=e;return}var c=a.indexOf(e);if(c===-1)return;l<=c&&(o=l)}if(i=a[o]||n.target,i!==e){_n(n,"currentTarget",{configurable:!0,get(){return i||t}});var u=R,d=j;Ne(null),st(null);try{for(var f,m=[];i!==null;){var E=i.assignedSlot||i.parentNode||i.host||null;try{var x=i["__"+r];if(x!=null&&(!i.disabled||n.target===i))if(V(x)){var[h,..._]=x;h.apply(i,[n,..._])}else x.call(i,n)}catch(v){f?m.push(v):f=v}if(n.cancelBubble||E===e||E===null)break;i=E}if(f){for(let v of m)queueMicrotask(()=>{throw v});throw f}}finally{n.__root=e,delete n.currentTarget,Ne(u),st(d)}}}function Ai(n){var e=document.createElement("template");return e.innerHTML=n.replaceAll("<!>","<!---->"),e.content}function Ci(n,e){var t=j;t.nodes_start===null&&(t.nodes_start=n,t.nodes_end=e)}function Kr(n,e){var t=(e&Ha)!==0,r,a=!n.startsWith("<!>");return()=>{r===void 0&&(r=Ai(a?n:"<!>"+n),r=Lr(r));var i=t||Ir?document.importNode(r,!0):r.cloneNode(!0);return Ci(i,i),i}}function Qr(n,e){n!==null&&n.before(e)}function Rn(n,e){return Ni(n,e)}const lt=new Map;function Ni(n,{target:e,anchor:t,props:r={},events:a,context:i,intro:o=!0}){si();var s=new Set,l=d=>{for(var f=0;f<d.length;f++){var m=d[f];if(!s.has(m)){s.add(m);var E=Ei(m);e.addEventListener(m,rn,{passive:E});var x=lt.get(m);x===void 0?(document.addEventListener(m,rn,{passive:E}),lt.set(m,1)):lt.set(m,x+1)}}};l(Ia(Mi)),Jr.add(l);var c=void 0,u=pi(()=>{var d=t??e.appendChild(li());return mi(()=>{if(i){En({});var f=he;f.c=i}a&&(r.$$events=a),c=n(d,r)||{},i&&Mn()}),()=>{var E;for(var f of s){e.removeEventListener(f,rn);var m=lt.get(f);--m===0?(document.removeEventListener(f,rn),lt.delete(f)):lt.set(f,m)}Jr.delete(l),d!==t&&((E=d.parentNode)==null||E.removeChild(d))}});return Ti.set(c,u),c}let Ti=new WeakMap;const ea=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Ii(n,e,t){var r=n==null?"":""+n;if(t){for(var a in t)if(t[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,o=0;(o=r.indexOf(a,o))>=0;){var s=o+i;(o===0||ea.includes(r[o-1]))&&(s===r.length||ea.includes(r[s]))?r=(o===0?"":r.substring(0,o))+r.substring(s+1):o=s}}return r===""?null:r}function ta(n,e=!1){var t=e?" !important;":";",r="";for(var a in n){var i=n[a];i!=null&&i!==""&&(r+=" "+a+": "+i+t)}return r}function Ln(n){return n[0]!=="-"||n[1]!=="-"?n.toLowerCase():n}function Oi(n,e){if(e){var t="",r,a;if(Array.isArray(e)?(r=e[0],a=e[1]):r=e,n){n=String(n).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,s=!1,l=[];r&&l.push(...Object.keys(r).map(Ln)),a&&l.push(...Object.keys(a).map(Ln));var c=0,u=-1;const x=n.length;for(var d=0;d<x;d++){var f=n[d];if(s?f==="/"&&n[d-1]==="*"&&(s=!1):i?i===f&&(i=!1):f==="/"&&n[d+1]==="*"?s=!0:f==='"'||f==="'"?i=f:f==="("?o++:f===")"&&o--,!s&&i===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===x-1){if(u!==-1){var m=Ln(n.substring(c,u).trim());if(!l.includes(m)){f!==";"&&d++;var E=n.substring(c,d).trim();t+=" "+E+";"}}c=d+1,u=-1}}}}return r&&(t+=ta(r)),a&&(t+=ta(a,!0)),t=t.trim(),t===""?null:t}return n==null?null:String(n)}function na(n,e,t,r,a,i){var o=n.__className;if(o!==t||o===void 0){var s=Ii(t,r,i);s==null?n.removeAttribute("class"):n.className=s,n.__className=t}else if(i&&a!==i)for(var l in i){var c=!!i[l];(a==null||c!==!!a[l])&&n.classList.toggle(l,c)}return i}function Pn(n,e={},t,r){for(var a in t){var i=t[a];e[a]!==i&&(t[a]==null?n.style.removeProperty(a):n.style.setProperty(a,i,r))}}function an(n,e,t,r){var a=n.__style;if(a!==e){var i=Oi(e,r);i==null?n.removeAttribute("style"):n.style.cssText=i,n.__style=e}else r&&(Array.isArray(r)?(Pn(n,t==null?void 0:t[0],r[0]),Pn(n,t==null?void 0:t[1],r[1],"important")):Pn(n,t,r));return r}const Ri=()=>performance.now(),ye={tick:n=>requestAnimationFrame(n),now:()=>Ri(),tasks:new Set};function ra(){const n=ye.now();ye.tasks.forEach(e=>{e.c(n)||(ye.tasks.delete(e),e.f())}),ye.tasks.size!==0&&ye.tick(ra)}function Li(n){let e;return ye.tasks.size===0&&ye.tick(ra),{promise:new Promise(t=>{ye.tasks.add(e={c:n,f:t})}),abort(){ye.tasks.delete(e)}}}function aa(n,e){return n===e||(n==null?void 0:n[Xt])===e}function ct(n={},e,t,r){return hi(()=>{var a,i;return jr(()=>{a=i,i=[],ki(()=>{n!==t(...i)&&(e(n,...i),a&&aa(t(...a),n)&&e(null,...a))})}),()=>{Qa(()=>{i&&aa(t(...i),n)&&e(null,...i)})}}),n}const Pi="5";typeof window<"u"&&((Ma=window.__svelte??(window.__svelte={})).v??(Ma.v=new Set)).add(Pi);function Di(n){return n}function Dn(n){return-.5*(Math.cos(Math.PI*n)-1)}function ji(n){const e=Math.cos(n*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Zi(n){return Math.sin(n*Math.PI/2)}const Fi=128,Bi=0,Vi=1,Ui=2;class $i{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Fi);p(this,"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 t=this.layers[e];if(t==null)continue;const r=t.animations;if(r!=null)for(let a=0;a<r.length;a++){const i=r[a];if(i!=null){for(const o of i.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,t,r,a){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let o=i.animations[t];o==null&&(o=i.animations[t]=new Map);let s={id:r,priority:t,executed:!1,function:a};o.set(r,s),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let r=0;r<this.layers.length;r++){let a=this.layers[r];if(a==null)continue;let i=a.animations[e];if(i==null)return;let o=i.get(t);if(o==null||o.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const Ie=new $i;function ia(n){return Object.prototype.toString.call(n)==="[object Date]"}function jn(n,e){if(n===e||n!==n)return()=>n;const t=typeof n;if(t!==typeof e||Array.isArray(n)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(n)){const r=e.map((a,i)=>jn(n[i],a));return a=>r.map(i=>i(a))}if(t==="object"){if(!n||!e)throw new Error("Object cannot be null");if(ia(n)&&ia(e)){const i=n.getTime(),s=e.getTime()-i;return l=>new Date(i+l*s)}const r=Object.keys(e),a={};return r.forEach(i=>{a[i]=jn(n[i],e[i])}),i=>{const o={};return r.forEach(s=>{o[s]=a[s](i)}),o}}if(t==="number"){const r=e-n;return a=>n+a*r}return()=>e}const hr=class hr{constructor(e,t={}){Y(this,Ee);Y(this,xt);Y(this,Bt);Y(this,tt,null);J(this,Ee,te(e)),J(this,xt,te(e)),J(this,Bt,t)}static of(e,t){const r=new hr(e(),t);return jr(()=>{r.set(e())}),r}set(e,t){var d;G(C(this,xt),e);let{delay:r=0,duration:a=400,easing:i=Di,interpolate:o=jn}={...C(this,Bt),...t};if(a===0)return(d=C(this,tt))==null||d.abort(),G(C(this,Ee),e),Promise.resolve();const s=ye.now()+r;let l,c=!1,u=C(this,tt);return J(this,tt,Li(f=>{if(f<s)return!0;if(!c){c=!0;const E=C(this,Ee).v;l=o(E,e),typeof a=="function"&&(a=a(E,e)),u==null||u.abort()}const m=f-s;return m>a?(G(C(this,Ee),e),!1):(G(C(this,Ee),l(i(m/a))),!0)})),C(this,tt).promise}get current(){return U(C(this,Ee))}get target(){return U(C(this,xt))}set target(e){this.set(e)}};Ee=new WeakMap,xt=new WeakMap,Bt=new WeakMap,tt=new WeakMap;let Zn=hr;class on{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Zn(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Wi=Kr('<div><div class="body svelte-1nfn9j8"></div></div>');function qi(n,e){En(e,!0);let t,r;function a(){return r}let i=te(!1);function o(g){G(i,g,!0)}function s(){return U(i)}let l=new on(0,{easing:Dn});we(()=>{c(l.motion.current)}),we(()=>{U(i)==!1&&(l.snap(),Ie.clear(e.priority,e.id))});function c(g){t&&Ie.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=g.toString(),t.style.filter=`brightness(${.25+.75*g})`,r.style.opacity=g.toString()})}function u(g){g!=l.value&&l.set(g,{duration:75})}function d(){return l.motion.current==0}function f(){return l.value}var m=Wi();let E,x;var h=On(m);let _;return ct(h,g=>r=g,()=>r),ct(m,g=>t=g,()=>t),Zr((g,v,S)=>{E=na(m,1,"pin svelte-1nfn9j8",null,E,g),x=an(m,"",x,v),_=an(h,"",_,S)},[()=>({displayed:U(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),Qr(n,m),Mn({getBody:a,setDisplayed:o,getDisplayed:s,setScale:u,getCollapsed:d,getScale:f})}var Je;(n=>{function e(t,r,a){const i=t/2,o=r/2,s=Math.sqrt(i*i+o*o),l=Math.atan(o/i)*(180/Math.PI),c=a*(Math.PI/180);return a<180?a<90?a<l?{offsetX:0,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:0}:a<180-l?{offsetX:s*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:s*Math.sin(c)-o}:a<270?a<180+l?{offsetX:-t,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:-r}:a<360-l?{offsetX:s*Math.cos(c)-i,offsetY:-r}:{offsetX:0,offsetY:s*Math.sin(c)-o}}n.getOffsets=e})(Je||(Je={}));var Yi=Kr('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function oa(n,e){En(e,!0);let t,r,a,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;we(()=>{a.style.width=`${e.margin*4}px`,a.style.height=`${e.margin*4}px`});let c=te(!0);function u(P){G(c,P,!0)}function d(){return U(c)}let f=te(!0);function m(P){G(f,P,!0)}function E(){return h.motion.current==0}function x(){return h.motion.current==1}let h=new on(0);we(()=>{_(h.motion.current)}),we(()=>{U(c)==!1&&(h.snap(),Ie.clear(e.priority,e.id+"_scale"))}),we(()=>{U(f)==!0&&h.value!=0&&(Ie.stacked()?h.set(0,{duration:0}):h.set(0,{duration:150,easing:ji})),U(f)==!1&&h.value!=1&&h.set(1,{duration:150,easing:Zi})});function _(P){!t||!r||!a||Ie.equeue(U(f)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${P}`,r.style.scale=`${P}`,a.style.scale=`${P}`})}let g=NaN,v=te(!1),S=new on(-o/2,{easing:Dn}),z=new on(-s/2,{easing:Dn});we(()=>{I(S.motion.current,z.motion.current)}),we(()=>{U(c)==!1&&(S.snap(),S.snap(),Ie.clear(e.priority,e.id+"_angle"))}),we(()=>{U(f)==!0&&U(v)&&(S.update({duration:75}),S.update({duration:75}))});function I(P,me){if(!t||!r||!a)return;const kt=P+o/2,Me=me+s/2,be=s<o?kt*s/o:kt,St=s>o?Me*o/s:Me,yn=Math.atan2(St,be)/Math.PI*180-45,Vt=0,vn=30,zt=Math.sqrt(be*be+St*St),Ut=Math.min(o,s)/2,Do=Ut*Math.SQRT2,jo=(zt-Ut)/(Do-Ut),Aa=Vt+jo*(vn-Vt),Zo=zt<Ut?zt/Ut:1;Ie.equeue(e.layer,e.priority,e.id+"_angle",()=>{r.style.transform=`translate(${Math.round(P)}px, ${Math.round(me)}px)`,a.style.transform=`scale(${Zo}) rotate(${yn}deg) skew(${Aa}deg, ${Aa}deg)`})}function Z(P){if(U(v)==!1){let me=Je.getOffsets(o,s,P);S.set(Math.round(me.offsetX),{duration:0}),z.set(Math.round(me.offsetY),{duration:0}),I(S.value,z.value),g=P,G(v,!0)}else if(P!=g){let me=Math.abs(P-g),kt=me<180?me:360-me,Me=Math.log(kt)*75,be=Je.getOffsets(o,s,P);S.set(Math.round(be.offsetX),{duration:Me}),z.set(Math.round(be.offsetY),{duration:Me}),g=P}}function le(){return Je.getOffsets(o,s,g)}var ce=Yi();let xe;var Ve=On(ce);ct(Ve,P=>a=P,()=>a);var re=ci(Ve,2),Ue=On(re);return ct(Ue,P=>i=P,()=>i),ct(re,P=>r=P,()=>r),ct(ce,P=>t=P,()=>t),Zr(P=>{xe=na(ce,1,"anchor svelte-j5igi2",null,xe,P),an(re,`margin: ${e.margin}px;`),an(Ue,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:U(c)})]),Qr(n,ce),Mn({getBody:l,setDisplayed:u,getDisplayed:d,setCollapsed:m,getCollapsed:E,getExpanded:x,setAngle:Z,getOffsets:le})}var Oe;(n=>{function e(s,l,c){return{x:r(l)*c,y:a(s)*c}}n.project=e;function t(s,l,c){return{lat:o(l/c),lng:i(s/c)}}n.unproject=t;function r(s){return(180+s)/360}function a(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function i(s){return s*360-180}function o(s){return 360/Math.PI*Math.atan(Math.exp((180-s*360)*Math.PI/180))-90}})(Oe||(Oe={}));class sa{constructor(e,t,r,a,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const o=r*Math.pow(2,t),s=Oe.project(e.sw.lat,e.sw.lng,o),l=Oe.project(e.ne.lat,e.ne.lng,o),c=s.x-a,u=s.y+i,d=l.x+a,f=l.y-i,m=Oe.unproject(c,u,o),E=Oe.unproject(d,f,o);this.swLat=m.lat,this.swLng=m.lng,this.neLat=E.lat,this.neLng=E.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var $;(n=>{n.COUNT=12,n.DEFAULT=270,n.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})($||($={}));var Tt;(n=>{let e;(o=>{o.RADIANS=$.DEGREES.map(c=>c*Math.PI/180),o.RADIANS_COS=o.RADIANS.map(c=>Math.cos(c)),o.RADIANS_SIN=o.RADIANS.map(c=>Math.sin(c));function s(c,u){const d=Math.abs(u/c);return d<1?d<.26795?0:1:d<3.73205?2:3}function l(c,u){const d=s(c,u);return c>0?u>0?(12-d)%12:0+d:u>0?6+d:6-d}o.getAngleIndex=l})(e=n.Angle||(n.Angle={}));class t{constructor(s,l,c,u){p(this,"center");p(this,"width");p(this,"height");p(this,"index");this.center=s,this.width=l,this.height=c,this.index=u}}n.Particle=t;function r(o){let s=!0;for(let l=0;l<o.length;l++){const{particle:c,influences:u}=o[l],d=c.index,f=c.center,m=c.width,E=c.height,x=i(d,-1),h=i(d,1),_=f.x+m*e.RADIANS_COS[x],g=f.y+E*e.RADIANS_SIN[x],v=f.x+m*e.RADIANS_COS[d],S=f.y+E*e.RADIANS_SIN[d],z=f.x+m*e.RADIANS_COS[h],I=f.y+E*e.RADIANS_SIN[h];let Z=0,le=0,ce=0;for(let Ve=0;Ve<u.length;Ve++){const re=u[Ve],Ue=re.index,P=re.center,me=re.width,kt=re.height,Me=P.x+me*e.RADIANS_COS[Ue],be=P.y+kt*e.RADIANS_SIN[Ue],St=_-Me,fr=g-be;Z+=1/(St*St+fr*fr);const yn=v-Me,Vt=S-be;le+=1/(yn*yn+Vt*Vt);const vn=z-Me,zt=I-be;ce+=1/(vn*vn+zt*zt)}let xe=0;Z<le&&Z<ce&&(xe=-1),ce<le&&ce<Z&&(xe=1),xe!=0&&(c.index=i(d,xe),s=!1)}return s}n.updatePointIndexes=r;function a(o){for(let s=0;s<o.length;s++){const{particle:l,influences:c}=o[s],u=l.center;let d=0,f=0;for(let m=0;m<c.length;m++){const x=c[m].center,h=u.x-x.x,_=u.y-x.y;if(h==0&&_==0)continue;const g=Math.sqrt(h*h+_*_),v=1/(g*g);d+=v*h/g,f+=-(v*_)/g}l.index=e.getAngleIndex(d,f)}}n.initializePointIndexes=a;function i(o,s){return s==0?o:((o+s)%$.COUNT+$.COUNT)%$.COUNT}})(Tt||(Tt={}));var Re;(n=>{function e(r,a){return!(r.x-r.left>a.x+a.right||r.x+r.right<a.x-a.left||r.y-r.top>a.y+a.bottom||r.y+r.bottom<a.y-a.top)}n.areOverlaping=e;function t(r,a){let i=Math.abs(r.x-a.x),s=(r.x<a.x?r.right+a.left:r.left+a.right)/i,l=Math.abs(r.y-a.y),u=(r.y<a.y?r.bottom+a.top:r.top+a.bottom)/l,d=Math.min(s,u);return Math.log2(d)}n.getZoomWhenTouching=t})(Re||(Re={}));var W;(n=>{class e{constructor(){p(this,"zoomAfterExpanded");p(this,"zoomAfterAngleIndexes");this.zoomAfterExpanded=NaN,this.zoomAfterAngleIndexes=[]}}n.Tooltip=e;class t{constructor(h,_,g){p(this,"index");p(this,"id");p(this,"rank");p(this,"x");p(this,"y");p(this,"width");p(this,"height");p(this,"expanded");p(this,"angle");p(this,"bounds");p(this,"neighbours");p(this,"particle");p(this,"influences");const v=Oe.project(_.lat,_.lng,h.mapSize),S=_.width+2*_.margin,z=_.height+2*_.margin;this.index=g,this.id=_.id,this.rank=_.rank,this.x=v.x,this.y=v.y,this.width=S,this.height=z,this.expanded=!0,this.angle=$.DEFAULT,this.bounds=this.getBounds(1),this.neighbours=new Array,this.particle=new Tt.Particle({x:v.x,y:v.y},this.getParticleWidth(1),this.getParticleHeight(1),$.DEGREES.indexOf($.DEFAULT)),this.influences=[]}getBounds(h){let{offsetX:_,offsetY:g}=Je.getOffsets(this.width,this.height,this.angle),v=-_,S=this.width-v,z=-g,I=this.height-z;return{x:this.x,y:this.y,left:v/h,right:S/h,top:z/h,bottom:I/h}}getParticleWidth(h){return this.width/2/h}getParticleHeight(h){return this.height/2/h}updateBounds(h){this.bounds=this.getBounds(h)}updateParticle(h){this.particle.width=this.getParticleWidth(h),this.particle.height=this.getParticleHeight(h)}}n.Node=t;class r{constructor(h){p(this,"min");p(this,"max");p(this,"scale");p(this,"step");this.min=h.zoomMin,this.max=h.zoomMax,this.scale=h.zoomScale,this.step=1/this.scale}addSteps(h,_){return Math.round((h+_*this.step)*this.scale)/this.scale}getIndex(h){if(!(h<this.min))return Math.min(Math.ceil(h*this.scale),this.max*this.scale)}getMax(h){let _=this.min;for(let g=0;g<h.length;g++){const S=h[g].keys();for(const z of S){const I=Number(z)/this.scale;I>_&&(_=I)}}return _}}n.Zoom=r;function a(x,h){let _=new Array(h.length);for(let g=0;g<h.length;g++)_[g]=new t(x,h[g],g);return _}n.createNodes=a;function i(x,h){const _=new Array;for(let v=0;v<h.length;v++)_[v]=new Array;const g=new Array(h.length);for(let v=0;v<h.length;v++){const S=h[v];g[v]={x:S.x,y:S.y,left:S.width,right:S.width,top:S.height,bottom:S.height}}for(let v=0;v<h.length;v++){const S=h[v],z=g[v],I=_[v];for(let Z=v+1;Z<h.length;Z++){const le=h[Z],ce=g[Z],xe=_[Z],Ve=Re.getZoomWhenTouching(z,ce),re=x.getIndex(Ve);if(re==null)continue;const Ue=I[re],P=xe[re];Ue?Ue.push(le):I[re]=[le],P?P.push(S):xe[re]=[S]}}return _}n.createNeighbourDeltas=i;function o(x){const h=new Set,_=[];for(let g=0;g<x.length;g++){let v=x[g];if(v.expanded==!1||v.neighbours.length==0||h.has(v))continue;h.add(v);const S=[],z=[v];for(;z.length>0;){const I=z.pop();S.push(I);for(const Z of I.neighbours)h.has(Z)||(h.add(Z),z.push(Z))}_.push(S)}return _}n.getNeighbourGraphs=o;function s(x,h,_){for(let g=0;g<x.length;g++){let v=x[g];if(v.expanded==!1){v.neighbours.length=0,v.influences.length=0;continue}const z=h[g][_];if(z!=null)for(let I=0;I<z.length;I++){const Z=z[I];Z.expanded!=!1&&(v.neighbours.push(Z),v.influences.push(Z.particle))}}}n.updateNeighbours=s;function l(x){x.expanded=!1;const h=x.neighbours;for(let _=0;_<h.length;_++){const g=h[_],v=g.neighbours.indexOf(x);g.neighbours.splice(v,1)}}n.updateCollapsed=l;function c(x,h,_){for(let g=0;g<x.length;g++){const v=x[g];if(v.expanded==!1)continue;const S=h.get(v.id);if(!S)throw new Error("Tooltip not found");S.zoomAfterExpanded=_;const z=$.DEGREES.indexOf(v.angle);S.zoomAfterAngleIndexes.length==0?S.zoomAfterAngleIndexes.push([_,z]):S.zoomAfterAngleIndexes[0][1]!=z?S.zoomAfterAngleIndexes.unshift([_,z]):S.zoomAfterAngleIndexes[0][0]=_}}n.updateTooltips=c;function u(x,h){for(let _=0;_<x.length;_++)x[_].updateBounds(h)}n.updateBounds=u;function d(x){const h=new Set;for(let _=0;_<x.length;_++){const g=x[_],v=g.bounds,S=x[_].neighbours;for(let z=0;z<S.length;z++){const I=S[z],Z=I.bounds;Re.areOverlaping(Z,v)&&(h.add(g),h.add(I))}}return h}n.getOverlaps=d;function f(x,h){let _=!1;for(let g=0;g<h.length;g++){const v=h[g],S=v.bounds,z=h[g].neighbours;for(let I=0;I<z.length;I++){const Z=z[I],le=Z.bounds;Re.areOverlaping(le,S)&&(x.has(v)||(x.add(v),_=!0),x.has(Z)||(x.add(Z),_=!0))}}return _}n.updateOverlaps=f;function m(x){let h,_=0;for(let g=0;g<x.length;g++){const v=x[g],S=v.bounds,z=x[g].neighbours;let I=0;for(let Z=0;Z<z.length;Z++){const le=z[Z],ce=le.bounds;Re.areOverlaping(ce,S)&&(I+=1+(le.rank-v.rank))}I=I*z.length,I>_&&(_=I,h=v)}return h}n.getOverlapsWorstNode=m;function E(x){for(let h=0;h<x.length;h++){const g=x[h].bounds;for(let v=h+1;v<x.length;v++){const z=x[v].bounds;if(Re.areOverlaping(z,g))return!0}}return!1}n.areOverlaping=E,(x=>{function h(v){const S=v.map(z=>z.particle);Tt.initializePointIndexes(S.map(z=>({particle:z,influences:S})));for(let z=0;z<v.length;z++){const I=v[z];I.angle=$.DEGREES[I.particle.index]}}x.initializeAngles=h;function _(v){const S=Tt.updatePointIndexes(v);for(let z=0;z<v.length;z++){const I=v[z];I.angle=$.DEGREES[I.particle.index]}return S}x.updateAngles=_;function g(v,S){for(let z=0;z<v.length;z++)v[z].updateParticle(S)}x.updateParticles=g})(n.Particles||(n.Particles={}))})(W||(W={}));function la(n,e){const t=new W.Zoom(n);if(e.length==0)return[];if(e.length==1)return[[t.min,[[t.min,$.DEGREES.indexOf($.DEFAULT)]]]];const r=new Map(e.map(l=>[l.id,new W.Tooltip])),a=W.createNodes(n,e),i=W.createNeighbourDeltas(t,a),o=t.min,s=t.getMax(i);W.Particles.initializeAngles(a),W.updateTooltips(a,r,t.addSteps(t.max,1));for(let l=s;l>=o;l=t.addSteps(l,-1)){const c=Math.pow(2,l),u=Math.round(l*t.scale);W.updateNeighbours(a,i,u);const d=W.getNeighbourGraphs(a);for(const f of d){W.updateBounds(f,c),W.Particles.updateParticles(f,c);const m=W.getOverlaps(f);for(;m.size>1;){const E=Array.from(m);for(;;){const _=W.Particles.updateAngles(E);if(W.updateBounds(E,c),_==!0||W.areOverlaping(E)==!1)break}if(W.updateOverlaps(m,E))continue;const h=W.getOverlapsWorstNode(E);if(h==null)break;W.updateCollapsed(h),m.delete(h)}}W.updateTooltips(a,r,Number(l.toFixed(1)))}return Array.from(r.values()).map(l=>[l.zoomAfterExpanded,l.zoomAfterAngleIndexes])}var D;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},n.getValidEnumValues=a=>{const i=n.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return n.objectValues(o)},n.objectValues=a=>n.objectKeys(a).map(function(i){return a[i]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},n.find=(a,i)=>{for(const o of a)if(i(o))return o},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}n.joinValues=r,n.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(D||(D={}));var ca;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(ca||(ca={}));const w=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Le=n=>{switch(typeof n){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(n)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(n)?w.array:n===null?w.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?w.promise:typeof Map<"u"&&n instanceof Map?w.map:typeof Set<"u"&&n instanceof Set?w.set:typeof Date<"u"&&n instanceof Date?w.date:w.object;default:return w.unknown}},y=D.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},r={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),r}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}de.create=n=>new de(n);const It=(n,e)=>{let t;switch(n.code){case y.invalid_type:n.received===w.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case y.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,D.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:t=`Unrecognized key(s) in object: ${D.joinValues(n.keys,", ")}`;break;case y.invalid_union:t="Invalid input";break;case y.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${D.joinValues(n.options)}`;break;case y.invalid_enum_value:t=`Invalid enum value. Expected ${D.joinValues(n.options)}, received '${n.received}'`;break;case y.invalid_arguments:t="Invalid function arguments";break;case y.invalid_return_type:t="Invalid function return type";break;case y.invalid_date:t="Invalid date";break;case y.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:D.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case y.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case y.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case y.custom:t="Invalid input";break;case y.invalid_intersection_types:t="Intersection results could not be merged";break;case y.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case y.not_finite:t="Number must be finite";break;default:t=e.defaultError,D.assertNever(n)}return{message:t}};let Xi=It;function Fn(){return Xi}const Bn=n=>{const{data:e,path:t,errorMaps:r,issueData:a}=n,i=[...t,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:e,defaultError:s}).message;return{...a,path:i,message:s}};function b(n,e){const t=Fn(),r=Bn({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===It?void 0:It].filter(a=>!!a)});n.common.issues.push(r)}class se{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return M;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const i=await a.key,o=await a.value;r.push({key:i,value:o})}return se.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return M;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const M=Object.freeze({status:"aborted"}),Ot=n=>({status:"dirty",value:n}),ne=n=>({status:"valid",value:n}),ua=n=>n.status==="aborted",da=n=>n.status==="dirty",ut=n=>n.status==="valid",sn=n=>typeof Promise<"u"&&n instanceof Promise;var k;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));class Pe{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pa=(n,e)=>{if(ut(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new de(n.common.issues);return this._error=t,this._error}}};function T(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=n;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,s)=>{const{message:l}=n;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??t??s.defaultError}},description:a}}class L{get description(){return this._def.description}_getType(e){return Le(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Le(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new se,ctx:{common:e.parent.common,data:e.data,parsedType:Le(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(sn(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)},a=this._parseSync({data:e,path:r.path,parent:r});return pa(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return ut(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>ut(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)},a=this._parse({data:e,path:r.path,parent:r}),i=await(sn(a)?a:Promise.resolve(a));return pa(r,i)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const o=e(a),s=()=>i.addIssue({code:y.custom,...r(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new mt({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return Ze.create(this,this._def)}nullable(){return gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this)}promise(){return Dt.create(this,this._def)}or(e){return cn.create([this,e],this._def)}and(e){return un.create(this,e,this._def)}transform(e){return new mt({...T(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Yn({...T(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new vo({typeName:A.ZodBranded,type:this,...T(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Xn({...T(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Hn.create(this,e)}readonly(){return Gn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hi=/^c[^\s-]{8,}$/i,Gi=/^[0-9a-z]+$/,Ji=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ki=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qi=/^[a-z0-9_-]{21}$/i,eo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,to=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,no=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ro="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vn;const ao=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,io=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,so=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,co=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ha="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",uo=new RegExp(`^${ha}$`);function fa(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function po(n){return new RegExp(`^${fa(n)}$`)}function ho(n){let e=`${ha}T${fa(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function fo(n,e){return!!((e==="v4"||!e)&&ao.test(n)||(e==="v6"||!e)&&oo.test(n))}function mo(n,e){if(!eo.test(n))return!1;try{const[t]=n.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function go(n,e){return!!((e==="v4"||!e)&&io.test(n)||(e==="v6"||!e)&&so.test(n))}class De extends L{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==w.string){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.string,received:i.parsedType}),M}const r=new se;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(a=this._getOrReturnCtx(e,a),o?b(a,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&b(a,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")no.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"email",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Vn||(Vn=new RegExp(ro,"u")),Vn.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"emoji",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Ki.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"uuid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Qi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"nanoid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Hi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Gi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid2",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ji.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ulid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),b(a,{validation:"url",code:y.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"regex",code:y.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ho(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?uo.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?po(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?to.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"duration",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?fo(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ip",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?mo(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"jwt",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?go(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cidr",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?lo.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?co.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64url",code:y.invalid_string,message:i.message}),r.dirty()):D.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:y.invalid_string,...k.errToObj(r)})}_addCheck(e){return new De({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...k.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new De({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}De.create=n=>new De({checks:[],typeName:A.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...T(n)});function yo(n,e){const t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,i=Number.parseInt(n.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return i%o/10**a}class dt extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==w.number){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.number,received:i.parsedType}),M}let r;const a=new se;for(const i of this._def.checks)i.kind==="int"?D.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),b(r,{code:y.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?yo(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_finite,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new dt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new dt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}dt.create=n=>new dt({checks:[],typeName:A.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class Rt extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==w.bigint)return this._getInvalidInput(e);let r;const a=new se;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return b(t,{code:y.invalid_type,expected:w.bigint,received:t.parsedType}),M}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new Rt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new Rt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Rt.create=n=>new Rt({checks:[],typeName:A.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...T(n)});class Un extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.boolean,received:r.parsedType}),M}return ne(e.data)}}Un.create=n=>new Un({typeName:A.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class ln extends L{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.date,received:i.parsedType}),M}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_date}),M}const r=new se;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):D.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ln({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}ln.create=n=>new ln({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:A.ZodDate,...T(n)});class ma extends L{_parse(e){if(this._getType(e)!==w.symbol){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.symbol,received:r.parsedType}),M}return ne(e.data)}}ma.create=n=>new ma({typeName:A.ZodSymbol,...T(n)});class ga extends L{_parse(e){if(this._getType(e)!==w.undefined){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.undefined,received:r.parsedType}),M}return ne(e.data)}}ga.create=n=>new ga({typeName:A.ZodUndefined,...T(n)});class ya extends L{_parse(e){if(this._getType(e)!==w.null){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.null,received:r.parsedType}),M}return ne(e.data)}}ya.create=n=>new ya({typeName:A.ZodNull,...T(n)});class $n extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return ne(e.data)}}$n.create=n=>new $n({typeName:A.ZodAny,...T(n)});class pt extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ne(e.data)}}pt.create=n=>new pt({typeName:A.ZodUnknown,...T(n)});class je extends L{_parse(e){const t=this._getOrReturnCtx(e);return b(t,{code:y.invalid_type,expected:w.never,received:t.parsedType}),M}}je.create=n=>new je({typeName:A.ZodNever,...T(n)});class Wn extends L{_parse(e){if(this._getType(e)!==w.undefined){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.void,received:r.parsedType}),M}return ne(e.data)}}Wn.create=n=>new Wn({typeName:A.ZodVoid,...T(n)});class ve extends L{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==w.array)return b(t,{code:y.invalid_type,expected:w.array,received:t.parsedType}),M;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(o||s)&&(b(t,{code:o?y.too_big:y.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(b(t,{code:y.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(b(t,{code:y.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>a.type._parseAsync(new Pe(t,o,t.path,s)))).then(o=>se.mergeArray(r,o));const i=[...t.data].map((o,s)=>a.type._parseSync(new Pe(t,o,t.path,s)));return se.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ve({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new ve({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new ve({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}}ve.create=(n,e)=>new ve({type:n,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...T(e)});function ht(n){if(n instanceof q){const e={};for(const t in n.shape){const r=n.shape[t];e[t]=Ze.create(ht(r))}return new q({...n._def,shape:()=>e})}else return n instanceof ve?new ve({...n._def,type:ht(n.element)}):n instanceof Ze?Ze.create(ht(n.unwrap())):n instanceof gt?gt.create(ht(n.unwrap())):n instanceof ke?ke.create(n.items.map(e=>ht(e))):n}class q extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==w.object){const c=this._getOrReturnCtx(e);return b(c,{code:y.invalid_type,expected:w.object,received:c.parsedType}),M}const{status:r,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof je&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],d=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Pe(a,d,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof je){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(b(a,{code:y.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Pe(a,d,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>se.mergeObjectSync(r,c)):se.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new q({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new q({...this._def,unknownKeys:"strip"})}passthrough(){return new q({...this._def,unknownKeys:"passthrough"})}extend(e){return new q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new q({...this._def,catchall:e})}pick(e){const t={};for(const r of D.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new q({...this._def,shape:()=>t})}omit(e){const t={};for(const r of D.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new q({...this._def,shape:()=>t})}deepPartial(){return ht(this)}partial(e){const t={};for(const r of D.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new q({...this._def,shape:()=>t})}required(e){const t={};for(const r of D.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ze;)i=i._def.innerType;t[r]=i}return new q({...this._def,shape:()=>t})}keyof(){return ba(D.objectKeys(this.shape))}}q.create=(n,e)=>new q({shape:()=>n,unknownKeys:"strip",catchall:je.create(),typeName:A.ZodObject,...T(e)}),q.strictCreate=(n,e)=>new q({shape:()=>n,unknownKeys:"strict",catchall:je.create(),typeName:A.ZodObject,...T(e)}),q.lazycreate=(n,e)=>new q({shape:n,unknownKeys:"strip",catchall:je.create(),typeName:A.ZodObject,...T(e)});class cn extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new de(s.ctx.common.issues));return b(t,{code:y.invalid_union,unionErrors:o}),M}if(t.common.async)return Promise.all(r.map(async i=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const l of r){const c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new de(l));return b(t,{code:y.invalid_union,unionErrors:s}),M}}get options(){return this._def.options}}cn.create=(n,e)=>new cn({options:n,typeName:A.ZodUnion,...T(e)});function qn(n,e){const t=Le(n),r=Le(e);if(n===e)return{valid:!0,data:n};if(t===w.object&&r===w.object){const a=D.objectKeys(e),i=D.objectKeys(n).filter(s=>a.indexOf(s)!==-1),o={...n,...e};for(const s of i){const l=qn(n[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===w.array&&r===w.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<n.length;i++){const o=n[i],s=e[i],l=qn(o,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return t===w.date&&r===w.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class un extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(i,o)=>{if(ua(i)||ua(o))return M;const s=qn(i.value,o.value);return s.valid?((da(i)||da(o))&&t.dirty(),{status:t.value,value:s.data}):(b(r,{code:y.invalid_intersection_types}),M)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}un.create=(n,e,t)=>new un({left:n,right:e,typeName:A.ZodIntersection,...T(t)});class ke extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.array)return b(r,{code:y.invalid_type,expected:w.array,received:r.parsedType}),M;if(r.data.length<this._def.items.length)return b(r,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),M;!this._def.rest&&r.data.length>this._def.items.length&&(b(r,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Pe(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>se.mergeArray(t,o)):se.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ke({...this._def,rest:e})}}ke.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ke({items:n,typeName:A.ZodTuple,rest:null,...T(e)})};class va extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.map)return b(r,{code:y.invalid_type,expected:w.map,received:r.parsedType}),M;const a=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:a._parse(new Pe(r,s,r.path,[c,"key"])),value:i._parse(new Pe(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}va.create=(n,e,t)=>new va({valueType:e,keyType:n,typeName:A.ZodMap,...T(t)});class Lt extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.set)return b(r,{code:y.invalid_type,expected:w.set,received:r.parsedType}),M;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(b(r,{code:y.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(b(r,{code:y.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return M;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Pe(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Lt({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Lt({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Lt.create=(n,e)=>new Lt({valueType:n,minSize:null,maxSize:null,typeName:A.ZodSet,...T(e)});class Pt extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.function)return b(t,{code:y.invalid_type,expected:w.function,received:t.parsedType}),M;function r(s,l){return Bn({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Fn(),It].filter(c=>!!c),issueData:{code:y.invalid_arguments,argumentsError:l}})}function a(s,l){return Bn({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Fn(),It].filter(c=>!!c),issueData:{code:y.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Dt){const s=this;return ne(async function(...l){const c=new de([]),u=await s._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(m=>{throw c.addIssue(a(d,m)),c})})}else{const s=this;return ne(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new de([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new de([a(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pt({...this._def,args:ke.create(e).rest(pt.create())})}returns(e){return new Pt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Pt({args:e||ke.create([]).rest(pt.create()),returns:t||pt.create(),typeName:A.ZodFunction,...T(r)})}}class _a extends L{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_a.create=(n,e)=>new _a({getter:n,typeName:A.ZodLazy,...T(e)});class xa extends L{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return b(t,{received:t.data,code:y.invalid_literal,expected:this._def.value}),M}return{status:"valid",value:e.data}}get value(){return this._def.value}}xa.create=(n,e)=>new xa({value:n,typeName:A.ZodLiteral,...T(e)});function ba(n,e){return new ft({values:n,typeName:A.ZodEnum,...T(e)})}class ft extends L{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return b(t,{expected:D.joinValues(r),received:t.parsedType,code:y.invalid_type}),M}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return b(t,{received:t.data,code:y.invalid_enum_value,options:r}),M}return ne(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ft.create(e,{...this._def,...t})}exclude(e,t=this._def){return ft.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}ft.create=ba;class wa extends L{_parse(e){const t=D.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==w.string&&r.parsedType!==w.number){const a=D.objectValues(t);return b(r,{expected:D.joinValues(a),received:r.parsedType,code:y.invalid_type}),M}if(this._cache||(this._cache=new Set(D.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=D.objectValues(t);return b(r,{received:r.data,code:y.invalid_enum_value,options:a}),M}return ne(e.data)}get enum(){return this._def.values}}wa.create=(n,e)=>new wa({values:n,typeName:A.ZodNativeEnum,...T(e)});class Dt extends L{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.promise&&t.common.async===!1)return b(t,{code:y.invalid_type,expected:w.promise,received:t.parsedType}),M;const r=t.parsedType===w.promise?t.data:Promise.resolve(t.data);return ne(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Dt.create=(n,e)=>new Dt({type:n,typeName:A.ZodPromise,...T(e)});class mt extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{b(r,o),o.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return M;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?M:l.status==="dirty"||t.value==="dirty"?Ot(l.value):l});{if(t.value==="aborted")return M;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?M:s.status==="dirty"||t.value==="dirty"?Ot(s.value):s}}if(a.type==="refinement"){const o=s=>{const l=a.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?M:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?M:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(a.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ut(o))return M;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ut(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:t.value,value:s})):M);D.assertNever(a)}}mt.create=(n,e,t)=>new mt({schema:n,typeName:A.ZodEffects,effect:e,...T(t)}),mt.createWithPreprocess=(n,e,t)=>new mt({schema:e,effect:{type:"preprocess",transform:n},typeName:A.ZodEffects,...T(t)});class Ze extends L{_parse(e){return this._getType(e)===w.undefined?ne(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ze.create=(n,e)=>new Ze({innerType:n,typeName:A.ZodOptional,...T(e)});class gt extends L{_parse(e){return this._getType(e)===w.null?ne(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gt.create=(n,e)=>new gt({innerType:n,typeName:A.ZodNullable,...T(e)});class Yn extends L{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===w.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Yn.create=(n,e)=>new Yn({innerType:n,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class Xn extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sn(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new de(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new de(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xn.create=(n,e)=>new Xn({innerType:n,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class ka extends L{_parse(e){if(this._getType(e)!==w.nan){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.nan,received:r.parsedType}),M}return{status:"valid",value:e.data}}}ka.create=n=>new ka({typeName:A.ZodNaN,...T(n)});class vo extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Hn extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?M:i.status==="dirty"?(t.dirty(),Ot(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?M:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new Hn({in:e,out:t,typeName:A.ZodPipeline})}}class Gn extends L{_parse(e){const t=this._def.innerType._parse(e),r=a=>(ut(a)&&(a.value=Object.freeze(a.value)),a);return sn(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Gn.create=(n,e)=>new Gn({innerType:n,typeName:A.ZodReadonly,...T(e)});var A;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(A||(A={}));const Ke=De.create,O=dt.create,Jn=Un.create,Kn=$n.create;pt.create,je.create;const dn=Wn.create,Qn=ve.create,B=q.create;cn.create,un.create;const Sa=ke.create,_e=Pt.create,_o=ft.create,xo=Dt.create;Ze.create,gt.create,B({pin:B({fade:Jn().optional(),maxCount:O().optional(),maxZoom:O().optional()}).optional(),animation:B({queue:B({limit:O().optional()}).optional()}).optional(),api:B({states:B({url:Ke(),key:Ke()}).optional(),log:B({enabled:Jn()}).optional()}).optional()});const er=O().min(-90).max(90),tr=O().min(-180).max(180),bo=B({sw:B({lat:er,lng:tr}),ne:B({lat:er,lng:tr})}),nr=Kn().refine(n=>n instanceof HTMLElement,"Must be an HTMLElement"),za=B({mapSize:O(),zoomMin:O(),zoomMax:O(),zoomScale:O()}),wo=B({instance:Kn(),inserted:_e().returns(Jn()),insert:_e().returns(dn()),remove:_e().returns(dn()),update:_e().args(O()).returns(dn())}),ko=B({parameters:za,getContainer:_e().args().returns(nr),getZoom:_e().args().returns(O()),getBounds:_e().args().returns(bo),panBy:_e().args(O(),O()).returns(dn()),createMarker:_e().args(nr,er,tr,O()).returns(wo)}),rr=_e().args(Ke()).returns(xo(nr)),So=B({id:Ke().min(1),rank:O(),lat:O().min(-90).max(90),lng:O().min(-180).max(180),tooltip:B({style:B({width:O(),height:O(),margin:O(),radius:O()}).refine(n=>Math.min(n.width,n.height)/n.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:rr}),pin:B({style:B({width:O(),height:O(),radius:O()}),body:rr}).optional(),popup:B({style:B({width:O(),height:O(),radius:O(),margin:O()}),body:rr}).optional()}),zo=Qn(So);Sa([O(),Qn(Sa([O(),O()]))]);const Eo=B({id:Ke(),rank:O(),lat:O(),lng:O(),width:O(),height:O(),margin:O()});B({key:Ke(),parameters:za,input:Qn(Eo)});const Mo=_o(["info","warn","error"]);B({title:Ke(),level:Mo,content:Kn()});class Ao{constructor(e,t){p(this,"provider");p(this,"apiStatesUrl");p(this,"apiStatesKey");p(this,"apiLogEnabled","undefined");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");ko.parse(e),this.provider=e,this.markerPinProcessor=new or(e),this.markerTooltipProcessor=new Co(e),this.markerPopupProcessor=new No(e),this.configuration=t,this.log("info","[CLIENT] Map manager created")}set configuration(e){var t,r,a,i,o,s,l;this.apiStatesUrl=(r=(t=e==null?void 0:e.api)==null?void 0:t.states)==null?void 0:r.url,this.apiStatesKey=(i=(a=e==null?void 0:e.api)==null?void 0:a.states)==null?void 0:i.key,this.apiLogEnabled=(o=e==null?void 0:e.api)!=null&&o.log?e.api.log.enabled?"true":"false":"undefined",this.markerPinProcessor.setConfiguration(e),Ie.setLimit(((l=(s=e==null?void 0:e.animation)==null?void 0:s.queue)==null?void 0:l.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await zo.parseAsync(e);try{let t;if(e.length>1){const r=e.map(a=>({id:a.id,rank:a.rank,lat:a.lat,lng:a.lng,width:a.tooltip.style.width,height:a.tooltip.style.height,margin:a.tooltip.style.margin}));if(this.apiStatesUrl!=null&&this.apiStatesKey!=null){const a={key:this.apiStatesKey,parameters:this.provider.parameters,input:r},i=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok||!i.body)throw new Error("Failed to get marker states: "+i.statusText);t=await i.json()}else t=la(this.provider.parameters,r)}else t=[[0,[[0,$.DEGREES.indexOf($.DEFAULT)]]]];this.updateMarkerData(e,t),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","[CLIENT] Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","[CLIENT] Failed to remove markers",e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw t instanceof Error&&this.log("error","[CLIENT] Failed to show popup",t),t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw t instanceof Error&&this.log("error","[CLIENT] Failed to hide popup",t),t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const r=new Map(e.map((i,o)=>[i.id,new Ea(this.provider,i,t[o])])),a=Array.from(this.markerDataArray);for(const i of a)r.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const o=e[i],s=t[i],l=this.markerDataMap.get(o.id);if(l)l.update(s);else{const c=new Ea(this.provider,o,s);c.create(),this.markerDataMap.set(o.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,o)=>i.zoom-o.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(r){throw console.error(r),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),r instanceof Error&&this.log("error","[CLIENT] Failed to update marker data",r),r}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","[CLIENT] Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(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","[CLIENT] Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,r){if(!(this.apiLogEnabled==="undefined"&&(window!=null&&window.location.host.startsWith("localhost")))&&this.apiLogEnabled!=="false")try{await fetch("https://arenarium.dev/api/public/v1/log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t,level:e,content:r})})}catch(a){console.error(a)}}}class Ea{constructor(e,t,r){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=r[0],this.pin=new ir(e,t,r),this.tooltip=new sr(e,t,r)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class ar{constructor(e,t){p(this,"provider");p(this,"id");p(this,"lat");p(this,"lng");p(this,"shown");p(this,"element");p(this,"component");p(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.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 t=this.marker,r=this.component;if(t==null||r==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const bt=class bt extends ar{constructor(t,r,a){var i,o,s,l;super(t,r);p(this,"width");p(this,"height");p(this,"radius");p(this,"zoom");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=((i=r.pin)==null?void 0:i.style.width)??bt.DEFAULT_SIZE,this.height=((o=r.pin)==null?void 0:o.style.height)??bt.DEFAULT_SIZE,this.radius=((s=r.pin)==null?void 0:s.style.radius)??bt.DEFAULT_SIZE,this.zoom=a[0],this.bodyCallback=(l=r.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Rn(qi,{target:this.element,props:{id:this.id+"_pin",layer:Ui,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var r;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(bt,"DEFAULT_SIZE",16);let ir=bt;const wt=class wt{constructor(e){p(this,"provider");p(this,"pinElements",new Array);p(this,"pinMaxWidth",0);p(this,"pinMaxHeight",0);p(this,"pinFade",!1);p(this,"pinMaxCount",0);p(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,r,a;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((r=e==null?void 0:e.pin)==null?void 0:r.maxCount)??Math.max(wt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((a=e==null?void 0:e.pin)==null?void 0:a.maxZoom)??wt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,r)=>Math.max(t,r.width),0),this.pinMaxHeight=e.reduce((t,r)=>Math.max(t,r.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const r=this.provider.parameters.mapSize,a=new sa(e,t,r,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const o of this.pinElements)a.contains(o.lat,o.lng)?o.shown&&t<=o.zoom&&o.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?o.updateState(t):o.setCollapsed(!1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};p(wt,"MAP_PINS_MAX_ZOOM",2),p(wt,"MAP_PINS_MAX_COUNT",128);let or=wt;const pn=class pn extends ar{constructor(t,r,a){super(t,r);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"zoom");p(this,"angle");p(this,"states");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=r.tooltip.style.width,this.height=r.tooltip.style.height,this.margin=r.tooltip.style.margin,this.radius=r.tooltip.style.radius,this.zoom=a[0],this.angle=$.DEFAULT,this.states=a[1].map(i=>[i[0],$.DEGREES[i[1]]]),this.bodyCallback=r.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Rn(oa,{target:this.element,props:{id:this.id+"_tooltip",layer:Vi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(r=>[r[0],$.DEGREES[r[1]]]),this.updateZIndex()}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var r;if(this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const r=this.states.findLast(a=>a[0]<=t);if(!r)throw new Error("Angle not found");return r[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+pn.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(pn,"Z_INDEX_OFFSET",1e6);let sr=pn;class Co{constructor(e){p(this,"provider");p(this,"tooltipElements",new Array);p(this,"tooltipMaxWidth",0);p(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,r)=>Math.max(t,r.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,r)=>Math.max(t,r.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const r=this.provider.parameters.mapSize,a=new sa(e,t,r,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)a.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const hn=class hn extends ar{constructor(t,r){if(r.popup==null)throw new Error("Failed to create popup");super(t,r);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.shown=!1,this.width=r.popup.style.width,this.height=r.popup.style.height,this.margin=r.popup.style.margin,this.radius=r.popup.style.radius,this.bodyCallback=r.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Rn(oa,{target:this.element,props:{id:this.id+"_popup",layer:Bi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateBody(){var r;if(this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return hn.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(hn,"Z_INDEX_OFFSET",2e6);let lr=hn;class No{constructor(e){p(this,"provider");p(this,"popupElements",new Map);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new lr(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const r of this.popupElements.values())if(r.shown){if(r.setCollapsed(!1),r.updateMap(!0),r.isExpanded()&&r.isBodyLoaded()==!1&&r.updateBody(),r.isCollapsed()==!1&&this.popupPositioned.get(r.id)==!1){const a=(e=r.component)==null?void 0:e.getBody();if(a==null)continue;const i=(t=r.component)==null?void 0:t.getOffsets();if(i==null)continue;const o=a.getBoundingClientRect();if(o.x==0&&o.y==0&&o.width==0&&o.height==0)continue;const s=o.x+o.width/2,l=o.y+o.height/2,c=s+i.offsetX,u=l+i.offsetY,d=c+r.width,f=u+r.height,m=this.provider.getContainer().getBoundingClientRect(),E=c-m.left,x=m.right-d,h=u-m.top,_=m.bottom-f,g=Math.min(r.width,r.height)/4,v=E<0?E-g:x<0?-x+g:0,S=h<0?h-g:_<0?-_+g:0;this.provider.panBy(v,S),this.popupPositioned.set(r.id,!0)}}else r.setCollapsed(!0),r.isCollapsed()&&(r.updateMap(!1),r.remove(),this.popupElements.delete(r.id),this.popupPositioned.delete(r.id))}}const fn=class fn{constructor(e,t,r){p(this,"parameters",fn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...r,style:r.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:r.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),r=e.getNorthEast();return{sw:t,ne:r}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,r){const a=new this.MapMarkerClass({element:e});return a.setLngLat([r,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};p(fn,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let cr=fn;const To={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},Io={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},mn=class mn{constructor(e,t,r){p(this,"parameters",mn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...r,projection:"mercator",pitchWithRotate:!1,customAttribution:r.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds();if(!e)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const t=e.getSouthWest(),r=e.getNorthEast();return{sw:t,ne:r}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,r){const a=new this.MapMarkerClass({element:e});return a.setLngLat([r,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};p(mn,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let ur=mn;const gn=class gn{constructor(e,t,r,a){p(this,"parameters",gn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(r,{...a})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),r=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:r.lat(),lng:r.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,r,a){const i=new this.MapMarkerClass({position:{lat:t,lng:r},content:e,zIndex:a});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:o=>i.zIndex=o}}};p(gn,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let dr=gn;const Oo=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ro=[{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}]}];class Lo{constructor(e,t,r){p(this,"x");p(this,"y");p(this,"width");p(this,"height");p(this,"zoom");p(this,"angles");p(this,"expanded");p(this,"angle");p(this,"bounds");const a=Oe.project(t.lat,t.lng,e.mapSize);this.x=a.x,this.y=a.y,this.width=t.width+2*t.margin,this.height=t.height+2*t.margin,this.zoom=r[0],this.angles=r[1].map(i=>[i[0],$.DEGREES[i[1]]]),this.expanded=!1,this.angle=0,this.bounds=void 0}getBounds(e,t){let{offsetX:r,offsetY:a}=Je.getOffsets(this.width,this.height,t),i=-r,o=this.width-i,s=-a,l=this.height-s;return{x:this.x,y:this.y,left:i/e,right:o/e,top:s/e,bottom:l/e}}}function Po(n,e,t){var s;if(e.length!=t.length)throw new Error("Data and states length must be the same");const r=new Array(e.length);for(let l=0;l<e.length;l++){const c=t[l];if(isNaN(c[0]))throw new Error("State zoom is not a number");if(c[1]==null||c[1].length==0)throw new Error("State angles is empty");if(c[0]!=c[1][0][0])throw new Error("State expand zoom and start angles zoom are not the same");const u=new Lo(n,e[l],t[l]);r[l]=u}const a=n.zoomMin,i=n.zoomMax,o=1/n.zoomScale;for(let l=a;l<=i;l+=o){const c=Math.pow(2,l);for(let u=0;u<r.length;u++){const d=r[u];if(d.expanded=d.zoom<l,d.expanded==!1)continue;const f=(s=d.angles.findLast(m=>m[0]<l))==null?void 0:s[1];if(f==null)throw new Error("Angle not found");d.angle=f,d.bounds=d.getBounds(c,f)}for(let u=0;u<r.length;u++){const d=r[u];if(d.bounds!=null)for(let f=u+1;f<r.length;f++){const m=r[f];if(m.bounds!=null&&Re.areOverlaping(d.bounds,m.bounds)){console.log("OVERLAP",l,e[u],e[f],d.angle,m.angle);const E=d.bounds.x-d.bounds.left,x=d.bounds.y-d.bounds.top,h=d.bounds.x+d.bounds.right,_=d.bounds.y+d.bounds.bottom;console.log(`B1: (${E}, ${x}), (${E}, ${_}), (${h}, ${x}), (${h}, ${_})`);const g=m.bounds.x-m.bounds.left,v=m.bounds.y-m.bounds.top,S=m.bounds.x+m.bounds.right,z=m.bounds.y+m.bounds.bottom;throw console.log(`B2: (${g}, ${v}), (${g}, ${z}), (${S}, ${v}), (${S}, ${z})`),new Error("Bounds overlaping")}}}}}N.GoogleMapDarkStyle=Ro,N.GoogleMapLightStyle=Oo,N.GoogleMapsProvider=dr,N.MapManager=Ao,N.MapboxProvider=ur,N.MaplibreDarkStyle=To,N.MaplibreLightStyle=Io,N.MaplibreProvider=cr,N.getStates=la,N.testStates=Po,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|
|
2
|
+
\r\f \v\uFEFF`];function Ii(n,e,t){var r=n==null?"":""+n;if(t){for(var a in t)if(t[a])r=r?r+" "+a:a;else if(r.length)for(var i=a.length,o=0;(o=r.indexOf(a,o))>=0;){var s=o+i;(o===0||ea.includes(r[o-1]))&&(s===r.length||ea.includes(r[s]))?r=(o===0?"":r.substring(0,o))+r.substring(s+1):o=s}}return r===""?null:r}function ta(n,e=!1){var t=e?" !important;":";",r="";for(var a in n){var i=n[a];i!=null&&i!==""&&(r+=" "+a+": "+i+t)}return r}function Ln(n){return n[0]!=="-"||n[1]!=="-"?n.toLowerCase():n}function Oi(n,e){if(e){var t="",r,a;if(Array.isArray(e)?(r=e[0],a=e[1]):r=e,n){n=String(n).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,o=0,s=!1,l=[];r&&l.push(...Object.keys(r).map(Ln)),a&&l.push(...Object.keys(a).map(Ln));var c=0,u=-1;const x=n.length;for(var d=0;d<x;d++){var f=n[d];if(s?f==="/"&&n[d-1]==="*"&&(s=!1):i?i===f&&(i=!1):f==="/"&&n[d+1]==="*"?s=!0:f==='"'||f==="'"?i=f:f==="("?o++:f===")"&&o--,!s&&i===!1&&o===0){if(f===":"&&u===-1)u=d;else if(f===";"||d===x-1){if(u!==-1){var m=Ln(n.substring(c,u).trim());if(!l.includes(m)){f!==";"&&d++;var E=n.substring(c,d).trim();t+=" "+E+";"}}c=d+1,u=-1}}}}return r&&(t+=ta(r)),a&&(t+=ta(a,!0)),t=t.trim(),t===""?null:t}return n==null?null:String(n)}function na(n,e,t,r,a,i){var o=n.__className;if(o!==t||o===void 0){var s=Ii(t,r,i);s==null?n.removeAttribute("class"):n.className=s,n.__className=t}else if(i&&a!==i)for(var l in i){var c=!!i[l];(a==null||c!==!!a[l])&&n.classList.toggle(l,c)}return i}function Pn(n,e={},t,r){for(var a in t){var i=t[a];e[a]!==i&&(t[a]==null?n.style.removeProperty(a):n.style.setProperty(a,i,r))}}function an(n,e,t,r){var a=n.__style;if(a!==e){var i=Oi(e,r);i==null?n.removeAttribute("style"):n.style.cssText=i,n.__style=e}else r&&(Array.isArray(r)?(Pn(n,t==null?void 0:t[0],r[0]),Pn(n,t==null?void 0:t[1],r[1],"important")):Pn(n,t,r));return r}const Ri=()=>performance.now(),ye={tick:n=>requestAnimationFrame(n),now:()=>Ri(),tasks:new Set};function ra(){const n=ye.now();ye.tasks.forEach(e=>{e.c(n)||(ye.tasks.delete(e),e.f())}),ye.tasks.size!==0&&ye.tick(ra)}function Li(n){let e;return ye.tasks.size===0&&ye.tick(ra),{promise:new Promise(t=>{ye.tasks.add(e={c:n,f:t})}),abort(){ye.tasks.delete(e)}}}function aa(n,e){return n===e||(n==null?void 0:n[Xt])===e}function ct(n={},e,t,r){return hi(()=>{var a,i;return jr(()=>{a=i,i=[],ki(()=>{n!==t(...i)&&(e(n,...i),a&&aa(t(...a),n)&&e(null,...a))})}),()=>{Qa(()=>{i&&aa(t(...i),n)&&e(null,...i)})}}),n}const Pi="5";typeof window<"u"&&((Ma=window.__svelte??(window.__svelte={})).v??(Ma.v=new Set)).add(Pi);function Di(n){return n}function Dn(n){return-.5*(Math.cos(Math.PI*n)-1)}function ji(n){const e=Math.cos(n*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function Zi(n){return Math.sin(n*Math.PI/2)}const Fi=128,Bi=0,Vi=1,Ui=2;class $i{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Fi);p(this,"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 t=this.layers[e];if(t==null)continue;const r=t.animations;if(r!=null)for(let a=0;a<r.length;a++){const i=r[a];if(i!=null){for(const o of i.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,t,r,a){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let o=i.animations[t];o==null&&(o=i.animations[t]=new Map);let s={id:r,priority:t,executed:!1,function:a};o.set(r,s),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let r=0;r<this.layers.length;r++){let a=this.layers[r];if(a==null)continue;let i=a.animations[e];if(i==null)return;let o=i.get(t);if(o==null||o.executed==!1)return;i.delete(t)}}speed(){return Math.pow(2,2*this.animationsCount/this.animationsLimit)}stacked(){return this.animationsCount==this.animationsLimit}setLimit(e){this.animationsLimit=e}}const Ie=new $i;function ia(n){return Object.prototype.toString.call(n)==="[object Date]"}function jn(n,e){if(n===e||n!==n)return()=>n;const t=typeof n;if(t!==typeof e||Array.isArray(n)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(n)){const r=e.map((a,i)=>jn(n[i],a));return a=>r.map(i=>i(a))}if(t==="object"){if(!n||!e)throw new Error("Object cannot be null");if(ia(n)&&ia(e)){const i=n.getTime(),s=e.getTime()-i;return l=>new Date(i+l*s)}const r=Object.keys(e),a={};return r.forEach(i=>{a[i]=jn(n[i],e[i])}),i=>{const o={};return r.forEach(s=>{o[s]=a[s](i)}),o}}if(t==="number"){const r=e-n;return a=>n+a*r}return()=>e}const hr=class hr{constructor(e,t={}){Y(this,Ee);Y(this,xt);Y(this,Bt);Y(this,tt,null);J(this,Ee,te(e)),J(this,xt,te(e)),J(this,Bt,t)}static of(e,t){const r=new hr(e(),t);return jr(()=>{r.set(e())}),r}set(e,t){var d;G(C(this,xt),e);let{delay:r=0,duration:a=400,easing:i=Di,interpolate:o=jn}={...C(this,Bt),...t};if(a===0)return(d=C(this,tt))==null||d.abort(),G(C(this,Ee),e),Promise.resolve();const s=ye.now()+r;let l,c=!1,u=C(this,tt);return J(this,tt,Li(f=>{if(f<s)return!0;if(!c){c=!0;const E=C(this,Ee).v;l=o(E,e),typeof a=="function"&&(a=a(E,e)),u==null||u.abort()}const m=f-s;return m>a?(G(C(this,Ee),e),!1):(G(C(this,Ee),l(i(m/a))),!0)})),C(this,tt).promise}get current(){return U(C(this,Ee))}get target(){return U(C(this,xt))}set target(e){this.set(e)}};Ee=new WeakMap,xt=new WeakMap,Bt=new WeakMap,tt=new WeakMap;let Zn=hr;class on{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Zn(e,t)}set(e,t){this.value=e,this.motion.set(e,t)}update(e){this.motion.set(this.value,e)}snap(){this.motion.set(this.value,{duration:0})}}var Wi=Kr('<div><div class="body svelte-1nfn9j8"></div></div>');function qi(n,e){En(e,!0);let t,r;function a(){return r}let i=te(!1);function o(g){G(i,g,!0)}function s(){return U(i)}let l=new on(0,{easing:Dn});we(()=>{c(l.motion.current)}),we(()=>{U(i)==!1&&(l.snap(),Ie.clear(e.priority,e.id))});function c(g){t&&Ie.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=g.toString(),t.style.filter=`brightness(${.25+.75*g})`,r.style.opacity=g.toString()})}function u(g){g!=l.value&&l.set(g,{duration:75})}function d(){return l.motion.current==0}function f(){return l.value}var m=Wi();let E,x;var h=On(m);let _;return ct(h,g=>r=g,()=>r),ct(m,g=>t=g,()=>t),Zr((g,v,S)=>{E=na(m,1,"pin svelte-1nfn9j8",null,E,g),x=an(m,"",x,v),_=an(h,"",_,S)},[()=>({displayed:U(i)}),()=>({width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),()=>({width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})]),Qr(n,m),Mn({getBody:a,setDisplayed:o,getDisplayed:s,setScale:u,getCollapsed:d,getScale:f})}var Je;(n=>{function e(t,r,a){const i=t/2,o=r/2,s=Math.sqrt(i*i+o*o),l=Math.atan(o/i)*(180/Math.PI),c=a*(Math.PI/180);return a<180?a<90?a<l?{offsetX:0,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:0}:a<180-l?{offsetX:s*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:s*Math.sin(c)-o}:a<270?a<180+l?{offsetX:-t,offsetY:s*Math.sin(c)-o}:{offsetX:s*Math.cos(c)-i,offsetY:-r}:a<360-l?{offsetX:s*Math.cos(c)-i,offsetY:-r}:{offsetX:0,offsetY:s*Math.sin(c)-o}}n.getOffsets=e})(Je||(Je={}));var Yi=Kr('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function oa(n,e){En(e,!0);let t,r,a,i;const o=e.width+2*e.margin,s=e.height+2*e.margin,l=()=>i;we(()=>{a.style.width=`${e.margin*4}px`,a.style.height=`${e.margin*4}px`});let c=te(!0);function u(P){G(c,P,!0)}function d(){return U(c)}let f=te(!0);function m(P){G(f,P,!0)}function E(){return h.motion.current==0}function x(){return h.motion.current==1}let h=new on(0);we(()=>{_(h.motion.current)}),we(()=>{U(c)==!1&&(h.snap(),Ie.clear(e.priority,e.id+"_scale"))}),we(()=>{U(f)==!0&&h.value!=0&&(Ie.stacked()?h.set(0,{duration:0}):h.set(0,{duration:150,easing:ji})),U(f)==!1&&h.value!=1&&h.set(1,{duration:150,easing:Zi})});function _(P){!t||!r||!a||Ie.equeue(U(f)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${P}`,r.style.scale=`${P}`,a.style.scale=`${P}`})}let g=NaN,v=te(!1),S=new on(-o/2,{easing:Dn}),z=new on(-s/2,{easing:Dn});we(()=>{I(S.motion.current,z.motion.current)}),we(()=>{U(c)==!1&&(S.snap(),S.snap(),Ie.clear(e.priority,e.id+"_angle"))}),we(()=>{U(f)==!0&&U(v)&&(S.update({duration:75}),S.update({duration:75}))});function I(P,me){if(!t||!r||!a)return;const kt=P+o/2,Me=me+s/2,be=s<o?kt*s/o:kt,St=s>o?Me*o/s:Me,yn=Math.atan2(St,be)/Math.PI*180-45,Vt=0,vn=30,zt=Math.sqrt(be*be+St*St),Ut=Math.min(o,s)/2,Do=Ut*Math.SQRT2,jo=(zt-Ut)/(Do-Ut),Aa=Vt+jo*(vn-Vt),Zo=zt<Ut?zt/Ut:1;Ie.equeue(e.layer,e.priority,e.id+"_angle",()=>{r.style.transform=`translate(${Math.round(P)}px, ${Math.round(me)}px)`,a.style.transform=`scale(${Zo}) rotate(${yn}deg) skew(${Aa}deg, ${Aa}deg)`})}function Z(P){if(U(v)==!1){let me=Je.getOffsets(o,s,P);S.set(Math.round(me.offsetX),{duration:0}),z.set(Math.round(me.offsetY),{duration:0}),I(S.value,z.value),g=P,G(v,!0)}else if(P!=g){let me=Math.abs(P-g),kt=me<180?me:360-me,Me=Math.log(kt)*75,be=Je.getOffsets(o,s,P);S.set(Math.round(be.offsetX),{duration:Me}),z.set(Math.round(be.offsetY),{duration:Me}),g=P}}function le(){return Je.getOffsets(o,s,g)}var ce=Yi();let xe;var Ve=On(ce);ct(Ve,P=>a=P,()=>a);var re=ci(Ve,2),Ue=On(re);return ct(Ue,P=>i=P,()=>i),ct(re,P=>r=P,()=>r),ct(ce,P=>t=P,()=>t),Zr(P=>{xe=na(ce,1,"anchor svelte-j5igi2",null,xe,P),an(re,`margin: ${e.margin}px;`),an(Ue,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:U(c)})]),Qr(n,ce),Mn({getBody:l,setDisplayed:u,getDisplayed:d,setCollapsed:m,getCollapsed:E,getExpanded:x,setAngle:Z,getOffsets:le})}var Oe;(n=>{function e(s,l,c){return{x:r(l)*c,y:a(s)*c}}n.project=e;function t(s,l,c){return{lat:o(l/c),lng:i(s/c)}}n.unproject=t;function r(s){return(180+s)/360}function a(s){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+s*Math.PI/360)))/360}function i(s){return s*360-180}function o(s){return 360/Math.PI*Math.atan(Math.exp((180-s*360)*Math.PI/180))-90}})(Oe||(Oe={}));class sa{constructor(e,t,r,a,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");const o=r*Math.pow(2,t),s=Oe.project(e.sw.lat,e.sw.lng,o),l=Oe.project(e.ne.lat,e.ne.lng,o),c=s.x-a,u=s.y+i,d=l.x+a,f=l.y-i,m=Oe.unproject(c,u,o),E=Oe.unproject(d,f,o);this.swLat=m.lat,this.swLng=m.lng,this.neLat=E.lat,this.neLng=E.lng}contains(e,t){return this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1}}var $;(n=>{n.COUNT=12,n.DEFAULT=270,n.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})($||($={}));var Tt;(n=>{let e;(o=>{o.RADIANS=$.DEGREES.map(c=>c*Math.PI/180),o.RADIANS_COS=o.RADIANS.map(c=>Math.cos(c)),o.RADIANS_SIN=o.RADIANS.map(c=>Math.sin(c));function s(c,u){const d=Math.abs(u/c);return d<1?d<.26795?0:1:d<3.73205?2:3}function l(c,u){const d=s(c,u);return c>0?u>0?(12-d)%12:0+d:u>0?6+d:6-d}o.getAngleIndex=l})(e=n.Angle||(n.Angle={}));class t{constructor(s,l,c,u){p(this,"center");p(this,"width");p(this,"height");p(this,"index");this.center=s,this.width=l,this.height=c,this.index=u}}n.Particle=t;function r(o){let s=!0;for(let l=0;l<o.length;l++){const{particle:c,influences:u}=o[l],d=c.index,f=c.center,m=c.width,E=c.height,x=i(d,-1),h=i(d,1),_=f.x+m*e.RADIANS_COS[x],g=f.y+E*e.RADIANS_SIN[x],v=f.x+m*e.RADIANS_COS[d],S=f.y+E*e.RADIANS_SIN[d],z=f.x+m*e.RADIANS_COS[h],I=f.y+E*e.RADIANS_SIN[h];let Z=0,le=0,ce=0;for(let Ve=0;Ve<u.length;Ve++){const re=u[Ve],Ue=re.index,P=re.center,me=re.width,kt=re.height,Me=P.x+me*e.RADIANS_COS[Ue],be=P.y+kt*e.RADIANS_SIN[Ue],St=_-Me,fr=g-be;Z+=1/(St*St+fr*fr);const yn=v-Me,Vt=S-be;le+=1/(yn*yn+Vt*Vt);const vn=z-Me,zt=I-be;ce+=1/(vn*vn+zt*zt)}let xe=0;Z<le&&Z<ce&&(xe=-1),ce<le&&ce<Z&&(xe=1),xe!=0&&(c.index=i(d,xe),s=!1)}return s}n.updatePointIndexes=r;function a(o){for(let s=0;s<o.length;s++){const{particle:l,influences:c}=o[s],u=l.center;let d=0,f=0;for(let m=0;m<c.length;m++){const x=c[m].center,h=u.x-x.x,_=u.y-x.y;if(h==0&&_==0)continue;const g=Math.sqrt(h*h+_*_),v=1/(g*g);d+=v*h/g,f+=-(v*_)/g}l.index=e.getAngleIndex(d,f)}}n.initializePointIndexes=a;function i(o,s){return s==0?o:((o+s)%$.COUNT+$.COUNT)%$.COUNT}})(Tt||(Tt={}));var Re;(n=>{function e(r,a){return!(r.x-r.left>a.x+a.right||r.x+r.right<a.x-a.left||r.y-r.top>a.y+a.bottom||r.y+r.bottom<a.y-a.top)}n.areOverlaping=e;function t(r,a){let i=Math.abs(r.x-a.x),s=(r.x<a.x?r.right+a.left:r.left+a.right)/i,l=Math.abs(r.y-a.y),u=(r.y<a.y?r.bottom+a.top:r.top+a.bottom)/l,d=Math.min(s,u);return Math.log2(d)}n.getZoomWhenTouching=t})(Re||(Re={}));var W;(n=>{class e{constructor(){p(this,"zoomAfterExpanded");p(this,"zoomAfterAngleIndexes");this.zoomAfterExpanded=NaN,this.zoomAfterAngleIndexes=[]}}n.Tooltip=e;class t{constructor(h,_,g){p(this,"index");p(this,"id");p(this,"rank");p(this,"x");p(this,"y");p(this,"width");p(this,"height");p(this,"expanded");p(this,"angle");p(this,"bounds");p(this,"neighbours");p(this,"particle");p(this,"influences");const v=Oe.project(_.lat,_.lng,h.mapSize),S=_.width+2*_.margin,z=_.height+2*_.margin;this.index=g,this.id=_.id,this.rank=_.rank,this.x=v.x,this.y=v.y,this.width=S,this.height=z,this.expanded=!0,this.angle=$.DEFAULT,this.bounds=this.getBounds(1),this.neighbours=new Array,this.particle=new Tt.Particle({x:v.x,y:v.y},this.getParticleWidth(1),this.getParticleHeight(1),$.DEGREES.indexOf($.DEFAULT)),this.influences=[]}getBounds(h){let{offsetX:_,offsetY:g}=Je.getOffsets(this.width,this.height,this.angle),v=-_,S=this.width-v,z=-g,I=this.height-z;return{x:this.x,y:this.y,left:v/h,right:S/h,top:z/h,bottom:I/h}}getParticleWidth(h){return this.width/2/h}getParticleHeight(h){return this.height/2/h}updateBounds(h){this.bounds=this.getBounds(h)}updateParticle(h){this.particle.width=this.getParticleWidth(h),this.particle.height=this.getParticleHeight(h)}}n.Node=t;class r{constructor(h){p(this,"min");p(this,"max");p(this,"scale");p(this,"step");this.min=h.zoomMin,this.max=h.zoomMax,this.scale=h.zoomScale,this.step=1/this.scale}addSteps(h,_){return Math.round((h+_*this.step)*this.scale)/this.scale}getIndex(h){if(!(h<this.min))return Math.min(Math.ceil(h*this.scale),this.max*this.scale)}getMax(h){let _=this.min;for(let g=0;g<h.length;g++){const S=h[g].keys();for(const z of S){const I=Number(z)/this.scale;I>_&&(_=I)}}return _}}n.Zoom=r;function a(x,h){let _=new Array(h.length);for(let g=0;g<h.length;g++)_[g]=new t(x,h[g],g);return _}n.createNodes=a;function i(x,h){const _=new Array;for(let v=0;v<h.length;v++)_[v]=new Array;const g=new Array(h.length);for(let v=0;v<h.length;v++){const S=h[v];g[v]={x:S.x,y:S.y,left:S.width,right:S.width,top:S.height,bottom:S.height}}for(let v=0;v<h.length;v++){const S=h[v],z=g[v],I=_[v];for(let Z=v+1;Z<h.length;Z++){const le=h[Z],ce=g[Z],xe=_[Z],Ve=Re.getZoomWhenTouching(z,ce),re=x.getIndex(Ve);if(re==null)continue;const Ue=I[re],P=xe[re];Ue?Ue.push(le):I[re]=[le],P?P.push(S):xe[re]=[S]}}return _}n.createNeighbourDeltas=i;function o(x){const h=new Set,_=[];for(let g=0;g<x.length;g++){let v=x[g];if(v.expanded==!1||v.neighbours.length==0||h.has(v))continue;h.add(v);const S=[],z=[v];for(;z.length>0;){const I=z.pop();S.push(I);for(const Z of I.neighbours)h.has(Z)||(h.add(Z),z.push(Z))}_.push(S)}return _}n.getNeighbourGraphs=o;function s(x,h,_){for(let g=0;g<x.length;g++){let v=x[g];if(v.expanded==!1){v.neighbours.length=0,v.influences.length=0;continue}const z=h[g][_];if(z!=null)for(let I=0;I<z.length;I++){const Z=z[I];Z.expanded!=!1&&(v.neighbours.push(Z),v.influences.push(Z.particle))}}}n.updateNeighbours=s;function l(x){x.expanded=!1;const h=x.neighbours;for(let _=0;_<h.length;_++){const g=h[_],v=g.neighbours.indexOf(x);g.neighbours.splice(v,1)}}n.updateCollapsed=l;function c(x,h,_){for(let g=0;g<x.length;g++){const v=x[g];if(v.expanded==!1)continue;const S=h.get(v.id);if(!S)throw new Error("Tooltip not found");S.zoomAfterExpanded=_;const z=$.DEGREES.indexOf(v.angle);S.zoomAfterAngleIndexes.length==0?S.zoomAfterAngleIndexes.push([_,z]):S.zoomAfterAngleIndexes[0][1]!=z?S.zoomAfterAngleIndexes.unshift([_,z]):S.zoomAfterAngleIndexes[0][0]=_}}n.updateTooltips=c;function u(x,h){for(let _=0;_<x.length;_++)x[_].updateBounds(h)}n.updateBounds=u;function d(x){const h=new Set;for(let _=0;_<x.length;_++){const g=x[_],v=g.bounds,S=x[_].neighbours;for(let z=0;z<S.length;z++){const I=S[z],Z=I.bounds;Re.areOverlaping(Z,v)&&(h.add(g),h.add(I))}}return h}n.getOverlaps=d;function f(x,h){let _=!1;for(let g=0;g<h.length;g++){const v=h[g],S=v.bounds,z=h[g].neighbours;for(let I=0;I<z.length;I++){const Z=z[I],le=Z.bounds;Re.areOverlaping(le,S)&&(x.has(v)||(x.add(v),_=!0),x.has(Z)||(x.add(Z),_=!0))}}return _}n.updateOverlaps=f;function m(x){let h,_=0;for(let g=0;g<x.length;g++){const v=x[g],S=v.bounds,z=x[g].neighbours;let I=0;for(let Z=0;Z<z.length;Z++){const le=z[Z],ce=le.bounds;Re.areOverlaping(ce,S)&&(I+=1+(le.rank-v.rank))}I=I*z.length,I>_&&(_=I,h=v)}return h}n.getOverlapsWorstNode=m;function E(x){for(let h=0;h<x.length;h++){const g=x[h].bounds;for(let v=h+1;v<x.length;v++){const z=x[v].bounds;if(Re.areOverlaping(z,g))return!0}}return!1}n.areOverlaping=E,(x=>{function h(v){const S=v.map(z=>z.particle);Tt.initializePointIndexes(S.map(z=>({particle:z,influences:S})));for(let z=0;z<v.length;z++){const I=v[z];I.angle=$.DEGREES[I.particle.index]}}x.initializeAngles=h;function _(v){const S=Tt.updatePointIndexes(v);for(let z=0;z<v.length;z++){const I=v[z];I.angle=$.DEGREES[I.particle.index]}return S}x.updateAngles=_;function g(v,S){for(let z=0;z<v.length;z++)v[z].updateParticle(S)}x.updateParticles=g})(n.Particles||(n.Particles={}))})(W||(W={}));function la(n,e){const t=new W.Zoom(n);if(e.length==0)return[];if(e.length==1)return[[t.min,[[t.min,$.DEGREES.indexOf($.DEFAULT)]]]];const r=new Map(e.map(l=>[l.id,new W.Tooltip])),a=W.createNodes(n,e),i=W.createNeighbourDeltas(t,a),o=t.min,s=t.getMax(i);W.Particles.initializeAngles(a),W.updateTooltips(a,r,t.addSteps(t.max,1));for(let l=s;l>=o;l=t.addSteps(l,-1)){const c=Math.pow(2,l),u=Math.round(l*t.scale);W.updateNeighbours(a,i,u);const d=W.getNeighbourGraphs(a);for(const f of d){W.updateBounds(f,c),W.Particles.updateParticles(f,c);const m=W.getOverlaps(f);for(;m.size>1;){const E=Array.from(m);for(;;){const _=W.Particles.updateAngles(E);if(W.updateBounds(E,c),_==!0||W.areOverlaping(E)==!1)break}if(W.updateOverlaps(m,E))continue;const h=W.getOverlapsWorstNode(E);if(h==null)break;W.updateCollapsed(h),m.delete(h)}}W.updateTooltips(a,r,Number(l.toFixed(1)))}return Array.from(r.values()).map(l=>[l.zoomAfterExpanded,l.zoomAfterAngleIndexes])}var D;(function(n){n.assertEqual=a=>{};function e(a){}n.assertIs=e;function t(a){throw new Error}n.assertNever=t,n.arrayToEnum=a=>{const i={};for(const o of a)i[o]=o;return i},n.getValidEnumValues=a=>{const i=n.objectKeys(a).filter(s=>typeof a[a[s]]!="number"),o={};for(const s of i)o[s]=a[s];return n.objectValues(o)},n.objectValues=a=>n.objectKeys(a).map(function(i){return a[i]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const i=[];for(const o in a)Object.prototype.hasOwnProperty.call(a,o)&&i.push(o);return i},n.find=(a,i)=>{for(const o of a)if(i(o))return o},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,i=" | "){return a.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}n.joinValues=r,n.jsonStringifyReplacer=(a,i)=>typeof i=="bigint"?i.toString():i})(D||(D={}));var ca;(function(n){n.mergeShapes=(e,t)=>({...e,...t})})(ca||(ca={}));const w=D.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Le=n=>{switch(typeof n){case"undefined":return w.undefined;case"string":return w.string;case"number":return Number.isNaN(n)?w.nan:w.number;case"boolean":return w.boolean;case"function":return w.function;case"bigint":return w.bigint;case"symbol":return w.symbol;case"object":return Array.isArray(n)?w.array:n===null?w.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?w.promise:typeof Map<"u"&&n instanceof Map?w.map:typeof Set<"u"&&n instanceof Set?w.set:typeof Date<"u"&&n instanceof Date?w.date:w.object;default:return w.unknown}},y=D.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class de extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(i){return i.message},r={_errors:[]},a=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(a);else if(o.code==="invalid_return_type")a(o.returnTypeError);else if(o.code==="invalid_arguments")a(o.argumentsError);else if(o.path.length===0)r._errors.push(t(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(t(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return a(this),r}static assert(e){if(!(e instanceof de))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,D.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const i=a.path[0];t[i]=t[i]||[],t[i].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}de.create=n=>new de(n);const It=(n,e)=>{let t;switch(n.code){case y.invalid_type:n.received===w.undefined?t="Required":t=`Expected ${n.expected}, received ${n.received}`;break;case y.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(n.expected,D.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:t=`Unrecognized key(s) in object: ${D.joinValues(n.keys,", ")}`;break;case y.invalid_union:t="Invalid input";break;case y.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${D.joinValues(n.options)}`;break;case y.invalid_enum_value:t=`Invalid enum value. Expected ${D.joinValues(n.options)}, received '${n.received}'`;break;case y.invalid_arguments:t="Invalid function arguments";break;case y.invalid_return_type:t="Invalid function return type";break;case y.invalid_date:t="Invalid date";break;case y.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(t=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?t=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?t=`Invalid input: must end with "${n.validation.endsWith}"`:D.assertNever(n.validation):n.validation!=="regex"?t=`Invalid ${n.validation}`:t="Invalid";break;case y.too_small:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="bigint"?t=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:t="Invalid input";break;case y.too_big:n.type==="array"?t=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?t=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?t=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?t=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?t=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:t="Invalid input";break;case y.custom:t="Invalid input";break;case y.invalid_intersection_types:t="Intersection results could not be merged";break;case y.not_multiple_of:t=`Number must be a multiple of ${n.multipleOf}`;break;case y.not_finite:t="Number must be finite";break;default:t=e.defaultError,D.assertNever(n)}return{message:t}};let Xi=It;function Fn(){return Xi}const Bn=n=>{const{data:e,path:t,errorMaps:r,issueData:a}=n,i=[...t,...a.path||[]],o={...a,path:i};if(a.message!==void 0)return{...a,path:i,message:a.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:e,defaultError:s}).message;return{...a,path:i,message:s}};function b(n,e){const t=Fn(),r=Bn({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,t,t===It?void 0:It].filter(a=>!!a)});n.common.issues.push(r)}class se{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return M;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const i=await a.key,o=await a.value;r.push({key:i,value:o})}return se.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:i,value:o}=a;if(i.status==="aborted"||o.status==="aborted")return M;i.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||a.alwaysSet)&&(r[i.value]=o.value)}return{status:e.value,value:r}}}const M=Object.freeze({status:"aborted"}),Ot=n=>({status:"dirty",value:n}),ne=n=>({status:"valid",value:n}),ua=n=>n.status==="aborted",da=n=>n.status==="dirty",ut=n=>n.status==="valid",sn=n=>typeof Promise<"u"&&n instanceof Promise;var k;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(k||(k={}));class Pe{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const pa=(n,e)=>{if(ut(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new de(n.common.issues);return this._error=t,this._error}}};function T(n){if(!n)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=n;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(o,s)=>{const{message:l}=n;return o.code==="invalid_enum_value"?{message:l??s.defaultError}:typeof s.data>"u"?{message:l??r??s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:l??t??s.defaultError}},description:a}}class L{get description(){return this._def.description}_getType(e){return Le(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Le(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new se,ctx:{common:e.parent.common,data:e.data,parsedType:Le(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(sn(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)},a=this._parseSync({data:e,path:r.path,parent:r});return pa(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return ut(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(a=(r=i==null?void 0:i.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>ut(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Le(e)},a=this._parse({data:e,path:r.path,parent:r}),i=await(sn(a)?a:Promise.resolve(a));return pa(r,i)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,i)=>{const o=e(a),s=()=>i.addIssue({code:y.custom,...r(a)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new mt({schema:this,typeName:A.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return Ze.create(this,this._def)}nullable(){return gt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ve.create(this)}promise(){return Dt.create(this,this._def)}or(e){return cn.create([this,e],this._def)}and(e){return un.create(this,e,this._def)}transform(e){return new mt({...T(this._def),schema:this,typeName:A.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Yn({...T(this._def),innerType:this,defaultValue:t,typeName:A.ZodDefault})}brand(){return new vo({typeName:A.ZodBranded,type:this,...T(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Xn({...T(this._def),innerType:this,catchValue:t,typeName:A.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return Hn.create(this,e)}readonly(){return Gn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hi=/^c[^\s-]{8,}$/i,Gi=/^[0-9a-z]+$/,Ji=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ki=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Qi=/^[a-z0-9_-]{21}$/i,eo=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,to=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,no=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ro="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vn;const ao=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,io=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,oo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,so=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lo=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,co=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ha="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",uo=new RegExp(`^${ha}$`);function fa(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const t=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function po(n){return new RegExp(`^${fa(n)}$`)}function ho(n){let e=`${ha}T${fa(n)}`;const t=[];return t.push(n.local?"Z?":"Z"),n.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function fo(n,e){return!!((e==="v4"||!e)&&ao.test(n)||(e==="v6"||!e)&&oo.test(n))}function mo(n,e){if(!eo.test(n))return!1;try{const[t]=n.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function go(n,e){return!!((e==="v4"||!e)&&io.test(n)||(e==="v6"||!e)&&so.test(n))}class De extends L{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==w.string){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.string,received:i.parsedType}),M}const r=new se;let a;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")e.data.length>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=e.data.length>i.value,s=e.data.length<i.value;(o||s)&&(a=this._getOrReturnCtx(e,a),o?b(a,{code:y.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&b(a,{code:y.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")no.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"email",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Vn||(Vn=new RegExp(ro,"u")),Vn.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"emoji",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Ki.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"uuid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")Qi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"nanoid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Hi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Gi.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cuid2",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ji.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ulid",code:y.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),b(a,{validation:"url",code:y.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"regex",code:y.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ho(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?uo.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?po(i).test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{code:y.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?to.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"duration",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?fo(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"ip",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?mo(e.data,i.alg)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"jwt",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?go(e.data,i.version)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"cidr",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?lo.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64",code:y.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?co.test(e.data)||(a=this._getOrReturnCtx(e,a),b(a,{validation:"base64url",code:y.invalid_string,message:i.message}),r.dirty()):D.assertNever(i);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:y.invalid_string,...k.errToObj(r)})}_addCheck(e){return new De({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...k.errToObj(e)})}url(e){return this._addCheck({kind:"url",...k.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...k.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...k.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...k.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...k.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...k.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...k.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...k.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...k.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...k.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...k.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...k.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...k.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...k.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...k.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...k.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...k.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...k.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...k.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...k.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...k.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...k.errToObj(t)})}nonempty(e){return this.min(1,k.errToObj(e))}trim(){return new De({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new De({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}De.create=n=>new De({checks:[],typeName:A.ZodString,coerce:(n==null?void 0:n.coerce)??!1,...T(n)});function yo(n,e){const t=(n.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,i=Number.parseInt(n.toFixed(a).replace(".","")),o=Number.parseInt(e.toFixed(a).replace(".",""));return i%o/10**a}class dt extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==w.number){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.number,received:i.parsedType}),M}let r;const a=new se;for(const i of this._def.checks)i.kind==="int"?D.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),b(r,{code:y.invalid_type,expected:"integer",received:"float",message:i.message}),a.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),a.dirty()):i.kind==="multipleOf"?yo(e.data,i.value)!==0&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_finite,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new dt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new dt({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:k.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:k.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:k.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:k.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}dt.create=n=>new dt({checks:[],typeName:A.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class Rt extends L{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==w.bigint)return this._getInvalidInput(e);let r;const a=new se;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),a.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),b(r,{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),a.dirty()):D.assertNever(i);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return b(t,{code:y.invalid_type,expected:w.bigint,received:t.parsedType}),M}gte(e,t){return this.setLimit("min",e,!0,k.toString(t))}gt(e,t){return this.setLimit("min",e,!1,k.toString(t))}lte(e,t){return this.setLimit("max",e,!0,k.toString(t))}lt(e,t){return this.setLimit("max",e,!1,k.toString(t))}setLimit(e,t,r,a){return new Rt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:k.toString(a)}]})}_addCheck(e){return new Rt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:k.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:k.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:k.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:k.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:k.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Rt.create=n=>new Rt({checks:[],typeName:A.ZodBigInt,coerce:(n==null?void 0:n.coerce)??!1,...T(n)});class Un extends L{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==w.boolean){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.boolean,received:r.parsedType}),M}return ne(e.data)}}Un.create=n=>new Un({typeName:A.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...T(n)});class ln extends L{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==w.date){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_type,expected:w.date,received:i.parsedType}),M}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return b(i,{code:y.invalid_date}),M}const r=new se;let a;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(a=this._getOrReturnCtx(e,a),b(a,{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):D.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ln({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:k.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:k.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}ln.create=n=>new ln({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:A.ZodDate,...T(n)});class ma extends L{_parse(e){if(this._getType(e)!==w.symbol){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.symbol,received:r.parsedType}),M}return ne(e.data)}}ma.create=n=>new ma({typeName:A.ZodSymbol,...T(n)});class ga extends L{_parse(e){if(this._getType(e)!==w.undefined){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.undefined,received:r.parsedType}),M}return ne(e.data)}}ga.create=n=>new ga({typeName:A.ZodUndefined,...T(n)});class ya extends L{_parse(e){if(this._getType(e)!==w.null){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.null,received:r.parsedType}),M}return ne(e.data)}}ya.create=n=>new ya({typeName:A.ZodNull,...T(n)});class $n extends L{constructor(){super(...arguments),this._any=!0}_parse(e){return ne(e.data)}}$n.create=n=>new $n({typeName:A.ZodAny,...T(n)});class pt extends L{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ne(e.data)}}pt.create=n=>new pt({typeName:A.ZodUnknown,...T(n)});class je extends L{_parse(e){const t=this._getOrReturnCtx(e);return b(t,{code:y.invalid_type,expected:w.never,received:t.parsedType}),M}}je.create=n=>new je({typeName:A.ZodNever,...T(n)});class Wn extends L{_parse(e){if(this._getType(e)!==w.undefined){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.void,received:r.parsedType}),M}return ne(e.data)}}Wn.create=n=>new Wn({typeName:A.ZodVoid,...T(n)});class ve extends L{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==w.array)return b(t,{code:y.invalid_type,expected:w.array,received:t.parsedType}),M;if(a.exactLength!==null){const o=t.data.length>a.exactLength.value,s=t.data.length<a.exactLength.value;(o||s)&&(b(t,{code:o?y.too_big:y.too_small,minimum:s?a.exactLength.value:void 0,maximum:o?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(b(t,{code:y.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(b(t,{code:y.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((o,s)=>a.type._parseAsync(new Pe(t,o,t.path,s)))).then(o=>se.mergeArray(r,o));const i=[...t.data].map((o,s)=>a.type._parseSync(new Pe(t,o,t.path,s)));return se.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ve({...this._def,minLength:{value:e,message:k.toString(t)}})}max(e,t){return new ve({...this._def,maxLength:{value:e,message:k.toString(t)}})}length(e,t){return new ve({...this._def,exactLength:{value:e,message:k.toString(t)}})}nonempty(e){return this.min(1,e)}}ve.create=(n,e)=>new ve({type:n,minLength:null,maxLength:null,exactLength:null,typeName:A.ZodArray,...T(e)});function ht(n){if(n instanceof q){const e={};for(const t in n.shape){const r=n.shape[t];e[t]=Ze.create(ht(r))}return new q({...n._def,shape:()=>e})}else return n instanceof ve?new ve({...n._def,type:ht(n.element)}):n instanceof Ze?Ze.create(ht(n.unwrap())):n instanceof gt?gt.create(ht(n.unwrap())):n instanceof ke?ke.create(n.items.map(e=>ht(e))):n}class q extends L{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==w.object){const c=this._getOrReturnCtx(e);return b(c,{code:y.invalid_type,expected:w.object,received:c.parsedType}),M}const{status:r,ctx:a}=this._processInputParams(e),{shape:i,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof je&&this._def.unknownKeys==="strip"))for(const c in a.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=i[c],d=a.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new Pe(a,d,a.path,c)),alwaysSet:c in a.data})}if(this._def.catchall instanceof je){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:a.data[u]}});else if(c==="strict")s.length>0&&(b(a,{code:y.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const d=a.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new Pe(a,d,a.path,u)),alwaysSet:u in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>se.mergeObjectSync(r,c)):se.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return k.errToObj,new q({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var i,o;const a=((o=(i=this._def).errorMap)==null?void 0:o.call(i,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:k.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new q({...this._def,unknownKeys:"strip"})}passthrough(){return new q({...this._def,unknownKeys:"passthrough"})}extend(e){return new q({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new q({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:A.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new q({...this._def,catchall:e})}pick(e){const t={};for(const r of D.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new q({...this._def,shape:()=>t})}omit(e){const t={};for(const r of D.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new q({...this._def,shape:()=>t})}deepPartial(){return ht(this)}partial(e){const t={};for(const r of D.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new q({...this._def,shape:()=>t})}required(e){const t={};for(const r of D.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Ze;)i=i._def.innerType;t[r]=i}return new q({...this._def,shape:()=>t})}keyof(){return ba(D.objectKeys(this.shape))}}q.create=(n,e)=>new q({shape:()=>n,unknownKeys:"strip",catchall:je.create(),typeName:A.ZodObject,...T(e)}),q.strictCreate=(n,e)=>new q({shape:()=>n,unknownKeys:"strict",catchall:je.create(),typeName:A.ZodObject,...T(e)}),q.lazycreate=(n,e)=>new q({shape:n,unknownKeys:"strip",catchall:je.create(),typeName:A.ZodObject,...T(e)});class cn extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return t.common.issues.push(...s.ctx.common.issues),s.result;const o=i.map(s=>new de(s.ctx.common.issues));return b(t,{code:y.invalid_union,unionErrors:o}),M}if(t.common.async)return Promise.all(r.map(async i=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(a);{let i;const o=[];for(const l of r){const c={...t,common:{...t.common,issues:[]},parent:null},u=l._parseSync({data:t.data,path:t.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(l=>new de(l));return b(t,{code:y.invalid_union,unionErrors:s}),M}}get options(){return this._def.options}}cn.create=(n,e)=>new cn({options:n,typeName:A.ZodUnion,...T(e)});function qn(n,e){const t=Le(n),r=Le(e);if(n===e)return{valid:!0,data:n};if(t===w.object&&r===w.object){const a=D.objectKeys(e),i=D.objectKeys(n).filter(s=>a.indexOf(s)!==-1),o={...n,...e};for(const s of i){const l=qn(n[s],e[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(t===w.array&&r===w.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let i=0;i<n.length;i++){const o=n[i],s=e[i],l=qn(o,s);if(!l.valid)return{valid:!1};a.push(l.data)}return{valid:!0,data:a}}else return t===w.date&&r===w.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class un extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(i,o)=>{if(ua(i)||ua(o))return M;const s=qn(i.value,o.value);return s.valid?((da(i)||da(o))&&t.dirty(),{status:t.value,value:s.data}):(b(r,{code:y.invalid_intersection_types}),M)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>a(i,o)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}un.create=(n,e,t)=>new un({left:n,right:e,typeName:A.ZodIntersection,...T(t)});class ke extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.array)return b(r,{code:y.invalid_type,expected:w.array,received:r.parsedType}),M;if(r.data.length<this._def.items.length)return b(r,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),M;!this._def.rest&&r.data.length>this._def.items.length&&(b(r,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new Pe(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>se.mergeArray(t,o)):se.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ke({...this._def,rest:e})}}ke.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ke({items:n,typeName:A.ZodTuple,rest:null,...T(e)})};class va extends L{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.map)return b(r,{code:y.invalid_type,expected:w.map,received:r.parsedType}),M;const a=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:a._parse(new Pe(r,s,r.path,[c,"key"])),value:i._parse(new Pe(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return M;(c.status==="dirty"||u.status==="dirty")&&t.dirty(),s.set(c.value,u.value)}return{status:t.value,value:s}}}}va.create=(n,e,t)=>new va({valueType:e,keyType:n,typeName:A.ZodMap,...T(t)});class Lt extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==w.set)return b(r,{code:y.invalid_type,expected:w.set,received:r.parsedType}),M;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(b(r,{code:y.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(b(r,{code:y.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const i=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return M;u.status==="dirty"&&t.dirty(),c.add(u.value)}return{status:t.value,value:c}}const s=[...r.data.values()].map((l,c)=>i._parse(new Pe(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(e,t){return new Lt({...this._def,minSize:{value:e,message:k.toString(t)}})}max(e,t){return new Lt({...this._def,maxSize:{value:e,message:k.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Lt.create=(n,e)=>new Lt({valueType:n,minSize:null,maxSize:null,typeName:A.ZodSet,...T(e)});class Pt extends L{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.function)return b(t,{code:y.invalid_type,expected:w.function,received:t.parsedType}),M;function r(s,l){return Bn({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Fn(),It].filter(c=>!!c),issueData:{code:y.invalid_arguments,argumentsError:l}})}function a(s,l){return Bn({data:s,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Fn(),It].filter(c=>!!c),issueData:{code:y.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Dt){const s=this;return ne(async function(...l){const c=new de([]),u=await s._def.args.parseAsync(l,i).catch(m=>{throw c.addIssue(r(l,m)),c}),d=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(m=>{throw c.addIssue(a(d,m)),c})})}else{const s=this;return ne(function(...l){const c=s._def.args.safeParse(l,i);if(!c.success)throw new de([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new de([a(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Pt({...this._def,args:ke.create(e).rest(pt.create())})}returns(e){return new Pt({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new Pt({args:e||ke.create([]).rest(pt.create()),returns:t||pt.create(),typeName:A.ZodFunction,...T(r)})}}class _a extends L{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}_a.create=(n,e)=>new _a({getter:n,typeName:A.ZodLazy,...T(e)});class xa extends L{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return b(t,{received:t.data,code:y.invalid_literal,expected:this._def.value}),M}return{status:"valid",value:e.data}}get value(){return this._def.value}}xa.create=(n,e)=>new xa({value:n,typeName:A.ZodLiteral,...T(e)});function ba(n,e){return new ft({values:n,typeName:A.ZodEnum,...T(e)})}class ft extends L{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return b(t,{expected:D.joinValues(r),received:t.parsedType,code:y.invalid_type}),M}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return b(t,{received:t.data,code:y.invalid_enum_value,options:r}),M}return ne(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ft.create(e,{...this._def,...t})}exclude(e,t=this._def){return ft.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}ft.create=ba;class wa extends L{_parse(e){const t=D.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==w.string&&r.parsedType!==w.number){const a=D.objectValues(t);return b(r,{expected:D.joinValues(a),received:r.parsedType,code:y.invalid_type}),M}if(this._cache||(this._cache=new Set(D.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=D.objectValues(t);return b(r,{received:r.data,code:y.invalid_enum_value,options:a}),M}return ne(e.data)}get enum(){return this._def.values}}wa.create=(n,e)=>new wa({values:n,typeName:A.ZodNativeEnum,...T(e)});class Dt extends L{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==w.promise&&t.common.async===!1)return b(t,{code:y.invalid_type,expected:w.promise,received:t.parsedType}),M;const r=t.parsedType===w.promise?t.data:Promise.resolve(t.data);return ne(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Dt.create=(n,e)=>new Dt({type:n,typeName:A.ZodPromise,...T(e)});class mt extends L{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===A.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,i={addIssue:o=>{b(r,o),o.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),a.type==="preprocess"){const o=a.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async s=>{if(t.value==="aborted")return M;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?M:l.status==="dirty"||t.value==="dirty"?Ot(l.value):l});{if(t.value==="aborted")return M;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?M:s.status==="dirty"||t.value==="dirty"?Ot(s.value):s}}if(a.type==="refinement"){const o=s=>{const l=a.refinement(s,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?M:(s.status==="dirty"&&t.dirty(),o(s.value),{status:t.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?M:(s.status==="dirty"&&t.dirty(),o(s.value).then(()=>({status:t.value,value:s.value}))))}if(a.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ut(o))return M;const s=a.transform(o.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>ut(o)?Promise.resolve(a.transform(o.value,i)).then(s=>({status:t.value,value:s})):M);D.assertNever(a)}}mt.create=(n,e,t)=>new mt({schema:n,typeName:A.ZodEffects,effect:e,...T(t)}),mt.createWithPreprocess=(n,e,t)=>new mt({schema:e,effect:{type:"preprocess",transform:n},typeName:A.ZodEffects,...T(t)});class Ze extends L{_parse(e){return this._getType(e)===w.undefined?ne(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ze.create=(n,e)=>new Ze({innerType:n,typeName:A.ZodOptional,...T(e)});class gt extends L{_parse(e){return this._getType(e)===w.null?ne(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}gt.create=(n,e)=>new gt({innerType:n,typeName:A.ZodNullable,...T(e)});class Yn extends L{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===w.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Yn.create=(n,e)=>new Yn({innerType:n,typeName:A.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...T(e)});class Xn extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return sn(a)?a.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new de(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new de(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Xn.create=(n,e)=>new Xn({innerType:n,typeName:A.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...T(e)});class ka extends L{_parse(e){if(this._getType(e)!==w.nan){const r=this._getOrReturnCtx(e);return b(r,{code:y.invalid_type,expected:w.nan,received:r.parsedType}),M}return{status:"valid",value:e.data}}}ka.create=n=>new ka({typeName:A.ZodNaN,...T(n)});class vo extends L{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class Hn extends L{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?M:i.status==="dirty"?(t.dirty(),Ot(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?M:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new Hn({in:e,out:t,typeName:A.ZodPipeline})}}class Gn extends L{_parse(e){const t=this._def.innerType._parse(e),r=a=>(ut(a)&&(a.value=Object.freeze(a.value)),a);return sn(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Gn.create=(n,e)=>new Gn({innerType:n,typeName:A.ZodReadonly,...T(e)});var A;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(A||(A={}));const Ke=De.create,O=dt.create,Jn=Un.create,Kn=$n.create;pt.create,je.create;const dn=Wn.create,Qn=ve.create,B=q.create;cn.create,un.create;const Sa=ke.create,_e=Pt.create,_o=ft.create,xo=Dt.create;Ze.create,gt.create,B({pin:B({fade:Jn().optional(),maxCount:O().optional(),maxZoom:O().optional()}).optional(),animation:B({queue:B({limit:O().optional()}).optional()}).optional(),api:B({states:B({url:Ke(),key:Ke()}).optional(),log:B({enabled:Jn()}).optional()}).optional()});const er=O().min(-90).max(90),tr=O().min(-180).max(180),bo=B({sw:B({lat:er,lng:tr}),ne:B({lat:er,lng:tr})}),nr=Kn().refine(n=>n instanceof HTMLElement,"Must be an HTMLElement"),za=B({mapSize:O(),zoomMin:O(),zoomMax:O(),zoomScale:O()}),wo=B({instance:Kn(),inserted:_e().returns(Jn()),insert:_e().returns(dn()),remove:_e().returns(dn()),update:_e().args(O()).returns(dn())}),ko=B({parameters:za,getContainer:_e().args().returns(nr),getZoom:_e().args().returns(O()),getBounds:_e().args().returns(bo),panBy:_e().args(O(),O()).returns(dn()),createMarker:_e().args(nr,er,tr,O()).returns(wo)}),rr=_e().args(Ke()).returns(xo(nr)),So=B({id:Ke().min(1),rank:O(),lat:O().min(-90).max(90),lng:O().min(-180).max(180),tooltip:B({style:B({width:O(),height:O(),margin:O(),radius:O()}).refine(n=>Math.min(n.width,n.height)/n.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:rr}),pin:B({style:B({width:O(),height:O(),radius:O()}),body:rr}).optional(),popup:B({style:B({width:O(),height:O(),radius:O(),margin:O()}),body:rr}).optional()}),zo=Qn(So);Sa([O(),Qn(Sa([O(),O()]))]);const Eo=B({id:Ke(),rank:O(),lat:O(),lng:O(),width:O(),height:O(),margin:O()});B({key:Ke(),parameters:za,input:Qn(Eo)});const Mo=_o(["info","warn","error"]);B({title:Ke(),level:Mo,content:Kn()});class Ao{constructor(e,t){p(this,"provider");p(this,"apiStatesUrl");p(this,"apiStatesKey");p(this,"apiLogEnabled");p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");ko.parse(e),this.provider=e,this.markerPinProcessor=new or(e),this.markerTooltipProcessor=new Co(e),this.markerPopupProcessor=new No(e),this.configuration=t,this.log("info","[CLIENT] Map manager created")}set configuration(e){var t,r,a,i,o,s,l,c;this.apiStatesUrl=(r=(t=e==null?void 0:e.api)==null?void 0:t.states)==null?void 0:r.url,this.apiStatesKey=(i=(a=e==null?void 0:e.api)==null?void 0:a.states)==null?void 0:i.key,this.apiLogEnabled=(s=(o=e==null?void 0:e.api)==null?void 0:o.log)==null?void 0:s.enabled,this.markerPinProcessor.setConfiguration(e),Ie.setLimit(((c=(l=e==null?void 0:e.animation)==null?void 0:l.queue)==null?void 0:c.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await zo.parseAsync(e);try{let t;if(e.length>1){const r=e.map(a=>({id:a.id,rank:a.rank,lat:a.lat,lng:a.lng,width:a.tooltip.style.width,height:a.tooltip.style.height,margin:a.tooltip.style.margin}));if(this.apiStatesUrl!=null&&this.apiStatesKey!=null){const a={key:this.apiStatesKey,parameters:this.provider.parameters,input:r},i=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok||!i.body)throw new Error("Failed to get marker states: "+i.statusText);t=await i.json()}else t=la(this.provider.parameters,r)}else t=[[0,[[0,$.DEGREES.indexOf($.DEFAULT)]]]];this.updateMarkerData(e,t),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.removeMarkerData(),t instanceof Error&&this.log("error","[CLIENT] Failed to update markers",t),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","[CLIENT] Failed to remove markers",e),e}}showPopup(e){try{for(const t of this.markerDataArray)t.marker.id==e?this.markerPopupProcessor.show(t):this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw t instanceof Error&&this.log("error","[CLIENT] Failed to show popup",t),t}}hidePopup(e){try{if(e){const t=this.markerDataMap.get(e);if(t==null)return;this.markerPopupProcessor.hide(t)}else for(const t of this.markerDataArray)this.markerPopupProcessor.hide(t)}catch(t){console.error(t);for(const r of this.markerDataArray)this.markerPopupProcessor.hide(r);throw t instanceof Error&&this.log("error","[CLIENT] Failed to hide popup",t),t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const r=new Map(e.map((i,o)=>[i.id,new Ea(this.provider,i,t[o])])),a=Array.from(this.markerDataArray);for(const i of a)r.has(i.marker.id)==!1&&(i.remove(),this.markerDataMap.delete(i.marker.id),this.markerDataArray.splice(this.markerDataArray.indexOf(i),1));for(let i=0;i<e.length;i++){const o=e[i],s=t[i],l=this.markerDataMap.get(o.id);if(l)l.update(s);else{const c=new Ea(this.provider,o,s);c.create(),this.markerDataMap.set(o.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,o)=>i.zoom-o.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(r){throw console.error(r),this.markerDataArray.forEach(a=>a.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),r instanceof Error&&this.log("error","[CLIENT] Failed to update marker data",r),r}finally{this.markerDataUpdating=!1}}removeMarkerData(){try{this.markerDataUpdating=!0,this.markerPinProcessor.removeElements(),this.markerTooltipProcessor.removeElements(),this.markerPopupProcessor.clear(),this.markerDataArray.length=0,this.markerDataMap.clear()}catch(e){throw console.error(e),e instanceof Error&&this.log("error","[CLIENT] Failed to remove marker data",e),e}finally{this.markerDataUpdating=!1}}processMarkerDataCallback(){if(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","[CLIENT] Failed to process marker data",e)}}processMarkerData(){if(this.markerDataUpdating)return;const e=this.provider.getBounds(),t=this.provider.getZoom();this.markerPopupProcessor.process(),this.markerTooltipProcessor.process(e,t),this.markerPinProcessor.process(e,t)}async log(e,t,r){if(!(this.apiLogEnabled==null&&(window!=null&&window.location.host.startsWith("localhost")))&&this.apiLogEnabled!=!1)try{await fetch("https://arenarium.dev/api/public/v1/log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t,level:e,content:r})})}catch(a){console.error(a)}}}class Ea{constructor(e,t,r){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=r[0],this.pin=new ir(e,t,r),this.tooltip=new sr(e,t,r)}create(){this.pin.create(),this.tooltip.create()}update(e){this.pin.update(e),this.tooltip.update(e)}remove(){this.pin.remove(),this.tooltip.remove()}}class ar{constructor(e,t){p(this,"provider");p(this,"id");p(this,"lat");p(this,"lng");p(this,"shown");p(this,"element");p(this,"component");p(this,"marker");this.provider=e,this.id=t.id,this.lat=t.lat,this.lng=t.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 t=this.marker,r=this.component;if(t==null||r==null)throw new Error("Failed to update provider marker map");e?t.inserted()==!1&&t.insert():t.inserted()==!0&&t.remove()}getZindex(){throw new Error("Get z-index not implemented")}remove(){var e,t;(e=this.marker)==null||e.remove(),(t=this.element)==null||t.remove()}}const bt=class bt extends ar{constructor(t,r,a){var i,o,s,l;super(t,r);p(this,"width");p(this,"height");p(this,"radius");p(this,"zoom");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=((i=r.pin)==null?void 0:i.style.width)??bt.DEFAULT_SIZE,this.height=((o=r.pin)==null?void 0:o.style.height)??bt.DEFAULT_SIZE,this.radius=((s=r.pin)==null?void 0:s.style.radius)??bt.DEFAULT_SIZE,this.zoom=a[0],this.bodyCallback=(l=r.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=Rn(qi,{target:this.element,props:{id:this.id+"_pin",layer:Ui,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,radius:this.radius}})}update(t){this.zoom=t[0],this.updateZIndex()}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var r;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}setCollapsed(t){if(this.component==null)throw new Error("Failed to set pin collapsed");this.component.setScale(t?0:1)}getScale(t){return this.zoom<t?1:Math.max(0,1-(this.zoom-t)*.125)}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyCallback==null||this.bodyLoaded}};p(bt,"DEFAULT_SIZE",16);let ir=bt;const wt=class wt{constructor(e){p(this,"provider");p(this,"pinElements",new Array);p(this,"pinMaxWidth",0);p(this,"pinMaxHeight",0);p(this,"pinFade",!1);p(this,"pinMaxCount",0);p(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,r,a;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((r=e==null?void 0:e.pin)==null?void 0:r.maxCount)??Math.max(wt.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((a=e==null?void 0:e.pin)==null?void 0:a.maxZoom)??wt.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,r)=>Math.max(t,r.width),0),this.pinMaxHeight=e.reduce((t,r)=>Math.max(t,r.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const r=this.provider.parameters.mapSize,a=new sa(e,t,r,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const o of this.pinElements)a.contains(o.lat,o.lng)?o.shown&&t<=o.zoom&&o.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?o.updateState(t):o.setCollapsed(!1),o.updateMap(!0),o.isBodyLoaded()==!1&&o.updateBody()),i++):(o.setCollapsed(!0),o.isCollapsed()&&o.updateMap(!1)):o.updateMap(!1)}};p(wt,"MAP_PINS_MAX_ZOOM",2),p(wt,"MAP_PINS_MAX_COUNT",128);let or=wt;const pn=class pn extends ar{constructor(t,r,a){super(t,r);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"zoom");p(this,"angle");p(this,"states");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.width=r.tooltip.style.width,this.height=r.tooltip.style.height,this.margin=r.tooltip.style.margin,this.radius=r.tooltip.style.radius,this.zoom=a[0],this.angle=$.DEFAULT,this.states=a[1].map(i=>[i[0],$.DEGREES[i[1]]]),this.bodyCallback=r.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=Rn(oa,{target:this.element,props:{id:this.id+"_tooltip",layer:Vi,priority:this.zoom*this.provider.parameters.zoomScale,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}update(t){this.zoom=t[0],this.states=t[1].map(r=>[r[0],$.DEGREES[r[1]]]),this.updateZIndex()}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update tooltip state");this.angle=this.getAngle(t),this.component.setAngle(this.angle)}updateBody(){var r;if(this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getAngle(t){const r=this.states.findLast(a=>a[0]<=t);if(!r)throw new Error("Angle not found");return r[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+pn.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set tooltip collapsed");this.component.setCollapsed(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(pn,"Z_INDEX_OFFSET",1e6);let sr=pn;class Co{constructor(e){p(this,"provider");p(this,"tooltipElements",new Array);p(this,"tooltipMaxWidth",0);p(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,r)=>Math.max(t,r.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,r)=>Math.max(t,r.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const r=this.provider.parameters.mapSize,a=new sa(e,t,r,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)a.contains(i.lat,i.lng)?i.shown&&i.zoom<=t?(i.updateState(t),i.setCollapsed(!1),i.updateMap(!0),i.isCollapsed()==!1&&i.isBodyLoaded()==!1&&i.updateBody()):(i.setCollapsed(!0),i.isCollapsed()&&i.updateMap(!1)):i.updateMap(!1)}}const hn=class hn extends ar{constructor(t,r){if(r.popup==null)throw new Error("Failed to create popup");super(t,r);p(this,"width");p(this,"height");p(this,"margin");p(this,"radius");p(this,"bodyLoading",!1);p(this,"bodyLoaded",!1);p(this,"bodyCallback");this.shown=!1,this.width=r.popup.style.width,this.height=r.popup.style.height,this.margin=r.popup.style.margin,this.radius=r.popup.style.radius,this.bodyCallback=r.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=Rn(oa,{target:this.element,props:{id:this.id+"_popup",layer:Bi,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var r;super.updateMap(t),(r=this.component)==null||r.setDisplayed(t)}updateBody(){var r;if(this.bodyLoaded||this.bodyLoading)return;const t=(r=this.component)==null?void 0:r.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(a=>t.appendChild(a)).catch(a=>console.error(a)).finally(()=>{this.bodyLoaded=!0,this.bodyLoading=!1}))}getZindex(){return hn.Z_INDEX_OFFSET}setCollapsed(t){if(this.component==null)throw new Error("Failed to set popup collapsed");this.component.setCollapsed(t)}setAngle(t){if(this.component==null)throw new Error("Failed to set popup angle");this.component.setAngle(t)}isExpanded(){return this.component==null?!1:this.component.getExpanded()}isCollapsed(){return this.component==null?!1:this.component.getCollapsed()}isBodyLoaded(){return this.bodyLoaded}};p(hn,"Z_INDEX_OFFSET",2e6);let lr=hn;class No{constructor(e){p(this,"provider");p(this,"popupElements",new Map);p(this,"popupPositioned",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new lr(this.provider,e.marker);this.popupElements.set(e.marker.id,t),this.popupPositioned.set(e.marker.id,!1),t.create(),t.setAngle(e.tooltip.angle),t.shown=!0}hide(e){e.pin.shown=!0,e.tooltip.shown=!0;const t=this.popupElements.get(e.marker.id);t!=null&&(t.shown=!1)}clear(){this.popupElements.values().forEach(e=>e.remove()),this.popupElements.clear(),this.popupPositioned.clear()}process(){var e,t;for(const r of this.popupElements.values())if(r.shown){if(r.setCollapsed(!1),r.updateMap(!0),r.isExpanded()&&r.isBodyLoaded()==!1&&r.updateBody(),r.isCollapsed()==!1&&this.popupPositioned.get(r.id)==!1){const a=(e=r.component)==null?void 0:e.getBody();if(a==null)continue;const i=(t=r.component)==null?void 0:t.getOffsets();if(i==null)continue;const o=a.getBoundingClientRect();if(o.x==0&&o.y==0&&o.width==0&&o.height==0)continue;const s=o.x+o.width/2,l=o.y+o.height/2,c=s+i.offsetX,u=l+i.offsetY,d=c+r.width,f=u+r.height,m=this.provider.getContainer().getBoundingClientRect(),E=c-m.left,x=m.right-d,h=u-m.top,_=m.bottom-f,g=Math.min(r.width,r.height)/4,v=E<0?E-g:x<0?-x+g:0,S=h<0?h-g:_<0?-_+g:0;this.provider.panBy(v,S),this.popupPositioned.set(r.id,!0)}}else r.setCollapsed(!0),r.isCollapsed()&&(r.updateMap(!1),r.remove(),this.popupElements.delete(r.id),this.popupPositioned.delete(r.id))}}const fn=class fn{constructor(e,t,r){p(this,"parameters",fn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...r,style:r.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:r.attributionControl??{compact:!1,customAttribution:"@arenarium/maps"}}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds(),t=e.getSouthWest(),r=e.getNorthEast();return{sw:t,ne:r}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,r){const a=new this.MapMarkerClass({element:e});return a.setLngLat([r,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};p(fn,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let cr=fn;const To={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(120, 120, 120, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(128, 128, 128, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(56, 56, 56, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(153, 153, 153, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(104, 104, 104, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(56, 56, 56, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(136, 136, 136, 1)","fill-outline-color":"rgba(102, 102, 102, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(128, 128, 128, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(50, 50, 50, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(52, 52, 52, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(88, 88, 88, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20],"line-color":"rgba(102, 102, 102, 1)"}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23],"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-width":2,"line-color":"rgba(85, 85, 85, 1)"}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(102, 102, 102, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(85, 85, 85, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(102, 102, 102, 1)",6,"rgba(85, 85, 85, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(68, 68, 68, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(51, 51, 51, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(51, 51, 51, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(255, 255, 255, 1)","text-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},Io={version:8,sources:{openmaptiles:{type:"vector",url:"https://tiles.openfreemap.org/planet"}},glyphs:"https://tiles.openfreemap.org/fonts/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"rgba(220, 220, 220, 1)"}},{id:"park",type:"fill",source:"openmaptiles","source-layer":"park",filter:["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],paint:{"fill-color":"rgba(228, 228, 228, 1)"}},{id:"water",type:"fill",source:"openmaptiles","source-layer":"water",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["!=",["get","brunnel"],"tunnel"]],paint:{"fill-antialias":!0,"fill-color":"rgba(156, 156, 156, 1)"}},{id:"landcover_ice_shelf",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"ice_shelf"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":.7}},{id:"landcover_glacier",type:"fill",source:"openmaptiles","source-layer":"landcover",maxzoom:8,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","subclass"],"glacier"]],paint:{"fill-color":"rgba(253, 253, 253, 1)","fill-opacity":["interpolate",["linear"],["zoom"],0,1,8,.5]}},{id:"landuse_residential",type:"fill",source:"openmaptiles","source-layer":"landuse",maxzoom:16,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"residential"]],paint:{"fill-color":"rgba(204, 204, 204, 1)","fill-opacity":["interpolate",["exponential",.6],["zoom"],8,.8,9,.6]}},{id:"landcover_wood",type:"fill",source:"openmaptiles","source-layer":"landcover",minzoom:10,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"wood"]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],8,0,12,1]}},{id:"waterway",type:"line",source:"openmaptiles","source-layer":"waterway",filter:["==",["geometry-type"],"LineString"],paint:{"line-color":"rgba(156, 156, 156, 1)"}},{id:"building",type:"fill",source:"openmaptiles","source-layer":"building",minzoom:12,paint:{"fill-antialias":!0,"fill-color":"rgba(236, 236, 236, 1)","fill-outline-color":"rgba(202, 202, 202, 1)"}},{id:"tunnel_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"tunnel_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"tunnel"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(185, 185, 185)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"aeroway-taxiway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["match",["get","class"],["taxiway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"aeroway-runway-casing",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["match",["get","class"],["runway"],!0,!1],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,6,17,55]}},{id:"aeroway-area",type:"fill",source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["match",["get","class"],["runway","taxiway"],!0,!1]],paint:{"fill-color":"rgba(228, 228, 228, 1)","fill-opacity":["interpolate",["linear"],["zoom"],13,0,14,1]}},{id:"aeroway-runway",type:"line",source:"openmaptiles","source-layer":"aeroway",minzoom:11,filter:["all",["match",["get","class"],["runway"],!0,!1],["==",["geometry-type"],"LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-opacity":1,"line-width":["interpolate",["exponential",1.5],["zoom"],11,4,17,50]}},{id:"road_area_pier",type:"fill",source:"openmaptiles","source-layer":"transportation",filter:["all",["in",["geometry-type"],["literal",["Polygon","MultiPolygon"]]],["==",["get","class"],"pier"]],paint:{"fill-antialias":!0,"fill-color":"rgba(150, 150, 150, 1)"}},{id:"road_pier",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["pier"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(152, 152, 152, 1)","line-width":["interpolate",["exponential",1.2],["zoom"],15,1,17,4]}},{id:"highway_path",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"path"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgb(188, 188, 188)","line-opacity":.9,"line-width":["interpolate",["exponential",1.2],["zoom"],13,1,20,10]}},{id:"highway_minor",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:8,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-opacity":.9,"line-width":["interpolate",["exponential",1.55],["zoom"],13,1.8,20,20]}},{id:"highway_major_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(185, 185, 185)","line-dasharray":[12,0],"line-width":["interpolate",["exponential",1.3],["zoom"],10,3,20,23]}},{id:"highway_major_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],10,2,20,20]}},{id:"highway_major_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:11,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":2}},{id:"highway_motorway_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,3,20,40]}},{id:"highway_motorway_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["match",["get","brunnel"],["bridge","tunnel"],!1,!0],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"highway_motorway_subtle",type:"line",source:"openmaptiles","source-layer":"transportation",maxzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"motorway"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3]}},{id:"railway_transit",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":3}},{id:"railway_transit_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"transit"],["match",["get","brunnel"],["tunnel"],!1,!0]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway_service",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","class"],"rail"],["has","service"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(202, 202, 202, 1)","line-width":3}},{id:"railway_service_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:16,filter:["all",["==",["geometry-type"],"LineString"],["==",["get","class"],"rail"],["has","service"]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-dasharray":[3,3],"line-width":2}},{id:"railway",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(185, 185, 185, 1)","line-width":["interpolate",["exponential",1.3],["zoom"],16,3,20,7]}},{id:"railway_dashline",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["==",["geometry-type"],"LineString"],["all",["!",["has","service"]],["==",["get","class"],"rail"]]],layout:{"line-join":"round"},paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[3,3],"line-width":["interpolate",["exponential",1.3],["zoom"],16,2,20,6]}},{id:"highway_motorway_bridge_casing",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"butt","line-join":"miter"},paint:{"line-color":"rgb(168, 168, 168)","line-dasharray":[2,0],"line-opacity":1,"line-width":["interpolate",["exponential",1.4],["zoom"],5.8,0,6,5,20,45]}},{id:"highway_motorway_bridge_inner",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:6,filter:["all",["==",["geometry-type"],"LineString"],["all",["==",["get","brunnel"],"bridge"],["==",["get","class"],"motorway"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["interpolate",["linear"],["zoom"],5.8,"rgba(202, 202, 202, 1)",6,"rgba(185, 185, 185, 1)"],"line-width":["interpolate",["exponential",1.4],["zoom"],4,2,6,1.3,20,30]}},{id:"boundary_3",type:"line",source:"openmaptiles","source-layer":"boundary",minzoom:8,filter:["all",[">=",["get","admin_level"],3],["<=",["get","admin_level"],6],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],paint:{"line-color":"rgba(168, 168, 168, 1)","line-dasharray":[1,1],"line-width":["interpolate",["linear"],["zoom"],7,1,11,2]}},{id:"boundary_2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==",["get","admin_level"],2],["!=",["get","maritime"],1],["!=",["get","disputed"],1],["!",["has","claimed_by"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(151, 151, 151, 1)","line-opacity":["interpolate",["linear"],["zoom"],0,.4,4,1],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"boundary_disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=",["get","maritime"],1],["==",["get","disputed"],1]],paint:{"line-color":"rgba(151, 151, 151, 1)","line-dasharray":[1,2],"line-width":["interpolate",["linear"],["zoom"],3,1,5,1.2,12,3]}},{id:"waterway_line_label",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:10,filter:["==",["geometry-type"],"LineString"],layout:{"symbol-placement":"line","symbol-spacing":350,"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":5,"text-size":14},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1.5}},{id:"water_name_point_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",minzoom:0,filter:["==",["geometry-type"],"Point"],layout:{visibility:"none"}},{id:"water_name_line_label",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==",["geometry-type"],"LineString"],layout:{visibility:"none"}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==",["get","class"],"path"],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(158, 158, 158, 1)","text-halo-color":"rgba(244, 244, 244, 1)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==",["geometry-type"],"LineString"],["match",["get","class"],["minor","service","track"],!0,!1]],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["match",["get","class"],["primary","secondary","tertiary","trunk"],!0,!1],layout:{"symbol-placement":"line","text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"map","text-size":["interpolate",["linear"],["zoom"],13,12,14,13]},paint:{"text-color":"rgba(34, 34, 34, 1)","text-halo-width":1,"text-halo-color":"rgba(255, 255, 255, 1)"}},{id:"highway-shield-non-us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-interstate","us-state"],!1,!0]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10},paint:{"text-halo-color":"rgba(0, 0, 0, 1)","text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:11,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-interstate"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",7,"line",8,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"road_shield_us",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12,filter:["all",["<=",["get","ref_length"],6],["==",["geometry-type"],"LineString"],["match",["get","network"],["us-highway","us-state"],!0,!1]],layout:{"icon-rotation-alignment":"viewport","icon-size":1,"symbol-placement":["step",["zoom"],"point",11,"line"],"symbol-spacing":200,"text-field":["to-string",["get","ref"]],"text-font":["Noto Sans Regular"],"text-rotation-alignment":"viewport","text-size":10}},{id:"airport",type:"symbol",source:"openmaptiles","source-layer":"aerodrome_label",minzoom:11,filter:["all",["has","iata"]],layout:{"icon-size":1,"text-anchor":"top","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":9,"text-offset":[0,.6],"text-optional":!0,"text-padding":2,"text-size":12},paint:{"text-color":"rgba(51, 51, 51, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_other",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:8,filter:["match",["get","class"],["city","continent","country","state","town","village"],!1,!0],layout:{"text-field":["get","name:latin"],"text-font":["Noto Sans Regular"],"text-letter-spacing":.1,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],8,9,12,10],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_village",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:9,filter:["==",["get","class"],"village"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,10,11,12]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_town",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:6,filter:["==",["get","class"],"town"],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.2,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-size":["interpolate",["exponential",1.2],["zoom"],7,12,11,14]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_state",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:5,maxzoom:8,filter:["==",["get","class"],"state"],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-letter-spacing":.2,"text-max-width":9,"text-size":["interpolate",["linear"],["zoom"],5,10,8,14],"text-transform":"uppercase"},paint:{"text-color":"rgba(17, 17, 17, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["!=",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.4,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Regular"],"text-max-width":8,"text-offset":[0,-.1],"text-size":["interpolate",["exponential",1.2],["zoom"],4,11,7,13,11,18]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_city_capital",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:3,filter:["all",["==",["get","class"],"city"],["==",["get","capital"],2]],layout:{"icon-allow-overlap":!0,"icon-optional":!1,"icon-size":.5,"text-anchor":"bottom","text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":8,"text-offset":[0,-.2],"text-size":["interpolate",["exponential",1.2],["zoom"],4,12,7,14,11,20]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_3",type:"symbol",source:"openmaptiles","source-layer":"place",minzoom:2,maxzoom:9,filter:["all",["==",["get","class"],"country"],[">=",["get","rank"],3]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],3,9,7,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_2",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],2]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],2,9,5,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}},{id:"label_country_1",type:"symbol",source:"openmaptiles","source-layer":"place",maxzoom:9,filter:["all",["==",["get","class"],"country"],["==",["get","rank"],1]],layout:{"text-field":["coalesce",["get","name_en"],["get","name:latin"]],"text-font":["Noto Sans Bold"],"text-max-width":6.25,"text-size":["interpolate",["linear"],["zoom"],1,9,4,17]},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-color":"rgba(255, 255, 255, 1)","text-halo-width":1}}]},mn=class mn{constructor(e,t,r){p(this,"parameters",mn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...r,projection:"mercator",pitchWithRotate:!1,customAttribution:r.customAttribution??"@arenarium/maps"}),this.map.dragRotate.disable(),this.map.keyboard.disable(),this.map.touchZoomRotate.disableRotation(),this.map.touchPitch.disable()}getMap(){return this.map}getContainer(){return this.map.getContainer()}getZoom(){return this.map.getZoom()}getBounds(){const e=this.map.getBounds();if(!e)return{sw:{lat:0,lng:0},ne:{lat:0,lng:0}};const t=e.getSouthWest(),r=e.getNorthEast();return{sw:t,ne:r}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,r){const a=new this.MapMarkerClass({element:e});return a.setLngLat([r,t]),{instance:a,inserted:()=>a._map!=null,insert:()=>a.addTo(this.map),remove:()=>a.remove(),update:i=>a.getElement().style.zIndex=i.toString()}}};p(mn,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let ur=mn;const gn=class gn{constructor(e,t,r,a){p(this,"parameters",gn.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(r,{...a})}getMap(){return this.map}getContainer(){return this.map.getDiv()}getZoom(){return this.map.getZoom()??NaN}getBounds(){const e=this.map.getBounds();if(e==null)return{sw:{lat:NaN,lng:NaN},ne:{lat:NaN,lng:NaN}};const t=e.getSouthWest(),r=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:r.lat(),lng:r.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,r,a){const i=new this.MapMarkerClass({position:{lat:t,lng:r},content:e,zIndex:a});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:o=>i.zIndex=o}}};p(gn,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let dr=gn;const Oo=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Ro=[{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}]}];class Lo{constructor(e,t,r){p(this,"x");p(this,"y");p(this,"width");p(this,"height");p(this,"zoom");p(this,"angles");p(this,"expanded");p(this,"angle");p(this,"bounds");const a=Oe.project(t.lat,t.lng,e.mapSize);this.x=a.x,this.y=a.y,this.width=t.width+2*t.margin,this.height=t.height+2*t.margin,this.zoom=r[0],this.angles=r[1].map(i=>[i[0],$.DEGREES[i[1]]]),this.expanded=!1,this.angle=0,this.bounds=void 0}getBounds(e,t){let{offsetX:r,offsetY:a}=Je.getOffsets(this.width,this.height,t),i=-r,o=this.width-i,s=-a,l=this.height-s;return{x:this.x,y:this.y,left:i/e,right:o/e,top:s/e,bottom:l/e}}}function Po(n,e,t){var s;if(e.length!=t.length)throw new Error("Data and states length must be the same");const r=new Array(e.length);for(let l=0;l<e.length;l++){const c=t[l];if(isNaN(c[0]))throw new Error("State zoom is not a number");if(c[1]==null||c[1].length==0)throw new Error("State angles is empty");if(c[0]!=c[1][0][0])throw new Error("State expand zoom and start angles zoom are not the same");const u=new Lo(n,e[l],t[l]);r[l]=u}const a=n.zoomMin,i=n.zoomMax,o=1/n.zoomScale;for(let l=a;l<=i;l+=o){const c=Math.pow(2,l);for(let u=0;u<r.length;u++){const d=r[u];if(d.expanded=d.zoom<l,d.expanded==!1)continue;const f=(s=d.angles.findLast(m=>m[0]<l))==null?void 0:s[1];if(f==null)throw new Error("Angle not found");d.angle=f,d.bounds=d.getBounds(c,f)}for(let u=0;u<r.length;u++){const d=r[u];if(d.bounds!=null)for(let f=u+1;f<r.length;f++){const m=r[f];if(m.bounds!=null&&Re.areOverlaping(d.bounds,m.bounds)){console.log("OVERLAP",l,e[u],e[f],d.angle,m.angle);const E=d.bounds.x-d.bounds.left,x=d.bounds.y-d.bounds.top,h=d.bounds.x+d.bounds.right,_=d.bounds.y+d.bounds.bottom;console.log(`B1: (${E}, ${x}), (${E}, ${_}), (${h}, ${x}), (${h}, ${_})`);const g=m.bounds.x-m.bounds.left,v=m.bounds.y-m.bounds.top,S=m.bounds.x+m.bounds.right,z=m.bounds.y+m.bounds.bottom;throw console.log(`B2: (${g}, ${v}), (${g}, ${z}), (${S}, ${v}), (${S}, ${z})`),new Error("Bounds overlaping")}}}}}N.GoogleMapDarkStyle=Ro,N.GoogleMapLightStyle=Oo,N.GoogleMapsProvider=dr,N.MapManager=Ao,N.MapboxProvider=ur,N.MaplibreDarkStyle=To,N.MaplibreLightStyle=Io,N.MaplibreProvider=cr,N.getStates=la,N.testStates=Po,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
|