@arenarium/maps 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(Vt,ni){typeof exports=="object"&&typeof module<"u"?ni(exports):typeof define=="function"&&define.amd?define(["exports"],ni):(Vt=typeof globalThis<"u"?globalThis:Vt||self,ni(Vt.arenarium={}))})(this,function(Vt){"use strict";var C0=Object.defineProperty;var Hg=Vt=>{throw TypeError(Vt)};var k0=(Vt,ni,ki)=>ni in Vt?C0(Vt,ni,{enumerable:!0,configurable:!0,writable:!0,value:ki}):Vt[ni]=ki;var Ts=(Vt,ni,ki)=>k0(Vt,typeof ni!="symbol"?ni+"":ni,ki),Wp=(Vt,ni,ki)=>ni.has(Vt)||Hg("Cannot "+ki);var Ft=(Vt,ni,ki)=>(Wp(Vt,ni,"read from private field"),ki?ki.call(Vt):ni.get(Vt)),wr=(Vt,ni,ki)=>ni.has(Vt)?Hg("Cannot add the same private member more than once"):ni instanceof WeakSet?ni.add(Vt):ni.set(Vt,ki),su=(Vt,ni,ki,ou)=>(Wp(Vt,ni,"write to private field"),ou?ou.call(Vt,ki):ni.set(Vt,ki),ki),Xg=(Vt,ni,ki)=>(Wp(Vt,ni,"access private method"),ki);var Va,So,Wl,Zu,Kg,hm,pa,Mo,Hl,zs;var ki=Array.isArray,ou=Array.prototype.indexOf,sd=Array.from,Jg=Object.defineProperty,wl=Object.getOwnPropertyDescriptor,Hp=Object.prototype,Qg=Array.prototype,Xp=Object.getPrototypeOf,Kp=Object.isExtensible;const e_=()=>{};function Yp(y){for(var m=0;m<y.length;m++)y[m]()}const _n=2,Jp=4,lu=8,od=16,aa=32,po=64,cu=128,$r=256,uu=512,Lr=1024,sa=2048,Ps=4096,oa=8192,hu=16384,t_=32768,du=65536,Qp=1<<19,ef=1<<20,ld=1<<21,pu=Symbol("$state");function tf(y){return y===this.v}function i_(y,m){return y!=y?m==m:y!==m||y!==null&&typeof y=="object"||typeof y=="function"}function rf(y){return!i_(y,this.v)}function r_(y){throw new Error("https://svelte.dev/e/effect_in_teardown")}function n_(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function a_(y){throw new Error("https://svelte.dev/e/effect_orphan")}function s_(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function o_(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function l_(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function c_(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let E0=!1;const u_=1,h_=2,d_=16,p_=1,f_=2,Fr=Symbol(),m_=[];function g_(y,m=!1){return fu(y,new Map,"",m_)}function fu(y,m,b,C,A=null){if(typeof y=="object"&&y!==null){var D=m.get(y);if(D!==void 0)return D;if(y instanceof Map)return new Map(y);if(y instanceof Set)return new Set(y);if(ki(y)){var S=Array(y.length);m.set(y,S),A!==null&&m.set(A,S);for(var o=0;o<y.length;o+=1){var le=y[o];o in y&&(S[o]=fu(le,m,b,C))}return S}if(Xp(y)===Hp){S={},m.set(y,S),A!==null&&m.set(A,S);for(var ue in y)S[ue]=fu(y[ue],m,b,C);return S}if(y instanceof Date)return structuredClone(y);if(typeof y.toJSON=="function")return fu(y.toJSON(),m,b,C,y)}if(y instanceof EventTarget)return y;try{return structuredClone(y)}catch{return y}}function __(y){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Br=null;function nf(y){Br=y}function mu(y,m=!1,b){var C=Br={p:Br,c:null,d:!1,e:null,m:!1,s:y,x:null,l:null};ff(()=>{C.d=!0})}function gu(y){const m=Br;if(m!==null){y!==void 0&&(m.x=y);const S=m.e;if(S!==null){var b=ci,C=Xt;m.e=null;try{for(var A=0;A<S.length;A++){var D=S[A];Da(D.effect),jn(D.reaction),vu(D.fn)}}finally{Da(b),jn(C)}}Br=m.p,m.m=!0}return y||{}}function af(){return!0}function la(y){if(typeof y!="object"||y===null||pu in y)return y;const m=Xp(y);if(m!==Hp&&m!==Qg)return y;var b=new Map,C=ki(y),A=Pi(0),D=Xt,S=o=>{var le=Xt;jn(D);var ue=o();return jn(le),ue};return C&&b.set("length",Pi(y.length)),new Proxy(y,{defineProperty(o,le,ue){(!("value"in ue)||ue.configurable===!1||ue.enumerable===!1||ue.writable===!1)&&o_();var _e=b.get(le);return _e===void 0?(_e=S(()=>Pi(ue.value)),b.set(le,_e)):ai(_e,S(()=>la(ue.value))),!0},deleteProperty(o,le){var ue=b.get(le);if(ue===void 0)le in o&&(b.set(le,S(()=>Pi(Fr))),cd(A));else{if(C&&typeof le=="string"){var _e=b.get("length"),Re=Number(le);Number.isInteger(Re)&&Re<_e.v&&ai(_e,Re)}ai(ue,Fr),cd(A)}return!0},get(o,le,ue){var ie;if(le===pu)return y;var _e=b.get(le),Re=le in o;if(_e===void 0&&(!Re||(ie=wl(o,le))!=null&&ie.writable)&&(_e=S(()=>Pi(la(Re?o[le]:Fr))),b.set(le,_e)),_e!==void 0){var xe=tt(_e);return xe===Fr?void 0:xe}return Reflect.get(o,le,ue)},getOwnPropertyDescriptor(o,le){var ue=Reflect.getOwnPropertyDescriptor(o,le);if(ue&&"value"in ue){var _e=b.get(le);_e&&(ue.value=tt(_e))}else if(ue===void 0){var Re=b.get(le),xe=Re==null?void 0:Re.v;if(Re!==void 0&&xe!==Fr)return{enumerable:!0,configurable:!0,value:xe,writable:!0}}return ue},has(o,le){var xe;if(le===pu)return!0;var ue=b.get(le),_e=ue!==void 0&&ue.v!==Fr||Reflect.has(o,le);if(ue!==void 0||ci!==null&&(!_e||(xe=wl(o,le))!=null&&xe.writable)){ue===void 0&&(ue=S(()=>Pi(_e?la(o[le]):Fr)),b.set(le,ue));var Re=tt(ue);if(Re===Fr)return!1}return _e},set(o,le,ue,_e){var Rt;var Re=b.get(le),xe=le in o;if(C&&le==="length")for(var ie=ue;ie<Re.v;ie+=1){var De=b.get(ie+"");De!==void 0?ai(De,Fr):ie in o&&(De=S(()=>Pi(Fr)),b.set(ie+"",De))}Re===void 0?(!xe||(Rt=wl(o,le))!=null&&Rt.writable)&&(Re=S(()=>Pi(void 0)),ai(Re,S(()=>la(ue))),b.set(le,Re)):(xe=Re.v!==Fr,ai(Re,S(()=>la(ue))));var gt=Reflect.getOwnPropertyDescriptor(o,le);if(gt!=null&>.set&>.set.call(_e,ue),!xe){if(C&&typeof le=="string"){var $t=b.get("length"),_t=Number(le);Number.isInteger(_t)&&_t>=$t.v&&ai($t,_t+1)}cd(A)}return!0},ownKeys(o){tt(A);var le=Reflect.ownKeys(o).filter(Re=>{var xe=b.get(Re);return xe===void 0||xe.v!==Fr});for(var[ue,_e]of b)_e.v!==Fr&&!(ue in o)&&le.push(ue);return le},setPrototypeOf(){l_()}})}function cd(y,m=1){ai(y,y.v+m)}function ud(y){var m=_n|sa,b=Xt!==null&&(Xt.f&_n)!==0?Xt:null;return ci===null||b!==null&&(b.f&$r)!==0?m|=$r:ci.f|=ef,{ctx:Br,deps:null,effects:null,equals:tf,f:m,fn:y,reactions:null,rv:0,v:null,wv:0,parent:b??ci}}function _u(y){const m=ud(y);return Sf(m),m}function y_(y){const m=ud(y);return m.equals=rf,m}function sf(y){var m=y.effects;if(m!==null){y.effects=null;for(var b=0;b<m.length;b+=1)ca(m[b])}}function x_(y){for(var m=y.parent;m!==null;){if((m.f&_n)===0)return m;m=m.parent}return null}function of(y){var m,b=ci;Da(x_(y));try{sf(y),m=Ef(y)}finally{Da(b)}return m}function lf(y){var m=of(y),b=(La||(y.f&$r)!==0)&&y.deps!==null?Ps:Lr;yn(y,b),y.equals(m)||(y.v=m,y.wv=If())}const Tl=new Map;function fo(y,m){var b={f:0,v:y,reactions:null,equals:tf,rv:0,wv:0};return b}function Pi(y,m){const b=fo(y);return Sf(b),b}function v_(y,m=!1){const b=fo(y);return m||(b.equals=rf),b}function ai(y,m,b=!1){Xt!==null&&!On&&af()&&(Xt.f&(_n|od))!==0&&!(Tr!=null&&Tr.includes(y))&&c_();let C=b?la(m):m;return cf(y,C)}function cf(y,m){if(!y.equals(m)){var b=y.v;Il?Tl.set(y,m):Tl.set(y,b),y.v=m,(y.f&_n)!==0&&((y.f&sa)!==0&&of(y),yn(y,(y.f&$r)===0?Lr:Ps)),y.wv=If(),uf(y,sa),ci!==null&&(ci.f&Lr)!==0&&(ci.f&(aa|po))===0&&(sn===null?A_([y]):sn.push(y))}return m}function uf(y,m){var b=y.reactions;if(b!==null)for(var C=b.length,A=0;A<C;A++){var D=b[A],S=D.f;(S&sa)===0&&(yn(D,m),(S&(Lr|$r))!==0&&((S&_n)!==0?uf(D,Ps):Eu(D)))}}let b_=!1;var hd,hf,df,pf;function w_(){if(hd===void 0){hd=window,hf=/Firefox/.test(navigator.userAgent);var y=Element.prototype,m=Node.prototype,b=Text.prototype;df=wl(m,"firstChild").get,pf=wl(m,"nextSibling").get,Kp(y)&&(y.__click=void 0,y.__className=void 0,y.__attributes=null,y.__style=void 0,y.__e=void 0),Kp(b)&&(b.__t=void 0)}}function dd(y=""){return document.createTextNode(y)}function yu(y){return df.call(y)}function xu(y){return pf.call(y)}function Pl(y,m){return yu(y)}function T_(y,m){{var b=yu(y);return b instanceof Comment&&b.data===""?xu(b):b}}function pd(y,m=1,b=!1){let C=y;for(;m--;)C=xu(C);return C}function P_(y){y.textContent=""}function S_(y){ci===null&&Xt===null&&a_(),Xt!==null&&(Xt.f&$r)!==0&&ci===null&&n_(),Il&&r_()}function M_(y,m){var b=m.last;b===null?m.last=m.first=y:(b.next=y,y.prev=b,m.last=y)}function mo(y,m,b,C=!0){var A=ci,D={ctx:Br,deps:null,nodes_start:null,nodes_end:null,f:y|sa,first:null,fn:m,last:null,next:null,parent:A,prev:null,teardown:null,transitions:null,wv:0};if(b)try{gd(D),D.f|=t_}catch(le){throw ca(D),le}else m!==null&&Eu(D);var S=b&&D.deps===null&&D.first===null&&D.nodes_start===null&&D.teardown===null&&(D.f&(ef|cu))===0;if(!S&&C&&(A!==null&&M_(D,A),Xt!==null&&(Xt.f&_n)!==0)){var o=Xt;(o.effects??(o.effects=[])).push(D)}return D}function ff(y){const m=mo(lu,null,!1);return yn(m,Lr),m.teardown=y,m}function go(y){S_();var m=ci!==null&&(ci.f&aa)!==0&&Br!==null&&!Br.m;if(m){var b=Br;(b.e??(b.e=[])).push({fn:y,effect:ci,reaction:Xt})}else{var C=vu(y);return C}}function I_(y){const m=mo(po,y,!0);return(b={})=>new Promise(C=>{b.outro?wu(m,()=>{ca(m),C(void 0)}):(ca(m),C(void 0))})}function vu(y){return mo(Jp,y,!1)}function mf(y){return mo(lu,y,!0)}function bu(y,m=[],b=ud){const C=m.map(b);return Sl(()=>y(...C.map(tt)))}function Sl(y,m=0){return mo(lu|od|m,y,!0)}function _o(y,m=!0){return mo(lu|aa,y,!0,m)}function gf(y){var m=y.teardown;if(m!==null){const b=Il,C=Xt;Pf(!0),jn(null);try{m.call(null)}finally{Pf(b),jn(C)}}}function _f(y,m=!1){var b=y.first;for(y.first=y.last=null;b!==null;){var C=b.next;(b.f&po)!==0?b.parent=null:ca(b,m),b=C}}function C_(y){for(var m=y.first;m!==null;){var b=m.next;(m.f&aa)===0&&ca(m),m=b}}function ca(y,m=!0){var b=!1;(m||(y.f&Qp)!==0)&&y.nodes_start!==null&&(k_(y.nodes_start,y.nodes_end),b=!0),_f(y,m&&!b),ku(y,0),yn(y,hu);var C=y.transitions;if(C!==null)for(const D of C)D.stop();gf(y);var A=y.parent;A!==null&&A.first!==null&&yf(y),y.next=y.prev=y.teardown=y.ctx=y.deps=y.fn=y.nodes_start=y.nodes_end=null}function k_(y,m){for(;y!==null;){var b=y===m?null:xu(y);y.remove(),y=b}}function yf(y){var m=y.parent,b=y.prev,C=y.next;b!==null&&(b.next=C),C!==null&&(C.prev=b),m!==null&&(m.first===y&&(m.first=C),m.last===y&&(m.last=b))}function wu(y,m){var b=[];fd(y,b,!0),xf(b,()=>{ca(y),m&&m()})}function xf(y,m){var b=y.length;if(b>0){var C=()=>--b||m();for(var A of y)A.out(C)}else m()}function fd(y,m,b){if((y.f&oa)===0){if(y.f^=oa,y.transitions!==null)for(const S of y.transitions)(S.is_global||b)&&m.push(S);for(var C=y.first;C!==null;){var A=C.next,D=(C.f&du)!==0||(C.f&aa)!==0;fd(C,m,D?b:!1),C=A}}}function Tu(y){vf(y,!0)}function vf(y,m){if((y.f&oa)!==0){y.f^=oa,(y.f&Lr)===0&&(y.f^=Lr),kl(y)&&(yn(y,sa),Eu(y));for(var b=y.first;b!==null;){var C=b.next,A=(b.f&du)!==0||(b.f&aa)!==0;vf(b,A?m:!1),b=C}if(y.transitions!==null)for(const D of y.transitions)(D.is_global||m)&&D.in()}}let Ml=[],md=[];function bf(){var y=Ml;Ml=[],Yp(y)}function E_(){var y=md;md=[],Yp(y)}function wf(y){Ml.length===0&&queueMicrotask(bf),Ml.push(y)}function Tf(){Ml.length>0&&bf(),md.length>0&&E_()}let Pu=!1,Su=!1,Mu=null,Ss=!1,Il=!1;function Pf(y){Il=y}let Cl=[],A0=[],Xt=null,On=!1;function jn(y){Xt=y}let ci=null;function Da(y){ci=y}let Tr=null;function Sf(y){Xt!==null&&Xt.f&ld&&(Tr===null?Tr=[y]:Tr.push(y))}let Pr=null,Gr=0,sn=null;function A_(y){sn=y}let Mf=1,Iu=0,La=!1;function If(){return++Mf}function kl(y){var Re;var m=y.f;if((m&sa)!==0)return!0;if((m&Ps)!==0){var b=y.deps,C=(m&$r)!==0;if(b!==null){var A,D,S=(m&uu)!==0,o=C&&ci!==null&&!La,le=b.length;if(S||o){var ue=y,_e=ue.parent;for(A=0;A<le;A++)D=b[A],(S||!((Re=D==null?void 0:D.reactions)!=null&&Re.includes(ue)))&&(D.reactions??(D.reactions=[])).push(ue);S&&(ue.f^=uu),o&&_e!==null&&(_e.f&$r)===0&&(ue.f^=$r)}for(A=0;A<le;A++)if(D=b[A],kl(D)&&lf(D),D.wv>y.wv)return!0}(!C||ci!==null&&!La)&&yn(y,Lr)}return!1}function z_(y,m){for(var b=m;b!==null;){if((b.f&cu)!==0)try{b.fn(y);return}catch{b.f^=cu}b=b.parent}throw Pu=!1,y}function Cf(y){return(y.f&hu)===0&&(y.parent===null||(y.parent.f&cu)===0)}function Cu(y,m,b,C){if(Pu){if(b===null&&(Pu=!1),Cf(m))throw y;return}if(b!==null&&(Pu=!0),z_(y,m),Cf(m))throw y}function kf(y,m,b=!0){var C=y.reactions;if(C!==null)for(var A=0;A<C.length;A++){var D=C[A];Tr!=null&&Tr.includes(y)||((D.f&_n)!==0?kf(D,m,!1):m===D&&(b?yn(D,sa):(D.f&Lr)!==0&&yn(D,Ps),Eu(D)))}}function Ef(y){var ie;var m=Pr,b=Gr,C=sn,A=Xt,D=La,S=Tr,o=Br,le=On,ue=y.f;Pr=null,Gr=0,sn=null,La=(ue&$r)!==0&&(On||!Ss||Xt===null),Xt=(ue&(aa|po))===0?y:null,Tr=null,nf(y.ctx),On=!1,Iu++,y.f|=ld;try{var _e=(0,y.fn)(),Re=y.deps;if(Pr!==null){var xe;if(ku(y,Gr),Re!==null&&Gr>0)for(Re.length=Gr+Pr.length,xe=0;xe<Pr.length;xe++)Re[Gr+xe]=Pr[xe];else y.deps=Re=Pr;if(!La)for(xe=Gr;xe<Re.length;xe++)((ie=Re[xe]).reactions??(ie.reactions=[])).push(y)}else Re!==null&&Gr<Re.length&&(ku(y,Gr),Re.length=Gr);if(af()&&sn!==null&&!On&&Re!==null&&(y.f&(_n|Ps|sa))===0)for(xe=0;xe<sn.length;xe++)kf(sn[xe],y);return A!==null&&A!==y&&(Iu++,sn!==null&&(C===null?C=sn:C.push(...sn))),_e}finally{Pr=m,Gr=b,sn=C,Xt=A,La=D,Tr=S,nf(o),On=le,y.f^=ld}}function R_(y,m){let b=m.reactions;if(b!==null){var C=ou.call(b,y);if(C!==-1){var A=b.length-1;A===0?b=m.reactions=null:(b[C]=b[A],b.pop())}}b===null&&(m.f&_n)!==0&&(Pr===null||!Pr.includes(m))&&(yn(m,Ps),(m.f&($r|uu))===0&&(m.f^=uu),sf(m),ku(m,0))}function ku(y,m){var b=y.deps;if(b!==null)for(var C=m;C<b.length;C++)R_(y,b[C])}function gd(y){var m=y.f;if((m&hu)===0){yn(y,Lr);var b=ci,C=Br,A=Ss;ci=y,Ss=!0;try{(m&od)!==0?C_(y):_f(y),gf(y);var D=Ef(y);y.teardown=typeof D=="function"?D:null,y.wv=Mf;var S=y.deps,o}catch(le){Cu(le,y,b,C||y.ctx)}finally{Ss=A,ci=b}}}function D_(){try{s_()}catch(y){if(Mu!==null)Cu(y,Mu,null);else throw y}}function Af(){var y=Ss;try{var m=0;for(Ss=!0;Cl.length>0;){m++>1e3&&D_();var b=Cl,C=b.length;Cl=[];for(var A=0;A<C;A++){var D=F_(b[A]);L_(D)}Tl.clear()}}finally{Su=!1,Ss=y,Mu=null}}function L_(y){var m=y.length;if(m!==0)for(var b=0;b<m;b++){var C=y[b];if((C.f&(hu|oa))===0)try{kl(C)&&(gd(C),C.deps===null&&C.first===null&&C.nodes_start===null&&(C.teardown===null?yf(C):C.fn=null))}catch(A){Cu(A,C,null,C.ctx)}}}function Eu(y){Su||(Su=!0,queueMicrotask(Af));for(var m=Mu=y;m.parent!==null;){m=m.parent;var b=m.f;if((b&(po|aa))!==0){if((b&Lr)===0)return;m.f^=Lr}}Cl.push(m)}function F_(y){for(var m=[],b=y;b!==null;){var C=b.f,A=(C&(aa|po))!==0,D=A&&(C&Lr)!==0;if(!D&&(C&oa)===0){if((C&Jp)!==0)m.push(b);else if(A)b.f^=Lr;else{var S=Xt;try{Xt=b,kl(b)&&gd(b)}catch(ue){Cu(ue,b,null,b.ctx)}finally{Xt=S}}var o=b.first;if(o!==null){b=o;continue}}var le=b.parent;for(b=b.next;b===null&&le!==null;)b=le.next,le=le.parent}return m}function B_(y){var m;for(Tf();Cl.length>0;)Su=!0,Af(),Tf();return m}async function O_(){await Promise.resolve(),B_()}function tt(y){var m=y.f,b=(m&_n)!==0;if(Xt!==null&&!On){if(!(Tr!=null&&Tr.includes(y))){var C=Xt.deps;y.rv<Iu&&(y.rv=Iu,Pr===null&&C!==null&&C[Gr]===y?Gr++:Pr===null?Pr=[y]:(!La||!Pr.includes(y))&&Pr.push(y))}}else if(b&&y.deps===null&&y.effects===null){var A=y,D=A.parent;D!==null&&(D.f&$r)===0&&(A.f^=$r)}return b&&(A=y,kl(A)&&lf(A)),Il&&Tl.has(y)?Tl.get(y):y.v}function _d(y){var m=On;try{return On=!0,y()}finally{On=m}}const j_=-7169;function yn(y,m){y.f=y.f&j_|m}const N_=["touchstart","touchmove"];function Z_(y){return N_.includes(y)}function V_(y){var m=Xt,b=ci;jn(null),Da(null);try{return y()}finally{jn(m),Da(b)}}const zf=new Set,yd=new Set;function U_(y,m,b,C={}){function A(D){if(C.capture||El.call(m,D),!D.cancelBubble)return V_(()=>b==null?void 0:b.call(this,D))}return y.startsWith("pointer")||y.startsWith("touch")||y==="wheel"?wf(()=>{m.addEventListener(y,A,C)}):m.addEventListener(y,A,C),A}function $_(y,m,b,C,A){var D={capture:C,passive:A},S=U_(y,m,b,D);(m===document.body||m===window||m===document)&&ff(()=>{m.removeEventListener(y,S,D)})}function G_(y){for(var m=0;m<y.length;m++)zf.add(y[m]);for(var b of yd)b(y)}function El(y){var Rt;var m=this,b=m.ownerDocument,C=y.type,A=((Rt=y.composedPath)==null?void 0:Rt.call(y))||[],D=A[0]||y.target,S=0,o=y.__root;if(o){var le=A.indexOf(o);if(le!==-1&&(m===document||m===window)){y.__root=m;return}var ue=A.indexOf(m);if(ue===-1)return;le<=ue&&(S=le)}if(D=A[S]||y.target,D!==m){Jg(y,"currentTarget",{configurable:!0,get(){return D||b}});var _e=Xt,Re=ci;jn(null),Da(null);try{for(var xe,ie=[];D!==null;){var De=D.assignedSlot||D.parentNode||D.host||null;try{var gt=D["__"+C];if(gt!=null&&(!D.disabled||y.target===D))if(ki(gt)){var[$t,..._t]=gt;$t.apply(D,[y,..._t])}else gt.call(D,y)}catch(Mi){xe?ie.push(Mi):xe=Mi}if(y.cancelBubble||De===m||De===null)break;D=De}if(xe){for(let Mi of ie)queueMicrotask(()=>{throw Mi});throw xe}}finally{y.__root=m,delete y.currentTarget,jn(_e),Da(Re)}}}function q_(y){var m;m=document.head.appendChild(dd());try{Sl(()=>y(m),Qp)}finally{}}function W_(y){var m=document.createElement("template");return m.innerHTML=y,m.content}function Rf(y,m){var b=ci;b.nodes_start===null&&(b.nodes_start=y,b.nodes_end=m)}function Ms(y,m){var b=(m&p_)!==0,C=(m&f_)!==0,A,D=!y.startsWith("<!>");return()=>{A===void 0&&(A=W_(D?y:"<!>"+y),b||(A=yu(A)));var S=C||hf?document.importNode(A,!0):A.cloneNode(!0);if(b){var o=yu(S),le=S.lastChild;Rf(o,le)}else Rf(S,S);return S}}function Is(y,m){y!==null&&y.before(m)}function H_(y,m){return X_(y,m)}const yo=new Map;function X_(y,{target:m,anchor:b,props:C={},events:A,context:D,intro:S=!0}){w_();var o=new Set,le=Re=>{for(var xe=0;xe<Re.length;xe++){var ie=Re[xe];if(!o.has(ie)){o.add(ie);var De=Z_(ie);m.addEventListener(ie,El,{passive:De});var gt=yo.get(ie);gt===void 0?(document.addEventListener(ie,El,{passive:De}),yo.set(ie,1)):yo.set(ie,gt+1)}}};le(sd(zf)),yd.add(le);var ue=void 0,_e=I_(()=>{var Re=b??m.appendChild(dd());return _o(()=>{if(D){mu({});var xe=Br;xe.c=D}A&&(C.$$events=A),ue=y(Re,C)||{},D&&gu()}),()=>{var De;for(var xe of o){m.removeEventListener(xe,El);var ie=yo.get(xe);--ie===0?(document.removeEventListener(xe,El),yo.delete(xe)):yo.set(xe,ie)}yd.delete(le),Re!==b&&((De=Re.parentNode)==null||De.removeChild(Re))}});return xd.set(ue,_e),ue}let xd=new WeakMap;function K_(y,m){const b=xd.get(y);return b?(xd.delete(y),b(m)):Promise.resolve()}function Y_(y,m,[b,C]=[0,0]){var A=y,D=null,S=null,o=Fr,le=b>0?du:0,ue=!1;const _e=(xe,ie=!0)=>{ue=!0,Re(ie,xe)},Re=(xe,ie)=>{o!==(o=xe)&&(o?(D?Tu(D):ie&&(D=_o(()=>ie(A))),S&&wu(S,()=>{S=null})):(S?Tu(S):ie&&(S=_o(()=>ie(A,[b+1,C]))),D&&wu(D,()=>{D=null})))};Sl(()=>{ue=!1,m(_e),ue||Re(null,null)},le)}function J_(y,m,b,C){for(var A=[],D=m.length,S=0;S<D;S++)fd(m[S].e,A,!0);var o=D>0&&A.length===0&&b!==null;if(o){var le=b.parentNode;P_(le),le.append(b),C.clear(),Fa(y,m[0].prev,m[D-1].next)}xf(A,()=>{for(var ue=0;ue<D;ue++){var _e=m[ue];o||(C.delete(_e.k),Fa(y,_e.prev,_e.next)),ca(_e.e,!o)}})}function Q_(y,m,b,C,A,D=null){var S=y,o={flags:m,items:new Map,first:null};{var le=y;S=le.appendChild(dd())}var ue=null,_e=!1,Re=y_(()=>{var xe=b();return ki(xe)?xe:xe==null?[]:sd(xe)});Sl(()=>{var xe=tt(Re),ie=xe.length;_e&&ie===0||(_e=ie===0,ey(xe,o,S,A,m,C,b),D!==null&&(ie===0?ue?Tu(ue):ue=_o(()=>D(S)):ue!==null&&wu(ue,()=>{ue=null})),tt(Re))})}function ey(y,m,b,C,A,D,S){var o=y.length,le=m.items,ue=m.first,_e=ue,Re,xe=null,ie=[],De=[],gt,$t,_t,Rt;for(Rt=0;Rt<o;Rt+=1){if(gt=y[Rt],$t=D(gt,Rt),_t=le.get($t),_t===void 0){var Mi=_e?_e.e.nodes_start:b;xe=iy(Mi,m,xe,xe===null?m.first:xe.next,gt,$t,Rt,C,A,S),le.set($t,xe),ie=[],De=[],_e=xe.next;continue}if(ty(_t,gt,Rt),(_t.e.f&oa)!==0&&Tu(_t.e),_t!==_e){if(Re!==void 0&&Re.has(_t)){if(ie.length<De.length){var Jt=De[0],pi;xe=Jt.prev;var Bt=ie[0],vt=ie[ie.length-1];for(pi=0;pi<ie.length;pi+=1)Df(ie[pi],Jt,b);for(pi=0;pi<De.length;pi+=1)Re.delete(De[pi]);Fa(m,Bt.prev,vt.next),Fa(m,xe,Bt),Fa(m,vt,Jt),_e=Jt,xe=vt,Rt-=1,ie=[],De=[]}else Re.delete(_t),Df(_t,_e,b),Fa(m,_t.prev,_t.next),Fa(m,_t,xe===null?m.first:xe.next),Fa(m,xe,_t),xe=_t;continue}for(ie=[],De=[];_e!==null&&_e.k!==$t;)(_e.e.f&oa)===0&&(Re??(Re=new Set)).add(_e),De.push(_e),_e=_e.next;if(_e===null)continue;_t=_e}ie.push(_t),xe=_t,_e=_t.next}if(_e!==null||Re!==void 0){for(var Ot=Re===void 0?[]:sd(Re);_e!==null;)(_e.e.f&oa)===0&&Ot.push(_e),_e=_e.next;var rr=Ot.length;if(rr>0){var on=o===0?b:null;J_(m,Ot,on,le)}}ci.first=m.first&&m.first.e,ci.last=xe&&xe.e}function ty(y,m,b,C){cf(y.v,m),y.i=b}function iy(y,m,b,C,A,D,S,o,le,ue){var _e=(le&u_)!==0,Re=(le&d_)===0,xe=_e?Re?v_(A):fo(A):A,ie=(le&h_)===0?S:fo(S),De={i:ie,v:xe,k:D,a:null,e:null,prev:b,next:C};try{return De.e=_o(()=>o(y,xe,ie,ue),b_),De.e.prev=b&&b.e,De.e.next=C&&C.e,b===null?m.first=De:(b.next=De,b.e.next=De.e),C!==null&&(C.prev=De,C.e.prev=De.e),De}finally{}}function Df(y,m,b){for(var C=y.next?y.next.e.nodes_start:b,A=m?m.e.nodes_start:b,D=y.e.nodes_start;D!==C;){var S=xu(D);A.before(D),D=S}}function Fa(y,m,b){m===null?y.first=b:(m.next=b,m.e.next=b&&b.e),b!==null&&(b.prev=m,b.e.prev=m&&m.e)}function ry(y,m,...b){var C=y,A=e_,D;Sl(()=>{A!==(A=m())&&(D&&(ca(D),D=null),D=_o(()=>A(C,...b)))},du)}const Lf=[...`
|
|
2
|
-
\r\f \v\uFEFF`];function ny(y,m,b){var C=y==null?"":""+y;if(b){for(var A in b)if(b[A])C=C?C+" "+A:A;else if(C.length)for(var D=A.length,S=0;(S=C.indexOf(A,S))>=0;){var o=S+D;(S===0||Lf.includes(C[S-1]))&&(o===C.length||Lf.includes(C[o]))?C=(S===0?"":C.substring(0,S))+C.substring(o+1):S=o}}return C===""?null:C}function Ff(y,m=!1){var b=m?" !important;":";",C="";for(var A in y){var D=y[A];D!=null&&D!==""&&(C+=" "+A+": "+D+b)}return C}function vd(y){return y[0]!=="-"||y[1]!=="-"?y.toLowerCase():y}function ay(y,m){if(m){var b="",C,A;if(Array.isArray(m)?(C=m[0],A=m[1]):C=m,y){y=String(y).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var D=!1,S=0,o=!1,le=[];C&&le.push(...Object.keys(C).map(vd)),A&&le.push(...Object.keys(A).map(vd));var ue=0,_e=-1;const gt=y.length;for(var Re=0;Re<gt;Re++){var xe=y[Re];if(o?xe==="/"&&y[Re-1]==="*"&&(o=!1):D?D===xe&&(D=!1):xe==="/"&&y[Re+1]==="*"?o=!0:xe==='"'||xe==="'"?D=xe:xe==="("?S++:xe===")"&&S--,!o&&D===!1&&S===0){if(xe===":"&&_e===-1)_e=Re;else if(xe===";"||Re===gt-1){if(_e!==-1){var ie=vd(y.substring(ue,_e).trim());if(!le.includes(ie)){xe!==";"&&Re++;var De=y.substring(ue,Re).trim();b+=" "+De+";"}}ue=Re+1,_e=-1}}}}return C&&(b+=Ff(C)),A&&(b+=Ff(A,!0)),b=b.trim(),b===""?null:b}return y==null?null:String(y)}function Bf(y,m,b,C,A,D){var S=y.__className;if(S!==b||S===void 0){var o=ny(b,C,D);o==null?y.removeAttribute("class"):y.className=o,y.__className=b}else if(D&&A!==D)for(var le in D){var ue=!!D[le];(A==null||ue!==!!A[le])&&y.classList.toggle(le,ue)}return D}function bd(y,m={},b,C){for(var A in b){var D=b[A];m[A]!==D&&(b[A]==null?y.style.removeProperty(A):y.style.setProperty(A,D,C))}}function Au(y,m,b,C){var A=y.__style;if(A!==m){var D=ay(m,C);D==null?y.removeAttribute("style"):y.style.cssText=D,y.__style=m}else C&&(Array.isArray(C)?(bd(y,b==null?void 0:b[0],C[0]),bd(y,b==null?void 0:b[1],C[1],"important")):bd(y,b,C));return C}const sy=()=>performance.now(),Nn={tick:y=>requestAnimationFrame(y),now:()=>sy(),tasks:new Set};function Of(){const y=Nn.now();Nn.tasks.forEach(m=>{m.c(y)||(Nn.tasks.delete(m),m.f())}),Nn.tasks.size!==0&&Nn.tick(Of)}function oy(y){let m;return Nn.tasks.size===0&&Nn.tick(Of),{promise:new Promise(b=>{Nn.tasks.add(m={c:y,f:b})}),abort(){Nn.tasks.delete(m)}}}const Vu=class Vu{constructor(m){wr(this,Zu);wr(this,Va,new WeakMap);wr(this,So);wr(this,Wl);su(this,Wl,m)}observe(m,b){var C=Ft(this,Va).get(m)||new Set;return C.add(b),Ft(this,Va).set(m,C),Xg(this,Zu,Kg).call(this).observe(m,Ft(this,Wl)),()=>{var A=Ft(this,Va).get(m);A.delete(b),A.size===0&&(Ft(this,Va).delete(m),Ft(this,So).unobserve(m))}}};Va=new WeakMap,So=new WeakMap,Wl=new WeakMap,Zu=new WeakSet,Kg=function(){return Ft(this,So)??su(this,So,new ResizeObserver(m=>{for(var b of m){Vu.entries.set(b.target,b);for(var C of Ft(this,Va).get(b.target)||[])C(b)}}))},Ts(Vu,"entries",new WeakMap);let wd=Vu;var ly=new wd({box:"border-box"});function jf(y,m,b){var C=ly.observe(y,()=>b(y[m]));vu(()=>(_d(()=>b(y[m])),C))}function Nf(y,m){return y===m||(y==null?void 0:y[pu])===m}function Ba(y={},m,b,C){return vu(()=>{var A,D;return mf(()=>{A=D,D=(C==null?void 0:C())||[],_d(()=>{y!==b(...D)&&(m(y,...D),A&&Nf(b(...A),y)&&m(null,...A))})}),()=>{wf(()=>{D&&Nf(b(...D),y)&&m(null,...D)})}}),y}function Zf(y){Br===null&&__(),go(()=>{const m=_d(y);if(typeof m=="function")return m})}const cy="5";typeof window<"u"&&((hm=window.__svelte??(window.__svelte={})).v??(hm.v=new Set)).add(cy);function Vf(y){return Object.prototype.toString.call(y)==="[object Date]"}function uy(y){return y}function hy(y){return-.5*(Math.cos(Math.PI*y)-1)}function Td(y,m){if(y===m||y!==y)return()=>y;const b=typeof y;if(b!==typeof m||Array.isArray(y)!==Array.isArray(m))throw new Error("Cannot interpolate values of different type");if(Array.isArray(y)){const C=m.map((A,D)=>Td(y[D],A));return A=>C.map(D=>D(A))}if(b==="object"){if(!y||!m)throw new Error("Object cannot be null");if(Vf(y)&&Vf(m)){const D=y.getTime(),o=m.getTime()-D;return le=>new Date(D+le*o)}const C=Object.keys(m),A={};return C.forEach(D=>{A[D]=Td(y[D],m[D])}),D=>{const S={};return C.forEach(o=>{S[o]=A[o](D)}),S}}if(b==="number"){const C=m-y;return A=>y+A*C}return()=>m}const Rd=class Rd{constructor(m,b={}){wr(this,pa,fo(void 0));wr(this,Mo,fo(void 0));wr(this,Hl);wr(this,zs,null);Ft(this,pa).v=Ft(this,Mo).v=m,su(this,Hl,b)}static of(m,b){const C=new Rd(m(),b);return mf(()=>{C.set(m())}),C}set(m,b){var Re;ai(Ft(this,Mo),m);let{delay:C=0,duration:A=400,easing:D=uy,interpolate:S=Td}={...Ft(this,Hl),...b};if(A===0)return(Re=Ft(this,zs))==null||Re.abort(),ai(Ft(this,pa),m),Promise.resolve();const o=Nn.now()+C;let le,ue=!1,_e=Ft(this,zs);return su(this,zs,oy(xe=>{if(xe<o)return!0;if(!ue){ue=!0;const De=Ft(this,pa).v;le=S(De,m),typeof A=="function"&&(A=A(De,m)),_e==null||_e.abort()}const ie=xe-o;return ie>A?(ai(Ft(this,pa),m),!1):(ai(Ft(this,pa),le(D(ie/A))),!0)})),Ft(this,zs).promise}get current(){return tt(Ft(this,pa))}get target(){return tt(Ft(this,Mo))}set target(m){this.set(m)}};pa=new WeakMap,Mo=new WeakMap,Hl=new WeakMap,zs=new WeakMap;let Pd=Rd;function Uf(y,m,b){const C=b*(Math.PI/180),A=y/2,D=m/2,S=Math.sqrt(A*A+D*D),o=Math.atan(D/A)*(180/Math.PI),le=o,ue=180-o,_e=180+o,Re=360-o;switch(!0){case(le<=b&&b<=ue):return{offsetX:S*Math.cos(C)-A,offsetY:0};case(ue<=b&&b<=_e):return{offsetX:-y,offsetY:S*Math.sin(C)-D};case(_e<=b&&b<=Re):return{offsetX:S*Math.cos(C)-A,offsetY:-m};default:return{offsetX:0,offsetY:S*Math.sin(C)-D}}}function dy(y,m,b){const C=Uf(y,m,b),A=C.offsetX,D=C.offsetY,S=m,o=y,le=Uf(S,o,b),ue=S/2+le.offsetX,_e=o/2+le.offsetY,xe=Math.atan2(_e,ue)/Math.PI*180-45,ie=0,De=30,gt=A+y/2,$t=D+m/2,_t=Math.sqrt(gt*gt+$t*$t),Rt=Math.min(y,m)/2,Mi=Math.sqrt(y*y+m*m)/2,Jt=(_t-Rt)/(Mi-Rt),pi=ie+Jt*(De-ie);return{markerOffsetX:A,markerOffsetY:D,pinAngleDeg:xe,pinSkewDeg:pi}}const $f=512,py=0,Gf=18,fy=10,qf=3,my=.5,Sd=270,gy=8;var _y=Ms('<div><div class="pin svelte-p9fs91"></div> <div class="marker svelte-p9fs91"><div class="popup svelte-p9fs91"><!></div></div></div>');function yy(y,m){mu(m,!0);let b=Pi(!0),C=Pi(!1);function A(yt){ai(b,yt,!0)}function D(yt){ai(C,!yt)}function S(){return!tt(C)}let o=Sd,le=Sd,ue=new Pd(Sd,{easing:hy,interpolate:Re}),_e=!1;go(()=>{tt(C)&&(ue.set(o,{duration:0}),le=o,Mi(le))}),go(()=>{le=ue.current});function Re(yt,ui){if(Math.abs(ui-yt)<180)return At=>yt+At*(ui-yt);{const At=360-Math.abs(ui-yt),nr=yt<ui?-1:1;return Tt=>(360+yt+Tt*At*nr)%360}}function xe(){o!=le&&(Mi(le),window.requestAnimationFrame(xe))}function ie(yt){yt!=o&&(o=yt,_e?(ue.set(yt,{duration:400}),window.requestAnimationFrame(xe)):(ue.set(yt,{duration:0}),le=yt,Mi(le))),_e=!0}let De=Pi(0),gt=Pi(0),$t,_t,Rt;go(()=>{tt(De)&&tt(gt)&&(Rt.style.width=`${Math.min(tt(De),tt(gt))/4}px`,Rt.style.height=`${Math.min(tt(De),tt(gt))/4}px`)}),go(()=>{tt(De)&&tt(gt)&&Mi(le)});function Mi(yt){if(!$t||!_t||!Rt)return;const ui=dy(tt(De),tt(gt),yt),At=Math.round(ui.markerOffsetX),nr=Math.round(ui.markerOffsetY);_t.style.transform=`translate(${At}px, ${nr}px)`;const Tt=ui.pinAngleDeg,dr=ui.pinSkewDeg;Rt.style.transform=`rotate(${Tt}deg) skew(${dr}deg, ${dr}deg)`;const Or=-1-2*(At/tt(De)),Wr=-1-2*(nr/tt(gt));$t.style.filter=` drop-shadow(0px 0px 4px rgba(0,0,0,0.
|
|
2
|
+
\r\f \v\uFEFF`];function ny(y,m,b){var C=y==null?"":""+y;if(b){for(var A in b)if(b[A])C=C?C+" "+A:A;else if(C.length)for(var D=A.length,S=0;(S=C.indexOf(A,S))>=0;){var o=S+D;(S===0||Lf.includes(C[S-1]))&&(o===C.length||Lf.includes(C[o]))?C=(S===0?"":C.substring(0,S))+C.substring(o+1):S=o}}return C===""?null:C}function Ff(y,m=!1){var b=m?" !important;":";",C="";for(var A in y){var D=y[A];D!=null&&D!==""&&(C+=" "+A+": "+D+b)}return C}function vd(y){return y[0]!=="-"||y[1]!=="-"?y.toLowerCase():y}function ay(y,m){if(m){var b="",C,A;if(Array.isArray(m)?(C=m[0],A=m[1]):C=m,y){y=String(y).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var D=!1,S=0,o=!1,le=[];C&&le.push(...Object.keys(C).map(vd)),A&&le.push(...Object.keys(A).map(vd));var ue=0,_e=-1;const gt=y.length;for(var Re=0;Re<gt;Re++){var xe=y[Re];if(o?xe==="/"&&y[Re-1]==="*"&&(o=!1):D?D===xe&&(D=!1):xe==="/"&&y[Re+1]==="*"?o=!0:xe==='"'||xe==="'"?D=xe:xe==="("?S++:xe===")"&&S--,!o&&D===!1&&S===0){if(xe===":"&&_e===-1)_e=Re;else if(xe===";"||Re===gt-1){if(_e!==-1){var ie=vd(y.substring(ue,_e).trim());if(!le.includes(ie)){xe!==";"&&Re++;var De=y.substring(ue,Re).trim();b+=" "+De+";"}}ue=Re+1,_e=-1}}}}return C&&(b+=Ff(C)),A&&(b+=Ff(A,!0)),b=b.trim(),b===""?null:b}return y==null?null:String(y)}function Bf(y,m,b,C,A,D){var S=y.__className;if(S!==b||S===void 0){var o=ny(b,C,D);o==null?y.removeAttribute("class"):y.className=o,y.__className=b}else if(D&&A!==D)for(var le in D){var ue=!!D[le];(A==null||ue!==!!A[le])&&y.classList.toggle(le,ue)}return D}function bd(y,m={},b,C){for(var A in b){var D=b[A];m[A]!==D&&(b[A]==null?y.style.removeProperty(A):y.style.setProperty(A,D,C))}}function Au(y,m,b,C){var A=y.__style;if(A!==m){var D=ay(m,C);D==null?y.removeAttribute("style"):y.style.cssText=D,y.__style=m}else C&&(Array.isArray(C)?(bd(y,b==null?void 0:b[0],C[0]),bd(y,b==null?void 0:b[1],C[1],"important")):bd(y,b,C));return C}const sy=()=>performance.now(),Nn={tick:y=>requestAnimationFrame(y),now:()=>sy(),tasks:new Set};function Of(){const y=Nn.now();Nn.tasks.forEach(m=>{m.c(y)||(Nn.tasks.delete(m),m.f())}),Nn.tasks.size!==0&&Nn.tick(Of)}function oy(y){let m;return Nn.tasks.size===0&&Nn.tick(Of),{promise:new Promise(b=>{Nn.tasks.add(m={c:y,f:b})}),abort(){Nn.tasks.delete(m)}}}const Vu=class Vu{constructor(m){wr(this,Zu);wr(this,Va,new WeakMap);wr(this,So);wr(this,Wl);su(this,Wl,m)}observe(m,b){var C=Ft(this,Va).get(m)||new Set;return C.add(b),Ft(this,Va).set(m,C),Xg(this,Zu,Kg).call(this).observe(m,Ft(this,Wl)),()=>{var A=Ft(this,Va).get(m);A.delete(b),A.size===0&&(Ft(this,Va).delete(m),Ft(this,So).unobserve(m))}}};Va=new WeakMap,So=new WeakMap,Wl=new WeakMap,Zu=new WeakSet,Kg=function(){return Ft(this,So)??su(this,So,new ResizeObserver(m=>{for(var b of m){Vu.entries.set(b.target,b);for(var C of Ft(this,Va).get(b.target)||[])C(b)}}))},Ts(Vu,"entries",new WeakMap);let wd=Vu;var ly=new wd({box:"border-box"});function jf(y,m,b){var C=ly.observe(y,()=>b(y[m]));vu(()=>(_d(()=>b(y[m])),C))}function Nf(y,m){return y===m||(y==null?void 0:y[pu])===m}function Ba(y={},m,b,C){return vu(()=>{var A,D;return mf(()=>{A=D,D=(C==null?void 0:C())||[],_d(()=>{y!==b(...D)&&(m(y,...D),A&&Nf(b(...A),y)&&m(null,...A))})}),()=>{wf(()=>{D&&Nf(b(...D),y)&&m(null,...D)})}}),y}function Zf(y){Br===null&&__(),go(()=>{const m=_d(y);if(typeof m=="function")return m})}const cy="5";typeof window<"u"&&((hm=window.__svelte??(window.__svelte={})).v??(hm.v=new Set)).add(cy);function Vf(y){return Object.prototype.toString.call(y)==="[object Date]"}function uy(y){return y}function hy(y){return-.5*(Math.cos(Math.PI*y)-1)}function Td(y,m){if(y===m||y!==y)return()=>y;const b=typeof y;if(b!==typeof m||Array.isArray(y)!==Array.isArray(m))throw new Error("Cannot interpolate values of different type");if(Array.isArray(y)){const C=m.map((A,D)=>Td(y[D],A));return A=>C.map(D=>D(A))}if(b==="object"){if(!y||!m)throw new Error("Object cannot be null");if(Vf(y)&&Vf(m)){const D=y.getTime(),o=m.getTime()-D;return le=>new Date(D+le*o)}const C=Object.keys(m),A={};return C.forEach(D=>{A[D]=Td(y[D],m[D])}),D=>{const S={};return C.forEach(o=>{S[o]=A[o](D)}),S}}if(b==="number"){const C=m-y;return A=>y+A*C}return()=>m}const Rd=class Rd{constructor(m,b={}){wr(this,pa,fo(void 0));wr(this,Mo,fo(void 0));wr(this,Hl);wr(this,zs,null);Ft(this,pa).v=Ft(this,Mo).v=m,su(this,Hl,b)}static of(m,b){const C=new Rd(m(),b);return mf(()=>{C.set(m())}),C}set(m,b){var Re;ai(Ft(this,Mo),m);let{delay:C=0,duration:A=400,easing:D=uy,interpolate:S=Td}={...Ft(this,Hl),...b};if(A===0)return(Re=Ft(this,zs))==null||Re.abort(),ai(Ft(this,pa),m),Promise.resolve();const o=Nn.now()+C;let le,ue=!1,_e=Ft(this,zs);return su(this,zs,oy(xe=>{if(xe<o)return!0;if(!ue){ue=!0;const De=Ft(this,pa).v;le=S(De,m),typeof A=="function"&&(A=A(De,m)),_e==null||_e.abort()}const ie=xe-o;return ie>A?(ai(Ft(this,pa),m),!1):(ai(Ft(this,pa),le(D(ie/A))),!0)})),Ft(this,zs).promise}get current(){return tt(Ft(this,pa))}get target(){return tt(Ft(this,Mo))}set target(m){this.set(m)}};pa=new WeakMap,Mo=new WeakMap,Hl=new WeakMap,zs=new WeakMap;let Pd=Rd;function Uf(y,m,b){const C=b*(Math.PI/180),A=y/2,D=m/2,S=Math.sqrt(A*A+D*D),o=Math.atan(D/A)*(180/Math.PI),le=o,ue=180-o,_e=180+o,Re=360-o;switch(!0){case(le<=b&&b<=ue):return{offsetX:S*Math.cos(C)-A,offsetY:0};case(ue<=b&&b<=_e):return{offsetX:-y,offsetY:S*Math.sin(C)-D};case(_e<=b&&b<=Re):return{offsetX:S*Math.cos(C)-A,offsetY:-m};default:return{offsetX:0,offsetY:S*Math.sin(C)-D}}}function dy(y,m,b){const C=Uf(y,m,b),A=C.offsetX,D=C.offsetY,S=m,o=y,le=Uf(S,o,b),ue=S/2+le.offsetX,_e=o/2+le.offsetY,xe=Math.atan2(_e,ue)/Math.PI*180-45,ie=0,De=30,gt=A+y/2,$t=D+m/2,_t=Math.sqrt(gt*gt+$t*$t),Rt=Math.min(y,m)/2,Mi=Math.sqrt(y*y+m*m)/2,Jt=(_t-Rt)/(Mi-Rt),pi=ie+Jt*(De-ie);return{markerOffsetX:A,markerOffsetY:D,pinAngleDeg:xe,pinSkewDeg:pi}}const $f=512,py=0,Gf=18,fy=10,qf=3,my=.5,Sd=270,gy=8;var _y=Ms('<div><div class="pin svelte-p9fs91"></div> <div class="marker svelte-p9fs91"><div class="popup svelte-p9fs91"><!></div></div></div>');function yy(y,m){mu(m,!0);let b=Pi(!0),C=Pi(!1);function A(yt){ai(b,yt,!0)}function D(yt){ai(C,!yt)}function S(){return!tt(C)}let o=Sd,le=Sd,ue=new Pd(Sd,{easing:hy,interpolate:Re}),_e=!1;go(()=>{tt(C)&&(ue.set(o,{duration:0}),le=o,Mi(le))}),go(()=>{le=ue.current});function Re(yt,ui){if(Math.abs(ui-yt)<180)return At=>yt+At*(ui-yt);{const At=360-Math.abs(ui-yt),nr=yt<ui?-1:1;return Tt=>(360+yt+Tt*At*nr)%360}}function xe(){o!=le&&(Mi(le),window.requestAnimationFrame(xe))}function ie(yt){yt!=o&&(o=yt,_e?(ue.set(yt,{duration:400}),window.requestAnimationFrame(xe)):(ue.set(yt,{duration:0}),le=yt,Mi(le))),_e=!0}let De=Pi(0),gt=Pi(0),$t,_t,Rt;go(()=>{tt(De)&&tt(gt)&&(Rt.style.width=`${Math.min(tt(De),tt(gt))/4}px`,Rt.style.height=`${Math.min(tt(De),tt(gt))/4}px`)}),go(()=>{tt(De)&&tt(gt)&&Mi(le)});function Mi(yt){if(!$t||!_t||!Rt)return;const ui=dy(tt(De),tt(gt),yt),At=Math.round(ui.markerOffsetX),nr=Math.round(ui.markerOffsetY);_t.style.transform=`translate(${At}px, ${nr}px)`;const Tt=ui.pinAngleDeg,dr=ui.pinSkewDeg;Rt.style.transform=`rotate(${Tt}deg) skew(${dr}deg, ${dr}deg)`;const Or=-1-2*(At/tt(De)),Wr=-1-2*(nr/tt(gt));$t.style.filter=` drop-shadow(0px 0px 4px rgba(0,0,0,0.3)) drop-shadow(${Or}px ${Wr}px 2px rgba(0,0,0,0.3))`}const Jt=()=>tt(De),pi=()=>tt(gt);var Bt=_y();let vt;var Ot=Pl(Bt);Ba(Ot,yt=>Rt=yt,()=>Rt);var rr=pd(Ot,2);Au(rr,"",{},{padding:gy+"px"});var on=Pl(rr),Mr=Pl(on);return ry(Mr,()=>m.children),Ba(rr,yt=>_t=yt,()=>_t),Ba(Bt,yt=>$t=yt,()=>$t),bu(yt=>vt=Bf(Bt,1,"anchor svelte-p9fs91",null,vt,yt),[()=>({collapsed:tt(b),hidden:tt(C)})]),jf(rr,"clientWidth",yt=>ai(De,yt)),jf(rr,"clientHeight",yt=>ai(gt,yt)),Is(y,Bt),gu({setCollapsed:A,setDisplayed:D,getDisplayed:S,setAngle:ie,getWidth:Jt,getHeight:pi})}var xy=Ms("<div></div>");function vy(y,m){mu(m,!0);let b=Pi(!0),C=Pi(0),A=_u(()=>1-.5*tt(C)),D=_u(()=>tt(b)?"":`scale(${tt(A)})`),S=_u(()=>tt(b)?"":`brightness(${tt(A)})`),o=_u(()=>tt(b)||tt(C)>0?"":"pulsing");function le(ie){ai(b,ie,!0)}function ue(ie){ai(C,Math.max(0,Math.min(1,ie)),!0)}var _e=xy();let Re,xe;return bu(ie=>{Re=Bf(_e,1,"circle svelte-13nhxs0",null,Re,ie),xe=Au(_e,"",xe,{transform:tt(D),filter:tt(S)})},[()=>({collapsed:tt(b),pulsing:tt(o)})]),Is(y,_e),gu({setCollapsed:le,setDistance:ue})}async function by(y){return await wy(y)}async function wy(y){const b=await fetch("https://arenarium-maps-api.marko-smilja.workers.dev/v1/markers",{method:"POST",body:JSON.stringify(y)});if(!b.ok||!b.body)throw new Error("Failed to get markers");return await b.json()}function Ty(y){return y&&y.__esModule&&Object.prototype.hasOwnProperty.call(y,"default")?y.default:y}var zu={exports:{}};/**
|
|
3
3
|
* MapLibre GL JS
|
|
4
4
|
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.3.1/LICENSE.txt
|
|
5
5
|
*/var Py=zu.exports,Wf;function Sy(){return Wf||(Wf=1,function(y,m){(function(b,C){y.exports=C()})(Py,function(){var b={},C={};function A(S,o,le){if(C[S]=le,S==="index"){var ue="var sharedModule = {}; ("+C.shared+")(sharedModule); ("+C.worker+")(sharedModule);",_e={};return C.shared(_e),C.index(b,_e),typeof window<"u"&&b.setWorkerUrl(window.URL.createObjectURL(new Blob([ue],{type:"text/javascript"}))),b}}A("shared",["exports"],function(S){function o(r,t,n,a){return new(n||(n=Promise))(function(c,d){function p(w){try{x(a.next(w))}catch(P){d(P)}}function g(w){try{x(a.throw(w))}catch(P){d(P)}}function x(w){var P;w.done?c(w.value):(P=w.value,P instanceof n?P:new n(function(M){M(P)})).then(p,g)}x((a=a.apply(r,t||[])).next())})}function le(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ue,_e;function Re(){if(_e)return ue;function r(t,n){this.x=t,this.y=n}return _e=1,ue=r,r.prototype={clone:function(){return new r(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,n){return this.clone()._rotateAround(t,n)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var n=t.x-this.x,a=t.y-this.y;return n*n+a*a},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,n){return Math.atan2(this.x*n-this.y*t,this.x*t+this.y*n)},_matMult:function(t){var n=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var n=Math.cos(t),a=Math.sin(t),c=a*this.x+n*this.y;return this.x=n*this.x-a*this.y,this.y=c,this},_rotateAround:function(t,n){var a=Math.cos(t),c=Math.sin(t),d=n.y+c*(this.x-n.x)+a*(this.y-n.y);return this.x=n.x+a*(this.x-n.x)-c*(this.y-n.y),this.y=d,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},r.convert=function(t){return t instanceof r?t:Array.isArray(t)?new r(t[0],t[1]):t},ue}typeof SuppressedError=="function"&&SuppressedError;var xe,ie,De=le(Re()),gt=function(){if(ie)return xe;function r(t,n,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(c-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=a,this.p2y=c}return ie=1,xe=r,r.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,n){if(n===void 0&&(n=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var d=this.sampleCurveX(a)-t;if(Math.abs(d)<n)return a;var p=this.sampleCurveDerivativeX(a);if(Math.abs(p)<1e-6)break;a-=d/p}var g=0,x=1;for(a=t,c=0;c<20&&(d=this.sampleCurveX(a),!(Math.abs(d-t)<n));c++)t>d?g=a:x=a,a=.5*(x-g)+g;return a},solve:function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))}},xe}(),$t=le(gt);let _t,Rt;function Mi(){return _t==null&&(_t=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),_t}function Jt(){if(Rt==null&&(Rt=!1,Mi())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let a=0;a<5*5;a++){const c=4*a;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(a%5,Math.floor(a/5),1,1)}const n=t.getImageData(0,0,5,5).data;for(let a=0;a<5*5*4;a++)if(a%4!=3&&n[a]!==a){Rt=!0;break}}}return Rt||!1}var pi,Bt=1e-6,vt=typeof Float32Array<"u"?Float32Array:Array;function Ot(){var r=new vt(9);return vt!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function rr(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function on(){var r=new vt(3);return vt!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Mr(r,t,n){var a=new vt(3);return a[0]=r,a[1]=t,a[2]=n,a}function yt(r,t,n){var a=t[0],c=t[1],d=t[2],p=t[3];return r[0]=n[0]*a+n[4]*c+n[8]*d+n[12]*p,r[1]=n[1]*a+n[5]*c+n[9]*d+n[13]*p,r[2]=n[2]*a+n[6]*c+n[10]*d+n[14]*p,r[3]=n[3]*a+n[7]*c+n[11]*d+n[15]*p,r}function ui(){var r=new vt(4);return vt!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function At(){var r=new vt(2);return vt!=Float32Array&&(r[0]=0,r[1]=0),r}function nr(r,t){var n=new vt(2);return n[0]=r,n[1]=t,n}Math.hypot||(Math.hypot=function(){for(var r=0,t=arguments.length;t--;)r+=arguments[t]*arguments[t];return Math.sqrt(r)}),on(),pi=new vt(4),vt!=Float32Array&&(pi[0]=0,pi[1]=0,pi[2]=0,pi[3]=0),on(),Mr(1,0,0),Mr(0,1,0),ui(),ui(),Ot(),At();const Tt=8192;function dr(r,t,n){return t*(Tt/(r.tileSize*Math.pow(2,n-r.tileID.overscaledZ)))}function Or(r,t){return(r%t+t)%t}function Wr(r,t,n){return r*(1-n)+t*n}function wn(r){if(r<=0)return 0;if(r>=1)return 1;const t=r*r,n=t*r;return 4*(r<.5?n:3*(r-t)+n-.75)}function $n(r,t,n,a){const c=new $t(r,t,n,a);return d=>c.solve(d)}const jr=$n(.25,.1,.25,1);function Ir(r,t,n){return Math.min(n,Math.max(t,r))}function Ji(r,t,n){const a=n-t,c=((r-t)%a+a)%a+t;return c===t?n:c}function Ei(r,...t){for(const n of t)for(const a in n)r[a]=n[a];return r}let Tn=1;function Cr(r,t,n){const a={};for(const c in r)a[c]=t.call(this,r[c],c,r);return a}function kr(r,t,n){const a={};for(const c in r)t.call(this,r[c],c,r)&&(a[c]=r[c]);return a}function Di(r){return Array.isArray(r)?r.map(Di):typeof r=="object"&&r?Cr(r,Di):r}const Hr={};function vi(r){Hr[r]||(typeof console<"u"&&console.warn(r),Hr[r]=!0)}function si(r,t,n){return(n.y-r.y)*(t.x-r.x)>(t.y-r.y)*(n.x-r.x)}function ar(r){return typeof WorkerGlobalScope<"u"&&r!==void 0&&r instanceof WorkerGlobalScope}let Ze=null;function Ke(r){return typeof ImageBitmap<"u"&&r instanceof ImageBitmap}const Zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Gt(r,t,n,a,c){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const d=new VideoFrame(r,{timestamp:0});try{const p=d==null?void 0:d.format;if(!p||!p.startsWith("BGR")&&!p.startsWith("RGB"))throw new Error(`Unrecognized format ${p}`);const g=p.startsWith("BGR"),x=new Uint8ClampedArray(a*c*4);if(yield d.copyTo(x,function(w,P,M,z,L){const B=4*Math.max(1,0),j=(Math.max(0,M)-M)*z*4+B,$=4*z,H=Math.max(0,P),ne=Math.max(0,M);return{rect:{x:H,y:ne,width:Math.min(w.width,P+z)-H,height:Math.min(w.height,M+L)-ne},layout:[{offset:j,stride:$}]}}(r,t,n,a,c)),g)for(let w=0;w<x.length;w+=4){const P=x[w];x[w]=x[w+2],x[w+2]=P}return x}finally{d.close()}})}let bi,Pt;function st(r,t,n,a){return r.addEventListener(t,n,a),{unsubscribe:()=>{r.removeEventListener(t,n,a)}}}function It(r){return r/Math.PI*180}const qt={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},qi={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},fi="AbortError";function sr(){return new Error(fi)}const pr={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function fr(r){return pr.REGISTERED_PROTOCOLS[r.substring(0,r.indexOf("://"))]}const Xr="global-dispatcher";class ln extends Error{constructor(t,n,a,c){super(`AJAXError: ${n} (${t}): ${a}`),this.status=t,this.statusText=n,this.url=a,this.body=c}}const Pn=()=>ar(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Ua=function(r,t){if(/:\/\//.test(r.url)&&!/^https?:|^file:/.test(r.url)){const a=fr(r.url);if(a)return a(r,t);if(ar(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,targetMapId:Xr},t)}if(!(/^file:/.test(n=r.url)||/^file:/.test(Pn())&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(a,c){return o(this,void 0,void 0,function*(){const d=new Request(a.url,{method:a.method||"GET",body:a.body,credentials:a.credentials,headers:a.headers,cache:a.cache,referrer:Pn(),signal:c.signal});let p,g;a.type!=="json"||d.headers.has("Accept")||d.headers.set("Accept","application/json");try{p=yield fetch(d)}catch(w){throw new ln(0,w.message,a.url,new Blob)}if(!p.ok){const w=yield p.blob();throw new ln(p.status,p.statusText,a.url,w)}g=a.type==="arrayBuffer"||a.type==="image"?p.arrayBuffer():a.type==="json"?p.json():p.text();const x=yield g;if(c.signal.aborted)throw sr();return{data:x,cacheControl:p.headers.get("Cache-Control"),expires:p.headers.get("Expires")}})}(r,t);if(ar(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:r,mustQueue:!0,targetMapId:Xr},t)}var n;return function(a,c){return new Promise((d,p)=>{var g;const x=new XMLHttpRequest;x.open(a.method||"GET",a.url,!0),a.type!=="arrayBuffer"&&a.type!=="image"||(x.responseType="arraybuffer");for(const w in a.headers)x.setRequestHeader(w,a.headers[w]);a.type==="json"&&(x.responseType="text",!((g=a.headers)===null||g===void 0)&&g.Accept||x.setRequestHeader("Accept","application/json")),x.withCredentials=a.credentials==="include",x.onerror=()=>{p(new Error(x.statusText))},x.onload=()=>{if(!c.signal.aborted)if((x.status>=200&&x.status<300||x.status===0)&&x.response!==null){let w=x.response;if(a.type==="json")try{w=JSON.parse(x.response)}catch(P){return void p(P)}d({data:w,cacheControl:x.getResponseHeader("Cache-Control"),expires:x.getResponseHeader("Expires")})}else{const w=new Blob([x.response],{type:x.getResponseHeader("Content-Type")});p(new ln(x.status,x.statusText,a.url,w))}},c.signal.addEventListener("abort",()=>{x.abort(),p(sr())}),x.send(a.body)})}(r,t)};function Rs(r){if(!r||r.indexOf("://")<=0||r.indexOf("data:image/")===0||r.indexOf("blob:")===0)return!0;const t=new URL(r),n=window.location;return t.protocol===n.protocol&&t.host===n.host}function Io(r,t,n){n[r]&&n[r].indexOf(t)!==-1||(n[r]=n[r]||[],n[r].push(t))}function Sn(r,t,n){if(n&&n[r]){const a=n[r].indexOf(t);a!==-1&&n[r].splice(a,1)}}class he{constructor(t,n={}){Ei(this,n),this.type=t}}class N extends he{constructor(t,n={}){super("error",Ei({error:t},n))}}class V{on(t,n){return this._listeners=this._listeners||{},Io(t,n,this._listeners),{unsubscribe:()=>{this.off(t,n)}}}off(t,n){return Sn(t,n,this._listeners),Sn(t,n,this._oneTimeListeners),this}once(t,n){return n?(this._oneTimeListeners=this._oneTimeListeners||{},Io(t,n,this._oneTimeListeners),this):new Promise(a=>this.once(t,a))}fire(t,n){typeof t=="string"&&(t=new he(t,n||{}));const a=t.type;if(this.listens(a)){t.target=this;const c=this._listeners&&this._listeners[a]?this._listeners[a].slice():[];for(const g of c)g.call(this,t);const d=this._oneTimeListeners&&this._oneTimeListeners[a]?this._oneTimeListeners[a].slice():[];for(const g of d)Sn(a,g,this._oneTimeListeners),g.call(this,t);const p=this._eventedParent;p&&(Ei(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(t))}else t instanceof N&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,n){return this._eventedParent=t,this._eventedParentData=n,this}}var F={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const Y=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function se(r,t){const n={};for(const a in r)a!=="ref"&&(n[a]=r[a]);return Y.forEach(a=>{a in t&&(n[a]=t[a])}),n}function ae(r,t){if(Array.isArray(r)){if(!Array.isArray(t)||r.length!==t.length)return!1;for(let n=0;n<r.length;n++)if(!ae(r[n],t[n]))return!1;return!0}if(typeof r=="object"&&r!==null&&t!==null){if(typeof t!="object"||Object.keys(r).length!==Object.keys(t).length)return!1;for(const n in r)if(!ae(r[n],t[n]))return!1;return!0}return r===t}function pe(r,t){r.push(t)}function ce(r,t,n){pe(n,{command:"addSource",args:[r,t[r]]})}function Pe(r,t,n){pe(t,{command:"removeSource",args:[r]}),n[r]=!0}function ve(r,t,n,a){Pe(r,n,a),ce(r,t,n)}function de(r,t,n){let a;for(a in r[n])if(Object.prototype.hasOwnProperty.call(r[n],a)&&a!=="data"&&!ae(r[n][a],t[n][a]))return!1;for(a in t[n])if(Object.prototype.hasOwnProperty.call(t[n],a)&&a!=="data"&&!ae(r[n][a],t[n][a]))return!1;return!0}function ke(r,t,n,a,c,d){r=r||{},t=t||{};for(const p in r)Object.prototype.hasOwnProperty.call(r,p)&&(ae(r[p],t[p])||n.push({command:d,args:[a,p,t[p],c]}));for(const p in t)Object.prototype.hasOwnProperty.call(t,p)&&!Object.prototype.hasOwnProperty.call(r,p)&&(ae(r[p],t[p])||n.push({command:d,args:[a,p,t[p],c]}))}function Ve(r){return r.id}function Ue(r,t){return r[t.id]=t,r}class be{constructor(t,n,a,c){this.message=(t?`${t}: `:"")+a,c&&(this.identifier=c),n!=null&&n.__line__&&(this.line=n.__line__)}}function lt(r,...t){for(const n of t)for(const a in n)r[a]=n[a];return r}class et extends Error{constructor(t,n){super(n),this.message=n,this.key=t}}class ot{constructor(t,n=[]){this.parent=t,this.bindings={};for(const[a,c]of n)this.bindings[a]=c}concat(t){return new ot(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const kt={kind:"null"},ze={kind:"number"},We={kind:"string"},Ne={kind:"boolean"},ht={kind:"color"},mi={kind:"projectionDefinition"},Mn={kind:"object"},at={kind:"value"},Li={kind:"collator"},Qt={kind:"formatted"},Co={kind:"padding"},$a={kind:"resolvedImage"},Gn={kind:"variableAnchorOffsetCollection"};function mr(r,t){return{kind:"array",itemType:r,N:t}}function hi(r){if(r.kind==="array"){const t=hi(r.itemType);return typeof r.N=="number"?`array<${t}, ${r.N}>`:r.itemType.kind==="value"?"array":`array<${t}>`}return r.kind}const Dd=[kt,ze,We,Ne,ht,mi,Qt,Mn,mr(at),Co,$a,Gn];function Ga(r,t){if(t.kind==="error")return null;if(r.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!Ga(r.itemType,t.itemType))&&(typeof r.N!="number"||r.N===t.N))return null}else{if(r.kind===t.kind)return null;if(r.kind==="value"){for(const n of Dd)if(!Ga(n,t))return null}}return`Expected ${hi(r)} but found ${hi(t)} instead.`}function Xl(r,t){return t.some(n=>n.kind===r.kind)}function qn(r,t){return t.some(n=>n==="null"?r===null:n==="array"?Array.isArray(r):n==="object"?r&&!Array.isArray(r)&&typeof r=="object":n===typeof r)}function qa(r,t){return r.kind==="array"&&t.kind==="array"?r.itemType.kind===t.itemType.kind&&typeof r.N=="number":r.kind===t.kind}const Uu=.96422,$u=.82521,Gu=4/29,Wa=6/29,qu=3*Wa*Wa,Ld=Wa*Wa*Wa,Wu=Math.PI/180,Ds=180/Math.PI;function Hu(r){return(r%=360)<0&&(r+=360),r}function Xu([r,t,n,a]){let c,d;const p=Kl((.2225045*(r=fa(r))+.7168786*(t=fa(t))+.0606169*(n=fa(n)))/1);r===t&&t===n?c=d=p:(c=Kl((.4360747*r+.3850649*t+.1430804*n)/Uu),d=Kl((.0139322*r+.0971045*t+.7141733*n)/$u));const g=116*p-16;return[g<0?0:g,500*(c-p),200*(p-d),a]}function fa(r){return r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4)}function Kl(r){return r>Ld?Math.pow(r,1/3):r/qu+Gu}function Ku([r,t,n,a]){let c=(r+16)/116,d=isNaN(t)?c:c+t/500,p=isNaN(n)?c:c-n/200;return c=1*ko(c),d=Uu*ko(d),p=$u*ko(p),[Yl(3.1338561*d-1.6168667*c-.4906146*p),Yl(-.9787684*d+1.9161415*c+.033454*p),Yl(.0719453*d-.2289914*c+1.4052427*p),a]}function Yl(r){return(r=r<=.00304?12.92*r:1.055*Math.pow(r,1/2.4)-.055)<0?0:r>1?1:r}function ko(r){return r>Wa?r*r*r:qu*(r-Gu)}function Ls(r){return parseInt(r.padEnd(2,r),16)/255}function Kr(r,t){return bt(t?r/100:r,0,1)}function bt(r,t,n){return Math.min(Math.max(t,r),n)}function ma(r){return!r.some(Number.isNaN)}const Wn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function In(r,t,n){return r+n*(t-r)}function Ha(r,t,n){return r.map((a,c)=>In(a,t[c],n))}class Et{constructor(t,n,a,c=1,d=!0){this.r=t,this.g=n,this.b=a,this.a=c,d||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,n,a,c]))}static parse(t){if(t instanceof Et)return t;if(typeof t!="string")return;const n=function(a){if((a=a.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=Wn[a];if(c){const[p,g,x]=c;return[p/255,g/255,x/255,1]}if(a.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(a)){const p=a.length<6?1:2;let g=1;return[Ls(a.slice(g,g+=p)),Ls(a.slice(g,g+=p)),Ls(a.slice(g,g+=p)),Ls(a.slice(g,g+p)||"ff")]}if(a.startsWith("rgb")){const p=a.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[g,x,w,P,M,z,L,B,j,$,H,ne]=p,K=[P||" ",L||" ",$].join("");if(K===" "||K===" /"||K===",,"||K===",,,"){const R=[w,z,j].join(""),U=R==="%%%"?100:R===""?255:0;if(U){const J=[bt(+x/U,0,1),bt(+M/U,0,1),bt(+B/U,0,1),H?Kr(+H,ne):1];if(ma(J))return J}}return}}const d=a.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(d){const[p,g,x,w,P,M,z,L,B]=d,j=[x||" ",P||" ",z].join("");if(j===" "||j===" /"||j===",,"||j===",,,"){const $=[+g,bt(+w,0,100),bt(+M,0,100),L?Kr(+L,B):1];if(ma($))return function([H,ne,K,R]){function U(J){const ge=(J+H/30)%12,Ee=ne*Math.min(K,1-K);return K-Ee*Math.max(-1,Math.min(ge-3,9-ge,1))}return H=Hu(H),ne/=100,K/=100,[U(0),U(8),U(4),R]}($)}}}(t);return n?new Et(...n,!1):void 0}get rgb(){const{r:t,g:n,b:a,a:c}=this,d=c||1/0;return this.overwriteGetter("rgb",[t/d,n/d,a/d,c])}get hcl(){return this.overwriteGetter("hcl",function(t){const[n,a,c,d]=Xu(t),p=Math.sqrt(a*a+c*c);return[Math.round(1e4*p)?Hu(Math.atan2(c,a)*Ds):NaN,p,n,d]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Xu(this.rgb))}overwriteGetter(t,n){return Object.defineProperty(this,t,{value:n}),n}toString(){const[t,n,a,c]=this.rgb;return`rgba(${[t,n,a].map(d=>Math.round(255*d)).join(",")},${c})`}static interpolate(t,n,a,c="rgb"){switch(c){case"rgb":{const[d,p,g,x]=Ha(t.rgb,n.rgb,a);return new Et(d,p,g,x,!1)}case"hcl":{const[d,p,g,x]=t.hcl,[w,P,M,z]=n.hcl;let L,B;if(isNaN(d)||isNaN(w))isNaN(d)?isNaN(w)?L=NaN:(L=w,g!==1&&g!==0||(B=P)):(L=d,M!==1&&M!==0||(B=p));else{let K=w-d;w>d&&K>180?K-=360:w<d&&d-w>180&&(K+=360),L=d+a*K}const[j,$,H,ne]=function([K,R,U,J]){return K=isNaN(K)?0:K*Wu,Ku([U,Math.cos(K)*R,Math.sin(K)*R,J])}([L,B??In(p,P,a),In(g,M,a),In(x,z,a)]);return new Et(j,$,H,ne,!1)}case"lab":{const[d,p,g,x]=Ku(Ha(t.lab,n.lab,a));return new Et(d,p,g,x,!1)}}}}Et.black=new Et(0,0,0,1),Et.white=new Et(1,1,1,1),Et.transparent=new Et(0,0,0,0),Et.red=new Et(1,0,0,1);class Nr{constructor(t,n,a){this.sensitivity=t?n?"variant":"case":n?"accent":"base",this.locale=a,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,n){return this.collator.compare(t,n)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Fs=["bottom","center","top"];class Xa{constructor(t,n,a,c,d,p){this.text=t,this.image=n,this.scale=a,this.fontStack=c,this.textColor=d,this.verticalAlign=p}}class or{constructor(t){this.sections=t}static fromString(t){return new or([new Xa(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof or?t:or.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class Wi{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Wi)return t;if(typeof t=="number")return new Wi([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const n of t)if(typeof n!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new Wi(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,n,a){return new Wi(Ha(t.values,n.values,a))}}class oi{constructor(t){this.name="ExpressionEvaluationError",this.message=t}toJSON(){return this.message}}const Eo=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class lr{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof lr)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let n=0;n<t.length;n+=2){const a=t[n],c=t[n+1];if(typeof a!="string"||!Eo.has(a)||!Array.isArray(c)||c.length!==2||typeof c[0]!="number"||typeof c[1]!="number")return}return new lr(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,n,a){const c=t.values,d=n.values;if(c.length!==d.length)throw new oi(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${n.toString()}`);const p=[];for(let g=0;g<c.length;g+=2){if(c[g]!==d[g])throw new oi(`Cannot interpolate values containing mismatched anchors. from[${g}]: ${c[g]}, to[${g}]: ${d[g]}`);p.push(c[g]);const[x,w]=c[g+1],[P,M]=d[g+1];p.push([In(x,P,a),In(w,M,a)])}return new lr(p)}}class gr{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new gr({name:t,available:!1}):null}}class Fi{constructor(t,n,a){this.from=t,this.to=n,this.transition=a}static interpolate(t,n,a){return new Fi(t,n,a)}static parse(t){return t instanceof Fi?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new Fi(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new Fi(t.from,t.to,t.transition):typeof t=="string"?new Fi(t,t,1):void 0}}function Yu(r,t,n,a){return typeof r=="number"&&r>=0&&r<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof n=="number"&&n>=0&&n<=255?a===void 0||typeof a=="number"&&a>=0&&a<=1?null:`Invalid rgba value [${[r,t,n,a].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof a=="number"?[r,t,n,a]:[r,t,n]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Hn(r){if(r===null||typeof r=="string"||typeof r=="boolean"||typeof r=="number"||r instanceof Fi||r instanceof Et||r instanceof Nr||r instanceof or||r instanceof Wi||r instanceof lr||r instanceof gr)return!0;if(Array.isArray(r)){for(const t of r)if(!Hn(t))return!1;return!0}if(typeof r=="object"){for(const t in r)if(!Hn(r[t]))return!1;return!0}return!1}function li(r){if(r===null)return kt;if(typeof r=="string")return We;if(typeof r=="boolean")return Ne;if(typeof r=="number")return ze;if(r instanceof Et)return ht;if(r instanceof Fi)return mi;if(r instanceof Nr)return Li;if(r instanceof or)return Qt;if(r instanceof Wi)return Co;if(r instanceof lr)return Gn;if(r instanceof gr)return $a;if(Array.isArray(r)){const t=r.length;let n;for(const a of r){const c=li(a);if(n){if(n===c)continue;n=at;break}n=c}return mr(n||at,t)}return Mn}function Ka(r){const t=typeof r;return r===null?"":t==="string"||t==="number"||t==="boolean"?String(r):r instanceof Et||r instanceof Fi||r instanceof or||r instanceof Wi||r instanceof lr||r instanceof gr?r.toString():JSON.stringify(r)}class Xn{constructor(t,n){this.type=t,this.value=n}static parse(t,n){if(t.length!==2)return n.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Hn(t[1]))return n.error("invalid value");const a=t[1];let c=li(a);const d=n.expectedType;return c.kind!=="array"||c.N!==0||!d||d.kind!=="array"||typeof d.N=="number"&&d.N!==0||(c=d),new Xn(c,a)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Bs={string:We,number:ze,boolean:Ne,object:Mn};class _r{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let a,c=1;const d=t[0];if(d==="array"){let g,x;if(t.length>2){const w=t[1];if(typeof w!="string"||!(w in Bs)||w==="object")return n.error('The item type argument of "array" must be one of string, number, boolean',1);g=Bs[w],c++}else g=at;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return n.error('The length argument to "array" must be a positive integer literal',2);x=t[2],c++}a=mr(g,x)}else{if(!Bs[d])throw new Error(`Types doesn't contain name = ${d}`);a=Bs[d]}const p=[];for(;c<t.length;c++){const g=n.parse(t[c],c,at);if(!g)return null;p.push(g)}return new _r(a,p)}evaluate(t){for(let n=0;n<this.args.length;n++){const a=this.args[n].evaluate(t);if(!Ga(this.type,li(a)))return a;if(n===this.args.length-1)throw new oi(`Expected value to be of type ${hi(this.type)}, but found ${hi(li(a))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const ei={"to-boolean":Ne,"to-color":ht,"to-number":ze,"to-string":We};class cn{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");const a=t[0];if(!ei[a])throw new Error(`Can't parse ${a} as it is not part of the known types`);if((a==="to-boolean"||a==="to-string")&&t.length!==2)return n.error("Expected one argument.");const c=ei[a],d=[];for(let p=1;p<t.length;p++){const g=n.parse(t[p],p,at);if(!g)return null;d.push(g)}return new cn(c,d)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let n,a;for(const c of this.args){if(n=c.evaluate(t),a=null,n instanceof Et)return n;if(typeof n=="string"){const d=t.parseColor(n);if(d)return d}else if(Array.isArray(n)&&(a=n.length<3||n.length>4?`Invalid rgba value ${JSON.stringify(n)}: expected an array containing either three or four numeric values.`:Yu(n[0],n[1],n[2],n[3]),!a))return new Et(n[0]/255,n[1]/255,n[2]/255,n[3])}throw new oi(a||`Could not parse color from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"padding":{let n;for(const a of this.args){n=a.evaluate(t);const c=Wi.parse(n);if(c)return c}throw new oi(`Could not parse padding from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"variableAnchorOffsetCollection":{let n;for(const a of this.args){n=a.evaluate(t);const c=lr.parse(n);if(c)return c}throw new oi(`Could not parse variableAnchorOffsetCollection from value '${typeof n=="string"?n:JSON.stringify(n)}'`)}case"number":{let n=null;for(const a of this.args){if(n=a.evaluate(t),n===null)return 0;const c=Number(n);if(!isNaN(c))return c}throw new oi(`Could not convert ${JSON.stringify(n)} to number.`)}case"formatted":return or.fromString(Ka(this.args[0].evaluate(t)));case"resolvedImage":return gr.fromString(Ka(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return Ka(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Dt=["Unknown","Point","LineString","Polygon"];class ft{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Dt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let n=this._parseColorCache[t];return n||(n=this._parseColorCache[t]=Et.parse(t)),n}}class Ya{constructor(t,n,a=[],c,d=new ot,p=[]){this.registry=t,this.path=a,this.key=a.map(g=>`[${g}]`).join(""),this.scope=d,this.errors=p,this.expectedType=c,this._isConstant=n}parse(t,n,a,c,d={}){return n?this.concat(n,a,c)._parse(t,d):this._parse(t,d)}_parse(t,n){function a(c,d,p){return p==="assert"?new _r(d,[c]):p==="coerce"?new cn(d,[c]):c}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const d=this.registry[c];if(d){let p=d.parse(t,this);if(!p)return null;if(this.expectedType){const g=this.expectedType,x=p.type;if(g.kind!=="string"&&g.kind!=="number"&&g.kind!=="boolean"&&g.kind!=="object"&&g.kind!=="array"||x.kind!=="value")if(g.kind!=="projectionDefinition"||x.kind!=="string"&&x.kind!=="array")if(g.kind!=="color"&&g.kind!=="formatted"&&g.kind!=="resolvedImage"||x.kind!=="value"&&x.kind!=="string")if(g.kind!=="padding"||x.kind!=="value"&&x.kind!=="number"&&x.kind!=="array")if(g.kind!=="variableAnchorOffsetCollection"||x.kind!=="value"&&x.kind!=="array"){if(this.checkSubtype(g,x))return null}else p=a(p,g,n.typeAnnotation||"coerce");else p=a(p,g,n.typeAnnotation||"coerce");else p=a(p,g,n.typeAnnotation||"coerce");else p=a(p,g,n.typeAnnotation||"coerce");else p=a(p,g,n.typeAnnotation||"assert")}if(!(p instanceof Xn)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const g=new ft;try{p=new Xn(p.type,p.evaluate(g))}catch(x){return this.error(x.message),null}}return p}return this.error(`Unknown expression "${c}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,n,a){const c=typeof t=="number"?this.path.concat(t):this.path,d=a?this.scope.concat(a):this.scope;return new Ya(this.registry,this._isConstant,c,n||null,d,this.errors)}error(t,...n){const a=`${this.key}${n.map(c=>`[${c}]`).join("")}`;this.errors.push(new et(a,t))}checkSubtype(t,n){const a=Ga(t,n);return a&&this.error(a),a}}class Ct{constructor(t,n){this.type=n.type,this.bindings=[].concat(t),this.result=n}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const n of this.bindings)t(n[1]);t(this.result)}static parse(t,n){if(t.length<4)return n.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const a=[];for(let d=1;d<t.length-1;d+=2){const p=t[d];if(typeof p!="string")return n.error(`Expected string, but found ${typeof p} instead.`,d);if(/[^a-zA-Z0-9_]/.test(p))return n.error("Variable names must contain only alphanumeric characters or '_'.",d);const g=n.parse(t[d+1],d+1);if(!g)return null;a.push([p,g])}const c=n.parse(t[t.length-1],t.length-1,n.expectedType,a);return c?new Ct(a,c):null}outputDefined(){return this.result.outputDefined()}}class Ja{constructor(t,n){this.type=n.type,this.name=t,this.boundExpression=n}static parse(t,n){if(t.length!==2||typeof t[1]!="string")return n.error("'var' expression requires exactly one string literal argument.");const a=t[1];return n.scope.has(a)?new Ja(a,n.scope.get(a)):n.error(`Unknown variable "${a}". Make sure "${a}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class Yr{constructor(t,n,a){this.type=t,this.index=n,this.input=a}static parse(t,n){if(t.length!==3)return n.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const a=n.parse(t[1],1,ze),c=n.parse(t[2],2,mr(n.expectedType||at));return a&&c?new Yr(c.type.itemType,a,c):null}evaluate(t){const n=this.index.evaluate(t),a=this.input.evaluate(t);if(n<0)throw new oi(`Array index out of bounds: ${n} < 0.`);if(n>=a.length)throw new oi(`Array index out of bounds: ${n} > ${a.length-1}.`);if(n!==Math.floor(n))throw new oi(`Array index must be an integer, but found ${n} instead.`);return a[n]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Os{constructor(t,n){this.type=Ne,this.needle=t,this.haystack=n}static parse(t,n){if(t.length!==3)return n.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const a=n.parse(t[1],1,at),c=n.parse(t[2],2,at);return a&&c?Xl(a.type,[Ne,We,ze,kt,at])?new Os(a,c):n.error(`Expected first argument to be of type boolean, string, number or null, but found ${hi(a.type)} instead`):null}evaluate(t){const n=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!a)return!1;if(!qn(n,["boolean","string","number","null"]))throw new oi(`Expected first argument to be of type boolean, string, number or null, but found ${hi(li(n))} instead.`);if(!qn(a,["string","array"]))throw new oi(`Expected second argument to be of type array or string, but found ${hi(li(a))} instead.`);return a.indexOf(n)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class js{constructor(t,n,a){this.type=ze,this.needle=t,this.haystack=n,this.fromIndex=a}static parse(t,n){if(t.length<=2||t.length>=5)return n.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=n.parse(t[1],1,at),c=n.parse(t[2],2,at);if(!a||!c)return null;if(!Xl(a.type,[Ne,We,ze,kt,at]))return n.error(`Expected first argument to be of type boolean, string, number or null, but found ${hi(a.type)} instead`);if(t.length===4){const d=n.parse(t[3],3,ze);return d?new js(a,c,d):null}return new js(a,c)}evaluate(t){const n=this.needle.evaluate(t),a=this.haystack.evaluate(t);if(!qn(n,["boolean","string","number","null"]))throw new oi(`Expected first argument to be of type boolean, string, number or null, but found ${hi(li(n))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),qn(a,["string"])){const d=a.indexOf(n,c);return d===-1?-1:[...a.slice(0,d)].length}if(qn(a,["array"]))return a.indexOf(n,c);throw new oi(`Expected second argument to be of type array or string, but found ${hi(li(a))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class Ao{constructor(t,n,a,c,d,p){this.inputType=t,this.type=n,this.input=a,this.cases=c,this.outputs=d,this.otherwise=p}static parse(t,n){if(t.length<5)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return n.error("Expected an even number of arguments.");let a,c;n.expectedType&&n.expectedType.kind!=="value"&&(c=n.expectedType);const d={},p=[];for(let w=2;w<t.length-1;w+=2){let P=t[w];const M=t[w+1];Array.isArray(P)||(P=[P]);const z=n.concat(w);if(P.length===0)return z.error("Expected at least one branch label.");for(const B of P){if(typeof B!="number"&&typeof B!="string")return z.error("Branch labels must be numbers or strings.");if(typeof B=="number"&&Math.abs(B)>Number.MAX_SAFE_INTEGER)return z.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof B=="number"&&Math.floor(B)!==B)return z.error("Numeric branch labels must be integer values.");if(a){if(z.checkSubtype(a,li(B)))return null}else a=li(B);if(d[String(B)]!==void 0)return z.error("Branch labels must be unique.");d[String(B)]=p.length}const L=n.parse(M,w,c);if(!L)return null;c=c||L.type,p.push(L)}const g=n.parse(t[1],1,at);if(!g)return null;const x=n.parse(t[t.length-1],t.length-1,c);return x?g.type.kind!=="value"&&n.concat(1).checkSubtype(a,g.type)?null:new Ao(a,c,g,d,p,x):null}evaluate(t){const n=this.input.evaluate(t);return(li(n)===this.inputType&&this.outputs[this.cases[n]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class Ns{constructor(t,n,a){this.type=t,this.branches=n,this.otherwise=a}static parse(t,n){if(t.length<4)return n.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return n.error("Expected an odd number of arguments.");let a;n.expectedType&&n.expectedType.kind!=="value"&&(a=n.expectedType);const c=[];for(let p=1;p<t.length-1;p+=2){const g=n.parse(t[p],p,Ne);if(!g)return null;const x=n.parse(t[p+1],p+1,a);if(!x)return null;c.push([g,x]),a=a||x.type}const d=n.parse(t[t.length-1],t.length-1,a);if(!d)return null;if(!a)throw new Error("Can't infer output type");return new Ns(a,c,d)}evaluate(t){for(const[n,a]of this.branches)if(n.evaluate(t))return a.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[n,a]of this.branches)t(n),t(a);t(this.otherwise)}outputDefined(){return this.branches.every(([t,n])=>n.outputDefined())&&this.otherwise.outputDefined()}}class Zs{constructor(t,n,a,c){this.type=t,this.input=n,this.beginIndex=a,this.endIndex=c}static parse(t,n){if(t.length<=2||t.length>=5)return n.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const a=n.parse(t[1],1,at),c=n.parse(t[2],2,ze);if(!a||!c)return null;if(!Xl(a.type,[mr(at),We,at]))return n.error(`Expected first argument to be of type array or string, but found ${hi(a.type)} instead`);if(t.length===4){const d=n.parse(t[3],3,ze);return d?new Zs(a.type,a,c,d):null}return new Zs(a.type,a,c)}evaluate(t){const n=this.input.evaluate(t),a=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),qn(n,["string"]))return[...n].slice(a,c).join("");if(qn(n,["array"]))return n.slice(a,c);throw new oi(`Expected first argument to be of type array or string, but found ${hi(li(n))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function zo(r,t){const n=r.length-1;let a,c,d=0,p=n,g=0;for(;d<=p;)if(g=Math.floor((d+p)/2),a=r[g],c=r[g+1],a<=t){if(g===n||t<c)return g;d=g+1}else{if(!(a>t))throw new oi("Input is not a number.");p=g-1}return 0}class Qa{constructor(t,n,a){this.type=t,this.input=n,this.labels=[],this.outputs=[];for(const[c,d]of a)this.labels.push(c),this.outputs.push(d)}static parse(t,n){if(t.length-1<4)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");const a=n.parse(t[1],1,ze);if(!a)return null;const c=[];let d=null;n.expectedType&&n.expectedType.kind!=="value"&&(d=n.expectedType);for(let p=1;p<t.length;p+=2){const g=p===1?-1/0:t[p],x=t[p+1],w=p,P=p+1;if(typeof g!="number")return n.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',w);if(c.length&&c[c.length-1][0]>=g)return n.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',w);const M=n.parse(x,P,d);if(!M)return null;d=d||M.type,c.push([g,M])}return new Qa(d,a,c)}evaluate(t){const n=this.labels,a=this.outputs;if(n.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=n[0])return a[0].evaluate(t);const d=n.length;return c>=n[d-1]?a[d-1].evaluate(t):a[zo(n,c)].evaluate(t)}eachChild(t){t(this.input);for(const n of this.outputs)t(n)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Ju(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ga,Hi,Ro=function(){if(Hi)return ga;function r(t,n,a,c){this.cx=3*t,this.bx=3*(a-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(c-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=a,this.p2y=c}return Hi=1,ga=r,r.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,n){if(n===void 0&&(n=1e-6),t<0)return 0;if(t>1)return 1;for(var a=t,c=0;c<8;c++){var d=this.sampleCurveX(a)-t;if(Math.abs(d)<n)return a;var p=this.sampleCurveDerivativeX(a);if(Math.abs(p)<1e-6)break;a-=d/p}var g=0,x=1;for(a=t,c=0;c<20&&(d=this.sampleCurveX(a),!(Math.abs(d-t)<n));c++)t>d?g=a:x=a,a=.5*(x-g)+g;return a},solve:function(t,n){return this.sampleCurveY(this.solveCurveX(t,n))}},ga}(),Qu=Ju(Ro);class Qi{constructor(t,n,a,c,d){this.type=t,this.operator=n,this.interpolation=a,this.input=c,this.labels=[],this.outputs=[];for(const[p,g]of d)this.labels.push(p),this.outputs.push(g)}static interpolationFactor(t,n,a,c){let d=0;if(t.name==="exponential")d=Ai(n,t.base,a,c);else if(t.name==="linear")d=Ai(n,1,a,c);else if(t.name==="cubic-bezier"){const p=t.controlPoints;d=new Qu(p[0],p[1],p[2],p[3]).solve(Ai(n,1,a,c))}return d}static parse(t,n){let[a,c,d,...p]=t;if(!Array.isArray(c)||c.length===0)return n.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const w=c[1];if(typeof w!="number")return n.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:w}}else{if(c[0]!=="cubic-bezier")return n.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const w=c.slice(1);if(w.length!==4||w.some(P=>typeof P!="number"||P<0||P>1))return n.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:w}}}if(t.length-1<4)return n.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return n.error("Expected an even number of arguments.");if(d=n.parse(d,2,ze),!d)return null;const g=[];let x=null;a==="interpolate-hcl"||a==="interpolate-lab"?x=ht:n.expectedType&&n.expectedType.kind!=="value"&&(x=n.expectedType);for(let w=0;w<p.length;w+=2){const P=p[w],M=p[w+1],z=w+3,L=w+4;if(typeof P!="number")return n.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',z);if(g.length&&g[g.length-1][0]>=P)return n.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',z);const B=n.parse(M,L,x);if(!B)return null;x=x||B.type,g.push([P,B])}return qa(x,ze)||qa(x,mi)||qa(x,ht)||qa(x,Co)||qa(x,Gn)||qa(x,mr(ze))?new Qi(x,a,c,d,g):n.error(`Type ${hi(x)} is not interpolatable.`)}evaluate(t){const n=this.labels,a=this.outputs;if(n.length===1)return a[0].evaluate(t);const c=this.input.evaluate(t);if(c<=n[0])return a[0].evaluate(t);const d=n.length;if(c>=n[d-1])return a[d-1].evaluate(t);const p=zo(n,c),g=Qi.interpolationFactor(this.interpolation,c,n[p],n[p+1]),x=a[p].evaluate(t),w=a[p+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return In(x,w,g);case"color":return Et.interpolate(x,w,g);case"padding":return Wi.interpolate(x,w,g);case"variableAnchorOffsetCollection":return lr.interpolate(x,w,g);case"array":return Ha(x,w,g);case"projectionDefinition":return Fi.interpolate(x,w,g)}case"interpolate-hcl":return Et.interpolate(x,w,g,"hcl");case"interpolate-lab":return Et.interpolate(x,w,g,"lab")}}eachChild(t){t(this.input);for(const n of this.outputs)t(n)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function Ai(r,t,n,a){const c=a-n,d=r-n;return c===0?0:t===1?d/c:(Math.pow(t,d)-1)/(Math.pow(t,c)-1)}const Jr={color:Et.interpolate,number:In,padding:Wi.interpolate,variableAnchorOffsetCollection:lr.interpolate,array:Ha};class es{constructor(t,n){this.type=t,this.args=n}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");let a=null;const c=n.expectedType;c&&c.kind!=="value"&&(a=c);const d=[];for(const g of t.slice(1)){const x=n.parse(g,1+d.length,a,void 0,{typeAnnotation:"omit"});if(!x)return null;a=a||x.type,d.push(x)}if(!a)throw new Error("No output type");const p=c&&d.some(g=>Ga(c,g.type));return new es(p?at:a,d)}evaluate(t){let n,a=null,c=0;for(const d of this.args)if(c++,a=d.evaluate(t),a&&a instanceof gr&&!a.available&&(n||(n=a.name),a=null,c===this.args.length&&(a=n)),a!==null)break;return a}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function Jl(r,t){return r==="=="||r==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function eh(r,t,n,a){return a.compare(t,n)===0}function Cn(r,t,n){const a=r!=="=="&&r!=="!=";return class Yg{constructor(d,p,g){this.type=Ne,this.lhs=d,this.rhs=p,this.collator=g,this.hasUntypedArgument=d.type.kind==="value"||p.type.kind==="value"}static parse(d,p){if(d.length!==3&&d.length!==4)return p.error("Expected two or three arguments.");const g=d[0];let x=p.parse(d[1],1,at);if(!x)return null;if(!Jl(g,x.type))return p.concat(1).error(`"${g}" comparisons are not supported for type '${hi(x.type)}'.`);let w=p.parse(d[2],2,at);if(!w)return null;if(!Jl(g,w.type))return p.concat(2).error(`"${g}" comparisons are not supported for type '${hi(w.type)}'.`);if(x.type.kind!==w.type.kind&&x.type.kind!=="value"&&w.type.kind!=="value")return p.error(`Cannot compare types '${hi(x.type)}' and '${hi(w.type)}'.`);a&&(x.type.kind==="value"&&w.type.kind!=="value"?x=new _r(w.type,[x]):x.type.kind!=="value"&&w.type.kind==="value"&&(w=new _r(x.type,[w])));let P=null;if(d.length===4){if(x.type.kind!=="string"&&w.type.kind!=="string"&&x.type.kind!=="value"&&w.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(P=p.parse(d[3],3,Li),!P)return null}return new Yg(x,w,P)}evaluate(d){const p=this.lhs.evaluate(d),g=this.rhs.evaluate(d);if(a&&this.hasUntypedArgument){const x=li(p),w=li(g);if(x.kind!==w.kind||x.kind!=="string"&&x.kind!=="number")throw new oi(`Expected arguments for "${r}" to be (string, string) or (number, number), but found (${x.kind}, ${w.kind}) instead.`)}if(this.collator&&!a&&this.hasUntypedArgument){const x=li(p),w=li(g);if(x.kind!=="string"||w.kind!=="string")return t(d,p,g)}return this.collator?n(d,p,g,this.collator.evaluate(d)):t(d,p,g)}eachChild(d){d(this.lhs),d(this.rhs),this.collator&&d(this.collator)}outputDefined(){return!0}}}const Ql=Cn("==",function(r,t,n){return t===n},eh),Fd=Cn("!=",function(r,t,n){return t!==n},function(r,t,n,a){return!eh(0,t,n,a)}),Do=Cn("<",function(r,t,n){return t<n},function(r,t,n,a){return a.compare(t,n)<0}),Lo=Cn(">",function(r,t,n){return t>n},function(r,t,n,a){return a.compare(t,n)>0}),Qr=Cn("<=",function(r,t,n){return t<=n},function(r,t,n,a){return a.compare(t,n)<=0}),th=Cn(">=",function(r,t,n){return t>=n},function(r,t,n,a){return a.compare(t,n)>=0});class _a{constructor(t,n,a){this.type=Li,this.locale=a,this.caseSensitive=t,this.diacriticSensitive=n}static parse(t,n){if(t.length!==2)return n.error("Expected one argument.");const a=t[1];if(typeof a!="object"||Array.isArray(a))return n.error("Collator options argument must be an object.");const c=n.parse(a["case-sensitive"]!==void 0&&a["case-sensitive"],1,Ne);if(!c)return null;const d=n.parse(a["diacritic-sensitive"]!==void 0&&a["diacritic-sensitive"],1,Ne);if(!d)return null;let p=null;return a.locale&&(p=n.parse(a.locale,1,We),!p)?null:new _a(c,d,p)}evaluate(t){return new Nr(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class ec{constructor(t,n,a,c,d){this.type=We,this.number=t,this.locale=n,this.currency=a,this.minFractionDigits=c,this.maxFractionDigits=d}static parse(t,n){if(t.length!==3)return n.error("Expected two arguments.");const a=n.parse(t[1],1,ze);if(!a)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return n.error("NumberFormat options argument must be an object.");let d=null;if(c.locale&&(d=n.parse(c.locale,1,We),!d))return null;let p=null;if(c.currency&&(p=n.parse(c.currency,1,We),!p))return null;let g=null;if(c["min-fraction-digits"]&&(g=n.parse(c["min-fraction-digits"],1,ze),!g))return null;let x=null;return c["max-fraction-digits"]&&(x=n.parse(c["max-fraction-digits"],1,ze),!x)?null:new ec(a,d,p,g,x)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class ts{constructor(t){this.type=Qt,this.sections=t}static parse(t,n){if(t.length<2)return n.error("Expected at least one argument.");const a=t[1];if(!Array.isArray(a)&&typeof a=="object")return n.error("First argument must be an image or text section.");const c=[];let d=!1;for(let p=1;p<=t.length-1;++p){const g=t[p];if(d&&typeof g=="object"&&!Array.isArray(g)){d=!1;let x=null;if(g["font-scale"]&&(x=n.parse(g["font-scale"],1,ze),!x))return null;let w=null;if(g["text-font"]&&(w=n.parse(g["text-font"],1,mr(We)),!w))return null;let P=null;if(g["text-color"]&&(P=n.parse(g["text-color"],1,ht),!P))return null;let M=null;if(g["vertical-align"]){if(typeof g["vertical-align"]=="string"&&!Fs.includes(g["vertical-align"]))return n.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${g["vertical-align"]}' instead.`);if(M=n.parse(g["vertical-align"],1,We),!M)return null}const z=c[c.length-1];z.scale=x,z.font=w,z.textColor=P,z.verticalAlign=M}else{const x=n.parse(t[p],1,at);if(!x)return null;const w=x.type.kind;if(w!=="string"&&w!=="value"&&w!=="null"&&w!=="resolvedImage")return n.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");d=!0,c.push({content:x,scale:null,font:null,textColor:null,verticalAlign:null})}}return new ts(c)}evaluate(t){return new or(this.sections.map(n=>{const a=n.content.evaluate(t);return li(a)===$a?new Xa("",a,null,null,null,n.verticalAlign?n.verticalAlign.evaluate(t):null):new Xa(Ka(a),null,n.scale?n.scale.evaluate(t):null,n.font?n.font.evaluate(t).join(","):null,n.textColor?n.textColor.evaluate(t):null,n.verticalAlign?n.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const n of this.sections)t(n.content),n.scale&&t(n.scale),n.font&&t(n.font),n.textColor&&t(n.textColor),n.verticalAlign&&t(n.verticalAlign)}outputDefined(){return!1}}class tc{constructor(t){this.type=$a,this.input=t}static parse(t,n){if(t.length!==2)return n.error("Expected two arguments.");const a=n.parse(t[1],1,We);return a?new tc(a):n.error("No image name provided.")}evaluate(t){const n=this.input.evaluate(t),a=gr.fromString(n);return a&&t.availableImages&&(a.available=t.availableImages.indexOf(n)>-1),a}eachChild(t){t(this.input)}outputDefined(){return!1}}class ic{constructor(t){this.type=ze,this.input=t}static parse(t,n){if(t.length!==2)return n.error(`Expected 1 argument, but found ${t.length-1} instead.`);const a=n.parse(t[1],1);return a?a.type.kind!=="array"&&a.type.kind!=="string"&&a.type.kind!=="value"?n.error(`Expected argument of type string or array, but found ${hi(a.type)} instead.`):new ic(a):null}evaluate(t){const n=this.input.evaluate(t);if(typeof n=="string")return[...n].length;if(Array.isArray(n))return n.length;throw new oi(`Expected value to be of type string or array, but found ${hi(li(n))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const un=8192;function Bd(r,t){const n=(180+r[0])/360,a=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(n*c*un),Math.round(a*c*un)]}function is(r,t){const n=Math.pow(2,t.z);return[(c=(r[0]/un+t.x)/n,360*c-180),(a=(r[1]/un+t.y)/n,360/Math.PI*Math.atan(Math.exp((180-360*a)*Math.PI/180))-90)];var a,c}function Vs(r,t){r[0]=Math.min(r[0],t[0]),r[1]=Math.min(r[1],t[1]),r[2]=Math.max(r[2],t[0]),r[3]=Math.max(r[3],t[1])}function rs(r,t){return!(r[0]<=t[0]||r[2]>=t[2]||r[1]<=t[1]||r[3]>=t[3])}function ih(r,t,n){const a=r[0]-t[0],c=r[1]-t[1],d=r[0]-n[0],p=r[1]-n[1];return a*p-d*c==0&&a*d<=0&&c*p<=0}function Fo(r,t,n,a){return(c=[a[0]-n[0],a[1]-n[1]])[0]*(d=[t[0]-r[0],t[1]-r[1]])[1]-c[1]*d[0]!=0&&!(!ah(r,t,n,a)||!ah(n,a,r,t));var c,d}function rh(r,t,n){for(const a of n)for(let c=0;c<a.length-1;++c)if(Fo(r,t,a[c],a[c+1]))return!0;return!1}function ns(r,t,n=!1){let a=!1;for(const g of t)for(let x=0;x<g.length-1;x++){if(ih(r,g[x],g[x+1]))return n;(d=g[x])[1]>(c=r)[1]!=(p=g[x+1])[1]>c[1]&&c[0]<(p[0]-d[0])*(c[1]-d[1])/(p[1]-d[1])+d[0]&&(a=!a)}var c,d,p;return a}function Od(r,t){for(const n of t)if(ns(r,n))return!0;return!1}function nh(r,t){for(const n of r)if(!ns(n,t))return!1;for(let n=0;n<r.length-1;++n)if(rh(r[n],r[n+1],t))return!1;return!0}function jd(r,t){for(const n of t)if(nh(r,n))return!0;return!1}function ah(r,t,n,a){const c=a[0]-n[0],d=a[1]-n[1],p=(r[0]-n[0])*d-c*(r[1]-n[1]),g=(t[0]-n[0])*d-c*(t[1]-n[1]);return p>0&&g<0||p<0&&g>0}function Bo(r,t,n){const a=[];for(let c=0;c<r.length;c++){const d=[];for(let p=0;p<r[c].length;p++){const g=Bd(r[c][p],n);Vs(t,g),d.push(g)}a.push(d)}return a}function rc(r,t,n){const a=[];for(let c=0;c<r.length;c++){const d=Bo(r[c],t,n);a.push(d)}return a}function nc(r,t,n,a){if(r[0]<n[0]||r[0]>n[2]){const c=.5*a;let d=r[0]-n[0]>c?-a:n[0]-r[0]>c?a:0;d===0&&(d=r[0]-n[2]>c?-a:n[2]-r[0]>c?a:0),r[0]+=d}Vs(t,r)}function sh(r,t,n,a){const c=Math.pow(2,a.z)*un,d=[a.x*un,a.y*un],p=[];for(const g of r)for(const x of g){const w=[x.x+d[0],x.y+d[1]];nc(w,t,n,c),p.push(w)}return p}function oh(r,t,n,a){const c=Math.pow(2,a.z)*un,d=[a.x*un,a.y*un],p=[];for(const x of r){const w=[];for(const P of x){const M=[P.x+d[0],P.y+d[1]];Vs(t,M),w.push(M)}p.push(w)}if(t[2]-t[0]<=c/2){(g=t)[0]=g[1]=1/0,g[2]=g[3]=-1/0;for(const x of p)for(const w of x)nc(w,t,n,c)}var g;return p}class ya{constructor(t,n){this.type=Ne,this.geojson=t,this.geometries=n}static parse(t,n){if(t.length!==2)return n.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Hn(t[1])){const a=t[1];if(a.type==="FeatureCollection"){const c=[];for(const d of a.features){const{type:p,coordinates:g}=d.geometry;p==="Polygon"&&c.push(g),p==="MultiPolygon"&&c.push(...g)}if(c.length)return new ya(a,{type:"MultiPolygon",coordinates:c})}else if(a.type==="Feature"){const c=a.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new ya(a,a.geometry)}else if(a.type==="Polygon"||a.type==="MultiPolygon")return new ya(a,a)}return n.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(n,a){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=n.canonicalID();if(a.type==="Polygon"){const g=Bo(a.coordinates,d,p),x=sh(n.geometry(),c,d,p);if(!rs(c,d))return!1;for(const w of x)if(!ns(w,g))return!1}if(a.type==="MultiPolygon"){const g=rc(a.coordinates,d,p),x=sh(n.geometry(),c,d,p);if(!rs(c,d))return!1;for(const w of x)if(!Od(w,g))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(n,a){const c=[1/0,1/0,-1/0,-1/0],d=[1/0,1/0,-1/0,-1/0],p=n.canonicalID();if(a.type==="Polygon"){const g=Bo(a.coordinates,d,p),x=oh(n.geometry(),c,d,p);if(!rs(c,d))return!1;for(const w of x)if(!nh(w,g))return!1}if(a.type==="MultiPolygon"){const g=rc(a.coordinates,d,p),x=oh(n.geometry(),c,d,p);if(!rs(c,d))return!1;for(const w of x)if(!jd(w,g))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Oo=class{constructor(r=[],t=(n,a)=>n<a?-1:n>a?1:0){if(this.data=r,this.length=this.data.length,this.compare=t,this.length>0)for(let n=(this.length>>1)-1;n>=0;n--)this._down(n)}push(r){this.data.push(r),this._up(this.length++)}pop(){if(this.length===0)return;const r=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),r}peek(){return this.data[0]}_up(r){const{data:t,compare:n}=this,a=t[r];for(;r>0;){const c=r-1>>1,d=t[c];if(n(a,d)>=0)break;t[r]=d,r=c}t[r]=a}_down(r){const{data:t,compare:n}=this,a=this.length>>1,c=t[r];for(;r<a;){let d=1+(r<<1);const p=d+1;if(p<this.length&&n(t[p],t[d])<0&&(d=p),n(t[d],c)>=0)break;t[r]=t[d],r=d}t[r]=c}};function lh(r,t,n=0,a=r.length-1,c=Nd){for(;a>n;){if(a-n>600){const x=a-n+1,w=t-n+1,P=Math.log(x),M=.5*Math.exp(2*P/3),z=.5*Math.sqrt(P*M*(x-M)/x)*(w-x/2<0?-1:1);lh(r,t,Math.max(n,Math.floor(t-w*M/x+z)),Math.min(a,Math.floor(t+(x-w)*M/x+z)),c)}const d=r[t];let p=n,g=a;for(Us(r,n,t),c(r[a],d)>0&&Us(r,n,a);p<g;){for(Us(r,p,g),p++,g--;c(r[p],d)<0;)p++;for(;c(r[g],d)>0;)g--}c(r[n],d)===0?Us(r,n,g):(g++,Us(r,g,a)),g<=t&&(n=g+1),t<=g&&(a=g-1)}}function Us(r,t,n){const a=r[t];r[t]=r[n],r[n]=a}function Nd(r,t){return r<t?-1:r>t?1:0}function $s(r,t){if(r.length<=1)return[r];const n=[];let a,c;for(const d of r){const p=Zd(d);p!==0&&(d.area=Math.abs(p),c===void 0&&(c=p<0),c===p<0?(a&&n.push(a),a=[d]):a.push(d))}if(a&&n.push(a),t>1)for(let d=0;d<n.length;d++)n[d].length<=t||(lh(n[d],t,1,n[d].length-1,ch),n[d]=n[d].slice(0,t));return n}function ch(r,t){return t.area-r.area}function Zd(r){let t=0;for(let n,a,c=0,d=r.length,p=d-1;c<d;p=c++)n=r[c],a=r[p],t+=(a.x-n.x)*(n.y+a.y);return t}const uh=1/298.257223563,ac=uh*(2-uh),sc=Math.PI/180;class oc{constructor(t){const n=6378.137*sc*1e3,a=Math.cos(t*sc),c=1/(1-ac*(1-a*a)),d=Math.sqrt(c);this.kx=n*d*a,this.ky=n*d*c*(1-ac)}distance(t,n){const a=this.wrap(t[0]-n[0])*this.kx,c=(t[1]-n[1])*this.ky;return Math.sqrt(a*a+c*c)}pointOnLine(t,n){let a,c,d,p,g=1/0;for(let x=0;x<t.length-1;x++){let w=t[x][0],P=t[x][1],M=this.wrap(t[x+1][0]-w)*this.kx,z=(t[x+1][1]-P)*this.ky,L=0;M===0&&z===0||(L=(this.wrap(n[0]-w)*this.kx*M+(n[1]-P)*this.ky*z)/(M*M+z*z),L>1?(w=t[x+1][0],P=t[x+1][1]):L>0&&(w+=M/this.kx*L,P+=z/this.ky*L)),M=this.wrap(n[0]-w)*this.kx,z=(n[1]-P)*this.ky;const B=M*M+z*z;B<g&&(g=B,a=w,c=P,d=x,p=L)}return{point:[a,c],index:d,t:Math.max(0,Math.min(1,p))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function hh(r,t){return t[0]-r[0]}function jo(r){return r[1]-r[0]+1}function hn(r,t){return r[1]>=r[0]&&r[1]<t}function lc(r,t){if(r[0]>r[1])return[null,null];const n=jo(r);if(t){if(n===2)return[r,null];const c=Math.floor(n/2);return[[r[0],r[0]+c],[r[0]+c,r[1]]]}if(n===1)return[r,null];const a=Math.floor(n/2)-1;return[[r[0],r[0]+a],[r[0]+a+1,r[1]]]}function cc(r,t){if(!hn(t,r.length))return[1/0,1/0,-1/0,-1/0];const n=[1/0,1/0,-1/0,-1/0];for(let a=t[0];a<=t[1];++a)Vs(n,r[a]);return n}function uc(r){const t=[1/0,1/0,-1/0,-1/0];for(const n of r)for(const a of n)Vs(t,a);return t}function dh(r){return r[0]!==-1/0&&r[1]!==-1/0&&r[2]!==1/0&&r[3]!==1/0}function Lt(r,t,n){if(!dh(r)||!dh(t))return NaN;let a=0,c=0;return r[2]<t[0]&&(a=t[0]-r[2]),r[0]>t[2]&&(a=r[0]-t[2]),r[1]>t[3]&&(c=r[1]-t[3]),r[3]<t[1]&&(c=t[1]-r[3]),n.distance([0,0],[a,c])}function xa(r,t,n){const a=n.pointOnLine(t,r);return n.distance(r,a.point)}function hc(r,t,n,a,c){const d=Math.min(xa(r,[n,a],c),xa(t,[n,a],c)),p=Math.min(xa(n,[r,t],c),xa(a,[r,t],c));return Math.min(d,p)}function Vd(r,t,n,a,c){if(!hn(t,r.length)||!hn(a,n.length))return 1/0;let d=1/0;for(let p=t[0];p<t[1];++p){const g=r[p],x=r[p+1];for(let w=a[0];w<a[1];++w){const P=n[w],M=n[w+1];if(Fo(g,x,P,M))return 0;d=Math.min(d,hc(g,x,P,M,c))}}return d}function Ud(r,t,n,a,c){if(!hn(t,r.length)||!hn(a,n.length))return NaN;let d=1/0;for(let p=t[0];p<=t[1];++p)for(let g=a[0];g<=a[1];++g)if(d=Math.min(d,c.distance(r[p],n[g])),d===0)return d;return d}function $d(r,t,n){if(ns(r,t,!0))return 0;let a=1/0;for(const c of t){const d=c[0],p=c[c.length-1];if(d!==p&&(a=Math.min(a,xa(r,[p,d],n)),a===0))return a;const g=n.pointOnLine(c,r);if(a=Math.min(a,n.distance(r,g.point)),a===0)return a}return a}function Gd(r,t,n,a){if(!hn(t,r.length))return NaN;for(let d=t[0];d<=t[1];++d)if(ns(r[d],n,!0))return 0;let c=1/0;for(let d=t[0];d<t[1];++d){const p=r[d],g=r[d+1];for(const x of n)for(let w=0,P=x.length,M=P-1;w<P;M=w++){const z=x[M],L=x[w];if(Fo(p,g,z,L))return 0;c=Math.min(c,hc(p,g,z,L,a))}}return c}function ph(r,t){for(const n of r)for(const a of n)if(ns(a,t,!0))return!0;return!1}function qd(r,t,n,a=1/0){const c=uc(r),d=uc(t);if(a!==1/0&&Lt(c,d,n)>=a)return a;if(rs(c,d)){if(ph(r,t))return 0}else if(ph(t,r))return 0;let p=1/0;for(const g of r)for(let x=0,w=g.length,P=w-1;x<w;P=x++){const M=g[P],z=g[x];for(const L of t)for(let B=0,j=L.length,$=j-1;B<j;$=B++){const H=L[$],ne=L[B];if(Fo(M,z,H,ne))return 0;p=Math.min(p,hc(M,z,H,ne,n))}}return p}function fh(r,t,n,a,c,d){if(!d)return;const p=Lt(cc(a,d),c,n);p<t&&r.push([p,d,[0,0]])}function No(r,t,n,a,c,d,p){if(!d||!p)return;const g=Lt(cc(a,d),cc(c,p),n);g<t&&r.push([g,d,p])}function Zo(r,t,n,a,c=1/0){let d=Math.min(a.distance(r[0],n[0][0]),c);if(d===0)return d;const p=new Oo([[0,[0,r.length-1],[0,0]]],hh),g=uc(n);for(;p.length>0;){const x=p.pop();if(x[0]>=d)continue;const w=x[1],P=t?50:100;if(jo(w)<=P){if(!hn(w,r.length))return NaN;if(t){const M=Gd(r,w,n,a);if(isNaN(M)||M===0)return M;d=Math.min(d,M)}else for(let M=w[0];M<=w[1];++M){const z=$d(r[M],n,a);if(d=Math.min(d,z),d===0)return 0}}else{const M=lc(w,t);fh(p,d,a,r,g,M[0]),fh(p,d,a,r,g,M[1])}}return d}function Vo(r,t,n,a,c,d=1/0){let p=Math.min(d,c.distance(r[0],n[0]));if(p===0)return p;const g=new Oo([[0,[0,r.length-1],[0,n.length-1]]],hh);for(;g.length>0;){const x=g.pop();if(x[0]>=p)continue;const w=x[1],P=x[2],M=t?50:100,z=a?50:100;if(jo(w)<=M&&jo(P)<=z){if(!hn(w,r.length)&&hn(P,n.length))return NaN;let L;if(t&&a)L=Vd(r,w,n,P,c),p=Math.min(p,L);else if(t&&!a){const B=r.slice(w[0],w[1]+1);for(let j=P[0];j<=P[1];++j)if(L=xa(n[j],B,c),p=Math.min(p,L),p===0)return p}else if(!t&&a){const B=n.slice(P[0],P[1]+1);for(let j=w[0];j<=w[1];++j)if(L=xa(r[j],B,c),p=Math.min(p,L),p===0)return p}else L=Ud(r,w,n,P,c),p=Math.min(p,L)}else{const L=lc(w,t),B=lc(P,a);No(g,p,c,r,n,L[0],B[0]),No(g,p,c,r,n,L[0],B[1]),No(g,p,c,r,n,L[1],B[0]),No(g,p,c,r,n,L[1],B[1])}}return p}function dc(r){return r.type==="MultiPolygon"?r.coordinates.map(t=>({type:"Polygon",coordinates:t})):r.type==="MultiLineString"?r.coordinates.map(t=>({type:"LineString",coordinates:t})):r.type==="MultiPoint"?r.coordinates.map(t=>({type:"Point",coordinates:t})):[r]}class va{constructor(t,n){this.type=ze,this.geojson=t,this.geometries=n}static parse(t,n){if(t.length!==2)return n.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Hn(t[1])){const a=t[1];if(a.type==="FeatureCollection")return new va(a,a.features.map(c=>dc(c.geometry)).flat());if(a.type==="Feature")return new va(a,dc(a.geometry));if("type"in a&&"coordinates"in a)return new va(a,dc(a))}return n.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(n,a){const c=n.geometry(),d=c.flat().map(x=>is([x.x,x.y],n.canonical));if(c.length===0)return NaN;const p=new oc(d[0][1]);let g=1/0;for(const x of a){switch(x.type){case"Point":g=Math.min(g,Vo(d,!1,[x.coordinates],!1,p,g));break;case"LineString":g=Math.min(g,Vo(d,!1,x.coordinates,!0,p,g));break;case"Polygon":g=Math.min(g,Zo(d,!1,x.coordinates,p,g))}if(g===0)return g}return g}(t,this.geometries);if(t.geometryType()==="LineString")return function(n,a){const c=n.geometry(),d=c.flat().map(x=>is([x.x,x.y],n.canonical));if(c.length===0)return NaN;const p=new oc(d[0][1]);let g=1/0;for(const x of a){switch(x.type){case"Point":g=Math.min(g,Vo(d,!0,[x.coordinates],!1,p,g));break;case"LineString":g=Math.min(g,Vo(d,!0,x.coordinates,!0,p,g));break;case"Polygon":g=Math.min(g,Zo(d,!0,x.coordinates,p,g))}if(g===0)return g}return g}(t,this.geometries);if(t.geometryType()==="Polygon")return function(n,a){const c=n.geometry();if(c.length===0||c[0].length===0)return NaN;const d=$s(c,0).map(x=>x.map(w=>w.map(P=>is([P.x,P.y],n.canonical)))),p=new oc(d[0][0][0][1]);let g=1/0;for(const x of a)for(const w of d){switch(x.type){case"Point":g=Math.min(g,Zo([x.coordinates],!1,w,p,g));break;case"LineString":g=Math.min(g,Zo(x.coordinates,!0,w,p,g));break;case"Polygon":g=Math.min(g,qd(w,x.coordinates,p,g))}if(g===0)return g}return g}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const as={"==":Ql,"!=":Fd,">":Lo,"<":Do,">=":th,"<=":Qr,array:_r,at:Yr,boolean:_r,case:Ns,coalesce:es,collator:_a,format:ts,image:tc,in:Os,"index-of":js,interpolate:Qi,"interpolate-hcl":Qi,"interpolate-lab":Qi,length:ic,let:Ct,literal:Xn,match:Ao,number:_r,"number-format":ec,object:_r,slice:Zs,step:Qa,string:_r,"to-boolean":cn,"to-color":cn,"to-number":cn,"to-string":cn,var:Ja,within:ya,distance:va};class Zr{constructor(t,n,a,c){this.name=t,this.type=n,this._evaluate=a,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,n){const a=t[0],c=Zr.definitions[a];if(!c)return n.error(`Unknown expression "${a}". If you wanted a literal array, use ["literal", [...]].`,0);const d=Array.isArray(c)?c[0]:c.type,p=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,g=p.filter(([w])=>!Array.isArray(w)||w.length===t.length-1);let x=null;for(const[w,P]of g){x=new Ya(n.registry,Uo,n.path,null,n.scope);const M=[];let z=!1;for(let L=1;L<t.length;L++){const B=t[L],j=Array.isArray(w)?w[L-1]:w.type,$=x.parse(B,1+M.length,j);if(!$){z=!0;break}M.push($)}if(!z)if(Array.isArray(w)&&w.length!==M.length)x.error(`Expected ${w.length} arguments, but found ${M.length} instead.`);else{for(let L=0;L<M.length;L++){const B=Array.isArray(w)?w[L]:w.type,j=M[L];x.concat(L+1).checkSubtype(B,j.type)}if(x.errors.length===0)return new Zr(a,d,P,M)}}if(g.length===1)n.errors.push(...x.errors);else{const w=(g.length?g:p).map(([M])=>{return z=M,Array.isArray(z)?`(${z.map(hi).join(", ")})`:`(${hi(z.type)}...)`;var z}).join(" | "),P=[];for(let M=1;M<t.length;M++){const z=n.parse(t[M],1+P.length);if(!z)return null;P.push(hi(z.type))}n.error(`Expected arguments of type ${w}, but found (${P.join(", ")}) instead.`)}return null}static register(t,n){Zr.definitions=n;for(const a in n)t[a]=Zr}}function mh(r,[t,n,a,c]){t=t.evaluate(r),n=n.evaluate(r),a=a.evaluate(r);const d=c?c.evaluate(r):1,p=Yu(t,n,a,d);if(p)throw new oi(p);return new Et(t/255,n/255,a/255,d,!1)}function gh(r,t){return r in t}function pc(r,t){const n=t[r];return n===void 0?null:n}function ba(r){return{type:r}}function Uo(r){if(r instanceof Ja)return Uo(r.boundExpression);if(r instanceof Zr&&r.name==="error"||r instanceof _a||r instanceof ya||r instanceof va)return!1;const t=r instanceof cn||r instanceof _r;let n=!0;return r.eachChild(a=>{n=t?n&&Uo(a):n&&a instanceof Xn}),!!n&&$o(r)&&Go(r,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function $o(r){if(r instanceof Zr&&(r.name==="get"&&r.args.length===1||r.name==="feature-state"||r.name==="has"&&r.args.length===1||r.name==="properties"||r.name==="geometry-type"||r.name==="id"||/^filter-/.test(r.name))||r instanceof ya||r instanceof va)return!1;let t=!0;return r.eachChild(n=>{t&&!$o(n)&&(t=!1)}),t}function Gs(r){if(r instanceof Zr&&r.name==="feature-state")return!1;let t=!0;return r.eachChild(n=>{t&&!Gs(n)&&(t=!1)}),t}function Go(r,t){if(r instanceof Zr&&t.indexOf(r.name)>=0)return!1;let n=!0;return r.eachChild(a=>{n&&!Go(a,t)&&(n=!1)}),n}function _h(r){return{result:"success",value:r}}function ss(r){return{result:"error",value:r}}function os(r){return r["property-type"]==="data-driven"||r["property-type"]==="cross-faded-data-driven"}function yh(r){return!!r.expression&&r.expression.parameters.indexOf("zoom")>-1}function fc(r){return!!r.expression&&r.expression.interpolated}function zt(r){return r instanceof Number?"number":r instanceof String?"string":r instanceof Boolean?"boolean":Array.isArray(r)?"array":r===null?"null":typeof r}function qo(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function mc(r){return r}function xh(r,t){const n=t.type==="color",a=r.stops&&typeof r.stops[0][0]=="object",c=a||!(a||r.property!==void 0),d=r.type||(fc(t)?"exponential":"interval");if(n||t.type==="padding"){const P=n?Et.parse:Wi.parse;(r=lt({},r)).stops&&(r.stops=r.stops.map(M=>[M[0],P(M[1])])),r.default=P(r.default?r.default:t.default)}if(r.colorSpace&&(p=r.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${r.colorSpace}"`);var p;let g,x,w;if(d==="exponential")g=bh;else if(d==="interval")g=vh;else if(d==="categorical"){g=Wd,x=Object.create(null);for(const P of r.stops)x[P[0]]=P[1];w=typeof r.stops[0][0]}else{if(d!=="identity")throw new Error(`Unknown function type "${d}"`);g=Hd}if(a){const P={},M=[];for(let B=0;B<r.stops.length;B++){const j=r.stops[B],$=j[0].zoom;P[$]===void 0&&(P[$]={zoom:$,type:r.type,property:r.property,default:r.default,stops:[]},M.push($)),P[$].stops.push([j[0].value,j[1]])}const z=[];for(const B of M)z.push([P[B].zoom,xh(P[B],t)]);const L={name:"linear"};return{kind:"composite",interpolationType:L,interpolationFactor:Qi.interpolationFactor.bind(void 0,L),zoomStops:z.map(B=>B[0]),evaluate:({zoom:B},j)=>bh({stops:z,base:r.base},t,B).evaluate(B,j)}}if(c){const P=d==="exponential"?{name:"exponential",base:r.base!==void 0?r.base:1}:null;return{kind:"camera",interpolationType:P,interpolationFactor:Qi.interpolationFactor.bind(void 0,P),zoomStops:r.stops.map(M=>M[0]),evaluate:({zoom:M})=>g(r,t,M,x,w)}}return{kind:"source",evaluate(P,M){const z=M&&M.properties?M.properties[r.property]:void 0;return z===void 0?qs(r.default,t.default):g(r,t,z,x,w)}}}function qs(r,t,n){return r!==void 0?r:t!==void 0?t:n!==void 0?n:void 0}function Wd(r,t,n,a,c){return qs(typeof n===c?a[n]:void 0,r.default,t.default)}function vh(r,t,n){if(zt(n)!=="number")return qs(r.default,t.default);const a=r.stops.length;if(a===1||n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[a-1][0])return r.stops[a-1][1];const c=zo(r.stops.map(d=>d[0]),n);return r.stops[c][1]}function bh(r,t,n){const a=r.base!==void 0?r.base:1;if(zt(n)!=="number")return qs(r.default,t.default);const c=r.stops.length;if(c===1||n<=r.stops[0][0])return r.stops[0][1];if(n>=r.stops[c-1][0])return r.stops[c-1][1];const d=zo(r.stops.map(P=>P[0]),n),p=function(P,M,z,L){const B=L-z,j=P-z;return B===0?0:M===1?j/B:(Math.pow(M,j)-1)/(Math.pow(M,B)-1)}(n,a,r.stops[d][0],r.stops[d+1][0]),g=r.stops[d][1],x=r.stops[d+1][1],w=Jr[t.type]||mc;return typeof g.evaluate=="function"?{evaluate(...P){const M=g.evaluate.apply(void 0,P),z=x.evaluate.apply(void 0,P);if(M!==void 0&&z!==void 0)return w(M,z,p,r.colorSpace)}}:w(g,x,p,r.colorSpace)}function Hd(r,t,n){switch(t.type){case"color":n=Et.parse(n);break;case"formatted":n=or.fromString(n.toString());break;case"resolvedImage":n=gr.fromString(n.toString());break;case"padding":n=Wi.parse(n);break;default:zt(n)===t.type||t.type==="enum"&&t.values[n]||(n=void 0)}return qs(n,r.default,t.default)}Zr.register(as,{error:[{kind:"error"},[We],(r,[t])=>{throw new oi(t.evaluate(r))}],typeof:[We,[at],(r,[t])=>hi(li(t.evaluate(r)))],"to-rgba":[mr(ze,4),[ht],(r,[t])=>{const[n,a,c,d]=t.evaluate(r).rgb;return[255*n,255*a,255*c,d]}],rgb:[ht,[ze,ze,ze],mh],rgba:[ht,[ze,ze,ze,ze],mh],has:{type:Ne,overloads:[[[We],(r,[t])=>gh(t.evaluate(r),r.properties())],[[We,Mn],(r,[t,n])=>gh(t.evaluate(r),n.evaluate(r))]]},get:{type:at,overloads:[[[We],(r,[t])=>pc(t.evaluate(r),r.properties())],[[We,Mn],(r,[t,n])=>pc(t.evaluate(r),n.evaluate(r))]]},"feature-state":[at,[We],(r,[t])=>pc(t.evaluate(r),r.featureState||{})],properties:[Mn,[],r=>r.properties()],"geometry-type":[We,[],r=>r.geometryType()],id:[at,[],r=>r.id()],zoom:[ze,[],r=>r.globals.zoom],"heatmap-density":[ze,[],r=>r.globals.heatmapDensity||0],"line-progress":[ze,[],r=>r.globals.lineProgress||0],accumulated:[at,[],r=>r.globals.accumulated===void 0?null:r.globals.accumulated],"+":[ze,ba(ze),(r,t)=>{let n=0;for(const a of t)n+=a.evaluate(r);return n}],"*":[ze,ba(ze),(r,t)=>{let n=1;for(const a of t)n*=a.evaluate(r);return n}],"-":{type:ze,overloads:[[[ze,ze],(r,[t,n])=>t.evaluate(r)-n.evaluate(r)],[[ze],(r,[t])=>-t.evaluate(r)]]},"/":[ze,[ze,ze],(r,[t,n])=>t.evaluate(r)/n.evaluate(r)],"%":[ze,[ze,ze],(r,[t,n])=>t.evaluate(r)%n.evaluate(r)],ln2:[ze,[],()=>Math.LN2],pi:[ze,[],()=>Math.PI],e:[ze,[],()=>Math.E],"^":[ze,[ze,ze],(r,[t,n])=>Math.pow(t.evaluate(r),n.evaluate(r))],sqrt:[ze,[ze],(r,[t])=>Math.sqrt(t.evaluate(r))],log10:[ze,[ze],(r,[t])=>Math.log(t.evaluate(r))/Math.LN10],ln:[ze,[ze],(r,[t])=>Math.log(t.evaluate(r))],log2:[ze,[ze],(r,[t])=>Math.log(t.evaluate(r))/Math.LN2],sin:[ze,[ze],(r,[t])=>Math.sin(t.evaluate(r))],cos:[ze,[ze],(r,[t])=>Math.cos(t.evaluate(r))],tan:[ze,[ze],(r,[t])=>Math.tan(t.evaluate(r))],asin:[ze,[ze],(r,[t])=>Math.asin(t.evaluate(r))],acos:[ze,[ze],(r,[t])=>Math.acos(t.evaluate(r))],atan:[ze,[ze],(r,[t])=>Math.atan(t.evaluate(r))],min:[ze,ba(ze),(r,t)=>Math.min(...t.map(n=>n.evaluate(r)))],max:[ze,ba(ze),(r,t)=>Math.max(...t.map(n=>n.evaluate(r)))],abs:[ze,[ze],(r,[t])=>Math.abs(t.evaluate(r))],round:[ze,[ze],(r,[t])=>{const n=t.evaluate(r);return n<0?-Math.round(-n):Math.round(n)}],floor:[ze,[ze],(r,[t])=>Math.floor(t.evaluate(r))],ceil:[ze,[ze],(r,[t])=>Math.ceil(t.evaluate(r))],"filter-==":[Ne,[We,at],(r,[t,n])=>r.properties()[t.value]===n.value],"filter-id-==":[Ne,[at],(r,[t])=>r.id()===t.value],"filter-type-==":[Ne,[We],(r,[t])=>r.geometryType()===t.value],"filter-<":[Ne,[We,at],(r,[t,n])=>{const a=r.properties()[t.value],c=n.value;return typeof a==typeof c&&a<c}],"filter-id-<":[Ne,[at],(r,[t])=>{const n=r.id(),a=t.value;return typeof n==typeof a&&n<a}],"filter->":[Ne,[We,at],(r,[t,n])=>{const a=r.properties()[t.value],c=n.value;return typeof a==typeof c&&a>c}],"filter-id->":[Ne,[at],(r,[t])=>{const n=r.id(),a=t.value;return typeof n==typeof a&&n>a}],"filter-<=":[Ne,[We,at],(r,[t,n])=>{const a=r.properties()[t.value],c=n.value;return typeof a==typeof c&&a<=c}],"filter-id-<=":[Ne,[at],(r,[t])=>{const n=r.id(),a=t.value;return typeof n==typeof a&&n<=a}],"filter->=":[Ne,[We,at],(r,[t,n])=>{const a=r.properties()[t.value],c=n.value;return typeof a==typeof c&&a>=c}],"filter-id->=":[Ne,[at],(r,[t])=>{const n=r.id(),a=t.value;return typeof n==typeof a&&n>=a}],"filter-has":[Ne,[at],(r,[t])=>t.value in r.properties()],"filter-has-id":[Ne,[],r=>r.id()!==null&&r.id()!==void 0],"filter-type-in":[Ne,[mr(We)],(r,[t])=>t.value.indexOf(r.geometryType())>=0],"filter-id-in":[Ne,[mr(at)],(r,[t])=>t.value.indexOf(r.id())>=0],"filter-in-small":[Ne,[We,mr(at)],(r,[t,n])=>n.value.indexOf(r.properties()[t.value])>=0],"filter-in-large":[Ne,[We,mr(at)],(r,[t,n])=>function(a,c,d,p){for(;d<=p;){const g=d+p>>1;if(c[g]===a)return!0;c[g]>a?p=g-1:d=g+1}return!1}(r.properties()[t.value],n.value,0,n.value.length-1)],all:{type:Ne,overloads:[[[Ne,Ne],(r,[t,n])=>t.evaluate(r)&&n.evaluate(r)],[ba(Ne),(r,t)=>{for(const n of t)if(!n.evaluate(r))return!1;return!0}]]},any:{type:Ne,overloads:[[[Ne,Ne],(r,[t,n])=>t.evaluate(r)||n.evaluate(r)],[ba(Ne),(r,t)=>{for(const n of t)if(n.evaluate(r))return!0;return!1}]]},"!":[Ne,[Ne],(r,[t])=>!t.evaluate(r)],"is-supported-script":[Ne,[We],(r,[t])=>{const n=r.globals&&r.globals.isSupportedScript;return!n||n(t.evaluate(r))}],upcase:[We,[We],(r,[t])=>t.evaluate(r).toUpperCase()],downcase:[We,[We],(r,[t])=>t.evaluate(r).toLowerCase()],concat:[We,ba(at),(r,t)=>t.map(n=>Ka(n.evaluate(r))).join("")],"resolved-locale":[We,[Li],(r,[t])=>t.evaluate(r).resolvedLocale()]});class ls{constructor(t,n){var a;this.expression=t,this._warningHistory={},this._evaluator=new ft,this._defaultValue=n?(a=n).type==="color"&&qo(a.default)?new Et(0,0,0,0):a.type==="color"?Et.parse(a.default)||null:a.type==="padding"?Wi.parse(a.default)||null:a.type==="variableAnchorOffsetCollection"?lr.parse(a.default)||null:a.type==="projectionDefinition"?Fi.parse(a.default)||null:a.default===void 0?null:a.default:null,this._enumValues=n&&n.type==="enum"?n.values:null}evaluateWithoutErrorHandling(t,n,a,c,d,p){return this._evaluator.globals=t,this._evaluator.feature=n,this._evaluator.featureState=a,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(t,n,a,c,d,p){this._evaluator.globals=t,this._evaluator.feature=n||null,this._evaluator.featureState=a||null,this._evaluator.canonical=c,this._evaluator.availableImages=d||null,this._evaluator.formattedSection=p||null;try{const g=this.expression.evaluate(this._evaluator);if(g==null||typeof g=="number"&&g!=g)return this._defaultValue;if(this._enumValues&&!(g in this._enumValues))throw new oi(`Expected value to be one of ${Object.keys(this._enumValues).map(x=>JSON.stringify(x)).join(", ")}, but found ${JSON.stringify(g)} instead.`);return g}catch(g){return this._warningHistory[g.message]||(this._warningHistory[g.message]=!0,typeof console<"u"&&console.warn(g.message)),this._defaultValue}}}function Ws(r){return Array.isArray(r)&&r.length>0&&typeof r[0]=="string"&&r[0]in as}function Wo(r,t){const n=new Ya(as,Uo,[],t?function(c){const d={color:ht,string:We,number:ze,enum:We,boolean:Ne,formatted:Qt,padding:Co,projectionDefinition:mi,resolvedImage:$a,variableAnchorOffsetCollection:Gn};return c.type==="array"?mr(d[c.value]||at,c.length):d[c.type]}(t):void 0),a=n.parse(r,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return a?_h(new ls(a,t)):ss(n.errors)}class gc{constructor(t,n){this.kind=t,this._styleExpression=n,this.isStateDependent=t!=="constant"&&!Gs(n.expression)}evaluateWithoutErrorHandling(t,n,a,c,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,n,a,c,d,p)}evaluate(t,n,a,c,d,p){return this._styleExpression.evaluate(t,n,a,c,d,p)}}class _c{constructor(t,n,a,c){this.kind=t,this.zoomStops=a,this._styleExpression=n,this.isStateDependent=t!=="camera"&&!Gs(n.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,n,a,c,d,p){return this._styleExpression.evaluateWithoutErrorHandling(t,n,a,c,d,p)}evaluate(t,n,a,c,d,p){return this._styleExpression.evaluate(t,n,a,c,d,p)}interpolationFactor(t,n,a){return this.interpolationType?Qi.interpolationFactor(this.interpolationType,t,n,a):0}}function wh(r,t){const n=Wo(r,t);if(n.result==="error")return n;const a=n.value.expression,c=$o(a);if(!c&&!os(t))return ss([new et("","data expressions not supported")]);const d=Go(a,["zoom"]);if(!d&&!yh(t))return ss([new et("","zoom expressions not supported")]);const p=Hs(a);return p||d?p instanceof et?ss([p]):p instanceof Qi&&!fc(t)?ss([new et("",'"interpolate" expressions cannot be used with this property')]):_h(p?new _c(c?"camera":"composite",n.value,p.labels,p instanceof Qi?p.interpolation:void 0):new gc(c?"constant":"source",n.value)):ss([new et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Ho{constructor(t,n){this._parameters=t,this._specification=n,lt(this,xh(this._parameters,this._specification))}static deserialize(t){return new Ho(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function Hs(r){let t=null;if(r instanceof Ct)t=Hs(r.result);else if(r instanceof es){for(const n of r.args)if(t=Hs(n),t)break}else(r instanceof Qa||r instanceof Qi)&&r.input instanceof Zr&&r.input.name==="zoom"&&(t=r);return t instanceof et||r.eachChild(n=>{const a=Hs(n);a instanceof et?t=a:!t&&a?t=new et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&a&&t!==a&&(t=new et("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function Xo(r){if(r===!0||r===!1)return!0;if(!Array.isArray(r)||r.length===0)return!1;switch(r[0]){case"has":return r.length>=2&&r[1]!=="$id"&&r[1]!=="$type";case"in":return r.length>=3&&(typeof r[1]!="string"||Array.isArray(r[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return r.length!==3||Array.isArray(r[1])||Array.isArray(r[2]);case"any":case"all":for(const t of r.slice(1))if(!Xo(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const Xd={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function yc(r){if(r==null)return{filter:()=>!0,needGeometry:!1};Xo(r)||(r=Xs(r));const t=Wo(r,Xd);if(t.result==="error")throw new Error(t.value.map(n=>`${n.key}: ${n.message}`).join(", "));return{filter:(n,a,c)=>t.value.evaluate(n,a,{},c),needGeometry:xc(r)}}function Th(r,t){return r<t?-1:r>t?1:0}function xc(r){if(!Array.isArray(r))return!1;if(r[0]==="within"||r[0]==="distance")return!0;for(let t=1;t<r.length;t++)if(xc(r[t]))return!0;return!1}function Xs(r){if(!r)return!0;const t=r[0];return r.length<=1?t!=="any":t==="=="?Ko(r[1],r[2],"=="):t==="!="?cs(Ko(r[1],r[2],"==")):t==="<"||t===">"||t==="<="||t===">="?Ko(r[1],r[2],t):t==="any"?(n=r.slice(1),["any"].concat(n.map(Xs))):t==="all"?["all"].concat(r.slice(1).map(Xs)):t==="none"?["all"].concat(r.slice(1).map(Xs).map(cs)):t==="in"?Yo(r[1],r.slice(2)):t==="!in"?cs(Yo(r[1],r.slice(2))):t==="has"?Jo(r[1]):t!=="!has"||cs(Jo(r[1]));var n}function Ko(r,t,n){switch(r){case"$type":return[`filter-type-${n}`,t];case"$id":return[`filter-id-${n}`,t];default:return[`filter-${n}`,r,t]}}function Yo(r,t){if(t.length===0)return!1;switch(r){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(n=>typeof n!=typeof t[0])?["filter-in-large",r,["literal",t.sort(Th)]]:["filter-in-small",r,["literal",t]]}}function Jo(r){switch(r){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",r]}}function cs(r){return["!",r]}function us(r){const t=typeof r;if(t==="number"||t==="boolean"||t==="string"||r==null)return JSON.stringify(r);if(Array.isArray(r)){let c="[";for(const d of r)c+=`${us(d)},`;return`${c}]`}const n=Object.keys(r).sort();let a="{";for(let c=0;c<n.length;c++)a+=`${JSON.stringify(n[c])}:${us(r[n[c]])},`;return`${a}}`}function Kd(r){let t="";for(const n of Y)t+=`/${us(r[n])}`;return t}function Ph(r){const t=r.value;return t?[new be(r.key,t,"constants have been deprecated as of v8")]:[]}function wi(r){return r instanceof Number||r instanceof String||r instanceof Boolean?r.valueOf():r}function wa(r){if(Array.isArray(r))return r.map(wa);if(r instanceof Object&&!(r instanceof Number||r instanceof String||r instanceof Boolean)){const t={};for(const n in r)t[n]=wa(r[n]);return t}return wi(r)}function Vr(r){const t=r.key,n=r.value,a=r.valueSpec||{},c=r.objectElementValidators||{},d=r.style,p=r.styleSpec,g=r.validateSpec;let x=[];const w=zt(n);if(w!=="object")return[new be(t,n,`object expected, ${w} found`)];for(const P in n){const M=P.split(".")[0],z=a[M]||a["*"];let L;if(c[M])L=c[M];else if(a[M])L=g;else if(c["*"])L=c["*"];else{if(!a["*"]){x.push(new be(t,n[P],`unknown property "${P}"`));continue}L=g}x=x.concat(L({key:(t&&`${t}.`)+P,value:n[P],valueSpec:z,style:d,styleSpec:p,object:n,objectKey:P,validateSpec:g},n))}for(const P in a)c[P]||a[P].required&&a[P].default===void 0&&n[P]===void 0&&x.push(new be(t,n,`missing required property "${P}"`));return x}function vc(r){const t=r.value,n=r.valueSpec,a=r.style,c=r.styleSpec,d=r.key,p=r.arrayElementValidator||r.validateSpec;if(zt(t)!=="array")return[new be(d,t,`array expected, ${zt(t)} found`)];if(n.length&&t.length!==n.length)return[new be(d,t,`array length ${n.length} expected, length ${t.length} found`)];if(n["min-length"]&&t.length<n["min-length"])return[new be(d,t,`array length at least ${n["min-length"]} expected, length ${t.length} found`)];let g={type:n.value,values:n.values};c.$version<7&&(g.function=n.function),zt(n.value)==="object"&&(g=n.value);let x=[];for(let w=0;w<t.length;w++)x=x.concat(p({array:t,arrayIndex:w,value:t[w],valueSpec:g,validateSpec:r.validateSpec,style:a,styleSpec:c,key:`${d}[${w}]`}));return x}function Qo(r){const t=r.key,n=r.value,a=r.valueSpec;let c=zt(n);return c==="number"&&n!=n&&(c="NaN"),c!=="number"?[new be(t,n,`number expected, ${c} found`)]:"minimum"in a&&n<a.minimum?[new be(t,n,`${n} is less than the minimum value ${a.minimum}`)]:"maximum"in a&&n>a.maximum?[new be(t,n,`${n} is greater than the maximum value ${a.maximum}`)]:[]}function bc(r){const t=r.valueSpec,n=wi(r.value.type);let a,c,d,p={};const g=n!=="categorical"&&r.value.property===void 0,x=!g,w=zt(r.value.stops)==="array"&&zt(r.value.stops[0])==="array"&&zt(r.value.stops[0][0])==="object",P=Vr({key:r.key,value:r.value,valueSpec:r.styleSpec.function,validateSpec:r.validateSpec,style:r.style,styleSpec:r.styleSpec,objectElementValidators:{stops:function(L){if(n==="identity")return[new be(L.key,L.value,'identity function may not have a "stops" property')];let B=[];const j=L.value;return B=B.concat(vc({key:L.key,value:j,valueSpec:L.valueSpec,validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec,arrayElementValidator:M})),zt(j)==="array"&&j.length===0&&B.push(new be(L.key,j,"array must have at least one stop")),B},default:function(L){return L.validateSpec({key:L.key,value:L.value,valueSpec:t,validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec})}}});return n==="identity"&&g&&P.push(new be(r.key,r.value,'missing required property "property"')),n==="identity"||r.value.stops||P.push(new be(r.key,r.value,'missing required property "stops"')),n==="exponential"&&r.valueSpec.expression&&!fc(r.valueSpec)&&P.push(new be(r.key,r.value,"exponential functions not supported")),r.styleSpec.$version>=8&&(x&&!os(r.valueSpec)?P.push(new be(r.key,r.value,"property functions not supported")):g&&!yh(r.valueSpec)&&P.push(new be(r.key,r.value,"zoom functions not supported"))),n!=="categorical"&&!w||r.value.property!==void 0||P.push(new be(r.key,r.value,'"property" property is required')),P;function M(L){let B=[];const j=L.value,$=L.key;if(zt(j)!=="array")return[new be($,j,`array expected, ${zt(j)} found`)];if(j.length!==2)return[new be($,j,`array length 2 expected, length ${j.length} found`)];if(w){if(zt(j[0])!=="object")return[new be($,j,`object expected, ${zt(j[0])} found`)];if(j[0].zoom===void 0)return[new be($,j,"object stop key must have zoom")];if(j[0].value===void 0)return[new be($,j,"object stop key must have value")];if(d&&d>wi(j[0].zoom))return[new be($,j[0].zoom,"stop zoom values must appear in ascending order")];wi(j[0].zoom)!==d&&(d=wi(j[0].zoom),c=void 0,p={}),B=B.concat(Vr({key:`${$}[0]`,value:j[0],valueSpec:{zoom:{}},validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec,objectElementValidators:{zoom:Qo,value:z}}))}else B=B.concat(z({key:`${$}[0]`,value:j[0],validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec},j));return Ws(wa(j[1]))?B.concat([new be(`${$}[1]`,j[1],"expressions are not allowed in function stops.")]):B.concat(L.validateSpec({key:`${$}[1]`,value:j[1],valueSpec:t,validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec}))}function z(L,B){const j=zt(L.value),$=wi(L.value),H=L.value!==null?L.value:B;if(a){if(j!==a)return[new be(L.key,H,`${j} stop domain type must match previous stop domain type ${a}`)]}else a=j;if(j!=="number"&&j!=="string"&&j!=="boolean")return[new be(L.key,H,"stop domain value must be a number, string, or boolean")];if(j!=="number"&&n!=="categorical"){let ne=`number expected, ${j} found`;return os(t)&&n===void 0&&(ne+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new be(L.key,H,ne)]}return n!=="categorical"||j!=="number"||isFinite($)&&Math.floor($)===$?n!=="categorical"&&j==="number"&&c!==void 0&&$<c?[new be(L.key,H,"stop domain values must appear in ascending order")]:(c=$,n==="categorical"&&$ in p?[new be(L.key,H,"stop domain values must be unique")]:(p[$]=!0,[])):[new be(L.key,H,`integer expected, found ${$}`)]}}function kn(r){const t=(r.expressionContext==="property"?wh:Wo)(wa(r.value),r.valueSpec);if(t.result==="error")return t.value.map(a=>new be(`${r.key}${a.key}`,r.value,a.message));const n=t.value.expression||t.value._styleExpression.expression;if(r.expressionContext==="property"&&r.propertyKey==="text-font"&&!n.outputDefined())return[new be(r.key,r.value,`Invalid data expression for "${r.propertyKey}". Output values must be contained as literals within the expression.`)];if(r.expressionContext==="property"&&r.propertyType==="layout"&&!Gs(n))return[new be(r.key,r.value,'"feature-state" data expressions are not supported with layout properties.')];if(r.expressionContext==="filter"&&!Gs(n))return[new be(r.key,r.value,'"feature-state" data expressions are not supported with filters.')];if(r.expressionContext&&r.expressionContext.indexOf("cluster")===0){if(!Go(n,["zoom","feature-state"]))return[new be(r.key,r.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(r.expressionContext==="cluster-initial"&&!$o(n))return[new be(r.key,r.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ks(r){const t=r.key,n=r.value,a=r.valueSpec,c=[];return Array.isArray(a.values)?a.values.indexOf(wi(n))===-1&&c.push(new be(t,n,`expected one of [${a.values.join(", ")}], ${JSON.stringify(n)} found`)):Object.keys(a.values).indexOf(wi(n))===-1&&c.push(new be(t,n,`expected one of [${Object.keys(a.values).join(", ")}], ${JSON.stringify(n)} found`)),c}function el(r){return Xo(wa(r.value))?kn(lt({},r,{expressionContext:"filter",valueSpec:{value:"boolean"}})):wc(r)}function wc(r){const t=r.value,n=r.key;if(zt(t)!=="array")return[new be(n,t,`array expected, ${zt(t)} found`)];const a=r.styleSpec;let c,d=[];if(t.length<1)return[new be(n,t,"filter array must have at least 1 element")];switch(d=d.concat(Ks({key:`${n}[0]`,value:t[0],valueSpec:a.filter_operator,style:r.style,styleSpec:r.styleSpec})),wi(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&wi(t[1])==="$type"&&d.push(new be(n,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&d.push(new be(n,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=zt(t[1]),c!=="string"&&d.push(new be(`${n}[1]`,t[1],`string expected, ${c} found`)));for(let p=2;p<t.length;p++)c=zt(t[p]),wi(t[1])==="$type"?d=d.concat(Ks({key:`${n}[${p}]`,value:t[p],valueSpec:a.geometry_type,style:r.style,styleSpec:r.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&d.push(new be(`${n}[${p}]`,t[p],`string, number, or boolean expected, ${c} found`));break;case"any":case"all":case"none":for(let p=1;p<t.length;p++)d=d.concat(wc({key:`${n}[${p}]`,value:t[p],style:r.style,styleSpec:r.styleSpec}));break;case"has":case"!has":c=zt(t[1]),t.length!==2?d.push(new be(n,t,`filter array for "${t[0]}" operator must have 2 elements`)):c!=="string"&&d.push(new be(`${n}[1]`,t[1],`string expected, ${c} found`))}return d}function Sh(r,t){const n=r.key,a=r.validateSpec,c=r.style,d=r.styleSpec,p=r.value,g=r.objectKey,x=d[`${t}_${r.layerType}`];if(!x)return[];const w=g.match(/^(.*)-transition$/);if(t==="paint"&&w&&x[w[1]]&&x[w[1]].transition)return a({key:n,value:p,valueSpec:d.transition,style:c,styleSpec:d});const P=r.valueSpec||x[g];if(!P)return[new be(n,p,`unknown property "${g}"`)];let M;if(zt(p)==="string"&&os(P)&&!P.tokens&&(M=/^{([^}]+)}$/.exec(p)))return[new be(n,p,`"${g}" does not support interpolation syntax
|