diff --git a/assets/Layout-a6e3acf3.js b/assets/Layout-cca6f705.js similarity index 99% rename from assets/Layout-a6e3acf3.js rename to assets/Layout-cca6f705.js index 2f7a8e5..3e6bb81 100644 --- a/assets/Layout-a6e3acf3.js +++ b/assets/Layout-cca6f705.js @@ -1,5 +1,5 @@ -var Xx=Object.defineProperty;var Yx=(t,e,r)=>e in t?Xx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Aa=(t,e,r)=>(Yx(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const p of l)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&s(m)}).observe(document,{childList:!0,subtree:!0});function r(l){const p={};return l.integrity&&(p.integrity=l.integrity),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?p.credentials="include":l.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function s(l){if(l.ep)return;l.ep=!0;const p=r(l);fetch(l.href,p)}})();function Ro(){}function Kx(t,e){for(const r in e)t[r]=e[r];return t}function n0(t){return t()}function sy(){return Object.create(null)}function zl(t){t.forEach(n0)}function lg(t){return typeof t=="function"}function Br(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let of;function Jx(t,e){return t===e?!0:(of||(of=document.createElement("a")),of.href=e,t===of.href)}function Qx(t){return Object.keys(t).length===0}function i0(t,...e){if(t==null){for(const s of e)s(void 0);return Ro}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function u2(t){let e;return i0(t,r=>e=r)(),e}function Jr(t,e,r){t.$$.on_destroy.push(i0(e,r))}function ka(t,e,r,s){if(t){const l=r0(t,e,r,s);return t[0](l)}}function r0(t,e,r,s){return t[1]&&s?Kx(r.ctx.slice(),t[1](s(e))):r.ctx}function za(t,e,r,s){if(t[2]&&s){const l=t[2](s(r));if(e.dirty===void 0)return l;if(typeof l=="object"){const p=[],m=Math.max(e.dirty.length,l.length);for(let c=0;c32){const e=[],r=t.ctx.length/32;for(let s=0;st.removeEventListener(e,r,s)}function c2(t){return function(e){return e.preventDefault(),t.call(this,e)}}function h2(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function As(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function p2(t){let e;return{p(...r){e=r,e.forEach(s=>t.push(s))},r(){e.forEach(r=>t.splice(t.indexOf(r),1))}}}function d2(t){return t===""?null:+t}function i1(t){return Array.from(t.childNodes)}function ug(t,e){e=""+e,t.data!==e&&(t.data=e)}function f2(t,e){t.value=e??""}function rs(t,e,r,s){r==null?t.style.removeProperty(e):t.style.setProperty(e,r,s?"important":"")}function m2(t,e,r){for(let s=0;s{const l=t.$$.callbacks[e];if(l){const p=r1(e,r,{cancelable:s});return l.slice().forEach(m=>{m.call(t,p)}),!p.defaultPrevented}return!0}}function o0(t,e){return qp().$$.context.set(t,e),e}function s0(t){return qp().$$.context.get(t)}function pu(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(s=>s.call(this,e))}const Fc=[],jc=[];let Gc=[];const Wm=[],a0=Promise.resolve();let Xm=!1;function l0(){Xm||(Xm=!0,a0.then(u0))}function y2(){return l0(),a0}function Ym(t){Gc.push(t)}function s1(t){Wm.push(t)}const Om=new Set;let Nc=0;function u0(){if(Nc!==0)return;const t=Tp;do{try{for(;Nct.indexOf(s)===-1?e.push(s):r.push(s)),r.forEach(s=>s()),Gc=e}const lf=new Set;let du;function Pu(){du={r:0,c:[],p:du}}function Au(){du.r||zl(du.c),du=du.p}function Je(t,e){t&&t.i&&(lf.delete(t),t.i(e))}function In(t,e,r,s){if(t&&t.o){if(lf.has(t))return;lf.add(t),du.c.push(()=>{lf.delete(t),s&&(r&&t.d(1),s())}),t.o(e)}else s&&s()}function Bc(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function u1(t,e,r){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=r,r(t.$$.ctx[s]))}function fu(t){t&&t.c()}function bl(t,e,r){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,r),Ym(()=>{const p=t.$$.on_mount.map(n0).filter(lg);t.$$.on_destroy?t.$$.on_destroy.push(...p):zl(p),t.$$.on_mount=[]}),l.forEach(Ym)}function wl(t,e){const r=t.$$;r.fragment!==null&&(l1(r.after_update),zl(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function c1(t,e){t.$$.dirty[0]===-1&&(Fc.push(t),l0(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const ct=it.length?it[0]:B;return L.ctx&&l(L.ctx[N],L.ctx[N]=ct)&&(!L.skip_bound&&L.bound[N]&&L.bound[N](ct),R&&c1(t,N)),B}):[],L.update(),R=!0,zl(L.before_update),L.fragment=s?s(L.ctx):!1,e.target){if(e.hydrate){const N=i1(e.target);L.fragment&&L.fragment.l(N),N.forEach(tn)}else L.fragment&&L.fragment.c();e.intro&&Je(t.$$.fragment),bl(t,e.target,e.anchor),u0()}Ip(S)}class yo{constructor(){Aa(this,"$$");Aa(this,"$$set")}$destroy(){wl(this,1),this.$destroy=Ro}$on(e,r){if(!lg(r))return Ro;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(r),()=>{const l=s.indexOf(r);l!==-1&&s.splice(l,1)}}$set(e){this.$$set&&!Qx(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const h1="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(h1);let Mo;const Da=new Array(128).fill(void 0);Da.push(void 0,null,!0,!1);function nn(t){return Da[t]}let Ep=Da.length;function p1(t){t<132||(Da[t]=Ep,Ep=t)}function sf(t){const e=nn(t);return p1(t),e}let hf=0,vp=null;function uf(){return(vp===null||vp.byteLength===0)&&(vp=new Uint8Array(Mo.memory.buffer)),vp}const cf=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},d1=typeof cf.encodeInto=="function"?function(t,e){return cf.encodeInto(t,e)}:function(t,e){const r=cf.encode(t);return e.set(r),{read:t.length,written:r.length}};function uy(t,e,r){if(r===void 0){const c=cf.encode(t),S=e(c.length,1)>>>0;return uf().subarray(S,S+c.length).set(c),hf=c.length,S}let s=t.length,l=e(s,1)>>>0;const p=uf();let m=0;for(;m127)break;p[l+m]=c}if(m!==s){m!==0&&(t=t.slice(m)),l=r(l,s,s=m+t.length*3,1)>>>0;const c=uf().subarray(l+m,l+s),S=d1(t,c);m+=S.written,l=r(l,s,m,1)>>>0}return hf=m,l}function Fm(t){return t==null}let xp=null;function dp(){return(xp===null||xp.byteLength===0)&&(xp=new Int32Array(Mo.memory.buffer)),xp}const c0=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&c0.decode();function Bm(t,e){return t=t>>>0,c0.decode(uf().subarray(t,t+e))}function Hi(t){Ep===Da.length&&Da.push(Da.length+1);const e=Ep;return Ep=Da[e],Da[e]=t,e}let bp=null;function f1(){return(bp===null||bp.byteLength===0)&&(bp=new Float64Array(Mo.memory.buffer)),bp}function Km(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const l=t.description;return l==null?"Symbol":`Symbol(${l})`}if(e=="function"){const l=t.name;return typeof l=="string"&&l.length>0?`Function(${l})`:"Function"}if(Array.isArray(t)){const l=t.length;let p="[";l>0&&(p+=Km(t[0]));for(let m=1;m1)s=r[1];else return toString.call(t);if(s=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:s}function Vm(t,e){try{return t.apply(this,e)}catch(r){Mo.__wbindgen_exn_store(Hi(r))}}async function m1(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(s){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",s);else throw s}const r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else{const r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function g1(){const t={};return t.wbg={},t.wbg.__wbindgen_is_object=function(e){const r=nn(e);return typeof r=="object"&&r!==null},t.wbg.__wbindgen_is_undefined=function(e){return nn(e)===void 0},t.wbg.__wbindgen_in=function(e,r){return nn(e)in nn(r)},t.wbg.__wbindgen_object_drop_ref=function(e){sf(e)},t.wbg.__wbindgen_string_get=function(e,r){const s=nn(r),l=typeof s=="string"?s:void 0;var p=Fm(l)?0:uy(l,Mo.__wbindgen_malloc,Mo.__wbindgen_realloc),m=hf;dp()[e/4+1]=m,dp()[e/4+0]=p},t.wbg.__wbindgen_error_new=function(e,r){const s=new Error(Bm(e,r));return Hi(s)},t.wbg.__wbindgen_jsval_loose_eq=function(e,r){return nn(e)==nn(r)},t.wbg.__wbindgen_boolean_get=function(e){const r=nn(e);return typeof r=="boolean"?r?1:0:2},t.wbg.__wbindgen_number_get=function(e,r){const s=nn(r),l=typeof s=="number"?s:void 0;f1()[e/8+1]=Fm(l)?0:l,dp()[e/4+0]=!Fm(l)},t.wbg.__wbindgen_number_new=function(e){return Hi(e)},t.wbg.__wbindgen_object_clone_ref=function(e){const r=nn(e);return Hi(r)},t.wbg.__wbindgen_string_new=function(e,r){const s=Bm(e,r);return Hi(s)},t.wbg.__wbg_getwithrefkey_5e6d9547403deab8=function(e,r){const s=nn(e)[nn(r)];return Hi(s)},t.wbg.__wbg_set_841ac57cff3d672b=function(e,r,s){nn(e)[sf(r)]=sf(s)},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,r){const s=nn(e)[r>>>0];return Hi(s)},t.wbg.__wbg_length_cd7af8117672b8b8=function(e){return nn(e).length},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){const e=new Array;return Hi(e)},t.wbg.__wbindgen_is_function=function(e){return typeof nn(e)=="function"},t.wbg.__wbg_next_40fc327bfc8770e6=function(e){const r=nn(e).next;return Hi(r)},t.wbg.__wbg_next_196c84450b364254=function(){return Vm(function(e){const r=nn(e).next();return Hi(r)},arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(e){return nn(e).done},t.wbg.__wbg_value_d93c65011f51a456=function(e){const r=nn(e).value;return Hi(r)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return Hi(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return Vm(function(e,r){const s=Reflect.get(nn(e),nn(r));return Hi(s)},arguments)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return Vm(function(e,r){const s=nn(e).call(nn(r));return Hi(s)},arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return Hi(e)},t.wbg.__wbg_set_d4638f722068f043=function(e,r,s){nn(e)[r>>>0]=sf(s)},t.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let r;try{r=nn(e)instanceof ArrayBuffer}catch{r=!1}return r},t.wbg.__wbg_entries_95cc2c823b285a09=function(e){const r=Object.entries(nn(e));return Hi(r)},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const r=nn(e).buffer;return Hi(r)},t.wbg.__wbg_new_63b92bc8671ed464=function(e){const r=new Uint8Array(nn(e));return Hi(r)},t.wbg.__wbg_set_a47bac70306a19a7=function(e,r,s){nn(e).set(nn(r),s>>>0)},t.wbg.__wbg_length_c20a40f15020d68a=function(e){return nn(e).length},t.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let r;try{r=nn(e)instanceof Uint8Array}catch{r=!1}return r},t.wbg.__wbindgen_debug_string=function(e,r){const s=Km(nn(r)),l=uy(s,Mo.__wbindgen_malloc,Mo.__wbindgen_realloc),p=hf;dp()[e/4+1]=p,dp()[e/4+0]=l},t.wbg.__wbindgen_throw=function(e,r){throw new Error(Bm(e,r))},t.wbg.__wbindgen_memory=function(){const e=Mo.memory;return Hi(e)},t}function _1(t,e){return Mo=t.exports,y1.__wbindgen_wasm_module=e,bp=null,xp=null,vp=null,Mo}async function y1(t){if(Mo!==void 0)return Mo;typeof t>"u"&&(t="/od2net/assets/lts_bg.wasm");const e=g1();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:r,module:s}=await m1(await t,e);return _1(r,s)}var qc=Math.pow,xr=(t,e,r)=>new Promise((s,l)=>{var p=S=>{try{c(r.next(S))}catch(L){l(L)}},m=S=>{try{c(r.throw(S))}catch(L){l(L)}},c=S=>S.done?s(S.value):Promise.resolve(S.value).then(p,m);c((r=r.apply(t,e)).next())}),Do=Uint8Array,Vc=Uint16Array,v1=Int32Array,h0=new Do([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),p0=new Do([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x1=new Do([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d0=function(t,e){for(var r=new Vc(31),s=0;s<31;++s)r[s]=e+=1<>1|(xn&21845)<<1,Ma=(Ma&52428)>>2|(Ma&13107)<<2,Ma=(Ma&61680)>>4|(Ma&3855)<<4,Jm[xn]=((Ma&65280)>>8|(Ma&255)<<8)>>1;var Ma,xn,Sp=function(t,e,r){for(var s=t.length,l=0,p=new Vc(e);l>S]=L}else for(c=new Vc(s),l=0;l>15-t[l]);return c},jp=new Do(288);for(xn=0;xn<144;++xn)jp[xn]=8;var xn;for(xn=144;xn<256;++xn)jp[xn]=9;var xn;for(xn=256;xn<280;++xn)jp[xn]=7;var xn;for(xn=280;xn<288;++xn)jp[xn]=8;var xn,g0=new Do(32);for(xn=0;xn<32;++xn)g0[xn]=5;var xn,E1=Sp(jp,9,1),S1=Sp(g0,5,1),Um=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},Cs=function(t,e,r){var s=e/8|0;return(t[s]|t[s+1]<<8)>>(e&7)&r},Gm=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},C1=function(t){return(t+7)/8|0},T1=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var s=new Do(r-e);return s.set(t.subarray(e,r)),s},L1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ao=function(t,e,r){var s=new Error(e||L1[t]);if(s.code=t,Error.captureStackTrace&&Error.captureStackTrace(s,Ao),!r)throw s;return s},hg=function(t,e,r,s){var l=t.length,p=s?s.length:0;if(!l||e.f&&!e.l)return r||new Do(0);var m=!r||e.i!=2,c=e.i;r||(r=new Do(l*3));var S=function(ai){var Wn=r.length;if(ai>Wn){var ni=new Do(Math.max(Wn*2,ai));ni.set(r),r=ni}},L=e.f||0,R=e.p||0,N=e.b||0,B=e.l,it=e.d,ct=e.m,gt=e.n,bt=l*8;do{if(!B){L=Cs(t,R,1);var Mt=Cs(t,R+1,3);if(R+=3,Mt)if(Mt==1)B=E1,it=S1,ct=9,gt=5;else if(Mt==2){var de=Cs(t,R,31)+257,De=Cs(t,R+10,15)+4,_e=de+Cs(t,R+5,31)+1;R+=14;for(var Me=new Do(_e),ne=new Do(19),le=0;le>4;if(Nt<16)Me[le++]=Nt;else{var An=0,Sn=0;for(Nt==16?(Sn=3+Cs(t,R,3),R+=2,An=Me[le-1]):Nt==17?(Sn=3+Cs(t,R,7),R+=3):Nt==18&&(Sn=11+Cs(t,R,127),R+=7);Sn--;)Me[le++]=An}}var me=Me.subarray(0,de),sn=Me.subarray(de);ct=Um(me),gt=Um(sn),B=Sp(me,ct,1),it=Sp(sn,gt,1)}else Ao(1);else{var Nt=C1(R)+4,qt=t[Nt-4]|t[Nt-3]<<8,ae=Nt+qt;if(ae>l){c&&Ao(0);break}m&&S(N+qt),r.set(t.subarray(Nt,ae),N),e.b=N+=qt,e.p=R=ae*8,e.f=L;continue}if(R>bt){c&&Ao(0);break}}m&&S(N+131072);for(var Mn=(1<>4;if(R+=An&15,R>bt){c&&Ao(0);break}if(An||Ao(2),Re<256)r[N++]=Re;else if(Re==256){fn=R,B=null;break}else{var an=Re-254;if(Re>264){var le=Re-257,bn=h0[le];an=Cs(t,R,(1<>4;un||Ao(3),R+=un&15;var sn=I1[Ve];if(Ve>3){var bn=p0[Ve];sn+=Gm(t,R)&(1<bt){c&&Ao(0);break}m&&S(N+131072);var mn=N+an;if(N>3&1)+(e>>4&1);s>0;s-=!t[r++]);return r+(e&2)},M1=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},D1=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Ao(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Ao(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function R1(t,e){return hg(t,{i:2},e&&e.out,e&&e.dictionary)}function N1(t,e){var r=A1(t);return r+8>t.length&&Ao(6,"invalid gzip data"),hg(t.subarray(r,-8),{i:2},e&&e.out||new Do(M1(t)),e&&e.dictionary)}function k1(t,e){return hg(t.subarray(D1(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Qm(t,e){return t[0]==31&&t[1]==139&&t[2]==8?N1(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?R1(t,e):k1(t,e)}var z1=typeof TextDecoder<"u"&&new TextDecoder,O1=0;try{z1.decode(P1,{stream:!0}),O1=1}catch{}var _0=(t,e)=>t*qc(2,e),fp=(t,e)=>Math.floor(t/qc(2,e)),pf=(t,e)=>_0(t.getUint16(e+1,!0),8)+t.getUint8(e),y0=(t,e)=>_0(t.getUint32(e+2,!0),16)+t.getUint16(e,!0),F1=(t,e,r,s,l)=>{if(t!==s.getUint8(l))return t-s.getUint8(l);const p=pf(s,l+1);if(e!==p)return e-p;const m=pf(s,l+4);return r!==m?r-m:0},B1=(t,e,r,s)=>{const l=v0(t,e|128,r,s);return l?{z:e,x:r,y:s,offset:l[0],length:l[1],isDir:!0}:null},cy=(t,e,r,s)=>{const l=v0(t,e,r,s);return l?{z:e,x:r,y:s,offset:l[0],length:l[1],isDir:!1}:null},v0=(t,e,r,s)=>{let l=0,p=t.byteLength/17-1;for(;l<=p;){const m=p+l>>1,c=F1(e,r,s,t,m*17);if(c>0)l=m+1;else if(c<0)p=m-1;else return[y0(t,m*17+7),t.getUint32(m*17+13,!0)]}return null},V1=(t,e)=>t.isDir&&!e.isDir?1:!t.isDir&&e.isDir?-1:t.z!==e.z?t.z-e.z:t.x!==e.x?t.x-e.x:t.y-e.y,x0=(t,e)=>{const r=t.getUint8(e*17);return{z:r&127,x:pf(t,e*17+1),y:pf(t,e*17+4),offset:y0(t,e*17+7),length:t.getUint32(e*17+13,!0),isDir:r>>7===1}},hy=t=>{const e=[],r=new DataView(t);for(let s=0;s{t.sort(V1);const e=new ArrayBuffer(17*t.length),r=new Uint8Array(e);for(let s=0;s>8&255,r[s*17+3]=l.x>>16&255,r[s*17+4]=l.y&255,r[s*17+5]=l.y>>8&255,r[s*17+6]=l.y>>16&255,r[s*17+7]=l.offset&255,r[s*17+8]=fp(l.offset,8)&255,r[s*17+9]=fp(l.offset,16)&255,r[s*17+10]=fp(l.offset,24)&255,r[s*17+11]=fp(l.offset,32)&255,r[s*17+12]=fp(l.offset,48)&255,r[s*17+13]=l.length&255,r[s*17+14]=l.length>>8&255,r[s*17+15]=l.length>>16&255,r[s*17+16]=l.length>>24&255}return e},G1=(t,e)=>{if(t.byteLength<17)return null;const r=t.byteLength/17,s=x0(t,r-1);if(s.isDir){const l=s.z,p=e.z-l,m=Math.trunc(e.x/(1<(e,r)=>{if(r instanceof AbortController)return t(e,r);const s=new AbortController;return t(e,s).then(l=>r(void 0,l.data,l.cacheControl||"",l.expires||""),l=>r(l)).catch(l=>r(l)),{cancel:()=>s.abort()}},v2=class{constructor(){this.tilev4=(t,e)=>xr(this,null,function*(){if(t.type==="json"){const N=t.url.substr(10);let B=this.tiles.get(N);B||(B=new py(N),this.tiles.set(N,B));const it=yield B.getHeader();return{data:{tiles:[`${t.url}/{z}/{x}/{y}`],minzoom:it.minZoom,maxzoom:it.maxZoom,bounds:[it.minLon,it.minLat,it.maxLon,it.maxLat]}}}const r=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),s=t.url.match(r);if(!s)throw new Error("Invalid PMTiles protocol URL");const l=s[1];let p=this.tiles.get(l);p||(p=new py(l),this.tiles.set(l,p));const m=s[2],c=s[3],S=s[4],L=yield p.getHeader(),R=yield p==null?void 0:p.getZxy(+m,+c,+S,e.signal);return R?{data:new Uint8Array(R.data),cacheControl:R.cacheControl,expires:R.expires}:L.tileType===1?{data:new Uint8Array}:{data:null}}),this.tile=Z1(this.tilev4),this.tiles=new Map}add(t){this.tiles.set(t.source.getKey(),t)}get(t){return this.tiles.get(t)}};function kc(t,e){return(e>>>0)*4294967296+(t>>>0)}function H1(t,e){const r=e.buf;let s=r[e.pos++],l=(s&112)>>4;if(s<128||(s=r[e.pos++],l|=(s&127)<<3,s<128)||(s=r[e.pos++],l|=(s&127)<<10,s<128)||(s=r[e.pos++],l|=(s&127)<<17,s<128)||(s=r[e.pos++],l|=(s&127)<<24,s<128)||(s=r[e.pos++],l|=(s&1)<<31,s<128))return kc(t,l);throw new Error("Expected varint not more than 10 bytes")}function mp(t){const e=t.buf;let r=e[t.pos++],s=r&127;return r<128||(r=e[t.pos++],s|=(r&127)<<7,r<128)||(r=e[t.pos++],s|=(r&127)<<14,r<128)||(r=e[t.pos++],s|=(r&127)<<21,r<128)?s:(r=e[t.pos],s|=(r&15)<<28,H1(s,t))}function W1(t,e,r,s){if(s===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const l=e[0];e[0]=e[1],e[1]=l}}var X1=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function Y1(t,e,r){if(t>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(e>qc(2,t)-1||r>qc(2,t)-1)throw Error("tile x/y outside zoom level bounds");const s=X1[t],l=qc(2,t);let p=0,m=0,c=0;const S=[e,r];let L=l/2;for(;L>0;)p=(S[0]&L)>0?1:0,m=(S[1]&L)>0?1:0,c+=L*L*(3*p^m),W1(L,S,p,m),L=L/2;return s+c}function w0(t,e){return xr(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return Qm(new Uint8Array(t));const r=new Response(t).body;if(!r)throw Error("Failed to read response stream");const s=r.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(s).arrayBuffer()}throw Error("Compression method not supported")})}var K1=127;function J1(t,e){let r=0,s=t.length-1;for(;r<=s;){const l=s+r>>1,p=e-t[l].tileId;if(p>0)r=l+1;else if(p<0)s=l-1;else return t[l]}return s>=0&&(t[s].runLength===0||e-t[s].tileId=300)throw Error(`Bad response code: ${S.status}`);const R=S.headers.get("Content-Length");if(S.status===200&&(!R||+R>e))throw l&&l.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield S.arrayBuffer(),etag:L||void 0,cacheControl:S.headers.get("Cache-Control")||void 0,expires:S.headers.get("Expires")||void 0}})}};function Ts(t,e){const r=t.getUint32(e+4,!0),s=t.getUint32(e+0,!0);return r*qc(2,32)+s}function $1(t,e){const r=new DataView(t),s=r.getUint8(7);if(s>3)throw Error(`Archive is spec version ${s} but this library supports up to spec version 3`);return{specVersion:s,rootDirectoryOffset:Ts(r,8),rootDirectoryLength:Ts(r,16),jsonMetadataOffset:Ts(r,24),jsonMetadataLength:Ts(r,32),leafDirectoryOffset:Ts(r,40),leafDirectoryLength:Ts(r,48),tileDataOffset:Ts(r,56),tileDataLength:Ts(r,64),numAddressedTiles:Ts(r,72),numTileEntries:Ts(r,80),numTileContents:Ts(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}function I0(t){const e={buf:new Uint8Array(t),pos:0},r=mp(e),s=[];let l=0;for(let p=0;p0?s[p].offset=s[p-1].offset+s[p-1].length:s[p].offset=m-1}return s}function tb(t){const e=new DataView(t);return e.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):e.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var $m=class extends Error{};function eb(t,e){return xr(this,null,function*(){const r=yield t.getBytes(0,16384);if(new DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(tb(r.data)<3)return[yield b0.getHeader(t)];const l=r.data.slice(0,K1),p=$1(l,r.etag),m=r.data.slice(p.rootDirectoryOffset,p.rootDirectoryOffset+p.rootDirectoryLength),c=`${t.getKey()}|${p.etag||""}|${p.rootDirectoryOffset}|${p.rootDirectoryLength}`,S=I0(yield e(m,p.internalCompression));return[p,[c,S.length,S]]})}function nb(t,e,r,s,l){return xr(this,null,function*(){const p=yield t.getBytes(r,s,void 0,l.etag),m=yield e(p.data,l.internalCompression),c=I0(m);if(c.length===0)throw new Error("Empty directory is invalid");return c})}var ib=class{constructor(t=100,e=!0,r=w0){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=t,this.counter=1,this.decompress=r}getHeader(t){return xr(this,null,function*(){const e=t.getKey(),r=this.cache.get(e);if(r)return r.lastUsed=this.counter++,yield r.data;const s=new Promise((l,p)=>{eb(t,this.decompress).then(m=>{m[1]&&this.cache.set(m[1][0],{lastUsed:this.counter++,data:Promise.resolve(m[1][2])}),l(m[0]),this.prune()}).catch(m=>{p(m)})});return this.cache.set(e,{lastUsed:this.counter++,data:s}),s})}getDirectory(t,e,r,s){return xr(this,null,function*(){const l=`${t.getKey()}|${s.etag||""}|${e}|${r}`,p=this.cache.get(l);if(p)return p.lastUsed=this.counter++,yield p.data;const m=new Promise((c,S)=>{nb(t,this.decompress,e,r,s).then(L=>{c(L),this.prune()}).catch(L=>{S(L)})});return this.cache.set(l,{lastUsed:this.counter++,data:m}),m})}getArrayBuffer(t,e,r,s){return xr(this,null,function*(){const l=`${t.getKey()}|${s.etag||""}|${e}|${r}`,p=this.cache.get(l);if(p)return p.lastUsed=this.counter++,yield p.data;const m=new Promise((c,S)=>{t.getBytes(e,r,void 0,s.etag).then(L=>{c(L.data),this.cache.has(l),this.prune()}).catch(L=>{S(L)})});return this.cache.set(l,{lastUsed:this.counter++,data:m}),m})}prune(){if(this.cache.size>=this.maxCacheEntries){let t=1/0,e;this.cache.forEach((r,s)=>{r.lastUsed{this.getHeader(t).then(p=>{s(),this.invalidations.delete(e)}).catch(p=>{l(p)})});this.invalidations.set(e,r)})}},py=class{constructor(t,e,r){typeof t=="string"?this.source=new Q1(t):this.source=t,r?this.decompress=r:this.decompress=w0,e?this.cache=e:this.cache=new ib}getHeader(){return xr(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(t,e,r,s){return xr(this,null,function*(){const l=Y1(t,e,r),p=yield this.cache.getHeader(this.source);if(p.specVersion<3)return b0.getZxy(p,this.source,this.cache,t,e,r,s);if(tp.maxZoom)return;let m=p.rootDirectoryOffset,c=p.rootDirectoryLength;for(let S=0;S<=3;S++){const L=yield this.cache.getDirectory(this.source,m,c,p),R=J1(L,l);if(R){if(R.runLength>0){const N=yield this.source.getBytes(p.tileDataOffset+R.offset,R.length,s,p.etag);return{data:yield this.decompress(N.data,p.tileCompression),cacheControl:N.cacheControl,expires:N.expires}}m=p.leafDirectoryOffset+R.offset,c=R.length}else return}throw Error("Maximum directory depth exceeded")})}getZxy(t,e,r,s){return xr(this,null,function*(){try{return yield this.getZxyAttempt(t,e,r,s)}catch(l){if(l instanceof $m)return this.cache.invalidate(this.source),yield this.getZxyAttempt(t,e,r,s);throw l}})}getMetadataAttempt(){return xr(this,null,function*(){const t=yield this.cache.getHeader(this.source),e=yield this.source.getBytes(t.jsonMetadataOffset,t.jsonMetadataLength,void 0,t.etag),r=yield this.decompress(e.data,t.internalCompression),s=new TextDecoder("utf-8");return JSON.parse(s.decode(r))})}getMetadata(){return xr(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(t){if(t instanceof $m)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw t}})}};const zc=[];function qm(t,e){return{subscribe:oa(t,e).subscribe}}function oa(t,e=Ro){let r;const s=new Set;function l(c){if(Br(t,c)&&(t=c,r)){const S=!zc.length;for(const L of s)L[1](),zc.push(L,t);if(S){for(let L=0;L{s.delete(L),s.size===0&&r&&(r(),r=null)}}return{set:l,update:p,subscribe:m}}let rb=Date.now();function E0(t){return`${t}-${rb++}`}const pg=Symbol.for("svelte-maplibre");function Zp(){return s0(pg)}function ob(t){let e=new WeakMap;return r=>{var m;let s=e.get(r.originalEvent);if(s!==void 0)return s;let p=(m=r.target.queryRenderedFeatures(r.point).find(c=>{var S;return(S=t.get(c.layer.id))==null?void 0:S.interactive}))==null?void 0:m.layer.id;return e.set(r.originalEvent,p),p}}function sb(){let t=new Map;return o0(pg,{map:oa(null),source:qm(null),layer:qm(null),popupTarget:qm(null),cluster:oa(),loadedImages:oa(new Set),minzoom:oa(0),maxzoom:oa(24),layerEvent:oa(null),layerInfo:t,eventTopMost:ob(t),markerClickManager:new lb})}function dy(t){return{subscribe:t.subscribe}}function dg({key:t,setPopupTarget:e=!1,setCluster:r=!1,setMouseEvent:s=!1}){let l=Zp(),p=oa(null),m=dy(p),c={...l,[t]:dy(p)};if(e&&(c.popupTarget=m),s){let S=oa(null);c.layerEvent=S,l.layerEvent=S}return r&&(c.cluster=oa()),o0(pg,c),{...l,self:p}}function b2(){return dg({key:"source",setCluster:!0})}function ab(t=!0){return dg({key:"layer",setPopupTarget:t,setMouseEvent:t})}function w2(){return dg({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}class lb{constructor(){Aa(this,"_handlers",new Set)}add(e){this._handlers.add(e)}remove(e){this._handlers.delete(e)}handleClick(e){for(const r of this._handlers)r(e)}}var ub=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function I2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,l.get?l:{enumerable:!0,get:function(){return t[s]}})}),r}var S0={exports:{}};/** +var Xx=Object.defineProperty;var Yx=(t,e,r)=>e in t?Xx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Aa=(t,e,r)=>(Yx(t,typeof e!="symbol"?e+"":e,r),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))s(l);new MutationObserver(l=>{for(const p of l)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&s(m)}).observe(document,{childList:!0,subtree:!0});function r(l){const p={};return l.integrity&&(p.integrity=l.integrity),l.referrerPolicy&&(p.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?p.credentials="include":l.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function s(l){if(l.ep)return;l.ep=!0;const p=r(l);fetch(l.href,p)}})();function Ro(){}function Kx(t,e){for(const r in e)t[r]=e[r];return t}function n0(t){return t()}function sy(){return Object.create(null)}function zl(t){t.forEach(n0)}function lg(t){return typeof t=="function"}function Br(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let of;function Jx(t,e){return t===e?!0:(of||(of=document.createElement("a")),of.href=e,t===of.href)}function Qx(t){return Object.keys(t).length===0}function i0(t,...e){if(t==null){for(const s of e)s(void 0);return Ro}const r=t.subscribe(...e);return r.unsubscribe?()=>r.unsubscribe():r}function u2(t){let e;return i0(t,r=>e=r)(),e}function Jr(t,e,r){t.$$.on_destroy.push(i0(e,r))}function ka(t,e,r,s){if(t){const l=r0(t,e,r,s);return t[0](l)}}function r0(t,e,r,s){return t[1]&&s?Kx(r.ctx.slice(),t[1](s(e))):r.ctx}function za(t,e,r,s){if(t[2]&&s){const l=t[2](s(r));if(e.dirty===void 0)return l;if(typeof l=="object"){const p=[],m=Math.max(e.dirty.length,l.length);for(let c=0;c32){const e=[],r=t.ctx.length/32;for(let s=0;st.removeEventListener(e,r,s)}function c2(t){return function(e){return e.preventDefault(),t.call(this,e)}}function h2(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function As(t,e,r){r==null?t.removeAttribute(e):t.getAttribute(e)!==r&&t.setAttribute(e,r)}function p2(t){let e;return{p(...r){e=r,e.forEach(s=>t.push(s))},r(){e.forEach(r=>t.splice(t.indexOf(r),1))}}}function d2(t){return t===""?null:+t}function i1(t){return Array.from(t.childNodes)}function ug(t,e){e=""+e,t.data!==e&&(t.data=e)}function f2(t,e){t.value=e??""}function rs(t,e,r,s){r==null?t.style.removeProperty(e):t.style.setProperty(e,r,s?"important":"")}function m2(t,e,r){for(let s=0;s{const l=t.$$.callbacks[e];if(l){const p=r1(e,r,{cancelable:s});return l.slice().forEach(m=>{m.call(t,p)}),!p.defaultPrevented}return!0}}function o0(t,e){return qp().$$.context.set(t,e),e}function s0(t){return qp().$$.context.get(t)}function pu(t,e){const r=t.$$.callbacks[e.type];r&&r.slice().forEach(s=>s.call(this,e))}const Fc=[],jc=[];let Gc=[];const Wm=[],a0=Promise.resolve();let Xm=!1;function l0(){Xm||(Xm=!0,a0.then(u0))}function y2(){return l0(),a0}function Ym(t){Gc.push(t)}function s1(t){Wm.push(t)}const Om=new Set;let Nc=0;function u0(){if(Nc!==0)return;const t=Tp;do{try{for(;Nct.indexOf(s)===-1?e.push(s):r.push(s)),r.forEach(s=>s()),Gc=e}const lf=new Set;let du;function Pu(){du={r:0,c:[],p:du}}function Au(){du.r||zl(du.c),du=du.p}function Je(t,e){t&&t.i&&(lf.delete(t),t.i(e))}function In(t,e,r,s){if(t&&t.o){if(lf.has(t))return;lf.add(t),du.c.push(()=>{lf.delete(t),s&&(r&&t.d(1),s())}),t.o(e)}else s&&s()}function Bc(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function u1(t,e,r){const s=t.$$.props[e];s!==void 0&&(t.$$.bound[s]=r,r(t.$$.ctx[s]))}function fu(t){t&&t.c()}function bl(t,e,r){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,r),Ym(()=>{const p=t.$$.on_mount.map(n0).filter(lg);t.$$.on_destroy?t.$$.on_destroy.push(...p):zl(p),t.$$.on_mount=[]}),l.forEach(Ym)}function wl(t,e){const r=t.$$;r.fragment!==null&&(l1(r.after_update),zl(r.on_destroy),r.fragment&&r.fragment.d(e),r.on_destroy=r.fragment=null,r.ctx=[])}function c1(t,e){t.$$.dirty[0]===-1&&(Fc.push(t),l0(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const ct=it.length?it[0]:B;return L.ctx&&l(L.ctx[N],L.ctx[N]=ct)&&(!L.skip_bound&&L.bound[N]&&L.bound[N](ct),R&&c1(t,N)),B}):[],L.update(),R=!0,zl(L.before_update),L.fragment=s?s(L.ctx):!1,e.target){if(e.hydrate){const N=i1(e.target);L.fragment&&L.fragment.l(N),N.forEach(tn)}else L.fragment&&L.fragment.c();e.intro&&Je(t.$$.fragment),bl(t,e.target,e.anchor),u0()}Ip(S)}class yo{constructor(){Aa(this,"$$");Aa(this,"$$set")}$destroy(){wl(this,1),this.$destroy=Ro}$on(e,r){if(!lg(r))return Ro;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(r),()=>{const l=s.indexOf(r);l!==-1&&s.splice(l,1)}}$set(e){this.$$set&&!Qx(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const h1="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(h1);let Mo;const Da=new Array(128).fill(void 0);Da.push(void 0,null,!0,!1);function nn(t){return Da[t]}let hf=0,vp=null;function uf(){return(vp===null||vp.byteLength===0)&&(vp=new Uint8Array(Mo.memory.buffer)),vp}const cf=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},p1=typeof cf.encodeInto=="function"?function(t,e){return cf.encodeInto(t,e)}:function(t,e){const r=cf.encode(t);return e.set(r),{read:t.length,written:r.length}};function uy(t,e,r){if(r===void 0){const c=cf.encode(t),S=e(c.length,1)>>>0;return uf().subarray(S,S+c.length).set(c),hf=c.length,S}let s=t.length,l=e(s,1)>>>0;const p=uf();let m=0;for(;m127)break;p[l+m]=c}if(m!==s){m!==0&&(t=t.slice(m)),l=r(l,s,s=m+t.length*3,1)>>>0;const c=uf().subarray(l+m,l+s),S=p1(t,c);m+=S.written,l=r(l,s,m,1)>>>0}return hf=m,l}function Fm(t){return t==null}let xp=null;function dp(){return(xp===null||xp.byteLength===0)&&(xp=new Int32Array(Mo.memory.buffer)),xp}let Ep=Da.length;function d1(t){t<132||(Da[t]=Ep,Ep=t)}function sf(t){const e=nn(t);return d1(t),e}const c0=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&c0.decode();function Bm(t,e){return t=t>>>0,c0.decode(uf().subarray(t,t+e))}function Hi(t){Ep===Da.length&&Da.push(Da.length+1);const e=Ep;return Ep=Da[e],Da[e]=t,e}let bp=null;function f1(){return(bp===null||bp.byteLength===0)&&(bp=new Float64Array(Mo.memory.buffer)),bp}function Km(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const l=t.description;return l==null?"Symbol":`Symbol(${l})`}if(e=="function"){const l=t.name;return typeof l=="string"&&l.length>0?`Function(${l})`:"Function"}if(Array.isArray(t)){const l=t.length;let p="[";l>0&&(p+=Km(t[0]));for(let m=1;m1)s=r[1];else return toString.call(t);if(s=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:s}function Vm(t,e){try{return t.apply(this,e)}catch(r){Mo.__wbindgen_exn_store(Hi(r))}}async function m1(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(s){if(t.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",s);else throw s}const r=await t.arrayBuffer();return await WebAssembly.instantiate(r,e)}else{const r=await WebAssembly.instantiate(t,e);return r instanceof WebAssembly.Instance?{instance:r,module:t}:r}}function g1(){const t={};return t.wbg={},t.wbg.__wbindgen_string_get=function(e,r){const s=nn(r),l=typeof s=="string"?s:void 0;var p=Fm(l)?0:uy(l,Mo.__wbindgen_malloc,Mo.__wbindgen_realloc),m=hf;dp()[e/4+1]=m,dp()[e/4+0]=p},t.wbg.__wbindgen_object_drop_ref=function(e){sf(e)},t.wbg.__wbindgen_is_object=function(e){const r=nn(e);return typeof r=="object"&&r!==null},t.wbg.__wbindgen_is_undefined=function(e){return nn(e)===void 0},t.wbg.__wbindgen_in=function(e,r){return nn(e)in nn(r)},t.wbg.__wbindgen_error_new=function(e,r){const s=new Error(Bm(e,r));return Hi(s)},t.wbg.__wbindgen_jsval_loose_eq=function(e,r){return nn(e)==nn(r)},t.wbg.__wbindgen_boolean_get=function(e){const r=nn(e);return typeof r=="boolean"?r?1:0:2},t.wbg.__wbindgen_number_get=function(e,r){const s=nn(r),l=typeof s=="number"?s:void 0;f1()[e/8+1]=Fm(l)?0:l,dp()[e/4+0]=!Fm(l)},t.wbg.__wbindgen_number_new=function(e){return Hi(e)},t.wbg.__wbindgen_object_clone_ref=function(e){const r=nn(e);return Hi(r)},t.wbg.__wbindgen_string_new=function(e,r){const s=Bm(e,r);return Hi(s)},t.wbg.__wbg_getwithrefkey_5e6d9547403deab8=function(e,r){const s=nn(e)[nn(r)];return Hi(s)},t.wbg.__wbg_set_841ac57cff3d672b=function(e,r,s){nn(e)[sf(r)]=sf(s)},t.wbg.__wbg_get_bd8e338fbd5f5cc8=function(e,r){const s=nn(e)[r>>>0];return Hi(s)},t.wbg.__wbg_length_cd7af8117672b8b8=function(e){return nn(e).length},t.wbg.__wbg_new_16b304a2cfa7ff4a=function(){const e=new Array;return Hi(e)},t.wbg.__wbindgen_is_function=function(e){return typeof nn(e)=="function"},t.wbg.__wbg_next_40fc327bfc8770e6=function(e){const r=nn(e).next;return Hi(r)},t.wbg.__wbg_next_196c84450b364254=function(){return Vm(function(e){const r=nn(e).next();return Hi(r)},arguments)},t.wbg.__wbg_done_298b57d23c0fc80c=function(e){return nn(e).done},t.wbg.__wbg_value_d93c65011f51a456=function(e){const r=nn(e).value;return Hi(r)},t.wbg.__wbg_iterator_2cee6dadfd956dfa=function(){return Hi(Symbol.iterator)},t.wbg.__wbg_get_e3c254076557e348=function(){return Vm(function(e,r){const s=Reflect.get(nn(e),nn(r));return Hi(s)},arguments)},t.wbg.__wbg_call_27c0f87801dedf93=function(){return Vm(function(e,r){const s=nn(e).call(nn(r));return Hi(s)},arguments)},t.wbg.__wbg_new_72fb9a18b5ae2624=function(){const e=new Object;return Hi(e)},t.wbg.__wbg_set_d4638f722068f043=function(e,r,s){nn(e)[r>>>0]=sf(s)},t.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2=function(e){let r;try{r=nn(e)instanceof ArrayBuffer}catch{r=!1}return r},t.wbg.__wbg_entries_95cc2c823b285a09=function(e){const r=Object.entries(nn(e));return Hi(r)},t.wbg.__wbg_buffer_12d079cc21e14bdb=function(e){const r=nn(e).buffer;return Hi(r)},t.wbg.__wbg_new_63b92bc8671ed464=function(e){const r=new Uint8Array(nn(e));return Hi(r)},t.wbg.__wbg_set_a47bac70306a19a7=function(e,r,s){nn(e).set(nn(r),s>>>0)},t.wbg.__wbg_length_c20a40f15020d68a=function(e){return nn(e).length},t.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6=function(e){let r;try{r=nn(e)instanceof Uint8Array}catch{r=!1}return r},t.wbg.__wbindgen_debug_string=function(e,r){const s=Km(nn(r)),l=uy(s,Mo.__wbindgen_malloc,Mo.__wbindgen_realloc),p=hf;dp()[e/4+1]=p,dp()[e/4+0]=l},t.wbg.__wbindgen_throw=function(e,r){throw new Error(Bm(e,r))},t.wbg.__wbindgen_memory=function(){const e=Mo.memory;return Hi(e)},t}function _1(t,e){return Mo=t.exports,y1.__wbindgen_wasm_module=e,bp=null,xp=null,vp=null,Mo}async function y1(t){if(Mo!==void 0)return Mo;typeof t>"u"&&(t="/od2net/assets/lts_bg.wasm");const e=g1();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:r,module:s}=await m1(await t,e);return _1(r,s)}var qc=Math.pow,xr=(t,e,r)=>new Promise((s,l)=>{var p=S=>{try{c(r.next(S))}catch(L){l(L)}},m=S=>{try{c(r.throw(S))}catch(L){l(L)}},c=S=>S.done?s(S.value):Promise.resolve(S.value).then(p,m);c((r=r.apply(t,e)).next())}),Do=Uint8Array,Vc=Uint16Array,v1=Int32Array,h0=new Do([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),p0=new Do([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x1=new Do([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d0=function(t,e){for(var r=new Vc(31),s=0;s<31;++s)r[s]=e+=1<>1|(xn&21845)<<1,Ma=(Ma&52428)>>2|(Ma&13107)<<2,Ma=(Ma&61680)>>4|(Ma&3855)<<4,Jm[xn]=((Ma&65280)>>8|(Ma&255)<<8)>>1;var Ma,xn,Sp=function(t,e,r){for(var s=t.length,l=0,p=new Vc(e);l>S]=L}else for(c=new Vc(s),l=0;l>15-t[l]);return c},jp=new Do(288);for(xn=0;xn<144;++xn)jp[xn]=8;var xn;for(xn=144;xn<256;++xn)jp[xn]=9;var xn;for(xn=256;xn<280;++xn)jp[xn]=7;var xn;for(xn=280;xn<288;++xn)jp[xn]=8;var xn,g0=new Do(32);for(xn=0;xn<32;++xn)g0[xn]=5;var xn,E1=Sp(jp,9,1),S1=Sp(g0,5,1),Um=function(t){for(var e=t[0],r=1;re&&(e=t[r]);return e},Cs=function(t,e,r){var s=e/8|0;return(t[s]|t[s+1]<<8)>>(e&7)&r},Gm=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(e&7)},C1=function(t){return(t+7)/8|0},T1=function(t,e,r){(e==null||e<0)&&(e=0),(r==null||r>t.length)&&(r=t.length);var s=new Do(r-e);return s.set(t.subarray(e,r)),s},L1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Ao=function(t,e,r){var s=new Error(e||L1[t]);if(s.code=t,Error.captureStackTrace&&Error.captureStackTrace(s,Ao),!r)throw s;return s},hg=function(t,e,r,s){var l=t.length,p=s?s.length:0;if(!l||e.f&&!e.l)return r||new Do(0);var m=!r||e.i!=2,c=e.i;r||(r=new Do(l*3));var S=function(ai){var Wn=r.length;if(ai>Wn){var ni=new Do(Math.max(Wn*2,ai));ni.set(r),r=ni}},L=e.f||0,R=e.p||0,N=e.b||0,B=e.l,it=e.d,ct=e.m,gt=e.n,bt=l*8;do{if(!B){L=Cs(t,R,1);var Mt=Cs(t,R+1,3);if(R+=3,Mt)if(Mt==1)B=E1,it=S1,ct=9,gt=5;else if(Mt==2){var de=Cs(t,R,31)+257,De=Cs(t,R+10,15)+4,_e=de+Cs(t,R+5,31)+1;R+=14;for(var Me=new Do(_e),ne=new Do(19),le=0;le>4;if(Nt<16)Me[le++]=Nt;else{var An=0,Sn=0;for(Nt==16?(Sn=3+Cs(t,R,3),R+=2,An=Me[le-1]):Nt==17?(Sn=3+Cs(t,R,7),R+=3):Nt==18&&(Sn=11+Cs(t,R,127),R+=7);Sn--;)Me[le++]=An}}var me=Me.subarray(0,de),sn=Me.subarray(de);ct=Um(me),gt=Um(sn),B=Sp(me,ct,1),it=Sp(sn,gt,1)}else Ao(1);else{var Nt=C1(R)+4,qt=t[Nt-4]|t[Nt-3]<<8,ae=Nt+qt;if(ae>l){c&&Ao(0);break}m&&S(N+qt),r.set(t.subarray(Nt,ae),N),e.b=N+=qt,e.p=R=ae*8,e.f=L;continue}if(R>bt){c&&Ao(0);break}}m&&S(N+131072);for(var Mn=(1<>4;if(R+=An&15,R>bt){c&&Ao(0);break}if(An||Ao(2),Re<256)r[N++]=Re;else if(Re==256){fn=R,B=null;break}else{var an=Re-254;if(Re>264){var le=Re-257,bn=h0[le];an=Cs(t,R,(1<>4;un||Ao(3),R+=un&15;var sn=I1[Ve];if(Ve>3){var bn=p0[Ve];sn+=Gm(t,R)&(1<bt){c&&Ao(0);break}m&&S(N+131072);var mn=N+an;if(N>3&1)+(e>>4&1);s>0;s-=!t[r++]);return r+(e&2)},M1=function(t){var e=t.length;return(t[e-4]|t[e-3]<<8|t[e-2]<<16|t[e-1]<<24)>>>0},D1=function(t,e){return((t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31)&&Ao(6,"invalid zlib data"),(t[1]>>5&1)==+!e&&Ao(6,"invalid zlib data: "+(t[1]&32?"need":"unexpected")+" dictionary"),(t[1]>>3&4)+2};function R1(t,e){return hg(t,{i:2},e&&e.out,e&&e.dictionary)}function N1(t,e){var r=A1(t);return r+8>t.length&&Ao(6,"invalid gzip data"),hg(t.subarray(r,-8),{i:2},e&&e.out||new Do(M1(t)),e&&e.dictionary)}function k1(t,e){return hg(t.subarray(D1(t,e&&e.dictionary),-4),{i:2},e&&e.out,e&&e.dictionary)}function Qm(t,e){return t[0]==31&&t[1]==139&&t[2]==8?N1(t,e):(t[0]&15)!=8||t[0]>>4>7||(t[0]<<8|t[1])%31?R1(t,e):k1(t,e)}var z1=typeof TextDecoder<"u"&&new TextDecoder,O1=0;try{z1.decode(P1,{stream:!0}),O1=1}catch{}var _0=(t,e)=>t*qc(2,e),fp=(t,e)=>Math.floor(t/qc(2,e)),pf=(t,e)=>_0(t.getUint16(e+1,!0),8)+t.getUint8(e),y0=(t,e)=>_0(t.getUint32(e+2,!0),16)+t.getUint16(e,!0),F1=(t,e,r,s,l)=>{if(t!==s.getUint8(l))return t-s.getUint8(l);const p=pf(s,l+1);if(e!==p)return e-p;const m=pf(s,l+4);return r!==m?r-m:0},B1=(t,e,r,s)=>{const l=v0(t,e|128,r,s);return l?{z:e,x:r,y:s,offset:l[0],length:l[1],isDir:!0}:null},cy=(t,e,r,s)=>{const l=v0(t,e,r,s);return l?{z:e,x:r,y:s,offset:l[0],length:l[1],isDir:!1}:null},v0=(t,e,r,s)=>{let l=0,p=t.byteLength/17-1;for(;l<=p;){const m=p+l>>1,c=F1(e,r,s,t,m*17);if(c>0)l=m+1;else if(c<0)p=m-1;else return[y0(t,m*17+7),t.getUint32(m*17+13,!0)]}return null},V1=(t,e)=>t.isDir&&!e.isDir?1:!t.isDir&&e.isDir?-1:t.z!==e.z?t.z-e.z:t.x!==e.x?t.x-e.x:t.y-e.y,x0=(t,e)=>{const r=t.getUint8(e*17);return{z:r&127,x:pf(t,e*17+1),y:pf(t,e*17+4),offset:y0(t,e*17+7),length:t.getUint32(e*17+13,!0),isDir:r>>7===1}},hy=t=>{const e=[],r=new DataView(t);for(let s=0;s{t.sort(V1);const e=new ArrayBuffer(17*t.length),r=new Uint8Array(e);for(let s=0;s>8&255,r[s*17+3]=l.x>>16&255,r[s*17+4]=l.y&255,r[s*17+5]=l.y>>8&255,r[s*17+6]=l.y>>16&255,r[s*17+7]=l.offset&255,r[s*17+8]=fp(l.offset,8)&255,r[s*17+9]=fp(l.offset,16)&255,r[s*17+10]=fp(l.offset,24)&255,r[s*17+11]=fp(l.offset,32)&255,r[s*17+12]=fp(l.offset,48)&255,r[s*17+13]=l.length&255,r[s*17+14]=l.length>>8&255,r[s*17+15]=l.length>>16&255,r[s*17+16]=l.length>>24&255}return e},G1=(t,e)=>{if(t.byteLength<17)return null;const r=t.byteLength/17,s=x0(t,r-1);if(s.isDir){const l=s.z,p=e.z-l,m=Math.trunc(e.x/(1<(e,r)=>{if(r instanceof AbortController)return t(e,r);const s=new AbortController;return t(e,s).then(l=>r(void 0,l.data,l.cacheControl||"",l.expires||""),l=>r(l)).catch(l=>r(l)),{cancel:()=>s.abort()}},v2=class{constructor(){this.tilev4=(t,e)=>xr(this,null,function*(){if(t.type==="json"){const N=t.url.substr(10);let B=this.tiles.get(N);B||(B=new py(N),this.tiles.set(N,B));const it=yield B.getHeader();return{data:{tiles:[`${t.url}/{z}/{x}/{y}`],minzoom:it.minZoom,maxzoom:it.maxZoom,bounds:[it.minLon,it.minLat,it.maxLon,it.maxLat]}}}const r=new RegExp(/pmtiles:\/\/(.+)\/(\d+)\/(\d+)\/(\d+)/),s=t.url.match(r);if(!s)throw new Error("Invalid PMTiles protocol URL");const l=s[1];let p=this.tiles.get(l);p||(p=new py(l),this.tiles.set(l,p));const m=s[2],c=s[3],S=s[4],L=yield p.getHeader(),R=yield p==null?void 0:p.getZxy(+m,+c,+S,e.signal);return R?{data:new Uint8Array(R.data),cacheControl:R.cacheControl,expires:R.expires}:L.tileType===1?{data:new Uint8Array}:{data:null}}),this.tile=Z1(this.tilev4),this.tiles=new Map}add(t){this.tiles.set(t.source.getKey(),t)}get(t){return this.tiles.get(t)}};function kc(t,e){return(e>>>0)*4294967296+(t>>>0)}function H1(t,e){const r=e.buf;let s=r[e.pos++],l=(s&112)>>4;if(s<128||(s=r[e.pos++],l|=(s&127)<<3,s<128)||(s=r[e.pos++],l|=(s&127)<<10,s<128)||(s=r[e.pos++],l|=(s&127)<<17,s<128)||(s=r[e.pos++],l|=(s&127)<<24,s<128)||(s=r[e.pos++],l|=(s&1)<<31,s<128))return kc(t,l);throw new Error("Expected varint not more than 10 bytes")}function mp(t){const e=t.buf;let r=e[t.pos++],s=r&127;return r<128||(r=e[t.pos++],s|=(r&127)<<7,r<128)||(r=e[t.pos++],s|=(r&127)<<14,r<128)||(r=e[t.pos++],s|=(r&127)<<21,r<128)?s:(r=e[t.pos],s|=(r&15)<<28,H1(s,t))}function W1(t,e,r,s){if(s===0){r===1&&(e[0]=t-1-e[0],e[1]=t-1-e[1]);const l=e[0];e[0]=e[1],e[1]=l}}var X1=[0,1,5,21,85,341,1365,5461,21845,87381,349525,1398101,5592405,22369621,89478485,357913941,1431655765,5726623061,22906492245,91625968981,366503875925,1466015503701,5864062014805,23456248059221,93824992236885,375299968947541,0x5555555555555];function Y1(t,e,r){if(t>26)throw Error("Tile zoom level exceeds max safe number limit (26)");if(e>qc(2,t)-1||r>qc(2,t)-1)throw Error("tile x/y outside zoom level bounds");const s=X1[t],l=qc(2,t);let p=0,m=0,c=0;const S=[e,r];let L=l/2;for(;L>0;)p=(S[0]&L)>0?1:0,m=(S[1]&L)>0?1:0,c+=L*L*(3*p^m),W1(L,S,p,m),L=L/2;return s+c}function w0(t,e){return xr(this,null,function*(){if(e===1||e===0)return t;if(e===2){if(typeof globalThis.DecompressionStream>"u")return Qm(new Uint8Array(t));const r=new Response(t).body;if(!r)throw Error("Failed to read response stream");const s=r.pipeThrough(new globalThis.DecompressionStream("gzip"));return new Response(s).arrayBuffer()}throw Error("Compression method not supported")})}var K1=127;function J1(t,e){let r=0,s=t.length-1;for(;r<=s;){const l=s+r>>1,p=e-t[l].tileId;if(p>0)r=l+1;else if(p<0)s=l-1;else return t[l]}return s>=0&&(t[s].runLength===0||e-t[s].tileId=300)throw Error(`Bad response code: ${S.status}`);const R=S.headers.get("Content-Length");if(S.status===200&&(!R||+R>e))throw l&&l.abort(),Error("Server returned no content-length header or content-length exceeding request. Check that your storage backend supports HTTP Byte Serving.");return{data:yield S.arrayBuffer(),etag:L||void 0,cacheControl:S.headers.get("Cache-Control")||void 0,expires:S.headers.get("Expires")||void 0}})}};function Ts(t,e){const r=t.getUint32(e+4,!0),s=t.getUint32(e+0,!0);return r*qc(2,32)+s}function $1(t,e){const r=new DataView(t),s=r.getUint8(7);if(s>3)throw Error(`Archive is spec version ${s} but this library supports up to spec version 3`);return{specVersion:s,rootDirectoryOffset:Ts(r,8),rootDirectoryLength:Ts(r,16),jsonMetadataOffset:Ts(r,24),jsonMetadataLength:Ts(r,32),leafDirectoryOffset:Ts(r,40),leafDirectoryLength:Ts(r,48),tileDataOffset:Ts(r,56),tileDataLength:Ts(r,64),numAddressedTiles:Ts(r,72),numTileEntries:Ts(r,80),numTileContents:Ts(r,88),clustered:r.getUint8(96)===1,internalCompression:r.getUint8(97),tileCompression:r.getUint8(98),tileType:r.getUint8(99),minZoom:r.getUint8(100),maxZoom:r.getUint8(101),minLon:r.getInt32(102,!0)/1e7,minLat:r.getInt32(106,!0)/1e7,maxLon:r.getInt32(110,!0)/1e7,maxLat:r.getInt32(114,!0)/1e7,centerZoom:r.getUint8(118),centerLon:r.getInt32(119,!0)/1e7,centerLat:r.getInt32(123,!0)/1e7,etag:e}}function I0(t){const e={buf:new Uint8Array(t),pos:0},r=mp(e),s=[];let l=0;for(let p=0;p0?s[p].offset=s[p-1].offset+s[p-1].length:s[p].offset=m-1}return s}function tb(t){const e=new DataView(t);return e.getUint16(2,!0)===2?(console.warn("PMTiles spec version 2 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),2):e.getUint16(2,!0)===1?(console.warn("PMTiles spec version 1 has been deprecated; please see github.com/protomaps/PMTiles for tools to upgrade"),1):3}var $m=class extends Error{};function eb(t,e){return xr(this,null,function*(){const r=yield t.getBytes(0,16384);if(new DataView(r.data).getUint16(0,!0)!==19792)throw new Error("Wrong magic number for PMTiles archive");if(tb(r.data)<3)return[yield b0.getHeader(t)];const l=r.data.slice(0,K1),p=$1(l,r.etag),m=r.data.slice(p.rootDirectoryOffset,p.rootDirectoryOffset+p.rootDirectoryLength),c=`${t.getKey()}|${p.etag||""}|${p.rootDirectoryOffset}|${p.rootDirectoryLength}`,S=I0(yield e(m,p.internalCompression));return[p,[c,S.length,S]]})}function nb(t,e,r,s,l){return xr(this,null,function*(){const p=yield t.getBytes(r,s,void 0,l.etag),m=yield e(p.data,l.internalCompression),c=I0(m);if(c.length===0)throw new Error("Empty directory is invalid");return c})}var ib=class{constructor(t=100,e=!0,r=w0){this.cache=new Map,this.invalidations=new Map,this.maxCacheEntries=t,this.counter=1,this.decompress=r}getHeader(t){return xr(this,null,function*(){const e=t.getKey(),r=this.cache.get(e);if(r)return r.lastUsed=this.counter++,yield r.data;const s=new Promise((l,p)=>{eb(t,this.decompress).then(m=>{m[1]&&this.cache.set(m[1][0],{lastUsed:this.counter++,data:Promise.resolve(m[1][2])}),l(m[0]),this.prune()}).catch(m=>{p(m)})});return this.cache.set(e,{lastUsed:this.counter++,data:s}),s})}getDirectory(t,e,r,s){return xr(this,null,function*(){const l=`${t.getKey()}|${s.etag||""}|${e}|${r}`,p=this.cache.get(l);if(p)return p.lastUsed=this.counter++,yield p.data;const m=new Promise((c,S)=>{nb(t,this.decompress,e,r,s).then(L=>{c(L),this.prune()}).catch(L=>{S(L)})});return this.cache.set(l,{lastUsed:this.counter++,data:m}),m})}getArrayBuffer(t,e,r,s){return xr(this,null,function*(){const l=`${t.getKey()}|${s.etag||""}|${e}|${r}`,p=this.cache.get(l);if(p)return p.lastUsed=this.counter++,yield p.data;const m=new Promise((c,S)=>{t.getBytes(e,r,void 0,s.etag).then(L=>{c(L.data),this.cache.has(l),this.prune()}).catch(L=>{S(L)})});return this.cache.set(l,{lastUsed:this.counter++,data:m}),m})}prune(){if(this.cache.size>=this.maxCacheEntries){let t=1/0,e;this.cache.forEach((r,s)=>{r.lastUsed{this.getHeader(t).then(p=>{s(),this.invalidations.delete(e)}).catch(p=>{l(p)})});this.invalidations.set(e,r)})}},py=class{constructor(t,e,r){typeof t=="string"?this.source=new Q1(t):this.source=t,r?this.decompress=r:this.decompress=w0,e?this.cache=e:this.cache=new ib}getHeader(){return xr(this,null,function*(){return yield this.cache.getHeader(this.source)})}getZxyAttempt(t,e,r,s){return xr(this,null,function*(){const l=Y1(t,e,r),p=yield this.cache.getHeader(this.source);if(p.specVersion<3)return b0.getZxy(p,this.source,this.cache,t,e,r,s);if(tp.maxZoom)return;let m=p.rootDirectoryOffset,c=p.rootDirectoryLength;for(let S=0;S<=3;S++){const L=yield this.cache.getDirectory(this.source,m,c,p),R=J1(L,l);if(R){if(R.runLength>0){const N=yield this.source.getBytes(p.tileDataOffset+R.offset,R.length,s,p.etag);return{data:yield this.decompress(N.data,p.tileCompression),cacheControl:N.cacheControl,expires:N.expires}}m=p.leafDirectoryOffset+R.offset,c=R.length}else return}throw Error("Maximum directory depth exceeded")})}getZxy(t,e,r,s){return xr(this,null,function*(){try{return yield this.getZxyAttempt(t,e,r,s)}catch(l){if(l instanceof $m)return this.cache.invalidate(this.source),yield this.getZxyAttempt(t,e,r,s);throw l}})}getMetadataAttempt(){return xr(this,null,function*(){const t=yield this.cache.getHeader(this.source),e=yield this.source.getBytes(t.jsonMetadataOffset,t.jsonMetadataLength,void 0,t.etag),r=yield this.decompress(e.data,t.internalCompression),s=new TextDecoder("utf-8");return JSON.parse(s.decode(r))})}getMetadata(){return xr(this,null,function*(){try{return yield this.getMetadataAttempt()}catch(t){if(t instanceof $m)return this.cache.invalidate(this.source),yield this.getMetadataAttempt();throw t}})}};const zc=[];function qm(t,e){return{subscribe:oa(t,e).subscribe}}function oa(t,e=Ro){let r;const s=new Set;function l(c){if(Br(t,c)&&(t=c,r)){const S=!zc.length;for(const L of s)L[1](),zc.push(L,t);if(S){for(let L=0;L{s.delete(L),s.size===0&&r&&(r(),r=null)}}return{set:l,update:p,subscribe:m}}let rb=Date.now();function E0(t){return`${t}-${rb++}`}const pg=Symbol.for("svelte-maplibre");function Zp(){return s0(pg)}function ob(t){let e=new WeakMap;return r=>{var m;let s=e.get(r.originalEvent);if(s!==void 0)return s;let p=(m=r.target.queryRenderedFeatures(r.point).find(c=>{var S;return(S=t.get(c.layer.id))==null?void 0:S.interactive}))==null?void 0:m.layer.id;return e.set(r.originalEvent,p),p}}function sb(){let t=new Map;return o0(pg,{map:oa(null),source:qm(null),layer:qm(null),popupTarget:qm(null),cluster:oa(),loadedImages:oa(new Set),minzoom:oa(0),maxzoom:oa(24),layerEvent:oa(null),layerInfo:t,eventTopMost:ob(t),markerClickManager:new lb})}function dy(t){return{subscribe:t.subscribe}}function dg({key:t,setPopupTarget:e=!1,setCluster:r=!1,setMouseEvent:s=!1}){let l=Zp(),p=oa(null),m=dy(p),c={...l,[t]:dy(p)};if(e&&(c.popupTarget=m),s){let S=oa(null);c.layerEvent=S,l.layerEvent=S}return r&&(c.cluster=oa()),o0(pg,c),{...l,self:p}}function b2(){return dg({key:"source",setCluster:!0})}function ab(t=!0){return dg({key:"layer",setPopupTarget:t,setMouseEvent:t})}function w2(){return dg({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}class lb{constructor(){Aa(this,"_handlers",new Set)}add(e){this._handlers.add(e)}remove(e){this._handlers.delete(e)}handleClick(e){for(const r of this._handlers)r(e)}}var ub=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cb(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function I2(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var l=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,l.get?l:{enumerable:!0,get:function(){return t[s]}})}),r}var S0={exports:{}};/** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.3/LICENSE.txt */(function(t,e){(function(r,s){t.exports=s()})(ub,function(){var r={},s={};function l(m,c,S){if(s[m]=S,m==="index"){var L="var sharedModule = {}; ("+s.shared+")(sharedModule); ("+s.worker+")(sharedModule);",R={};return s.shared(R),s.index(r,R),typeof window<"u"&&r.setWorkerUrl(window.URL.createObjectURL(new Blob([L],{type:"text/javascript"}))),r}}l("shared",["exports"],function(m){function c(o,n,a,h){return new(a||(a=Promise))(function(g,v){function x(T){try{E(h.next(T))}catch(A){v(A)}}function b(T){try{E(h.throw(T))}catch(A){v(A)}}function E(T){var A;T.done?g(T.value):(A=T.value,A instanceof a?A:new a(function(M){M(A)})).then(x,b)}E((h=h.apply(o,n||[])).next())})}function S(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}typeof SuppressedError=="function"&&SuppressedError;var L=R;function R(o,n){this.x=o,this.y=n}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(o){return this.clone()._add(o)},sub:function(o){return this.clone()._sub(o)},multByPoint:function(o){return this.clone()._multByPoint(o)},divByPoint:function(o){return this.clone()._divByPoint(o)},mult:function(o){return this.clone()._mult(o)},div:function(o){return this.clone()._div(o)},rotate:function(o){return this.clone()._rotate(o)},rotateAround:function(o,n){return this.clone()._rotateAround(o,n)},matMult:function(o){return this.clone()._matMult(o)},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(o){return this.x===o.x&&this.y===o.y},dist:function(o){return Math.sqrt(this.distSqr(o))},distSqr:function(o){var n=o.x-this.x,a=o.y-this.y;return n*n+a*a},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(o){return Math.atan2(this.y-o.y,this.x-o.x)},angleWith:function(o){return this.angleWithSep(o.x,o.y)},angleWithSep:function(o,n){return Math.atan2(this.x*n-this.y*o,this.x*o+this.y*n)},_matMult:function(o){var n=o[2]*this.x+o[3]*this.y;return this.x=o[0]*this.x+o[1]*this.y,this.y=n,this},_add:function(o){return this.x+=o.x,this.y+=o.y,this},_sub:function(o){return this.x-=o.x,this.y-=o.y,this},_mult:function(o){return this.x*=o,this.y*=o,this},_div:function(o){return this.x/=o,this.y/=o,this},_multByPoint:function(o){return this.x*=o.x,this.y*=o.y,this},_divByPoint:function(o){return this.x/=o.x,this.y/=o.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var o=this.y;return this.y=this.x,this.x=-o,this},_rotate:function(o){var n=Math.cos(o),a=Math.sin(o),h=a*this.x+n*this.y;return this.x=n*this.x-a*this.y,this.y=h,this},_rotateAround:function(o,n){var a=Math.cos(o),h=Math.sin(o),g=n.y+h*(this.x-n.x)+a*(this.y-n.y);return this.x=n.x+a*(this.x-n.x)-h*(this.y-n.y),this.y=g,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},R.convert=function(o){return o instanceof R?o:Array.isArray(o)?new R(o[0],o[1]):o};var N=S(L),B=it;function it(o,n,a,h){this.cx=3*o,this.bx=3*(a-o)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(h-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=o,this.p1y=n,this.p2x=a,this.p2y=h}it.prototype={sampleCurveX:function(o){return((this.ax*o+this.bx)*o+this.cx)*o},sampleCurveY:function(o){return((this.ay*o+this.by)*o+this.cy)*o},sampleCurveDerivativeX:function(o){return(3*this.ax*o+2*this.bx)*o+this.cx},solveCurveX:function(o,n){if(n===void 0&&(n=1e-6),o<0)return 0;if(o>1)return 1;for(var a=o,h=0;h<8;h++){var g=this.sampleCurveX(a)-o;if(Math.abs(g)g?x=a:b=a,a=.5*(b-x)+x;return a},solve:function(o,n){return this.sampleCurveY(this.solveCurveX(o,n))}};var ct=S(B);let gt,bt;function Mt(){return gt==null&&(gt=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),gt}function Nt(){if(bt==null&&(bt=!1,Mt())){const n=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(n){for(let h=0;h<5*5;h++){const g=4*h;n.fillStyle=`rgb(${g},${g+1},${g+2})`,n.fillRect(h%5,Math.floor(h/5),1,1)}const a=n.getImageData(0,0,5,5).data;for(let h=0;h<5*5*4;h++)if(h%4!=3&&a[h]!==h){bt=!0;break}}}return bt||!1}function qt(o,n,a,h){const g=new ct(o,n,a,h);return function(v){return g.solve(v)}}const ae=qt(.25,.1,.25,1);function de(o,n,a){return Math.min(a,Math.max(n,o))}function De(o,n,a){const h=a-n,g=((o-n)%h+h)%h+n;return g===n?a:g}function _e(o,...n){for(const a of n)for(const h in a)o[h]=a[h];return o}let Me=1;function ne(o,n,a){const h={};for(const g in o)h[g]=n.call(a||this,o[g],g,o);return h}function le(o,n,a){const h={};for(const g in o)n.call(a||this,o[g],g,o)&&(h[g]=o[g]);return h}function Dt(o){return Array.isArray(o)?o.map(Dt):typeof o=="object"&&o?ne(o,Dt):o}const En={};function Be(o){En[o]||(typeof console<"u"&&console.warn(o),En[o]=!0)}function We(o,n,a){return(a.y-o.y)*(n.x-o.x)>(n.y-o.y)*(a.x-o.x)}function An(o){let n=0;for(let a,h,g=0,v=o.length,x=v-1;g"u")throw new Error("VideoFrame not supported");const v=new VideoFrame(o,{timestamp:0});try{const x=v==null?void 0:v.format;if(!x||!x.startsWith("BGR")&&!x.startsWith("RGB"))throw new Error(`Unrecognized format ${x}`);const b=x.startsWith("BGR"),E=new Uint8ClampedArray(h*g*4);if(yield v.copyTo(E,function(T,A,M,O,V){const G=4*Math.max(-A,0),Z=(Math.max(0,M)-M)*O*4+G,Y=4*O,$=Math.max(0,A),ut=Math.max(0,M);return{rect:{x:$,y:ut,width:Math.min(T.width,A+O)-$,height:Math.min(T.height,M+V)-ut},layout:[{offset:Z,stride:Y}]}}(o,n,a,h,g)),b)for(let T=0;TSn(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ai=function(o,n){if(/:\/\//.test(o.url)&&!/^https?:|^file:/.test(o.url)){const h=Ve(o.url);if(h)return h(o,n);if(Sn(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:o,targetMapId:mn},n)}if(!(/^file:/.test(a=o.url)||/^file:/.test(mi())&&!/^\w+:/.test(a))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(h,g){return c(this,void 0,void 0,function*(){const v=new Request(h.url,{method:h.method||"GET",body:h.body,credentials:h.credentials,headers:h.headers,cache:h.cache,referrer:mi(),signal:g.signal});h.type==="json"&&v.headers.set("Accept","application/json");const x=yield fetch(v);if(!x.ok){const T=yield x.blob();throw new Dn(x.status,x.statusText,h.url,T)}let b;b=h.type==="arrayBuffer"||h.type==="image"?x.arrayBuffer():h.type==="json"?x.json():x.text();const E=yield b;if(g.signal.aborted)throw bn();return{data:E,cacheControl:x.headers.get("Cache-Control"),expires:x.headers.get("Expires")}})}(o,n);if(Sn(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:o,mustQueue:!0,targetMapId:mn},n)}var a;return function(h,g){return new Promise((v,x)=>{const b=new XMLHttpRequest;b.open(h.method||"GET",h.url,!0),h.type!=="arrayBuffer"&&h.type!=="image"||(b.responseType="arraybuffer");for(const E in h.headers)b.setRequestHeader(E,h.headers[E]);h.type==="json"&&(b.responseType="text",b.setRequestHeader("Accept","application/json")),b.withCredentials=h.credentials==="include",b.onerror=()=>{x(new Error(b.statusText))},b.onload=()=>{if(!g.signal.aborted)if((b.status>=200&&b.status<300||b.status===0)&&b.response!==null){let E=b.response;if(h.type==="json")try{E=JSON.parse(b.response)}catch(T){return void x(T)}v({data:E,cacheControl:b.getResponseHeader("Cache-Control"),expires:b.getResponseHeader("Expires")})}else{const E=new Blob([b.response],{type:b.getResponseHeader("Content-Type")});x(new Dn(b.status,b.statusText,h.url,E))}},g.signal.addEventListener("abort",()=>{b.abort(),x(bn())}),b.send(h.body)})}(o,n)};function Wn(o){if(!o||o.indexOf("://")<=0||o.indexOf("data:image/")===0||o.indexOf("blob:")===0)return!0;const n=new URL(o),a=window.location;return n.protocol===a.protocol&&n.host===a.host}function ni(o,n,a){a[o]&&a[o].indexOf(n)!==-1||(a[o]=a[o]||[],a[o].push(n))}function jt(o,n,a){if(a&&a[o]){const h=a[o].indexOf(n);h!==-1&&a[o].splice(h,1)}}class St{constructor(n,a={}){_e(this,a),this.type=n}}class li extends St{constructor(n,a={}){super("error",_e({error:n},a))}}class Rn{on(n,a){return this._listeners=this._listeners||{},ni(n,a,this._listeners),this}off(n,a){return jt(n,a,this._listeners),jt(n,a,this._oneTimeListeners),this}once(n,a){return a?(this._oneTimeListeners=this._oneTimeListeners||{},ni(n,a,this._oneTimeListeners),this):new Promise(h=>this.once(n,h))}fire(n,a){typeof n=="string"&&(n=new St(n,a||{}));const h=n.type;if(this.listens(h)){n.target=this;const g=this._listeners&&this._listeners[h]?this._listeners[h].slice():[];for(const b of g)b.call(this,n);const v=this._oneTimeListeners&&this._oneTimeListeners[h]?this._oneTimeListeners[h].slice():[];for(const b of v)jt(h,b,this._oneTimeListeners),b.call(this,n);const x=this._eventedParent;x&&(_e(n,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),x.fire(n))}else n instanceof li&&console.error(n.error);return this}listens(n){return this._listeners&&this._listeners[n]&&this._listeners[n].length>0||this._oneTimeListeners&&this._oneTimeListeners[n]&&this._oneTimeListeners[n].length>0||this._eventedParent&&this._eventedParent.listens(n)}setEventedParent(n,a){return this._eventedParent=n,this._eventedParentData=a,this}}var yt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},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":{},within:{}}},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},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-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}},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 ji=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ct(o,n){const a={};for(const h in o)h!=="ref"&&(a[h]=o[h]);return ji.forEach(h=>{h in n&&(a[h]=n[h])}),a}function Jt(o,n){if(Array.isArray(o)){if(!Array.isArray(n)||o.length!==n.length)return!1;for(let a=0;a`:o.itemType.kind==="value"?"array":`array<${n}>`}return o.kind}const rt=[Qi,Zt,Ae,Te,gi,Ii,Ho,q(we),K,z,F];function ot(o,n){if(n.kind==="error")return null;if(o.kind==="array"){if(n.kind==="array"&&(n.N===0&&n.itemType.kind==="value"||!ot(o.itemType,n.itemType))&&(typeof o.N!="number"||o.N===n.N))return null}else{if(o.kind===n.kind)return null;if(o.kind==="value"){for(const a of rt)if(!ot(a,n))return null}}return`Expected ${H(o)} but found ${H(n)} instead.`}function lt(o,n){return n.some(a=>a.kind===o.kind)}function et(o,n){return n.some(a=>a==="null"?o===null:a==="array"?Array.isArray(o):a==="object"?o&&!Array.isArray(o)&&typeof o=="object":a===typeof o)}function pt(o,n){return o.kind==="array"&&n.kind==="array"?o.itemType.kind===n.itemType.kind&&typeof o.N=="number":o.kind===n.kind}const Lt=.96422,It=.82521,Et=4/29,re=6/29,ce=3*re*re,Ie=re*re*re,ve=Math.PI/180,qe=180/Math.PI;function gn(o){return(o%=360)<0&&(o+=360),o}function Nn([o,n,a,h]){let g,v;const x=Le((.2225045*(o=_i(o))+.7168786*(n=_i(n))+.0606169*(a=_i(a)))/1);o===n&&n===a?g=v=x:(g=Le((.4360747*o+.3850649*n+.1430804*a)/Lt),v=Le((.0139322*o+.0971045*n+.7141733*a)/It));const b=116*x-16;return[b<0?0:b,500*(g-x),200*(x-v),h]}function _i(o){return o<=.04045?o/12.92:Math.pow((o+.055)/1.055,2.4)}function Le(o){return o>Ie?Math.pow(o,1/3):o/ce+Et}function Xn([o,n,a,h]){let g=(o+16)/116,v=isNaN(n)?g:g+n/500,x=isNaN(a)?g:g-a/200;return g=1*hr(g),v=Lt*hr(v),x=It*hr(x),[Ei(3.1338561*v-1.6168667*g-.4906146*x),Ei(-.9787684*v+1.9161415*g+.033454*x),Ei(.0719453*v-.2289914*g+1.4052427*x),h]}function Ei(o){return(o=o<=.00304?12.92*o:1.055*Math.pow(o,1/2.4)-.055)<0?0:o>1?1:o}function hr(o){return o>re?o*o*o:ce*(o-Et)}function Sr(o){return parseInt(o.padEnd(2,o),16)/255}function zi(o,n){return Wo(n?o/100:o,0,1)}function Wo(o,n,a){return Math.min(Math.max(n,o),a)}function $p(o){return!o.some(Number.isNaN)}const Df={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]};class cn{constructor(n,a,h,g=1,v=!0){this.r=n,this.g=a,this.b=h,this.a=g,v||(this.r*=g,this.g*=g,this.b*=g,g||this.overwriteGetter("rgb",[n,a,h,g]))}static parse(n){if(n instanceof cn)return n;if(typeof n!="string")return;const a=function(h){if((h=h.toLowerCase().trim())==="transparent")return[0,0,0,0];const g=Df[h];if(g){const[x,b,E]=g;return[x/255,b/255,E/255,1]}if(h.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(h)){const x=h.length<6?1:2;let b=1;return[Sr(h.slice(b,b+=x)),Sr(h.slice(b,b+=x)),Sr(h.slice(b,b+=x)),Sr(h.slice(b,b+x)||"ff")]}if(h.startsWith("rgb")){const x=h.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[b,E,T,A,M,O,V,G,Z,Y,$,ut]=x,tt=[A||" ",V||" ",Y].join("");if(tt===" "||tt===" /"||tt===",,"||tt===",,,"){const st=[T,O,Z].join(""),wt=st==="%%%"?100:st===""?255:0;if(wt){const Tt=[Wo(+E/wt,0,1),Wo(+M/wt,0,1),Wo(+G/wt,0,1),$?zi(+$,ut):1];if($p(Tt))return Tt}}return}}const v=h.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(v){const[x,b,E,T,A,M,O,V,G]=v,Z=[E||" ",A||" ",O].join("");if(Z===" "||Z===" /"||Z===",,"||Z===",,,"){const Y=[+b,Wo(+T,0,100),Wo(+M,0,100),V?zi(+V,G):1];if($p(Y))return function([$,ut,tt,st]){function wt(Tt){const Yt=(Tt+$/30)%12,te=ut*Math.min(tt,1-tt);return tt-te*Math.max(-1,Math.min(Yt-3,9-Yt,1))}return $=gn($),ut/=100,tt/=100,[wt(0),wt(8),wt(4),st]}(Y)}}}(n);return a?new cn(...a,!1):void 0}get rgb(){const{r:n,g:a,b:h,a:g}=this,v=g||1/0;return this.overwriteGetter("rgb",[n/v,a/v,h/v,g])}get hcl(){return this.overwriteGetter("hcl",function(n){const[a,h,g,v]=Nn(n),x=Math.sqrt(h*h+g*g);return[Math.round(1e4*x)?gn(Math.atan2(g,h)*qe):NaN,x,a,v]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Nn(this.rgb))}overwriteGetter(n,a){return Object.defineProperty(this,n,{value:a}),a}toString(){const[n,a,h,g]=this.rgb;return`rgba(${[n,a,h].map(v=>Math.round(255*v)).join(",")},${g})`}}cn.black=new cn(0,0,0,1),cn.white=new cn(1,1,1,1),cn.transparent=new cn(0,0,0,0),cn.red=new cn(1,0,0,1);class dh{constructor(n,a,h){this.sensitivity=n?a?"variant":"case":a?"accent":"base",this.locale=h,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(n,a){return this.collator.compare(n,a)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class fh{constructor(n,a,h,g,v){this.text=n,this.image=a,this.scale=h,this.fontStack=g,this.textColor=v}}class Ur{constructor(n){this.sections=n}static fromString(n){return new Ur([new fh(n,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(n=>n.text.length!==0||n.image&&n.image.name.length!==0)}static factory(n){return n instanceof Ur?n:Ur.fromString(n)}toString(){return this.sections.length===0?"":this.sections.map(n=>n.text).join("")}}class Cr{constructor(n){this.values=n.slice()}static parse(n){if(n instanceof Cr)return n;if(typeof n=="number")return new Cr([n,n,n,n]);if(Array.isArray(n)&&!(n.length<1||n.length>4)){for(const a of n)if(typeof a!="number")return;switch(n.length){case 1:n=[n[0],n[0],n[0],n[0]];break;case 2:n=[n[0],n[1],n[0],n[1]];break;case 3:n=[n[0],n[1],n[2],n[1]]}return new Cr(n)}}toString(){return JSON.stringify(this.values)}}const Vl=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class oo{constructor(n){this.values=n.slice()}static parse(n){if(n instanceof oo)return n;if(Array.isArray(n)&&!(n.length<1)&&n.length%2==0){for(let a=0;a=0&&o<=255&&typeof n=="number"&&n>=0&&n<=255&&typeof a=="number"&&a>=0&&a<=255?h===void 0||typeof h=="number"&&h>=0&&h<=1?null:`Invalid rgba value [${[o,n,a,h].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof h=="number"?[o,n,a,h]:[o,n,a]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ou(o){if(o===null||typeof o=="string"||typeof o=="boolean"||typeof o=="number"||o instanceof cn||o instanceof dh||o instanceof Ur||o instanceof Cr||o instanceof oo||o instanceof so)return!0;if(Array.isArray(o)){for(const n of o)if(!Ou(n))return!1;return!0}if(typeof o=="object"){for(const n in o)if(!Ou(o[n]))return!1;return!0}return!1}function yi(o){if(o===null)return Qi;if(typeof o=="string")return Ae;if(typeof o=="boolean")return Te;if(typeof o=="number")return Zt;if(o instanceof cn)return gi;if(o instanceof dh)return ma;if(o instanceof Ur)return Ii;if(o instanceof Cr)return K;if(o instanceof oo)return F;if(o instanceof so)return z;if(Array.isArray(o)){const n=o.length;let a;for(const h of o){const g=yi(h);if(a){if(a===g)continue;a=we;break}a=g}return q(a||we,n)}return Ho}function Ul(o){const n=typeof o;return o===null?"":n==="string"||n==="number"||n==="boolean"?String(o):o instanceof cn||o instanceof Ur||o instanceof Cr||o instanceof oo||o instanceof so?o.toString():JSON.stringify(o)}class js{constructor(n,a){this.type=n,this.value=a}static parse(n,a){if(n.length!==2)return a.error(`'literal' expression requires exactly one argument, but found ${n.length-1} instead.`);if(!Ou(n[1]))return a.error("invalid value");const h=n[1];let g=yi(h);const v=a.expectedType;return g.kind!=="array"||g.N!==0||!v||v.kind!=="array"||typeof v.N=="number"&&v.N!==0||(g=v),new js(g,h)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Vn{constructor(n){this.name="ExpressionEvaluationError",this.message=n}toJSON(){return this.message}}const Fu={string:Ae,number:Zt,boolean:Te,object:Ho};class Gr{constructor(n,a){this.type=n,this.args=a}static parse(n,a){if(n.length<2)return a.error("Expected at least one argument.");let h,g=1;const v=n[0];if(v==="array"){let b,E;if(n.length>2){const T=n[1];if(typeof T!="string"||!(T in Fu)||T==="object")return a.error('The item type argument of "array" must be one of string, number, boolean',1);b=Fu[T],g++}else b=we;if(n.length>3){if(n[2]!==null&&(typeof n[2]!="number"||n[2]<0||n[2]!==Math.floor(n[2])))return a.error('The length argument to "array" must be a positive integer literal',2);E=n[2],g++}h=q(b,E)}else{if(!Fu[v])throw new Error(`Types doesn't contain name = ${v}`);h=Fu[v]}const x=[];for(;gn.outputDefined())}}const Bu={"to-boolean":Te,"to-color":gi,"to-number":Zt,"to-string":Ae};class Xo{constructor(n,a){this.type=n,this.args=a}static parse(n,a){if(n.length<2)return a.error("Expected at least one argument.");const h=n[0];if(!Bu[h])throw new Error(`Can't parse ${h} as it is not part of the known types`);if((h==="to-boolean"||h==="to-string")&&n.length!==2)return a.error("Expected one argument.");const g=Bu[h],v=[];for(let x=1;x4?`Invalid rbga value ${JSON.stringify(a)}: expected an array containing either three or four numeric values.`:tl(a[0],a[1],a[2],a[3]),!h))return new cn(a[0]/255,a[1]/255,a[2]/255,a[3])}throw new Vn(h||`Could not parse color from value '${typeof a=="string"?a:JSON.stringify(a)}'`)}case"padding":{let a;for(const h of this.args){a=h.evaluate(n);const g=Cr.parse(a);if(g)return g}throw new Vn(`Could not parse padding from value '${typeof a=="string"?a:JSON.stringify(a)}'`)}case"variableAnchorOffsetCollection":{let a;for(const h of this.args){a=h.evaluate(n);const g=oo.parse(a);if(g)return g}throw new Vn(`Could not parse variableAnchorOffsetCollection from value '${typeof a=="string"?a:JSON.stringify(a)}'`)}case"number":{let a=null;for(const h of this.args){if(a=h.evaluate(n),a===null)return 0;const g=Number(a);if(!isNaN(g))return g}throw new Vn(`Could not convert ${JSON.stringify(a)} to number.`)}case"formatted":return Ur.fromString(Ul(this.args[0].evaluate(n)));case"resolvedImage":return so.fromString(Ul(this.args[0].evaluate(n)));default:return Ul(this.args[0].evaluate(n))}}eachChild(n){this.args.forEach(n)}outputDefined(){return this.args.every(n=>n.outputDefined())}}const Gl=["Unknown","Point","LineString","Polygon"];class hn{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"?Gl[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(n){let a=this._parseColorCache[n];return a||(a=this._parseColorCache[n]=cn.parse(n)),a}}class Vu{constructor(n,a,h=[],g,v=new Bl,x=[]){this.registry=n,this.path=h,this.key=h.map(b=>`[${b}]`).join(""),this.scope=v,this.errors=x,this.expectedType=g,this._isConstant=a}parse(n,a,h,g,v={}){return a?this.concat(a,h,g)._parse(n,v):this._parse(n,v)}_parse(n,a){function h(g,v,x){return x==="assert"?new Gr(v,[g]):x==="coerce"?new Xo(v,[g]):g}if(n!==null&&typeof n!="string"&&typeof n!="boolean"&&typeof n!="number"||(n=["literal",n]),Array.isArray(n)){if(n.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const g=n[0];if(typeof g!="string")return this.error(`Expression name must be a string, but found ${typeof g} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const v=this.registry[g];if(v){let x=v.parse(n,this);if(!x)return null;if(this.expectedType){const b=this.expectedType,E=x.type;if(b.kind!=="string"&&b.kind!=="number"&&b.kind!=="boolean"&&b.kind!=="object"&&b.kind!=="array"||E.kind!=="value")if(b.kind!=="color"&&b.kind!=="formatted"&&b.kind!=="resolvedImage"||E.kind!=="value"&&E.kind!=="string")if(b.kind!=="padding"||E.kind!=="value"&&E.kind!=="number"&&E.kind!=="array")if(b.kind!=="variableAnchorOffsetCollection"||E.kind!=="value"&&E.kind!=="array"){if(this.checkSubtype(b,E))return null}else x=h(x,b,a.typeAnnotation||"coerce");else x=h(x,b,a.typeAnnotation||"coerce");else x=h(x,b,a.typeAnnotation||"coerce");else x=h(x,b,a.typeAnnotation||"assert")}if(!(x instanceof js)&&x.type.kind!=="resolvedImage"&&this._isConstant(x)){const b=new hn;try{x=new js(x.type,x.evaluate(b))}catch(E){return this.error(E.message),null}}return x}return this.error(`Unknown expression "${g}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(n===void 0?"'undefined' value invalid. Use null instead.":typeof n=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof n} instead.`)}concat(n,a,h){const g=typeof n=="number"?this.path.concat(n):this.path,v=h?this.scope.concat(h):this.scope;return new Vu(this.registry,this._isConstant,g,a||null,v,this.errors)}error(n,...a){const h=`${this.key}${a.map(g=>`[${g}]`).join("")}`;this.errors.push(new Vr(h,n))}checkSubtype(n,a){const h=ot(n,a);return h&&this.error(h),h}}class el{constructor(n,a,h){this.type=ma,this.locale=h,this.caseSensitive=n,this.diacriticSensitive=a}static parse(n,a){if(n.length!==2)return a.error("Expected one argument.");const h=n[1];if(typeof h!="object"||Array.isArray(h))return a.error("Collator options argument must be an object.");const g=a.parse(h["case-sensitive"]!==void 0&&h["case-sensitive"],1,Te);if(!g)return null;const v=a.parse(h["diacritic-sensitive"]!==void 0&&h["diacritic-sensitive"],1,Te);if(!v)return null;let x=null;return h.locale&&(x=a.parse(h.locale,1,Ae),!x)?null:new el(g,v,x)}evaluate(n){return new dh(this.caseSensitive.evaluate(n),this.diacriticSensitive.evaluate(n),this.locale?this.locale.evaluate(n):null)}eachChild(n){n(this.caseSensitive),n(this.diacriticSensitive),this.locale&&n(this.locale)}outputDefined(){return!1}}const Zs=8192;function Uu(o,n){o[0]=Math.min(o[0],n[0]),o[1]=Math.min(o[1],n[1]),o[2]=Math.max(o[2],n[0]),o[3]=Math.max(o[3],n[1])}function ql(o,n){return!(o[0]<=n[0]||o[2]>=n[2]||o[1]<=n[1]||o[3]>=n[3])}function Rf(o,n){const a=(180+o[0])/360,h=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+o[1]*Math.PI/360)))/360,g=Math.pow(2,n.z);return[Math.round(a*g*Zs),Math.round(h*g*Zs)]}function td(o,n,a){const h=o[0]-n[0],g=o[1]-n[1],v=o[0]-a[0],x=o[1]-a[1];return h*x-v*g==0&&h*v<=0&&g*x<=0}function Gu(o,n){let a=!1;for(let x=0,b=n.length;x(h=o)[1]!=(v=E[T+1])[1]>h[1]&&h[0]<(v[0]-g[0])*(h[1]-g[1])/(v[1]-g[1])+g[0]&&(a=!a)}}var h,g,v;return a}function Nf(o,n){for(let a=0;a0&&b<0||x<0&&b>0}function kf(o,n,a){for(const T of a)for(let A=0;Aa[2]){const g=.5*h;let v=o[0]-a[0]>g?-h:a[0]-o[0]>g?h:0;v===0&&(v=o[0]-a[2]>g?-h:a[2]-o[0]>g?h:0),o[0]+=v}Uu(n,o)}function ju(o,n,a,h){const g=Math.pow(2,h.z)*Zs,v=[h.x*Zs,h.y*Zs],x=[];for(const b of o)for(const E of b){const T=[E.x+v[0],E.y+v[1]];od(T,n,a,g),x.push(T)}return x}function sd(o,n,a,h){const g=Math.pow(2,h.z)*Zs,v=[h.x*Zs,h.y*Zs],x=[];for(const E of o){const T=[];for(const A of E){const M=[A.x+v[0],A.y+v[1]];Uu(n,M),T.push(M)}x.push(T)}if(n[2]-n[0]<=g/2){(b=n)[0]=b[1]=1/0,b[2]=b[3]=-1/0;for(const E of x)for(const T of E)od(T,n,a,g)}var b;return x}class ga{constructor(n,a){this.type=Te,this.geojson=n,this.geometries=a}static parse(n,a){if(n.length!==2)return a.error(`'within' expression requires exactly one argument, but found ${n.length-1} instead.`);if(Ou(n[1])){const h=n[1];if(h.type==="FeatureCollection"){const g=[];for(const v of h.features){const{type:x,coordinates:b}=v.geometry;x==="Polygon"&&g.push(b),x==="MultiPolygon"&&g.push(...b)}if(g.length)return new ga(h,{type:"MultiPolygon",coordinates:g})}else if(h.type==="Feature"){const g=h.geometry.type;if(g==="Polygon"||g==="MultiPolygon")return new ga(h,h.geometry)}else if(h.type==="Polygon"||h.type==="MultiPolygon")return new ga(h,h)}return a.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(n){if(n.geometry()!=null&&n.canonicalID()!=null){if(n.geometryType()==="Point")return function(a,h){const g=[1/0,1/0,-1/0,-1/0],v=[1/0,1/0,-1/0,-1/0],x=a.canonicalID();if(h.type==="Polygon"){const b=qu(h.coordinates,v,x),E=ju(a.geometry(),g,v,x);if(!ql(g,v))return!1;for(const T of E)if(!Gu(T,b))return!1}if(h.type==="MultiPolygon"){const b=rd(h.coordinates,v,x),E=ju(a.geometry(),g,v,x);if(!ql(g,v))return!1;for(const T of E)if(!Nf(T,b))return!1}return!0}(n,this.geometries);if(n.geometryType()==="LineString")return function(a,h){const g=[1/0,1/0,-1/0,-1/0],v=[1/0,1/0,-1/0,-1/0],x=a.canonicalID();if(h.type==="Polygon"){const b=qu(h.coordinates,v,x),E=sd(a.geometry(),g,v,x);if(!ql(g,v))return!1;for(const T of E)if(!nd(T,b))return!1}if(h.type==="MultiPolygon"){const b=rd(h.coordinates,v,x),E=sd(a.geometry(),g,v,x);if(!ql(g,v))return!1;for(const T of E)if(!id(T,b))return!1}return!0}(n,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Zu{constructor(n,a){this.type=a.type,this.name=n,this.boundExpression=a}static parse(n,a){if(n.length!==2||typeof n[1]!="string")return a.error("'var' expression requires exactly one string literal argument.");const h=n[1];return a.scope.has(h)?new Zu(h,a.scope.get(h)):a.error(`Unknown variable "${h}". Make sure "${h}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(n){return this.boundExpression.evaluate(n)}eachChild(){}outputDefined(){return!1}}class qr{constructor(n,a,h,g){this.name=n,this.type=a,this._evaluate=h,this.args=g}evaluate(n){return this._evaluate(n,this.args)}eachChild(n){this.args.forEach(n)}outputDefined(){return!1}static parse(n,a){const h=n[0],g=qr.definitions[h];if(!g)return a.error(`Unknown expression "${h}". If you wanted a literal array, use ["literal", [...]].`,0);const v=Array.isArray(g)?g[0]:g.type,x=Array.isArray(g)?[[g[1],g[2]]]:g.overloads,b=x.filter(([T])=>!Array.isArray(T)||T.length===n.length-1);let E=null;for(const[T,A]of b){E=new Vu(a.registry,jl,a.path,null,a.scope);const M=[];let O=!1;for(let V=1;V{return O=M,Array.isArray(O)?`(${O.map(H).join(", ")})`:`(${H(O.type)}...)`;var O}).join(" | "),A=[];for(let M=1;M{a=n?a&&jl(h):a&&h instanceof js}),!!a&&Hu(o)&&Hl(o,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Hu(o){if(o instanceof qr&&(o.name==="get"&&o.args.length===1||o.name==="feature-state"||o.name==="has"&&o.args.length===1||o.name==="properties"||o.name==="geometry-type"||o.name==="id"||/^filter-/.test(o.name))||o instanceof ga)return!1;let n=!0;return o.eachChild(a=>{n&&!Hu(a)&&(n=!1)}),n}function Zl(o){if(o instanceof qr&&o.name==="feature-state")return!1;let n=!0;return o.eachChild(a=>{n&&!Zl(a)&&(n=!1)}),n}function Hl(o,n){if(o instanceof qr&&n.indexOf(o.name)>=0)return!1;let a=!0;return o.eachChild(h=>{a&&!Hl(h,n)&&(a=!1)}),a}function Wl(o,n){const a=o.length-1;let h,g,v=0,x=a,b=0;for(;v<=x;)if(b=Math.floor((v+x)/2),h=o[b],g=o[b+1],h<=n){if(b===a||nn))throw new Vn("Input is not a number.");x=b-1}return 0}class Xl{constructor(n,a,h){this.type=n,this.input=a,this.labels=[],this.outputs=[];for(const[g,v]of h)this.labels.push(g),this.outputs.push(v)}static parse(n,a){if(n.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${n.length-1}.`);if((n.length-1)%2!=0)return a.error("Expected an even number of arguments.");const h=a.parse(n[1],1,Zt);if(!h)return null;const g=[];let v=null;a.expectedType&&a.expectedType.kind!=="value"&&(v=a.expectedType);for(let x=1;x=b)return a.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',T);const M=a.parse(E,A,v);if(!M)return null;v=v||M.type,g.push([b,M])}return new Xl(v,h,g)}evaluate(n){const a=this.labels,h=this.outputs;if(a.length===1)return h[0].evaluate(n);const g=this.input.evaluate(n);if(g<=a[0])return h[0].evaluate(n);const v=a.length;return g>=a[v-1]?h[v-1].evaluate(n):h[Wl(a,g)].evaluate(n)}eachChild(n){n(this.input);for(const a of this.outputs)n(a)}outputDefined(){return this.outputs.every(n=>n.outputDefined())}}function zf(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Of=ad;function ad(o,n,a,h){this.cx=3*o,this.bx=3*(a-o)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*n,this.by=3*(h-n)-this.cy,this.ay=1-this.cy-this.by,this.p1x=o,this.p1y=n,this.p2x=a,this.p2y=h}ad.prototype={sampleCurveX:function(o){return((this.ax*o+this.bx)*o+this.cx)*o},sampleCurveY:function(o){return((this.ay*o+this.by)*o+this.cy)*o},sampleCurveDerivativeX:function(o){return(3*this.ax*o+2*this.bx)*o+this.cx},solveCurveX:function(o,n){if(n===void 0&&(n=1e-6),o<0)return 0;if(o>1)return 1;for(var a=o,h=0;h<8;h++){var g=this.sampleCurveX(a)-o;if(Math.abs(g)g?x=a:b=a,a=.5*(b-x)+x;return a},solve:function(o,n){return this.sampleCurveY(this.solveCurveX(o,n))}};var Ff=zf(Of);function _a(o,n,a){return o+a*(n-o)}function Wu(o,n,a){return o.map((h,g)=>_a(h,n[g],a))}const pr={number:_a,color:function(o,n,a,h="rgb"){switch(h){case"rgb":{const[g,v,x,b]=Wu(o.rgb,n.rgb,a);return new cn(g,v,x,b,!1)}case"hcl":{const[g,v,x,b]=o.hcl,[E,T,A,M]=n.hcl;let O,V;if(isNaN(g)||isNaN(E))isNaN(g)?isNaN(E)?O=NaN:(O=E,x!==1&&x!==0||(V=T)):(O=g,A!==1&&A!==0||(V=v));else{let ut=E-g;E>g&&ut>180?ut-=360:E180&&(ut+=360),O=g+a*ut}const[G,Z,Y,$]=function([ut,tt,st,wt]){return ut=isNaN(ut)?0:ut*ve,Xn([st,Math.cos(ut)*tt,Math.sin(ut)*tt,wt])}([O,V??_a(v,T,a),_a(x,A,a),_a(b,M,a)]);return new cn(G,Z,Y,$,!1)}case"lab":{const[g,v,x,b]=Xn(Wu(o.lab,n.lab,a));return new cn(g,v,x,b,!1)}}},array:Wu,padding:function(o,n,a){return new Cr(Wu(o.values,n.values,a))},variableAnchorOffsetCollection:function(o,n,a){const h=o.values,g=n.values;if(h.length!==g.length)throw new Vn(`Cannot interpolate values of different length. from: ${o.toString()}, to: ${n.toString()}`);const v=[];for(let x=0;xtypeof A!="number"||A<0||A>1))return a.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);g={name:"cubic-bezier",controlPoints:T}}}if(n.length-1<4)return a.error(`Expected at least 4 arguments, but found only ${n.length-1}.`);if((n.length-1)%2!=0)return a.error("Expected an even number of arguments.");if(v=a.parse(v,2,Zt),!v)return null;const b=[];let E=null;h==="interpolate-hcl"||h==="interpolate-lab"?E=gi:a.expectedType&&a.expectedType.kind!=="value"&&(E=a.expectedType);for(let T=0;T=A)return a.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',O);const G=a.parse(M,V,E);if(!G)return null;E=E||G.type,b.push([A,G])}return pt(E,Zt)||pt(E,gi)||pt(E,K)||pt(E,F)||pt(E,q(Zt))?new $i(E,h,g,v,b):a.error(`Type ${H(E)} is not interpolatable.`)}evaluate(n){const a=this.labels,h=this.outputs;if(a.length===1)return h[0].evaluate(n);const g=this.input.evaluate(n);if(g<=a[0])return h[0].evaluate(n);const v=a.length;if(g>=a[v-1])return h[v-1].evaluate(n);const x=Wl(a,g),b=$i.interpolationFactor(this.interpolation,g,a[x],a[x+1]),E=h[x].evaluate(n),T=h[x+1].evaluate(n);switch(this.operator){case"interpolate":return pr[this.type.kind](E,T,b);case"interpolate-hcl":return pr.color(E,T,b,"hcl");case"interpolate-lab":return pr.color(E,T,b,"lab")}}eachChild(n){n(this.input);for(const a of this.outputs)n(a)}outputDefined(){return this.outputs.every(n=>n.outputDefined())}}function $e(o,n,a,h){const g=h-a,v=o-a;return g===0?0:n===1?v/g:(Math.pow(n,v)-1)/(Math.pow(n,g)-1)}class Xu{constructor(n,a){this.type=n,this.args=a}static parse(n,a){if(n.length<2)return a.error("Expectected at least one argument.");let h=null;const g=a.expectedType;g&&g.kind!=="value"&&(h=g);const v=[];for(const b of n.slice(1)){const E=a.parse(b,1+v.length,h,void 0,{typeAnnotation:"omit"});if(!E)return null;h=h||E.type,v.push(E)}if(!h)throw new Error("No output type");const x=g&&v.some(b=>ot(g,b.type));return new Xu(x?we:h,v)}evaluate(n){let a,h=null,g=0;for(const v of this.args)if(g++,h=v.evaluate(n),h&&h instanceof so&&!h.available&&(a||(a=h.name),h=null,g===this.args.length&&(h=a)),h!==null)break;return h}eachChild(n){this.args.forEach(n)}outputDefined(){return this.args.every(n=>n.outputDefined())}}class Yu{constructor(n,a){this.type=a.type,this.bindings=[].concat(n),this.result=a}evaluate(n){return this.result.evaluate(n)}eachChild(n){for(const a of this.bindings)n(a[1]);n(this.result)}static parse(n,a){if(n.length<4)return a.error(`Expected at least 3 arguments, but found ${n.length-1} instead.`);const h=[];for(let v=1;v=h.length)throw new Vn(`Array index out of bounds: ${a} > ${h.length-1}.`);if(a!==Math.floor(a))throw new Vn(`Array index must be an integer, but found ${a} instead.`);return h[a]}eachChild(n){n(this.index),n(this.input)}outputDefined(){return!1}}class gh{constructor(n,a){this.type=Te,this.needle=n,this.haystack=a}static parse(n,a){if(n.length!==3)return a.error(`Expected 2 arguments, but found ${n.length-1} instead.`);const h=a.parse(n[1],1,we),g=a.parse(n[2],2,we);return h&&g?lt(h.type,[Te,Ae,Zt,Qi,we])?new gh(h,g):a.error(`Expected first argument to be of type boolean, string, number or null, but found ${H(h.type)} instead`):null}evaluate(n){const a=this.needle.evaluate(n),h=this.haystack.evaluate(n);if(!h)return!1;if(!et(a,["boolean","string","number","null"]))throw new Vn(`Expected first argument to be of type boolean, string, number or null, but found ${H(yi(a))} instead.`);if(!et(h,["string","array"]))throw new Vn(`Expected second argument to be of type array or string, but found ${H(yi(h))} instead.`);return h.indexOf(a)>=0}eachChild(n){n(this.needle),n(this.haystack)}outputDefined(){return!0}}class Ku{constructor(n,a,h){this.type=Zt,this.needle=n,this.haystack=a,this.fromIndex=h}static parse(n,a){if(n.length<=2||n.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${n.length-1} instead.`);const h=a.parse(n[1],1,we),g=a.parse(n[2],2,we);if(!h||!g)return null;if(!lt(h.type,[Te,Ae,Zt,Qi,we]))return a.error(`Expected first argument to be of type boolean, string, number or null, but found ${H(h.type)} instead`);if(n.length===4){const v=a.parse(n[3],3,Zt);return v?new Ku(h,g,v):null}return new Ku(h,g)}evaluate(n){const a=this.needle.evaluate(n),h=this.haystack.evaluate(n);if(!et(a,["boolean","string","number","null"]))throw new Vn(`Expected first argument to be of type boolean, string, number or null, but found ${H(yi(a))} instead.`);if(!et(h,["string","array"]))throw new Vn(`Expected second argument to be of type array or string, but found ${H(yi(h))} instead.`);if(this.fromIndex){const g=this.fromIndex.evaluate(n);return h.indexOf(a,g)}return h.indexOf(a)}eachChild(n){n(this.needle),n(this.haystack),this.fromIndex&&n(this.fromIndex)}outputDefined(){return!1}}class _h{constructor(n,a,h,g,v,x){this.inputType=n,this.type=a,this.input=h,this.cases=g,this.outputs=v,this.otherwise=x}static parse(n,a){if(n.length<5)return a.error(`Expected at least 4 arguments, but found only ${n.length-1}.`);if(n.length%2!=1)return a.error("Expected an even number of arguments.");let h,g;a.expectedType&&a.expectedType.kind!=="value"&&(g=a.expectedType);const v={},x=[];for(let T=2;TNumber.MAX_SAFE_INTEGER)return O.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof G=="number"&&Math.floor(G)!==G)return O.error("Numeric branch labels must be integer values.");if(h){if(O.checkSubtype(h,yi(G)))return null}else h=yi(G);if(v[String(G)]!==void 0)return O.error("Branch labels must be unique.");v[String(G)]=x.length}const V=a.parse(M,T,g);if(!V)return null;g=g||V.type,x.push(V)}const b=a.parse(n[1],1,we);if(!b)return null;const E=a.parse(n[n.length-1],n.length-1,g);return E?b.type.kind!=="value"&&a.concat(1).checkSubtype(h,b.type)?null:new _h(h,g,b,v,x,E):null}evaluate(n){const a=this.input.evaluate(n);return(yi(a)===this.inputType&&this.outputs[this.cases[a]]||this.otherwise).evaluate(n)}eachChild(n){n(this.input),this.outputs.forEach(n),n(this.otherwise)}outputDefined(){return this.outputs.every(n=>n.outputDefined())&&this.otherwise.outputDefined()}}class yh{constructor(n,a,h){this.type=n,this.branches=a,this.otherwise=h}static parse(n,a){if(n.length<4)return a.error(`Expected at least 3 arguments, but found only ${n.length-1}.`);if(n.length%2!=0)return a.error("Expected an odd number of arguments.");let h;a.expectedType&&a.expectedType.kind!=="value"&&(h=a.expectedType);const g=[];for(let x=1;xa.outputDefined())&&this.otherwise.outputDefined()}}class Ju{constructor(n,a,h,g){this.type=n,this.input=a,this.beginIndex=h,this.endIndex=g}static parse(n,a){if(n.length<=2||n.length>=5)return a.error(`Expected 3 or 4 arguments, but found ${n.length-1} instead.`);const h=a.parse(n[1],1,we),g=a.parse(n[2],2,Zt);if(!h||!g)return null;if(!lt(h.type,[q(we),Ae,we]))return a.error(`Expected first argument to be of type array or string, but found ${H(h.type)} instead`);if(n.length===4){const v=a.parse(n[3],3,Zt);return v?new Ju(h.type,h,g,v):null}return new Ju(h.type,h,g)}evaluate(n){const a=this.input.evaluate(n),h=this.beginIndex.evaluate(n);if(!et(a,["string","array"]))throw new Vn(`Expected first argument to be of type array or string, but found ${H(yi(a))} instead.`);if(this.endIndex){const g=this.endIndex.evaluate(n);return a.slice(h,g)}return a.slice(h)}eachChild(n){n(this.input),n(this.beginIndex),this.endIndex&&n(this.endIndex)}outputDefined(){return!1}}function ld(o,n){return o==="=="||o==="!="?n.kind==="boolean"||n.kind==="string"||n.kind==="number"||n.kind==="null"||n.kind==="value":n.kind==="string"||n.kind==="number"||n.kind==="value"}function ud(o,n,a,h){return h.compare(n,a)===0}function nl(o,n,a){const h=o!=="=="&&o!=="!=";return class C0{constructor(v,x,b){this.type=Te,this.lhs=v,this.rhs=x,this.collator=b,this.hasUntypedArgument=v.type.kind==="value"||x.type.kind==="value"}static parse(v,x){if(v.length!==3&&v.length!==4)return x.error("Expected two or three arguments.");const b=v[0];let E=x.parse(v[1],1,we);if(!E)return null;if(!ld(b,E.type))return x.concat(1).error(`"${b}" comparisons are not supported for type '${H(E.type)}'.`);let T=x.parse(v[2],2,we);if(!T)return null;if(!ld(b,T.type))return x.concat(2).error(`"${b}" comparisons are not supported for type '${H(T.type)}'.`);if(E.type.kind!==T.type.kind&&E.type.kind!=="value"&&T.type.kind!=="value")return x.error(`Cannot compare types '${H(E.type)}' and '${H(T.type)}'.`);h&&(E.type.kind==="value"&&T.type.kind!=="value"?E=new Gr(T.type,[E]):E.type.kind!=="value"&&T.type.kind==="value"&&(T=new Gr(E.type,[T])));let A=null;if(v.length===4){if(E.type.kind!=="string"&&T.type.kind!=="string"&&E.type.kind!=="value"&&T.type.kind!=="value")return x.error("Cannot use collator to compare non-string types.");if(A=x.parse(v[3],3,ma),!A)return null}return new C0(E,T,A)}evaluate(v){const x=this.lhs.evaluate(v),b=this.rhs.evaluate(v);if(h&&this.hasUntypedArgument){const E=yi(x),T=yi(b);if(E.kind!==T.kind||E.kind!=="string"&&E.kind!=="number")throw new Vn(`Expected arguments for "${o}" to be (string, string) or (number, number), but found (${E.kind}, ${T.kind}) instead.`)}if(this.collator&&!h&&this.hasUntypedArgument){const E=yi(x),T=yi(b);if(E.kind!=="string"||T.kind!=="string")return n(v,x,b)}return this.collator?a(v,x,b,this.collator.evaluate(v)):n(v,x,b)}eachChild(v){v(this.lhs),v(this.rhs),this.collator&&v(this.collator)}outputDefined(){return!0}}}const Bf=nl("==",function(o,n,a){return n===a},ud),Vf=nl("!=",function(o,n,a){return n!==a},function(o,n,a,h){return!ud(0,n,a,h)}),Uf=nl("<",function(o,n,a){return n",function(o,n,a){return n>a},function(o,n,a,h){return h.compare(n,a)>0}),qf=nl("<=",function(o,n,a){return n<=a},function(o,n,a,h){return h.compare(n,a)<=0}),jf=nl(">=",function(o,n,a){return n>=a},function(o,n,a,h){return h.compare(n,a)>=0});class vh{constructor(n,a,h,g,v){this.type=Ae,this.number=n,this.locale=a,this.currency=h,this.minFractionDigits=g,this.maxFractionDigits=v}static parse(n,a){if(n.length!==3)return a.error("Expected two arguments.");const h=a.parse(n[1],1,Zt);if(!h)return null;const g=n[2];if(typeof g!="object"||Array.isArray(g))return a.error("NumberFormat options argument must be an object.");let v=null;if(g.locale&&(v=a.parse(g.locale,1,Ae),!v))return null;let x=null;if(g.currency&&(x=a.parse(g.currency,1,Ae),!x))return null;let b=null;if(g["min-fraction-digits"]&&(b=a.parse(g["min-fraction-digits"],1,Zt),!b))return null;let E=null;return g["max-fraction-digits"]&&(E=a.parse(g["max-fraction-digits"],1,Zt),!E)?null:new vh(h,v,x,b,E)}evaluate(n){return new Intl.NumberFormat(this.locale?this.locale.evaluate(n):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(n):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(n):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(n):void 0}).format(this.number.evaluate(n))}eachChild(n){n(this.number),this.locale&&n(this.locale),this.currency&&n(this.currency),this.minFractionDigits&&n(this.minFractionDigits),this.maxFractionDigits&&n(this.maxFractionDigits)}outputDefined(){return!1}}class Qu{constructor(n){this.type=Ii,this.sections=n}static parse(n,a){if(n.length<2)return a.error("Expected at least one argument.");const h=n[1];if(!Array.isArray(h)&&typeof h=="object")return a.error("First argument must be an image or text section.");const g=[];let v=!1;for(let x=1;x<=n.length-1;++x){const b=n[x];if(v&&typeof b=="object"&&!Array.isArray(b)){v=!1;let E=null;if(b["font-scale"]&&(E=a.parse(b["font-scale"],1,Zt),!E))return null;let T=null;if(b["text-font"]&&(T=a.parse(b["text-font"],1,q(Ae)),!T))return null;let A=null;if(b["text-color"]&&(A=a.parse(b["text-color"],1,gi),!A))return null;const M=g[g.length-1];M.scale=E,M.font=T,M.textColor=A}else{const E=a.parse(n[x],1,we);if(!E)return null;const T=E.type.kind;if(T!=="string"&&T!=="value"&&T!=="null"&&T!=="resolvedImage")return a.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");v=!0,g.push({content:E,scale:null,font:null,textColor:null})}}return new Qu(g)}evaluate(n){return new Ur(this.sections.map(a=>{const h=a.content.evaluate(n);return yi(h)===z?new fh("",h,null,null,null):new fh(Ul(h),null,a.scale?a.scale.evaluate(n):null,a.font?a.font.evaluate(n).join(","):null,a.textColor?a.textColor.evaluate(n):null)}))}eachChild(n){for(const a of this.sections)n(a.content),a.scale&&n(a.scale),a.font&&n(a.font),a.textColor&&n(a.textColor)}outputDefined(){return!1}}class xh{constructor(n){this.type=z,this.input=n}static parse(n,a){if(n.length!==2)return a.error("Expected two arguments.");const h=a.parse(n[1],1,Ae);return h?new xh(h):a.error("No image name provided.")}evaluate(n){const a=this.input.evaluate(n),h=so.fromString(a);return h&&n.availableImages&&(h.available=n.availableImages.indexOf(a)>-1),h}eachChild(n){n(this.input)}outputDefined(){return!1}}class bh{constructor(n){this.type=Zt,this.input=n}static parse(n,a){if(n.length!==2)return a.error(`Expected 1 argument, but found ${n.length-1} instead.`);const h=a.parse(n[1],1);return h?h.type.kind!=="array"&&h.type.kind!=="string"&&h.type.kind!=="value"?a.error(`Expected argument of type string or array, but found ${H(h.type)} instead.`):new bh(h):null}evaluate(n){const a=this.input.evaluate(n);if(typeof a=="string"||Array.isArray(a))return a.length;throw new Vn(`Expected value to be of type string or array, but found ${H(yi(a))} instead.`)}eachChild(n){n(this.input)}outputDefined(){return!1}}const il={"==":Bf,"!=":Vf,">":Gf,"<":Uf,">=":jf,"<=":qf,array:Gr,at:mh,boolean:Gr,case:yh,coalesce:Xu,collator:el,format:Qu,image:xh,in:gh,"index-of":Ku,interpolate:$i,"interpolate-hcl":$i,"interpolate-lab":$i,length:bh,let:Yu,literal:js,match:_h,number:Gr,"number-format":vh,object:Gr,slice:Ju,step:Xl,string:Gr,"to-boolean":Xo,"to-color":Xo,"to-number":Xo,"to-string":Xo,var:Zu,within:ga};function cd(o,[n,a,h,g]){n=n.evaluate(o),a=a.evaluate(o),h=h.evaluate(o);const v=g?g.evaluate(o):1,x=tl(n,a,h,v);if(x)throw new Vn(x);return new cn(n/255,a/255,h/255,v,!1)}function hd(o,n){return o in n}function wh(o,n){const a=n[o];return a===void 0?null:a}function ya(o){return{type:o}}function pd(o){return{result:"success",value:o}}function rl(o){return{result:"error",value:o}}function ol(o){return o["property-type"]==="data-driven"||o["property-type"]==="cross-faded-data-driven"}function dd(o){return!!o.expression&&o.expression.parameters.indexOf("zoom")>-1}function Ih(o){return!!o.expression&&o.expression.interpolated}function Xe(o){return o instanceof Number?"number":o instanceof String?"string":o instanceof Boolean?"boolean":Array.isArray(o)?"array":o===null?"null":typeof o}function $u(o){return typeof o=="object"&&o!==null&&!Array.isArray(o)}function Zf(o){return o}function fd(o,n){const a=n.type==="color",h=o.stops&&typeof o.stops[0][0]=="object",g=h||!(h||o.property!==void 0),v=o.type||(Ih(n)?"exponential":"interval");if(a||n.type==="padding"){const A=a?cn.parse:Cr.parse;(o=Zo({},o)).stops&&(o.stops=o.stops.map(M=>[M[0],A(M[1])])),o.default=A(o.default?o.default:n.default)}if(o.colorSpace&&(x=o.colorSpace)!=="rgb"&&x!=="hcl"&&x!=="lab")throw new Error(`Unknown color space: "${o.colorSpace}"`);var x;let b,E,T;if(v==="exponential")b=je;else if(v==="interval")b=Hf;else if(v==="categorical"){b=ui,E=Object.create(null);for(const A of o.stops)E[A[0]]=A[1];T=typeof o.stops[0][0]}else{if(v!=="identity")throw new Error(`Unknown function type "${v}"`);b=Eh}if(h){const A={},M=[];for(let G=0;GG[0]),evaluate:({zoom:G},Z)=>je({stops:O,base:o.base},n,G).evaluate(G,Z)}}if(g){const A=v==="exponential"?{name:"exponential",base:o.base!==void 0?o.base:1}:null;return{kind:"camera",interpolationType:A,interpolationFactor:$i.interpolationFactor.bind(void 0,A),zoomStops:o.stops.map(M=>M[0]),evaluate:({zoom:M})=>b(o,n,M,E,T)}}return{kind:"source",evaluate(A,M){const O=M&&M.properties?M.properties[o.property]:void 0;return O===void 0?Yl(o.default,n.default):b(o,n,O,E,T)}}}function Yl(o,n,a){return o!==void 0?o:n!==void 0?n:a!==void 0?a:void 0}function ui(o,n,a,h,g){return Yl(typeof a===g?h[a]:void 0,o.default,n.default)}function Hf(o,n,a){if(Xe(a)!=="number")return Yl(o.default,n.default);const h=o.stops.length;if(h===1||a<=o.stops[0][0])return o.stops[0][1];if(a>=o.stops[h-1][0])return o.stops[h-1][1];const g=Wl(o.stops.map(v=>v[0]),a);return o.stops[g][1]}function je(o,n,a){const h=o.base!==void 0?o.base:1;if(Xe(a)!=="number")return Yl(o.default,n.default);const g=o.stops.length;if(g===1||a<=o.stops[0][0])return o.stops[0][1];if(a>=o.stops[g-1][0])return o.stops[g-1][1];const v=Wl(o.stops.map(A=>A[0]),a),x=function(A,M,O,V){const G=V-O,Z=A-O;return G===0?0:M===1?Z/G:(Math.pow(M,Z)-1)/(Math.pow(M,G)-1)}(a,h,o.stops[v][0],o.stops[v+1][0]),b=o.stops[v][1],E=o.stops[v+1][1],T=pr[n.type]||Zf;return typeof b.evaluate=="function"?{evaluate(...A){const M=b.evaluate.apply(void 0,A),O=E.evaluate.apply(void 0,A);if(M!==void 0&&O!==void 0)return T(M,O,x,o.colorSpace)}}:T(b,E,x,o.colorSpace)}function Eh(o,n,a){switch(n.type){case"color":a=cn.parse(a);break;case"formatted":a=Ur.fromString(a.toString());break;case"resolvedImage":a=so.fromString(a.toString());break;case"padding":a=Cr.parse(a);break;default:Xe(a)===n.type||n.type==="enum"&&n.values[a]||(a=void 0)}return Yl(a,o.default,n.default)}qr.register(il,{error:[{kind:"error"},[Ae],(o,[n])=>{throw new Vn(n.evaluate(o))}],typeof:[Ae,[we],(o,[n])=>H(yi(n.evaluate(o)))],"to-rgba":[q(Zt,4),[gi],(o,[n])=>{const[a,h,g,v]=n.evaluate(o).rgb;return[255*a,255*h,255*g,v]}],rgb:[gi,[Zt,Zt,Zt],cd],rgba:[gi,[Zt,Zt,Zt,Zt],cd],has:{type:Te,overloads:[[[Ae],(o,[n])=>hd(n.evaluate(o),o.properties())],[[Ae,Ho],(o,[n,a])=>hd(n.evaluate(o),a.evaluate(o))]]},get:{type:we,overloads:[[[Ae],(o,[n])=>wh(n.evaluate(o),o.properties())],[[Ae,Ho],(o,[n,a])=>wh(n.evaluate(o),a.evaluate(o))]]},"feature-state":[we,[Ae],(o,[n])=>wh(n.evaluate(o),o.featureState||{})],properties:[Ho,[],o=>o.properties()],"geometry-type":[Ae,[],o=>o.geometryType()],id:[we,[],o=>o.id()],zoom:[Zt,[],o=>o.globals.zoom],"heatmap-density":[Zt,[],o=>o.globals.heatmapDensity||0],"line-progress":[Zt,[],o=>o.globals.lineProgress||0],accumulated:[we,[],o=>o.globals.accumulated===void 0?null:o.globals.accumulated],"+":[Zt,ya(Zt),(o,n)=>{let a=0;for(const h of n)a+=h.evaluate(o);return a}],"*":[Zt,ya(Zt),(o,n)=>{let a=1;for(const h of n)a*=h.evaluate(o);return a}],"-":{type:Zt,overloads:[[[Zt,Zt],(o,[n,a])=>n.evaluate(o)-a.evaluate(o)],[[Zt],(o,[n])=>-n.evaluate(o)]]},"/":[Zt,[Zt,Zt],(o,[n,a])=>n.evaluate(o)/a.evaluate(o)],"%":[Zt,[Zt,Zt],(o,[n,a])=>n.evaluate(o)%a.evaluate(o)],ln2:[Zt,[],()=>Math.LN2],pi:[Zt,[],()=>Math.PI],e:[Zt,[],()=>Math.E],"^":[Zt,[Zt,Zt],(o,[n,a])=>Math.pow(n.evaluate(o),a.evaluate(o))],sqrt:[Zt,[Zt],(o,[n])=>Math.sqrt(n.evaluate(o))],log10:[Zt,[Zt],(o,[n])=>Math.log(n.evaluate(o))/Math.LN10],ln:[Zt,[Zt],(o,[n])=>Math.log(n.evaluate(o))],log2:[Zt,[Zt],(o,[n])=>Math.log(n.evaluate(o))/Math.LN2],sin:[Zt,[Zt],(o,[n])=>Math.sin(n.evaluate(o))],cos:[Zt,[Zt],(o,[n])=>Math.cos(n.evaluate(o))],tan:[Zt,[Zt],(o,[n])=>Math.tan(n.evaluate(o))],asin:[Zt,[Zt],(o,[n])=>Math.asin(n.evaluate(o))],acos:[Zt,[Zt],(o,[n])=>Math.acos(n.evaluate(o))],atan:[Zt,[Zt],(o,[n])=>Math.atan(n.evaluate(o))],min:[Zt,ya(Zt),(o,n)=>Math.min(...n.map(a=>a.evaluate(o)))],max:[Zt,ya(Zt),(o,n)=>Math.max(...n.map(a=>a.evaluate(o)))],abs:[Zt,[Zt],(o,[n])=>Math.abs(n.evaluate(o))],round:[Zt,[Zt],(o,[n])=>{const a=n.evaluate(o);return a<0?-Math.round(-a):Math.round(a)}],floor:[Zt,[Zt],(o,[n])=>Math.floor(n.evaluate(o))],ceil:[Zt,[Zt],(o,[n])=>Math.ceil(n.evaluate(o))],"filter-==":[Te,[Ae,we],(o,[n,a])=>o.properties()[n.value]===a.value],"filter-id-==":[Te,[we],(o,[n])=>o.id()===n.value],"filter-type-==":[Te,[Ae],(o,[n])=>o.geometryType()===n.value],"filter-<":[Te,[Ae,we],(o,[n,a])=>{const h=o.properties()[n.value],g=a.value;return typeof h==typeof g&&h{const a=o.id(),h=n.value;return typeof a==typeof h&&a":[Te,[Ae,we],(o,[n,a])=>{const h=o.properties()[n.value],g=a.value;return typeof h==typeof g&&h>g}],"filter-id->":[Te,[we],(o,[n])=>{const a=o.id(),h=n.value;return typeof a==typeof h&&a>h}],"filter-<=":[Te,[Ae,we],(o,[n,a])=>{const h=o.properties()[n.value],g=a.value;return typeof h==typeof g&&h<=g}],"filter-id-<=":[Te,[we],(o,[n])=>{const a=o.id(),h=n.value;return typeof a==typeof h&&a<=h}],"filter->=":[Te,[Ae,we],(o,[n,a])=>{const h=o.properties()[n.value],g=a.value;return typeof h==typeof g&&h>=g}],"filter-id->=":[Te,[we],(o,[n])=>{const a=o.id(),h=n.value;return typeof a==typeof h&&a>=h}],"filter-has":[Te,[we],(o,[n])=>n.value in o.properties()],"filter-has-id":[Te,[],o=>o.id()!==null&&o.id()!==void 0],"filter-type-in":[Te,[q(Ae)],(o,[n])=>n.value.indexOf(o.geometryType())>=0],"filter-id-in":[Te,[q(we)],(o,[n])=>n.value.indexOf(o.id())>=0],"filter-in-small":[Te,[Ae,q(we)],(o,[n,a])=>a.value.indexOf(o.properties()[n.value])>=0],"filter-in-large":[Te,[Ae,q(we)],(o,[n,a])=>function(h,g,v,x){for(;v<=x;){const b=v+x>>1;if(g[b]===h)return!0;g[b]>h?x=b-1:v=b+1}return!1}(o.properties()[n.value],a.value,0,a.value.length-1)],all:{type:Te,overloads:[[[Te,Te],(o,[n,a])=>n.evaluate(o)&&a.evaluate(o)],[ya(Te),(o,n)=>{for(const a of n)if(!a.evaluate(o))return!1;return!0}]]},any:{type:Te,overloads:[[[Te,Te],(o,[n,a])=>n.evaluate(o)||a.evaluate(o)],[ya(Te),(o,n)=>{for(const a of n)if(a.evaluate(o))return!0;return!1}]]},"!":[Te,[Te],(o,[n])=>!n.evaluate(o)],"is-supported-script":[Te,[Ae],(o,[n])=>{const a=o.globals&&o.globals.isSupportedScript;return!a||a(n.evaluate(o))}],upcase:[Ae,[Ae],(o,[n])=>n.evaluate(o).toUpperCase()],downcase:[Ae,[Ae],(o,[n])=>n.evaluate(o).toLowerCase()],concat:[Ae,ya(we),(o,n)=>n.map(a=>Ul(a.evaluate(o))).join("")],"resolved-locale":[Ae,[ma],(o,[n])=>n.evaluate(o).resolvedLocale()]});class Tn{constructor(n,a){var h;this.expression=n,this._warningHistory={},this._evaluator=new hn,this._defaultValue=a?(h=a).type==="color"&&$u(h.default)?new cn(0,0,0,0):h.type==="color"?cn.parse(h.default)||null:h.type==="padding"?Cr.parse(h.default)||null:h.type==="variableAnchorOffsetCollection"?oo.parse(h.default)||null:h.default===void 0?null:h.default:null,this._enumValues=a&&a.type==="enum"?a.values:null}evaluateWithoutErrorHandling(n,a,h,g,v,x){return this._evaluator.globals=n,this._evaluator.feature=a,this._evaluator.featureState=h,this._evaluator.canonical=g,this._evaluator.availableImages=v||null,this._evaluator.formattedSection=x,this.expression.evaluate(this._evaluator)}evaluate(n,a,h,g,v,x){this._evaluator.globals=n,this._evaluator.feature=a||null,this._evaluator.featureState=h||null,this._evaluator.canonical=g,this._evaluator.availableImages=v||null,this._evaluator.formattedSection=x||null;try{const b=this.expression.evaluate(this._evaluator);if(b==null||typeof b=="number"&&b!=b)return this._defaultValue;if(this._enumValues&&!(b in this._enumValues))throw new Vn(`Expected value to be one of ${Object.keys(this._enumValues).map(E=>JSON.stringify(E)).join(", ")}, but found ${JSON.stringify(b)} instead.`);return b}catch(b){return this._warningHistory[b.message]||(this._warningHistory[b.message]=!0,typeof console<"u"&&console.warn(b.message)),this._defaultValue}}}function wn(o){return Array.isArray(o)&&o.length>0&&typeof o[0]=="string"&&o[0]in il}function va(o,n){const a=new Vu(il,jl,[],n?function(g){const v={color:gi,string:Ae,number:Zt,enum:Ae,boolean:Te,formatted:Ii,padding:K,resolvedImage:z,variableAnchorOffsetCollection:F};return g.type==="array"?q(v[g.value]||we,g.length):v[g.type]}(n):void 0),h=a.parse(o,void 0,void 0,void 0,n&&n.type==="string"?{typeAnnotation:"coerce"}:void 0);return h?pd(new Tn(h,n)):rl(a.errors)}class tc{constructor(n,a){this.kind=n,this._styleExpression=a,this.isStateDependent=n!=="constant"&&!Zl(a.expression)}evaluateWithoutErrorHandling(n,a,h,g,v,x){return this._styleExpression.evaluateWithoutErrorHandling(n,a,h,g,v,x)}evaluate(n,a,h,g,v,x){return this._styleExpression.evaluate(n,a,h,g,v,x)}}class Sh{constructor(n,a,h,g){this.kind=n,this.zoomStops=h,this._styleExpression=a,this.isStateDependent=n!=="camera"&&!Zl(a.expression),this.interpolationType=g}evaluateWithoutErrorHandling(n,a,h,g,v,x){return this._styleExpression.evaluateWithoutErrorHandling(n,a,h,g,v,x)}evaluate(n,a,h,g,v,x){return this._styleExpression.evaluate(n,a,h,g,v,x)}interpolationFactor(n,a,h){return this.interpolationType?$i.interpolationFactor(this.interpolationType,n,a,h):0}}function md(o,n){const a=va(o,n);if(a.result==="error")return a;const h=a.value.expression,g=Hu(h);if(!g&&!ol(n))return rl([new Vr("","data expressions not supported")]);const v=Hl(h,["zoom"]);if(!v&&!dd(n))return rl([new Vr("","zoom expressions not supported")]);const x=nc(h);return x||v?x instanceof Vr?rl([x]):x instanceof $i&&!Ih(n)?rl([new Vr("",'"interpolate" expressions cannot be used with this property')]):pd(x?new Sh(g?"camera":"composite",a.value,x.labels,x instanceof $i?x.interpolation:void 0):new tc(g?"constant":"source",a.value)):rl([new Vr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ec{constructor(n,a){this._parameters=n,this._specification=a,Zo(this,fd(this._parameters,this._specification))}static deserialize(n){return new ec(n._parameters,n._specification)}static serialize(n){return{_parameters:n._parameters,_specification:n._specification}}}function nc(o){let n=null;if(o instanceof Yu)n=nc(o.result);else if(o instanceof Xu){for(const a of o.args)if(n=nc(a),n)break}else(o instanceof Xl||o instanceof $i)&&o.input instanceof qr&&o.input.name==="zoom"&&(n=o);return n instanceof Vr||o.eachChild(a=>{const h=nc(a);h instanceof Vr?n=h:!n&&h?n=new Vr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):n&&h&&n!==h&&(n=new Vr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),n}function ic(o){if(o===!0||o===!1)return!0;if(!Array.isArray(o)||o.length===0)return!1;switch(o[0]){case"has":return o.length>=2&&o[1]!=="$id"&&o[1]!=="$type";case"in":return o.length>=3&&(typeof o[1]!="string"||Array.isArray(o[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return o.length!==3||Array.isArray(o[1])||Array.isArray(o[2]);case"any":case"all":for(const n of o.slice(1))if(!ic(n)&&typeof n!="boolean")return!1;return!0;default:return!0}}const gd={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function rc(o){if(o==null)return{filter:()=>!0,needGeometry:!1};ic(o)||(o=sc(o));const n=va(o,gd);if(n.result==="error")throw new Error(n.value.map(a=>`${a.key}: ${a.message}`).join(", "));return{filter:(a,h,g)=>n.value.evaluate(a,h,{},g),needGeometry:oc(o)}}function _d(o,n){return on?1:0}function oc(o){if(!Array.isArray(o))return!1;if(o[0]==="within")return!0;for(let n=1;n"||n==="<="||n===">="?Ch(o[1],o[2],n):n==="any"?(a=o.slice(1),["any"].concat(a.map(sc))):n==="all"?["all"].concat(o.slice(1).map(sc)):n==="none"?["all"].concat(o.slice(1).map(sc).map(ac)):n==="in"?yd(o[1],o.slice(2)):n==="!in"?ac(yd(o[1],o.slice(2))):n==="has"?vd(o[1]):n==="!has"?ac(vd(o[1])):n!=="within"||o;var a}function Ch(o,n,a){switch(o){case"$type":return[`filter-type-${a}`,n];case"$id":return[`filter-id-${a}`,n];default:return[`filter-${a}`,o,n]}}function yd(o,n){if(n.length===0)return!1;switch(o){case"$type":return["filter-type-in",["literal",n]];case"$id":return["filter-id-in",["literal",n]];default:return n.length>200&&!n.some(a=>typeof a!=typeof n[0])?["filter-in-large",o,["literal",n.sort(_d)]]:["filter-in-small",o,["literal",n]]}}function vd(o){switch(o){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",o]}}function ac(o){return["!",o]}function Th(o){const n=typeof o;if(n==="number"||n==="boolean"||n==="string"||o==null)return JSON.stringify(o);if(Array.isArray(o)){let g="[";for(const v of o)g+=`${Th(v)},`;return`${g}]`}const a=Object.keys(o).sort();let h="{";for(let g=0;gh.maximum?[new Ot(n,a,`${a} is greater than the maximum value ${h.maximum}`)]:[]}function bd(o){const n=o.valueSpec,a=Yn(o.value.type);let h,g,v,x={};const b=a!=="categorical"&&o.value.property===void 0,E=!b,T=Xe(o.value.stops)==="array"&&Xe(o.value.stops[0])==="array"&&Xe(o.value.stops[0][0])==="object",A=dr({key:o.key,value:o.value,valueSpec:o.styleSpec.function,validateSpec:o.validateSpec,style:o.style,styleSpec:o.styleSpec,objectElementValidators:{stops:function(V){if(a==="identity")return[new Ot(V.key,V.value,'identity function may not have a "stops" property')];let G=[];const Z=V.value;return G=G.concat(Lh({key:V.key,value:Z,valueSpec:V.valueSpec,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:M})),Xe(Z)==="array"&&Z.length===0&&G.push(new Ot(V.key,Z,"array must have at least one stop")),G},default:function(V){return V.validateSpec({key:V.key,value:V.value,valueSpec:n,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec})}}});return a==="identity"&&b&&A.push(new Ot(o.key,o.value,'missing required property "property"')),a==="identity"||o.value.stops||A.push(new Ot(o.key,o.value,'missing required property "stops"')),a==="exponential"&&o.valueSpec.expression&&!Ih(o.valueSpec)&&A.push(new Ot(o.key,o.value,"exponential functions not supported")),o.styleSpec.$version>=8&&(E&&!ol(o.valueSpec)?A.push(new Ot(o.key,o.value,"property functions not supported")):b&&!dd(o.valueSpec)&&A.push(new Ot(o.key,o.value,"zoom functions not supported"))),a!=="categorical"&&!T||o.value.property!==void 0||A.push(new Ot(o.key,o.value,'"property" property is required')),A;function M(V){let G=[];const Z=V.value,Y=V.key;if(Xe(Z)!=="array")return[new Ot(Y,Z,`array expected, ${Xe(Z)} found`)];if(Z.length!==2)return[new Ot(Y,Z,`array length 2 expected, length ${Z.length} found`)];if(T){if(Xe(Z[0])!=="object")return[new Ot(Y,Z,`object expected, ${Xe(Z[0])} found`)];if(Z[0].zoom===void 0)return[new Ot(Y,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new Ot(Y,Z,"object stop key must have value")];if(v&&v>Yn(Z[0].zoom))return[new Ot(Y,Z[0].zoom,"stop zoom values must appear in ascending order")];Yn(Z[0].zoom)!==v&&(v=Yn(Z[0].zoom),g=void 0,x={}),G=G.concat(dr({key:`${Y}[0]`,value:Z[0],valueSpec:{zoom:{}},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{zoom:lc,value:O}}))}else G=G.concat(O({key:`${Y}[0]`,value:Z[0],valueSpec:{},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec},Z));return wn(Hs(Z[1]))?G.concat([new Ot(`${Y}[1]`,Z[1],"expressions are not allowed in function stops.")]):G.concat(V.validateSpec({key:`${Y}[1]`,value:Z[1],valueSpec:n,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec}))}function O(V,G){const Z=Xe(V.value),Y=Yn(V.value),$=V.value!==null?V.value:G;if(h){if(Z!==h)return[new Ot(V.key,$,`${Z} stop domain type must match previous stop domain type ${h}`)]}else h=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean")return[new Ot(V.key,$,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&a!=="categorical"){let ut=`number expected, ${Z} found`;return ol(n)&&a===void 0&&(ut+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ot(V.key,$,ut)]}return a!=="categorical"||Z!=="number"||isFinite(Y)&&Math.floor(Y)===Y?a!=="categorical"&&Z==="number"&&g!==void 0&&Ynew Ot(`${o.key}${h.key}`,o.value,h.message));const a=n.value.expression||n.value._styleExpression.expression;if(o.expressionContext==="property"&&o.propertyKey==="text-font"&&!a.outputDefined())return[new Ot(o.key,o.value,`Invalid data expression for "${o.propertyKey}". Output values must be contained as literals within the expression.`)];if(o.expressionContext==="property"&&o.propertyType==="layout"&&!Zl(a))return[new Ot(o.key,o.value,'"feature-state" data expressions are not supported with layout properties.')];if(o.expressionContext==="filter"&&!Zl(a))return[new Ot(o.key,o.value,'"feature-state" data expressions are not supported with filters.')];if(o.expressionContext&&o.expressionContext.indexOf("cluster")===0){if(!Hl(a,["zoom","feature-state"]))return[new Ot(o.key,o.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(o.expressionContext==="cluster-initial"&&!Hu(a))return[new Ot(o.key,o.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Xs(o){const n=o.key,a=o.value,h=o.valueSpec,g=[];return Array.isArray(h.values)?h.values.indexOf(Yn(a))===-1&&g.push(new Ot(n,a,`expected one of [${h.values.join(", ")}], ${JSON.stringify(a)} found`)):Object.keys(h.values).indexOf(Yn(a))===-1&&g.push(new Ot(n,a,`expected one of [${Object.keys(h.values).join(", ")}], ${JSON.stringify(a)} found`)),g}function sl(o){return ic(Hs(o.value))?Ws(Zo({},o,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ph(o)}function Ph(o){const n=o.value,a=o.key;if(Xe(n)!=="array")return[new Ot(a,n,`array expected, ${Xe(n)} found`)];const h=o.styleSpec;let g,v=[];if(n.length<1)return[new Ot(a,n,"filter array must have at least 1 element")];switch(v=v.concat(Xs({key:`${a}[0]`,value:n[0],valueSpec:h.filter_operator,style:o.style,styleSpec:o.styleSpec})),Yn(n[0])){case"<":case"<=":case">":case">=":n.length>=2&&Yn(n[1])==="$type"&&v.push(new Ot(a,n,`"$type" cannot be use with operator "${n[0]}"`));case"==":case"!=":n.length!==3&&v.push(new Ot(a,n,`filter array for operator "${n[0]}" must have 3 elements`));case"in":case"!in":n.length>=2&&(g=Xe(n[1]),g!=="string"&&v.push(new Ot(`${a}[1]`,n[1],`string expected, ${g} found`)));for(let x=2;xqe(e,"hovered",o)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){A(e.$$.fragment)},m(i,a){J(e,i,a),n=!0},p(i,[a]){const r={};a&2&&(r.id=i[1]),a&4&&(r.source=i[2]),a&8&&(r.sourceLayer=i[3]),a&16&&(r.beforeId=i[4]),a&32&&(r.beforeLayerType=i[5]),a&64&&(r.paint=i[6]),a&128&&(r.layout=i[7]),a&256&&(r.filter=i[8]),a&512&&(r.applyToClusters=i[9]),a&1024&&(r.minzoom=i[10]),a&2048&&(r.maxzoom=i[11]),a&4096&&(r.hoverCursor=i[12]),a&8192&&(r.manageHoverState=i[13]),a&16384&&(r.eventsIfTopMost=i[14]),a&32768&&(r.interactive=i[15]),a&16777216&&(r.$$scope={dirty:a,ctx:i}),!l&&a&1&&(l=!0,r.hovered=i[0],Be(()=>l=!1)),e.$set(r)},i(i){n||(D(e.$$.fragment,i),n=!0)},o(i){F(e.$$.fragment,i),n=!1},d(i){K(e,i)}}}function Rt(t,e,l){let{$$slots:n={},$$scope:o}=e,{id:s=ct("circle")}=e,{source:i=void 0}=e,{sourceLayer:a=void 0}=e,{beforeId:r=void 0}=e,{beforeLayerType:_=void 0}=e,{paint:p}=e,{layout:v=void 0}=e,{filter:S=void 0}=e,{applyToClusters:w=void 0}=e,{minzoom:C=void 0}=e,{maxzoom:I=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:f=!1}=e,{hovered:m=null}=e,{eventsIfTopMost:B=!1}=e,{interactive:H=!0}=e;function q(u){m=u,l(0,m)}function b(u){W.call(this,t,u)}function M(u){W.call(this,t,u)}function N(u){W.call(this,t,u)}function g(u){W.call(this,t,u)}function z(u){W.call(this,t,u)}function oe(u){W.call(this,t,u)}return t.$$set=u=>{"id"in u&&l(1,s=u.id),"source"in u&&l(2,i=u.source),"sourceLayer"in u&&l(3,a=u.sourceLayer),"beforeId"in u&&l(4,r=u.beforeId),"beforeLayerType"in u&&l(5,_=u.beforeLayerType),"paint"in u&&l(6,p=u.paint),"layout"in u&&l(7,v=u.layout),"filter"in u&&l(8,S=u.filter),"applyToClusters"in u&&l(9,w=u.applyToClusters),"minzoom"in u&&l(10,C=u.minzoom),"maxzoom"in u&&l(11,I=u.maxzoom),"hoverCursor"in u&&l(12,R=u.hoverCursor),"manageHoverState"in u&&l(13,f=u.manageHoverState),"hovered"in u&&l(0,m=u.hovered),"eventsIfTopMost"in u&&l(14,B=u.eventsIfTopMost),"interactive"in u&&l(15,H=u.interactive),"$$scope"in u&&l(24,o=u.$$scope)},[m,s,i,a,r,_,p,v,S,w,C,I,R,f,B,H,n,q,b,M,N,g,z,oe,o]}class nt extends ce{constructor(e){super(),_e(this,e,Rt,Ot,me,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}function Ht(t){let e;const l=t[16].default,n=_t(l,t,t[24],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s&16777216)&&mt(n,l,o,o[24],e?bt(l,o[24],s,null):dt(o[24]),null)},i(o){e||(D(n,o),e=!0)},o(o){F(n,o),e=!1},d(o){n&&n.d(o)}}}function Nt(t){let e,l,n;function o(i){t[17](i)}let s={id:t[1],type:"symbol",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[Ht]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ft({props:s}),Ne.push(()=>qe(e,"hovered",o)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){A(e.$$.fragment)},m(i,a){J(e,i,a),n=!0},p(i,[a]){const r={};a&2&&(r.id=i[1]),a&4&&(r.source=i[2]),a&8&&(r.sourceLayer=i[3]),a&16&&(r.beforeId=i[4]),a&32&&(r.beforeLayerType=i[5]),a&64&&(r.paint=i[6]),a&128&&(r.layout=i[7]),a&256&&(r.filter=i[8]),a&512&&(r.applyToClusters=i[9]),a&1024&&(r.minzoom=i[10]),a&2048&&(r.maxzoom=i[11]),a&4096&&(r.hoverCursor=i[12]),a&8192&&(r.manageHoverState=i[13]),a&16384&&(r.eventsIfTopMost=i[14]),a&32768&&(r.interactive=i[15]),a&16777216&&(r.$$scope={dirty:a,ctx:i}),!l&&a&1&&(l=!0,r.hovered=i[0],Be(()=>l=!1)),e.$set(r)},i(i){n||(D(e.$$.fragment,i),n=!0)},o(i){F(e.$$.fragment,i),n=!1},d(i){K(e,i)}}}function qt(t,e,l){let{$$slots:n={},$$scope:o}=e,{id:s=ct("symbol")}=e,{source:i=void 0}=e,{sourceLayer:a=void 0}=e,{beforeId:r=void 0}=e,{beforeLayerType:_=void 0}=e,{paint:p=void 0}=e,{layout:v=void 0}=e,{filter:S=void 0}=e,{applyToClusters:w=void 0}=e,{minzoom:C=void 0}=e,{maxzoom:I=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:f=!1}=e,{hovered:m=null}=e,{eventsIfTopMost:B=!1}=e,{interactive:H=!0}=e;function q(u){m=u,l(0,m)}function b(u){W.call(this,t,u)}function M(u){W.call(this,t,u)}function N(u){W.call(this,t,u)}function g(u){W.call(this,t,u)}function z(u){W.call(this,t,u)}function oe(u){W.call(this,t,u)}return t.$$set=u=>{"id"in u&&l(1,s=u.id),"source"in u&&l(2,i=u.source),"sourceLayer"in u&&l(3,a=u.sourceLayer),"beforeId"in u&&l(4,r=u.beforeId),"beforeLayerType"in u&&l(5,_=u.beforeLayerType),"paint"in u&&l(6,p=u.paint),"layout"in u&&l(7,v=u.layout),"filter"in u&&l(8,S=u.filter),"applyToClusters"in u&&l(9,w=u.applyToClusters),"minzoom"in u&&l(10,C=u.minzoom),"maxzoom"in u&&l(11,I=u.maxzoom),"hoverCursor"in u&&l(12,R=u.hoverCursor),"manageHoverState"in u&&l(13,f=u.manageHoverState),"hovered"in u&&l(0,m=u.hovered),"eventsIfTopMost"in u&&l(14,B=u.eventsIfTopMost),"interactive"in u&&l(15,H=u.interactive),"$$scope"in u&&l(24,o=u.$$scope)},[m,s,i,a,r,_,p,v,S,w,C,I,R,f,B,H,n,q,b,M,N,g,z,oe,o]}class Bt extends ce{constructor(e){super(),_e(this,e,qt,Nt,me,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}let Me=pe(!0),Oe=pe(!1),Re=pe(!1),He=pe(!1);function ot(t){let e,l;return e=new De({props:{$$slots:{default:[Dt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function it(t){let e,l,n,o=t[10].slope.toFixed(1)+"",s,i;return{c(){e=d("p"),l=L("Slope: "),n=d("b"),s=L(o),i=L("%")},m(a,r){y(a,e,r),c(e,l),c(e,n),c(n,s),c(n,i)},p(a,r){r&1024&&o!==(o=a[10].slope.toFixed(1)+"")&&X(s,o)},d(a){a&&k(e)}}}function st(t){let e,l,n,o=t[10].forward_cost+"",s;return{c(){e=d("p"),l=L("Cost forwards: "),n=d("b"),s=L(o)},m(i,a){y(i,e,a),c(e,l),c(e,n),c(n,s)},p(i,a){a&1024&&o!==(o=i[10].forward_cost+"")&&X(s,o)},d(i){i&&k(e)}}}function at(t){let e,l,n,o=t[10].backward_cost+"",s;return{c(){e=d("p"),l=L("Cost backwards: "),n=d("b"),s=L(o)},m(i,a){y(i,e,a),c(e,l),c(e,n),c(n,s)},p(i,a){a&1024&&o!==(o=i[10].backward_cost+"")&&X(s,o)},d(i){i&&k(e)}}}function Dt(t){let e,l,n=t[10].count.toFixed(1)+"",o,s,i,a,r,_=t[10].lts+"",p,v,S,w,C,I=t[10].nearby_amenities+"",R,f,m,B,H,q,b=t[10].slope&&it(t),M=t[10].forward_cost&&st(t),N=t[10].backward_cost&&at(t);return{c(){e=d("h2"),l=L("Count: "),o=L(n),s=T(),i=d("p"),a=L("LTS: "),r=d("b"),p=L(_),v=T(),S=d("p"),w=L("Nearby amenities: "),C=d("b"),R=L(I),f=T(),b&&b.c(),m=T(),M&&M.c(),B=T(),N&&N.c(),H=T(),q=d("p"),q.textContent="Click to open OSM"},m(g,z){y(g,e,z),c(e,l),c(e,o),y(g,s,z),y(g,i,z),c(i,a),c(i,r),c(r,p),y(g,v,z),y(g,S,z),c(S,w),c(S,C),c(C,R),y(g,f,z),b&&b.m(g,z),y(g,m,z),M&&M.m(g,z),y(g,B,z),N&&N.m(g,z),y(g,H,z),y(g,q,z)},p(g,z){z&1024&&n!==(n=g[10].count.toFixed(1)+"")&&X(o,n),z&1024&&_!==(_=g[10].lts+"")&&X(p,_),z&1024&&I!==(I=g[10].nearby_amenities+"")&&X(R,I),g[10].slope?b?b.p(g,z):(b=it(g),b.c(),b.m(m.parentNode,m)):b&&(b.d(1),b=null),g[10].forward_cost?M?M.p(g,z):(M=st(g),M.c(),M.m(B.parentNode,B)):M&&(M.d(1),M=null),g[10].backward_cost?N?N.p(g,z):(N=at(g),N.c(),N.m(H.parentNode,H)):N&&(N.d(1),N=null)},d(g){g&&(k(e),k(s),k(i),k(v),k(S),k(f),k(m),k(B),k(H),k(q)),b&&b.d(g),M&&M.d(g),N&&N.d(g)}}}function Ft(t){let e,l,n=t[2]&&ot(t);return{c(){n&&n.c(),e=pt()},m(o,s){n&&n.m(o,s),y(o,e,s),l=!0},p(o,s){o[2]?n?(n.p(o,s),s&4&&D(n,1)):(n=ot(o),n.c(),D(n,1),n.m(e.parentNode,e)):n&&(vt(),F(n,1,1,()=>{n=null}),yt())},i(o){l||(D(n),l=!0)},o(o){F(n),l=!1},d(o){o&&k(e),n&&n.d(o)}}}function Vt(t){let e=t[10].origin_count+"",l,n;return{c(){l=L(e),n=L(" routes start here")},m(o,s){y(o,l,s),y(o,n,s)},p(o,s){s&1024&&e!==(e=o[10].origin_count+"")&&X(l,e)},d(o){o&&(k(l),k(n))}}}function jt(t){let e,l;return e=new De({props:{$$slots:{default:[Vt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function Pt(t){let e=t[10].destination_count+"",l,n;return{c(){l=L(e),n=L(" routes end here")},m(o,s){y(o,l,s),y(o,n,s)},p(o,s){s&1024&&e!==(e=o[10].destination_count+"")&&X(l,e)},d(o){o&&(k(l),k(n))}}}function Et(t){let e,l;return e=new De({props:{$$slots:{default:[Pt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function Gt(t){let e,l,n,o,s,i,a,r;const _=[{id:"input-layer"},t[0],{filter:["==",["geometry-type"],"LineString"]},{manageHoverState:!0},{hoverCursor:t[2]?"pointer":void 0},{paint:{"line-width":t[3],"line-color":t[4]?t[9]:et,"line-opacity":tt(1,.5)}},{layout:{visibility:t[5]?"visible":"none"}},{beforeId:"Road labels"}];let p={$$slots:{default:[Ft]},$$scope:{ctx:t}};for(let f=0;f<_.length;f+=1)p=be(p,_[f]);e=new wt({props:p}),e.$on("click",t[8]);const v=[{id:"slope-arrows"},t[0],{filter:["all",["==",["geometry-type"],"LineString"],[">",["abs",["get","slope"]],3]]},{minzoom:12},{layout:{"icon-image":"chevron","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["<",["get","slope"],0],180,0],visibility:t[4]?"visible":"none"}}];let S={};for(let f=0;fl(4,s=w)),le(t,Me,w=>l(5,i=w)),le(t,Oe,w=>l(6,a=w)),le(t,Re,w=>l(7,r=w));let{sourceOverride:_={}}=e,{controls:p}=e;function v(w){if(!n)return;let C=w.detail.features[0].properties.way;window.open(`http://openstreetmap.org/way/${C}`,"_blank")}let S=Ct(["abs",["get","slope"]],gt,ht);return t.$$set=w=>{"sourceOverride"in w&&l(0,_=w.sourceOverride),"controls"in w&&l(1,p=w.controls)},t.$$.update=()=>{t.$$.dirty&2&&l(2,n=!p.streetviewOn),t.$$.dirty&2&&l(3,o=Wt(p.maxCount))},[_,p,n,o,s,i,a,r,v,S]}class el extends ce{constructor(e){super(),_e(this,e,At,Gt,me,{sourceOverride:0,controls:1})}}const{window:Jt}=St;function rt(t){let e,l,n,o,s,i,a,r,_,p;return r=Tt(t[6][0]),{c(){e=d("label"),l=d("input"),n=L(` +import{S as ce,i as _e,s as me,Z as ft,y as Ne,z as qe,c as A,a as J,B as Be,t as D,b as F,d as K,$ as ct,G as _t,N as mt,O as dt,Q as bt,a0 as W,a1 as pe,a2 as et,a3 as tt,a4 as be,a5 as wt,a6 as V,j as T,g as y,h as k,V as le,a7 as Ct,a8 as ht,a9 as gt,E as pt,v as vt,w as yt,aa as De,e as d,k as L,q as c,ab as X,f as j,u as P,n as Ie,x as Fe,ac as Lt,ad as St,ae as Tt,l as te,A as lt,X as ue,af as zt,ag as Z,ah as It}from"./Layout-cca6f705.js";function he(t,e){const l={},n={},o={$$scope:1};let s=t.length;for(;s--;){const i=t[s],a=e[s];if(a){for(const r in i)r in a||(n[r]=1);for(const r in a)o[r]||(l[r]=a[r],o[r]=1);t[s]=a}else for(const r in i)o[r]=1}for(const i in n)i in l||(l[i]=void 0);return l}function ge(t){return typeof t=="object"&&t!==null?t:{}}function Mt(t){let e;const l=t[16].default,n=_t(l,t,t[24],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s&16777216)&&mt(n,l,o,o[24],e?bt(l,o[24],s,null):dt(o[24]),null)},i(o){e||(D(n,o),e=!0)},o(o){F(n,o),e=!1},d(o){n&&n.d(o)}}}function Ot(t){let e,l,n;function o(i){t[17](i)}let s={id:t[1],type:"circle",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[Mt]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ft({props:s}),Ne.push(()=>qe(e,"hovered",o)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){A(e.$$.fragment)},m(i,a){J(e,i,a),n=!0},p(i,[a]){const r={};a&2&&(r.id=i[1]),a&4&&(r.source=i[2]),a&8&&(r.sourceLayer=i[3]),a&16&&(r.beforeId=i[4]),a&32&&(r.beforeLayerType=i[5]),a&64&&(r.paint=i[6]),a&128&&(r.layout=i[7]),a&256&&(r.filter=i[8]),a&512&&(r.applyToClusters=i[9]),a&1024&&(r.minzoom=i[10]),a&2048&&(r.maxzoom=i[11]),a&4096&&(r.hoverCursor=i[12]),a&8192&&(r.manageHoverState=i[13]),a&16384&&(r.eventsIfTopMost=i[14]),a&32768&&(r.interactive=i[15]),a&16777216&&(r.$$scope={dirty:a,ctx:i}),!l&&a&1&&(l=!0,r.hovered=i[0],Be(()=>l=!1)),e.$set(r)},i(i){n||(D(e.$$.fragment,i),n=!0)},o(i){F(e.$$.fragment,i),n=!1},d(i){K(e,i)}}}function Rt(t,e,l){let{$$slots:n={},$$scope:o}=e,{id:s=ct("circle")}=e,{source:i=void 0}=e,{sourceLayer:a=void 0}=e,{beforeId:r=void 0}=e,{beforeLayerType:_=void 0}=e,{paint:p}=e,{layout:v=void 0}=e,{filter:S=void 0}=e,{applyToClusters:w=void 0}=e,{minzoom:C=void 0}=e,{maxzoom:I=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:f=!1}=e,{hovered:m=null}=e,{eventsIfTopMost:B=!1}=e,{interactive:H=!0}=e;function q(u){m=u,l(0,m)}function b(u){W.call(this,t,u)}function M(u){W.call(this,t,u)}function N(u){W.call(this,t,u)}function g(u){W.call(this,t,u)}function z(u){W.call(this,t,u)}function oe(u){W.call(this,t,u)}return t.$$set=u=>{"id"in u&&l(1,s=u.id),"source"in u&&l(2,i=u.source),"sourceLayer"in u&&l(3,a=u.sourceLayer),"beforeId"in u&&l(4,r=u.beforeId),"beforeLayerType"in u&&l(5,_=u.beforeLayerType),"paint"in u&&l(6,p=u.paint),"layout"in u&&l(7,v=u.layout),"filter"in u&&l(8,S=u.filter),"applyToClusters"in u&&l(9,w=u.applyToClusters),"minzoom"in u&&l(10,C=u.minzoom),"maxzoom"in u&&l(11,I=u.maxzoom),"hoverCursor"in u&&l(12,R=u.hoverCursor),"manageHoverState"in u&&l(13,f=u.manageHoverState),"hovered"in u&&l(0,m=u.hovered),"eventsIfTopMost"in u&&l(14,B=u.eventsIfTopMost),"interactive"in u&&l(15,H=u.interactive),"$$scope"in u&&l(24,o=u.$$scope)},[m,s,i,a,r,_,p,v,S,w,C,I,R,f,B,H,n,q,b,M,N,g,z,oe,o]}class nt extends ce{constructor(e){super(),_e(this,e,Rt,Ot,me,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}function Ht(t){let e;const l=t[16].default,n=_t(l,t,t[24],null);return{c(){n&&n.c()},m(o,s){n&&n.m(o,s),e=!0},p(o,s){n&&n.p&&(!e||s&16777216)&&mt(n,l,o,o[24],e?bt(l,o[24],s,null):dt(o[24]),null)},i(o){e||(D(n,o),e=!0)},o(o){F(n,o),e=!1},d(o){n&&n.d(o)}}}function Nt(t){let e,l,n;function o(i){t[17](i)}let s={id:t[1],type:"symbol",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],applyToClusters:t[9],minzoom:t[10],maxzoom:t[11],hoverCursor:t[12],manageHoverState:t[13],eventsIfTopMost:t[14],interactive:t[15],$$slots:{default:[Ht]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ft({props:s}),Ne.push(()=>qe(e,"hovered",o)),e.$on("click",t[18]),e.$on("dblclick",t[19]),e.$on("contextmenu",t[20]),e.$on("mouseenter",t[21]),e.$on("mousemove",t[22]),e.$on("mouseleave",t[23]),{c(){A(e.$$.fragment)},m(i,a){J(e,i,a),n=!0},p(i,[a]){const r={};a&2&&(r.id=i[1]),a&4&&(r.source=i[2]),a&8&&(r.sourceLayer=i[3]),a&16&&(r.beforeId=i[4]),a&32&&(r.beforeLayerType=i[5]),a&64&&(r.paint=i[6]),a&128&&(r.layout=i[7]),a&256&&(r.filter=i[8]),a&512&&(r.applyToClusters=i[9]),a&1024&&(r.minzoom=i[10]),a&2048&&(r.maxzoom=i[11]),a&4096&&(r.hoverCursor=i[12]),a&8192&&(r.manageHoverState=i[13]),a&16384&&(r.eventsIfTopMost=i[14]),a&32768&&(r.interactive=i[15]),a&16777216&&(r.$$scope={dirty:a,ctx:i}),!l&&a&1&&(l=!0,r.hovered=i[0],Be(()=>l=!1)),e.$set(r)},i(i){n||(D(e.$$.fragment,i),n=!0)},o(i){F(e.$$.fragment,i),n=!1},d(i){K(e,i)}}}function qt(t,e,l){let{$$slots:n={},$$scope:o}=e,{id:s=ct("symbol")}=e,{source:i=void 0}=e,{sourceLayer:a=void 0}=e,{beforeId:r=void 0}=e,{beforeLayerType:_=void 0}=e,{paint:p=void 0}=e,{layout:v=void 0}=e,{filter:S=void 0}=e,{applyToClusters:w=void 0}=e,{minzoom:C=void 0}=e,{maxzoom:I=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:f=!1}=e,{hovered:m=null}=e,{eventsIfTopMost:B=!1}=e,{interactive:H=!0}=e;function q(u){m=u,l(0,m)}function b(u){W.call(this,t,u)}function M(u){W.call(this,t,u)}function N(u){W.call(this,t,u)}function g(u){W.call(this,t,u)}function z(u){W.call(this,t,u)}function oe(u){W.call(this,t,u)}return t.$$set=u=>{"id"in u&&l(1,s=u.id),"source"in u&&l(2,i=u.source),"sourceLayer"in u&&l(3,a=u.sourceLayer),"beforeId"in u&&l(4,r=u.beforeId),"beforeLayerType"in u&&l(5,_=u.beforeLayerType),"paint"in u&&l(6,p=u.paint),"layout"in u&&l(7,v=u.layout),"filter"in u&&l(8,S=u.filter),"applyToClusters"in u&&l(9,w=u.applyToClusters),"minzoom"in u&&l(10,C=u.minzoom),"maxzoom"in u&&l(11,I=u.maxzoom),"hoverCursor"in u&&l(12,R=u.hoverCursor),"manageHoverState"in u&&l(13,f=u.manageHoverState),"hovered"in u&&l(0,m=u.hovered),"eventsIfTopMost"in u&&l(14,B=u.eventsIfTopMost),"interactive"in u&&l(15,H=u.interactive),"$$scope"in u&&l(24,o=u.$$scope)},[m,s,i,a,r,_,p,v,S,w,C,I,R,f,B,H,n,q,b,M,N,g,z,oe,o]}class Bt extends ce{constructor(e){super(),_e(this,e,qt,Nt,me,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,applyToClusters:9,minzoom:10,maxzoom:11,hoverCursor:12,manageHoverState:13,hovered:0,eventsIfTopMost:14,interactive:15})}}let Me=pe(!0),Oe=pe(!1),Re=pe(!1),He=pe(!1);function ot(t){let e,l;return e=new De({props:{$$slots:{default:[Dt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function it(t){let e,l,n,o=t[10].slope.toFixed(1)+"",s,i;return{c(){e=d("p"),l=L("Slope: "),n=d("b"),s=L(o),i=L("%")},m(a,r){y(a,e,r),c(e,l),c(e,n),c(n,s),c(n,i)},p(a,r){r&1024&&o!==(o=a[10].slope.toFixed(1)+"")&&X(s,o)},d(a){a&&k(e)}}}function st(t){let e,l,n,o=t[10].forward_cost+"",s;return{c(){e=d("p"),l=L("Cost forwards: "),n=d("b"),s=L(o)},m(i,a){y(i,e,a),c(e,l),c(e,n),c(n,s)},p(i,a){a&1024&&o!==(o=i[10].forward_cost+"")&&X(s,o)},d(i){i&&k(e)}}}function at(t){let e,l,n,o=t[10].backward_cost+"",s;return{c(){e=d("p"),l=L("Cost backwards: "),n=d("b"),s=L(o)},m(i,a){y(i,e,a),c(e,l),c(e,n),c(n,s)},p(i,a){a&1024&&o!==(o=i[10].backward_cost+"")&&X(s,o)},d(i){i&&k(e)}}}function Dt(t){let e,l,n=t[10].count.toFixed(1)+"",o,s,i,a,r,_=t[10].lts+"",p,v,S,w,C,I=t[10].nearby_amenities+"",R,f,m,B,H,q,b=t[10].slope&&it(t),M=t[10].forward_cost&&st(t),N=t[10].backward_cost&&at(t);return{c(){e=d("h2"),l=L("Count: "),o=L(n),s=T(),i=d("p"),a=L("LTS: "),r=d("b"),p=L(_),v=T(),S=d("p"),w=L("Nearby amenities: "),C=d("b"),R=L(I),f=T(),b&&b.c(),m=T(),M&&M.c(),B=T(),N&&N.c(),H=T(),q=d("p"),q.textContent="Click to open OSM"},m(g,z){y(g,e,z),c(e,l),c(e,o),y(g,s,z),y(g,i,z),c(i,a),c(i,r),c(r,p),y(g,v,z),y(g,S,z),c(S,w),c(S,C),c(C,R),y(g,f,z),b&&b.m(g,z),y(g,m,z),M&&M.m(g,z),y(g,B,z),N&&N.m(g,z),y(g,H,z),y(g,q,z)},p(g,z){z&1024&&n!==(n=g[10].count.toFixed(1)+"")&&X(o,n),z&1024&&_!==(_=g[10].lts+"")&&X(p,_),z&1024&&I!==(I=g[10].nearby_amenities+"")&&X(R,I),g[10].slope?b?b.p(g,z):(b=it(g),b.c(),b.m(m.parentNode,m)):b&&(b.d(1),b=null),g[10].forward_cost?M?M.p(g,z):(M=st(g),M.c(),M.m(B.parentNode,B)):M&&(M.d(1),M=null),g[10].backward_cost?N?N.p(g,z):(N=at(g),N.c(),N.m(H.parentNode,H)):N&&(N.d(1),N=null)},d(g){g&&(k(e),k(s),k(i),k(v),k(S),k(f),k(m),k(B),k(H),k(q)),b&&b.d(g),M&&M.d(g),N&&N.d(g)}}}function Ft(t){let e,l,n=t[2]&&ot(t);return{c(){n&&n.c(),e=pt()},m(o,s){n&&n.m(o,s),y(o,e,s),l=!0},p(o,s){o[2]?n?(n.p(o,s),s&4&&D(n,1)):(n=ot(o),n.c(),D(n,1),n.m(e.parentNode,e)):n&&(vt(),F(n,1,1,()=>{n=null}),yt())},i(o){l||(D(n),l=!0)},o(o){F(n),l=!1},d(o){o&&k(e),n&&n.d(o)}}}function Vt(t){let e=t[10].origin_count+"",l,n;return{c(){l=L(e),n=L(" routes start here")},m(o,s){y(o,l,s),y(o,n,s)},p(o,s){s&1024&&e!==(e=o[10].origin_count+"")&&X(l,e)},d(o){o&&(k(l),k(n))}}}function jt(t){let e,l;return e=new De({props:{$$slots:{default:[Vt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function Pt(t){let e=t[10].destination_count+"",l,n;return{c(){l=L(e),n=L(" routes end here")},m(o,s){y(o,l,s),y(o,n,s)},p(o,s){s&1024&&e!==(e=o[10].destination_count+"")&&X(l,e)},d(o){o&&(k(l),k(n))}}}function Et(t){let e,l;return e=new De({props:{$$slots:{default:[Pt,({props:n})=>({10:n}),({props:n})=>n?1024:0]},$$scope:{ctx:t}}}),{c(){A(e.$$.fragment)},m(n,o){J(e,n,o),l=!0},p(n,o){const s={};o&3072&&(s.$$scope={dirty:o,ctx:n}),e.$set(s)},i(n){l||(D(e.$$.fragment,n),l=!0)},o(n){F(e.$$.fragment,n),l=!1},d(n){K(e,n)}}}function Gt(t){let e,l,n,o,s,i,a,r;const _=[{id:"input-layer"},t[0],{filter:["==",["geometry-type"],"LineString"]},{manageHoverState:!0},{hoverCursor:t[2]?"pointer":void 0},{paint:{"line-width":t[3],"line-color":t[4]?t[9]:et,"line-opacity":tt(1,.5)}},{layout:{visibility:t[5]?"visible":"none"}},{beforeId:"Road labels"}];let p={$$slots:{default:[Ft]},$$scope:{ctx:t}};for(let f=0;f<_.length;f+=1)p=be(p,_[f]);e=new wt({props:p}),e.$on("click",t[8]);const v=[{id:"slope-arrows"},t[0],{filter:["all",["==",["geometry-type"],"LineString"],[">",["abs",["get","slope"]],3]]},{minzoom:12},{layout:{"icon-image":"chevron","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["<",["get","slope"],0],180,0],visibility:t[4]?"visible":"none"}}];let S={};for(let f=0;fl(4,s=w)),le(t,Me,w=>l(5,i=w)),le(t,Oe,w=>l(6,a=w)),le(t,Re,w=>l(7,r=w));let{sourceOverride:_={}}=e,{controls:p}=e;function v(w){if(!n)return;let C=w.detail.features[0].properties.way;window.open(`http://openstreetmap.org/way/${C}`,"_blank")}let S=Ct(["abs",["get","slope"]],gt,ht);return t.$$set=w=>{"sourceOverride"in w&&l(0,_=w.sourceOverride),"controls"in w&&l(1,p=w.controls)},t.$$.update=()=>{t.$$.dirty&2&&l(2,n=!p.streetviewOn),t.$$.dirty&2&&l(3,o=Wt(p.maxCount))},[_,p,n,o,s,i,a,r,v,S]}class el extends ce{constructor(e){super(),_e(this,e,At,Gt,me,{sourceOverride:0,controls:1})}}const{window:Jt}=St;function rt(t){let e,l,n,o,s,i,a,r,_,p;return r=Tt(t[6][0]),{c(){e=d("label"),l=d("input"),n=L(` Google StreetView`),o=T(),s=d("label"),i=d("input"),a=L(` Bing Streetside`),j(l,"type","radio"),l.__value="google",te(l,l.__value),j(i,"type","radio"),i.__value="bing",te(i,i.__value),r.p(l,i)},m(v,S){y(v,e,S),c(e,l),l.checked=l.__value===t[1],c(e,n),y(v,o,S),y(v,s,S),c(s,i),i.checked=i.__value===t[1],c(s,a),_||(p=[P(l,"change",t[5]),P(i,"change",t[7])],_=!0)},p(v,S){S&2&&(l.checked=l.__value===v[1]),S&2&&(i.checked=i.__value===v[1])},d(v){v&&(k(e),k(o),k(s)),r.r(),_=!1,Fe(p)}}}function Kt(t){let e,l,n,o,s,i,a,r=t[0]&&rt(t);return{c(){e=d("label"),l=d("input"),n=L(` StreetView`),o=T(),r&&r.c(),s=pt(),j(l,"type","checkbox")},m(_,p){y(_,e,p),c(e,l),l.checked=t[0],c(e,n),y(_,o,p),r&&r.m(_,p),y(_,s,p),i||(a=[P(Jt,"keydown",t[2]),P(l,"change",t[4])],i=!0)},p(_,[p]){p&1&&(l.checked=_[0]),_[0]?r?r.p(_,p):(r=rt(_),r.c(),r.m(s.parentNode,s)):r&&(r.d(1),r=null)},i:Ie,o:Ie,d(_){_&&(k(e),k(o),k(s)),r&&r.d(_),i=!1,Fe(a)}}}function Qt(t,e,l){let{map:n}=e,{enabled:o=!1}=e,s="google";function i(){n.on("click",r),n.getCanvas().style.cursor="zoom-in"}function a(){n.off("click",r),n.getCanvas().style.cursor="auto"}Lt(a);function r(C){let I=C.lngLat.lng,R=C.lngLat.lat;s=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${R},${I}&cbp=11,0,0,0,0`,"_blank"):s=="bing"&&window.open(`https://www.bing.com/maps?cp=${R}~${I}&style=x`,"_blank")}function _(C){o&&C.key=="Escape"&&l(0,o=!1)}const p=[[]];function v(){o=this.checked,l(0,o)}function S(){s=this.__value,l(1,s)}function w(){s=this.__value,l(1,s)}return t.$$set=C=>{"map"in C&&l(3,n=C.map),"enabled"in C&&l(0,o=C.enabled)},t.$$.update=()=>{t.$$.dirty&1&&(o?i():a())},[o,s,_,n,v,S,p,w]}class Xt extends ce{constructor(e){super(),_e(this,e,Qt,Kt,me,{map:3,enabled:0})}}function ut(t){let e,l,n,o,s;return{c(){e=d("label"),l=d("input"),n=L(` diff --git a/assets/index-69a9ca84.js b/assets/index-a6a9f01e.js similarity index 99% rename from assets/index-69a9ca84.js rename to assets/index-a6a9f01e.js index 7f1ce83..080eb5e 100644 --- a/assets/index-69a9ca84.js +++ b/assets/index-a6a9f01e.js @@ -1,4 +1,4 @@ -var Jy=Object.defineProperty;var Zy=(n,t,e)=>t in n?Jy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var O=(n,t,e)=>(Zy(n,typeof t!="symbol"?t+"":t,e),e);import{al as fp,am as dp,S as te,i as ee,s as Wt,E as xn,g as B,t as H,v as Je,b as U,w as Ze,h as z,an as Qy,V as Zt,ac as bo,W as $n,ao as Ys,n as wt,G as Bi,N as zi,O as Ni,Q as Wi,$ as t_,e as N,k as Bt,f as Rt,q as W,ab as rr,ap as ra,aq as oa,ar as gp,a1 as Es,j as yt,A as an,u as kt,x as wn,as as e_,at as n_,T as pc,y as vi,z as xi,c as Ae,a as Ce,B as wi,d as Oe,a0 as At,l as Ct,p as pp,r as yo,D as mp,I as Fh,au as i_,X as jn,ai as Pi,aj as mc,ag as bp}from"./Layout-a6e3acf3.js";function s_(n,t,e,i,s){let r=!1;n.getSource(t)&&(r=!0,n.removeSource(t));const o=()=>{i(t)&&(n.addSource(t,e),s())};if(r){const a=()=>{t&&(n.getSource(t)?setTimeout(a,1):o())};a()}else o()}function r_(n,t,e){fp().then(()=>{let i=dp(n);if(!i)return;i.getSource(t)===e&&i.removeSource(t)})}function Bh(n){let t=n[0],e,i,s=zh(n);return{c(){s.c(),e=xn()},m(r,o){s.m(r,o),B(r,e,o),i=!0},p(r,o){o&1&&Wt(t,t=r[0])?(Je(),U(s,1,1,wt),Ze(),s=zh(r),s.c(),H(s,1),s.m(e.parentNode,e)):s.p(r,o)},i(r){i||(H(s),i=!0)},o(r){U(s),i=!1},d(r){r&&z(e),s.d(r)}}}function zh(n){let t;const e=n[19].default,i=Bi(e,n,n[18],null);return{c(){i&&i.c()},m(s,r){i&&i.m(s,r),t=!0},p(s,r){i&&i.p&&(!t||r&262144)&&zi(i,e,s,s[18],t?Wi(e,s[18],r,null):Ni(s[18]),null)},i(s){t||(H(i,s),t=!0)},o(s){U(i,s),t=!1},d(s){i&&i.d(s)}}}function o_(n){let t,e,i=n[0]&&Bh(n);return{c(){i&&i.c(),t=xn()},m(s,r){i&&i.m(s,r),B(s,t,r),e=!0},p(s,[r]){s[0]?i?(i.p(s,r),r&1&&H(i,1)):(i=Bh(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(Je(),U(i,1,1,()=>{i=null}),Ze())},i(s){e||(H(i),e=!0)},o(s){U(i),e=!1},d(s){s&&z(t),i&&i.d(s)}}}function a_(n,t,e){let i,s,r,{$$slots:o={},$$scope:a}=t,{id:l=t_("geojson")}=t,{data:c}=t,{generateId:h=!1}=t,{promoteId:u=void 0}=t,{filter:f=void 0}=t,{lineMetrics:d=void 0}=t,{cluster:g=void 0}=t,{maxzoom:m=void 0}=t,{attribution:y=void 0}=t,{buffer:v=void 0}=t,{tolerance:p=void 0}=t;const{map:_,cluster:b,self:x}=Qy();Zt(n,_,M=>e(17,s=M)),Zt(n,b,M=>e(20,r=M)),Zt(n,x,M=>e(0,i=M));let w,S=!0;return bo(()=>{i&&w&&s&&(r_(_,i,w),$n(x,i=null,i),e(15,w=void 0))}),n.$$set=M=>{"id"in M&&e(4,l=M.id),"data"in M&&e(5,c=M.data),"generateId"in M&&e(6,h=M.generateId),"promoteId"in M&&e(7,u=M.promoteId),"filter"in M&&e(8,f=M.filter),"lineMetrics"in M&&e(9,d=M.lineMetrics),"cluster"in M&&e(10,g=M.cluster),"maxzoom"in M&&e(11,m=M.maxzoom),"attribution"in M&&e(12,y=M.attribution),"buffer"in M&&e(13,v=M.buffer),"tolerance"in M&&e(14,p=M.tolerance),"$$scope"in M&&e(18,a=M.$$scope)},n.$$.update=()=>{n.$$.dirty&1024&&$n(b,r=g,r),n.$$.dirty&196593&&s&&i!==l&&($n(x,i=l,i),s_(s,i,Ys({type:"geojson",data:c,filter:f,lineMetrics:d,generateId:h,promoteId:u,cluster:!!g,clusterMinPoints:g==null?void 0:g.minPoints,clusterMaxZoom:g==null?void 0:g.maxZoom,clusterRadius:g==null?void 0:g.radius,clusterProperties:g==null?void 0:g.properties,maxzoom:m,attribution:y,buffer:v,tolerance:p}),M=>s&&M===i,()=>{i&&(e(15,w=s==null?void 0:s.getSource(i)),e(16,S=!0))})),n.$$.dirty&131088&&(s==null||s.on("style.load",()=>{e(15,w=s==null?void 0:s.getSource(l))})),n.$$.dirty&98336&&w&&(S?e(16,S=!1):w.setData(c)),n.$$.dirty&33792&&(w==null||w.setClusterOptions(Ys({cluster:!!g,clusterMaxZoom:g==null?void 0:g.maxZoom,clusterRadius:g==null?void 0:g.radius})))},[i,_,b,x,l,c,h,u,f,d,g,m,y,v,p,w,S,s,a,o]}let lR=class extends te{constructor(t){super(),ee(this,t,a_,o_,Wt,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function Nh(n){let t,e;return{c(){t=N("div"),e=Bt(n[0]),Rt(t,"class","svelte-1uuov7f")},m(i,s){B(i,t,s),W(t,e)},p(i,s){s&1&&rr(e,i[0])},d(i){i&&z(t)}}}function l_(n){let t,e=n[0]&&Nh(n);return{c(){e&&e.c(),t=xn()},m(i,s){e&&e.m(i,s),B(i,t,s)},p(i,[s]){i[0]?e?e.p(i,s):(e=Nh(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:wt,o:wt,d(i){i&&z(t),e&&e.d(i)}}}function c_(n,t,e){let{loading:i}=t;return n.$$set=s=>{"loading"in s&&e(0,i=s.loading)},[i]}class hR extends te{constructor(t){super(),ee(this,t,c_,l_,Wt,{loading:0})}}function h_(n,t){let e=document.createElement("a");e.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),e.setAttribute("download",n),document.body.appendChild(e),e.click(),document.body.removeChild(e)}var Wh=Object.prototype.toString,yp=function(t){var e=Wh.call(t),i=e==="[object Arguments]";return i||(i=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wh.call(t.callee)==="[object Function]"),i},Ma,Vh;function u_(){if(Vh)return Ma;Vh=1;var n;if(!Object.keys){var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,i=yp,s=Object.prototype.propertyIsEnumerable,r=!s.call({toString:null},"toString"),o=s.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var d=f.constructor;return d&&d.prototype===f},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!c["$"+f]&&t.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),u=function(f){if(typeof window>"u"||!h)return l(f);try{return l(f)}catch{return!1}};n=function(d){var g=d!==null&&typeof d=="object",m=e.call(d)==="[object Function]",y=i(d),v=g&&e.call(d)==="[object String]",p=[];if(!g&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var _=o&&m;if(v&&d.length>0&&!t.call(d,0))for(var b=0;b0)for(var x=0;x"u"||!Pt?$:Pt(Uint8Array),Un={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?$:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?$:ArrayBuffer,"%ArrayIteratorPrototype%":ri&&Pt?Pt([][Symbol.iterator]()):$,"%AsyncFromSyncIteratorPrototype%":$,"%AsyncFunction%":yi,"%AsyncGenerator%":yi,"%AsyncGeneratorFunction%":yi,"%AsyncIteratorPrototype%":yi,"%Atomics%":typeof Atomics>"u"?$:Atomics,"%BigInt%":typeof BigInt>"u"?$:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?$:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?$:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?$:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":T_,"%eval%":eval,"%EvalError%":R_,"%Float32Array%":typeof Float32Array>"u"?$:Float32Array,"%Float64Array%":typeof Float64Array>"u"?$:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?$:FinalizationRegistry,"%Function%":xp,"%GeneratorFunction%":yi,"%Int8Array%":typeof Int8Array>"u"?$:Int8Array,"%Int16Array%":typeof Int16Array>"u"?$:Int16Array,"%Int32Array%":typeof Int32Array>"u"?$:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ri&&Pt?Pt(Pt([][Symbol.iterator]())):$,"%JSON%":typeof JSON=="object"?JSON:$,"%Map%":typeof Map>"u"?$:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ri||!Pt?$:Pt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?$:Promise,"%Proxy%":typeof Proxy>"u"?$:Proxy,"%RangeError%":I_,"%ReferenceError%":F_,"%Reflect%":typeof Reflect>"u"?$:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?$:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ri||!Pt?$:Pt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?$:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ri&&Pt?Pt(""[Symbol.iterator]()):$,"%Symbol%":ri?Symbol:$,"%SyntaxError%":Ai,"%ThrowTypeError%":z_,"%TypedArray%":W_,"%TypeError%":Si,"%Uint8Array%":typeof Uint8Array>"u"?$:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?$:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?$:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?$:Uint32Array,"%URIError%":B_,"%WeakMap%":typeof WeakMap>"u"?$:WeakMap,"%WeakRef%":typeof WeakRef>"u"?$:WeakRef,"%WeakSet%":typeof WeakSet>"u"?$:WeakSet};if(Pt)try{null.error}catch(n){var V_=Pt(Pt(n));Un["%Error.prototype%"]=V_}var j_=function n(t){var e;if(t==="%AsyncFunction%")e=Pa("async function () {}");else if(t==="%GeneratorFunction%")e=Pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Pa("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(e=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&Pt&&(e=Pt(s.prototype))}return Un[t]=e,e},Uh={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=_c,_o=vp,H_=or.call(Function.call,Array.prototype.concat),$_=or.call(Function.apply,Array.prototype.splice),Xh=or.call(Function.call,String.prototype.replace),vo=or.call(Function.call,String.prototype.slice),Y_=or.call(Function.call,RegExp.prototype.exec),U_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,X_=/\\(\\)?/g,G_=function(t){var e=vo(t,0,1),i=vo(t,-1);if(e==="%"&&i!=="%")throw new Ai("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&e!=="%")throw new Ai("invalid intrinsic syntax, expected opening `%`");var s=[];return Xh(t,U_,function(r,o,a,l){s[s.length]=a?Xh(l,X_,"$1"):o||r}),s},q_=function(t,e){var i=t,s;if(_o(Uh,i)&&(s=Uh[i],i="%"+s[0]+"%"),_o(Un,i)){var r=Un[i];if(r===yi&&(r=j_(i)),typeof r>"u"&&!e)throw new Si("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:r}}throw new Ai("intrinsic "+t+" does not exist!")},Te=function(t,e){if(typeof t!="string"||t.length===0)throw new Si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Si('"allowMissing" argument must be a boolean');if(Y_(/^%?[^%]*%?$/,t)===null)throw new Ai("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=G_(t),s=i.length>0?i[0]:"",r=q_("%"+s+"%",e),o=r.name,a=r.value,l=!1,c=r.alias;c&&(s=c[0],$_(i,H_([0,1],c)));for(var h=1,u=!0;h=i.length){var m=Yn(a,f);u=!!m,u&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else u=_o(a,f),a=a[f];u&&!l&&(Un[o]=a)}}return a},Ca,Gh;function vc(){if(Gh)return Ca;Gh=1;var n=Te,t=n("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ca=t,Ca}var K_=Te,io=K_("%Object.getOwnPropertyDescriptor%",!0);if(io)try{io([],"length")}catch{io=null}var xc=io,qh=vc(),J_=_p,oi=Sn,Kh=xc,wc=function(t,e,i){if(!t||typeof t!="object"&&typeof t!="function")throw new oi("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new oi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new oi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new oi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new oi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new oi("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Kh&&Kh(t,e);if(qh)qh(t,e,{configurable:o===null&&l?l.configurable:!o,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:r===null&&l?l.writable:!r});else if(a||!s&&!r&&!o)t[e]=i;else throw new J_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_l=vc(),wp=function(){return!!_l};wp.hasArrayLengthDefineBug=function(){if(!_l)return null;try{return _l([],"length",{value:1}).length!==1}catch{return!0}};var Sc=wp,Z_=bc,Q_=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",t0=Object.prototype.toString,e0=Array.prototype.concat,Jh=wc,n0=function(n){return typeof n=="function"&&t0.call(n)==="[object Function]"},Sp=Sc(),i0=function(n,t,e,i){if(t in n){if(i===!0){if(n[t]===e)return}else if(!n0(i)||!i())return}Sp?Jh(n,t,e,!0):Jh(n,t,e)},Mp=function(n,t){var e=arguments.length>2?arguments[2]:{},i=Z_(t);Q_&&(i=e0.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s4294967295||o0(e)!==e)throw new tu("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in t&&Qh){var o=Qh(t,"length");o&&!o.configurable&&(s=!1),o&&!o.writable&&(r=!1)}return(s||r||!i)&&(r0?Zh(t,"length",e,!0,!0):Zh(t,"length",e)),t};(function(n){var t=_c,e=Te,i=a0,s=Sn,r=e("%Function.prototype.apply%"),o=e("%Function.prototype.call%"),a=e("%Reflect.apply%",!0)||t.call(o,r),l=vc(),c=e("%Math.max%");n.exports=function(f){if(typeof f!="function")throw new s("a function is required");var d=a(t,o,arguments);return i(d,1+c(0,f.length-(arguments.length-1)),!0)};var h=function(){return a(t,r,arguments)};l?l(n.exports,"apply",{value:h}):n.exports.apply=h})(kp);var Vi=kp.exports,Pp=Te,Ap=Vi,l0=Ap(Pp("String.prototype.indexOf")),fe=function(t,e){var i=Pp(t,!!e);return typeof i=="function"&&l0(t,".prototype.")>-1?Ap(i):i},c0=bc,Cp=aa(),Op=fe,eu=Object,h0=Op("Array.prototype.push"),nu=Op("Object.prototype.propertyIsEnumerable"),u0=Cp?Object.getOwnPropertySymbols:null,Dp=function(t,e){if(t==null)throw new TypeError("target must be an object");var i=eu(t);if(arguments.length===1)return i;for(var s=1;s2&&!!arguments[2];return(!i||P0)&&(k0?iu(t,"name",e,!0,!0):iu(t,"name",e)),t},O0=C0,D0=Sn,E0=Object,Rp=O0(function(){if(this==null||this!==E0(this))throw new D0("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),L0=Rp,T0=ei.supportsDescriptors,R0=Object.getOwnPropertyDescriptor,Ip=function(){if(T0&&/a/mig.flags==="gim"){var t=R0(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var e="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(i,"sticky",{get:function(){e+="y"}}),e==="dy")return t.get}}return L0},I0=ei.supportsDescriptors,F0=Ip,B0=Object.getOwnPropertyDescriptor,z0=Object.defineProperty,N0=TypeError,su=Object.getPrototypeOf,W0=/a/,V0=function(){if(!I0||!su)throw new N0("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=F0(),e=su(W0),i=B0(e,"flags");return(!i||i.get!==t)&&z0(e,"flags",{configurable:!0,enumerable:!1,get:t}),t},j0=ei,H0=Vi,$0=Rp,Fp=Ip,Y0=V0,Bp=H0(Fp());j0(Bp,{getPolyfill:Fp,implementation:$0,shim:Y0});var U0=Bp,so={exports:{}},X0=aa,ni=function(){return X0()&&!!Symbol.toStringTag},G0=ni(),q0=fe,vl=q0("Object.prototype.toString"),la=function(t){return G0&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:vl(t)==="[object Arguments]"},zp=function(t){return la(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&vl(t)!=="[object Array]"&&vl(t.callee)==="[object Function]"},K0=function(){return la(arguments)}();la.isLegacyArguments=zp;var Np=K0?la:zp;const J0={},Z0=Object.freeze(Object.defineProperty({__proto__:null,default:J0},Symbol.toStringTag,{value:"Module"})),Q0=ra(Z0);var Mc=typeof Map=="function"&&Map.prototype,Da=Object.getOwnPropertyDescriptor&&Mc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xo=Mc&&Da&&typeof Da.get=="function"?Da.get:null,ru=Mc&&Map.prototype.forEach,kc=typeof Set=="function"&&Set.prototype,Ea=Object.getOwnPropertyDescriptor&&kc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,wo=kc&&Ea&&typeof Ea.get=="function"?Ea.get:null,ou=kc&&Set.prototype.forEach,tv=typeof WeakMap=="function"&&WeakMap.prototype,Ts=tv?WeakMap.prototype.has:null,ev=typeof WeakSet=="function"&&WeakSet.prototype,Rs=ev?WeakSet.prototype.has:null,nv=typeof WeakRef=="function"&&WeakRef.prototype,au=nv?WeakRef.prototype.deref:null,iv=Boolean.prototype.valueOf,sv=Object.prototype.toString,rv=Function.prototype.toString,ov=String.prototype.match,Pc=String.prototype.slice,ln=String.prototype.replace,av=String.prototype.toUpperCase,lu=String.prototype.toLowerCase,Wp=RegExp.prototype.test,cu=Array.prototype.concat,Me=Array.prototype.join,lv=Array.prototype.slice,hu=Math.floor,xl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,La=Object.getOwnPropertySymbols,wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="object",zt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ci||"symbol")?Symbol.toStringTag:null,Vp=Object.prototype.propertyIsEnumerable,uu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function fu(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Wp.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-hu(-n):hu(n);if(i!==n){var s=String(i),r=Pc.call(t,s.length+1);return ln.call(s,e,"$&_")+"."+ln.call(ln.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ln.call(t,e,"$&_")}var Sl=Q0,du=Sl.custom,gu=Hp(du)?du:null,cv=function n(t,e,i,s){var r=e||{};if(rn(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rn(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=rn(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(rn(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(rn(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Yp(t,r);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?fu(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?fu(t,c):c}var h=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=h&&h>0&&typeof t=="object")return Ml(t)?"[Array]":"[Object]";var u=Av(r,i);if(typeof s>"u")s=[];else if($p(s,t)>=0)return"[Circular]";function f(L,T,D){if(T&&(s=lv.call(s),s.push(T)),D){var R={depth:r.depth};return rn(r,"quoteStyle")&&(R.quoteStyle=r.quoteStyle),n(L,R,i+1,s)}return n(L,r,i+1,s)}if(typeof t=="function"&&!pu(t)){var d=yv(t),g=yr(t,f);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(g.length>0?" { "+Me.call(g,", ")+" }":"")}if(Hp(t)){var m=Ci?ln.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):wl.call(t);return typeof t=="object"&&!Ci?Yi(m):m}if(Mv(t)){for(var y="<"+lu.call(String(t.nodeName)),v=t.attributes||[],p=0;p",y}if(Ml(t)){if(t.length===0)return"[]";var _=yr(t,f);return u&&!Pv(_)?"["+kl(_,u)+"]":"[ "+Me.call(_,", ")+" ]"}if(fv(t)){var b=yr(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Vp.call(t,"cause")?"{ ["+String(t)+"] "+Me.call(cu.call("[cause]: "+f(t.cause),b),", ")+" }":b.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Me.call(b,", ")+" }"}if(typeof t=="object"&&o){if(gu&&typeof t[gu]=="function"&&Sl)return Sl(t,{depth:h-i});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(_v(t)){var x=[];return ru&&ru.call(t,function(L,T){x.push(f(T,t,!0)+" => "+f(L,t))}),mu("Map",xo.call(t),x,u)}if(wv(t)){var w=[];return ou&&ou.call(t,function(L){w.push(f(L,t))}),mu("Set",wo.call(t),w,u)}if(vv(t))return Ta("WeakMap");if(Sv(t))return Ta("WeakSet");if(xv(t))return Ta("WeakRef");if(gv(t))return Yi(f(Number(t)));if(mv(t))return Yi(f(xl.call(t)));if(pv(t))return Yi(iv.call(t));if(dv(t))return Yi(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===oa)return"{ [object globalThis] }";if(!uv(t)&&!pu(t)){var S=yr(t,f),M=uu?uu(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",C=!M&&zt&&Object(t)===t&&zt in t?Pc.call(Mn(t),8,-1):P?"Object":"",k=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",A=k+(C||P?"["+Me.call(cu.call([],C||[],P||[]),": ")+"] ":"");return S.length===0?A+"{}":u?A+"{"+kl(S,u)+"}":A+"{ "+Me.call(S,", ")+" }"}return String(t)};function jp(n,t,e){var i=(e.quoteStyle||t)==="double"?'"':"'";return i+n+i}function hv(n){return ln.call(String(n),/"/g,""")}function Ml(n){return Mn(n)==="[object Array]"&&(!zt||!(typeof n=="object"&&zt in n))}function uv(n){return Mn(n)==="[object Date]"&&(!zt||!(typeof n=="object"&&zt in n))}function pu(n){return Mn(n)==="[object RegExp]"&&(!zt||!(typeof n=="object"&&zt in n))}function fv(n){return Mn(n)==="[object Error]"&&(!zt||!(typeof n=="object"&&zt in n))}function dv(n){return Mn(n)==="[object String]"&&(!zt||!(typeof n=="object"&&zt in n))}function gv(n){return Mn(n)==="[object Number]"&&(!zt||!(typeof n=="object"&&zt in n))}function pv(n){return Mn(n)==="[object Boolean]"&&(!zt||!(typeof n=="object"&&zt in n))}function Hp(n){if(Ci)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!wl)return!1;try{return wl.call(n),!0}catch{}return!1}function mv(n){if(!n||typeof n!="object"||!xl)return!1;try{return xl.call(n),!0}catch{}return!1}var bv=Object.prototype.hasOwnProperty||function(n){return n in this};function rn(n,t){return bv.call(n,t)}function Mn(n){return sv.call(n)}function yv(n){if(n.name)return n.name;var t=ov.call(rv.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function $p(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,i=n.length;et.maxStringLength){var e=n.length-t.maxStringLength,i="... "+e+" more character"+(e>1?"s":"");return Yp(Pc.call(n,0,t.maxStringLength),t)+i}var s=ln.call(ln.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,kv);return jp(s,"single",t)}function kv(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+av.call(t.toString(16))}function Yi(n){return"Object("+n+")"}function Ta(n){return n+" { ? }"}function mu(n,t,e,i){var s=i?kl(e,i):Me.call(e,", ");return n+" ("+t+") {"+s+"}"}function Pv(n){for(var t=0;tt in n?Jy(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var O=(n,t,e)=>(Zy(n,typeof t!="symbol"?t+"":t,e),e);import{al as fp,am as dp,S as te,i as ee,s as Wt,E as xn,g as B,t as H,v as Je,b as U,w as Ze,h as z,an as Qy,V as Zt,ac as bo,W as $n,ao as Ys,n as wt,G as Bi,N as zi,O as Ni,Q as Wi,$ as t_,e as N,k as Bt,f as Rt,q as W,ab as rr,ap as ra,aq as oa,ar as gp,a1 as Es,j as yt,A as an,u as kt,x as wn,as as e_,at as n_,T as pc,y as vi,z as xi,c as Ae,a as Ce,B as wi,d as Oe,a0 as At,l as Ct,p as pp,r as yo,D as mp,I as Fh,au as i_,X as jn,ai as Pi,aj as mc,ag as bp}from"./Layout-cca6f705.js";function s_(n,t,e,i,s){let r=!1;n.getSource(t)&&(r=!0,n.removeSource(t));const o=()=>{i(t)&&(n.addSource(t,e),s())};if(r){const a=()=>{t&&(n.getSource(t)?setTimeout(a,1):o())};a()}else o()}function r_(n,t,e){fp().then(()=>{let i=dp(n);if(!i)return;i.getSource(t)===e&&i.removeSource(t)})}function Bh(n){let t=n[0],e,i,s=zh(n);return{c(){s.c(),e=xn()},m(r,o){s.m(r,o),B(r,e,o),i=!0},p(r,o){o&1&&Wt(t,t=r[0])?(Je(),U(s,1,1,wt),Ze(),s=zh(r),s.c(),H(s,1),s.m(e.parentNode,e)):s.p(r,o)},i(r){i||(H(s),i=!0)},o(r){U(s),i=!1},d(r){r&&z(e),s.d(r)}}}function zh(n){let t;const e=n[19].default,i=Bi(e,n,n[18],null);return{c(){i&&i.c()},m(s,r){i&&i.m(s,r),t=!0},p(s,r){i&&i.p&&(!t||r&262144)&&zi(i,e,s,s[18],t?Wi(e,s[18],r,null):Ni(s[18]),null)},i(s){t||(H(i,s),t=!0)},o(s){U(i,s),t=!1},d(s){i&&i.d(s)}}}function o_(n){let t,e,i=n[0]&&Bh(n);return{c(){i&&i.c(),t=xn()},m(s,r){i&&i.m(s,r),B(s,t,r),e=!0},p(s,[r]){s[0]?i?(i.p(s,r),r&1&&H(i,1)):(i=Bh(s),i.c(),H(i,1),i.m(t.parentNode,t)):i&&(Je(),U(i,1,1,()=>{i=null}),Ze())},i(s){e||(H(i),e=!0)},o(s){U(i),e=!1},d(s){s&&z(t),i&&i.d(s)}}}function a_(n,t,e){let i,s,r,{$$slots:o={},$$scope:a}=t,{id:l=t_("geojson")}=t,{data:c}=t,{generateId:h=!1}=t,{promoteId:u=void 0}=t,{filter:f=void 0}=t,{lineMetrics:d=void 0}=t,{cluster:g=void 0}=t,{maxzoom:m=void 0}=t,{attribution:y=void 0}=t,{buffer:v=void 0}=t,{tolerance:p=void 0}=t;const{map:_,cluster:b,self:x}=Qy();Zt(n,_,M=>e(17,s=M)),Zt(n,b,M=>e(20,r=M)),Zt(n,x,M=>e(0,i=M));let w,S=!0;return bo(()=>{i&&w&&s&&(r_(_,i,w),$n(x,i=null,i),e(15,w=void 0))}),n.$$set=M=>{"id"in M&&e(4,l=M.id),"data"in M&&e(5,c=M.data),"generateId"in M&&e(6,h=M.generateId),"promoteId"in M&&e(7,u=M.promoteId),"filter"in M&&e(8,f=M.filter),"lineMetrics"in M&&e(9,d=M.lineMetrics),"cluster"in M&&e(10,g=M.cluster),"maxzoom"in M&&e(11,m=M.maxzoom),"attribution"in M&&e(12,y=M.attribution),"buffer"in M&&e(13,v=M.buffer),"tolerance"in M&&e(14,p=M.tolerance),"$$scope"in M&&e(18,a=M.$$scope)},n.$$.update=()=>{n.$$.dirty&1024&&$n(b,r=g,r),n.$$.dirty&196593&&s&&i!==l&&($n(x,i=l,i),s_(s,i,Ys({type:"geojson",data:c,filter:f,lineMetrics:d,generateId:h,promoteId:u,cluster:!!g,clusterMinPoints:g==null?void 0:g.minPoints,clusterMaxZoom:g==null?void 0:g.maxZoom,clusterRadius:g==null?void 0:g.radius,clusterProperties:g==null?void 0:g.properties,maxzoom:m,attribution:y,buffer:v,tolerance:p}),M=>s&&M===i,()=>{i&&(e(15,w=s==null?void 0:s.getSource(i)),e(16,S=!0))})),n.$$.dirty&131088&&(s==null||s.on("style.load",()=>{e(15,w=s==null?void 0:s.getSource(l))})),n.$$.dirty&98336&&w&&(S?e(16,S=!1):w.setData(c)),n.$$.dirty&33792&&(w==null||w.setClusterOptions(Ys({cluster:!!g,clusterMaxZoom:g==null?void 0:g.maxZoom,clusterRadius:g==null?void 0:g.radius})))},[i,_,b,x,l,c,h,u,f,d,g,m,y,v,p,w,S,s,a,o]}let lR=class extends te{constructor(t){super(),ee(this,t,a_,o_,Wt,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function Nh(n){let t,e;return{c(){t=N("div"),e=Bt(n[0]),Rt(t,"class","svelte-1uuov7f")},m(i,s){B(i,t,s),W(t,e)},p(i,s){s&1&&rr(e,i[0])},d(i){i&&z(t)}}}function l_(n){let t,e=n[0]&&Nh(n);return{c(){e&&e.c(),t=xn()},m(i,s){e&&e.m(i,s),B(i,t,s)},p(i,[s]){i[0]?e?e.p(i,s):(e=Nh(i),e.c(),e.m(t.parentNode,t)):e&&(e.d(1),e=null)},i:wt,o:wt,d(i){i&&z(t),e&&e.d(i)}}}function c_(n,t,e){let{loading:i}=t;return n.$$set=s=>{"loading"in s&&e(0,i=s.loading)},[i]}class hR extends te{constructor(t){super(),ee(this,t,c_,l_,Wt,{loading:0})}}function h_(n,t){let e=document.createElement("a");e.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(t)),e.setAttribute("download",n),document.body.appendChild(e),e.click(),document.body.removeChild(e)}var Wh=Object.prototype.toString,yp=function(t){var e=Wh.call(t),i=e==="[object Arguments]";return i||(i=e!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wh.call(t.callee)==="[object Function]"),i},Ma,Vh;function u_(){if(Vh)return Ma;Vh=1;var n;if(!Object.keys){var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,i=yp,s=Object.prototype.propertyIsEnumerable,r=!s.call({toString:null},"toString"),o=s.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(f){var d=f.constructor;return d&&d.prototype===f},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if(typeof window>"u")return!1;for(var f in window)try{if(!c["$"+f]&&t.call(window,f)&&window[f]!==null&&typeof window[f]=="object")try{l(window[f])}catch{return!0}}catch{return!0}return!1}(),u=function(f){if(typeof window>"u"||!h)return l(f);try{return l(f)}catch{return!1}};n=function(d){var g=d!==null&&typeof d=="object",m=e.call(d)==="[object Function]",y=i(d),v=g&&e.call(d)==="[object String]",p=[];if(!g&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var _=o&&m;if(v&&d.length>0&&!t.call(d,0))for(var b=0;b0)for(var x=0;x"u"||!Pt?$:Pt(Uint8Array),Un={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?$:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?$:ArrayBuffer,"%ArrayIteratorPrototype%":ri&&Pt?Pt([][Symbol.iterator]()):$,"%AsyncFromSyncIteratorPrototype%":$,"%AsyncFunction%":yi,"%AsyncGenerator%":yi,"%AsyncGeneratorFunction%":yi,"%AsyncIteratorPrototype%":yi,"%Atomics%":typeof Atomics>"u"?$:Atomics,"%BigInt%":typeof BigInt>"u"?$:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?$:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?$:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?$:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":T_,"%eval%":eval,"%EvalError%":R_,"%Float32Array%":typeof Float32Array>"u"?$:Float32Array,"%Float64Array%":typeof Float64Array>"u"?$:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?$:FinalizationRegistry,"%Function%":xp,"%GeneratorFunction%":yi,"%Int8Array%":typeof Int8Array>"u"?$:Int8Array,"%Int16Array%":typeof Int16Array>"u"?$:Int16Array,"%Int32Array%":typeof Int32Array>"u"?$:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ri&&Pt?Pt(Pt([][Symbol.iterator]())):$,"%JSON%":typeof JSON=="object"?JSON:$,"%Map%":typeof Map>"u"?$:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ri||!Pt?$:Pt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?$:Promise,"%Proxy%":typeof Proxy>"u"?$:Proxy,"%RangeError%":I_,"%ReferenceError%":F_,"%Reflect%":typeof Reflect>"u"?$:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?$:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ri||!Pt?$:Pt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?$:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ri&&Pt?Pt(""[Symbol.iterator]()):$,"%Symbol%":ri?Symbol:$,"%SyntaxError%":Ai,"%ThrowTypeError%":z_,"%TypedArray%":W_,"%TypeError%":Si,"%Uint8Array%":typeof Uint8Array>"u"?$:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?$:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?$:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?$:Uint32Array,"%URIError%":B_,"%WeakMap%":typeof WeakMap>"u"?$:WeakMap,"%WeakRef%":typeof WeakRef>"u"?$:WeakRef,"%WeakSet%":typeof WeakSet>"u"?$:WeakSet};if(Pt)try{null.error}catch(n){var V_=Pt(Pt(n));Un["%Error.prototype%"]=V_}var j_=function n(t){var e;if(t==="%AsyncFunction%")e=Pa("async function () {}");else if(t==="%GeneratorFunction%")e=Pa("function* () {}");else if(t==="%AsyncGeneratorFunction%")e=Pa("async function* () {}");else if(t==="%AsyncGenerator%"){var i=n("%AsyncGeneratorFunction%");i&&(e=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var s=n("%AsyncGenerator%");s&&Pt&&(e=Pt(s.prototype))}return Un[t]=e,e},Uh={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},or=_c,_o=vp,H_=or.call(Function.call,Array.prototype.concat),$_=or.call(Function.apply,Array.prototype.splice),Xh=or.call(Function.call,String.prototype.replace),vo=or.call(Function.call,String.prototype.slice),Y_=or.call(Function.call,RegExp.prototype.exec),U_=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,X_=/\\(\\)?/g,G_=function(t){var e=vo(t,0,1),i=vo(t,-1);if(e==="%"&&i!=="%")throw new Ai("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&e!=="%")throw new Ai("invalid intrinsic syntax, expected opening `%`");var s=[];return Xh(t,U_,function(r,o,a,l){s[s.length]=a?Xh(l,X_,"$1"):o||r}),s},q_=function(t,e){var i=t,s;if(_o(Uh,i)&&(s=Uh[i],i="%"+s[0]+"%"),_o(Un,i)){var r=Un[i];if(r===yi&&(r=j_(i)),typeof r>"u"&&!e)throw new Si("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:s,name:i,value:r}}throw new Ai("intrinsic "+t+" does not exist!")},Te=function(t,e){if(typeof t!="string"||t.length===0)throw new Si("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof e!="boolean")throw new Si('"allowMissing" argument must be a boolean');if(Y_(/^%?[^%]*%?$/,t)===null)throw new Ai("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=G_(t),s=i.length>0?i[0]:"",r=q_("%"+s+"%",e),o=r.name,a=r.value,l=!1,c=r.alias;c&&(s=c[0],$_(i,H_([0,1],c)));for(var h=1,u=!0;h=i.length){var m=Yn(a,f);u=!!m,u&&"get"in m&&!("originalValue"in m.get)?a=m.get:a=a[f]}else u=_o(a,f),a=a[f];u&&!l&&(Un[o]=a)}}return a},Ca,Gh;function vc(){if(Gh)return Ca;Gh=1;var n=Te,t=n("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return Ca=t,Ca}var K_=Te,io=K_("%Object.getOwnPropertyDescriptor%",!0);if(io)try{io([],"length")}catch{io=null}var xc=io,qh=vc(),J_=_p,oi=Sn,Kh=xc,wc=function(t,e,i){if(!t||typeof t!="object"&&typeof t!="function")throw new oi("`obj` must be an object or a function`");if(typeof e!="string"&&typeof e!="symbol")throw new oi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new oi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new oi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new oi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new oi("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Kh&&Kh(t,e);if(qh)qh(t,e,{configurable:o===null&&l?l.configurable:!o,enumerable:s===null&&l?l.enumerable:!s,value:i,writable:r===null&&l?l.writable:!r});else if(a||!s&&!r&&!o)t[e]=i;else throw new J_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_l=vc(),wp=function(){return!!_l};wp.hasArrayLengthDefineBug=function(){if(!_l)return null;try{return _l([],"length",{value:1}).length!==1}catch{return!0}};var Sc=wp,Z_=bc,Q_=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",t0=Object.prototype.toString,e0=Array.prototype.concat,Jh=wc,n0=function(n){return typeof n=="function"&&t0.call(n)==="[object Function]"},Sp=Sc(),i0=function(n,t,e,i){if(t in n){if(i===!0){if(n[t]===e)return}else if(!n0(i)||!i())return}Sp?Jh(n,t,e,!0):Jh(n,t,e)},Mp=function(n,t){var e=arguments.length>2?arguments[2]:{},i=Z_(t);Q_&&(i=e0.call(i,Object.getOwnPropertySymbols(t)));for(var s=0;s4294967295||o0(e)!==e)throw new tu("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],s=!0,r=!0;if("length"in t&&Qh){var o=Qh(t,"length");o&&!o.configurable&&(s=!1),o&&!o.writable&&(r=!1)}return(s||r||!i)&&(r0?Zh(t,"length",e,!0,!0):Zh(t,"length",e)),t};(function(n){var t=_c,e=Te,i=a0,s=Sn,r=e("%Function.prototype.apply%"),o=e("%Function.prototype.call%"),a=e("%Reflect.apply%",!0)||t.call(o,r),l=vc(),c=e("%Math.max%");n.exports=function(f){if(typeof f!="function")throw new s("a function is required");var d=a(t,o,arguments);return i(d,1+c(0,f.length-(arguments.length-1)),!0)};var h=function(){return a(t,r,arguments)};l?l(n.exports,"apply",{value:h}):n.exports.apply=h})(kp);var Vi=kp.exports,Pp=Te,Ap=Vi,l0=Ap(Pp("String.prototype.indexOf")),fe=function(t,e){var i=Pp(t,!!e);return typeof i=="function"&&l0(t,".prototype.")>-1?Ap(i):i},c0=bc,Cp=aa(),Op=fe,eu=Object,h0=Op("Array.prototype.push"),nu=Op("Object.prototype.propertyIsEnumerable"),u0=Cp?Object.getOwnPropertySymbols:null,Dp=function(t,e){if(t==null)throw new TypeError("target must be an object");var i=eu(t);if(arguments.length===1)return i;for(var s=1;s2&&!!arguments[2];return(!i||P0)&&(k0?iu(t,"name",e,!0,!0):iu(t,"name",e)),t},O0=C0,D0=Sn,E0=Object,Rp=O0(function(){if(this==null||this!==E0(this))throw new D0("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),L0=Rp,T0=ei.supportsDescriptors,R0=Object.getOwnPropertyDescriptor,Ip=function(){if(T0&&/a/mig.flags==="gim"){var t=R0(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var e="",i={};if(Object.defineProperty(i,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(i,"sticky",{get:function(){e+="y"}}),e==="dy")return t.get}}return L0},I0=ei.supportsDescriptors,F0=Ip,B0=Object.getOwnPropertyDescriptor,z0=Object.defineProperty,N0=TypeError,su=Object.getPrototypeOf,W0=/a/,V0=function(){if(!I0||!su)throw new N0("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=F0(),e=su(W0),i=B0(e,"flags");return(!i||i.get!==t)&&z0(e,"flags",{configurable:!0,enumerable:!1,get:t}),t},j0=ei,H0=Vi,$0=Rp,Fp=Ip,Y0=V0,Bp=H0(Fp());j0(Bp,{getPolyfill:Fp,implementation:$0,shim:Y0});var U0=Bp,so={exports:{}},X0=aa,ni=function(){return X0()&&!!Symbol.toStringTag},G0=ni(),q0=fe,vl=q0("Object.prototype.toString"),la=function(t){return G0&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:vl(t)==="[object Arguments]"},zp=function(t){return la(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&vl(t)!=="[object Array]"&&vl(t.callee)==="[object Function]"},K0=function(){return la(arguments)}();la.isLegacyArguments=zp;var Np=K0?la:zp;const J0={},Z0=Object.freeze(Object.defineProperty({__proto__:null,default:J0},Symbol.toStringTag,{value:"Module"})),Q0=ra(Z0);var Mc=typeof Map=="function"&&Map.prototype,Da=Object.getOwnPropertyDescriptor&&Mc?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,xo=Mc&&Da&&typeof Da.get=="function"?Da.get:null,ru=Mc&&Map.prototype.forEach,kc=typeof Set=="function"&&Set.prototype,Ea=Object.getOwnPropertyDescriptor&&kc?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,wo=kc&&Ea&&typeof Ea.get=="function"?Ea.get:null,ou=kc&&Set.prototype.forEach,tv=typeof WeakMap=="function"&&WeakMap.prototype,Ts=tv?WeakMap.prototype.has:null,ev=typeof WeakSet=="function"&&WeakSet.prototype,Rs=ev?WeakSet.prototype.has:null,nv=typeof WeakRef=="function"&&WeakRef.prototype,au=nv?WeakRef.prototype.deref:null,iv=Boolean.prototype.valueOf,sv=Object.prototype.toString,rv=Function.prototype.toString,ov=String.prototype.match,Pc=String.prototype.slice,ln=String.prototype.replace,av=String.prototype.toUpperCase,lu=String.prototype.toLowerCase,Wp=RegExp.prototype.test,cu=Array.prototype.concat,Me=Array.prototype.join,lv=Array.prototype.slice,hu=Math.floor,xl=typeof BigInt=="function"?BigInt.prototype.valueOf:null,La=Object.getOwnPropertySymbols,wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ci=typeof Symbol=="function"&&typeof Symbol.iterator=="object",zt=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ci||"symbol")?Symbol.toStringTag:null,Vp=Object.prototype.propertyIsEnumerable,uu=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(n){return n.__proto__}:null);function fu(n,t){if(n===1/0||n===-1/0||n!==n||n&&n>-1e3&&n<1e3||Wp.call(/e/,t))return t;var e=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof n=="number"){var i=n<0?-hu(-n):hu(n);if(i!==n){var s=String(i),r=Pc.call(t,s.length+1);return ln.call(s,e,"$&_")+"."+ln.call(ln.call(r,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ln.call(t,e,"$&_")}var Sl=Q0,du=Sl.custom,gu=Hp(du)?du:null,cv=function n(t,e,i,s){var r=e||{};if(rn(r,"quoteStyle")&&r.quoteStyle!=="single"&&r.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(rn(r,"maxStringLength")&&(typeof r.maxStringLength=="number"?r.maxStringLength<0&&r.maxStringLength!==1/0:r.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=rn(r,"customInspect")?r.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(rn(r,"indent")&&r.indent!==null&&r.indent!==" "&&!(parseInt(r.indent,10)===r.indent&&r.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(rn(r,"numericSeparator")&&typeof r.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=r.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Yp(t,r);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return a?fu(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return a?fu(t,c):c}var h=typeof r.depth>"u"?5:r.depth;if(typeof i>"u"&&(i=0),i>=h&&h>0&&typeof t=="object")return Ml(t)?"[Array]":"[Object]";var u=Av(r,i);if(typeof s>"u")s=[];else if($p(s,t)>=0)return"[Circular]";function f(L,T,D){if(T&&(s=lv.call(s),s.push(T)),D){var R={depth:r.depth};return rn(r,"quoteStyle")&&(R.quoteStyle=r.quoteStyle),n(L,R,i+1,s)}return n(L,r,i+1,s)}if(typeof t=="function"&&!pu(t)){var d=yv(t),g=yr(t,f);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(g.length>0?" { "+Me.call(g,", ")+" }":"")}if(Hp(t)){var m=Ci?ln.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):wl.call(t);return typeof t=="object"&&!Ci?Yi(m):m}if(Mv(t)){for(var y="<"+lu.call(String(t.nodeName)),v=t.attributes||[],p=0;p",y}if(Ml(t)){if(t.length===0)return"[]";var _=yr(t,f);return u&&!Pv(_)?"["+kl(_,u)+"]":"[ "+Me.call(_,", ")+" ]"}if(fv(t)){var b=yr(t,f);return!("cause"in Error.prototype)&&"cause"in t&&!Vp.call(t,"cause")?"{ ["+String(t)+"] "+Me.call(cu.call("[cause]: "+f(t.cause),b),", ")+" }":b.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Me.call(b,", ")+" }"}if(typeof t=="object"&&o){if(gu&&typeof t[gu]=="function"&&Sl)return Sl(t,{depth:h-i});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(_v(t)){var x=[];return ru&&ru.call(t,function(L,T){x.push(f(T,t,!0)+" => "+f(L,t))}),mu("Map",xo.call(t),x,u)}if(wv(t)){var w=[];return ou&&ou.call(t,function(L){w.push(f(L,t))}),mu("Set",wo.call(t),w,u)}if(vv(t))return Ta("WeakMap");if(Sv(t))return Ta("WeakSet");if(xv(t))return Ta("WeakRef");if(gv(t))return Yi(f(Number(t)));if(mv(t))return Yi(f(xl.call(t)));if(pv(t))return Yi(iv.call(t));if(dv(t))return Yi(f(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(t===oa)return"{ [object globalThis] }";if(!uv(t)&&!pu(t)){var S=yr(t,f),M=uu?uu(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",C=!M&&zt&&Object(t)===t&&zt in t?Pc.call(Mn(t),8,-1):P?"Object":"",k=M||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",A=k+(C||P?"["+Me.call(cu.call([],C||[],P||[]),": ")+"] ":"");return S.length===0?A+"{}":u?A+"{"+kl(S,u)+"}":A+"{ "+Me.call(S,", ")+" }"}return String(t)};function jp(n,t,e){var i=(e.quoteStyle||t)==="double"?'"':"'";return i+n+i}function hv(n){return ln.call(String(n),/"/g,""")}function Ml(n){return Mn(n)==="[object Array]"&&(!zt||!(typeof n=="object"&&zt in n))}function uv(n){return Mn(n)==="[object Date]"&&(!zt||!(typeof n=="object"&&zt in n))}function pu(n){return Mn(n)==="[object RegExp]"&&(!zt||!(typeof n=="object"&&zt in n))}function fv(n){return Mn(n)==="[object Error]"&&(!zt||!(typeof n=="object"&&zt in n))}function dv(n){return Mn(n)==="[object String]"&&(!zt||!(typeof n=="object"&&zt in n))}function gv(n){return Mn(n)==="[object Number]"&&(!zt||!(typeof n=="object"&&zt in n))}function pv(n){return Mn(n)==="[object Boolean]"&&(!zt||!(typeof n=="object"&&zt in n))}function Hp(n){if(Ci)return n&&typeof n=="object"&&n instanceof Symbol;if(typeof n=="symbol")return!0;if(!n||typeof n!="object"||!wl)return!1;try{return wl.call(n),!0}catch{}return!1}function mv(n){if(!n||typeof n!="object"||!xl)return!1;try{return xl.call(n),!0}catch{}return!1}var bv=Object.prototype.hasOwnProperty||function(n){return n in this};function rn(n,t){return bv.call(n,t)}function Mn(n){return sv.call(n)}function yv(n){if(n.name)return n.name;var t=ov.call(rv.call(n),/^function\s*([\w$]+)/);return t?t[1]:null}function $p(n,t){if(n.indexOf)return n.indexOf(t);for(var e=0,i=n.length;et.maxStringLength){var e=n.length-t.maxStringLength,i="... "+e+" more character"+(e>1?"s":"");return Yp(Pc.call(n,0,t.maxStringLength),t)+i}var s=ln.call(ln.call(n,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,kv);return jp(s,"single",t)}function kv(n){var t=n.charCodeAt(0),e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return e?"\\"+e:"\\x"+(t<16?"0":"")+av.call(t.toString(16))}function Yi(n){return"Object("+n+")"}function Ta(n){return n+" { ? }"}function mu(n,t,e,i){var s=i?kl(e,i):Me.call(e,", ");return n+" ("+t+") {"+s+"}"}function Pv(n){for(var t=0;t=0)return!1;return!0}function Av(n,t){var e;if(n.indent===" ")e=" ";else if(typeof n.indent=="number"&&n.indent>0)e=Me.call(Array(n.indent+1)," ");else return null;return{base:e,prev:Me.call(Array(t+1),e)}}function kl(n,t){if(n.length===0)return"";var e=` `+t.prev+t.base;return e+Me.call(n,","+e)+` `+t.prev}function yr(n,t){var e=Ml(n),i=[];if(e){i.length=n.length;for(var s=0;s=i)return e+1;var s=Mu(t,e);if(s<55296||s>56319)return e+1;var r=Mu(t,e+1);return r<56320||r>57343?e+1:e+2},Ia=function(t){var e=0;return{next:function(){var s=e>=t.length,r;return s||(r=t[e],e+=1),{done:s,value:r}}}},ku=function(t,e){if(Jv(t)||vu(t))return Ia(t);if(Zv(t)){var i=0;return{next:function(){var r=nx(t,i),o=ex(t,i,r);return i=r,{done:r>t.length,value:o}}}}if(e&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!Qv&&!tx)so.exports=function(t){if(t!=null)return ku(t,!0)};else{var ix=Jp,sx=Qp,Pu=de("Map.prototype.forEach",!0),Au=de("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Cu=de("Map.prototype.iterator",!0),Ou=de("Set.prototype.iterator",!0);var Du=de("Map.prototype.@@iterator",!0)||de("Map.prototype._es6-shim iterator_",!0),Eu=de("Set.prototype.@@iterator",!0)||de("Set.prototype._es6-shim iterator_",!0),rx=function(t){if(ix(t)){if(Cu)return xu(Cu(t));if(Du)return Du(t);if(Pu){var e=[];return Pu(t,function(s,r){Su(e,[r,s])}),Ia(e)}}if(sx(t)){if(Ou)return xu(Ou(t));if(Eu)return Eu(t);if(Au){var i=[];return Au(t,function(s){Su(i,s)}),Ia(i)}}};so.exports=function(t){return rx(t)||ku(t)}}}var ox=so.exports,Lu=function(n){return n!==n},tm=function(t,e){return t===0&&e===0?1/t===1/e:!!(t===e||Lu(t)&&Lu(e))},ax=tm,em=function(){return typeof Object.is=="function"?Object.is:ax},lx=em,cx=ei,hx=function(){var t=lx();return cx(Object,{is:t},{is:function(){return Object.is!==t}}),t},ux=ei,fx=Vi,dx=tm,nm=em,gx=hx,im=fx(nm(),Object);ux(im,{getPolyfill:nm,implementation:dx,shim:gx});var px=im,mx=Vi,sm=fe,bx=Te,Pl=bx("%ArrayBuffer%",!0),ro=sm("ArrayBuffer.prototype.byteLength",!0),yx=sm("Object.prototype.toString"),Tu=!!Pl&&!ro&&new Pl(0).slice,Ru=!!Tu&&mx(Tu),rm=ro||Ru?function(t){if(!t||typeof t!="object")return!1;try{return ro?ro(t):Ru(t,0),!0}catch{return!1}}:Pl?function(t){return yx(t)==="[object ArrayBuffer]"}:function(t){return!1},_x=Date.prototype.getDay,vx=function(t){try{return _x.call(t),!0}catch{return!1}},xx=Object.prototype.toString,wx="[object Date]",Sx=ni(),Mx=function(t){return typeof t!="object"||t===null?!1:Sx?vx(t):xx.call(t)===wx},Al=fe,om=ni(),am,lm,Cl,Ol;if(om){am=Al("Object.prototype.hasOwnProperty"),lm=Al("RegExp.prototype.exec"),Cl={};var Fa=function(){throw Cl};Ol={toString:Fa,valueOf:Fa},typeof Symbol.toPrimitive=="symbol"&&(Ol[Symbol.toPrimitive]=Fa)}var kx=Al("Object.prototype.toString"),Px=Object.getOwnPropertyDescriptor,Ax="[object RegExp]",Cx=om?function(t){if(!t||typeof t!="object")return!1;var e=Px(t,"lastIndex"),i=e&&am(e,"value");if(!i)return!1;try{lm(t,Ol)}catch(s){return s===Cl}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:kx(t)===Ax},Ox=fe,Iu=Ox("SharedArrayBuffer.prototype.byteLength",!0),Dx=Iu?function(t){if(!t||typeof t!="object")return!1;try{return Iu(t),!0}catch{return!1}}:function(t){return!1},Ex=Number.prototype.toString,Lx=function(t){try{return Ex.call(t),!0}catch{return!1}},Tx=Object.prototype.toString,Rx="[object Number]",Ix=ni(),Fx=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:Ix?Lx(t):Tx.call(t)===Rx},cm=fe,Bx=cm("Boolean.prototype.toString"),zx=cm("Object.prototype.toString"),Nx=function(t){try{return Bx(t),!0}catch{return!1}},Wx="[object Boolean]",Vx=ni(),jx=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:Vx&&Symbol.toStringTag in t?Nx(t):zx(t)===Wx},Dl={exports:{}},Hx=Object.prototype.toString,$x=yc();if($x){var Yx=Symbol.prototype.toString,Ux=/^Symbol\(.*\)$/,Xx=function(t){return typeof t.valueOf()!="symbol"?!1:Ux.test(Yx.call(t))};Dl.exports=function(t){if(typeof t=="symbol")return!0;if(Hx.call(t)!=="[object Symbol]")return!1;try{return Xx(t)}catch{return!1}}}else Dl.exports=function(t){return!1};var Gx=Dl.exports,El={exports:{}},Fu=typeof BigInt<"u"&&BigInt,qx=function(){return typeof Fu=="function"&&typeof BigInt=="function"&&typeof Fu(42)=="bigint"&&typeof BigInt(42)=="bigint"},Kx=qx();if(Kx){var Jx=BigInt.prototype.valueOf,Zx=function(t){try{return Jx.call(t),!0}catch{}return!1};El.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:Zx(t)}}else El.exports=function(t){return!1};var Qx=El.exports,t1=qp,e1=Fx,n1=jx,i1=Gx,s1=Qx,r1=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(t1(t))return"String";if(e1(t))return"Number";if(n1(t))return"Boolean";if(i1(t))return"Symbol";if(s1(t))return"BigInt"},ko=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,Bu=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,Po;ko||(Po=function(t){return!1});var Ll=ko?ko.prototype.has:null,Ba=Bu?Bu.prototype.has:null;!Po&&!Ll&&(Po=function(t){return!1});var o1=Po||function(t){if(!t||typeof t!="object")return!1;try{if(Ll.call(t,Ll),Ba)try{Ba.call(t,Ba)}catch{return!0}return t instanceof ko}catch{}return!1},Tl={exports:{}},a1=Te,hm=fe,l1=a1("%WeakSet%",!0),za=hm("WeakSet.prototype.has",!0);if(za){var Na=hm("WeakMap.prototype.has",!0);Tl.exports=function(t){if(!t||typeof t!="object")return!1;try{if(za(t,za),Na)try{Na(t,Na)}catch{return!0}return t instanceof l1}catch{}return!1}}else Tl.exports=function(t){return!1};var c1=Tl.exports,h1=Jp,u1=Qp,f1=o1,d1=c1,g1=function(t){if(t&&typeof t=="object"){if(h1(t))return"Map";if(u1(t))return"Set";if(f1(t))return"WeakMap";if(d1(t))return"WeakSet"}return!1},um=Function.prototype.toString,_i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Rl,oo;if(typeof _i=="function"&&typeof Object.defineProperty=="function")try{Rl=Object.defineProperty({},"length",{get:function(){throw oo}}),oo={},_i(function(){throw 42},null,Rl)}catch(n){n!==oo&&(_i=null)}else _i=null;var p1=/^\s*class\b/,Il=function(t){try{var e=um.call(t);return p1.test(e)}catch{return!1}},Wa=function(t){try{return Il(t)?!1:(um.call(t),!0)}catch{return!1}},ao=Object.prototype.toString,m1="[object Object]",b1="[object Function]",y1="[object GeneratorFunction]",_1="[object HTMLAllCollection]",v1="[object HTML document.all class]",x1="[object HTMLCollection]",w1=typeof Symbol=="function"&&!!Symbol.toStringTag,S1=!(0 in[,]),Fl=function(){return!1};if(typeof document=="object"){var M1=document.all;ao.call(M1)===ao.call(document.all)&&(Fl=function(t){if((S1||!t)&&(typeof t>"u"||typeof t=="object"))try{var e=ao.call(t);return(e===_1||e===v1||e===x1||e===m1)&&t("")==null}catch{}return!1})}var k1=_i?function(t){if(Fl(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{_i(t,null,Rl)}catch(e){if(e!==oo)return!1}return!Il(t)&&Wa(t)}:function(t){if(Fl(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(w1)return Wa(t);if(Il(t))return!1;var e=ao.call(t);return e!==b1&&e!==y1&&!/^\[object HTML/.test(e)?!1:Wa(t)},P1=k1,A1=Object.prototype.toString,fm=Object.prototype.hasOwnProperty,C1=function(t,e,i){for(var s=0,r=t.length;s=3&&(s=i),A1.call(t)==="[object Array]"?C1(t,e,s):typeof t=="string"?O1(t,e,s):D1(t,e,s)},L1=E1,T1=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Va=T1,R1=typeof globalThis>"u"?oa:globalThis,I1=function(){for(var t=[],e=0;e"u"?oa:globalThis,Bl=F1(),Lc=Ec("String.prototype.slice"),ja=Object.getPrototypeOf,z1=Ec("Array.prototype.indexOf",!0)||function(t,e){for(var i=0;i-1?e:e!=="Object"?!1:W1(t)}return lo?N1(t):null},j1=fe,Wu=j1("ArrayBuffer.prototype.byteLength",!0),H1=rm,$1=function(t){return H1(t)?Wu?Wu(t):t.byteLength:NaN},gm=w0,Re=fe,Vu=U0,Y1=Te,Oi=ox,U1=Xp,ju=px,Hu=Np,$u=Gp,Yu=rm,Uu=Mx,Xu=Cx,Gu=Dx,qu=bc,Ku=r1,Ju=g1,Zu=V1,Qu=$1,tf=Re("SharedArrayBuffer.prototype.byteLength",!0),ef=Re("Date.prototype.getTime"),Ha=Object.getPrototypeOf,nf=Re("Object.prototype.toString"),Oo=Y1("%Set%",!0),zl=Re("Map.prototype.has",!0),Do=Re("Map.prototype.get",!0),sf=Re("Map.prototype.size",!0),Eo=Re("Set.prototype.add",!0),pm=Re("Set.prototype.delete",!0),Lo=Re("Set.prototype.has",!0),co=Re("Set.prototype.size",!0);function rf(n,t,e,i){for(var s=Oi(n),r;(r=s.next())&&!r.done;)if(be(t,r.value,e,i))return pm(n,r.value),!0;return!1}function mm(n){if(typeof n>"u")return null;if(typeof n!="object")return typeof n=="symbol"?!1:typeof n=="string"||typeof n=="number"?+n==+n:!0}function X1(n,t,e,i,s,r){var o=mm(e);if(o!=null)return o;var a=Do(t,o),l=gm({},s,{strict:!1});return typeof a>"u"&&!zl(t,o)||!be(i,a,l,r)?!1:!zl(n,o)&&be(i,a,l,r)}function G1(n,t,e){var i=mm(e);return i??(Lo(t,i)&&!Lo(n,i))}function of(n,t,e,i,s,r){for(var o=Oi(n),a,l;(a=o.next())&&!a.done;)if(l=a.value,be(e,l,s,r)&&be(i,Do(t,l),s,r))return pm(n,l),!0;return!1}function be(n,t,e,i){var s=e||{};if(s.strict?ju(n,t):n===t)return!0;var r=Ku(n),o=Ku(t);if(r!==o)return!1;if(!n||!t||typeof n!="object"&&typeof t!="object")return s.strict?ju(n,t):n==t;var a=i.has(n),l=i.has(t),c;if(a&&l){if(i.get(n)===i.get(t))return!0}else c={};return a||i.set(n,c),l||i.set(t,c),J1(n,t,s,i)}function af(n){return!n||typeof n!="object"||typeof n.length!="number"||typeof n.copy!="function"||typeof n.slice!="function"||n.length>0&&typeof n[0]!="number"?!1:!!(n.constructor&&n.constructor.isBuffer&&n.constructor.isBuffer(n))}function q1(n,t,e,i){if(co(n)!==co(t))return!1;for(var s=Oi(n),r=Oi(t),o,a,l;(o=s.next())&&!o.done;)if(o.value&&typeof o.value=="object")l||(l=new Oo),Eo(l,o.value);else if(!Lo(t,o.value)){if(e.strict||!G1(n,t,o.value))return!1;l||(l=new Oo),Eo(l,o.value)}if(l){for(;(a=r.next())&&!a.done;)if(a.value&&typeof a.value=="object"){if(!rf(l,a.value,e.strict,i))return!1}else if(!e.strict&&!Lo(n,a.value)&&!rf(l,a.value,e.strict,i))return!1;return co(l)===0}return!0}function K1(n,t,e,i){if(sf(n)!==sf(t))return!1;for(var s=Oi(n),r=Oi(t),o,a,l,c,h,u;(o=s.next())&&!o.done;)if(c=o.value[0],h=o.value[1],c&&typeof c=="object")l||(l=new Oo),Eo(l,c);else if(u=Do(t,c),typeof u>"u"&&!zl(t,c)||!be(h,u,e,i)){if(e.strict||!X1(n,t,c,h,e,i))return!1;l||(l=new Oo),Eo(l,c)}if(l){for(;(a=r.next())&&!a.done;)if(c=a.value[0],u=a.value[1],c&&typeof c=="object"){if(!of(l,n,c,u,e,i))return!1}else if(!e.strict&&(!n.has(c)||!be(Do(n,c),u,e,i))&&!of(l,n,c,u,gm({},e,{strict:!1}),i))return!1;return co(l)===0}return!0}function J1(n,t,e,i){var s,r;if(typeof n!=typeof t||n==null||t==null||nf(n)!==nf(t)||Hu(n)!==Hu(t))return!1;var o=$u(n),a=$u(t);if(o!==a)return!1;var l=n instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(n.name!==t.name||n.message!==t.message))return!1;var h=Xu(n),u=Xu(t);if(h!==u||(h||u)&&(n.source!==t.source||Vu(n)!==Vu(t)))return!1;var f=Uu(n),d=Uu(t);if(f!==d||(f||d)&&ef(n)!==ef(t)||e.strict&&Ha&&Ha(n)!==Ha(t))return!1;var g=Zu(n),m=Zu(t);if(g!==m)return!1;if(g||m){if(n.length!==t.length)return!1;for(s=0;s=0;s--)if(w[s]!=S[s])return!1;for(s=w.length-1;s>=0;s--)if(r=w[s],!be(n[r],t[r],e,i))return!1;var M=Ju(n),P=Ju(t);return M!==P?!1:M==="Set"||P==="Set"?q1(n,t,e,i):M==="Map"?K1(n,t,e,i):!0}var Z1=function(t,e,i){return be(t,e,i,U1())};const Q1=gp(Z1);var tw=Object.defineProperty,it=(n,t)=>tw(n,"name",{value:t,configurable:!0}),ew=class{constructor(t){this.direction=!1,this.compareProperties=!0;var e,i,s;this.precision=10**-((e=t==null?void 0:t.precision)!=null?e:17),this.direction=(i=t==null?void 0:t.direction)!=null?i:!1,this.compareProperties=(s=t==null?void 0:t.compareProperties)!=null?s:!0}compare(t,e){if(t.type!==e.type||!ys(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates);case"Polygon":return this.comparePolygon(t,e);case"GeometryCollection":return this.compareGeometryCollection(t,e);case"Feature":return this.compareFeature(t,e);case"FeatureCollection":return this.compareFeatureCollection(t,e);default:if(t.type.startsWith("Multi")){const i=Nl(t),s=Nl(e);return i.every(r=>s.some(o=>this.compare(r,o)))}}return!1}compareCoord(t,e){return t.length===e.length&&t.every((i,s)=>Math.abs(i-e[s])=0&&(i=[].concat(t.slice(s,t.length),t.slice(1,s+1))),i}comparePath(t,e){return t.every((i,s)=>this.compareCoord(i,e[s]))}comparePolygon(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){const i=t.coordinates.slice(1,t.coordinates.length),s=e.coordinates.slice(1,e.coordinates.length);return i.every(r=>s.some(o=>this.compareLine(r,o,1,!0)))}return!1}compareGeometryCollection(t,e){return ys(t.geometries,e.geometries)&&this.compareBBox(t,e)&&t.geometries.every((i,s)=>this.compare(i,e.geometries[s]))}compareFeature(t,e){return t.id===e.id&&(this.compareProperties?Q1(t.properties,e.properties):!0)&&this.compareBBox(t,e)&&this.compare(t.geometry,e.geometry)}compareFeatureCollection(t,e){return ys(t.features,e.features)&&this.compareBBox(t,e)&&t.features.every((i,s)=>this.compare(i,e.features[s]))}compareBBox(t,e){return!t.bbox&&!e.bbox||(t.bbox&&e.bbox?this.compareCoord(t.bbox,e.bbox):!1)}};it(ew,"GeojsonEquality");function ys(n,t){return n.coordinates?n.coordinates.length===t.coordinates.length:n.length===t.length}it(ys,"sameLength");function Nl(n){return n.coordinates.map(t=>({type:n.type.replace("Multi",""),coordinates:t}))}it(Nl,"explode");var qt=63710088e-1,bm={centimeters:qt*100,centimetres:qt*100,degrees:360/(2*Math.PI),feet:qt*3.28084,inches:qt*39.37,kilometers:qt/1e3,kilometres:qt/1e3,meters:qt,metres:qt,miles:qt/1609.344,millimeters:qt*1e3,millimetres:qt*1e3,nauticalmiles:qt/1852,radians:1,yards:qt*1.0936},lf={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Le(n,t,e={}){const i={type:"Feature"};return(e.id===0||e.id)&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.properties=t||{},i.geometry=n,i}it(Le,"feature");function nw(n,t,e={}){switch(n){case"Point":return je(t).geometry;case"LineString":return Xe(t).geometry;case"Polygon":return Tc(t).geometry;case"MultiPoint":return _m(t).geometry;case"MultiLineString":return ym(t).geometry;case"MultiPolygon":return vm(t).geometry;default:throw new Error(n+" is invalid")}}it(nw,"geometry");function je(n,t,e={}){if(!n)throw new Error("coordinates is required");if(!Array.isArray(n))throw new Error("coordinates must be an Array");if(n.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!To(n[0])||!To(n[1]))throw new Error("coordinates must contain numbers");return Le({type:"Point",coordinates:n},t,e)}it(je,"point");function iw(n,t,e={}){return ca(n.map(i=>je(i,t)),e)}it(iw,"points");function Tc(n,t,e={}){for(const s of n){if(s.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(s[s.length-1].length!==s[0].length)throw new Error("First and last Position are not equivalent.");for(let r=0;rTc(i,t)),e)}it(sw,"polygons");function Xe(n,t,e={}){if(n.length<2)throw new Error("coordinates must be an array of two or more positions");return Le({type:"LineString",coordinates:n},t,e)}it(Xe,"lineString");function rw(n,t,e={}){return ca(n.map(i=>Xe(i,t)),e)}it(rw,"lineStrings");function ca(n,t={}){const e={type:"FeatureCollection"};return t.id&&(e.id=t.id),t.bbox&&(e.bbox=t.bbox),e.features=n,e}it(ca,"featureCollection");function ym(n,t,e={}){return Le({type:"MultiLineString",coordinates:n},t,e)}it(ym,"multiLineString");function _m(n,t,e={}){return Le({type:"MultiPoint",coordinates:n},t,e)}it(_m,"multiPoint");function vm(n,t,e={}){return Le({type:"MultiPolygon",coordinates:n},t,e)}it(vm,"multiPolygon");function ow(n,t,e={}){return Le({type:"GeometryCollection",geometries:n},t,e)}it(ow,"geometryCollection");function aw(n,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");const e=Math.pow(10,t||0);return Math.round(n*e)/e}it(aw,"round");function xm(n,t="kilometers"){const e=bm[t];if(!e)throw new Error(t+" units is invalid");return n*e}it(xm,"radiansToLength");function Rc(n,t="kilometers"){const e=bm[t];if(!e)throw new Error(t+" units is invalid");return n/e}it(Rc,"lengthToRadians");function lw(n,t){return wm(Rc(n,t))}it(lw,"lengthToDegrees");function cw(n){let t=n%360;return t<0&&(t+=360),t}it(cw,"bearingToAzimuth");function wm(n){return n%(2*Math.PI)*180/Math.PI}it(wm,"radiansToDegrees");function hw(n){return n%360*Math.PI/180}it(hw,"degreesToRadians");function uw(n,t="kilometers",e="kilometers"){if(!(n>=0))throw new Error("length must be a positive number");return xm(Rc(n,t),e)}it(uw,"convertLength");function fw(n,t="meters",e="kilometers"){if(!(n>=0))throw new Error("area must be a positive number");const i=lf[t];if(!i)throw new Error("invalid original units");const s=lf[e];if(!s)throw new Error("invalid final units");return n/i*s}it(fw,"convertArea");function To(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}it(To,"isNumber");function Ic(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)}it(Ic,"isObject");function dw(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(t=>{if(!To(t))throw new Error("bbox must only contain numbers")})}it(dw,"validateBBox");function gw(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}it(gw,"validateId");var pw=Object.defineProperty,Et=(n,t)=>pw(n,"name",{value:t,configurable:!0});function Hi(n,t,e){if(n!==null)for(var i,s,r,o,a,l,c,h=0,u=0,f,d=n.type,g=d==="FeatureCollection",m=d==="Feature",y=g?n.features.length:1,v=0;vl||g>c||m>h){a=u,l=i,c=g,h=m,r=0;return}var y=Xe([a,u],e.properties);if(t(y,i,s,m,r)===!1)return!1;r++,a=u})===!1)return!1}}})}Et(km,"segmentEach");function ww(n,t,e){var i=e,s=!1;return km(n,function(r,o,a,l,c){s===!1&&e===void 0?i=r:i=t(i,r,o,a,l,c),s=!0}),i}Et(ww,"segmentReduce");function Pm(n,t){if(!n)throw new Error("geojson is required");ha(n,function(e,i,s){if(e.geometry!==null){var r=e.geometry.type,o=e.geometry.coordinates;switch(r){case"LineString":if(t(e,i,s,0,0)===!1)return!1;break;case"Polygon":for(var a=0;aPw(n,"name",{value:t,configurable:!0});function Bc(n,t={}){if(n.bbox!=null&&t.recompute!==!0)return n.bbox;const e=[1/0,1/0,-1/0,-1/0];return Hi(n,i=>{e[0]>i[0]&&(e[0]=i[0]),e[1]>i[1]&&(e[1]=i[1]),e[2]=0))throw new Error("precision must be a positive number");var e=Math.pow(10,t||0);return Math.round(n*e)/e}function Wc(n,t){t===void 0&&(t="kilometers");var e=zc[t];if(!e)throw new Error(t+" units is invalid");return n*e}function ua(n,t){t===void 0&&(t="kilometers");var e=zc[t];if(!e)throw new Error(t+" units is invalid");return n/e}function Bw(n,t){return Xs(ua(n,t))}function zw(n){var t=n%360;return t<0&&(t+=360),t}function Xs(n){var t=n%(2*Math.PI);return t*180/Math.PI}function le(n){var t=n%360;return t*Math.PI/180}function Nw(n,t,e){if(t===void 0&&(t="kilometers"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("length must be a positive number");return Wc(ua(n,t),e)}function Ww(n,t,e){if(t===void 0&&(t="meters"),e===void 0&&(e="kilometers"),!(n>=0))throw new Error("area must be a positive number");var i=Wl[t];if(!i)throw new Error("invalid original units");var s=Wl[e];if(!s)throw new Error("invalid final units");return n/i*s}function Ro(n){return!isNaN(n)&&n!==null&&!Array.isArray(n)}function Vc(n){return!!n&&n.constructor===Object}function Vw(n){if(!n)throw new Error("bbox is required");if(!Array.isArray(n))throw new Error("bbox must be an Array");if(n.length!==4&&n.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");n.forEach(function(t){if(!Ro(t))throw new Error("bbox must only contain numbers")})}function jw(n){if(!n)throw new Error("id is required");if(["string","number"].indexOf(typeof n)===-1)throw new Error("id must be a number or a string")}const Hw=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:Wl,bearingToAzimuth:zw,convertArea:Ww,convertLength:Nw,degreesToRadians:le,earthRadius:Lt,factors:zc,feature:ce,featureCollection:Jn,geometry:Ew,geometryCollection:Iw,isNumber:Ro,isObject:Vc,lengthToDegrees:Bw,lengthToRadians:ua,lineString:ae,lineStrings:Rw,multiLineString:Am,multiPoint:Cm,multiPolygon:Om,point:Yt,points:Lw,polygon:Nc,polygons:Tw,radiansToDegrees:Xs,radiansToLength:Wc,round:Fw,unitsFactors:Dw,validateBBox:Vw,validateId:jw},Symbol.toStringTag,{value:"Module"}));function Gs(n){if(!n)throw new Error("coord is required");if(!Array.isArray(n)){if(n.type==="Feature"&&n.geometry!==null&&n.geometry.type==="Point")return n.geometry.coordinates;if(n.type==="Point")return n.coordinates}if(Array.isArray(n)&&n.length>=2&&!Array.isArray(n[0])&&!Array.isArray(n[1]))return n;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Di(n){if(Array.isArray(n))return n;if(n.type==="Feature"){if(n.geometry!==null)return n.geometry.coordinates}else if(n.coordinates)return n.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function Dm(n,t,e){if(e===void 0&&(e={}),e.final===!0)return $w(n,t);var i=Gs(n),s=Gs(t),r=le(i[0]),o=le(s[0]),a=le(i[1]),l=le(s[1]),c=Math.sin(o-r)*Math.cos(l),h=Math.cos(a)*Math.sin(l)-Math.sin(a)*Math.cos(l)*Math.cos(o-r);return Xs(Math.atan2(c,h))}function $w(n,t){var e=Dm(t,n);return e=(e+180)%360,e}function Gi(n,t,e){e===void 0&&(e={});var i=Gs(n),s=Gs(t),r=le(s[1]-i[1]),o=le(s[0]-i[0]),a=le(i[1]),l=le(s[1]),c=Math.pow(Math.sin(r/2),2)+Math.pow(Math.sin(o/2),2)*Math.cos(a)*Math.cos(l);return Wc(2*Math.atan2(Math.sqrt(c),Math.sqrt(1-c)),e.units)}function cf(n,t,e,i){i===void 0&&(i={});var s=Gs(n),r=le(s[0]),o=le(s[1]),a=le(e),l=ua(t,i.units),c=Math.asin(Math.sin(o)*Math.cos(l)+Math.cos(o)*Math.sin(l)*Math.cos(a)),h=r+Math.atan2(Math.sin(a)*Math.sin(l)*Math.cos(o),Math.cos(l)-Math.sin(o)*Math.sin(c)),u=Xs(h),f=Xs(c);return Yt([u,f],i.properties)}function ar(n,t,e){if(n!==null)for(var i,s,r,o,a,l,c,h=0,u=0,f,d=n.type,g=d==="FeatureCollection",m=d==="Feature",y=g?n.features.length:1,v=0;vl||g>c||m>h){a=u,l=i,c=g,h=m,r=0;return}var y=ae([a,u],e.properties);if(t(y,i,s,m,r)===!1)return!1;r++,a=u})===!1)return!1}}})}function Jw(n,t,e){var i=e,s=!1;return Lm(n,function(r,o,a,l,c){s===!1&&e===void 0?i=r:i=t(i,r,o,a,l,c),s=!0}),i}function Tm(n,t){if(!n)throw new Error("geojson is required");$i(n,function(e,i,s){if(e.geometry!==null){var r=e.geometry.type,o=e.geometry.coordinates;switch(r){case"LineString":if(t(e,i,s,0,0)===!1)return!1;break;case"Polygon":for(var a=0;as?e:s,c=i>r?i:r;return[o,a,l,c]}var Hc={exports:{}},Rm={exports:{}};(function(n,t){(function(e,i){n.exports=i()})(oa,function(){function e(p,_,b,x,w){(function S(M,P,C,k,A){for(;k>C;){if(k-C>600){var L=k-C+1,T=P-C+1,D=Math.log(L),R=.5*Math.exp(2*D/3),I=.5*Math.sqrt(D*R*(L-R)/L)*(T-L/2<0?-1:1),G=Math.max(C,Math.floor(P-T*R/L+I)),Z=Math.min(k,Math.floor(P+(L-T)*R/L+I));S(M,P,G,Z,A)}var ht=M[P],St=C,st=k;for(i(M,C,P),A(M[k],ht)>0&&i(M,C,k);St0;)st--}A(M[C],ht)===0?i(M,C,st):i(M,++st,k),st<=P&&(C=st+1),P<=st&&(k=st-1)}})(p,_,b||0,x||p.length-1,w||s)}function i(p,_,b){var x=p[_];p[_]=p[b],p[b]=x}function s(p,_){return p<_?-1:p>_?1:0}var r=function(p){p===void 0&&(p=9),this._maxEntries=Math.max(4,p),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function o(p,_,b){if(!b)return _.indexOf(p);for(var x=0;x<_.length;x++)if(b(p,_[x]))return x;return-1}function a(p,_){l(p,0,p.children.length,_,p)}function l(p,_,b,x,w){w||(w=y(null)),w.minX=1/0,w.minY=1/0,w.maxX=-1/0,w.maxY=-1/0;for(var S=_;S=p.minX&&_.maxY>=p.minY}function y(p){return{children:p,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(p,_,b,x,w){for(var S=[_,b];S.length;)if(!((b=S.pop())-(_=S.pop())<=x)){var M=_+Math.ceil((b-_)/x/2)*x;e(p,M,_,b,w),S.push(_,M,M,b)}}return r.prototype.all=function(){return this._all(this.data,[])},r.prototype.search=function(p){var _=this.data,b=[];if(!m(p,_))return b;for(var x=this.toBBox,w=[];_;){for(var S=0;S<_.children.length;S++){var M=_.children[S],P=_.leaf?x(M):M;m(p,P)&&(_.leaf?b.push(M):g(p,P)?this._all(M,b):w.push(M))}_=w.pop()}return b},r.prototype.collides=function(p){var _=this.data;if(!m(p,_))return!1;for(var b=[];_;){for(var x=0;x<_.children.length;x++){var w=_.children[x],S=_.leaf?this.toBBox(w):w;if(m(p,S)){if(_.leaf||g(p,S))return!0;b.push(w)}}_=b.pop()}return!1},r.prototype.load=function(p){if(!p||!p.length)return this;if(p.length=0&&w[_].children.length>this._maxEntries;)this._split(w,_),_--;this._adjustParentBBoxes(x,w,_)},r.prototype._split=function(p,_){var b=p[_],x=b.children.length,w=this._minEntries;this._chooseSplitAxis(b,w,x);var S=this._chooseSplitIndex(b,w,x),M=y(b.children.splice(S,b.children.length-S));M.height=b.height,M.leaf=b.leaf,a(b,this.toBBox),a(M,this.toBBox),_?p[_-1].children.push(M):this._splitRoot(b,M)},r.prototype._splitRoot=function(p,_){this.data=y([p,_]),this.data.height=p.height+1,this.data.leaf=!1,a(this.data,this.toBBox)},r.prototype._chooseSplitIndex=function(p,_,b){for(var x,w,S,M,P,C,k,A=1/0,L=1/0,T=_;T<=b-_;T++){var D=l(p,0,T,this.toBBox),R=l(p,T,b,this.toBBox),I=(w=D,S=R,M=void 0,P=void 0,C=void 0,k=void 0,M=Math.max(w.minX,S.minX),P=Math.max(w.minY,S.minY),C=Math.min(w.maxX,S.maxX),k=Math.min(w.maxY,S.maxY),Math.max(0,C-M)*Math.max(0,k-P)),G=f(D)+f(R);I=_;A--){var L=p.children[A];c(M,p.leaf?w(L):L),P+=d(M)}return P},r.prototype._adjustParentBBoxes=function(p,_,b){for(var x=b;x>=0;x--)c(_[x],p)},r.prototype._condense=function(p){for(var _=p.length-1,b=void 0;_>=0;_--)p[_].children.length===0?_>0?(b=p[_-1].children).splice(b.indexOf(p[_]),1):this.clear():a(p[_],this.toBBox)},r})})(Rm);var rS=Rm.exports;const oS=ra(Hw),aS=ra(eS),lS=ra(Ow);var ve=rS,Im=oS,Fm=aS,ai=lS.default,cS=Fm.featureEach;Fm.coordEach;Im.polygon;var uf=Im.featureCollection;function Bm(n){var t=new ve(n);return t.insert=function(e){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:ai(e),ve.prototype.insert.call(this,e)},t.load=function(e){var i=[];return Array.isArray(e)?e.forEach(function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:ai(s),i.push(s)}):cS(e,function(s){if(s.type!=="Feature")throw new Error("invalid features");s.bbox=s.bbox?s.bbox:ai(s),i.push(s)}),ve.prototype.load.call(this,i)},t.remove=function(e,i){if(e.type!=="Feature")throw new Error("invalid feature");return e.bbox=e.bbox?e.bbox:ai(e),ve.prototype.remove.call(this,e,i)},t.clear=function(){return ve.prototype.clear.call(this)},t.search=function(e){var i=ve.prototype.search.call(this,this.toBBox(e));return uf(i)},t.collides=function(e){return ve.prototype.collides.call(this,this.toBBox(e))},t.all=function(){var e=ve.prototype.all.call(this);return uf(e)},t.toJSON=function(){return ve.prototype.toJSON.call(this)},t.fromJSON=function(e){return ve.prototype.fromJSON.call(this,e)},t.toBBox=function(e){var i;if(e.bbox)i=e.bbox;else if(Array.isArray(e)&&e.length===4)i=e;else if(Array.isArray(e)&&e.length===6)i=[e[0],e[1],e[3],e[4]];else if(e.type==="Feature")i=ai(e);else if(e.type==="FeatureCollection")i=ai(e);else throw new Error("invalid geojson");return{minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}},t}Hc.exports=Bm;Hc.exports.default=Bm;var hS=Hc.exports;const uS=gp(hS);function fS(n,t){var e={},i=[];if(n.type==="LineString"&&(n=ce(n)),t.type==="LineString"&&(t=ce(t)),n.type==="Feature"&&t.type==="Feature"&&n.geometry!==null&&t.geometry!==null&&n.geometry.type==="LineString"&&t.geometry.type==="LineString"&&n.geometry.coordinates.length===2&&t.geometry.coordinates.length===2){var s=ff(n,t);return s&&i.push(s),Jn(i)}var r=uS();return r.load(hf(t)),Io(hf(n),function(o){Io(r.search(o),function(a){var l=ff(o,a);if(l){var c=Di(l).join(",");e[c]||(e[c]=!0,i.push(l))}})}),Jn(i)}function ff(n,t){var e=Di(n),i=Di(t);if(e.length!==2)throw new Error(" line1 must only contain 2 coordinates");if(i.length!==2)throw new Error(" line2 must only contain 2 coordinates");var s=e[0][0],r=e[0][1],o=e[1][0],a=e[1][1],l=i[0][0],c=i[0][1],h=i[1][0],u=i[1][1],f=(u-c)*(o-s)-(h-l)*(a-r),d=(h-l)*(r-c)-(u-c)*(s-l),g=(o-s)*(r-c)-(a-r)*(s-l);if(f===0)return null;var m=d/f,y=g/f;if(m>=0&&m<=1&&y>=0&&y<=1){var v=s+m*(o-s),p=r+m*(a-r);return Yt([v,p])}return null}function dS(n,t,e){e===void 0&&(e={});var i=Yt([1/0,1/0],{dist:1/0}),s=0;return $i(n,function(r){for(var o=Di(r),a=0;a0&&(y=m.features[0],y.properties.dist=Gi(t,y,e),y.properties.location=s+Gi(l,y,e)),l.properties.dist{if(this.active&&!this.dragFrom)this.recalculateHovering(t);else if(this.active&&this.dragFrom){if(this.hover=="polygon"){let e=this.dragFrom[0]-t.lngLat.lng,i=this.dragFrom[1]-t.lngLat.lat;for(let s of this.points)s[0]-=e,s[1]-=i}else this.points[this.hover]=t.lngLat.toArray();this.dragFrom=t.lngLat.toArray(),this.redraw()}});O(this,"onClick",t=>{if(this.beforeUpdate(),this.active&&this.cursor){let e=[];if(df(this.points).forEach((i,s)=>{e.push([s+1,dS(i,this.cursor).properties.dist])}),e.sort((i,s)=>i[1]-s[1]),e.length>0){let i=e[0][0];this.points.splice(i,0,this.cursor.geometry.coordinates),this.hover=i}else this.points.push(this.cursor.geometry.coordinates),this.hover=this.points.length-1;this.redraw(),this.pointsUpdated()}else this.active&&typeof this.hover=="number"&&(this.points.splice(this.hover,1),this.hover=null,this.redraw(),this.pointsUpdated(),this.recalculateHovering(t))});O(this,"onDoubleClick",t=>{this.active&&(t.preventDefault(),this.cursor=$a(t.lngLat.toArray()),this.onClick(t),this.finish())});O(this,"onMouseDown",t=>{this.active&&!this.dragFrom&&this.hover!=null&&(t.preventDefault(),this.cursor=null,this.dragFrom=t.lngLat.toArray(),this.beforeUpdate(),this.redraw())});O(this,"onMouseUp",()=>{this.active&&this.dragFrom&&(this.dragFrom=null,this.redraw(),this.pointsUpdated())});O(this,"onKeypress",t=>{this.active&&(t.key=="Enter"?(t.stopPropagation(),this.finish()):t.key=="z"&&t.ctrlKey&&this.undo())});O(this,"onKeyDown",t=>{this.active&&t.key=="Escape"&&(t.stopPropagation(),this.cancel())});this.map=t,this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.points=[],this.cursor=null,this.hover=null,this.dragFrom=null,this.previousStates=[],this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("mousedown",this.onMouseDown),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keypress",this.onKeypress),document.addEventListener("keydown",this.onKeyDown)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("mousedown",this.onMouseDown),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keypress",this.onKeypress),document.removeEventListener("keydown",this.onKeyDown)}finish(){let t=this.polygonFeature();if(t)for(let e of this.eventListenersSuccess)e(t);else for(let e of this.eventListenersFailure)e();this.stop()}cancel(){for(let t of this.eventListenersFailure)t();this.stop()}addEventListenerSuccess(t){this.eventListenersSuccess.push(t)}addEventListenerUpdated(t){this.eventListenersUpdated.push(t)}addEventListenerFailure(t){this.eventListenersFailure.push(t)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}startNew(){this.active=!0,this.map.doubleClickZoom.disable()}editExisting(t){this.active=!0,this.map.doubleClickZoom.disable(),this.points=JSON.parse(JSON.stringify(t.geometry.coordinates[0])),this.points.pop(),this.redraw()}stop(){this.map.doubleClickZoom.enable(),this.points=[],this.cursor=null,this.active=!1,this.hover=null,this.dragFrom=null,this.previousStates=[],this.redraw(),this.map.getCanvas().style.cursor="inherit"}undo(){this.dragFrom!=null||this.previousStates.length==0||(this.points=this.previousStates.pop(),this.hover=null,this.redraw())}redraw(){let t={type:"FeatureCollection",features:[]};this.points.forEach((s,r)=>{let o=$a(s);o.properties.hover=this.hover==r,o.properties.idx=r,t.features.push(o)}),t.features=t.features.concat(df(this.points));let e=this.polygonFeature();e&&(e.properties.hover=this.hover=="polygon",t.features.push(e)),Nm.set(t);let i="crosshair";this.hover!=null&&(i=this.dragFrom?"grabbing":"pointer"),this.map.getCanvas().style.cursor=i,Wm.set(this.previousStates.length)}pointsUpdated(){let t=this.polygonFeature();if(t)for(let e of this.eventListenersUpdated)e(t)}recalculateHovering(t){this.cursor=null,this.hover=null;for(let e of this.map.queryRenderedFeatures(t.point,{layers:["edit-polygon-fill","edit-polygon-vertices"]}))if(e.geometry.type=="Polygon"){this.hover="polygon";break}else if(e.geometry.type=="Point"&&Object.hasOwn(e.properties,"idx")){this.hover=e.properties.idx;break}this.hover==null&&(this.cursor=$a(t.lngLat.toArray())),this.redraw()}polygonFeature(){if(this.points.length<3)return null;let t=this.points.map(zm),e=[JSON.parse(JSON.stringify(t))];return e[0].push(JSON.parse(JSON.stringify(e[0][0]))),{type:"Feature",geometry:{type:"Polygon",coordinates:e},properties:{}}}beforeUpdate(){this.previousStates.push(JSON.parse(JSON.stringify(this.points))),this.previousStates.length>bS&&this.previousStates.shift()}}function df(n){let t=[];for(let e=0;e=3&&t.push({type:"Feature",geometry:{type:"LineString",coordinates:[n[n.length-1],n[0]]},properties:{}}),t}function _S(n){let t,e,i;return{c(){t=Bt("Undo ("),e=Bt(n[1]),i=Bt(")")},m(s,r){B(s,t,r),B(s,e,r),B(s,i,r)},p(s,r){r&2&&rr(e,s[1])},d(s){s&&(z(t),z(e),z(i))}}}function vS(n){let t;return{c(){t=Bt("Undo")},m(e,i){B(e,t,i)},p:wt,d(e){e&&z(t)}}}function xS(n){let t,e,i,s,r,o,a,l,c,h,u;function f(m,y){return m[1]==0?vS:_S}let d=f(n),g=d(n);return{c(){t=N("div"),e=N("button"),e.textContent="Finish",i=yt(),s=N("button"),s.textContent="Cancel",r=yt(),o=N("button"),g.c(),l=yt(),c=N("ul"),c.innerHTML=`
  • Click diff --git a/assets/lts_bg.wasm b/assets/lts_bg.wasm index e735910..40a701d 100644 Binary files a/assets/lts_bg.wasm and b/assets/lts_bg.wasm differ diff --git a/assets/main-5a00543e.js b/assets/main-6525ca08.js similarity index 98% rename from assets/main-5a00543e.js rename to assets/main-6525ca08.js index c3786c2..0824a67 100644 --- a/assets/main-5a00543e.js +++ b/assets/main-6525ca08.js @@ -1,4 +1,4 @@ -import{S as ae,i as ie,s as J,m as ue,P as pe,L as fe,c as B,a as I,t as g,b,d as H,o as ce,H as me,e as m,f as D,g as C,n as re,h as S,j as P,k as G,l as y,p as _e,q as c,r as X,u as W,v as U,w as Y,x as de,M as ge,y as Z,z as T,A as z,B as V,_ as be,C as x,F as he,D as ve,E as se}from"./Layout-a6e3acf3.js";import{S as Ae,L as ye}from"./SidebarControls-fe6e8fa8.js";const we="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAm0lEQVRIS+2U0Q2AIAxEYQM30Q3UDXQy3UhHkE0cweuHHxKTXpuQaALJ/cE9eoXGUHjFwv6hAtSEPxFRh2su0Ayd6pWzDUwFO8700AGNVggDaGAqkNYDYQBStBvCAtwQC8AF8QA2kORlJWjQmm4BSB9M5lIyC3CZswC3OQu4PxqVef7TmYikoSs0aQ19GyMMwDp+HvsrQI3v/xFduXoiGbi1DtQAAAAASUVORK5CYII=";let F="pmtilesSource";async function ke(a){let e=await a.getHeader(),o=await a.getMetadata();return{bounds:[e.minLon,e.minLat,e.maxLon,e.maxLat],outputMetadata:JSON.parse(o.description),minZoom:e.minZoom,maxZoom:e.maxZoom}}function $e(a,e,o){let{pmtiles:t}=e,{map:n}=e,{outputMetadata:l=null}=e,i=new pe;ue.addProtocol("pmtiles",i.tile);async function p(s){r(F),i.add(s);let f=await ke(s);n.addSource(F,{type:"vector",tiles:["pmtiles://"+s.source.getKey()+"/{z}/{x}/{y}"],minzoom:f.minZoom,maxzoom:f.maxZoom,bounds:f.bounds}),n.fitBounds(f.bounds,{padding:100,duration:500}),o(0,l=f.outputMetadata)}function r(s){if(n.getSource(s)){let f=[];for(let u of n.getStyle().layers)"source"in u&&u.source==s&&f.push(u.id);for(let u of f)n.removeLayer(u);n.removeSource(s)}}return a.$$set=s=>{"pmtiles"in s&&o(1,t=s.pmtiles),"map"in s&&o(2,n=s.map),"outputMetadata"in s&&o(0,l=s.outputMetadata)},a.$$.update=()=>{a.$$.dirty&2&&(t?p(t):r(F))},[l,t,n]}class Me extends ae{constructor(e){super(),ie(this,e,$e,null,J,{pmtiles:1,map:2,outputMetadata:0})}}function Ce(a){let e,o,t;return o=new me({props:{app:"main"}}),{c(){e=m("div"),B(o.$$.fragment),D(e,"slot","top")},m(n,l){C(n,e,l),I(o,e,null),t=!0},p:re,i(n){t||(g(o.$$.fragment,n),t=!0)},o(n){b(o.$$.fragment,n),t=!1},d(n){n&&S(e),H(o)}}}function ee(a){let e,o,t;return{c(){e=G("Open a "),o=m("i"),o.textContent=".pmtiles",t=G(` +import{S as ae,i as ie,s as J,m as ue,P as pe,L as fe,c as B,a as I,t as g,b,d as H,o as ce,H as me,e as m,f as D,g as C,n as re,h as S,j as P,k as G,l as y,p as _e,q as c,r as X,u as W,v as U,w as Y,x as de,M as ge,y as Z,z as T,A as z,B as V,_ as be,C as x,F as he,D as ve,E as se}from"./Layout-cca6f705.js";import{S as Ae,L as ye}from"./SidebarControls-f84a18a1.js";const we="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAm0lEQVRIS+2U0Q2AIAxEYQM30Q3UDXQy3UhHkE0cweuHHxKTXpuQaALJ/cE9eoXGUHjFwv6hAtSEPxFRh2su0Ayd6pWzDUwFO8700AGNVggDaGAqkNYDYQBStBvCAtwQC8AF8QA2kORlJWjQmm4BSB9M5lIyC3CZswC3OQu4PxqVef7TmYikoSs0aQ19GyMMwDp+HvsrQI3v/xFduXoiGbi1DtQAAAAASUVORK5CYII=";let F="pmtilesSource";async function ke(a){let e=await a.getHeader(),o=await a.getMetadata();return{bounds:[e.minLon,e.minLat,e.maxLon,e.maxLat],outputMetadata:JSON.parse(o.description),minZoom:e.minZoom,maxZoom:e.maxZoom}}function $e(a,e,o){let{pmtiles:t}=e,{map:n}=e,{outputMetadata:l=null}=e,i=new pe;ue.addProtocol("pmtiles",i.tile);async function p(s){r(F),i.add(s);let f=await ke(s);n.addSource(F,{type:"vector",tiles:["pmtiles://"+s.source.getKey()+"/{z}/{x}/{y}"],minzoom:f.minZoom,maxzoom:f.maxZoom,bounds:f.bounds}),n.fitBounds(f.bounds,{padding:100,duration:500}),o(0,l=f.outputMetadata)}function r(s){if(n.getSource(s)){let f=[];for(let u of n.getStyle().layers)"source"in u&&u.source==s&&f.push(u.id);for(let u of f)n.removeLayer(u);n.removeSource(s)}}return a.$$set=s=>{"pmtiles"in s&&o(1,t=s.pmtiles),"map"in s&&o(2,n=s.map),"outputMetadata"in s&&o(0,l=s.outputMetadata)},a.$$.update=()=>{a.$$.dirty&2&&(t?p(t):r(F))},[l,t,n]}class Me extends ae{constructor(e){super(),ie(this,e,$e,null,J,{pmtiles:1,map:2,outputMetadata:0})}}function Ce(a){let e,o,t;return o=new me({props:{app:"main"}}),{c(){e=m("div"),B(o.$$.fragment),D(e,"slot","top")},m(n,l){C(n,e,l),I(o,e,null),t=!0},p:re,i(n){t||(g(o.$$.fragment,n),t=!0)},o(n){b(o.$$.fragment,n),t=!1},d(n){n&&S(e),H(o)}}}function ee(a){let e,o,t;return{c(){e=G("Open a "),o=m("i"),o.textContent=".pmtiles",t=G(` file produced by the tool. Note this file stays in your browser; it doesn't get uploaded anywhere.`)},m(n,l){C(n,e,l),C(n,o,l),C(n,t,l)},d(n){n&&(S(e),S(o),S(t))}}}function te(a){let e,o,t;function n(i){a[12](i)}let l={outputMetadata:a[3],map:a[1]};return a[4]!==void 0&&(l.controls=a[4]),e=new Ae({props:l}),Z.push(()=>T(e,"controls",n)),{c(){B(e.$$.fragment)},m(i,p){I(e,i,p),t=!0},p(i,p){const r={};p&8&&(r.outputMetadata=i[3]),p&2&&(r.map=i[1]),!o&&p&16&&(o=!0,r.controls=i[4],V(()=>o=!1)),e.$set(r)},i(i){t||(g(e.$$.fragment,i),t=!0)},o(i){b(e.$$.fragment,i),t=!1},d(i){H(e,i)}}}function Se(a){let e,o,t,n,l,i,p,r,s,f,u,w,k,$,M,_,A,L,Q,E,R,j,N,q,K,h=a[2]==null&&ee(),d=a[3]&&te(a);return{c(){e=m("div"),o=m("details"),t=m("summary"),t.textContent="Load a file",n=P(),l=m("label"),h&&h.c(),i=P(),p=m("input"),r=P(),s=m("label"),f=G(`Or load an example: `),u=m("select"),w=m("option"),w.textContent="Custom file loaded",k=m("option"),k.textContent="Edinburgh",$=m("option"),$.textContent=`England (2011 home-to-work) diff --git a/assets/wasm_od2net_bg.wasm b/assets/wasm_od2net_bg.wasm index ed0b318..621777d 100644 Binary files a/assets/wasm_od2net_bg.wasm and b/assets/wasm_od2net_bg.wasm differ diff --git a/assets/x2-48ee42a1.js b/assets/x2-2c8dc76e.js similarity index 98% rename from assets/x2-48ee42a1.js rename to assets/x2-2c8dc76e.js index 4c5c689..68d7ded 100644 --- a/assets/x2-48ee42a1.js +++ b/assets/x2-2c8dc76e.js @@ -1,4 +1,4 @@ -import{S as re,i as ie,s as fe,G as _e,e as S,f as z,A as K,g as R,I as $,u as J,J as V,K as be,N as he,O as we,Q as ye,R as Le,t as h,b as k,h as T,x as ke,T as Ce,U as ve,V as Y,W as ee,m as Me,L as Be,c as I,j as A,a as O,d as q,o as Se,H as Ee,n as ue,y as H,z as W,k as x,q as v,B as Q,v as te,w as ne,M as Pe,_ as ze,X as ce,l as ae,E as Ie,Y as Oe}from"./Layout-a6e3acf3.js";import{L as qe,C as Re,O as Te,_ as Ae,J as De,a as Je,G as je,P as Fe}from"./index-69a9ca84.js";import{S as Ne,L as Xe}from"./SidebarControls-fe6e8fa8.js";const Ze=a=>({marker:a&8}),se=a=>({marker:a[3]});function Ge(a){let e,t,s,n,l,c,u;const i=a[19].default,r=_e(i,a,a[18],se);return{c(){e=S("div"),r&&r.c(),z(e,"tabindex",t=a[1]?0:void 0),z(e,"role",s=a[1]?"button":void 0),K(e,"z-index",a[2])},m(o,d){R(o,e,d),r&&r.m(e,null),l=!0,c||(u=[$(a[7].call(null,e)),$(n=He.call(null,e,a[0])),J(e,"click",V(a[20])),J(e,"dblclick",V(a[21])),J(e,"contextmenu",V(be(a[22]))),J(e,"mouseenter",a[23]),J(e,"mouseleave",a[24]),J(e,"mousemove",a[25]),J(e,"keydown",a[8])],c=!0)},p(o,[d]){r&&r.p&&(!l||d&262152)&&he(r,i,o,o[18],l?ye(i,o[18],d,Ze):we(o[18]),se),(!l||d&2&&t!==(t=o[1]?0:void 0))&&z(e,"tabindex",t),(!l||d&2&&s!==(s=o[1]?"button":void 0))&&z(e,"role",s),n&&Le(n.update)&&d&1&&n.update.call(null,o[0]),d&4&&K(e,"z-index",o[2])},i(o){l||(h(r,o),l=!0)},o(o){k(r,o),l=!1},d(o){o&&T(e),r&&r.d(o),c=!1,ke(u)}}}function He(a,e){const t=a.className;function s(n){n?a.className=`${t} ${n}`:a.className=t}return s(e),{update:s}}function Ue(a,e,t){let s,n,l,{$$slots:c={},$$scope:u}=e,{marker:i=void 0}=e,{lngLat:r}=e,{class:o=void 0}=e,{interactive:d=!0}=e,{asButton:y=!1}=e,{draggable:L=!1}=e,{feature:p=null}=e,{offset:w=void 0}=e,{zIndex:E=void 0}=e,{rotation:D=0}=e,{opacity:P=1}=e;const F=Ce(),{map:N,layerEvent:X,self:j,markerClickManager:_}=ve();Y(a,N,f=>t(27,l=f)),Y(a,X,f=>t(26,s=f)),Y(a,j,f=>t(3,n=f));function b(f){ee(j,n=new Me.Marker({element:f,rotation:D,draggable:L,offset:w,opacity:P.toString()}).setLngLat(r).addTo(l),n),t(11,i=n);const Z=()=>C("dragstart"),U=()=>{g(),C("drag")},G=()=>{g(),C("dragend")};return L&&(n.on("dragstart",Z),n.on("drag",U),n.on("dragend",G)),{destroy(){L&&(n==null||n.off("dragstart",Z),n==null||n.off("drag",U),n==null||n.off("dragend",G)),t(11,i=void 0),n==null||n.remove()}}}function g(){let f=n==null?void 0:n.getLngLat();f&&(Array.isArray(r)?t(10,r=[f.lng,f.lat]):r&&"lon"in r?t(10,r={lon:f.lng,lat:f.lat}):t(10,r=f))}function B(f){f.key===" "&&(f.preventDefault(),f.stopPropagation(),C("click"))}function C(f){if(!d)return;let Z=n==null?void 0:n.getLngLat();if(!Z)return;const U=[Z.lng,Z.lat];let G={map:l,marker:n,lngLat:U,features:[{type:"Feature",properties:(p==null?void 0:p.properties)??{},geometry:{type:"Point",coordinates:U}}]};(f==="click"||f==="contextmenu")&&_.handleClick(G),ee(X,s={...G,layerType:"marker",type:f},s),F(f,G)}const m=()=>C("click"),M=()=>C("dblclick"),de=()=>{C("contextmenu")},pe=()=>{C("mouseenter")},me=()=>{C("mouseleave")},ge=()=>C("mousemove");return a.$$set=f=>{"marker"in f&&t(11,i=f.marker),"lngLat"in f&&t(10,r=f.lngLat),"class"in f&&t(0,o=f.class),"interactive"in f&&t(12,d=f.interactive),"asButton"in f&&t(1,y=f.asButton),"draggable"in f&&t(13,L=f.draggable),"feature"in f&&t(14,p=f.feature),"offset"in f&&t(15,w=f.offset),"zIndex"in f&&t(2,E=f.zIndex),"rotation"in f&&t(16,D=f.rotation),"opacity"in f&&t(17,P=f.opacity),"$$scope"in f&&t(18,u=f.$$scope)},a.$$.update=()=>{a.$$.dirty&1032&&(n==null||n.setLngLat(r)),a.$$.dirty&32776&&(n==null||n.setOffset(w??[0,0])),a.$$.dirty&65544&&(n==null||n.setRotation(D)),a.$$.dirty&131080&&(n==null||n.setOpacity(P.toString()))},[o,y,E,n,N,X,j,b,B,C,r,i,d,L,p,w,D,P,u,c,m,M,de,pe,me,ge]}class Ke extends re{constructor(e){super(),ie(this,e,Ue,Ge,fe,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const We=` +import{S as re,i as ie,s as fe,G as _e,e as S,f as z,A as K,g as R,I as $,u as J,J as V,K as be,N as he,O as we,Q as ye,R as Le,t as h,b as k,h as T,x as ke,T as Ce,U as ve,V as Y,W as ee,m as Me,L as Be,c as I,j as A,a as O,d as q,o as Se,H as Ee,n as ue,y as H,z as W,k as x,q as v,B as Q,v as te,w as ne,M as Pe,_ as ze,X as ce,l as ae,E as Ie,Y as Oe}from"./Layout-cca6f705.js";import{L as qe,C as Re,O as Te,_ as Ae,J as De,a as Je,G as je,P as Fe}from"./index-a6a9f01e.js";import{S as Ne,L as Xe}from"./SidebarControls-f84a18a1.js";const Ze=a=>({marker:a&8}),se=a=>({marker:a[3]});function Ge(a){let e,t,s,n,l,c,u;const i=a[19].default,r=_e(i,a,a[18],se);return{c(){e=S("div"),r&&r.c(),z(e,"tabindex",t=a[1]?0:void 0),z(e,"role",s=a[1]?"button":void 0),K(e,"z-index",a[2])},m(o,d){R(o,e,d),r&&r.m(e,null),l=!0,c||(u=[$(a[7].call(null,e)),$(n=He.call(null,e,a[0])),J(e,"click",V(a[20])),J(e,"dblclick",V(a[21])),J(e,"contextmenu",V(be(a[22]))),J(e,"mouseenter",a[23]),J(e,"mouseleave",a[24]),J(e,"mousemove",a[25]),J(e,"keydown",a[8])],c=!0)},p(o,[d]){r&&r.p&&(!l||d&262152)&&he(r,i,o,o[18],l?ye(i,o[18],d,Ze):we(o[18]),se),(!l||d&2&&t!==(t=o[1]?0:void 0))&&z(e,"tabindex",t),(!l||d&2&&s!==(s=o[1]?"button":void 0))&&z(e,"role",s),n&&Le(n.update)&&d&1&&n.update.call(null,o[0]),d&4&&K(e,"z-index",o[2])},i(o){l||(h(r,o),l=!0)},o(o){k(r,o),l=!1},d(o){o&&T(e),r&&r.d(o),c=!1,ke(u)}}}function He(a,e){const t=a.className;function s(n){n?a.className=`${t} ${n}`:a.className=t}return s(e),{update:s}}function Ue(a,e,t){let s,n,l,{$$slots:c={},$$scope:u}=e,{marker:i=void 0}=e,{lngLat:r}=e,{class:o=void 0}=e,{interactive:d=!0}=e,{asButton:y=!1}=e,{draggable:L=!1}=e,{feature:p=null}=e,{offset:w=void 0}=e,{zIndex:E=void 0}=e,{rotation:D=0}=e,{opacity:P=1}=e;const F=Ce(),{map:N,layerEvent:X,self:j,markerClickManager:_}=ve();Y(a,N,f=>t(27,l=f)),Y(a,X,f=>t(26,s=f)),Y(a,j,f=>t(3,n=f));function b(f){ee(j,n=new Me.Marker({element:f,rotation:D,draggable:L,offset:w,opacity:P.toString()}).setLngLat(r).addTo(l),n),t(11,i=n);const Z=()=>C("dragstart"),U=()=>{g(),C("drag")},G=()=>{g(),C("dragend")};return L&&(n.on("dragstart",Z),n.on("drag",U),n.on("dragend",G)),{destroy(){L&&(n==null||n.off("dragstart",Z),n==null||n.off("drag",U),n==null||n.off("dragend",G)),t(11,i=void 0),n==null||n.remove()}}}function g(){let f=n==null?void 0:n.getLngLat();f&&(Array.isArray(r)?t(10,r=[f.lng,f.lat]):r&&"lon"in r?t(10,r={lon:f.lng,lat:f.lat}):t(10,r=f))}function B(f){f.key===" "&&(f.preventDefault(),f.stopPropagation(),C("click"))}function C(f){if(!d)return;let Z=n==null?void 0:n.getLngLat();if(!Z)return;const U=[Z.lng,Z.lat];let G={map:l,marker:n,lngLat:U,features:[{type:"Feature",properties:(p==null?void 0:p.properties)??{},geometry:{type:"Point",coordinates:U}}]};(f==="click"||f==="contextmenu")&&_.handleClick(G),ee(X,s={...G,layerType:"marker",type:f},s),F(f,G)}const m=()=>C("click"),M=()=>C("dblclick"),de=()=>{C("contextmenu")},pe=()=>{C("mouseenter")},me=()=>{C("mouseleave")},ge=()=>C("mousemove");return a.$$set=f=>{"marker"in f&&t(11,i=f.marker),"lngLat"in f&&t(10,r=f.lngLat),"class"in f&&t(0,o=f.class),"interactive"in f&&t(12,d=f.interactive),"asButton"in f&&t(1,y=f.asButton),"draggable"in f&&t(13,L=f.draggable),"feature"in f&&t(14,p=f.feature),"offset"in f&&t(15,w=f.offset),"zIndex"in f&&t(2,E=f.zIndex),"rotation"in f&&t(16,D=f.rotation),"opacity"in f&&t(17,P=f.opacity),"$$scope"in f&&t(18,u=f.$$scope)},a.$$.update=()=>{a.$$.dirty&1032&&(n==null||n.setLngLat(r)),a.$$.dirty&32776&&(n==null||n.setOffset(w??[0,0])),a.$$.dirty&65544&&(n==null||n.setRotation(D)),a.$$.dirty&131080&&(n==null||n.setOpacity(P.toString()))},[o,y,E,n,N,X,j,b,B,C,r,i,d,L,p,w,D,P,u,c,m,M,de,pe,me,ge]}class Ke extends re{constructor(e){super(),ie(this,e,Ue,Ge,fe,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const We=` diff --git a/assets/x3-aedef8f4.js b/assets/x3-f25d0574.js similarity index 98% rename from assets/x3-aedef8f4.js rename to assets/x3-f25d0574.js index f594584..5ac398a 100644 --- a/assets/x3-aedef8f4.js +++ b/assets/x3-f25d0574.js @@ -1,4 +1,4 @@ -import{S as pe,i as ue,s as ce,ai as ne,e as $,f as H,g as L,q as c,n as V,h as S,aj as $e,k as z,j as N,ab as se,L as be,c as F,a as O,t as w,b as y,d as j,o as he,H as we,y as K,z as ee,u as Y,B as te,v as _e,w as me,M as ye,A as R,_ as ke,a2 as ve,a6 as J,a7 as le,D as Ce,l as Q,p as Le,r as oe,x as Se,ak as x,a3 as Fe,ah as Oe,af as je,ag as D,a5 as Be,aa as Ee}from"./Layout-a6e3acf3.js";import{L as Me,C as Ne,O as Pe,_ as qe,J as Te,a as Ae,G as Je,P as De}from"./index-69a9ca84.js";function ae(o,t,n){const e=o.slice();return e[1]=t[n][0],e[2]=t[n][1],e}function re(o){let t,n,e=o[1]+"",l,s,r,a=o[2]+"",i,u;return{c(){t=$("tr"),n=$("td"),l=z(e),s=N(),r=$("td"),i=z(a),u=N()},m(_,m){L(_,t,m),c(t,n),c(n,l),c(t,s),c(t,r),c(r,i),c(t,u)},p(_,m){m&1&&e!==(e=_[1]+"")&&se(l,e),m&1&&a!==(a=_[2]+"")&&se(i,a)},d(_){_&&S(t)}}}function He(o){let t,n,e=ne(Object.entries(o[0])),l=[];for(let s=0;s{"properties"in l&&n(0,e=l.properties)},[e]}class Ie extends pe{constructor(t){super(),ue(this,t,Ge,He,ce,{properties:0})}}function Re(o){let t,n,e;return n=new we({props:{app:"costs"}}),{c(){t=$("div"),F(n.$$.fragment),H(t,"slot","top")},m(l,s){L(l,t,s),O(n,t,null),e=!0},p:V,i(l){e||(w(n.$$.fragment,l),e=!0)},o(l){y(n.$$.fragment,l),e=!1},d(l){l&&S(t),j(n)}}}function ie(o){let t,n,e,l,s,r,a,i,u,_,m,v,P,b,C,q,E,T,G;const X=[ze,Xe],B=[];function d(p,h){return p[5]=="lts"?0:1}i=d(o),u=B[i]=X[i](o);function g(p){o[23](p)}let M={};return o[1]!==void 0&&(M.cost=o[1]),C=new Ae({props:M}),K.push(()=>ee(C,"cost",g)),{c(){t=$("label"),n=z(`Color edges by: +import{S as pe,i as ue,s as ce,ai as ne,e as $,f as H,g as L,q as c,n as V,h as S,aj as $e,k as z,j as N,ab as se,L as be,c as F,a as O,t as w,b as y,d as j,o as he,H as we,y as K,z as ee,u as Y,B as te,v as _e,w as me,M as ye,A as R,_ as ke,a2 as ve,a6 as J,a7 as le,D as Ce,l as Q,p as Le,r as oe,x as Se,ak as x,a3 as Fe,ah as Oe,af as je,ag as D,a5 as Be,aa as Ee}from"./Layout-cca6f705.js";import{L as Me,C as Ne,O as Pe,_ as qe,J as Te,a as Ae,G as Je,P as De}from"./index-a6a9f01e.js";function ae(o,t,n){const e=o.slice();return e[1]=t[n][0],e[2]=t[n][1],e}function re(o){let t,n,e=o[1]+"",l,s,r,a=o[2]+"",i,u;return{c(){t=$("tr"),n=$("td"),l=z(e),s=N(),r=$("td"),i=z(a),u=N()},m(_,m){L(_,t,m),c(t,n),c(n,l),c(t,s),c(t,r),c(r,i),c(t,u)},p(_,m){m&1&&e!==(e=_[1]+"")&&se(l,e),m&1&&a!==(a=_[2]+"")&&se(i,a)},d(_){_&&S(t)}}}function He(o){let t,n,e=ne(Object.entries(o[0])),l=[];for(let s=0;s{"properties"in l&&n(0,e=l.properties)},[e]}class Ie extends pe{constructor(t){super(),ue(this,t,Ge,He,ce,{properties:0})}}function Re(o){let t,n,e;return n=new we({props:{app:"costs"}}),{c(){t=$("div"),F(n.$$.fragment),H(t,"slot","top")},m(l,s){L(l,t,s),O(n,t,null),e=!0},p:V,i(l){e||(w(n.$$.fragment,l),e=!0)},o(l){y(n.$$.fragment,l),e=!1},d(l){l&&S(t),j(n)}}}function ie(o){let t,n,e,l,s,r,a,i,u,_,m,v,P,b,C,q,E,T,G;const X=[ze,Xe],B=[];function d(p,h){return p[5]=="lts"?0:1}i=d(o),u=B[i]=X[i](o);function g(p){o[23](p)}let M={};return o[1]!==void 0&&(M.cost=o[1]),C=new Ae({props:M}),K.push(()=>ee(C,"cost",g)),{c(){t=$("label"),n=z(`Color edges by: `),e=$("select"),l=$("option"),l.textContent="LTS",s=$("option"),s.textContent="Edge cost (relative to length)",r=$("option"),r.textContent="Nearby amenities",a=N(),u.c(),_=N(),m=$("label"),v=$("input"),P=z(` Show cyclists not allowed`),b=N(),F(C.$$.fragment),l.__value="lts",Q(l,l.__value),s.__value="cost",Q(s,s.__value),r.__value="nearby_amenities",Q(r,r.__value),o[5]===void 0&&Le(()=>o[21].call(e)),H(v,"type","checkbox"),R(m,"color",J.lts_not_allowed)},m(p,h){L(p,t,h),c(t,n),c(t,e),c(e,l),c(e,s),c(e,r),oe(e,o[5],!0),L(p,a,h),B[i].m(p,h),L(p,_,h),L(p,m,h),c(m,v),v.checked=o[6],c(m,P),L(p,b,h),O(C,p,h),E=!0,T||(G=[Y(e,"change",o[21]),Y(v,"change",o[22])],T=!0)},p(p,h){h&32&&oe(e,p[5]);let U=i;i=d(p),i===U?B[i].p(p,h):(_e(),y(B[U],1,1,()=>{B[U]=null}),me(),u=B[i],u?u.p(p,h):(u=B[i]=X[i](p),u.c()),w(u,1),u.m(_.parentNode,_)),h&64&&(v.checked=p[6]);const W={};!q&&h&2&&(q=!0,W.cost=p[1],te(()=>q=!1)),C.$set(W)},i(p){E||(w(u),w(C.$$.fragment,p),E=!0)},o(p){y(u),y(C.$$.fragment,p),E=!1},d(p){p&&(S(t),S(a),S(_),S(m),S(b)),B[i].d(p),j(C,p),T=!1,Se(G)}}}function Xe(o){let t,n;return t=new Oe({props:{colorScale:x,limits:Z(o[5],o[9],o[10]),decimalPlaces:1}}),{c(){F(t.$$.fragment)},m(e,l){O(t,e,l),n=!0},p(e,l){const s={};l&1568&&(s.limits=Z(e[5],e[9],e[10])),t.$set(s)},i(e){n||(w(t.$$.fragment,e),n=!0)},o(e){y(t.$$.fragment,e),n=!1},d(e){j(t,e)}}}function ze(o){let t,n,e,l;return t=new je({props:{rows:[[`${D.lts1}: ${o[8][1].toFixed(0)}% of roads by distance`,J.lts1],[`${D.lts2}: ${o[8][2].toFixed(0)}%`,J.lts2],[`${D.lts3}: ${o[8][3].toFixed(0)}%`,J.lts3],[`${D.lts4}: ${o[8][4].toFixed(0)}%`,J.lts4]]}}),{c(){F(t.$$.fragment),n=N(),e=$("p"),e.innerHTML='Note: LTS model from BikeOttawa'},m(s,r){O(t,s,r),L(s,n,r),L(s,e,r),l=!0},p(s,r){const a={};r&256&&(a.rows=[[`${D.lts1}: ${s[8][1].toFixed(0)}% of roads by distance`,J.lts1],[`${D.lts2}: ${s[8][2].toFixed(0)}%`,J.lts2],[`${D.lts3}: ${s[8][3].toFixed(0)}%`,J.lts3],[`${D.lts4}: ${s[8][4].toFixed(0)}%`,J.lts4]]),t.$set(a)},i(s){l||(w(t.$$.fragment,s),l=!0)},o(s){y(t.$$.fragment,s),l=!1},d(s){s&&(S(n),S(e)),j(t,s)}}}function Ue(o){let t,n,e,l,s,r,a,i,u,_,m,v,P,b,C,q,E,T,G;function X(g){o[18](g)}let B={};o[0]!==void 0&&(B.example=o[0]),m=new Ne({props:B}),K.push(()=>ee(m,"example",X)),b=new Pe({props:{map:o[2]}}),b.$on("gotXml",o[15]),b.$on("loading",o[19]),b.$on("error",o[20]);let d=o[3]&&ie(o);return{c(){t=$("div"),n=$("details"),e=$("summary"),e.textContent="Change areas",l=N(),s=$("label"),r=z("Open an "),a=$("i"),a.textContent=".osm.pbf",i=z(` file diff --git a/edge_cost.html b/edge_cost.html index 7460662..3d02e3f 100644 --- a/edge_cost.html +++ b/edge_cost.html @@ -4,9 +4,9 @@ od2net edge cost mode - - - + + + diff --git a/index.html b/index.html index b6f1d57..5556cf9 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,9 @@ od2net - - - + + + diff --git a/interactive.html b/interactive.html index de68caf..2a7bb8b 100644 --- a/interactive.html +++ b/interactive.html @@ -4,10 +4,10 @@ od2net interactive mode - - - - + + + + diff --git a/r/pkgdown.yml b/r/pkgdown.yml index 849b8fc..82e77a0 100644 --- a/r/pkgdown.yml +++ b/r/pkgdown.yml @@ -2,4 +2,4 @@ pandoc: 3.1.11 pkgdown: 2.1.1 pkgdown_sha: ~ articles: {} -last_built: 2024-10-29T17:05Z +last_built: 2024-10-30T14:05Z