@arenarium/maps 1.0.148 → 1.0.149
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 +2 -2
- package/dist/main.cjs.js +2 -2
- package/dist/main.es.js +1501 -1469
- package/package.json +8 -8
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(k,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(k=typeof globalThis<"u"?globalThis:k||self,A(k.arenarium={}))})(this,function(k){"use strict";var qi=Object.defineProperty;var Za=k=>{throw TypeError(k)};var Wi=(k,A,P)=>A in k?qi(k,A,{enumerable:!0,configurable:!0,writable:!0,value:P}):k[A]=P;var d=(k,A,P)=>Wi(k,typeof A!="symbol"?A+"":A,P),Fa=(k,A,P)=>A.has(k)||Za("Cannot "+P);var J=(k,A,P)=>(Fa(k,A,"read from private field"),P?P.call(k):A.get(k)),at=(k,A,P)=>A.has(k)?Za("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(k):A.set(k,P),nt=(k,A,P,it)=>(Fa(k,A,"write to private field"),it?it.call(k,P):A.set(k,P),P);var Aa,oe,Fe,et,Se;var P=Array.isArray,it=Array.prototype.indexOf,Ba=Array.from,Va=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ua=Object.prototype,$a=Array.prototype,qa=Object.getPrototypeOf,kr=Object.isExtensible;function Wa(r){for(var e=0;e<r.length;e++)r[e]()}const Q=2,Sr=4,st=8,Lt=16,ue=32,ze=64,Rt=128,V=256,ot=512,W=1024,de=2048,we=4096,lt=8192,Ot=16384,zr=32768,Ya=65536,Xa=1<<19,Mr=1<<20,jt=1<<21,ct=Symbol("$state");function Er(r){return r===this.v}function Ha(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ga(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ja(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Qa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ka(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function en(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function tn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Yi=!1;const U=Symbol();let Y=null;function Cr(r){Y=r}function Pt(r,e=!1,t){var a=Y={p:Y,c:null,d:!1,e:null,m:!1,s:r,x:null,l:null};dn(()=>{a.d=!0})}function It(r){const e=Y;if(e!==null){r!==void 0&&(e.x=r);const s=e.e;if(s!==null){var t=N,a=E;e.e=null;try{for(var n=0;n<s.length;n++){var i=s[n];Ce(i.effect),pe(i.reaction),Bt(i.fn)}}finally{Ce(t),pe(a)}}Y=e.p,e.m=!0}return r||{}}function Tr(){return!0}function qe(r){if(typeof r!="object"||r===null||ct in r)return r;const e=qa(r);if(e!==Ua&&e!==$a)return r;var t=new Map,a=P(r),n=X(0),i=E,s=o=>{var l=E;pe(i);var c=o();return pe(l),c};return a&&t.set("length",X(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ka();var p=t.get(l);return p===void 0?p=s(()=>{var f=X(c.value);return t.set(l,f),f}):D(p,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const m=s(()=>X(U));t.set(l,m),Dt(n)}}else{if(a&&typeof l=="string"){var p=t.get("length"),f=Number(l);Number.isInteger(f)&&f<p.v&&D(p,f)}D(c,U),Dt(n)}return!0},get(o,l,c){var _;if(l===ct)return r;var p=t.get(l),f=l in o;if(p===void 0&&(!f||(_=$e(o,l))!=null&&_.writable)&&(p=s(()=>{var M=qe(f?o[l]:U),Z=X(M);return Z}),t.set(l,p)),p!==void 0){var m=R(p);return m===U?void 0:m}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var p=t.get(l);p&&(c.value=R(p))}else if(c===void 0){var f=t.get(l),m=f==null?void 0:f.v;if(f!==void 0&&m!==U)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return c},has(o,l){var m;if(l===ct)return!0;var c=t.get(l),p=c!==void 0&&c.v!==U||Reflect.has(o,l);if(c!==void 0||N!==null&&(!p||(m=$e(o,l))!=null&&m.writable)){c===void 0&&(c=s(()=>{var _=p?qe(o[l]):U,M=X(_);return M}),t.set(l,c));var f=R(c);if(f===U)return!1}return p},set(o,l,c,p){var K;var f=t.get(l),m=l in o;if(a&&l==="length")for(var _=c;_<f.v;_+=1){var M=t.get(_+"");M!==void 0?D(M,U):_ in o&&(M=s(()=>X(U)),t.set(_+"",M))}if(f===void 0)(!m||(K=$e(o,l))!=null&&K.writable)&&(f=s(()=>X(void 0)),D(f,qe(c)),t.set(l,f));else{m=f.v!==U;var Z=s(()=>qe(c));D(f,Z)}var j=Reflect.getOwnPropertyDescriptor(o,l);if(j!=null&&j.set&&j.set.call(p,c),!m){if(a&&typeof l=="string"){var le=t.get("length"),T=Number(l);Number.isInteger(T)&&T>=le.v&&D(le,T+1)}Dt(n)}return!0},ownKeys(o){R(n);var l=Reflect.ownKeys(o).filter(f=>{var m=t.get(f);return m===void 0||m.v!==U});for(var[c,p]of t)p.v!==U&&!(c in o)&&l.push(c);return l},setPrototypeOf(){en()}})}function Dt(r,e=1){D(r,r.v+e)}function rn(r){var e=Q|de,t=E!==null&&(E.f&Q)!==0?E:null;return N===null||t!==null&&(t.f&V)!==0?e|=V:N.f|=Mr,{ctx:Y,deps:null,effects:null,equals:Er,f:e,fn:r,reactions:null,rv:0,v:null,wv:0,parent:t??N}}function Ar(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)be(e[t])}}function an(r){for(var e=r.parent;e!==null;){if((e.f&Q)===0)return e;e=e.parent}return null}function Nr(r){var e,t=N;Ce(an(r));try{Ar(r),e=Jr(r)}finally{Ce(t)}return e}function Lr(r){var e=Nr(r);if(r.equals(e)||(r.v=e,r.wv=Hr()),!Ee){var t=(fe||(r.f&V)!==0)&&r.deps!==null?we:W;te(r,t)}}const We=new Map;function Zt(r,e){var t={f:0,v:r,reactions:null,equals:Er,rv:0,wv:0};return t}function X(r,e){const t=Zt(r);return bn(t),t}function D(r,e,t=!1){E!==null&&!ee&&Tr()&&(E.f&(Q|Lt))!==0&&!(I!=null&&I[1].includes(r)&&I[0]===E)&&tn();let a=t?qe(e):e;return nn(r,a)}function nn(r,e){if(!r.equals(e)){var t=r.v;Ee?We.set(r,e):We.set(r,t),r.v=e,(r.f&Q)!==0&&((r.f&de)!==0&&Nr(r),te(r,(r.f&V)===0?W:we)),r.wv=Hr(),Rr(r,de),N!==null&&(N.f&W)!==0&&(N.f&(ue|ze))===0&&(H===null?kn([r]):H.push(r))}return e}function Rr(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],s=i.f;(s&de)===0&&(te(i,e),(s&(W|V))!==0&&((s&Q)!==0?Rr(i,we):$t(i)))}}var Or,jr,Pr,Ir;function sn(){if(Or===void 0){Or=window,jr=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Pr=$e(e,"firstChild").get,Ir=$e(e,"nextSibling").get,kr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),kr(t)&&(t.__t=void 0)}}function on(r=""){return document.createTextNode(r)}function Dr(r){return Pr.call(r)}function Zr(r){return Ir.call(r)}function Ft(r,e){return Dr(r)}function ln(r,e=1,t=!1){let a=r;for(;e--;)a=Zr(a);return a}function cn(r){N===null&&E===null&&Ja(),E!==null&&(E.f&V)!==0&&N===null&&Ga(),Ee&&Ha()}function un(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Me(r,e,t,a=!0){var n=N,i={ctx:Y,deps:null,nodes_start:null,nodes_end:null,f:r|de,first:null,fn:e,last:null,next:null,parent:n,prev:null,teardown:null,transitions:null,wv:0};if(t)try{Ut(i),i.f|=zr}catch(l){throw be(i),l}else e!==null&&$t(i);var s=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&(Mr|Rt))===0;if(!s&&a&&(n!==null&&un(i,n),E!==null&&(E.f&Q)!==0)){var o=E;(o.effects??(o.effects=[])).push(i)}return i}function dn(r){const e=Me(st,null,!1);return te(e,W),e.teardown=r,e}function ie(r){cn();var e=N!==null&&(N.f&ue)!==0&&Y!==null&&!Y.m;if(e){var t=Y;(t.e??(t.e=[])).push({fn:r,effect:N,reaction:E})}else{var a=Bt(r);return a}}function pn(r){const e=Me(ze,r,!0);return(t={})=>new Promise(a=>{t.outro?gn(e,()=>{be(e),a(void 0)}):(be(e),a(void 0))})}function Bt(r){return Me(Sr,r,!1)}function Fr(r){return Me(st,r,!0)}function Br(r,e=[],t=rn){const a=e.map(t);return fn(()=>r(...a.map(R)))}function fn(r,e=0){return Me(st|Lt|e,r,!0)}function hn(r,e=!0){return Me(st|ue,r,!0,e)}function Vr(r){var e=r.teardown;if(e!==null){const t=Ee,a=E;Yr(!0),pe(null);try{e.call(null)}finally{Yr(t),pe(a)}}}function Ur(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){var a=t.next;(t.f&ze)!==0?t.parent=null:be(t,e),t=a}}function mn(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&ue)===0&&be(e),e=t}}function be(r,e=!0){var t=!1;(e||(r.f&Xa)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(yn(r.nodes_start,r.nodes_end),t=!0),Ur(r,e&&!t),mt(r,0),te(r,Ot);var a=r.transitions;if(a!==null)for(const i of a)i.stop();Vr(r);var n=r.parent;n!==null&&n.first!==null&&$r(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=null}function yn(r,e){for(;r!==null;){var t=r===e?null:Zr(r);r.remove(),r=t}}function $r(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function gn(r,e){var t=[];qr(r,t,!0),_n(t,()=>{be(r),e&&e()})}function _n(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function qr(r,e,t){if((r.f<)===0){if(r.f^=lt,r.transitions!==null)for(const s of r.transitions)(s.is_global||t)&&e.push(s);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&Ya)!==0||(a.f&ue)!==0;qr(a,e,i?t:!1),a=n}}}let ut=[];function vn(){var r=ut;ut=[],Wa(r)}function xn(r){ut.length===0&&queueMicrotask(vn),ut.push(r)}function wn(r){var e=N;if((e.f&zr)===0){if((e.f&Rt)===0)throw r;e.fn(r)}else Wr(r,e)}function Wr(r,e){for(;e!==null;){if((e.f&Rt)!==0)try{e.fn(r);return}catch{}e=e.parent}throw r}let Vt=!1,dt=null,ke=!1,Ee=!1;function Yr(r){Ee=r}let pt=[],Xi=[],E=null,ee=!1;function pe(r){E=r}let N=null;function Ce(r){N=r}let I=null;function bn(r){E!==null&&E.f&jt&&(I===null?I=[E,[r]]:I[1].push(r))}let F=null,$=0,H=null;function kn(r){H=r}let Xr=1,ft=0,fe=!1;function Hr(){return++Xr}function ht(r){var f;var e=r.f;if((e&de)!==0)return!0;if((e&we)!==0){var t=r.deps,a=(e&V)!==0;if(t!==null){var n,i,s=(e&ot)!==0,o=a&&N!==null&&!fe,l=t.length;if(s||o){var c=r,p=c.parent;for(n=0;n<l;n++)i=t[n],(s||!((f=i==null?void 0:i.reactions)!=null&&f.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);s&&(c.f^=ot),o&&p!==null&&(p.f&V)===0&&(c.f^=V)}for(n=0;n<l;n++)if(i=t[n],ht(i)&&Lr(i),i.wv>r.wv)return!0}(!a||N!==null&&!fe)&&te(r,W)}return!1}function Gr(r,e,t=!0){var a=r.reactions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n];I!=null&&I[1].includes(r)&&I[0]===E||((i.f&Q)!==0?Gr(i,e,!1):e===i&&(t?te(i,de):(i.f&W)!==0&&te(i,we),$t(i)))}}function Jr(r){var _;var e=F,t=$,a=H,n=E,i=fe,s=I,o=Y,l=ee,c=r.f;F=null,$=0,H=null,fe=(c&V)!==0&&(ee||!ke||E===null),E=(c&(ue|ze))===0?r:null,I=null,Cr(r.ctx),ee=!1,ft++,r.f|=jt;try{var p=(0,r.fn)(),f=r.deps;if(F!==null){var m;if(mt(r,$),f!==null&&$>0)for(f.length=$+F.length,m=0;m<F.length;m++)f[$+m]=F[m];else r.deps=f=F;if(!fe)for(m=$;m<f.length;m++)((_=f[m]).reactions??(_.reactions=[])).push(r)}else f!==null&&$<f.length&&(mt(r,$),f.length=$);if(Tr()&&H!==null&&!ee&&f!==null&&(r.f&(Q|we|de))===0)for(m=0;m<H.length;m++)Gr(H[m],r);return n!==null&&n!==r&&(ft++,H!==null&&(a===null?a=H:a.push(...H))),p}catch(M){wn(M)}finally{F=e,$=t,H=a,E=n,fe=i,I=s,Cr(o),ee=l,r.f^=jt}}function Sn(r,e){let t=e.reactions;if(t!==null){var a=it.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&Q)!==0&&(F===null||!F.includes(e))&&(te(e,we),(e.f&(V|ot))===0&&(e.f^=ot),Ar(e),mt(e,0))}function mt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)Sn(r,t[a])}function Ut(r){var e=r.f;if((e&Ot)===0){te(r,W);var t=N,a=ke;N=r,ke=!0;try{(e&Lt)!==0?mn(r):Ur(r),Vr(r);var n=Jr(r);r.teardown=typeof n=="function"?n:null,r.wv=Xr;var i}finally{ke=a,N=t}}}function zn(){try{Qa()}catch(r){if(dt!==null)Wr(r,dt);else throw r}}function Mn(){var r=ke;try{var e=0;for(ke=!0;pt.length>0;){e++>1e3&&zn();var t=pt,a=t.length;pt=[];for(var n=0;n<a;n++){var i=Cn(t[n]);En(i)}We.clear()}}finally{Vt=!1,ke=r,dt=null}}function En(r){var e=r.length;if(e!==0)for(var t=0;t<e;t++){var a=r[t];(a.f&(Ot|lt))===0&&ht(a)&&(Ut(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null?$r(a):a.fn=null))}}function $t(r){Vt||(Vt=!0,queueMicrotask(Mn));for(var e=dt=r;e.parent!==null;){e=e.parent;var t=e.f;if((t&(ze|ue))!==0){if((t&W)===0)return;e.f^=W}}pt.push(e)}function Cn(r){for(var e=[],t=r;t!==null;){var a=t.f,n=(a&(ue|ze))!==0,i=n&&(a&W)!==0;if(!i&&(a<)===0){(a&Sr)!==0?e.push(t):n?t.f^=W:ht(t)&&Ut(t);var s=t.first;if(s!==null){t=s;continue}}var o=t.parent;for(t=t.next;t===null&&o!==null;)t=o.next,o=o.parent}return e}function R(r){var e=r.f,t=(e&Q)!==0;if(E!==null&&!ee){if(!(I!=null&&I[1].includes(r))||I[0]!==E){var a=E.deps;r.rv<ft&&(r.rv=ft,F===null&&a!==null&&a[$]===r?$++:F===null?F=[r]:(!fe||!F.includes(r))&&F.push(r))}}else if(t&&r.deps===null&&r.effects===null){var n=r,i=n.parent;i!==null&&(i.f&V)===0&&(n.f^=V)}return t&&(n=r,ht(n)&&Lr(n)),Ee&&We.has(r)?We.get(r):r.v}function Tn(r){var e=ee;try{return ee=!0,r()}finally{ee=e}}const An=-7169;function te(r,e){r.f=r.f&An|e}const Nn=["touchstart","touchmove"];function Ln(r){return Nn.includes(r)}const Rn=new Set,Qr=new Set;function yt(r){var T;var e=this,t=e.ownerDocument,a=r.type,n=((T=r.composedPath)==null?void 0:T.call(r))||[],i=n[0]||r.target,s=0,o=r.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(i=n[s]||r.target,i!==e){Va(r,"currentTarget",{configurable:!0,get(){return i||t}});var p=E,f=N;pe(null),Ce(null);try{for(var m,_=[];i!==null;){var M=i.assignedSlot||i.parentNode||i.host||null;try{var Z=i["__"+a];if(Z!=null&&(!i.disabled||r.target===i))if(P(Z)){var[j,...le]=Z;j.apply(i,[r,...le])}else Z.call(i,r)}catch(K){m?_.push(K):m=K}if(r.cancelBubble||M===e||M===null)break;i=M}if(m){for(let K of _)queueMicrotask(()=>{throw K});throw m}}finally{r.__root=e,delete r.currentTarget,pe(p),Ce(f)}}}function On(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function jn(r,e){var t=N;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function Kr(r,e){var t,a=!r.startsWith("<!>");return()=>{t===void 0&&(t=On(a?r:"<!>"+r),t=Dr(t));var n=jr?document.importNode(t,!0):t.cloneNode(!0);return jn(n,n),n}}function ea(r,e){r!==null&&r.before(e)}function qt(r,e){return Pn(r,e)}const Te=new Map;function Pn(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:s=!0}){sn();var o=new Set,l=f=>{for(var m=0;m<f.length;m++){var _=f[m];if(!o.has(_)){o.add(_);var M=Ln(_);e.addEventListener(_,yt,{passive:M});var Z=Te.get(_);Z===void 0?(document.addEventListener(_,yt,{passive:M}),Te.set(_,1)):Te.set(_,Z+1)}}};l(Ba(Rn)),Qr.add(l);var c=void 0,p=pn(()=>{var f=t??e.appendChild(on());return hn(()=>{if(i){Pt({});var m=Y;m.c=i}n&&(a.$$events=n),c=r(f,a)||{},i&&It()}),()=>{var M;for(var m of o){e.removeEventListener(m,yt);var _=Te.get(m);--_===0?(document.removeEventListener(m,yt),Te.delete(m)):Te.set(m,_)}Qr.delete(l),f!==t&&((M=f.parentNode)==null||M.removeChild(f))}});return In.set(c,p),c}let In=new WeakMap;const ta=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function Dn(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,s=0;(s=a.indexOf(n,s))>=0;){var o=s+i;(s===0||ta.includes(a[s-1]))&&(o===a.length||ta.includes(a[o]))?a=(s===0?"":a.substring(0,s))+a.substring(o+1):s=o}}return a===""?null:a}function ra(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function Zn(r,e){if(e){var t="",a,n;return Array.isArray(e)?(a=e[0],n=e[1]):a=e,a&&(t+=ra(a)),n&&(t+=ra(n,!0)),t=t.trim(),t===""?null:t}return String(r)}function aa(r,e,t,a,n,i){var s=r.__className;if(s!==t||s===void 0){var o=Dn(t,a,i);o==null?r.removeAttribute("class"):r.className=o,r.__className=t}else if(i&&n!==i)for(var l in i){var c=!!i[l];(n==null||c!==!!n[l])&&r.classList.toggle(l,c)}return i}function Wt(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function gt(r,e,t,a){var n=r.__style;if(n!==e){var i=Zn(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(Wt(r,t==null?void 0:t[0],a[0]),Wt(r,t==null?void 0:t[1],a[1],"important")):Wt(r,t,a));return a}const Fn=()=>performance.now(),re={tick:r=>requestAnimationFrame(r),now:()=>Fn(),tasks:new Set};function na(){const r=re.now();re.tasks.forEach(e=>{e.c(r)||(re.tasks.delete(e),e.f())}),re.tasks.size!==0&&re.tick(na)}function Bn(r){let e;return re.tasks.size===0&&re.tick(na),{promise:new Promise(t=>{re.tasks.add(e={c:r,f:t})}),abort(){re.tasks.delete(e)}}}function ia(r,e){return r===e||(r==null?void 0:r[ct])===e}function Ae(r={},e,t,a){return Bt(()=>{var n,i;return Fr(()=>{n=i,i=[],Tn(()=>{r!==t(...i)&&(e(r,...i),n&&ia(t(...n),r)&&e(null,...n))})}),()=>{xn(()=>{i&&ia(t(...i),r)&&e(null,...i)})}}),r}const Vn="5";typeof window<"u"&&((Aa=window.__svelte??(window.__svelte={})).v??(Aa.v=new Set)).add(Vn);function Un(r){return r}function Yt(r){return-.5*(Math.cos(Math.PI*r)-1)}function $n(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function qn(r){return Math.sin(r*Math.PI/2)}const Wn=128,Yn=0,Xn=1,Hn=2;class Gn{constructor(){d(this,"animationsStarted",!1);d(this,"animationsCount",0);d(this,"animationsLimit",Wn);d(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 a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const s of i.values())if(!s.executed&&(s.executed=!0,s.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let s=i.animations[t];s==null&&(s=i.animations[t]=new Map);let o={id:a,priority:t,executed:!1,function:n};s.set(a,o),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let s=i.get(t);if(s==null||s.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 he=new Gn;function sa(r){return Object.prototype.toString.call(r)==="[object Date]"}function Xt(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const a=e.map((n,i)=>Xt(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(sa(r)&&sa(e)){const i=r.getTime(),o=e.getTime()-i;return l=>new Date(i+l*o)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=Xt(r[i],e[i])}),i=>{const s={};return a.forEach(o=>{s[o]=n[o](i)}),s}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const vr=class vr{constructor(e,t={}){at(this,oe);at(this,Fe);at(this,et);at(this,Se,null);nt(this,oe,Zt(e)),nt(this,Fe,Zt(e)),nt(this,et,t)}static of(e,t){const a=new vr(e(),t);return Fr(()=>{a.set(e())}),a}set(e,t){var f;D(J(this,Fe),e);let{delay:a=0,duration:n=400,easing:i=Un,interpolate:s=Xt}={...J(this,et),...t};if(n===0)return(f=J(this,Se))==null||f.abort(),D(J(this,oe),e),Promise.resolve();const o=re.now()+a;let l,c=!1,p=J(this,Se);return nt(this,Se,Bn(m=>{if(m<o)return!0;if(!c){c=!0;const M=J(this,oe).v;l=s(M,e),typeof n=="function"&&(n=n(M,e)),p==null||p.abort()}const _=m-o;return _>n?(D(J(this,oe),e),!1):(D(J(this,oe),l(i(_/n))),!0)})),J(this,Se).promise}get current(){return R(J(this,oe))}get target(){return R(J(this,Fe))}set target(e){this.set(e)}};oe=new WeakMap,Fe=new WeakMap,et=new WeakMap,Se=new WeakMap;let Ht=vr;class _t{constructor(e,t){d(this,"value");d(this,"motion");this.value=e,this.motion=new Ht(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 Jn=Kr('<div><div class="body svelte-1nfn9j8"></div></div>');function Qn(r,e){Pt(e,!0);let t,a;function n(){return a}let i=X(!1);function s(T){D(i,T,!0)}function o(){return R(i)}let l=new _t(0,{easing:Yt});ie(()=>{c(l.motion.current)}),ie(()=>{R(i)==!1&&(l.snap(),he.clear(e.priority,e.id))});function c(T){t&&he.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=T.toString(),t.style.filter=`brightness(${.25+.75*T})`,a.style.opacity=T.toString()})}function p(T){T!=l.value&&l.set(T,{duration:75})}function f(){return l.motion.current==0}function m(){return l.value}var _=Jn();let M,Z;var j=Ft(_);let le;return Ae(j,T=>a=T,()=>a),Ae(_,T=>t=T,()=>t),Br(T=>{M=aa(_,1,"pin svelte-1nfn9j8",null,M,T),Z=gt(_,"",Z,{width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),le=gt(j,"",le,{width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})},[()=>({displayed:R(i)})]),ea(r,_),It({getBody:n,setDisplayed:s,getDisplayed:o,setScale:p,getCollapsed:f,getScale:m})}var vt;(r=>{function e(t,a,n){const i=t/2,s=a/2,o=Math.sqrt(i*i+s*s),l=Math.atan(s/i)*(180/Math.PI),c=n*(Math.PI/180);return n<180?n<90?n<l?{offsetX:0,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:0}:n<180-l?{offsetX:o*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:o*Math.sin(c)-s}:n<270?n<180+l?{offsetX:-t,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:-a}:n<360-l?{offsetX:o*Math.cos(c)-i,offsetY:-a}:{offsetX:0,offsetY:o*Math.sin(c)-s}}r.getOffsets=e})(vt||(vt={}));var Kn=Kr('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function oa(r,e){Pt(e,!0);let t,a,n,i;const s=e.width+2*e.margin,o=e.height+2*e.margin,l=()=>i;ie(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=X(!0);function p(C){D(c,C,!0)}function f(){return R(c)}let m=X(!0);function _(C){D(m,C,!0)}function M(){return j.motion.current==0}function Z(){return j.motion.current==1}let j=new _t(0);ie(()=>{le(j.motion.current)}),ie(()=>{R(c)==!1&&(j.snap(),he.clear(e.priority,e.id+"_scale"))}),ie(()=>{R(m)==!0&&j.value!=0&&(he.stacked()?j.set(0,{duration:0}):j.set(0,{duration:150,easing:$n})),R(m)==!1&&j.value!=1&&j.set(1,{duration:150,easing:qn})});function le(C){!t||!a||!n||he.equeue(R(m)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${C}`,a.style.scale=`${C}`,n.style.scale=`${C}`})}let T=NaN,K=X(!1),xe=new _t(-s/2,{easing:Yt}),Tt=new _t(-o/2,{easing:Yt});ie(()=>{Na(xe.motion.current,Tt.motion.current)}),ie(()=>{R(c)==!1&&(xe.snap(),xe.snap(),he.clear(e.priority,e.id+"_angle"))}),ie(()=>{R(m)==!0&&R(K)&&(xe.update({duration:75}),xe.update({duration:75}))});function Na(C,ce){if(!t||!a||!n)return;const Nt=C+s/2,tt=ce+o/2,Ue=o<s?Nt*o/s:Nt,wr=o>s?tt*s/o:tt,Fi=Math.atan2(wr,Ue)/Math.PI*180-45,Ia=0,Bi=30,br=Math.sqrt(Ue*Ue+wr*wr),rt=Math.min(s,o)/2,Vi=rt*Math.SQRT2,Ui=(br-rt)/(Vi-rt),Da=Ia+Ui*(Bi-Ia),$i=br<rt?br/rt:1;he.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(C)}px, ${Math.round(ce)}px)`,n.style.transform=`scale(${$i}) rotate(${Fi}deg) skew(${Da}deg, ${Da}deg)`})}function Zi(C){if(R(K)==!1){let ce=vt.getOffsets(s,o,C);xe.set(Math.round(ce.offsetX),{duration:0}),Tt.set(Math.round(ce.offsetY),{duration:0}),Na(xe.value,Tt.value),T=C,D(K,!0)}else if(C!=T){let ce=Math.abs(C-T),Nt=ce<180?ce:360-ce,tt=Math.log(Nt)*75,Ue=vt.getOffsets(s,o,C);xe.set(Math.round(Ue.offsetX),{duration:tt}),Tt.set(Math.round(Ue.offsetY),{duration:tt}),T=C}}var At=Kn();let La;var Ra=Ft(At);Ae(Ra,C=>n=C,()=>n);var xr=ln(Ra,2);let Oa;var ja=Ft(xr);let Pa;return Ae(ja,C=>i=C,()=>i),Ae(xr,C=>a=C,()=>a),Ae(At,C=>t=C,()=>t),Br(C=>{La=aa(At,1,"anchor svelte-j5igi2",null,La,C),Oa=gt(xr,"",Oa,{padding:e.margin+"px"}),Pa=gt(ja,"",Pa,{width:`${e.width}px`,height:`${e.height}px`,"border-radius":e.radius+"px"})},[()=>({displayed:R(c)})]),ea(r,At),It({getBody:l,setDisplayed:p,getDisplayed:f,setCollapsed:_,getCollapsed:M,getExpanded:Z,setAngle:Zi})}var Ne;(r=>{function e(o,l,c){return{x:a(l)*c,y:n(o)*c}}r.project=e;function t(o,l,c){return{lat:s(l/c),lng:i(o/c)}}r.unproject=t;function a(o){return(180+o)/360}function n(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function i(o){return o*360-180}function s(o){return 360/Math.PI*Math.atan(Math.exp((180-o*360)*Math.PI/180))-90}})(Ne||(Ne={}));class la{constructor(e,t,a,n,i){d(this,"swLat");d(this,"swLng");d(this,"neLat");d(this,"neLng");d(this,"contains",(e,t)=>this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1);const s=a*Math.pow(2,t),o=Ne.project(e.sw.lat,e.sw.lng,s),l=Ne.project(e.ne.lat,e.ne.lng,s),c=o.x-n,p=o.y+i,f=l.x+n,m=l.y-i,_=Ne.unproject(c,p,s),M=Ne.unproject(f,m,s);this.swLat=_.lat,this.swLng=_.lng,this.neLat=M.lat,this.neLng=M.lng}}var z;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const s of n)i[s]=s;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),s={};for(const o of i)s[o]=n[o];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},r.find=(n,i)=>{for(const s of n)if(i(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(z||(z={}));var ca;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(ca||(ca={}));const y=z.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),me=r=>{switch(typeof r){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(r)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(r)?y.array:r===null?y.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?y.promise:typeof Map<"u"&&r instanceof Map?y.map:typeof Set<"u"&&r instanceof Set?y.set:typeof Date<"u"&&r instanceof Date?y.date:y.object;default:return y.unknown}},u=z.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 G extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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},a={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),a}static assert(e){if(!(e instanceof G))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,z.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}G.create=r=>new G(r);const Ye=(r,e)=>{let t;switch(r.code){case u.invalid_type:r.received===y.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case u.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,z.jsonStringifyReplacer)}`;break;case u.unrecognized_keys:t=`Unrecognized key(s) in object: ${z.joinValues(r.keys,", ")}`;break;case u.invalid_union:t="Invalid input";break;case u.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${z.joinValues(r.options)}`;break;case u.invalid_enum_value:t=`Invalid enum value. Expected ${z.joinValues(r.options)}, received '${r.received}'`;break;case u.invalid_arguments:t="Invalid function arguments";break;case u.invalid_return_type:t="Invalid function return type";break;case u.invalid_date:t="Invalid date";break;case u.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:z.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case u.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case u.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case u.custom:t="Invalid input";break;case u.invalid_intersection_types:t="Intersection results could not be merged";break;case u.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case u.not_finite:t="Number must be finite";break;default:t=e.defaultError,z.assertNever(r)}return{message:t}};let ei=Ye;function Gt(){return ei}const Jt=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=a.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function h(r,e){const t=Gt(),a=Jt({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Ye?void 0:Ye].filter(n=>!!n)});r.common.issues.push(a)}class q{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,s=await n.value;a.push({key:i,value:s})}return q.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return v;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[i.value]=s.value)}return{status:e.value,value:a}}}const v=Object.freeze({status:"aborted"}),Xe=r=>({status:"dirty",value:r}),B=r=>({status:"valid",value:r}),ua=r=>r.status==="aborted",da=r=>r.status==="dirty",Le=r=>r.status==="valid",xt=r=>typeof Promise<"u"&&r instanceof Promise;var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));class ye{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}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=(r,e)=>{if(Le(e))return{success:!0,data:e.value};if(!r.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 G(r.common.issues);return this._error=t,this._error}}};function w(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,o)=>{const{message:l}=r;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??a??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}class S{get description(){return this._def.description}_getType(e){return me(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new q,ctx:{common:e.parent.common,data:e.data,parsedType:me(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(xt(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={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:me(e)},n=this._parseSync({data:e,path:a.path,parent:a});return pa(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:me(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Le(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Le(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:me(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(xt(n)?n:Promise.resolve(n));return pa(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const s=e(n),o=()=>i.addIssue({code:u.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new Ie({schema:this,typeName:x.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 ve.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ae.create(this)}promise(){return Qe.create(this,this._def)}or(e){return bt.create([this,e],this._def)}and(e){return kt.create(this,e,this._def)}transform(e){return new Ie({...w(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ar({...w(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new ki({typeName:x.ZodBranded,type:this,...w(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new nr({...w(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ir.create(this,e)}readonly(){return sr.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ti=/^c[^\s-]{8,}$/i,ri=/^[0-9a-z]+$/,ai=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ni=/^[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,ii=/^[a-z0-9_-]{21}$/i,si=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oi=/^[-+]?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)?)??$/,li=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ci="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qt;const ui=/^(?:(?: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])$/,di=/^(?:(?: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])$/,pi=/^(([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]))$/,fi=/^(([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])$/,hi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mi=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fa="((\\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])))",yi=new RegExp(`^${fa}$`);function ha(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function gi(r){return new RegExp(`^${ha(r)}$`)}function _i(r){let e=`${fa}T${ha(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function vi(r,e){return!!((e==="v4"||!e)&&ui.test(r)||(e==="v6"||!e)&&pi.test(r))}function xi(r,e){if(!si.test(r))return!1;try{const[t]=r.split("."),a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function wi(r,e){return!!((e==="v4"||!e)&&di.test(r)||(e==="v6"||!e)&&fi.test(r))}class ge extends S{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:y.string,received:i.parsedType}),v}const a=new q;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(n=this._getOrReturnCtx(e,n),s?h(n,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&h(n,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")li.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"email",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Qt||(Qt=new RegExp(ci,"u")),Qt.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"emoji",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")ni.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"uuid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")ii.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"nanoid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")ti.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cuid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")ri.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cuid2",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")ai.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"ulid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),h(n,{validation:"url",code:u.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"regex",code:u.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.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)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?_i(i).test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?yi.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?gi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{code:u.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?oi.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"duration",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?vi(e.data,i.version)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"ip",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?xi(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"jwt",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?wi(e.data,i.version)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"cidr",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?hi.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"base64",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?mi.test(e.data)||(n=this._getOrReturnCtx(e,n),h(n,{validation:"base64url",code:u.invalid_string,message:i.message}),a.dirty()):z.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:u.invalid_string,...g.errToObj(a)})}_addCheck(e){return new ge({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.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,...g.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,...g.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...g.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new ge({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ge({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ge({...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}}ge.create=r=>new ge({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});function bi(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return i%s/10**n}class Re extends S{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)!==y.number){const i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:y.number,received:i.parsedType}),v}let a;const n=new q;for(const i of this._def.checks)i.kind==="int"?z.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:u.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?bi(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),h(a,{code:u.not_finite,message:i.message}),n.dirty()):z.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new Re({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new Re({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.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"&&z.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Re.create=r=>new Re({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class He extends S{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)!==y.bigint)return this._getInvalidInput(e);let a;const n=new q;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),h(a,{code:u.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):z.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:y.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new He({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new He({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.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}}He.create=r=>new He({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});class Kt extends S{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.boolean,received:a.parsedType}),v}return B(e.data)}}Kt.create=r=>new Kt({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class wt extends S{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_type,expected:y.date,received:i.parsedType}),v}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return h(i,{code:u.invalid_date}),v}const a=new q;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:u.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),h(n,{code:u.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):z.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new wt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.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}}wt.create=r=>new wt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...w(r)});class ma extends S{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.symbol,received:a.parsedType}),v}return B(e.data)}}ma.create=r=>new ma({typeName:x.ZodSymbol,...w(r)});class ya extends S{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.undefined,received:a.parsedType}),v}return B(e.data)}}ya.create=r=>new ya({typeName:x.ZodUndefined,...w(r)});class ga extends S{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.null,received:a.parsedType}),v}return B(e.data)}}ga.create=r=>new ga({typeName:x.ZodNull,...w(r)});class er extends S{constructor(){super(...arguments),this._any=!0}_parse(e){return B(e.data)}}er.create=r=>new er({typeName:x.ZodAny,...w(r)});class Oe extends S{constructor(){super(...arguments),this._unknown=!0}_parse(e){return B(e.data)}}Oe.create=r=>new Oe({typeName:x.ZodUnknown,...w(r)});class _e extends S{_parse(e){const t=this._getOrReturnCtx(e);return h(t,{code:u.invalid_type,expected:y.never,received:t.parsedType}),v}}_e.create=r=>new _e({typeName:x.ZodNever,...w(r)});class tr extends S{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.void,received:a.parsedType}),v}return B(e.data)}}tr.create=r=>new tr({typeName:x.ZodVoid,...w(r)});class ae extends S{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return h(t,{code:u.invalid_type,expected:y.array,received:t.parsedType}),v;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(s||o)&&(h(t,{code:s?u.too_big:u.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(h(t,{code:u.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(h(t,{code:u.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new ye(t,s,t.path,o)))).then(s=>q.mergeArray(a,s));const i=[...t.data].map((s,o)=>n.type._parseSync(new ye(t,s,t.path,o)));return q.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new ae({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new ae({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new ae({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}}ae.create=(r,e)=>new ae({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...w(e)});function je(r){if(r instanceof O){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=ve.create(je(a))}return new O({...r._def,shape:()=>e})}else return r instanceof ae?new ae({...r._def,type:je(r.element)}):r instanceof ve?ve.create(je(r.unwrap())):r instanceof De?De.create(je(r.unwrap())):r instanceof se?se.create(r.items.map(e=>je(e))):r}class O extends S{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=z.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const c=this._getOrReturnCtx(e);return h(c,{code:u.invalid_type,expected:y.object,received:c.parsedType}),v}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof _e&&this._def.unknownKeys==="strip"))for(const c in n.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const p=i[c],f=n.data[c];l.push({key:{status:"valid",value:c},value:p._parse(new ye(n,f,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof _e){const c=this._def.unknownKeys;if(c==="passthrough")for(const p of o)l.push({key:{status:"valid",value:p},value:{status:"valid",value:n.data[p]}});else if(c==="strict")o.length>0&&(h(n,{code:u.unrecognized_keys,keys:o}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const p of o){const f=n.data[p];l.push({key:{status:"valid",value:p},value:c._parse(new ye(n,f,n.path,p)),alwaysSet:p in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const p of l){const f=await p.key,m=await p.value;c.push({key:f,value:m,alwaysSet:p.alwaysSet})}return c}).then(c=>q.mergeObjectSync(a,c)):q.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new O({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,s;const n=((s=(i=this._def).errorMap)==null?void 0:s.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:g.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new O({...this._def,unknownKeys:"strip"})}passthrough(){return new O({...this._def,unknownKeys:"passthrough"})}extend(e){return new O({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new O({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new O({...this._def,catchall:e})}pick(e){const t={};for(const a of z.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new O({...this._def,shape:()=>t})}omit(e){const t={};for(const a of z.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new O({...this._def,shape:()=>t})}deepPartial(){return je(this)}partial(e){const t={};for(const a of z.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new O({...this._def,shape:()=>t})}required(e){const t={};for(const a of z.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof ve;)i=i._def.innerType;t[a]=i}return new O({...this._def,shape:()=>t})}keyof(){return wa(z.objectKeys(this.shape))}}O.create=(r,e)=>new O({shape:()=>r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),O.strictCreate=(r,e)=>new O({shape:()=>r,unknownKeys:"strict",catchall:_e.create(),typeName:x.ZodObject,...w(e)}),O.lazycreate=(r,e)=>new O({shape:r,unknownKeys:"strip",catchall:_e.create(),typeName:x.ZodObject,...w(e)});class bt extends S{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new G(o.ctx.common.issues));return h(t,{code:u.invalid_union,unionErrors:s}),v}if(t.common.async)return Promise.all(a.map(async i=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let i;const s=[];for(const l of a){const c={...t,common:{...t.common,issues:[]},parent:null},p=l._parseSync({data:t.data,path:t.path,parent:c});if(p.status==="valid")return p;p.status==="dirty"&&!i&&(i={result:p,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(l=>new G(l));return h(t,{code:u.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}bt.create=(r,e)=>new bt({options:r,typeName:x.ZodUnion,...w(e)});function rr(r,e){const t=me(r),a=me(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=z.objectKeys(e),i=z.objectKeys(r).filter(o=>n.indexOf(o)!==-1),s={...r,...e};for(const o of i){const l=rr(r[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===y.array&&a===y.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const s=r[i],o=e[i],l=rr(s,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===y.date&&a===y.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class kt extends S{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,s)=>{if(ua(i)||ua(s))return v;const o=rr(i.value,s.value);return o.valid?((da(i)||da(s))&&t.dirty(),{status:t.value,value:o.data}):(h(a,{code:u.invalid_intersection_types}),v)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}kt.create=(r,e,t)=>new kt({left:r,right:e,typeName:x.ZodIntersection,...w(t)});class se extends S{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return h(a,{code:u.invalid_type,expected:y.array,received:a.parsedType}),v;if(a.data.length<this._def.items.length)return h(a,{code:u.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&a.data.length>this._def.items.length&&(h(a,{code:u.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ye(a,s,a.path,o)):null}).filter(s=>!!s);return a.common.async?Promise.all(i).then(s=>q.mergeArray(t,s)):q.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new se({...this._def,rest:e})}}se.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new se({items:r,typeName:x.ZodTuple,rest:null,...w(e)})};class _a extends S{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.map)return h(a,{code:u.invalid_type,expected:y.map,received:a.parsedType}),v;const n=this._def.keyType,i=this._def.valueType,s=[...a.data.entries()].map(([o,l],c)=>({key:n._parse(new ye(a,o,a.path,[c,"key"])),value:i._parse(new ye(a,l,a.path,[c,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,p=await l.value;if(c.status==="aborted"||p.status==="aborted")return v;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,p=l.value;if(c.status==="aborted"||p.status==="aborted")return v;(c.status==="dirty"||p.status==="dirty")&&t.dirty(),o.set(c.value,p.value)}return{status:t.value,value:o}}}}_a.create=(r,e,t)=>new _a({valueType:e,keyType:r,typeName:x.ZodMap,...w(t)});class Ge extends S{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return h(a,{code:u.invalid_type,expected:y.set,received:a.parsedType}),v;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(h(a,{code:u.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(h(a,{code:u.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const p of l){if(p.status==="aborted")return v;p.status==="dirty"&&t.dirty(),c.add(p.value)}return{status:t.value,value:c}}const o=[...a.data.values()].map((l,c)=>i._parse(new ye(a,l,a.path,c)));return a.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new Ge({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new Ge({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Ge.create=(r,e)=>new Ge({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...w(e)});class Je extends S{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return h(t,{code:u.invalid_type,expected:y.function,received:t.parsedType}),v;function a(o,l){return Jt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Gt(),Ye].filter(c=>!!c),issueData:{code:u.invalid_arguments,argumentsError:l}})}function n(o,l){return Jt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Gt(),Ye].filter(c=>!!c),issueData:{code:u.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Qe){const o=this;return B(async function(...l){const c=new G([]),p=await o._def.args.parseAsync(l,i).catch(_=>{throw c.addIssue(a(l,_)),c}),f=await Reflect.apply(s,this,p);return await o._def.returns._def.type.parseAsync(f,i).catch(_=>{throw c.addIssue(n(f,_)),c})})}else{const o=this;return B(function(...l){const c=o._def.args.safeParse(l,i);if(!c.success)throw new G([a(l,c.error)]);const p=Reflect.apply(s,this,c.data),f=o._def.returns.safeParse(p,i);if(!f.success)throw new G([n(p,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Je({...this._def,args:se.create(e).rest(Oe.create())})}returns(e){return new Je({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Je({args:e||se.create([]).rest(Oe.create()),returns:t||Oe.create(),typeName:x.ZodFunction,...w(a)})}}class va extends S{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})}}va.create=(r,e)=>new va({getter:r,typeName:x.ZodLazy,...w(e)});class xa extends S{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return h(t,{received:t.data,code:u.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}xa.create=(r,e)=>new xa({value:r,typeName:x.ZodLiteral,...w(e)});function wa(r,e){return new Pe({values:r,typeName:x.ZodEnum,...w(e)})}class Pe extends S{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{expected:z.joinValues(a),received:t.parsedType,code:u.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return h(t,{received:t.data,code:u.invalid_enum_value,options:a}),v}return B(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 Pe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Pe.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Pe.create=wa;class ba extends S{_parse(e){const t=z.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=z.objectValues(t);return h(a,{expected:z.joinValues(n),received:a.parsedType,code:u.invalid_type}),v}if(this._cache||(this._cache=new Set(z.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=z.objectValues(t);return h(a,{received:a.data,code:u.invalid_enum_value,options:n}),v}return B(e.data)}get enum(){return this._def.values}}ba.create=(r,e)=>new ba({values:r,typeName:x.ZodNativeEnum,...w(e)});class Qe extends S{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return h(t,{code:u.invalid_type,expected:y.promise,received:t.parsedType}),v;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return B(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Qe.create=(r,e)=>new Qe({type:r,typeName:x.ZodPromise,...w(e)});class Ie extends S{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:s=>{h(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const s=n.transform(a.data,i);if(a.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return l.status==="aborted"?v:l.status==="dirty"||t.value==="dirty"?Xe(l.value):l});{if(t.value==="aborted")return v;const o=this._def.schema._parseSync({data:s,path:a.path,parent:a});return o.status==="aborted"?v:o.status==="dirty"||t.value==="dirty"?Xe(o.value):o}}if(n.type==="refinement"){const s=o=>{const l=n.refinement(o,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Le(s))return v;const o=n.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>Le(s)?Promise.resolve(n.transform(s.value,i)).then(o=>({status:t.value,value:o})):v);z.assertNever(n)}}Ie.create=(r,e,t)=>new Ie({schema:r,typeName:x.ZodEffects,effect:e,...w(t)}),Ie.createWithPreprocess=(r,e,t)=>new Ie({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...w(t)});class ve extends S{_parse(e){return this._getType(e)===y.undefined?B(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ve.create=(r,e)=>new ve({innerType:r,typeName:x.ZodOptional,...w(e)});class De extends S{_parse(e){return this._getType(e)===y.null?B(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}De.create=(r,e)=>new De({innerType:r,typeName:x.ZodNullable,...w(e)});class ar extends S{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ar.create=(r,e)=>new ar({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...w(e)});class nr extends S{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return xt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new G(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new G(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}nr.create=(r,e)=>new nr({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...w(e)});class ka extends S{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return h(a,{code:u.invalid_type,expected:y.nan,received:a.parsedType}),v}return{status:"valid",value:e.data}}}ka.create=r=>new ka({typeName:x.ZodNaN,...w(r)});class ki extends S{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class ir extends S{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),Xe(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new ir({in:e,out:t,typeName:x.ZodPipeline})}}class sr extends S{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Le(n)&&(n.value=Object.freeze(n.value)),n);return xt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}sr.create=(r,e)=>new sr({innerType:r,typeName:x.ZodReadonly,...w(e)});var x;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(x||(x={}));const Ze=ge.create,b=Re.create,Sa=Kt.create,za=er.create;Oe.create,_e.create;const St=tr.create,or=ae.create,L=O.create;bt.create,kt.create;const Ma=se.create,ne=Je.create;Pe.create;const Si=Qe.create;ve.create,De.create,L({pin:L({fade:Sa().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:L({queue:L({limit:b().optional()}).optional()}).optional(),states:L({api:Ze().optional()}).optional(),log:L({api:Ze().optional()}).optional()});const lr=b().min(-90).max(90),cr=b().min(-180).max(180),zi=L({sw:L({lat:lr,lng:cr}),ne:L({lat:lr,lng:cr})}),ur=za().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),Ea=L({mapSize:b(),zoomMin:b(),zoomMax:b(),zoomScale:b()}),Mi=L({instance:za(),inserted:ne().returns(Sa()),insert:ne().returns(St()),remove:ne().returns(St()),update:ne().args(b()).returns(St())}),Ei=L({parameters:Ea,getContainer:ne().args().returns(ur),getZoom:ne().args().returns(b()),getBounds:ne().args().returns(zi),panBy:ne().args(b(),b()).returns(St()),createMarker:ne().args(ur,lr,cr,b()).returns(Mi)}),dr=ne().args(Ze()).returns(Si(ur)),Ci=L({id:Ze().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:L({style:L({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:dr}),pin:L({style:L({width:b(),height:b(),radius:b()}),body:dr}).optional(),popup:L({style:L({width:b(),height:b(),radius:b(),margin:b()}),body:dr}).optional()}),Ti=or(Ci);Ma([b(),or(Ma([b(),b()]))]);const Ai=L({id:Ze(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});L({key:Ze(),parameters:Ea,input:or(Ai)});var Ke;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(Ke||(Ke={}));const Ca="https://arenarium.dev/api/public/v1/tooltip/states",Ni="https://arenarium.dev/api/public/v1/log";class Li{constructor(e,t,a){d(this,"key");d(this,"provider");d(this,"apiStatesUrl",Ca);d(this,"apiLogUrl",Ni);d(this,"markerDataArray",new Array);d(this,"markerDataMap",new Map);d(this,"markerDataUpdating",!1);d(this,"markerPinProcessor");d(this,"markerTooltipProcessor");d(this,"markerPopupProcessor");Ei.parse(t),this.key=e,this.provider=t,this.markerPinProcessor=new hr(t),this.markerTooltipProcessor=new Ri(t),this.markerPopupProcessor=new Oi(t),this.configuration=a}set configuration(e){var t,a,n;this.apiStatesUrl=((t=e==null?void 0:e.states)==null?void 0:t.api)??Ca,this.markerPinProcessor.setConfiguration(e),he.setLimit(((n=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:n.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await Ti.parseAsync(e);try{const t={key:this.key,parameters:this.provider.parameters,input:e.map(i=>({id:i.id,rank:i.rank,lat:i.lat,lng:i.lng,width:i.tooltip.style.width,height:i.tooltip.style.height,margin:i.tooltip.style.margin}))},a=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok||!a.body)throw new Error("Failed to get marker states");const n=await a.json();this.updateMarkerData(e,n),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.log("[Error] Failed to update markers",{message:t.message,stack:t.stack}),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),this.log("[Error] Failed to remove markers",{message:e.message,stack:e.stack}),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),this.log("[Error] Failed to show popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw 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),this.log("[Error] Failed to hide popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const a=new Map(e.map((i,s)=>[i.id,new Ta(this.provider,i,t[s])])),n=Array.from(this.markerDataArray);for(const i of n)a.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 s=e[i],o=t[i],l=this.markerDataMap.get(s.id);if(l)l.update(o);else{const c=new Ta(this.provider,s,o);c.create(),this.markerDataMap.set(s.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(a){throw console.error(a),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),a}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}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),this.log("[Error] Failed to process markers",{message:e.message,stack:e.stack})}}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){try{const a={title:e,content:t};await fetch(this.apiLogUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.error(a)}}}class Ta{constructor(e,t,a){d(this,"marker");d(this,"zoom");d(this,"pin");d(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new fr(e,t,a),this.tooltip=new mr(e,t,a)}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 pr{constructor(e,t){d(this,"provider");d(this,"id");d(this,"lat");d(this,"lng");d(this,"shown");d(this,"element");d(this,"component");d(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,a=this.component;if(t==null||a==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 Be=class Be extends pr{constructor(t,a,n){var i,s,o,l;super(t,a);d(this,"width");d(this,"height");d(this,"radius");d(this,"zoom");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");this.width=((i=a.pin)==null?void 0:i.style.width)??Be.DEFAULT_SIZE,this.height=((s=a.pin)==null?void 0:s.style.height)??Be.DEFAULT_SIZE,this.radius=((o=a.pin)==null?void 0:o.style.radius)??Be.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=qt(Qn,{target:this.element,props:{id:this.id+"_pin",layer:Hn,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 a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),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}};d(Be,"DEFAULT_SIZE",16);let fr=Be;const Ve=class Ve{constructor(e){d(this,"provider");d(this,"pinElements",new Array);d(this,"pinMaxWidth",0);d(this,"pinMaxHeight",0);d(this,"pinFade",!1);d(this,"pinMaxCount",0);d(this,"pinMaxZoomDelta",0);this.provider=e}setConfiguration(e){var t,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max(Ve.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??Ve.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new la(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const s of this.pinElements)n.contains(s.lat,s.lng)?s.shown&&t<=s.zoom&&s.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?s.updateState(t):s.setCollapsed(!1),s.updateMap(!0),s.isBodyLoaded()==!1&&s.updateBody()),i++):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}};d(Ve,"MAP_PINS_MAX_ZOOM",2),d(Ve,"MAP_PINS_MAX_COUNT",128);let hr=Ve;const zt=class zt extends pr{constructor(t,a,n){super(t,a);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"zoom");d(this,"angle");d(this,"states");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");this.width=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=Ke.DEFAULT,this.states=n[1].map(i=>[i[0],Ke.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=qt(oa,{target:this.element,props:{id:this.id+"_tooltip",layer:Xn,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(a=>[a[0],Ke.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.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 a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),this.bodyLoading=!1,this.bodyLoaded=!0}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+zt.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}};d(zt,"Z_INDEX_OFFSET",1e6);let mr=zt;class Ri{constructor(e){d(this,"provider");d(this,"tooltipElements",new Array);d(this,"tooltipMaxWidth",0);d(this,"tooltipMaxHeight",0);this.provider=e}updateElements(e){this.tooltipElements=e,this.tooltipMaxWidth=this.tooltipElements.reduce((t,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new la(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.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 Mt=class Mt extends pr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);d(this,"width");d(this,"height");d(this,"margin");d(this,"radius");d(this,"bodyLoading",!1);d(this,"bodyLoaded",!1);d(this,"bodyCallback");this.shown=!1,this.width=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=qt(oa,{target:this.element,props:{id:this.id+"_popup",layer:Yn,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),this.bodyLoading=!1,this.bodyLoaded=!0}))}getZindex(){return Mt.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}};d(Mt,"Z_INDEX_OFFSET",2e6);let yr=Mt;class Oi{constructor(e){d(this,"provider");d(this,"popupElements",new Map);this.provider=e}show(e){e.pin.shown=!1,e.tooltip.shown=!1;const t=new yr(this.provider,e.marker);this.popupElements.set(e.marker.id,t),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()}process(){var e;for(const t of this.popupElements.values())if(t.shown){if(t.setCollapsed(!1),t.updateMap(!0),t.isExpanded()&&t.isBodyLoaded()==!1&&t.updateBody(),t.isCollapsed()==!1&&t.isExpanded()==!1){const a=(e=t.component)==null?void 0:e.getBody();if(a==null)continue;const n=a.getBoundingClientRect(),i=this.provider.getContainer().getBoundingClientRect(),s=n.left-i.left,o=i.right-n.right,l=n.top-i.top,c=i.bottom-n.bottom,p=Math.min(t.width,t.height)/4,f=s<0?s-p:o<0?-o+p:0,m=l<0?l-p:c<0?-c+p:0;this.provider.panBy(f,m)}}else t.setCollapsed(!0),t.isCollapsed()&&(t.updateMap(!1),t.remove(),this.popupElements.delete(t.id))}}const Et=class Et{constructor(e,t,a){d(this,"parameters",Et.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:{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(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}};d(Et,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let gr=Et;const ji={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}}]},Pi={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}}]},Ct=class Ct{constructor(e,t,a,n){d(this,"parameters",Ct.Parameters);d(this,"MapClass");d(this,"MapMarkerClass");d(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(a,{...n})}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(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:s=>i.zIndex=s}}};d(Ct,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let _r=Ct;const Ii=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Di=[{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}]}];k.GoogleMapDarkStyle=Di,k.GoogleMapLightStyle=Ii,k.GoogleMapsProvider=_r,k.MapLibreDarkStyle=ji,k.MapLibreLightStyle=Pi,k.MapLibreProvider=gr,k.MapManager=Li,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(S,A){typeof exports=="object"&&typeof module<"u"?A(exports):typeof define=="function"&&define.amd?define(["exports"],A):(S=typeof globalThis<"u"?globalThis:S||self,A(S.arenarium={}))})(this,function(S){"use strict";var Wi=Object.defineProperty;var Za=S=>{throw TypeError(S)};var Yi=(S,A,I)=>A in S?Wi(S,A,{enumerable:!0,configurable:!0,writable:!0,value:I}):S[A]=I;var p=(S,A,I)=>Yi(S,typeof A!="symbol"?A+"":A,I),Fa=(S,A,I)=>A.has(S)||Za("Cannot "+I);var K=(S,A,I)=>(Fa(S,A,"read from private field"),I?I.call(S):A.get(S)),nt=(S,A,I)=>A.has(S)?Za("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(S):A.set(S,I),it=(S,A,I,st)=>(Fa(S,A,"write to private field"),st?st.call(S,I):A.set(S,I),I);var La,ce,Fe,tt,Se;var I=Array.isArray,st=Array.prototype.indexOf,Ba=Array.from,Va=Object.defineProperty,$e=Object.getOwnPropertyDescriptor,Ua=Object.prototype,$a=Array.prototype,qa=Object.getPrototypeOf,Sr=Object.isExtensible;function Wa(r){for(var e=0;e<r.length;e++)r[e]()}const ee=2,zr=4,ot=8,Lt=16,de=32,ze=64,Ot=128,V=256,lt=512,Y=1024,pe=2048,we=4096,ct=8192,Rt=16384,Mr=32768,Ya=65536,Er=1<<18,Xa=1<<19,Cr=1<<20,jt=1<<21,ut=Symbol("$state");function Tr(r){return r===this.v}function Ha(r){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ga(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Ja(r){throw new Error("https://svelte.dev/e/effect_orphan")}function Qa(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Ka(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function en(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function tn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let Xi=!1;const U=Symbol();let X=null;function Ar(r){X=r}function Pt(r,e=!1,t){var a=X={p:X,c:null,d:!1,e:null,m:!1,s:r,x:null,l:null};dn(()=>{a.d=!0})}function It(r){const e=X;if(e!==null){r!==void 0&&(e.x=r);const s=e.e;if(s!==null){var t=N,a=C;e.e=null;try{for(var n=0;n<s.length;n++){var i=s[n];Ce(i.effect),fe(i.reaction),Bt(i.fn)}}finally{Ce(t),fe(a)}}X=e.p,e.m=!0}return r||{}}function Nr(){return!0}function qe(r){if(typeof r!="object"||r===null||ut in r)return r;const e=qa(r);if(e!==Ua&&e!==$a)return r;var t=new Map,a=I(r),n=H(0),i=C,s=o=>{var l=C;fe(i);var c=o();return fe(l),c};return a&&t.set("length",H(r.length)),new Proxy(r,{defineProperty(o,l,c){(!("value"in c)||c.configurable===!1||c.enumerable===!1||c.writable===!1)&&Ka();var d=t.get(l);return d===void 0?d=s(()=>{var f=H(c.value);return t.set(l,f),f}):Z(d,c.value,!0),!0},deleteProperty(o,l){var c=t.get(l);if(c===void 0){if(l in o){const h=s(()=>H(U));t.set(l,h),Dt(n)}}else{if(a&&typeof l=="string"){var d=t.get("length"),f=Number(l);Number.isInteger(f)&&f<d.v&&Z(d,f)}Z(c,U),Dt(n)}return!0},get(o,l,c){var _;if(l===ut)return r;var d=t.get(l),f=l in o;if(d===void 0&&(!f||(_=$e(o,l))!=null&&_.writable)&&(d=s(()=>{var k=qe(f?o[l]:U),L=H(k);return L}),t.set(l,d)),d!==void 0){var h=j(d);return h===U?void 0:h}return Reflect.get(o,l,c)},getOwnPropertyDescriptor(o,l){var c=Reflect.getOwnPropertyDescriptor(o,l);if(c&&"value"in c){var d=t.get(l);d&&(c.value=j(d))}else if(c===void 0){var f=t.get(l),h=f==null?void 0:f.v;if(f!==void 0&&h!==U)return{enumerable:!0,configurable:!0,value:h,writable:!0}}return c},has(o,l){var h;if(l===ut)return!0;var c=t.get(l),d=c!==void 0&&c.v!==U||Reflect.has(o,l);if(c!==void 0||N!==null&&(!d||(h=$e(o,l))!=null&&h.writable)){c===void 0&&(c=s(()=>{var _=d?qe(o[l]):U,k=H(_);return k}),t.set(l,c));var f=j(c);if(f===U)return!1}return d},set(o,l,c,d){var W;var f=t.get(l),h=l in o;if(a&&l==="length")for(var _=c;_<f.v;_+=1){var k=t.get(_+"");k!==void 0?Z(k,U):_ in o&&(k=s(()=>H(U)),t.set(_+"",k))}if(f===void 0)(!h||(W=$e(o,l))!=null&&W.writable)&&(f=s(()=>H(void 0)),Z(f,qe(c)),t.set(l,f));else{h=f.v!==U;var L=s(()=>qe(c));Z(f,L)}var O=Reflect.getOwnPropertyDescriptor(o,l);if(O!=null&&O.set&&O.set.call(d,c),!h){if(a&&typeof l=="string"){var Q=t.get("length"),E=Number(l);Number.isInteger(E)&&E>=Q.v&&Z(Q,E+1)}Dt(n)}return!0},ownKeys(o){j(n);var l=Reflect.ownKeys(o).filter(f=>{var h=t.get(f);return h===void 0||h.v!==U});for(var[c,d]of t)d.v!==U&&!(c in o)&&l.push(c);return l},setPrototypeOf(){en()}})}function Dt(r,e=1){Z(r,r.v+e)}function rn(r){var e=ee|pe,t=C!==null&&(C.f&ee)!==0?C:null;return N===null||t!==null&&(t.f&V)!==0?e|=V:N.f|=Cr,{ctx:X,deps:null,effects:null,equals:Tr,f:e,fn:r,reactions:null,rv:0,v:null,wv:0,parent:t??N}}function Lr(r){var e=r.effects;if(e!==null){r.effects=null;for(var t=0;t<e.length;t+=1)be(e[t])}}function an(r){for(var e=r.parent;e!==null;){if((e.f&ee)===0)return e;e=e.parent}return null}function Or(r){var e,t=N;Ce(an(r));try{Lr(r),e=Kr(r)}finally{Ce(t)}return e}function Rr(r){var e=Or(r);if(r.equals(e)||(r.v=e,r.wv=Jr()),!Ee){var t=(he||(r.f&V)!==0)&&r.deps!==null?we:Y;re(r,t)}}const We=new Map;function Zt(r,e){var t={f:0,v:r,reactions:null,equals:Tr,rv:0,wv:0};return t}function H(r,e){const t=Zt(r);return bn(t),t}function Z(r,e,t=!1){C!==null&&(!te||(C.f&Er)!==0)&&Nr()&&(C.f&(ee|Lt|Er))!==0&&!(D!=null&&D[1].includes(r)&&D[0]===C)&&tn();let a=t?qe(e):e;return nn(r,a)}function nn(r,e){if(!r.equals(e)){var t=r.v;Ee?We.set(r,e):We.set(r,t),r.v=e,(r.f&ee)!==0&&((r.f&pe)!==0&&Or(r),re(r,(r.f&V)===0?Y:we)),r.wv=Jr(),jr(r,pe),N!==null&&(N.f&Y)!==0&&(N.f&(de|ze))===0&&(G===null?kn([r]):G.push(r))}return e}function jr(r,e){var t=r.reactions;if(t!==null)for(var a=t.length,n=0;n<a;n++){var i=t[n],s=i.f;(s&pe)===0&&(re(i,e),(s&(Y|V))!==0&&((s&ee)!==0?jr(i,we):$t(i)))}}var Pr,Ir,Dr,Zr;function sn(){if(Pr===void 0){Pr=window,Ir=/Firefox/.test(navigator.userAgent);var r=Element.prototype,e=Node.prototype,t=Text.prototype;Dr=$e(e,"firstChild").get,Zr=$e(e,"nextSibling").get,Sr(r)&&(r.__click=void 0,r.__className=void 0,r.__attributes=null,r.__style=void 0,r.__e=void 0),Sr(t)&&(t.__t=void 0)}}function on(r=""){return document.createTextNode(r)}function Fr(r){return Dr.call(r)}function Br(r){return Zr.call(r)}function Ft(r,e){return Fr(r)}function ln(r,e=1,t=!1){let a=r;for(;e--;)a=Br(a);return a}function cn(r){N===null&&C===null&&Ja(),C!==null&&(C.f&V)!==0&&N===null&&Ga(),Ee&&Ha()}function un(r,e){var t=e.last;t===null?e.last=e.first=r:(t.next=r,r.prev=t,e.last=r)}function Me(r,e,t,a=!0){var n=N,i={ctx:X,deps:null,nodes_start:null,nodes_end:null,f:r|pe,first:null,fn:e,last:null,next:null,parent:n,prev:null,teardown:null,transitions:null,wv:0};if(t)try{Ut(i),i.f|=Mr}catch(l){throw be(i),l}else e!==null&&$t(i);var s=t&&i.deps===null&&i.first===null&&i.nodes_start===null&&i.teardown===null&&(i.f&(Cr|Ot))===0;if(!s&&a&&(n!==null&&un(i,n),C!==null&&(C.f&ee)!==0)){var o=C;(o.effects??(o.effects=[])).push(i)}return i}function dn(r){const e=Me(ot,null,!1);return re(e,Y),e.teardown=r,e}function oe(r){cn();var e=N!==null&&(N.f&de)!==0&&X!==null&&!X.m;if(e){var t=X;(t.e??(t.e=[])).push({fn:r,effect:N,reaction:C})}else{var a=Bt(r);return a}}function pn(r){const e=Me(ze,r,!0);return(t={})=>new Promise(a=>{t.outro?gn(e,()=>{be(e),a(void 0)}):(be(e),a(void 0))})}function Bt(r){return Me(zr,r,!1)}function Vr(r){return Me(ot,r,!0)}function Ur(r,e=[],t=rn){const a=e.map(t);return fn(()=>r(...a.map(j)))}function fn(r,e=0){return Me(ot|Lt|e,r,!0)}function hn(r,e=!0){return Me(ot|de,r,!0,e)}function $r(r){var e=r.teardown;if(e!==null){const t=Ee,a=C;Hr(!0),fe(null);try{e.call(null)}finally{Hr(t),fe(a)}}}function qr(r,e=!1){var t=r.first;for(r.first=r.last=null;t!==null;){var a=t.next;(t.f&ze)!==0?t.parent=null:be(t,e),t=a}}function mn(r){for(var e=r.first;e!==null;){var t=e.next;(e.f&de)===0&&be(e),e=t}}function be(r,e=!0){var t=!1;(e||(r.f&Xa)!==0)&&r.nodes_start!==null&&r.nodes_end!==null&&(yn(r.nodes_start,r.nodes_end),t=!0),qr(r,e&&!t),yt(r,0),re(r,Rt);var a=r.transitions;if(a!==null)for(const i of a)i.stop();$r(r);var n=r.parent;n!==null&&n.first!==null&&Wr(r),r.next=r.prev=r.teardown=r.ctx=r.deps=r.fn=r.nodes_start=r.nodes_end=null}function yn(r,e){for(;r!==null;){var t=r===e?null:Br(r);r.remove(),r=t}}function Wr(r){var e=r.parent,t=r.prev,a=r.next;t!==null&&(t.next=a),a!==null&&(a.prev=t),e!==null&&(e.first===r&&(e.first=a),e.last===r&&(e.last=t))}function gn(r,e){var t=[];Yr(r,t,!0),_n(t,()=>{be(r),e&&e()})}function _n(r,e){var t=r.length;if(t>0){var a=()=>--t||e();for(var n of r)n.out(a)}else e()}function Yr(r,e,t){if((r.f&ct)===0){if(r.f^=ct,r.transitions!==null)for(const s of r.transitions)(s.is_global||t)&&e.push(s);for(var a=r.first;a!==null;){var n=a.next,i=(a.f&Ya)!==0||(a.f&de)!==0;Yr(a,e,i?t:!1),a=n}}}let dt=[];function vn(){var r=dt;dt=[],Wa(r)}function xn(r){dt.length===0&&queueMicrotask(vn),dt.push(r)}function wn(r){var e=N;if((e.f&Mr)===0){if((e.f&Ot)===0)throw r;e.fn(r)}else Xr(r,e)}function Xr(r,e){for(;e!==null;){if((e.f&Ot)!==0)try{e.fn(r);return}catch{}e=e.parent}throw r}let Vt=!1,pt=null,ke=!1,Ee=!1;function Hr(r){Ee=r}let ft=[],Hi=[],C=null,te=!1;function fe(r){C=r}let N=null;function Ce(r){N=r}let D=null;function bn(r){C!==null&&C.f&jt&&(D===null?D=[C,[r]]:D[1].push(r))}let F=null,$=0,G=null;function kn(r){G=r}let Gr=1,ht=0,he=!1;function Jr(){return++Gr}function mt(r){var f;var e=r.f;if((e&pe)!==0)return!0;if((e&we)!==0){var t=r.deps,a=(e&V)!==0;if(t!==null){var n,i,s=(e<)!==0,o=a&&N!==null&&!he,l=t.length;if(s||o){var c=r,d=c.parent;for(n=0;n<l;n++)i=t[n],(s||!((f=i==null?void 0:i.reactions)!=null&&f.includes(c)))&&(i.reactions??(i.reactions=[])).push(c);s&&(c.f^=lt),o&&d!==null&&(d.f&V)===0&&(c.f^=V)}for(n=0;n<l;n++)if(i=t[n],mt(i)&&Rr(i),i.wv>r.wv)return!0}(!a||N!==null&&!he)&&re(r,Y)}return!1}function Qr(r,e,t=!0){var a=r.reactions;if(a!==null)for(var n=0;n<a.length;n++){var i=a[n];D!=null&&D[1].includes(r)&&D[0]===C||((i.f&ee)!==0?Qr(i,e,!1):e===i&&(t?re(i,pe):(i.f&Y)!==0&&re(i,we),$t(i)))}}function Kr(r){var _;var e=F,t=$,a=G,n=C,i=he,s=D,o=X,l=te,c=r.f;F=null,$=0,G=null,he=(c&V)!==0&&(te||!ke||C===null),C=(c&(de|ze))===0?r:null,D=null,Ar(r.ctx),te=!1,ht++,r.f|=jt;try{var d=(0,r.fn)(),f=r.deps;if(F!==null){var h;if(yt(r,$),f!==null&&$>0)for(f.length=$+F.length,h=0;h<F.length;h++)f[$+h]=F[h];else r.deps=f=F;if(!he)for(h=$;h<f.length;h++)((_=f[h]).reactions??(_.reactions=[])).push(r)}else f!==null&&$<f.length&&(yt(r,$),f.length=$);if(Nr()&&G!==null&&!te&&f!==null&&(r.f&(ee|we|pe))===0)for(h=0;h<G.length;h++)Qr(G[h],r);return n!==null&&n!==r&&(ht++,G!==null&&(a===null?a=G:a.push(...G))),d}catch(k){wn(k)}finally{F=e,$=t,G=a,C=n,he=i,D=s,Ar(o),te=l,r.f^=jt}}function Sn(r,e){let t=e.reactions;if(t!==null){var a=st.call(t,r);if(a!==-1){var n=t.length-1;n===0?t=e.reactions=null:(t[a]=t[n],t.pop())}}t===null&&(e.f&ee)!==0&&(F===null||!F.includes(e))&&(re(e,we),(e.f&(V|lt))===0&&(e.f^=lt),Lr(e),yt(e,0))}function yt(r,e){var t=r.deps;if(t!==null)for(var a=e;a<t.length;a++)Sn(r,t[a])}function Ut(r){var e=r.f;if((e&Rt)===0){re(r,Y);var t=N,a=ke;N=r,ke=!0;try{(e&Lt)!==0?mn(r):qr(r),$r(r);var n=Kr(r);r.teardown=typeof n=="function"?n:null,r.wv=Gr;var i}finally{ke=a,N=t}}}function zn(){try{Qa()}catch(r){if(pt!==null)Xr(r,pt);else throw r}}function Mn(){var r=ke;try{var e=0;for(ke=!0;ft.length>0;){e++>1e3&&zn();var t=ft,a=t.length;ft=[];for(var n=0;n<a;n++){var i=Cn(t[n]);En(i)}We.clear()}}finally{Vt=!1,ke=r,pt=null}}function En(r){var e=r.length;if(e!==0)for(var t=0;t<e;t++){var a=r[t];(a.f&(Rt|ct))===0&&mt(a)&&(Ut(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null?Wr(a):a.fn=null))}}function $t(r){Vt||(Vt=!0,queueMicrotask(Mn));for(var e=pt=r;e.parent!==null;){e=e.parent;var t=e.f;if((t&(ze|de))!==0){if((t&Y)===0)return;e.f^=Y}}ft.push(e)}function Cn(r){for(var e=[],t=r;t!==null;){var a=t.f,n=(a&(de|ze))!==0,i=n&&(a&Y)!==0;if(!i&&(a&ct)===0){(a&zr)!==0?e.push(t):n?t.f^=Y:mt(t)&&Ut(t);var s=t.first;if(s!==null){t=s;continue}}var o=t.parent;for(t=t.next;t===null&&o!==null;)t=o.next,o=o.parent}return e}function j(r){var e=r.f,t=(e&ee)!==0;if(C!==null&&!te){if(!(D!=null&&D[1].includes(r))||D[0]!==C){var a=C.deps;r.rv<ht&&(r.rv=ht,F===null&&a!==null&&a[$]===r?$++:F===null?F=[r]:(!he||!F.includes(r))&&F.push(r))}}else if(t&&r.deps===null&&r.effects===null){var n=r,i=n.parent;i!==null&&(i.f&V)===0&&(n.f^=V)}return t&&(n=r,mt(n)&&Rr(n)),Ee&&We.has(r)?We.get(r):r.v}function Tn(r){var e=te;try{return te=!0,r()}finally{te=e}}const An=-7169;function re(r,e){r.f=r.f&An|e}const Nn=["touchstart","touchmove"];function Ln(r){return Nn.includes(r)}const On=new Set,ea=new Set;function gt(r){var E;var e=this,t=e.ownerDocument,a=r.type,n=((E=r.composedPath)==null?void 0:E.call(r))||[],i=n[0]||r.target,s=0,o=r.__root;if(o){var l=n.indexOf(o);if(l!==-1&&(e===document||e===window)){r.__root=e;return}var c=n.indexOf(e);if(c===-1)return;l<=c&&(s=l)}if(i=n[s]||r.target,i!==e){Va(r,"currentTarget",{configurable:!0,get(){return i||t}});var d=C,f=N;fe(null),Ce(null);try{for(var h,_=[];i!==null;){var k=i.assignedSlot||i.parentNode||i.host||null;try{var L=i["__"+a];if(L!=null&&(!i.disabled||r.target===i))if(I(L)){var[O,...Q]=L;O.apply(i,[r,...Q])}else L.call(i,r)}catch(W){h?_.push(W):h=W}if(r.cancelBubble||k===e||k===null)break;i=k}if(h){for(let W of _)queueMicrotask(()=>{throw W});throw h}}finally{r.__root=e,delete r.currentTarget,fe(d),Ce(f)}}}function Rn(r){var e=document.createElement("template");return e.innerHTML=r.replaceAll("<!>","<!---->"),e.content}function jn(r,e){var t=N;t.nodes_start===null&&(t.nodes_start=r,t.nodes_end=e)}function ta(r,e){var t,a=!r.startsWith("<!>");return()=>{t===void 0&&(t=Rn(a?r:"<!>"+r),t=Fr(t));var n=Ir?document.importNode(t,!0):t.cloneNode(!0);return jn(n,n),n}}function ra(r,e){r!==null&&r.before(e)}function qt(r,e){return Pn(r,e)}const Te=new Map;function Pn(r,{target:e,anchor:t,props:a={},events:n,context:i,intro:s=!0}){sn();var o=new Set,l=f=>{for(var h=0;h<f.length;h++){var _=f[h];if(!o.has(_)){o.add(_);var k=Ln(_);e.addEventListener(_,gt,{passive:k});var L=Te.get(_);L===void 0?(document.addEventListener(_,gt,{passive:k}),Te.set(_,1)):Te.set(_,L+1)}}};l(Ba(On)),ea.add(l);var c=void 0,d=pn(()=>{var f=t??e.appendChild(on());return hn(()=>{if(i){Pt({});var h=X;h.c=i}n&&(a.$$events=n),c=r(f,a)||{},i&&It()}),()=>{var k;for(var h of o){e.removeEventListener(h,gt);var _=Te.get(h);--_===0?(document.removeEventListener(h,gt),Te.delete(h)):Te.set(h,_)}ea.delete(l),f!==t&&((k=f.parentNode)==null||k.removeChild(f))}});return In.set(c,d),c}let In=new WeakMap;const aa=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Dn(r,e,t){var a=r==null?"":""+r;if(t){for(var n in t)if(t[n])a=a?a+" "+n:n;else if(a.length)for(var i=n.length,s=0;(s=a.indexOf(n,s))>=0;){var o=s+i;(s===0||aa.includes(a[s-1]))&&(o===a.length||aa.includes(a[o]))?a=(s===0?"":a.substring(0,s))+a.substring(o+1):s=o}}return a===""?null:a}function na(r,e=!1){var t=e?" !important;":";",a="";for(var n in r){var i=r[n];i!=null&&i!==""&&(a+=" "+n+": "+i+t)}return a}function Wt(r){return r[0]!=="-"||r[1]!=="-"?r.toLowerCase():r}function Zn(r,e){if(e){var t="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,r){r=String(r).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,o=!1,l=[];a&&l.push(...Object.keys(a).map(Wt)),n&&l.push(...Object.keys(n).map(Wt));var c=0,d=-1;const L=r.length;for(var f=0;f<L;f++){var h=r[f];if(o?h==="/"&&r[f-1]==="*"&&(o=!1):i?i===h&&(i=!1):h==="/"&&r[f+1]==="*"?o=!0:h==='"'||h==="'"?i=h:h==="("?s++:h===")"&&s--,!o&&i===!1&&s===0){if(h===":"&&d===-1)d=f;else if(h===";"||f===L-1){if(d!==-1){var _=Wt(r.substring(c,d).trim());if(!l.includes(_)){h!==";"&&f++;var k=r.substring(c,f).trim();t+=" "+k+";"}}c=f+1,d=-1}}}}return a&&(t+=na(a)),n&&(t+=na(n,!0)),t=t.trim(),t===""?null:t}return r==null?null:String(r)}function ia(r,e,t,a,n,i){var s=r.__className;if(s!==t||s===void 0){var o=Dn(t,a,i);o==null?r.removeAttribute("class"):r.className=o,r.__className=t}else if(i&&n!==i)for(var l in i){var c=!!i[l];(n==null||c!==!!n[l])&&r.classList.toggle(l,c)}return i}function Yt(r,e={},t,a){for(var n in t){var i=t[n];e[n]!==i&&(t[n]==null?r.style.removeProperty(n):r.style.setProperty(n,i,a))}}function _t(r,e,t,a){var n=r.__style;if(n!==e){var i=Zn(e,a);i==null?r.removeAttribute("style"):r.style.cssText=i,r.__style=e}else a&&(Array.isArray(a)?(Yt(r,t==null?void 0:t[0],a[0]),Yt(r,t==null?void 0:t[1],a[1],"important")):Yt(r,t,a));return a}const Fn=()=>performance.now(),ae={tick:r=>requestAnimationFrame(r),now:()=>Fn(),tasks:new Set};function sa(){const r=ae.now();ae.tasks.forEach(e=>{e.c(r)||(ae.tasks.delete(e),e.f())}),ae.tasks.size!==0&&ae.tick(sa)}function Bn(r){let e;return ae.tasks.size===0&&ae.tick(sa),{promise:new Promise(t=>{ae.tasks.add(e={c:r,f:t})}),abort(){ae.tasks.delete(e)}}}function oa(r,e){return r===e||(r==null?void 0:r[ut])===e}function Ae(r={},e,t,a){return Bt(()=>{var n,i;return Vr(()=>{n=i,i=[],Tn(()=>{r!==t(...i)&&(e(r,...i),n&&oa(t(...n),r)&&e(null,...n))})}),()=>{xn(()=>{i&&oa(t(...i),r)&&e(null,...i)})}}),r}const Vn="5";typeof window<"u"&&((La=window.__svelte??(window.__svelte={})).v??(La.v=new Set)).add(Vn);function Un(r){return r}function Xt(r){return-.5*(Math.cos(Math.PI*r)-1)}function $n(r){const e=Math.cos(r*Math.PI*.5);return Math.abs(e)<1e-14?1:1-e}function qn(r){return Math.sin(r*Math.PI/2)}const Wn=128,Yn=0,Xn=1,Hn=2;class Gn{constructor(){p(this,"animationsStarted",!1);p(this,"animationsCount",0);p(this,"animationsLimit",Wn);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 a=t.animations;if(a!=null)for(let n=0;n<a.length;n++){const i=a[n];if(i!=null){for(const s of i.values())if(!s.executed&&(s.executed=!0,s.function(),this.animationsCount++,this.animationsCount==this.animationsLimit))return}}}}catch{}finally{window.requestAnimationFrame(this.tick.bind(this))}}equeue(e,t,a,n){let i=this.layers[e];i==null&&(i=this.layers[e]={animations:new Array});let s=i.animations[t];s==null&&(s=i.animations[t]=new Map);let o={id:a,priority:t,executed:!1,function:n};s.set(a,o),this.animationsStarted==!1&&(this.animationsStarted=!0,this.start())}clear(e,t){for(let a=0;a<this.layers.length;a++){let n=this.layers[a];if(n==null)continue;let i=n.animations[e];if(i==null)return;let s=i.get(t);if(s==null||s.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 me=new Gn;function la(r){return Object.prototype.toString.call(r)==="[object Date]"}function Ht(r,e){if(r===e||r!==r)return()=>r;const t=typeof r;if(t!==typeof e||Array.isArray(r)!==Array.isArray(e))throw new Error("Cannot interpolate values of different type");if(Array.isArray(r)){const a=e.map((n,i)=>Ht(r[i],n));return n=>a.map(i=>i(n))}if(t==="object"){if(!r||!e)throw new Error("Object cannot be null");if(la(r)&&la(e)){const i=r.getTime(),o=e.getTime()-i;return l=>new Date(i+l*o)}const a=Object.keys(e),n={};return a.forEach(i=>{n[i]=Ht(r[i],e[i])}),i=>{const s={};return a.forEach(o=>{s[o]=n[o](i)}),s}}if(t==="number"){const a=e-r;return n=>r+n*a}return()=>e}const xr=class xr{constructor(e,t={}){nt(this,ce);nt(this,Fe);nt(this,tt);nt(this,Se,null);it(this,ce,Zt(e)),it(this,Fe,Zt(e)),it(this,tt,t)}static of(e,t){const a=new xr(e(),t);return Vr(()=>{a.set(e())}),a}set(e,t){var f;Z(K(this,Fe),e);let{delay:a=0,duration:n=400,easing:i=Un,interpolate:s=Ht}={...K(this,tt),...t};if(n===0)return(f=K(this,Se))==null||f.abort(),Z(K(this,ce),e),Promise.resolve();const o=ae.now()+a;let l,c=!1,d=K(this,Se);return it(this,Se,Bn(h=>{if(h<o)return!0;if(!c){c=!0;const k=K(this,ce).v;l=s(k,e),typeof n=="function"&&(n=n(k,e)),d==null||d.abort()}const _=h-o;return _>n?(Z(K(this,ce),e),!1):(Z(K(this,ce),l(i(_/n))),!0)})),K(this,Se).promise}get current(){return j(K(this,ce))}get target(){return j(K(this,Fe))}set target(e){this.set(e)}};ce=new WeakMap,Fe=new WeakMap,tt=new WeakMap,Se=new WeakMap;let Gt=xr;class vt{constructor(e,t){p(this,"value");p(this,"motion");this.value=e,this.motion=new Gt(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 Jn=ta('<div><div class="body svelte-1nfn9j8"></div></div>');function Qn(r,e){Pt(e,!0);let t,a;function n(){return a}let i=H(!1);function s(E){Z(i,E,!0)}function o(){return j(i)}let l=new vt(0,{easing:Xt});oe(()=>{c(l.motion.current)}),oe(()=>{j(i)==!1&&(l.snap(),me.clear(e.priority,e.id))});function c(E){t&&me.equeue(e.layer,e.priority,e.id,()=>{t.style.scale=E.toString(),t.style.filter=`brightness(${.25+.75*E})`,a.style.opacity=E.toString()})}function d(E){E!=l.value&&l.set(E,{duration:75})}function f(){return l.motion.current==0}function h(){return l.value}var _=Jn();let k,L;var O=Ft(_);let Q;return Ae(O,E=>a=E,()=>a),Ae(_,E=>t=E,()=>t),Ur(E=>{k=ia(_,1,"pin svelte-1nfn9j8",null,k,E),L=_t(_,"",L,{width:`${e.width}px`,height:`${e.height}px`,"border-radius":`${e.radius}px`}),Q=_t(O,"",Q,{width:`${e.width-4}px`,height:`${e.height-4}px`,"border-radius":`${e.radius-2}px`})},[()=>({displayed:j(i)})]),ra(r,_),It({getBody:n,setDisplayed:s,getDisplayed:o,setScale:d,getCollapsed:f,getScale:h})}var Ye;(r=>{function e(t,a,n){const i=t/2,s=a/2,o=Math.sqrt(i*i+s*s),l=Math.atan(s/i)*(180/Math.PI),c=n*(Math.PI/180);return n<180?n<90?n<l?{offsetX:0,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:0}:n<180-l?{offsetX:o*Math.cos(c)-i,offsetY:0}:{offsetX:-t,offsetY:o*Math.sin(c)-s}:n<270?n<180+l?{offsetX:-t,offsetY:o*Math.sin(c)-s}:{offsetX:o*Math.cos(c)-i,offsetY:-a}:n<360-l?{offsetX:o*Math.cos(c)-i,offsetY:-a}:{offsetX:0,offsetY:o*Math.sin(c)-s}}r.getOffsets=e})(Ye||(Ye={}));var Kn=ta('<div><div class="pointer svelte-j5igi2"></div> <div class="bubble svelte-j5igi2"><div class="body svelte-j5igi2"></div></div></div>');function ca(r,e){Pt(e,!0);let t,a,n,i;const s=e.width+2*e.margin,o=e.height+2*e.margin,l=()=>i;oe(()=>{n.style.width=`${e.margin*4}px`,n.style.height=`${e.margin*4}px`});let c=H(!0);function d(T){Z(c,T,!0)}function f(){return j(c)}let h=H(!0);function _(T){Z(h,T,!0)}function k(){return O.motion.current==0}function L(){return O.motion.current==1}let O=new vt(0);oe(()=>{Q(O.motion.current)}),oe(()=>{j(c)==!1&&(O.snap(),me.clear(e.priority,e.id+"_scale"))}),oe(()=>{j(h)==!0&&O.value!=0&&(me.stacked()?O.set(0,{duration:0}):O.set(0,{duration:150,easing:$n})),j(h)==!1&&O.value!=1&&O.set(1,{duration:150,easing:qn})});function Q(T){!t||!a||!n||me.equeue(j(h)?0:e.layer,e.priority,e.id+"_scale",()=>{t.style.opacity=`${T}`,a.style.scale=`${T}`,n.style.scale=`${T}`})}let E=NaN,W=H(!1),se=new vt(-s/2,{easing:Xt}),Tt=new vt(-o/2,{easing:Xt});oe(()=>{Oa(se.motion.current,Tt.motion.current)}),oe(()=>{j(c)==!1&&(se.snap(),se.snap(),me.clear(e.priority,e.id+"_angle"))}),oe(()=>{j(h)==!0&&j(W)&&(se.update({duration:75}),se.update({duration:75}))});function Oa(T,ue){if(!t||!a||!n)return;const Nt=T+s/2,rt=ue+o/2,Ue=o<s?Nt*o/s:Nt,br=o>s?rt*s/o:rt,Bi=Math.atan2(br,Ue)/Math.PI*180-45,Ia=0,Vi=30,kr=Math.sqrt(Ue*Ue+br*br),at=Math.min(s,o)/2,Ui=at*Math.SQRT2,$i=(kr-at)/(Ui-at),Da=Ia+$i*(Vi-Ia),qi=kr<at?kr/at:1;me.equeue(e.layer,e.priority,e.id+"_angle",()=>{a.style.transform=`translate(${Math.round(T)}px, ${Math.round(ue)}px)`,n.style.transform=`scale(${qi}) rotate(${Bi}deg) skew(${Da}deg, ${Da}deg)`})}function Zi(T){if(j(W)==!1){let ue=Ye.getOffsets(s,o,T);se.set(Math.round(ue.offsetX),{duration:0}),Tt.set(Math.round(ue.offsetY),{duration:0}),Oa(se.value,Tt.value),E=T,Z(W,!0)}else if(T!=E){let ue=Math.abs(T-E),Nt=ue<180?ue:360-ue,rt=Math.log(Nt)*75,Ue=Ye.getOffsets(s,o,T);se.set(Math.round(Ue.offsetX),{duration:rt}),Tt.set(Math.round(Ue.offsetY),{duration:rt}),E=T}}function Fi(){return Ye.getOffsets(s,o,E)}var At=Kn();let Ra;var ja=Ft(At);Ae(ja,T=>n=T,()=>n);var wr=ln(ja,2),Pa=Ft(wr);return Ae(Pa,T=>i=T,()=>i),Ae(wr,T=>a=T,()=>a),Ae(At,T=>t=T,()=>t),Ur(T=>{Ra=ia(At,1,"anchor svelte-j5igi2",null,Ra,T),_t(wr,`margin: ${e.margin}px;`),_t(Pa,`width: ${e.width}px; height: ${e.height}px; border-radius: ${e.radius}px;`)},[()=>({displayed:j(c)})]),ra(r,At),It({getBody:l,setDisplayed:d,getDisplayed:f,setCollapsed:_,getCollapsed:k,getExpanded:L,setAngle:Zi,getOffsets:Fi})}var Ne;(r=>{function e(o,l,c){return{x:a(l)*c,y:n(o)*c}}r.project=e;function t(o,l,c){return{lat:s(l/c),lng:i(o/c)}}r.unproject=t;function a(o){return(180+o)/360}function n(o){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o*Math.PI/360)))/360}function i(o){return o*360-180}function s(o){return 360/Math.PI*Math.atan(Math.exp((180-o*360)*Math.PI/180))-90}})(Ne||(Ne={}));class ua{constructor(e,t,a,n,i){p(this,"swLat");p(this,"swLng");p(this,"neLat");p(this,"neLng");p(this,"contains",(e,t)=>this.swLat<=e&&e<=this.neLat?this.swLng<this.neLng?this.swLng<=t&&t<=this.neLng:t<=this.neLng||this.swLng<=t:!1);const s=a*Math.pow(2,t),o=Ne.project(e.sw.lat,e.sw.lng,s),l=Ne.project(e.ne.lat,e.ne.lng,s),c=o.x-n,d=o.y+i,f=l.x+n,h=l.y-i,_=Ne.unproject(c,d,s),k=Ne.unproject(f,h,s);this.swLat=_.lat,this.swLng=_.lng,this.neLat=k.lat,this.neLng=k.lng}}var M;(function(r){r.assertEqual=n=>{};function e(n){}r.assertIs=e;function t(n){throw new Error}r.assertNever=t,r.arrayToEnum=n=>{const i={};for(const s of n)i[s]=s;return i},r.getValidEnumValues=n=>{const i=r.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),s={};for(const o of i)s[o]=n[o];return r.objectValues(s)},r.objectValues=n=>r.objectKeys(n).map(function(i){return n[i]}),r.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const i=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&i.push(s);return i},r.find=(n,i)=>{for(const s of n)if(i(s))return s},r.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,i=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(i)}r.joinValues=a,r.jsonStringifyReplacer=(n,i)=>typeof i=="bigint"?i.toString():i})(M||(M={}));var da;(function(r){r.mergeShapes=(e,t)=>({...e,...t})})(da||(da={}));const y=M.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ye=r=>{switch(typeof r){case"undefined":return y.undefined;case"string":return y.string;case"number":return Number.isNaN(r)?y.nan:y.number;case"boolean":return y.boolean;case"function":return y.function;case"bigint":return y.bigint;case"symbol":return y.symbol;case"object":return Array.isArray(r)?y.array:r===null?y.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?y.promise:typeof Map<"u"&&r instanceof Map?y.map:typeof Set<"u"&&r instanceof Set?y.set:typeof Date<"u"&&r instanceof Date?y.date:y.object;default:return y.unknown}},u=M.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 J extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};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},a={_errors:[]},n=i=>{for(const s of i.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(t(s));else{let o=a,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(t(s))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return n(this),a}static assert(e){if(!(e instanceof J))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,M.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):a.push(e(n));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}J.create=r=>new J(r);const Xe=(r,e)=>{let t;switch(r.code){case u.invalid_type:r.received===y.undefined?t="Required":t=`Expected ${r.expected}, received ${r.received}`;break;case u.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(r.expected,M.jsonStringifyReplacer)}`;break;case u.unrecognized_keys:t=`Unrecognized key(s) in object: ${M.joinValues(r.keys,", ")}`;break;case u.invalid_union:t="Invalid input";break;case u.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${M.joinValues(r.options)}`;break;case u.invalid_enum_value:t=`Invalid enum value. Expected ${M.joinValues(r.options)}, received '${r.received}'`;break;case u.invalid_arguments:t="Invalid function arguments";break;case u.invalid_return_type:t="Invalid function return type";break;case u.invalid_date:t="Invalid date";break;case u.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(t=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?t=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?t=`Invalid input: must end with "${r.validation.endsWith}"`:M.assertNever(r.validation):r.validation!=="regex"?t=`Invalid ${r.validation}`:t="Invalid";break;case u.too_small:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:t="Invalid input";break;case u.too_big:r.type==="array"?t=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?t=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?t=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?t=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?t=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:t="Invalid input";break;case u.custom:t="Invalid input";break;case u.invalid_intersection_types:t="Intersection results could not be merged";break;case u.not_multiple_of:t=`Number must be a multiple of ${r.multipleOf}`;break;case u.not_finite:t="Number must be finite";break;default:t=e.defaultError,M.assertNever(r)}return{message:t}};let ei=Xe;function Jt(){return ei}const Qt=r=>{const{data:e,path:t,errorMaps:a,issueData:n}=r,i=[...t,...n.path||[]],s={...n,path:i};if(n.message!==void 0)return{...n,path:i,message:n.message};let o="";const l=a.filter(c=>!!c).slice().reverse();for(const c of l)o=c(s,{data:e,defaultError:o}).message;return{...n,path:i,message:o}};function m(r,e){const t=Jt(),a=Qt({issueData:e,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,t,t===Xe?void 0:Xe].filter(n=>!!n)});r.common.issues.push(a)}class q{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const n of t){if(n.status==="aborted")return v;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const n of t){const i=await n.key,s=await n.value;a.push({key:i,value:s})}return q.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const n of t){const{key:i,value:s}=n;if(i.status==="aborted"||s.status==="aborted")return v;i.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),i.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[i.value]=s.value)}return{status:e.value,value:a}}}const v=Object.freeze({status:"aborted"}),He=r=>({status:"dirty",value:r}),B=r=>({status:"valid",value:r}),pa=r=>r.status==="aborted",fa=r=>r.status==="dirty",Le=r=>r.status==="valid",xt=r=>typeof Promise<"u"&&r instanceof Promise;var g;(function(r){r.errToObj=e=>typeof e=="string"?{message:e}:e||{},r.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(g||(g={}));class ge{constructor(e,t,a,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=n}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 ha=(r,e)=>{if(Le(e))return{success:!0,data:e.value};if(!r.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 J(r.common.issues);return this._error=t,this._error}}};function w(r){if(!r)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:n}=r;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,o)=>{const{message:l}=r;return s.code==="invalid_enum_value"?{message:l??o.defaultError}:typeof o.data>"u"?{message:l??a??o.defaultError}:s.code!=="invalid_type"?{message:o.defaultError}:{message:l??t??o.defaultError}},description:n}}class z{get description(){return this._def.description}_getType(e){return ye(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ye(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new q,ctx:{common:e.parent.common,data:e.data,parsedType:ye(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(xt(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 a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){const a={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:ye(e)},n=this._parseSync({data:e,path:a.path,parent:a});return ha(a,n)}"~validate"(e){var a,n;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ye(e)};if(!this["~standard"].async)try{const i=this._parseSync({data:e,path:[],parent:t});return Le(i)?{value:i.value}:{issues:t.common.issues}}catch(i){(n=(a=i==null?void 0:i.message)==null?void 0:a.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(i=>Le(i)?{value:i.value}:{issues:t.common.issues})}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={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:ye(e)},n=this._parse({data:e,path:a.path,parent:a}),i=await(xt(n)?n:Promise.resolve(n));return ha(a,i)}refine(e,t){const a=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,i)=>{const s=e(n),o=()=>i.addIssue({code:u.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(o(),!1)):s?!0:(o(),!1)})}refinement(e,t){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof t=="function"?t(a,n):t),!1))}_refinement(e){return new Ie({schema:this,typeName:x.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 xe.create(this,this._def)}nullable(){return De.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ne.create(this)}promise(){return Ke.create(this,this._def)}or(e){return bt.create([this,e],this._def)}and(e){return kt.create(this,e,this._def)}transform(e){return new Ie({...w(this._def),schema:this,typeName:x.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new nr({...w(this._def),innerType:this,defaultValue:t,typeName:x.ZodDefault})}brand(){return new ki({typeName:x.ZodBranded,type:this,...w(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ir({...w(this._def),innerType:this,catchValue:t,typeName:x.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return sr.create(this,e)}readonly(){return or.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ti=/^c[^\s-]{8,}$/i,ri=/^[0-9a-z]+$/,ai=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ni=/^[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,ii=/^[a-z0-9_-]{21}$/i,si=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oi=/^[-+]?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)?)??$/,li=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ci="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Kt;const ui=/^(?:(?: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])$/,di=/^(?:(?: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])$/,pi=/^(([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]))$/,fi=/^(([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])$/,hi=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,mi=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ma="((\\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])))",yi=new RegExp(`^${ma}$`);function ya(r){let e="[0-5]\\d";r.precision?e=`${e}\\.\\d{${r.precision}}`:r.precision==null&&(e=`${e}(\\.\\d+)?`);const t=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function gi(r){return new RegExp(`^${ya(r)}$`)}function _i(r){let e=`${ma}T${ya(r)}`;const t=[];return t.push(r.local?"Z?":"Z"),r.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function vi(r,e){return!!((e==="v4"||!e)&&ui.test(r)||(e==="v6"||!e)&&pi.test(r))}function xi(r,e){if(!si.test(r))return!1;try{const[t]=r.split("."),a=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function wi(r,e){return!!((e==="v4"||!e)&&di.test(r)||(e==="v6"||!e)&&fi.test(r))}class _e extends z{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==y.string){const i=this._getOrReturnCtx(e);return m(i,{code:u.invalid_type,expected:y.string,received:i.parsedType}),v}const a=new q;let n;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="max")e.data.length>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),a.dirty());else if(i.kind==="length"){const s=e.data.length>i.value,o=e.data.length<i.value;(s||o)&&(n=this._getOrReturnCtx(e,n),s?m(n,{code:u.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):o&&m(n,{code:u.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),a.dirty())}else if(i.kind==="email")li.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"email",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="emoji")Kt||(Kt=new RegExp(ci,"u")),Kt.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"emoji",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="uuid")ni.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"uuid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="nanoid")ii.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"nanoid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid")ti.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="cuid2")ri.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cuid2",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="ulid")ai.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ulid",code:u.invalid_string,message:i.message}),a.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),m(n,{validation:"url",code:u.invalid_string,message:i.message}),a.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"regex",code:u.invalid_string,message:i.message}),a.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),a.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)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:{startsWith:i.value},message:i.message}),a.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:{endsWith:i.value},message:i.message}),a.dirty()):i.kind==="datetime"?_i(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:"datetime",message:i.message}),a.dirty()):i.kind==="date"?yi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:"date",message:i.message}),a.dirty()):i.kind==="time"?gi(i).test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{code:u.invalid_string,validation:"time",message:i.message}),a.dirty()):i.kind==="duration"?oi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"duration",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="ip"?vi(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"ip",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="jwt"?xi(e.data,i.alg)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"jwt",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="cidr"?wi(e.data,i.version)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"cidr",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="base64"?hi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64",code:u.invalid_string,message:i.message}),a.dirty()):i.kind==="base64url"?mi.test(e.data)||(n=this._getOrReturnCtx(e,n),m(n,{validation:"base64url",code:u.invalid_string,message:i.message}),a.dirty()):M.assertNever(i);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(n=>e.test(n),{validation:t,code:u.invalid_string,...g.errToObj(a)})}_addCheck(e){return new _e({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...g.errToObj(e)})}url(e){return this._addCheck({kind:"url",...g.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...g.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...g.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...g.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...g.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...g.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...g.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...g.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...g.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...g.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...g.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...g.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,...g.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,...g.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...g.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...g.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...g.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...g.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...g.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...g.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...g.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...g.errToObj(t)})}nonempty(e){return this.min(1,g.errToObj(e))}trim(){return new _e({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new _e({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new _e({...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}}_e.create=r=>new _e({checks:[],typeName:x.ZodString,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});function bi(r,e){const t=(r.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=t>a?t:a,i=Number.parseInt(r.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return i%s/10**n}class Oe extends z{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)!==y.number){const i=this._getOrReturnCtx(e);return m(i,{code:u.invalid_type,expected:y.number,received:i.parsedType}),v}let a;const n=new q;for(const i of this._def.checks)i.kind==="int"?M.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:u.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty()):i.kind==="multipleOf"?bi(e.data,i.value)!==0&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),m(a,{code:u.not_finite,message:i.message}),n.dirty()):M.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new Oe({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new Oe({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:g.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:g.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:g.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:g.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"&&M.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}Oe.create=r=>new Oe({checks:[],typeName:x.ZodNumber,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class Ge extends z{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)!==y.bigint)return this._getInvalidInput(e);let a;const n=new q;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),m(a,{code:u.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):M.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return m(t,{code:u.invalid_type,expected:y.bigint,received:t.parsedType}),v}gte(e,t){return this.setLimit("min",e,!0,g.toString(t))}gt(e,t){return this.setLimit("min",e,!1,g.toString(t))}lte(e,t){return this.setLimit("max",e,!0,g.toString(t))}lt(e,t){return this.setLimit("max",e,!1,g.toString(t))}setLimit(e,t,a,n){return new Ge({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:g.toString(n)}]})}_addCheck(e){return new Ge({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:g.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:g.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:g.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:g.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:g.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}}Ge.create=r=>new Ge({checks:[],typeName:x.ZodBigInt,coerce:(r==null?void 0:r.coerce)??!1,...w(r)});class er extends z{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==y.boolean){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.boolean,received:a.parsedType}),v}return B(e.data)}}er.create=r=>new er({typeName:x.ZodBoolean,coerce:(r==null?void 0:r.coerce)||!1,...w(r)});class wt extends z{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==y.date){const i=this._getOrReturnCtx(e);return m(i,{code:u.invalid_type,expected:y.date,received:i.parsedType}),v}if(Number.isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return m(i,{code:u.invalid_date}),v}const a=new q;let n;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:u.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),a.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),m(n,{code:u.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),a.dirty()):M.assertNever(i);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new wt({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:g.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:g.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}}wt.create=r=>new wt({checks:[],coerce:(r==null?void 0:r.coerce)||!1,typeName:x.ZodDate,...w(r)});class ga extends z{_parse(e){if(this._getType(e)!==y.symbol){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.symbol,received:a.parsedType}),v}return B(e.data)}}ga.create=r=>new ga({typeName:x.ZodSymbol,...w(r)});class _a extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.undefined,received:a.parsedType}),v}return B(e.data)}}_a.create=r=>new _a({typeName:x.ZodUndefined,...w(r)});class va extends z{_parse(e){if(this._getType(e)!==y.null){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.null,received:a.parsedType}),v}return B(e.data)}}va.create=r=>new va({typeName:x.ZodNull,...w(r)});class tr extends z{constructor(){super(...arguments),this._any=!0}_parse(e){return B(e.data)}}tr.create=r=>new tr({typeName:x.ZodAny,...w(r)});class Re extends z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return B(e.data)}}Re.create=r=>new Re({typeName:x.ZodUnknown,...w(r)});class ve extends z{_parse(e){const t=this._getOrReturnCtx(e);return m(t,{code:u.invalid_type,expected:y.never,received:t.parsedType}),v}}ve.create=r=>new ve({typeName:x.ZodNever,...w(r)});class rr extends z{_parse(e){if(this._getType(e)!==y.undefined){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.void,received:a.parsedType}),v}return B(e.data)}}rr.create=r=>new rr({typeName:x.ZodVoid,...w(r)});class ne extends z{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),n=this._def;if(t.parsedType!==y.array)return m(t,{code:u.invalid_type,expected:y.array,received:t.parsedType}),v;if(n.exactLength!==null){const s=t.data.length>n.exactLength.value,o=t.data.length<n.exactLength.value;(s||o)&&(m(t,{code:s?u.too_big:u.too_small,minimum:o?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&t.data.length<n.minLength.value&&(m(t,{code:u.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&t.data.length>n.maxLength.value&&(m(t,{code:u.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((s,o)=>n.type._parseAsync(new ge(t,s,t.path,o)))).then(s=>q.mergeArray(a,s));const i=[...t.data].map((s,o)=>n.type._parseSync(new ge(t,s,t.path,o)));return q.mergeArray(a,i)}get element(){return this._def.type}min(e,t){return new ne({...this._def,minLength:{value:e,message:g.toString(t)}})}max(e,t){return new ne({...this._def,maxLength:{value:e,message:g.toString(t)}})}length(e,t){return new ne({...this._def,exactLength:{value:e,message:g.toString(t)}})}nonempty(e){return this.min(1,e)}}ne.create=(r,e)=>new ne({type:r,minLength:null,maxLength:null,exactLength:null,typeName:x.ZodArray,...w(e)});function je(r){if(r instanceof P){const e={};for(const t in r.shape){const a=r.shape[t];e[t]=xe.create(je(a))}return new P({...r._def,shape:()=>e})}else return r instanceof ne?new ne({...r._def,type:je(r.element)}):r instanceof xe?xe.create(je(r.unwrap())):r instanceof De?De.create(je(r.unwrap())):r instanceof le?le.create(r.items.map(e=>je(e))):r}class P extends z{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=M.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==y.object){const c=this._getOrReturnCtx(e);return m(c,{code:u.invalid_type,expected:y.object,received:c.parsedType}),v}const{status:a,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof ve&&this._def.unknownKeys==="strip"))for(const c in n.data)s.includes(c)||o.push(c);const l=[];for(const c of s){const d=i[c],f=n.data[c];l.push({key:{status:"valid",value:c},value:d._parse(new ge(n,f,n.path,c)),alwaysSet:c in n.data})}if(this._def.catchall instanceof ve){const c=this._def.unknownKeys;if(c==="passthrough")for(const d of o)l.push({key:{status:"valid",value:d},value:{status:"valid",value:n.data[d]}});else if(c==="strict")o.length>0&&(m(n,{code:u.unrecognized_keys,keys:o}),a.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const d of o){const f=n.data[d];l.push({key:{status:"valid",value:d},value:c._parse(new ge(n,f,n.path,d)),alwaysSet:d in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const c=[];for(const d of l){const f=await d.key,h=await d.value;c.push({key:f,value:h,alwaysSet:d.alwaysSet})}return c}).then(c=>q.mergeObjectSync(a,c)):q.mergeObjectSync(a,l)}get shape(){return this._def.shape()}strict(e){return g.errToObj,new P({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var i,s;const n=((s=(i=this._def).errorMap)==null?void 0:s.call(i,t,a).message)??a.defaultError;return t.code==="unrecognized_keys"?{message:g.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new P({...this._def,unknownKeys:"strip"})}passthrough(){return new P({...this._def,unknownKeys:"passthrough"})}extend(e){return new P({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new P({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:x.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new P({...this._def,catchall:e})}pick(e){const t={};for(const a of M.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}omit(e){const t={};for(const a of M.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new P({...this._def,shape:()=>t})}deepPartial(){return je(this)}partial(e){const t={};for(const a of M.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?t[a]=n:t[a]=n.optional()}return new P({...this._def,shape:()=>t})}required(e){const t={};for(const a of M.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let i=this.shape[a];for(;i instanceof xe;)i=i._def.innerType;t[a]=i}return new P({...this._def,shape:()=>t})}keyof(){return ka(M.objectKeys(this.shape))}}P.create=(r,e)=>new P({shape:()=>r,unknownKeys:"strip",catchall:ve.create(),typeName:x.ZodObject,...w(e)}),P.strictCreate=(r,e)=>new P({shape:()=>r,unknownKeys:"strict",catchall:ve.create(),typeName:x.ZodObject,...w(e)}),P.lazycreate=(r,e)=>new P({shape:r,unknownKeys:"strip",catchall:ve.create(),typeName:x.ZodObject,...w(e)});class bt extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function n(i){for(const o of i)if(o.result.status==="valid")return o.result;for(const o of i)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const s=i.map(o=>new J(o.ctx.common.issues));return m(t,{code:u.invalid_union,unionErrors:s}),v}if(t.common.async)return Promise.all(a.map(async i=>{const s={...t,common:{...t.common,issues:[]},parent:null};return{result:await i._parseAsync({data:t.data,path:t.path,parent:s}),ctx:s}})).then(n);{let i;const s=[];for(const l of a){const c={...t,common:{...t.common,issues:[]},parent:null},d=l._parseSync({data:t.data,path:t.path,parent:c});if(d.status==="valid")return d;d.status==="dirty"&&!i&&(i={result:d,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(i)return t.common.issues.push(...i.ctx.common.issues),i.result;const o=s.map(l=>new J(l));return m(t,{code:u.invalid_union,unionErrors:o}),v}}get options(){return this._def.options}}bt.create=(r,e)=>new bt({options:r,typeName:x.ZodUnion,...w(e)});function ar(r,e){const t=ye(r),a=ye(e);if(r===e)return{valid:!0,data:r};if(t===y.object&&a===y.object){const n=M.objectKeys(e),i=M.objectKeys(r).filter(o=>n.indexOf(o)!==-1),s={...r,...e};for(const o of i){const l=ar(r[o],e[o]);if(!l.valid)return{valid:!1};s[o]=l.data}return{valid:!0,data:s}}else if(t===y.array&&a===y.array){if(r.length!==e.length)return{valid:!1};const n=[];for(let i=0;i<r.length;i++){const s=r[i],o=e[i],l=ar(s,o);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return t===y.date&&a===y.date&&+r==+e?{valid:!0,data:r}:{valid:!1}}class kt extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=(i,s)=>{if(pa(i)||pa(s))return v;const o=ar(i.value,s.value);return o.valid?((fa(i)||fa(s))&&t.dirty(),{status:t.value,value:o.data}):(m(a,{code:u.invalid_intersection_types}),v)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([i,s])=>n(i,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}kt.create=(r,e,t)=>new kt({left:r,right:e,typeName:x.ZodIntersection,...w(t)});class le extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.array)return m(a,{code:u.invalid_type,expected:y.array,received:a.parsedType}),v;if(a.data.length<this._def.items.length)return m(a,{code:u.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),v;!this._def.rest&&a.data.length>this._def.items.length&&(m(a,{code:u.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...a.data].map((s,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new ge(a,s,a.path,o)):null}).filter(s=>!!s);return a.common.async?Promise.all(i).then(s=>q.mergeArray(t,s)):q.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new le({...this._def,rest:e})}}le.create=(r,e)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new le({items:r,typeName:x.ZodTuple,rest:null,...w(e)})};class xa extends z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.map)return m(a,{code:u.invalid_type,expected:y.map,received:a.parsedType}),v;const n=this._def.keyType,i=this._def.valueType,s=[...a.data.entries()].map(([o,l],c)=>({key:n._parse(new ge(a,o,a.path,[c,"key"])),value:i._parse(new ge(a,l,a.path,[c,"value"]))}));if(a.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,d=await l.value;if(c.status==="aborted"||d.status==="aborted")return v;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const l of s){const c=l.key,d=l.value;if(c.status==="aborted"||d.status==="aborted")return v;(c.status==="dirty"||d.status==="dirty")&&t.dirty(),o.set(c.value,d.value)}return{status:t.value,value:o}}}}xa.create=(r,e,t)=>new xa({valueType:e,keyType:r,typeName:x.ZodMap,...w(t)});class Je extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==y.set)return m(a,{code:u.invalid_type,expected:y.set,received:a.parsedType}),v;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(m(a,{code:u.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(m(a,{code:u.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function s(l){const c=new Set;for(const d of l){if(d.status==="aborted")return v;d.status==="dirty"&&t.dirty(),c.add(d.value)}return{status:t.value,value:c}}const o=[...a.data.values()].map((l,c)=>i._parse(new ge(a,l,a.path,c)));return a.common.async?Promise.all(o).then(l=>s(l)):s(o)}min(e,t){return new Je({...this._def,minSize:{value:e,message:g.toString(t)}})}max(e,t){return new Je({...this._def,maxSize:{value:e,message:g.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Je.create=(r,e)=>new Je({valueType:r,minSize:null,maxSize:null,typeName:x.ZodSet,...w(e)});class Qe extends z{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.function)return m(t,{code:u.invalid_type,expected:y.function,received:t.parsedType}),v;function a(o,l){return Qt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Jt(),Xe].filter(c=>!!c),issueData:{code:u.invalid_arguments,argumentsError:l}})}function n(o,l){return Qt({data:o,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Jt(),Xe].filter(c=>!!c),issueData:{code:u.invalid_return_type,returnTypeError:l}})}const i={errorMap:t.common.contextualErrorMap},s=t.data;if(this._def.returns instanceof Ke){const o=this;return B(async function(...l){const c=new J([]),d=await o._def.args.parseAsync(l,i).catch(_=>{throw c.addIssue(a(l,_)),c}),f=await Reflect.apply(s,this,d);return await o._def.returns._def.type.parseAsync(f,i).catch(_=>{throw c.addIssue(n(f,_)),c})})}else{const o=this;return B(function(...l){const c=o._def.args.safeParse(l,i);if(!c.success)throw new J([a(l,c.error)]);const d=Reflect.apply(s,this,c.data),f=o._def.returns.safeParse(d,i);if(!f.success)throw new J([n(d,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Qe({...this._def,args:le.create(e).rest(Re.create())})}returns(e){return new Qe({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Qe({args:e||le.create([]).rest(Re.create()),returns:t||Re.create(),typeName:x.ZodFunction,...w(a)})}}class wa extends z{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})}}wa.create=(r,e)=>new wa({getter:r,typeName:x.ZodLazy,...w(e)});class ba extends z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return m(t,{received:t.data,code:u.invalid_literal,expected:this._def.value}),v}return{status:"valid",value:e.data}}get value(){return this._def.value}}ba.create=(r,e)=>new ba({value:r,typeName:x.ZodLiteral,...w(e)});function ka(r,e){return new Pe({values:r,typeName:x.ZodEnum,...w(e)})}class Pe extends z{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{expected:M.joinValues(a),received:t.parsedType,code:u.invalid_type}),v}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return m(t,{received:t.data,code:u.invalid_enum_value,options:a}),v}return B(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 Pe.create(e,{...this._def,...t})}exclude(e,t=this._def){return Pe.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Pe.create=ka;class Sa extends z{_parse(e){const t=M.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==y.string&&a.parsedType!==y.number){const n=M.objectValues(t);return m(a,{expected:M.joinValues(n),received:a.parsedType,code:u.invalid_type}),v}if(this._cache||(this._cache=new Set(M.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=M.objectValues(t);return m(a,{received:a.data,code:u.invalid_enum_value,options:n}),v}return B(e.data)}get enum(){return this._def.values}}Sa.create=(r,e)=>new Sa({values:r,typeName:x.ZodNativeEnum,...w(e)});class Ke extends z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==y.promise&&t.common.async===!1)return m(t,{code:u.invalid_type,expected:y.promise,received:t.parsedType}),v;const a=t.parsedType===y.promise?t.data:Promise.resolve(t.data);return B(a.then(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}Ke.create=(r,e)=>new Ke({type:r,typeName:x.ZodPromise,...w(e)});class Ie extends z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===x.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:s=>{m(a,s),s.fatal?t.abort():t.dirty()},get path(){return a.path}};if(i.addIssue=i.addIssue.bind(i),n.type==="preprocess"){const s=n.transform(a.data,i);if(a.common.async)return Promise.resolve(s).then(async o=>{if(t.value==="aborted")return v;const l=await this._def.schema._parseAsync({data:o,path:a.path,parent:a});return l.status==="aborted"?v:l.status==="dirty"||t.value==="dirty"?He(l.value):l});{if(t.value==="aborted")return v;const o=this._def.schema._parseSync({data:s,path:a.path,parent:a});return o.status==="aborted"?v:o.status==="dirty"||t.value==="dirty"?He(o.value):o}}if(n.type==="refinement"){const s=o=>{const l=n.refinement(o,i);if(a.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>o.status==="aborted"?v:(o.status==="dirty"&&t.dirty(),s(o.value).then(()=>({status:t.value,value:o.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Le(s))return v;const o=n.transform(s.value,i);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>Le(s)?Promise.resolve(n.transform(s.value,i)).then(o=>({status:t.value,value:o})):v);M.assertNever(n)}}Ie.create=(r,e,t)=>new Ie({schema:r,typeName:x.ZodEffects,effect:e,...w(t)}),Ie.createWithPreprocess=(r,e,t)=>new Ie({schema:e,effect:{type:"preprocess",transform:r},typeName:x.ZodEffects,...w(t)});class xe extends z{_parse(e){return this._getType(e)===y.undefined?B(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xe.create=(r,e)=>new xe({innerType:r,typeName:x.ZodOptional,...w(e)});class De extends z{_parse(e){return this._getType(e)===y.null?B(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}De.create=(r,e)=>new De({innerType:r,typeName:x.ZodNullable,...w(e)});class nr extends z{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===y.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}nr.create=(r,e)=>new nr({innerType:r,typeName:x.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...w(e)});class ir extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return xt(n)?n.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new J(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}ir.create=(r,e)=>new ir({innerType:r,typeName:x.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...w(e)});class za extends z{_parse(e){if(this._getType(e)!==y.nan){const a=this._getOrReturnCtx(e);return m(a,{code:u.invalid_type,expected:y.nan,received:a.parsedType}),v}return{status:"valid",value:e.data}}}za.create=r=>new za({typeName:x.ZodNaN,...w(r)});class ki extends z{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class sr extends z{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?v:i.status==="dirty"?(t.dirty(),He(i.value)):this._def.out._parseAsync({data:i.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?v:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,t){return new sr({in:e,out:t,typeName:x.ZodPipeline})}}class or extends z{_parse(e){const t=this._def.innerType._parse(e),a=n=>(Le(n)&&(n.value=Object.freeze(n.value)),n);return xt(t)?t.then(n=>a(n)):a(t)}unwrap(){return this._def.innerType}}or.create=(r,e)=>new or({innerType:r,typeName:x.ZodReadonly,...w(e)});var x;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(x||(x={}));const Ze=_e.create,b=Oe.create,Ma=er.create,Ea=tr.create;Re.create,ve.create;const St=rr.create,lr=ne.create,R=P.create;bt.create,kt.create;const Ca=le.create,ie=Qe.create;Pe.create;const Si=Ke.create;xe.create,De.create,R({pin:R({fade:Ma().optional(),maxCount:b().optional(),maxZoom:b().optional()}).optional(),animation:R({queue:R({limit:b().optional()}).optional()}).optional(),states:R({api:Ze().optional()}).optional(),log:R({api:Ze().optional()}).optional()});const cr=b().min(-90).max(90),ur=b().min(-180).max(180),zi=R({sw:R({lat:cr,lng:ur}),ne:R({lat:cr,lng:ur})}),dr=Ea().refine(r=>r instanceof HTMLElement,"Must be an HTMLElement"),Ta=R({mapSize:b(),zoomMin:b(),zoomMax:b(),zoomScale:b()}),Mi=R({instance:Ea(),inserted:ie().returns(Ma()),insert:ie().returns(St()),remove:ie().returns(St()),update:ie().args(b()).returns(St())}),Ei=R({parameters:Ta,getContainer:ie().args().returns(dr),getZoom:ie().args().returns(b()),getBounds:ie().args().returns(zi),panBy:ie().args(b(),b()).returns(St()),createMarker:ie().args(dr,cr,ur,b()).returns(Mi)}),pr=ie().args(Ze()).returns(Si(dr)),Ci=R({id:Ze().min(1),rank:b(),lat:b().min(-90).max(90),lng:b().min(-180).max(180),tooltip:R({style:R({width:b(),height:b(),margin:b(),radius:b()}).refine(r=>Math.min(r.width,r.height)/r.margin>=5,"Tooltip width and height must be at least 5 times the margin"),body:pr}),pin:R({style:R({width:b(),height:b(),radius:b()}),body:pr}).optional(),popup:R({style:R({width:b(),height:b(),radius:b(),margin:b()}),body:pr}).optional()}),Ti=lr(Ci);Ca([b(),lr(Ca([b(),b()]))]);const Ai=R({id:Ze(),rank:b(),lat:b(),lng:b(),width:b(),height:b(),margin:b()});R({key:Ze(),parameters:Ta,input:lr(Ai)});var et;(r=>{r.COUNT=12,r.DEFAULT=270,r.DEGREES=[0,30,60,90,120,150,180,210,240,270,300,330]})(et||(et={}));const Aa="https://arenarium.dev/api/public/v1/tooltip/states",Ni="https://arenarium.dev/api/public/v1/log";class Li{constructor(e,t,a){p(this,"key");p(this,"provider");p(this,"apiStatesUrl",Aa);p(this,"apiLogUrl",Ni);p(this,"markerDataArray",new Array);p(this,"markerDataMap",new Map);p(this,"markerDataUpdating",!1);p(this,"markerPinProcessor");p(this,"markerTooltipProcessor");p(this,"markerPopupProcessor");Ei.parse(t),this.key=e,this.provider=t,this.markerPinProcessor=new mr(t),this.markerTooltipProcessor=new Oi(t),this.markerPopupProcessor=new Ri(t),this.configuration=a}set configuration(e){var t,a,n;this.apiStatesUrl=((t=e==null?void 0:e.states)==null?void 0:t.api)??Aa,this.markerPinProcessor.setConfiguration(e),me.setLimit(((n=(a=e==null?void 0:e.animation)==null?void 0:a.queue)==null?void 0:n.limit)??8*navigator.hardwareConcurrency)}async updateMarkers(e){await Ti.parseAsync(e);try{const t={key:this.key,parameters:this.provider.parameters,input:e.map(i=>({id:i.id,rank:i.rank,lat:i.lat,lng:i.lng,width:i.tooltip.style.width,height:i.tooltip.style.height,margin:i.tooltip.style.margin}))},a=await fetch(this.apiStatesUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok||!a.body)throw new Error("Failed to get marker states");const n=await a.json();this.updateMarkerData(e,n),this.processMarkerDataCallback()}catch(t){throw console.error(t),this.log("[Error] Failed to update markers",{message:t.message,stack:t.stack}),t}}removeMarkers(){try{this.removeMarkerData()}catch(e){throw console.error(e),this.log("[Error] Failed to remove markers",{message:e.message,stack:e.stack}),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),this.log("[Error] Failed to show popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw 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),this.log("[Error] Failed to hide popup",{message:t.message,stack:t.stack});for(const a of this.markerDataArray)this.markerPopupProcessor.hide(a);throw t}}updateMarkerData(e,t){try{this.markerDataUpdating=!0;const a=new Map(e.map((i,s)=>[i.id,new Na(this.provider,i,t[s])])),n=Array.from(this.markerDataArray);for(const i of n)a.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 s=e[i],o=t[i],l=this.markerDataMap.get(s.id);if(l)l.update(o);else{const c=new Na(this.provider,s,o);c.create(),this.markerDataMap.set(s.id,c),this.markerDataArray.push(c)}}this.markerDataArray.sort((i,s)=>i.zoom-s.zoom),this.markerPinProcessor.updateElements(this.markerDataArray.map(i=>i.pin)),this.markerTooltipProcessor.updateElements(this.markerDataArray.map(i=>i.tooltip))}catch(a){throw console.error(a),this.markerDataArray.forEach(n=>n.remove()),this.markerDataArray.length=0,this.markerDataMap.clear(),a}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}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),this.log("[Error] Failed to process markers",{message:e.message,stack:e.stack})}}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){try{const a={title:e,content:t};await fetch(this.apiLogUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(a){console.error(a)}}}class Na{constructor(e,t,a){p(this,"marker");p(this,"zoom");p(this,"pin");p(this,"tooltip");this.marker=t,this.zoom=a[0],this.pin=new hr(e,t,a),this.tooltip=new yr(e,t,a)}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 fr{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,a=this.component;if(t==null||a==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 Be=class Be extends fr{constructor(t,a,n){var i,s,o,l;super(t,a);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=a.pin)==null?void 0:i.style.width)??Be.DEFAULT_SIZE,this.height=((s=a.pin)==null?void 0:s.style.height)??Be.DEFAULT_SIZE,this.radius=((o=a.pin)==null?void 0:o.style.radius)??Be.DEFAULT_SIZE,this.zoom=n[0],this.bodyCallback=(l=a.pin)==null?void 0:l.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("pin"),this.component=qt(Qn,{target:this.element,props:{id:this.id+"_pin",layer:Hn,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 a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateState(t){if(this.component==null)throw new Error("Failed to update pin state");this.component.setScale(this.getScale(t))}updateBody(){var a;if(this.bodyCallback==null||this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),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(Be,"DEFAULT_SIZE",16);let hr=Be;const Ve=class Ve{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,a,n;this.pinFade=((t=e==null?void 0:e.pin)==null?void 0:t.fade)??!0,this.pinMaxCount=((a=e==null?void 0:e.pin)==null?void 0:a.maxCount)??Math.max(Ve.MAP_PINS_MAX_COUNT,8*navigator.hardwareConcurrency),this.pinMaxZoomDelta=((n=e==null?void 0:e.pin)==null?void 0:n.maxZoom)??Ve.MAP_PINS_MAX_ZOOM}updateElements(e){this.pinElements=e,this.pinMaxWidth=e.reduce((t,a)=>Math.max(t,a.width),0),this.pinMaxHeight=e.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.pinElements.forEach(e=>e.remove()),this.pinElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ua(e,t,a,this.pinMaxWidth*2,this.pinMaxHeight*2);let i=0;for(const s of this.pinElements)n.contains(s.lat,s.lng)?s.shown&&t<=s.zoom&&s.zoom<=t+this.pinMaxZoomDelta?(i<this.pinMaxCount&&(this.pinFade==!0?s.updateState(t):s.setCollapsed(!1),s.updateMap(!0),s.isBodyLoaded()==!1&&s.updateBody()),i++):(s.setCollapsed(!0),s.isCollapsed()&&s.updateMap(!1)):s.updateMap(!1)}};p(Ve,"MAP_PINS_MAX_ZOOM",2),p(Ve,"MAP_PINS_MAX_COUNT",128);let mr=Ve;const zt=class zt extends fr{constructor(t,a,n){super(t,a);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=a.tooltip.style.width,this.height=a.tooltip.style.height,this.margin=a.tooltip.style.margin,this.radius=a.tooltip.style.radius,this.zoom=n[0],this.angle=et.DEFAULT,this.states=n[1].map(i=>[i[0],et.DEGREES[i[1]]]),this.bodyCallback=a.tooltip.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("tooltip"),this.component=qt(ca,{target:this.element,props:{id:this.id+"_tooltip",layer:Xn,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(a=>[a[0],et.DEGREES[a[1]]]),this.updateZIndex()}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.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 a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),this.bodyLoading=!1,this.bodyLoaded=!0}))}getAngle(t){const a=this.states.findLast(n=>n[0]<=t);if(!a)throw new Error("Angle not found");return a[1]}getZindex(){return Math.round((this.provider.parameters.zoomMax-this.zoom)*this.provider.parameters.zoomScale)+zt.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(zt,"Z_INDEX_OFFSET",1e6);let yr=zt;class Oi{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,a)=>Math.max(t,a.width),0),this.tooltipMaxHeight=this.tooltipElements.reduce((t,a)=>Math.max(t,a.height),0)}removeElements(){this.tooltipElements.forEach(e=>e.remove()),this.tooltipElements.length=0}process(e,t){const a=this.provider.parameters.mapSize,n=new ua(e,t,a,this.tooltipMaxWidth*2,this.tooltipMaxHeight*2);for(const i of this.tooltipElements)n.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 Mt=class Mt extends fr{constructor(t,a){if(a.popup==null)throw new Error("Failed to create popup");super(t,a);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=a.popup.style.width,this.height=a.popup.style.height,this.margin=a.popup.style.margin,this.radius=a.popup.style.radius,this.bodyCallback=a.popup.body}createElement(){this.element=document.createElement("div"),this.element.classList.add("popup"),this.component=qt(ca,{target:this.element,props:{id:this.id+"_popup",layer:Yn,priority:0,width:this.width,height:this.height,margin:this.margin,radius:this.radius}})}updateMap(t){var a;super.updateMap(t),(a=this.component)==null||a.setDisplayed(t)}updateBody(){var a;if(this.bodyLoaded||this.bodyLoading)return;const t=(a=this.component)==null?void 0:a.getBody();t!=null&&(this.bodyLoading=!0,this.bodyCallback(this.id).then(n=>{t.appendChild(n),this.bodyLoading=!1,this.bodyLoaded=!0}))}getZindex(){return Mt.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(Mt,"Z_INDEX_OFFSET",2e6);let gr=Mt;class Ri{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 gr(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 a of this.popupElements.values())if(a.shown){if(a.setCollapsed(!1),a.updateMap(!0),a.isExpanded()&&a.isBodyLoaded()==!1&&a.updateBody(),a.isCollapsed()==!1&&this.popupPositioned.get(a.id)==!1){const n=(e=a.component)==null?void 0:e.getBody();if(n==null)continue;const i=(t=a.component)==null?void 0:t.getOffsets();if(i==null)continue;const s=n.getBoundingClientRect();if(s.x==0&&s.y==0&&s.width==0&&s.height==0)continue;const o=s.x+s.width/2,l=s.y+s.height/2,c=o+i.offsetX,d=l+i.offsetY,f=c+a.width,h=d+a.height,_=this.provider.getContainer().getBoundingClientRect(),k=c-_.left,L=_.right-f,O=d-_.top,Q=_.bottom-h,E=Math.min(a.width,a.height)/4,W=k<0?k-E:L<0?-L+E:0,se=O<0?O-E:Q<0?-Q+E:0;this.provider.panBy(W,se),this.popupPositioned.set(a.id,!0)}}else a.setCollapsed(!0),a.isCollapsed()&&(a.updateMap(!1),a.remove(),this.popupElements.delete(a.id),this.popupPositioned.delete(a.id))}}const Et=class Et{constructor(e,t,a){p(this,"parameters",Et.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass({...a,style:a.style??"https://tiles.openfreemap.org/styles/liberty",pitchWithRotate:!1,attributionControl:{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(),a=e.getNorthEast();return{sw:t,ne:a}}panBy(e,t){this.map.panBy([e,t])}createMarker(e,t,a){const n=new this.MapMarkerClass({element:e});return n.setLngLat([a,t]),{instance:n,inserted:()=>n._map!=null,insert:()=>n.addTo(this.map),remove:()=>n.remove(),update:i=>n.getElement().style.zIndex=i.toString()}}};p(Et,"Parameters",{mapSize:512,zoomMin:0,zoomMax:24,zoomScale:10});let _r=Et;const ji={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}}]},Pi={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}}]},Ct=class Ct{constructor(e,t,a,n){p(this,"parameters",Ct.Parameters);p(this,"MapClass");p(this,"MapMarkerClass");p(this,"map");this.MapClass=e,this.MapMarkerClass=t,this.map=new this.MapClass(a,{...n})}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(),a=e.getNorthEast();return{sw:{lat:t.lat(),lng:t.lng()},ne:{lat:a.lat(),lng:a.lng()}}}panBy(e,t){this.map.panBy(e,t)}createMarker(e,t,a,n){const i=new this.MapMarkerClass({position:{lat:t,lng:a},content:e,zIndex:n});return{instance:i,inserted:()=>i.map!=null&&i.map==this.map,insert:()=>i.map=this.map,remove:()=>i.map=void 0,update:s=>i.zIndex=s}}};p(Ct,"Parameters",{mapSize:256,zoomMin:0,zoomMax:22,zoomScale:10});let vr=Ct;const Ii=[{elementType:"labels.icon",stylers:[{visibility:"off"}]},{stylers:[{saturation:-100},{lightness:-10}]},{featureType:"landscape",stylers:[{lightness:30}]},{featureType:"road",elementType:"geometry",stylers:[{saturation:-100}]}],Di=[{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}]}];S.GoogleMapDarkStyle=Di,S.GoogleMapLightStyle=Ii,S.GoogleMapsProvider=vr,S.MapLibreDarkStyle=ji,S.MapLibreLightStyle=Pi,S.MapLibreProvider=_r,S.MapManager=Li,Object.defineProperty(S,Symbol.toStringTag,{value:"Module"})});
|