From 2f30828299cbbfe4876b7b86ffc77ca74b1da189 Mon Sep 17 00:00:00 2001 From: dabreegster Date: Fri, 29 Nov 2024 13:12:19 +0000 Subject: [PATCH] deploy: 93cac523c57dc4804b09ef61fb183309b2a1eac8 --- assets/backend_bg.wasm | Bin 1137996 -> 1168527 bytes assets/main-3c227a1d.js | 667 --------------------------------------- assets/main-9f5175a9.js | 669 ++++++++++++++++++++++++++++++++++++++++ index.html | 2 +- 4 files changed, 670 insertions(+), 668 deletions(-) delete mode 100644 assets/main-3c227a1d.js create mode 100644 assets/main-9f5175a9.js diff --git a/assets/backend_bg.wasm b/assets/backend_bg.wasm index 3979d0a3ffc0c1f6f9ce63b09240f70f5b9c2912..8b51cce0d8625acd811b39991475a8d22a57b682 100644 GIT binary patch delta 367690 zcmce<34B$>**|_}&beo~H#a#6*%xx|Nq~e!7TNa`LByqQb!pw871RVp7ODDDZ&bj5 zh=Btftf&EzMN!d!K}8LVii(KUDpjh{Ql%CvR$38J{@-WLxi>d}*1o^KfBcv^vpqBO zJkLDy%=665-SN!GyVr~gOJk>8%Opu+56=&uY^rhbPa308$l~+Q%0HD&XVb?>(ik~@ z%PlNEh9mtJ5s}6O#gVG{6;Wjji=#ZBPPLd{VLB?$U)x8SK0PkY-*e$086O1cmbf$~ zgo@Lt0JV3^7{iBi%PqHvKKLb293`ns)7=|bb%?q!-Tia;NhLSguhFa9CwF05VNthGgh^ zJA;Mu86fKhV(I7G1`IHXD;kQZoP{JU!Zg69e=@SD6FM_^;-A`)Nu4ls8NHFwD;kedQ7OvF zXiNoes4kOCri8_p$>R7h!@ABi(^L$@B-}BciJB@4F{v}Eg?N_`@X(d1QXz1Me>4b5 z=_bB`Qz=9v!M`k4RHRDmBn&SMq)PY?WMpzXrge|79x96xUQsQ=xMCE`QcvK68HRgi zq_m2wH27X=7_z2e0&vxkfI`kO995BJ8Zy{I0XCHg`XWgNm$s!36*7Xo$B3CTS*%{(KM{xN9?%7AYqDJ?2#g0dJok}w!0 z6p})c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8`uM-(-~pb7 zcTO=6?@_V^5Ag15seDMipqe(Xrm1VuX?(c4W$9Y=x_9a?yAh5)dLuhcXh7^Jj@S1< z?gi$I#-Qr`BAF9!LbYth;IfuCpHppd)}$G#G8t40dIGd}M$5NH)H}QyzgqJ?!f3)a z!4u3Nuss@s-u{5b;4e3hN#?9nU6jnP8pG?wC)qoU*GOiQWSTXG1C-1OX1Z_%Gp+7R J`#)9>{vR?}e in t?RP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Pi=(t,e,n)=>(NP(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Mt(){}function Ei(t,e){for(const n in e)t[n]=e[n];return t}function kE(t){return t()}function Wx(){return Object.create(null)}function Jr(t){t.forEach(kE)}function $_(t){return typeof t=="function"}function Vt(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Rg;function Wn(t,e){return t===e?!0:(Rg||(Rg=document.createElement("a")),Rg.href=e,t===Rg.href)}function OP(t){return Object.keys(t).length===0}function DE(t,...e){if(t==null){for(const r of e)r(void 0);return Mt}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ca(t){let e;return DE(t,n=>e=n)(),e}function _t(t,e,n){t.$$.on_destroy.push(DE(e,n))}function Sr(t,e,n,r){if(t){const i=RE(t,e,n,r);return t[0](i)}}function RE(t,e,n,r){return t[1]&&r?Ei(n.ctx.slice(),t[1](r(e))):n.ctx}function Er(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const a=[],c=Math.max(e.dirty.length,i.length);for(let l=0;l32){const e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function NE(t){return function(e){return e.preventDefault(),t.call(this,e)}}function D0(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ce(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function FP(t){let e;return{p(...n){e=n,e.forEach(r=>t.push(r))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function BP(t){return t===""?null:+t}function VP(t){return Array.from(t.childNodes)}function cr(t,e){e=""+e,t.data!==e&&(t.data=e)}function Qo(t,e){t.value=e??""}function or(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function c_(t,e,n){for(let r=0;r{const i=t.$$.callbacks[e];if(i){const a=UP(e,n,{cancelable:r});return i.slice().forEach(c=>{c.call(t,a)}),!a.defaultPrevented}return!0}}function h1(t,e){return mm().$$.context.set(t,e),e}function zE(t){return mm().$$.context.get(t)}function gn(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const bf=[],si=[];let Cf=[];const hv=[],FE=Promise.resolve();let fv=!1;function BE(){fv||(fv=!0,FE.then(UE))}function VE(){return BE(),FE}function Hd(t){Cf.push(t)}function El(t){hv.push(t)}const R0=new Set;let pf=0;function UE(){if(pf!==0)return;const t=Wd;do{try{for(;pft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Cf=e}const Xg=new Set;let jc;function Un(){jc={r:0,c:[],p:jc}}function jn(){jc.r||Jr(jc.c),jc=jc.p}function he(t,e){t&&t.i&&(Xg.delete(t),t.i(e))}function ve(t,e,n,r){if(t&&t.o){if(Xg.has(t))return;Xg.add(t),jc.c.push(()=>{Xg.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function vs(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function qP(t,e){ve(t,1,1,()=>{e.delete(t.key)})}function WP(t,e,n,r,i,a,c,l,d,v,S,E){let T=t.length,M=a.length,k=T;const R={};for(;k--;)R[t[k].key]=k;const z=[],U=new Map,F=new Map,G=[];for(k=M;k--;){const ie=E(i,a,k),ce=n(ie);let fe=c.get(ce);fe?r&&G.push(()=>fe.p(ie,e)):(fe=v(ce,ie),fe.c()),U.set(ce,z[k]=fe),ce in R&&F.set(ce,Math.abs(k-R[ce]))}const H=new Set,J=new Set;function oe(ie){he(ie,1),ie.m(l,S),c.set(ie.key,ie),S=ie.first,M--}for(;T&&M;){const ie=z[M-1],ce=t[T-1],fe=ie.key,Te=ce.key;ie===ce?(S=ie.first,T--,M--):U.has(Te)?!c.has(fe)||H.has(fe)?oe(ie):J.has(Te)?T--:F.get(fe)>F.get(Te)?(J.add(fe),oe(ie)):(H.add(Te),T--):(d(ce,c),T--)}for(;T--;){const ie=t[T];U.has(ie.key)||d(ie,c)}for(;M;)oe(z[M-1]);return Jr(G),z}function f1(t,e){const n={},r={},i={$$scope:1};let a=t.length;for(;a--;){const c=t[a],l=e[a];if(l){for(const d in c)d in l||(r[d]=1);for(const d in l)i[d]||(n[d]=l[d],i[d]=1);t[a]=l}else for(const d in c)i[d]=1}for(const c in r)c in n||(n[c]=void 0);return n}function Il(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function He(t){t&&t.c()}function qe(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Hd(()=>{const a=t.$$.on_mount.map(kE).filter($_);t.$$.on_destroy?t.$$.on_destroy.push(...a):Jr(a),t.$$.on_mount=[]}),i.forEach(Hd)}function We(t,e){const n=t.$$;n.fragment!==null&&(GP(n.after_update),Jr(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function HP(t,e){t.$$.dirty[0]===-1&&(bf.push(t),BE(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=M.length?M[0]:T;return v.ctx&&i(v.ctx[E],v.ctx[E]=k)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](k),S&&HP(t,E)),T}):[],v.update(),S=!0,Jr(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=VP(e.target);v.fragment&&v.fragment.l(E),E.forEach(xe)}else v.fragment&&v.fragment.c();e.intro&&he(t.$$.fragment),qe(t,e.target,e.anchor),UE()}Od(d)}class Xt{constructor(){Pi(this,"$$");Pi(this,"$$set")}$destroy(){We(this,1),this.$destroy=Mt}$on(e,n){if(!$_(n))return Mt;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!OP(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ZP="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ZP);function Hx(t){let e,n;return{c(){e=ye("div"),n=ut(t[0]),Ce(e,"class","svelte-1uuov7f")},m(r,i){we(r,e,i),ae(e,n)},p(r,i){i&1&&cr(n,r[0])},d(r){r&&xe(e)}}}function XP(t){let e,n=t[0]&&Hx(t);return{c(){n&&n.c(),e=Fi()},m(r,i){n&&n.m(r,i),we(r,e,i)},p(r,[i]){r[0]?n?n.p(r,i):(n=Hx(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Mt,o:Mt,d(r){r&&xe(e),n&&n.d(r)}}}function YP(t,e,n){let{loading:r}=e;return t.$$set=i=>{"loading"in i&&n(0,r=i.loading)},[r]}class jE extends Xt{constructor(e){super(),Zt(this,e,YP,XP,Vt,{loading:0})}}const KP=t=>({dialog:t&1}),Zx=t=>({dialog:t[0]});function JP(t){let e,n,r,i,a;const c=t[4].default,l=Sr(c,t,t[3],Zx);return{c(){e=ye("dialog"),n=ye("article"),l&&l.c(),e.open=!0},m(d,v){we(d,e,v),ae(e,n),l&&l.m(n,null),t[6](e),r=!0,i||(a=[Pt(window,"click",t[1]),Pt(window,"keydown",t[2]),Pt(e,"close",t[5])],i=!0)},p(d,[v]){l&&l.p&&(!r||v&9)&&Ir(l,c,d,d[3],r?Er(c,d[3],v,KP):Cr(d[3]),Zx)},i(d){r||(he(l,d),r=!0)},o(d){ve(l,d),r=!1},d(d){d&&xe(e),l&&l.d(d),t[6](null),i=!1,Jr(a)}}}function $P(t,e,n){let{$$slots:r={},$$scope:i}=e,a;function c(S){a.open&&S.target==a&&a.close()}function l(S){(S.key=="Escape"||S.key=="Enter")&&(S.stopPropagation(),a.close())}function d(S){gn.call(this,t,S)}function v(S){si[S?"unshift":"push"](()=>{a=S,n(0,a)})}return t.$$set=S=>{"$$scope"in S&&n(3,i=S.$$scope)},[a,c,l,i,r,d,v]}class p1 extends Xt{constructor(e){super(),Zt(this,e,$P,JP,Vt,{})}}function Xx(t,e,n){const r=t.slice();return r[1]=e[n][0],r[2]=e[n][1],r}function Yx(t){let e,n,r=t[1]+"",i,a,c,l=t[2]+"",d,v;return{c(){e=ye("tr"),n=ye("td"),i=ut(r),a=Xe(),c=ye("td"),d=ut(l),v=Xe()},m(S,E){we(S,e,E),ae(e,n),ae(n,i),ae(e,a),ae(e,c),ae(c,d),ae(e,v)},p(S,E){E&1&&r!==(r=S[1]+"")&&cr(i,r),E&1&&l!==(l=S[2]+"")&&cr(d,l)},d(S){S&&xe(e)}}}function QP(t){let e,n,r=vs(Object.entries(t[0])),i=[];for(let a=0;a{"properties"in i&&n(0,r=i.properties)},[r]}class ey extends Xt{constructor(e){super(),Zt(this,e,eM,QP,Vt,{properties:0})}}function Kx(t,e){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Rr(t){if(t==null||t==null)throw new Error("Oops, notNull given something null");return t}let lt;const nu=new Array(128).fill(void 0);nu.push(void 0,null,!0,!1);function vn(t){return nu[t]}let zd=nu.length;function tM(t){t<132||(nu[t]=zd,zd=t)}function Yo(t){const e=vn(t);return tM(t),e}let Jo=0,Ed=null;function Tf(){return(Ed===null||Ed.byteLength===0)&&(Ed=new Uint8Array(lt.memory.buffer)),Ed}const Yg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},nM=typeof Yg.encodeInto=="function"?function(t,e){return Yg.encodeInto(t,e)}:function(t,e){const n=Yg.encode(t);return e.set(n),{read:t.length,written:n.length}};function Ba(t,e,n){if(n===void 0){const l=Yg.encode(t),d=e(l.length,1)>>>0;return Tf().subarray(d,d+l.length).set(l),Jo=l.length,d}let r=t.length,i=e(r,1)>>>0;const a=Tf();let c=0;for(;c127)break;a[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Tf().subarray(i+c,i+r),d=nM(t,l);c+=d.written}return Jo=c,i}function xf(t){return t==null}let Id=null;function Kt(){return(Id===null||Id.byteLength===0)&&(Id=new Int32Array(lt.memory.buffer)),Id}let Cd=null;function GE(){return(Cd===null||Cd.byteLength===0)&&(Cd=new Float64Array(lt.memory.buffer)),Cd}function ur(t){zd===nu.length&&nu.push(nu.length+1);const e=zd;return zd=nu[e],nu[e]=t,e}const qE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&qE.decode();function zs(t,e){return t=t>>>0,qE.decode(Tf().subarray(t,t+e))}let Td=null;function rM(){return(Td===null||Td.byteLength===0)&&(Td=new BigInt64Array(lt.memory.buffer)),Td}function pv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let a="[";i>0&&(a+=pv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:r}function iM(t,e){const n=e(t.length*1,1)>>>0;return Tf().set(t,n/1),Jo=t.length,n}function oM(t,e){return t=t>>>0,GE().subarray(t/8,t/8+e)}function sM(t,e){return t=t>>>0,Tf().subarray(t/1,t/1+e)}function Uc(t,e){try{return t.apply(this,e)}catch(n){lt.__wbindgen_exn_store(ur(n))}}class WE{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();lt.__wbg_ltn_free(e)}constructor(e,n){try{const d=lt.__wbindgen_add_to_stack_pointer(-16),v=iM(e,lt.__wbindgen_malloc),S=Jo;var r=xf(n)?0:Ba(n,lt.__wbindgen_malloc,lt.__wbindgen_realloc),i=Jo;lt.ltn_new(d,v,S,r,i);var a=Kt()[d/4+0],c=Kt()[d/4+1],l=Kt()[d/4+2];if(l)throw Yo(c);return this.__wbg_ptr=a>>>0,this}finally{lt.__wbindgen_add_to_stack_pointer(16)}}getInvertedBoundary(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_getInvertedBoundary(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}getBounds(){try{const i=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_getBounds(i,this.__wbg_ptr);var e=Kt()[i/4+0],n=Kt()[i/4+1],r=oM(e,n).slice();return lt.__wbindgen_free(e,n*8,8),r}finally{lt.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapper(){try{const i=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_toRouteSnapper(i,this.__wbg_ptr);var e=Kt()[i/4+0],n=Kt()[i/4+1],r=sM(e,n).slice();return lt.__wbindgen_free(e,n*1,1),r}finally{lt.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapperGj(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_toRouteSnapperGj(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}renderModalFilters(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_renderModalFilters(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}renderNeighbourhood(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_renderNeighbourhood(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}setNeighbourhoodBoundary(e,n){try{const a=lt.__wbindgen_add_to_stack_pointer(-16),c=Ba(e,lt.__wbindgen_malloc,lt.__wbindgen_realloc),l=Jo;lt.ltn_setNeighbourhoodBoundary(a,this.__wbg_ptr,c,l,ur(n));var r=Kt()[a/4+0],i=Kt()[a/4+1];if(i)throw Yo(r)}finally{lt.__wbindgen_add_to_stack_pointer(16)}}deleteNeighbourhoodBoundary(e){const n=Ba(e,lt.__wbindgen_malloc,lt.__wbindgen_realloc),r=Jo;lt.ltn_deleteNeighbourhoodBoundary(this.__wbg_ptr,n,r)}renameNeighbourhoodBoundary(e,n){const r=Ba(e,lt.__wbindgen_malloc,lt.__wbindgen_realloc),i=Jo,a=Ba(n,lt.__wbindgen_malloc,lt.__wbindgen_realloc),c=Jo;lt.ltn_renameNeighbourhoodBoundary(this.__wbg_ptr,r,i,a,c)}setCurrentNeighbourhood(e){try{const i=lt.__wbindgen_add_to_stack_pointer(-16),a=Ba(e,lt.__wbindgen_malloc,lt.__wbindgen_realloc),c=Jo;lt.ltn_setCurrentNeighbourhood(i,this.__wbg_ptr,a,c);var n=Kt()[i/4+0],r=Kt()[i/4+1];if(r)throw Yo(n)}finally{lt.__wbindgen_add_to_stack_pointer(16)}}addModalFilter(e,n){try{const a=lt.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,lt.__wbindgen_malloc,lt.__wbindgen_realloc),l=Jo;lt.ltn_addModalFilter(a,this.__wbg_ptr,ur(e),c,l);var r=Kt()[a/4+0],i=Kt()[a/4+1];if(i)throw Yo(r)}finally{lt.__wbindgen_add_to_stack_pointer(16)}}addManyModalFilters(e,n){try{const a=lt.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,lt.__wbindgen_malloc,lt.__wbindgen_realloc),l=Jo;lt.ltn_addManyModalFilters(a,this.__wbg_ptr,ur(e),c,l);var r=Kt()[a/4+0],i=Kt()[a/4+1];if(i)throw Yo(r)}finally{lt.__wbindgen_add_to_stack_pointer(16)}}deleteModalFilter(e){lt.ltn_deleteModalFilter(this.__wbg_ptr,e)}toggleDirection(e){lt.ltn_toggleDirection(this.__wbg_ptr,e)}undo(){lt.ltn_undo(this.__wbg_ptr)}redo(){lt.ltn_redo(this.__wbg_ptr)}getShortcutsCrossingRoad(e){let n,r;try{const S=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_getShortcutsCrossingRoad(S,this.__wbg_ptr,e);var i=Kt()[S/4+0],a=Kt()[S/4+1],c=Kt()[S/4+2],l=Kt()[S/4+3],d=i,v=a;if(l)throw d=0,v=0,Yo(c);return n=d,r=v,zs(d,v)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(n,r,1)}}getAllShortcuts(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_getAllShortcuts(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}toSavefile(){let e,n;try{const v=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_toSavefile(v,this.__wbg_ptr);var r=Kt()[v/4+0],i=Kt()[v/4+1],a=Kt()[v/4+2],c=Kt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,Yo(a);return e=l,n=d,zs(l,d)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(e,n,1)}}loadSavefile(e){try{const i=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_loadSavefile(i,this.__wbg_ptr,ur(e));var n=Kt()[i/4+0],r=Kt()[i/4+1];if(r)throw Yo(n)}finally{lt.__wbindgen_add_to_stack_pointer(16)}}compareRoute(e,n,r,i,a){let c,l;try{const k=lt.__wbindgen_add_to_stack_pointer(-16);lt.ltn_compareRoute(k,this.__wbg_ptr,e,n,r,i,a);var d=Kt()[k/4+0],v=Kt()[k/4+1],S=Kt()[k/4+2],E=Kt()[k/4+3],T=d,M=v;if(E)throw T=0,M=0,Yo(S);return c=T,l=M,zs(T,M)}finally{lt.__wbindgen_add_to_stack_pointer(16),lt.__wbindgen_free(c,l,1)}}}async function aM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){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",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function lM(){const t={};return t.wbg={},t.wbg.__wbindgen_object_drop_ref=function(e){Yo(e)},t.wbg.__wbindgen_string_get=function(e,n){const r=vn(n),i=typeof r=="string"?r:void 0;var a=xf(i)?0:Ba(i,lt.__wbindgen_malloc,lt.__wbindgen_realloc),c=Jo;Kt()[e/4+1]=c,Kt()[e/4+0]=a},t.wbg.__wbindgen_boolean_get=function(e){const n=vn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_bigint=function(e){return typeof vn(e)=="bigint"},t.wbg.__wbindgen_number_get=function(e,n){const r=vn(n),i=typeof r=="number"?r:void 0;GE()[e/8+1]=xf(i)?0:i,Kt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_is_object=function(e){const n=vn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_in=function(e,n){return vn(e)in vn(n)},t.wbg.__wbindgen_bigint_from_i64=function(e){return ur(e)},t.wbg.__wbindgen_jsval_eq=function(e,n){return vn(e)===vn(n)},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return ur(n)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(zs(e,n));return ur(r)},t.wbg.__wbindgen_is_undefined=function(e){return vn(e)===void 0},t.wbg.__wbindgen_string_new=function(e,n){const r=zs(e,n);return ur(r)},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return vn(e)==vn(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=vn(e);return ur(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=vn(e)[vn(n)];return ur(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(vn(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(vn(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(vn(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(vn(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(vn(e))},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return ur(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=vn(n).stack,i=Ba(r,lt.__wbindgen_malloc,lt.__wbindgen_realloc),a=Jo;Kt()[e/4+1]=a,Kt()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(zs(e,n))}finally{lt.__wbindgen_free(r,i,1)}},t.wbg.__wbg_performance_3f3012faa4463882=function(e){const n=vn(e).performance;return ur(n)},t.wbg.__wbg_now_2fd65358804c9485=function(e){return vn(e).now()},t.wbg.__wbg_get_f01601b5a68d10e3=function(e,n){const r=vn(e)[n>>>0];return ur(r)},t.wbg.__wbg_length_1009b1af0c481d7b=function(e){return vn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof vn(e)=="function"},t.wbg.__wbg_newnoargs_c62ea9419c21fbac=function(e,n){const r=new Function(zs(e,n));return ur(r)},t.wbg.__wbg_next_9b877f231f476d01=function(e){const n=vn(e).next;return ur(n)},t.wbg.__wbg_next_6529ee0cca8d57ed=function(){return Uc(function(e){const n=vn(e).next();return ur(n)},arguments)},t.wbg.__wbg_done_5fe336b092d60cf2=function(e){return vn(e).done},t.wbg.__wbg_value_0c248a78fdc8e19f=function(e){const n=vn(e).value;return ur(n)},t.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return ur(Symbol.iterator)},t.wbg.__wbg_get_7b48513de5dc5ea4=function(){return Uc(function(e,n){const r=Reflect.get(vn(e),vn(n));return ur(r)},arguments)},t.wbg.__wbg_call_90c26b09837aba1c=function(){return Uc(function(e,n){const r=vn(e).call(vn(n));return ur(r)},arguments)},t.wbg.__wbg_self_f0e34d89f33b99fd=function(){return Uc(function(){const e=self.self;return ur(e)},arguments)},t.wbg.__wbg_window_d3b084224f4774d7=function(){return Uc(function(){const e=window.window;return ur(e)},arguments)},t.wbg.__wbg_globalThis_9caa27ff917c6860=function(){return Uc(function(){const e=globalThis.globalThis;return ur(e)},arguments)},t.wbg.__wbg_global_35dfdd59a4da3e74=function(){return Uc(function(){const e=global.global;return ur(e)},arguments)},t.wbg.__wbg_isArray_74fb723e24f76012=function(e){return Array.isArray(vn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(e){let n;try{n=vn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(e){return Number.isSafeInteger(vn(e))},t.wbg.__wbg_entries_9e2e2aa45aa5094a=function(e){const n=Object.entries(vn(e));return ur(n)},t.wbg.__wbg_buffer_a448f833075b71ba=function(e){const n=vn(e).buffer;return ur(n)},t.wbg.__wbg_new_8f67e318f15d7254=function(e){const n=new Uint8Array(vn(e));return ur(n)},t.wbg.__wbg_set_2357bf09366ee480=function(e,n,r){vn(e).set(vn(n),r>>>0)},t.wbg.__wbg_length_1d25fa9e4ac21ce7=function(e){return vn(e).length},t.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(e){let n;try{n=vn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=vn(n),i=typeof r=="bigint"?r:void 0;rM()[e/8+1]=xf(i)?BigInt(0):i,Kt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=pv(vn(n)),i=Ba(r,lt.__wbindgen_malloc,lt.__wbindgen_realloc),a=Jo;Kt()[e/4+1]=a,Kt()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(zs(e,n))},t.wbg.__wbindgen_memory=function(){const e=lt.memory;return ur(e)},t}function uM(t,e){return lt=t.exports,HE.__wbindgen_wasm_module=e,Td=null,Cd=null,Id=null,Ed=null,lt}async function HE(t){if(lt!==void 0)return lt;typeof t>"u"&&(t="/ltn/assets/backend_bg.wasm");const e=lM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await aM(await t,e);return uM(n,r)}var gm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ty(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var ZE={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(n,r){t.exports=r()})(gm,function(){var n={},r={};function i(c,l,d){if(r[c]=d,c==="index"){var v="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",S={};return r.shared(S),r.index(n,S),typeof window<"u"&&n.setWorkerUrl(window.URL.createObjectURL(new Blob([v],{type:"text/javascript"}))),n}}i("shared",["exports"],function(c){function l(u,o,h,p){return new(h||(h=Promise))(function(_,x){function w(D){try{P(p.next(D))}catch(O){x(O)}}function I(D){try{P(p.throw(D))}catch(O){x(O)}}function P(D){var O;D.done?_(D.value):(O=D.value,O instanceof h?O:new h(function(B){B(O)})).then(w,I)}P((p=p.apply(u,o||[])).next())})}function d(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var v=S;function S(u,o){this.x=u,this.y=o}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,o){return this.clone()._rotateAround(u,o)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var o=u.x-this.x,h=u.y-this.y;return o*o+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,o){return Math.atan2(this.x*o-this.y*u,this.x*u+this.y*o)},_matMult:function(u){var o=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=o,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var o=Math.cos(u),h=Math.sin(u),p=h*this.x+o*this.y;return this.x=o*this.x-h*this.y,this.y=p,this},_rotateAround:function(u,o){var h=Math.cos(u),p=Math.sin(u),_=o.y+p*(this.x-o.x)+h*(this.y-o.y);return this.x=o.x+h*(this.x-o.x)-p*(this.y-o.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},S.convert=function(u){return u instanceof S?u:Array.isArray(u)?new S(u[0],u[1]):u};var E=d(v),T=M;function M(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}M.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var k=d(T);let R,z;function U(){return R==null&&(R=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),R}function F(){if(z==null&&(z=!1,U())){const o=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(o){for(let p=0;p<5*5;p++){const _=4*p;o.fillStyle=`rgb(${_},${_+1},${_+2})`,o.fillRect(p%5,Math.floor(p/5),1,1)}const h=o.getImageData(0,0,5,5).data;for(let p=0;p<5*5*4;p++)if(p%4!=3&&h[p]!==p){z=!0;break}}}return z||!1}function G(u,o,h,p){const _=new k(u,o,h,p);return function(x){return _.solve(x)}}const H=G(.25,.1,.25,1);function J(u,o,h){return Math.min(h,Math.max(o,u))}function oe(u,o,h){const p=h-o,_=((u-o)%p+p)%p+o;return _===o?h:_}function ie(u,...o){for(const h of o)for(const p in h)u[p]=h[p];return u}let ce=1;function fe(u,o,h){const p={};for(const _ in u)p[_]=o.call(h||this,u[_],_,u);return p}function Te(u,o,h){const p={};for(const _ in u)o.call(h||this,u[_],_,u)&&(p[_]=u[_]);return p}function Q(u){return Array.isArray(u)?u.map(Q):typeof u=="object"&&u?fe(u,Q):u}const de={};function Qe(u){de[u]||(typeof console<"u"&&console.warn(u),de[u]=!0)}function Me(u,o,h){return(h.y-u.y)*(o.x-u.x)>(o.y-u.y)*(h.x-u.x)}function it(u){let o=0;for(let h,p,_=0,x=u.length,w=x-1;_"u")throw new Error("VideoFrame not supported");const x=new VideoFrame(u,{timestamp:0});try{const w=x==null?void 0:x.format;if(!w||!w.startsWith("BGR")&&!w.startsWith("RGB"))throw new Error(`Unrecognized format ${w}`);const I=w.startsWith("BGR"),P=new Uint8ClampedArray(p*_*4);if(yield x.copyTo(P,function(D,O,B,W,X){const K=4*Math.max(-O,0),re=(Math.max(0,B)-B)*W*4+K,pe=4*W,be=Math.max(0,O),Oe=Math.max(0,B);return{rect:{x:be,y:Oe,width:Math.min(D.width,O+W)-be,height:Math.min(D.height,B+X)-Oe},layout:[{offset:re,stride:pe}]}}(u,o,h,p,_)),I)for(let D=0;Dct(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Ln=function(u,o){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const p=_n(u.url);if(p)return p(u,o);if(ct(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:pn},o)}if(!(/^file:/.test(h=u.url)||/^file:/.test(zr())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(p,_){return l(this,void 0,void 0,function*(){const x=new Request(p.url,{method:p.method||"GET",body:p.body,credentials:p.credentials,headers:p.headers,cache:p.cache,referrer:zr(),signal:_.signal});p.type==="json"&&x.headers.set("Accept","application/json");const w=yield fetch(x);if(!w.ok){const D=yield w.blob();throw new Yn(w.status,w.statusText,p.url,D)}let I;I=p.type==="arrayBuffer"||p.type==="image"?w.arrayBuffer():p.type==="json"?w.json():w.text();const P=yield I;if(_.signal.aborted)throw xn();return{data:P,cacheControl:w.headers.get("Cache-Control"),expires:w.headers.get("Expires")}})}(u,o);if(ct(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:pn},o)}var h;return function(p,_){return new Promise((x,w)=>{const I=new XMLHttpRequest;I.open(p.method||"GET",p.url,!0),p.type!=="arrayBuffer"&&p.type!=="image"||(I.responseType="arraybuffer");for(const P in p.headers)I.setRequestHeader(P,p.headers[P]);p.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=p.credentials==="include",I.onerror=()=>{w(new Error(I.statusText))},I.onload=()=>{if(!_.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let P=I.response;if(p.type==="json")try{P=JSON.parse(I.response)}catch(D){return void w(D)}x({data:P,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const P=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});w(new Yn(I.status,I.statusText,p.url,P))}},_.signal.addEventListener("abort",()=>{I.abort(),w(xn())}),I.send(p.body)})}(u,o)};function sr(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const o=new URL(u),h=window.location;return o.protocol===h.protocol&&o.host===h.host}function Zn(u,o,h){h[u]&&h[u].indexOf(o)!==-1||(h[u]=h[u]||[],h[u].push(o))}function te(u,o,h){if(h&&h[u]){const p=h[u].indexOf(o);p!==-1&&h[u].splice(p,1)}}class Ae{constructor(o,h={}){ie(this,h),this.type=o}}class dt extends Ae{constructor(o,h={}){super("error",ie({error:o},h))}}class en{on(o,h){return this._listeners=this._listeners||{},Zn(o,h,this._listeners),this}off(o,h){return te(o,h,this._listeners),te(o,h,this._oneTimeListeners),this}once(o,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},Zn(o,h,this._oneTimeListeners),this):new Promise(p=>this.once(o,p))}fire(o,h){typeof o=="string"&&(o=new Ae(o,h||{}));const p=o.type;if(this.listens(p)){o.target=this;const _=this._listeners&&this._listeners[p]?this._listeners[p].slice():[];for(const I of _)I.call(this,o);const x=this._oneTimeListeners&&this._oneTimeListeners[p]?this._oneTimeListeners[p].slice():[];for(const I of x)te(p,I,this._oneTimeListeners),I.call(this,o);const w=this._eventedParent;w&&(ie(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),w.fire(o))}else o instanceof dt&&console.error(o.error);return this}listens(o){return this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)}setEventedParent(o,h){return this._eventedParent=o,this._eventedParentData=h,this}}var Re={$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 It=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function In(u,o){const h={};for(const p in u)p!=="ref"&&(h[p]=u[p]);return It.forEach(p=>{p in o&&(h[p]=o[p])}),h}function yn(u,o){if(Array.isArray(u)){if(!Array.isArray(o)||u.length!==o.length)return!1;for(let h=0;h`:u.itemType.kind==="value"?"array":`array<${o}>`}return u.kind}const Le=[li,ft,ln,sn,Hr,$r,us,$(on),me,q,Z];function ee(u,o){if(o.kind==="error")return null;if(u.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!ee(u.itemType,o.itemType))&&(typeof u.N!="number"||u.N===o.N))return null}else{if(u.kind===o.kind)return null;if(u.kind==="value"){for(const h of Le)if(!ee(h,o))return null}}return`Expected ${se(u)} but found ${se(o)} instead.`}function Pe(u,o){return o.some(h=>h.kind===u.kind)}function Se(u,o){return o.some(h=>h==="null"?u===null:h==="array"?Array.isArray(u):h==="object"?u&&!Array.isArray(u)&&typeof u=="object":h===typeof u)}function Ne(u,o){return u.kind==="array"&&o.kind==="array"?u.itemType.kind===o.itemType.kind&&typeof u.N=="number":u.kind===o.kind}const Ue=.96422,Ye=.82521,Je=4/29,Dt=6/29,zt=3*Dt*Dt,Qt=Dt*Dt*Dt,tn=Math.PI/180,Pn=180/Math.PI;function er(u){return(u%=360)<0&&(u+=360),u}function vr([u,o,h,p]){let _,x;const w=dn((.2225045*(u=ui(u))+.7168786*(o=ui(o))+.0606169*(h=ui(h)))/1);u===o&&o===h?_=x=w:(_=dn((.4360747*u+.3850649*o+.1430804*h)/Ue),x=dn((.0139322*u+.0971045*o+.7141733*h)/Ye));const I=116*w-16;return[I<0?0:I,500*(_-w),200*(w-x),p]}function ui(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function dn(u){return u>Qt?Math.pow(u,1/3):u/zt+Je}function Fr([u,o,h,p]){let _=(u+16)/116,x=isNaN(o)?_:_+o/500,w=isNaN(h)?_:_-h/200;return _=1*uo(_),x=Ue*uo(x),w=Ye*uo(w),[mi(3.1338561*x-1.6168667*_-.4906146*w),mi(-.9787684*x+1.9161415*_+.033454*w),mi(.0719453*x-.2289914*_+1.4052427*w),p]}function mi(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function uo(u){return u>Dt?u*u*u:zt*(u-Je)}function So(u){return parseInt(u.padEnd(2,u),16)/255}function Li(u,o){return Js(o?u/100:u,0,1)}function Js(u,o,h){return Math.min(Math.max(o,u),h)}function Pm(u){return!u.some(Number.isNaN)}const Ly={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 Kn{constructor(o,h,p,_=1,x=!0){this.r=o,this.g=h,this.b=p,this.a=_,x||(this.r*=_,this.g*=_,this.b*=_,_||this.overwriteGetter("rgb",[o,h,p,_]))}static parse(o){if(o instanceof Kn)return o;if(typeof o!="string")return;const h=function(p){if((p=p.toLowerCase().trim())==="transparent")return[0,0,0,0];const _=Ly[p];if(_){const[w,I,P]=_;return[w/255,I/255,P/255,1]}if(p.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(p)){const w=p.length<6?1:2;let I=1;return[So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+w)||"ff")]}if(p.startsWith("rgb")){const w=p.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(w){const[I,P,D,O,B,W,X,K,re,pe,be,Oe]=w,Ee=[O||" ",X||" ",pe].join("");if(Ee===" "||Ee===" /"||Ee===",,"||Ee===",,,"){const ke=[D,W,re].join(""),$e=ke==="%%%"?100:ke===""?255:0;if($e){const et=[Js(+P/$e,0,1),Js(+B/$e,0,1),Js(+K/$e,0,1),be?Li(+be,Oe):1];if(Pm(et))return et}}return}}const x=p.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[w,I,P,D,O,B,W,X,K]=x,re=[P||" ",O||" ",W].join("");if(re===" "||re===" /"||re===",,"||re===",,,"){const pe=[+I,Js(+D,0,100),Js(+B,0,100),X?Li(+X,K):1];if(Pm(pe))return function([be,Oe,Ee,ke]){function $e(et){const St=(et+be/30)%12,kt=Oe*Math.min(Ee,1-Ee);return Ee-kt*Math.max(-1,Math.min(St-3,9-St,1))}return be=er(be),Oe/=100,Ee/=100,[$e(0),$e(8),$e(4),ke]}(pe)}}}(o);return h?new Kn(...h,!1):void 0}get rgb(){const{r:o,g:h,b:p,a:_}=this,x=_||1/0;return this.overwriteGetter("rgb",[o/x,h/x,p/x,_])}get hcl(){return this.overwriteGetter("hcl",function(o){const[h,p,_,x]=vr(o),w=Math.sqrt(p*p+_*_);return[Math.round(1e4*w)?er(Math.atan2(_,p)*Pn):NaN,w,h,x]}(this.rgb))}get lab(){return this.overwriteGetter("lab",vr(this.rgb))}overwriteGetter(o,h){return Object.defineProperty(this,o,{value:h}),h}toString(){const[o,h,p,_]=this.rgb;return`rgba(${[o,h,p].map(x=>Math.round(255*x)).join(",")},${_})`}}Kn.black=new Kn(0,0,0,1),Kn.white=new Kn(1,1,1,1),Kn.transparent=new Kn(0,0,0,0),Kn.red=new Kn(1,0,0,1);class gp{constructor(o,h,p){this.sensitivity=o?h?"variant":"case":h?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,h){return this.collator.compare(o,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class _p{constructor(o,h,p,_,x){this.text=o,this.image=h,this.scale=p,this.fontStack=_,this.textColor=x}}class Vo{constructor(o){this.sections=o}static fromString(o){return new Vo([new _p(o,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(o=>o.text.length!==0||o.image&&o.image.name.length!==0)}static factory(o){return o instanceof Vo?o:Vo.fromString(o)}toString(){return this.sections.length===0?"":this.sections.map(o=>o.text).join("")}}class Eo{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof Eo)return o;if(typeof o=="number")return new Eo([o,o,o,o]);if(Array.isArray(o)&&!(o.length<1||o.length>4)){for(const h of o)if(typeof h!="number")return;switch(o.length){case 1:o=[o[0],o[0],o[0],o[0]];break;case 2:o=[o[0],o[1],o[0],o[1]];break;case 3:o=[o[0],o[1],o[2],o[1]]}return new Eo(o)}}toString(){return JSON.stringify(this.values)}}const mc=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class cs{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof cs)return o;if(Array.isArray(o)&&!(o.length<1)&&o.length%2==0){for(let h=0;h=0&&u<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof h=="number"&&h>=0&&h<=255?p===void 0||typeof p=="number"&&p>=0&&p<=1?null:`Invalid rgba value [${[u,o,h,p].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof p=="number"?[u,o,h,p]:[u,o,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mh(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof Kn||u instanceof gp||u instanceof Vo||u instanceof Eo||u instanceof cs||u instanceof hs)return!0;if(Array.isArray(u)){for(const o of u)if(!mh(o))return!1;return!0}if(typeof u=="object"){for(const o in u)if(!mh(u[o]))return!1;return!0}return!1}function ci(u){if(u===null)return li;if(typeof u=="string")return ln;if(typeof u=="boolean")return sn;if(typeof u=="number")return ft;if(u instanceof Kn)return Hr;if(u instanceof gp)return Aa;if(u instanceof Vo)return $r;if(u instanceof Eo)return me;if(u instanceof cs)return Z;if(u instanceof hs)return q;if(Array.isArray(u)){const o=u.length;let h;for(const p of u){const _=ci(p);if(h){if(h===_)continue;h=on;break}h=_}return $(h||on,o)}return us}function gc(u){const o=typeof u;return u===null?"":o==="string"||o==="number"||o==="boolean"?String(u):u instanceof Kn||u instanceof Vo||u instanceof Eo||u instanceof cs||u instanceof hs?u.toString():JSON.stringify(u)}class nl{constructor(o,h){this.type=o,this.value=h}static parse(o,h){if(o.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!mh(o[1]))return h.error("invalid value");const p=o[1];let _=ci(p);const x=h.expectedType;return _.kind!=="array"||_.N!==0||!x||x.kind!=="array"||typeof x.N=="number"&&x.N!==0||(_=x),new nl(_,p)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Pr{constructor(o){this.name="ExpressionEvaluationError",this.message=o}toJSON(){return this.message}}const gh={string:ln,number:ft,boolean:sn,object:us};class Uo{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");let p,_=1;const x=o[0];if(x==="array"){let I,P;if(o.length>2){const D=o[1];if(typeof D!="string"||!(D in gh)||D==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);I=gh[D],_++}else I=on;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return h.error('The length argument to "array" must be a positive integer literal',2);P=o[2],_++}p=$(I,P)}else{if(!gh[x])throw new Error(`Types doesn't contain name = ${x}`);p=gh[x]}const w=[];for(;_o.outputDefined())}}const _h={"to-boolean":sn,"to-color":Hr,"to-number":ft,"to-string":ln};class $s{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[0];if(!_h[p])throw new Error(`Can't parse ${p} as it is not part of the known types`);if((p==="to-boolean"||p==="to-string")&&o.length!==2)return h.error("Expected one argument.");const _=_h[p],x=[];for(let w=1;w4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:bu(h[0],h[1],h[2],h[3]),!p))return new Kn(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new Pr(p||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const p of this.args){h=p.evaluate(o);const _=Eo.parse(h);if(_)return _}throw new Pr(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const p of this.args){h=p.evaluate(o);const _=cs.parse(h);if(_)return _}throw new Pr(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const p of this.args){if(h=p.evaluate(o),h===null)return 0;const _=Number(h);if(!isNaN(_))return _}throw new Pr(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return Vo.fromString(gc(this.args[0].evaluate(o)));case"resolvedImage":return hs.fromString(gc(this.args[0].evaluate(o)));default:return gc(this.args[0].evaluate(o))}}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const _c=["Unknown","Point","LineString","Polygon"];class Jn{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"?_c[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(o){let h=this._parseColorCache[o];return h||(h=this._parseColorCache[o]=Kn.parse(o)),h}}class yh{constructor(o,h,p=[],_,x=new Fl,w=[]){this.registry=o,this.path=p,this.key=p.map(I=>`[${I}]`).join(""),this.scope=x,this.errors=w,this.expectedType=_,this._isConstant=h}parse(o,h,p,_,x={}){return h?this.concat(h,p,_)._parse(o,x):this._parse(o,x)}_parse(o,h){function p(_,x,w){return w==="assert"?new Uo(x,[_]):w==="coerce"?new $s(x,[_]):_}if(o!==null&&typeof o!="string"&&typeof o!="boolean"&&typeof o!="number"||(o=["literal",o]),Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=o[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const x=this.registry[_];if(x){let w=x.parse(o,this);if(!w)return null;if(this.expectedType){const I=this.expectedType,P=w.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||P.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||P.kind!=="value"&&P.kind!=="string")if(I.kind!=="padding"||P.kind!=="value"&&P.kind!=="number"&&P.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||P.kind!=="value"&&P.kind!=="array"){if(this.checkSubtype(I,P))return null}else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"assert")}if(!(w instanceof nl)&&w.type.kind!=="resolvedImage"&&this._isConstant(w)){const I=new Jn;try{w=new nl(w.type,w.evaluate(I))}catch(P){return this.error(P.message),null}}return w}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(o===void 0?"'undefined' value invalid. Use null instead.":typeof o=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,h,p){const _=typeof o=="number"?this.path.concat(o):this.path,x=p?this.scope.concat(p):this.scope;return new yh(this.registry,this._isConstant,_,h||null,x,this.errors)}error(o,...h){const p=`${this.key}${h.map(_=>`[${_}]`).join("")}`;this.errors.push(new lo(p,o))}checkSubtype(o,h){const p=ee(o,h);return p&&this.error(p),p}}class xu{constructor(o,h,p){this.type=Aa,this.locale=p,this.caseSensitive=o,this.diacriticSensitive=h}static parse(o,h){if(o.length!==2)return h.error("Expected one argument.");const p=o[1];if(typeof p!="object"||Array.isArray(p))return h.error("Collator options argument must be an object.");const _=h.parse(p["case-sensitive"]!==void 0&&p["case-sensitive"],1,sn);if(!_)return null;const x=h.parse(p["diacritic-sensitive"]!==void 0&&p["diacritic-sensitive"],1,sn);if(!x)return null;let w=null;return p.locale&&(w=h.parse(p.locale,1,ln),!w)?null:new xu(_,x,w)}evaluate(o){return new gp(this.caseSensitive.evaluate(o),this.diacriticSensitive.evaluate(o),this.locale?this.locale.evaluate(o):null)}eachChild(o){o(this.caseSensitive),o(this.diacriticSensitive),this.locale&&o(this.locale)}outputDefined(){return!1}}const rl=8192;function vh(u,o){u[0]=Math.min(u[0],o[0]),u[1]=Math.min(u[1],o[1]),u[2]=Math.max(u[2],o[0]),u[3]=Math.max(u[3],o[1])}function yc(u,o){return!(u[0]<=o[0]||u[2]>=o[2]||u[1]<=o[1]||u[3]>=o[3])}function Py(u,o){const h=(180+u[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_=Math.pow(2,o.z);return[Math.round(h*_*rl),Math.round(p*_*rl)]}function Mm(u,o,h){const p=u[0]-o[0],_=u[1]-o[1],x=u[0]-h[0],w=u[1]-h[1];return p*w-x*_==0&&p*x<=0&&_*w<=0}function bh(u,o){let h=!1;for(let w=0,I=o.length;w(p=u)[1]!=(x=P[D+1])[1]>p[1]&&p[0]<(x[0]-_[0])*(p[1]-_[1])/(x[1]-_[1])+_[0]&&(h=!h)}}var p,_,x;return h}function My(u,o){for(let h=0;h0&&I<0||w<0&&I>0}function Ay(u,o,h){for(const D of h)for(let O=0;Oh[2]){const _=.5*p;let x=u[0]-h[0]>_?-p:h[0]-u[0]>_?p:0;x===0&&(x=u[0]-h[2]>_?-p:h[2]-u[0]>_?p:0),u[0]+=x}vh(o,u)}function wh(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const I of u)for(const P of I){const D=[P.x+x[0],P.y+x[1]];Nm(D,o,h,_),w.push(D)}return w}function Om(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const P of u){const D=[];for(const O of P){const B=[O.x+x[0],O.y+x[1]];vh(o,B),D.push(B)}w.push(D)}if(o[2]-o[0]<=_/2){(I=o)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const P of w)for(const D of P)Nm(D,o,h,_)}var I;return w}class Bl{constructor(o,h){this.type=sn,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(mh(o[1])){const p=o[1];if(p.type==="FeatureCollection"){const _=[];for(const x of p.features){const{type:w,coordinates:I}=x.geometry;w==="Polygon"&&_.push(I),w==="MultiPolygon"&&_.push(...I)}if(_.length)return new Bl(p,{type:"MultiPolygon",coordinates:_})}else if(p.type==="Feature"){const _=p.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Bl(p,p.geometry)}else if(p.type==="Polygon"||p.type==="MultiPolygon")return new Bl(p,p)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!yc(_,x))return!1;for(const D of P)if(!bh(D,I))return!1}if(p.type==="MultiPolygon"){const I=Rm(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!yc(_,x))return!1;for(const D of P)if(!My(D,I))return!1}return!0}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=Om(h.geometry(),_,x,w);if(!yc(_,x))return!1;for(const D of P)if(!km(D,I))return!1}if(p.type==="MultiPolygon"){const I=Rm(p.coordinates,x,w),P=Om(h.geometry(),_,x,w);if(!yc(_,x))return!1;for(const D of P)if(!Dm(D,I))return!1}return!0}(o,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Sh{constructor(o,h){this.type=h.type,this.name=o,this.boundExpression=h}static parse(o,h){if(o.length!==2||typeof o[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const p=o[1];return h.scope.has(p)?new Sh(p,h.scope.get(p)):h.error(`Unknown variable "${p}". Make sure "${p}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}}class jo{constructor(o,h,p,_){this.name=o,this.type=h,this._evaluate=p,this.args=_}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}static parse(o,h){const p=o[0],_=jo.definitions[p];if(!_)return h.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0);const x=Array.isArray(_)?_[0]:_.type,w=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,I=w.filter(([D])=>!Array.isArray(D)||D.length===o.length-1);let P=null;for(const[D,O]of I){P=new yh(h.registry,vc,h.path,null,h.scope);const B=[];let W=!1;for(let X=1;X{return W=B,Array.isArray(W)?`(${W.map(se).join(", ")})`:`(${se(W.type)}...)`;var W}).join(" | "),O=[];for(let B=1;B{h=o?h&&vc(p):h&&p instanceof nl}),!!h&&Eh(u)&&xc(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Eh(u){if(u instanceof jo&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof Bl)return!1;let o=!0;return u.eachChild(h=>{o&&!Eh(h)&&(o=!1)}),o}function bc(u){if(u instanceof jo&&u.name==="feature-state")return!1;let o=!0;return u.eachChild(h=>{o&&!bc(h)&&(o=!1)}),o}function xc(u,o){if(u instanceof jo&&o.indexOf(u.name)>=0)return!1;let h=!0;return u.eachChild(p=>{h&&!xc(p,o)&&(h=!1)}),h}function wc(u,o){const h=u.length-1;let p,_,x=0,w=h,I=0;for(;x<=w;)if(I=Math.floor((x+w)/2),p=u[I],_=u[I+1],p<=o){if(I===h||o<_)return I;x=I+1}else{if(!(p>o))throw new Pr("Input is not a number.");w=I-1}return 0}class Sc{constructor(o,h,p){this.type=o,this.input=h,this.labels=[],this.outputs=[];for(const[_,x]of p)this.labels.push(_),this.outputs.push(x)}static parse(o,h){if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=[];let x=null;h.expectedType&&h.expectedType.kind!=="value"&&(x=h.expectedType);for(let w=1;w=I)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);const B=h.parse(P,O,x);if(!B)return null;x=x||B.type,_.push([I,B])}return new Sc(x,p,_)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;return _>=h[x-1]?p[x-1].evaluate(o):p[wc(h,_)].evaluate(o)}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function ky(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Dy=zm;function zm(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}zm.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var Ry=ky(Dy);function Vl(u,o,h){return u+h*(o-u)}function Ih(u,o,h){return u.map((p,_)=>Vl(p,o[_],h))}const co={number:Vl,color:function(u,o,h,p="rgb"){switch(p){case"rgb":{const[_,x,w,I]=Ih(u.rgb,o.rgb,h);return new Kn(_,x,w,I,!1)}case"hcl":{const[_,x,w,I]=u.hcl,[P,D,O,B]=o.hcl;let W,X;if(isNaN(_)||isNaN(P))isNaN(_)?isNaN(P)?W=NaN:(W=P,w!==1&&w!==0||(X=D)):(W=_,O!==1&&O!==0||(X=x));else{let Oe=P-_;P>_&&Oe>180?Oe-=360:P<_&&_-P>180&&(Oe+=360),W=_+h*Oe}const[K,re,pe,be]=function([Oe,Ee,ke,$e]){return Oe=isNaN(Oe)?0:Oe*tn,Fr([ke,Math.cos(Oe)*Ee,Math.sin(Oe)*Ee,$e])}([W,X??Vl(x,D,h),Vl(w,O,h),Vl(I,B,h)]);return new Kn(K,re,pe,be,!1)}case"lab":{const[_,x,w,I]=Fr(Ih(u.lab,o.lab,h));return new Kn(_,x,w,I,!1)}}},array:Ih,padding:function(u,o,h){return new Eo(Ih(u.values,o.values,h))},variableAnchorOffsetCollection:function(u,o,h){const p=u.values,_=o.values;if(p.length!==_.length)throw new Pr(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${o.toString()}`);const x=[];for(let w=0;wtypeof O!="number"||O<0||O>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:D}}}if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(x=h.parse(x,2,ft),!x)return null;const I=[];let P=null;p==="interpolate-hcl"||p==="interpolate-lab"?P=Hr:h.expectedType&&h.expectedType.kind!=="value"&&(P=h.expectedType);for(let D=0;D=O)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',W);const K=h.parse(B,X,P);if(!K)return null;P=P||K.type,I.push([O,K])}return Ne(P,ft)||Ne(P,Hr)||Ne(P,me)||Ne(P,Z)||Ne(P,$(ft))?new Hi(P,p,_,x,I):h.error(`Type ${se(P)} is not interpolatable.`)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;if(_>=h[x-1])return p[x-1].evaluate(o);const w=wc(h,_),I=Hi.interpolationFactor(this.interpolation,_,h[w],h[w+1]),P=p[w].evaluate(o),D=p[w+1].evaluate(o);switch(this.operator){case"interpolate":return co[this.type.kind](P,D,I);case"interpolate-hcl":return co.color(P,D,I,"hcl");case"interpolate-lab":return co.color(P,D,I,"lab")}}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Gn(u,o,h,p){const _=p-h,x=u-h;return _===0?0:o===1?x/_:(Math.pow(o,x)-1)/(Math.pow(o,_)-1)}class Ch{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expectected at least one argument.");let p=null;const _=h.expectedType;_&&_.kind!=="value"&&(p=_);const x=[];for(const I of o.slice(1)){const P=h.parse(I,1+x.length,p,void 0,{typeAnnotation:"omit"});if(!P)return null;p=p||P.type,x.push(P)}if(!p)throw new Error("No output type");const w=_&&x.some(I=>ee(_,I.type));return new Ch(w?on:p,x)}evaluate(o){let h,p=null,_=0;for(const x of this.args)if(_++,p=x.evaluate(o),p&&p instanceof hs&&!p.available&&(h||(h=p.name),p=null,_===this.args.length&&(p=h)),p!==null)break;return p}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}class Th{constructor(o,h){this.type=h.type,this.bindings=[].concat(o),this.result=h}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const h of this.bindings)o(h[1]);o(this.result)}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const p=[];for(let x=1;x=p.length)throw new Pr(`Array index out of bounds: ${h} > ${p.length-1}.`);if(h!==Math.floor(h))throw new Pr(`Array index must be an integer, but found ${h} instead.`);return p[h]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}}class vp{constructor(o,h){this.type=sn,this.needle=o,this.haystack=h}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);return p&&_?Pe(p.type,[sn,ln,ft,li,on])?new vp(p,_):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${se(p.type)} instead`):null}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${se(ci(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${se(ci(p))} instead.`);return p.indexOf(h)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}}class Lh{constructor(o,h,p){this.type=ft,this.needle=o,this.haystack=h,this.fromIndex=p}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);if(!p||!_)return null;if(!Pe(p.type,[sn,ln,ft,li,on]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${se(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Lh(p,_,x):null}return new Lh(p,_)}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${se(ci(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${se(ci(p))} instead.`);if(this.fromIndex){const _=this.fromIndex.evaluate(o);return p.indexOf(h,_)}return p.indexOf(h)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}}class bp{constructor(o,h,p,_,x,w){this.inputType=o,this.type=h,this.input=p,this.cases=_,this.outputs=x,this.otherwise=w}static parse(o,h){if(o.length<5)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return h.error("Expected an even number of arguments.");let p,_;h.expectedType&&h.expectedType.kind!=="value"&&(_=h.expectedType);const x={},w=[];for(let D=2;DNumber.MAX_SAFE_INTEGER)return W.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof K=="number"&&Math.floor(K)!==K)return W.error("Numeric branch labels must be integer values.");if(p){if(W.checkSubtype(p,ci(K)))return null}else p=ci(K);if(x[String(K)]!==void 0)return W.error("Branch labels must be unique.");x[String(K)]=w.length}const X=h.parse(B,D,_);if(!X)return null;_=_||X.type,w.push(X)}const I=h.parse(o[1],1,on);if(!I)return null;const P=h.parse(o[o.length-1],o.length-1,_);return P?I.type.kind!=="value"&&h.concat(1).checkSubtype(p,I.type)?null:new bp(p,_,I,x,w,P):null}evaluate(o){const h=this.input.evaluate(o);return(ci(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}}class xp{constructor(o,h,p){this.type=o,this.branches=h,this.otherwise=p}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return h.error("Expected an odd number of arguments.");let p;h.expectedType&&h.expectedType.kind!=="value"&&(p=h.expectedType);const _=[];for(let w=1;wh.outputDefined())&&this.otherwise.outputDefined()}}class Ph{constructor(o,h,p,_){this.type=o,this.input=h,this.beginIndex=p,this.endIndex=_}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,ft);if(!p||!_)return null;if(!Pe(p.type,[$(on),ln,on]))return h.error(`Expected first argument to be of type array or string, but found ${se(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Ph(p.type,p,_,x):null}return new Ph(p.type,p,_)}evaluate(o){const h=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!Se(h,["string","array"]))throw new Pr(`Expected first argument to be of type array or string, but found ${se(ci(h))} instead.`);if(this.endIndex){const _=this.endIndex.evaluate(o);return h.slice(p,_)}return h.slice(p)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}}function Fm(u,o){return u==="=="||u==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Bm(u,o,h,p){return p.compare(o,h)===0}function wu(u,o,h){const p=u!=="=="&&u!=="!=";return class XE{constructor(x,w,I){this.type=sn,this.lhs=x,this.rhs=w,this.collator=I,this.hasUntypedArgument=x.type.kind==="value"||w.type.kind==="value"}static parse(x,w){if(x.length!==3&&x.length!==4)return w.error("Expected two or three arguments.");const I=x[0];let P=w.parse(x[1],1,on);if(!P)return null;if(!Fm(I,P.type))return w.concat(1).error(`"${I}" comparisons are not supported for type '${se(P.type)}'.`);let D=w.parse(x[2],2,on);if(!D)return null;if(!Fm(I,D.type))return w.concat(2).error(`"${I}" comparisons are not supported for type '${se(D.type)}'.`);if(P.type.kind!==D.type.kind&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error(`Cannot compare types '${se(P.type)}' and '${se(D.type)}'.`);p&&(P.type.kind==="value"&&D.type.kind!=="value"?P=new Uo(D.type,[P]):P.type.kind!=="value"&&D.type.kind==="value"&&(D=new Uo(P.type,[D])));let O=null;if(x.length===4){if(P.type.kind!=="string"&&D.type.kind!=="string"&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error("Cannot use collator to compare non-string types.");if(O=w.parse(x[3],3,Aa),!O)return null}return new XE(P,D,O)}evaluate(x){const w=this.lhs.evaluate(x),I=this.rhs.evaluate(x);if(p&&this.hasUntypedArgument){const P=ci(w),D=ci(I);if(P.kind!==D.kind||P.kind!=="string"&&P.kind!=="number")throw new Pr(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${P.kind}, ${D.kind}) instead.`)}if(this.collator&&!p&&this.hasUntypedArgument){const P=ci(w),D=ci(I);if(P.kind!=="string"||D.kind!=="string")return o(x,w,I)}return this.collator?h(x,w,I,this.collator.evaluate(x)):o(x,w,I)}eachChild(x){x(this.lhs),x(this.rhs),this.collator&&x(this.collator)}outputDefined(){return!0}}}const Ny=wu("==",function(u,o,h){return o===h},Bm),Oy=wu("!=",function(u,o,h){return o!==h},function(u,o,h,p){return!Bm(0,o,h,p)}),zy=wu("<",function(u,o,h){return o",function(u,o,h){return o>h},function(u,o,h,p){return p.compare(o,h)>0}),By=wu("<=",function(u,o,h){return o<=h},function(u,o,h,p){return p.compare(o,h)<=0}),Vy=wu(">=",function(u,o,h){return o>=h},function(u,o,h,p){return p.compare(o,h)>=0});class wp{constructor(o,h,p,_,x){this.type=ln,this.number=o,this.locale=h,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=x}static parse(o,h){if(o.length!==3)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=o[2];if(typeof _!="object"||Array.isArray(_))return h.error("NumberFormat options argument must be an object.");let x=null;if(_.locale&&(x=h.parse(_.locale,1,ln),!x))return null;let w=null;if(_.currency&&(w=h.parse(_.currency,1,ln),!w))return null;let I=null;if(_["min-fraction-digits"]&&(I=h.parse(_["min-fraction-digits"],1,ft),!I))return null;let P=null;return _["max-fraction-digits"]&&(P=h.parse(_["max-fraction-digits"],1,ft),!P)?null:new wp(p,x,w,I,P)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}}class Mh{constructor(o){this.type=$r,this.sections=o}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[1];if(!Array.isArray(p)&&typeof p=="object")return h.error("First argument must be an image or text section.");const _=[];let x=!1;for(let w=1;w<=o.length-1;++w){const I=o[w];if(x&&typeof I=="object"&&!Array.isArray(I)){x=!1;let P=null;if(I["font-scale"]&&(P=h.parse(I["font-scale"],1,ft),!P))return null;let D=null;if(I["text-font"]&&(D=h.parse(I["text-font"],1,$(ln)),!D))return null;let O=null;if(I["text-color"]&&(O=h.parse(I["text-color"],1,Hr),!O))return null;const B=_[_.length-1];B.scale=P,B.font=D,B.textColor=O}else{const P=h.parse(o[w],1,on);if(!P)return null;const D=P.type.kind;if(D!=="string"&&D!=="value"&&D!=="null"&&D!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");x=!0,_.push({content:P,scale:null,font:null,textColor:null})}}return new Mh(_)}evaluate(o){return new Vo(this.sections.map(h=>{const p=h.content.evaluate(o);return ci(p)===q?new _p("",p,null,null,null):new _p(gc(p),null,h.scale?h.scale.evaluate(o):null,h.font?h.font.evaluate(o).join(","):null,h.textColor?h.textColor.evaluate(o):null)}))}eachChild(o){for(const h of this.sections)o(h.content),h.scale&&o(h.scale),h.font&&o(h.font),h.textColor&&o(h.textColor)}outputDefined(){return!1}}class Sp{constructor(o){this.type=q,this.input=o}static parse(o,h){if(o.length!==2)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ln);return p?new Sp(p):h.error("No image name provided.")}evaluate(o){const h=this.input.evaluate(o),p=hs.fromString(h);return p&&o.availableImages&&(p.available=o.availableImages.indexOf(h)>-1),p}eachChild(o){o(this.input)}outputDefined(){return!1}}class Ep{constructor(o){this.type=ft,this.input=o}static parse(o,h){if(o.length!==2)return h.error(`Expected 1 argument, but found ${o.length-1} instead.`);const p=h.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${se(p.type)} instead.`):new Ep(p):null}evaluate(o){const h=this.input.evaluate(o);if(typeof h=="string"||Array.isArray(h))return h.length;throw new Pr(`Expected value to be of type string or array, but found ${se(ci(h))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}}const Su={"==":Ny,"!=":Oy,">":Fy,"<":zy,">=":Vy,"<=":By,array:Uo,at:yp,boolean:Uo,case:xp,coalesce:Ch,collator:xu,format:Mh,image:Sp,in:vp,"index-of":Lh,interpolate:Hi,"interpolate-hcl":Hi,"interpolate-lab":Hi,length:Ep,let:Th,literal:nl,match:bp,number:Uo,"number-format":wp,object:Uo,slice:Ph,step:Sc,string:Uo,"to-boolean":$s,"to-color":$s,"to-number":$s,"to-string":$s,var:Sh,within:Bl};function Vm(u,[o,h,p,_]){o=o.evaluate(u),h=h.evaluate(u),p=p.evaluate(u);const x=_?_.evaluate(u):1,w=bu(o,h,p,x);if(w)throw new Pr(w);return new Kn(o/255,h/255,p/255,x,!1)}function Um(u,o){return u in o}function Ip(u,o){const h=o[u];return h===void 0?null:h}function Ul(u){return{type:u}}function jm(u){return{result:"success",value:u}}function Eu(u){return{result:"error",value:u}}function Iu(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function Gm(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Cp(u){return!!u.expression&&u.expression.interpolated}function On(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Ah(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function Uy(u){return u}function qm(u,o){const h=o.type==="color",p=u.stops&&typeof u.stops[0][0]=="object",_=p||!(p||u.property!==void 0),x=u.type||(Cp(o)?"exponential":"interval");if(h||o.type==="padding"){const O=h?Kn.parse:Eo.parse;(u=ls({},u)).stops&&(u.stops=u.stops.map(B=>[B[0],O(B[1])])),u.default=O(u.default?u.default:o.default)}if(u.colorSpace&&(w=u.colorSpace)!=="rgb"&&w!=="hcl"&&w!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var w;let I,P,D;if(x==="exponential")I=Mn;else if(x==="interval")I=jy;else if(x==="categorical"){I=Qr,P=Object.create(null);for(const O of u.stops)P[O[0]]=O[1];D=typeof u.stops[0][0]}else{if(x!=="identity")throw new Error(`Unknown function type "${x}"`);I=Tp}if(p){const O={},B=[];for(let K=0;KK[0]),evaluate:({zoom:K},re)=>Mn({stops:W,base:u.base},o,K).evaluate(K,re)}}if(_){const O=x==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:O,interpolationFactor:Hi.interpolationFactor.bind(void 0,O),zoomStops:u.stops.map(B=>B[0]),evaluate:({zoom:B})=>I(u,o,B,P,D)}}return{kind:"source",evaluate(O,B){const W=B&&B.properties?B.properties[u.property]:void 0;return W===void 0?Ec(u.default,o.default):I(u,o,W,P,D)}}}function Ec(u,o,h){return u!==void 0?u:o!==void 0?o:h!==void 0?h:void 0}function Qr(u,o,h,p,_){return Ec(typeof h===_?p[h]:void 0,u.default,o.default)}function jy(u,o,h){if(On(h)!=="number")return Ec(u.default,o.default);const p=u.stops.length;if(p===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[p-1][0])return u.stops[p-1][1];const _=wc(u.stops.map(x=>x[0]),h);return u.stops[_][1]}function Mn(u,o,h){const p=u.base!==void 0?u.base:1;if(On(h)!=="number")return Ec(u.default,o.default);const _=u.stops.length;if(_===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[_-1][0])return u.stops[_-1][1];const x=wc(u.stops.map(O=>O[0]),h),w=function(O,B,W,X){const K=X-W,re=O-W;return K===0?0:B===1?re/K:(Math.pow(B,re)-1)/(Math.pow(B,K)-1)}(h,p,u.stops[x][0],u.stops[x+1][0]),I=u.stops[x][1],P=u.stops[x+1][1],D=co[o.type]||Uy;return typeof I.evaluate=="function"?{evaluate(...O){const B=I.evaluate.apply(void 0,O),W=P.evaluate.apply(void 0,O);if(B!==void 0&&W!==void 0)return D(B,W,w,u.colorSpace)}}:D(I,P,w,u.colorSpace)}function Tp(u,o,h){switch(o.type){case"color":h=Kn.parse(h);break;case"formatted":h=Vo.fromString(h.toString());break;case"resolvedImage":h=hs.fromString(h.toString());break;case"padding":h=Eo.parse(h);break;default:On(h)===o.type||o.type==="enum"&&o.values[h]||(h=void 0)}return Ec(h,u.default,o.default)}jo.register(Su,{error:[{kind:"error"},[ln],(u,[o])=>{throw new Pr(o.evaluate(u))}],typeof:[ln,[on],(u,[o])=>se(ci(o.evaluate(u)))],"to-rgba":[$(ft,4),[Hr],(u,[o])=>{const[h,p,_,x]=o.evaluate(u).rgb;return[255*h,255*p,255*_,x]}],rgb:[Hr,[ft,ft,ft],Vm],rgba:[Hr,[ft,ft,ft,ft],Vm],has:{type:sn,overloads:[[[ln],(u,[o])=>Um(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Um(o.evaluate(u),h.evaluate(u))]]},get:{type:on,overloads:[[[ln],(u,[o])=>Ip(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Ip(o.evaluate(u),h.evaluate(u))]]},"feature-state":[on,[ln],(u,[o])=>Ip(o.evaluate(u),u.featureState||{})],properties:[us,[],u=>u.properties()],"geometry-type":[ln,[],u=>u.geometryType()],id:[on,[],u=>u.id()],zoom:[ft,[],u=>u.globals.zoom],"heatmap-density":[ft,[],u=>u.globals.heatmapDensity||0],"line-progress":[ft,[],u=>u.globals.lineProgress||0],accumulated:[on,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ft,Ul(ft),(u,o)=>{let h=0;for(const p of o)h+=p.evaluate(u);return h}],"*":[ft,Ul(ft),(u,o)=>{let h=1;for(const p of o)h*=p.evaluate(u);return h}],"-":{type:ft,overloads:[[[ft,ft],(u,[o,h])=>o.evaluate(u)-h.evaluate(u)],[[ft],(u,[o])=>-o.evaluate(u)]]},"/":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)/h.evaluate(u)],"%":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)%h.evaluate(u)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(u,[o,h])=>Math.pow(o.evaluate(u),h.evaluate(u))],sqrt:[ft,[ft],(u,[o])=>Math.sqrt(o.evaluate(u))],log10:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN10],ln:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))],log2:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN2],sin:[ft,[ft],(u,[o])=>Math.sin(o.evaluate(u))],cos:[ft,[ft],(u,[o])=>Math.cos(o.evaluate(u))],tan:[ft,[ft],(u,[o])=>Math.tan(o.evaluate(u))],asin:[ft,[ft],(u,[o])=>Math.asin(o.evaluate(u))],acos:[ft,[ft],(u,[o])=>Math.acos(o.evaluate(u))],atan:[ft,[ft],(u,[o])=>Math.atan(o.evaluate(u))],min:[ft,Ul(ft),(u,o)=>Math.min(...o.map(h=>h.evaluate(u)))],max:[ft,Ul(ft),(u,o)=>Math.max(...o.map(h=>h.evaluate(u)))],abs:[ft,[ft],(u,[o])=>Math.abs(o.evaluate(u))],round:[ft,[ft],(u,[o])=>{const h=o.evaluate(u);return h<0?-Math.round(-h):Math.round(h)}],floor:[ft,[ft],(u,[o])=>Math.floor(o.evaluate(u))],ceil:[ft,[ft],(u,[o])=>Math.ceil(o.evaluate(u))],"filter-==":[sn,[ln,on],(u,[o,h])=>u.properties()[o.value]===h.value],"filter-id-==":[sn,[on],(u,[o])=>u.id()===o.value],"filter-type-==":[sn,[ln],(u,[o])=>u.geometryType()===o.value],"filter-<":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<_}],"filter-id-<":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>_}],"filter-id->":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>p}],"filter-<=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<=_}],"filter-id-<=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h<=p}],"filter->=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>=_}],"filter-id->=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>=p}],"filter-has":[sn,[on],(u,[o])=>o.value in u.properties()],"filter-has-id":[sn,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[sn,[$(ln)],(u,[o])=>o.value.indexOf(u.geometryType())>=0],"filter-id-in":[sn,[$(on)],(u,[o])=>o.value.indexOf(u.id())>=0],"filter-in-small":[sn,[ln,$(on)],(u,[o,h])=>h.value.indexOf(u.properties()[o.value])>=0],"filter-in-large":[sn,[ln,$(on)],(u,[o,h])=>function(p,_,x,w){for(;x<=w;){const I=x+w>>1;if(_[I]===p)return!0;_[I]>p?w=I-1:x=I+1}return!1}(u.properties()[o.value],h.value,0,h.value.length-1)],all:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)&&h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(!h.evaluate(u))return!1;return!0}]]},any:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)||h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(h.evaluate(u))return!0;return!1}]]},"!":[sn,[sn],(u,[o])=>!o.evaluate(u)],"is-supported-script":[sn,[ln],(u,[o])=>{const h=u.globals&&u.globals.isSupportedScript;return!h||h(o.evaluate(u))}],upcase:[ln,[ln],(u,[o])=>o.evaluate(u).toUpperCase()],downcase:[ln,[ln],(u,[o])=>o.evaluate(u).toLowerCase()],concat:[ln,Ul(on),(u,o)=>o.map(h=>gc(h.evaluate(u))).join("")],"resolved-locale":[ln,[Aa],(u,[o])=>o.evaluate(u).resolvedLocale()]});class dr{constructor(o,h){var p;this.expression=o,this._warningHistory={},this._evaluator=new Jn,this._defaultValue=h?(p=h).type==="color"&&Ah(p.default)?new Kn(0,0,0,0):p.type==="color"?Kn.parse(p.default)||null:p.type==="padding"?Eo.parse(p.default)||null:p.type==="variableAnchorOffsetCollection"?cs.parse(p.default)||null:p.default===void 0?null:p.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._evaluator.globals=o,this._evaluator.feature=h,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)}evaluate(o,h,p,_,x,w){this._evaluator.globals=o,this._evaluator.feature=h||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Pr(`Expected value to be one of ${Object.keys(this._enumValues).map(P=>JSON.stringify(P)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function ar(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Su}function jl(u,o){const h=new yh(Su,vc,[],o?function(_){const x={color:Hr,string:ln,number:ft,enum:ln,boolean:sn,formatted:$r,padding:me,resolvedImage:q,variableAnchorOffsetCollection:Z};return _.type==="array"?$(x[_.value]||on,_.length):x[_.type]}(o):void 0),p=h.parse(u,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?jm(new dr(p,o)):Eu(h.errors)}class kh{constructor(o,h){this.kind=o,this._styleExpression=h,this.isStateDependent=o!=="constant"&&!bc(h.expression)}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}}class Lp{constructor(o,h,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=h,this.isStateDependent=o!=="camera"&&!bc(h.expression),this.interpolationType=_}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}interpolationFactor(o,h,p){return this.interpolationType?Hi.interpolationFactor(this.interpolationType,o,h,p):0}}function Wm(u,o){const h=jl(u,o);if(h.result==="error")return h;const p=h.value.expression,_=Eh(p);if(!_&&!Iu(o))return Eu([new lo("","data expressions not supported")]);const x=xc(p,["zoom"]);if(!x&&!Gm(o))return Eu([new lo("","zoom expressions not supported")]);const w=Rh(p);return w||x?w instanceof lo?Eu([w]):w instanceof Hi&&!Cp(o)?Eu([new lo("",'"interpolate" expressions cannot be used with this property')]):jm(w?new Lp(_?"camera":"composite",h.value,w.labels,w instanceof Hi?w.interpolation:void 0):new kh(_?"constant":"source",h.value)):Eu([new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Dh{constructor(o,h){this._parameters=o,this._specification=h,ls(this,qm(this._parameters,this._specification))}static deserialize(o){return new Dh(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function Rh(u){let o=null;if(u instanceof Th)o=Rh(u.result);else if(u instanceof Ch){for(const h of u.args)if(o=Rh(h),o)break}else(u instanceof Sc||u instanceof Hi)&&u.input instanceof jo&&u.input.name==="zoom"&&(o=u);return o instanceof lo||u.eachChild(h=>{const p=Rh(h);p instanceof lo?o=p:!o&&p?o=new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&p&&o!==p&&(o=new lo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}function Nh(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const o of u.slice(1))if(!Nh(o)&&typeof o!="boolean")return!1;return!0;default:return!0}}const Hm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Oh(u){if(u==null)return{filter:()=>!0,needGeometry:!1};Nh(u)||(u=Fh(u));const o=jl(u,Hm);if(o.result==="error")throw new Error(o.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,p,_)=>o.value.evaluate(h,p,{},_),needGeometry:zh(u)}}function Zm(u,o){return uo?1:0}function zh(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let o=1;o"||o==="<="||o===">="?Pp(u[1],u[2],o):o==="any"?(h=u.slice(1),["any"].concat(h.map(Fh))):o==="all"?["all"].concat(u.slice(1).map(Fh)):o==="none"?["all"].concat(u.slice(1).map(Fh).map(Bh)):o==="in"?Xm(u[1],u.slice(2)):o==="!in"?Bh(Xm(u[1],u.slice(2))):o==="has"?Ym(u[1]):o==="!has"?Bh(Ym(u[1])):o!=="within"||u;var h}function Pp(u,o,h){switch(u){case"$type":return[`filter-type-${h}`,o];case"$id":return[`filter-id-${h}`,o];default:return[`filter-${h}`,u,o]}}function Xm(u,o){if(o.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(h=>typeof h!=typeof o[0])?["filter-in-large",u,["literal",o.sort(Zm)]]:["filter-in-small",u,["literal",o]]}}function Ym(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Bh(u){return["!",u]}function Mp(u){const o=typeof u;if(o==="number"||o==="boolean"||o==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let _="[";for(const x of u)_+=`${Mp(x)},`;return`${_}]`}const h=Object.keys(u).sort();let p="{";for(let _=0;_p.maximum?[new ot(o,h,`${h} is greater than the maximum value ${p.maximum}`)]:[]}function Jm(u){const o=u.valueSpec,h=Br(u.value.type);let p,_,x,w={};const I=h!=="categorical"&&u.value.property===void 0,P=!I,D=On(u.value.stops)==="array"&&On(u.value.stops[0])==="array"&&On(u.value.stops[0][0])==="object",O=ho({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(X){if(h==="identity")return[new ot(X.key,X.value,'identity function may not have a "stops" property')];let K=[];const re=X.value;return K=K.concat(Ap({key:X.key,value:re,valueSpec:X.valueSpec,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,arrayElementValidator:B})),On(re)==="array"&&re.length===0&&K.push(new ot(X.key,re,"array must have at least one stop")),K},default:function(X){return X.validateSpec({key:X.key,value:X.value,valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec})}}});return h==="identity"&&I&&O.push(new ot(u.key,u.value,'missing required property "property"')),h==="identity"||u.value.stops||O.push(new ot(u.key,u.value,'missing required property "stops"')),h==="exponential"&&u.valueSpec.expression&&!Cp(u.valueSpec)&&O.push(new ot(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(P&&!Iu(u.valueSpec)?O.push(new ot(u.key,u.value,"property functions not supported")):I&&!Gm(u.valueSpec)&&O.push(new ot(u.key,u.value,"zoom functions not supported"))),h!=="categorical"&&!D||u.value.property!==void 0||O.push(new ot(u.key,u.value,'"property" property is required')),O;function B(X){let K=[];const re=X.value,pe=X.key;if(On(re)!=="array")return[new ot(pe,re,`array expected, ${On(re)} found`)];if(re.length!==2)return[new ot(pe,re,`array length 2 expected, length ${re.length} found`)];if(D){if(On(re[0])!=="object")return[new ot(pe,re,`object expected, ${On(re[0])} found`)];if(re[0].zoom===void 0)return[new ot(pe,re,"object stop key must have zoom")];if(re[0].value===void 0)return[new ot(pe,re,"object stop key must have value")];if(x&&x>Br(re[0].zoom))return[new ot(pe,re[0].zoom,"stop zoom values must appear in ascending order")];Br(re[0].zoom)!==x&&(x=Br(re[0].zoom),_=void 0,w={}),K=K.concat(ho({key:`${pe}[0]`,value:re[0],valueSpec:{zoom:{}},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{zoom:Vh,value:W}}))}else K=K.concat(W({key:`${pe}[0]`,value:re[0],valueSpec:{},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec},re));return ar(il(re[1]))?K.concat([new ot(`${pe}[1]`,re[1],"expressions are not allowed in function stops.")]):K.concat(X.validateSpec({key:`${pe}[1]`,value:re[1],valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec}))}function W(X,K){const re=On(X.value),pe=Br(X.value),be=X.value!==null?X.value:K;if(p){if(re!==p)return[new ot(X.key,be,`${re} stop domain type must match previous stop domain type ${p}`)]}else p=re;if(re!=="number"&&re!=="string"&&re!=="boolean")return[new ot(X.key,be,"stop domain value must be a number, string, or boolean")];if(re!=="number"&&h!=="categorical"){let Oe=`number expected, ${re} found`;return Iu(o)&&h===void 0&&(Oe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ot(X.key,be,Oe)]}return h!=="categorical"||re!=="number"||isFinite(pe)&&Math.floor(pe)===pe?h!=="categorical"&&re==="number"&&_!==void 0&&pe<_?[new ot(X.key,be,"stop domain values must appear in ascending order")]:(_=pe,h==="categorical"&&pe in w?[new ot(X.key,be,"stop domain values must be unique")]:(w[pe]=!0,[])):[new ot(X.key,be,`integer expected, found ${pe}`)]}}function ol(u){const o=(u.expressionContext==="property"?Wm:jl)(il(u.value),u.valueSpec);if(o.result==="error")return o.value.map(p=>new ot(`${u.key}${p.key}`,u.value,p.message));const h=o.value.expression||o.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!h.outputDefined())return[new ot(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!bc(h))return[new ot(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!bc(h))return[new ot(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!xc(h,["zoom","feature-state"]))return[new ot(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Eh(h))return[new ot(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sl(u){const o=u.key,h=u.value,p=u.valueSpec,_=[];return Array.isArray(p.values)?p.values.indexOf(Br(h))===-1&&_.push(new ot(o,h,`expected one of [${p.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(p.values).indexOf(Br(h))===-1&&_.push(new ot(o,h,`expected one of [${Object.keys(p.values).join(", ")}], ${JSON.stringify(h)} found`)),_}function Cu(u){return Nh(il(u.value))?ol(ls({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):kp(u)}function kp(u){const o=u.value,h=u.key;if(On(o)!=="array")return[new ot(h,o,`array expected, ${On(o)} found`)];const p=u.styleSpec;let _,x=[];if(o.length<1)return[new ot(h,o,"filter array must have at least 1 element")];switch(x=x.concat(sl({key:`${h}[0]`,value:o[0],valueSpec:p.filter_operator,style:u.style,styleSpec:u.styleSpec})),Br(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&Br(o[1])==="$type"&&x.push(new ot(h,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":o.length!==3&&x.push(new ot(h,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(_=On(o[1]),_!=="string"&&x.push(new ot(`${h}[1]`,o[1],`string expected, ${_} found`)));for(let w=2;w{D in h&&o.push(new ot(p,h[D],`"${D}" is prohibited for ref layers`))}),_.layers.forEach(D=>{Br(D.id)===I&&(P=D)}),P?P.ref?o.push(new ot(p,h.ref,"ref cannot reference another ref layer")):w=Br(P.type):o.push(new ot(p,h.ref,`ref layer "${I}" not found`))}else if(w!=="background")if(h.source){const P=_.sources&&_.sources[h.source],D=P&&Br(P.type);P?D==="vector"&&w==="raster"?o.push(new ot(p,h.source,`layer "${h.id}" requires a raster source`)):D!=="raster-dem"&&w==="hillshade"?o.push(new ot(p,h.source,`layer "${h.id}" requires a raster-dem source`)):D==="raster"&&w!=="raster"?o.push(new ot(p,h.source,`layer "${h.id}" requires a vector source`)):D!=="vector"||h["source-layer"]?D==="raster-dem"&&w!=="hillshade"?o.push(new ot(p,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):w!=="line"||!h.paint||!h.paint["line-gradient"]||D==="geojson"&&P.lineMetrics||o.push(new ot(p,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):o.push(new ot(p,h,`layer "${h.id}" must specify a "source-layer"`)):o.push(new ot(p,h.source,`source "${h.source}" not found`))}else o.push(new ot(p,h,'missing required property "source"'));return o=o.concat(ho({key:p,value:h,valueSpec:x.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${p}.type`,value:h.type,valueSpec:x.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:h,objectKey:"type"}),filter:Cu,layout:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Rp(ls({layerType:w},D))}}),paint:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Dp(ls({layerType:w},D))}})}})),o}function Gl(u){const o=u.value,h=u.key,p=On(o);return p!=="string"?[new ot(h,o,`string expected, ${p} found`)]:[]}const $m={promoteId:function({key:u,value:o}){if(On(o)==="string")return Gl({key:u,value:o});{const h=[];for(const p in o)h.push(...Gl({key:`${u}.${p}`,value:o[p]}));return h}}};function Qm(u){const o=u.value,h=u.key,p=u.styleSpec,_=u.style,x=u.validateSpec;if(!o.type)return[new ot(h,o,'"type" is required')];const w=Br(o.type);let I;switch(w){case"vector":case"raster":return I=ho({key:h,value:o,valueSpec:p[`source_${w.replace("-","_")}`],style:u.style,styleSpec:p,objectElementValidators:$m,validateSpec:x}),I;case"raster-dem":return I=function(P){var D;const O=(D=P.sourceName)!==null&&D!==void 0?D:"",B=P.value,W=P.styleSpec,X=W.source_raster_dem,K=P.style;let re=[];const pe=On(B);if(B===void 0)return re;if(pe!=="object")return re.push(new ot("source_raster_dem",B,`object expected, ${pe} found`)),re;const be=Br(B.encoding)==="custom",Oe=["redFactor","greenFactor","blueFactor","baseShift"],Ee=P.value.encoding?`"${P.value.encoding}"`:"Default";for(const ke in B)!be&&Oe.includes(ke)?re.push(new ot(ke,B[ke],`In "${O}": "${ke}" is only valid when "encoding" is set to "custom". ${Ee} encoding found`)):X[ke]?re=re.concat(P.validateSpec({key:ke,value:B[ke],valueSpec:X[ke],validateSpec:P.validateSpec,style:K,styleSpec:W})):re.push(new ot(ke,B[ke],`unknown property "${ke}"`));return re}({sourceName:h,value:o,style:u.style,styleSpec:p,validateSpec:x}),I;case"geojson":if(I=ho({key:h,value:o,valueSpec:p.source_geojson,style:_,styleSpec:p,validateSpec:x,objectElementValidators:$m}),o.cluster)for(const P in o.clusterProperties){const[D,O]=o.clusterProperties[P],B=typeof D=="string"?[D,["accumulated"],["get",P]]:D;I.push(...ol({key:`${h}.${P}.map`,value:O,validateSpec:x,expressionContext:"cluster-map"})),I.push(...ol({key:`${h}.${P}.reduce`,value:B,validateSpec:x,expressionContext:"cluster-reduce"}))}return I;case"video":return ho({key:h,value:o,valueSpec:p.source_video,style:_,validateSpec:x,styleSpec:p});case"image":return ho({key:h,value:o,valueSpec:p.source_image,style:_,validateSpec:x,styleSpec:p});case"canvas":return[new ot(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sl({key:`${h}.type`,value:o.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_,validateSpec:x,styleSpec:p})}}function eg(u){const o=u.value,h=u.styleSpec,p=h.light,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new ot("light",o,`object expected, ${w} found`)]),x;for(const I in o){const P=I.match(/^(.*)-transition$/);x=x.concat(P&&p[P[1]]&&p[P[1]].transition?u.validateSpec({key:I,value:o[I],valueSpec:h.transition,validateSpec:u.validateSpec,style:_,styleSpec:h}):p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new ot(I,o[I],`unknown property "${I}"`)])}return x}function tg(u){const o=u.value,h=u.styleSpec,p=h.sky,_=u.style,x=On(o);if(o===void 0)return[];if(x!=="object")return[new ot("sky",o,`object expected, ${x} found`)];let w=[];for(const I in o)w=w.concat(p[I]?Qs({key:I,value:o[I],valueSpec:p[I],style:_,styleSpec:h}):[new ot(I,o[I],`unknown property "${I}"`)]);return w}function Cc(u){const o=u.value,h=u.styleSpec,p=h.terrain,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new ot("terrain",o,`object expected, ${w} found`)]),x;for(const I in o)x=x.concat(p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new ot(I,o[I],`unknown property "${I}"`)]);return x}function Tc(u){let o=[];const h=u.value,p=u.key;if(Array.isArray(h)){const _=[],x=[];for(const w in h)h[w].id&&_.includes(h[w].id)&&o.push(new ot(p,h,`all the sprites' ids must be unique, but ${h[w].id} is duplicated`)),_.push(h[w].id),h[w].url&&x.includes(h[w].url)&&o.push(new ot(p,h,`all the sprites' URLs must be unique, but ${h[w].url} is duplicated`)),x.push(h[w].url),o=o.concat(ho({key:`${p}[${w}]`,value:h[w],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return o}return Gl({key:p,value:h})}const Io={"*":()=>[],array:Ap,boolean:function(u){const o=u.value,h=u.key,p=On(o);return p!=="boolean"?[new ot(h,o,`boolean expected, ${p} found`)]:[]},number:Vh,color:function(u){const o=u.key,h=u.value,p=On(h);return p!=="string"?[new ot(o,h,`color expected, ${p} found`)]:Kn.parse(String(h))?[]:[new ot(o,h,`color expected, "${h}" found`)]},constants:Km,enum:sl,filter:Cu,function:Jm,layer:Ic,object:ho,source:Qm,light:eg,sky:tg,terrain:Cc,string:Gl,formatted:function(u){return Gl(u).length===0?[]:ol(u)},resolvedImage:function(u){return Gl(u).length===0?[]:ol(u)},padding:function(u){const o=u.key,h=u.value;if(On(h)==="array"){if(h.length<1||h.length>4)return[new ot(o,h,`padding requires 1 to 4 values; ${h.length} values found`)];const p={type:"number"};let _=[];for(let x=0;x[]}})),u.constants&&(h=h.concat(Km({key:"constants",value:u.constants,style:u,styleSpec:o,validateSpec:Qs}))),Tu(h)}function ea(u){return function(o){return u({...o,validateSpec:Qs})}}function Tu(u){return[].concat(u).sort((o,h)=>o.line-h.line)}function Ls(u){return function(...o){return Tu(u.apply(this,o))}}Ts.source=Ls(ea(Qm)),Ts.sprite=Ls(ea(Tc)),Ts.glyphs=Ls(ea(Np)),Ts.light=Ls(ea(eg)),Ts.sky=Ls(ea(tg)),Ts.terrain=Ls(ea(Cc)),Ts.layer=Ls(ea(Ic)),Ts.filter=Ls(ea(Cu)),Ts.paintProperty=Ls(ea(Dp)),Ts.layoutProperty=Ls(ea(Rp));const ql=Ts,qy=ql.light,Op=ql.paintProperty,Wy=ql.layoutProperty;function Lu(u,o){let h=!1;if(o&&o.length)for(const p of o)u.fire(new dt(new Error(p.message))),h=!0;return h}class Lc{constructor(o,h,p){const _=this.cells=[];if(o instanceof ArrayBuffer){this.arrayBuffer=o;const w=new Int32Array(this.arrayBuffer);o=w[0],this.d=(h=w[1])+2*(p=w[2]);for(let P=0;P=B[K+0]&&_>=B[K+1])?(I[X]=!0,w.push(O[X])):I[X]=!1}}}}_forEachCell(o,h,p,_,x,w,I,P){const D=this._convertToCellCoord(o),O=this._convertToCellCoord(h),B=this._convertToCellCoord(p),W=this._convertToCellCoord(_);for(let X=D;X<=B;X++)for(let K=O;K<=W;K++){const re=this.d*K+X;if((!P||P(this._convertFromCellCoord(X),this._convertFromCellCoord(K),this._convertFromCellCoord(X+1),this._convertFromCellCoord(K+1)))&&x.call(this,o,h,p,_,re,w,I,P))return}}_convertFromCellCoord(o){return(o-this.padding)/this.scale}_convertToCellCoord(o){return Math.max(0,Math.min(this.d-1,Math.floor(o*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const o=this.cells,h=3+this.cells.length+1+1;let p=0;for(let w=0;w=0)continue;const w=u[x];_[x]=ta[p].shallow.indexOf(x)>=0?w:Pu(w,o)}u instanceof Error&&(_.message=u.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return p!=="Object"&&(_.$name=p),_}throw new Error("can't serialize object of type "+typeof u)}function Mu(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||jh(u)||Ot(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(Mu);if(typeof u=="object"){const o=u.$name||"Object";if(!ta[o])throw new Error(`can't deserialize unregistered class ${o}`);const{klass:h}=ta[o];if(!h)throw new Error(`can't deserialize unregistered class ${o}`);if(h.deserialize)return h.deserialize(u);const p=Object.create(h.prototype);for(const _ of Object.keys(u)){if(_==="$name")continue;const x=u[_];p[_]=ta[o].shallow.indexOf(_)>=0?x:Mu(x)}return p}throw new Error("can't deserialize object of type "+typeof u)}class ng{constructor(){this.first=!0}update(o,h){const p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=h):this.lastFloorZoomu>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function Au(u){for(const o of u)if(Gh(o.charCodeAt(0)))return!0;return!1}function rg(u){for(const o of u)if(!ig(o.charCodeAt(0)))return!1;return!0}function ig(u){return!(xt.Arabic(u)||xt["Arabic Supplement"](u)||xt["Arabic Extended-A"](u)||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u))}function Gh(u){return!(u!==746&&u!==747&&(u<4352||!(xt["Bopomofo Extended"](u)||xt.Bopomofo(u)||xt["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||xt["CJK Compatibility Ideographs"](u)||xt["CJK Compatibility"](u)||xt["CJK Radicals Supplement"](u)||xt["CJK Strokes"](u)||!(!xt["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||xt["CJK Unified Ideographs Extension A"](u)||xt["CJK Unified Ideographs"](u)||xt["Enclosed CJK Letters and Months"](u)||xt["Hangul Compatibility Jamo"](u)||xt["Hangul Jamo Extended-A"](u)||xt["Hangul Jamo Extended-B"](u)||xt["Hangul Jamo"](u)||xt["Hangul Syllables"](u)||xt.Hiragana(u)||xt["Ideographic Description Characters"](u)||xt.Kanbun(u)||xt["Kangxi Radicals"](u)||xt["Katakana Phonetic Extensions"](u)||xt.Katakana(u)&&u!==12540||!(!xt["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!xt["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||xt["Unified Canadian Aboriginal Syllabics"](u)||xt["Unified Canadian Aboriginal Syllabics Extended"](u)||xt["Vertical Forms"](u)||xt["Yijing Hexagram Symbols"](u)||xt["Yi Syllables"](u)||xt["Yi Radicals"](u))))}function zp(u){return!(Gh(u)||function(o){return!!(xt["Latin-1 Supplement"](o)&&(o===167||o===169||o===174||o===177||o===188||o===189||o===190||o===215||o===247)||xt["General Punctuation"](o)&&(o===8214||o===8224||o===8225||o===8240||o===8241||o===8251||o===8252||o===8258||o===8263||o===8264||o===8265||o===8273)||xt["Letterlike Symbols"](o)||xt["Number Forms"](o)||xt["Miscellaneous Technical"](o)&&(o>=8960&&o<=8967||o>=8972&&o<=8991||o>=8996&&o<=9e3||o===9003||o>=9085&&o<=9114||o>=9150&&o<=9165||o===9167||o>=9169&&o<=9179||o>=9186&&o<=9215)||xt["Control Pictures"](o)&&o!==9251||xt["Optical Character Recognition"](o)||xt["Enclosed Alphanumerics"](o)||xt["Geometric Shapes"](o)||xt["Miscellaneous Symbols"](o)&&!(o>=9754&&o<=9759)||xt["Miscellaneous Symbols and Arrows"](o)&&(o>=11026&&o<=11055||o>=11088&&o<=11097||o>=11192&&o<=11243)||xt["CJK Symbols and Punctuation"](o)||xt.Katakana(o)||xt["Private Use Area"](o)||xt["CJK Compatibility Forms"](o)||xt["Small Form Variants"](o)||xt["Halfwidth and Fullwidth Forms"](o)||o===8734||o===8756||o===8757||o>=9984&&o<=10087||o>=10102&&o<=10131||o===65532||o===65533)}(u))}function qh(u){return u>=1424&&u<=2303||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u)}function og(u,o){return!(!o&&qh(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||xt.Khmer(u))}function Hy(u){for(const o of u)if(qh(o.charCodeAt(0)))return!0;return!1}const al=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class br{constructor(o,h){this.zoom=o,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ng,this.transition={})}isSupportedScript(o){return function(h,p){for(const _ of h)if(!og(_.charCodeAt(0),p))return!1;return!0}(o,al.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const o=this.zoom,h=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*h}}}class Pc{constructor(o,h){this.property=o,this.value=h,this.expression=function(p,_){if(Ah(p))return new Dh(p,_);if(ar(p)){const x=Wm(p,_);if(x.result==="error")throw new Error(x.value.map(w=>`${w.key}: ${w.message}`).join(", "));return x.value}{let x=p;return _.type==="color"&&typeof p=="string"?x=Kn.parse(p):_.type!=="padding"||typeof p!="number"&&!Array.isArray(p)?_.type==="variableAnchorOffsetCollection"&&Array.isArray(p)&&(x=cs.parse(p)):x=Eo.parse(p),{kind:"constant",evaluate:()=>x}}}(h===void 0?o.specification.default:h,o.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(o,h,p){return this.property.possiblyEvaluate(this,o,h,p)}}class Wh{constructor(o){this.property=o,this.value=new Pc(o,void 0)}transitioned(o,h){return new sg(this.property,this.value,h,ie({},o.transition,this.transition),o.now)}untransitioned(){return new sg(this.property,this.value,null,{},0)}}class Fp{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)}getValue(o){return Q(this._values[o].value.value)}setValue(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].value=new Pc(this._values[o].property,h===null?void 0:Q(h))}getTransition(o){return Q(this._values[o].transition)}setTransition(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].transition=Q(h)||void 0}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p);const _=this.getTransition(h);_!==void 0&&(o[`${h}-transition`]=_)}return o}transitioned(o,h){const p=new ag(this._properties);for(const _ of Object.keys(this._values))p._values[_]=this._values[_].transitioned(o,h._values[_]);return p}untransitioned(){const o=new ag(this._properties);for(const h of Object.keys(this._values))o._values[h]=this._values[h].untransitioned();return o}}class sg{constructor(o,h,p,_,x){this.property=o,this.value=h,this.begin=x+_.delay||0,this.end=this.begin+_.duration||0,o.specification.transition&&(_.delay||_.duration)&&(this.prior=p)}possiblyEvaluate(o,h,p){const _=o.now||0,x=this.value.possiblyEvaluate(o,h,p),w=this.prior;if(w){if(_>this.end)return this.prior=null,x;if(this.value.isDataDriven())return this.prior=null,x;if(_=1)return 1;const D=P*P,O=D*P;return 4*(P<.5?O:3*(P-D)+O-.75)}(I))}}return x}}class ag{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitioningPropertyValues)}possiblyEvaluate(o,h,p){const _=new Mc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}hasTransition(){for(const o of Object.keys(this._values))if(this._values[o].prior)return!0;return!1}}class lg{constructor(o){this._properties=o,this._values=Object.create(o.defaultPropertyValues)}hasValue(o){return this._values[o].value!==void 0}getValue(o){return Q(this._values[o].value)}setValue(o,h){this._values[o]=new Pc(this._values[o].property,h===null?void 0:Q(h))}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p)}return o}possiblyEvaluate(o,h,p){const _=new Mc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}}class Ps{constructor(o,h,p){this.property=o,this.value=h,this.parameters=p}isConstant(){return this.value.kind==="constant"}constantOr(o){return this.value.kind==="constant"?this.value.value:o}evaluate(o,h,p,_){return this.property.evaluate(this.value,this.parameters,o,h,p,_)}}class Mc{constructor(o){this._properties=o,this._values=Object.create(o.defaultPossiblyEvaluatedValues)}get(o){return this._values[o]}}class Nt{constructor(o){this.specification=o}possiblyEvaluate(o,h){if(o.isDataDriven())throw new Error("Value should not be data driven");return o.expression.evaluate(h)}interpolate(o,h,p){const _=co[this.specification.type];return _?_(o,h,p):o}}class Gt{constructor(o,h){this.specification=o,this.overrides=h}possiblyEvaluate(o,h,p,_){return new Ps(this,o.expression.kind==="constant"||o.expression.kind==="camera"?{kind:"constant",value:o.expression.evaluate(h,null,{},p,_)}:o.expression,h)}interpolate(o,h,p){if(o.value.kind!=="constant"||h.value.kind!=="constant")return o;if(o.value.value===void 0||h.value.value===void 0)return new Ps(this,{kind:"constant",value:void 0},o.parameters);const _=co[this.specification.type];if(_){const x=_(o.value.value,h.value.value,p);return new Ps(this,{kind:"constant",value:x},o.parameters)}return o}evaluate(o,h,p,_,x,w){return o.kind==="constant"?o.value:o.evaluate(h,p,_,x,w)}}class Hh extends Gt{possiblyEvaluate(o,h,p,_){if(o.value===void 0)return new Ps(this,{kind:"constant",value:void 0},h);if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_),w=o.property.specification.type==="resolvedImage"&&typeof x!="string"?x.name:x,I=this._calculate(w,w,w,h);return new Ps(this,{kind:"constant",value:I},h)}if(o.expression.kind==="camera"){const x=this._calculate(o.expression.evaluate({zoom:h.zoom-1}),o.expression.evaluate({zoom:h.zoom}),o.expression.evaluate({zoom:h.zoom+1}),h);return new Ps(this,{kind:"constant",value:x},h)}return new Ps(this,o.expression,h)}evaluate(o,h,p,_,x,w){if(o.kind==="source"){const I=o.evaluate(h,p,_,x,w);return this._calculate(I,I,I,h)}return o.kind==="composite"?this._calculate(o.evaluate({zoom:Math.floor(h.zoom)-1},p,_),o.evaluate({zoom:Math.floor(h.zoom)},p,_),o.evaluate({zoom:Math.floor(h.zoom)+1},p,_),h):o.value}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Ac{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){if(o.value!==void 0){if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_);return this._calculate(x,x,x,h)}return this._calculate(o.expression.evaluate(new br(Math.floor(h.zoom-1),h)),o.expression.evaluate(new br(Math.floor(h.zoom),h)),o.expression.evaluate(new br(Math.floor(h.zoom+1),h)),h)}}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Bp{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){return!!o.expression.evaluate(h,null,{},p,_)}interpolate(){return!1}}class Co{constructor(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in o){const p=o[h];p.specification.overridable&&this.overridableProperties.push(h);const _=this.defaultPropertyValues[h]=new Pc(p,void 0),x=this.defaultTransitionablePropertyValues[h]=new Wh(p);this.defaultTransitioningPropertyValues[h]=x.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=_.possiblyEvaluate({})}}}Ct("DataDrivenProperty",Gt),Ct("DataConstantProperty",Nt),Ct("CrossFadedDataDrivenProperty",Hh),Ct("CrossFadedProperty",Ac),Ct("ColorRampProperty",Bp);const Vp="-transition";class Ms extends en{constructor(o,h){if(super(),this.id=o.id,this.type=o.type,this._featureFilter={filter:()=>!0,needGeometry:!1},o.type!=="custom"&&(this.metadata=o.metadata,this.minzoom=o.minzoom,this.maxzoom=o.maxzoom,o.type!=="background"&&(this.source=o.source,this.sourceLayer=o["source-layer"],this.filter=o.filter),h.layout&&(this._unevaluatedLayout=new lg(h.layout)),h.paint)){this._transitionablePaint=new Fp(h.paint);for(const p in o.paint)this.setPaintProperty(p,o.paint[p],{validate:!1});for(const p in o.layout)this.setLayoutProperty(p,o.layout[p],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Mc(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(o){return o==="visibility"?this.visibility:this._unevaluatedLayout.getValue(o)}setLayoutProperty(o,h,p={}){h!=null&&this._validate(Wy,`layers.${this.id}.layout.${o}`,o,h,p)||(o!=="visibility"?this._unevaluatedLayout.setValue(o,h):this.visibility=h)}getPaintProperty(o){return o.endsWith(Vp)?this._transitionablePaint.getTransition(o.slice(0,-11)):this._transitionablePaint.getValue(o)}setPaintProperty(o,h,p={}){if(h!=null&&this._validate(Op,`layers.${this.id}.paint.${o}`,o,h,p))return!1;if(o.endsWith(Vp))return this._transitionablePaint.setTransition(o.slice(0,-11),h||void 0),!1;{const _=this._transitionablePaint._values[o],x=_.property.specification["property-type"]==="cross-faded-data-driven",w=_.value.isDataDriven(),I=_.value;this._transitionablePaint.setValue(o,h),this._handleSpecialPaintPropertyUpdate(o);const P=this._transitionablePaint._values[o].value;return P.isDataDriven()||w||x||this._handleOverridablePaintPropertyUpdate(o,I,P)}}_handleSpecialPaintPropertyUpdate(o){}_handleOverridablePaintPropertyUpdate(o,h,p){return!1}isHidden(o){return!!(this.minzoom&&o=this.maxzoom)||this.visibility==="none"}updateTransitions(o){this._transitioningPaint=this._transitionablePaint.transitioned(o,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(o,h){o.getCrossfadeParameters&&(this._crossfadeParameters=o.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(o,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(o,void 0,h)}serialize(){const o={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(o.layout=o.layout||{},o.layout.visibility=this.visibility),Te(o,(h,p)=>!(h===void 0||p==="layout"&&!Object.keys(h).length||p==="paint"&&!Object.keys(h).length))}_validate(o,h,p,_,x={}){return(!x||x.validate!==!1)&&Lu(this,o.call(ql,{key:h,layerType:this.type,objectKey:p,value:_,styleSpec:Re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const o in this.paint._values){const h=this.paint.get(o);if(h instanceof Ps&&Iu(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const ug={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class kc{constructor(o,h){this._structArray=o,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(o,h){return o._trim(),h&&(o.isTransferred=!0,h.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}}static deserialize(o){const h=Object.create(this.prototype);return h.arrayBuffer=o.arrayBuffer,h.length=o.length,h.capacity=o.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(o){this.reserve(o),this.length=o}reserve(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ei(u,o=1){let h=0,p=0;return{members:u.map(_=>{const x=ug[_.type].BYTES_PER_ELEMENT,w=h=cg(h,Math.max(o,x)),I=_.components||1;return p=Math.max(p,x),h+=x*I,{name:_.name,type:_.type,components:I,offset:w}}),size:cg(h,Math.max(p,o)),alignment:o}}function cg(u,o){return Math.ceil(u/o)*o}class Dc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.int16[_+0]=h,this.int16[_+1]=p,o}}Dc.prototype.bytesPerElement=4,Ct("StructArrayLayout2i4",Dc);class ka extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.int16[x+0]=h,this.int16[x+1]=p,this.int16[x+2]=_,o}}ka.prototype.bytesPerElement=6,Ct("StructArrayLayout3i6",ka);class Up extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.int16[w+0]=h,this.int16[w+1]=p,this.int16[w+2]=_,this.int16[w+3]=x,o}}Up.prototype.bytesPerElement=8,Ct("StructArrayLayout4i8",Up);class jp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}jp.prototype.bytesPerElement=12,Ct("StructArrayLayout2i4i12",jp);class Gp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=4*o,D=8*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.uint8[D+4]=_,this.uint8[D+5]=x,this.uint8[D+6]=w,this.uint8[D+7]=I,o}}Gp.prototype.bytesPerElement=8,Ct("StructArrayLayout2i4ub8",Gp);class Rc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.float32[_+0]=h,this.float32[_+1]=p,o}}Rc.prototype.bytesPerElement=8,Ct("StructArrayLayout2f8",Rc);class Zh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O){const B=this.length;return this.resize(B+1),this.emplace(B,o,h,p,_,x,w,I,P,D,O)}emplace(o,h,p,_,x,w,I,P,D,O,B){const W=10*o;return this.uint16[W+0]=h,this.uint16[W+1]=p,this.uint16[W+2]=_,this.uint16[W+3]=x,this.uint16[W+4]=w,this.uint16[W+5]=I,this.uint16[W+6]=P,this.uint16[W+7]=D,this.uint16[W+8]=O,this.uint16[W+9]=B,o}}Zh.prototype.bytesPerElement=20,Ct("StructArrayLayout10ui20",Zh);class qp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W){const X=this.length;return this.resize(X+1),this.emplace(X,o,h,p,_,x,w,I,P,D,O,B,W)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X){const K=12*o;return this.int16[K+0]=h,this.int16[K+1]=p,this.int16[K+2]=_,this.int16[K+3]=x,this.uint16[K+4]=w,this.uint16[K+5]=I,this.uint16[K+6]=P,this.uint16[K+7]=D,this.int16[K+8]=O,this.int16[K+9]=B,this.int16[K+10]=W,this.int16[K+11]=X,o}}qp.prototype.bytesPerElement=24,Ct("StructArrayLayout4i4ui4i24",qp);class Wp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.float32[x+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Wp.prototype.bytesPerElement=12,Ct("StructArrayLayout3f12",Wp);class Da extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint32[1*o+0]=h,o}}Da.prototype.bytesPerElement=4,Ct("StructArrayLayout1ul4",Da);class Xh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D){const O=this.length;return this.resize(O+1),this.emplace(O,o,h,p,_,x,w,I,P,D)}emplace(o,h,p,_,x,w,I,P,D,O){const B=10*o,W=5*o;return this.int16[B+0]=h,this.int16[B+1]=p,this.int16[B+2]=_,this.int16[B+3]=x,this.int16[B+4]=w,this.int16[B+5]=I,this.uint32[W+3]=P,this.uint16[B+8]=D,this.uint16[B+9]=O,o}}Xh.prototype.bytesPerElement=20,Ct("StructArrayLayout6i1ul2ui20",Xh);class Nc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}Nc.prototype.bytesPerElement=12,Ct("StructArrayLayout2i2i2i12",Nc);class Yh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x){const w=this.length;return this.resize(w+1),this.emplace(w,o,h,p,_,x)}emplace(o,h,p,_,x,w){const I=4*o,P=8*o;return this.float32[I+0]=h,this.float32[I+1]=p,this.float32[I+2]=_,this.int16[P+6]=x,this.int16[P+7]=w,o}}Yh.prototype.bytesPerElement=16,Ct("StructArrayLayout2f1f2i16",Yh);class Oc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=12*o,I=3*o;return this.uint8[w+0]=h,this.uint8[w+1]=p,this.float32[I+1]=_,this.float32[I+2]=x,o}}Oc.prototype.bytesPerElement=12,Ct("StructArrayLayout2ub2f12",Oc);class Kh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[x+0]=h,this.uint16[x+1]=p,this.uint16[x+2]=_,o}}Kh.prototype.bytesPerElement=6,Ct("StructArrayLayout3ui6",Kh);class ku extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be){const Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be,Oe){const Ee=24*o,ke=12*o,$e=48*o;return this.int16[Ee+0]=h,this.int16[Ee+1]=p,this.uint16[Ee+2]=_,this.uint16[Ee+3]=x,this.uint32[ke+2]=w,this.uint32[ke+3]=I,this.uint32[ke+4]=P,this.uint16[Ee+10]=D,this.uint16[Ee+11]=O,this.uint16[Ee+12]=B,this.float32[ke+7]=W,this.float32[ke+8]=X,this.uint8[$e+36]=K,this.uint8[$e+37]=re,this.uint8[$e+38]=pe,this.uint32[ke+10]=be,this.int16[Ee+22]=Oe,o}}ku.prototype.bytesPerElement=48,Ct("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ku);class Wl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be,Oe,Ee,ke,$e,et,St,kt,wt,bt,ht,Tt){const gt=this.length;return this.resize(gt+1),this.emplace(gt,o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be,Oe,Ee,ke,$e,et,St,kt,wt,bt,ht,Tt)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,re,pe,be,Oe,Ee,ke,$e,et,St,kt,wt,bt,ht,Tt,gt){const rt=32*o,Ut=16*o;return this.int16[rt+0]=h,this.int16[rt+1]=p,this.int16[rt+2]=_,this.int16[rt+3]=x,this.int16[rt+4]=w,this.int16[rt+5]=I,this.int16[rt+6]=P,this.int16[rt+7]=D,this.uint16[rt+8]=O,this.uint16[rt+9]=B,this.uint16[rt+10]=W,this.uint16[rt+11]=X,this.uint16[rt+12]=K,this.uint16[rt+13]=re,this.uint16[rt+14]=pe,this.uint16[rt+15]=be,this.uint16[rt+16]=Oe,this.uint16[rt+17]=Ee,this.uint16[rt+18]=ke,this.uint16[rt+19]=$e,this.uint16[rt+20]=et,this.uint16[rt+21]=St,this.uint16[rt+22]=kt,this.uint32[Ut+12]=wt,this.float32[Ut+13]=bt,this.float32[Ut+14]=ht,this.uint16[rt+30]=Tt,this.uint16[rt+31]=gt,o}}Wl.prototype.bytesPerElement=64,Ct("StructArrayLayout8i15ui1ul2f2ui64",Wl);class Jh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.float32[1*o+0]=h,o}}Jh.prototype.bytesPerElement=4,Ct("StructArrayLayout1f4",Jh);class $h extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[6*o+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}$h.prototype.bytesPerElement=12,Ct("StructArrayLayout1ui2f12",$h);class Hl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=4*o;return this.uint32[2*o+0]=h,this.uint16[x+2]=p,this.uint16[x+3]=_,o}}Hl.prototype.bytesPerElement=8,Ct("StructArrayLayout1ul2ui8",Hl);class Hp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.uint16[_+0]=h,this.uint16[_+1]=p,o}}Hp.prototype.bytesPerElement=4,Ct("StructArrayLayout2ui4",Hp);class Zp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint16[1*o+0]=h,o}}Zp.prototype.bytesPerElement=2,Ct("StructArrayLayout1ui2",Zp);class Qh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.float32[w+0]=h,this.float32[w+1]=p,this.float32[w+2]=_,this.float32[w+3]=x,o}}Qh.prototype.bytesPerElement=16,Ct("StructArrayLayout4f16",Qh);class hg extends kc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new E(this.anchorPointX,this.anchorPointY)}}hg.prototype.size=20;class y extends Xh{get(o){return new hg(this,o)}}Ct("CollisionBoxArray",y);class s extends kc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(o){this._structArray.uint8[this._pos1+37]=o}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(o){this._structArray.uint8[this._pos1+38]=o}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(o){this._structArray.uint32[this._pos4+10]=o}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}s.prototype.size=48;class f extends ku{get(o){return new s(this,o)}}Ct("PlacedSymbolArray",f);class m extends kc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(o){this._structArray.uint32[this._pos4+12]=o}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}m.prototype.size=64;class g extends Wl{get(o){return new m(this,o)}}Ct("SymbolInstanceArray",g);class b extends Jh{getoffsetX(o){return this.float32[1*o+0]}}Ct("GlyphOffsetArray",b);class C extends ka{getx(o){return this.int16[3*o+0]}gety(o){return this.int16[3*o+1]}gettileUnitDistanceFromAnchor(o){return this.int16[3*o+2]}}Ct("SymbolLineVertexArray",C);class L extends kc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}L.prototype.size=12;class A extends $h{get(o){return new L(this,o)}}Ct("TextAnchorOffsetArray",A);class N extends kc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}N.prototype.size=8;class V extends Hl{get(o){return new N(this,o)}}Ct("FeatureIndexArray",V);class j extends Dc{}class Y extends Dc{}class ue extends Dc{}class le extends jp{}class ge extends Gp{}class ne extends Rc{}class Ie extends Zh{}class Be extends qp{}class _e extends Wp{}class De extends Da{}class Ve extends Nc{}class Ge extends Oc{}class Ke extends Kh{}class nt extends Hp{}const tt=ei([{name:"a_pos",components:2,type:"Int16"}],4),{members:at}=tt;class pt{constructor(o=[]){this.segments=o}prepareSegment(o,h,p,_){let x=this.segments[this.segments.length-1];return o>pt.MAX_VERTEX_ARRAY_LENGTH&&Qe(`Max vertices per segment is ${pt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${o}`),(!x||x.vertexLength+o>pt.MAX_VERTEX_ARRAY_LENGTH||x.sortKey!==_)&&(x={vertexOffset:h.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(x.sortKey=_),this.segments.push(x)),x}get(){return this.segments}destroy(){for(const o of this.segments)for(const h in o.vaos)o.vaos[h].destroy()}static simpleSegment(o,h,p,_){return new pt([{vertexOffset:o,primitiveOffset:h,vertexLength:p,primitiveLength:_,vaos:{},sortKey:0}])}}function un(u,o){return 256*(u=J(Math.floor(u),0,255))+J(Math.floor(o),0,255)}pt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ct("SegmentVector",pt);const mt=ei([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Wt={exports:{}},cn={exports:{}};cn.exports=function(u,o){var h,p,_,x,w,I,P,D;for(p=u.length-(h=3&u.length),_=o,w=3432918353,I=461845907,D=0;D>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(P=0,h){case 3:P^=(255&u.charCodeAt(D+2))<<16;case 2:P^=(255&u.charCodeAt(D+1))<<8;case 1:_^=P=(65535&(P=(P=(65535&(P^=255&u.charCodeAt(D)))*w+(((P>>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295}return _^=u.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0};var An=cn.exports,$t={exports:{}};$t.exports=function(u,o){for(var h,p=u.length,_=o^p,x=0;p>=4;)h=1540483477*(65535&(h=255&u.charCodeAt(x)|(255&u.charCodeAt(++x))<<8|(255&u.charCodeAt(++x))<<16|(255&u.charCodeAt(++x))<<24))+((1540483477*(h>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),p-=4,++x;switch(p){case 3:_^=(255&u.charCodeAt(x+2))<<16;case 2:_^=(255&u.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&u.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0};var mn=An,bn=$t.exports;Wt.exports=mn,Wt.exports.murmur3=mn,Wt.exports.murmur2=bn;var Ur=d(Wt.exports);class $n{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(o,h,p,_){this.ids.push(Go(o)),this.positions.push(h,p,_)}getPositions(o){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=Go(o);let p=0,_=this.ids.length-1;for(;p<_;){const w=p+_>>1;this.ids[w]>=h?_=w:p=w+1}const x=[];for(;this.ids[p]===h;)x.push({index:this.positions[3*p],start:this.positions[3*p+1],end:this.positions[3*p+2]}),p++;return x}static serialize(o,h){const p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return gi(p,_,0,p.length-1),h&&h.push(p.buffer,_.buffer),{ids:p,positions:_}}static deserialize(o){const h=new $n;return h.ids=o.ids,h.positions=o.positions,h.indexed=!0,h}}function Go(u){const o=+u;return!isNaN(o)&&o<=Number.MAX_SAFE_INTEGER?o:Ur(String(u))}function gi(u,o,h,p){for(;h>1];let x=h-1,w=p+1;for(;;){do x++;while(u[x]<_);do w--;while(u[w]>_);if(x>=w)break;Mr(u,x,w),Mr(o,3*x,3*w),Mr(o,3*x+1,3*w+1),Mr(o,3*x+2,3*w+2)}w-h`u_${_}`),this.type=p}setUniform(o,h,p){o.set(p.constantOr(this.value))}getBinding(o,h,p){return this.type==="color"?new ll(o,h):new qo(o,h)}}class hi{constructor(o,h){this.uniformNames=h.map(p=>`u_${p}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(o,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=o.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=o.tlbr}setUniform(o,h,p,_){const x=_==="u_pattern_to"?this.patternTo:_==="u_pattern_from"?this.patternFrom:_==="u_pixel_ratio_to"?this.pixelRatioTo:_==="u_pixel_ratio_from"?this.pixelRatioFrom:null;x&&o.set(x)}getBinding(o,h,p){return p.substr(0,9)==="u_pattern"?new na(o,h):new qo(o,h)}}class Ar{constructor(o,h,p,_){this.expression=o,this.type=p,this.maxValue=0,this.paintVertexAttributes=h.map(x=>({name:`a_${x}`,type:"Float32",components:p==="color"?2:1,offset:0})),this.paintVertexArray=new _}populatePaintArray(o,h,p,_,x){const w=this.paintVertexArray.length,I=this.expression.evaluate(new br(0),h,{},_,[],x);this.paintVertexArray.resize(o),this._setPaintValue(w,o,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:0},p,_);this._setPaintValue(o,h,x)}_setPaintValue(o,h,p){if(this.type==="color"){const _=ul(p);for(let x=o;x`u_${I}_t`),this.type=p,this.useIntegerZoom=_,this.zoom=x,this.maxValue=0,this.paintVertexAttributes=h.map(I=>({name:`a_${I}`,type:"Float32",components:p==="color"?4:2,offset:0})),this.paintVertexArray=new w}populatePaintArray(o,h,p,_,x){const w=this.expression.evaluate(new br(this.zoom),h,{},_,[],x),I=this.expression.evaluate(new br(this.zoom+1),h,{},_,[],x),P=this.paintVertexArray.length;this.paintVertexArray.resize(o),this._setPaintValue(P,o,w,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:this.zoom},p,_),w=this.expression.evaluate({zoom:this.zoom+1},p,_);this._setPaintValue(o,h,x,w)}_setPaintValue(o,h,p,_){if(this.type==="color"){const x=ul(p),w=ul(_);for(let I=o;I`#define HAS_UNIFORM_${_}`))}return o}getBinderAttributes(){const o=[];for(const h in this.binders){const p=this.binders[h];if(p instanceof Ar||p instanceof xr)for(let _=0;_!0){this.programConfigurations={};for(const _ of o)this.programConfigurations[_.id]=new fi(_,h,p);this.needsUpload=!1,this._featureMap=new $n,this._bufferOffset=0}populatePaintArrays(o,h,p,_,x,w){for(const I in this.programConfigurations)this.programConfigurations[I].populatePaintArrays(o,h,_,x,w);h.id!==void 0&&this._featureMap.add(h.id,p,this._bufferOffset,o),this._bufferOffset=o,this.needsUpload=!0}updatePaintArrays(o,h,p,_){for(const x of p)this.needsUpload=this.programConfigurations[x.id].updatePaintArrays(o,this._featureMap,h,x,_)||this.needsUpload}get(o){return this.programConfigurations[o]}upload(o){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(o);this.needsUpload=!1}}destroy(){for(const o in this.programConfigurations)this.programConfigurations[o].destroy()}}function ps(u,o){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${o}-`,"").replace(/-/g,"_")]}function pi(u,o,h){const p={color:{source:Rc,composite:Qh},number:{source:Jh,composite:Rc}},_=function(x){return{"line-pattern":{source:Ie,composite:Ie},"fill-pattern":{source:Ie,composite:Ie},"fill-extrusion-pattern":{source:Ie,composite:Ie}}[x]}(u);return _&&_[h]||p[o][h]}Ct("ConstantBinder",ra),Ct("CrossFadedConstantBinder",hi),Ct("SourceExpressionBinder",Ar),Ct("CrossFadedCompositeBinder",fs),Ct("CompositeExpressionBinder",xr),Ct("ProgramConfiguration",fi,{omit:["_buffers"]}),Ct("ProgramConfigurationSet",kr);const Zr=8192,Xp=Math.pow(2,14)-1,fg=-Xp-1;function Zl(u){const o=Zr/u.extent,h=u.loadGeometry();for(let p=0;pw.x+1||Pw.y+1)&&Qe("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Xl(u,o){return{type:u.type,id:u.id,properties:u.properties,geometry:o?Zl(u):[]}}function ef(u,o,h,p,_){u.emplaceBack(2*o+(p+1)/2,2*h+(_+1)/2)}class cl{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new Y,this.indexArray=new Ke,this.segments=new pt,this.programConfigurations=new kr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){const _=this.layers[0],x=[];let w=null,I=!1;_.type==="circle"&&(w=_.layout.get("circle-sort-key"),I=!w.isConstant());for(const{feature:P,id:D,index:O,sourceLayerIndex:B}of o){const W=this.layers[0]._featureFilter.needGeometry,X=Xl(P,W);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),X,p))continue;const K=I?w.evaluate(X,{},p):void 0,re={id:D,properties:P.properties,type:P.type,sourceLayerIndex:B,index:O,geometry:W?X.geometry:Zl(P),patterns:{},sortKey:K};x.push(re)}I&&x.sort((P,D)=>P.sortKey-D.sortKey);for(const P of x){const{geometry:D,index:O,sourceLayerIndex:B}=P,W=o[O].feature;this.addFeature(P,D,O,p),h.featureIndex.insert(W,D,O,B,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,at),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(o,h,p,_){for(const x of h)for(const w of x){const I=w.x,P=w.y;if(I<0||I>=Zr||P<0||P>=Zr)continue;const D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),O=D.vertexLength;ef(this.layoutVertexArray,I,P,-1,-1),ef(this.layoutVertexArray,I,P,1,-1),ef(this.layoutVertexArray,I,P,1,1),ef(this.layoutVertexArray,I,P,-1,1),this.indexArray.emplaceBack(O,O+1,O+2),this.indexArray.emplaceBack(O,O+3,O+2),D.vertexLength+=4,D.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)}}function Yp(u,o){for(let h=0;h1){if(tf(u,o))return!0;for(let p=0;p1?h:h.sub(o)._mult(_)._add(o))}function _b(u,o){let h,p,_,x=!1;for(let w=0;wo.y!=_.y>o.y&&o.x<(_.x-p.x)*(o.y-p.y)/(_.y-p.y)+p.x&&(x=!x)}return x}function nf(u,o){let h=!1;for(let p=0,_=u.length-1;po.y!=w.y>o.y&&o.x<(w.x-x.x)*(o.y-x.y)/(w.y-x.y)+x.x&&(h=!h)}return h}function qT(u,o,h){const p=h[0],_=h[2];if(u.x_.x&&o.x>_.x||u.y_.y&&o.y>_.y)return!1;const x=Me(u,o,h[0]);return x!==Me(u,o,h[1])||x!==Me(u,o,h[2])||x!==Me(u,o,h[3])}function Qp(u,o,h){const p=o.paint.get(u).value;return p.kind==="constant"?p.value:h.programConfigurations.get(o.id).getMaxValue(u)}function dg(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function mg(u,o,h,p,_){if(!o[0]&&!o[1])return u;const x=E.convert(o)._mult(_);h==="viewport"&&x._rotate(-p);const w=[];for(let I=0;Ixb(pe,re))}(D,P),X=B?O*I:O;for(const K of _)for(const re of K){const pe=B?re:xb(re,P);let be=X;const Oe=gg([],[re.x,re.y,0,1],P);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?be*=Oe[3]/w.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(be*=w.cameraToCenterDistance/Oe[3]),pg(W,pe,be))return!0}return!1}}function xb(u,o){const h=gg([],[u.x,u.y,0,1],o);return new E(h[0]/h[3],h[1]/h[3])}class wb extends cl{}let Sb;Ct("HeatmapBucket",wb,{omit:["layers"]});var XT={get paint(){return Sb=Sb||new Co({"heatmap-radius":new Gt(Re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Gt(Re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Nt(Re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Bp(Re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Nt(Re.paint_heatmap["heatmap-opacity"])})}};function Yy(u,{width:o,height:h},p,_){if(_){if(_ instanceof Uint8ClampedArray)_=new Uint8Array(_.buffer);else if(_.length!==o*h*p)throw new RangeError(`mismatched image size. expected: ${_.length} but got: ${o*h*p}`)}else _=new Uint8Array(o*h*p);return u.width=o,u.height=h,u.data=_,u}function Eb(u,{width:o,height:h},p){if(o===u.width&&h===u.height)return;const _=Yy({},{width:o,height:h},p);Ky(u,_,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,o),height:Math.min(u.height,h)},p),u.width=o,u.height=h,u.data=_.data}function Ky(u,o,h,p,_,x){if(_.width===0||_.height===0)return o;if(_.width>u.width||_.height>u.height||h.x>u.width-_.width||h.y>u.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");const w=u.data,I=o.data;if(w===I)throw new Error("srcData equals dstData, so image is already copied");for(let P=0;P<_.height;P++){const D=((h.y+P)*u.width+h.x)*x,O=((p.y+P)*o.width+p.x)*x;for(let B=0;B<_.width*x;B++)I[O+B]=w[D+B]}return o}class td{constructor(o,h){Yy(this,o,1,h)}resize(o){Eb(this,o,1)}clone(){return new td({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Ky(o,h,p,_,x,1)}}class As{constructor(o,h){Yy(this,o,4,h)}resize(o){Eb(this,o,4)}replace(o,h){h?this.data.set(o):this.data=o instanceof Uint8ClampedArray?new Uint8Array(o.buffer):o}clone(){return new As({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Ky(o,h,p,_,x,4)}}function Ib(u){const o={},h=u.resolution||256,p=u.clips?u.clips.length:1,_=u.image||new As({width:h,height:p});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const x=(w,I,P)=>{o[u.evaluationKey]=P;const D=u.expression.evaluate(o);_.data[w+I+0]=Math.floor(255*D.r/D.a),_.data[w+I+1]=Math.floor(255*D.g/D.a),_.data[w+I+2]=Math.floor(255*D.b/D.a),_.data[w+I+3]=Math.floor(255*D.a)};if(u.clips)for(let w=0,I=0;w80*h){p=x=u[0],_=w=u[1];for(var K=h;Kx&&(x=I),P>w&&(w=P);D=(D=Math.max(x-p,w-_))!==0?32767/D:0}return nd(W,X,h,p,_,D,0),X}function Tb(u,o,h,p,_){var x,w;if(_===e0(u,o,h,p)>0)for(x=o;x=o;x-=p)w=Mb(x,u[x],u[x+1],w);return w&&yg(w,w.next)&&(id(w),w=w.next),w}function Fc(u,o){if(!u)return u;o||(o=u);var h,p=u;do if(h=!1,p.steiner||!yg(p,p.next)&&ti(p.prev,p,p.next)!==0)p=p.next;else{if(id(p),(p=o=p.prev)===p.next)break;h=!0}while(h||p!==o);return o}function nd(u,o,h,p,_,x,w){if(u){!w&&x&&function(O,B,W,X){var K=O;do K.z===0&&(K.z=$y(K.x,K.y,B,W,X)),K.prevZ=K.prev,K.nextZ=K.next,K=K.next;while(K!==O);K.prevZ.nextZ=null,K.prevZ=null,function(re){var pe,be,Oe,Ee,ke,$e,et,St,kt=1;do{for(be=re,re=null,ke=null,$e=0;be;){for($e++,Oe=be,et=0,pe=0;pe0||St>0&&Oe;)et!==0&&(St===0||!Oe||be.z<=Oe.z)?(Ee=be,be=be.nextZ,et--):(Ee=Oe,Oe=Oe.nextZ,St--),ke?ke.nextZ=Ee:re=Ee,Ee.prevZ=ke,ke=Ee;be=Oe}ke.nextZ=null,kt*=2}while($e>1)}(K)}(u,p,_,x);for(var I,P,D=u;u.prev!==u.next;)if(I=u.prev,P=u.next,x?tL(u,p,_,x):eL(u))o.push(I.i/h|0),o.push(u.i/h|0),o.push(P.i/h|0),id(u),u=P.next,D=P.next;else if((u=P)===D){w?w===1?nd(u=nL(Fc(u),o,h),o,h,p,_,x,2):w===2&&rL(u,o,h,p,_,x):nd(Fc(u),o,h,p,_,x,1);break}}}function eL(u){var o=u.prev,h=u,p=u.next;if(ti(o,h,p)>=0)return!1;for(var _=o.x,x=h.x,w=p.x,I=o.y,P=h.y,D=p.y,O=_x?_>w?_:w:x>w?x:w,X=I>P?I>D?I:D:P>D?P:D,K=p.next;K!==o;){if(K.x>=O&&K.x<=W&&K.y>=B&&K.y<=X&&of(_,I,x,P,w,D,K.x,K.y)&&ti(K.prev,K,K.next)>=0)return!1;K=K.next}return!0}function tL(u,o,h,p){var _=u.prev,x=u,w=u.next;if(ti(_,x,w)>=0)return!1;for(var I=_.x,P=x.x,D=w.x,O=_.y,B=x.y,W=w.y,X=IP?I>D?I:D:P>D?P:D,pe=O>B?O>W?O:W:B>W?B:W,be=$y(X,K,o,h,p),Oe=$y(re,pe,o,h,p),Ee=u.prevZ,ke=u.nextZ;Ee&&Ee.z>=be&&ke&&ke.z<=Oe;){if(Ee.x>=X&&Ee.x<=re&&Ee.y>=K&&Ee.y<=pe&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0||(Ee=Ee.prevZ,ke.x>=X&&ke.x<=re&&ke.y>=K&&ke.y<=pe&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0))return!1;ke=ke.nextZ}for(;Ee&&Ee.z>=be;){if(Ee.x>=X&&Ee.x<=re&&Ee.y>=K&&Ee.y<=pe&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.prevZ}for(;ke&&ke.z<=Oe;){if(ke.x>=X&&ke.x<=re&&ke.y>=K&&ke.y<=pe&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0)return!1;ke=ke.nextZ}return!0}function nL(u,o,h){var p=u;do{var _=p.prev,x=p.next.next;!yg(_,x)&&Lb(_,p,p.next,x)&&rd(_,x)&&rd(x,_)&&(o.push(_.i/h|0),o.push(p.i/h|0),o.push(x.i/h|0),id(p),id(p.next),p=u=x),p=p.next}while(p!==u);return Fc(p)}function rL(u,o,h,p,_,x){var w=u;do{for(var I=w.next.next;I!==w.prev;){if(w.i!==I.i&&lL(w,I)){var P=Pb(w,I);return w=Fc(w,w.next),P=Fc(P,P.next),nd(w,o,h,p,_,x,0),void nd(P,o,h,p,_,x,0)}I=I.next}w=w.next}while(w!==u)}function iL(u,o){return u.x-o.x}function oL(u,o){var h=function(_,x){var w,I=x,P=_.x,D=_.y,O=-1/0;do{if(D<=I.y&&D>=I.next.y&&I.next.y!==I.y){var B=I.x+(D-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(B<=P&&B>O&&(O=B,w=I.x=I.x&&I.x>=K&&P!==I.x&&of(Dw.x||I.x===w.x&&sL(w,I)))&&(w=I,pe=W)),I=I.next;while(I!==X);return w}(u,o);if(!h)return o;var p=Pb(h,u);return Fc(p,p.next),Fc(h,h.next)}function sL(u,o){return ti(u.prev,u,o.prev)<0&&ti(o.next,u,u.next)<0}function $y(u,o,h,p,_){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-h)*_|0)|u<<8))|u<<4))|u<<2))|u<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-p)*_|0)|o<<8))|o<<4))|o<<2))|o<<1))<<1}function aL(u){var o=u,h=u;do(o.x=(u-w)*(x-I)&&(u-w)*(p-I)>=(h-w)*(o-I)&&(h-w)*(x-I)>=(_-w)*(p-I)}function lL(u,o){return u.next.i!==o.i&&u.prev.i!==o.i&&!function(h,p){var _=h;do{if(_.i!==h.i&&_.next.i!==h.i&&_.i!==p.i&&_.next.i!==p.i&&Lb(_,_.next,h,p))return!0;_=_.next}while(_!==h);return!1}(u,o)&&(rd(u,o)&&rd(o,u)&&function(h,p){var _=h,x=!1,w=(h.x+p.x)/2,I=(h.y+p.y)/2;do _.y>I!=_.next.y>I&&_.next.y!==_.y&&w<(_.next.x-_.x)*(I-_.y)/(_.next.y-_.y)+_.x&&(x=!x),_=_.next;while(_!==h);return x}(u,o)&&(ti(u.prev,u,o.prev)||ti(u,o.prev,o))||yg(u,o)&&ti(u.prev,u,u.next)>0&&ti(o.prev,o,o.next)>0)}function ti(u,o,h){return(o.y-u.y)*(h.x-o.x)-(o.x-u.x)*(h.y-o.y)}function yg(u,o){return u.x===o.x&&u.y===o.y}function Lb(u,o,h,p){var _=bg(ti(u,o,h)),x=bg(ti(u,o,p)),w=bg(ti(h,p,u)),I=bg(ti(h,p,o));return _!==x&&w!==I||!(_!==0||!vg(u,h,o))||!(x!==0||!vg(u,p,o))||!(w!==0||!vg(h,u,p))||!(I!==0||!vg(h,o,p))}function vg(u,o,h){return o.x<=Math.max(u.x,h.x)&&o.x>=Math.min(u.x,h.x)&&o.y<=Math.max(u.y,h.y)&&o.y>=Math.min(u.y,h.y)}function bg(u){return u>0?1:u<0?-1:0}function rd(u,o){return ti(u.prev,u,u.next)<0?ti(u,o,u.next)>=0&&ti(u,u.prev,o)>=0:ti(u,o,u.prev)<0||ti(u,u.next,o)<0}function Pb(u,o){var h=new Qy(u.i,u.x,u.y),p=new Qy(o.i,o.x,o.y),_=u.next,x=o.prev;return u.next=o,o.prev=u,h.next=_,_.prev=h,p.next=h,h.prev=p,x.next=p,p.prev=x,p}function Mb(u,o,h,p){var _=new Qy(u,o,h);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function id(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function Qy(u,o,h){this.i=u,this.x=o,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function e0(u,o,h,p){for(var _=0,x=o,w=h-p;x0&&h.holes.push(p+=u[_-1].length)}return h};var Ab=d(Jy.exports);function uL(u,o,h,p,_){kb(u,o,h||0,p||u.length-1,_||cL)}function kb(u,o,h,p,_){for(;p>h;){if(p-h>600){var x=p-h+1,w=o-h+1,I=Math.log(x),P=.5*Math.exp(2*I/3),D=.5*Math.sqrt(I*P*(x-P)/x)*(w-x/2<0?-1:1);kb(u,o,Math.max(h,Math.floor(o-w*P/x+D)),Math.min(p,Math.floor(o+(x-w)*P/x+D)),_)}var O=u[o],B=h,W=p;for(od(u,h,o),_(u[p],O)>0&&od(u,h,p);B0;)W--}_(u[h],O)===0?od(u,h,W):od(u,++W,p),W<=o&&(h=W+1),o<=W&&(p=W-1)}}function od(u,o,h){var p=u[o];u[o]=u[h],u[h]=p}function cL(u,o){return uo?1:0}function t0(u,o){const h=u.length;if(h<=1)return[u];const p=[];let _,x;for(let w=0;w1)for(let w=0;wh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ue,this.indexArray=new Ke,this.indexArray2=new nt,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.segments2=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=n0("fill",this.layers,h);const _=this.layers[0].layout.get("fill-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p,h.availableImages):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=r0("fill",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,QT),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.indexBuffer2=o.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(o,h,p,_,x){for(const w of t0(h,500)){let I=0;for(const X of w)I+=X.length;const P=this.segments.prepareSegment(I,this.layoutVertexArray,this.indexArray),D=P.vertexLength,O=[],B=[];for(const X of w){if(X.length===0)continue;X!==w[0]&&B.push(O.length/2);const K=this.segments2.prepareSegment(X.length,this.layoutVertexArray,this.indexArray2),re=K.vertexLength;this.layoutVertexArray.emplaceBack(X[0].x,X[0].y),this.indexArray2.emplaceBack(re+X.length-1,re),O.push(X[0].x),O.push(X[0].y);for(let pe=1;pe>3}if(_--,p===1||p===2)x+=u.readSVarint(),w+=u.readSVarint(),p===1&&(o&&I.push(o),o=[]),o.push(new _L(x,w));else{if(p!==7)throw new Error("unknown command "+p);o&&o.push(o[0].clone())}}return o&&I.push(o),I},sf.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var o=u.readVarint()+u.pos,h=1,p=0,_=0,x=0,w=1/0,I=-1/0,P=1/0,D=-1/0;u.pos>3}if(p--,h===1||h===2)(_+=u.readSVarint())I&&(I=_),(x+=u.readSVarint())D&&(D=x);else if(h!==7)throw new Error("unknown command "+h)}return[w,P,I,D]},sf.prototype.toGeoJSON=function(u,o,h){var p,_,x=this.extent*Math.pow(2,h),w=this.extent*u,I=this.extent*o,P=this.loadGeometry(),D=sf.types[this.type];function O(X){for(var K=0;K>3;_=w===1?p.readString():w===2?p.readFloat():w===3?p.readDouble():w===4?p.readVarint64():w===5?p.readVarint():w===6?p.readSVarint():w===7?p.readBoolean():null}return _}(h))}zb.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var o=this._pbf.readVarint()+this._pbf.pos;return new bL(this._pbf,o,this.extent,this._keys,this._values)};var wL=Ob;function SL(u,o,h){if(u===3){var p=new wL(h,h.readVarint()+h.pos);p.length&&(o[p.name]=p)}}Du.VectorTile=function(u,o){this.layers=u.readFields(SL,{},o)},Du.VectorTileFeature=Nb,Du.VectorTileLayer=Ob;const EL=Du.VectorTileFeature.types,o0=Math.pow(2,13);function sd(u,o,h,p,_,x,w,I){u.emplaceBack(o,h,2*Math.floor(p*o0)+w,_*o0*2,x*o0*2,Math.round(I))}class s0{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new le,this.centroidVertexArray=new j,this.indexArray=new Ke,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.features=[],this.hasPattern=n0("fill-extrusion",this.layers,h);for(const{feature:_,id:x,index:w,sourceLayerIndex:I}of o){const P=this.layers[0]._featureFilter.needGeometry,D=Xl(_,P);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),D,p))continue;const O={id:x,sourceLayerIndex:I,index:w,geometry:P?D.geometry:Zl(_),properties:_.properties,type:_.type,patterns:{}};this.hasPattern?this.features.push(r0("fill-extrusion",this.layers,O,this.zoom,h)):this.addFeature(O,O.geometry,w,p,{}),h.featureIndex.insert(_,O.geometry,w,I,this.index,!0)}}addFeatures(o,h,p){for(const _ of this.features){const{geometry:x}=_;this.addFeature(_,x,_.index,h,p)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,gL),this.centroidVertexBuffer=o.createVertexBuffer(this.centroidVertexArray,mL.members,!0),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(o,h,p,_,x){const w={x:0,y:0,vertexCount:0};for(const I of t0(h,500)){let P=0;for(const K of I)P+=K.length;let D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const K of I){if(K.length===0||CL(K))continue;let re=0;for(let pe=0;pe=1){const Oe=K[pe-1];if(!IL(be,Oe)){D.vertexLength+4>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ee=be.sub(Oe)._perp()._unit(),ke=Oe.dist(be);re+ke>32768&&(re=0),sd(this.layoutVertexArray,be.x,be.y,Ee.x,Ee.y,0,0,re),sd(this.layoutVertexArray,be.x,be.y,Ee.x,Ee.y,0,1,re),w.x+=2*be.x,w.y+=2*be.y,w.vertexCount+=2,re+=ke,sd(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,0,re),sd(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,1,re),w.x+=2*Oe.x,w.y+=2*Oe.y,w.vertexCount+=2;const $e=D.vertexLength;this.indexArray.emplaceBack($e,$e+2,$e+1),this.indexArray.emplaceBack($e+1,$e+2,$e+3),D.vertexLength+=4,D.primitiveLength+=2}}}}if(D.vertexLength+P>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(P,this.layoutVertexArray,this.indexArray)),EL[o.type]!=="Polygon")continue;const O=[],B=[],W=D.vertexLength;for(const K of I)if(K.length!==0){K!==I[0]&&B.push(O.length/2);for(let re=0;reZr)||u.y===o.y&&(u.y<0||u.y>Zr)}function CL(u){return u.every(o=>o.x<0)||u.every(o=>o.x>Zr)||u.every(o=>o.y<0)||u.every(o=>o.y>Zr)}let Fb;Ct("FillExtrusionBucket",s0,{omit:["layers","features"]});var TL={get paint(){return Fb=Fb||new Co({"fill-extrusion-opacity":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Gt(Re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hh(Re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Gt(Re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Gt(Re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class LL extends Ms{constructor(o){super(o,TL)}createBucket(o){return new s0(o)}queryRadius(){return dg(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(o,h,p,_,x,w,I,P){const D=mg(o,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),w.angle,I),O=this.paint.get("fill-extrusion-height").evaluate(h,p),B=this.paint.get("fill-extrusion-base").evaluate(h,p),W=function(K,re,pe,be){const Oe=[];for(const Ee of K){const ke=[Ee.x,Ee.y,0,1];gg(ke,ke,re),Oe.push(new E(ke[0]/ke[3],ke[1]/ke[3]))}return Oe}(D,P),X=function(K,re,pe,be){const Oe=[],Ee=[],ke=be[8]*re,$e=be[9]*re,et=be[10]*re,St=be[11]*re,kt=be[8]*pe,wt=be[9]*pe,bt=be[10]*pe,ht=be[11]*pe;for(const Tt of K){const gt=[],rt=[];for(const Ut of Tt){const Rt=Ut.x,wn=Ut.y,mr=be[0]*Rt+be[4]*wn+be[12],wr=be[1]*Rt+be[5]*wn+be[13],vi=be[2]*Rt+be[6]*wn+be[14],ds=be[3]*Rt+be[7]*wn+be[15],Lo=vi+et,di=ds+St,Vi=mr+kt,Xi=wr+wt,Po=vi+bt,Mo=ds+ht,bi=new E((mr+ke)/di,(wr+$e)/di);bi.z=Lo/di,gt.push(bi);const xi=new E(Vi/Mo,Xi/Mo);xi.z=Po/Mo,rt.push(xi)}Oe.push(gt),Ee.push(rt)}return[Oe,Ee]}(_,B,O,P);return function(K,re,pe){let be=1/0;Kp(pe,re)&&(be=Bb(pe,re[0]));for(let Oe=0;Oeh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ge,this.layoutVertexArray2=new ne,this.indexArray=new Ke,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=n0("line",this.layers,h);const _=this.layers[0].layout.get("line-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=r0("line",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=o.createVertexBuffer(this.layoutVertexArray2,kL)),this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,ML),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(o){if(o.properties&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_end"))return{start:+o.properties.mapbox_clip_start,end:+o.properties.mapbox_clip_end}}addFeature(o,h,p,_,x){const w=this.layers[0].layout,I=w.get("line-join").evaluate(o,{}),P=w.get("line-cap"),D=w.get("line-miter-limit"),O=w.get("line-round-limit");this.lineClips=this.lineFeatureClips(o);for(const B of h)this.addLine(B,o,I,P,D,O);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,x,_)}addLine(o,h,p,_,x,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let be=0;be=2&&o[P-1].equals(o[P-2]);)P--;let D=0;for(;D0;if(St&&be>D){const ht=W.dist(X);if(ht>2*O){const Tt=W.sub(W.sub(X)._mult(O/ht)._round());this.updateDistance(X,Tt),this.addCurrentVertex(Tt,re,0,0,B),X=Tt}}const wt=X&&K;let bt=wt?p:I?"butt":_;if(wt&&bt==="round"&&($ex&&(bt="bevel"),bt==="bevel"&&($e>2&&(bt="flipbevel"),$e100)Oe=pe.mult(-1);else{const ht=$e*re.add(pe).mag()/re.sub(pe).mag();Oe._perp()._mult(ht*(kt?-1:1))}this.addCurrentVertex(W,Oe,0,0,B),this.addCurrentVertex(W,Oe.mult(-1),0,0,B)}else if(bt==="bevel"||bt==="fakeround"){const ht=-Math.sqrt($e*$e-1),Tt=kt?ht:0,gt=kt?0:ht;if(X&&this.addCurrentVertex(W,re,Tt,gt,B),bt==="fakeround"){const rt=Math.round(180*et/Math.PI/20);for(let Ut=1;Ut2*O){const Tt=W.add(K.sub(W)._mult(O/ht)._round());this.updateDistance(W,Tt),this.addCurrentVertex(Tt,pe,0,0,B),W=Tt}}}}addCurrentVertex(o,h,p,_,x,w=!1){const I=h.y*_-h.x,P=-h.y-h.x*_;this.addHalfVertex(o,h.x+h.y*p,h.y-h.x*p,w,!1,p,x),this.addHalfVertex(o,I,P,w,!0,-_,x),this.distance>Vb/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(o,h,p,_,x,w))}addHalfVertex({x:o,y:h},p,_,x,w,I,P){const D=.5*(this.lineClips?this.scaledDistance*(Vb-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((o<<1)+(x?1:0),(h<<1)+(w?1:0),Math.round(63*p)+128,Math.round(63*_)+128,1+(I===0?0:I<0?-1:1)|(63&D)<<2,D>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const O=P.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,O),P.primitiveLength++),w?this.e2=O:this.e1=O}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(o,h){this.distance+=o.dist(h),this.updateScaledDistance()}}let Ub,jb;Ct("LineBucket",a0,{omit:["layers","patternFeatures"]});var Gb={get paint(){return jb=jb||new Co({"line-opacity":new Gt(Re.paint_line["line-opacity"]),"line-color":new Gt(Re.paint_line["line-color"]),"line-translate":new Nt(Re.paint_line["line-translate"]),"line-translate-anchor":new Nt(Re.paint_line["line-translate-anchor"]),"line-width":new Gt(Re.paint_line["line-width"]),"line-gap-width":new Gt(Re.paint_line["line-gap-width"]),"line-offset":new Gt(Re.paint_line["line-offset"]),"line-blur":new Gt(Re.paint_line["line-blur"]),"line-dasharray":new Ac(Re.paint_line["line-dasharray"]),"line-pattern":new Hh(Re.paint_line["line-pattern"]),"line-gradient":new Bp(Re.paint_line["line-gradient"])})},get layout(){return Ub=Ub||new Co({"line-cap":new Nt(Re.layout_line["line-cap"]),"line-join":new Gt(Re.layout_line["line-join"]),"line-miter-limit":new Nt(Re.layout_line["line-miter-limit"]),"line-round-limit":new Nt(Re.layout_line["line-round-limit"]),"line-sort-key":new Gt(Re.layout_line["line-sort-key"])})}};class NL extends Gt{possiblyEvaluate(o,h){return h=new br(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(o,h)}evaluate(o,h,p,_){return h=ie({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(o,h,p,_)}}let xg;class OL extends Ms{constructor(o){super(o,Gb),this.gradientVersion=0,xg||(xg=new NL(Gb.paint.properties["line-width"].specification),xg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(o){if(o==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(p){return p._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof Sc,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(o,h){super.recalculate(o,h),this.paint._values["line-floorwidth"]=xg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,o)}createBucket(o){return new a0(o)}queryRadius(o){const h=o,p=qb(Qp("line-width",this,h),Qp("line-gap-width",this,h)),_=Qp("line-offset",this,h);return p/2+Math.abs(_)+dg(this.paint.get("line-translate"))}queryIntersectsFeature(o,h,p,_,x,w,I){const P=mg(o,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),w.angle,I),D=I/2*qb(this.paint.get("line-width").evaluate(h,p),this.paint.get("line-gap-width").evaluate(h,p)),O=this.paint.get("line-offset").evaluate(h,p);return O&&(_=function(B,W){const X=[];for(let K=0;K=3){for(let pe=0;pe0?o+2*u:u}const zL=ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),FL=ei([{name:"a_projected_pos",components:3,type:"Float32"}],4);ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const BL=ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ei([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Wb=ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VL=ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function UL(u,o,h){return u.sections.forEach(p=>{p.text=function(_,x,w){const I=x.layout.get("text-transform").evaluate(w,{});return I==="uppercase"?_=_.toLocaleUpperCase():I==="lowercase"&&(_=_.toLocaleLowerCase()),al.applyArabicShaping&&(_=al.applyArabicShaping(_)),_}(p.text,o,h)}),u}ei([{name:"triangle",components:3,type:"Uint16"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ei([{type:"Float32",name:"offsetX"}]),ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ei([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const ld={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var yi=24,Hb=tr,Zb=function(u,o,h,p,_){var x,w,I=8*_-p-1,P=(1<>1,O=-7,B=h?_-1:0,W=h?-1:1,X=u[o+B];for(B+=W,x=X&(1<<-O)-1,X>>=-O,O+=I;O>0;x=256*x+u[o+B],B+=W,O-=8);for(w=x&(1<<-O)-1,x>>=-O,O+=p;O>0;w=256*w+u[o+B],B+=W,O-=8);if(x===0)x=1-D;else{if(x===P)return w?NaN:1/0*(X?-1:1);w+=Math.pow(2,p),x-=D}return(X?-1:1)*w*Math.pow(2,x-p)},Xb=function(u,o,h,p,_,x){var w,I,P,D=8*x-_-1,O=(1<>1,W=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,X=p?0:x-1,K=p?1:-1,re=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(I=isNaN(o)?1:0,w=O):(w=Math.floor(Math.log(o)/Math.LN2),o*(P=Math.pow(2,-w))<1&&(w--,P*=2),(o+=w+B>=1?W/P:W*Math.pow(2,1-B))*P>=2&&(w++,P/=2),w+B>=O?(I=0,w=O):w+B>=1?(I=(o*P-1)*Math.pow(2,_),w+=B):(I=o*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;u[h+X]=255&I,X+=K,I/=256,_-=8);for(w=w<<_|I,D+=_;D>0;u[h+X]=255&w,X+=K,w/=256,D-=8);u[h+X-K]|=128*re};function tr(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}tr.Varint=0,tr.Fixed64=1,tr.Bytes=2,tr.Fixed32=5;var l0=4294967296,Yb=1/l0,Kb=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Yl(u){return u.type===tr.Bytes?u.readVarint()+u.pos:u.pos+1}function af(u,o,h){return h?4294967296*o+(u>>>0):4294967296*(o>>>0)+(u>>>0)}function Jb(u,o,h){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(7*Math.LN2));h.realloc(p);for(var _=h.pos-1;_>=u;_--)h.buf[_+p]=h.buf[_]}function jL(u,o){for(var h=0;h>>8,u[h+2]=o>>>16,u[h+3]=o>>>24}function $b(u,o){return(u[o]|u[o+1]<<8|u[o+2]<<16)+(u[o+3]<<24)}tr.prototype={destroy:function(){this.buf=null},readFields:function(u,o,h){for(h=h||this.length;this.pos>3,x=this.pos;this.type=7&p,u(_,o,this),this.pos===x&&this.skip(p)}return o},readMessage:function(u,o){return this.readFields(u,o,this.readVarint()+this.pos)},readFixed32:function(){var u=wg(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=$b(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=wg(this.buf,this.pos)+wg(this.buf,this.pos+4)*l0;return this.pos+=8,u},readSFixed64:function(){var u=wg(this.buf,this.pos)+$b(this.buf,this.pos+4)*l0;return this.pos+=8,u},readFloat:function(){var u=Zb(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=Zb(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var o,h,p=this.buf;return o=127&(h=p[this.pos++]),h<128?o:(o|=(127&(h=p[this.pos++]))<<7,h<128?o:(o|=(127&(h=p[this.pos++]))<<14,h<128?o:(o|=(127&(h=p[this.pos++]))<<21,h<128?o:function(_,x,w){var I,P,D=w.buf;if(I=(112&(P=D[w.pos++]))>>4,P<128||(I|=(127&(P=D[w.pos++]))<<3,P<128)||(I|=(127&(P=D[w.pos++]))<<10,P<128)||(I|=(127&(P=D[w.pos++]))<<17,P<128)||(I|=(127&(P=D[w.pos++]))<<24,P<128)||(I|=(1&(P=D[w.pos++]))<<31,P<128))return af(_,I,x);throw new Error("Expected varint not more than 10 bytes")}(o|=(15&(h=p[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var u=this.readVarint()+this.pos,o=this.pos;return this.pos=u,u-o>=12&&Kb?function(h,p,_){return Kb.decode(h.subarray(p,_))}(this.buf,o,u):function(h,p,_){for(var x="",w=p;w<_;){var I,P,D,O=h[w],B=null,W=O>239?4:O>223?3:O>191?2:1;if(w+W>_)break;W===1?O<128&&(B=O):W===2?(192&(I=h[w+1]))==128&&(B=(31&O)<<6|63&I)<=127&&(B=null):W===3?(P=h[w+2],(192&(I=h[w+1]))==128&&(192&P)==128&&((B=(15&O)<<12|(63&I)<<6|63&P)<=2047||B>=55296&&B<=57343)&&(B=null)):W===4&&(P=h[w+2],D=h[w+3],(192&(I=h[w+1]))==128&&(192&P)==128&&(192&D)==128&&((B=(15&O)<<18|(63&I)<<12|(63&P)<<6|63&D)<=65535||B>=1114112)&&(B=null)),B===null?(B=65533,W=1):B>65535&&(B-=65536,x+=String.fromCharCode(B>>>10&1023|55296),B=56320|1023&B),x+=String.fromCharCode(B),w+=W}return x}(this.buf,o,u)},readBytes:function(){var u=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,u);return this.pos=u,o},readPackedVarint:function(u,o){if(this.type!==tr.Bytes)return u.push(this.readVarint(o));var h=Yl(this);for(u=u||[];this.pos127;);else if(o===tr.Bytes)this.pos=this.readVarint()+this.pos;else if(o===tr.Fixed32)this.pos+=4;else{if(o!==tr.Fixed64)throw new Error("Unimplemented type: "+o);this.pos+=8}},writeTag:function(u,o){this.writeVarint(u<<3|o)},realloc:function(u){for(var o=this.length||16;o268435455||u<0?function(o,h){var p,_;if(o>=0?(p=o%4294967296|0,_=o/4294967296|0):(_=~(-o/4294967296),4294967295^(p=~(-o%4294967296))?p=p+1|0:(p=0,_=_+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(x,w,I){I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,I.buf[I.pos]=127&(x>>>=7)}(p,0,h),function(x,w){var I=(7&x)<<4;w.buf[w.pos++]|=I|((x>>>=3)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x)))))}(_,h)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(!!u)},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var o=this.pos;this.pos=function(p,_,x){for(var w,I,P=0;P<_.length;P++){if((w=_.charCodeAt(P))>55295&&w<57344){if(!I){w>56319||P+1===_.length?(p[x++]=239,p[x++]=191,p[x++]=189):I=w;continue}if(w<56320){p[x++]=239,p[x++]=191,p[x++]=189,I=w;continue}w=I-55296<<10|w-56320|65536,I=null}else I&&(p[x++]=239,p[x++]=191,p[x++]=189,I=null);w<128?p[x++]=w:(w<2048?p[x++]=w>>6|192:(w<65536?p[x++]=w>>12|224:(p[x++]=w>>18|240,p[x++]=w>>12&63|128),p[x++]=w>>6&63|128),p[x++]=63&w|128)}return x}(this.buf,u,this.pos);var h=this.pos-o;h>=128&&Jb(o,h,this),this.pos=o-1,this.writeVarint(h),this.pos+=h},writeFloat:function(u){this.realloc(4),Xb(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),Xb(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var o=u.length;this.writeVarint(o),this.realloc(o);for(var h=0;h=128&&Jb(h,p,this),this.pos=h-1,this.writeVarint(p),this.pos+=p},writeMessage:function(u,o,h){this.writeTag(u,tr.Bytes),this.writeRawMessage(o,h)},writePackedVarint:function(u,o){o.length&&this.writeMessage(u,jL,o)},writePackedSVarint:function(u,o){o.length&&this.writeMessage(u,GL,o)},writePackedBoolean:function(u,o){o.length&&this.writeMessage(u,HL,o)},writePackedFloat:function(u,o){o.length&&this.writeMessage(u,qL,o)},writePackedDouble:function(u,o){o.length&&this.writeMessage(u,WL,o)},writePackedFixed32:function(u,o){o.length&&this.writeMessage(u,ZL,o)},writePackedSFixed32:function(u,o){o.length&&this.writeMessage(u,XL,o)},writePackedFixed64:function(u,o){o.length&&this.writeMessage(u,YL,o)},writePackedSFixed64:function(u,o){o.length&&this.writeMessage(u,KL,o)},writeBytesField:function(u,o){this.writeTag(u,tr.Bytes),this.writeBytes(o)},writeFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeSFixed64(o)},writeVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeVarint(o)},writeSVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeSVarint(o)},writeStringField:function(u,o){this.writeTag(u,tr.Bytes),this.writeString(o)},writeFloatField:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFloat(o)},writeDoubleField:function(u,o){this.writeTag(u,tr.Fixed64),this.writeDouble(o)},writeBooleanField:function(u,o){this.writeVarintField(u,!!o)}};var u0=d(Hb);const c0=3;function JL(u,o,h){u===1&&h.readMessage($L,o)}function $L(u,o,h){if(u===3){const{id:p,bitmap:_,width:x,height:w,left:I,top:P,advance:D}=h.readMessage(QL,{});o.push({id:p,bitmap:new td({width:x+2*c0,height:w+2*c0},_),metrics:{width:x,height:w,left:I,top:P,advance:D}})}}function QL(u,o,h){u===1?o.id=h.readVarint():u===2?o.bitmap=h.readBytes():u===3?o.width=h.readVarint():u===4?o.height=h.readVarint():u===5?o.left=h.readSVarint():u===6?o.top=h.readSVarint():u===7&&(o.advance=h.readVarint())}const Qb=c0;function ex(u){let o=0,h=0;for(const w of u)o+=w.w*w.h,h=Math.max(h,w.w);u.sort((w,I)=>I.h-w.h);const p=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(o/.95)),h),h:1/0}];let _=0,x=0;for(const w of u)for(let I=p.length-1;I>=0;I--){const P=p[I];if(!(w.w>P.w||w.h>P.h)){if(w.x=P.x,w.y=P.y,x=Math.max(x,w.y+w.h),_=Math.max(_,w.x+w.w),w.w===P.w&&w.h===P.h){const D=p.pop();I=0&&p>=o&&Eg[this.text.charCodeAt(p)];p--)h--;this.text=this.text.substring(o,h),this.sectionIndex=this.sectionIndex.slice(o,h)}substring(o,h){const p=new uf;return p.text=this.text.substring(o,h),p.sectionIndex=this.sectionIndex.slice(o,h),p.sections=this.sections,p}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((o,h)=>Math.max(o,this.sections[h].scale),0)}addTextSection(o,h){this.text+=o.text,this.sections.push(cd.forText(o.scale,o.fontStack||h));const p=this.sections.length-1;for(let _=0;_=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Sg(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K,re){const pe=uf.fromFeature(u,_);let be;B===c.ah.vertical&&pe.verticalizePunctuation();const{processBidirectionalText:Oe,processStyledBidirectionalText:Ee}=al;if(Oe&&pe.sections.length===1){be=[];const et=Oe(pe.toString(),f0(pe,D,x,o,p,X,K));for(const St of et){const kt=new uf;kt.text=St,kt.sections=pe.sections;for(let wt=0;wt0&&Jl>Ho&&(Ho=Jl)}else{const Ds=kt[Cn.fontStack],Xo=Ds&&Ds[Yi];if(Xo&&Xo.rect)Ra=Xo.rect,ia=Xo.metrics;else{const Jl=St[Cn.fontStack],md=Jl&&Jl[Yi];if(!md)continue;ia=md.metrics}Si=(xi-Cn.scale)*yi}oa?(et.verticalizable=!0,po.push({glyph:Yi,imageName:Na,x:mr,y:wr+Si,vertical:oa,scale:Cn.scale,fontStack:Cn.fontStack,sectionIndex:mo,metrics:ia,rect:Ra}),mr+=Kl*Cn.scale+Ut):(po.push({glyph:Yi,imageName:Na,x:mr,y:wr+Si,vertical:oa,scale:Cn.scale,fontStack:Cn.fontStack,sectionIndex:mo,metrics:ia,rect:Ra}),mr+=ia.advance*Cn.scale+Ut)}po.length!==0&&(vi=Math.max(mr-Ut,vi),nP(po,0,po.length-1,Lo,Ho)),mr=0;const Zo=ht*xi+Ho;Ao.lineOffset=Math.max(Ho,fo),wr+=Zo,ds=Math.max(Zo,ds),++di}var Vi;const Xi=wr-ud,{horizontalAlign:Po,verticalAlign:Mo}=p0(Tt);(function(bi,xi,fo,Ao,po,Ho,Zo,wi,Cn){const mo=(xi-fo)*po;let Yi=0;Yi=Ho!==Zo?-wi*Ao-ud:(-Ao*Cn+.5)*Zo;for(const Si of bi)for(const ia of Si.positionedGlyphs)ia.x+=mo,ia.y+=Yi})(et.positionedLines,Lo,Po,Mo,vi,ds,ht,Xi,bt.length),et.top+=-Mo*Xi,et.bottom=et.top+Xi,et.left+=-Po*vi,et.right=et.left+vi}($e,o,h,p,be,w,I,P,B,D,W,re),!function(et){for(const St of et)if(St.positionedGlyphs.length!==0)return!1;return!0}(ke)&&$e}const Eg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},eP={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function nx(u,o,h,p,_,x){if(o.imageName){const w=p[o.imageName];return w?w.displaySize[0]*o.scale*yi/x+_:0}{const w=h[o.fontStack],I=w&&w[u];return I?I.metrics.advance*o.scale+_:0}}function rx(u,o,h,p){const _=Math.pow(u-o,2);return p?u=0;let O=0;for(let W=0;Ww.id),this.index=o.index,this.pixelRatio=o.pixelRatio,this.sourceLayerIndex=o.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Xy([]),this.placementViewportMatrix=Xy([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ax(this.zoom,h["text-size"]),this.iconSizeData=ax(this.zoom,h["icon-size"]);const p=this.layers[0].layout,_=p.get("symbol-sort-key"),x=p.get("symbol-z-order");this.canOverlap=d0(p,"text-overlap","text-allow-overlap")!=="never"||d0(p,"icon-overlap","icon-allow-overlap")!=="never"||p.get("text-ignore-placement")||p.get("icon-ignore-placement"),this.sortFeaturesByKey=x!=="viewport-y"&&!_.isConstant(),this.sortFeaturesByY=(x==="viewport-y"||x==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,p.get("symbol-placement")==="point"&&(this.writingModes=p.get("text-writing-mode").map(w=>c.ah[w])),this.stateDependentLayerIds=this.layers.filter(w=>w.isStateDependent()).map(w=>w.id),this.sourceID=o.sourceID}createArrays(){this.text=new g0(new kr(this.layers,this.zoom,o=>/^text/.test(o))),this.icon=new g0(new kr(this.layers,this.zoom,o=>/^icon/.test(o))),this.glyphOffsetArray=new b,this.lineVertexArray=new C,this.symbolInstances=new g,this.textAnchorOffsets=new A}calculateGlyphDependencies(o,h,p,_,x){for(let w=0;w0)&&(w.value.kind!=="constant"||w.value.value.length>0),O=P.value.kind!=="constant"||!!P.value.value||Object.keys(P.parameters).length>0,B=x.get("symbol-sort-key");if(this.features=[],!D&&!O)return;const W=h.iconDependencies,X=h.glyphDependencies,K=h.availableImages,re=new br(this.zoom);for(const{feature:pe,id:be,index:Oe,sourceLayerIndex:Ee}of o){const ke=_._featureFilter.needGeometry,$e=Xl(pe,ke);if(!_._featureFilter.filter(re,$e,p))continue;let et,St;if(ke||($e.geometry=Zl(pe)),D){const wt=_.getValueAndResolveTokens("text-field",$e,p,K),bt=Vo.factory(wt),ht=this.hasRTLText=this.hasRTLText||sP(bt);(!ht||al.getRTLTextPluginStatus()==="unavailable"||ht&&al.isParsed())&&(et=UL(bt,_,$e))}if(O){const wt=_.getValueAndResolveTokens("icon-image",$e,p,K);St=wt instanceof hs?wt:hs.fromString(wt)}if(!et&&!St)continue;const kt=this.sortFeaturesByKey?B.evaluate($e,{},p):void 0;if(this.features.push({id:be,text:et,icon:St,index:Oe,sourceLayerIndex:Ee,geometry:$e.geometry,properties:pe.properties,type:iP[pe.type],sortKey:kt}),St&&(W[St.name]=!0),et){const wt=w.evaluate($e,{},p).join(","),bt=x.get("text-rotation-alignment")!=="viewport"&&x.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(c.ah.vertical)>=0;for(const ht of et.sections)if(ht.image)W[ht.image.name]=!0;else{const Tt=Au(et.toString()),gt=ht.fontStack||wt,rt=X[gt]=X[gt]||{};this.calculateGlyphDependencies(ht.text,rt,bt,this.allowVerticalPlacement,Tt)}}}x.get("symbol-placement")==="line"&&(this.features=function(pe){const be={},Oe={},Ee=[];let ke=0;function $e(wt){Ee.push(pe[wt]),ke++}function et(wt,bt,ht){const Tt=Oe[wt];return delete Oe[wt],Oe[bt]=Tt,Ee[Tt].geometry[0].pop(),Ee[Tt].geometry[0]=Ee[Tt].geometry[0].concat(ht[0]),Tt}function St(wt,bt,ht){const Tt=be[bt];return delete be[bt],be[wt]=Tt,Ee[Tt].geometry[0].shift(),Ee[Tt].geometry[0]=ht[0].concat(Ee[Tt].geometry[0]),Tt}function kt(wt,bt,ht){const Tt=ht?bt[0][bt[0].length-1]:bt[0][0];return`${wt}:${Tt.x}:${Tt.y}`}for(let wt=0;wtwt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((pe,be)=>pe.sortKey-be.sortKey)}update(o,h,p){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(o,h,this.layers,p),this.icon.programConfigurations.updatePaintArrays(o,h,this.layers,p))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(o){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(o),this.iconCollisionBox.upload(o)),this.text.upload(o,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(o,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(o,h){const p=this.lineVertexArray.length;if(o.segment!==void 0){let _=o.dist(h[o.segment+1]),x=o.dist(h[o.segment]);const w={};for(let I=o.segment+1;I=0;I--)w[I]={x:h[I].x,y:h[I].y,tileUnitDistanceFromAnchor:x},I>0&&(x+=h[I-1].dist(h[I]));for(let I=0;I0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(o,h){const p=o.placedSymbolArray.get(h),_=p.vertexStartIndex+4*p.numGlyphs;for(let x=p.vertexStartIndex;x<_;x+=4)o.indexArray.emplaceBack(x,x+1,x+2),o.indexArray.emplaceBack(x+1,x+2,x+3)}getSortedSymbolIndexes(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(o),p=Math.cos(o),_=[],x=[],w=[];for(let I=0;I_[I]-_[P]||x[P]-x[I]),w}addToSortKeyRanges(o,h){const p=this.sortKeyRanges[this.sortKeyRanges.length-1];p&&p.sortKey===h?p.symbolInstanceEnd=o+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:o,symbolInstanceEnd:o+1})}sortFeatures(o){if(this.sortFeaturesByY&&this.sortedAngle!==o&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const p=this.symbolInstances.get(h);this.featureSortOrder.push(p.featureIndex),[p.rightJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.leftJustifiedTextSymbolIndex].forEach((_,x,w)=>{_>=0&&w.indexOf(_)===x&&this.addIndicesForPlacedSymbol(this.text,_)}),p.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,p.verticalPlacedTextSymbolIndex),p.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.placedIconSymbolIndex),p.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let lx,ux;Ct("SymbolBucket",cf,{omit:["layers","collisionBoxArray","features","compareText"]}),cf.MAX_GLYPHS=65535,cf.addDynamicAttributes=m0;var y0={get paint(){return ux=ux||new Co({"icon-opacity":new Gt(Re.paint_symbol["icon-opacity"]),"icon-color":new Gt(Re.paint_symbol["icon-color"]),"icon-halo-color":new Gt(Re.paint_symbol["icon-halo-color"]),"icon-halo-width":new Gt(Re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Gt(Re.paint_symbol["icon-halo-blur"]),"icon-translate":new Nt(Re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nt(Re.paint_symbol["icon-translate-anchor"]),"text-opacity":new Gt(Re.paint_symbol["text-opacity"]),"text-color":new Gt(Re.paint_symbol["text-color"],{runtimeType:Hr,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new Gt(Re.paint_symbol["text-halo-color"]),"text-halo-width":new Gt(Re.paint_symbol["text-halo-width"]),"text-halo-blur":new Gt(Re.paint_symbol["text-halo-blur"]),"text-translate":new Nt(Re.paint_symbol["text-translate"]),"text-translate-anchor":new Nt(Re.paint_symbol["text-translate-anchor"])})},get layout(){return lx=lx||new Co({"symbol-placement":new Nt(Re.layout_symbol["symbol-placement"]),"symbol-spacing":new Nt(Re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nt(Re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Gt(Re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nt(Re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nt(Re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Nt(Re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Nt(Re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nt(Re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nt(Re.layout_symbol["icon-rotation-alignment"]),"icon-size":new Gt(Re.layout_symbol["icon-size"]),"icon-text-fit":new Nt(Re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nt(Re.layout_symbol["icon-text-fit-padding"]),"icon-image":new Gt(Re.layout_symbol["icon-image"]),"icon-rotate":new Gt(Re.layout_symbol["icon-rotate"]),"icon-padding":new Gt(Re.layout_symbol["icon-padding"]),"icon-keep-upright":new Nt(Re.layout_symbol["icon-keep-upright"]),"icon-offset":new Gt(Re.layout_symbol["icon-offset"]),"icon-anchor":new Gt(Re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nt(Re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nt(Re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nt(Re.layout_symbol["text-rotation-alignment"]),"text-field":new Gt(Re.layout_symbol["text-field"]),"text-font":new Gt(Re.layout_symbol["text-font"]),"text-size":new Gt(Re.layout_symbol["text-size"]),"text-max-width":new Gt(Re.layout_symbol["text-max-width"]),"text-line-height":new Nt(Re.layout_symbol["text-line-height"]),"text-letter-spacing":new Gt(Re.layout_symbol["text-letter-spacing"]),"text-justify":new Gt(Re.layout_symbol["text-justify"]),"text-radial-offset":new Gt(Re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nt(Re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Gt(Re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Gt(Re.layout_symbol["text-anchor"]),"text-max-angle":new Nt(Re.layout_symbol["text-max-angle"]),"text-writing-mode":new Nt(Re.layout_symbol["text-writing-mode"]),"text-rotate":new Gt(Re.layout_symbol["text-rotate"]),"text-padding":new Nt(Re.layout_symbol["text-padding"]),"text-keep-upright":new Nt(Re.layout_symbol["text-keep-upright"]),"text-transform":new Gt(Re.layout_symbol["text-transform"]),"text-offset":new Gt(Re.layout_symbol["text-offset"]),"text-allow-overlap":new Nt(Re.layout_symbol["text-allow-overlap"]),"text-overlap":new Nt(Re.layout_symbol["text-overlap"]),"text-ignore-placement":new Nt(Re.layout_symbol["text-ignore-placement"]),"text-optional":new Nt(Re.layout_symbol["text-optional"])})}};class cx{constructor(o){if(o.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=o.property.overrides?o.property.overrides.runtimeType:li,this.defaultValue=o}evaluate(o){if(o.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(o.formattedSection))return h.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default}eachChild(o){this.defaultValue.isConstant()||o(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ct("FormatSectionOverride",cx,{omit:["defaultValue"]});class Cg extends Ms{constructor(o){super(o,y0)}recalculate(o,h){if(super.recalculate(o,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const p=this.layout.get("text-writing-mode");if(p){const _=[];for(const x of p)_.indexOf(x)<0&&_.push(x);this.layout._values["text-writing-mode"]=_}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(o,h,p,_){const x=this.layout.get(o).evaluate(h,{},p,_),w=this._unevaluatedLayout._values[o];return w.isDataDriven()||ar(w.value)||!x?x:function(I,P){return P.replace(/{([^{}]+)}/g,(D,O)=>I&&O in I?String(I[O]):"")}(h.properties,x)}createBucket(o){return new cf(o)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const o of y0.paint.overridableProperties){if(!Cg.hasPaintOverride(this.layout,o))continue;const h=this.paint.get(o),p=new cx(h),_=new dr(p,h.property.specification);let x=null;x=h.value.kind==="constant"||h.value.kind==="source"?new kh("source",_):new Lp("composite",_,h.value.zoomStops),this.paint._values[o]=new Ps(h.property,x,h.parameters)}}_handleOverridablePaintPropertyUpdate(o,h,p){return!(!this.layout||h.isDataDriven()||p.isDataDriven())&&Cg.hasPaintOverride(this.layout,o)}static hasPaintOverride(o,h){const p=o.get("text-field"),_=y0.paint.properties[h];let x=!1;const w=I=>{for(const P of I)if(_.overrides&&_.overrides.hasOverride(P))return void(x=!0)};if(p.value.kind==="constant"&&p.value.value instanceof Vo)w(p.value.value.sections);else if(p.value.kind==="source"){const I=D=>{x||(D instanceof nl&&ci(D.value)===$r?w(D.value.sections):D instanceof Mh?w(D.sections):D.eachChild(I))},P=p.value;P._styleExpression&&I(P._styleExpression.expression)}return x}}let hx;var aP={get paint(){return hx=hx||new Co({"background-color":new Nt(Re.paint_background["background-color"]),"background-pattern":new Ac(Re.paint_background["background-pattern"]),"background-opacity":new Nt(Re.paint_background["background-opacity"])})}};class lP extends Ms{constructor(o){super(o,aP)}}let fx;var uP={get paint(){return fx=fx||new Co({"raster-opacity":new Nt(Re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Nt(Re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Nt(Re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Nt(Re.paint_raster["raster-brightness-max"]),"raster-saturation":new Nt(Re.paint_raster["raster-saturation"]),"raster-contrast":new Nt(Re.paint_raster["raster-contrast"]),"raster-resampling":new Nt(Re.paint_raster["raster-resampling"]),"raster-fade-duration":new Nt(Re.paint_raster["raster-fade-duration"])})}};class cP extends Ms{constructor(o){super(o,uP)}}class hP extends Ms{constructor(o){super(o,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=o}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class fP{constructor(o){this._methodToThrottle=o,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const v0=63710088e-1;class Ou{constructor(o,h){if(isNaN(o)||isNaN(h))throw new Error(`Invalid LngLat object: (${o}, ${h})`);if(this.lng=+o,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ou(oe(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(o){const h=Math.PI/180,p=this.lat*h,_=o.lat*h,x=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*h);return v0*Math.acos(Math.min(x,1))}static convert(o){if(o instanceof Ou)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new Ou(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new Ou(Number("lng"in o?o.lng:o.lon),Number(o.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const px=2*Math.PI*v0;function dx(u){return px*Math.cos(u*Math.PI/180)}function mx(u){return(180+u)/360}function gx(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function _x(u,o){return u/dx(o)}function b0(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Tg{constructor(o,h,p=0){this.x=+o,this.y=+h,this.z=+p}static fromLngLat(o,h=0){const p=Ou.convert(o);return new Tg(mx(p.lng),gx(p.lat),_x(h,p.lat))}toLngLat(){return new Ou(360*this.x-180,b0(this.y))}toAltitude(){return this.z*dx(b0(this.y))}meterInMercatorCoordinateUnits(){return 1/px*(o=b0(this.y),1/Math.cos(o*Math.PI/180));var o}}function yx(u,o,h){var p=2*Math.PI*6378137/256/Math.pow(2,h);return[u*p-2*Math.PI*6378137/2,o*p-2*Math.PI*6378137/2]}class x0{constructor(o,h,p){if(o<0||o>25||p<0||p>=Math.pow(2,o)||h<0||h>=Math.pow(2,o))throw new Error(`x=${h}, y=${p}, z=${o} outside of bounds. 0<=x<${Math.pow(2,o)}, 0<=y<${Math.pow(2,o)} 0<=z<=25 `);this.z=o,this.x=h,this.y=p,this.key=fd(0,o,o,h,p)}equals(o){return this.z===o.z&&this.x===o.x&&this.y===o.y}url(o,h,p){const _=(w=this.y,I=this.z,P=yx(256*(x=this.x),256*(w=Math.pow(2,I)-w-1),I),D=yx(256*(x+1),256*(w+1),I),P[0]+","+P[1]+","+D[0]+","+D[1]);var x,w,I,P,D;const O=function(B,W,X){let K,re="";for(let pe=B;pe>0;pe--)K=1<1?"@2x":"").replace(/{quadkey}/g,O).replace(/{bbox-epsg-3857}/g,_)}isChildOf(o){const h=this.z-o.z;return h>0&&o.x===this.x>>h&&o.y===this.y>>h}getTilePoint(o){const h=Math.pow(2,this.z);return new E((o.x*h-this.x)*Zr,(o.y*h-this.y)*Zr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class vx{constructor(o,h){this.wrap=o,this.canonical=h,this.key=fd(o,h.z,h.z,h.x,h.y)}}class ks{constructor(o,h,p,_,x){if(o= z; overscaledZ = ${o}; z = ${p}`);this.overscaledZ=o,this.wrap=h,this.canonical=new x0(p,+_,+x),this.key=fd(h,o,p,_,x)}clone(){return new ks(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)}scaledTo(o){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-o;return o>this.canonical.z?new ks(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ks(o,this.wrap,o,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(o,h){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const p=this.canonical.z-o;return o>this.canonical.z?fd(this.wrap*+h,o,this.canonical.z,this.canonical.x,this.canonical.y):fd(this.wrap*+h,o,o,this.canonical.x>>p,this.canonical.y>>p)}isChildOf(o){if(o.wrap!==this.wrap)return!1;const h=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>h&&o.canonical.y===this.canonical.y>>h}children(o){if(this.overscaledZ>=o)return[new ks(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,p=2*this.canonical.x,_=2*this.canonical.y;return[new ks(h,this.wrap,h,p,_),new ks(h,this.wrap,h,p+1,_),new ks(h,this.wrap,h,p,_+1),new ks(h,this.wrap,h,p+1,_+1)]}isLessThan(o){return this.wrapo.wrap)&&(this.overscaledZo.overscaledZ)&&(this.canonical.xo.canonical.x)&&this.canonical.ythis.max&&(this.max=B),B=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(o+1)}unpack(o,h,p){return o*this.redFactor+h*this.greenFactor+p*this.blueFactor-this.baseShift}getPixels(){return new As({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(o,h,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");let _=h*this.dim,x=h*this.dim+this.dim,w=p*this.dim,I=p*this.dim+this.dim;switch(h){case-1:_=x-1;break;case 1:x=_+1}switch(p){case-1:w=I-1;break;case 1:I=w+1}const P=-h*this.dim,D=-p*this.dim;for(let O=w;O=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${o} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[o]}}class wx{constructor(o,h,p,_,x){this.type="Feature",this._vectorTileFeature=o,o._z=h,o._x=p,o._y=_,this.properties=o.properties,this.id=x}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(o){this._geometry=o}toJSON(){const o={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(o[h]=this[h]);return o}}class Sx{constructor(o,h){this.tileID=o,this.x=o.canonical.x,this.y=o.canonical.y,this.z=o.canonical.z,this.grid=new Lc(Zr,16,0),this.grid3D=new Lc(Zr,16,0),this.featureIndexArray=new V,this.promoteId=h}insert(o,h,p,_,x,w){const I=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(p,_,x);const P=w?this.grid3D:this.grid;for(let D=0;D=0&&B[3]>=0&&P.insert(I,B[0],B[1],B[2],B[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Du.VectorTile(new u0(this.rawTileData)).layers,this.sourceLayerCoder=new xx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(o,h,p,_){this.loadVTLayers();const x=o.params||{},w=Zr/o.tileSize/o.scale,I=Oh(x.filter),P=o.queryGeometry,D=o.queryPadding*w,O=Ix(P),B=this.grid.query(O.minX-D,O.minY-D,O.maxX+D,O.maxY+D),W=Ix(o.cameraQueryGeometry),X=this.grid3D.query(W.minX-D,W.minY-D,W.maxX+D,W.maxY+D,(pe,be,Oe,Ee)=>function(ke,$e,et,St,kt){for(const bt of ke)if($e<=bt.x&&et<=bt.y&&St>=bt.x&&kt>=bt.y)return!0;const wt=[new E($e,et),new E($e,kt),new E(St,kt),new E(St,et)];if(ke.length>2){for(const bt of wt)if(nf(ke,bt))return!0}for(let bt=0;bt(Ee||(Ee=Zl(ke)),$e.queryIntersectsFeature(P,ke,et,Ee,this.z,o.transform,w,o.pixelPosMatrix)))}return K}loadMatchingFeature(o,h,p,_,x,w,I,P,D,O,B){const W=this.bucketLayerIDs[h];if(w&&!function(pe,be){for(let Oe=0;Oe=0)return!0;return!1}(w,W))return;const X=this.sourceLayerCoder.decode(p),K=this.vtLayers[X].feature(_);if(x.needGeometry){const pe=Xl(K,!0);if(!x.filter(new br(this.tileID.overscaledZ),pe,this.tileID.canonical))return}else if(!x.filter(new br(this.tileID.overscaledZ),K))return;const re=this.getId(K,X);for(let pe=0;pe{const I=o instanceof Mc?o.get(w):null;return I&&I.evaluate?I.evaluate(h,p,_):I})}function Ix(u){let o=1/0,h=1/0,p=-1/0,_=-1/0;for(const x of u)o=Math.min(o,x.x),h=Math.min(h,x.y),p=Math.max(p,x.x),_=Math.max(_,x.y);return{minX:o,minY:h,maxX:p,maxY:_}}function pP(u,o){return o-u}function Cx(u,o,h,p,_){const x=[];for(let w=0;w=p&&B.x>=p||(O.x>=p?O=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round():B.x>=p&&(B=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round()),O.y>=_&&B.y>=_||(O.y>=_?O=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round():B.y>=_&&(B=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round()),P&&O.equals(P[P.length-1])||(P=[O],x.push(P)),P.push(B)))))}}return x}Ct("FeatureIndex",Sx,{omit:["rawTileData","sourceLayerCoder"]});class zu extends E{constructor(o,h,p,_){super(o,h),this.angle=p,_!==void 0&&(this.segment=_)}clone(){return new zu(this.x,this.y,this.angle,this.segment)}}function Tx(u,o,h,p,_){if(o.segment===void 0||h===0)return!0;let x=o,w=o.segment+1,I=0;for(;I>-h/2;){if(w--,w<0)return!1;I-=u[w].dist(x),x=u[w]}I+=u[w].dist(u[w+1]),w++;const P=[];let D=0;for(;Ip;)D-=P.shift().angleDelta;if(D>_)return!1;w++,I+=O.dist(B)}return!0}function Lx(u){let o=0;for(let h=0;hD){const K=(D-P)/X,re=co.number(B.x,W.x,K),pe=co.number(B.y,W.y,K),be=new zu(re,pe,W.angleTo(B),O);return be._round(),!w||Tx(u,be,I,w,o)?be:void 0}P+=X}}function mP(u,o,h,p,_,x,w,I,P){const D=Px(p,x,w),O=Mx(p,_),B=O*w,W=u[0].x===0||u[0].x===P||u[0].y===0||u[0].y===P;return o-B=0&&ke=0&&$e=0&&W+D<=O){const et=new zu(ke,$e,Oe,K);et._round(),p&&!Tx(u,et,x,p,_)||X.push(et)}}B+=be}return I||X.length||w||(X=Ax(u,B/2,h,p,_,x,w,!0,P)),X}Ct("Anchor",zu);const hf=Wo;function kx(u,o,h,p){const _=[],x=u.image,w=x.pixelRatio,I=x.paddedRect.w-2*hf,P=x.paddedRect.h-2*hf,D=u.right-u.left,O=u.bottom-u.top,B=x.stretchX||[[0,I]],W=x.stretchY||[[0,P]],X=(ht,Tt)=>ht+Tt[1]-Tt[0],K=B.reduce(X,0),re=W.reduce(X,0),pe=I-K,be=P-re;let Oe=0,Ee=K,ke=0,$e=re,et=0,St=pe,kt=0,wt=be;if(x.content&&p){const ht=x.content;Oe=Lg(B,0,ht[0]),ke=Lg(W,0,ht[1]),Ee=Lg(B,ht[0],ht[2]),$e=Lg(W,ht[1],ht[3]),et=ht[0]-Oe,kt=ht[1]-ke,St=ht[2]-ht[0]-Ee,wt=ht[3]-ht[1]-$e}const bt=(ht,Tt,gt,rt)=>{const Ut=Pg(ht.stretch-Oe,Ee,D,u.left),Rt=Mg(ht.fixed-et,St,ht.stretch,K),wn=Pg(Tt.stretch-ke,$e,O,u.top),mr=Mg(Tt.fixed-kt,wt,Tt.stretch,re),wr=Pg(gt.stretch-Oe,Ee,D,u.left),vi=Mg(gt.fixed-et,St,gt.stretch,K),ds=Pg(rt.stretch-ke,$e,O,u.top),Lo=Mg(rt.fixed-kt,wt,rt.stretch,re),di=new E(Ut,wn),Vi=new E(wr,wn),Xi=new E(wr,ds),Po=new E(Ut,ds),Mo=new E(Rt/w,mr/w),bi=new E(vi/w,Lo/w),xi=o*Math.PI/180;if(xi){const po=Math.sin(xi),Ho=Math.cos(xi),Zo=[Ho,-po,po,Ho];di._matMult(Zo),Vi._matMult(Zo),Po._matMult(Zo),Xi._matMult(Zo)}const fo=ht.stretch+ht.fixed,Ao=Tt.stretch+Tt.fixed;return{tl:di,tr:Vi,bl:Po,br:Xi,tex:{x:x.paddedRect.x+hf+fo,y:x.paddedRect.y+hf+Ao,w:gt.stretch+gt.fixed-fo,h:rt.stretch+rt.fixed-Ao},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Mo,pixelOffsetBR:bi,minFontScaleX:St/w/D,minFontScaleY:wt/w/O,isSDF:h}};if(p&&(x.stretchX||x.stretchY)){const ht=Dx(B,pe,K),Tt=Dx(W,be,re);for(let gt=0;gt0&&(K=Math.max(10,K),this.circleDiameter=K)}else{let B=w.top*I-P[0],W=w.bottom*I+P[2],X=w.left*I-P[3],K=w.right*I+P[1];const re=w.collisionPadding;if(re&&(X-=re[0]*I,B-=re[1]*I,K+=re[2]*I,W+=re[3]*I),O){const pe=new E(X,B),be=new E(K,B),Oe=new E(X,W),Ee=new E(K,W),ke=O*Math.PI/180;pe._rotate(ke),be._rotate(ke),Oe._rotate(ke),Ee._rotate(ke),X=Math.min(pe.x,be.x,Oe.x,Ee.x),K=Math.max(pe.x,be.x,Oe.x,Ee.x),B=Math.min(pe.y,be.y,Oe.y,Ee.y),W=Math.max(pe.y,be.y,Oe.y,Ee.y)}o.emplaceBack(h.x,h.y,X,B,K,W,p,_,x)}this.boxEndIndex=o.length}}class gP{constructor(o=[],h=_P){if(this.data=o,this.length=this.data.length,this.compare=h,this.length>0)for(let p=(this.length>>1)-1;p>=0;p--)this._down(p)}push(o){this.data.push(o),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const o=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:h,compare:p}=this,_=h[o];for(;o>0;){const x=o-1>>1,w=h[x];if(p(_,w)>=0)break;h[o]=w,o=x}h[o]=_}_down(o){const{data:h,compare:p}=this,_=this.length>>1,x=h[o];for(;o<_;){let w=1+(o<<1),I=h[w];const P=w+1;if(P=0)break;h[o]=I,o=w}h[o]=x}}function _P(u,o){return uo?1:0}function yP(u,o=1,h=!1){let p=1/0,_=1/0,x=-1/0,w=-1/0;const I=u[0];for(let X=0;Xx)&&(x=K.x),(!X||K.y>w)&&(w=K.y)}const P=Math.min(x-p,w-_);let D=P/2;const O=new gP([],vP);if(P===0)return new E(p,_);for(let X=p;XB.d||!B.d)&&(B=X,h&&console.log("found best %d after %d probes",Math.round(1e4*X.d)/1e4,W)),X.max-B.d<=o||(D=X.h/2,O.push(new ff(X.p.x-D,X.p.y-D,D,u)),O.push(new ff(X.p.x+D,X.p.y-D,D,u)),O.push(new ff(X.p.x-D,X.p.y+D,D,u)),O.push(new ff(X.p.x+D,X.p.y+D,D,u)),W+=4)}return h&&(console.log(`num probes: ${W}`),console.log(`best distance: ${B.d}`)),B.p}function vP(u,o){return o.max-u.max}function ff(u,o,h,p){this.p=new E(u,o),this.h=h,this.d=function(_,x){let w=!1,I=1/0;for(let P=0;P_.y!=K.y>_.y&&_.x<(K.x-X.x)*(_.y-X.y)/(K.y-X.y)+X.x&&(w=!w),I=Math.min(I,gb(_,X,K))}}return(w?1:-1)*Math.sqrt(I)}(this.p,p),this.max=this.d+this.h*Math.SQRT2}var Zi;c.ap=void 0,(Zi=c.ap||(c.ap={}))[Zi.center=1]="center",Zi[Zi.left=2]="left",Zi[Zi.right=3]="right",Zi[Zi.top=4]="top",Zi[Zi.bottom=5]="bottom",Zi[Zi["top-left"]=6]="top-left",Zi[Zi["top-right"]=7]="top-right",Zi[Zi["bottom-left"]=8]="bottom-left",Zi[Zi["bottom-right"]=9]="bottom-right";const Fu=7,w0=Number.POSITIVE_INFINITY;function Rx(u,o){return o[1]!==w0?function(h,p,_){let x=0,w=0;switch(p=Math.abs(p),_=Math.abs(_),h){case"top-right":case"top-left":case"top":w=_-Fu;break;case"bottom-right":case"bottom-left":case"bottom":w=-_+Fu}switch(h){case"top-right":case"bottom-right":case"right":x=-p;break;case"top-left":case"bottom-left":case"left":x=p}return[x,w]}(u,o[0],o[1]):function(h,p){let _=0,x=0;p<0&&(p=0);const w=p/Math.SQRT2;switch(h){case"top-right":case"top-left":x=w-Fu;break;case"bottom-right":case"bottom-left":x=-w+Fu;break;case"bottom":x=-p+Fu;break;case"top":x=p-Fu}switch(h){case"top-right":case"bottom-right":_=-w;break;case"top-left":case"bottom-left":_=w;break;case"left":_=p;break;case"right":_=-p}return[_,x]}(u,o[0])}function Nx(u,o,h){var p;const _=u.layout,x=(p=_.get("text-variable-anchor-offset"))===null||p===void 0?void 0:p.evaluate(o,{},h);if(x){const I=x.values,P=[];for(let D=0;DW*yi);O.startsWith("top")?B[1]-=Fu:O.startsWith("bottom")&&(B[1]+=Fu),P[D+1]=B}return new cs(P)}const w=_.get("text-variable-anchor");if(w){let I;I=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[_.get("text-radial-offset").evaluate(o,{},h)*yi,w0]:_.get("text-offset").evaluate(o,{},h).map(D=>D*yi);const P=[];for(const D of w)P.push(D,Rx(D,I));return new cs(P)}return null}function S0(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function bP(u,o,h,p,_,x,w,I,P,D,O){let B=x.textMaxSize.evaluate(o,{});B===void 0&&(B=w);const W=u.layers[0].layout,X=W.get("icon-offset").evaluate(o,{},O),K=zx(h.horizontal),re=w/24,pe=u.tilePixelRatio*re,be=u.tilePixelRatio*B/24,Oe=u.tilePixelRatio*I,Ee=u.tilePixelRatio*W.get("symbol-spacing"),ke=W.get("text-padding")*u.tilePixelRatio,$e=function(rt,Ut,Rt,wn=1){const mr=rt.get("icon-padding").evaluate(Ut,{},Rt),wr=mr&&mr.values;return[wr[0]*wn,wr[1]*wn,wr[2]*wn,wr[3]*wn]}(W,o,O,u.tilePixelRatio),et=W.get("text-max-angle")/180*Math.PI,St=W.get("text-rotation-alignment")!=="viewport"&&W.get("symbol-placement")!=="point",kt=W.get("icon-rotation-alignment")==="map"&&W.get("symbol-placement")!=="point",wt=W.get("symbol-placement"),bt=Ee/2,ht=W.get("icon-text-fit");let Tt;p&&ht!=="none"&&(u.allowVerticalPlacement&&h.vertical&&(Tt=sx(p,h.vertical,ht,W.get("icon-text-fit-padding"),X,re)),K&&(p=sx(p,K,ht,W.get("icon-text-fit-padding"),X,re)));const gt=(rt,Ut)=>{Ut.x<0||Ut.x>=Zr||Ut.y<0||Ut.y>=Zr||function(Rt,wn,mr,wr,vi,ds,Lo,di,Vi,Xi,Po,Mo,bi,xi,fo,Ao,po,Ho,Zo,wi,Cn,mo,Yi,Si,ia){const Ra=Rt.addToLineVertexArray(wn,mr);let Na,Kl,oa,Ds,Xo=0,Jl=0,md=0,Ux=0,A0=-1,k0=-1;const $l={};let jx=Ur("");if(Rt.allowVerticalPlacement&&wr.vertical){const go=di.layout.get("text-rotate").evaluate(Cn,{},Si)+90;oa=new Ag(Vi,wn,Xi,Po,Mo,wr.vertical,bi,xi,fo,go),Lo&&(Ds=new Ag(Vi,wn,Xi,Po,Mo,Lo,po,Ho,fo,go))}if(vi){const go=di.layout.get("icon-rotate").evaluate(Cn,{}),Rs=di.layout.get("icon-text-fit")!=="none",Bc=kx(vi,go,Yi,Rs),za=Lo?kx(Lo,go,Yi,Rs):void 0;Kl=new Ag(Vi,wn,Xi,Po,Mo,vi,po,Ho,!1,go),Xo=4*Bc.length;const Vc=Rt.iconSizeData;let fl=null;Vc.kind==="source"?(fl=[hl*di.layout.get("icon-size").evaluate(Cn,{})],fl[0]>Nu&&Qe(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${hd}. Reduce your "icon-size".`)):Vc.kind==="composite"&&(fl=[hl*mo.compositeIconSizes[0].evaluate(Cn,{},Si),hl*mo.compositeIconSizes[1].evaluate(Cn,{},Si)],(fl[0]>Nu||fl[1]>Nu)&&Qe(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${hd}. Reduce your "icon-size".`)),Rt.addSymbols(Rt.icon,Bc,fl,wi,Zo,Cn,c.ah.none,wn,Ra.lineStartIndex,Ra.lineLength,-1,Si),A0=Rt.icon.placedSymbolArray.length-1,za&&(Jl=4*za.length,Rt.addSymbols(Rt.icon,za,fl,wi,Zo,Cn,c.ah.vertical,wn,Ra.lineStartIndex,Ra.lineLength,-1,Si),k0=Rt.icon.placedSymbolArray.length-1)}const Gx=Object.keys(wr.horizontal);for(const go of Gx){const Rs=wr.horizontal[go];if(!Na){jx=Ur(Rs.text);const za=di.layout.get("text-rotate").evaluate(Cn,{},Si);Na=new Ag(Vi,wn,Xi,Po,Mo,Rs,bi,xi,fo,za)}const Bc=Rs.positionedLines.length===1;if(md+=Ox(Rt,wn,Rs,ds,di,fo,Cn,Ao,Ra,wr.vertical?c.ah.horizontal:c.ah.horizontalOnly,Bc?Gx:[go],$l,A0,mo,Si),Bc)break}wr.vertical&&(Ux+=Ox(Rt,wn,wr.vertical,ds,di,fo,Cn,Ao,Ra,c.ah.vertical,["vertical"],$l,k0,mo,Si));const SP=Na?Na.boxStartIndex:Rt.collisionBoxArray.length,EP=Na?Na.boxEndIndex:Rt.collisionBoxArray.length,IP=oa?oa.boxStartIndex:Rt.collisionBoxArray.length,CP=oa?oa.boxEndIndex:Rt.collisionBoxArray.length,TP=Kl?Kl.boxStartIndex:Rt.collisionBoxArray.length,LP=Kl?Kl.boxEndIndex:Rt.collisionBoxArray.length,PP=Ds?Ds.boxStartIndex:Rt.collisionBoxArray.length,MP=Ds?Ds.boxEndIndex:Rt.collisionBoxArray.length;let Oa=-1;const Dg=(go,Rs)=>go&&go.circleDiameter?Math.max(go.circleDiameter,Rs):Rs;Oa=Dg(Na,Oa),Oa=Dg(oa,Oa),Oa=Dg(Kl,Oa),Oa=Dg(Ds,Oa);const qx=Oa>-1?1:0;qx&&(Oa*=ia/yi),Rt.glyphOffsetArray.length>=cf.MAX_GLYPHS&&Qe("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Cn.sortKey!==void 0&&Rt.addToSortKeyRanges(Rt.symbolInstances.length,Cn.sortKey);const AP=Nx(di,Cn,Si),[kP,DP]=function(go,Rs){const Bc=go.length,za=Rs==null?void 0:Rs.values;if((za==null?void 0:za.length)>0)for(let Vc=0;Vc=0?$l.right:-1,$l.center>=0?$l.center:-1,$l.left>=0?$l.left:-1,$l.vertical||-1,A0,k0,jx,SP,EP,IP,CP,TP,LP,PP,MP,Xi,md,Ux,Xo,Jl,qx,0,bi,Oa,kP,DP)}(u,Ut,rt,h,p,_,Tt,u.layers[0],u.collisionBoxArray,o.index,o.sourceLayerIndex,u.index,pe,[ke,ke,ke,ke],St,P,Oe,$e,kt,X,o,x,D,O,w)};if(wt==="line")for(const rt of Cx(o.geometry,0,0,Zr,Zr)){const Ut=mP(rt,Ee,et,h.vertical||K,p,24,be,u.overscaling,Zr);for(const Rt of Ut)K&&xP(u,K.text,bt,Rt)||gt(rt,Rt)}else if(wt==="line-center"){for(const rt of o.geometry)if(rt.length>1){const Ut=dP(rt,et,h.vertical||K,p,24,be);Ut&>(rt,Ut)}}else if(o.type==="Polygon")for(const rt of t0(o.geometry,0)){const Ut=yP(rt,16);gt(rt[0],new zu(Ut.x,Ut.y,0))}else if(o.type==="LineString")for(const rt of o.geometry)gt(rt,new zu(rt[0].x,rt[0].y,0));else if(o.type==="Point")for(const rt of o.geometry)for(const Ut of rt)gt([Ut],new zu(Ut.x,Ut.y,0))}function Ox(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K){const re=function(Oe,Ee,ke,$e,et,St,kt,wt){const bt=$e.layout.get("text-rotate").evaluate(St,{})*Math.PI/180,ht=[];for(const Tt of Ee.positionedLines)for(const gt of Tt.positionedGlyphs){if(!gt.rect)continue;const rt=gt.rect||{};let Ut=Qb+1,Rt=!0,wn=1,mr=0;const wr=(et||wt)&>.vertical,vi=gt.metrics.advance*gt.scale/2;if(wt&&Ee.verticalizable&&(mr=Tt.lineOffset/2-(gt.imageName?-(yi-gt.metrics.width*gt.scale)/2:(gt.scale-1)*yi)),gt.imageName){const wi=kt[gt.imageName];Rt=wi.sdf,wn=wi.pixelRatio,Ut=Wo/wn}const ds=et?[gt.x+vi,gt.y]:[0,0];let Lo=et?[0,0]:[gt.x+vi+ke[0],gt.y+ke[1]-mr],di=[0,0];wr&&(di=Lo,Lo=[0,0]);const Vi=gt.metrics.isDoubleResolution?2:1,Xi=(gt.metrics.left-Ut)*gt.scale-vi+Lo[0],Po=(-gt.metrics.top-Ut)*gt.scale+Lo[1],Mo=Xi+rt.w/Vi*gt.scale/wn,bi=Po+rt.h/Vi*gt.scale/wn,xi=new E(Xi,Po),fo=new E(Mo,Po),Ao=new E(Xi,bi),po=new E(Mo,bi);if(wr){const wi=new E(-vi,vi-ud),Cn=-Math.PI/2,mo=yi/2-vi,Yi=new E(5-ud-mo,-(gt.imageName?mo:0)),Si=new E(...di);xi._rotateAround(Cn,wi)._add(Yi)._add(Si),fo._rotateAround(Cn,wi)._add(Yi)._add(Si),Ao._rotateAround(Cn,wi)._add(Yi)._add(Si),po._rotateAround(Cn,wi)._add(Yi)._add(Si)}if(bt){const wi=Math.sin(bt),Cn=Math.cos(bt),mo=[Cn,-wi,wi,Cn];xi._matMult(mo),fo._matMult(mo),Ao._matMult(mo),po._matMult(mo)}const Ho=new E(0,0),Zo=new E(0,0);ht.push({tl:xi,tr:fo,bl:Ao,br:po,tex:rt,writingMode:Ee.writingMode,glyphOffset:ds,sectionIndex:gt.sectionIndex,isSDF:Rt,pixelOffsetTL:Ho,pixelOffsetBR:Zo,minFontScaleX:0,minFontScaleY:0})}return ht}(0,h,I,_,x,w,p,u.allowVerticalPlacement),pe=u.textSizeData;let be=null;pe.kind==="source"?(be=[hl*_.layout.get("text-size").evaluate(w,{})],be[0]>Nu&&Qe(`${u.layerIds[0]}: Value for "text-size" is >= ${hd}. Reduce your "text-size".`)):pe.kind==="composite"&&(be=[hl*X.compositeTextSizes[0].evaluate(w,{},K),hl*X.compositeTextSizes[1].evaluate(w,{},K)],(be[0]>Nu||be[1]>Nu)&&Qe(`${u.layerIds[0]}: Value for "text-size" is >= ${hd}. Reduce your "text-size".`)),u.addSymbols(u.text,re,be,I,x,w,D,o,P.lineStartIndex,P.lineLength,W,K);for(const Oe of O)B[Oe]=u.text.placedSymbolArray.length-1;return 4*re.length}function zx(u){for(const o in u)return u[o];return null}function xP(u,o,h,p){const _=u.compareText;if(o in _){const x=_[o];for(let w=x.length-1;w>=0;w--)if(p.dist(x[w])>4;if(_!==1)throw new Error(`Got v${_} data when expected v1.`);const x=Fx[15&p];if(!x)throw new Error("Unrecognized array type.");const[w]=new Uint16Array(o,2,1),[I]=new Uint32Array(o,4,1);return new E0(I,w,x,o)}constructor(o,h=64,p=Float64Array,_){if(isNaN(o)||o<0)throw new Error(`Unpexpected numItems value: ${o}.`);this.numItems=+o,this.nodeSize=Math.min(Math.max(+h,2),65535),this.ArrayType=p,this.IndexArrayType=o<65536?Uint16Array:Uint32Array;const x=Fx.indexOf(this.ArrayType),w=2*o*this.ArrayType.BYTES_PER_ELEMENT,I=o*this.IndexArrayType.BYTES_PER_ELEMENT,P=(8-I%8)%8;if(x<0)throw new Error(`Unexpected typed array class: ${p}.`);_&&_ instanceof ArrayBuffer?(this.data=_,this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=2*o,this._finished=!0):(this.data=new ArrayBuffer(8+w+I+P),this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+x]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=o)}add(o,h){const p=this._pos>>1;return this.ids[p]=p,this.coords[this._pos++]=o,this.coords[this._pos++]=h,p}finish(){const o=this._pos>>1;if(o!==this.numItems)throw new Error(`Added ${o} items when expected ${this.numItems}.`);return I0(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(o,h,p,_){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:x,coords:w,nodeSize:I}=this,P=[0,x.length-1,0],D=[];for(;P.length;){const O=P.pop()||0,B=P.pop()||0,W=P.pop()||0;if(B-W<=I){for(let pe=W;pe<=B;pe++){const be=w[2*pe],Oe=w[2*pe+1];be>=o&&be<=p&&Oe>=h&&Oe<=_&&D.push(x[pe])}continue}const X=W+B>>1,K=w[2*X],re=w[2*X+1];K>=o&&K<=p&&re>=h&&re<=_&&D.push(x[X]),(O===0?o<=K:h<=re)&&(P.push(W),P.push(X-1),P.push(1-O)),(O===0?p>=K:_>=re)&&(P.push(X+1),P.push(B),P.push(1-O))}return D}within(o,h,p){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_,coords:x,nodeSize:w}=this,I=[0,_.length-1,0],P=[],D=p*p;for(;I.length;){const O=I.pop()||0,B=I.pop()||0,W=I.pop()||0;if(B-W<=w){for(let pe=W;pe<=B;pe++)Vx(x[2*pe],x[2*pe+1],o,h)<=D&&P.push(_[pe]);continue}const X=W+B>>1,K=x[2*X],re=x[2*X+1];Vx(K,re,o,h)<=D&&P.push(_[X]),(O===0?o-p<=K:h-p<=re)&&(I.push(W),I.push(X-1),I.push(1-O)),(O===0?o+p>=K:h+p>=re)&&(I.push(X+1),I.push(B),I.push(1-O))}return P}}function I0(u,o,h,p,_,x){if(_-p<=h)return;const w=p+_>>1;Bx(u,o,w,p,_,x),I0(u,o,h,p,w-1,1-x),I0(u,o,h,w+1,_,1-x)}function Bx(u,o,h,p,_,x){for(;_>p;){if(_-p>600){const D=_-p+1,O=h-p+1,B=Math.log(D),W=.5*Math.exp(2*B/3),X=.5*Math.sqrt(B*W*(D-W)/D)*(O-D/2<0?-1:1);Bx(u,o,h,Math.max(p,Math.floor(h-O*W/D+X)),Math.min(_,Math.floor(h+(D-O)*W/D+X)),x)}const w=o[2*h+x];let I=p,P=_;for(pd(u,o,p,h),o[2*_+x]>w&&pd(u,o,p,_);Iw;)P--}o[2*p+x]===w?pd(u,o,p,P):(P++,pd(u,o,P,_)),P<=h&&(p=P+1),h<=P&&(_=P-1)}}function pd(u,o,h,p){C0(u,h,p),C0(o,2*h,2*p),C0(o,2*h+1,2*p+1)}function C0(u,o,h){const p=u[o];u[o]=u[h],u[h]=p}function Vx(u,o,h,p){const _=u-h,x=o-p;return _*_+x*x}var T0;c.bd=void 0,(T0=c.bd||(c.bd={})).create="create",T0.load="load",T0.fullLoad="fullLoad";let kg=null,dd=[];const L0=1e3/60,P0="loadTime",M0="fullLoadTime",wP={mark(u){performance.mark(u)},frame(u){const o=u;kg!=null&&dd.push(o-kg),kg=o},clearMetrics(){kg=null,dd=[],performance.clearMeasures(P0),performance.clearMeasures(M0);for(const u in c.bd)performance.clearMarks(c.bd[u])},getPerformanceMetrics(){performance.measure(P0,c.bd.create,c.bd.load),performance.measure(M0,c.bd.create,c.bd.fullLoad);const u=performance.getEntriesByName(P0)[0].duration,o=performance.getEntriesByName(M0)[0].duration,h=dd.length,p=1/(dd.reduce((x,w)=>x+w,0)/h/1e3),_=dd.filter(x=>x>L0).reduce((x,w)=>x+(w-L0)/L0,0);return{loadTime:u,fullLoadTime:o,fps:p,percentDroppedFrames:_/(h+_)*100,totalFrames:h}}};c.$=pt,c.A=rf,c.B=function(u){if(je==null){const o=u.navigator?u.navigator.userAgent:null;je=!!u.safari||!(!o||!(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return je},c.C=class{constructor(u,o){this.target=u,this.mapId=o,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new fP(()=>this.process()),this.subscription=function(h,p,_,x){return h.addEventListener(p,_,!1),{unsubscribe:()=>{h.removeEventListener(p,_,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=ct(self)?u:window}registerMessageHandler(u,o){this.messageHandlers[u]=o}sendAsync(u,o){return new Promise((h,p)=>{const _=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_]={resolve:h,reject:p},o&&o.signal.addEventListener("abort",()=>{delete this.resolveRejects[_];const I={id:_,type:"",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(I)},{once:!0});const x=[],w=Object.assign(Object.assign({},u),{id:_,sourceMapId:this.mapId,origin:location.origin,data:Pu(u.data,x)});this.target.postMessage(w,{transfer:x})})}receive(u){const o=u.data,h=o.id;if(!(o.origin!=="file://"&&location.origin!=="file://"&&o.origin!==location.origin||o.targetMapId&&this.mapId!==o.targetMapId)){if(o.type===""){delete this.tasks[h];const p=this.abortControllers[h];return delete this.abortControllers[h],void(p&&p.abort())}if(ct(self)||o.mustQueue)return this.tasks[h]=o,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,o)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),o=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),o&&this.processTask(u,o)}processTask(u,o){return l(this,void 0,void 0,function*(){if(o.type===""){const _=this.resolveRejects[u];return delete this.resolveRejects[u],_?void(o.error?_.reject(Mu(o.error)):_.resolve(Mu(o.data))):void 0}if(!this.messageHandlers[o.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${o.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=Mu(o.data),p=new AbortController;this.abortControllers[u]=p;try{const _=yield this.messageHandlers[o.type](o.sourceMapId,h,p);this.completeTask(u,null,_)}catch(_){this.completeTask(u,_)}})}completeTask(u,o,h){const p=[];delete this.abortControllers[u];const _={id:u,type:"",sourceMapId:this.mapId,origin:location.origin,error:o?Pu(o):null,data:Pu(h,p)};this.target.postMessage(_,{transfer:p})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},c.D=Nt,c.E=en,c.F=function(){var u=new rf(16);return rf!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},c.G=pn,c.H=function(u,o,h){var p,_,x,w,I,P,D,O,B,W,X,K,re=h[0],pe=h[1],be=h[2];return o===u?(u[12]=o[0]*re+o[4]*pe+o[8]*be+o[12],u[13]=o[1]*re+o[5]*pe+o[9]*be+o[13],u[14]=o[2]*re+o[6]*pe+o[10]*be+o[14],u[15]=o[3]*re+o[7]*pe+o[11]*be+o[15]):(_=o[1],x=o[2],w=o[3],I=o[4],P=o[5],D=o[6],O=o[7],B=o[8],W=o[9],X=o[10],K=o[11],u[0]=p=o[0],u[1]=_,u[2]=x,u[3]=w,u[4]=I,u[5]=P,u[6]=D,u[7]=O,u[8]=B,u[9]=W,u[10]=X,u[11]=K,u[12]=p*re+I*pe+B*be+o[12],u[13]=_*re+P*pe+W*be+o[13],u[14]=x*re+D*pe+X*be+o[14],u[15]=w*re+O*pe+K*be+o[15]),u},c.I=h0,c.J=function(u,o,h){var p=h[0],_=h[1],x=h[2];return u[0]=o[0]*p,u[1]=o[1]*p,u[2]=o[2]*p,u[3]=o[3]*p,u[4]=o[4]*_,u[5]=o[5]*_,u[6]=o[6]*_,u[7]=o[7]*_,u[8]=o[8]*x,u[9]=o[9]*x,u[10]=o[10]*x,u[11]=o[11]*x,u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15],u},c.K=bb,c.L=function(u,o){const h={};for(let p=0;p{const o=window.document.createElement("video");return o.muted=!0,new Promise(h=>{o.onloadstart=()=>{h(o)};for(const p of u){const _=window.document.createElement("source");sr(p)||(o.crossOrigin="Anonymous"),_.src=p,o.appendChild(_)}})},c.a3=function(){return ce++},c.a4=y,c.a5=cf,c.a6=Oh,c.a7=Xl,c.a8=br,c.a9=wx,c.aA=Q,c.aB=function(u,o){if(!u)return[{command:"setStyle",args:[o]}];let h=[];try{if(!yn(u.version,o.version))return[{command:"setStyle",args:[o]}];yn(u.center,o.center)||h.push({command:"setCenter",args:[o.center]}),yn(u.zoom,o.zoom)||h.push({command:"setZoom",args:[o.zoom]}),yn(u.bearing,o.bearing)||h.push({command:"setBearing",args:[o.bearing]}),yn(u.pitch,o.pitch)||h.push({command:"setPitch",args:[o.pitch]}),yn(u.sprite,o.sprite)||h.push({command:"setSprite",args:[o.sprite]}),yn(u.glyphs,o.glyphs)||h.push({command:"setGlyphs",args:[o.glyphs]}),yn(u.transition,o.transition)||h.push({command:"setTransition",args:[o.transition]}),yn(u.light,o.light)||h.push({command:"setLight",args:[o.light]}),yn(u.terrain,o.terrain)||h.push({command:"setTerrain",args:[o.terrain]}),yn(u.sky,o.sky)||h.push({command:"setSky",args:[o.sky]});const p={},_=[];(function(w,I,P,D){let O;for(O in I=I||{},w=w||{})Object.prototype.hasOwnProperty.call(w,O)&&(Object.prototype.hasOwnProperty.call(I,O)||Is(O,P,D));for(O in I)Object.prototype.hasOwnProperty.call(I,O)&&(Object.prototype.hasOwnProperty.call(w,O)?yn(w[O],I[O])||(w[O].type==="geojson"&&I[O].type==="geojson"&&tl(w,I,O)?lr(P,{command:"setGeoJSONSourceData",args:[O,I[O].data]}):Ks(O,I,P,D)):Bo(O,I,P))})(u.sources,o.sources,_,p);const x=[];u.layers&&u.layers.forEach(w=>{"source"in w&&p[w.source]?h.push({command:"removeLayer",args:[w.id]}):x.push(w)}),h=h.concat(_),function(w,I,P){I=I||[];const D=(w=w||[]).map(zl),O=I.map(zl),B=w.reduce(Cs,{}),W=I.reduce(Cs,{}),X=D.slice(),K=Object.create(null);let re,pe,be,Oe,Ee;for(let ke=0,$e=0;ke@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,p,_,x)=>{const w=_||x;return o[p]=!w||w.toLowerCase(),""}),o["max-age"]){const h=parseInt(o["max-age"],10);isNaN(h)?delete o["max-age"]:o["max-age"]=h}return o},c.ab=function(u,o){const h=[];for(const p in u)p in o||h.push(p);return h},c.ac=J,c.ad=function(u,o,h){var p=Math.sin(h),_=Math.cos(h),x=o[0],w=o[1],I=o[2],P=o[3],D=o[4],O=o[5],B=o[6],W=o[7];return o!==u&&(u[8]=o[8],u[9]=o[9],u[10]=o[10],u[11]=o[11],u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15]),u[0]=x*_+D*p,u[1]=w*_+O*p,u[2]=I*_+B*p,u[3]=P*_+W*p,u[4]=D*_-x*p,u[5]=O*_-w*p,u[6]=B*_-I*p,u[7]=W*_-P*p,u},c.ae=function(u){var o=new rf(16);return o[0]=u[0],o[1]=u[1],o[2]=u[2],o[3]=u[3],o[4]=u[4],o[5]=u[5],o[6]=u[6],o[7]=u[7],o[8]=u[8],o[9]=u[9],o[10]=u[10],o[11]=u[11],o[12]=u[12],o[13]=u[13],o[14]=u[14],o[15]=u[15],o},c.af=gg,c.ag=function(u,o){let h=0,p=0;if(u.kind==="constant")p=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:_,minZoom:x,maxZoom:w}=u,I=_?J(Hi.interpolationFactor(_,o,x,w),0,1):0;u.kind==="camera"?p=co.number(u.minSize,u.maxSize,I):h=I}return{uSizeT:h,uSize:p}},c.ai=function(u,{uSize:o,uSizeT:h},{lowerSize:p,upperSize:_}){return u.kind==="source"?p/hl:u.kind==="composite"?co.number(p/hl,_/hl,h):o},c.aj=m0,c.ak=function(u,o,h,p){const _=o.y-u.y,x=o.x-u.x,w=p.y-h.y,I=p.x-h.x,P=w*x-I*_;if(P===0)return null;const D=(I*(u.y-h.y)-w*(u.x-h.x))/P;return new E(u.x+D*x,u.y+D*_)},c.al=Cx,c.am=Yp,c.an=Xy,c.ao=yi,c.aq=d0,c.ar=function(u,o){var h=o[0],p=o[1],_=o[2],x=o[3],w=o[4],I=o[5],P=o[6],D=o[7],O=o[8],B=o[9],W=o[10],X=o[11],K=o[12],re=o[13],pe=o[14],be=o[15],Oe=h*I-p*w,Ee=h*P-_*w,ke=h*D-x*w,$e=p*P-_*I,et=p*D-x*I,St=_*D-x*P,kt=O*re-B*K,wt=O*pe-W*K,bt=O*be-X*K,ht=B*pe-W*re,Tt=B*be-X*re,gt=W*be-X*pe,rt=Oe*gt-Ee*Tt+ke*ht+$e*bt-et*wt+St*kt;return rt?(u[0]=(I*gt-P*Tt+D*ht)*(rt=1/rt),u[1]=(_*Tt-p*gt-x*ht)*rt,u[2]=(re*St-pe*et+be*$e)*rt,u[3]=(W*et-B*St-X*$e)*rt,u[4]=(P*bt-w*gt-D*wt)*rt,u[5]=(h*gt-_*bt+x*wt)*rt,u[6]=(pe*ke-K*St-be*Ee)*rt,u[7]=(O*St-W*ke+X*Ee)*rt,u[8]=(w*Tt-I*bt+D*kt)*rt,u[9]=(p*bt-h*Tt-x*kt)*rt,u[10]=(K*et-re*ke+be*Oe)*rt,u[11]=(B*ke-O*et-X*Oe)*rt,u[12]=(I*wt-w*ht-P*kt)*rt,u[13]=(h*ht-p*wt+_*kt)*rt,u[14]=(re*Ee-K*$e-pe*Oe)*rt,u[15]=(O*$e-B*Ee+W*Oe)*rt,u):null},c.as=S0,c.at=p0,c.au=E0,c.av=function(){const u={},o=Re.$version;for(const h in Re.$root){const p=Re.$root[h];if(p.required){let _=null;_=h==="version"?o:p.type==="array"?[]:{},_!=null&&(u[h]=_)}}return u},c.aw=ng,c.ax=zr,c.ay=function(u){u=u.slice();const o=Object.create(null);for(let h=0;hrt*yi)}let wt=w?"center":h.get("text-justify").evaluate(D,{},u.canonical);const bt=h.get("symbol-placement"),ht=bt==="point"?h.get("text-max-width").evaluate(D,{},u.canonical)*yi:0,Tt=()=>{u.bucket.allowVerticalPlacement&&Au(ke)&&(K.vertical=Sg(re,u.glyphMap,u.glyphPositions,u.imagePositions,O,ht,x,St,"left",et,be,c.ah.vertical,!0,bt,W,B))};if(!w&&kt){const gt=new Set;if(wt==="auto")for(let Ut=0;Utl(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const o=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(o)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),c.e=ie,c.f=u=>new Promise((o,h)=>{const p=new Image;p.onload=()=>{o(p),URL.revokeObjectURL(p.src),p.onload=null,window.requestAnimationFrame(()=>{p.src=jt})},p.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new Blob([new Uint8Array(u)],{type:"image/png"});p.src=u.byteLength?URL.createObjectURL(_):jt}),c.g=_n,c.h=(u,o)=>Ln(ie(u,{type:"json"}),o),c.i=ct,c.j=dt,c.k=Ae,c.l=(u,o)=>Ln(ie(u,{type:"arrayBuffer"}),o),c.m=Ln,c.n=function(u){return new u0(u).readFields(JL,[])},c.o=td,c.p=ex,c.q=Co,c.r=qy,c.s=sr,c.t=Lu,c.u=xt,c.v=Re,c.w=Qe,c.x=ql,c.y=function([u,o,h]){return o+=90,o*=Math.PI/180,h*=Math.PI/180,{x:u*Math.cos(o)*Math.sin(h),y:u*Math.sin(o)*Math.sin(h),z:u*Math.cos(h)}},c.z=co}),i("worker",["./shared"],function(c){class l{constructor(q){this.keyCache={},q&&this.replace(q)}replace(q){this._layerConfigs={},this._layers={},this.update(q,[])}update(q,Z){for(const se of q){this._layerConfigs[se.id]=se;const Le=this._layers[se.id]=c.az(se);Le._featureFilter=c.a6(Le.filter),this.keyCache[se.id]&&delete this.keyCache[se.id]}for(const se of Z)delete this.keyCache[se],delete this._layerConfigs[se],delete this._layers[se];this.familiesBySource={};const $=c.bh(Object.values(this._layerConfigs),this.keyCache);for(const se of $){const Le=se.map(Ye=>this._layers[Ye.id]),ee=Le[0];if(ee.visibility==="none")continue;const Pe=ee.source||"";let Se=this.familiesBySource[Pe];Se||(Se=this.familiesBySource[Pe]={});const Ne=ee.sourceLayer||"_geojsonTileLayer";let Ue=Se[Ne];Ue||(Ue=Se[Ne]=[]),Ue.push(Le)}}}class d{constructor(q){const Z={},$=[];for(const Pe in q){const Se=q[Pe],Ne=Z[Pe]={};for(const Ue in Se){const Ye=Se[+Ue];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Je={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};$.push(Je),Ne[Ue]={rect:Je,metrics:Ye.metrics}}}const{w:se,h:Le}=c.p($),ee=new c.o({width:se||1,height:Le||1});for(const Pe in q){const Se=q[Pe];for(const Ne in Se){const Ue=Se[+Ne];if(!Ue||Ue.bitmap.width===0||Ue.bitmap.height===0)continue;const Ye=Z[Pe][Ne].rect;c.o.copy(Ue.bitmap,ee,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},Ue.bitmap)}}this.image=ee,this.positions=Z}}c.bi("GlyphAtlas",d);class v{constructor(q){this.tileID=new c.Q(q.tileID.overscaledZ,q.tileID.wrap,q.tileID.canonical.z,q.tileID.canonical.x,q.tileID.canonical.y),this.uid=q.uid,this.zoom=q.zoom,this.pixelRatio=q.pixelRatio,this.tileSize=q.tileSize,this.source=q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=q.showCollisionBoxes,this.collectResourceTiming=!!q.collectResourceTiming,this.returnDependencies=!!q.returnDependencies,this.promoteId=q.promoteId,this.inFlightDependencies=[]}parse(q,Z,$,se){return c._(this,void 0,void 0,function*(){this.status="parsing",this.data=q,this.collisionBoxArray=new c.a4;const Le=new c.bj(Object.keys(q.layers).sort()),ee=new c.bk(this.tileID,this.promoteId);ee.bucketLayerIDs=[];const Pe={},Se={featureIndex:ee,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:$},Ne=Z.familiesBySource[this.source];for(const dn in Ne){const Fr=q.layers[dn];if(!Fr)continue;Fr.version===1&&c.w(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const mi=Le.encode(dn),uo=[];for(let So=0;So=Li.maxzoom||Li.visibility!=="none"&&(S(So,this.zoom,$),(Pe[Li.id]=Li.createBucket({index:ee.bucketLayerIDs.length,layers:So,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:mi,sourceID:this.source})).populate(uo,Se,this.tileID.canonical),ee.bucketLayerIDs.push(So.map(Js=>Js.id)))}}const Ue=c.aE(Se.glyphDependencies,dn=>Object.keys(dn).map(Number));this.inFlightDependencies.forEach(dn=>dn==null?void 0:dn.abort()),this.inFlightDependencies=[];let Ye=Promise.resolve({});if(Object.keys(Ue).length){const dn=new AbortController;this.inFlightDependencies.push(dn),Ye=se.sendAsync({type:"GG",data:{stacks:Ue,source:this.source,tileID:this.tileID,type:"glyphs"}},dn)}const Je=Object.keys(Se.iconDependencies);let Dt=Promise.resolve({});if(Je.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Dt=se.sendAsync({type:"GI",data:{icons:Je,source:this.source,tileID:this.tileID,type:"icons"}},dn)}const zt=Object.keys(Se.patternDependencies);let Qt=Promise.resolve({});if(zt.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Qt=se.sendAsync({type:"GI",data:{icons:zt,source:this.source,tileID:this.tileID,type:"patterns"}},dn)}const[tn,Pn,er]=yield Promise.all([Ye,Dt,Qt]),vr=new d(tn),ui=new c.bl(Pn,er);for(const dn in Pe){const Fr=Pe[dn];Fr instanceof c.a5?(S(Fr.layers,this.zoom,$),c.bm({bucket:Fr,glyphMap:tn,glyphPositions:vr.positions,imageMap:Pn,imagePositions:ui.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fr.hasPattern&&(Fr instanceof c.bn||Fr instanceof c.bo||Fr instanceof c.bp)&&(S(Fr.layers,this.zoom,$),Fr.addFeatures(Se,this.tileID.canonical,ui.patternPositions))}return this.status="done",{buckets:Object.values(Pe).filter(dn=>!dn.isEmpty()),featureIndex:ee,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:vr.image,imageAtlas:ui,glyphMap:this.returnDependencies?tn:null,iconMap:this.returnDependencies?Pn:null,glyphPositions:this.returnDependencies?vr.positions:null}})}}function S(me,q,Z){const $=new c.a8(q);for(const se of me)se.recalculate($,Z)}class E{constructor(q,Z,$){this.actor=q,this.layerIndex=Z,this.availableImages=$,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const $=yield c.l(q.request,Z);try{return{vectorTile:new c.bq.VectorTile(new c.br($.data)),rawData:$.data,cacheControl:$.cacheControl,expires:$.expires}}catch(se){const Le=new Uint8Array($.data);let ee=`Unable to parse the tile at ${q.request.url}, `;throw ee+=Le[0]===31&&Le[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${se.messge}`,new Error(ee)}})}loadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid,$=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request),se=new v(q);this.loading[Z]=se;const Le=new AbortController;se.abort=Le;try{const ee=yield this.loadVectorTile(q,Le);if(delete this.loading[Z],!ee)return null;const Pe=ee.rawData,Se={};ee.expires&&(Se.expires=ee.expires),ee.cacheControl&&(Se.cacheControl=ee.cacheControl);const Ne={};if($){const Ye=$.finish();Ye&&(Ne.resourceTiming=JSON.parse(JSON.stringify(Ye)))}se.vectorTile=ee.vectorTile;const Ue=se.parse(ee.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Z]=se,this.fetching[Z]={rawTileData:Pe,cacheControl:Se,resourceTiming:Ne};try{const Ye=yield Ue;return c.e({rawTileData:Pe.slice(0)},Ye,Se,Ne)}finally{delete this.fetching[Z]}}catch(ee){throw delete this.loading[Z],se.status="done",this.loaded[Z]=se,ee}})}reloadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const $=this.loaded[Z];if($.showCollisionBoxes=q.showCollisionBoxes,$.status==="parsing"){const se=yield $.parse($.vectorTile,this.layerIndex,this.availableImages,this.actor);let Le;if(this.fetching[Z]){const{rawTileData:ee,cacheControl:Pe,resourceTiming:Se}=this.fetching[Z];delete this.fetching[Z],Le=c.e({rawTileData:ee.slice(0)},se,Pe,Se)}else Le=se;return Le}if($.status==="done"&&$.vectorTile)return $.parse($.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(q){return c._(this,void 0,void 0,function*(){const Z=this.loading,$=q.uid;Z&&Z[$]&&Z[$].abort&&(Z[$].abort.abort(),delete Z[$])})}removeTile(q){return c._(this,void 0,void 0,function*(){this.loaded&&this.loaded[q.uid]&&delete this.loaded[q.uid]})}}class T{constructor(){this.loaded={}}loadTile(q){return c._(this,void 0,void 0,function*(){const{uid:Z,encoding:$,rawImageData:se,redFactor:Le,greenFactor:ee,blueFactor:Pe,baseShift:Se}=q,Ne=se.width+2,Ue=se.height+2,Ye=c.b(se)?new c.R({width:Ne,height:Ue},yield c.bt(se,-1,-1,Ne,Ue)):se,Je=new c.bu(Z,Ye,$,Le,ee,Pe,Se);return this.loaded=this.loaded||{},this.loaded[Z]=Je,Je})}removeTile(q){const Z=this.loaded,$=q.uid;Z&&Z[$]&&delete Z[$]}}function M(me,q){if(me.length!==0){k(me[0],q);for(var Z=1;Z=Math.abs(Pe)?Z-Se+Pe:Pe-Se+Z,Z=Se}Z+$>=0!=!!q&&me.reverse()}var R=c.bv(function me(q,Z){var $,se=q&&q.type;if(se==="FeatureCollection")for($=0;$>31}function it(me,q){for(var Z=me.loadGeometry(),$=me.type,se=0,Le=0,ee=Z.length,Pe=0;Peme},jt=Math.fround||(vt=new Float32Array(1),me=>(vt[0]=+me,vt[0]));var vt;const At=3,Lt=5,rn=6;class xn{constructor(q){this.options=Object.assign(Object.create(Ot),q),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(q){const{log:Z,minZoom:$,maxZoom:se}=this.options;Z&&console.time("total time");const Le=`prepare ${q.length} points`;Z&&console.time(Le),this.points=q;const ee=[];for(let Se=0;Se=$;Se--){const Ne=+Date.now();Pe=this.trees[Se]=this._createTree(this._cluster(Pe,Se)),Z&&console.log("z%d: %d clusters in %dms",Se,Pe.numItems,+Date.now()-Ne)}return Z&&console.timeEnd("total time"),this}getClusters(q,Z){let $=((q[0]+180)%360+360)%360-180;const se=Math.max(-90,Math.min(90,q[1]));let Le=q[2]===180?180:((q[2]+180)%360+360)%360-180;const ee=Math.max(-90,Math.min(90,q[3]));if(q[2]-q[0]>=360)$=-180,Le=180;else if($>Le){const Ye=this.getClusters([$,se,180,ee],Z),Je=this.getClusters([-180,se,Le,ee],Z);return Ye.concat(Je)}const Pe=this.trees[this._limitZoom(Z)],Se=Pe.range(pn($),Yn(ee),pn(Le),Yn(se)),Ne=Pe.data,Ue=[];for(const Ye of Se){const Je=this.stride*Ye;Ue.push(Ne[Je+Lt]>1?fn(Ne,Je,this.clusterProps):this.points[Ne[Je+At]])}return Ue}getChildren(q){const Z=this._getOriginId(q),$=this._getOriginZoom(q),se="No cluster with the specified id.",Le=this.trees[$];if(!Le)throw new Error(se);const ee=Le.data;if(Z*this.stride>=ee.length)throw new Error(se);const Pe=this.options.radius/(this.options.extent*Math.pow(2,$-1)),Se=Le.within(ee[Z*this.stride],ee[Z*this.stride+1],Pe),Ne=[];for(const Ue of Se){const Ye=Ue*this.stride;ee[Ye+4]===q&&Ne.push(ee[Ye+Lt]>1?fn(ee,Ye,this.clusterProps):this.points[ee[Ye+At]])}if(Ne.length===0)throw new Error(se);return Ne}getLeaves(q,Z,$){const se=[];return this._appendLeaves(se,q,Z=Z||10,$=$||0,0),se}getTile(q,Z,$){const se=this.trees[this._limitZoom(q)],Le=Math.pow(2,q),{extent:ee,radius:Pe}=this.options,Se=Pe/ee,Ne=($-Se)/Le,Ue=($+1+Se)/Le,Ye={features:[]};return this._addTileFeatures(se.range((Z-Se)/Le,Ne,(Z+1+Se)/Le,Ue),se.data,Z,$,Le,Ye),Z===0&&this._addTileFeatures(se.range(1-Se/Le,Ne,1,Ue),se.data,Le,$,Le,Ye),Z===Le-1&&this._addTileFeatures(se.range(0,Ne,Se/Le,Ue),se.data,-1,$,Le,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(q){let Z=this._getOriginZoom(q)-1;for(;Z<=this.options.maxZoom;){const $=this.getChildren(q);if(Z++,$.length!==1)break;q=$[0].properties.cluster_id}return Z}_appendLeaves(q,Z,$,se,Le){const ee=this.getChildren(Z);for(const Pe of ee){const Se=Pe.properties;if(Se&&Se.cluster?Le+Se.point_count<=se?Le+=Se.point_count:Le=this._appendLeaves(q,Se.cluster_id,$,se,Le):Le1;let Ue,Ye,Je;if(Ne)Ue=_n(Z,Se,this.clusterProps),Ye=Z[Se],Je=Z[Se+1];else{const Qt=this.points[Z[Se+At]];Ue=Qt.properties;const[tn,Pn]=Qt.geometry.coordinates;Ye=pn(tn),Je=Yn(Pn)}const Dt={type:1,geometry:[[Math.round(this.options.extent*(Ye*Le-$)),Math.round(this.options.extent*(Je*Le-se))]],tags:Ue};let zt;zt=Ne||this.options.generateId?Z[Se+At]:this.points[Z[Se+At]].id,zt!==void 0&&(Dt.id=zt),ee.features.push(Dt)}}_limitZoom(q){return Math.max(this.options.minZoom,Math.min(Math.floor(+q),this.options.maxZoom+1))}_cluster(q,Z){const{radius:$,extent:se,reduce:Le,minPoints:ee}=this.options,Pe=$/(se*Math.pow(2,Z)),Se=q.data,Ne=[],Ue=this.stride;for(let Ye=0;YeZ&&(tn+=Se[er+Lt])}if(tn>Qt&&tn>=ee){let Pn,er=Je*Qt,vr=Dt*Qt,ui=-1;const dn=((Ye/Ue|0)<<5)+(Z+1)+this.points.length;for(const Fr of zt){const mi=Fr*Ue;if(Se[mi+2]<=Z)continue;Se[mi+2]=Z;const uo=Se[mi+Lt];er+=Se[mi]*uo,vr+=Se[mi+1]*uo,Se[mi+4]=dn,Le&&(Pn||(Pn=this._map(Se,Ye,!0),ui=this.clusterProps.length,this.clusterProps.push(Pn)),Le(Pn,this._map(Se,mi)))}Se[Ye+4]=dn,Ne.push(er/tn,vr/tn,1/0,dn,-1,tn),Le&&Ne.push(ui)}else{for(let Pn=0;Pn1)for(const Pn of zt){const er=Pn*Ue;if(!(Se[er+2]<=Z)){Se[er+2]=Z;for(let vr=0;vr>5}_getOriginZoom(q){return(q-this.points.length)%32}_map(q,Z,$){if(q[Z+Lt]>1){const ee=this.clusterProps[q[Z+rn]];return $?Object.assign({},ee):ee}const se=this.points[q[Z+At]].properties,Le=this.options.map(se);return $&&Le===se?Object.assign({},Le):Le}}function fn(me,q,Z){return{type:"Feature",id:me[q+At],properties:_n(me,q,Z),geometry:{type:"Point",coordinates:[($=me[q],360*($-.5)),zr(me[q+1])]}};var $}function _n(me,q,Z){const $=me[q+Lt],se=$>=1e4?`${Math.round($/1e3)}k`:$>=1e3?Math.round($/100)/10+"k":$,Le=me[q+rn],ee=Le===-1?{}:Object.assign({},Z[Le]);return Object.assign(ee,{cluster:!0,cluster_id:me[q+At],point_count:$,point_count_abbreviated:se})}function pn(me){return me/360+.5}function Yn(me){const q=Math.sin(me*Math.PI/180),Z=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return Z<0?0:Z>1?1:Z}function zr(me){const q=(180-360*me)*Math.PI/180;return 360*Math.atan(Math.exp(q))/Math.PI-90}function Ln(me,q,Z,$){for(var se,Le=$,ee=Z-q>>1,Pe=Z-q,Se=me[q],Ne=me[q+1],Ue=me[Z],Ye=me[Z+1],Je=q+3;JeLe)se=Je,Le=Dt;else if(Dt===Le){var zt=Math.abs(Je-ee);zt$&&(se-q>3&&Ln(me,q,se,$),me[se+2]=Le,Z-se>3&&Ln(me,se,Z,$))}function sr(me,q,Z,$,se,Le){var ee=se-Z,Pe=Le-$;if(ee!==0||Pe!==0){var Se=((me-Z)*ee+(q-$)*Pe)/(ee*ee+Pe*Pe);Se>1?(Z=se,$=Le):Se>0&&(Z+=ee*Se,$+=Pe*Se)}return(ee=me-Z)*ee+(Pe=q-$)*Pe}function Zn(me,q,Z,$){var se={id:me===void 0?null:me,type:q,geometry:Z,tags:$,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Le){var ee=Le.geometry,Pe=Le.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")te(Le,ee);else if(Pe==="Polygon"||Pe==="MultiLineString")for(var Se=0;Se0&&(ee+=$?(se*Ne-Se*Le)/2:Math.sqrt(Math.pow(Se-se,2)+Math.pow(Ne-Le,2))),se=Se,Le=Ne}var Ue=q.length-3;q[2]=1,Ln(q,0,Ue,Z),q[Ue+2]=1,q.size=Math.abs(ee),q.start=0,q.end=q.size}function Re(me,q,Z,$){for(var se=0;se1?1:Z}function yn(me,q,Z,$,se,Le,ee,Pe){if($/=q,Le>=(Z/=q)&&ee<$)return me;if(ee=$)return null;for(var Se=[],Ne=0;Ne=Z&&zt<$)Se.push(Ue);else if(!(zt=$)){var Qt=[];if(Je==="Point"||Je==="MultiPoint")lr(Ye,Qt,Z,$,se);else if(Je==="LineString")Bo(Ye,Qt,Z,$,se,!1,Pe.lineMetrics);else if(Je==="MultiLineString")Ks(Ye,Qt,Z,$,se,!1);else if(Je==="Polygon")Ks(Ye,Qt,Z,$,se,!0);else if(Je==="MultiPolygon")for(var tn=0;tn=Z&&ee<=$&&(q.push(me[Le]),q.push(me[Le+1]),q.push(me[Le+2]))}}function Bo(me,q,Z,$,se,Le,ee){for(var Pe,Se,Ne=Is(me),Ue=se===0?Bi:zl,Ye=me.start,Je=0;JeZ&&(Se=Ue(Ne,Dt,zt,tn,Pn,Z),ee&&(Ne.start=Ye+Pe*Se)):er>$?vr<$&&(Se=Ue(Ne,Dt,zt,tn,Pn,$),ee&&(Ne.start=Ye+Pe*Se)):tl(Ne,Dt,zt,Qt),vr=Z&&(Se=Ue(Ne,Dt,zt,tn,Pn,Z),ui=!0),vr>$&&er<=$&&(Se=Ue(Ne,Dt,zt,tn,Pn,$),ui=!0),!Le&&ui&&(ee&&(Ne.end=Ye+Pe*Se),q.push(Ne),Ne=Is(me)),ee&&(Ye+=Pe)}var dn=me.length-3;Dt=me[dn],zt=me[dn+1],Qt=me[dn+2],(er=se===0?Dt:zt)>=Z&&er<=$&&tl(Ne,Dt,zt,Qt),dn=Ne.length-3,Le&&dn>=3&&(Ne[dn]!==Ne[0]||Ne[dn+1]!==Ne[1])&&tl(Ne,Ne[0],Ne[1],Ne[2]),Ne.length&&q.push(Ne)}function Is(me){var q=[];return q.size=me.size,q.start=me.start,q.end=me.end,q}function Ks(me,q,Z,$,se,Le){for(var ee=0;eeee.maxX&&(ee.maxX=Ue),Ye>ee.maxY&&(ee.maxY=Ye)}return ee}function li(me,q,Z,$){var se=q.geometry,Le=q.type,ee=[];if(Le==="Point"||Le==="MultiPoint")for(var Pe=0;Pe0&&q.size<(se?ee:$))Z.numPoints+=q.length/3;else{for(var Pe=[],Se=0;Seee)&&(Z.numSimplified++,Pe.push(q[Se]),Pe.push(q[Se+1])),Z.numPoints++;se&&function(Ne,Ue){for(var Ye=0,Je=0,Dt=Ne.length,zt=Dt-2;Je0===Ue)for(Je=0,Dt=Ne.length;Je

24)throw new Error("maxZoom should be in the 0-24 range");if(q.promoteId&&q.generateId)throw new Error("promoteId and generateId cannot be used together.");var $=function(se,Le){var ee=[];if(se.type==="FeatureCollection")for(var Pe=0;Pe1&&console.time("creation"),Je=this.tiles[Ye]=Fl(me,q,Z,$,Se),this.tileCoords.push({z:q,x:Z,y:$}),Ne)){Ne>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",q,Z,$,Je.numFeatures,Je.numPoints,Je.numSimplified),console.timeEnd("creation"));var Dt="z"+q;this.stats[Dt]=(this.stats[Dt]||0)+1,this.total++}if(Je.source=me,se){if(q===Se.maxZoom||q===se)continue;var zt=1<1&&console.time("clipping");var Qt,tn,Pn,er,vr,ui,dn=.5*Se.buffer/Se.extent,Fr=.5-dn,mi=.5+dn,uo=1+dn;Qt=tn=Pn=er=null,vr=yn(me,Ue,Z-dn,Z+mi,0,Je.minX,Je.maxX,Se),ui=yn(me,Ue,Z+Fr,Z+uo,0,Je.minX,Je.maxX,Se),me=null,vr&&(Qt=yn(vr,Ue,$-dn,$+mi,1,Je.minY,Je.maxY,Se),tn=yn(vr,Ue,$+Fr,$+uo,1,Je.minY,Je.maxY,Se),vr=null),ui&&(Pn=yn(ui,Ue,$-dn,$+mi,1,Je.minY,Je.maxY,Se),er=yn(ui,Ue,$+Fr,$+uo,1,Je.minY,Je.maxY,Se),ui=null),Ne>1&&console.timeEnd("clipping"),Pe.push(Qt||[],q+1,2*Z,2*$),Pe.push(tn||[],q+1,2*Z,2*$+1),Pe.push(Pn||[],q+1,2*Z+1,2*$),Pe.push(er||[],q+1,2*Z+1,2*$+1)}}},ln.prototype.getTile=function(me,q,Z){var $=this.options,se=$.extent,Le=$.debug;if(me<0||me>24)return null;var ee=1<1&&console.log("drilling down to z%d-%d-%d",me,q,Z);for(var Se,Ne=me,Ue=q,Ye=Z;!Se&&Ne>0;)Ne--,Ue=Math.floor(Ue/2),Ye=Math.floor(Ye/2),Se=this.tiles[sn(Ne,Ue,Ye)];return Se&&Se.source?(Le>1&&console.log("found parent tile z%d-%d-%d",Ne,Ue,Ye),Le>1&&console.time("drilling down"),this.splitTile(Se.source,Ne,Ue,Ye,me,q,Z),Le>1&&console.timeEnd("drilling down"),this.tiles[Pe]?ls(this.tiles[Pe],se):null):null};class Aa extends E{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const $=q.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const se=this._geoJSONIndex.getTile($.z,$.x,$.y);if(!se)return null;const Le=new class{constructor(Pe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=c.W,this.length=Pe.length,this._features=Pe}feature(Pe){return new class{constructor(Se){this._feature=Se,this.extent=c.W,this.type=Se.type,this.properties=Se.tags,"id"in Se&&!isNaN(Se.id)&&(this.id=parseInt(Se.id,10))}loadGeometry(){if(this._feature.type===1){const Se=[];for(const Ne of this._feature.geometry)Se.push([new c.P(Ne[0],Ne[1])]);return Se}{const Se=[];for(const Ne of this._feature.geometry){const Ue=[];for(const Ye of Ne)Ue.push(new c.P(Ye[0],Ye[1]));Se.push(Ue)}return Se}}toGeoJSON(Se,Ne,Ue){return z.call(this,Se,Ne,Ue)}}(this._features[Pe])}}(se.features);let ee=je(Le);return ee.byteOffset===0&&ee.byteLength===ee.buffer.byteLength||(ee=new Uint8Array(ee)),{vectorTile:Le,rawData:ee.buffer}})}loadData(q){return c._(this,void 0,void 0,function*(){var Z;(Z=this._pendingRequest)===null||Z===void 0||Z.abort();const $=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request);this._pendingRequest=new AbortController;try{let se=yield this.loadGeoJSON(q,this._pendingRequest);if(delete this._pendingRequest,typeof se!="object")throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(R(se,!0),q.filter){const ee=c.by(q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ee.result==="error")throw new Error(ee.value.map(Se=>`${Se.key}: ${Se.message}`).join(", "));se={type:"FeatureCollection",features:se.features.filter(Se=>ee.value.evaluate({zoom:0},Se))}}this._geoJSONIndex=q.cluster?new xn(function({superclusterOptions:ee,clusterProperties:Pe}){if(!Pe||!ee)return ee;const Se={},Ne={},Ue={accumulated:null,zoom:0},Ye={properties:null},Je=Object.keys(Pe);for(const Dt of Je){const[zt,Qt]=Pe[Dt],tn=c.by(Qt),Pn=c.by(typeof zt=="string"?[zt,["accumulated"],["get",Dt]]:zt);Se[Dt]=tn.value,Ne[Dt]=Pn.value}return ee.map=Dt=>{Ye.properties=Dt;const zt={};for(const Qt of Je)zt[Qt]=Se[Qt].evaluate(Ue,Ye);return zt},ee.reduce=(Dt,zt)=>{Ye.properties=zt;for(const Qt of Je)Ue.accumulated=Dt[Qt],Dt[Qt]=Ne[Qt].evaluate(Ue,Ye)},ee}(q)).load(se.features):function(ee,Pe){return new ln(ee,Pe)}(se,q.geojsonVtOptions),this.loaded={};const Le={};if($){const ee=$.finish();ee&&(Le.resourceTiming={},Le.resourceTiming[q.source]=JSON.parse(JSON.stringify(ee)))}return Le}catch(se){if(delete this._pendingRequest,c.bz(se))return{abandoned:!0};throw se}})}reloadTile(q){const Z=this.loaded;return Z&&Z[q.uid]?super.reloadTile(q):this.loadTile(q)}loadGeoJSON(q,Z){return c._(this,void 0,void 0,function*(){const{promoteId:$}=q;if(q.request){const se=yield c.h(q.request,Z);return this._dataUpdateable=us(se.data,$)?on(se.data,$):void 0,se.data}if(typeof q.data=="string")try{const se=JSON.parse(q.data);return this._dataUpdateable=us(se,$)?on(se,$):void 0,se}catch{throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`)}if(!q.dataDiff)throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${q.source}`);return function(se,Le,ee){var Pe,Se,Ne,Ue;if(Le.removeAll&&se.clear(),Le.remove)for(const Ye of Le.remove)se.delete(Ye);if(Le.add)for(const Ye of Le.add){const Je=Hr(Ye,ee);Je!=null&&se.set(Je,Ye)}if(Le.update)for(const Ye of Le.update){let Je=se.get(Ye.id);if(Je==null)continue;const Dt=!Ye.removeAllProperties&&(((Pe=Ye.removeProperties)===null||Pe===void 0?void 0:Pe.length)>0||((Se=Ye.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Ye.newGeometry||Ye.removeAllProperties||Dt)&&(Je=Object.assign({},Je),se.set(Ye.id,Je),Dt&&(Je.properties=Object.assign({},Je.properties))),Ye.newGeometry&&(Je.geometry=Ye.newGeometry),Ye.removeAllProperties)Je.properties={};else if(((Ne=Ye.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0)for(const zt of Ye.removeProperties)Object.prototype.hasOwnProperty.call(Je.properties,zt)&&delete Je.properties[zt];if(((Ue=Ye.addOrUpdateProperties)===null||Ue===void 0?void 0:Ue.length)>0)for(const{key:zt,value:Qt}of Ye.addOrUpdateProperties)Je.properties[zt]=Qt}}(this._dataUpdateable,q.dataDiff,$),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(q){return c._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(q){return this._geoJSONIndex.getClusterExpansionZoom(q.clusterId)}getClusterChildren(q){return this._geoJSONIndex.getChildren(q.clusterId)}getClusterLeaves(q){return this._geoJSONIndex.getLeaves(q.clusterId,q.limit,q.offset)}}class $r{constructor(q){this.self=q,this.actor=new c.C(q),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,$)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=$},this.self.addProtocol=c.bf,this.self.removeProtocol=c.bg,this.self.registerRTLTextPlugin=Z=>{if(c.bA.isParsed())throw new Error("RTL text plugin already registered.");c.bA.setMethods(Z)},this.actor.registerMessageHandler("LDT",(Z,$)=>this._getDEMWorkerSource(Z,$.source).loadTile($)),this.actor.registerMessageHandler("RDT",(Z,$)=>c._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Z,$.source).removeTile($)})),this.actor.registerMessageHandler("GCEZ",(Z,$)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,$.type,$.source).getClusterExpansionZoom($)})),this.actor.registerMessageHandler("GCC",(Z,$)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,$.type,$.source).getClusterChildren($)})),this.actor.registerMessageHandler("GCL",(Z,$)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,$.type,$.source).getClusterLeaves($)})),this.actor.registerMessageHandler("LD",(Z,$)=>this._getWorkerSource(Z,$.type,$.source).loadData($)),this.actor.registerMessageHandler("LT",(Z,$)=>this._getWorkerSource(Z,$.type,$.source).loadTile($)),this.actor.registerMessageHandler("RT",(Z,$)=>this._getWorkerSource(Z,$.type,$.source).reloadTile($)),this.actor.registerMessageHandler("AT",(Z,$)=>this._getWorkerSource(Z,$.type,$.source).abortTile($)),this.actor.registerMessageHandler("RMT",(Z,$)=>this._getWorkerSource(Z,$.type,$.source).removeTile($)),this.actor.registerMessageHandler("RS",(Z,$)=>c._(this,void 0,void 0,function*(){if(!this.workerSources[Z]||!this.workerSources[Z][$.type]||!this.workerSources[Z][$.type][$.source])return;const se=this.workerSources[Z][$.type][$.source];delete this.workerSources[Z][$.type][$.source],se.removeSource!==void 0&&se.removeSource($)})),this.actor.registerMessageHandler("RM",Z=>c._(this,void 0,void 0,function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})),this.actor.registerMessageHandler("SR",(Z,$)=>c._(this,void 0,void 0,function*(){this.referrer=$})),this.actor.registerMessageHandler("SRPS",(Z,$)=>this._syncRTLPluginState(Z,$)),this.actor.registerMessageHandler("IS",(Z,$)=>c._(this,void 0,void 0,function*(){this.self.importScripts($)})),this.actor.registerMessageHandler("SI",(Z,$)=>this._setImages(Z,$)),this.actor.registerMessageHandler("UL",(Z,$)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).update($.layers,$.removedIds)})),this.actor.registerMessageHandler("SL",(Z,$)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).replace($)}))}_setImages(q,Z){return c._(this,void 0,void 0,function*(){this.availableImages[q]=Z;for(const $ in this.workerSources[q]){const se=this.workerSources[q][$];for(const Le in se)se[Le].availableImages=Z}})}_syncRTLPluginState(q,Z){return c._(this,void 0,void 0,function*(){if(c.bA.isParsed())return c.bA.getState();if(Z.pluginStatus!=="loading")return c.bA.setState(Z),Z;const $=Z.pluginURL;if(this.self.importScripts($),c.bA.isParsed()){const se={pluginStatus:"loaded",pluginURL:$};return c.bA.setState(se),se}throw c.bA.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${$}`)})}_getAvailableImages(q){let Z=this.availableImages[q];return Z||(Z=[]),Z}_getLayerIndex(q){let Z=this.layerIndexes[q];return Z||(Z=this.layerIndexes[q]=new l),Z}_getWorkerSource(q,Z,$){if(this.workerSources[q]||(this.workerSources[q]={}),this.workerSources[q][Z]||(this.workerSources[q][Z]={}),!this.workerSources[q][Z][$]){const se={sendAsync:(Le,ee)=>(Le.targetMapId=q,this.actor.sendAsync(Le,ee))};switch(Z){case"vector":this.workerSources[q][Z][$]=new E(se,this._getLayerIndex(q),this._getAvailableImages(q));break;case"geojson":this.workerSources[q][Z][$]=new Aa(se,this._getLayerIndex(q),this._getAvailableImages(q));break;default:this.workerSources[q][Z][$]=new this.externalWorkerSourceTypes[Z](se,this._getLayerIndex(q),this._getAvailableImages(q))}}return this.workerSources[q][Z][$]}_getDEMWorkerSource(q,Z){return this.demWorkerSources[q]||(this.demWorkerSources[q]={}),this.demWorkerSources[q][Z]||(this.demWorkerSources[q][Z]=new T),this.demWorkerSources[q][Z]}}return c.i(self)&&(self.worker=new $r(self)),$r}),i("index",["exports","./shared"],function(c,l){var d="4.1.3";let v,S;const E={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:y=>new Promise((s,f)=>{const m=requestAnimationFrame(s);y.signal.addEventListener("abort",()=>{cancelAnimationFrame(m),f(l.c())})}),getImageData(y,s=0){return this.getImageCanvasContext(y).getImageData(-s,-s,y.width+2*s,y.height+2*s)},getImageCanvasContext(y){const s=window.document.createElement("canvas"),f=s.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return s.width=y.width,s.height=y.height,f.drawImage(y,0,0,y.width,y.height),f},resolveURL:y=>(v||(v=document.createElement("a")),v.href=y,v.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(S==null&&(S=matchMedia("(prefers-reduced-motion: reduce)")),S.matches)}};class T{static testProp(s){if(!T.docStyle)return s[0];for(let f=0;f{window.removeEventListener("click",T.suppressClickInternal,!0)},0)}static getScale(s){const f=s.getBoundingClientRect();return{x:f.width/s.offsetWidth||1,y:f.height/s.offsetHeight||1,boundingClientRect:f}}static getPoint(s,f,m){const g=f.boundingClientRect;return new l.P((m.clientX-g.left)/f.x-s.clientLeft,(m.clientY-g.top)/f.y-s.clientTop)}static mousePos(s,f){const m=T.getScale(s);return T.getPoint(s,m,f)}static touchPos(s,f){const m=[],g=T.getScale(s);for(let b=0;b{s=[],f=0,m=0,g={}},y.addThrottleControl=A=>{const N=m++;return g[N]=A,N},y.removeThrottleControl=A=>{delete g[A],C()},y.getImage=(A,N,V=!0)=>new Promise((j,Y)=>{M.supported&&(A.headers||(A.headers={}),A.headers.accept="image/webp,*/*"),l.e(A,{type:"image"}),s.push({abortController:N,requestParameters:A,supportImageRefresh:V,state:"queued",onError:ue=>{Y(ue)},onSuccess:ue=>{j(ue)}}),C()});const b=A=>l._(this,void 0,void 0,function*(){A.state="running";const{requestParameters:N,supportImageRefresh:V,onError:j,onSuccess:Y,abortController:ue}=A,le=V===!1&&!l.i(self)&&!l.g(N.url)&&(!N.headers||Object.keys(N.headers).reduce((Ie,Be)=>Ie&&Be==="accept",!0));f++;const ge=le?L(N,ue):l.m(N,ue);try{const Ie=yield ge;delete A.abortController,A.state="completed",Ie.data instanceof HTMLImageElement||l.b(Ie.data)?Y(Ie):Ie.data&&Y({data:yield(ne=Ie.data,typeof createImageBitmap=="function"?l.d(ne):l.f(ne)),cacheControl:Ie.cacheControl,expires:Ie.expires})}catch(Ie){delete A.abortController,j(Ie)}finally{f--,C()}var ne}),C=()=>{const A=(()=>{for(const N of Object.keys(g))if(g[N]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let N=f;N0;N++){const V=s.shift();V.abortController.signal.aborted?N--:b(V)}},L=(A,N)=>new Promise((V,j)=>{const Y=new Image,ue=A.url,le=A.credentials;le&&le==="include"?Y.crossOrigin="use-credentials":(le&&le==="same-origin"||!l.s(ue))&&(Y.crossOrigin="anonymous"),N.signal.addEventListener("abort",()=>{Y.src="",j(l.c())}),Y.fetchPriority="high",Y.onload=()=>{Y.onerror=Y.onload=null,V({data:Y})},Y.onerror=()=>{Y.onerror=Y.onload=null,N.signal.aborted||j(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Y.src=ue})}(G||(G={})),G.resetRequestQueue();class H{constructor(s){this._transformRequestFn=s}transformRequest(s,f){return this._transformRequestFn&&this._transformRequestFn(s,f)||{url:s}}normalizeSpriteURL(s,f,m){const g=function(b){const C=b.match(J);if(!C)throw new Error(`Unable to parse URL "${b}"`);return{protocol:C[1],authority:C[2],path:C[3]||"/",params:C[4]?C[4].split("&"):[]}}(s);return g.path+=`${f}${m}`,function(b){const C=b.params.length?`?${b.params.join("&")}`:"";return`${b.protocol}://${b.authority}${b.path}${C}`}(g)}setTransformRequest(s){this._transformRequestFn=s}}const J=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function oe(y){var s=new l.A(3);return s[0]=y[0],s[1]=y[1],s[2]=y[2],s}var ie,ce=function(y,s,f){return y[0]=s[0]-f[0],y[1]=s[1]-f[1],y[2]=s[2]-f[2],y};ie=new l.A(3),l.A!=Float32Array&&(ie[0]=0,ie[1]=0,ie[2]=0);var fe=function(y){var s=y[0],f=y[1];return s*s+f*f};function Te(y){const s=[];if(typeof y=="string")s.push({id:"default",url:y});else if(y&&y.length>0){const f=[];for(const{id:m,url:g}of y){const b=`${m}${g}`;f.indexOf(b)===-1&&(f.push(b),s.push({id:m,url:g}))}}return s}(function(){var y=new l.A(2);l.A!=Float32Array&&(y[0]=0,y[1]=0)})();class Q{constructor(s,f,m,g){this.context=s,this.format=m,this.texture=s.gl.createTexture(),this.update(f,g)}update(s,f,m){const{width:g,height:b}=s,C=!(this.size&&this.size[0]===g&&this.size[1]===b||m),{context:L}=this,{gl:A}=L;if(this.useMipmap=!!(f&&f.useMipmap),A.bindTexture(A.TEXTURE_2D,this.texture),L.pixelStoreUnpackFlipY.set(!1),L.pixelStoreUnpack.set(1),L.pixelStoreUnpackPremultiplyAlpha.set(this.format===A.RGBA&&(!f||f.premultiply!==!1)),C)this.size=[g,b],s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||l.b(s)?A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,A.UNSIGNED_BYTE,s):A.texImage2D(A.TEXTURE_2D,0,this.format,g,b,0,this.format,A.UNSIGNED_BYTE,s.data);else{const{x:N,y:V}=m||{x:0,y:0};s instanceof HTMLImageElement||s instanceof HTMLCanvasElement||s instanceof HTMLVideoElement||s instanceof ImageData||l.b(s)?A.texSubImage2D(A.TEXTURE_2D,0,N,V,A.RGBA,A.UNSIGNED_BYTE,s):A.texSubImage2D(A.TEXTURE_2D,0,N,V,g,b,A.RGBA,A.UNSIGNED_BYTE,s.data)}this.useMipmap&&this.isSizePowerOfTwo()&&A.generateMipmap(A.TEXTURE_2D)}bind(s,f,m){const{context:g}=this,{gl:b}=g;b.bindTexture(b.TEXTURE_2D,this.texture),m!==b.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(m=b.LINEAR),s!==this.filter&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,s),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,m||s),this.filter=s),f!==this.wrap&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,f),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,f),this.wrap=f)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:s}=this.context;s.deleteTexture(this.texture),this.texture=null}}function de(y){const{userImage:s}=y;return!!(s&&s.render&&s.render())&&(y.data.replace(new Uint8Array(s.data.buffer)),!0)}class Qe extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(s){if(this.loaded!==s&&(this.loaded=s,s)){for(const{ids:f,promiseResolve:m}of this.requestors)m(this._getImagesForIds(f));this.requestors=[]}}getImage(s){const f=this.images[s];if(f&&!f.data&&f.spriteData){const m=f.spriteData;f.data=new l.R({width:m.width,height:m.height},m.context.getImageData(m.x,m.y,m.width,m.height).data),f.spriteData=null}return f}addImage(s,f){if(this.images[s])throw new Error(`Image id ${s} already exist, use updateImage instead`);this._validate(s,f)&&(this.images[s]=f)}_validate(s,f){let m=!0;const g=f.data||f.spriteData;return this._validateStretch(f.stretchX,g&&g.width)||(this.fire(new l.j(new Error(`Image "${s}" has invalid "stretchX" value`))),m=!1),this._validateStretch(f.stretchY,g&&g.height)||(this.fire(new l.j(new Error(`Image "${s}" has invalid "stretchY" value`))),m=!1),this._validateContent(f.content,f)||(this.fire(new l.j(new Error(`Image "${s}" has invalid "content" value`))),m=!1),m}_validateStretch(s,f){if(!s)return!0;let m=0;for(const g of s){if(g[0]{let g=!0;if(!this.isLoaded())for(const b of s)this.images[b]||(g=!1);this.isLoaded()||g?f(this._getImagesForIds(s)):this.requestors.push({ids:s,promiseResolve:f})})}_getImagesForIds(s){const f={};for(const m of s){let g=this.getImage(m);g||(this.fire(new l.k("styleimagemissing",{id:m})),g=this.getImage(m)),g?f[m]={data:g.data.clone(),pixelRatio:g.pixelRatio,sdf:g.sdf,version:g.version,stretchX:g.stretchX,stretchY:g.stretchY,content:g.content,hasRenderCallback:!!(g.userImage&&g.userImage.render)}:l.w(`Image "${m}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return f}getPixelSize(){const{width:s,height:f}=this.atlasImage;return{width:s,height:f}}getPattern(s){const f=this.patterns[s],m=this.getImage(s);if(!m)return null;if(f&&f.position.version===m.version)return f.position;if(f)f.position.version=m.version;else{const g={w:m.data.width+2,h:m.data.height+2,x:0,y:0},b=new l.I(g,m);this.patterns[s]={bin:g,position:b}}return this._updatePatternAtlas(),this.patterns[s].position}bind(s){const f=s.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Q(s,this.atlasImage,f.RGBA),this.atlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE)}_updatePatternAtlas(){const s=[];for(const b in this.patterns)s.push(this.patterns[b].bin);const{w:f,h:m}=l.p(s),g=this.atlasImage;g.resize({width:f||1,height:m||1});for(const b in this.patterns){const{bin:C}=this.patterns[b],L=C.x+1,A=C.y+1,N=this.getImage(b).data,V=N.width,j=N.height;l.R.copy(N,g,{x:0,y:0},{x:L,y:A},{width:V,height:j}),l.R.copy(N,g,{x:0,y:j-1},{x:L,y:A-1},{width:V,height:1}),l.R.copy(N,g,{x:0,y:0},{x:L,y:A+j},{width:V,height:1}),l.R.copy(N,g,{x:V-1,y:0},{x:L-1,y:A},{width:1,height:j}),l.R.copy(N,g,{x:0,y:0},{x:L+V,y:A},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(s){for(const f of s){if(this.callbackDispatchedThisFrame[f])continue;this.callbackDispatchedThisFrame[f]=!0;const m=this.getImage(f);m||l.w(`Image with ID: "${f}" was not found`),de(m)&&this.updateImage(f,m)}}}const Me=1e20;function it(y,s,f,m,g,b,C,L,A){for(let N=s;N-1);A++,b[A]=L,C[A]=N,C[A+1]=Me}for(let L=0,A=0;L65535)throw new Error("glyphs > 65535 not supported");if(m.ranges[b])return{stack:s,id:f,glyph:g};if(!this.url)throw new Error("glyphsUrl is not set");if(!m.requests[b]){const L=je.loadGlyphRange(s,b,this.url,this.requestManager);m.requests[b]=L}const C=yield m.requests[b];for(const L in C)this._doesCharSupportLocalGlyph(+L)||(m.glyphs[+L]=C[+L]);return m.ranges[b]=!0,{stack:s,id:f,glyph:C[f]||null}})}_doesCharSupportLocalGlyph(s){return!!this.localIdeographFontFamily&&(l.u["CJK Unified Ideographs"](s)||l.u["Hangul Syllables"](s)||l.u.Hiragana(s)||l.u.Katakana(s))}_tinySDF(s,f,m){const g=this.localIdeographFontFamily;if(!g||!this._doesCharSupportLocalGlyph(m))return;let b=s.tinySDF;if(!b){let L="400";/bold/i.test(f)?L="900":/medium/i.test(f)?L="500":/light/i.test(f)&&(L="200"),b=s.tinySDF=new je.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:g,fontWeight:L})}const C=b.draw(String.fromCharCode(m));return{id:m,bitmap:new l.o({width:C.width||60,height:C.height||60},C.data),metrics:{width:C.glyphWidth/2||24,height:C.glyphHeight/2||24,left:C.glyphLeft/2+.5||0,top:C.glyphTop/2-27.5||-8,advance:C.glyphAdvance/2||24,isDoubleResolution:!0}}}}je.loadGlyphRange=function(y,s,f,m){return l._(this,void 0,void 0,function*(){const g=256*s,b=g+255,C=m.transformRequest(f.replace("{fontstack}",y).replace("{range}",`${g}-${b}`),"Glyphs"),L=yield l.l(C,new AbortController);if(!L||!L.data)throw new Error(`Could not load glyph range. range: ${s}, ${g}-${b}`);const A={};for(const N of l.n(L.data))A[N.id]=N;return A})},je.TinySDF=class{constructor({fontSize:y=24,buffer:s=3,radius:f=8,cutoff:m=.25,fontFamily:g="sans-serif",fontWeight:b="normal",fontStyle:C="normal"}={}){this.buffer=s,this.cutoff=m,this.radius=f;const L=this.size=y+4*s,A=this._createCanvas(L),N=this.ctx=A.getContext("2d",{willReadFrequently:!0});N.font=`${C} ${b} ${y}px ${g}`,N.textBaseline="alphabetic",N.textAlign="left",N.fillStyle="black",this.gridOuter=new Float64Array(L*L),this.gridInner=new Float64Array(L*L),this.f=new Float64Array(L),this.z=new Float64Array(L+1),this.v=new Uint16Array(L)}_createCanvas(y){const s=document.createElement("canvas");return s.width=s.height=y,s}draw(y){const{width:s,actualBoundingBoxAscent:f,actualBoundingBoxDescent:m,actualBoundingBoxLeft:g,actualBoundingBoxRight:b}=this.ctx.measureText(y),C=Math.ceil(f),L=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(b-g))),A=Math.min(this.size-this.buffer,C+Math.ceil(m)),N=L+2*this.buffer,V=A+2*this.buffer,j=Math.max(N*V,0),Y=new Uint8ClampedArray(j),ue={data:Y,width:N,height:V,glyphWidth:L,glyphHeight:A,glyphTop:C,glyphLeft:0,glyphAdvance:s};if(L===0||A===0)return ue;const{ctx:le,buffer:ge,gridInner:ne,gridOuter:Ie}=this;le.clearRect(ge,ge,L,A),le.fillText(y,ge,ge+C);const Be=le.getImageData(ge,ge,L,A);Ie.fill(Me,0,j),ne.fill(0,0,j);for(let _e=0;_e0?Ke*Ke:0,ne[Ge]=Ke<0?Ke*Ke:0}}it(Ie,0,0,N,V,N,this.f,this.v,this.z),it(ne,ge,ge,L,A,N,this.f,this.v,this.z);for(let _e=0;_e1&&(A=s[++L]);const V=Math.abs(N-A.left),j=Math.abs(N-A.right),Y=Math.min(V,j);let ue;const le=b/m*(g+1);if(A.isDash){const ge=g-Math.abs(le);ue=Math.sqrt(Y*Y+ge*ge)}else ue=g-Math.sqrt(Y*Y+le*le);this.data[C+N]=Math.max(0,Math.min(255,ue+128))}}}addRegularDash(s){for(let L=s.length-1;L>=0;--L){const A=s[L],N=s[L+1];A.zeroLength?s.splice(L,1):N&&N.isDash===A.isDash&&(N.left=A.left,s.splice(L,1))}const f=s[0],m=s[s.length-1];f.isDash===m.isDash&&(f.left=m.left-this.width,m.right=f.right+this.width);const g=this.width*this.nextRow;let b=0,C=s[b];for(let L=0;L1&&(C=s[++b]);const A=Math.abs(L-C.left),N=Math.abs(L-C.right),V=Math.min(A,N);this.data[g+L]=Math.max(0,Math.min(255,(C.isDash?V:-V)+128))}}addDash(s,f){const m=f?7:0,g=2*m+1;if(this.nextRow+g>this.height)return l.w("LineAtlas out of space"),null;let b=0;for(let L=0;L{f.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Lt]}numActive(){return Object.keys(this.active).length}}const xn=Math.floor(E.hardwareConcurrency/2);let fn,_n;function pn(){return fn||(fn=new rn),fn}rn.workerCount=l.B(globalThis)?Math.max(Math.min(xn,3),1):1;class Yn{constructor(s,f){this.workerPool=s,this.actors=[],this.currentActor=0,this.id=f;const m=this.workerPool.acquire(f);for(let g=0;g{f.remove()}),this.actors=[],s&&this.workerPool.release(this.id)}registerMessageHandler(s,f){for(const m of this.actors)m.registerMessageHandler(s,f)}}function zr(){return _n||(_n=new Yn(pn(),l.G),_n.registerMessageHandler("GR",(y,s,f)=>l.m(s,f))),_n}function Ln(y,s){const f=l.F();return l.H(f,f,[1,1,0]),l.J(f,f,[.5*y.width,.5*y.height,1]),l.K(f,f,y.calculatePosMatrix(s.toUnwrapped()))}function sr(y,s,f,m,g,b){const C=function(j,Y,ue){if(j)for(const le of j){const ge=Y[le];if(ge&&ge.source===ue&&ge.type==="fill-extrusion")return!0}else for(const le in Y){const ge=Y[le];if(ge.source===ue&&ge.type==="fill-extrusion")return!0}return!1}(g&&g.layers,s,y.id),L=b.maxPitchScaleFactor(),A=y.tilesIn(m,L,C);A.sort(Zn);const N=[];for(const j of A)N.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(s,f,y._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,g,b,L,Ln(y.transform,j.tileID))});const V=function(j){const Y={},ue={};for(const le of j){const ge=le.queryResults,ne=le.wrappedTileID,Ie=ue[ne]=ue[ne]||{};for(const Be in ge){const _e=ge[Be],De=Ie[Be]=Ie[Be]||{},Ve=Y[Be]=Y[Be]||[];for(const Ge of _e)De[Ge.featureIndex]||(De[Ge.featureIndex]=!0,Ve.push(Ge))}}return Y}(N);for(const j in V)V[j].forEach(Y=>{const ue=Y.feature,le=y.getFeatureState(ue.layer["source-layer"],ue.id);ue.source=ue.layer.source,ue.layer["source-layer"]&&(ue.sourceLayer=ue.layer["source-layer"]),ue.state=le});return V}function Zn(y,s){const f=y.tileID,m=s.tileID;return f.overscaledZ-m.overscaledZ||f.canonical.y-m.canonical.y||f.wrap-m.wrap||f.canonical.x-m.canonical.x}function te(y,s,f){return l._(this,void 0,void 0,function*(){let m=y;if(y.url?m=(yield l.h(s.transformRequest(y.url,"Source"),f)).data:yield E.frameAsync(f),!m)return null;const g=l.L(l.e(m,y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in m&&m.vector_layers&&(g.vectorLayerIds=m.vector_layers.map(b=>b.id)),g})}class Ae{constructor(s,f){s&&(f?this.setSouthWest(s).setNorthEast(f):Array.isArray(s)&&(s.length===4?this.setSouthWest([s[0],s[1]]).setNorthEast([s[2],s[3]]):this.setSouthWest(s[0]).setNorthEast(s[1])))}setNorthEast(s){return this._ne=s instanceof l.M?new l.M(s.lng,s.lat):l.M.convert(s),this}setSouthWest(s){return this._sw=s instanceof l.M?new l.M(s.lng,s.lat):l.M.convert(s),this}extend(s){const f=this._sw,m=this._ne;let g,b;if(s instanceof l.M)g=s,b=s;else{if(!(s instanceof Ae))return Array.isArray(s)?s.length===4||s.every(Array.isArray)?this.extend(Ae.convert(s)):this.extend(l.M.convert(s)):s&&("lng"in s||"lon"in s)&&"lat"in s?this.extend(l.M.convert(s)):this;if(g=s._sw,b=s._ne,!g||!b)return this}return f||m?(f.lng=Math.min(g.lng,f.lng),f.lat=Math.min(g.lat,f.lat),m.lng=Math.max(b.lng,m.lng),m.lat=Math.max(b.lat,m.lat)):(this._sw=new l.M(g.lng,g.lat),this._ne=new l.M(b.lng,b.lat)),this}getCenter(){return new l.M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.M(this.getWest(),this.getNorth())}getSouthEast(){return new l.M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(s){const{lng:f,lat:m}=l.M.convert(s);let g=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(g=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&g}static convert(s){return s instanceof Ae?s:s&&new Ae(s)}static fromLngLat(s,f=0){const m=360*f/40075017,g=m/Math.cos(Math.PI/180*s.lat);return new Ae(new l.M(s.lng-g,s.lat-m),new l.M(s.lng+g,s.lat+m))}}class dt{constructor(s,f,m){this.bounds=Ae.convert(this.validateBounds(s)),this.minzoom=f||0,this.maxzoom=m||24}validateBounds(s){return Array.isArray(s)&&s.length===4?[Math.max(-180,s[0]),Math.max(-90,s[1]),Math.min(180,s[2]),Math.min(90,s[3])]:[-180,-90,180,90]}contains(s){const f=Math.pow(2,s.z),m=Math.floor(l.N(this.bounds.getWest())*f),g=Math.floor(l.O(this.bounds.getNorth())*f),b=Math.ceil(l.N(this.bounds.getEast())*f),C=Math.ceil(l.O(this.bounds.getSouth())*f);return s.x>=m&&s.x=g&&s.y{this._options.tiles=s}),this}setUrl(s){return this.setSourceProperty(()=>{this.url=s,this._options.url=s}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(s){return l._(this,void 0,void 0,function*(){const f=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m={request:this.map._requestManager.transformRequest(f,"Tile"),uid:s.uid,tileID:s.tileID,zoom:s.tileID.overscaledZ,tileSize:this.tileSize*s.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};m.request.collectResourceTiming=this._collectResourceTiming;let g="RT";if(s.actor&&s.state!=="expired"){if(s.state==="loading")return new Promise((b,C)=>{s.reloadPromise={resolve:b,reject:C}})}else s.actor=this.dispatcher.getActor(),g="LT";s.abortController=new AbortController;try{const b=yield s.actor.sendAsync({type:g,data:m},s.abortController);if(delete s.abortController,s.aborted)return;this._afterTileLoadWorkerResponse(s,b)}catch(b){if(delete s.abortController,s.aborted)return;if(b&&b.status!==404)throw b;this._afterTileLoadWorkerResponse(s,null)}})}_afterTileLoadWorkerResponse(s,f){if(f&&f.resourceTiming&&(s.resourceTiming=f.resourceTiming),f&&this.map._refreshExpiredTiles&&s.setExpiryData(f),s.loadVectorData(f,this.map.painter),s.reloadPromise){const m=s.reloadPromise;s.reloadPromise=null,this.loadTile(s).then(m.resolve).catch(m.reject)}}abortTile(s){return l._(this,void 0,void 0,function*(){s.abortController&&(s.abortController.abort(),delete s.abortController),s.actor&&(yield s.actor.sendAsync({type:"AT",data:{uid:s.uid,type:this.type,source:this.id}}))})}unloadTile(s){return l._(this,void 0,void 0,function*(){s.unloadVectorData(),s.actor&&(yield s.actor.sendAsync({type:"RMT",data:{uid:s.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Re extends l.E{constructor(s,f,m,g){super(),this.id=s,this.dispatcher=m,this.setEventedParent(g),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},f),l.e(this,l.L(f,["url","scheme","tileSize"]))}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const s=yield te(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,s&&(l.e(this,s),s.bounds&&(this.tileBounds=new dt(s.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(s){this._tileJSONRequest=null,this.fire(new l.j(s))}})}loaded(){return this._loaded}onAdd(s){this.map=s,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(s){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),s(),this.load()}setTiles(s){return this.setSourceProperty(()=>{this._options.tiles=s}),this}setUrl(s){return this.setSourceProperty(()=>{this.url=s,this._options.url=s}),this}serialize(){return l.e({},this._options)}hasTile(s){return!this.tileBounds||this.tileBounds.contains(s.canonical)}loadTile(s){return l._(this,void 0,void 0,function*(){const f=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);s.abortController=new AbortController;try{const m=yield G.getImage(this.map._requestManager.transformRequest(f,"Tile"),s.abortController,this.map._refreshExpiredTiles);if(delete s.abortController,s.aborted)return void(s.state="unloaded");if(m&&m.data){this.map._refreshExpiredTiles&&m.cacheControl&&m.expires&&s.setExpiryData({cacheControl:m.cacheControl,expires:m.expires});const g=this.map.painter.context,b=g.gl,C=m.data;s.texture=this.map.painter.getTileTexture(C.width),s.texture?s.texture.update(C,{useMipmap:!0}):(s.texture=new Q(g,C,b.RGBA,{useMipmap:!0}),s.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&b.texParameterf(b.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),s.state="loaded"}}catch(m){if(delete s.abortController,s.aborted)s.state="unloaded";else if(m)throw s.state="errored",m}})}abortTile(s){return l._(this,void 0,void 0,function*(){s.abortController&&(s.abortController.abort(),delete s.abortController)})}unloadTile(s){return l._(this,void 0,void 0,function*(){s.texture&&this.map.painter.saveTileTexture(s.texture)})}hasTransition(){return!1}}class It extends Re{constructor(s,f,m,g){super(s,f,m,g),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},f),this.encoding=f.encoding||"mapbox",this.redFactor=f.redFactor,this.greenFactor=f.greenFactor,this.blueFactor=f.blueFactor,this.baseShift=f.baseShift}loadTile(s){return l._(this,void 0,void 0,function*(){const f=s.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m=this.map._requestManager.transformRequest(f,"Tile");s.neighboringTiles=this._getNeighboringTiles(s.tileID),s.abortController=new AbortController;try{const g=yield G.getImage(m,s.abortController,this.map._refreshExpiredTiles);if(delete s.abortController,s.aborted)return void(s.state="unloaded");if(g&&g.data){const b=g.data;this.map._refreshExpiredTiles&&g.cacheControl&&g.expires&&s.setExpiryData({cacheControl:g.cacheControl,expires:g.expires});const C=l.b(b)&&l.S()?b:yield this.readImageNow(b),L={type:this.type,uid:s.uid,source:this.id,rawImageData:C,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!s.actor||s.state==="expired"){s.actor=this.dispatcher.getActor();const A=yield s.actor.sendAsync({type:"LDT",data:L});s.dem=A,s.needsHillshadePrepare=!0,s.needsTerrainPrepare=!0,s.state="loaded"}}}catch(g){if(delete s.abortController,s.aborted)s.state="unloaded";else if(g)throw s.state="errored",g}})}readImageNow(s){return l._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&l.U()){const f=s.width+2,m=s.height+2;try{return new l.R({width:f,height:m},yield l.V(s,-1,-1,f,m))}catch{}}return E.getImageData(s,1)})}_getNeighboringTiles(s){const f=s.canonical,m=Math.pow(2,f.z),g=(f.x-1+m)%m,b=f.x===0?s.wrap-1:s.wrap,C=(f.x+1+m)%m,L=f.x+1===m?s.wrap+1:s.wrap,A={};return A[new l.Q(s.overscaledZ,b,f.z,g,f.y).key]={backfilled:!1},A[new l.Q(s.overscaledZ,L,f.z,C,f.y).key]={backfilled:!1},f.y>0&&(A[new l.Q(s.overscaledZ,b,f.z,g,f.y-1).key]={backfilled:!1},A[new l.Q(s.overscaledZ,s.wrap,f.z,f.x,f.y-1).key]={backfilled:!1},A[new l.Q(s.overscaledZ,L,f.z,C,f.y-1).key]={backfilled:!1}),f.y+10&&l.e(b,{resourceTiming:g}),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"metadata"}))),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"content"})))}catch(m){if(this._pendingLoads--,this._removed)return void this.fire(new l.k("dataabort",{dataType:"source"}));this.fire(new l.j(m))}})}loaded(){return this._pendingLoads===0}loadTile(s){return l._(this,void 0,void 0,function*(){const f=s.actor?"RT":"LT";s.actor=this.actor;const m={type:this.type,uid:s.uid,tileID:s.tileID,zoom:s.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};s.abortController=new AbortController;const g=yield this.actor.sendAsync({type:f,data:m},s.abortController);delete s.abortController,s.unloadVectorData(),s.aborted||s.loadVectorData(g,this.map.painter,f==="RT")})}abortTile(s){return l._(this,void 0,void 0,function*(){s.abortController&&(s.abortController.abort(),delete s.abortController),s.aborted=!0})}unloadTile(s){return l._(this,void 0,void 0,function*(){s.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:s.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var yn=l.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class lr extends l.E{constructor(s,f,m,g){super(),this.id=s,this.dispatcher=m,this.coordinates=f.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(g),this.options=f}load(s){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const f=yield G.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,f&&f.data&&(this.image=f.data,s&&(this.coordinates=s),this._finishLoading())}catch(f){this._request=null,this._loaded=!0,this.fire(new l.j(f))}})}loaded(){return this._loaded}updateImage(s){return s.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=s.url,this.load(s.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(s){this.map=s,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(s){this.coordinates=s;const f=s.map(l.Y.fromLngLat);this.tileID=function(g){let b=1/0,C=1/0,L=-1/0,A=-1/0;for(const Y of g)b=Math.min(b,Y.x),C=Math.min(C,Y.y),L=Math.max(L,Y.x),A=Math.max(A,Y.y);const N=Math.max(L-b,A-C),V=Math.max(0,Math.floor(-Math.log(N)/Math.LN2)),j=Math.pow(2,V);return new l.a0(V,Math.floor((b+L)/2*j),Math.floor((C+A)/2*j))}(f),this.minzoom=this.maxzoom=this.tileID.z;const m=f.map(g=>this.tileID.getTilePoint(g)._round());return this._boundsArray=new l.Z,this._boundsArray.emplaceBack(m[0].x,m[0].y,0,0),this._boundsArray.emplaceBack(m[1].x,m[1].y,l.W,0),this._boundsArray.emplaceBack(m[3].x,m[3].y,0,l.W),this._boundsArray.emplaceBack(m[2].x,m[2].y,l.W,l.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const s=this.map.painter.context,f=s.gl;this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Q(s,this.image,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(s){return l._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(s.tileID.canonical)?(this.tiles[String(s.tileID.wrap)]=s,s.buckets={}):s.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Bo extends lr{constructor(s,f,m,g){super(s,f,m,g),this.roundZoom=!0,this.type="video",this.options=f}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1;const s=this.options;this.urls=[];for(const f of s.urls)this.urls.push(this.map._requestManager.transformRequest(f,"Source").url);try{const f=yield l.a2(this.urls);if(this._loaded=!0,!f)return;this.video=f,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(f){this.fire(new l.j(f))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(s){if(this.video){const f=this.video.seekable;sf.end(0)?this.fire(new l.j(new l.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${f.start(0)} and ${f.end(0)}-second mark.`))):this.video.currentTime=s}}getVideo(){return this.video}onAdd(s){this.map||(this.map=s,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const s=this.map.painter.context,f=s.gl;this.boundsBuffer||(this.boundsBuffer=s.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.texSubImage2D(f.TEXTURE_2D,0,0,0,f.RGBA,f.UNSIGNED_BYTE,this.video)):(this.texture=new Q(s,this.video,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Is extends lr{constructor(s,f,m,g){super(s,f,m,g),f.coordinates?Array.isArray(f.coordinates)&&f.coordinates.length===4&&!f.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(C=>typeof C!="number"))||this.fire(new l.j(new l.a1(`sources.${s}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.j(new l.a1(`sources.${s}`,null,'missing required property "coordinates"'))),f.animate&&typeof f.animate!="boolean"&&this.fire(new l.j(new l.a1(`sources.${s}`,null,'optional "animate" property must be a boolean value'))),f.canvas?typeof f.canvas=="string"||f.canvas instanceof HTMLCanvasElement||this.fire(new l.j(new l.a1(`sources.${s}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.j(new l.a1(`sources.${s}`,null,'missing required property "canvas"'))),this.options=f,this.animate=f.animate===void 0||f.animate}load(){return l._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(s){this.map=s,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let s=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,s=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,s=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const f=this.map.painter.context,m=f.gl;this.boundsBuffer||(this.boundsBuffer=f.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?(s||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Q(f,this.canvas,m.RGBA,{premultiply:!0});let g=!1;for(const b in this.tiles){const C=this.tiles[b];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture,g=!0)}g&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const s of[this.canvas.width,this.canvas.height])if(isNaN(s)||s<=0)return!0;return!1}}const Ks={},tl=y=>{switch(y){case"geojson":return In;case"image":return lr;case"raster":return Re;case"raster-dem":return It;case"vector":return en;case"video":return Bo;case"canvas":return Is}return Ks[y]},Bi="RTLPluginLoaded";class zl extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=zr()}_syncState(s){return this.status=s,this.dispatcher.broadcast("SRPS",{pluginStatus:s,pluginURL:this.url}).catch(f=>{throw this.status="error",f})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(s){return l._(this,arguments,void 0,function*(f,m=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=E.resolveURL(f),!this.url)throw new Error(`requested url ${f} is invalid`);if(this.status==="unavailable"){if(!m)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return l._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.k(Bi))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Cs=null;function ot(){return Cs||(Cs=new zl),Cs}class ls{constructor(s,f){this.timeAdded=0,this.fadeEndTime=0,this.tileID=s,this.uid=l.a3(),this.uses=0,this.tileSize=f,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(s){const f=s+this.timeAdded;fb.getLayer(N)).filter(Boolean);if(A.length!==0){L.layers=A,L.stateDependentLayerIds&&(L.stateDependentLayers=L.stateDependentLayerIds.map(N=>A.filter(V=>V.id===N)[0]));for(const N of A)C[N.id]=L}}return C}(s.buckets,f.style),this.hasSymbolBuckets=!1;for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5){if(this.hasSymbolBuckets=!0,!m)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5&&b.hasRTLText){this.hasRTLText=!0,ot().lazyLoad();break}}this.queryPadding=0;for(const g in this.buckets){const b=this.buckets[g];this.queryPadding=Math.max(this.queryPadding,f.style.getLayer(g).queryRadius(b))}s.imageAtlas&&(this.imageAtlas=s.imageAtlas),s.glyphAtlasImage&&(this.glyphAtlasImage=s.glyphAtlasImage)}else this.collisionBoxArray=new l.a4}unloadVectorData(){for(const s in this.buckets)this.buckets[s].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(s){return this.buckets[s.id]}upload(s){for(const m in this.buckets){const g=this.buckets[m];g.uploadPending()&&g.upload(s)}const f=s.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Q(s,this.imageAtlas.image,f.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Q(s,this.glyphAtlasImage,f.ALPHA),this.glyphAtlasImage=null)}prepare(s){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(s,this.imageAtlasTexture)}queryRenderedFeatures(s,f,m,g,b,C,L,A,N,V){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:g,cameraQueryGeometry:b,scale:C,tileSize:this.tileSize,pixelPosMatrix:V,transform:A,params:L,queryPadding:this.queryPadding*N},s,f,m):{}}querySourceFeatures(s,f){const m=this.latestFeatureIndex;if(!m||!m.rawTileData)return;const g=m.loadVTLayers(),b=f&&f.sourceLayer?f.sourceLayer:"",C=g._geojsonTileLayer||g[b];if(!C)return;const L=l.a6(f&&f.filter),{z:A,x:N,y:V}=this.tileID.canonical,j={z:A,x:N,y:V};for(let Y=0;Ym)g=!1;else if(f)if(this.expirationTime{this.remove(s,b)},m)),this.data[g].push(b),this.order.push(g),this.order.length>this.max){const C=this._getAndRemoveByKey(this.order[0]);C&&this.onRemove(C)}return this}has(s){return s.wrapped().key in this.data}getAndRemove(s){return this.has(s)?this._getAndRemoveByKey(s.wrapped().key):null}_getAndRemoveByKey(s){const f=this.data[s].shift();return f.timeout&&clearTimeout(f.timeout),this.data[s].length===0&&delete this.data[s],this.order.splice(this.order.indexOf(s),1),f.value}getByKey(s){const f=this.data[s];return f?f[0].value:null}get(s){return this.has(s)?this.data[s.wrapped().key][0].value:null}remove(s,f){if(!this.has(s))return this;const m=s.wrapped().key,g=f===void 0?0:this.data[m].indexOf(f),b=this.data[m][g];return this.data[m].splice(g,1),b.timeout&&clearTimeout(b.timeout),this.data[m].length===0&&delete this.data[m],this.onRemove(b.value),this.order.splice(this.order.indexOf(m),1),this}setMaxSize(s){for(this.max=s;this.order.length>this.max;){const f=this._getAndRemoveByKey(this.order[0]);f&&this.onRemove(f)}return this}filter(s){const f=[];for(const m in this.data)for(const g of this.data[m])s(g.value)||f.push(g);for(const m of f)this.remove(m.value.tileID,m)}}class Fl{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(s,f,m){const g=String(f);if(this.stateChanges[s]=this.stateChanges[s]||{},this.stateChanges[s][g]=this.stateChanges[s][g]||{},l.e(this.stateChanges[s][g],m),this.deletedStates[s]===null){this.deletedStates[s]={};for(const b in this.state[s])b!==g&&(this.deletedStates[s][b]=null)}else if(this.deletedStates[s]&&this.deletedStates[s][g]===null){this.deletedStates[s][g]={};for(const b in this.state[s][g])m[b]||(this.deletedStates[s][g][b]=null)}else for(const b in m)this.deletedStates[s]&&this.deletedStates[s][g]&&this.deletedStates[s][g][b]===null&&delete this.deletedStates[s][g][b]}removeFeatureState(s,f,m){if(this.deletedStates[s]===null)return;const g=String(f);if(this.deletedStates[s]=this.deletedStates[s]||{},m&&f!==void 0)this.deletedStates[s][g]!==null&&(this.deletedStates[s][g]=this.deletedStates[s][g]||{},this.deletedStates[s][g][m]=null);else if(f!==void 0)if(this.stateChanges[s]&&this.stateChanges[s][g])for(m in this.deletedStates[s][g]={},this.stateChanges[s][g])this.deletedStates[s][g][m]=null;else this.deletedStates[s][g]=null;else this.deletedStates[s]=null}getState(s,f){const m=String(f),g=l.e({},(this.state[s]||{})[m],(this.stateChanges[s]||{})[m]);if(this.deletedStates[s]===null)return{};if(this.deletedStates[s]){const b=this.deletedStates[s][f];if(b===null)return{};for(const C in b)delete g[C]}return g}initializeTileState(s,f){s.setFeatureState(this.state,f)}coalesceChanges(s,f){const m={};for(const g in this.stateChanges){this.state[g]=this.state[g]||{};const b={};for(const C in this.stateChanges[g])this.state[g][C]||(this.state[g][C]={}),l.e(this.state[g][C],this.stateChanges[g][C]),b[C]=this.state[g][C];m[g]=b}for(const g in this.deletedStates){this.state[g]=this.state[g]||{};const b={};if(this.deletedStates[g]===null)for(const C in this.state[g])b[C]={},this.state[g][C]={};else for(const C in this.deletedStates[g]){if(this.deletedStates[g][C]===null)this.state[g][C]={};else for(const L of Object.keys(this.deletedStates[g][C]))delete this.state[g][C][L];b[C]=this.state[g][C]}m[g]=m[g]||{},l.e(m[g],b)}if(this.stateChanges={},this.deletedStates={},Object.keys(m).length!==0)for(const g in s)s[g].setFeatureState(m,f)}}class li extends l.E{constructor(s,f,m){super(),this.id=s,this.dispatcher=m,this.on("data",g=>this._dataHandler(g)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((g,b,C,L)=>{const A=new(tl(b.type))(g,b,C,L);if(A.id!==g)throw new Error(`Expected Source id to be ${g} instead of ${A.id}`);return A})(s,f,m,this),this._tiles={},this._cache=new lo(0,g=>this._unloadTile(g)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Fl,this._didEmitContent=!1,this._updated=!1}onAdd(s){this.map=s,this._maxTileCacheSize=s?s._maxTileCacheSize:null,this._maxTileCacheZoomLevels=s?s._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(s)}onRemove(s){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(s)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const s in this._tiles){const f=this._tiles[s];if(f.state!=="loaded"&&f.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const s=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,s&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(s,f,m){return l._(this,void 0,void 0,function*(){try{yield this._source.loadTile(s),this._tileLoaded(s,f,m)}catch(g){s.state="errored",g.status!==404?this._source.fire(new l.j(g,{tile:s})):this.update(this.transform,this.terrain)}})}_unloadTile(s){this._source.unloadTile&&this._source.unloadTile(s)}_abortTile(s){this._source.abortTile&&this._source.abortTile(s),this._source.fire(new l.k("dataabort",{tile:s,coord:s.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(s){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const f in this._tiles){const m=this._tiles[f];m.upload(s),m.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(s=>s.tileID).sort(ft).map(s=>s.key)}getRenderableIds(s){const f=[];for(const m in this._tiles)this._isIdRenderable(m,s)&&f.push(this._tiles[m]);return s?f.sort((m,g)=>{const b=m.tileID,C=g.tileID,L=new l.P(b.canonical.x,b.canonical.y)._rotate(this.transform.angle),A=new l.P(C.canonical.x,C.canonical.y)._rotate(this.transform.angle);return b.overscaledZ-C.overscaledZ||A.y-L.y||A.x-L.x}).map(m=>m.tileID.key):f.map(m=>m.tileID).sort(ft).map(m=>m.key)}hasRenderableParent(s){const f=this.findLoadedParent(s,0);return!!f&&this._isIdRenderable(f.tileID.key)}_isIdRenderable(s,f){return this._tiles[s]&&this._tiles[s].hasData()&&!this._coveredTiles[s]&&(f||!this._tiles[s].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const s in this._tiles)this._tiles[s].state!=="errored"&&this._reloadTile(s,"reloading")}}_reloadTile(s,f){return l._(this,void 0,void 0,function*(){const m=this._tiles[s];m&&(m.state!=="loading"&&(m.state=f),yield this._loadTile(m,s,f))})}_tileLoaded(s,f,m){s.timeAdded=E.now(),m==="expired"&&(s.refreshedUponExpiration=!0),this._setTileReloadTimer(f,s),this.getSource().type==="raster-dem"&&s.dem&&this._backfillDEM(s),this._state.initializeTileState(s,this.map?this.map.painter:null),s.aborted||this._source.fire(new l.k("data",{dataType:"source",tile:s,coord:s.tileID}))}_backfillDEM(s){const f=this.getRenderableIds();for(let g=0;g1||(Math.abs(C)>1&&(Math.abs(C+A)===1?C+=A:Math.abs(C-A)===1&&(C-=A)),b.dem&&g.dem&&(g.dem.backfillBorder(b.dem,C,L),g.neighboringTiles&&g.neighboringTiles[N]&&(g.neighboringTiles[N].backfilled=!0)))}}getTile(s){return this.getTileByID(s.key)}getTileByID(s){return this._tiles[s]}_retainLoadedChildren(s,f,m,g){for(const b in this._tiles){let C=this._tiles[b];if(g[b]||!C.hasData()||C.tileID.overscaledZ<=f||C.tileID.overscaledZ>m)continue;let L=C.tileID;for(;C&&C.tileID.overscaledZ>f+1;){const N=C.tileID.scaledTo(C.tileID.overscaledZ-1);C=this._tiles[N.key],C&&C.hasData()&&(L=N)}let A=L;for(;A.overscaledZ>f;)if(A=A.scaledTo(A.overscaledZ-1),s[A.key]){g[L.key]=L;break}}}findLoadedParent(s,f){if(s.key in this._loadedParentTiles){const m=this._loadedParentTiles[s.key];return m&&m.tileID.overscaledZ>=f?m:null}for(let m=s.overscaledZ-1;m>=f;m--){const g=s.scaledTo(m),b=this._getLoadedTile(g);if(b)return b}}_getLoadedTile(s){const f=this._tiles[s.key];return f&&f.hasData()?f:this._cache.getByKey(s.wrapped().key)}updateCacheSize(s){const f=Math.ceil(s.width/this._source.tileSize)+1,m=Math.ceil(s.height/this._source.tileSize)+1,g=Math.floor(f*m*(this._maxTileCacheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),b=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,g):g;this._cache.setMaxSize(b)}handleWrapJump(s){const f=Math.round((s-(this._prevLng===void 0?s:this._prevLng))/360);if(this._prevLng=s,f){const m={};for(const g in this._tiles){const b=this._tiles[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+f),m[b.tileID.key]=b}this._tiles=m;for(const g in this._timers)clearTimeout(this._timers[g]),delete this._timers[g];for(const g in this._tiles)this._setTileReloadTimer(g,this._tiles[g])}}update(s,f){if(!this._sourceLoaded||this._paused)return;let m;this.transform=s,this.terrain=f,this.updateCacheSize(s),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?m=s.getVisibleUnwrappedCoordinates(this._source.tileID).map(V=>new l.Q(V.canonical.z,V.wrap,V.canonical.z,V.canonical.x,V.canonical.y)):(m=s.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:f}),this._source.hasTile&&(m=m.filter(V=>this._source.hasTile(V)))):m=[];const g=s.coveringZoomLevel(this._source),b=Math.max(g-li.maxOverzooming,this._source.minzoom),C=Math.max(g+li.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const V={};for(const j of m)if(j.canonical.z>this._source.minzoom){const Y=j.scaledTo(j.canonical.z-1);V[Y.key]=Y;const ue=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));V[ue.key]=ue}m=m.concat(Object.values(V))}const L=m.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,L&&this.fire(new l.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const A=this._updateRetainedTiles(m,g);if(ln(this._source.type)){const V={},j={},Y=Object.keys(A),ue=E.now();for(const le of Y){const ge=A[le],ne=this._tiles[le];if(!ne||ne.fadeEndTime!==0&&ne.fadeEndTime<=ue)continue;const Ie=this.findLoadedParent(ge,b);Ie&&(this._addTile(Ie.tileID),V[Ie.tileID.key]=Ie.tileID),j[le]=ge}this._retainLoadedChildren(j,g,C,A);for(const le in V)A[le]||(this._coveredTiles[le]=!0,A[le]=V[le]);if(f){const le={},ge={};for(const ne of m)this._tiles[ne.key].hasData()?le[ne.key]=ne:ge[ne.key]=ne;for(const ne in ge){const Ie=ge[ne].children(this._source.maxzoom);this._tiles[Ie[0].key]&&this._tiles[Ie[1].key]&&this._tiles[Ie[2].key]&&this._tiles[Ie[3].key]&&(le[Ie[0].key]=A[Ie[0].key]=Ie[0],le[Ie[1].key]=A[Ie[1].key]=Ie[1],le[Ie[2].key]=A[Ie[2].key]=Ie[2],le[Ie[3].key]=A[Ie[3].key]=Ie[3],delete ge[ne])}for(const ne in ge){const Ie=this.findLoadedParent(ge[ne],this._source.minzoom);if(Ie){le[Ie.tileID.key]=A[Ie.tileID.key]=Ie.tileID;for(const Be in le)le[Be].isChildOf(Ie.tileID)&&delete le[Be]}}for(const ne in this._tiles)le[ne]||(this._coveredTiles[ne]=!0)}}for(const V in A)this._tiles[V].clearFadeHold();const N=l.ab(this._tiles,A);for(const V of N){const j=this._tiles[V];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(V)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const s in this._tiles)this._tiles[s].holdingForFade()&&this._removeTile(s)}_updateRetainedTiles(s,f){const m={},g={},b=Math.max(f-li.maxOverzooming,this._source.minzoom),C=Math.max(f+li.maxUnderzooming,this._source.minzoom),L={};for(const A of s){const N=this._addTile(A);m[A.key]=A,N.hasData()||fthis._source.maxzoom){const j=A.children(this._source.maxzoom)[0],Y=this.getTile(j);if(Y&&Y.hasData()){m[j.key]=j;continue}}else{const j=A.children(this._source.maxzoom);if(m[j[0].key]&&m[j[1].key]&&m[j[2].key]&&m[j[3].key])continue}let V=N.wasRequested();for(let j=A.overscaledZ-1;j>=b;--j){const Y=A.scaledTo(j);if(g[Y.key])break;if(g[Y.key]=!0,N=this.getTile(Y),!N&&V&&(N=this._addTile(Y)),N){const ue=N.hasData();if((V||ue)&&(m[Y.key]=Y),V=N.wasRequested(),ue)break}}}return m}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const s in this._tiles){const f=[];let m,g=this._tiles[s].tileID;for(;g.overscaledZ>0;){if(g.key in this._loadedParentTiles){m=this._loadedParentTiles[g.key];break}f.push(g.key);const b=g.scaledTo(g.overscaledZ-1);if(m=this._getLoadedTile(b),m)break;g=b}for(const b of f)this._loadedParentTiles[b]=m}}_addTile(s){let f=this._tiles[s.key];if(f)return f;f=this._cache.getAndRemove(s),f&&(this._setTileReloadTimer(s.key,f),f.tileID=s,this._state.initializeTileState(f,this.map?this.map.painter:null),this._cacheTimers[s.key]&&(clearTimeout(this._cacheTimers[s.key]),delete this._cacheTimers[s.key],this._setTileReloadTimer(s.key,f)));const m=f;return f||(f=new ls(s,this._source.tileSize*s.overscaleFactor()),this._loadTile(f,s.key,f.state)),f.uses++,this._tiles[s.key]=f,m||this._source.fire(new l.k("dataloading",{tile:f,coord:f.tileID,dataType:"source"})),f}_setTileReloadTimer(s,f){s in this._timers&&(clearTimeout(this._timers[s]),delete this._timers[s]);const m=f.getExpiryTimeout();m&&(this._timers[s]=setTimeout(()=>{this._reloadTile(s,"expired"),delete this._timers[s]},m))}_removeTile(s){const f=this._tiles[s];f&&(f.uses--,delete this._tiles[s],this._timers[s]&&(clearTimeout(this._timers[s]),delete this._timers[s]),f.uses>0||(f.hasData()&&f.state!=="reloading"?this._cache.add(f.tileID,f,f.getExpiryTimeout()):(f.aborted=!0,this._abortTile(f),this._unloadTile(f))))}_dataHandler(s){const f=s.sourceDataType;s.dataType==="source"&&f==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&s.dataType==="source"&&f==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const s in this._tiles)this._removeTile(s);this._cache.reset()}tilesIn(s,f,m){const g=[],b=this.transform;if(!b)return g;const C=m?b.getCameraQueryGeometry(s):s,L=s.map(le=>b.pointCoordinate(le,this.terrain)),A=C.map(le=>b.pointCoordinate(le,this.terrain)),N=this.getIds();let V=1/0,j=1/0,Y=-1/0,ue=-1/0;for(const le of A)V=Math.min(V,le.x),j=Math.min(j,le.y),Y=Math.max(Y,le.x),ue=Math.max(ue,le.y);for(let le=0;le=0&&_e[1].y+Be>=0){const De=L.map(Ge=>ne.getTilePoint(Ge)),Ve=A.map(Ge=>ne.getTilePoint(Ge));g.push({tile:ge,tileID:ne,queryGeometry:De,cameraQueryGeometry:Ve,scale:Ie})}}return g}getVisibleCoordinates(s){const f=this.getRenderableIds(s).map(m=>this._tiles[m].tileID);for(const m of f)m.posMatrix=this.transform.calculatePosMatrix(m.toUnwrapped());return f}hasTransition(){if(this._source.hasTransition())return!0;if(ln(this._source.type)){const s=E.now();for(const f in this._tiles)if(this._tiles[f].fadeEndTime>=s)return!0}return!1}setFeatureState(s,f,m){this._state.updateState(s=s||"_geojsonTileLayer",f,m)}removeFeatureState(s,f,m){this._state.removeFeatureState(s=s||"_geojsonTileLayer",f,m)}getFeatureState(s,f){return this._state.getState(s=s||"_geojsonTileLayer",f)}setDependencies(s,f,m){const g=this._tiles[s];g&&g.setDependencies(f,m)}reloadTilesForDependencies(s,f){for(const m in this._tiles)this._tiles[m].hasDependency(s,f)&&this._reloadTile(m,"reloading");this._cache.filter(m=>!m.hasDependency(s,f))}}function ft(y,s){const f=Math.abs(2*y.wrap)-+(y.wrap<0),m=Math.abs(2*s.wrap)-+(s.wrap<0);return y.overscaledZ-s.overscaledZ||m-f||s.canonical.y-y.canonical.y||s.canonical.x-y.canonical.x}function ln(y){return y==="raster"||y==="image"||y==="video"}li.maxOverzooming=10,li.maxUnderzooming=3;class sn{constructor(s,f){this.reset(s,f)}reset(s,f){this.points=s||[],this._distances=[0];for(let m=1;m0?(g-C)/L:0;return this.points[b].mult(1-A).add(this.points[f].mult(A))}}function Hr(y,s){let f=!0;return y==="always"||y!=="never"&&s!=="never"||(f=!1),f}class us{constructor(s,f,m){const g=this.boxCells=[],b=this.circleCells=[];this.xCellCount=Math.ceil(s/m),this.yCellCount=Math.ceil(f/m);for(let C=0;Cthis.width||g<0||f>this.height)return[];const A=[];if(s<=0&&f<=0&&this.width<=m&&this.height<=g){if(b)return[{key:null,x1:s,y1:f,x2:m,y2:g}];for(let N=0;N0}hitTestCircle(s,f,m,g,b){const C=s-m,L=s+m,A=f-m,N=f+m;if(L<0||C>this.width||N<0||A>this.height)return!1;const V=[];return this._forEachCell(C,A,L,N,this._queryCellCircle,V,{hitTest:!0,overlapMode:g,circle:{x:s,y:f,radius:m},seenUids:{box:{},circle:{}}},b),V.length>0}_queryCell(s,f,m,g,b,C,L,A){const{seenUids:N,hitTest:V,overlapMode:j}=L,Y=this.boxCells[b];if(Y!==null){const le=this.bboxes;for(const ge of Y)if(!N.box[ge]){N.box[ge]=!0;const ne=4*ge,Ie=this.boxKeys[ge];if(s<=le[ne+2]&&f<=le[ne+3]&&m>=le[ne+0]&&g>=le[ne+1]&&(!A||A(Ie))&&(!V||!Hr(j,Ie.overlapMode))&&(C.push({key:Ie,x1:le[ne],y1:le[ne+1],x2:le[ne+2],y2:le[ne+3]}),V))return!0}}const ue=this.circleCells[b];if(ue!==null){const le=this.circles;for(const ge of ue)if(!N.circle[ge]){N.circle[ge]=!0;const ne=3*ge,Ie=this.circleKeys[ge];if(this._circleAndRectCollide(le[ne],le[ne+1],le[ne+2],s,f,m,g)&&(!A||A(Ie))&&(!V||!Hr(j,Ie.overlapMode))){const Be=le[ne],_e=le[ne+1],De=le[ne+2];if(C.push({key:Ie,x1:Be-De,y1:_e-De,x2:Be+De,y2:_e+De}),V)return!0}}}return!1}_queryCellCircle(s,f,m,g,b,C,L,A){const{circle:N,seenUids:V,overlapMode:j}=L,Y=this.boxCells[b];if(Y!==null){const le=this.bboxes;for(const ge of Y)if(!V.box[ge]){V.box[ge]=!0;const ne=4*ge,Ie=this.boxKeys[ge];if(this._circleAndRectCollide(N.x,N.y,N.radius,le[ne+0],le[ne+1],le[ne+2],le[ne+3])&&(!A||A(Ie))&&!Hr(j,Ie.overlapMode))return C.push(!0),!0}}const ue=this.circleCells[b];if(ue!==null){const le=this.circles;for(const ge of ue)if(!V.circle[ge]){V.circle[ge]=!0;const ne=3*ge,Ie=this.circleKeys[ge];if(this._circlesCollide(le[ne],le[ne+1],le[ne+2],N.x,N.y,N.radius)&&(!A||A(Ie))&&!Hr(j,Ie.overlapMode))return C.push(!0),!0}}}_forEachCell(s,f,m,g,b,C,L,A){const N=this._convertToXCellCoord(s),V=this._convertToYCellCoord(f),j=this._convertToXCellCoord(m),Y=this._convertToYCellCoord(g);for(let ue=N;ue<=j;ue++)for(let le=V;le<=Y;le++)if(b.call(this,s,f,m,g,this.xCellCount*le+ue,C,L,A))return}_convertToXCellCoord(s){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(s*this.xScale)))}_convertToYCellCoord(s){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(s*this.yScale)))}_circlesCollide(s,f,m,g,b,C){const L=g-s,A=b-f,N=m+C;return N*N>L*L+A*A}_circleAndRectCollide(s,f,m,g,b,C,L){const A=(C-g)/2,N=Math.abs(s-(g+A));if(N>A+m)return!1;const V=(L-b)/2,j=Math.abs(f-(b+V));if(j>V+m)return!1;if(N<=A||j<=V)return!0;const Y=N-A,ue=j-V;return Y*Y+ue*ue<=m*m}}function on(y,s,f,m,g){const b=l.F();return s?(l.J(b,b,[1/g,1/g,1]),f||l.ad(b,b,m.angle)):l.K(b,m.labelPlaneMatrix,y),b}function Aa(y,s,f,m,g){if(s){const b=l.ae(y);return l.J(b,b,[g,g,1]),f||l.ad(b,b,-m.angle),b}return m.glCoordMatrix}function $r(y,s,f){let m;f?(m=[y.x,y.y,f(y.x,y.y),1],l.af(m,m,s)):(m=[y.x,y.y,0,1],Dt(m,m,s));const g=m[3];return{point:new l.P(m[0]/g,m[1]/g),signedDistanceFromCamera:g}}function me(y,s){return .5+y/s*.5}function q(y,s){const f=y[0]/y[3],m=y[1]/y[3];return f>=-s[0]&&f<=s[0]&&m>=-s[1]&&m<=s[1]}function Z(y,s,f,m,g,b,C,L,A,N){const V=m?y.textSizeData:y.iconSizeData,j=l.ag(V,f.transform.zoom),Y=[256/f.width*2+1,256/f.height*2+1],ue=m?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;ue.clear();const le=y.lineVertexArray,ge=m?y.text.placedSymbolArray:y.icon.placedSymbolArray,ne=f.transform.width/f.transform.height;let Ie=!1;for(let Be=0;BeMath.abs(f.x-s.x)*m?{useVertical:!0}:(y===l.ah.vertical?s.yf.x)?{needsFlipping:!0}:null}function Le(y,s,f,m,g,b,C,L,A,N,V,j,Y,ue,le,ge){const ne=s/24,Ie=y.lineOffsetX*ne,Be=y.lineOffsetY*ne;let _e;if(y.numGlyphs>1){const De=y.glyphStartIndex+y.numGlyphs,Ve=y.lineStartIndex,Ge=y.lineStartIndex+y.lineLength,Ke=$(ne,L,Ie,Be,f,V,j,y,A,b,Y,le,ge);if(!Ke)return{notEnoughRoom:!0};const nt=$r(Ke.first.point,C,ge).point,tt=$r(Ke.last.point,C,ge).point;if(m&&!f){const at=se(y.writingMode,nt,tt,ue);if(at)return at}_e=[Ke.first];for(let at=y.glyphStartIndex+1;at0?nt.point:ee(j,Ke,Ve,1,g,ge),at=se(y.writingMode,Ve,tt,ue);if(at)return at}const De=Ue(ne*L.getoffsetX(y.glyphStartIndex),Ie,Be,f,V,j,y.segment,y.lineStartIndex,y.lineStartIndex+y.lineLength,A,b,Y,le,ge);if(!De)return{notEnoughRoom:!0};_e=[De]}for(const De of _e)l.aj(N,De.point,De.angle);return{}}function ee(y,s,f,m,g,b){const C=$r(y.add(y.sub(s)._unit()),g,b).point,L=f.sub(C);return f.add(L._mult(m/L.mag()))}function Pe(y,s){const{projectionCache:f,lineVertexArray:m,labelPlaneMatrix:g,tileAnchorPoint:b,distanceFromAnchor:C,getElevation:L,previousVertex:A,direction:N,absOffsetX:V}=s;if(f.projections[y])return f.projections[y];const j=new l.P(m.getx(y),m.gety(y)),Y=$r(j,g,L);if(Y.signedDistanceFromCamera>0)return f.projections[y]=Y.point,Y.point;const ue=y-N;return ee(C===0?b:new l.P(m.getx(ue),m.gety(ue)),j,A,V-C+1,g,L)}function Se(y,s,f){return y._unit()._perp()._mult(s*f)}function Ne(y,s,f,m,g,b,C,L){const{projectionCache:A,direction:N}=L;if(A.offsets[y])return A.offsets[y];const V=f.add(s);if(y+N=g)return A.offsets[y]=V,V;const j=Pe(y+N,L),Y=Se(j.sub(f),C,N),ue=f.add(Y),le=j.add(Y);return A.offsets[y]=l.ak(b,V,ue,le)||V,A.offsets[y]}function Ue(y,s,f,m,g,b,C,L,A,N,V,j,Y,ue){const le=m?y-s:y+s;let ge=le>0?1:-1,ne=0;m&&(ge*=-1,ne=Math.PI),ge<0&&(ne+=Math.PI);let Ie,Be,_e=ge>0?L+C:L+C+1,De=g,Ve=g,Ge=0,Ke=0;const nt=Math.abs(le),tt=[];let at;for(;Ge+Ke<=nt;){if(_e+=ge,_e=A)return null;Ge+=Ke,Ve=De,Be=Ie;const mt={projectionCache:j,lineVertexArray:N,labelPlaneMatrix:V,tileAnchorPoint:b,distanceFromAnchor:Ge,getElevation:ue,previousVertex:Ve,direction:ge,absOffsetX:nt};if(De=Pe(_e,mt),f===0)tt.push(Ve),at=De.sub(Ve);else{let Wt;const cn=De.sub(Ve);Wt=cn.mag()===0?Se(Pe(_e+ge,mt).sub(De),f,ge):Se(cn,f,ge),Be||(Be=Ve.add(Wt)),Ie=Ne(_e,Wt,De,L,A,Be,f,mt),tt.push(Be),at=Ie.sub(Be)}Ke=at.mag()}const pt=at._mult((nt-Ge)/Ke)._add(Be||Ve),un=ne+Math.atan2(De.y-Ve.y,De.x-Ve.x);return tt.push(pt),{point:pt,angle:Y?un:0,path:tt}}const Ye=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Je(y,s){for(let f=0;f=1;mn--)cn.push(mt.path[mn]);for(let mn=1;mn$r(bn,A,le));cn=mn.some(bn=>bn.signedDistanceFromCamera<=0)?[]:mn.map(bn=>bn.point)}let $t=[];if(cn.length>0){const mn=cn[0].clone(),bn=cn[0].clone();for(let Ur=1;Ur=at.x&&bn.x<=pt.x&&mn.y>=at.y&&bn.y<=pt.y?[cn]:bn.xpt.x||bn.ypt.y?[]:l.al([cn],at.x,at.y,pt.x,pt.y)}for(const mn of $t){un.reset(mn,.25*tt);let bn=0;bn=un.length<=.5*tt?1:Math.ceil(un.paddedLength/An)+1;for(let Ur=0;Ur=this.screenRightBoundary||gthis.screenBottomBoundary}isInsideGrid(s,f,m,g){return m>=0&&s=0&&fm.collisionGroupID===f}}return this.collisionGroups[s]}}function mi(y,s,f,m,g){const{horizontalAlign:b,verticalAlign:C}=l.at(y);return new l.P(-(b-.5)*s+m[0]*g,-(C-.5)*f+m[1]*g)}function uo(y,s,f,m,g,b){const{x1:C,x2:L,y1:A,y2:N,anchorPointX:V,anchorPointY:j}=y,Y=new l.P(s,f);return m&&Y._rotate(g?b:-b),{x1:C+Y.x,y1:A+Y.y,x2:L+Y.x,y2:N+Y.y,anchorPointX:V,anchorPointY:j}}class So{constructor(s,f,m,g,b){this.transform=s.clone(),this.terrain=f,this.collisionIndex=new Qt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=m,this.retainedQueryData={},this.collisionGroups=new Fr(g),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(s,f,m,g){const b=m.getBucket(f),C=m.latestFeatureIndex;if(!b||!C||f.id!==b.layerIds[0])return;const L=m.collisionBoxArray,A=b.layers[0].layout,N=Math.pow(2,this.transform.zoom-m.tileID.overscaledZ),V=m.tileSize/l.W,j=this.transform.calculatePosMatrix(m.tileID.toUnwrapped()),Y=A.get("text-pitch-alignment")==="map",ue=A.get("text-rotation-alignment")==="map",le=tn(m,1,this.transform.zoom),ge=on(j,Y,ue,this.transform,le);let ne=null;if(Y){const Be=Aa(j,Y,ue,this.transform,le);ne=l.K([],this.transform.labelPlaneMatrix,Be)}this.retainedQueryData[b.bucketInstanceId]=new dn(b.bucketInstanceId,C,b.sourceLayerIndex,b.index,m.tileID);const Ie={bucket:b,layout:A,posMatrix:j,textLabelPlaneMatrix:ge,labelToScreenMatrix:ne,scale:N,textPixelRatio:V,holdingForFade:m.holdingForFade(),collisionBoxArray:L,partiallyEvaluatedTextSize:l.ag(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(g)for(const Be of b.sortKeyRanges){const{sortKey:_e,symbolInstanceStart:De,symbolInstanceEnd:Ve}=Be;s.push({sortKey:_e,symbolInstanceStart:De,symbolInstanceEnd:Ve,parameters:Ie})}else s.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:Ie})}attemptAnchorPlacement(s,f,m,g,b,C,L,A,N,V,j,Y,ue,le,ge,ne){const Ie=l.ap[s.textAnchor],Be=[s.textOffset0,s.textOffset1],_e=mi(Ie,m,g,Be,b),De=this.collisionIndex.placeCollisionBox(uo(f,_e.x,_e.y,C,L,this.transform.angle),j,A,N,V.predicate,ne);if((!ge||this.collisionIndex.placeCollisionBox(uo(ge,_e.x,_e.y,C,L,this.transform.angle),j,A,N,V.predicate,ne).box.length!==0)&&De.box.length>0){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Y.crossTileID]&&this.prevPlacement.placements[Y.crossTileID]&&this.prevPlacement.placements[Y.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[Y.crossTileID].anchor),Y.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Y.crossTileID]={textOffset:Be,width:m,height:g,anchor:Ie,textBoxScale:b,prevAnchor:Ve},this.markUsedJustification(ue,Ie,Y,le),ue.allowVerticalPlacement&&(this.markUsedOrientation(ue,le,Y),this.placedOrientations[Y.crossTileID]=le),{shift:_e,placedGlyphBoxes:De}}}placeLayerBucketPart(s,f,m){const{bucket:g,layout:b,posMatrix:C,textLabelPlaneMatrix:L,labelToScreenMatrix:A,textPixelRatio:N,holdingForFade:V,collisionBoxArray:j,partiallyEvaluatedTextSize:Y,collisionGroup:ue}=s.parameters,le=b.get("text-optional"),ge=b.get("icon-optional"),ne=l.aq(b,"text-overlap","text-allow-overlap"),Ie=ne==="always",Be=l.aq(b,"icon-overlap","icon-allow-overlap"),_e=Be==="always",De=b.get("text-rotation-alignment")==="map",Ve=b.get("text-pitch-alignment")==="map",Ge=b.get("icon-text-fit")!=="none",Ke=b.get("symbol-z-order")==="viewport-y",nt=Ie&&(_e||!g.hasIconData()||ge),tt=_e&&(Ie||!g.hasTextData()||le);!g.collisionArrays&&j&&g.deserializeCollisionBoxes(j);const at=this.retainedQueryData[g.bucketInstanceId].tileID,pt=this.terrain?(mt,Wt)=>this.terrain.getElevation(at,mt,Wt):null,un=(mt,Wt)=>{var cn,An;if(f[mt.crossTileID])return;if(V)return void(this.placements[mt.crossTileID]=new vr(!1,!1,!1));let $t=!1,mn=!1,bn=!0,Ur=null,$n={box:null,offscreen:null},Go={box:null,offscreen:null},gi=null,Mr=null,_i=null,qo=0,na=0,ll=0;Wt.textFeatureIndex?qo=Wt.textFeatureIndex:mt.useRuntimeCollisionCircles&&(qo=mt.featureIndex),Wt.verticalTextFeatureIndex&&(na=Wt.verticalTextFeatureIndex);const zc=Wt.textBox;if(zc){const hi=fi=>{let kr=l.ah.horizontal;if(g.allowVerticalPlacement&&!fi&&this.prevPlacement){const ps=this.prevPlacement.placedOrientations[mt.crossTileID];ps&&(this.placedOrientations[mt.crossTileID]=ps,kr=ps,this.markUsedOrientation(g,kr,mt))}return kr},Ar=(fi,kr)=>{if(g.allowVerticalPlacement&&mt.numVerticalGlyphVertices>0&&Wt.verticalTextBox){for(const ps of g.writingModes)if(ps===l.ah.vertical?($n=kr(),Go=$n):$n=fi(),$n&&$n.box&&$n.box.length)break}else $n=fi()},xr=mt.textAnchorOffsetStartIndex,fs=mt.textAnchorOffsetEndIndex;if(fs===xr){const fi=(kr,ps)=>{const pi=this.collisionIndex.placeCollisionBox(kr,ne,N,C,ue.predicate,pt);return pi&&pi.box&&pi.box.length&&(this.markUsedOrientation(g,ps,mt),this.placedOrientations[mt.crossTileID]=ps),pi};Ar(()=>fi(zc,l.ah.horizontal),()=>{const kr=Wt.verticalTextBox;return g.allowVerticalPlacement&&mt.numVerticalGlyphVertices>0&&kr?fi(kr,l.ah.vertical):{box:null,offscreen:null}}),hi($n&&$n.box&&$n.box.length)}else{let fi=l.ap[(An=(cn=this.prevPlacement)===null||cn===void 0?void 0:cn.variableOffsets[mt.crossTileID])===null||An===void 0?void 0:An.anchor];const kr=(pi,Zr,Xp)=>{const fg=pi.x2-pi.x1,Zl=pi.y2-pi.y1,Xl=mt.textBoxScale,ef=Ge&&Be==="never"?Zr:null;let cl={box:[],offscreen:!1},Yp=ne==="never"?1:2,pg="never";fi&&Yp++;for(let Kp=0;Kpkr(zc,Wt.iconBox,l.ah.horizontal),()=>{const pi=Wt.verticalTextBox;return g.allowVerticalPlacement&&!($n&&$n.box&&$n.box.length)&&mt.numVerticalGlyphVertices>0&&pi?kr(pi,Wt.verticalIconBox,l.ah.vertical):{box:null,offscreen:null}}),$n&&($t=$n.box,bn=$n.offscreen);const ps=hi($n&&$n.box);if(!$t&&this.prevPlacement){const pi=this.prevPlacement.variableOffsets[mt.crossTileID];pi&&(this.variableOffsets[mt.crossTileID]=pi,this.markUsedJustification(g,pi.anchor,mt,ps))}}}if(gi=$n,$t=gi&&gi.box&&gi.box.length>0,bn=gi&&gi.offscreen,mt.useRuntimeCollisionCircles){const hi=g.text.placedSymbolArray.get(mt.centerJustifiedTextSymbolIndex),Ar=l.ai(g.textSizeData,Y,hi),xr=b.get("text-padding");Mr=this.collisionIndex.placeCollisionCircles(ne,hi,g.lineVertexArray,g.glyphOffsetArray,Ar,C,L,A,m,Ve,ue.predicate,mt.collisionCircleDiameter,xr,pt),Mr.circles.length&&Mr.collisionDetected&&!m&&l.w("Collisions detected, but collision boxes are not shown"),$t=Ie||Mr.circles.length>0&&!Mr.collisionDetected,bn=bn&&Mr.offscreen}if(Wt.iconFeatureIndex&&(ll=Wt.iconFeatureIndex),Wt.iconBox){const hi=Ar=>{const xr=Ge&&Ur?uo(Ar,Ur.x,Ur.y,De,Ve,this.transform.angle):Ar;return this.collisionIndex.placeCollisionBox(xr,Be,N,C,ue.predicate,pt)};Go&&Go.box&&Go.box.length&&Wt.verticalIconBox?(_i=hi(Wt.verticalIconBox),mn=_i.box.length>0):(_i=hi(Wt.iconBox),mn=_i.box.length>0),bn=bn&&_i.offscreen}const ul=le||mt.numHorizontalGlyphVertices===0&&mt.numVerticalGlyphVertices===0,ra=ge||mt.numIconVertices===0;if(ul||ra?ra?ul||(mn=mn&&$t):$t=mn&&$t:mn=$t=mn&&$t,$t&&gi&&gi.box&&this.collisionIndex.insertCollisionBox(gi.box,ne,b.get("text-ignore-placement"),g.bucketInstanceId,Go&&Go.box&&na?na:qo,ue.ID),mn&&_i&&this.collisionIndex.insertCollisionBox(_i.box,Be,b.get("icon-ignore-placement"),g.bucketInstanceId,ll,ue.ID),Mr&&($t&&this.collisionIndex.insertCollisionCircles(Mr.circles,ne,b.get("text-ignore-placement"),g.bucketInstanceId,qo,ue.ID),m)){const hi=g.bucketInstanceId;let Ar=this.collisionCircleArrays[hi];Ar===void 0&&(Ar=this.collisionCircleArrays[hi]=new ui);for(let xr=0;xr=0;--Wt){const cn=mt[Wt];un(g.symbolInstances.get(cn),g.collisionArrays[cn])}}else for(let mt=s.symbolInstanceStart;mt=0&&(s.text.placedSymbolArray.get(L).crossTileID=b>=0&&L!==b?0:m.crossTileID)}markUsedOrientation(s,f,m){const g=f===l.ah.horizontal||f===l.ah.horizontalOnly?f:0,b=f===l.ah.vertical?f:0,C=[m.leftJustifiedTextSymbolIndex,m.centerJustifiedTextSymbolIndex,m.rightJustifiedTextSymbolIndex];for(const L of C)s.text.placedSymbolArray.get(L).placedOrientation=g;m.verticalPlacedTextSymbolIndex&&(s.text.placedSymbolArray.get(m.verticalPlacedTextSymbolIndex).placedOrientation=b)}commit(s){this.commitTime=s,this.zoomAtLastRecencyCheck=this.transform.zoom;const f=this.prevPlacement;let m=!1;this.prevZoomAdjustment=f?f.zoomAdjustment(this.transform.zoom):0;const g=f?f.symbolFadeChange(s):1,b=f?f.opacities:{},C=f?f.variableOffsets:{},L=f?f.placedOrientations:{};for(const A in this.placements){const N=this.placements[A],V=b[A];V?(this.opacities[A]=new er(V,g,N.text,N.icon),m=m||N.text!==V.text.placed||N.icon!==V.icon.placed):(this.opacities[A]=new er(null,g,N.text,N.icon,N.skipFade),m=m||N.text||N.icon)}for(const A in b){const N=b[A];if(!this.opacities[A]){const V=new er(N,g,!1,!1);V.isHidden()||(this.opacities[A]=V,m=m||N.text.placed||N.icon.placed)}}for(const A in C)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=C[A]);for(const A in L)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=L[A]);if(f&&f.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");m?this.lastPlacementChangeTime=s:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=f?f.lastPlacementChangeTime:s)}updateLayerOpacities(s,f){const m={};for(const g of f){const b=g.getBucket(s);b&&g.latestFeatureIndex&&s.id===b.layerIds[0]&&this.updateBucketOpacities(b,m,g.collisionBoxArray)}}updateBucketOpacities(s,f,m){s.hasTextData()&&(s.text.opacityVertexArray.clear(),s.text.hasVisibleVertices=!1),s.hasIconData()&&(s.icon.opacityVertexArray.clear(),s.icon.hasVisibleVertices=!1),s.hasIconCollisionBoxData()&&s.iconCollisionBox.collisionVertexArray.clear(),s.hasTextCollisionBoxData()&&s.textCollisionBox.collisionVertexArray.clear();const g=s.layers[0],b=g.layout,C=new er(null,0,!1,!1,!0),L=b.get("text-allow-overlap"),A=b.get("icon-allow-overlap"),N=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),V=b.get("text-rotation-alignment")==="map",j=b.get("text-pitch-alignment")==="map",Y=b.get("icon-text-fit")!=="none",ue=new er(null,0,L&&(A||!s.hasIconData()||b.get("icon-optional")),A&&(L||!s.hasTextData()||b.get("text-optional")),!0);!s.collisionArrays&&m&&(s.hasIconCollisionBoxData()||s.hasTextCollisionBoxData())&&s.deserializeCollisionBoxes(m);const le=(ge,ne,Ie)=>{for(let Be=0;Be0,Ge=this.placedOrientations[ne.crossTileID],Ke=Ge===l.ah.vertical,nt=Ge===l.ah.horizontal||Ge===l.ah.horizontalOnly;if(Ie>0||Be>0){const tt=Eo(De.text);le(s.text,Ie,Ke?mc:tt),le(s.text,Be,nt?mc:tt);const at=De.text.isHidden();[ne.rightJustifiedTextSymbolIndex,ne.centerJustifiedTextSymbolIndex,ne.leftJustifiedTextSymbolIndex].forEach(mt=>{mt>=0&&(s.text.placedSymbolArray.get(mt).hidden=at||Ke?1:0)}),ne.verticalPlacedTextSymbolIndex>=0&&(s.text.placedSymbolArray.get(ne.verticalPlacedTextSymbolIndex).hidden=at||nt?1:0);const pt=this.variableOffsets[ne.crossTileID];pt&&this.markUsedJustification(s,pt.anchor,ne,Ge);const un=this.placedOrientations[ne.crossTileID];un&&(this.markUsedJustification(s,"left",ne,un),this.markUsedOrientation(s,un,ne))}if(Ve){const tt=Eo(De.icon),at=!(Y&&ne.verticalPlacedIconSymbolIndex&&Ke);ne.placedIconSymbolIndex>=0&&(le(s.icon,ne.numIconVertices,at?tt:mc),s.icon.placedSymbolArray.get(ne.placedIconSymbolIndex).hidden=De.icon.isHidden()),ne.verticalPlacedIconSymbolIndex>=0&&(le(s.icon,ne.numVerticalIconVertices,at?mc:tt),s.icon.placedSymbolArray.get(ne.verticalPlacedIconSymbolIndex).hidden=De.icon.isHidden())}if(s.hasIconCollisionBoxData()||s.hasTextCollisionBoxData()){const tt=s.collisionArrays[ge];if(tt){let at=new l.P(0,0);if(tt.textBox||tt.verticalTextBox){let un=!0;if(N){const mt=this.variableOffsets[_e];mt?(at=mi(mt.anchor,mt.width,mt.height,mt.textOffset,mt.textBoxScale),V&&at._rotate(j?this.transform.angle:-this.transform.angle)):un=!1}tt.textBox&&Li(s.textCollisionBox.collisionVertexArray,De.text.placed,!un||Ke,at.x,at.y),tt.verticalTextBox&&Li(s.textCollisionBox.collisionVertexArray,De.text.placed,!un||nt,at.x,at.y)}const pt=!!(!nt&&tt.verticalIconBox);tt.iconBox&&Li(s.iconCollisionBox.collisionVertexArray,De.icon.placed,pt,Y?at.x:0,Y?at.y:0),tt.verticalIconBox&&Li(s.iconCollisionBox.collisionVertexArray,De.icon.placed,!pt,Y?at.x:0,Y?at.y:0)}}}if(s.sortFeatures(this.transform.angle),this.retainedQueryData[s.bucketInstanceId]&&(this.retainedQueryData[s.bucketInstanceId].featureSortOrder=s.featureSortOrder),s.hasTextData()&&s.text.opacityVertexBuffer&&s.text.opacityVertexBuffer.updateData(s.text.opacityVertexArray),s.hasIconData()&&s.icon.opacityVertexBuffer&&s.icon.opacityVertexBuffer.updateData(s.icon.opacityVertexArray),s.hasIconCollisionBoxData()&&s.iconCollisionBox.collisionVertexBuffer&&s.iconCollisionBox.collisionVertexBuffer.updateData(s.iconCollisionBox.collisionVertexArray),s.hasTextCollisionBoxData()&&s.textCollisionBox.collisionVertexBuffer&&s.textCollisionBox.collisionVertexBuffer.updateData(s.textCollisionBox.collisionVertexArray),s.text.opacityVertexArray.length!==s.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${s.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${s.text.layoutVertexArray.length}) / 4`);if(s.icon.opacityVertexArray.length!==s.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${s.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${s.icon.layoutVertexArray.length}) / 4`);if(s.bucketInstanceId in this.collisionCircleArrays){const ge=this.collisionCircleArrays[s.bucketInstanceId];s.placementInvProjMatrix=ge.invProjMatrix,s.placementViewportMatrix=ge.viewportMatrix,s.collisionCircleArray=ge.circles,delete this.collisionCircleArrays[s.bucketInstanceId]}}symbolFadeChange(s){return this.fadeDuration===0?1:(s-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(s){return Math.max(0,(this.transform.zoom-s)/1.5)}hasTransitions(s){return this.stale||s-this.lastPlacementChangeTimes}setStale(){this.stale=!0}}function Li(y,s,f,m,g){y.emplaceBack(s?1:0,f?1:0,m||0,g||0),y.emplaceBack(s?1:0,f?1:0,m||0,g||0),y.emplaceBack(s?1:0,f?1:0,m||0,g||0),y.emplaceBack(s?1:0,f?1:0,m||0,g||0)}const Js=Math.pow(2,25),Pm=Math.pow(2,24),Ly=Math.pow(2,17),Kn=Math.pow(2,16),gp=Math.pow(2,9),_p=Math.pow(2,8),Vo=Math.pow(2,1);function Eo(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;const s=y.placed?1:0,f=Math.floor(127*y.opacity);return f*Js+s*Pm+f*Ly+s*Kn+f*gp+s*_p+f*Vo+s}const mc=0;class cs{constructor(s){this._sortAcrossTiles=s.layout.get("symbol-z-order")!=="viewport-y"&&!s.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(s,f,m,g,b){const C=this._bucketParts;for(;this._currentTileIndexL.sortKey-A.sortKey));this._currentPartIndex!this._forceFullPlacement&&E.now()-g>2;for(;this._currentPlacementIndex>=0;){const C=f[s[this._currentPlacementIndex]],L=this.placement.collisionIndex.transform.zoom;if(C.type==="symbol"&&(!C.minzoom||C.minzoom<=L)&&(!C.maxzoom||C.maxzoom>L)){if(this._inProgressLayer||(this._inProgressLayer=new cs(C)),this._inProgressLayer.continuePlacement(m[C.source],this.placement,this._showCollisionBoxes,C,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(s){return this.placement.commit(s),this.placement}}const bu=512/l.W/2;class mh{constructor(s,f,m){this.tileID=s,this.bucketInstanceId=m,this._symbolsByKey={};const g=new Map;for(let b=0;b({x:Math.floor(A.anchorX*bu),y:Math.floor(A.anchorY*bu)})),crossTileIDs:C.map(A=>A.crossTileID)};if(L.positions.length>128){const A=new l.au(L.positions.length,16,Uint16Array);for(const{x:N,y:V}of L.positions)A.add(N,V);A.finish(),delete L.positions,L.index=A}this._symbolsByKey[b]=L}}getScaledCoordinates(s,f){const{x:m,y:g,z:b}=this.tileID.canonical,{x:C,y:L,z:A}=f.canonical,N=bu/Math.pow(2,A-b),V=(L*l.W+s.anchorY)*N,j=g*l.W*bu;return{x:Math.floor((C*l.W+s.anchorX)*N-m*l.W*bu),y:Math.floor(V-j)}}findMatches(s,f,m){const g=this.tileID.canonical.zs)}}class ci{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class gc{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(s){const f=Math.round((s-this.lng)/360);if(f!==0)for(const m in this.indexes){const g=this.indexes[m],b={};for(const C in g){const L=g[C];L.tileID=L.tileID.unwrapTo(L.tileID.wrap+f),b[L.tileID.key]=L}this.indexes[m]=b}this.lng=s}addBucket(s,f,m){if(this.indexes[s.overscaledZ]&&this.indexes[s.overscaledZ][s.key]){if(this.indexes[s.overscaledZ][s.key].bucketInstanceId===f.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(s.overscaledZ,this.indexes[s.overscaledZ][s.key])}for(let b=0;bs.overscaledZ)for(const L in C){const A=C[L];A.tileID.isChildOf(s)&&A.findMatches(f.symbolInstances,s,g)}else{const L=C[s.scaledTo(Number(b)).key];L&&L.findMatches(f.symbolInstances,s,g)}}for(let b=0;b{f[m]=!0});for(const m in this.layerIndexes)f[m]||delete this.layerIndexes[m]}}const Pr=(y,s)=>l.t(y,s&&s.filter(f=>f.identifier!=="source.canvas")),gh=l.av();class Uo extends l.E{constructor(s,f={}){super(),this._rtlPluginLoaded=()=>{for(const m in this.sourceCaches){const g=this.sourceCaches[m].getSource().type;g!=="vector"&&g!=="geojson"||this.sourceCaches[m].reload()}},this.map=s,this.dispatcher=new Yn(pn(),s._getMapId()),this.dispatcher.registerMessageHandler("GG",(m,g)=>this.getGlyphs(m,g)),this.dispatcher.registerMessageHandler("GI",(m,g)=>this.getImages(m,g)),this.imageManager=new Qe,this.imageManager.setEventedParent(this),this.glyphManager=new je(s._requestManager,f.localIdeographFontFamily),this.lineAtlas=new At(256,512),this.crossTileSymbolIndex=new nl,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.aw,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",l.ax()),ot().on(Bi,this._rtlPluginLoaded),this.on("data",m=>{if(m.dataType!=="source"||m.sourceDataType!=="metadata")return;const g=this.sourceCaches[m.sourceId];if(!g)return;const b=g.getSource();if(b&&b.vectorLayerIds)for(const C in this._layers){const L=this._layers[C];L.source===b.id&&this._validateLayer(L)}})}loadURL(s,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),f.validate=typeof f.validate!="boolean"||f.validate;const g=this.map._requestManager.transformRequest(s,"Style");this._loadStyleRequest=new AbortController,l.h(g,this._loadStyleRequest).then(b=>{this._loadStyleRequest=null,this._load(b.data,f,m)}).catch(b=>{this._loadStyleRequest=null,b&&this.fire(new l.j(b))})}loadJSON(s,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,f.validate=f.validate!==!1,this._load(s,f,m)}).catch(()=>{})}loadEmpty(){this.fire(new l.k("dataloading",{dataType:"style"})),this._load(gh,{validate:!1})}_load(s,f,m){var g;const b=f.transformStyle?f.transformStyle(m,s):s;if(!f.validate||!Pr(this,l.x(b))){this._loaded=!0,this.stylesheet=b;for(const C in b.sources)this.addSource(C,b.sources[C],{validate:!1});b.sprite?this._loadSprite(b.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(b.glyphs),this._createLayers(),this.light=new vt(this.stylesheet.light),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new l.k("data",{dataType:"style"})),this.fire(new l.k("style.load"))}}_createLayers(){const s=l.ay(this.stylesheet.layers);this.dispatcher.broadcast("SL",s),this._order=s.map(f=>f.id),this._layers={},this._serializedLayers=null;for(const f of s){const m=l.az(f);m.setEventedParent(this,{layer:{id:f.id}}),this._layers[f.id]=m}}_loadSprite(s,f=!1,m=void 0){let g;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(b,C,L,A){return l._(this,void 0,void 0,function*(){const N=Te(b),V=L>1?"@2x":"",j={},Y={};for(const{id:ue,url:le}of N){const ge=C.transformRequest(C.normalizeSpriteURL(le,V,".json"),"SpriteJSON");j[ue]=l.h(ge,A);const ne=C.transformRequest(C.normalizeSpriteURL(le,V,".png"),"SpriteImage");Y[ue]=G.getImage(ne,A)}return yield Promise.all([...Object.values(j),...Object.values(Y)]),function(ue,le){return l._(this,void 0,void 0,function*(){const ge={};for(const ne in ue){ge[ne]={};const Ie=E.getImageCanvasContext((yield le[ne]).data),Be=(yield ue[ne]).data;for(const _e in Be){const{width:De,height:Ve,x:Ge,y:Ke,sdf:nt,pixelRatio:tt,stretchX:at,stretchY:pt,content:un}=Be[_e];ge[ne][_e]={data:null,pixelRatio:tt,sdf:nt,stretchX:at,stretchY:pt,content:un,spriteData:{width:De,height:Ve,x:Ge,y:Ke,context:Ie}}}}return ge})}(j,Y)})}(s,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(b=>{if(this._spriteRequest=null,b)for(const C in b){this._spritesImagesIds[C]=[];const L=this._spritesImagesIds[C]?this._spritesImagesIds[C].filter(A=>!(A in b)):[];for(const A of L)this.imageManager.removeImage(A),this._changedImages[A]=!0;for(const A in b[C]){const N=C==="default"?A:`${C}:${A}`;this._spritesImagesIds[C].push(N),N in this.imageManager.images?this.imageManager.updateImage(N,b[C][A],!1):this.imageManager.addImage(N,b[C][A]),f&&(this._changedImages[N]=!0)}}}).catch(b=>{this._spriteRequest=null,g=b,this.fire(new l.j(g))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),f&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"})),m&&m(g)})}_unloadSprite(){for(const s of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(s),this._changedImages[s]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}_validateLayer(s){const f=this.sourceCaches[s.source];if(!f)return;const m=s.sourceLayer;if(!m)return;const g=f.getSource();(g.type==="geojson"||g.vectorLayerIds&&g.vectorLayerIds.indexOf(m)===-1)&&this.fire(new l.j(new Error(`Source layer "${m}" does not exist on source "${g.id}" as specified by style layer "${s.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const s in this.sourceCaches)if(!this.sourceCaches[s].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(s){const f=this._serializedAllLayers();if(!s||s.length===0)return Object.values(f);const m=[];for(const g of s)f[g]&&m.push(f[g]);return m}_serializedAllLayers(){let s=this._serializedLayers;if(s)return s;s=this._serializedLayers={};const f=Object.keys(this._layers);for(const m of f){const g=this._layers[m];g.type!=="custom"&&(s[m]=g.serialize())}return s}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const s in this.sourceCaches)if(this.sourceCaches[s].hasTransition())return!0;for(const s in this._layers)if(this._layers[s].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(s){if(!this._loaded)return;const f=this._changed;if(f){const g=Object.keys(this._updatedLayers),b=Object.keys(this._removedLayers);(g.length||b.length)&&this._updateWorkerLayers(g,b);for(const C in this._updatedSources){const L=this._updatedSources[C];if(L==="reload")this._reloadSource(C);else{if(L!=="clear")throw new Error(`Invalid action ${L}`);this._clearSource(C)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const C in this._updatedPaintProps)this._layers[C].updateTransitions(s);this.light.updateTransitions(s),this._resetUpdates()}const m={};for(const g in this.sourceCaches){const b=this.sourceCaches[g];m[g]=b.used,b.used=!1}for(const g of this._order){const b=this._layers[g];b.recalculate(s,this._availableImages),!b.isHidden(s.zoom)&&b.source&&(this.sourceCaches[b.source].used=!0)}for(const g in m){const b=this.sourceCaches[g];!!m[g]!=!!b.used&&b.fire(new l.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:g}))}this.light.recalculate(s),this.z=s.zoom,f&&this.fire(new l.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const s=Object.keys(this._changedImages);if(s.length){for(const f in this.sourceCaches)this.sourceCaches[f].reloadTilesForDependencies(["icons","patterns"],s);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const s in this.sourceCaches)this.sourceCaches[s].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(s,f){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(s),removedIds:f})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(s,f={}){var m;this._checkLoaded();const g=this.serialize();if(s=f.transformStyle?f.transformStyle(g,s):s,((m=f.validate)===null||m===void 0||m)&&Pr(this,l.x(s)))return!1;(s=l.aA(s)).layers=l.ay(s.layers);const b=l.aB(g,s),C=this._getOperationsToPerform(b);if(C.unimplemented.length>0)throw new Error(`Unimplemented: ${C.unimplemented.join(", ")}.`);if(C.operations.length===0)return!1;for(const L of C.operations)L();return this.stylesheet=s,this._serializedLayers=null,!0}_getOperationsToPerform(s){const f=[],m=[];for(const g of s)switch(g.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":f.push(()=>this.addLayer.apply(this,g.args));break;case"removeLayer":f.push(()=>this.removeLayer.apply(this,g.args));break;case"setPaintProperty":f.push(()=>this.setPaintProperty.apply(this,g.args));break;case"setLayoutProperty":f.push(()=>this.setLayoutProperty.apply(this,g.args));break;case"setFilter":f.push(()=>this.setFilter.apply(this,g.args));break;case"addSource":f.push(()=>this.addSource.apply(this,g.args));break;case"removeSource":f.push(()=>this.removeSource.apply(this,g.args));break;case"setLayerZoomRange":f.push(()=>this.setLayerZoomRange.apply(this,g.args));break;case"setLight":f.push(()=>this.setLight.apply(this,g.args));break;case"setGeoJSONSourceData":f.push(()=>this.setGeoJSONSourceData.apply(this,g.args));break;case"setGlyphs":f.push(()=>this.setGlyphs.apply(this,g.args));break;case"setSprite":f.push(()=>this.setSprite.apply(this,g.args));break;case"setTerrain":f.push(()=>this.map.setTerrain.apply(this,g.args));break;case"setTransition":f.push(()=>{});break;default:m.push(g.command)}return{operations:f,unimplemented:m}}addImage(s,f){if(this.getImage(s))return this.fire(new l.j(new Error(`An image named "${s}" already exists.`)));this.imageManager.addImage(s,f),this._afterImageUpdated(s)}updateImage(s,f){this.imageManager.updateImage(s,f)}getImage(s){return this.imageManager.getImage(s)}removeImage(s){if(!this.getImage(s))return this.fire(new l.j(new Error(`An image named "${s}" does not exist.`)));this.imageManager.removeImage(s),this._afterImageUpdated(s)}_afterImageUpdated(s){this._availableImages=this.imageManager.listImages(),this._changedImages[s]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(s,f,m={}){if(this._checkLoaded(),this.sourceCaches[s]!==void 0)throw new Error(`Source "${s}" already exists.`);if(!f.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(f).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(f.type)>=0&&this._validate(l.x.source,`sources.${s}`,f,null,m))return;this.map&&this.map._collectResourceTiming&&(f.collectResourceTiming=!0);const g=this.sourceCaches[s]=new li(s,f,this.dispatcher);g.style=this,g.setEventedParent(this,()=>({isSourceLoaded:g.loaded(),source:g.serialize(),sourceId:s})),g.onAdd(this.map),this._changed=!0}removeSource(s){if(this._checkLoaded(),this.sourceCaches[s]===void 0)throw new Error("There is no source with this ID");for(const m in this._layers)if(this._layers[m].source===s)return this.fire(new l.j(new Error(`Source "${s}" cannot be removed while layer "${m}" is using it.`)));const f=this.sourceCaches[s];delete this.sourceCaches[s],delete this._updatedSources[s],f.fire(new l.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:s})),f.setEventedParent(null),f.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(s,f){if(this._checkLoaded(),this.sourceCaches[s]===void 0)throw new Error(`There is no source with this ID=${s}`);const m=this.sourceCaches[s].getSource();if(m.type!=="geojson")throw new Error(`geojsonSource.type is ${m.type}, which is !== 'geojson`);m.setData(f),this._changed=!0}getSource(s){return this.sourceCaches[s]&&this.sourceCaches[s].getSource()}addLayer(s,f,m={}){this._checkLoaded();const g=s.id;if(this.getLayer(g))return void this.fire(new l.j(new Error(`Layer "${g}" already exists on this map.`)));let b;if(s.type==="custom"){if(Pr(this,l.aC(s)))return;b=l.az(s)}else{if("source"in s&&typeof s.source=="object"&&(this.addSource(g,s.source),s=l.aA(s),s=l.e(s,{source:g})),this._validate(l.x.layer,`layers.${g}`,s,{arrayIndex:-1},m))return;b=l.az(s),this._validateLayer(b),b.setEventedParent(this,{layer:{id:g}})}const C=f?this._order.indexOf(f):this._order.length;if(f&&C===-1)this.fire(new l.j(new Error(`Cannot add layer "${g}" before non-existing layer "${f}".`)));else{if(this._order.splice(C,0,g),this._layerOrderChanged=!0,this._layers[g]=b,this._removedLayers[g]&&b.source&&b.type!=="custom"){const L=this._removedLayers[g];delete this._removedLayers[g],L.type!==b.type?this._updatedSources[b.source]="clear":(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause())}this._updateLayer(b),b.onAdd&&b.onAdd(this.map)}}moveLayer(s,f){if(this._checkLoaded(),this._changed=!0,!this._layers[s])return void this.fire(new l.j(new Error(`The layer '${s}' does not exist in the map's style and cannot be moved.`)));if(s===f)return;const m=this._order.indexOf(s);this._order.splice(m,1);const g=f?this._order.indexOf(f):this._order.length;f&&g===-1?this.fire(new l.j(new Error(`Cannot move layer "${s}" before non-existing layer "${f}".`))):(this._order.splice(g,0,s),this._layerOrderChanged=!0)}removeLayer(s){this._checkLoaded();const f=this._layers[s];if(!f)return void this.fire(new l.j(new Error(`Cannot remove non-existing layer "${s}".`)));f.setEventedParent(null);const m=this._order.indexOf(s);this._order.splice(m,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[s]=f,delete this._layers[s],this._serializedLayers&&delete this._serializedLayers[s],delete this._updatedLayers[s],delete this._updatedPaintProps[s],f.onRemove&&f.onRemove(this.map)}getLayer(s){return this._layers[s]}getLayersOrder(){return[...this._order]}hasLayer(s){return s in this._layers}setLayerZoomRange(s,f,m){this._checkLoaded();const g=this.getLayer(s);g?g.minzoom===f&&g.maxzoom===m||(f!=null&&(g.minzoom=f),m!=null&&(g.maxzoom=m),this._updateLayer(g)):this.fire(new l.j(new Error(`Cannot set the zoom range of non-existing layer "${s}".`)))}setFilter(s,f,m={}){this._checkLoaded();const g=this.getLayer(s);if(g){if(!l.aD(g.filter,f))return f==null?(g.filter=void 0,void this._updateLayer(g)):void(this._validate(l.x.filter,`layers.${g.id}.filter`,f,null,m)||(g.filter=l.aA(f),this._updateLayer(g)))}else this.fire(new l.j(new Error(`Cannot filter non-existing layer "${s}".`)))}getFilter(s){return l.aA(this.getLayer(s).filter)}setLayoutProperty(s,f,m,g={}){this._checkLoaded();const b=this.getLayer(s);b?l.aD(b.getLayoutProperty(f),m)||(b.setLayoutProperty(f,m,g),this._updateLayer(b)):this.fire(new l.j(new Error(`Cannot style non-existing layer "${s}".`)))}getLayoutProperty(s,f){const m=this.getLayer(s);if(m)return m.getLayoutProperty(f);this.fire(new l.j(new Error(`Cannot get style of non-existing layer "${s}".`)))}setPaintProperty(s,f,m,g={}){this._checkLoaded();const b=this.getLayer(s);b?l.aD(b.getPaintProperty(f),m)||(b.setPaintProperty(f,m,g)&&this._updateLayer(b),this._changed=!0,this._updatedPaintProps[s]=!0,this._serializedLayers=null):this.fire(new l.j(new Error(`Cannot style non-existing layer "${s}".`)))}getPaintProperty(s,f){return this.getLayer(s).getPaintProperty(f)}setFeatureState(s,f){this._checkLoaded();const m=s.source,g=s.sourceLayer,b=this.sourceCaches[m];if(b===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const C=b.getSource().type;C==="geojson"&&g?this.fire(new l.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):C!=="vector"||g?(s.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),b.setFeatureState(g,s.id,f)):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(s,f){this._checkLoaded();const m=s.source,g=this.sourceCaches[m];if(g===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const b=g.getSource().type,C=b==="vector"?s.sourceLayer:void 0;b!=="vector"||C?f&&typeof s.id!="string"&&typeof s.id!="number"?this.fire(new l.j(new Error("A feature id is required to remove its specific state property."))):g.removeFeatureState(C,s.id,f):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(s){this._checkLoaded();const f=s.source,m=s.sourceLayer,g=this.sourceCaches[f];if(g!==void 0)return g.getSource().type!=="vector"||m?(s.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),g.getFeatureState(m,s.id)):void this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.j(new Error(`The source '${f}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const s=l.aE(this.sourceCaches,b=>b.serialize()),f=this._serializeByIds(this._order),m=this.map.getTerrain()||void 0,g=this.stylesheet;return l.aF({version:g.version,name:g.name,metadata:g.metadata,light:g.light,center:g.center,zoom:g.zoom,bearing:g.bearing,pitch:g.pitch,sprite:g.sprite,glyphs:g.glyphs,transition:g.transition,sources:s,layers:f,terrain:m},b=>b!==void 0)}_updateLayer(s){this._updatedLayers[s.id]=!0,s.source&&!this._updatedSources[s.source]&&this.sourceCaches[s.source].getSource().type!=="raster"&&(this._updatedSources[s.source]="reload",this.sourceCaches[s.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(s){const f=C=>this._layers[C].type==="fill-extrusion",m={},g=[];for(let C=this._order.length-1;C>=0;C--){const L=this._order[C];if(f(L)){m[L]=C;for(const A of s){const N=A[L];if(N)for(const V of N)g.push(V)}}}g.sort((C,L)=>L.intersectionZ-C.intersectionZ);const b=[];for(let C=this._order.length-1;C>=0;C--){const L=this._order[C];if(f(L))for(let A=g.length-1;A>=0;A--){const N=g[A].feature;if(m[N.layer.id]{const nt=Ie.featureSortOrder;if(nt){const tt=nt.indexOf(Ge.featureIndex);return nt.indexOf(Ke.featureIndex)-tt}return Ke.featureIndex-Ge.featureIndex});for(const Ge of Ve)De.push(Ge)}}for(const Ie in le)le[Ie].forEach(Be=>{const _e=Be.feature,De=N[L[Ie].source].getFeatureState(_e.layer["source-layer"],_e.id);_e.source=_e.layer.source,_e.layer["source-layer"]&&(_e.sourceLayer=_e.layer["source-layer"]),_e.state=De});return le}(this._layers,C,this.sourceCaches,s,f,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(b)}querySourceFeatures(s,f){f&&f.filter&&this._validate(l.x.filter,"querySourceFeatures.filter",f.filter,null,f);const m=this.sourceCaches[s];return m?function(g,b){const C=g.getRenderableIds().map(N=>g.getTileByID(N)),L=[],A={};for(let N=0;NY.getTileByID(ue)).sort((ue,le)=>le.tileID.overscaledZ-ue.tileID.overscaledZ||(ue.tileID.isLessThan(le.tileID)?-1:1))}const j=this.crossTileSymbolIndex.addLayer(V,A[V.source],s.center.lng);C=C||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((b=b||this._layerOrderChanged||m===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(E.now(),s.zoom))&&(this.pauseablePlacement=new hs(s,this.map.terrain,this._order,b,f,m,g,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(E.now()),L=!0),C&&this.pauseablePlacement.placement.setStale()),L||C)for(const N of this._order){const V=this._layers[N];V.type==="symbol"&&this.placement.updateLayerOpacities(V,A[V.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(E.now())}_releaseSymbolFadeTiles(){for(const s in this.sourceCaches)this.sourceCaches[s].releaseSymbolFadeTiles()}getImages(s,f){return l._(this,void 0,void 0,function*(){const m=yield this.imageManager.getImages(f.icons);this._updateTilesForChangedImages();const g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,f.icons),m})}getGlyphs(s,f){return l._(this,void 0,void 0,function*(){const m=yield this.glyphManager.getGlyphs(f.stacks),g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,[""]),m})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(s,f={}){this._checkLoaded(),s&&this._validate(l.x.glyphs,"glyphs",s,null,f)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=s,this.glyphManager.entries={},this.glyphManager.setURL(s))}addSprite(s,f,m={},g){this._checkLoaded();const b=[{id:s,url:f}],C=[...Te(this.stylesheet.sprite),...b];this._validate(l.x.sprite,"sprite",C,null,m)||(this.stylesheet.sprite=C,this._loadSprite(b,!0,g))}removeSprite(s){this._checkLoaded();const f=Te(this.stylesheet.sprite);if(f.find(m=>m.id===s)){if(this._spritesImagesIds[s])for(const m of this._spritesImagesIds[s])this.imageManager.removeImage(m),this._changedImages[m]=!0;f.splice(f.findIndex(m=>m.id===s),1),this.stylesheet.sprite=f.length>0?f:void 0,delete this._spritesImagesIds[s],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}else this.fire(new l.j(new Error(`Sprite "${s}" doesn't exists on this map.`)))}getSprite(){return Te(this.stylesheet.sprite)}setSprite(s,f={},m){this._checkLoaded(),s&&this._validate(l.x.sprite,"sprite",s,null,f)||(this.stylesheet.sprite=s,s?this._loadSprite(s,!0,m):(this._unloadSprite(),m&&m(null)))}}var _h=l.X([{name:"a_pos",type:"Int16",components:2}]),$s="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const _c={prelude:Jn(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -`,`#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 -);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} -#ifdef TERRAIN3D -uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; -#endif -const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { -#ifdef TERRAIN3D -highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; -#else -return 0.0; -#endif -}`),background:Jn(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Jn(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Jn(`varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Jn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Jn(`uniform highp float u_intensity;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:Jn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Jn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Jn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Jn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Jn(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Jn(`varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Jn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Jn(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Jn(`varying vec4 v_color;void main() {gl_FragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Jn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 -? a_pos -: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Jn(`#ifdef GL_ES -precision highp float; -#endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Jn(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; -#define PI 3.141592653589793 -void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Jn(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_width2=vec2(outset,inset);}`),lineGradient:Jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_width2=vec2(outset,inset);}`),linePattern:Jn(`#ifdef GL_ES -precision highp float; -#endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; -#endif -v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Jn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Jn(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Jn(`#define SDF_PX 8.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Jn(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Jn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",$s),terrainDepth:Jn("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",$s),terrainCoords:Jn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",$s)};function Jn(y,s){const f=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,m=s.match(/attribute ([\w]+) ([\w]+)/g),g=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),b=s.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),C=b?b.concat(g):g,L={};return{fragmentSource:y=y.replace(f,(A,N,V,j,Y)=>(L[Y]=!0,N==="define"?` -#ifndef HAS_UNIFORM_u_${Y} -varying ${V} ${j} ${Y}; -#else -uniform ${V} ${j} u_${Y}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${Y} - ${V} ${j} ${Y} = u_${Y}; -#endif -`)),vertexSource:s=s.replace(f,(A,N,V,j,Y)=>{const ue=j==="float"?"vec2":"vec4",le=Y.match(/color/)?"color":ue;return L[Y]?N==="define"?` -#ifndef HAS_UNIFORM_u_${Y} -uniform lowp float u_${Y}_t; -attribute ${V} ${ue} a_${Y}; -varying ${V} ${j} ${Y}; -#else -uniform ${V} ${j} u_${Y}; -#endif -`:le==="vec4"?` -#ifndef HAS_UNIFORM_u_${Y} - ${Y} = a_${Y}; -#else - ${V} ${j} ${Y} = u_${Y}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${Y} - ${Y} = unpack_mix_${le}(a_${Y}, u_${Y}_t); -#else - ${V} ${j} ${Y} = u_${Y}; -#endif -`:N==="define"?` -#ifndef HAS_UNIFORM_u_${Y} -uniform lowp float u_${Y}_t; -attribute ${V} ${ue} a_${Y}; -#else -uniform ${V} ${j} u_${Y}; -#endif -`:le==="vec4"?` -#ifndef HAS_UNIFORM_u_${Y} - ${V} ${j} ${Y} = a_${Y}; -#else - ${V} ${j} ${Y} = u_${Y}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${Y} - ${V} ${j} ${Y} = unpack_mix_${le}(a_${Y}, u_${Y}_t); -#else - ${V} ${j} ${Y} = u_${Y}; -#endif -`}),staticAttributes:m,staticUniforms:C}}class yh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(s,f,m,g,b,C,L,A,N){this.context=s;let V=this.boundPaintVertexBuffers.length!==g.length;for(let j=0;!V&&j({u_depth:new l.aG(Ge,Ke.u_depth),u_terrain:new l.aG(Ge,Ke.u_terrain),u_terrain_dim:new l.aH(Ge,Ke.u_terrain_dim),u_terrain_matrix:new l.aI(Ge,Ke.u_terrain_matrix),u_terrain_unpack:new l.aJ(Ge,Ke.u_terrain_unpack),u_terrain_exaggeration:new l.aH(Ge,Ke.u_terrain_exaggeration)}))(s,Ve),this.binderUniforms=m?m.getUniforms(s,Ve):[]}draw(s,f,m,g,b,C,L,A,N,V,j,Y,ue,le,ge,ne,Ie,Be){const _e=s.gl;if(this.failedToCreate)return;if(s.program.set(this.program),s.setDepthMode(m),s.setStencilMode(g),s.setColorMode(b),s.setCullFace(C),A){s.activeTexture.set(_e.TEXTURE2),_e.bindTexture(_e.TEXTURE_2D,A.depthTexture),s.activeTexture.set(_e.TEXTURE3),_e.bindTexture(_e.TEXTURE_2D,A.texture);for(const Ve in this.terrainUniforms)this.terrainUniforms[Ve].set(A[Ve])}for(const Ve in this.fixedUniforms)this.fixedUniforms[Ve].set(L[Ve]);ge&&ge.setUniforms(s,this.binderUniforms,ue,{zoom:le});let De=0;switch(f){case _e.LINES:De=2;break;case _e.TRIANGLES:De=3;break;case _e.LINE_STRIP:De=1}for(const Ve of Y.get()){const Ge=Ve.vaos||(Ve.vaos={});(Ge[N]||(Ge[N]=new yh)).bind(s,this,V,ge?ge.getPaintVertexBuffers():[],j,Ve.vertexOffset,ne,Ie,Be),_e.drawElements(f,Ve.primitiveLength*De,_e.UNSIGNED_SHORT,Ve.primitiveOffset*De*2)}}}function vh(y,s,f){const m=1/tn(f,1,s.transform.tileZoom),g=Math.pow(2,f.tileID.overscaledZ),b=f.tileSize*Math.pow(2,s.transform.tileZoom)/g,C=b*(f.tileID.canonical.x+f.tileID.wrap*g),L=b*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[m,y.fromScale,y.toScale],u_fade:y.t,u_pixel_coord_upper:[C>>16,L>>16],u_pixel_coord_lower:[65535&C,65535&L]}}const yc=(y,s,f,m)=>{const g=s.style.light,b=g.properties.get("position"),C=[b.x,b.y,b.z],L=function(){var N=new l.A(9);return l.A!=Float32Array&&(N[1]=0,N[2]=0,N[3]=0,N[5]=0,N[6]=0,N[7]=0),N[0]=1,N[4]=1,N[8]=1,N}();g.properties.get("anchor")==="viewport"&&function(N,V){var j=Math.sin(V),Y=Math.cos(V);N[0]=Y,N[1]=j,N[2]=0,N[3]=-j,N[4]=Y,N[5]=0,N[6]=0,N[7]=0,N[8]=1}(L,-s.transform.angle),function(N,V,j){var Y=V[0],ue=V[1],le=V[2];N[0]=Y*j[0]+ue*j[3]+le*j[6],N[1]=Y*j[1]+ue*j[4]+le*j[7],N[2]=Y*j[2]+ue*j[5]+le*j[8]}(C,C,L);const A=g.properties.get("color");return{u_matrix:y,u_lightpos:C,u_lightintensity:g.properties.get("intensity"),u_lightcolor:[A.r,A.g,A.b],u_vertical_gradient:+f,u_opacity:m}},Py=(y,s,f,m,g,b,C)=>l.e(yc(y,s,f,m),vh(b,s,C),{u_height_factor:-Math.pow(2,g.overscaledZ)/C.tileSize/8}),Mm=y=>({u_matrix:y}),bh=(y,s,f,m)=>l.e(Mm(y),vh(f,s,m)),My=(y,s)=>({u_matrix:y,u_world:s}),Am=(y,s,f,m,g)=>l.e(bh(y,s,f,m),{u_world:g}),Ay=(y,s,f,m)=>{const g=y.transform;let b,C;if(m.paint.get("circle-pitch-alignment")==="map"){const L=tn(f,1,g.zoom);b=!0,C=[L,L]}else b=!1,C=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(m.paint.get("circle-pitch-scale")==="map"),u_matrix:y.translatePosMatrix(s.posMatrix,f,m.paint.get("circle-translate"),m.paint.get("circle-translate-anchor")),u_pitch_with_map:+b,u_device_pixel_ratio:y.pixelRatio,u_extrude_scale:C}},km=(y,s,f)=>{const m=tn(f,1,s.zoom),g=Math.pow(2,s.zoom-f.tileID.overscaledZ),b=f.tileID.overscaleFactor();return{u_matrix:y,u_camera_to_center_distance:s.cameraToCenterDistance,u_pixels_to_tile_units:m,u_extrude_scale:[s.pixelsToGLUnits[0]/(m*g),s.pixelsToGLUnits[1]/(m*g)],u_overscale_factor:b}},Dm=(y,s,f=1)=>({u_matrix:y,u_color:s,u_overlay:0,u_overlay_scale:f}),xh=y=>({u_matrix:y}),Rm=(y,s,f,m)=>({u_matrix:y,u_extrude_scale:tn(s,1,f),u_intensity:m});function Nm(y,s){const f=Math.pow(2,s.canonical.z),m=s.canonical.y;return[new l.Y(0,m/f).toLngLat().lat,new l.Y(0,(m+1)/f).toLngLat().lat]}const wh=(y,s,f,m)=>{const g=y.transform;return{u_matrix:vc(y,s,f,m),u_ratio:1/tn(s,1,g.zoom),u_device_pixel_ratio:y.pixelRatio,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},Om=(y,s,f,m,g)=>l.e(wh(y,s,f,g),{u_image:0,u_image_height:m}),Bl=(y,s,f,m,g)=>{const b=y.transform,C=jo(s,b);return{u_matrix:vc(y,s,f,g),u_texsize:s.imageAtlasTexture.size,u_ratio:1/tn(s,1,b.zoom),u_device_pixel_ratio:y.pixelRatio,u_image:0,u_scale:[C,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Sh=(y,s,f,m,g,b)=>{const C=y.lineAtlas,L=jo(s,y.transform),A=f.layout.get("line-cap")==="round",N=C.getDash(m.from,A),V=C.getDash(m.to,A),j=N.width*g.fromScale,Y=V.width*g.toScale;return l.e(wh(y,s,f,b),{u_patternscale_a:[L/j,-N.height/2],u_patternscale_b:[L/Y,-V.height/2],u_sdfgamma:C.width/(256*Math.min(j,Y)*y.pixelRatio)/2,u_image:0,u_tex_y_a:N.y,u_tex_y_b:V.y,u_mix:g.t})};function jo(y,s){return 1/tn(y,1,s.tileZoom)}function vc(y,s,f,m){return y.translatePosMatrix(m?m.posMatrix:s.tileID.posMatrix,s,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Eh=(y,s,f,m,g)=>{return{u_matrix:y,u_tl_parent:s,u_scale_parent:f,u_buffer_scale:1,u_fade_t:m.mix,u_opacity:m.opacity*g.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:g.paint.get("raster-brightness-min"),u_brightness_high:g.paint.get("raster-brightness-max"),u_saturation_factor:(C=g.paint.get("raster-saturation"),C>0?1-1/(1.001-C):-C),u_contrast_factor:(b=g.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:bc(g.paint.get("raster-hue-rotate"))};var b,C};function bc(y){y*=Math.PI/180;const s=Math.sin(y),f=Math.cos(y);return[(2*f+1)/3,(-Math.sqrt(3)*s-f+1)/3,(Math.sqrt(3)*s-f+1)/3]}const xc=(y,s,f,m,g,b,C,L,A,N)=>{const V=g.transform;return{u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:s?s.uSizeT:0,u_size:s?s.uSize:0,u_camera_to_center_distance:V.cameraToCenterDistance,u_pitch:V.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:V.width/V.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:C,u_coord_matrix:L,u_is_text:+A,u_pitch_with_map:+m,u_texsize:N,u_texture:0}},wc=(y,s,f,m,g,b,C,L,A,N,V)=>{const j=g.transform;return l.e(xc(y,s,f,m,g,b,C,L,A,N),{u_gamma_scale:m?Math.cos(j._pitch)*j.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:+V})},Sc=(y,s,f,m,g,b,C,L,A,N)=>l.e(wc(y,s,f,m,g,b,C,L,!0,A,!0),{u_texsize_icon:N,u_texture_icon:1}),ky=(y,s,f)=>({u_matrix:y,u_opacity:s,u_color:f}),Dy=(y,s,f,m,g,b)=>l.e(function(C,L,A,N){const V=A.imageManager.getPattern(C.from.toString()),j=A.imageManager.getPattern(C.to.toString()),{width:Y,height:ue}=A.imageManager.getPixelSize(),le=Math.pow(2,N.tileID.overscaledZ),ge=N.tileSize*Math.pow(2,A.transform.tileZoom)/le,ne=ge*(N.tileID.canonical.x+N.tileID.wrap*le),Ie=ge*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:V.tl,u_pattern_br_a:V.br,u_pattern_tl_b:j.tl,u_pattern_br_b:j.br,u_texsize:[Y,ue],u_mix:L.t,u_pattern_size_a:V.displaySize,u_pattern_size_b:j.displaySize,u_scale_a:L.fromScale,u_scale_b:L.toScale,u_tile_units_to_pixels:1/tn(N,1,A.transform.tileZoom),u_pixel_coord_upper:[ne>>16,Ie>>16],u_pixel_coord_lower:[65535&ne,65535&Ie]}}(m,b,f,g),{u_matrix:y,u_opacity:s}),zm={fillExtrusion:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_lightpos:new l.aK(y,s.u_lightpos),u_lightintensity:new l.aH(y,s.u_lightintensity),u_lightcolor:new l.aK(y,s.u_lightcolor),u_vertical_gradient:new l.aH(y,s.u_vertical_gradient),u_opacity:new l.aH(y,s.u_opacity)}),fillExtrusionPattern:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_lightpos:new l.aK(y,s.u_lightpos),u_lightintensity:new l.aH(y,s.u_lightintensity),u_lightcolor:new l.aK(y,s.u_lightcolor),u_vertical_gradient:new l.aH(y,s.u_vertical_gradient),u_height_factor:new l.aH(y,s.u_height_factor),u_image:new l.aG(y,s.u_image),u_texsize:new l.aL(y,s.u_texsize),u_pixel_coord_upper:new l.aL(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,s.u_pixel_coord_lower),u_scale:new l.aK(y,s.u_scale),u_fade:new l.aH(y,s.u_fade),u_opacity:new l.aH(y,s.u_opacity)}),fill:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix)}),fillPattern:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_image:new l.aG(y,s.u_image),u_texsize:new l.aL(y,s.u_texsize),u_pixel_coord_upper:new l.aL(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,s.u_pixel_coord_lower),u_scale:new l.aK(y,s.u_scale),u_fade:new l.aH(y,s.u_fade)}),fillOutline:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_world:new l.aL(y,s.u_world)}),fillOutlinePattern:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_world:new l.aL(y,s.u_world),u_image:new l.aG(y,s.u_image),u_texsize:new l.aL(y,s.u_texsize),u_pixel_coord_upper:new l.aL(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,s.u_pixel_coord_lower),u_scale:new l.aK(y,s.u_scale),u_fade:new l.aH(y,s.u_fade)}),circle:(y,s)=>({u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_scale_with_map:new l.aG(y,s.u_scale_with_map),u_pitch_with_map:new l.aG(y,s.u_pitch_with_map),u_extrude_scale:new l.aL(y,s.u_extrude_scale),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_matrix:new l.aI(y,s.u_matrix)}),collisionBox:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_pixels_to_tile_units:new l.aH(y,s.u_pixels_to_tile_units),u_extrude_scale:new l.aL(y,s.u_extrude_scale),u_overscale_factor:new l.aH(y,s.u_overscale_factor)}),collisionCircle:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_inv_matrix:new l.aI(y,s.u_inv_matrix),u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_viewport_size:new l.aL(y,s.u_viewport_size)}),debug:(y,s)=>({u_color:new l.aM(y,s.u_color),u_matrix:new l.aI(y,s.u_matrix),u_overlay:new l.aG(y,s.u_overlay),u_overlay_scale:new l.aH(y,s.u_overlay_scale)}),clippingMask:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix)}),heatmap:(y,s)=>({u_extrude_scale:new l.aH(y,s.u_extrude_scale),u_intensity:new l.aH(y,s.u_intensity),u_matrix:new l.aI(y,s.u_matrix)}),heatmapTexture:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_world:new l.aL(y,s.u_world),u_image:new l.aG(y,s.u_image),u_color_ramp:new l.aG(y,s.u_color_ramp),u_opacity:new l.aH(y,s.u_opacity)}),hillshade:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_image:new l.aG(y,s.u_image),u_latrange:new l.aL(y,s.u_latrange),u_light:new l.aL(y,s.u_light),u_shadow:new l.aM(y,s.u_shadow),u_highlight:new l.aM(y,s.u_highlight),u_accent:new l.aM(y,s.u_accent)}),hillshadePrepare:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_image:new l.aG(y,s.u_image),u_dimension:new l.aL(y,s.u_dimension),u_zoom:new l.aH(y,s.u_zoom),u_unpack:new l.aJ(y,s.u_unpack)}),line:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_ratio:new l.aH(y,s.u_ratio),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,s.u_units_to_pixels)}),lineGradient:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_ratio:new l.aH(y,s.u_ratio),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,s.u_units_to_pixels),u_image:new l.aG(y,s.u_image),u_image_height:new l.aH(y,s.u_image_height)}),linePattern:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_texsize:new l.aL(y,s.u_texsize),u_ratio:new l.aH(y,s.u_ratio),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_image:new l.aG(y,s.u_image),u_units_to_pixels:new l.aL(y,s.u_units_to_pixels),u_scale:new l.aK(y,s.u_scale),u_fade:new l.aH(y,s.u_fade)}),lineSDF:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_ratio:new l.aH(y,s.u_ratio),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,s.u_units_to_pixels),u_patternscale_a:new l.aL(y,s.u_patternscale_a),u_patternscale_b:new l.aL(y,s.u_patternscale_b),u_sdfgamma:new l.aH(y,s.u_sdfgamma),u_image:new l.aG(y,s.u_image),u_tex_y_a:new l.aH(y,s.u_tex_y_a),u_tex_y_b:new l.aH(y,s.u_tex_y_b),u_mix:new l.aH(y,s.u_mix)}),raster:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_tl_parent:new l.aL(y,s.u_tl_parent),u_scale_parent:new l.aH(y,s.u_scale_parent),u_buffer_scale:new l.aH(y,s.u_buffer_scale),u_fade_t:new l.aH(y,s.u_fade_t),u_opacity:new l.aH(y,s.u_opacity),u_image0:new l.aG(y,s.u_image0),u_image1:new l.aG(y,s.u_image1),u_brightness_low:new l.aH(y,s.u_brightness_low),u_brightness_high:new l.aH(y,s.u_brightness_high),u_saturation_factor:new l.aH(y,s.u_saturation_factor),u_contrast_factor:new l.aH(y,s.u_contrast_factor),u_spin_weights:new l.aK(y,s.u_spin_weights)}),symbolIcon:(y,s)=>({u_is_size_zoom_constant:new l.aG(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,s.u_is_size_feature_constant),u_size_t:new l.aH(y,s.u_size_t),u_size:new l.aH(y,s.u_size),u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_pitch:new l.aH(y,s.u_pitch),u_rotate_symbol:new l.aG(y,s.u_rotate_symbol),u_aspect_ratio:new l.aH(y,s.u_aspect_ratio),u_fade_change:new l.aH(y,s.u_fade_change),u_matrix:new l.aI(y,s.u_matrix),u_label_plane_matrix:new l.aI(y,s.u_label_plane_matrix),u_coord_matrix:new l.aI(y,s.u_coord_matrix),u_is_text:new l.aG(y,s.u_is_text),u_pitch_with_map:new l.aG(y,s.u_pitch_with_map),u_texsize:new l.aL(y,s.u_texsize),u_texture:new l.aG(y,s.u_texture)}),symbolSDF:(y,s)=>({u_is_size_zoom_constant:new l.aG(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,s.u_is_size_feature_constant),u_size_t:new l.aH(y,s.u_size_t),u_size:new l.aH(y,s.u_size),u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_pitch:new l.aH(y,s.u_pitch),u_rotate_symbol:new l.aG(y,s.u_rotate_symbol),u_aspect_ratio:new l.aH(y,s.u_aspect_ratio),u_fade_change:new l.aH(y,s.u_fade_change),u_matrix:new l.aI(y,s.u_matrix),u_label_plane_matrix:new l.aI(y,s.u_label_plane_matrix),u_coord_matrix:new l.aI(y,s.u_coord_matrix),u_is_text:new l.aG(y,s.u_is_text),u_pitch_with_map:new l.aG(y,s.u_pitch_with_map),u_texsize:new l.aL(y,s.u_texsize),u_texture:new l.aG(y,s.u_texture),u_gamma_scale:new l.aH(y,s.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_is_halo:new l.aG(y,s.u_is_halo)}),symbolTextAndIcon:(y,s)=>({u_is_size_zoom_constant:new l.aG(y,s.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,s.u_is_size_feature_constant),u_size_t:new l.aH(y,s.u_size_t),u_size:new l.aH(y,s.u_size),u_camera_to_center_distance:new l.aH(y,s.u_camera_to_center_distance),u_pitch:new l.aH(y,s.u_pitch),u_rotate_symbol:new l.aG(y,s.u_rotate_symbol),u_aspect_ratio:new l.aH(y,s.u_aspect_ratio),u_fade_change:new l.aH(y,s.u_fade_change),u_matrix:new l.aI(y,s.u_matrix),u_label_plane_matrix:new l.aI(y,s.u_label_plane_matrix),u_coord_matrix:new l.aI(y,s.u_coord_matrix),u_is_text:new l.aG(y,s.u_is_text),u_pitch_with_map:new l.aG(y,s.u_pitch_with_map),u_texsize:new l.aL(y,s.u_texsize),u_texsize_icon:new l.aL(y,s.u_texsize_icon),u_texture:new l.aG(y,s.u_texture),u_texture_icon:new l.aG(y,s.u_texture_icon),u_gamma_scale:new l.aH(y,s.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,s.u_device_pixel_ratio),u_is_halo:new l.aG(y,s.u_is_halo)}),background:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_opacity:new l.aH(y,s.u_opacity),u_color:new l.aM(y,s.u_color)}),backgroundPattern:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_opacity:new l.aH(y,s.u_opacity),u_image:new l.aG(y,s.u_image),u_pattern_tl_a:new l.aL(y,s.u_pattern_tl_a),u_pattern_br_a:new l.aL(y,s.u_pattern_br_a),u_pattern_tl_b:new l.aL(y,s.u_pattern_tl_b),u_pattern_br_b:new l.aL(y,s.u_pattern_br_b),u_texsize:new l.aL(y,s.u_texsize),u_mix:new l.aH(y,s.u_mix),u_pattern_size_a:new l.aL(y,s.u_pattern_size_a),u_pattern_size_b:new l.aL(y,s.u_pattern_size_b),u_scale_a:new l.aH(y,s.u_scale_a),u_scale_b:new l.aH(y,s.u_scale_b),u_pixel_coord_upper:new l.aL(y,s.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,s.u_pixel_coord_lower),u_tile_units_to_pixels:new l.aH(y,s.u_tile_units_to_pixels)}),terrain:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_texture:new l.aG(y,s.u_texture),u_ele_delta:new l.aH(y,s.u_ele_delta)}),terrainDepth:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_ele_delta:new l.aH(y,s.u_ele_delta)}),terrainCoords:(y,s)=>({u_matrix:new l.aI(y,s.u_matrix),u_texture:new l.aG(y,s.u_texture),u_terrain_coords_id:new l.aH(y,s.u_terrain_coords_id),u_ele_delta:new l.aH(y,s.u_ele_delta)})};class Ry{constructor(s,f,m){this.context=s;const g=s.gl;this.buffer=g.createBuffer(),this.dynamicDraw=!!m,this.context.unbindVAO(),s.bindElementBuffer.set(this.buffer),g.bufferData(g.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(s){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,s.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Vl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ih{constructor(s,f,m,g){this.length=f.length,this.attributes=m,this.itemSize=f.bytesPerElement,this.dynamicDraw=g,this.context=s;const b=s.gl;this.buffer=b.createBuffer(),s.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(s){if(s.length!==this.length)throw new Error(`Length of new data is ${s.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,s.arrayBuffer)}enableAttributes(s,f){for(let m=0;m0){const at=l.F(),pt=Ke;l.aP(at,Ge.placementInvProjMatrix,y.transform.glCoordMatrix),l.aP(at,at,Ge.placementViewportMatrix),V.push({circleArray:tt,circleOffset:Y,transform:pt,invTransform:at,coord:De}),j+=tt.length/4,Y=j}nt&&N.draw(L,A.LINES,Mn.disabled,dr.disabled,y.colorModeForRenderPass(),ar.disabled,km(Ke,y.transform,Ve),y.style.map.terrain&&y.style.map.terrain.getTerrainData(De),f.id,nt.layoutVertexBuffer,nt.indexBuffer,nt.segments,null,y.transform.zoom,null,null,nt.collisionVertexBuffer)}if(!C||!V.length)return;const ue=y.useProgram("collisionCircle"),le=new l.aQ;le.resize(4*j),le._trim();let ge=0;for(const _e of V)for(let De=0;De<_e.circleArray.length/4;De++){const Ve=4*De,Ge=_e.circleArray[Ve+0],Ke=_e.circleArray[Ve+1],nt=_e.circleArray[Ve+2],tt=_e.circleArray[Ve+3];le.emplace(ge++,Ge,Ke,nt,tt,0),le.emplace(ge++,Ge,Ke,nt,tt,1),le.emplace(ge++,Ge,Ke,nt,tt,2),le.emplace(ge++,Ge,Ke,nt,tt,3)}(!jl||jl.length<2*j)&&(jl=function(_e){const De=2*_e,Ve=new l.aS;Ve.resize(De),Ve._trim();for(let Ge=0;Ge=0&&(le[ne.associatedIconIndex]={shiftedAnchor:un,angle:mt})}else Je(ne.numGlyphs,Y)}if(N){ue.clear();const ge=y.icon.placedSymbolArray;for(let ne=0;ney.style.map.terrain.getElevation(nt,ps,pi):null,kr=f.layout.get("text-rotation-alignment")==="map";Z(at,nt.posMatrix,y,g,qo,na,ne,N,kr,fi)}const ul=y.translatePosMatrix(nt.posMatrix,tt,b,C),ra=Ie||g&&Ge||zc?Lp:qo,hi=y.translatePosMatrix(na,tt,b,C,!0),Ar=mt&&f.paint.get(g?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let xr;xr=mt?at.iconsInText?Sc(Wt.kind,$t,Be,ne,y,ul,ra,hi,bn,gi):wc(Wt.kind,$t,Be,ne,y,ul,ra,hi,g,bn,!0):xc(Wt.kind,$t,Be,ne,y,ul,ra,hi,g,bn);const fs={program:An,buffers:pt,uniformValues:xr,atlasTexture:Ur,atlasTextureIcon:Mr,atlasInterpolation:$n,atlasInterpolationIcon:Go,isSDF:mt,hasHalo:Ar};if(_e&&at.canOverlap){De=!0;const fi=pt.segments.get();for(const kr of fi)Ke.push({segments:new l.$([kr]),sortKey:kr.sortKey,state:fs,terrainData:mn})}else Ke.push({segments:pt.segments,sortKey:0,state:fs,terrainData:mn})}De&&Ke.sort((nt,tt)=>nt.sortKey-tt.sortKey);for(const nt of Ke){const tt=nt.state;if(Y.activeTexture.set(ue.TEXTURE0),tt.atlasTexture.bind(tt.atlasInterpolation,ue.CLAMP_TO_EDGE),tt.atlasTextureIcon&&(Y.activeTexture.set(ue.TEXTURE1),tt.atlasTextureIcon&&tt.atlasTextureIcon.bind(tt.atlasInterpolationIcon,ue.CLAMP_TO_EDGE)),tt.isSDF){const at=tt.uniformValues;tt.hasHalo&&(at.u_is_halo=1,Hm(tt.buffers,nt.segments,f,y,tt.program,Ve,V,j,at,nt.terrainData)),at.u_is_halo=0}Hm(tt.buffers,nt.segments,f,y,tt.program,Ve,V,j,tt.uniformValues,nt.terrainData)}}function Hm(y,s,f,m,g,b,C,L,A,N){const V=m.context;g.draw(V,V.gl.TRIANGLES,b,C,L,ar.disabled,A,N,f.id,y.layoutVertexBuffer,y.indexBuffer,s,f.paint,m.transform.zoom,y.programConfigurations.get(f.id),y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer)}function Oh(y,s,f,m,g){if(!f||!m||!m.imageAtlas)return;const b=m.imageAtlas.patternPositions;let C=b[f.to.toString()],L=b[f.from.toString()];if(!C&&L&&(C=L),!L&&C&&(L=C),!C||!L){const A=g.getPaintProperty(s);C=b[A],L=b[A]}C&&L&&y.setConstantPatternPositions(C,L)}function Zm(y,s,f,m,g,b,C){const L=y.context.gl,A="fill-pattern",N=f.paint.get(A),V=N&&N.constantOr(1),j=f.getCrossfadeParameters();let Y,ue,le,ge,ne;C?(ue=V&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Y=L.LINES):(ue=V?"fillPattern":"fill",Y=L.TRIANGLES);const Ie=N.constantOr(null);for(const Be of m){const _e=s.getTile(Be);if(V&&!_e.patternsLoaded())continue;const De=_e.getBucket(f);if(!De)continue;const Ve=De.programConfigurations.get(f.id),Ge=y.useProgram(ue,Ve),Ke=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Be);V&&(y.context.activeTexture.set(L.TEXTURE0),_e.imageAtlasTexture.bind(L.LINEAR,L.CLAMP_TO_EDGE),Ve.updatePaintBuffers(j)),Oh(Ve,A,Ie,_e,f);const nt=Ke?Be:null,tt=y.translatePosMatrix(nt?nt.posMatrix:Be.posMatrix,_e,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(C){ge=De.indexBuffer2,ne=De.segments2;const at=[L.drawingBufferWidth,L.drawingBufferHeight];le=ue==="fillOutlinePattern"&&V?Am(tt,y,j,_e,at):My(tt,at)}else ge=De.indexBuffer,ne=De.segments,le=V?bh(tt,y,j,_e):Mm(tt);Ge.draw(y.context,Y,g,y.stencilModeForClipping(Be),b,ar.disabled,le,Ke,f.id,De.layoutVertexBuffer,ge,ne,f.paint,y.transform.zoom,Ve)}}function zh(y,s,f,m,g,b,C){const L=y.context,A=L.gl,N="fill-extrusion-pattern",V=f.paint.get(N),j=V.constantOr(1),Y=f.getCrossfadeParameters(),ue=f.paint.get("fill-extrusion-opacity"),le=V.constantOr(null);for(const ge of m){const ne=s.getTile(ge),Ie=ne.getBucket(f);if(!Ie)continue;const Be=y.style.map.terrain&&y.style.map.terrain.getTerrainData(ge),_e=Ie.programConfigurations.get(f.id),De=y.useProgram(j?"fillExtrusionPattern":"fillExtrusion",_e);j&&(y.context.activeTexture.set(A.TEXTURE0),ne.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),_e.updatePaintBuffers(Y)),Oh(_e,N,le,ne,f);const Ve=y.translatePosMatrix(ge.posMatrix,ne,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),Ge=f.paint.get("fill-extrusion-vertical-gradient"),Ke=j?Py(Ve,y,Ge,ue,ge,Y,ne):yc(Ve,y,Ge,ue);De.draw(L,L.gl.TRIANGLES,g,b,C,ar.backCCW,Ke,Be,f.id,Ie.layoutVertexBuffer,Ie.indexBuffer,Ie.segments,f.paint,y.transform.zoom,_e,y.style.map.terrain&&Ie.centroidVertexBuffer)}}function Fh(y,s,f,m,g,b,C){const L=y.context,A=L.gl,N=f.fbo;if(!N)return;const V=y.useProgram("hillshade"),j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(s);L.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,N.colorAttachment.get()),V.draw(L,A.TRIANGLES,g,b,C,ar.disabled,((Y,ue,le,ge)=>{const ne=le.paint.get("hillshade-shadow-color"),Ie=le.paint.get("hillshade-highlight-color"),Be=le.paint.get("hillshade-accent-color");let _e=le.paint.get("hillshade-illumination-direction")*(Math.PI/180);le.paint.get("hillshade-illumination-anchor")==="viewport"&&(_e-=Y.transform.angle);const De=!Y.options.moving;return{u_matrix:ge?ge.posMatrix:Y.transform.calculatePosMatrix(ue.tileID.toUnwrapped(),De),u_image:0,u_latrange:Nm(0,ue.tileID),u_light:[le.paint.get("hillshade-exaggeration"),_e],u_shadow:ne,u_highlight:Ie,u_accent:Be}})(y,f,m,j?s:null),j,m.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}function Pp(y,s,f,m,g,b){const C=y.context,L=C.gl,A=s.dem;if(A&&A.data){const N=A.dim,V=A.stride,j=A.getPixels();if(C.activeTexture.set(L.TEXTURE1),C.pixelStoreUnpackPremultiplyAlpha.set(!1),s.demTexture=s.demTexture||y.getTileTexture(V),s.demTexture){const ue=s.demTexture;ue.update(j,{premultiply:!1}),ue.bind(L.NEAREST,L.CLAMP_TO_EDGE)}else s.demTexture=new Q(C,j,L.RGBA,{premultiply:!1}),s.demTexture.bind(L.NEAREST,L.CLAMP_TO_EDGE);C.activeTexture.set(L.TEXTURE0);let Y=s.fbo;if(!Y){const ue=new Q(C,{width:N,height:N,data:null},L.RGBA);ue.bind(L.LINEAR,L.CLAMP_TO_EDGE),Y=s.fbo=C.createFramebuffer(N,N,!0,!1),Y.colorAttachment.set(ue.texture)}C.bindFramebuffer.set(Y.framebuffer),C.viewport.set([0,0,N,N]),y.useProgram("hillshadePrepare").draw(C,L.TRIANGLES,m,g,b,ar.disabled,((ue,le)=>{const ge=le.stride,ne=l.F();return l.aN(ne,0,l.W,-l.W,0,0,1),l.H(ne,ne,[0,-l.W,0]),{u_matrix:ne,u_image:1,u_dimension:[ge,ge],u_zoom:ue.overscaledZ,u_unpack:le.getUnpackVector()}})(s.tileID,A),null,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments),s.needsHillshadePrepare=!1}}function Xm(y,s,f,m,g,b){const C=m.paint.get("raster-fade-duration");if(!b&&C>0){const L=E.now(),A=(L-y.timeAdded)/C,N=s?(L-s.timeAdded)/C:-1,V=f.getSource(),j=g.coveringZoomLevel({tileSize:V.tileSize,roundZoom:V.roundZoom}),Y=!s||Math.abs(s.tileID.overscaledZ-j)>Math.abs(y.tileID.overscaledZ-j),ue=Y&&y.refreshedUponExpiration?1:l.ac(Y?A:1-N,0,1);return y.refreshedUponExpiration&&A>=1&&(y.refreshedUponExpiration=!1),s?{opacity:1,mix:1-ue}:{opacity:ue,mix:0}}return{opacity:1,mix:0}}const Ym=new l.aO(1,0,0,1),Bh=new l.aO(0,1,0,1),Mp=new l.aO(0,0,1,1),Gy=new l.aO(1,0,1,1),Km=new l.aO(0,1,1,1);function Br(y,s,f,m){ho(y,0,s+f/2,y.transform.width,f,m)}function il(y,s,f,m){ho(y,s-f/2,0,f,y.transform.height,m)}function ho(y,s,f,m,g,b){const C=y.context,L=C.gl;L.enable(L.SCISSOR_TEST),L.scissor(s*y.pixelRatio,f*y.pixelRatio,m*y.pixelRatio,g*y.pixelRatio),C.clear({color:b}),L.disable(L.SCISSOR_TEST)}function Ap(y,s,f){const m=y.context,g=m.gl,b=f.posMatrix,C=y.useProgram("debug"),L=Mn.disabled,A=dr.disabled,N=y.colorModeForRenderPass(),V="$debug",j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(f);m.activeTexture.set(g.TEXTURE0);const Y=s.getTileByID(f.key).latestRawTileData,ue=Math.floor((Y&&Y.byteLength||0)/1024),le=s.getTile(f).tileSize,ge=512/Math.min(le,512)*(f.overscaledZ/y.transform.zoom)*.5;let ne=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(ne+=` => ${f.overscaledZ}`),function(Ie,Be){Ie.initDebugOverlayCanvas();const _e=Ie.debugOverlayCanvas,De=Ie.context.gl,Ve=Ie.debugOverlayCanvas.getContext("2d");Ve.clearRect(0,0,_e.width,_e.height),Ve.shadowColor="white",Ve.shadowBlur=2,Ve.lineWidth=1.5,Ve.strokeStyle="white",Ve.textBaseline="top",Ve.font="bold 36px Open Sans, sans-serif",Ve.fillText(Be,5,5),Ve.strokeText(Be,5,5),Ie.debugOverlayTexture.update(_e),Ie.debugOverlayTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE)}(y,`${ne} ${ue}kB`),C.draw(m,g.TRIANGLES,L,A,Qr.alphaBlended,ar.disabled,Dm(b,l.aO.transparent,ge),null,V,y.debugBuffer,y.quadTriangleIndexBuffer,y.debugSegments),C.draw(m,g.LINE_STRIP,L,A,N,ar.disabled,Dm(b,l.aO.red),j,V,y.debugBuffer,y.tileBorderIndexBuffer,y.debugSegments)}function Vh(y,s,f){const m=y.context,g=m.gl,b=y.colorModeForRenderPass(),C=new Mn(g.LEQUAL,Mn.ReadWrite,y.depthRangeFor3D),L=y.useProgram("terrain"),A=s.getTerrainMesh();m.bindFramebuffer.set(null),m.viewport.set([0,0,y.width,y.height]);for(const N of f){const V=y.renderToTexture.getTexture(N),j=s.getTerrainData(N.tileID);m.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,V.texture);const Y={u_matrix:y.transform.calculatePosMatrix(N.tileID.toUnwrapped()),u_texture:0,u_ele_delta:s.getMeshFrameDelta(y.transform.zoom)};L.draw(m,g.TRIANGLES,C,dr.disabled,b,ar.backCCW,Y,j,"terrain",A.vertexBuffer,A.indexBuffer,A.segments)}}class Jm{constructor(s,f){this.context=new jy(s),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=li.maxUnderzooming+li.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new nl}resize(s,f,m){if(this.width=Math.floor(s*m),this.height=Math.floor(f*m),this.pixelRatio=m,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const g of this.style._order)this.style._layers[g].resize()}setup(){const s=this.context,f=new l.aV;f.emplaceBack(0,0),f.emplaceBack(l.W,0),f.emplaceBack(0,l.W),f.emplaceBack(l.W,l.W),this.tileExtentBuffer=s.createVertexBuffer(f,_h.members),this.tileExtentSegments=l.$.simpleSegment(0,0,4,2);const m=new l.aV;m.emplaceBack(0,0),m.emplaceBack(l.W,0),m.emplaceBack(0,l.W),m.emplaceBack(l.W,l.W),this.debugBuffer=s.createVertexBuffer(m,_h.members),this.debugSegments=l.$.simpleSegment(0,0,4,5);const g=new l.Z;g.emplaceBack(0,0,0,0),g.emplaceBack(l.W,0,l.W,0),g.emplaceBack(0,l.W,0,l.W),g.emplaceBack(l.W,l.W,l.W,l.W),this.rasterBoundsBuffer=s.createVertexBuffer(g,yn.members),this.rasterBoundsSegments=l.$.simpleSegment(0,0,4,2);const b=new l.aV;b.emplaceBack(0,0),b.emplaceBack(1,0),b.emplaceBack(0,1),b.emplaceBack(1,1),this.viewportBuffer=s.createVertexBuffer(b,_h.members),this.viewportSegments=l.$.simpleSegment(0,0,4,2);const C=new l.aW;C.emplaceBack(0),C.emplaceBack(1),C.emplaceBack(3),C.emplaceBack(2),C.emplaceBack(0),this.tileBorderIndexBuffer=s.createIndexBuffer(C);const L=new l.aX;L.emplaceBack(0,1,2),L.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=s.createIndexBuffer(L);const A=this.context.gl;this.stencilClearMode=new dr({func:A.ALWAYS,mask:0},0,255,A.ZERO,A.ZERO,A.ZERO)}clearStencil(){const s=this.context,f=s.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const m=l.F();l.aN(m,0,this.width,this.height,0,0,1),l.J(m,m,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(s,f.TRIANGLES,Mn.disabled,this.stencilClearMode,Qr.disabled,ar.disabled,xh(m),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(s,f){if(this.currentStencilSource===s.source||!s.isTileClipped()||!f||!f.length)return;this.currentStencilSource=s.source;const m=this.context,g=m.gl;this.nextStencilID+f.length>256&&this.clearStencil(),m.setColorMode(Qr.disabled),m.setDepthMode(Mn.disabled);const b=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const C of f){const L=this._tileClippingMaskIDs[C.key]=this.nextStencilID++,A=this.style.map.terrain&&this.style.map.terrain.getTerrainData(C);b.draw(m,g.TRIANGLES,Mn.disabled,new dr({func:g.ALWAYS,mask:0},L,255,g.KEEP,g.KEEP,g.REPLACE),Qr.disabled,ar.disabled,xh(C.posMatrix),A,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const s=this.nextStencilID++,f=this.context.gl;return new dr({func:f.NOTEQUAL,mask:255},s,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(s){const f=this.context.gl;return new dr({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[s.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(s){const f=this.context.gl,m=s.sort((C,L)=>L.overscaledZ-C.overscaledZ),g=m[m.length-1].overscaledZ,b=m[0].overscaledZ-g+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const C={};for(let L=0;L=0;this.currentLayer--){const A=this.style._layers[m[this.currentLayer]],N=g[A.source],V=b[A.source];this._renderTileClippingMasks(A,V),this.renderLayer(this,N,A,V)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerne.source&&!ne.isHidden(V)?[N.sourceCaches[ne.source]]:[]),ue=Y.filter(ne=>ne.getSource().type==="vector"),le=Y.filter(ne=>ne.getSource().type!=="vector"),ge=ne=>{(!j||j.getSource().maxzoomge(ne)),j||le.forEach(ne=>ge(ne)),j}(this.style,this.transform.zoom);A&&function(N,V,j){for(let Y=0;Y0),g&&(l.a_(f,m),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(b,C){const L=b.context,A=L.gl,N=Qr.unblended,V=new Mn(A.LEQUAL,Mn.ReadWrite,[0,1]),j=C.getTerrainMesh(),Y=C.sourceCache.getRenderableTiles(),ue=b.useProgram("terrainDepth");L.bindFramebuffer.set(C.getFramebuffer("depth").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1});for(const le of Y){const ge=C.getTerrainData(le.tileID),ne={u_matrix:b.transform.calculatePosMatrix(le.tileID.toUnwrapped()),u_ele_delta:C.getMeshFrameDelta(b.transform.zoom)};ue.draw(L,A.TRIANGLES,V,dr.disabled,N,ar.backCCW,ne,ge,"terrain",j.vertexBuffer,j.indexBuffer,j.segments)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain),function(b,C){const L=b.context,A=L.gl,N=Qr.unblended,V=new Mn(A.LEQUAL,Mn.ReadWrite,[0,1]),j=C.getTerrainMesh(),Y=C.getCoordsTexture(),ue=C.sourceCache.getRenderableTiles(),le=b.useProgram("terrainCoords");L.bindFramebuffer.set(C.getFramebuffer("coords").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1}),C.coordsIndex=[];for(const ge of ue){const ne=C.getTerrainData(ge.tileID);L.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,Y.texture);const Ie={u_matrix:b.transform.calculatePosMatrix(ge.tileID.toUnwrapped()),u_terrain_coords_id:(255-C.coordsIndex.length)/255,u_texture:0,u_ele_delta:C.getMeshFrameDelta(b.transform.zoom)};le.draw(L,A.TRIANGLES,V,dr.disabled,N,ar.backCCW,Ie,ne,"terrain",j.vertexBuffer,j.indexBuffer,j.segments),C.coordsIndex.push(ge.tileID.key)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain))}renderLayer(s,f,m,g){if(!m.isHidden(this.transform.zoom)&&(m.type==="background"||m.type==="custom"||(g||[]).length))switch(this.id=m.id,m.type){case"symbol":(function(b,C,L,A,N){if(b.renderPass!=="translucent")return;const V=dr.disabled,j=b.colorModeForRenderPass();(L._unevaluatedLayout.hasValue("text-variable-anchor")||L._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(Y,ue,le,ge,ne,Ie,Be){const _e=ue.transform,De=ne==="map",Ve=Ie==="map";for(const Ge of Y){const Ke=ge.getTile(Ge),nt=Ke.getBucket(le);if(!nt||!nt.text||!nt.text.segments.get().length)continue;const tt=l.ag(nt.textSizeData,_e.zoom),at=tn(Ke,1,ue.transform.zoom),pt=on(Ge.posMatrix,Ve,De,ue.transform,at),un=le.layout.get("icon-text-fit")!=="none"&&nt.hasIconData();if(tt){const mt=Math.pow(2,_e.zoom-Ke.tileID.overscaledZ);Dh(nt,De,Ve,Be,_e,pt,Ge.posMatrix,mt,tt,un,ue.style.map.terrain?(Wt,cn)=>ue.style.map.terrain.getElevation(Ge,Wt,cn):null)}}}(A,b,L,C,L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),N),L.paint.get("icon-opacity").constantOr(1)!==0&&Nh(b,C,L,A,!1,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),L.layout.get("icon-rotation-alignment"),L.layout.get("icon-pitch-alignment"),L.layout.get("icon-keep-upright"),V,j),L.paint.get("text-opacity").constantOr(1)!==0&&Nh(b,C,L,A,!0,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),L.layout.get("text-keep-upright"),V,j),C.map.showCollisionBoxes&&(kh(b,C,L,A,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),!0),kh(b,C,L,A,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),!1))})(s,f,m,g,this.style.placement.variableOffsets);break;case"circle":(function(b,C,L,A){if(b.renderPass!=="translucent")return;const N=L.paint.get("circle-opacity"),V=L.paint.get("circle-stroke-width"),j=L.paint.get("circle-stroke-opacity"),Y=!L.layout.get("circle-sort-key").isConstant();if(N.constantOr(1)===0&&(V.constantOr(1)===0||j.constantOr(1)===0))return;const ue=b.context,le=ue.gl,ge=b.depthModeForSublayer(0,Mn.ReadOnly),ne=dr.disabled,Ie=b.colorModeForRenderPass(),Be=[];for(let _e=0;_e_e.sortKey-De.sortKey);for(const _e of Be){const{programConfiguration:De,program:Ve,layoutVertexBuffer:Ge,indexBuffer:Ke,uniformValues:nt,terrainData:tt}=_e.state;Ve.draw(ue,le.TRIANGLES,ge,ne,Ie,ar.disabled,nt,tt,L.id,Ge,Ke,_e.segments,L.paint,b.transform.zoom,De)}})(s,f,m,g);break;case"heatmap":(function(b,C,L,A){if(L.paint.get("heatmap-opacity")!==0)if(b.renderPass==="offscreen"){const N=b.context,V=N.gl,j=dr.disabled,Y=new Qr([V.ONE,V.ONE],l.aO.transparent,[!0,!0,!0,!0]);(function(ue,le,ge){const ne=ue.gl;ue.activeTexture.set(ne.TEXTURE1),ue.viewport.set([0,0,le.width/4,le.height/4]);let Ie=ge.heatmapFbo;if(Ie)ne.bindTexture(ne.TEXTURE_2D,Ie.colorAttachment.get()),ue.bindFramebuffer.set(Ie.framebuffer);else{const Be=ne.createTexture();ne.bindTexture(ne.TEXTURE_2D,Be),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_S,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_T,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MIN_FILTER,ne.LINEAR),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MAG_FILTER,ne.LINEAR),Ie=ge.heatmapFbo=ue.createFramebuffer(le.width/4,le.height/4,!1,!1),function(_e,De,Ve,Ge){var Ke,nt;const tt=_e.gl,at=(Ke=_e.HALF_FLOAT)!==null&&Ke!==void 0?Ke:tt.UNSIGNED_BYTE,pt=(nt=_e.RGBA16F)!==null&&nt!==void 0?nt:tt.RGBA;tt.texImage2D(tt.TEXTURE_2D,0,pt,De.width/4,De.height/4,0,tt.RGBA,at,null),Ge.colorAttachment.set(Ve)}(ue,le,Be,Ie)}})(N,b,L),N.clear({color:l.aO.transparent});for(let ue=0;ue{const _e=l.F();l.aN(_e,0,ge.width,ge.height,0,0,1);const De=ge.context.gl;return{u_matrix:_e,u_world:[De.drawingBufferWidth,De.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:ne.paint.get("heatmap-opacity")}})(N,V),null,V.id,N.viewportBuffer,N.quadTriangleIndexBuffer,N.viewportSegments,V.paint,N.transform.zoom)}(b,L))})(s,f,m,g);break;case"line":(function(b,C,L,A){if(b.renderPass!=="translucent")return;const N=L.paint.get("line-opacity"),V=L.paint.get("line-width");if(N.constantOr(1)===0||V.constantOr(1)===0)return;const j=b.depthModeForSublayer(0,Mn.ReadOnly),Y=b.colorModeForRenderPass(),ue=L.paint.get("line-dasharray"),le=L.paint.get("line-pattern"),ge=le.constantOr(1),ne=L.paint.get("line-gradient"),Ie=L.getCrossfadeParameters(),Be=ge?"linePattern":ue?"lineSDF":ne?"lineGradient":"line",_e=b.context,De=_e.gl;let Ve=!0;for(const Ge of A){const Ke=C.getTile(Ge);if(ge&&!Ke.patternsLoaded())continue;const nt=Ke.getBucket(L);if(!nt)continue;const tt=nt.programConfigurations.get(L.id),at=b.context.program.get(),pt=b.useProgram(Be,tt),un=Ve||pt.program!==at,mt=b.style.map.terrain&&b.style.map.terrain.getTerrainData(Ge),Wt=le.constantOr(null);if(Wt&&Ke.imageAtlas){const $t=Ke.imageAtlas,mn=$t.patternPositions[Wt.to.toString()],bn=$t.patternPositions[Wt.from.toString()];mn&&bn&&tt.setConstantPatternPositions(mn,bn)}const cn=mt?Ge:null,An=ge?Bl(b,Ke,L,Ie,cn):ue?Sh(b,Ke,L,ue,Ie,cn):ne?Om(b,Ke,L,nt.lineClipsArray.length,cn):wh(b,Ke,L,cn);if(ge)_e.activeTexture.set(De.TEXTURE0),Ke.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),tt.updatePaintBuffers(Ie);else if(ue&&(un||b.lineAtlas.dirty))_e.activeTexture.set(De.TEXTURE0),b.lineAtlas.bind(_e);else if(ne){const $t=nt.gradients[L.id];let mn=$t.texture;if(L.gradientVersion!==$t.version){let bn=256;if(L.stepInterpolant){const Ur=C.getSource().maxzoom,$n=Ge.canonical.z===Ur?Math.ceil(1<0?f.pop():null}isPatternMissing(s){if(!s)return!1;if(!s.from||!s.to)return!0;const f=this.imageManager.getPattern(s.from.toString()),m=this.imageManager.getPattern(s.to.toString());return!f||!m}useProgram(s,f){this.cache=this.cache||{};const m=s+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[m]||(this.cache[m]=new rl(this.context,_c[s],f,zm[s],this._showOverdrawInspector,this.style.map.terrain)),this.cache[m]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const s=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(s.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Q(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:s,drawingBufferHeight:f}=this.context.gl;return this.width!==s||this.height!==f}}class ol{constructor(s,f){this.points=s,this.planes=f}static fromInvProjectionMatrix(s,f,m){const g=Math.pow(2,m),b=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(L=>{const A=1/(L=l.af([],L,s))[3]/f*g;return l.a$(L,L,[A,A,1/L[3],A])}),C=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(L=>{const A=function(Y,ue){var le=ue[0],ge=ue[1],ne=ue[2],Ie=le*le+ge*ge+ne*ne;return Ie>0&&(Ie=1/Math.sqrt(Ie)),Y[0]=ue[0]*Ie,Y[1]=ue[1]*Ie,Y[2]=ue[2]*Ie,Y}([],function(Y,ue,le){var ge=ue[0],ne=ue[1],Ie=ue[2],Be=le[0],_e=le[1],De=le[2];return Y[0]=ne*De-Ie*_e,Y[1]=Ie*Be-ge*De,Y[2]=ge*_e-ne*Be,Y}([],ce([],b[L[0]],b[L[1]]),ce([],b[L[2]],b[L[1]]))),N=-((V=A)[0]*(j=b[L[1]])[0]+V[1]*j[1]+V[2]*j[2]);var V,j;return A.concat(N)});return new ol(b,C)}}class sl{constructor(s,f){this.min=s,this.max=f,this.center=function(m,g,b){return m[0]=.5*g[0],m[1]=.5*g[1],m[2]=.5*g[2],m}([],function(m,g,b){return m[0]=g[0]+b[0],m[1]=g[1]+b[1],m[2]=g[2]+b[2],m}([],this.min,this.max))}quadrant(s){const f=[s%2==0,s<2],m=oe(this.min),g=oe(this.max);for(let b=0;b=0&&C++;if(C===0)return 0;C!==f.length&&(m=!1)}if(m)return 2;for(let g=0;g<3;g++){let b=Number.MAX_VALUE,C=-Number.MAX_VALUE;for(let L=0;Lthis.max[g]-this.min[g])return 0}return 1}}class Cu{constructor(s=0,f=0,m=0,g=0){if(isNaN(s)||s<0||isNaN(f)||f<0||isNaN(m)||m<0||isNaN(g)||g<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=s,this.bottom=f,this.left=m,this.right=g}interpolate(s,f,m){return f.top!=null&&s.top!=null&&(this.top=l.z.number(s.top,f.top,m)),f.bottom!=null&&s.bottom!=null&&(this.bottom=l.z.number(s.bottom,f.bottom,m)),f.left!=null&&s.left!=null&&(this.left=l.z.number(s.left,f.left,m)),f.right!=null&&s.right!=null&&(this.right=l.z.number(s.right,f.right,m)),this}getCenter(s,f){const m=l.ac((this.left+s-this.right)/2,0,s),g=l.ac((this.top+f-this.bottom)/2,0,f);return new l.P(m,g)}equals(s){return this.top===s.top&&this.bottom===s.bottom&&this.left===s.left&&this.right===s.right}clone(){return new Cu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const kp=85.051129;class Uh{constructor(s,f,m,g,b){this.tileSize=512,this._renderWorldCopies=b===void 0||!!b,this._minZoom=s||0,this._maxZoom=f||22,this._minPitch=m??0,this._maxPitch=g??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Cu,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const s=new Uh(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return s.apply(this),s}apply(s){this.tileSize=s.tileSize,this.latRange=s.latRange,this.width=s.width,this.height=s.height,this._center=s._center,this._elevation=s._elevation,this.minElevationForCurrentTile=s.minElevationForCurrentTile,this.zoom=s.zoom,this.angle=s.angle,this._fov=s._fov,this._pitch=s._pitch,this._unmodified=s._unmodified,this._edgeInsets=s._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(s){this._minZoom!==s&&(this._minZoom=s,this.zoom=Math.max(this.zoom,s))}get maxZoom(){return this._maxZoom}set maxZoom(s){this._maxZoom!==s&&(this._maxZoom=s,this.zoom=Math.min(this.zoom,s))}get minPitch(){return this._minPitch}set minPitch(s){this._minPitch!==s&&(this._minPitch=s,this.pitch=Math.max(this.pitch,s))}get maxPitch(){return this._maxPitch}set maxPitch(s){this._maxPitch!==s&&(this._maxPitch=s,this.pitch=Math.min(this.pitch,s))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(s){s===void 0?s=!0:s===null&&(s=!1),this._renderWorldCopies=s}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(s){const f=-l.b1(s,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var m=new l.A(4);return l.A!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}(),function(m,g,b){var C=g[0],L=g[1],A=g[2],N=g[3],V=Math.sin(b),j=Math.cos(b);m[0]=C*j+A*V,m[1]=L*j+N*V,m[2]=C*-V+A*j,m[3]=L*-V+N*j}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(s){const f=l.ac(s,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(s){s=Math.max(.01,Math.min(60,s)),this._fov!==s&&(this._unmodified=!1,this._fov=s/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(s){const f=Math.min(Math.max(s,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(s){s.lat===this._center.lat&&s.lng===this._center.lng||(this._unmodified=!1,this._center=s,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(s){s!==this._elevation&&(this._elevation=s,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(s){this._edgeInsets.equals(s)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,s,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(s){return this._edgeInsets.equals(s)}interpolatePadding(s,f,m){this._unmodified=!1,this._edgeInsets.interpolate(s,f,m),this._constrain(),this._calcMatrices()}coveringZoomLevel(s){const f=(s.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/s.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(s){const f=[new l.b2(0,s)];if(this._renderWorldCopies){const m=this.pointCoordinate(new l.P(0,0)),g=this.pointCoordinate(new l.P(this.width,0)),b=this.pointCoordinate(new l.P(this.width,this.height)),C=this.pointCoordinate(new l.P(0,this.height)),L=Math.floor(Math.min(m.x,g.x,b.x,C.x)),A=Math.floor(Math.max(m.x,g.x,b.x,C.x)),N=1;for(let V=L-N;V<=A+N;V++)V!==0&&f.push(new l.b2(V,s))}return f}coveringTiles(s){var f,m;let g=this.coveringZoomLevel(s);const b=g;if(s.minzoom!==void 0&&gs.maxzoom&&(g=s.maxzoom);const C=this.pointCoordinate(this.getCameraPoint()),L=l.Y.fromLngLat(this.center),A=Math.pow(2,g),N=[A*C.x,A*C.y,0],V=[A*L.x,A*L.y,0],j=ol.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,g);let Y=s.minzoom||0;!s.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(Y=g);const ue=s.terrain?2/Math.min(this.tileSize,s.tileSize)*this.tileSize:3,le=_e=>({aabb:new sl([_e*A,0,0],[(_e+1)*A,A,0]),zoom:0,x:0,y:0,wrap:_e,fullyVisible:!1}),ge=[],ne=[],Ie=g,Be=s.reparseOverscaled?b:g;if(this._renderWorldCopies)for(let _e=1;_e<=3;_e++)ge.push(le(-_e)),ge.push(le(_e));for(ge.push(le(0));ge.length>0;){const _e=ge.pop(),De=_e.x,Ve=_e.y;let Ge=_e.fullyVisible;if(!Ge){const pt=_e.aabb.intersects(j);if(pt===0)continue;Ge=pt===2}const Ke=s.terrain?N:V,nt=_e.aabb.distanceX(Ke),tt=_e.aabb.distanceY(Ke),at=Math.max(Math.abs(nt),Math.abs(tt));if(_e.zoom===Ie||at>ue+(1<=Y){const pt=Ie-_e.zoom,un=N[0]-.5-(De<>1),Wt=_e.zoom+1;let cn=_e.aabb.quadrant(pt);if(s.terrain){const An=new l.Q(Wt,_e.wrap,Wt,un,mt),$t=s.terrain.getMinMaxElevation(An),mn=(f=$t.minElevation)!==null&&f!==void 0?f:this.elevation,bn=(m=$t.maxElevation)!==null&&m!==void 0?m:this.elevation;cn=new sl([cn.min[0],cn.min[1],mn],[cn.max[0],cn.max[1],bn])}ge.push({aabb:cn,zoom:Wt,x:un,y:mt,wrap:_e.wrap,fullyVisible:Ge})}}return ne.sort((_e,De)=>_e.distanceSq-De.distanceSq).map(_e=>_e.tileID)}resize(s,f){this.width=s,this.height=f,this.pixelsToGLUnits=[2/s,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(s){return Math.pow(2,s)}scaleZoom(s){return Math.log(s)/Math.LN2}project(s){const f=l.ac(s.lat,-85.051129,kp);return new l.P(l.N(s.lng)*this.worldSize,l.O(f)*this.worldSize)}unproject(s){return new l.Y(s.x/this.worldSize,s.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(s){const f=this.elevation,m=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,g=this.pointLocation(this.centerPoint,s),b=s.getElevationForLngLatZoom(g,this.tileZoom);if(!(this.elevation-b))return;const C=m+f-b,L=Math.cos(this._pitch)*this.cameraToCenterDistance/C/l.b3(1,g.lat),A=this.scaleZoom(L/this.tileSize);this._elevation=b,this._center=g,this.zoom=A}setLocationAtPoint(s,f){const m=this.pointCoordinate(f),g=this.pointCoordinate(this.centerPoint),b=this.locationCoordinate(s),C=new l.Y(b.x-(m.x-g.x),b.y-(m.y-g.y));this.center=this.coordinateLocation(C),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(s,f){return f?this.coordinatePoint(this.locationCoordinate(s),f.getElevationForLngLatZoom(s,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(s))}pointLocation(s,f){return this.coordinateLocation(this.pointCoordinate(s,f))}locationCoordinate(s){return l.Y.fromLngLat(s)}coordinateLocation(s){return s&&s.toLngLat()}pointCoordinate(s,f){if(f){const Y=f.pointCoordinate(s);if(Y!=null)return Y}const m=[s.x,s.y,0,1],g=[s.x,s.y,1,1];l.af(m,m,this.pixelMatrixInverse),l.af(g,g,this.pixelMatrixInverse);const b=m[3],C=g[3],L=m[1]/b,A=g[1]/C,N=m[2]/b,V=g[2]/C,j=N===V?0:(0-N)/(V-N);return new l.Y(l.z.number(m[0]/b,g[0]/C,j)/this.worldSize,l.z.number(L,A,j)/this.worldSize)}coordinatePoint(s,f=0,m=this.pixelMatrix){const g=[s.x*this.worldSize,s.y*this.worldSize,f,1];return l.af(g,g,m),new l.P(g[0]/g[3],g[1]/g[3])}getBounds(){const s=Math.max(0,this.height/2-this.getHorizon());return new Ae().extend(this.pointLocation(new l.P(0,s))).extend(this.pointLocation(new l.P(this.width,s))).extend(this.pointLocation(new l.P(this.width,this.height))).extend(this.pointLocation(new l.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Ae([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(s){s?(this.lngRange=[s.getWest(),s.getEast()],this.latRange=[s.getSouth(),s.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,kp])}calculatePosMatrix(s,f=!1){const m=s.key,g=f?this._alignedPosMatrixCache:this._posMatrixCache;if(g[m])return g[m];const b=s.canonical,C=this.worldSize/this.zoomScale(b.z),L=b.x+Math.pow(2,b.z)*s.wrap,A=l.an(new Float64Array(16));return l.H(A,A,[L*C,b.y*C,0]),l.J(A,A,[C/l.W,C/l.W,1]),l.K(A,f?this.alignedProjMatrix:this.projMatrix,A),g[m]=new Float32Array(A),g[m]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(s,f){f=l.ac(+f,this.minZoom,this.maxZoom);const m={center:new l.M(s.lng,s.lat),zoom:f};let g=this.lngRange;if(!this._renderWorldCopies&&g===null){const _e=179.9999999999;g=[-_e,_e]}const b=this.tileSize*this.zoomScale(m.zoom);let C=0,L=b,A=0,N=b,V=0,j=0;const{x:Y,y:ue}=this.size;if(this.latRange){const _e=this.latRange;C=l.O(_e[1])*b,L=l.O(_e[0])*b,L-CL&&(Ie=L-_e)}if(g){const _e=(A+N)/2;let De=le;this._renderWorldCopies&&(De=l.b1(le,_e-b/2,_e+b/2));const Ve=Y/2;De-VeN&&(ne=N-Ve)}if(ne!==void 0||Ie!==void 0){const _e=new l.P(ne??le,Ie??ge);m.center=this.unproject.call({worldSize:b},_e).wrap()}return m}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const s=this._unmodified,{center:f,zoom:m}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=m,this._unmodified=s,this._constraining=!1}_calcMatrices(){if(!this.height)return;const s=this.centerOffset,f=this.point.x,m=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=l.b3(1,this.center.lat)*this.worldSize;let g=l.an(new Float64Array(16));l.J(g,g,[this.width/2,-this.height/2,1]),l.H(g,g,[1,-1,0]),this.labelPlaneMatrix=g,g=l.an(new Float64Array(16)),l.J(g,g,[1,-1,1]),l.H(g,g,[-1,-1,0]),l.J(g,g,[2/this.width,2/this.height,1]),this.glCoordMatrix=g;const b=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),C=Math.min(this.elevation,this.minElevationForCurrentTile),L=b-C*this._pixelPerMeter/Math.cos(this._pitch),A=C<0?L:b,N=Math.PI/2+this._pitch,V=this._fov*(.5+s.y/this.height),j=Math.sin(V)*A/Math.sin(l.ac(Math.PI-N-V,.01,Math.PI-.01)),Y=this.getHorizon(),ue=2*Math.atan(Y/this.cameraToCenterDistance)*(.5+s.y/(2*Y)),le=Math.sin(ue)*A/Math.sin(l.ac(Math.PI-N-ue,.01,Math.PI-.01)),ge=Math.min(j,le),ne=1.01*(Math.cos(Math.PI/2-this._pitch)*ge+A),Ie=this.height/50;g=new Float64Array(16),l.b4(g,this._fov,this.width/this.height,Ie,ne),g[8]=2*-s.x/this.width,g[9]=2*s.y/this.height,l.J(g,g,[1,-1,1]),l.H(g,g,[0,0,-this.cameraToCenterDistance]),l.b5(g,g,this._pitch),l.ad(g,g,this.angle),l.H(g,g,[-f,-m,0]),this.mercatorMatrix=l.J([],g,[this.worldSize,this.worldSize,this.worldSize]),l.J(g,g,[1,1,this._pixelPerMeter]),this.pixelMatrix=l.K(new Float64Array(16),this.labelPlaneMatrix,g),l.H(g,g,[0,0,-this.elevation]),this.projMatrix=g,this.invProjMatrix=l.ar([],g),this.pixelMatrix3D=l.K(new Float64Array(16),this.labelPlaneMatrix,g);const Be=this.width%2/2,_e=this.height%2/2,De=Math.cos(this.angle),Ve=Math.sin(this.angle),Ge=f-Math.round(f)+De*Be+Ve*_e,Ke=m-Math.round(m)+De*_e+Ve*Be,nt=new Float64Array(g);if(l.H(nt,nt,[Ge>.5?Ge-1:Ge,Ke>.5?Ke-1:Ke,0]),this.alignedProjMatrix=nt,g=l.ar(new Float64Array(16),this.pixelMatrix),!g)throw new Error("failed to invert matrix");this.pixelMatrixInverse=g,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const s=this.pointCoordinate(new l.P(0,0)),f=[s.x*this.worldSize,s.y*this.worldSize,0,1];return l.af(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const s=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(0,s))}getCameraQueryGeometry(s){const f=this.getCameraPoint();if(s.length===1)return[s[0],f];{let m=f.x,g=f.y,b=f.x,C=f.y;for(const L of s)m=Math.min(m,L.x),g=Math.min(g,L.y),b=Math.max(b,L.x),C=Math.max(C,L.y);return[new l.P(m,g),new l.P(b,g),new l.P(b,C),new l.P(m,C),new l.P(m,g)]}}lngLatToCameraDepth(s,f){const m=this.locationCoordinate(s),g=[m.x*this.worldSize,m.y*this.worldSize,f,1];return l.af(g,g,this.projMatrix),g[2]/g[3]}}function Dp(y,s){let f,m=!1,g=null,b=null;const C=()=>{g=null,m&&(y.apply(b,f),g=setTimeout(C,s),m=!1)};return(...L)=>(m=!0,b=this,f=L,g||C(),g)}class Rp{constructor(s){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let m;return f.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(m=g)}),(m&&m[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:m,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,f)}catch{}},this._updateHash=Dp(this._updateHashUnthrottled,300),this._hashName=s&&encodeURIComponent(s)}addTo(s){return this._map=s,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(s){const f=this._map.getCenter(),m=Math.round(100*this._map.getZoom())/100,g=Math.ceil((m*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,g),C=Math.round(f.lng*b)/b,L=Math.round(f.lat*b)/b,A=this._map.getBearing(),N=this._map.getPitch();let V="";if(V+=s?`/${C}/${L}/${m}`:`${m}/${L}/${C}`,(A||N)&&(V+="/"+Math.round(10*A)/10),N&&(V+=`/${Math.round(N)}`),this._hashName){const j=this._hashName;let Y=!1;const ue=window.location.hash.slice(1).split("&").map(le=>{const ge=le.split("=")[0];return ge===j?(Y=!0,`${ge}=${V}`):le}).filter(le=>le);return Y||ue.push(`${j}=${V}`),`#${ue.join("&")}`}return`#${V}`}}const Ic={linearity:.3,easing:l.b6(0,0,.3,1)},Gl=l.e({deceleration:2500,maxSpeed:1400},Ic),$m=l.e({deceleration:20,maxSpeed:1400},Ic),Qm=l.e({deceleration:1e3,maxSpeed:360},Ic),eg=l.e({deceleration:1e3,maxSpeed:90},Ic);class tg{constructor(s){this._map=s,this.clear()}clear(){this._inertiaBuffer=[]}record(s){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:E.now(),settings:s})}_drainInertiaBuffer(){const s=this._inertiaBuffer,f=E.now();for(;s.length>0&&f-s[0].time>160;)s.shift()}_onMoveEnd(s){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)f.zoom+=b.zoomDelta||0,f.bearing+=b.bearingDelta||0,f.pitch+=b.pitchDelta||0,b.panDelta&&f.pan._add(b.panDelta),b.around&&(f.around=b.around),b.pinchAround&&(f.pinchAround=b.pinchAround);const m=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,g={};if(f.pan.mag()){const b=Tc(f.pan.mag(),m,l.e({},Gl,s||{}));g.offset=f.pan.mult(b.amount/f.pan.mag()),g.center=this._map.transform.center,Cc(g,b)}if(f.zoom){const b=Tc(f.zoom,m,$m);g.zoom=this._map.transform.zoom+b.amount,Cc(g,b)}if(f.bearing){const b=Tc(f.bearing,m,Qm);g.bearing=this._map.transform.bearing+l.ac(b.amount,-179,179),Cc(g,b)}if(f.pitch){const b=Tc(f.pitch,m,eg);g.pitch=this._map.transform.pitch+b.amount,Cc(g,b)}if(g.zoom||g.bearing){const b=f.pinchAround===void 0?f.around:f.pinchAround;g.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),l.e(g,{noMoveStart:!0})}}function Cc(y,s){(!y.duration||y.durationf.unproject(A)),L=b.reduce((A,N,V,j)=>A.add(N.div(j.length)),new l.P(0,0));super(s,{points:b,point:L,lngLats:C,lngLat:f.unproject(L),originalEvent:m}),this._defaultPrevented=!1}}class Np extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(s,f,m){super(s,{originalEvent:m}),this._defaultPrevented=!1}}class Ts{constructor(s,f){this._map=s,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(s){return this._firePreventable(new Np(s.type,this._map,s))}mousedown(s,f){return this._mousedownPos=f,this._firePreventable(new Io(s.type,this._map,s))}mouseup(s){this._map.fire(new Io(s.type,this._map,s))}click(s,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Io(s.type,this._map,s))}dblclick(s){return this._firePreventable(new Io(s.type,this._map,s))}mouseover(s){this._map.fire(new Io(s.type,this._map,s))}mouseout(s){this._map.fire(new Io(s.type,this._map,s))}touchstart(s){return this._firePreventable(new Qs(s.type,this._map,s))}touchmove(s){this._map.fire(new Qs(s.type,this._map,s))}touchend(s){this._map.fire(new Qs(s.type,this._map,s))}touchcancel(s){this._map.fire(new Qs(s.type,this._map,s))}_firePreventable(s){if(this._map.fire(s),s.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ea{constructor(s){this._map=s}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(s){this._map.fire(new Io(s.type,this._map,s))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Io("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(s){this._delayContextMenu?this._contextMenuEvent=s:this._ignoreContextMenu||this._map.fire(new Io(s.type,this._map,s)),this._map.listens("contextmenu")&&s.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Tu{constructor(s){this._map=s}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(s){return this.transform.pointLocation(l.P.convert(s),this._map.terrain)}}class Ls{constructor(s,f){this._map=s,this._tr=new Tu(s),this._el=s.getCanvasContainer(),this._container=s.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(s,f){this.isEnabled()&&s.shiftKey&&s.button===0&&(T.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(s,f){if(!this._active)return;const m=f;if(this._lastPos.equals(m)||!this._box&&m.dist(this._startPos)b.fitScreenCoordinates(m,g,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",s)}keydown(s){this._active&&s.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",s))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(T.remove(this._box),this._box=null),T.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(s,f){return this._map.fire(new l.k(s,{originalEvent:f}))}}function ql(y,s){if(y.length!==s.length)throw new Error(`The number of touches and points are not equal - touches ${y.length}, points ${s.length}`);const f={};for(let m=0;mthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=s.timeStamp),m.length===this.numTouches&&(this.centroid=function(g){const b=new l.P(0,0);for(const C of g)b._add(C);return b.div(g.length)}(f),this.touches=ql(m,f)))}touchmove(s,f,m){if(this.aborted||!this.centroid)return;const g=ql(m,f);for(const b in this.touches){const C=g[b];(!C||C.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(s,f,m){if((!this.centroid||s.timeStamp-this.startTime>500)&&(this.aborted=!0),m.length===0){const g=!this.aborted&&this.centroid;if(this.reset(),g)return g}}}class Op{constructor(s){this.singleTap=new qy(s),this.numTaps=s.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(s,f,m){this.singleTap.touchstart(s,f,m)}touchmove(s,f,m){this.singleTap.touchmove(s,f,m)}touchend(s,f,m){const g=this.singleTap.touchend(s,f,m);if(g){const b=s.timeStamp-this.lastTime<500,C=!this.lastTap||this.lastTap.dist(g)<30;if(b&&C||this.reset(),this.count++,this.lastTime=s.timeStamp,this.lastTap=g,this.count===this.numTaps)return this.reset(),g}}}class Wy{constructor(s){this._tr=new Tu(s),this._zoomIn=new Op({numTouches:1,numTaps:2}),this._zoomOut=new Op({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(s,f,m){this._zoomIn.touchstart(s,f,m),this._zoomOut.touchstart(s,f,m)}touchmove(s,f,m){this._zoomIn.touchmove(s,f,m),this._zoomOut.touchmove(s,f,m)}touchend(s,f,m){const g=this._zoomIn.touchend(s,f,m),b=this._zoomOut.touchend(s,f,m),C=this._tr;return g?(this._active=!0,s.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:C.zoom+1,around:C.unproject(g)},{originalEvent:s})}):b?(this._active=!0,s.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:C.zoom-1,around:C.unproject(b)},{originalEvent:s})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Lu{constructor(s){this._enabled=!!s.enable,this._moveStateManager=s.moveStateManager,this._clickTolerance=s.clickTolerance||1,this._moveFunction=s.move,this._activateOnStart=!!s.activateOnStart,s.assignEvents(this),this.reset()}reset(s){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(s)}_move(...s){const f=this._moveFunction(...s);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(s,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(s)&&(this._moveStateManager.startMove(s),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(s,f){if(!this.isEnabled())return;const m=this._lastPoint;if(!m)return;if(s.preventDefault(),!this._moveStateManager.isValidMoveEvent(s))return void this.reset(s);const g=f.length?f[0]:f;return!this._moved&&g.dist(m){y.mousedown=y.dragStart,y.mousemoveWindow=y.dragMove,y.mouseup=y.dragEnd,y.contextmenu=function(s){s.preventDefault()}},Pu=({enable:y,clickTolerance:s,bearingDegreesPerPixelMoved:f=.8})=>{const m=new ta({checkCorrectEvent:g=>T.mouseButton(g)===0&&g.ctrlKey||T.mouseButton(g)===2});return new Lu({clickTolerance:s,move:(g,b)=>({bearingDelta:(b.x-g.x)*f}),moveStateManager:m,enable:y,assignEvents:jh})},Mu=({enable:y,clickTolerance:s,pitchDegreesPerPixelMoved:f=-.5})=>{const m=new ta({checkCorrectEvent:g=>T.mouseButton(g)===0&&g.ctrlKey||T.mouseButton(g)===2});return new Lu({clickTolerance:s,move:(g,b)=>({pitchDelta:(b.y-g.y)*f}),moveStateManager:m,enable:y,assignEvents:jh})};class ng{constructor(s,f){this._clickTolerance=s.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(s,f,m){return this._calculateTransform(s,f,m)}touchmove(s,f,m){if(this._active&&!(m.length0&&(this._active=!0);const g=ql(m,f),b=new l.P(0,0),C=new l.P(0,0);let L=0;for(const N in g){const V=g[N],j=this._touches[N];j&&(b._add(V),C._add(V.sub(j)),L++,g[N]=V)}if(this._touches=g,LMath.abs(y.x)}class og extends xt{constructor(s){super(),this._currentTouchCount=0,this._map=s}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(s,f,m){super.touchstart(s,f,m),this._currentTouchCount=m.length}_start(s){this._lastPoints=s,qh(s[0].sub(s[1]))&&(this._valid=!1)}_move(s,f,m){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const g=s[0].sub(this._lastPoints[0]),b=s[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(g,b,m.timeStamp),this._valid?(this._lastPoints=s,this._active=!0,{pitchDelta:(g.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(s,f,m){if(this._valid!==void 0)return this._valid;const g=s.mag()>=2,b=f.mag()>=2;if(!g&&!b)return;if(!g||!b)return this._firstMove===void 0&&(this._firstMove=m),m-this._firstMove<100&&void 0;const C=s.y>0==f.y>0;return qh(s)&&qh(f)&&C}}const Hy={panStep:100,bearingStep:15,pitchStep:10};class al{constructor(s){this._tr=new Tu(s);const f=Hy;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(s){if(s.altKey||s.ctrlKey||s.metaKey)return;let f=0,m=0,g=0,b=0,C=0;switch(s.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:s.shiftKey?m=-1:(s.preventDefault(),b=-1);break;case 39:s.shiftKey?m=1:(s.preventDefault(),b=1);break;case 38:s.shiftKey?g=1:(s.preventDefault(),C=-1);break;case 40:s.shiftKey?g=-1:(s.preventDefault(),C=1);break;default:return}return this._rotationDisabled&&(m=0,g=0),{cameraAnimation:L=>{const A=this._tr;L.easeTo({duration:300,easeId:"keyboardHandler",easing:br,zoom:f?Math.round(A.zoom)+f*(s.shiftKey?2:1):A.zoom,bearing:A.bearing+m*this._bearingStep,pitch:A.pitch+g*this._pitchStep,offset:[-b*this._panStep,-C*this._panStep],center:A.center},{originalEvent:s})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function br(y){return y*(2-y)}const Pc=4.000244140625;class Wh{constructor(s,f){this._onTimeout=m=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(m)},this._map=s,this._tr=new Tu(s),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(s){this._defaultZoomRate=s}setWheelZoomRate(s){this._wheelZoomRate=s}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(s){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!s&&s.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(s){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!s[this._map.cooperativeGestures._bypassKey])return;let f=s.deltaMode===WheelEvent.DOM_DELTA_LINE?40*s.deltaY:s.deltaY;const m=E.now(),g=m-(this._lastWheelEventTime||0);this._lastWheelEventTime=m,f!==0&&f%Pc==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":g>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,s)):this._type||(this._type=Math.abs(g*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),s.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=s,this._delta-=f,this._active||this._start(s)),s.preventDefault()}_start(s){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=T.mousePos(this._map.getCanvas(),s),m=this._tr;this._around=f.y>m.transform.height/2-m.transform.getHorizon()?l.M.convert(this._aroundCenter?m.center:m.unproject(f)):l.M.convert(m.center),this._aroundPoint=m.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const s=this._tr.transform;if(this._delta!==0){const L=this._type==="wheel"&&Math.abs(this._delta)>Pc?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*L)));this._delta<0&&A!==0&&(A=1/A);const N=typeof this._targetZoom=="number"?s.zoomScale(this._targetZoom):s.scale;this._targetZoom=Math.min(s.maxZoom,Math.max(s.minZoom,s.scaleZoom(N*A))),this._type==="wheel"&&(this._startZoom=s.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:s.zoom,m=this._startZoom,g=this._easing;let b,C=!1;if(this._type==="wheel"&&m&&g){const L=Math.min((E.now()-this._lastWheelEventTime)/200,1),A=g(L);b=l.z.number(m,f,A),L<1?this._frameId||(this._frameId=!0):C=!0}else b=f,C=!0;return this._active=!0,C&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!C,zoomDelta:b-s.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(s){let f=l.b7;if(this._prevEase){const m=this._prevEase,g=(E.now()-m.start)/m.duration,b=m.easing(g+.01)-m.easing(g),C=.27/Math.sqrt(b*b+1e-4)*.01,L=Math.sqrt(.0729-C*C);f=l.b6(C,L,.25,1)}return this._prevEase={start:E.now(),duration:s,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Fp{constructor(s,f){this._clickZoom=s,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class sg{constructor(s){this._tr=new Tu(s),this.reset()}reset(){this._active=!1}dblclick(s,f){return s.preventDefault(),{cameraAnimation:m=>{m.easeTo({duration:300,zoom:this._tr.zoom+(s.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:s})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ag{constructor(){this._tap=new Op({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(s,f,m){if(!this._swipePoint)if(this._tapTime){const g=f[0],b=s.timeStamp-this._tapTime<500,C=this._tapPoint.dist(g)<30;b&&C?m.length>0&&(this._swipePoint=g,this._swipeTouch=m[0].identifier):this.reset()}else this._tap.touchstart(s,f,m)}touchmove(s,f,m){if(this._tapTime){if(this._swipePoint){if(m[0].identifier!==this._swipeTouch)return;const g=f[0],b=g.y-this._swipePoint.y;return this._swipePoint=g,s.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(s,f,m)}touchend(s,f,m){if(this._tapTime)this._swipePoint&&m.length===0&&this.reset();else{const g=this._tap.touchend(s,f,m);g&&(this._tapTime=s.timeStamp,this._tapPoint=g)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class lg{constructor(s,f,m){this._el=s,this._mousePan=f,this._touchPan=m}enable(s){this._inertiaOptions=s||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Ps{constructor(s,f,m){this._pitchWithRotate=s.pitchWithRotate,this._mouseRotate=f,this._mousePitch=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Mc{constructor(s,f,m,g){this._el=s,this._touchZoom=f,this._touchRotate=m,this._tapDragZoom=g,this._rotationDisabled=!1,this._enabled=!0}enable(s){this._touchZoom.enable(s),this._rotationDisabled||this._touchRotate.enable(s),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Nt{constructor(s,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=s,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const s=this._map.getCanvasContainer();s.classList.add("maplibregl-cooperative-gestures"),this._container=T.create("div","maplibregl-cooperative-gesture-screen",s);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const m=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),g=document.createElement("div");g.className="maplibregl-desktop-message",g.textContent=f,this._container.appendChild(g);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=m,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(T.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destoryUI()}isEnabled(){return this._enabled}touchmove(s){this._onCooperativeGesture(s.touches.length===1)}wheel(s){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!s[this._bypassKey])}_onCooperativeGesture(s){this._enabled&&s&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const Gt=y=>y.zoom||y.drag||y.pitch||y.rotate;class Hh extends l.k{}function Ac(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Bp{constructor(s,f){this.handleWindowEvent=g=>{this.handleEvent(g,`${g.type}Window`)},this.handleEvent=(g,b)=>{if(g.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const C=g.type==="renderFrame"?void 0:g,L={needsRenderFrame:!1},A={},N={},V=g.touches,j=V?this._getMapTouches(V):void 0,Y=j?T.touchPos(this._map.getCanvas(),j):T.mousePos(this._map.getCanvas(),g);for(const{handlerName:ge,handler:ne,allowed:Ie}of this._handlers){if(!ne.isEnabled())continue;let Be;this._blockedByActive(N,Ie,ge)?ne.reset():ne[b||g.type]&&(Be=ne[b||g.type](g,Y,j),this.mergeHandlerResult(L,A,Be,ge,C),Be&&Be.needsRenderFrame&&this._triggerRenderFrame()),(Be||ne.isActive())&&(N[ge]=ne)}const ue={};for(const ge in this._previousActiveHandlers)N[ge]||(ue[ge]=C);this._previousActiveHandlers=N,(Object.keys(ue).length||Ac(L))&&(this._changes.push([L,A,ue]),this._triggerRenderFrame()),(Object.keys(N).length||Ac(L))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:le}=L;le&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],le(this._map))},this._map=s,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new tg(s),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const m=this._el;this._listeners=[[m,"touchstart",{passive:!0}],[m,"touchmove",{passive:!1}],[m,"touchend",void 0],[m,"touchcancel",void 0],[m,"mousedown",void 0],[m,"mousemove",void 0],[m,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[m,"mouseover",void 0],[m,"mouseout",void 0],[m,"dblclick",void 0],[m,"click",void 0],[m,"keydown",{capture:!1}],[m,"keyup",void 0],[m,"wheel",{passive:!1}],[m,"contextmenu",void 0],[window,"blur",void 0]];for(const[g,b,C]of this._listeners)T.addEventListener(g,b,g===document?this.handleWindowEvent:this.handleEvent,C)}destroy(){for(const[s,f,m]of this._listeners)T.removeEventListener(s,f,s===document?this.handleWindowEvent:this.handleEvent,m)}_addDefaultHandlers(s){const f=this._map,m=f.getCanvasContainer();this._add("mapEvent",new Ts(f,s));const g=f.boxZoom=new Ls(f,s);this._add("boxZoom",g),s.interactive&&s.boxZoom&&g.enable();const b=f.cooperativeGestures=new Nt(f,s.cooperativeGestures);this._add("cooperativeGestures",b),s.cooperativeGestures&&b.enable();const C=new Wy(f),L=new sg(f);f.doubleClickZoom=new Fp(L,C),this._add("tapZoom",C),this._add("clickZoom",L),s.interactive&&s.doubleClickZoom&&f.doubleClickZoom.enable();const A=new ag;this._add("tapDragZoom",A);const N=f.touchPitch=new og(f);this._add("touchPitch",N),s.interactive&&s.touchPitch&&f.touchPitch.enable(s.touchPitch);const V=Pu(s),j=Mu(s);f.dragRotate=new Ps(s,V,j),this._add("mouseRotate",V,["mousePitch"]),this._add("mousePitch",j,["mouseRotate"]),s.interactive&&s.dragRotate&&f.dragRotate.enable();const Y=(({enable:Be,clickTolerance:_e})=>{const De=new ta({checkCorrectEvent:Ve=>T.mouseButton(Ve)===0&&!Ve.ctrlKey});return new Lu({clickTolerance:_e,move:(Ve,Ge)=>({around:Ge,panDelta:Ge.sub(Ve)}),activateOnStart:!0,moveStateManager:De,enable:Be,assignEvents:jh})})(s),ue=new ng(s,f);f.dragPan=new lg(m,Y,ue),this._add("mousePan",Y),this._add("touchPan",ue,["touchZoom","touchRotate"]),s.interactive&&s.dragPan&&f.dragPan.enable(s.dragPan);const le=new zp,ge=new ig;f.touchZoomRotate=new Mc(m,ge,le,A),this._add("touchRotate",le,["touchPan","touchZoom"]),this._add("touchZoom",ge,["touchPan","touchRotate"]),s.interactive&&s.touchZoomRotate&&f.touchZoomRotate.enable(s.touchZoomRotate);const ne=f.scrollZoom=new Wh(f,()=>this._triggerRenderFrame());this._add("scrollZoom",ne,["mousePan"]),s.interactive&&s.scrollZoom&&f.scrollZoom.enable(s.scrollZoom);const Ie=f.keyboard=new al(f);this._add("keyboard",Ie),s.interactive&&s.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new ea(f))}_add(s,f,m){this._handlers.push({handlerName:s,handler:f,allowed:m}),this._handlersById[s]=f}stop(s){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},s),this._changes=[]}}isActive(){for(const{handler:s}of this._handlers)if(s.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Gt(this._eventsInProgress)||this.isZooming()}_blockedByActive(s,f,m){for(const g in s)if(g!==m&&(!f||f.indexOf(g)<0))return!0;return!1}_getMapTouches(s){const f=[];for(const m of s)this._el.contains(m.target)&&f.push(m);return f}mergeHandlerResult(s,f,m,g,b){if(!m)return;l.e(s,m);const C={handlerName:g,originalEvent:m.originalEvent||b};m.zoomDelta!==void 0&&(f.zoom=C),m.panDelta!==void 0&&(f.drag=C),m.pitchDelta!==void 0&&(f.pitch=C),m.bearingDelta!==void 0&&(f.rotate=C)}_applyChanges(){const s={},f={},m={};for(const[g,b,C]of this._changes)g.panDelta&&(s.panDelta=(s.panDelta||new l.P(0,0))._add(g.panDelta)),g.zoomDelta&&(s.zoomDelta=(s.zoomDelta||0)+g.zoomDelta),g.bearingDelta&&(s.bearingDelta=(s.bearingDelta||0)+g.bearingDelta),g.pitchDelta&&(s.pitchDelta=(s.pitchDelta||0)+g.pitchDelta),g.around!==void 0&&(s.around=g.around),g.pinchAround!==void 0&&(s.pinchAround=g.pinchAround),g.noInertia&&(s.noInertia=g.noInertia),l.e(f,b),l.e(m,C);this._updateMapTransform(s,f,m),this._changes=[]}_updateMapTransform(s,f,m){const g=this._map,b=g._getTransformForUpdate(),C=g.terrain;if(!(Ac(s)||C&&this._terrainMovement))return this._fireEvents(f,m,!0);let{panDelta:L,zoomDelta:A,bearingDelta:N,pitchDelta:V,around:j,pinchAround:Y}=s;Y!==void 0&&(j=Y),g._stop(!0),j=j||g.transform.centerPoint;const ue=b.pointLocation(L?j.sub(L):j);N&&(b.bearing+=N),V&&(b.pitch+=V),A&&(b.zoom+=A),C?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?b.center=b.pointLocation(b.centerPoint.sub(L)):b.setLocationAtPoint(ue,j):(this._terrainMovement=!0,this._map._elevationFreeze=!0,b.setLocationAtPoint(ue,j),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,b.recalculateZoom(g.terrain)})):b.setLocationAtPoint(ue,j),g._applyUpdatedTransform(b),this._map._update(),s.noInertia||this._inertia.record(s),this._fireEvents(f,m,!0)}_fireEvents(s,f,m){const g=Gt(this._eventsInProgress),b=Gt(s),C={};for(const V in s){const{originalEvent:j}=s[V];this._eventsInProgress[V]||(C[`${V}start`]=j),this._eventsInProgress[V]=s[V]}!g&&b&&this._fireEvent("movestart",b.originalEvent);for(const V in C)this._fireEvent(V,C[V]);b&&this._fireEvent("move",b.originalEvent);for(const V in s){const{originalEvent:j}=s[V];this._fireEvent(V,j)}const L={};let A;for(const V in this._eventsInProgress){const{handlerName:j,originalEvent:Y}=this._eventsInProgress[V];this._handlersById[j].isActive()||(delete this._eventsInProgress[V],A=f[j]||Y,L[`${V}end`]=A)}for(const V in L)this._fireEvent(V,L[V]);const N=Gt(this._eventsInProgress);if(m&&(g||b)&&!N){this._updatingCamera=!0;const V=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=Y=>Y!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Hh("renderFrame",{timeStamp:s})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Co extends l.E{constructor(s,f){super(),this._renderFrameCallback=()=>{const m=Math.min((E.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=s,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new l.M(this.transform.center.lng,this.transform.center.lat)}setCenter(s,f){return this.jumpTo({center:s},f)}panBy(s,f,m){return s=l.P.convert(s).mult(-1),this.panTo(this.transform.center,l.e({offset:s},f),m)}panTo(s,f,m){return this.easeTo(l.e({center:s},f),m)}getZoom(){return this.transform.zoom}setZoom(s,f){return this.jumpTo({zoom:s},f),this}zoomTo(s,f,m){return this.easeTo(l.e({zoom:s},f),m)}zoomIn(s,f){return this.zoomTo(this.getZoom()+1,s,f),this}zoomOut(s,f){return this.zoomTo(this.getZoom()-1,s,f),this}getBearing(){return this.transform.bearing}setBearing(s,f){return this.jumpTo({bearing:s},f),this}getPadding(){return this.transform.padding}setPadding(s,f){return this.jumpTo({padding:s},f),this}rotateTo(s,f,m){return this.easeTo(l.e({bearing:s},f),m)}resetNorth(s,f){return this.rotateTo(0,l.e({duration:1e3},s),f),this}resetNorthPitch(s,f){return this.easeTo(l.e({bearing:0,pitch:0,duration:1e3},s),f),this}snapToNorth(s,f){return Math.abs(this.getBearing()){if(this._zooming&&(g.zoom=l.z.number(b,ne,Ke)),this._rotating&&(g.bearing=l.z.number(C,N,Ke)),this._pitching&&(g.pitch=l.z.number(L,V,Ke)),this._padding&&(g.interpolatePadding(A,j,Ke),ue=g.centerPoint.add(Y)),this.terrain&&!s.freezeElevation&&this._updateElevation(Ke),De)g.setLocationAtPoint(De,Ve);else{const nt=g.zoomScale(g.zoom-b),tt=ne>b?Math.min(2,_e):Math.max(.5,_e),at=Math.pow(tt,1-Ke),pt=g.unproject(Ie.add(Be.mult(Ke*at)).mult(nt));g.setLocationAtPoint(g.renderWorldCopies?pt.wrap():pt,ue)}this._applyUpdatedTransform(g),this._fireMoveEvents(f)},Ke=>{this.terrain&&this._finalizeElevation(),this._afterEase(f,Ke)},s),this}_prepareEase(s,f,m={}){this._moving=!0,f||m.moving||this.fire(new l.k("movestart",s)),this._zooming&&!m.zooming&&this.fire(new l.k("zoomstart",s)),this._rotating&&!m.rotating&&this.fire(new l.k("rotatestart",s)),this._pitching&&!m.pitching&&this.fire(new l.k("pitchstart",s))}_prepareElevation(s){this._elevationCenter=s,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(s,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(s){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(s<1&&f!==this._elevationTarget){const m=this._elevationTarget-this._elevationStart;this._elevationStart+=s*(m-(f-(m*s+this._elevationStart))/(1-s)),this._elevationTarget=f}this.transform.elevation=l.z.number(this._elevationStart,this._elevationTarget,s)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(s){if(!this.transformCameraUpdate)return;const f=s.clone(),{center:m,zoom:g,pitch:b,bearing:C,elevation:L}=this.transformCameraUpdate(f);m&&(f.center=m),g!==void 0&&(f.zoom=g),b!==void 0&&(f.pitch=b),C!==void 0&&(f.bearing=C),L!==void 0&&(f.elevation=L),this.transform.apply(f)}_fireMoveEvents(s){this.fire(new l.k("move",s)),this._zooming&&this.fire(new l.k("zoom",s)),this._rotating&&this.fire(new l.k("rotate",s)),this._pitching&&this.fire(new l.k("pitch",s))}_afterEase(s,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const m=this._zooming,g=this._rotating,b=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,m&&this.fire(new l.k("zoomend",s)),g&&this.fire(new l.k("rotateend",s)),b&&this.fire(new l.k("pitchend",s)),this.fire(new l.k("moveend",s))}flyTo(s,f){var m;if(!s.essential&&E.prefersReducedMotion){const An=l.L(s,["center","zoom","bearing","pitch","around"]);return this.jumpTo(An,f)}this.stop(),s=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.b7},s);const g=this._getTransformForUpdate(),b=this.getZoom(),C=this.getBearing(),L=this.getPitch(),A=this.getPadding(),N="bearing"in s?this._normalizeBearing(s.bearing,C):C,V="pitch"in s?+s.pitch:L,j="padding"in s?s.padding:g.padding,Y=l.P.convert(s.offset);let ue=g.centerPoint.add(Y);const le=g.pointLocation(ue),{center:ge,zoom:ne}=g.getConstrained(l.M.convert(s.center||le),(m=s.zoom)!==null&&m!==void 0?m:b);this._normalizeCenter(ge);const Ie=g.zoomScale(ne-b),Be=g.project(le),_e=g.project(ge).sub(Be);let De=s.curve;const Ve=Math.max(g.width,g.height),Ge=Ve/Ie,Ke=_e.mag();if("minZoom"in s){const An=l.ac(Math.min(s.minZoom,b,ne),g.minZoom,g.maxZoom),$t=Ve/g.zoomScale(An-b);De=Math.sqrt($t/Ke*2)}const nt=De*De;function tt(An){const $t=(Ge*Ge-Ve*Ve+(An?-1:1)*nt*nt*Ke*Ke)/(2*(An?Ge:Ve)*nt*Ke);return Math.log(Math.sqrt($t*$t+1)-$t)}function at(An){return(Math.exp(An)-Math.exp(-An))/2}function pt(An){return(Math.exp(An)+Math.exp(-An))/2}const un=tt(!1);let mt=function(An){return pt(un)/pt(un+De*An)},Wt=function(An){return Ve*((pt(un)*(at($t=un+De*An)/pt($t))-at(un))/nt)/Ke;var $t},cn=(tt(!0)-un)/De;if(Math.abs(Ke)<1e-6||!isFinite(cn)){if(Math.abs(Ve-Ge)<1e-6)return this.easeTo(s,f);const An=Ges.maxDuration&&(s.duration=0),this._zooming=!0,this._rotating=C!==N,this._pitching=V!==L,this._padding=!g.isPaddingEqual(j),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(ge),this._ease(An=>{const $t=An*cn,mn=1/mt($t);g.zoom=An===1?ne:b+g.scaleZoom(mn),this._rotating&&(g.bearing=l.z.number(C,N,An)),this._pitching&&(g.pitch=l.z.number(L,V,An)),this._padding&&(g.interpolatePadding(A,j,An),ue=g.centerPoint.add(Y)),this.terrain&&!s.freezeElevation&&this._updateElevation(An);const bn=An===1?ge:g.unproject(Be.add(_e.mult(Wt($t))).mult(mn));g.setLocationAtPoint(g.renderWorldCopies?bn.wrap():bn,ue),this._applyUpdatedTransform(g),this._fireMoveEvents(f)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(f)},s),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(s,f){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,f)}if(!s){const m=this.handlers;m&&m.stop(!1)}return this}_ease(s,f,m){m.animate===!1||m.duration===0?(s(1),f()):(this._easeStart=E.now(),this._easeOptions=m,this._onEaseFrame=s,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(s,f){s=l.b1(s,-180,180);const m=Math.abs(s-f);return Math.abs(s-360-f)180?-360:m<-180?360:0}queryTerrainElevation(s){return this.terrain?this.terrain.getElevationForLngLatZoom(l.M.convert(s),this.transform.tileZoom)-this.transform.elevation:null}}const Vp={compact:!0,customAttribution:'MapLibre'};class Ms{constructor(s=Vp){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=s}getDefaultPosition(){return"bottom-right"}onAdd(s){return this._map=s,this._compact=this.options.compact,this._container=T.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=T.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=T.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){T.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(s,f){const m=this._map._getUIString(`AttributionControl.${f}`);s.title=m,s.setAttribute("aria-label",m)}_updateAttributions(){if(!this._map.style)return;let s=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?s=s.concat(this.options.customAttribution.map(g=>typeof g!="string"?"":g)):typeof this.options.customAttribution=="string"&&s.push(this.options.customAttribution)),this._map.style.stylesheet){const g=this._map.style.stylesheet;this.styleOwner=g.owner,this.styleId=g.id}const f=this._map.style.sourceCaches;for(const g in f){const b=f[g];if(b.used||b.usedForTerrain){const C=b.getSource();C.attribution&&s.indexOf(C.attribution)<0&&s.push(C.attribution)}}s=s.filter(g=>String(g).trim()),s.sort((g,b)=>g.length-b.length),s=s.filter((g,b)=>{for(let C=b+1;C=0)return!1;return!0});const m=s.join(" | ");m!==this._attribHTML&&(this._attribHTML=m,s.length?(this._innerContainer.innerHTML=m,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ug{constructor(s={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const m=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact"):m.classList.remove("maplibregl-compact")}},this.options=s}getDefaultPosition(){return"bottom-left"}onAdd(s){this._map=s,this._compact=this.options&&this.options.compact,this._container=T.create("div","maplibregl-ctrl");const f=T.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){T.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class kc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(s){const f=++this._id;return this._queue.push({callback:s,id:f,cancelled:!1}),f}remove(s){const f=this._currentlyRunning,m=f?this._queue.concat(f):this._queue;for(const g of m)if(g.id===s)return void(g.cancelled=!0)}run(s=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const m of f)if(!m.cancelled&&(m.callback(s),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vr=l.X([{name:"a_pos3d",type:"Int16",components:3}]);class ei extends l.E{constructor(s){super(),this.sourceCache=s,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,s.usedForTerrain=!0,s.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(s,f){this.sourceCache.update(s,f),this._renderableTilesKeys=[];const m={};for(const g of s.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))m[g.key]=!0,this._renderableTilesKeys.push(g.key),this._tiles[g.key]||(g.posMatrix=new Float64Array(16),l.aN(g.posMatrix,0,l.W,0,l.W,0,1),this._tiles[g.key]=new ls(g,this.tileSize));for(const g in this._tiles)m[g]||delete this._tiles[g]}freeRtt(s){for(const f in this._tiles){const m=this._tiles[f];(!s||m.tileID.equals(s)||m.tileID.isChildOf(s)||s.isChildOf(m.tileID))&&(m.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(s=>this.getTileByID(s))}getTileByID(s){return this._tiles[s]}getTerrainCoords(s){const f={};for(const m of this._renderableTilesKeys){const g=this._tiles[m].tileID;if(g.canonical.equals(s.canonical)){const b=s.clone();b.posMatrix=new Float64Array(16),l.aN(b.posMatrix,0,l.W,0,l.W,0,1),f[m]=b}else if(g.canonical.isChildOf(s.canonical)){const b=s.clone();b.posMatrix=new Float64Array(16);const C=g.canonical.z-s.canonical.z,L=g.canonical.x-(g.canonical.x>>C<>C<>C;l.aN(b.posMatrix,0,N,0,N,0,1),l.H(b.posMatrix,b.posMatrix,[-L*N,-A*N,0]),f[m]=b}else if(s.canonical.isChildOf(g.canonical)){const b=s.clone();b.posMatrix=new Float64Array(16);const C=s.canonical.z-g.canonical.z,L=s.canonical.x-(s.canonical.x>>C<>C<>C;l.aN(b.posMatrix,0,l.W,0,l.W,0,1),l.H(b.posMatrix,b.posMatrix,[L*N,A*N,0]),l.J(b.posMatrix,b.posMatrix,[1/2**C,1/2**C,0]),f[m]=b}}return f}getSourceTile(s,f){const m=this.sourceCache._source;let g=s.overscaledZ-this.deltaZoom;if(g>m.maxzoom&&(g=m.maxzoom),g=m.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(s.scaledTo(g--).key);return b}tilesAfterTime(s=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=s)}}class cg{constructor(s,f,m){this.painter=s,this.sourceCache=new ei(f),this.options=m,this.exaggeration=typeof m.exaggeration=="number"?m.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(s,f,m,g=l.W){var b;if(!(f>=0&&f=0&&ms.canonical.z&&(s.canonical.z>=g?b=s.canonical.z-g:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const C=s.canonical.x-(s.canonical.x>>b<>b<>8<<4|b>>8,f[C+3]=0;const m=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),g=new Q(s,m,s.gl.RGBA,{premultiply:!1});return g.bind(s.gl.NEAREST,s.gl.CLAMP_TO_EDGE),this._coordsTexture=g,g}pointCoordinate(s){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),m=this.painter.context,g=m.gl,b=Math.round(s.x*this.painter.pixelRatio/devicePixelRatio),C=Math.round(s.y*this.painter.pixelRatio/devicePixelRatio),L=Math.round(this.painter.height/devicePixelRatio);m.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),g.readPixels(b,L-C-1,1,1,g.RGBA,g.UNSIGNED_BYTE,f),m.bindFramebuffer.set(null);const A=f[0]+(f[2]>>4<<8),N=f[1]+((15&f[2])<<8),V=this.coordsIndex[255-f[3]],j=V&&this.sourceCache.getTileByID(V);if(!j)return null;const Y=this._coordsTextureSize,ue=(1<s.id!==f),this._recentlyUsed.push(s.id)}stampObject(s){s.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const s=this._createObject(this._objects.length);return this._objects.push(s),s}freeObject(s){s.inUse=!1}freeAllObjects(){for(const s of this._objects)this.freeObject(s)}isFull(){return!(this._objects.length!s.inUse)===!1}}const ka={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Up{constructor(s,f){this.painter=s,this.terrain=f,this.pool=new Dc(s.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(s){return this.pool.getObjectForId(s.rtt[this._stacks.length-1].id).texture}prepareForRender(s,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=s._order.filter(m=>!s._layers[m].isHidden(f)),this._coordsDescendingInv={};for(const m in s.sourceCaches){this._coordsDescendingInv[m]={};const g=s.sourceCaches[m].getVisibleCoordinates();for(const b of g){const C=this.terrain.sourceCache.getTerrainCoords(b);for(const L in C)this._coordsDescendingInv[m][L]||(this._coordsDescendingInv[m][L]=[]),this._coordsDescendingInv[m][L].push(C[L])}}this._coordsDescendingInvStr={};for(const m of s._order){const g=s._layers[m],b=g.source;if(ka[g.type]&&!this._coordsDescendingInvStr[b]){this._coordsDescendingInvStr[b]={};for(const C in this._coordsDescendingInv[b])this._coordsDescendingInvStr[b][C]=this._coordsDescendingInv[b][C].map(L=>L.key).sort().join()}}for(const m of this._renderableTiles)for(const g in this._coordsDescendingInvStr){const b=this._coordsDescendingInvStr[g][m.tileID.key];b&&b!==m.rttCoords[g]&&(m.rtt=[])}}renderLayer(s){if(s.isHidden(this.painter.transform.zoom))return!1;const f=s.type,m=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===s.id;if(ka[f]&&(this._prevType&&ka[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(s.id),!g))return!0;if(ka[this._prevType]||ka[f]&&g){this._prevType=f;const b=this._stacks.length-1,C=this._stacks[b]||[];for(const L of this._renderableTiles){if(this.pool.isFull()&&(Vh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(L),L.rtt[b]){const N=this.pool.getObjectForId(L.rtt[b].id);if(N.stamp===L.rtt[b].stamp){this.pool.useObject(N);continue}}const A=this.pool.getOrCreateFreeObject();this.pool.useObject(A),this.pool.stampObject(A),L.rtt[b]={id:A.id,stamp:A.stamp},m.context.bindFramebuffer.set(A.fbo.framebuffer),m.context.clear({color:l.aO.transparent,stencil:0}),m.currentStencilSource=void 0;for(let N=0;N{y.touchstart=y.dragStart,y.touchmoveWindow=y.dragMove,y.touchend=y.dragEnd},qp={showCompass:!0,showZoom:!0,visualizePitch:!1};class Wp{constructor(s,f,m=!1){this.mousedown=C=>{this.startMouse(l.e({},C,{ctrlKey:!0,preventDefault:()=>C.preventDefault()}),T.mousePos(this.element,C)),T.addEventListener(window,"mousemove",this.mousemove),T.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=C=>{this.moveMouse(C,T.mousePos(this.element,C))},this.mouseup=C=>{this.mouseRotate.dragEnd(C),this.mousePitch&&this.mousePitch.dragEnd(C),this.offTemp()},this.touchstart=C=>{C.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=T.touchPos(this.element,C.targetTouches)[0],this.startTouch(C,this._startPos),T.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.addEventListener(window,"touchend",this.touchend))},this.touchmove=C=>{C.targetTouches.length!==1?this.reset():(this._lastPos=T.touchPos(this.element,C.targetTouches)[0],this.moveTouch(C,this._lastPos))},this.touchend=C=>{C.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const g=s.dragRotate._mouseRotate.getClickTolerance(),b=s.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=Pu({clickTolerance:g,enable:!0}),this.touchRotate=(({enable:C,clickTolerance:L,bearingDegreesPerPixelMoved:A=.8})=>{const N=new Ct;return new Lu({clickTolerance:L,move:(V,j)=>({bearingDelta:(j.x-V.x)*A}),moveStateManager:N,enable:C,assignEvents:Zh})})({clickTolerance:g,enable:!0}),this.map=s,m&&(this.mousePitch=Mu({clickTolerance:b,enable:!0}),this.touchPitch=(({enable:C,clickTolerance:L,pitchDegreesPerPixelMoved:A=-.5})=>{const N=new Ct;return new Lu({clickTolerance:L,move:(V,j)=>({pitchDelta:(j.y-V.y)*A}),moveStateManager:N,enable:C,assignEvents:Zh})})({clickTolerance:b,enable:!0})),T.addEventListener(f,"mousedown",this.mousedown),T.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),T.addEventListener(f,"touchcancel",this.reset)}startMouse(s,f){this.mouseRotate.dragStart(s,f),this.mousePitch&&this.mousePitch.dragStart(s,f),T.disableDrag()}startTouch(s,f){this.touchRotate.dragStart(s,f),this.touchPitch&&this.touchPitch.dragStart(s,f),T.disableDrag()}moveMouse(s,f){const m=this.map,{bearingDelta:g}=this.mouseRotate.dragMove(s,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.mousePitch){const{pitchDelta:b}=this.mousePitch.dragMove(s,f)||{};b&&m.setPitch(m.getPitch()+b)}}moveTouch(s,f){const m=this.map,{bearingDelta:g}=this.touchRotate.dragMove(s,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.touchPitch){const{pitchDelta:b}=this.touchPitch.dragMove(s,f)||{};b&&m.setPitch(m.getPitch()+b)}}off(){const s=this.element;T.removeEventListener(s,"mousedown",this.mousedown),T.removeEventListener(s,"touchstart",this.touchstart,{passive:!1}),T.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.removeEventListener(window,"touchend",this.touchend),T.removeEventListener(s,"touchcancel",this.reset),this.offTemp()}offTemp(){T.enableDrag(),T.removeEventListener(window,"mousemove",this.mousemove),T.removeEventListener(window,"mouseup",this.mouseup),T.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),T.removeEventListener(window,"touchend",this.touchend)}}let Da;function Xh(y,s,f){const m=new l.M(y.lng,y.lat);if(y=new l.M(y.lng,y.lat),s){const g=new l.M(y.lng-360,y.lat),b=new l.M(y.lng+360,y.lat),C=f.locationPoint(y).distSqr(s);f.locationPoint(g).distSqr(s)180;){const g=f.locationPoint(y);if(g.x>=0&&g.y>=0&&g.x<=f.width&&g.y<=f.height)break;y.lng>f.center.lng?y.lng-=360:y.lng+=360}return y.lng!==m.lng&&f.locationPoint(y).y>f.height/2-f.getHorizon()?y:m}const Nc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yh(y,s,f){const m=y.classList;for(const g in Nc)m.remove(`maplibregl-${f}-anchor-${g}`);m.add(`maplibregl-${f}-anchor-${s}`)}class Oc extends l.E{constructor(s){if(super(),this._onKeyPress=f=>{const m=f.code,g=f.charCode||f.keyCode;m!=="Space"&&m!=="Enter"&&g!==32&&g!==13||this.togglePopup()},this._onMapClick=f=>{const m=f.originalEvent.target,g=this._element;this._popup&&(m===g||g.contains(m))&&this.togglePopup()},this._update=f=>{var m;if(!this._map)return;const g=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!g)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Xh(this._lngLat,this._flatPos,this._map.transform):(m=this._lngLat)===null||m===void 0?void 0:m.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let b="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?b=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(b=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let C="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?C="rotateX(0deg)":this._pitchAlignment==="map"&&(C=`rotateX(${this._map.getPitch()}deg)`),f&&f.type!=="moveend"||(this._pos=this._pos.round()),T.setTransform(this._element,`${Nc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${C} ${b}`),E.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.k("dragstart"))),this.fire(new l.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=s&&s.anchor||"center",this._color=s&&s.color||"#3FB1CE",this._scale=s&&s.scale||1,this._draggable=s&&s.draggable||!1,this._clickTolerance=s&&s.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=s&&s.rotation||0,this._rotationAlignment=s&&s.rotationAlignment||"auto",this._pitchAlignment=s&&s.pitchAlignment&&s.pitchAlignment!=="auto"?s.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(s==null?void 0:s.opacity,s==null?void 0:s.opacityWhenCovered),s&&s.element)this._element=s.element,this._offset=l.P.convert(s&&s.offset||[0,0]);else{this._defaultMarker=!0,this._element=T.create("div"),this._element.setAttribute("aria-label","Map marker");const f=T.createNS("http://www.w3.org/2000/svg","svg"),m=41,g=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${m}px`),f.setAttributeNS(null,"width",`${g}px`),f.setAttributeNS(null,"viewBox",`0 0 ${g} ${m}`);const b=T.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const C=T.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"fill-rule","nonzero");const L=T.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"transform","translate(3.0, 29.0)"),L.setAttributeNS(null,"fill","#000000");const A=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Ie of A){const Be=T.createNS("http://www.w3.org/2000/svg","ellipse");Be.setAttributeNS(null,"opacity","0.04"),Be.setAttributeNS(null,"cx","10.5"),Be.setAttributeNS(null,"cy","5.80029008"),Be.setAttributeNS(null,"rx",Ie.rx),Be.setAttributeNS(null,"ry",Ie.ry),L.appendChild(Be)}const N=T.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"fill",this._color);const V=T.createNS("http://www.w3.org/2000/svg","path");V.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),N.appendChild(V);const j=T.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const Y=T.createNS("http://www.w3.org/2000/svg","path");Y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),j.appendChild(Y);const ue=T.createNS("http://www.w3.org/2000/svg","g");ue.setAttributeNS(null,"transform","translate(6.0, 7.0)"),ue.setAttributeNS(null,"fill","#FFFFFF");const le=T.createNS("http://www.w3.org/2000/svg","g");le.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ge=T.createNS("http://www.w3.org/2000/svg","circle");ge.setAttributeNS(null,"fill","#000000"),ge.setAttributeNS(null,"opacity","0.25"),ge.setAttributeNS(null,"cx","5.5"),ge.setAttributeNS(null,"cy","5.5"),ge.setAttributeNS(null,"r","5.4999962");const ne=T.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#FFFFFF"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962"),le.appendChild(ge),le.appendChild(ne),C.appendChild(L),C.appendChild(N),C.appendChild(j),C.appendChild(ue),C.appendChild(le),f.appendChild(C),f.setAttributeNS(null,"height",m*this._scale+"px"),f.setAttributeNS(null,"width",g*this._scale+"px"),this._element.appendChild(f),this._offset=l.P.convert(s&&s.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),Yh(this._element,this._anchor,"marker"),s&&s.className)for(const f of s.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(s){return this.remove(),this._map=s,s.getCanvasContainer().appendChild(this._element),s.on("move",this._update),s.on("moveend",this._update),s.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),T.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(s){return this._lngLat=l.M.convert(s),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(s){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),s){if(!("offset"in s.options)){const g=Math.abs(13.5)/Math.SQRT2;s.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[g,-1*(38.1-13.5+g)],"bottom-right":[-g,-1*(38.1-13.5+g)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=s,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const s=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:s?(s.isOpen()?s.remove():(s.setLngLat(this._lngLat),s.addTo(this._map)),this):this}_updateOpacity(s=!1){var f,m;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(s)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,b=g.terrain.depthAtPoint(this._pos),C=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,C)-b<.006)return void(this._element.style.opacity=this._opacity);const L=-this._offset.y/g.transform._pixelPerMeter,A=Math.sin(g.getPitch()*Math.PI/180)*L,N=g.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),V=g.transform.lngLatToCameraDepth(this._lngLat,C+A)-N>.006;!((m=this._popup)===null||m===void 0)&&m.isOpen()&&V&&this._popup.remove(),this._element.style.opacity=V?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(s){return this._offset=l.P.convert(s),this._update(),this}addClassName(s){this._element.classList.add(s)}removeClassName(s){this._element.classList.remove(s)}toggleClassName(s){return this._element.classList.toggle(s)}setDraggable(s){return this._draggable=!!s,this._map&&(s?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(s){return this._rotation=s||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(s){return this._rotationAlignment=s||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(s){return this._pitchAlignment=s&&s!=="auto"?s:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(s,f){return s===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),s!==void 0&&(this._opacity=s),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const Kh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let ku=0,Wl=!1;const Jh={maxWidth:100,unit:"metric"};function $h(y,s,f){const m=f&&f.maxWidth||100,g=y._container.clientHeight/2,b=y.unproject([0,g]),C=y.unproject([m,g]),L=b.distanceTo(C);if(f&&f.unit==="imperial"){const A=3.2808*L;A>5280?Hl(s,m,A/5280,y._getUIString("ScaleControl.Miles")):Hl(s,m,A,y._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?Hl(s,m,L/1852,y._getUIString("ScaleControl.NauticalMiles")):L>=1e3?Hl(s,m,L/1e3,y._getUIString("ScaleControl.Kilometers")):Hl(s,m,L,y._getUIString("ScaleControl.Meters"))}function Hl(y,s,f,m){const g=function(b){const C=Math.pow(10,`${Math.floor(b)}`.length-1);let L=b/C;return L=L>=10?10:L>=5?5:L>=3?3:L>=2?2:L>=1?1:function(A){const N=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*N)/N}(L),C*L}(f);y.style.width=s*(g/f)+"px",y.innerHTML=`${g} ${m}`}const Hp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Zp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qh(y){if(y){if(typeof y=="number"){const s=Math.round(Math.abs(y)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,y),"top-left":new l.P(s,s),"top-right":new l.P(-s,s),bottom:new l.P(0,-y),"bottom-left":new l.P(s,-s),"bottom-right":new l.P(-s,-s),left:new l.P(y,0),right:new l.P(-y,0)}}if(y instanceof l.P||Array.isArray(y)){const s=l.P.convert(y);return{center:s,top:s,"top-left":s,"top-right":s,bottom:s,"bottom-left":s,"bottom-right":s,left:s,right:s}}return{center:l.P.convert(y.center||[0,0]),top:l.P.convert(y.top||[0,0]),"top-left":l.P.convert(y["top-left"]||[0,0]),"top-right":l.P.convert(y["top-right"]||[0,0]),bottom:l.P.convert(y.bottom||[0,0]),"bottom-left":l.P.convert(y["bottom-left"]||[0,0]),"bottom-right":l.P.convert(y["bottom-right"]||[0,0]),left:l.P.convert(y.left||[0,0]),right:l.P.convert(y.right||[0,0])}}return Qh(new l.P(0,0))}const hg=d;c.AJAXError=l.be,c.Evented=l.E,c.LngLat=l.M,c.MercatorCoordinate=l.Y,c.Point=l.P,c.addProtocol=l.bf,c.config=l.a,c.removeProtocol=l.bg,c.AttributionControl=Ms,c.BoxZoomHandler=Ls,c.CanvasSource=Is,c.CooperativeGesturesHandler=Nt,c.DoubleClickZoomHandler=Fp,c.DragPanHandler=lg,c.DragRotateHandler=Ps,c.EdgeInsets=Cu,c.FullscreenControl=class extends l.E{constructor(y={}){super(),this._onFullscreenChange=()=>{var s;let f=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((s=f==null?void 0:f.shadowRoot)===null||s===void 0)&&s.fullscreenElement;)f=f.shadowRoot.fullscreenElement;f===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){T.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const y=this._fullscreenButton=T.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);T.create("span","maplibregl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.title=y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},c.GeoJSONSource=In,c.GeolocateControl=class extends l.E{constructor(y){super(),this._onSuccess=s=>{if(this._map){if(this._isOutOfMapMaxBounds(s))return this._setErrorState(),this.fire(new l.k("outofmaxbounds",s)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=s,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(s),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(s),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.k("geolocate",s)),this._finish()}},this._updateCamera=s=>{const f=new l.M(s.coords.longitude,s.coords.latitude),m=s.coords.accuracy,g=this._map.getBearing(),b=l.e({bearing:g},this.options.fitBoundsOptions),C=Ae.fromLngLat(f,m);this._map.fitBounds(C,b,{geolocateSource:!0})},this._updateMarker=s=>{if(s){const f=new l.M(s.coords.longitude,s.coords.latitude);this._accuracyCircleMarker.setLngLat(f).addTo(this._map),this._userLocationDotMarker.setLngLat(f).addTo(this._map),this._accuracy=s.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=s=>{if(this._map){if(this.options.trackUserLocation)if(s.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(s.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.k("error",s)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=s=>{if(this._map){if(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=T.create("button","maplibregl-ctrl-geolocate",this._container),T.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",s===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}else{const f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=T.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Oc({element:this._dotElement}),this._circleElement=T.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",f=>{f.geolocateSource||this._watchState!=="ACTIVE_LOCK"||f.originalEvent&&f.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new l.k("trackuserlocationend")))})}},this.options=l.e({},Kh,y)}onAdd(y){return this._map=y,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return l._(this,arguments,void 0,function*(s=!1){if(Da!==void 0&&!s)return Da;if(window.navigator.permissions===void 0)return Da=!!window.navigator.geolocation,Da;try{Da=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Da=!!window.navigator.geolocation}return Da})}().then(s=>this._setupUI(s)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),T.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ku=0,Wl=!1}_isOutOfMapMaxBounds(y){const s=this._map.getMaxBounds(),f=y.coords;return s&&(f.longitudes.getEast()||f.latitudes.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const y=this._map.getBounds(),s=y.getSouthEast(),f=y.getNorthEast(),m=s.distanceTo(f),g=Math.ceil(this._accuracy/(m/this._map._container.clientHeight)*2);this._circleElement.style.width=`${g}px`,this._circleElement.style.height=`${g}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ku--,Wl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.k("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ku++,ku>1?(y={maximumAge:6e5,timeout:0},Wl=!0):(y=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},c.Hash=Rp,c.ImageSource=lr,c.KeyboardHandler=al,c.LngLatBounds=Ae,c.LogoControl=ug,c.Map=class extends Co{constructor(y){if(l.bc.mark(l.bd.create),(y=l.e({},Rc,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uh(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies),{bearingSnap:y.bearingSnap}),this._contextLost=s=>{s.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.k("webglcontextlost",{originalEvent:s}))},this._contextRestored=s=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.k("webglcontextrestored",{originalEvent:s}))},this._onMapScroll=s=>{if(s.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._maxTileCacheZoomLevels=y.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new kc,this._controls=[],this._mapId=l.a3(),this._locale=l.e({},jp,y.locale),this._clickTolerance=y.clickTolerance,this._overridePixelRatio=y.pixelRatio,this._maxCanvasSize=y.maxCanvasSize,this.transformCameraUpdate=y.transformCameraUpdate,this._imageQueueHandle=G.addThrottleControl(()=>this.isMoving()),this._requestManager=new H(y.transformRequest),typeof y.container=="string"){if(this._container=document.getElementById(y.container),!this._container)throw new Error(`Container '${y.container}' not found.`)}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let s=!1;const f=Dp(m=>{this._trackResize&&!this._removed&&this.resize(m)._update()},50);this._resizeObserver=new ResizeObserver(m=>{s?f(m):s=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Bp(this,y),this._hash=y.hash&&new Rp(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,l.e({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,this._validateStyle=y.validateStyle,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new Ms(typeof y.attributionControl=="boolean"?void 0:y.attributionControl)),y.maplibreLogo&&this.addControl(new ug,y.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",s=>{this._update(s.dataType==="style"),this.fire(new l.k(`${s.dataType}data`,s))}),this.on("dataloading",s=>{this.fire(new l.k(`${s.dataType}dataloading`,s))}),this.on("dataabort",s=>{this.fire(new l.k("sourcedataabort",s))})}_getMapId(){return this._mapId}addControl(y,s){if(s===void 0&&(s=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new l.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=y.onAdd(this);this._controls.push(y);const m=this._controlPositions[s];return s.indexOf("bottom")!==-1?m.insertBefore(f,m.firstChild):m.appendChild(f),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new l.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const s=this._controls.indexOf(y);return s>-1&&this._controls.splice(s,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}calculateCameraOptionsFromTo(y,s,f,m){return m==null&&this.terrain&&(m=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(y,s,f,m)}resize(y){var s;const f=this._containerDimensions(),m=f[0],g=f[1],b=this._getClampedPixelRatio(m,g);if(this._resizeCanvas(m,g,b),this.painter.resize(m,g,b),this.painter.overLimit()){const L=this.painter.context.gl;this._maxCanvasSize=[L.drawingBufferWidth,L.drawingBufferHeight];const A=this._getClampedPixelRatio(m,g);this._resizeCanvas(m,g,A),this.painter.resize(m,g,A)}this.transform.resize(m,g),(s=this._requestedCameraState)===null||s===void 0||s.resize(m,g);const C=!this._moving;return C&&(this.stop(),this.fire(new l.k("movestart",y)).fire(new l.k("move",y))),this.fire(new l.k("resize",y)),C&&this.fire(new l.k("moveend",y)),this}_getClampedPixelRatio(y,s){const{0:f,1:m}=this._maxCanvasSize,g=this.getPixelRatio(),b=y*g,C=s*g;return Math.min(b>f?f/b:1,C>m?m/C:1)*g}getPixelRatio(){var y;return(y=this._overridePixelRatio)!==null&&y!==void 0?y:devicePixelRatio}setPixelRatio(y){this._overridePixelRatio=y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(y){return this.transform.setMaxBounds(Ae.convert(y)),this._update()}setMinZoom(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this._update()}project(y){return this.transform.locationPoint(l.M.convert(y),this.style&&this.terrain)}unproject(y){return this.transform.pointLocation(l.P.convert(y),this.terrain)}isMoving(){var y;return this._moving||((y=this.handlers)===null||y===void 0?void 0:y.isMoving())}isZooming(){var y;return this._zooming||((y=this.handlers)===null||y===void 0?void 0:y.isZooming())}isRotating(){var y;return this._rotating||((y=this.handlers)===null||y===void 0?void 0:y.isRotating())}_createDelegatedListener(y,s,f){if(y==="mouseenter"||y==="mouseover"){let m=!1;return{layer:s,listener:f,delegates:{mousemove:b=>{const C=this.getLayer(s)?this.queryRenderedFeatures(b.point,{layers:[s]}):[];C.length?m||(m=!0,f.call(this,new Io(y,this,b.originalEvent,{features:C}))):m=!1},mouseout:()=>{m=!1}}}}if(y==="mouseleave"||y==="mouseout"){let m=!1;return{layer:s,listener:f,delegates:{mousemove:C=>{(this.getLayer(s)?this.queryRenderedFeatures(C.point,{layers:[s]}):[]).length?m=!0:m&&(m=!1,f.call(this,new Io(y,this,C.originalEvent)))},mouseout:C=>{m&&(m=!1,f.call(this,new Io(y,this,C.originalEvent)))}}}}{const m=g=>{const b=this.getLayer(s)?this.queryRenderedFeatures(g.point,{layers:[s]}):[];b.length&&(g.features=b,f.call(this,g),delete g.features)};return{layer:s,listener:f,delegates:{[y]:m}}}}on(y,s,f){if(f===void 0)return super.on(y,s);const m=this._createDelegatedListener(y,s,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(m);for(const g in m.delegates)this.on(g,m.delegates[g]);return this}once(y,s,f){if(f===void 0)return super.once(y,s);const m=this._createDelegatedListener(y,s,f);for(const g in m.delegates)this.once(g,m.delegates[g]);return this}off(y,s,f){return f===void 0?super.off(y,s):(this._delegatedListeners&&this._delegatedListeners[y]&&(m=>{const g=this._delegatedListeners[y];for(let b=0;bthis._updateStyle(y,s));const f=this.style&&s.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!y)),y?(this.style=new Uo(this,s||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y,s,f):this.style.loadJSON(y,s,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Uo(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(y,s){if(typeof y=="string"){const f=this._requestManager.transformRequest(y,"Style");l.h(f,new AbortController).then(m=>{this._updateDiff(m.data,s)}).catch(m=>{m&&this.fire(new l.j(m))})}else typeof y=="object"&&this._updateDiff(y,s)}_updateDiff(y,s){try{this.style.setState(y,s)&&this._update(!0)}catch(f){l.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(y,s)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(y,s){return this._lazyInitEmptyStyle(),this.style.addSource(y,s),this._update(!0)}isSourceLoaded(y){const s=this.style&&this.style.sourceCaches[y];if(s!==void 0)return s.loaded();this.fire(new l.j(new Error(`There is no source with ID '${y}'`)))}setTerrain(y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),y){const s=this.style.sourceCaches[y.source];if(!s)throw new Error(`cannot load terrain, because there exists no source with ID: ${y.source}`);this.terrain===null&&s.reload();for(const f in this.style._layers){const m=this.style._layers[f];m.type==="hillshade"&&m.source===y.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new cg(this.painter,s,y),this.painter.renderToTexture=new Up(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==y.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new l.k("terrain",{terrain:y})),this}getTerrain(){var y,s;return(s=(y=this.terrain)===null||y===void 0?void 0:y.options)!==null&&s!==void 0?s:null}areTilesLoaded(){const y=this.style&&this.style.sourceCaches;for(const s in y){const f=y[s]._tiles;for(const m in f){const g=f[m];if(g.state!=="loaded"&&g.state!=="errored")return!1}}return!0}removeSource(y){return this.style.removeSource(y),this._update(!0)}getSource(y){return this.style.getSource(y)}addImage(y,s,f={}){const{pixelRatio:m=1,sdf:g=!1,stretchX:b,stretchY:C,content:L}=f;if(this._lazyInitEmptyStyle(),!(s instanceof HTMLImageElement||l.b(s))){if(s.width===void 0||s.height===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:A,height:N,data:V}=s,j=s;return this.style.addImage(y,{data:new l.R({width:A,height:N},new Uint8Array(V)),pixelRatio:m,stretchX:b,stretchY:C,content:L,sdf:g,version:0,userImage:j}),j.onAdd&&j.onAdd(this,y),this}}{const{width:A,height:N,data:V}=E.getImageData(s);this.style.addImage(y,{data:new l.R({width:A,height:N},V),pixelRatio:m,stretchX:b,stretchY:C,content:L,sdf:g,version:0})}}updateImage(y,s){const f=this.style.getImage(y);if(!f)return this.fire(new l.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const m=s instanceof HTMLImageElement||l.b(s)?E.getImageData(s):s,{width:g,height:b,data:C}=m;if(g===void 0||b===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(g!==f.data.width||b!==f.data.height)return this.fire(new l.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const L=!(s instanceof HTMLImageElement||l.b(s));return f.data.replace(C,L),this.style.updateImage(y,f),this}getImage(y){return this.style.getImage(y)}hasImage(y){return y?!!this.style.getImage(y):(this.fire(new l.j(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(y)}loadImage(y){return G.getImage(this._requestManager.transformRequest(y,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(y,s){return this._lazyInitEmptyStyle(),this.style.addLayer(y,s),this._update(!0)}moveLayer(y,s){return this.style.moveLayer(y,s),this._update(!0)}removeLayer(y){return this.style.removeLayer(y),this._update(!0)}getLayer(y){return this.style.getLayer(y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(y,s,f){return this.style.setLayerZoomRange(y,s,f),this._update(!0)}setFilter(y,s,f={}){return this.style.setFilter(y,s,f),this._update(!0)}getFilter(y){return this.style.getFilter(y)}setPaintProperty(y,s,f,m={}){return this.style.setPaintProperty(y,s,f,m),this._update(!0)}getPaintProperty(y,s){return this.style.getPaintProperty(y,s)}setLayoutProperty(y,s,f,m={}){return this.style.setLayoutProperty(y,s,f,m),this._update(!0)}getLayoutProperty(y,s){return this.style.getLayoutProperty(y,s)}setGlyphs(y,s={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(y,s),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(y,s,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(y,s,f,m=>{m||this._update(!0)}),this}removeSprite(y){return this._lazyInitEmptyStyle(),this.style.removeSprite(y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(y,s={}){return this._lazyInitEmptyStyle(),this.style.setSprite(y,s,f=>{f||this._update(!0)}),this}setLight(y,s={}){return this._lazyInitEmptyStyle(),this.style.setLight(y,s),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(y,s){return this.style.setFeatureState(y,s),this._update()}removeFeatureState(y,s){return this.style.removeFeatureState(y,s),this._update()}getFeatureState(y){return this.style.getFeatureState(y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let y=0,s=0;return this._container&&(y=this._container.clientWidth||400,s=this._container.clientHeight||300),[y,s]}_setupContainer(){const y=this._container;y.classList.add("maplibregl-map");const s=this._canvasContainer=T.create("div","maplibregl-canvas-container",y);this._interactive&&s.classList.add("maplibregl-interactive"),this._canvas=T.create("canvas","maplibregl-canvas",s),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),m=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],m);const g=this._controlContainer=T.create("div","maplibregl-control-container",y),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(C=>{b[C]=T.create("div",`maplibregl-ctrl-${C} `,g)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(y,s,f){this._canvas.width=Math.floor(f*y),this._canvas.height=Math.floor(f*s),this._canvas.style.width=`${y}px`,this._canvas.style.height=`${s}px`}_setupPainter(){const y={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let s=null;this._canvas.addEventListener("webglcontextcreationerror",m=>{s={requestedAttributes:y},m&&(s.statusMessage=m.statusMessage,s.type=m.type)},{once:!0});const f=this._canvas.getContext("webgl2",y)||this._canvas.getContext("webgl",y);if(!f){const m="Failed to initialize WebGL";throw s?(s.message=m,new Error(JSON.stringify(s))):new Error(m)}this.painter=new Jm(f,this.transform),M.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(y){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_render(y){const s=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const g=this.transform.zoom,b=E.now();this.style.zoomHistory.update(g,b);const C=new l.a8(g,{now:b,fadeDuration:s,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),L=C.crossFadingFactor();L===1&&L===this._crossFadingFactor||(f=!0,this._crossFadingFactor=L),this.style.update(C)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,s,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:s,showPadding:this.showPadding}),this.fire(new l.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.bc.mark(l.bd.load),this.fire(new l.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const m=this._sourcesDirty||this._styleDirty||this._placementDirty;return m||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.k("idle")),!this._loaded||this._fullyLoaded||m||(this._fullyLoaded=!0,l.bc.mark(l.bd.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var y;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),G.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();const s=this.painter.context.gl.getExtension("WEBGL_lose_context");s&&s.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),T.remove(this._canvasContainer),T.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),l.bc.clearMetrics(),this._removed=!0,this.fire(new l.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(y=>{l.bc.frame(y),this._frameRequest=null,this._render(y)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}get version(){return Gp}getCameraTargetElevation(){return this.transform.elevation}},c.MapMouseEvent=Io,c.MapTouchEvent=Qs,c.MapWheelEvent=Np,c.Marker=Oc,c.NavigationControl=class{constructor(y){this._updateZoomButtons=()=>{const s=this._map.getZoom(),f=s===this._map.getMaxZoom(),m=s===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())},this._rotateCompassArrow=()=>{const s=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=s},this._setButtonTitle=(s,f)=>{const m=this._map._getUIString(`NavigationControl.${f}`);s.title=m,s.setAttribute("aria-label",m)},this.options=l.e({},qp,y),this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",s=>s.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",s=>this._map.zoomIn({},{originalEvent:s})),T.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",s=>this._map.zoomOut({},{originalEvent:s})),T.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",s=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:s}):this._map.resetNorth({},{originalEvent:s})}),this._compassIcon=T.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Wp(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){T.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(y,s){const f=T.create("button",y,this._container);return f.type="button",f.addEventListener("click",s),f}},c.Popup=class extends l.E{constructor(y){super(),this.remove=()=>(this._content&&T.remove(this._content),this._container&&(T.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.k("close"))),this),this._onMouseUp=s=>{this._update(s.point)},this._onMouseMove=s=>{this._update(s.point)},this._onDrag=s=>{this._update(s.point)},this._update=s=>{var f;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=T.create("div","maplibregl-popup",this._map.getContainer()),this._tip=T.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const L of this.options.className.split(" "))this._container.classList.add(L);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Xh(this._lngLat,this._flatPos,this._map.transform):(f=this._lngLat)===null||f===void 0?void 0:f.wrap(),this._trackPointer&&!s)return;const m=this._flatPos=this._pos=this._trackPointer&&s?s:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&s?s:this._map.transform.locationPoint(this._lngLat));let g=this.options.anchor;const b=Qh(this.options.offset);if(!g){const L=this._container.offsetWidth,A=this._container.offsetHeight;let N;N=m.y+b.bottom.ythis._map.transform.height-A?["bottom"]:[],m.xthis._map.transform.width-L/2&&N.push("right"),g=N.length===0?"bottom":N.join("-")}let C=m.add(b[g]);this.options.subpixelPositioning||(C=C.round()),T.setTransform(this._container,`${Nc[g]} translate(${C.x}px,${C.y}px)`),Yh(this._container,g,"popup")},this._onClose=()=>{this.remove()},this.options=l.e(Object.create(Hp),y)}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=l.M.convert(y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){const s=document.createDocumentFragment(),f=document.createElement("body");let m;for(f.innerHTML=y;m=f.firstChild,m;)s.appendChild(m);return this.setDOMContent(s)}getMaxWidth(){var y;return(y=this._container)===null||y===void 0?void 0:y.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=T.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(y){this._container&&this._container.classList.add(y)}removeClassName(y){this._container&&this._container.classList.remove(y)}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){if(this._container)return this._container.classList.toggle(y)}setSubpixelPositioning(y){this.options.subpixelPositioning=y}_createCloseButton(){this.options.closeButton&&(this._closeButton=T.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const y=this._container.querySelector(Zp);y&&y.focus()}},c.RasterDEMTileSource=It,c.RasterTileSource=Re,c.ScaleControl=class{constructor(y){this._onMove=()=>{$h(this._map,this._container,this.options)},this.setUnit=s=>{this.options.unit=s,$h(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Jh),y)}getDefaultPosition(){return"bottom-left"}onAdd(y){return this._map=y,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-scale",y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){T.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},c.ScrollZoomHandler=Wh,c.Style=Uo,c.TerrainControl=class{constructor(y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=y}onAdd(y){return this._map=y,this._container=T.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=T.create("button","maplibregl-ctrl-terrain",this._container),T.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){T.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},c.TwoFingersTouchPitchHandler=og,c.TwoFingersTouchRotateHandler=zp,c.TwoFingersTouchZoomHandler=ig,c.TwoFingersTouchZoomRotateHandler=Mc,c.VectorTileSource=en,c.VideoSource=Bo,c.addSourceType=(y,s)=>l._(void 0,void 0,void 0,function*(){if(tl(y))throw new Error(`A source type called "${y}" already exists.`);((f,m)=>{Ks[f]=m})(y,s)}),c.clearPrewarmedResources=function(){const y=fn;y&&(y.isPreloaded()&&y.numActive()===1?(y.release(Lt),fn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},c.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},c.getRTLTextPluginStatus=function(){return ot().getRTLTextPluginStatus()},c.getVersion=function(){return hg},c.getWorkerCount=function(){return rn.workerCount},c.getWorkerUrl=function(){return l.a.WORKER_URL},c.importScriptInWorkers=function(y){return zr().broadcast("IS",y)},c.prewarm=function(){pn().acquire(Lt)},c.setMaxParallelImageRequests=function(y){l.a.MAX_PARALLEL_IMAGE_REQUESTS=y},c.setRTLTextPlugin=function(y,s){return ot().setRTLTextPlugin(y,s)},c.setWorkerCount=function(y){rn.workerCount=y},c.setWorkerUrl=function(y){l.a.WORKER_URL=y}});var a=n;return a})})(ZE);var ny=ZE.exports;const Fs=d1(ny),df=[];function N0(t,e){return{subscribe:Nn(t,e).subscribe}}function Nn(t,e=Mt){let n;const r=new Set;function i(l){if(Vt(t,l)&&(t=l,n)){const d=!df.length;for(const v of r)v[1](),df.push(v,t);if(d){for(let v=0;v{r.delete(v),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:c}}let Ht;const YE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&YE.decode();let Ld=null;function Fd(){return(Ld===null||Ld.byteLength===0)&&(Ld=new Uint8Array(Ht.memory.buffer)),Ld}function vl(t,e){return t=t>>>0,YE.decode(Fd().subarray(t,t+e))}const ru=new Array(128).fill(void 0);ru.push(void 0,null,!0,!1);let Bd=ru.length;function Ui(t){Bd===ru.length&&ru.push(ru.length+1);const e=Bd;return Bd=ru[e],ru[e]=t,e}function kn(t){return ru[t]}function cM(t){t<132||(ru[t]=Bd,Bd=t)}function Kg(t){const e=kn(t);return cM(t),e}function O0(t){return t==null}let Pd=null;function hM(){return(Pd===null||Pd.byteLength===0)&&(Pd=new Float64Array(Ht.memory.buffer)),Pd}let Md=null;function gr(){return(Md===null||Md.byteLength===0)&&(Md=new Int32Array(Ht.memory.buffer)),Md}let Wu=0;const Jg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},fM=typeof Jg.encodeInto=="function"?function(t,e){return Jg.encodeInto(t,e)}:function(t,e){const n=Jg.encode(t);return e.set(n),{read:t.length,written:n.length}};function Ng(t,e,n){if(n===void 0){const l=Jg.encode(t),d=e(l.length,1)>>>0;return Fd().subarray(d,d+l.length).set(l),Wu=l.length,d}let r=t.length,i=e(r,1)>>>0;const a=Fd();let c=0;for(;c127)break;a[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Fd().subarray(i+c,i+r),d=fM(t,l);c+=d.written}return Wu=c,i}function dv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let a="[";i>0&&(a+=dv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} -${t.stack}`:r}function pM(t,e){const n=e(t.length*1,1)>>>0;return Fd().set(t,n/1),Wu=t.length,n}function z0(t,e){try{return t.apply(this,e)}catch(n){Ht.__wbindgen_exn_store(Ui(n))}}class h_{static __wrap(e){e=e>>>0;const n=Object.create(h_.prototype);return n.__wbg_ptr=e,n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();Ht.__wbg_jsroutesnapper_free(e)}constructor(e){try{const a=Ht.__wbindgen_add_to_stack_pointer(-16),c=pM(e,Ht.__wbindgen_malloc),l=Wu;Ht.jsroutesnapper_new(a,c,l);var n=gr()[a/4+0],r=gr()[a/4+1],i=gr()[a/4+2];if(i)throw Kg(r);return h_.__wrap(n)}finally{Ht.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(e){Ht.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Ui(e))}setAreaMode(){Ht.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let e,n;try{const a=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_getConfig(a,this.__wbg_ptr);var r=gr()[a/4+0],i=gr()[a/4+1];return e=r,n=i,vl(r,i)}finally{Ht.__wbindgen_add_to_stack_pointer(16),Ht.__wbindgen_free(e,n,1)}}toFinalFeature(){try{const r=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_toFinalFeature(r,this.__wbg_ptr);var e=gr()[r/4+0],n=gr()[r/4+1];let i;return e!==0&&(i=vl(e,n).slice(),Ht.__wbindgen_free(e,n*1)),i}finally{Ht.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let e,n;try{const a=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_renderGeojson(a,this.__wbg_ptr);var r=gr()[a/4+0],i=gr()[a/4+1];return e=r,n=i,vl(r,i)}finally{Ht.__wbindgen_add_to_stack_pointer(16),Ht.__wbindgen_free(e,n,1)}}toggleSnapMode(){Ht.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(e,n,r){return Ht.jsroutesnapper_onMouseMove(this.__wbg_ptr,e,n,r)!==0}onClick(){Ht.jsroutesnapper_onClick(this.__wbg_ptr)}onDragStart(){return Ht.jsroutesnapper_onDragStart(this.__wbg_ptr)!==0}onMouseUp(){return Ht.jsroutesnapper_onMouseUp(this.__wbg_ptr)!==0}clearState(){Ht.jsroutesnapper_clearState(this.__wbg_ptr)}editExisting(e){try{const i=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_editExisting(i,this.__wbg_ptr,Ui(e));var n=gr()[i/4+0],r=gr()[i/4+1];if(r)throw Kg(n)}finally{Ht.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let e,n;try{const a=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_debugRenderGraph(a,this.__wbg_ptr);var r=gr()[a/4+0],i=gr()[a/4+1];return e=r,n=i,vl(r,i)}finally{Ht.__wbindgen_add_to_stack_pointer(16),Ht.__wbindgen_free(e,n,1)}}debugSnappableNodes(){let e,n;try{const a=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_debugSnappableNodes(a,this.__wbg_ptr);var r=gr()[a/4+0],i=gr()[a/4+1];return e=r,n=i,vl(r,i)}finally{Ht.__wbindgen_add_to_stack_pointer(16),Ht.__wbindgen_free(e,n,1)}}routeNameForWaypoints(e){let n,r;try{const S=Ht.__wbindgen_add_to_stack_pointer(-16);Ht.jsroutesnapper_routeNameForWaypoints(S,this.__wbg_ptr,Ui(e));var i=gr()[S/4+0],a=gr()[S/4+1],c=gr()[S/4+2],l=gr()[S/4+3],d=i,v=a;if(l)throw d=0,v=0,Kg(c);return n=d,r=v,vl(d,v)}finally{Ht.__wbindgen_add_to_stack_pointer(16),Ht.__wbindgen_free(n,r,1)}}addSnappedWaypoint(e,n){Ht.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,e,n)}undo(){Ht.jsroutesnapper_undo(this.__wbg_ptr)}}async function dM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){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",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function mM(){const t={};return t.wbg={},t.wbg.__wbindgen_string_new=function(e,n){const r=vl(e,n);return Ui(r)},t.wbg.__wbindgen_object_drop_ref=function(e){Kg(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(vl(e,n));return Ui(r)},t.wbg.__wbindgen_is_object=function(e){const n=kn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return kn(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return kn(e)in kn(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=kn(n),i=typeof r=="number"?r:void 0;hM()[e/8+1]=O0(i)?0:i,gr()[e/4+0]=!O0(i)},t.wbg.__wbindgen_boolean_get=function(e){const n=kn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return kn(e)==kn(n)},t.wbg.__wbindgen_string_get=function(e,n){const r=kn(n),i=typeof r=="string"?r:void 0;var a=O0(i)?0:Ng(i,Ht.__wbindgen_malloc,Ht.__wbindgen_realloc),c=Wu;gr()[e/4+1]=c,gr()[e/4+0]=a},t.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(e,n){const r=kn(e)[kn(n)];return Ui(r)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=kn(e);return Ui(n)},t.wbg.__wbg_String_4370c5505c674d30=function(e,n){const r=String(kn(n)),i=Ng(r,Ht.__wbindgen_malloc,Ht.__wbindgen_realloc),a=Wu;gr()[e/4+1]=a,gr()[e/4+0]=i},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Ui(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=kn(n).stack,i=Ng(r,Ht.__wbindgen_malloc,Ht.__wbindgen_realloc),a=Wu;gr()[e/4+1]=a,gr()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(vl(e,n))}finally{Ht.__wbindgen_free(r,i,1)}},t.wbg.__wbg_debug_9a6b3243fbbebb61=function(e){console.debug(kn(e))},t.wbg.__wbg_error_788ae33f81d3b84b=function(e){console.error(kn(e))},t.wbg.__wbg_info_2e30e8204b29d91d=function(e){console.info(kn(e))},t.wbg.__wbg_log_1d3ae0273d8f4f8a=function(e){console.log(kn(e))},t.wbg.__wbg_warn_d60e832f9882c1b2=function(e){console.warn(kn(e))},t.wbg.__wbg_get_44be0491f933a435=function(e,n){const r=kn(e)[n>>>0];return Ui(r)},t.wbg.__wbg_length_fff51ee6522a1a18=function(e){return kn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof kn(e)=="function"},t.wbg.__wbg_next_526fc47e980da008=function(e){const n=kn(e).next;return Ui(n)},t.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return z0(function(e){const n=kn(e).next();return Ui(n)},arguments)},t.wbg.__wbg_done_5c1f01fb660d73b5=function(e){return kn(e).done},t.wbg.__wbg_value_1695675138684bd5=function(e){const n=kn(e).value;return Ui(n)},t.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Ui(Symbol.iterator)},t.wbg.__wbg_get_97b561fb56f034b5=function(){return z0(function(e,n){const r=Reflect.get(kn(e),kn(n));return Ui(r)},arguments)},t.wbg.__wbg_call_cb65541d95d71282=function(){return z0(function(e,n){const r=kn(e).call(kn(n));return Ui(r)},arguments)},t.wbg.__wbg_isArray_4c24b343cb13cfb1=function(e){return Array.isArray(kn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(e){let n;try{n=kn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_buffer_085ec1f694018c4f=function(e){const n=kn(e).buffer;return Ui(n)},t.wbg.__wbg_new_8125e318e6245eed=function(e){const n=new Uint8Array(kn(e));return Ui(n)},t.wbg.__wbg_set_5cf90238115182c3=function(e,n,r){kn(e).set(kn(n),r>>>0)},t.wbg.__wbg_length_72e2208bbc0efc61=function(e){return kn(e).length},t.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(e){let n;try{n=kn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_debug_string=function(e,n){const r=dv(kn(n)),i=Ng(r,Ht.__wbindgen_malloc,Ht.__wbindgen_realloc),a=Wu;gr()[e/4+1]=a,gr()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(vl(e,n))},t.wbg.__wbindgen_memory=function(){const e=Ht.memory;return Ui(e)},t}function gM(t,e){return Ht=t.exports,KE.__wbindgen_wasm_module=e,Pd=null,Md=null,Ld=null,Ht}async function KE(t){if(Ht!==void 0)return Ht;typeof t>"u"&&(t="/ltn/assets/route_snapper_bg.wasm");const e=mM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await dM(await t,e);return gM(n,r)}var ko=63710088e-1,m1={centimeters:ko*100,centimetres:ko*100,degrees:ko/111325,feet:ko*3.28084,inches:ko*39.37,kilometers:ko/1e3,kilometres:ko/1e3,meters:ko,metres:ko,miles:ko/1609.344,millimeters:ko*1e3,millimetres:ko*1e3,nauticalmiles:ko/1852,radians:1,yards:ko*1.0936},_M={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/ko,yards:1.0936133},mv={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,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ga(t,e,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function yM(t,e,n){switch(t){case"Point":return ms(e).geometry;case"LineString":return ha(e).geometry;case"Polygon":return g1(e).geometry;case"MultiPoint":return $E(e).geometry;case"MultiLineString":return JE(e).geometry;case"MultiPolygon":return QE(e).geometry;default:throw new Error(t+" is invalid")}}function ms(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f_(t[0])||!f_(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return ga(r,e,n)}function vM(t,e,n){return n===void 0&&(n={}),Wc(t.map(function(r){return ms(r,e)}),n)}function g1(t,e,n){n===void 0&&(n={});for(var r=0,i=t;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function _1(t,e){e===void 0&&(e="kilometers");var n=m1[e];if(!n)throw new Error(e+" units is invalid");return t*n}function ry(t,e){e===void 0&&(e="kilometers");var n=m1[e];if(!n)throw new Error(e+" units is invalid");return t/n}function EM(t,e){return Zd(ry(t,e))}function IM(t){var e=t%360;return e<0&&(e+=360),e}function Zd(t){var e=t%(2*Math.PI);return e*180/Math.PI}function fa(t){var e=t%360;return e*Math.PI/180}function CM(t,e,n){if(e===void 0&&(e="kilometers"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return _1(ry(t,e),n)}function TM(t,e,n){if(e===void 0&&(e="meters"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=mv[e];if(!r)throw new Error("invalid original units");var i=mv[n];if(!i)throw new Error("invalid final units");return t/r*i}function f_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function y1(t){return!!t&&t.constructor===Object}function LM(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!f_(e))throw new Error("bbox must only contain numbers")})}function PM(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const MM=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:mv,bearingToAzimuth:IM,convertArea:TM,convertLength:CM,degreesToRadians:fa,earthRadius:ko,factors:m1,feature:ga,featureCollection:Wc,geometry:yM,geometryCollection:wM,isNumber:f_,isObject:y1,lengthToDegrees:EM,lengthToRadians:ry,lineString:ha,lineStrings:xM,multiLineString:JE,multiPoint:$E,multiPolygon:QE,point:ms,points:vM,polygon:g1,polygons:bM,radiansToDegrees:Zd,radiansToLength:_1,round:SM,unitsFactors:_M,validateBBox:LM,validateId:PM},Symbol.toStringTag,{value:"Module"}));function Xd(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Mf(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function gd(t,e,n){n===void 0&&(n={});var r=Xd(t),i=Xd(e),a=fa(i[1]-r[1]),c=fa(i[0]-r[0]),l=fa(r[1]),d=fa(i[1]),v=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return _1(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}function _m(t,e,n){if(t!==null)for(var r,i,a,c,l,d,v,S=0,E=0,T,M=t.type,k=M==="FeatureCollection",R=M==="Feature",z=k?t.features.length:1,U=0;Ud||k>v||R>S){l=E,d=r,v=k,S=R,a=0;return}var z=ha([l,E],n.properties);if(e(z,r,i,R,a)===!1)return!1;a++,l=E})===!1)return!1}}})}function zM(t,e,n){var r=n,i=!1;return tI(t,function(a,c,l,d,v){i===!1&&n===void 0?r=a:r=e(r,a,c,l,d,v),i=!0}),r}function nI(t,e){if(!t)throw new Error("geojson is required");op(t,function(n,r,i){if(n.geometry!==null){var a=n.geometry.type,c=n.geometry.coordinates;switch(a){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;li?n:i,v=r>a?r:a;return[c,l,d,v]}var b1={exports:{}},iI={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(gm,function(){function n(F,G,H,J,oe){(function ie(ce,fe,Te,Q,de){for(;Q>Te;){if(Q-Te>600){var Qe=Q-Te+1,Me=fe-Te+1,it=Math.log(Qe),ct=.5*Math.exp(2*it/3),je=.5*Math.sqrt(it*ct*(Qe-ct)/Qe)*(Me-Qe/2<0?-1:1),Ot=Math.max(Te,Math.floor(fe-Me*ct/Qe+je)),jt=Math.min(Q,Math.floor(fe+(Qe-Me)*ct/Qe+je));ie(ce,fe,Ot,jt,de)}var vt=ce[fe],At=Te,Lt=Q;for(r(ce,Te,fe),de(ce[Q],vt)>0&&r(ce,Te,Q);At0;)Lt--}de(ce[Te],vt)===0?r(ce,Te,Lt):r(ce,++Lt,Q),Lt<=fe&&(Te=Lt+1),fe<=Lt&&(Q=Lt-1)}})(F,G,H||0,J||F.length-1,oe||i)}function r(F,G,H){var J=F[G];F[G]=F[H],F[H]=J}function i(F,G){return FG?1:0}var a=function(F){F===void 0&&(F=9),this._maxEntries=Math.max(4,F),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function c(F,G,H){if(!H)return G.indexOf(F);for(var J=0;J=F.minX&&G.maxY>=F.minY}function z(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function U(F,G,H,J,oe){for(var ie=[G,H];ie.length;)if(!((H=ie.pop())-(G=ie.pop())<=J)){var ce=G+Math.ceil((H-G)/J/2)*J;n(F,ce,G,H,oe),ie.push(G,ce,ce,H)}}return a.prototype.all=function(){return this._all(this.data,[])},a.prototype.search=function(F){var G=this.data,H=[];if(!R(F,G))return H;for(var J=this.toBBox,oe=[];G;){for(var ie=0;ie=0&&oe[G].children.length>this._maxEntries;)this._split(oe,G),G--;this._adjustParentBBoxes(J,oe,G)},a.prototype._split=function(F,G){var H=F[G],J=H.children.length,oe=this._minEntries;this._chooseSplitAxis(H,oe,J);var ie=this._chooseSplitIndex(H,oe,J),ce=z(H.children.splice(ie,H.children.length-ie));ce.height=H.height,ce.leaf=H.leaf,l(H,this.toBBox),l(ce,this.toBBox),G?F[G-1].children.push(ce):this._splitRoot(H,ce)},a.prototype._splitRoot=function(F,G){this.data=z([F,G]),this.data.height=F.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},a.prototype._chooseSplitIndex=function(F,G,H){for(var J,oe,ie,ce,fe,Te,Q,de=1/0,Qe=1/0,Me=G;Me<=H-G;Me++){var it=d(F,0,Me,this.toBBox),ct=d(F,Me,H,this.toBBox),je=(oe=it,ie=ct,ce=void 0,fe=void 0,Te=void 0,Q=void 0,ce=Math.max(oe.minX,ie.minX),fe=Math.max(oe.minY,ie.minY),Te=Math.min(oe.maxX,ie.maxX),Q=Math.min(oe.maxY,ie.maxY),Math.max(0,Te-ce)*Math.max(0,Q-fe)),Ot=T(it)+T(ct);je=G;de--){var Qe=F.children[de];v(ce,F.leaf?oe(Qe):Qe),fe+=M(ce)}return fe},a.prototype._adjustParentBBoxes=function(F,G,H){for(var J=H;J>=0;J--)v(G[J],F)},a.prototype._condense=function(F){for(var G=F.length-1,H=void 0;G>=0;G--)F[G].children.length===0?G>0?(H=F[G-1].children).splice(H.indexOf(F[G]),1):this.clear():l(F[G],this.toBBox)},a})})(iI);var HM=iI.exports;const ZM=ty(MM),XM=ty(UM);var Qx=Object.prototype.toString,oI=function(e){var n=Qx.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Qx.call(e.callee)==="[object Function]"),r},F0,ew;function YM(){if(ew)return F0;ew=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=oI,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),c=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(T){var M=T.constructor;return M&&M.prototype===T},v={$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},S=function(){if(typeof window>"u")return!1;for(var T in window)try{if(!v["$"+T]&&e.call(window,T)&&window[T]!==null&&typeof window[T]=="object")try{d(window[T])}catch{return!0}}catch{return!0}return!1}(),E=function(T){if(typeof window>"u"||!S)return d(T);try{return d(T)}catch{return!1}};t=function(M){var k=M!==null&&typeof M=="object",R=n.call(M)==="[object Function]",z=r(M),U=k&&n.call(M)==="[object String]",F=[];if(!k&&!R&&!z)throw new TypeError("Object.keys called on a non-object");var G=c&&R;if(U&&M.length>0&&!e.call(M,0))for(var H=0;H0)for(var J=0;J"u"||!Ki?qn:Ki(Uint8Array),qc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qn:ArrayBuffer,"%ArrayIteratorPrototype%":mf&&Ki?Ki([][Symbol.iterator]()):qn,"%AsyncFromSyncIteratorPrototype%":qn,"%AsyncFunction%":wf,"%AsyncGenerator%":wf,"%AsyncGeneratorFunction%":wf,"%AsyncIteratorPrototype%":wf,"%Atomics%":typeof Atomics>"u"?qn:Atomics,"%BigInt%":typeof BigInt>"u"?qn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":_A,"%eval%":eval,"%EvalError%":yA,"%Float32Array%":typeof Float32Array>"u"?qn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qn:FinalizationRegistry,"%Function%":lI,"%GeneratorFunction%":wf,"%Int8Array%":typeof Int8Array>"u"?qn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mf&&Ki?Ki(Ki([][Symbol.iterator]())):qn,"%JSON%":typeof JSON=="object"?JSON:qn,"%Map%":typeof Map>"u"?qn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mf||!Ki?qn:Ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qn:Promise,"%Proxy%":typeof Proxy>"u"?qn:Proxy,"%RangeError%":vA,"%ReferenceError%":bA,"%Reflect%":typeof Reflect>"u"?qn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mf||!Ki?qn:Ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mf&&Ki?Ki(""[Symbol.iterator]()):qn,"%Symbol%":mf?Symbol:qn,"%SyntaxError%":Af,"%ThrowTypeError%":wA,"%TypedArray%":EA,"%TypeError%":Lf,"%Uint8Array%":typeof Uint8Array>"u"?qn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qn:Uint32Array,"%URIError%":xA,"%WeakMap%":typeof WeakMap>"u"?qn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qn:WeakSet};if(Ki)try{null.error}catch(t){var IA=Ki(Ki(t));qc["%Error.prototype%"]=IA}var CA=function t(e){var n;if(e==="%AsyncFunction%")n=V0("async function () {}");else if(e==="%GeneratorFunction%")n=V0("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=V0("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ki&&(n=Ki(i.prototype))}return qc[e]=n,n},ow={__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"]},ym=S1,d_=aI,TA=ym.call(Function.call,Array.prototype.concat),LA=ym.call(Function.apply,Array.prototype.splice),sw=ym.call(Function.call,String.prototype.replace),m_=ym.call(Function.call,String.prototype.slice),PA=ym.call(Function.call,RegExp.prototype.exec),MA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,AA=/\\(\\)?/g,kA=function(e){var n=m_(e,0,1),r=m_(e,-1);if(n==="%"&&r!=="%")throw new Af("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Af("invalid intrinsic syntax, expected opening `%`");var i=[];return sw(e,MA,function(a,c,l,d){i[i.length]=l?sw(d,AA,"$1"):c||a}),i},DA=function(e,n){var r=e,i;if(d_(ow,r)&&(i=ow[r],r="%"+i[0]+"%"),d_(qc,r)){var a=qc[r];if(a===wf&&(a=CA(r)),typeof a>"u"&&!n)throw new Lf("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Af("intrinsic "+e+" does not exist!")},Dl=function(e,n){if(typeof e!="string"||e.length===0)throw new Lf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lf('"allowMissing" argument must be a boolean');if(PA(/^%?[^%]*%?$/,e)===null)throw new Af("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=kA(e),i=r.length>0?r[0]:"",a=DA("%"+i+"%",n),c=a.name,l=a.value,d=!1,v=a.alias;v&&(i=v[0],LA(r,TA([0,1],v)));for(var S=1,E=!0;S=r.length){var R=Gc(l,T);E=!!R,E&&"get"in R&&!("originalValue"in R.get)?l=R.get:l=l[T]}else E=d_(l,T),l=l[T];E&&!d&&(qc[c]=l)}}return l},j0,aw;function E1(){if(aw)return j0;aw=1;var t=Dl,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return j0=e,j0}var RA=Dl,Qg=RA("%Object.getOwnPropertyDescriptor%",!0);if(Qg)try{Qg([],"length")}catch{Qg=null}var I1=Qg,lw=E1(),NA=sI,gf=ac,uw=I1,C1=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new gf("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new gf("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gf("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gf("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gf("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gf("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!uw&&uw(e,n);if(lw)lw(e,n,{configurable:c===null&&d?d.configurable:!c,enumerable:i===null&&d?d.enumerable:!i,value:r,writable:a===null&&d?d.writable:!a});else if(l||!i&&!a&&!c)e[n]=r;else throw new NA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},gv=E1(),uI=function(){return!!gv};uI.hasArrayLengthDefineBug=function(){if(!gv)return null;try{return gv([],"length",{value:1}).length!==1}catch{return!0}};var T1=uI,OA=x1,zA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",FA=Object.prototype.toString,BA=Array.prototype.concat,cw=C1,VA=function(t){return typeof t=="function"&&FA.call(t)==="[object Function]"},cI=T1(),UA=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!VA(r)||!r())return}cI?cw(t,e,n,!0):cw(t,e,n)},hI=function(t,e){var n=arguments.length>2?arguments[2]:{},r=OA(e);zA&&(r=BA.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i4294967295||qA(n)!==n)throw new pw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in e&&fw){var c=fw(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(a=!1)}return(i||a||!r)&&(GA?hw(e,"length",n,!0,!0):hw(e,"length",n)),e};(function(t){var e=S1,n=Dl,r=WA,i=ac,a=n("%Function.prototype.apply%"),c=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||e.call(c,a),d=E1(),v=n("%Math.max%");t.exports=function(T){if(typeof T!="function")throw new i("a function is required");var M=l(e,c,arguments);return r(M,1+v(0,T.length-(arguments.length-1)),!0)};var S=function(){return l(e,a,arguments)};d?d(t.exports,"apply",{value:S}):t.exports.apply=S})(fI);var sp=fI.exports,pI=Dl,dI=sp,HA=dI(pI("String.prototype.indexOf")),Ta=function(e,n){var r=pI(e,!!n);return typeof r=="function"&&HA(e,".prototype.")>-1?dI(r):r},ZA=x1,mI=iy(),gI=Ta,dw=Object,XA=gI("Array.prototype.push"),mw=gI("Object.prototype.propertyIsEnumerable"),YA=mI?Object.getOwnPropertySymbols:null,_I=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=dw(e);if(arguments.length===1)return r;for(var i=1;i2&&!!arguments[2];return(!r||ck)&&(uk?gw(e,"name",n,!0,!0):gw(e,"name",n)),e},pk=fk,dk=ac,mk=Object,xI=pk(function(){if(this==null||this!==mk(this))throw new dk("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),gk=xI,_k=sh.supportsDescriptors,yk=Object.getOwnPropertyDescriptor,wI=function(){if(_k&&/a/mig.flags==="gim"){var e=yk(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return gk},vk=sh.supportsDescriptors,bk=wI,xk=Object.getOwnPropertyDescriptor,wk=Object.defineProperty,Sk=TypeError,_w=Object.getPrototypeOf,Ek=/a/,Ik=function(){if(!vk||!_w)throw new Sk("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=bk(),n=_w(Ek),r=xk(n,"flags");return(!r||r.get!==e)&&wk(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},Ck=sh,Tk=sp,Lk=xI,SI=wI,Pk=Ik,EI=Tk(SI());Ck(EI,{getPolyfill:SI,implementation:Lk,shim:Pk});var Mk=EI,e_={exports:{}},Ak=iy,ah=function(){return Ak()&&!!Symbol.toStringTag},kk=ah(),Dk=Ta,_v=Dk("Object.prototype.toString"),oy=function(e){return kk&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:_v(e)==="[object Arguments]"},II=function(e){return oy(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&_v(e)!=="[object Array]"&&_v(e.callee)==="[object Function]"},Rk=function(){return oy(arguments)}();oy.isLegacyArguments=II;var CI=Rk?oy:II;const Nk={},Ok=Object.freeze(Object.defineProperty({__proto__:null,default:Nk},Symbol.toStringTag,{value:"Module"})),zk=ty(Ok);var L1=typeof Map=="function"&&Map.prototype,q0=Object.getOwnPropertyDescriptor&&L1?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,g_=L1&&q0&&typeof q0.get=="function"?q0.get:null,yw=L1&&Map.prototype.forEach,P1=typeof Set=="function"&&Set.prototype,W0=Object.getOwnPropertyDescriptor&&P1?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,__=P1&&W0&&typeof W0.get=="function"?W0.get:null,vw=P1&&Set.prototype.forEach,Fk=typeof WeakMap=="function"&&WeakMap.prototype,Ud=Fk?WeakMap.prototype.has:null,Bk=typeof WeakSet=="function"&&WeakSet.prototype,jd=Bk?WeakSet.prototype.has:null,Vk=typeof WeakRef=="function"&&WeakRef.prototype,bw=Vk?WeakRef.prototype.deref:null,Uk=Boolean.prototype.valueOf,jk=Object.prototype.toString,Gk=Function.prototype.toString,qk=String.prototype.match,M1=String.prototype.slice,Hu=String.prototype.replace,Wk=String.prototype.toUpperCase,xw=String.prototype.toLowerCase,TI=RegExp.prototype.test,ww=Array.prototype.concat,bl=Array.prototype.join,Hk=Array.prototype.slice,Sw=Math.floor,yv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,H0=Object.getOwnPropertySymbols,vv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,kf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ro=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kf||"symbol")?Symbol.toStringTag:null,LI=Object.prototype.propertyIsEnumerable,Ew=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Iw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||TI.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Sw(-t):Sw(t);if(r!==t){var i=String(r),a=M1.call(e,i.length+1);return Hu.call(i,n,"$&_")+"."+Hu.call(Hu.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Hu.call(e,n,"$&_")}var bv=zk,Cw=bv.custom,Tw=MI(Cw)?Cw:null,Zk=function t(e,n,r,i){var a=n||{};if(Gu(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Gu(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=Gu(a,"customInspect")?a.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Gu(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Gu(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return kI(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return l?Iw(e,d):d}if(typeof e=="bigint"){var v=String(e)+"n";return l?Iw(e,v):v}var S=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=S&&S>0&&typeof e=="object")return xv(e)?"[Array]":"[Object]";var E=h3(a,r);if(typeof i>"u")i=[];else if(AI(i,e)>=0)return"[Circular]";function T(Qe,Me,it){if(Me&&(i=Hk.call(i),i.push(Me)),it){var ct={depth:a.depth};return Gu(a,"quoteStyle")&&(ct.quoteStyle=a.quoteStyle),t(Qe,ct,r+1,i)}return t(Qe,a,r+1,i)}if(typeof e=="function"&&!Lw(e)){var M=n3(e),k=Og(e,T);return"[Function"+(M?": "+M:" (anonymous)")+"]"+(k.length>0?" { "+bl.call(k,", ")+" }":"")}if(MI(e)){var R=kf?Hu.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):vv.call(e);return typeof e=="object"&&!kf?_d(R):R}if(l3(e)){for(var z="<"+xw.call(String(e.nodeName)),U=e.attributes||[],F=0;F",z}if(xv(e)){if(e.length===0)return"[]";var G=Og(e,T);return E&&!c3(G)?"["+wv(G,E)+"]":"[ "+bl.call(G,", ")+" ]"}if(Kk(e)){var H=Og(e,T);return!("cause"in Error.prototype)&&"cause"in e&&!LI.call(e,"cause")?"{ ["+String(e)+"] "+bl.call(ww.call("[cause]: "+T(e.cause),H),", ")+" }":H.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bl.call(H,", ")+" }"}if(typeof e=="object"&&c){if(Tw&&typeof e[Tw]=="function"&&bv)return bv(e,{depth:S-r});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(r3(e)){var J=[];return yw&&yw.call(e,function(Qe,Me){J.push(T(Me,e,!0)+" => "+T(Qe,e))}),Pw("Map",g_.call(e),J,E)}if(s3(e)){var oe=[];return vw&&vw.call(e,function(Qe){oe.push(T(Qe,e))}),Pw("Set",__.call(e),oe,E)}if(i3(e))return Z0("WeakMap");if(a3(e))return Z0("WeakSet");if(o3(e))return Z0("WeakRef");if($k(e))return _d(T(Number(e)));if(e3(e))return _d(T(yv.call(e)));if(Qk(e))return _d(Uk.call(e));if(Jk(e))return _d(T(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===gm)return"{ [object globalThis] }";if(!Yk(e)&&!Lw(e)){var ie=Og(e,T),ce=Ew?Ew(e)===Object.prototype:e instanceof Object||e.constructor===Object,fe=e instanceof Object?"":"null prototype",Te=!ce&&Ro&&Object(e)===e&&Ro in e?M1.call(lc(e),8,-1):fe?"Object":"",Q=ce||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",de=Q+(Te||fe?"["+bl.call(ww.call([],Te||[],fe||[]),": ")+"] ":"");return ie.length===0?de+"{}":E?de+"{"+wv(ie,E)+"}":de+"{ "+bl.call(ie,", ")+" }"}return String(e)};function PI(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Xk(t){return Hu.call(String(t),/"/g,""")}function xv(t){return lc(t)==="[object Array]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function Yk(t){return lc(t)==="[object Date]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function Lw(t){return lc(t)==="[object RegExp]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function Kk(t){return lc(t)==="[object Error]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function Jk(t){return lc(t)==="[object String]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function $k(t){return lc(t)==="[object Number]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function Qk(t){return lc(t)==="[object Boolean]"&&(!Ro||!(typeof t=="object"&&Ro in t))}function MI(t){if(kf)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!vv)return!1;try{return vv.call(t),!0}catch{}return!1}function e3(t){if(!t||typeof t!="object"||!yv)return!1;try{return yv.call(t),!0}catch{}return!1}var t3=Object.prototype.hasOwnProperty||function(t){return t in this};function Gu(t,e){return t3.call(t,e)}function lc(t){return jk.call(t)}function n3(t){if(t.name)return t.name;var e=qk.call(Gk.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function AI(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return kI(M1.call(t,0,e.maxStringLength),e)+r}var i=Hu.call(Hu.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,u3);return PI(i,"single",e)}function u3(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Wk.call(e.toString(16))}function _d(t){return"Object("+t+")"}function Z0(t){return t+" { ? }"}function Pw(t,e,n,r){var i=r?wv(n,r):bl.call(n,", ");return t+" ("+e+") {"+i+"}"}function c3(t){for(var e=0;e=0)return!1;return!0}function h3(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=bl.call(Array(t.indent+1)," ");else return null;return{base:n,prev:bl.call(Array(e+1),n)}}function wv(t,e){if(t.length===0)return"";var n=` -`+e.prev+e.base;return n+bl.call(t,","+n)+` -`+e.prev}function Og(t,e){var n=xv(t),r=[];if(n){r.length=t.length;for(var i=0;i=r)return n+1;var i=zw(e,n);if(i<55296||i>56319)return n+1;var a=zw(e,n+1);return a<56320||a>57343?n+1:n+2},Y0=function(e){var n=0;return{next:function(){var i=n>=e.length,a;return i||(a=e[n],n+=1),{done:i,value:a}}}},Fw=function(e,n){if(N3(e)||Dw(e))return Y0(e);if(O3(e)){var r=0;return{next:function(){var a=V3(e,r),c=B3(e,r,a);return r=a,{done:a>e.length,value:c}}}}if(n&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!z3&&!F3)e_.exports=function(e){if(e!=null)return Fw(e,!0)};else{var U3=FI,j3=VI,Bw=Fa("Map.prototype.forEach",!0),Vw=Fa("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Uw=Fa("Map.prototype.iterator",!0),jw=Fa("Set.prototype.iterator",!0);var Gw=Fa("Map.prototype.@@iterator",!0)||Fa("Map.prototype._es6-shim iterator_",!0),qw=Fa("Set.prototype.@@iterator",!0)||Fa("Set.prototype._es6-shim iterator_",!0),G3=function(e){if(U3(e)){if(Uw)return Rw(Uw(e));if(Gw)return Gw(e);if(Bw){var n=[];return Bw(e,function(i,a){Ow(n,[a,i])}),Y0(n)}}if(j3(e)){if(jw)return Rw(jw(e));if(qw)return qw(e);if(Vw){var r=[];return Vw(e,function(i){Ow(r,i)}),Y0(r)}}};e_.exports=function(e){return G3(e)||Fw(e)}}}var q3=e_.exports,Ww=function(t){return t!==t},UI=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Ww(e)&&Ww(n))},W3=UI,jI=function(){return typeof Object.is=="function"?Object.is:W3},H3=jI,Z3=sh,X3=function(){var e=H3();return Z3(Object,{is:e},{is:function(){return Object.is!==e}}),e},Y3=sh,K3=sp,J3=UI,GI=jI,$3=X3,qI=K3(GI(),Object);Y3(qI,{getPolyfill:GI,implementation:J3,shim:$3});var Q3=qI,e4=sp,WI=Ta,t4=Dl,Sv=t4("%ArrayBuffer%",!0),t_=WI("ArrayBuffer.prototype.byteLength",!0),n4=WI("Object.prototype.toString"),Hw=!!Sv&&!t_&&new Sv(0).slice,Zw=!!Hw&&e4(Hw),HI=t_||Zw?function(e){if(!e||typeof e!="object")return!1;try{return t_?t_(e):Zw(e,0),!0}catch{return!1}}:Sv?function(e){return n4(e)==="[object ArrayBuffer]"}:function(e){return!1},r4=Date.prototype.getDay,i4=function(e){try{return r4.call(e),!0}catch{return!1}},o4=Object.prototype.toString,s4="[object Date]",a4=ah(),l4=function(e){return typeof e!="object"||e===null?!1:a4?i4(e):o4.call(e)===s4},Ev=Ta,ZI=ah(),XI,YI,Iv,Cv;if(ZI){XI=Ev("Object.prototype.hasOwnProperty"),YI=Ev("RegExp.prototype.exec"),Iv={};var K0=function(){throw Iv};Cv={toString:K0,valueOf:K0},typeof Symbol.toPrimitive=="symbol"&&(Cv[Symbol.toPrimitive]=K0)}var u4=Ev("Object.prototype.toString"),c4=Object.getOwnPropertyDescriptor,h4="[object RegExp]",f4=ZI?function(e){if(!e||typeof e!="object")return!1;var n=c4(e,"lastIndex"),r=n&&XI(n,"value");if(!r)return!1;try{YI(e,Cv)}catch(i){return i===Iv}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:u4(e)===h4},p4=Ta,Xw=p4("SharedArrayBuffer.prototype.byteLength",!0),d4=Xw?function(e){if(!e||typeof e!="object")return!1;try{return Xw(e),!0}catch{return!1}}:function(e){return!1},m4=Number.prototype.toString,g4=function(e){try{return m4.call(e),!0}catch{return!1}},_4=Object.prototype.toString,y4="[object Number]",v4=ah(),b4=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:v4?g4(e):_4.call(e)===y4},KI=Ta,x4=KI("Boolean.prototype.toString"),w4=KI("Object.prototype.toString"),S4=function(e){try{return x4(e),!0}catch{return!1}},E4="[object Boolean]",I4=ah(),C4=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:I4&&Symbol.toStringTag in e?S4(e):w4(e)===E4},Tv={exports:{}},T4=Object.prototype.toString,L4=w1();if(L4){var P4=Symbol.prototype.toString,M4=/^Symbol\(.*\)$/,A4=function(e){return typeof e.valueOf()!="symbol"?!1:M4.test(P4.call(e))};Tv.exports=function(e){if(typeof e=="symbol")return!0;if(T4.call(e)!=="[object Symbol]")return!1;try{return A4(e)}catch{return!1}}}else Tv.exports=function(e){return!1};var k4=Tv.exports,Lv={exports:{}},Yw=typeof BigInt<"u"&&BigInt,D4=function(){return typeof Yw=="function"&&typeof BigInt=="function"&&typeof Yw(42)=="bigint"&&typeof BigInt(42)=="bigint"},R4=D4();if(R4){var N4=BigInt.prototype.valueOf,O4=function(e){try{return N4.call(e),!0}catch{}return!1};Lv.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:O4(e)}}else Lv.exports=function(e){return!1};var z4=Lv.exports,F4=OI,B4=b4,V4=C4,U4=k4,j4=z4,G4=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(F4(e))return"String";if(B4(e))return"Number";if(V4(e))return"Boolean";if(U4(e))return"Symbol";if(j4(e))return"BigInt"},b_=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,Kw=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,x_;b_||(x_=function(e){return!1});var Pv=b_?b_.prototype.has:null,J0=Kw?Kw.prototype.has:null;!x_&&!Pv&&(x_=function(e){return!1});var q4=x_||function(e){if(!e||typeof e!="object")return!1;try{if(Pv.call(e,Pv),J0)try{J0.call(e,J0)}catch{return!0}return e instanceof b_}catch{}return!1},Mv={exports:{}},W4=Dl,JI=Ta,H4=W4("%WeakSet%",!0),$0=JI("WeakSet.prototype.has",!0);if($0){var Q0=JI("WeakMap.prototype.has",!0);Mv.exports=function(e){if(!e||typeof e!="object")return!1;try{if($0(e,$0),Q0)try{Q0(e,Q0)}catch{return!0}return e instanceof H4}catch{}return!1}}else Mv.exports=function(e){return!1};var Z4=Mv.exports,X4=FI,Y4=VI,K4=q4,J4=Z4,$4=function(e){if(e&&typeof e=="object"){if(X4(e))return"Map";if(Y4(e))return"Set";if(K4(e))return"WeakMap";if(J4(e))return"WeakSet"}return!1},$I=Function.prototype.toString,Ef=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Av,n_;if(typeof Ef=="function"&&typeof Object.defineProperty=="function")try{Av=Object.defineProperty({},"length",{get:function(){throw n_}}),n_={},Ef(function(){throw 42},null,Av)}catch(t){t!==n_&&(Ef=null)}else Ef=null;var Q4=/^\s*class\b/,kv=function(e){try{var n=$I.call(e);return Q4.test(n)}catch{return!1}},ev=function(e){try{return kv(e)?!1:($I.call(e),!0)}catch{return!1}},r_=Object.prototype.toString,eD="[object Object]",tD="[object Function]",nD="[object GeneratorFunction]",rD="[object HTMLAllCollection]",iD="[object HTML document.all class]",oD="[object HTMLCollection]",sD=typeof Symbol=="function"&&!!Symbol.toStringTag,aD=!(0 in[,]),Dv=function(){return!1};if(typeof document=="object"){var lD=document.all;r_.call(lD)===r_.call(document.all)&&(Dv=function(e){if((aD||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=r_.call(e);return(n===rD||n===iD||n===oD||n===eD)&&e("")==null}catch{}return!1})}var uD=Ef?function(e){if(Dv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ef(e,null,Av)}catch(n){if(n!==n_)return!1}return!kv(e)&&ev(e)}:function(e){if(Dv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(sD)return ev(e);if(kv(e))return!1;var n=r_.call(e);return n!==tD&&n!==nD&&!/^\[object HTML/.test(n)?!1:ev(e)},cD=uD,hD=Object.prototype.toString,QI=Object.prototype.hasOwnProperty,fD=function(e,n,r){for(var i=0,a=e.length;i=3&&(i=r),hD.call(e)==="[object Array]"?fD(e,n,i):typeof e=="string"?pD(e,n,i):dD(e,n,i)},gD=mD,_D=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],tv=_D,yD=typeof globalThis>"u"?gm:globalThis,vD=function(){for(var e=[],n=0;n"u"?gm:globalThis,Rv=bD(),O1=N1("String.prototype.slice"),nv=Object.getPrototypeOf,wD=N1("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r-1?n:n!=="Object"?!1:ED(e)}return i_?SD(e):null},CD=Ta,Qw=CD("ArrayBuffer.prototype.byteLength",!0),TD=HI,LD=function(e){return TD(e)?Qw?Qw(e):e.byteLength:NaN},tC=sk,Rl=Ta,e2=Mk,PD=Dl,Df=q3,MD=RI,t2=Q3,n2=CI,r2=NI,i2=HI,o2=l4,s2=f4,a2=d4,l2=x1,u2=G4,c2=$4,h2=ID,f2=LD,p2=Rl("SharedArrayBuffer.prototype.byteLength",!0),d2=Rl("Date.prototype.getTime"),rv=Object.getPrototypeOf,m2=Rl("Object.prototype.toString"),E_=PD("%Set%",!0),Nv=Rl("Map.prototype.has",!0),I_=Rl("Map.prototype.get",!0),g2=Rl("Map.prototype.size",!0),C_=Rl("Set.prototype.add",!0),nC=Rl("Set.prototype.delete",!0),T_=Rl("Set.prototype.has",!0),o_=Rl("Set.prototype.size",!0);function _2(t,e,n,r){for(var i=Df(t),a;(a=i.next())&&!a.done;)if(ja(e,a.value,n,r))return nC(t,a.value),!0;return!1}function rC(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function AD(t,e,n,r,i,a){var c=rC(n);if(c!=null)return c;var l=I_(e,c),d=tC({},i,{strict:!1});return typeof l>"u"&&!Nv(e,c)||!ja(r,l,d,a)?!1:!Nv(t,c)&&ja(r,l,d,a)}function kD(t,e,n){var r=rC(n);return r??(T_(e,r)&&!T_(t,r))}function y2(t,e,n,r,i,a){for(var c=Df(t),l,d;(l=c.next())&&!l.done;)if(d=l.value,ja(n,d,i,a)&&ja(r,I_(e,d),i,a))return nC(t,d),!0;return!1}function ja(t,e,n,r){var i=n||{};if(i.strict?t2(t,e):t===e)return!0;var a=u2(t),c=u2(e);if(a!==c)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?t2(t,e):t==e;var l=r.has(t),d=r.has(e),v;if(l&&d){if(r.get(t)===r.get(e))return!0}else v={};return l||r.set(t,v),d||r.set(e,v),ND(t,e,i,r)}function v2(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function DD(t,e,n,r){if(o_(t)!==o_(e))return!1;for(var i=Df(t),a=Df(e),c,l,d;(c=i.next())&&!c.done;)if(c.value&&typeof c.value=="object")d||(d=new E_),C_(d,c.value);else if(!T_(e,c.value)){if(n.strict||!kD(t,e,c.value))return!1;d||(d=new E_),C_(d,c.value)}if(d){for(;(l=a.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!_2(d,l.value,n.strict,r))return!1}else if(!n.strict&&!T_(t,l.value)&&!_2(d,l.value,n.strict,r))return!1;return o_(d)===0}return!0}function RD(t,e,n,r){if(g2(t)!==g2(e))return!1;for(var i=Df(t),a=Df(e),c,l,d,v,S,E;(c=i.next())&&!c.done;)if(v=c.value[0],S=c.value[1],v&&typeof v=="object")d||(d=new E_),C_(d,v);else if(E=I_(e,v),typeof E>"u"&&!Nv(e,v)||!ja(S,E,n,r)){if(n.strict||!AD(t,e,v,S,n,r))return!1;d||(d=new E_),C_(d,v)}if(d){for(;(l=a.next())&&!l.done;)if(v=l.value[0],E=l.value[1],v&&typeof v=="object"){if(!y2(d,t,v,E,n,r))return!1}else if(!n.strict&&(!t.has(v)||!ja(I_(t,v),E,n,r))&&!y2(d,t,v,E,tC({},n,{strict:!1}),r))return!1;return o_(d)===0}return!0}function ND(t,e,n,r){var i,a;if(typeof t!=typeof e||t==null||e==null||m2(t)!==m2(e)||n2(t)!==n2(e))return!1;var c=r2(t),l=r2(e);if(c!==l)return!1;var d=t instanceof Error,v=e instanceof Error;if(d!==v||(d||v)&&(t.name!==e.name||t.message!==e.message))return!1;var S=s2(t),E=s2(e);if(S!==E||(S||E)&&(t.source!==e.source||e2(t)!==e2(e)))return!1;var T=o2(t),M=o2(e);if(T!==M||(T||M)&&d2(t)!==d2(e)||n.strict&&rv&&rv(t)!==rv(e))return!1;var k=h2(t),R=h2(e);if(k!==R)return!1;if(k||R){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(oe[i]!=ie[i])return!1;for(i=oe.length-1;i>=0;i--)if(a=oe[i],!ja(t[a],e[a],n,r))return!1;var ce=c2(t),fe=c2(e);return ce!==fe?!1:ce==="Set"||fe==="Set"?DD(t,e,n,r):ce==="Map"?RD(t,e,n,r):!0}var OD=function(e,n,r){return ja(e,n,r,MD())};const iC=d1(OD);var zD=Object.defineProperty,fr=(t,e)=>zD(t,"name",{value:e,configurable:!0}),FD=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!Ad(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=Ov(e),i=Ov(n);return r.every(a=>i.some(c=>this.compare(a,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(a=>i.some(c=>this.compareLine(a,c,1,!0)))}return!1}compareGeometryCollection(e,n){return Ad(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return Ad(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};fr(FD,"GeojsonEquality");function Ad(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}fr(Ad,"sameLength");function Ov(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}fr(Ov,"explode");var Ns=63710088e-1,oC={centimeters:Ns*100,centimetres:Ns*100,degrees:360/(2*Math.PI),feet:Ns*3.28084,inches:Ns*39.37,kilometers:Ns/1e3,kilometres:Ns/1e3,meters:Ns,metres:Ns,miles:Ns/1609.344,millimeters:Ns*1e3,millimetres:Ns*1e3,nauticalmiles:Ns/1852,radians:1,yards:Ns*1.0936},b2={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 Cl(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}fr(Cl,"feature");function BD(t,e,n={}){switch(t){case"Point":return tu(e).geometry;case"LineString":return iu(e).geometry;case"Polygon":return z1(e).geometry;case"MultiPoint":return aC(e).geometry;case"MultiLineString":return sC(e).geometry;case"MultiPolygon":return lC(e).geometry;default:throw new Error(t+" is invalid")}}fr(BD,"geometry");function tu(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!L_(t[0])||!L_(t[1]))throw new Error("coordinates must contain numbers");return Cl({type:"Point",coordinates:t},e,n)}fr(tu,"point");function VD(t,e,n={}){return sy(t.map(r=>tu(r,e)),n)}fr(VD,"points");function z1(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;az1(r,e)),n)}fr(UD,"polygons");function iu(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Cl({type:"LineString",coordinates:t},e,n)}fr(iu,"lineString");function jD(t,e,n={}){return sy(t.map(r=>iu(r,e)),n)}fr(jD,"lineStrings");function sy(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}fr(sy,"featureCollection");function sC(t,e,n={}){return Cl({type:"MultiLineString",coordinates:t},e,n)}fr(sC,"multiLineString");function aC(t,e,n={}){return Cl({type:"MultiPoint",coordinates:t},e,n)}fr(aC,"multiPoint");function lC(t,e,n={}){return Cl({type:"MultiPolygon",coordinates:t},e,n)}fr(lC,"multiPolygon");function GD(t,e,n={}){return Cl({type:"GeometryCollection",geometries:t},e,n)}fr(GD,"geometryCollection");function qD(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}fr(qD,"round");function uC(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t*n}fr(uC,"radiansToLength");function F1(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t/n}fr(F1,"lengthToRadians");function WD(t,e){return cC(F1(t,e))}fr(WD,"lengthToDegrees");function HD(t){let e=t%360;return e<0&&(e+=360),e}fr(HD,"bearingToAzimuth");function cC(t){return t%(2*Math.PI)*180/Math.PI}fr(cC,"radiansToDegrees");function ZD(t){return t%360*Math.PI/180}fr(ZD,"degreesToRadians");function XD(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return uC(F1(t,e),n)}fr(XD,"convertLength");function YD(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=b2[e];if(!r)throw new Error("invalid original units");const i=b2[n];if(!i)throw new Error("invalid final units");return t/r*i}fr(YD,"convertArea");function L_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}fr(L_,"isNumber");function B1(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}fr(B1,"isObject");function KD(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!L_(e))throw new Error("bbox must only contain numbers")})}fr(KD,"validateBBox");function JD(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}fr(JD,"validateId");var $D=Object.defineProperty,wo=(t,e)=>$D(t,"name",{value:e,configurable:!0});function lp(t,e,n){if(t!==null)for(var r,i,a,c,l,d,v,S=0,E=0,T,M=t.type,k=M==="FeatureCollection",R=M==="Feature",z=k?t.features.length:1,U=0;Ud||k>v||R>S){l=E,d=r,v=k,S=R,a=0;return}var z=iu([l,E],n.properties);if(e(z,r,i,R,a)===!1)return!1;a++,l=E})===!1)return!1}}})}wo(pC,"segmentEach");function oR(t,e,n){var r=n,i=!1;return pC(t,function(a,c,l,d,v){i===!1&&n===void 0?r=a:r=e(r,a,c,l,d,v),i=!0}),r}wo(oR,"segmentReduce");function dC(t,e){if(!t)throw new Error("geojson is required");ay(t,function(n,r,i){if(n.geometry!==null){var a=n.geometry.type,c=n.geometry.coordinates;switch(a){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;luR(t,"name",{value:e,configurable:!0});function U1(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return lp(t,r=>{n[0]>r[0]&&(n[0]=r[0]),n[1]>r[1]&&(n[1]=r[1]),n[2] line1 must only contain 2 coordinates");if(r.length!==2)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],a=n[0][1],c=n[1][0],l=n[1][1],d=r[0][0],v=r[0][1],S=r[1][0],E=r[1][1],T=(E-v)*(c-i)-(S-d)*(l-a),M=(S-d)*(a-v)-(E-v)*(i-d),k=(c-i)*(a-v)-(l-a)*(i-d);if(T===0)return null;var R=M/T,z=k/T;if(R>=0&&R<=1&&z>=0&&z<=1){var U=i+R*(c-i),F=a+R*(l-a);return ms([U,F])}return null}function yR(t,e,n){n===void 0&&(n={});var r=ms([1/0,1/0],{dist:1/0}),i=0;return op(t,function(a){for(var c=Mf(a),l=0;l0&&(z=R.features[0],z.properties.dist=gd(e,z,n),z.properties.location=i+gd(d,z,n)),d.properties.dist{if(!this.active)return;const l=[c.point.x-vR,c.point.y],d=this.map.unproject(c.point).distanceTo(this.map.unproject(l));this.inner.onMouseMove(c.lngLat.lng,c.lngLat.lat,d)&&(this.redraw(),this.dataUpdated())},this.onClick=()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())},this.onDoubleClick=c=>{this.active&&(c.preventDefault(),this.inner.onClick(),this.finish())},this.onDragStart=()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()},this.onMouseUp=()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()},this.onKeyDown=c=>{this.active&&c.key=="Escape"&&(c.stopPropagation(),this.cancel())},this.onKeyPress=c=>{this.active&&c.target.tagName!="INPUT"&&(c.key=="Enter"?(c.stopPropagation(),this.finish()):c.key=="s"||c.key=="S"?(c.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):c.key=="z"&&c.ctrlKey&&this.undo())},this.map=e,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new h_(n),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.routeToolGj=r,this.snapMode=i,this.undoLength=a,this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("dragstart",this.onDragStart),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keypress",this.onKeyPress)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("dragstart",this.onDragStart),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keypress",this.onKeyPress)}startRoute(){this.active||(this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}startArea(){this.active||(this.inner.setAreaMode(),this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}stop(){this.active=!1,this.inner.clearState(),this.redraw(),this.map.boxZoom.enable(),this.map.doubleClickZoom.enable()}editExistingRoute(e){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),e.properties.waypoints||(e.properties.waypoints=[{lon:e.geometry.coordinates[0][0],lat:e.geometry.coordinates[0][1],snapped:!0},{lon:e.geometry.coordinates[e.geometry.coordinates.length-1][0],lat:e.geometry.coordinates[e.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(e.properties.waypoints),this.redraw()}editExistingArea(e){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),e.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(e.properties.waypoints),this.redraw()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersSuccess)n(JSON.parse(e));else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(e){this.inner.setRouteConfig(e),this.redraw()}addSnappedWaypoint(e){this.inner.addSnappedWaypoint(e[0],e[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}toggleSnapMode(){this.inner.toggleSnapMode(),this.redraw()}redraw(){let e=JSON.parse(this.inner.renderGeojson());this.routeToolGj.set(e),this.map.getCanvas().style.cursor=e.cursor,this.snapMode.set(e.snap_mode),this.undoLength.set(e.undo_length)}dataUpdated(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersUpdated)n(JSON.parse(e))}}const zv="MZEJTanw3WpxRvt7qDfo";let uu=Nn(null),Fv=Nn("dataviz"),Kd=Nn(!window.matchMedia("(prefers-color-scheme: dark)").matches),P_=Nn(!1),Ku=Nn(""),M_=Nn(!0),ro=Nn(null),A_=Nn(null),Bv=Nn(new ny.LngLat(0,0)),Vv=Nn(new ny.LngLat(0,0)),S2=Nn(1),ju=Nn(1),Rn=Nn({mode:"title"}),Uv=Nn("walk_cycle_only"),E2=Nn(!1);function Jd(){let t=ca(Ku);t||window.alert("Autosave failed; no projectName set?!"),window.localStorage.setItem(t,ca(ro).toSavefile())}function I2(t){let e,n;return e=new p1({props:{$$slots:{default:[xR,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&24&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function xR(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k;function R(){return t[1](t[3])}return{c(){e=ye("h1"),e.textContent="The low-traffic neighbourhood (LTN) tool, v2",n=Xe(),r=ye("p"),r.innerHTML=`This is an experimental - version of the - A/B Street LTN tool - . Most parts of it do not work yet, and you should probably use the other version - of the tool instead.`,i=Xe(),a=ye("p"),a.textContent="To use this tool, you need to:",c=Xe(),l=ye("ol"),l.innerHTML=`
  • Choose your study area to analyze
  • Define one or more neighbourhood boundaries
  • Optionally, fix the basemap data on existing modal filters, turn - restrictions, one-ways, etc
  • Create one or more proposals with new modal filters, and explore their - effects
  • `,d=Xe(),v=ye("p"),v.innerHTML=`This tool is created by Dustin Carlino - and relies heavily on - OpenStreetMap - data.`,S=Xe(),E=ye("center"),T=ye("button"),T.textContent="Start!"},m(z,U){we(z,e,U),we(z,n,U),we(z,r,U),we(z,i,U),we(z,a,U),we(z,c,U),we(z,l,U),we(z,d,U),we(z,v,U),we(z,S,U),we(z,E,U),ae(E,T),M||(k=Pt(T,"click",R),M=!0)},p(z,U){t=z},d(z){z&&(xe(e),xe(n),xe(r),xe(i),xe(a),xe(c),xe(l),xe(d),xe(v),xe(S),xe(E)),M=!1,k()}}}function wR(t){let e,n,r=t[0]&&I2(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&he(r,1)):(r=I2(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function SR(t,e,n){let r;return _t(t,M_,c=>n(0,r=c)),[r,c=>Rr(c).close(),()=>qt(M_,r=!1,r)]}class ER extends Xt{constructor(e){super(),Zt(this,e,SR,wR,Vt,{})}}const IR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAk0lEQVRIS+3U0Q2AIAwEUNjMUXQydRJH0zZB0wjGuwJfSsKfuWfO1hg6n9g5P3wPWKTSXe6EVstUNEjoloIVghAG0OxR7swgLEAjHoBCvACM1AAQUgJ0DL0nm67WwJom7XrBlhVl4arUAHYniuE1ABTuBeBwD0CFs4D92T12fp9v9iPrnJ8LBu0KC0Ch9qEfeK3sAPceHxk8hJ17AAAAAElFTkSuQmCC",C2="/ltn/assets/logo_light-97f2d067.svg",T2="/ltn/assets/logo_dark-ed08d841.svg";let CR=Date.now();function up(t){return`${t}-${CR++}`}const j1=Symbol.for("svelte-maplibre");function cp(){return zE(j1)}function TR(t){let e=new WeakMap;return n=>{var c;let r=e.get(n.originalEvent);if(r!==void 0)return r;let a=(c=n.target.queryRenderedFeatures(n.point).find(l=>{var d;return(d=t.get(l.layer.id))==null?void 0:d.interactive}))==null?void 0:c.layer.id;return e.set(n.originalEvent,a),a}}function LR(){let t=new Map;return h1(j1,{map:Nn(null),source:N0(null),layer:N0(null),popupTarget:N0(null),cluster:Nn(),loadedImages:Nn(new Set),minzoom:Nn(0),maxzoom:Nn(24),layerEvent:Nn(null),layerInfo:t,eventTopMost:TR(t)})}function L2(t){return{subscribe:t.subscribe}}function G1({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=cp(),a=Nn(null),c=L2(a),l={...i,[t]:L2(a)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),h1(j1,l),{...i,self:a}}function PR(){return G1({key:"source",setCluster:!0})}function MR(t=!0){return G1({key:"layer",setPopupTarget:t,setMouseEvent:t})}function AR(){return G1({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}function kR(t){return"layerType"in t&&t.layerType==="deckgl"}function P2(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],a=n[r];i!==a&&t(r,a,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function DR(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function RR(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function k_(t,e){return["case",["boolean",["feature-state","hover"],!1],e,t]}var Hc=NR;function NR(t){var e,n,r;if(t){if(Array.isArray(t)){for(e=[],n=t.length,r=0;r{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function zR(t,e,n){let r,i,a,c,l,d,v,S,E,T,M,k,{$$slots:R={},$$scope:z}=e,{id:U=up("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:J=void 0}=e,{type:oe}=e,{paint:ie=void 0}=e,{layout:ce=void 0}=e,{filter:fe=void 0}=e,{applyToClusters:Te=void 0}=e,{minzoom:Q=void 0}=e,{maxzoom:de=void 0}=e,{manageHoverState:Qe=!1}=e,{hovered:Me=null}=e,{interactive:it=!0}=e,{hoverCursor:ct=void 0}=e,{eventsIfTopMost:je=!1}=e;const Ot=vu(),{map:jt,source:vt,self:At,minzoom:Lt,maxzoom:rn,eventTopMost:xn,layerInfo:fn}=MR();_t(t,jt,te=>n(31,E=te)),_t(t,vt,te=>n(32,T=te)),_t(t,At,te=>n(0,S=te)),_t(t,Lt,te=>n(34,k=te)),_t(t,rn,te=>n(33,M=te)),no(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(te){var Re,It;if(!it||!S||!E||je&&xn(te)!==S)return;let Ae=te.features??[],dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae};Ot(te.type,en)}function Yn(te){var Re,It;if(!it||!S||!E||je&&xn(te)!==S)return;ct&&(E.getCanvas().style.cursor=ct);let Ae=te.features??[];n(6,Me=Ae[0]??null);let dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae})}function zr(te){var Re,It,In;if(!it||!E)return;if(je&&xn(te)!==S){n(6,Me=null),Qe&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ct;let Ae=te.features??[],dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(In=Ae[0])==null?void 0:In.id;en!==_n&&(Qe&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Me=Ae[0]??null)),Ot("mousemove",{event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae})}function Ln(te){if(!(!it||!S||!E)){if(ct&&(E.getCanvas().style.cursor=""),n(6,Me=null),Qe&&_n!==void 0){const Ae={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Ae,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let sr=!0;function Zn(te){E&&(E.off("click",te,pn),E.off("dblclick",te,pn),E.off("contextmenu",te,pn),E.off("mouseenter",te,Yn),E.off("mousemove",te,zr),E.off("mouseleave",te,Ln))}return no(()=>{E&&S&&Zn(S)}),t.$$set=te=>{"id"in te&&n(7,U=te.id),"source"in te&&n(8,F=te.source),"sourceLayer"in te&&n(9,G=te.sourceLayer),"beforeId"in te&&n(10,H=te.beforeId),"beforeLayerType"in te&&n(11,J=te.beforeLayerType),"type"in te&&n(12,oe=te.type),"paint"in te&&n(13,ie=te.paint),"layout"in te&&n(14,ce=te.layout),"filter"in te&&n(15,fe=te.filter),"applyToClusters"in te&&n(16,Te=te.applyToClusters),"minzoom"in te&&n(17,Q=te.minzoom),"maxzoom"in te&&n(18,de=te.maxzoom),"manageHoverState"in te&&n(19,Qe=te.manageHoverState),"hovered"in te&&n(6,Me=te.hovered),"interactive"in te&&n(20,it=te.interactive),"hoverCursor"in te&&n(21,ct=te.hoverCursor),"eventsIfTopMost"in te&&n(22,je=te.eventsIfTopMost),"$$scope"in te&&n(35,z=te.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=RR(Te)),t.$$.dirty[0]&1073774592&&n(24,i=DR("all",r,fe)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,a=Q??k),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=de??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||T),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let te=H;if(!H&&J){let Ae=E.getStyle().layers,dt=typeof J=="function"?J:Re=>Re.type===J,en=Ae==null?void 0:Ae.find(dt);en&&(te=en.id)}qt(At,S=U,S),E.addLayer(Hc({id:S,type:oe,source:l,"source-layer":G,filter:i,paint:ie,layout:ce,minzoom:a,maxzoom:c}),te),n(23,sr=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Ln)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:it}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?P2((te,Ae)=>E==null?void 0:E.setPaintProperty(S,te,Ae)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?P2((te,Ae)=>E==null?void 0:E.setLayoutProperty(S,te,Ae)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(ie)),t.$$.dirty[0]&134234112&&(v==null||v(ce)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,a,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(sr?n(23,sr=!1):E==null||E.setFilter(S,i))},[S,jt,vt,At,Lt,rn,Me,U,F,G,H,J,oe,ie,ce,fe,Te,Q,de,Qe,it,ct,je,sr,i,c,a,v,d,l,r,E,T,M,k,z,R]}let ly=class extends Xt{constructor(e){super(),Zt(this,e,zR,OR,Vt,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}};function FR(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],a,null):Cr(i[24]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function BR(t){let e,n,r;function i(c){t[17](c)}let a={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:[FR]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new ly({props:a}),si.push(()=>Il(e,"hovered",i)),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(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function VR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=up("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function J(de){F=de,n(0,F)}function oe(de){gn.call(this,t,de)}function ie(de){gn.call(this,t,de)}function ce(de){gn.call(this,t,de)}function fe(de){gn.call(this,t,de)}function Te(de){gn.call(this,t,de)}function Q(de){gn.call(this,t,de)}return t.$$set=de=>{"id"in de&&n(1,a=de.id),"source"in de&&n(2,c=de.source),"sourceLayer"in de&&n(3,l=de.sourceLayer),"beforeId"in de&&n(4,d=de.beforeId),"beforeLayerType"in de&&n(5,v=de.beforeLayerType),"paint"in de&&n(6,S=de.paint),"layout"in de&&n(7,E=de.layout),"filter"in de&&n(8,T=de.filter),"applyToClusters"in de&&n(9,M=de.applyToClusters),"minzoom"in de&&n(10,k=de.minzoom),"maxzoom"in de&&n(11,R=de.maxzoom),"hoverCursor"in de&&n(12,z=de.hoverCursor),"manageHoverState"in de&&n(13,U=de.manageHoverState),"hovered"in de&&n(0,F=de.hovered),"eventsIfTopMost"in de&&n(14,G=de.eventsIfTopMost),"interactive"in de&&n(15,H=de.interactive),"$$scope"in de&&n(24,i=de.$$scope)},[F,a,c,l,d,v,S,E,T,M,k,R,z,U,G,H,r,J,oe,ie,ce,fe,Te,Q,i]}let vm=class extends Xt{constructor(e){super(),Zt(this,e,VR,BR,Vt,{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 UR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],a,null):Cr(i[23]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function jR(t){let e,n,r;function i(c){t[16](c)}let a={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[UR]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new ly({props:a}),si.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function GR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=up("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Q){U=Q,n(0,U)}function J(Q){gn.call(this,t,Q)}function oe(Q){gn.call(this,t,Q)}function ie(Q){gn.call(this,t,Q)}function ce(Q){gn.call(this,t,Q)}function fe(Q){gn.call(this,t,Q)}function Te(Q){gn.call(this,t,Q)}return t.$$set=Q=>{"id"in Q&&n(1,a=Q.id),"source"in Q&&n(2,c=Q.source),"sourceLayer"in Q&&n(3,l=Q.sourceLayer),"beforeId"in Q&&n(4,d=Q.beforeId),"beforeLayerType"in Q&&n(5,v=Q.beforeLayerType),"paint"in Q&&n(6,S=Q.paint),"layout"in Q&&n(7,E=Q.layout),"filter"in Q&&n(8,T=Q.filter),"minzoom"in Q&&n(9,M=Q.minzoom),"maxzoom"in Q&&n(10,k=Q.maxzoom),"hoverCursor"in Q&&n(11,R=Q.hoverCursor),"manageHoverState"in Q&&n(12,z=Q.manageHoverState),"hovered"in Q&&n(0,U=Q.hovered),"eventsIfTopMost"in Q&&n(13,F=Q.eventsIfTopMost),"interactive"in Q&&n(14,G=Q.interactive),"$$scope"in Q&&n(23,i=Q.$$scope)},[U,a,c,l,d,v,S,E,T,M,k,R,z,F,G,r,H,J,oe,ie,ce,fe,Te,i]}let lh=class extends Xt{constructor(e){super(),Zt(this,e,GR,jR,Vt,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function qR(t,e,n){let r;const{map:i}=cp();_t(t,i,d=>n(4,r=d));let{position:a="top-left"}=e,{container:c=void 0}=e,l=null;return no(()=>{r!=null&&r.loaded()&&l&&r.removeControl(l)}),t.$$set=d=>{"position"in d&&n(1,a=d.position),"container"in d&&n(2,c=d.container)},t.$$.update=()=>{if(t.$$.dirty&30&&r&&!l){let d;typeof c=="string"?d=document.querySelector(c)??void 0:d=c,n(3,l=new Fs.FullscreenControl({container:d})),r.addControl(l,a)}},[i,a,c,l,r]}class WR extends Xt{constructor(e){super(),Zt(this,e,qR,null,Vt,{position:1,container:2})}}function HR(t,e,n,r,i){let a=!1;t.getSource(e)&&(a=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(a){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function ZR(t,e,n){VE().then(()=>{let r=ca(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function k2(t){let e=t[0],n,r,i=D2(t);return{c(){i.c(),n=Fi()},m(a,c){i.m(a,c),we(a,n,c),r=!0},p(a,c){c&1&&Vt(e,e=a[0])?(Un(),ve(i,1,1,Mt),jn(),i=D2(a),i.c(),he(i,1),i.m(n.parentNode,n)):i.p(a,c)},i(a){r||(he(i),r=!0)},o(a){ve(i),r=!1},d(a){a&&xe(n),i.d(a)}}}function D2(t){let e;const n=t[19].default,r=Sr(n,t,t[18],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&262144)&&Ir(r,n,i,i[18],e?Er(n,i[18],a,null):Cr(i[18]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function XR(t){let e,n,r=t[0]&&k2(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&he(r,1)):(r=k2(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function YR(t,e,n){let r,i,a,{$$slots:c={},$$scope:l}=e,{id:d=up("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:T=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:k=void 0}=e,{maxzoom:R=void 0}=e,{attribution:z=void 0}=e,{buffer:U=void 0}=e,{tolerance:F=void 0}=e;const{map:G,cluster:H,self:J}=PR();_t(t,G,ce=>n(17,i=ce)),_t(t,H,ce=>n(20,a=ce)),_t(t,J,ce=>n(0,r=ce));let oe,ie=!0;return no(()=>{r&&oe&&i&&(ZR(G,r,oe),qt(J,r=null,r),n(15,oe=void 0))}),t.$$set=ce=>{"id"in ce&&n(4,d=ce.id),"data"in ce&&n(5,v=ce.data),"generateId"in ce&&n(6,S=ce.generateId),"promoteId"in ce&&n(7,E=ce.promoteId),"filter"in ce&&n(8,T=ce.filter),"lineMetrics"in ce&&n(9,M=ce.lineMetrics),"cluster"in ce&&n(10,k=ce.cluster),"maxzoom"in ce&&n(11,R=ce.maxzoom),"attribution"in ce&&n(12,z=ce.attribution),"buffer"in ce&&n(13,U=ce.buffer),"tolerance"in ce&&n(14,F=ce.tolerance),"$$scope"in ce&&n(18,l=ce.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&qt(H,a=k,a),t.$$.dirty&196593&&i&&r!==d&&(qt(J,r=d,r),HR(i,r,Hc({type:"geojson",data:v,filter:T,lineMetrics:M,generateId:S,promoteId:E,cluster:!!k,clusterMinPoints:k==null?void 0:k.minPoints,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius,clusterProperties:k==null?void 0:k.properties,maxzoom:R,attribution:z,buffer:U,tolerance:F}),ce=>i&&ce===r,()=>{r&&(n(15,oe=i==null?void 0:i.getSource(r)),n(16,ie=!0))})),t.$$.dirty&131088&&(i==null||i.on("style.load",()=>{n(15,oe=i==null?void 0:i.getSource(d))})),t.$$.dirty&98336&&oe&&(ie?n(16,ie=!1):oe.setData(v)),t.$$.dirty&33792&&(oe==null||oe.setClusterOptions(Hc({cluster:!!k,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius})))},[r,G,H,J,d,v,S,E,T,M,k,R,z,U,F,oe,ie,i,l,c]}let es=class extends Xt{constructor(e){super(),Zt(this,e,YR,XR,Vt,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function KR(t,e,n){let r;const{map:i}=cp();_t(t,i,T=>n(8,r=T));let{position:a="top-left"}=e,{positionOptions:c=void 0}=e,{fitBoundsOptions:l=void 0}=e,{trackUserLocation:d=!1}=e,{showAccuracyCircle:v=!0}=e,{showUserLocation:S=!0}=e,{control:E=null}=e;return no(()=>{r!=null&&r.loaded()&&E&&r.removeControl(E)}),t.$$set=T=>{"position"in T&&n(2,a=T.position),"positionOptions"in T&&n(3,c=T.positionOptions),"fitBoundsOptions"in T&&n(4,l=T.fitBoundsOptions),"trackUserLocation"in T&&n(5,d=T.trackUserLocation),"showAccuracyCircle"in T&&n(6,v=T.showAccuracyCircle),"showUserLocation"in T&&n(7,S=T.showUserLocation),"control"in T&&n(1,E=T.control)},t.$$.update=()=>{t.$$.dirty&510&&r&&!E&&(n(1,E=new Fs.GeolocateControl({positionOptions:c,fitBoundsOptions:l,trackUserLocation:d,showAccuracyCircle:v,showUserLocation:S})),r.addControl(E,a))},[i,E,a,c,l,d,v,S,r]}class JR extends Xt{constructor(e){super(),Zt(this,e,KR,null,Vt,{position:2,positionOptions:3,fitBoundsOptions:4,trackUserLocation:5,showAccuracyCircle:6,showUserLocation:7,control:1})}}function $R(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],a,null):Cr(i[23]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function QR(t){let e,n,r;function i(c){t[16](c)}let a={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[$R]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new ly({props:a}),si.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function eN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=up("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Q){U=Q,n(0,U)}function J(Q){gn.call(this,t,Q)}function oe(Q){gn.call(this,t,Q)}function ie(Q){gn.call(this,t,Q)}function ce(Q){gn.call(this,t,Q)}function fe(Q){gn.call(this,t,Q)}function Te(Q){gn.call(this,t,Q)}return t.$$set=Q=>{"id"in Q&&n(1,a=Q.id),"source"in Q&&n(2,c=Q.source),"sourceLayer"in Q&&n(3,l=Q.sourceLayer),"beforeId"in Q&&n(4,d=Q.beforeId),"beforeLayerType"in Q&&n(5,v=Q.beforeLayerType),"paint"in Q&&n(6,S=Q.paint),"layout"in Q&&n(7,E=Q.layout),"filter"in Q&&n(8,T=Q.filter),"minzoom"in Q&&n(9,M=Q.minzoom),"maxzoom"in Q&&n(10,k=Q.maxzoom),"hoverCursor"in Q&&n(11,R=Q.hoverCursor),"manageHoverState"in Q&&n(12,z=Q.manageHoverState),"hovered"in Q&&n(0,U=Q.hovered),"eventsIfTopMost"in Q&&n(13,F=Q.eventsIfTopMost),"interactive"in Q&&n(14,G=Q.interactive),"$$scope"in Q&&n(23,i=Q.$$scope)},[U,a,c,l,d,v,S,E,T,M,k,R,z,F,G,r,H,J,oe,ie,ce,fe,Te,i]}let uh=class extends Xt{constructor(e){super(),Zt(this,e,eN,QR,Vt,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function tN(t){let e=t.getCenter(),n=Math.round(t.getZoom()*100)/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),a=Math.round(e.lat*i)/i,c=Math.round(e.lng*i)/i,l=`${n}/${a}/${c}`,d=t.getBearing(),v=t.getPitch();return(d||v)&&(l+=`/${Math.round(d*10)/10}`),v&&(l+=`/${Math.round(v)}`),`#${l}`}function nN(t){return t.replace("#","").split("/").map(parseFloat)}var yf=q1;function q1(t,e){return t===e||t!==t&&e!==e?!0:typeof t!=typeof e||{}.toString.call(t)!={}.toString.call(e)||t!==Object(t)||!t?!1:Array.isArray(t)?R2(t,e):{}.toString.call(t)=="[object Set]"?R2(Array.from(t),Array.from(e)):{}.toString.call(t)=="[object Object]"?iN(t,e):rN(t,e)}function rN(t,e){return t.toString()===e.toString()}function R2(t,e){var n=t.length;if(n!=e.length)return!1;for(var r=0;rn(6,r=S));let{position:a="top-left"}=e,{showCompass:c=!0}=e,{showZoom:l=!0}=e,{visualizePitch:d=!1}=e,v=null;return no(()=>{r!=null&&r.loaded()&&v&&r.removeControl(v)}),t.$$set=S=>{"position"in S&&n(1,a=S.position),"showCompass"in S&&n(2,c=S.showCompass),"showZoom"in S&&n(3,l=S.showZoom),"visualizePitch"in S&&n(4,d=S.visualizePitch)},t.$$.update=()=>{t.$$.dirty&126&&r&&!v&&(n(5,v=new Fs.NavigationControl({showCompass:c,showZoom:l,visualizePitch:d})),r.addControl(v,a))},[i,a,c,l,d,v,r]}class sN extends Xt{constructor(e){super(),Zt(this,e,oN,null,Vt,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function aN(t,e,n){let r;const{map:i}=cp();_t(t,i,v=>n(5,r=v));let{position:a="bottom-left"}=e,{maxWidth:c=void 0}=e,{unit:l="metric"}=e,d=null;return no(()=>{r!=null&&r.loaded()&&d&&r.removeControl(d)}),t.$$set=v=>{"position"in v&&n(1,a=v.position),"maxWidth"in v&&n(2,c=v.maxWidth),"unit"in v&&n(3,l=v.unit)},t.$$.update=()=>{t.$$.dirty&62&&r&&!d&&(n(4,d=new Fs.ScaleControl({maxWidth:c,unit:l})),r.addControl(d,a))},[i,a,c,l,d,r]}class lN extends Xt{constructor(e){super(),Zt(this,e,aN,null,Vt,{position:1,maxWidth:2,unit:3})}}const{window:uN}=c1,cN=t=>({map:t[0]&16,loadedImages:t[0]&32,allImagesLoaded:t[0]&64}),N2=t=>({map:t[4],loadedImages:t[5],allImagesLoaded:t[6]});function O2(t){let e,n,r=t[3]&&z2(t);const i=t[40].default,a=Sr(i,t,t[39],N2);return{c(){r&&r.c(),e=Xe(),a&&a.c()},m(c,l){r&&r.m(c,l),we(c,e,l),a&&a.m(c,l),n=!0},p(c,l){c[3]?r?(r.p(c,l),l[0]&8&&he(r,1)):(r=z2(c),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn()),a&&a.p&&(!n||l[0]&112|l[1]&256)&&Ir(a,i,c,c[39],n?Er(i,c[39],l,cN):Cr(c[39]),N2)},i(c){n||(he(r),he(a,c),n=!0)},o(c){ve(r),ve(a,c),n=!1},d(c){c&&xe(e),r&&r.d(c),a&&a.d(c)}}}function z2(t){let e,n,r,i,a,c,l,d;return e=new sN({props:{position:t[7]}}),r=new JR({props:{position:t[7],fitBoundsOptions:{maxZoom:12}}}),a=new WR({props:{position:t[7]}}),l=new lN({props:{position:t[7]}}),{c(){He(e.$$.fragment),n=Xe(),He(r.$$.fragment),i=Xe(),He(a.$$.fragment),c=Xe(),He(l.$$.fragment)},m(v,S){qe(e,v,S),we(v,n,S),qe(r,v,S),we(v,i,S),qe(a,v,S),we(v,c,S),qe(l,v,S),d=!0},p(v,S){const E={};S[0]&128&&(E.position=v[7]),e.$set(E);const T={};S[0]&128&&(T.position=v[7]),r.$set(T);const M={};S[0]&128&&(M.position=v[7]),a.$set(M);const k={};S[0]&128&&(k.position=v[7]),l.$set(k)},i(v){d||(he(e.$$.fragment,v),he(r.$$.fragment,v),he(a.$$.fragment,v),he(l.$$.fragment,v),d=!0)},o(v){ve(e.$$.fragment,v),ve(r.$$.fragment,v),ve(a.$$.fragment,v),ve(l.$$.fragment,v),d=!1},d(v){v&&(xe(n),xe(i),xe(c)),We(e,v),We(r,v),We(a,v),We(l,v)}}}function hN(t){let e,n,r,i,a,c=t[4]&&t[0]&&O2(t);return{c(){e=ye("div"),c&&c.c(),Ce(e,"class",n=u_(t[2])+" svelte-p00lfq"),Ce(e,"data-testid","map-container"),xl(e,"expand-map",!t[2])},m(l,d){we(l,e,d),c&&c.m(e,null),t[41](e),r=!0,i||(a=[Pt(uN,"hashchange",t[11]),cv(t[10].call(null,e))],i=!0)},p(l,d){l[4]&&l[0]?c?(c.p(l,d),d[0]&17&&he(c,1)):(c=O2(l),c.c(),he(c,1),c.m(e,null)):c&&(Un(),ve(c,1,1,()=>{c=null}),jn()),(!r||d[0]&4&&n!==(n=u_(l[2])+" svelte-p00lfq"))&&Ce(e,"class",n),(!r||d[0]&4)&&xl(e,"expand-map",!l[2])},i(l){r||(he(c),r=!0)},o(l){ve(c),r=!1},d(l){l&&xe(e),c&&c.d(),t[41](null),i=!1,Jr(a)}}}function fN(t,e,n){let r,i,a,c,{$$slots:l={},$$scope:d}=e,{map:v=null}=e,{mapContainer:S=void 0}=e,{class:E=void 0}=e,{style:T}=e,{diffStyleUpdates:M=!1}=e,{center:k=void 0}=e,{zoom:R=void 0}=e,{pitch:z=0}=e,{bearing:U=0}=e,{bounds:F=void 0}=e,{hash:G=!1}=e,{updateHash:H=te=>{window.history.replaceState(window.history.state,"",te)}}=e,{loaded:J=!1}=e,{minZoom:oe=0}=e,{maxZoom:ie=22}=e,{antialias:ce=void 0}=e,{zoomOnDoubleClick:fe=!0}=e,{locale:Te=void 0}=e,{interactive:Q=!0}=e,{attributionControl:de=!0}=e,{cooperativeGestures:Qe=!1}=e,{preserveDrawingBuffer:Me=!1}=e,{maxBounds:it=void 0}=e,{images:ct=[]}=e,{standardControls:je=!1}=e,{filterLayers:Ot=void 0}=e,{transformRequest:jt=void 0}=e;const vt=vu(),{map:At,loadedImages:Lt}=LR();_t(t,At,te=>n(4,a=te)),_t(t,Lt,te=>n(5,c=te));let rn=new Set;async function xn(te,Ae=!1){if(a&&!(!a.loaded()&&!Ae))if("url"in te){rn.add(te.id);try{let dt=await a.loadImage(te.url);a==null||a.addImage(te.id,dt.data,te.options),c.add(te.id),Lt.set(c)}catch(dt){vt("error",dt)}finally{rn.delete(te.id)}}else a.addImage(te.id,te.data,te.options),c.add(te.id),Lt.set(c)}let fn,_n,pn,Yn;function zr(te){return sr(),qt(At,a=new Fs.Map(Hc({container:te,style:T,locale:Te,center:k,zoom:R,pitch:z,bearing:U,minZoom:oe,maxZoom:ie,antialias:ce,interactive:Q,preserveDrawingBuffer:Me,maxBounds:it,bounds:F,attributionControl:de,transformRequest:jt,cooperativeGestures:Qe})),a),a.on("load",Ae=>{Ae.target.getContainer().setAttribute("data-testid","map"),Ae.target.getCanvas().setAttribute("data-testid","map-canvas"),n(0,J=!0),vt("load",a)}),a.on("error",Ae=>vt("error",{...Ae,map:a})),a.on("movestart",Ae=>vt("movestart",{...Ae,map:a})),a.on("moveend",Ae=>{if(n(12,k=Ae.target.getCenter()),n(13,R=Ae.target.getZoom()),n(14,z=Ae.target.getPitch()),n(15,U=Ae.target.getBearing()),n(16,F=Ae.target.getBounds()),vt("moveend",{...Ae,map:a}),G){let dt=new URL(window.location.href.replace(/(#.+)?$/,tN(a)));H(dt)}}),a.on("click",Ae=>vt("click",{...Ae,map:a})),a.on("dblclick",Ae=>vt("dblclick",{...Ae,map:a})),a.on("contextmenu",Ae=>vt("contextmenu",{...Ae,map:a})),a.on("zoomstart",Ae=>vt("zoomstart",{...Ae,map:a})),a.on("zoom",Ae=>{vt("zoom",{...Ae,map:a})}),a.on("zoomend",Ae=>{vt("zoomend",{...Ae,map:a})}),a.on("style.load",()=>{if(a){const Ae=a.getStyle();if(n(36,fn=Ae.layers.map(dt=>dt.id)),n(37,_n=Object.keys(Ae.sources)),Yn)for(const[dt,en]of Object.entries(Yn))a.addSource(dt,en);if(pn)for(const dt of pn)a.addLayer(dt);for(const dt of ct)xn(dt,!0)}}),a.on("styledata",Ae=>{if(a&&Ot){const dt=a.getStyle().layers;if(dt)for(let en of dt)Ot(en)||a.setLayoutProperty(en.id,"visibility","none")}vt("styledata",{...Ae,map:a})}),{destroy(){n(0,J=!1),a==null||a.remove(),qt(At,a=null,a)}}}let Ln=T;function sr(){if(G){let te=nN(window.location.hash);te.length>=3&&(n(13,R=te[0]),n(12,k=[te[2],te[1]])),te.length==5&&(n(15,U=te[3]),n(14,z=te[4]))}}function Zn(te){si[te?"unshift":"push"](()=>{S=te,n(1,S)})}return t.$$set=te=>{"map"in te&&n(17,v=te.map),"mapContainer"in te&&n(1,S=te.mapContainer),"class"in te&&n(2,E=te.class),"style"in te&&n(18,T=te.style),"diffStyleUpdates"in te&&n(19,M=te.diffStyleUpdates),"center"in te&&n(12,k=te.center),"zoom"in te&&n(13,R=te.zoom),"pitch"in te&&n(14,z=te.pitch),"bearing"in te&&n(15,U=te.bearing),"bounds"in te&&n(16,F=te.bounds),"hash"in te&&n(20,G=te.hash),"updateHash"in te&&n(21,H=te.updateHash),"loaded"in te&&n(0,J=te.loaded),"minZoom"in te&&n(22,oe=te.minZoom),"maxZoom"in te&&n(23,ie=te.maxZoom),"antialias"in te&&n(24,ce=te.antialias),"zoomOnDoubleClick"in te&&n(25,fe=te.zoomOnDoubleClick),"locale"in te&&n(26,Te=te.locale),"interactive"in te&&n(27,Q=te.interactive),"attributionControl"in te&&n(28,de=te.attributionControl),"cooperativeGestures"in te&&n(29,Qe=te.cooperativeGestures),"preserveDrawingBuffer"in te&&n(30,Me=te.preserveDrawingBuffer),"maxBounds"in te&&n(31,it=te.maxBounds),"images"in te&&n(32,ct=te.images),"standardControls"in te&&n(3,je=te.standardControls),"filterLayers"in te&&n(33,Ot=te.filterLayers),"transformRequest"in te&&n(34,jt=te.transformRequest),"$$scope"in te&&n(39,d=te.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&8&&n(7,r=typeof je=="boolean"?void 0:je),t.$$.dirty[0]&16&&n(17,v=a),t.$$.dirty[0]&786448|t.$$.dirty[1]&224&&a&&!yf(T,Ln)){const te=a.getStyle();if(fn&&(pn=te.layers.filter(Ae=>!fn.includes(Ae.id))),_n){const Ae=Object.keys(te.sources).filter(dt=>!_n.includes(dt));Yn={};for(const dt of Ae)Yn[dt]=te.sources[dt]}n(38,Ln=T),a.setStyle(T,{diff:M}),qt(Lt,c=new Set,c),n(35,rn=new Set)}if(t.$$.dirty[0]&49|t.$$.dirty[1]&18&&J&&a!=null&&a.loaded())for(let te of ct)!c.has(te.id)&&!rn.has(te.id)&&!a.hasImage(te.id)&&xn(te);if(t.$$.dirty[0]&32|t.$$.dirty[1]&2&&n(6,i=ct.every(te=>c.has(te.id))),t.$$.dirty[0]&61456&&a){let te={};k!=null&&!yf(k,a==null?void 0:a.getCenter())&&(te.center=k),R!=null&&!yf(R,a==null?void 0:a.getZoom())&&(te.zoom=R),U!=null&&!yf(U,a==null?void 0:a.getBearing())&&(te.bearing=U),z!=null&&!yf(z,a==null?void 0:a.getPitch())&&(te.pitch=z),Object.keys(te).length&&a.easeTo(te)}t.$$.dirty[0]&65552&&F&&!yf(F,a==null?void 0:a.getBounds())&&(a==null||a.fitBounds(F)),t.$$.dirty[0]&33554448&&(fe?a==null||a.doubleClickZoom.enable():a==null||a.doubleClickZoom.disable())},[J,S,E,je,a,c,i,r,At,Lt,zr,sr,k,R,z,U,F,v,T,M,G,H,oe,ie,ce,fe,Te,Q,de,Qe,Me,it,ct,Ot,jt,rn,fn,_n,Ln,d,l,Zn]}class pN extends Xt{constructor(e){super(),Zt(this,e,fN,hN,Vt,{map:17,mapContainer:1,class:2,style:18,diffStyleUpdates:19,center:12,zoom:13,pitch:14,bearing:15,bounds:16,hash:20,updateHash:21,loaded:0,minZoom:22,maxZoom:23,antialias:24,zoomOnDoubleClick:25,locale:26,interactive:27,attributionControl:28,cooperativeGestures:29,preserveDrawingBuffer:30,maxBounds:31,images:32,standardControls:3,filterLayers:33,transformRequest:34},null,[-1,-1])}}const dN=t=>({marker:t&8}),F2=t=>({marker:t[3]});function mN(t){let e,n,r,i,a,c,l;const d=t[19].default,v=Sr(d,t,t[18],F2);return{c(){e=ye("div"),v&&v.c(),Ce(e,"tabindex",n=t[1]?0:void 0),Ce(e,"role",r=t[1]?"button":void 0),or(e,"z-index",t[2])},m(S,E){we(S,e,E),v&&v.m(e,null),a=!0,c||(l=[cv(t[7].call(null,e)),cv(i=gN.call(null,e,t[0])),Pt(e,"click",D0(t[20])),Pt(e,"dblclick",D0(t[21])),Pt(e,"contextmenu",D0(t[22])),Pt(e,"mouseenter",t[23]),Pt(e,"mouseleave",t[24]),Pt(e,"mousemove",t[25]),Pt(e,"keydown",t[8])],c=!0)},p(S,[E]){v&&v.p&&(!a||E&262152)&&Ir(v,d,S,S[18],a?Er(d,S[18],E,dN):Cr(S[18]),F2),(!a||E&2&&n!==(n=S[1]?0:void 0))&&Ce(e,"tabindex",n),(!a||E&2&&r!==(r=S[1]?"button":void 0))&&Ce(e,"role",r),i&&$_(i.update)&&E&1&&i.update.call(null,S[0]),E&4&&or(e,"z-index",S[2])},i(S){a||(he(v,S),a=!0)},o(S){ve(v,S),a=!1},d(S){S&&xe(e),v&&v.d(S),c=!1,Jr(l)}}}function gN(t,e){const n=t.className;function r(i){i?t.className=`${n} ${i}`:t.className=n}return r(e),{update:r}}function _N(t,e,n){let r,i,a,{$$slots:c={},$$scope:l}=e,{marker:d=void 0}=e,{lngLat:v}=e,{class:S=void 0}=e,{interactive:E=!0}=e,{asButton:T=!1}=e,{draggable:M=!1}=e,{feature:k=null}=e,{offset:R=void 0}=e,{zIndex:z=void 0}=e,{rotation:U=0}=e,{opacity:F=1}=e;const G=vu(),{map:H,layerEvent:J,self:oe}=AR();_t(t,H,je=>n(27,a=je)),_t(t,J,je=>n(26,r=je)),_t(t,oe,je=>n(3,i=je));function ie(je){qt(oe,i=new Fs.Marker({element:je,rotation:U,draggable:M,offset:R,opacity:F.toString()}).setLngLat(v).addTo(a),i),n(11,d=i);const Ot=()=>Te("dragstart"),jt=()=>{ce(),Te("drag")},vt=()=>{ce(),Te("dragend")};return M&&(i.on("dragstart",Ot),i.on("drag",jt),i.on("dragend",vt)),{destroy(){M&&(i==null||i.off("dragstart",Ot),i==null||i.off("drag",jt),i==null||i.off("dragend",vt)),n(11,d=void 0),i==null||i.remove()}}}function ce(){let je=i==null?void 0:i.getLngLat();je&&(Array.isArray(v)?n(10,v=[je.lng,je.lat]):v&&"lon"in v?n(10,v={lon:je.lng,lat:je.lat}):n(10,v=je))}function fe(je){je.key===" "&&(je.preventDefault(),je.stopPropagation(),Te("click"))}function Te(je){if(!E)return;let Ot=i==null?void 0:i.getLngLat();if(!Ot)return;const jt=[Ot.lng,Ot.lat];let vt={map:a,marker:i,lngLat:jt,features:[{type:"Feature",properties:(k==null?void 0:k.properties)??{},geometry:{type:"Point",coordinates:jt}}]};qt(J,r={...vt,layerType:"marker",type:je},r),G(je,vt)}const Q=()=>Te("click"),de=()=>Te("dblclick"),Qe=()=>Te("contextmenu"),Me=je=>{Te("mouseenter")},it=()=>{Te("mouseleave")},ct=()=>Te("mousemove");return t.$$set=je=>{"marker"in je&&n(11,d=je.marker),"lngLat"in je&&n(10,v=je.lngLat),"class"in je&&n(0,S=je.class),"interactive"in je&&n(12,E=je.interactive),"asButton"in je&&n(1,T=je.asButton),"draggable"in je&&n(13,M=je.draggable),"feature"in je&&n(14,k=je.feature),"offset"in je&&n(15,R=je.offset),"zIndex"in je&&n(2,z=je.zIndex),"rotation"in je&&n(16,U=je.rotation),"opacity"in je&&n(17,F=je.opacity),"$$scope"in je&&n(18,l=je.$$scope)},t.$$.update=()=>{t.$$.dirty&1032&&(i==null||i.setLngLat(v)),t.$$.dirty&32776&&(i==null||i.setOffset(R??[0,0])),t.$$.dirty&65544&&(i==null||i.setRotation(U)),t.$$.dirty&131080&&(i==null||i.setOpacity(F.toString()))},[S,T,z,i,H,J,oe,ie,fe,Te,v,d,E,M,k,R,U,F,l,c,Q,de,Qe,Me,it,ct]}class B2 extends Xt{constructor(e){super(),Zt(this,e,_N,mN,Vt,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const yN=t=>({features:t[0]&16,data:t[0]&16,map:t[0]&4,close:t[0]&1}),V2=t=>{var e;return{features:t[4],data:(e=t[4])==null?void 0:e[0],map:t[2],close:t[31]}};function U2(t){let e,n,r=(t[4]||t[3]instanceof Fs.Marker)&&j2(t);return{c(){e=ye("div"),r&&r.c()},m(i,a){we(i,e,a),r&&r.m(e,null),t[32](e),n=!0},p(i,a){i[4]||i[3]instanceof Fs.Marker?r?(r.p(i,a),a[0]&24&&he(r,1)):(r=j2(i),r.c(),he(r,1),r.m(e,null)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(),t[32](null)}}}function j2(t){let e;const n=t[30].default,r=Sr(n,t,t[29],V2);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a[0]&536870933)&&Ir(r,n,i,i[29],e?Er(n,i[29],a,yN):Cr(i[29]),V2)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function vN(t){let e,n,r=t[9].default&&U2(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,a){i[9].default?r?(r.p(i,a),a[0]&512&&he(r,1)):(r=U2(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function bN(t,e,n){let r,i,a,c,l,d,{$$slots:v={},$$scope:S}=e;const E=zP(v);let{closeButton:T=void 0}=e,{closeOnClickOutside:M=!0}=e,{closeOnClickInside:k=!1}=e,{closeOnMove:R=!1}=e,{openOn:z="click"}=e,{openIfTopMost:U=!0}=e,{focusAfterOpen:F=!0}=e,{anchor:G=void 0}=e,{offset:H=void 0}=e,{popupClass:J=void 0}=e,{maxWidth:oe=void 0}=e,{lngLat:ie=void 0}=e,{html:ce=void 0}=e,{open:fe=!1}=e;const Te=vu(),{map:Q,popupTarget:de,layerEvent:Qe,layer:Me,eventTopMost:it}=cp();_t(t,Q,Ae=>n(2,a=Ae)),_t(t,de,Ae=>n(3,l=Ae)),_t(t,Qe,Ae=>n(28,c=Ae)),_t(t,Me,Ae=>n(35,d=Ae));const ct=["click","dblclick","contextmenu"];let je,Ot=!1,jt;function vt(){if(!je)return;let Ae=je.getElement();!Ae||Ae===jt||(jt=Ae,z==="hover"&&(jt.style.pointerEvents="none"),jt.addEventListener("mouseenter",()=>{n(24,Ot=!0)},{passive:!0}),jt.addEventListener("mouseleave",()=>{n(24,Ot=!1)},{passive:!0}),jt.addEventListener("click",()=>{k&&n(0,fe=!1)},{passive:!0}))}Q_(()=>{if(a)return a.on("click",Ln),a.on("contextmenu",Ln),typeof l=="string"&&(a.on("click",l,xn),a.on("dblclick",l,xn),a.on("contextmenu",l,xn),a.on("mousemove",l,zr),a.on("mouseleave",l,Yn),a.on("touchstart",l,_n),a.on("touchend",l,pn)),()=>{a!=null&&a.loaded()&&(je==null||je.remove(),a.off("click",Ln),a.off("contextmenu",Ln),l instanceof Fs.Marker?l.getPopup()===je&&l.setPopup(void 0):typeof l=="string"&&(a.off("click",l,xn),a.off("dblclick",l,xn),a.off("contextmenu",l,xn),a.off("mousemove",l,zr),a.off("mouseleave",l,Yn),a.off("touchstart",l,_n),a.off("touchend",l,pn)))}});function At(Ae){return U?!("marker"in Ae)&&!kR(Ae)&&it(Ae)!==d:!1}let Lt=null,rn="normal";function xn(Ae){Ae.type===z&&(At(Ae)||("layerType"in Ae?Ae.layerType==="deckgl"?(n(10,ie=Ae.coordinate),n(4,Lt=Ae.object?[Ae.object]:null)):(n(10,ie=Ae.lngLat),n(4,Lt=Ae.features??[])):(n(10,ie=Ae.lngLat),n(4,Lt=Ae.features??[])),setTimeout(()=>n(0,fe=!0))))}let fn=null;function _n(Ae){fn=Ae.point}function pn(Ae){if(!fn||z!=="hover")return;let dt=fn.dist(Ae.point);fn=null,dt<3&&(n(10,ie=Ae.lngLat),n(4,Lt=Ae.features??[]),je.isOpen()?n(25,rn="justOpened"):(n(25,rn="opening"),n(0,fe=!0)))}function Yn(Ae){z!=="hover"||fn||rn!=="normal"||(n(0,fe=!1),n(4,Lt=null))}function zr(Ae){if(!(z!=="hover"||fn||rn!=="normal")){if(At(Ae)){n(0,fe=!1),n(4,Lt=null);return}n(0,fe=!0),n(4,Lt=Ae.features??[]),n(10,ie=Ae.lngLat)}}function Ln(Ae){if(rn==="justOpened"){n(25,rn="normal");return}if(!M)return;let dt=[jt,l instanceof Fs.Marker?l==null?void 0:l.getElement():null];fe&&je.isOpen()&&!dt.some(en=>en==null?void 0:en.contains(Ae.originalEvent.target))&&(Ae.type==="contextmenu"&&z==="contextmenu"||Ae.type!=="contextmenu")&&n(0,fe=!1)}no(()=>{a&&(je!=null&&je.isOpen())&&je.remove()});let sr;const Zn=()=>n(0,fe=!1);function te(Ae){si[Ae?"unshift":"push"](()=>{sr=Ae,n(1,sr)})}return t.$$set=Ae=>{"closeButton"in Ae&&n(11,T=Ae.closeButton),"closeOnClickOutside"in Ae&&n(12,M=Ae.closeOnClickOutside),"closeOnClickInside"in Ae&&n(13,k=Ae.closeOnClickInside),"closeOnMove"in Ae&&n(14,R=Ae.closeOnMove),"openOn"in Ae&&n(15,z=Ae.openOn),"openIfTopMost"in Ae&&n(16,U=Ae.openIfTopMost),"focusAfterOpen"in Ae&&n(17,F=Ae.focusAfterOpen),"anchor"in Ae&&n(18,G=Ae.anchor),"offset"in Ae&&n(19,H=Ae.offset),"popupClass"in Ae&&n(20,J=Ae.popupClass),"maxWidth"in Ae&&n(21,oe=Ae.maxWidth),"lngLat"in Ae&&n(10,ie=Ae.lngLat),"html"in Ae&&n(22,ce=Ae.html),"open"in Ae&&n(0,fe=Ae.open),"$$scope"in Ae&&n(29,S=Ae.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&14336&&n(27,r=T??(!M&&!k)),t.$$.dirty[0]&146685952&&(je||(n(23,je=new Fs.Popup({closeButton:r,closeOnClick:!1,closeOnMove:R,focusAfterOpen:F,maxWidth:oe,className:J,anchor:G,offset:H})),jt=je.getElement(),je.on("open",()=>{n(0,fe=!0),vt(),Te("open",je)}),je.on("close",()=>{n(0,fe=!1),Te("close",je)}),je.on("hover",()=>{Te("hover",je)}))),t.$$.dirty[0]&8421384&&je&&l instanceof Fs.Marker&&(z==="click"?l.setPopup(je):l.getPopup()===je&&l.setPopup(void 0)),t.$$.dirty[0]&268468224&&ct.includes(z)&&(c==null?void 0:c.type)===z&&(xn(c),qt(Qe,c=null,c)),t.$$.dirty[0]&268468224&&n(26,i=z==="hover"&&((c==null?void 0:c.type)==="mousemove"||(c==null?void 0:c.type)==="mouseenter")),t.$$.dirty[0]&352354304&&z==="hover"&&Qe&&(i&&c&&(c.layerType==="deckgl"?(n(10,ie=c.coordinate),n(4,Lt=c.object?[c.object]:null)):(n(10,ie=c.lngLat),n(4,Lt=c.features??[]))),n(0,fe=(i||Ot)??!1)),t.$$.dirty[0]&12582914&&(sr?je.setDOMContent(sr):ce&&je.setHTML(ce)),t.$$.dirty[0]&8389632&&ie&&je.setLngLat(ie),t.$$.dirty[0]&41943045&&a){let Ae=je.isOpen();fe&&!Ae?(je.addTo(a),rn==="opening"&&n(25,rn="justOpened")):!fe&&Ae&&je.remove()}},[fe,sr,a,l,Lt,Q,de,Qe,Me,E,ie,T,M,k,R,z,U,F,G,H,J,oe,ce,je,Ot,rn,i,r,c,S,v,Zn,te]}class xN extends Xt{constructor(e){super(),Zt(this,e,bN,vN,Vt,{closeButton:11,closeOnClickOutside:12,closeOnClickInside:13,closeOnMove:14,openOn:15,openIfTopMost:16,focusAfterOpen:17,anchor:18,offset:19,popupClass:20,maxWidth:21,lngLat:10,html:22,open:0},null,[-1,-1])}}function wN(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],a,null):Cr(i[24]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function SN(t){let e,n,r;function i(c){t[17](c)}let a={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:[wN]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new ly({props:a}),si.push(()=>Il(e,"hovered",i)),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(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function EN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=up("symbol")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S=void 0}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function J(de){F=de,n(0,F)}function oe(de){gn.call(this,t,de)}function ie(de){gn.call(this,t,de)}function ce(de){gn.call(this,t,de)}function fe(de){gn.call(this,t,de)}function Te(de){gn.call(this,t,de)}function Q(de){gn.call(this,t,de)}return t.$$set=de=>{"id"in de&&n(1,a=de.id),"source"in de&&n(2,c=de.source),"sourceLayer"in de&&n(3,l=de.sourceLayer),"beforeId"in de&&n(4,d=de.beforeId),"beforeLayerType"in de&&n(5,v=de.beforeLayerType),"paint"in de&&n(6,S=de.paint),"layout"in de&&n(7,E=de.layout),"filter"in de&&n(8,T=de.filter),"applyToClusters"in de&&n(9,M=de.applyToClusters),"minzoom"in de&&n(10,k=de.minzoom),"maxzoom"in de&&n(11,R=de.maxzoom),"hoverCursor"in de&&n(12,z=de.hoverCursor),"manageHoverState"in de&&n(13,U=de.manageHoverState),"hovered"in de&&n(0,F=de.hovered),"eventsIfTopMost"in de&&n(14,G=de.eventsIfTopMost),"interactive"in de&&n(15,H=de.interactive),"$$scope"in de&&n(24,i=de.$$scope)},[F,a,c,l,d,v,S,E,T,M,k,R,z,U,G,H,r,J,oe,ie,ce,fe,Te,Q,i]}class yC extends Xt{constructor(e){super(),Zt(this,e,EN,SN,Vt,{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})}}var bm=Uint8Array,vC=Uint16Array,IN=Int32Array,CN=new bm([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]),TN=new bm([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]),bC=function(t,e){for(var n=new vC(31),r=0;r<31;++r)n[r]=e+=1<>1|(ir&21845)<<1,eu=(eu&52428)>>2|(eu&13107)<<2,eu=(eu&61680)>>4|(eu&3855)<<4,MN[ir]=((eu&65280)>>8|(eu&255)<<8)>>1;var eu,ir,uy=new bm(288);for(ir=0;ir<144;++ir)uy[ir]=8;var ir;for(ir=144;ir<256;++ir)uy[ir]=9;var ir;for(ir=256;ir<280;++ir)uy[ir]=7;var ir;for(ir=280;ir<288;++ir)uy[ir]=8;var ir,AN=new bm(32);for(ir=0;ir<32;++ir)AN[ir]=5;var ir,kN=new bm(0),DN=typeof TextDecoder<"u"&&new TextDecoder,RN=0;try{DN.decode(kN,{stream:!0}),RN=1}catch{}var NN=Object.defineProperty,ON=(t,e,n)=>e in t?NN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G2=(t,e,n)=>(ON(t,typeof e!="symbol"?e+"":e,n),n);function $d(){}function wC(t){return t()}function q2(){return Object.create(null)}function cy(t){t.forEach(wC)}function SC(t){return typeof t=="function"}function zN(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function FN(t){return Object.keys(t).length===0}function BN(t,e){t.appendChild(e)}function VN(t,e,n){t.insertBefore(e,n||null)}function EC(t){t.parentNode&&t.parentNode.removeChild(t)}function W2(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Bu(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function UN(t){return Array.from(t.childNodes)}function Bg(t,e,n){t.classList.toggle(e,!!n)}let W1;function Gd(t){W1=t}const Sf=[],H2=[];let Pf=[];const Z2=[],jN=Promise.resolve();let jv=!1;function GN(){jv||(jv=!0,jN.then(IC))}function Gv(t){Pf.push(t)}const iv=new Set;let vf=0;function IC(){if(vf!==0)return;const t=W1;do{try{for(;vft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Pf=e}const HN=new Set;function ZN(t,e){t&&t.i&&(HN.delete(t),t.i(e))}function XN(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Gv(()=>{const a=t.$$.on_mount.map(wC).filter(SC);t.$$.on_destroy?t.$$.on_destroy.push(...a):cy(a),t.$$.on_mount=[]}),i.forEach(Gv)}function YN(t,e){const n=t.$$;n.fragment!==null&&(WN(n.after_update),cy(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function KN(t,e){t.$$.dirty[0]===-1&&(Sf.push(t),GN(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=M.length?M[0]:T;return v.ctx&&i(v.ctx[E],v.ctx[E]=k)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](k),S&&KN(t,E)),T}):[],v.update(),S=!0,cy(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=UN(e.target);v.fragment&&v.fragment.l(E),E.forEach(EC)}else v.fragment&&v.fragment.c();e.intro&&ZN(t.$$.fragment),XN(t,e.target,e.anchor),IC()}Gd(d)}class $N{constructor(){G2(this,"$$"),G2(this,"$$set")}$destroy(){YN(this,1),this.$destroy=$d}$on(e,n){if(!SC(n))return $d;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!FN(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const QN="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(QN);function eO(t){let e,n,r;return{c(){e=W2("svg"),n=W2("path"),Bu(n,"stroke-width","4"),Bu(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),Bu(n,"class","svelte-gzo3ar"),Bu(e,"width",r=t[0]==="list"?20:void 0),Bu(e,"viewBox","0 0 70 85"),Bu(e,"fill","none"),Bu(e,"class","svelte-gzo3ar"),Bg(e,"in-map",t[0]!=="list"),Bg(e,"list-icon",t[0]==="list")},m(i,a){VN(i,e,a),BN(e,n)},p(i,[a]){a&1&&r!==(r=i[0]==="list"?20:void 0)&&Bu(e,"width",r),a&1&&Bg(e,"in-map",i[0]!=="list"),a&1&&Bg(e,"list-icon",i[0]==="list")},i:$d,o:$d,d(i){i&&EC(e)}}}function tO(t,e,n){let{displayIn:r}=e;return t.$$set=i=>{"displayIn"in i&&n(0,r=i.displayIn)},[r]}class nO extends $N{constructor(e){super(),JN(this,e,tO,eO,zN,{displayIn:0})}}const rO=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],iO={decimalLatitude:40.123,decimalLongitude:-74.123},oO=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],sO=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222}];function aO(){const t=[];return rO.forEach(e=>{e.decimalLatitude?t.push(e):t.push({...e,...iO})}),[...t,...oO,...sO]}const lO=aO();lO.map(t=>t.verbatimCoordinates);/** - * splaytree v3.1.2 - * Fast Splay tree for Node and browser - * - * @author Alexander Milevski - * @license MIT - * @preserve - *//*! ***************************************************************************** -Copyright (c) Microsoft Corporation. All rights reserved. -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at http://www.apache.org/licenses/LICENSE-2.0 - -THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED -WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, -MERCHANTABLITY OR NON-INFRINGEMENT. - -See the Apache Version 2.0 License for specific language governing permissions -and limitations under the License. -***************************************************************************** */function uO(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(v){return function(S){return d([v,S])}}function d(v){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=v[0]&2?i.return:v[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,v[1])).done)return a;switch(i=0,a&&(v=[v[0]&2,a.value]),v[0]){case 0:case 1:a=v;break;case 4:return n.label++,{value:v[1],done:!1};case 5:n.label++,i=v[1],v=[0];continue;case 7:v=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&&(!a||v[1]>a[0]&&v[1]e?1:t0){if(e.right===null)break;if(n(t,e.right.key)>0){var l=e.right;if(e.right=l.left,l.left=e,e=l,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,a.left=e.right,e.left=r.right,e.right=r.left,e}function ov(t,e,n,r){var i=new Ju(t,e);if(n===null)return i.left=i.right=null,i;n=qu(t,n,r);var a=r(t,n.key);return a<0?(i.left=n.left,i.right=n,n.left=null):a>=0&&(i.right=n.right,i.left=n,n.right=null),i}function X2(t,e,n){var r=null,i=null;if(e){e=qu(t,e,n);var a=n(e.key,t);a===0?(r=e.left,i=e.right):a<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function hO(t,e,n){return e===null?t:(t===null||(e=qu(t.key,e,n),e.left=t),e)}function qv(t,e,n,r,i){if(t){r(""+e+(n?"└── ":"├── ")+i(t)+` -`);var a=e+(n?" ":"│ ");t.left&&qv(t.left,a,!1,r,i),t.right&&qv(t.right,a,!0,r,i)}}var H1=function(){function t(e){e===void 0&&(e=cO),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,n){return this._size++,this._root=ov(e,n,this._root,this._comparator)},t.prototype.add=function(e,n){var r=new Ju(e,n);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,a=qu(e,this._root,i),c=i(e,a.key);return c===0?this._root=a:(c<0?(r.left=a.left,r.right=a,a.left=null):c>0&&(r.right=a.right,r.left=a,a.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,n,r){var i;if(n===null)return null;n=qu(e,n,r);var a=r(e,n.key);return a===0?(n.left===null?i=n.right:(i=qu(e,n.left,r),i.right=n.right),this._size--,i):n},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=qu(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return n;i<0?n=n.left:n=n.right}return null},t.prototype.find=function(e){return this._root&&(this._root=qu(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return!0;i<0?n=n.left:n=n.right}return!1},t.prototype.forEach=function(e,n){for(var r=this._root,i=[],a=!1;!a;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),e.call(n,r),r=r.right):a=!0;return this},t.prototype.range=function(e,n,r,i){for(var a=[],c=this._comparator,l=this._root,d;a.length!==0||l;)if(l)a.push(l),l=l.left;else{if(l=a.pop(),d=c(l.key,n),d>0)break;if(c(l.key,e)>=0&&r.call(i,l))return this;l=l.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(n){var r=n.key;return e.push(r)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(n){var r=n.data;return e.push(r)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var n=this._root,r=!1,i=0,a=[];!r;)if(n)a.push(n),n=n.left;else if(a.length>0){if(n=a.pop(),i===e)return n;i++,n=n.right}else r=!0;return null},t.prototype.next=function(e){var n=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var i=this._comparator;n;){var a=i(e.key,n.key);if(a===0)break;a<0?(r=n,n=n.left):n=n.right}return r},t.prototype.prev=function(e){var n=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var i=this._comparator;n;){var a=i(e.key,n.key);if(a===0)break;a<0?n=n.left:(r=n,n=n.right)}return r},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return pO(this._root)},t.prototype.load=function(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=!1);var i=e.length,a=this._comparator;if(r&&Zv(e,n,0,i-1,a),this._root===null)this._root=Wv(e,n,0,i),this._size=i;else{var c=dO(this.toList(),fO(e,n),a);i=this._size+i,this._root=Hv({head:c},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(r){return String(r.key)});var n=[];return qv(this._root,"",!0,function(r){return n.push(r)},e),n.join("")},t.prototype.update=function(e,n,r){var i=this._comparator,a=X2(e,this._root,i),c=a.left,l=a.right;i(e,n)<0?l=ov(n,r,l,i):c=ov(n,r,c,i),this._root=hO(c,l,i)},t.prototype.split=function(e){return X2(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,n,r;return uO(this,function(i){switch(i.label){case 0:e=this._root,n=[],r=!1,i.label=1;case 1:return r?[3,6]:e===null?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return n.length===0?[3,4]:(e=n.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function Wv(t,e,n,r){var i=r-n;if(i>0){var a=n+Math.floor(i/2),c=t[a],l=e[a],d=new Ju(c,l);return d.left=Wv(t,e,n,a),d.right=Wv(t,e,a+1,r),d}return null}function fO(t,e){for(var n=new Ju(null,null),r=n,i=0;i0?(e=a=a.next=n.pop(),e=e.right):r=!0;return a.next=null,i.next}function Hv(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),a=Hv(t,e,i),c=t.head;return c.left=a,t.head=t.head.next,c.right=Hv(t,i+1,n),c}return null}function dO(t,e,n){for(var r=new Ju(null,null),i=r,a=t,c=e;a!==null&&c!==null;)n(a.key,c.key)<0?(i.next=a,a=a.next):(i.next=c,c=c.next),i=i.next;return a!==null?i.next=a:c!==null&&(i.next=c),r.next}function Zv(t,e,n,r,i){if(!(n>=r)){for(var a=t[n+r>>1],c=n-1,l=r+1;;){do c++;while(i(t[c],a)<0);do l--;while(i(t[l],a)>0);if(c>=l)break;var d=t[c];t[c]=t[l],t[l]=d,d=e[c],e[c]=e[l],e[l]=d}Zv(t,e,n,l,i),Zv(t,e,l+1,r,i)}}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y2(t,e){for(var n=0;nn.x?1:e.yn.y?1:0}}]);function t(e,n){La(this,t),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return ns(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,i=n.length;r=0&&E>=0?vT?-1:0:d<0&&E<0?vT?1:0:Ed?1:0}}}]),t}(),bO=0,R_=function(){ns(t,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,i=n.leftSE.point.x,a=e.rightSE.point.x,c=n.rightSE.point.x;if(cl&&d>v)return-1;var E=e.comparePoint(n.leftSE.point);if(E<0)return 1;if(E>0)return-1;var T=n.comparePoint(e.rightSE.point);return T!==0?T:-1}if(r>i){if(ld&&l>S)return 1;var M=n.comparePoint(e.leftSE.point);if(M!==0)return M;var k=e.comparePoint(n.rightSE.point);return k<0?1:k>0?-1:1}if(ld)return 1;if(ac){var z=e.comparePoint(n.rightSE.point);if(z<0)return 1;if(z>0)return-1}if(a!==c){var U=v-l,F=a-r,G=S-d,H=c-i;if(U>F&&GH)return-1}return a>c?1:aS?1:e.idn.id?1:0}}]);function t(e,n,r,i){La(this,t),this.id=++bO,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return ns(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:en?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x0&&l.swapEvents(),_l.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),a.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n0){var a=n;n=r,r=a}if(n.prev===r){var c=n;n=r,r=c}for(var l=0,d=r.rings.length;l0)i=n,a=e,c=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var d=new _l(i,!0),v=new _l(a,!1);return new t(d,v,[r],[c])}}]),t}(),eS=function(){function t(e,n,r){if(La(this,t),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=Qd.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var a=i,c=1,l=e.length;cthis.bbox.ur.x&&(this.bbox.ur.x=d.x),d.y>this.bbox.ur.y&&(this.bbox.ur.y=d.y),a=d)}(i.x!==a.x||i.y!==a.y)&&this.segments.push(R_.fromRing(a,i,this))}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;nthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.interiorRings.push(a)}this.multiPoly=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;nthis.bbox.ur.x&&(this.bbox.ur.x=a.bbox.ur.x),a.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=a.bbox.ur.y),this.polys.push(a)}this.isSubject=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n0&&(e=i)}for(var a=e.segment.prevInResult(),c=a?a.prevInResult():null;;){if(!a)return null;if(!c)return a.ringOut;if(c.ringOut!==a.ringOut)return c.ringOut.enclosingRing()!==a.ringOut?a.ringOut:a.ringOut.enclosingRing();a=c.prevInResult(),c=a?a.prevInResult():null}}}]),t}(),nS=function(){function t(e){La(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return ns(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n1&&arguments[1]!==void 0?arguments[1]:R_.compare;La(this,t),this.queue=e,this.tree=new H1(n),this.segments=[]}return ns(t,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var i=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!i)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var a=i,c=i,l=void 0,d=void 0;l===void 0;)a=this.tree.prev(a),a===null?l=null:a.key.consumedBy===void 0&&(l=a.key);for(;d===void 0;)c=this.tree.next(c),c===null?d=null:c.key.consumedBy===void 0&&(d=c.key);if(e.isLeft){var v=null;if(l){var S=l.getIntersection(n);if(S!==null&&(n.isAnEndpoint(S)||(v=S),!l.isAnEndpoint(S)))for(var E=this._splitSafely(l,S),T=0,M=E.length;T0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&d){var ce=l.getIntersection(d);if(ce!==null){if(!l.isAnEndpoint(ce))for(var fe=this._splitSafely(l,ce),Te=0,Q=fe.length;TerS)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var H=new EO(k),J=k.size,oe=k.pop();oe;){var ie=oe.key;if(k.size===J){var ce=ie.segment;throw new Error("Unable to pop() ".concat(ie.isLeft?"left":"right"," SweepEvent ")+"[".concat(ie.point.x,", ").concat(ie.point.y,"] from segment #").concat(ce.id," ")+"[".concat(ce.leftSE.point.x,", ").concat(ce.leftSE.point.y,"] -> ")+"[".concat(ce.rightSE.point.x,", ").concat(ce.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(k.size>rS)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(H.segments.length>IO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var fe=H.process(ie),Te=0,Q=fe.length;Te1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rn[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]e.x?1:this.ye.y?1:0};ze.prototype.clone=function(){};ze.prototype.copy=function(){return new ze(this)};ze.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};ze.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)};ze.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)};ze.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this.x),t=37*t+ze.hashCode(this.y),t};ze.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z};ze.prototype.interfaces_=function(){return[Ss,fy,Es]};ze.prototype.getClass=function(){return ze};ze.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=nn.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}};ch.DimensionalComparator.get=function(){return ou};ch.serialVersionUID.get=function(){return 6683108902428367e3};ch.NULL_ORDINATE.get=function(){return nn.NaN};ch.X.get=function(){return 0};ch.Y.get=function(){return 1};ch.Z.get=function(){return 2};Object.defineProperties(ze,ch);var ou=function(t){if(this._dimensionsToTest=2,arguments.length!==0&&arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new yr("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};ou.prototype.compare=function(t,e){var n=t,r=e,i=ou.compare(n.x,r.x);if(i!==0)return i;var a=ou.compare(n.y,r.y);if(a!==0)return a;if(this._dimensionsToTest<=2)return 0;var c=ou.compare(n.z,r.z);return c};ou.prototype.interfaces_=function(){return[Rf]};ou.prototype.getClass=function(){return ou};ou.compare=function(t,e){return te?1:nn.isNaN(t)?nn.isNaN(e)?0:-1:nn.isNaN(e)?1:0};var Nf=function(){};Nf.prototype.create=function(){};Nf.prototype.interfaces_=function(){return[]};Nf.prototype.getClass=function(){return Nf};var Fe=function(){},xm={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Fe.prototype.interfaces_=function(){return[]};Fe.prototype.getClass=function(){return Fe};Fe.toLocationSymbol=function(t){switch(t){case Fe.EXTERIOR:return"e";case Fe.BOUNDARY:return"b";case Fe.INTERIOR:return"i";case Fe.NONE:return"-"}throw new yr("Unknown location value: "+t)};xm.INTERIOR.get=function(){return 0};xm.BOUNDARY.get=function(){return 1};xm.EXTERIOR.get=function(){return 2};xm.NONE.get=function(){return-1};Object.defineProperties(Fe,xm);var Jt=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},rs=function(){},RC={LOG_10:{configurable:!0}};rs.prototype.interfaces_=function(){return[]};rs.prototype.getClass=function(){return rs};rs.log10=function(t){var e=Math.log(t);return nn.isInfinite(e)||nn.isNaN(e)?e:e/rs.LOG_10};rs.min=function(t,e,n,r){var i=t;return en?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],a=arguments[2];return ra?a:r}};rs.wrap=function(t,e){return t<0?e- -t%e:t%e};rs.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}else if(arguments.length===4){var i=arguments[0],a=arguments[1],c=arguments[2],l=arguments[3],d=i;return a>d&&(d=a),c>d&&(d=c),l>d&&(d=l),d}};rs.average=function(t,e){return(t+e)/2};RC.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(rs,RC);var Pa=function(t){this.str=t};Pa.prototype.append=function(t){this.str+=t};Pa.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)};Pa.prototype.toString=function(t){return this.str};var _a=function(t){this.value=t};_a.prototype.intValue=function(){return this.value};_a.prototype.compareTo=function(t){return this.valuet?1:0};_a.isNaN=function(t){return Number.isNaN(t)};var em=function(){};em.isWhitespace=function(t){return t<=32&&t>=0||t===127};em.toUpperCase=function(t){return t.toUpperCase()};var Ze=function t(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(typeof arguments[0]=="string"){var r=arguments[0];t.call(this,t.parse(r))}}else if(arguments.length===2){var i=arguments[0],a=arguments[1];this.init(i,a)}},Xs={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Ze.prototype.le=function(t){return(this._hi9?(S=!0,E="9"):E="0"+v,c.append(E),n=n.subtract(Ze.valueOf(v)).multiply(Ze.TEN),S&&n.selfAdd(Ze.TEN);var T=!0,M=Ze.magnitude(n._hi);if(M<0&&Math.abs(M)>=l-d&&(T=!1),!T)break}return e[0]=r,c.toString()};Ze.prototype.sqr=function(){return this.multiply(this)};Ze.prototype.doubleValue=function(){return this._hi+this._lo};Ze.prototype.subtract=function(){if(arguments[0]instanceof Ze){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}};Ze.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}};Ze.prototype.isZero=function(){return this._hi===0&&this._lo===0};Ze.prototype.selfSubtract=function(){if(arguments[0]instanceof Ze){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}};Ze.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};Ze.prototype.min=function(t){return this.le(t)?this:t};Ze.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof Ze){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,a=null,c=null,l=null,d=null,v=null,S=null,E=null;return d=this._hi/n,v=Ze.SPLIT*d,i=v-d,E=Ze.SPLIT*n,i=v-i,a=d-i,c=E-n,S=d*n,c=E-c,l=n-c,E=i*c-S+i*l+a*c+a*l,v=(this._hi-S-E+this._lo-d*r)/n,E=d+v,this._hi=E,this._lo=d-E+v,this}};Ze.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};Ze.prototype.divide=function(){if(arguments[0]instanceof Ze){var t=arguments[0],e=null,n=null,r=null,i=null,a=null,c=null,l=null,d=null;a=this._hi/t._hi,c=Ze.SPLIT*a,e=c-a,d=Ze.SPLIT*t._hi,e=c-e,n=a-e,r=d-t._hi,l=a*t._hi,r=d-r,i=t._hi-r,d=e*r-l+e*i+n*r+n*i,c=(this._hi-l-d+this._lo-a*t._lo)/t._hi,d=a+c;var v=d,S=a-d+c;return new Ze(v,S)}else if(typeof arguments[0]=="number"){var E=arguments[0];return nn.isNaN(E)?Ze.createNaN():Ze.copy(this).selfDivide(E,0)}};Ze.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo};Ze.prototype.pow=function(t){if(t===0)return Ze.valueOf(1);var e=new Ze(this),n=Ze.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n};Ze.prototype.ceil=function(){if(this.isNaN())return Ze.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Ze(t,e)};Ze.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0};Ze.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()};Ze.prototype.setValue=function(){if(arguments[0]instanceof Ze){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}};Ze.prototype.max=function(t){return this.ge(t)?this:t};Ze.prototype.sqrt=function(){if(this.isZero())return Ze.valueOf(0);if(this.isNegative())return Ze.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Ze.valueOf(e),r=this.subtract(n.sqr()),i=r._hi*(t*.5);return n.add(i)};Ze.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof Ze){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,i=null,a=null,c=null,l=null;return i=this._hi+e,c=i-this._hi,a=i-c,a=e-c+(this._hi-a),l=a+this._lo,n=i+l,r=l+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(arguments.length===2){var d=arguments[0],v=arguments[1],S=null,E=null,T=null,M=null,k=null,R=null,z=null,U=null;k=this._hi+d,T=this._lo+v,z=k-this._hi,U=T-this._lo,R=k-z,M=T-U,R=d-z+(this._hi-R),M=v-U+(this._lo-M),z=R+T,S=k+z,E=z+(k-S),z=M+E;var F=S+z,G=z+(S-F);return this._hi=F,this._lo=G,this}};Ze.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof Ze){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,a=null,c=null,l=null,d=null,v=null;d=Ze.SPLIT*this._hi,i=d-this._hi,v=Ze.SPLIT*n,i=d-i,a=this._hi-i,c=v-n,d=this._hi*n,c=v-c,l=n-c,v=i*c-d+i*l+a*c+a*l+(this._hi*r+this._lo*n);var S=d+v;i=d-S;var E=v+i;return this._hi=S,this._lo=E,this}};Ze.prototype.selfSqr=function(){return this.selfMultiply(this)};Ze.prototype.floor=function(){if(this.isNaN())return Ze.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Ze(t,e)};Ze.prototype.negate=function(){return this.isNaN()?this:new Ze(-this._hi,-this._lo)};Ze.prototype.clone=function(){};Ze.prototype.multiply=function(){if(arguments[0]instanceof Ze){var t=arguments[0];return t.isNaN()?Ze.createNaN():Ze.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return nn.isNaN(e)?Ze.createNaN():Ze.copy(this).selfMultiply(e,0)}};Ze.prototype.isNaN=function(){return nn.isNaN(this._hi)};Ze.prototype.intValue=function(){return Math.trunc(this._hi)};Ze.prototype.toString=function(){var t=Ze.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()};Ze.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if(n.charAt(0)===".")i="0"+n;else if(r<0)i="0."+Ze.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var a=r-n.length,c=Ze.stringOfChar("0",a);i=n+c+".0"}return this.isNegative()?"-"+i:i};Ze.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,a=null,c=null,l=null;i=1/this._hi,a=Ze.SPLIT*i,t=a-i,l=Ze.SPLIT*this._hi,t=a-t,e=i-t,n=l-this._hi,c=i*this._hi,n=l-n,r=this._hi-n,l=t*n-c+t*r+e*n+e*r,a=(1-c-l-i*this._lo)/this._hi;var d=i+a,v=i-d+a;return new Ze(d,v)};Ze.prototype.toSciNotation=function(){if(this.isZero())return Ze.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Ze.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var a=n.charAt(0)+"."+i;return this.isNegative()?"-"+a+r:a+r};Ze.prototype.abs=function(){return this.isNaN()?Ze.NaN:this.isNegative()?this.negate():new Ze(this)};Ze.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};Ze.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo};Ze.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};Ze.prototype.trunc=function(){return this.isNaN()?Ze.NaN:this.isPositive()?this.floor():this.ceil()};Ze.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};Ze.prototype.interfaces_=function(){return[Es,Ss,fy]};Ze.prototype.getClass=function(){return Ze};Ze.sqr=function(t){return Ze.valueOf(t).selfMultiply(t)};Ze.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return Ze.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new Ze(e)}};Ze.sqrt=function(t){return Ze.valueOf(t).sqrt()};Ze.parse=function(t){for(var e=0,n=t.length;em.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var v=t.charAt(e);if(e++,em.isDigit(v)){var S=v-"0";a.selfMultiply(Ze.TEN),a.selfAdd(S),c++;continue}if(v==="."){l=c;continue}if(v==="e"||v==="E"){var E=t.substring(e);try{d=_a.parseInt(E)}catch(z){throw z instanceof Error?new Error("Invalid exponent "+E+" in string "+t):z}finally{}break}throw new Error("Unexpected character '"+v+"' at position "+e+" in string "+t)}var T=a,M=c-l-d;if(M===0)T=a;else if(M>0){var k=Ze.TEN.pow(M);T=a.divide(k)}else if(M<0){var R=Ze.TEN.pow(-M);T=a.multiply(R)}return r?T.negate():T};Ze.createNaN=function(){return new Ze(nn.NaN,nn.NaN)};Ze.copy=function(t){return new Ze(t)};Ze.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),i=Math.pow(10,r);return i*10<=e&&(r+=1),r};Ze.stringOfChar=function(t,e){for(var n=new Pa,r=0;r0){if(a<=0)return yo.signum(c);r=i+a}else if(i<0){if(a>=0)return yo.signum(c);r=-i-a}else return yo.signum(c);var l=yo.DP_SAFE_EPSILON*r;return c>=l||-c>=l?yo.signum(c):2};yo.signum=function(t){return t>0?1:t<0?-1:0};NC.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(yo,NC);var Dn=function(){},wm={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};wm.X.get=function(){return 0};wm.Y.get=function(){return 1};wm.Z.get=function(){return 2};wm.M.get=function(){return 3};Dn.prototype.setOrdinate=function(t,e,n){};Dn.prototype.size=function(){};Dn.prototype.getOrdinate=function(t,e){};Dn.prototype.getCoordinate=function(){};Dn.prototype.getCoordinateCopy=function(t){};Dn.prototype.getDimension=function(){};Dn.prototype.getX=function(t){};Dn.prototype.clone=function(){};Dn.prototype.expandEnvelope=function(t){};Dn.prototype.copy=function(){};Dn.prototype.getY=function(t){};Dn.prototype.toCoordinateArray=function(){};Dn.prototype.interfaces_=function(){return[fy]};Dn.prototype.getClass=function(){return Dn};Object.defineProperties(Dn,wm);var OC=function(){},hp=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(OC),Di=function(){};Di.arraycopy=function(t,e,n,r,i){for(var a=0,c=e;ct._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}};Ft.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Ft){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}};Ft.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0};Ft.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)};Ft.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};Ft.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};Ft.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};Ft.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e};Ft.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};Ft.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Ft){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof ze){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}};Ft.prototype.centre=function(){return this.isNull()?null:new ze((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};Ft.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Ft){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var i=arguments[0],a=arguments[1],c=arguments[2],l=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)};Ft.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this._minx),t=37*t+ze.hashCode(this._maxx),t=37*t+ze.hashCode(this._miny),t=37*t+ze.hashCode(this._maxy),t};Ft.prototype.interfaces_=function(){return[Ss,Es]};Ft.prototype.getClass=function(){return Ft};Ft.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],a=arguments[2],c=arguments[3],l=Math.min(a.x,c.x),d=Math.max(a.x,c.x),v=Math.min(r.x,i.x),S=Math.max(r.x,i.x);return!(v>d||Sd)||Sn?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}};Tr.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Tr.prototype.setPrecisionModel=function(t){this._precisionModel=t};Tr.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;ni?a=r:a=i;else{var c=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);r>i?a=c:a=l,a===0&&!t.equals(e)&&(a=Math.max(c,l))}return hn.isTrue(!(a===0&&!t.equals(e)),"Bad distance calculation"),a};Tr.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);return hn.isTrue(!(a===0&&!t.equals(e)),"Invalid distance calculation"),a};hh.DONT_INTERSECT.get=function(){return 0};hh.DO_INTERSECT.get=function(){return 1};hh.COLLINEAR.get=function(){return 2};hh.NO_INTERSECTION.get=function(){return 0};hh.POINT_INTERSECTION.get=function(){return 1};hh.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Tr,hh);var uc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var r=new Ft(this._inputLines[0][0],this._inputLines[0][1]),i=new Ft(this._inputLines[1][0],this._inputLines[1][1]);return r.contains(n)&&i.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];if(this._isProper=!1,Ft.intersects(r,i,n)&&Et.orientationIndex(r,i,n)===0&&Et.orientationIndex(i,r,n)===0)return this._isProper=!0,(n.equals(r)||n.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}else return t.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,r,i,a,c){c.x=this.smallestInAbsValue(n.x,r.x,i.x,a.x),c.y=this.smallestInAbsValue(n.y,r.y,i.y,a.y),n.x-=c.x,n.y-=c.y,r.x-=c.x,r.y-=c.y,i.x-=c.x,i.y-=c.y,a.x-=c.x,a.y-=c.y},e.prototype.safeHCoordinateIntersection=function(n,r,i,a){var c=null;try{c=Bs.intersection(n,r,i,a)}catch(l){if(l instanceof hp)c=e.nearestEndpoint(n,r,i,a);else throw l}finally{}return c},e.prototype.intersection=function(n,r,i,a){var c=this.intersectionWithNormalization(n,r,i,a);return this.isInSegmentEnvelopes(c)||(c=new ze(e.nearestEndpoint(n,r,i,a))),this._precisionModel!==null&&this._precisionModel.makePrecise(c),c},e.prototype.smallestInAbsValue=function(n,r,i,a){var c=n,l=Math.abs(c);return Math.abs(r)1e-4&&Di.out.println("Distance = "+c.distance(l))},e.prototype.intersectionWithNormalization=function(n,r,i,a){var c=new ze(n),l=new ze(r),d=new ze(i),v=new ze(a),S=new ze;this.normalizeToEnvCentre(c,l,d,v,S);var E=this.safeHCoordinateIntersection(c,l,d,v);return E.x+=S.x,E.y+=S.y,E},e.prototype.computeCollinearIntersection=function(n,r,i,a){var c=Ft.intersects(n,r,i),l=Ft.intersects(n,r,a),d=Ft.intersects(i,a,n),v=Ft.intersects(i,a,r);return c&&l?(this._intPt[0]=i,this._intPt[1]=a,t.COLLINEAR_INTERSECTION):d&&v?(this._intPt[0]=n,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):c&&d?(this._intPt[0]=i,this._intPt[1]=n,i.equals(n)&&!l&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):c&&v?(this._intPt[0]=i,this._intPt[1]=r,i.equals(r)&&!l&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&d?(this._intPt[0]=a,this._intPt[1]=n,a.equals(n)&&!c&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&v?(this._intPt[0]=a,this._intPt[1]=r,a.equals(r)&&!c&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,r,i,a,c){var l=n.xr.x?n.x:r.x,S=n.y>r.y?n.y:r.y,E=i.xa.x?i.x:a.x,k=i.y>a.y?i.y:a.y,R=l>E?l:E,z=vT?d:T,F=S0&&l>0||c<0&&l<0)return t.NO_INTERSECTION;var d=Et.orientationIndex(i,a,n),v=Et.orientationIndex(i,a,r);if(d>0&&v>0||d<0&&v<0)return t.NO_INTERSECTION;var S=c===0&&l===0&&d===0&&v===0;return S?this.computeCollinearIntersection(n,r,i,a):(c===0||l===0||d===0||v===0?(this._isProper=!1,n.equals2D(i)||n.equals2D(a)?this._intPt[0]=n:r.equals2D(i)||r.equals2D(a)?this._intPt[0]=r:c===0?this._intPt[0]=new ze(i):l===0?this._intPt[0]=new ze(a):d===0?this._intPt[0]=new ze(n):v===0&&(this._intPt[0]=new ze(r))):(this._isProper=!0,this._intPt[0]=this.intersection(n,r,i,a)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,r,i,a){var c=n,l=Et.distancePointLine(n,i,a),d=Et.distancePointLine(r,i,a);return d0?n>0?-i:i:n>0?i:-i;if(e===0||n===0)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,a=t,t=n,n=a,a=e,e=r,r=a):e<=-r?(i=-i,n=-n,r=-r):(a=t,t=-n,n=a,a=e,e=-r,r=a):r>0?-e<=r?(i=-i,t=-t,e=-e):(a=-t,t=n,n=a,a=-e,e=r,r=a):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,a=-t,t=-n,n=a,a=-e,e=-r,r=a),t>0)if(n>0){if(!(t<=n))return i}else return i;else{if(n>0)return-i;if(t>=n)i=-i,t=-t,n=-n;else return-i}for(;;){if(c=Math.floor(n/t),n=n-c*t,r=r-c*e,r<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(r===0)return n===0?0:-i;if(n===0||(c=Math.floor(t/n),t=t-c*n,e=e-c*r,e<0))return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(e===0)return t===0?0:i;if(t===0)return-i}};var da=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};da.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,a=t.y-this._p.y,c=e.x-this._p.x,l=e.y-this._p.y,d=Xc.signOfDet2x2(i,a,c,l);if(d===0)return this._isPointOnSegment=!0,null;l0&&this._crossingCount++}};da.prototype.isPointInPolygon=function(){return this.getLocation()!==Fe.EXTERIOR};da.prototype.getLocation=function(){return this._isPointOnSegment?Fe.BOUNDARY:this._crossingCount%2===1?Fe.INTERIOR:Fe.EXTERIOR};da.prototype.isOnSegment=function(){return this._isPointOnSegment};da.prototype.interfaces_=function(){return[]};da.prototype.getClass=function(){return da};da.locatePointInRing=function(){if(arguments[0]instanceof ze&&Jt(arguments[1],Dn)){for(var t=arguments[0],e=arguments[1],n=new da(t),r=new ze,i=new ze,a=1;a1||d<0||d>1)&&(i=!0)}}return i?rs.min(Et.distancePointLine(t,n,r),Et.distancePointLine(e,n,r),Et.distancePointLine(n,t,e),Et.distancePointLine(r,t,e)):0};Et.isPointInRing=function(t,e){return Et.locatePointInRing(t,e)!==Fe.EXTERIOR};Et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new ze;t.getCoordinate(0,r);for(var i=r.x,a=r.y,c=1;cn.y&&(n=a,r=i)}var c=r;do c=c-1,c<0&&(c=e);while(t[c].equals2D(n)&&c!==r);var l=r;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==r);var d=t[c],v=t[l];if(d.equals2D(n)||v.equals2D(n)||d.equals2D(v))return!1;var S=Et.computeOrientation(d,n,v),E=!1;return S===0?E=d.x>v.x:E=S>0,E};Et.locatePointInRing=function(t,e){return da.locatePointInRing(t,e)};Et.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)};Et.computeOrientation=function(t,e,n){return Et.orientationIndex(t,e,n)};Et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new yr("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return a.distance(l);var S=((c.y-a.y)*(l.x-c.x)-(c.x-a.x)*(l.y-c.y))/d;return Math.abs(S)*Math.sqrt(d)}};Et.isOnLine=function(t,e){for(var n=new uc,r=1;r0};zf.prototype.interfaces_=function(){return[bs]};zf.prototype.getClass=function(){return zf};var Ff=function(){};Ff.prototype.isInBoundary=function(t){return t>1};Ff.prototype.interfaces_=function(){return[bs]};Ff.prototype.getClass=function(){return Ff};var Bf=function(){};Bf.prototype.isInBoundary=function(t){return t===1};Bf.prototype.interfaces_=function(){return[bs]};Bf.prototype.getClass=function(){return Bf};var ni=function(){};ni.prototype.add=function(){};ni.prototype.addAll=function(){};ni.prototype.isEmpty=function(){};ni.prototype.iterator=function(){};ni.prototype.size=function(){};ni.prototype.toArray=function(){};ni.prototype.remove=function(){};function X1(t){this.message=t||""}X1.prototype=new Error;X1.prototype.name="IndexOutOfBoundsException";var fp=function(){};fp.prototype.hasNext=function(){};fp.prototype.next=function(){};fp.prototype.remove=function(){};var Vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(ni);function pp(t){this.message=t||""}pp.prototype=new Error;pp.prototype.name="NoSuchElementException";var yt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,ni]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var r=this,i=n.iterator();i.hasNext();)r.add(i.next());return!0},e.prototype.set=function(n,r){var i=this.array_[n];return this.array_[n]=r,i},e.prototype.iterator=function(){return new OO(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new X1;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,r=[],i=0,a=this.array_.length;i=1){var v=this.get(this.size()-1);if(v.equals2D(l))return null}t.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var S=arguments[0],E=arguments[1];return this.add(S,E),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var T=arguments[0],M=arguments[1],k=arguments[2];if(k)for(var R=0;R=0;z--)r.add(T[z],M);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof ze){var U=arguments[0],F=arguments[1],G=arguments[2];if(!G){var H=this.size();if(H>0){if(U>0){var J=this.get(U-1);if(J.equals2D(F))return null}if(UTe&&(Q=-1);for(var de=fe;de!==Te;de+=Q)r.add(ie[de],ce);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ze(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(yt),En=function(){},dy={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dy.ForwardComparator.get=function(){return tm};dy.BidirectionalComparator.get=function(){return Vf};dy.coordArrayType.get=function(){return new Array(0).fill(null)};En.prototype.interfaces_=function(){return[]};En.prototype.getClass=function(){return En};En.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))};En.ptNotInList=function(t,e){for(var n=0;n=t?e:[]};En.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e};En.extract=function(t,e,n){e=rs.clamp(e,0,t.length),n=rs.clamp(n,-1,t.length);var r=n-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(n.length===0)return 0;var i=En.compare(n,r),a=En.isEqualReversed(n,r);return a?0:i};Vf.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(n.length===0)return 0;for(var i=En.increasingDirection(n),a=En.increasingDirection(r),c=i>0?0:n.length-1,l=a>0?0:n.length-1,d=0;d0)e=e.right;else return e.value}return null};Gi.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n=this.root_,r,i;do if(r=n,i=t.compareTo(n.key),i<0)n=n.left;else if(i>0)n=n.right;else{var a=n.value;return n.value=e,a}while(n!==null);var c={key:t,left:null,right:null,value:e,parent:r,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=c:r.right=c,this.fixAfterInsertion(c),this.size_++,null};Gi.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=Vu;t!=null&&t!==this.root_&&t.parent.color===Vu;)if(nr(t)===sv(nr(nr(t)))){var n=aS(nr(nr(t)));sS(n)===Vu?(dl(nr(t),yl),dl(n,yl),dl(nr(nr(t)),Vu),t=nr(nr(t))):(t===aS(nr(t))&&(t=nr(t),e.rotateLeft(t)),dl(nr(t),yl),dl(nr(nr(t)),Vu),e.rotateRight(nr(nr(t))))}else{var r=sv(nr(nr(t)));sS(r)===Vu?(dl(nr(t),yl),dl(r,yl),dl(nr(nr(t)),Vu),t=nr(nr(t))):(t===sv(nr(t))&&(t=nr(t),e.rotateRight(t)),dl(nr(t),yl),dl(nr(nr(t)),Vu),e.rotateLeft(nr(nr(t))))}this.root_.color=yl};Gi.prototype.values=function(){var t=new yt,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=Gi.successor(e))!==null;)t.add(e.value);return t};Gi.prototype.entrySet=function(){var t=new Y1,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=Gi.successor(e))!==null;)t.add(e);return t};Gi.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}};Gi.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}};Gi.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t};Gi.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}else{for(var n=t.parent,r=t;n!==null&&r===n.right;)r=n,n=n.parent;return n}};Gi.prototype.size=function(){return this.size_};var nm=function(){};nm.prototype.interfaces_=function(){return[]};nm.prototype.getClass=function(){return nm};function FC(){}FC.prototype=new my;function ya(){this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}ya.prototype=new FC;ya.prototype.contains=function(t){for(var e=this,n=0,r=this.array_.length;n=0;){var c=i.substring(0,a);r.add(c),i=i.substring(a+n),a=i.indexOf(e)}i.length>0&&r.add(i);for(var l=new Array(r.size()).fill(null),d=0;d0)for(var a=i;a0&&r.append(" ");for(var a=0;a0&&r.append(","),r.append(_s.toString(t.getOrdinate(i,a)))}return r.append(")"),r.toString()}};qr.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return qr.createClosedRing(t,e,4);var r=e.getOrdinate(0,Dn.X)===e.getOrdinate(n-1,Dn.X)&&e.getOrdinate(0,Dn.Y)===e.getOrdinate(n-1,Dn.Y);return r?e:qr.createClosedRing(t,e,n+1)};qr.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();qr.copy(e,0,r,0,i);for(var a=i;a0&&qr.reverse(r._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?zn.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Et.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var r=this._points.copy();qr.reverse(r);var i=this.getFactory().createLineString(r);return i},e.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){for(var i=arguments[0],a=i,c=0,l=0;c= 2)");this._points=r},e.prototype.isCoordinate=function(r){for(var i=this,a=0;a=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Nr),Ga=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return Yt.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isEquivalentClass(r)?t.prototype.equalsExact.call(this,r,i):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var r=this,i=this._geometries.length,a=new Array(i).fill(null),c=0;c0?e.createPoint(n[0]):e.createPoint():t};om.prototype.interfaces_=function(){return[xs.GeometryEditorOperation]};om.prototype.getClass=function(){return om};var sm=function(){};sm.prototype.edit=function(t,e){return t instanceof Ha?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Nr?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof No?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t};sm.prototype.interfaces_=function(){return[xs.GeometryEditorOperation]};sm.prototype.getClass=function(){return sm};var jr=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n0){var e=new Pa(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n3&&(r=3),r<2?new jr(n):new jr(n,r)}};Za.prototype.interfaces_=function(){return[Nf,Es]};Za.prototype.getClass=function(){return Za};Za.instance=function(){return Za.instanceObject};J1.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00};J1.instanceObject.get=function(){return new Za};Object.defineProperties(Za,J1);var VC=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,r){return this.map_.set(n,r),r},e.prototype.values=function(){for(var n=new yt,r=this.map_.values(),i=r.next();!i.done;)n.add(i.value),i=r.next();return n},e.prototype.entrySet=function(){var n=new Y1;return this.map_.entries().forEach(function(r){return n.add(r)}),n},e.prototype.size=function(){return this.map_.size()},e}(ph),Bn=function t(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=t.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof ba){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},$1={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Bn.prototype.equals=function(t){if(!(t instanceof Bn))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale};Bn.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new _a(n).compareTo(new _a(r))};Bn.prototype.getScale=function(){return this._scale};Bn.prototype.isFloating=function(){return this._modelType===Bn.FLOATING||this._modelType===Bn.FLOATING_SINGLE};Bn.prototype.getType=function(){return this._modelType};Bn.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Bn.FLOATING?t="Floating":this._modelType===Bn.FLOATING_SINGLE?t="Floating-Single":this._modelType===Bn.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t};Bn.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(nn.isNaN(t))return t;if(this._modelType===Bn.FLOATING_SINGLE){var e=t;return e}return this._modelType===Bn.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof ze){var n=arguments[0];if(this._modelType===Bn.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}};Bn.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Bn.FLOATING?t=16:this._modelType===Bn.FLOATING_SINGLE?t=6:this._modelType===Bn.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t};Bn.prototype.setScale=function(t){this._scale=Math.abs(t)};Bn.prototype.interfaces_=function(){return[Es,Ss]};Bn.prototype.getClass=function(){return Bn};Bn.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e};$1.serialVersionUID.get=function(){return 7777263578777804e3};$1.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(Bn,$1);var ba=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},Q1={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ba.prototype.readResolve=function(){return ba.nameToTypeMap.get(this._name)};ba.prototype.toString=function(){return this._name};ba.prototype.interfaces_=function(){return[Es]};ba.prototype.getClass=function(){return ba};Q1.serialVersionUID.get=function(){return-552860263173159e4};Q1.nameToTypeMap.get=function(){return new VC};Object.defineProperties(ba,Q1);Bn.Type=ba;Bn.FIXED=new ba("FIXED");Bn.FLOATING=new ba("FLOATING");Bn.FLOATING_SINGLE=new ba("FLOATING SINGLE");var Sn=function t(){this._precisionModel=new Bn,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Jt(arguments[0],Nf)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Bn&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},UC={serialVersionUID:{configurable:!0}};Sn.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new ze(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new ze(t.getMinX(),t.getMinY()),new ze(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new ze(t.getMinX(),t.getMinY()),new ze(t.getMinX(),t.getMaxY()),new ze(t.getMaxX(),t.getMaxY()),new ze(t.getMaxX(),t.getMinY()),new ze(t.getMinX(),t.getMinY())]),null)};Sn.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Nr(this.getCoordinateSequenceFactory().create(t),this);if(Jt(t,Dn))return new Nr(t,this)}else return new Nr(this.getCoordinateSequenceFactory().create([]),this)};Sn.prototype.createMultiLineString=function(){if(arguments.length===0)return new $u(null,this);if(arguments.length===1){var t=arguments[0];return new $u(t,this)}};Sn.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var a=i.next(),c=a.getClass();e===null&&(e=c),c!==e&&(n=!0),a.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(Sn.toGeometryArray(t));var l=t.iterator().next(),d=t.size()>1;if(d){if(l instanceof ai)return this.createMultiPolygon(Sn.toPolygonArray(t));if(l instanceof Nr)return this.createMultiLineString(Sn.toLineStringArray(t));if(l instanceof No)return this.createMultiPoint(Sn.toPointArray(t));hn.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l};Sn.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)};Sn.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(Jt(arguments[0],Dn)){var e=arguments[0];return new No(e,this)}}};Sn.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};Sn.prototype.createPolygon=function(){if(arguments.length===0)return new ai(null,null,this);if(arguments.length===1){if(Jt(arguments[0],Dn)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Ha){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return new ai(r,i,this)}};Sn.prototype.getSRID=function(){return this._SRID};Sn.prototype.createGeometryCollection=function(){if(arguments.length===0)return new io(null,this);if(arguments.length===1){var t=arguments[0];return new io(t,this)}};Sn.prototype.createGeometry=function(t){var e=new xs(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})};Sn.prototype.getPrecisionModel=function(){return this._precisionModel};Sn.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(Jt(arguments[0],Dn)){var e=arguments[0];return new Ha(e,this)}}};Sn.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Ga(null,this);if(arguments.length===1){var t=arguments[0];return new Ga(t,this)}};Sn.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Uf(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Uf(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(Jt(arguments[0],Dn)){var r=arguments[0];if(r===null)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),a=0;a=this.size())throw new Error;return this.array_[t]};Ma.prototype.push=function(t){return this.array_.push(t),t};Ma.prototype.pop=function(t){if(this.array_.length===0)throw new by;return this.array_.pop()};Ma.prototype.peek=function(){if(this.array_.length===0)throw new by;return this.array_[this.array_.length-1]};Ma.prototype.empty=function(){return this.array_.length===0};Ma.prototype.isEmpty=function(){return this.empty()};Ma.prototype.search=function(t){return this.array_.indexOf(t)};Ma.prototype.size=function(){return this.array_.length};Ma.prototype.toArray=function(){for(var t=this,e=[],n=0,r=this.array_.length;n0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===Et.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)};xa.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),r=n.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var i=st.LEFT;return r[e].ye._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])};xa.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};xa.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();r.isForward()&&e.checkForRightmostCoordinate(r)}hn.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var i=this.getRightmostSide(this._minDe,this._minIndex);i===st.LEFT&&(this._orientedDe=this._minDe.getSym())};xa.prototype.interfaces_=function(){return[]};xa.prototype.getClass=function(){return xa};var Pl=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new ze(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,r){return r?n:n+" [ "+r+" ]"},e}(Tl),xy=function(){this.array_=[]};xy.prototype.addLast=function(t){this.array_.push(t)};xy.prototype.removeFirst=function(){return this.array_.shift()};xy.prototype.isEmpty=function(){return this.array_.length===0};var oo=function(){this._finder=null,this._dirEdgeList=new yt,this._nodes=new yt,this._rightMostCoord=null,this._env=null,this._finder=new xa};oo.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}};oo.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};oo.prototype.computeNodeDepth=function(t){for(var e=this,n=null,r=t.getEdges().iterator();r.hasNext();){var i=r.next();if(i.isVisited()||i.getSym().isVisited()){n=i;break}}if(n===null)throw new Pl("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var a=t.getEdges().iterator();a.hasNext();){var c=a.next();c.setVisited(!0),e.copySymDepths(c)}};oo.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(st.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)};oo.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};oo.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(st.RIGHT)>=1&&e.getDepth(st.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}};oo.prototype.computeDepths=function(t){var e=this,n=new Y1,r=new xy,i=t.getNode();for(r.addLast(i),n.add(i),t.setVisited(!0);!r.isEmpty();){var a=r.removeFirst();n.add(a),e.computeNodeDepth(a);for(var c=a.getEdges().iterator();c.hasNext();){var l=c.next(),d=l.getSym();if(!d.isVisited()){var v=d.getNode();n.contains(v)||(r.addLast(v),n.add(v))}}}};oo.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0};oo.prototype.getEnvelope=function(){if(this._env===null){for(var t=new Ft,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge().getCoordinates(),i=0;ithis.location.length){var n=new Array(3).fill(null);n[st.ON]=this.location[st.ON],n[st.LEFT]=Fe.NONE,n[st.RIGHT]=Fe.NONE,this.location=n}for(var r=0;r1&&t.append(Fe.toLocationSymbol(this.location[st.LEFT])),t.append(Fe.toLocationSymbol(this.location[st.ON])),this.location.length>1&&t.append(Fe.toLocationSymbol(this.location[st.RIGHT])),t.toString()};rr.prototype.setLocations=function(t,e,n){this.location[st.ON]=t,this.location[st.LEFT]=e,this.location[st.RIGHT]=n};rr.prototype.get=function(t){return t1};rr.prototype.isAnyNull=function(){for(var t=this,e=0;et._maxNodeDegree&&(t._maxNodeDegree=r),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2};Kr.prototype.addPoints=function(t,e,n){var r=this,i=t.getCoordinates();if(e){var a=1;n&&(a=0);for(var c=a;c=0;d--)r._pts.add(i[d])}};Kr.prototype.isHole=function(){return this._isHole};Kr.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)};Kr.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!Et.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();){var i=r.next();if(i.containsPoint(t))return!1}return!0};Kr.prototype.addHole=function(t){this._holes.add(t)};Kr.prototype.isShell=function(){return this._shell===null};Kr.prototype.getLabel=function(){return this._label};Kr.prototype.getEdges=function(){return this._edges};Kr.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};Kr.prototype.getShell=function(){return this._shell};Kr.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=e.getLocation(n,st.RIGHT);if(r===Fe.NONE)return null;if(this._label.getLocation(n)===Fe.NONE)return this._label.setLocation(n,r),null}};Kr.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)};Kr.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),r=0;r=2,"found partial label"),this.computeIM(t)};is.prototype.isInResult=function(){return this._isInResult};is.prototype.isVisited=function(){return this._isVisited};is.prototype.interfaces_=function(){return[]};is.prototype.getClass=function(){return is};var wy=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var n=arguments[0],r=arguments[1];this._coord=n,this._edges=r,this._label=new Hn(0,Fe.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var r=n.next();if(r.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,r){var i=Fe.NONE;if(i=this._label.getLocation(r),!n.isNull(r)){var a=n.getLocation(r);i!==Fe.BOUNDARY&&(i=a)}return i},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1];this._label===null?this._label=new Hn(n,r):this._label.setLocation(n,r)}else return t.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof Hn)for(var i=arguments[0],a=0;a<2;a++){var c=n.computeMergedLocation(i,a),l=n._label.getLocation(a);l===Fe.NONE&&n._label.setLocation(a,c)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var r=Fe.NONE;this._label!==null&&(r=this._label.getLocation(n));var i=null;switch(r){case Fe.BOUNDARY:i=Fe.INTERIOR;break;case Fe.INTERIOR:i=Fe.BOUNDARY;break;default:i=Fe.BOUNDARY;break}this._label.setLocation(n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(is),wa=function(){this.nodeMap=new Gi,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};wa.prototype.find=function(t){return this.nodeMap.get(t)};wa.prototype.addNode=function(){if(arguments[0]instanceof ze){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof wy){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return r===null?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}};wa.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};wa.prototype.iterator=function(){return this.nodeMap.values().iterator()};wa.prototype.values=function(){return this.nodeMap.values()};wa.prototype.getBoundaryNodes=function(t){for(var e=new yt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===Fe.BOUNDARY&&e.add(r)}return e};wa.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)};wa.prototype.interfaces_=function(){return[]};wa.prototype.getClass=function(){return wa};var Xn=function(){},Im={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Xn.prototype.interfaces_=function(){return[]};Xn.prototype.getClass=function(){return Xn};Xn.isNorthern=function(t){return t===Xn.NE||t===Xn.NW};Xn.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2};Xn.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var r=te?t:e;return r===0&&i===3?3:r};Xn.isInHalfPlane=function(t,e){return e===Xn.SE?t===Xn.SE||t===Xn.SW:t===e||t===e+1};Xn.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new yr("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Xn.NE:Xn.SE:e>=0?Xn.NW:Xn.SW}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new yr("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Xn.NE:Xn.SE:r.y>=n.y?Xn.NW:Xn.SW}};Im.NE.get=function(){return 0};Im.NW.get=function(){return 1};Im.SW.get=function(){return 2};Im.SE.get=function(){return 3};Object.defineProperties(Xn,Im);var qi=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(arguments.length===4){var a=arguments[0],c=arguments[1],l=arguments[2],d=arguments[3];this._edge=a,this.init(c,l),this._label=d}};qi.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){c.linkDirectedEdgesForMinimalEdgeRings();var l=c.buildMinimalRings(),d=r.findShell(l);d!==null?(r.placePolygonHoles(d,l),e.add(d)):n.addAll(l)}else i.add(c)}return i};Oo.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1};Oo.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new yt,r=t.iterator();r.hasNext();){var i=r.next();if(i.isInResult()&&i.getLabel().isArea()&&i.getEdgeRing()===null){var a=new ZO(i,e._geometryFactory);n.add(a),a.setInResult()}}return n};Oo.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}};Oo.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t};Oo.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),a=null,c=null,l=e.iterator();l.hasNext();){var d=l.next(),v=d.getLinearRing(),S=v.getEnvelopeInternal();a!==null&&(c=a.getLinearRing().getEnvelopeInternal());var E=!1;S.contains(r)&&Et.isPointInRing(i,v.getCoordinates())&&(E=!0),E&&(a===null||c.contains(S))&&(a=d)}return a};Oo.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return hn.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n};Oo.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Lr.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new yt,a=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(a,this._shellList,i),this.placeFreeHoles(this._shellList,i)}};Oo.prototype.interfaces_=function(){return[]};Oo.prototype.getClass=function(){return Oo};var Gf=function(){};Gf.prototype.getBounds=function(){};Gf.prototype.interfaces_=function(){return[]};Gf.prototype.getClass=function(){return Gf};var Gs=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Gs.prototype.getItem=function(){return this._item};Gs.prototype.getBounds=function(){return this._bounds};Gs.prototype.interfaces_=function(){return[Gf,Es]};Gs.prototype.getClass=function(){return Gs};var Ml=function(){this._size=null,this._items=null,this._size=0,this._items=new yt,this._items.add(null)};Ml.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t};Ml.prototype.size=function(){return this._size};Ml.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)};Ml.prototype.clear=function(){this._size=0,this._items.clear()};Ml.prototype.isEmpty=function(){return this._size===0};Ml.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)};Ml.prototype.interfaces_=function(){return[]};Ml.prototype.getClass=function(){return Ml};var hu=function(){};hu.prototype.visitItem=function(t){};hu.prototype.interfaces_=function(){return[]};hu.prototype.getClass=function(){return hu};var Yc=function(){};Yc.prototype.insert=function(t,e){};Yc.prototype.remove=function(t,e){};Yc.prototype.query=function(){};Yc.prototype.interfaces_=function(){return[]};Yc.prototype.getClass=function(){return Yc};var oi=function(){if(this._childBoundables=new yt,this._bounds=null,this._level=null,arguments.length!==0&&arguments.length===1){var t=arguments[0];this._level=t}},GC={serialVersionUID:{configurable:!0}};oi.prototype.getLevel=function(){return this._level};oi.prototype.size=function(){return this._childBoundables.size()};oi.prototype.getChildBoundables=function(){return this._childBoundables};oi.prototype.addChildBoundable=function(t){hn.isTrue(this._bounds===null),this._childBoundables.add(t)};oi.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};oi.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};oi.prototype.interfaces_=function(){return[Gf,Es]};oi.prototype.getClass=function(){return oi};GC.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(oi,GC);var qs=function(){};qs.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}};qs.min=function(t){return qs.sort(t),t.get(0)};qs.sort=function(t,e){var n=t.toArray();e?Xu.sort(n,e):Xu.sort(n);for(var r=t.iterator(),i=0,a=n.length;iXr.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new yr("neither boundable is composite")};Xr.prototype.isLeaves=function(){return!(Xr.isComposite(this._boundable1)||Xr.isComposite(this._boundable2))};Xr.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0};Xr.prototype.expand=function(t,e,n,r){for(var i=this,a=t.getChildBoundables(),c=a.iterator();c.hasNext();){var l=c.next(),d=new Xr(l,e,i._itemDistance);d.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},Sy={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ii.prototype.getNodeCapacity=function(){return this._nodeCapacity};Ii.prototype.lastNode=function(t){return t.get(t.size()-1)};Ii.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof oi?n+=t.size(i):i instanceof Gs&&(n+=1)}return n}};Ii.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Gs&&i.getItem()===e&&(n=i)}return n!==null?(t.getChildBoundables().remove(n),!0):!1};Ii.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new yt:e}else if(arguments.length===1){for(var n=arguments[0],r=new yt,i=n.getChildBoundables().iterator();i.hasNext();){var a=i.next();if(a instanceof oi){var c=t.itemsTree(a);c!==null&&r.add(c)}else a instanceof Gs?r.add(a.getItem()):hn.shouldNeverReachHere()}return r.size()<=0?null:r}};Ii.prototype.insert=function(t,e){hn.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Gs(t,e))};Ii.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new yt;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];if(hn.isTrue(r>-2),i.getLevel()===r)return a.add(i),null;for(var c=i.getChildBoundables().iterator();c.hasNext();){var l=c.next();l instanceof oi?t.boundablesAtLevel(r,l,a):(hn.isTrue(l instanceof Gs),r===-1&&a.add(l))}return null}};Ii.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new yt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(arguments.length===3){if(Jt(arguments[2],hu)&&arguments[0]instanceof Object&&arguments[1]instanceof oi)for(var a=arguments[0],c=arguments[1],l=arguments[2],d=c.getChildBoundables(),v=0;vn&&(n=a)}}return n+1}};Ii.prototype.createParentBoundables=function(t,e){var n=this;hn.isTrue(!t.isEmpty());var r=new yt;r.add(this.createNode(e));var i=new yt(t);qs.sort(i,this.getComparator());for(var a=i.iterator();a.hasNext();){var c=a.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(c)}return r};Ii.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};Ii.prototype.interfaces_=function(){return[Es]};Ii.prototype.getClass=function(){return Ii};Ii.compareDoubles=function(t,e){return t>e?1:t0);for(var c=new yt,l=0;l0;){var k=M.poll(),R=k.getDistance();if(R>=E)break;k.isLeaves()?(E=R,T=k):k.expandToQueue(M,E)}return[T.getBoundable(0).getItem(),T.getBoundable(1).getItem()]}}else if(arguments.length===3){var z=arguments[0],U=arguments[1],F=arguments[2],G=new Gs(z,U),H=new Xr(this.getRoot(),G,F);return this.nearestNeighbour(H)[0]}},e.prototype.interfaces_=function(){return[Yc,Es]},e.prototype.getClass=function(){return e},e.centreX=function(r){return e.avg(r.getMinX(),r.getMaxX())},e.avg=function(r,i){return(r+i)/2},e.centreY=function(r){return e.avg(r.getMinY(),r.getMaxY())},n.STRtreeNode.get=function(){return lS},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[Rf]},compare:function(r,i){return t.compareDoubles(e.centreX(r.getBounds()),e.centreX(i.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Rf]},compare:function(r,i){return t.compareDoubles(e.centreY(r.getBounds()),e.centreY(i.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(Ii),lS=function(t){function e(){var n=arguments[0];t.call(this,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,r=this.getChildBoundables().iterator();r.hasNext();){var i=r.next();n===null?n=new Ft(i.getBounds()):n.expandToInclude(i.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(oi),_o=function(){};_o.prototype.interfaces_=function(){return[]};_o.prototype.getClass=function(){return _o};_o.relativeSign=function(t,e){return te?1:0};_o.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=_o.relativeSign(e.x,n.x),i=_o.relativeSign(e.y,n.y);switch(t){case 0:return _o.compareValue(r,i);case 1:return _o.compareValue(i,r);case 2:return _o.compareValue(i,-r);case 3:return _o.compareValue(-r,i);case 4:return _o.compareValue(-r,-i);case 5:return _o.compareValue(-i,-r);case 6:return _o.compareValue(-i,r);case 7:return _o.compareValue(r,-i)}return hn.shouldNeverReachHere("invalid octant value"),0};_o.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var fu=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new ze(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};fu.prototype.getCoordinate=function(){return this.coord};fu.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)};fu.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:_o.compare(this._segmentOctant,this.coord,e.coord)};fu.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t};fu.prototype.isInterior=function(){return this._isInterior};fu.prototype.interfaces_=function(){return[Ss]};fu.prototype.getClass=function(){return fu};var so=function(){this._nodeMap=new Gi,this._edge=null;var t=arguments[0];this._edge=t};so.prototype.getSplitCoordinates=function(){var t=this,e=new Sm;this.addEndpoints();for(var n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();t.addEdgeCoordinates(r,i,e),r=i}return e.toCoordinateArray()};so.prototype.addCollapsedNodes=function(){var t=this,e=new yt;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var r=n.next().intValue();t.add(t._edge.getCoordinate(r),r)}};so.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};so.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var i=arguments[0],a=arguments[1],c=a.x-i.x,l=a.y-i.y;if(c===0&&l===0)throw new yr("Cannot compute the octant for two identical points "+i);return Kc.octant(c,l)}};var Xa=function(){};Xa.prototype.getCoordinates=function(){};Xa.prototype.size=function(){};Xa.prototype.getCoordinate=function(t){};Xa.prototype.isClosed=function(){};Xa.prototype.setData=function(t){};Xa.prototype.getData=function(){};Xa.prototype.interfaces_=function(){return[]};Xa.prototype.getClass=function(){return Xa};var am=function(){};am.prototype.addIntersection=function(t,e){};am.prototype.interfaces_=function(){return[Xa]};am.prototype.getClass=function(){return am};var Wr=function(){this._nodeList=new so(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Wr.prototype.getCoordinates=function(){return this._pts};Wr.prototype.size=function(){return this._pts.length};Wr.prototype.getCoordinate=function(t){return this._pts[t]};Wr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Wr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))};Wr.prototype.setData=function(t){this._data=t};Wr.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Kc.octant(t,e)};Wr.prototype.getData=function(){return this._data};Wr.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[3],a=new ze(n.getIntersection(i));this.addIntersection(a,r)}};Wr.prototype.toString=function(){return Us.toLineString(new jr(this._pts))};Wr.prototype.getNodeList=function(){return this._nodeList};Wr.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof ze){var r=arguments[0];return Et.orientationIndex(this.p0,this.p1,r)}};Bt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])};Bt.prototype.isVertical=function(){return this.p0.x===this.p1.x};Bt.prototype.equals=function(t){if(!(t instanceof Bt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)};Bt.prototype.intersection=function(t){var e=new uc;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null};Bt.prototype.project=function(){if(arguments[0]instanceof ze){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new ze(t);var e=this.projectionFactor(t),n=new ze;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof Bt){var r=arguments[0],i=this.projectionFactor(r.p0),a=this.projectionFactor(r.p1);if(i>=1&&a>=1||i<=0&&a<=0)return null;var c=this.project(r.p0);i<0&&(c=this.p0),i>1&&(c=this.p1);var l=this.project(r.p1);return a<0&&(l=this.p0),a>1&&(l=this.p1),new Bt(c,l)}};Bt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};Bt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};Bt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1};Bt.prototype.distancePerpendicular=function(t){return Et.distancePointLinePerpendicular(t,this.p0,this.p1)};Bt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};Bt.prototype.midPoint=function(){return Bt.midPoint(this.p0,this.p1)};Bt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;if(r<=0)return nn.NaN;var i=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r;return i};Bt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),r=nn.MAX_VALUE,i=null,a=this.closestPoint(t.p0);r=a.distance(t.p0),n[0]=a,n[1]=t.p0;var c=this.closestPoint(t.p1);i=c.distance(t.p1),i0&&e<1)return this.project(t);var n=this.p0.distance(t),r=this.p1.distance(t);return n1||nn.isNaN(e))&&(e=1),e};Bt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};Bt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};Bt.prototype.distance=function(){if(arguments[0]instanceof Bt){var t=arguments[0];return Et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof ze){var e=arguments[0];return Et.distancePointLine(e,this.p0,this.p1)}};Bt.prototype.pointAlong=function(t){var e=new ze;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e};Bt.prototype.hashCode=function(){var t=nn.doubleToLongBits(this.p0.x);t^=nn.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=nn.doubleToLongBits(this.p1.x);n^=nn.doubleToLongBits(this.p1.y)*31;var r=Math.trunc(n)^Math.trunc(n>>32);return e^r};Bt.prototype.interfaces_=function(){return[Ss,Es]};Bt.prototype.getClass=function(){return Bt};Bt.midPoint=function(t,e){return new ze((t.x+e.x)/2,(t.y+e.y)/2)};WC.serialVersionUID.get=function(){return 0x2d2172135f411c00};Object.defineProperties(Bt,WC);var lm=function(){this.tempEnv1=new Ft,this.tempEnv2=new Ft,this._overlapSeg1=new Bt,this._overlapSeg2=new Bt};lm.prototype.overlap=function(){if(arguments.length!==2&&arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}};lm.prototype.interfaces_=function(){return[]};lm.prototype.getClass=function(){return lm};var zo=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};zo.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]};zo.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],a=this._pts[n];if(r.tempEnv1.init(i,a),n-e===1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var c=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Xn.quadrant(t[n],t[n+1]),i=e+1;ic.getId()&&(c.computeOverlaps(v,i),r._nOverlaps++),r._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return uS},Object.defineProperties(e,n),e}(um),uS=function(t){function e(){t.call(this),this._si=null;var n=arguments[0];this._si=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[2],a=arguments[3],c=n.getContext(),l=i.getContext();this._si.processIntersections(c,r,l,a)}else return t.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(lm),Fn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],a=arguments[1],c=arguments[2],l=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(a),this.setJoinStyle(c),this.setMitreLimit(l)}}},Ol={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Fn.prototype.getEndCapStyle=function(){return this._endCapStyle};Fn.prototype.isSingleSided=function(){return this._isSingleSided};Fn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=Fn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Fn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Fn.JOIN_ROUND&&(this._quadrantSegments=Fn.DEFAULT_QUADRANT_SEGMENTS)};Fn.prototype.getJoinStyle=function(){return this._joinStyle};Fn.prototype.setJoinStyle=function(t){this._joinStyle=t};Fn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t};Fn.prototype.getSimplifyFactor=function(){return this._simplifyFactor};Fn.prototype.getQuadrantSegments=function(){return this._quadrantSegments};Fn.prototype.setEndCapStyle=function(t){this._endCapStyle=t};Fn.prototype.getMitreLimit=function(){return this._mitreLimit};Fn.prototype.setMitreLimit=function(t){this._mitreLimit=t};Fn.prototype.setSingleSided=function(t){this._isSingleSided=t};Fn.prototype.interfaces_=function(){return[]};Fn.prototype.getClass=function(){return Fn};Fn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)};Ol.CAP_ROUND.get=function(){return 1};Ol.CAP_FLAT.get=function(){return 2};Ol.CAP_SQUARE.get=function(){return 3};Ol.JOIN_ROUND.get=function(){return 1};Ol.JOIN_MITRE.get=function(){return 2};Ol.JOIN_BEVEL.get=function(){return 3};Ol.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};Ol.DEFAULT_MITRE_LIMIT.get=function(){return 5};Ol.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(Fn,Ol);var Or=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Et.COUNTERCLOCKWISE,this._inputLine=t||null},Cm={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Or.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],a=this._inputLine[e],c=this._inputLine[n];return!this.isConcave(i,a,c)||!this.isShallow(i,a,c,r)?!1:this.isShallowSampled(i,a,t,n,r)};Or.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r=0;i--)n.addPt(t[i])};os.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return nMath.PI;)t-=Tn.PI_TIMES_2;for(;t<=-Math.PI;)t+=Tn.PI_TIMES_2;return t};Tn.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}};Tn.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,a=n.x-e.x,c=n.y-e.y,l=r*a+i*c;return l>0};Tn.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,a=n.x-e.x,c=n.y-e.y,l=r*a+i*c;return l<0};Tn.interiorAngle=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n);return Math.abs(i-r)};Tn.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Tn.PI_TIMES_2;t>=Tn.PI_TIMES_2&&(t=0)}else{for(;t>=Tn.PI_TIMES_2;)t-=Tn.PI_TIMES_2;t<0&&(t=0)}return t};Tn.angleBetween=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n);return Tn.diff(r,i)};Tn.diff=function(t,e){var n=null;return tMath.PI&&(n=2*Math.PI-n),n};Tn.toRadians=function(t){return t*Math.PI/180};Tn.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Tn.COUNTERCLOCKWISE:n<0?Tn.CLOCKWISE:Tn.NONE};Tn.angleBetweenOriented=function(t,e,n){var r=Tn.angle(e,t),i=Tn.angle(e,n),a=i-r;return a<=-Math.PI?a+Tn.PI_TIMES_2:a>Math.PI?a-Tn.PI_TIMES_2:a};dh.PI_TIMES_2.get=function(){return 2*Math.PI};dh.PI_OVER_2.get=function(){return Math.PI/2};dh.PI_OVER_4.get=function(){return Math.PI/4};dh.COUNTERCLOCKWISE.get=function(){return Et.COUNTERCLOCKWISE};dh.CLOCKWISE.get=function(){return Et.CLOCKWISE};dh.NONE.get=function(){return Et.COLLINEAR};Object.defineProperties(Tn,dh);var hr=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Bt,this._seg1=new Bt,this._offset0=new Bt,this._offset1=new Bt,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new uc,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Fn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Tm={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};hr.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Et.computeOrientation(this._s0,this._s1,this._s2),r=n===Et.CLOCKWISE&&this._side===st.LEFT||n===Et.COUNTERCLOCKWISE&&this._side===st.RIGHT;n===0?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)};hr.prototype.addLineEndCap=function(t,e){var n=new Bt(t,e),r=new Bt;this.computeOffsetSegment(n,st.LEFT,this._distance,r);var i=new Bt;this.computeOffsetSegment(n,st.RIGHT,this._distance,i);var a=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,a);switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,Et.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Fn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Fn.CAP_SQUARE:var d=new ze;d.x=Math.abs(this._distance)*Math.cos(l),d.y=Math.abs(this._distance)*Math.sin(l);var v=new ze(r.p1.x+d.x,r.p1.y+d.y),S=new ze(i.p1.x+d.x,i.p1.y+d.y);this._segList.addPt(v),this._segList.addPt(S);break}};hr.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t};hr.prototype.addMitreJoin=function(t,e,n,r){var i=!0,a=null;try{a=Bs.intersection(e.p0,e.p1,n.p0,n.p1);var c=r<=0?1:a.distance(t)/Math.abs(r);c>this._bufParams.getMitreLimit()&&(i=!1)}catch(l){if(l instanceof hp)a=new ze(0,0),i=!1;else throw l}finally{}i?this._segList.addPt(a):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())};hr.prototype.addFilletCorner=function(t,e,n,r,i){var a=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,a),d=n.x-t.x,v=n.y-t.y,S=Math.atan2(v,d);r===Et.CLOCKWISE?l<=S&&(l+=2*Math.PI):l>=S&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,S,r,i),this._segList.addPt(n)};hr.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new ze((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new ze((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};hr.prototype.createCircle=function(t){var e=new ze(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};hr.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)};hr.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new os,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*hr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};hr.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===Fn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Fn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Et.CLOCKWISE,this._distance))};hr.prototype.closeRing=function(){this._segList.closeRing()};hr.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};hr.prototype.interfaces_=function(){return[]};hr.prototype.getClass=function(){return hr};Tm.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};Tm.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};Tm.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};Tm.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(hr,Tm);var vo=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};vo.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var a=i.getCoordinates();return n&&En.reverse(a),a};vo.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Or.simplify(t,-r),a=i.length-1;n.initSideSegments(i[a],i[a-1],st.LEFT),n.addFirstSegment();for(var c=a-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{n.addSegments(t,!1);var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],st.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment(),n.closeRing()};vo.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===st.RIGHT&&(r=-r);var i=Or.simplify(t,r),a=i.length-1;n.initSideSegments(i[a-1],i[0],e);for(var c=1;c<=a;c++){var l=c!==1;n.addNextSegment(i[c],l)}n.closeRing()};vo.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Or.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],st.LEFT);for(var a=2;a<=i;a++)e.addNextSegment(r[a],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var c=Or.simplify(t,-n),l=c.length-1;e.initSideSegments(c[l],c[l-1],st.LEFT);for(var d=l-2;d>=0;d--)e.addNextSegment(c[d],!0);e.addLastSegment(),e.addLineEndCap(c[1],c[0]),e.closeRing()};vo.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:e.createCircle(t);break;case Fn.CAP_SQUARE:e.createSquare(t);break}};vo.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);var a=r.getCoordinates();return a};vo.prototype.getBufferParameters=function(){return this._bufParams};vo.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()};vo.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return vo.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()};vo.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Or.simplify(t,-r),a=i.length-1;n.initSideSegments(i[a],i[a-1],st.LEFT),n.addFirstSegment();for(var c=a-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],st.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment()};vo.prototype.getSegGen=function(t){return new hr(this._precisionModel,this._bufParams,t)};vo.prototype.interfaces_=function(){return[]};vo.prototype.getClass=function(){return vo};vo.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;na.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(Jt(arguments[2],Vs)&&arguments[0]instanceof ze&&arguments[1]instanceof $v)for(var c=arguments[0],l=arguments[1],d=arguments[2],v=l.getEdge().getCoordinates(),S=0;St._seg.p1.y&&t._seg.reverse();var E=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(Et._seg.p1.y)&&Et.computeOrientation(t._seg.p0,t._seg.p1,c)!==Et.RIGHT){var T=l.getDepth(st.LEFT);t._seg.p0.equals(v[S])||(T=l.getDepth(st.RIGHT));var M=new ec(t._seg,T);d.add(M)}}else if(Jt(arguments[2],Vs)&&arguments[0]instanceof ze&&Jt(arguments[1],Vs))for(var k=arguments[0],R=arguments[1],z=arguments[2],U=R.iterator();U.hasNext();){var F=U.next();F.isForward()&&t.findStabbedSegments(k,F,z)}}};Jc.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=qs.min(e);return n._leftDepth};Jc.prototype.interfaces_=function(){return[]};Jc.prototype.getClass=function(){return Jc};ZC.DepthSegment.get=function(){return ec};Object.defineProperties(Jc,ZC);var ec=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Bt(t),this._leftDepth=e};ec.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)};ec.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)};ec.prototype.toString=function(){return this._upwardSeg.toString()};ec.prototype.interfaces_=function(){return[Ss]};ec.prototype.getClass=function(){return ec};var Vn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Vn.prototype.area=function(){return Vn.area(this.p0,this.p1,this.p2)};Vn.prototype.signedArea=function(){return Vn.signedArea(this.p0,this.p1,this.p2)};Vn.prototype.interpolateZ=function(t){if(t===null)throw new yr("Supplied point is null.");return Vn.interpolateZ(t,this.p0,this.p1,this.p2)};Vn.prototype.longestSideLength=function(){return Vn.longestSideLength(this.p0,this.p1,this.p2)};Vn.prototype.isAcute=function(){return Vn.isAcute(this.p0,this.p1,this.p2)};Vn.prototype.circumcentre=function(){return Vn.circumcentre(this.p0,this.p1,this.p2)};Vn.prototype.area3D=function(){return Vn.area3D(this.p0,this.p1,this.p2)};Vn.prototype.centroid=function(){return Vn.centroid(this.p0,this.p1,this.p2)};Vn.prototype.inCentre=function(){return Vn.inCentre(this.p0,this.p1,this.p2)};Vn.prototype.interfaces_=function(){return[]};Vn.prototype.getClass=function(){return Vn};Vn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)};Vn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2};Vn.det=function(t,e,n,r){return t*r-e*n};Vn.interpolateZ=function(t,e,n,r){var i=e.x,a=e.y,c=n.x-i,l=r.x-i,d=n.y-a,v=r.y-a,S=c*v-l*d,E=t.x-i,T=t.y-a,M=(v*E-l*T)/S,k=(-d*E+c*T)/S,R=e.z+M*(n.z-e.z)+k*(r.z-e.z);return R};Vn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),a=n.distance(t),c=r;return i>c&&(c=i),a>c&&(c=a),c};Vn.isAcute=function(t,e,n){return!(!Tn.isAcute(t,e,n)||!Tn.isAcute(e,n,t)||!Tn.isAcute(n,t,e))};Vn.circumcentre=function(t,e,n){var r=n.x,i=n.y,a=t.x-r,c=t.y-i,l=e.x-r,d=e.y-i,v=2*Vn.det(a,c,l,d),S=Vn.det(c,a*a+c*c,d,l*l+d*d),E=Vn.det(a,a*a+c*c,l,l*l+d*d),T=r-S/v,M=i+E/v;return new ze(T,M)};Vn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Bs(t.x+n/2,t.y+r/2,1),a=new Bs(t.x-r+n/2,t.y+n+r/2,1);return new Bs(i,a)};Vn.angleBisector=function(t,e,n){var r=e.distance(t),i=e.distance(n),a=r/(r+i),c=n.x-t.x,l=n.y-t.y,d=new ze(t.x+a*c,t.y+a*l);return d};Vn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,a=e.z-t.z,c=n.x-t.x,l=n.y-t.y,d=n.z-t.z,v=i*d-a*l,S=a*c-r*d,E=r*l-i*c,T=v*v+S*S+E*E,M=Math.sqrt(T)/2;return M};Vn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new ze(r,i)};Vn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),a=t.distance(e),c=r+i+a,l=(r*t.x+i*e.x+a*n.x)/c,d=(r*t.y+i*e.y+a*n.y)/c;return new ze(l,d)};var ws=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new yt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};ws.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,Fe.EXTERIOR,Fe.INTERIOR)};ws.prototype.addPolygon=function(t){var e=this,n=this._distance,r=st.LEFT;this._distance<0&&(n=-this._distance,r=st.RIGHT);var i=t.getExteriorRing(),a=En.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance)||this._distance<=0&&a.length<3)return null;this.addPolygonRing(a,n,r,Fe.EXTERIOR,Fe.INTERIOR);for(var c=0;c0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(d,n,st.opposite(r),Fe.INTERIOR,Fe.EXTERIOR)}};ws.prototype.isTriangleErodedCompletely=function(t,e){var n=new Vn(t[0],t[1],t[2]),r=n.inCentre(),i=Et.distancePointLine(r,n.p0,n.p1);return i=Ha.MINIMUM_VALID_SIZE&&Et.isCCW(t)&&(a=i,c=r,n=st.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,a,c)};ws.prototype.add=function(t){if(t.isEmpty())return null;t instanceof ai?this.addPolygon(t):t instanceof Nr?this.addLineString(t):t instanceof No?this.addPoint(t):t instanceof Uf?this.addCollection(t):t instanceof $u?this.addCollection(t):t instanceof Ga?this.addCollection(t):t instanceof io&&this.addCollection(t)};ws.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i};ws.prototype.addCollection=function(t){for(var e=this,n=0;n=this._max)throw new pp;var t=this._parent.getGeometryN(this._index++);return t instanceof io?(this._subcollectionIterator=new qa(t),this._subcollectionIterator.next()):t};qa.prototype.remove=function(){throw new Error(this.getClass().getName())};qa.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};qa.prototype.interfaces_=function(){return[fp]};qa.prototype.getClass=function(){return qa};qa.isAtomic=function(t){return!(t instanceof io)};var ts=function(){this._geom=null;var t=arguments[0];this._geom=t};ts.prototype.locate=function(t){return ts.locate(t,this._geom)};ts.prototype.interfaces_=function(){return[Wf]};ts.prototype.getClass=function(){return ts};ts.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?Et.isPointInRing(t,e.getCoordinates()):!1};ts.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!ts.isPointInRing(t,n))return!1;for(var r=0;r=0;a--){var c=n._edgeList.get(a),l=c.getSym();i===null&&(i=l),r!==null&&l.setNext(r),r=c}i.setNext(r)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var r=arguments[0],i=this.findIndex(r),a=r.getDepth(st.LEFT),c=r.getDepth(st.RIGHT),l=this.computeDepths(i+1,this._edgeList.size(),a),d=this.computeDepths(0,i,l);if(d!==c)throw new Pl("depth mismatch at "+r.getCoordinate())}else if(arguments.length===3){for(var v=arguments[0],S=arguments[1],E=arguments[2],T=E,M=v;M=0;l--){var d=r._resultAreaEdgeList.get(l),v=d.getSym();switch(i===null&&d.getEdgeRing()===n&&(i=d),c){case r._SCANNING_FOR_INCOMING:if(v.getEdgeRing()!==n)continue;a=v,c=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(d.getEdgeRing()!==n)continue;a.setNextMin(d),c=r._SCANNING_FOR_INCOMING;break}}c===this._LINKING_TO_OUTGOING&&(hn.isTrue(i!==null,"found null for first outgoing dirEdge"),hn.isTrue(i.getEdgeRing()===n,"unable to link last incoming dirEdge"),a.setNextMin(i))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,r=this.iterator();r.hasNext();){var i=r.next();i.isInResult()&&n++}return n}else if(arguments.length===1){for(var a=arguments[0],c=0,l=this.iterator();l.hasNext();){var d=l.next();d.getEdgeRing()===a&&c++}return c}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=Fe.NONE,r=this.iterator();r.hasNext();){var i=r.next(),a=i.getSym();if(!i.isLineEdge()){if(i.isInResult()){n=Fe.INTERIOR;break}if(a.isInResult()){n=Fe.EXTERIOR;break}}}if(n===Fe.NONE)return null;for(var c=n,l=this.iterator();l.hasNext();){var d=l.next(),v=d.getSym();d.isLineEdge()?d.getEdge().setCovered(c===Fe.INTERIOR):(d.isInResult()&&(c=Fe.EXTERIOR),v.isInResult()&&(c=Fe.INTERIOR))}},e.prototype.computeLabelling=function(n){var r=this;t.prototype.computeLabelling.call(this,n),this._label=new Hn(Fe.NONE);for(var i=this.iterator();i.hasNext();)for(var a=i.next(),c=a.getEdge(),l=c.getLabel(),d=0;d<2;d++){var v=l.getLocation(d);(v===Fe.INTERIOR||v===Fe.BOUNDARY)&&r._label.setLocation(d,Fe.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Wi),XC=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new wy(n,new YO)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(jf),pu=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};pu.prototype.compareTo=function(t){var e=t,n=pu.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n};pu.prototype.interfaces_=function(){return[Ss]};pu.prototype.getClass=function(){return pu};pu.orientation=function(t){return En.increasingDirection(t)===1};pu.compareOriented=function(t,e,n,r){for(var i=e?1:-1,a=r?1:-1,c=e?t.length:-1,l=r?n.length:-1,d=e?0:t.length-1,v=r?0:n.length-1;;){var S=t[d].compareTo(n[v]);if(S!==0)return S;d+=i,v+=a;var E=d===c,T=v===l;if(E&&!T)return-1;if(!E&&T)return 1;if(E&&T)return 0}};var Ws=function(){this._edges=new yt,this._ocaMap=new Gi};Ws.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n0&&t.print(","),t.print("(");for(var i=r.getCoordinates(),a=0;a0&&t.print(","),t.print(i[a].x+" "+i[a].y);t.println(")")}t.print(") ")};Ws.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())};Ws.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n0||!e.coord.equals2D(i);a||r--;var c=new Array(r).fill(null),l=0;c[l++]=new ze(t.coord);for(var d=t.segmentIndex+1;d<=e.segmentIndex;d++)c[l++]=n.edge.pts[d];return a&&(c[l]=e.coord),new F_(c,new Hn(this.edge._label))};Ya.prototype.add=function(t,e,n){var r=new Sa(t,e,n),i=this._nodeMap.get(r);return i!==null?i:(this._nodeMap.put(r,r),r)};Ya.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1};Ya.prototype.interfaces_=function(){return[]};Ya.prototype.getClass=function(){return Ya};var nc=function(){};nc.prototype.getChainStartIndices=function(t){var e=this,n=0,r=new yt;r.add(new _a(n));do{var i=e.findChainEnd(t,n);r.add(new _a(i)),n=i}while(nn?e:n};Al.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return en&&(i=1),t._depth[e][r]=i}}};ki.prototype.getDelta=function(t){return this._depth[t][st.RIGHT]-this._depth[t][st.LEFT]};ki.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?Fe.EXTERIOR:Fe.INTERIOR};ki.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};ki.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);(i===Fe.EXTERIOR||i===Fe.INTERIOR)&&(t.isNull(n,r)?t._depth[n][r]=ki.depthAtLocation(i):t._depth[n][r]+=ki.depthAtLocation(i))}else if(arguments.length===3){var a=arguments[0],c=arguments[1],l=arguments[2];l===Fe.INTERIOR&&this._depth[a][c]++}};ki.prototype.interfaces_=function(){return[]};ki.prototype.getClass=function(){return ki};ki.depthAtLocation=function(t){return t===Fe.EXTERIOR?0:t===Fe.INTERIOR?1:ki.NULL_VALUE};YC.NULL_VALUE.get=function(){return-1};Object.defineProperties(ki,YC);var F_=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Ya(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new ki,this._depthDelta=0,arguments.length===1){var n=arguments[0];e.call(this,n,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var r=new e(n,Hn.toLineLabel(this._label));return r},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var r=this;if(!(n instanceof e))return!1;var i=n;if(this.pts.length!==i.pts.length)return!1;for(var a=!0,c=!0,l=this.pts.length,d=0;d0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var r=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var i=0;i0&&n.print(","),n.print(r.pts[i].x+" "+r.pts[i].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var r=this;n.print("edge "+this._name+": ");for(var i=this.pts.length-1;i>=0;i--)n.print(r.pts[i]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Al(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Ft;for(var r=0;r0&&r.append(","),r.append(n.pts[i].x+" "+n.pts[i].y);return r.append(") "+this._label+" "+this._depthDelta),r.toString()},e.prototype.isPointwiseEqual=function(n){var r=this;if(this.pts.length!==n.pts.length)return!1;for(var i=0;ir||this._maxya;if(c)return!1;var l=this.intersectsToleranceSquare(t,e);return hn.isTrue(!(c&&l),"Found bad envelope test"),l};bo.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new ze(this._maxx,this._maxy),this._corner[1]=new ze(this._minx,this._maxy),this._corner[2]=new ze(this._minx,this._miny),this._corner[3]=new ze(this._maxx,this._miny)};bo.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};bo.prototype.scale=function(t){return Math.round(t*this._scaleFactor)};bo.prototype.getCoordinate=function(){return this._originalPt};bo.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)};bo.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=bo.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Ft(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv};bo.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))};bo.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&r||t.equals(this._pt)||e.equals(this._pt))};bo.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return this.intersects(n,r)?(t.addIntersection(this.getCoordinate(),e),!0):!1};bo.prototype.interfaces_=function(){return[]};bo.prototype.getClass=function(){return bo};JC.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(bo,JC);var cm=function(){this.tempEnv1=new Ft,this.selectedSegment=new Bt};cm.prototype.select=function(){if(arguments.length!==1&&arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}};cm.prototype.interfaces_=function(){return[]};cm.prototype.getClass=function(){return cm};var Hf=function(){this._index=null;var t=arguments[0];this._index=t},$C={HotPixelSnapAction:{configurable:!0}};Hf.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),a=new QC(e,n,r);return this._index.query(i,{interfaces_:function(){return[hu]},visitItem:function(c){var l=c;l.select(i,a)}}),a.isNodeAdded()}};Hf.prototype.interfaces_=function(){return[]};Hf.prototype.getClass=function(){return Hf};$C.HotPixelSnapAction.get=function(){return QC};Object.defineProperties(Hf,$C);var QC=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var n=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=n,this._parentEdge=r,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1],i=n.getContext();if(this._parentEdge!==null&&i===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,r)}else return t.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(cm),$c=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new yt};$c.prototype.processIntersections=function(t,e,n,r){var i=this;if(t===n&&e===r)return null;var a=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];if(this._li.computeIntersection(a,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var v=0;v=0;e--){try{t.bufferReducedPrecision(e)}catch(a){if(a instanceof Pl)t._saveException=a;else throw a}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],r=Ai.precisionScaleFactor(this._argGeom,this._distance,n),i=new Bn(r);this.bufferFixedPrecision(i)}};Ai.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Bn.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()};Ai.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)};Ai.prototype.bufferOriginalPrecision=function(){try{var t=new to(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Tl)this._saveException=e;else throw e}finally{}};Ai.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry};Ai.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)};Ai.prototype.interfaces_=function(){return[]};Ai.prototype.getClass=function(){return Ai};Ai.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new Ai(t),r=n.getResultGeometry(e);return r}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Yt&&typeof arguments[1]=="number"){var i=arguments[0],a=arguments[1],c=arguments[2],l=new Ai(i);l.setQuadrantSegments(c);var d=l.getResultGeometry(a);return d}else if(arguments[2]instanceof Fn&&arguments[0]instanceof Yt&&typeof arguments[1]=="number"){var v=arguments[0],S=arguments[1],E=arguments[2],T=new Ai(v,E),M=T.getResultGeometry(S);return M}}else if(arguments.length===4){var k=arguments[0],R=arguments[1],z=arguments[2],U=arguments[3],F=new Ai(k);F.setQuadrantSegments(z),F.setEndCapStyle(U);var G=F.getResultGeometry(R);return G}};Ai.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=rs.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),a=e>0?e:0,c=i+2*a,l=Math.trunc(Math.log(c)/Math.log(10)+1),d=n-l,v=Math.pow(10,d);return v};dp.CAP_ROUND.get=function(){return Fn.CAP_ROUND};dp.CAP_BUTT.get=function(){return Fn.CAP_FLAT};dp.CAP_FLAT.get=function(){return Fn.CAP_FLAT};dp.CAP_SQUARE.get=function(){return Fn.CAP_SQUARE};dp.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(Ai,dp);var $i=function(){this._pt=[new ze,new ze],this._distance=nn.NaN,this._isNull=!0};$i.prototype.getCoordinates=function(){return this._pt};$i.prototype.getCoordinate=function(t){return this._pt[t]};$i.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}};$i.prototype.interfaces_=function(){return[]};$i.prototype.getClass=function(){return $i};var Va=function(){};Va.prototype.interfaces_=function(){return[]};Va.prototype.getClass=function(){return Va};Va.computeDistance=function(){if(arguments[2]instanceof $i&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new Bt,a=0;a0||this._isIn?Fe.INTERIOR:Fe.EXTERIOR)};Hs.prototype.interfaces_=function(){return[]};Hs.prototype.getClass=function(){return Hs};var Qi=function t(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._component=r,this._segIndex=i,this._pt=a}},eT={INSIDE_AREA:{configurable:!0}};Qi.prototype.isInsideArea=function(){return this._segIndex===Qi.INSIDE_AREA};Qi.prototype.getCoordinate=function(){return this._pt};Qi.prototype.getGeometryComponent=function(){return this._component};Qi.prototype.getSegmentIndex=function(){return this._segIndex};Qi.prototype.interfaces_=function(){return[]};Qi.prototype.getClass=function(){return Qi};eT.INSIDE_AREA.get=function(){return-1};Object.defineProperties(Qi,eT);var au=function(t){this._pts=t||null};au.prototype.filter=function(t){t instanceof No&&this._pts.add(t)};au.prototype.interfaces_=function(){return[va]};au.prototype.getClass=function(){return au};au.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof No?qs.singletonList(t):au.getPoints(t,new yt)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof No?n.add(e):e instanceof io&&e.apply(new au(n)),n}};var eh=function(){this._locations=null;var t=arguments[0];this._locations=t};eh.prototype.filter=function(t){(t instanceof No||t instanceof Nr||t instanceof ai)&&this._locations.add(new Qi(t,0,t.getCoordinate()))};eh.prototype.interfaces_=function(){return[va]};eh.prototype.getClass=function(){return eh};eh.getLocations=function(t){var e=new yt;return t.apply(new eh(e)),e};var Ni=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Hs,this._minDistanceLocation=null,this._minDistance=nn.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ni.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=1-n,a=Sl.getPolygons(this._geom[n]);if(a.size()>0){var c=eh.getLocations(this._geom[i]);if(this.computeContainmentDistance(c,a,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Jt(arguments[0],Vs)&&Jt(arguments[1],Vs)){for(var l=arguments[0],d=arguments[1],v=arguments[2],S=0;Sthis._minDistance)return null;for(var i=e.getCoordinates(),a=n.getCoordinate(),c=0;cthis._minDistance)return null;for(var M=S.getCoordinates(),k=E.getCoordinates(),R=0;Rthis._distance&&this.initialize(e,n,r)}};ji.prototype.interfaces_=function(){return[]};ji.prototype.getClass=function(){return ji};var ua=function(){};ua.prototype.interfaces_=function(){return[]};ua.prototype.getClass=function(){return ua};ua.computeDistance=function(){if(arguments[2]instanceof ji&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new Bt,i=t.getCoordinates(),a=0;a1||t<=0)throw new yr("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t};ys.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)};ys.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};ys.prototype.computeOrientedDistance=function(t,e,n){var r=new th(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new gu(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}};ys.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};ys.prototype.interfaces_=function(){return[]};ys.prototype.getClass=function(){return ys};ys.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new ys(t,e);return n.distance()}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2],c=new ys(r,i);return c.setDensifyFraction(a),c.distance()}};rb.MaxPointDistanceFilter.get=function(){return th};rb.MaxDensifiedByFractionDistanceFilter.get=function(){return gu};Object.defineProperties(ys,rb);var th=function(){this._maxPtDist=new ji,this._minPtDist=new ji,this._euclideanDist=new ua,this._geom=null;var t=arguments[0];this._geom=t};th.prototype.filter=function(t){this._minPtDist.initialize(),ua.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};th.prototype.getMaxPointDistance=function(){return this._maxPtDist};th.prototype.interfaces_=function(){return[Wa]};th.prototype.getClass=function(){return th};var gu=function(){this._maxPtDist=new ji,this._minPtDist=new ji,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};gu.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),a=(i.x-r.x)/this._numSubSegs,c=(i.y-r.y)/this._numSubSegs,l=0;ln){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Us.toLineString(i[0],i[1])+")"}};Do.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Do.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Do.VERBOSE&&Di.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};Do.prototype.checkNegativeValid=function(){if(!(this._input instanceof ai||this._input instanceof Ga||this._input instanceof io))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)};Do.prototype.getErrorIndicator=function(){return this._errorIndicator};Do.prototype.checkMinimumDistance=function(t,e,n){var r=new Ni(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Oi.prototype.report=function(t){if(!Oi.VERBOSE)return null;Di.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))};Oi.prototype.getErrorMessage=function(){return this._errorMsg};Oi.prototype.interfaces_=function(){return[]};Oi.prototype.getClass=function(){return Oi};Oi.isValidMsg=function(t,e,n){var r=new Oi(t,e,n);return r.isValid()?null:r.getErrorMessage()};Oi.isValid=function(t,e,n){var r=new Oi(t,e,n);return!!r.isValid()};ob.VERBOSE.get=function(){return!1};ob.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Oi,ob);var Ia=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ia.prototype.getCoordinates=function(){return this._pts};Ia.prototype.size=function(){return this._pts.length};Ia.prototype.getCoordinate=function(t){return this._pts[t]};Ia.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Ia.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Kc.octant(this.getCoordinate(t),this.getCoordinate(t+1))};Ia.prototype.setData=function(t){this._data=t};Ia.prototype.getData=function(){return this._data};Ia.prototype.toString=function(){return Us.toLineString(new jr(this._pts))};Ia.prototype.interfaces_=function(){return[Xa]};Ia.prototype.getClass=function(){return Ia};var Ci=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new yt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ci.prototype.getInteriorIntersection=function(){return this._interiorIntersection};Ci.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t};Ci.prototype.getIntersectionSegments=function(){return this._intSegments};Ci.prototype.count=function(){return this._intersectionCount};Ci.prototype.getIntersections=function(){return this._intersections};Ci.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Ci.prototype.setKeepIntersections=function(t){this._keepIntersections=t};Ci.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly){var i=this.isEndSegment(t,e)||this.isEndSegment(n,r);if(!i)return null}var a=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];this._li.computeIntersection(a,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=a,this._intSegments[1]=c,this._intSegments[2]=l,this._intSegments[3]=d,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};Ci.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2};Ci.prototype.hasIntersection=function(){return this._interiorIntersection!==null};Ci.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};Ci.prototype.interfaces_=function(){return[tc]};Ci.prototype.getClass=function(){return Ci};Ci.createAllIntersectionsFinder=function(t){var e=new Ci(t);return e.setFindAllIntersections(!0),e};Ci.createAnyIntersectionFinder=function(t){return new Ci(t)};Ci.createIntersectionCounter=function(t){var e=new Ci(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Zs=function(){this._li=new uc,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Zs.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};Zs.prototype.getIntersections=function(){return this._segInt.getIntersections()};Zs.prototype.isValid=function(){return this.execute(),this._isValid};Zs.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Zs.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ci(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new tb;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};Zs.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Pl(this.getErrorMessage(),this._segInt.getInteriorIntersection())};Zs.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Us.toLineString(t[0],t[1])+" and "+Us.toLineString(t[2],t[3])};Zs.prototype.interfaces_=function(){return[]};Zs.prototype.getClass=function(){return Zs};Zs.computeIntersections=function(t){var e=new Zs(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var ic=function t(){this._nv=null;var e=arguments[0];this._nv=new Zs(t.toSegmentStrings(e))};ic.prototype.checkValid=function(){this._nv.checkValid()};ic.prototype.interfaces_=function(){return[]};ic.prototype.getClass=function(){return ic};ic.toSegmentStrings=function(t){for(var e=new yt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ia(r.getCoordinates(),r))}return e};ic.checkValid=function(t){var e=new ic(t);e.checkValid()};var nh=function(t){this._mapOp=t};nh.prototype.map=function(t){for(var e=this,n=new yt,r=0;r0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)};xo.prototype.interfaces_=function(){return[]};xo.prototype.getClass=function(){return xo};var Ja=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Bt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Nr&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Ja.prototype.snapVertices=function(t,e){for(var n=this,r=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(c+1,new ze(a),!1)}};Ja.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=nn.MAX_VALUE,i=-1,a=0;ae&&(e=r)}return e}else if(arguments.length===2){var i=arguments[0],a=arguments[1];return Math.min(Gr.computeOverlaySnapTolerance(i),Gr.computeOverlaySnapTolerance(a))}};Gr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),r=n*Gr.SNAP_PRECISION_FACTOR;return r};Gr.snapToSelf=function(t,e,n){var r=new Gr(t);return r.snapToSelf(e,n)};tT.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(Gr,tT);var nT=function(t){function e(n,r,i){t.call(this),this._snapTolerance=n||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,r){var i=new Ja(n,this._snapTolerance);return i.setAllowSnappingToSourceVertices(this._isSelfSnap),i.snapTo(r)},e.prototype.transformCoordinates=function(n,r){var i=n.toCoordinateArray(),a=this.snapLine(i,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(a)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(xo),Ji=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ji.prototype.getCommon=function(){return nn.longBitsToDouble(this._commonBits)};Ji.prototype.add=function(t){var e=nn.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ji.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ji.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ji.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ji.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};Ji.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=nn.longBitsToDouble(t),n=nn.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),a=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]";return a}};Ji.prototype.interfaces_=function(){return[]};Ji.prototype.getClass=function(){return Ji};Ji.getBit=function(t,e){var n=1<>52};Ji.zeroLowerBits=function(t,e){var n=(1<=0;r--){if(Ji.getBit(t,r)!==Ji.getBit(e,r))return n;n++}return 52};var _u=function(){this._commonCoord=null,this._ccFilter=new ih},sb={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};_u.prototype.addCommonBits=function(t){var e=new yu(this._commonCoord);t.apply(e),t.geometryChanged()};_u.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new ze(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new yu(e);return t.apply(n),t.geometryChanged(),t};_u.prototype.getCommonCoordinate=function(){return this._commonCoord};_u.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};_u.prototype.interfaces_=function(){return[]};_u.prototype.getClass=function(){return _u};sb.CommonCoordinateFilter.get=function(){return ih};sb.Translater.get=function(){return yu};Object.defineProperties(_u,sb);var ih=function(){this._commonBitsX=new Ji,this._commonBitsY=new Ji};ih.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)};ih.prototype.getCommonCoordinate=function(){return new ze(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};ih.prototype.interfaces_=function(){return[Wa]};ih.prototype.getClass=function(){return ih};var yu=function(){this.trans=null;var t=arguments[0];this.trans=t};yu.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)};yu.prototype.isDone=function(){return!1};yu.prototype.isGeometryChanged=function(){return!0};yu.prototype.interfaces_=function(){return[js]};yu.prototype.getClass=function(){return yu};var Ti=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Ti.prototype.selfSnap=function(t){var e=new Gr(t),n=e.snapTo(t,this._snapTolerance);return n};Ti.prototype.removeCommonBits=function(t){this._cbr=new _u,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e};Ti.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t};Ti.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=an.overlayOp(e[0],e[1],t);return this.prepareResult(n)};Ti.prototype.checkValid=function(t){t.isValid()||Di.out.println("Snapped geometry is invalid")};Ti.prototype.computeSnapTolerance=function(){this._snapTolerance=Gr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};Ti.prototype.snap=function(t){var e=this.removeCommonBits(t),n=Gr.snap(e[0],e[1],this._snapTolerance);return n};Ti.prototype.interfaces_=function(){return[]};Ti.prototype.getClass=function(){return Ti};Ti.overlayOp=function(t,e,n){var r=new Ti(t,e);return r.getResultGeometry(n)};Ti.union=function(t,e){return Ti.overlayOp(t,e,an.UNION)};Ti.intersection=function(t,e){return Ti.overlayOp(t,e,an.INTERSECTION)};Ti.symDifference=function(t,e){return Ti.overlayOp(t,e,an.SYMDIFFERENCE)};Ti.difference=function(t,e){return Ti.overlayOp(t,e,an.DIFFERENCE)};var ao=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ao.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=an.overlayOp(this._geom[0],this._geom[1],t);var i=!0;i&&(n=!0)}catch(a){if(a instanceof Tl)r=a;else throw a}finally{}if(!n)try{e=Ti.overlayOp(this._geom[0],this._geom[1],t)}catch(a){throw a instanceof Tl?r:a}finally{}return e};ao.prototype.interfaces_=function(){return[]};ao.prototype.getClass=function(){return ao};ao.overlayOp=function(t,e,n){var r=new ao(t,e);return r.getResultGeometry(n)};ao.union=function(t,e){return ao.overlayOp(t,e,an.UNION)};ao.intersection=function(t,e){return ao.overlayOp(t,e,an.INTERSECTION)};ao.symDifference=function(t,e){return ao.overlayOp(t,e,an.SYMDIFFERENCE)};ao.difference=function(t,e){return ao.overlayOp(t,e,an.DIFFERENCE)};var hm=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};hm.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)};hm.prototype.interfaces_=function(){return[]};hm.prototype.getClass=function(){return hm};var Fo=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],a=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=a}},ab={INSERT:{configurable:!0},DELETE:{configurable:!0}};Fo.prototype.isDelete=function(){return this._eventType===Fo.DELETE};Fo.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t};Fo.prototype.getObject=function(){return this._obj};Fo.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0};Fo.prototype.getInsertEvent=function(){return this._insertEvent};Fo.prototype.isInsert=function(){return this._eventType===Fo.INSERT};Fo.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label};Fo.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};Fo.prototype.interfaces_=function(){return[Ss]};Fo.prototype.getClass=function(){return Fo};ab.INSERT.get=function(){return 1};ab.DELETE.get=function(){return 2};Object.defineProperties(Fo,ab);var B_=function(){};B_.prototype.interfaces_=function(){return[]};B_.prototype.getClass=function(){return B_};var zi=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};zi.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&this._li.getIntersectionNum()===1){if(zi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(e===0&&r===i||r===0&&e===i)return!0}}return!1};zi.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};zi.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t};zi.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};zi.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next(),i=r.getCoordinate();if(t.isIntersection(i))return!0}return!1};zi.prototype.hasProperIntersection=function(){return this._hasProper};zi.prototype.hasIntersection=function(){return this._hasIntersection};zi.prototype.isDone=function(){return this._isDone};zi.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))};zi.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e};zi.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],a=t.getCoordinates()[e+1],c=n.getCoordinates()[r],l=n.getCoordinates()[r+1];this._li.computeIntersection(i,a,c,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};zi.prototype.interfaces_=function(){return[]};zi.prototype.getClass=function(){return zi};zi.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var KO=function(t){function e(){t.call(this),this.events=new yt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;qs.sort(this.events);for(var r=0;re||this._maxa?1:0};fm.prototype.interfaces_=function(){return[Rf]};fm.prototype.getClass=function(){return fm};var JO=function(t){function e(){t.call(this),this._item=null;var n=arguments[0],r=arguments[1],i=arguments[2];this._min=n,this._max=r,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;i.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($a),$O=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var n=arguments[0],r=arguments[1];this._node1=n,this._node2=r,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,r){this._min=Math.min(n._min,r._min),this._max=Math.max(n._max,r._max)},e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;this._node1!==null&&this._node1.query(n,r,i),this._node2!==null&&this._node2.query(n,r,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}($a),Qa=function(){this._leaves=new yt,this._root=null,this._level=0};Qa.prototype.buildTree=function(){var t=this;qs.sort(this._leaves,new $a.NodeComparator);for(var e=this._leaves,n=null,r=new yt;;){if(t.buildLevel(e,r),r.size()===1)return r.get(0);n=e,e=r,r=n}};Qa.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new JO(t,e,n))};Qa.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)};Qa.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Qa.prototype.printNode=function(t){Di.out.println(Us.toLineString(new ze(t._min,this._level),new ze(t._max,this._level)))};Qa.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Qa.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,r[0]),this.insertBoundaryPoint(this._argIndex,r[r.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),r=new Array(n.size()).fill(null),i=0,a=n.iterator();a.hasNext();){var c=a.next();r[i++]=c.getCoordinate().copy()}return r},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,r,i){if(this.isBoundaryNode(n,r))return null;i===Fe.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,r):this.insertPoint(n,r,i)},e.prototype.addPolygonRing=function(n,r,i){if(n.isEmpty())return null;var a=En.removeRepeatedPoints(n.getCoordinates());if(a.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=a[0],null;var c=r,l=i;Et.isCCW(a)&&(c=i,l=r);var d=new F_(a,new Hn(this._argIndex,Fe.BOUNDARY,c,l));this._lineEdgeMap.put(n,d),this.insertEdge(d),this.insertPoint(this._argIndex,a[0],Fe.BOUNDARY)},e.prototype.insertPoint=function(n,r,i){var a=this._nodes.addNode(r),c=a.getLabel();c===null?a._label=new Hn(n,i):c.setLocation(n,i)},e.prototype.createEdgeSetIntersector=function(){return new KO},e.prototype.addSelfIntersectionNodes=function(n){for(var r=this,i=this._edges.iterator();i.hasNext();)for(var a=i.next(),c=a.getLabel().getLocation(n),l=a.eiList.iterator();l.hasNext();){var d=l.next();r.addSelfIntersectionNode(n,d.coord,c)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Ga&&(this._useBoundaryDeterminationRule=!1),n instanceof ai)this.addPolygon(n);else if(n instanceof Nr)this.addLineString(n);else if(n instanceof No)this.addPoint(n);else if(n instanceof Uf)this.addCollection(n);else if(n instanceof $u)this.addCollection(n);else if(n instanceof Ga)this.addCollection(n);else if(n instanceof io)this.addCollection(n);else throw new Error(n.getClass().getName())}else return t.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var r=this,i=0;i50?(this._areaPtLocator===null&&(this._areaPtLocator=new Xf(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,r){return n.isInBoundary(r)?Fe.BOUNDARY:Fe.INTERIOR},e}(Lr),Kf=function(){if(this._li=new uc,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new xd(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=bs.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xd(0,e,r),this._arg[1]=new xd(1,n,r)}else if(arguments.length===3){var i=arguments[0],a=arguments[1],c=arguments[2];i.getPrecisionModel().compareTo(a.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(a.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new xd(0,i,c),this._arg[1]=new xd(1,a,c)}};Kf.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()};Kf.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)};Kf.prototype.interfaces_=function(){return[]};Kf.prototype.getClass=function(){return Kf};var Yu=function(){};Yu.prototype.interfaces_=function(){return[]};Yu.prototype.getClass=function(){return Yu};Yu.map=function(){if(arguments[0]instanceof Yt&&Jt(arguments[1],Yu.MapOp)){for(var t=arguments[0],e=arguments[1],n=new yt,r=0;r=t.size()?null:t.get(e)};Yr.union=function(t){var e=new Yr(t);return e.union()};oT.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties(Yr,oT);var V_=function(){};V_.prototype.interfaces_=function(){return[]};V_.prototype.getClass=function(){return V_};V_.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return an.createEmptyResult(an.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ao.overlayOp(t,e,an.UNION)};function cc(){return new U_}function U_(){this.reset()}U_.prototype={constructor:U_,reset:function(){this.s=this.t=0},add:function(t){cS(Vg,t,this.t),cS(this,Vg.s,this.s),this.s?this.t+=Vg.t:this.s=Vg.t},valueOf:function(){return this.s}};var Vg=new U_;function cS(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Dr=1e-6,Qn=Math.PI,wl=Qn/2,hS=Qn/4,kl=Qn*2,Uu=180/Qn,aa=Qn/180,eo=Math.abs,QO=Math.atan,$f=Math.atan2,ri=Math.cos,ii=Math.sin,mp=Math.sqrt;function sT(t){return t>1?0:t<-1?Qn:Math.acos(t)}function oh(t){return t>1?wl:t<-1?-wl:Math.asin(t)}function kd(){}function j_(t,e){t&&pS.hasOwnProperty(t.type)&&pS[t.type](t,e)}var fS={Feature:function(t,e){j_(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rQn?t-kl:t<-Qn?t+kl:t,e]}n1.invert=n1;function t5(t,e,n){return(t%=kl)?e||n?aT(gS(t),_S(e,n)):gS(t):e||n?_S(e,n):n1}function mS(t){return function(e,n){return e+=t,[e>Qn?e-kl:e<-Qn?e+kl:e,n]}}function gS(t){var e=mS(t);return e.invert=mS(-t),e}function _S(t,e){var n=ri(t),r=ii(t),i=ri(e),a=ii(e);function c(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,T=ii(d),M=T*n+S*r;return[$f(E*i-M*a,S*n-T*r),oh(M*i+E*a)]}return c.invert=function(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,T=ii(d),M=T*i-E*a;return[$f(E*i+T*a,S*n+M*r),oh(M*n-S*r)]},c}function n5(t,e,n,r,i,a){if(n){var c=ri(e),l=ii(e),d=r*n;i==null?(i=e+r*kl,a=e-d/2):(i=yS(c,i),a=yS(c,a),(r>0?ia)&&(i+=r*kl));for(var v,S=i;r>0?S>a:S1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function r5(t,e,n,r,i,a){var c=t[0],l=t[1],d=e[0],v=e[1],S=0,E=1,T=d-c,M=v-l,k;if(k=n-c,!(!T&&k>0)){if(k/=T,T<0){if(k0){if(k>E)return;k>S&&(S=k)}if(k=i-c,!(!T&&k<0)){if(k/=T,T<0){if(k>E)return;k>S&&(S=k)}else if(T>0){if(k0)){if(k/=M,M<0){if(k0){if(k>E)return;k>S&&(S=k)}if(k=a-l,!(!M&&k<0)){if(k/=M,M<0){if(k>E)return;k>S&&(S=k)}else if(M>0){if(k0&&(t[0]=c+S*T,t[1]=l+S*M),E<1&&(e[0]=c+E*T,e[1]=l+E*M),!0}}}}}function s_(t,e){return eo(t[0]-e[0])=0;--l)i.point((E=S[l])[0],E[1]);else r(T.x,T.p.x,-1,i);T=T.p}T=T.o,S=T.z,M=!M}while(!T.v);i.lineEnd()}}}function vS(t){if(e=t.length){for(var e,n=0,r=t[0],i;++ne?1:t>=e?0:NaN}function i5(t){return t.length===1&&(t=o5(t)),{left:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function o5(t){return function(e,n){return cT(t(e),n)}}i5(cT);function hT(t){for(var e=t.length,n,r=-1,i=0,a,c;++r=0;)for(c=t[e],n=c.length;--n>=0;)a[--i]=c[n];return a}var Dd=1e9,qg=-Dd;function s5(t,e,n,r){function i(v,S){return t<=v&&v<=n&&e<=S&&S<=r}function a(v,S,E,T){var M=0,k=0;if(v==null||(M=c(v,E))!==(k=c(S,E))||d(v,S)<0^E>0)do T.point(M===0||M===3?t:n,M>1?r:e);while((M=(M+E+4)%4)!==k);else T.point(S[0],S[1])}function c(v,S){return eo(v[0]-t)0?0:3:eo(v[0]-n)0?2:1:eo(v[1]-e)0?1:0:S>0?3:2}function l(v,S){return d(v.x,S.x)}function d(v,S){var E=c(v,1),T=c(S,1);return E!==T?E-T:E===0?S[1]-v[1]:E===1?v[0]-S[0]:E===2?v[1]-S[1]:S[0]-v[0]}return function(v){var S=v,E=lT(),T,M,k,R,z,U,F,G,H,J,oe,ie={point:ce,lineStart:de,lineEnd:Qe,polygonStart:Te,polygonEnd:Q};function ce(it,ct){i(it,ct)&&S.point(it,ct)}function fe(){for(var it=0,ct=0,je=M.length;ctr&&(xn-Lt)*(r-rn)>(fn-rn)*(t-Lt)&&++it:fn<=r&&(xn-Lt)*(r-rn)<(fn-rn)*(t-Lt)&&--it;return it}function Te(){S=E,T=[],M=[],oe=!0}function Q(){var it=fe(),ct=oe&&it,je=(T=hT(T)).length;(ct||je)&&(v.polygonStart(),ct&&(v.lineStart(),a(null,null,1,v),v.lineEnd()),je&&uT(T,l,it,a,v),v.polygonEnd()),S=v,T=M=k=null}function de(){ie.point=Me,M&&M.push(k=[]),J=!0,H=!1,F=G=NaN}function Qe(){T&&(Me(R,z),U&&H&&E.rejoin(),T.push(E.result())),ie.point=ce,H&&S.lineEnd()}function Me(it,ct){var je=i(it,ct);if(M&&k.push([it,ct]),J)R=it,z=ct,U=je,J=!1,je&&(S.lineStart(),S.point(it,ct));else if(je&&H)S.point(it,ct);else{var Ot=[F=Math.max(qg,Math.min(Dd,F)),G=Math.max(qg,Math.min(Dd,G))],jt=[it=Math.max(qg,Math.min(Dd,it)),ct=Math.max(qg,Math.min(Dd,ct))];r5(Ot,jt,t,e,n,r)?(H||(S.lineStart(),S.point(Ot[0],Ot[1])),S.point(jt[0],jt[1]),je||S.lineEnd(),oe=!1):je&&(S.lineStart(),S.point(it,ct),oe=!1)}F=it,G=ct,H=je}return ie}}var lv=cc();function a5(t,e){var n=e[0],r=e[1],i=[ii(n),-ri(n),0],a=0,c=0;lv.reset();for(var l=0,d=t.length;l=0?1:-1,ce=ie*oe,fe=ce>Qn,Te=k*H;if(lv.add($f(Te*ie*ii(ce),R*J+Te*ri(ce))),a+=fe?oe+ie*kl:oe,fe^T>=n^F>=n){var Q=G_(Qf(E),Qf(U));t1(Q);var de=G_(i,Q);t1(de);var Qe=(fe^oe>=0?-1:1)*oh(de[2]);(r>Qe||r===Qe&&(Q[0]||Q[1]))&&(c+=fe^oe>=0?1:-1)}}return(a<-Dr||apm&&(pm=t),eW_&&(W_=e)}cc();function fT(t,e,n,r){return function(i,a){var c=e(a),l=i.invert(r[0],r[1]),d=lT(),v=e(d),S=!1,E,T,M,k={point:R,lineStart:U,lineEnd:F,polygonStart:function(){k.point=G,k.lineStart=H,k.lineEnd=J,T=[],E=[]},polygonEnd:function(){k.point=R,k.lineStart=U,k.lineEnd=F,T=hT(T);var oe=a5(E,l);T.length?(S||(a.polygonStart(),S=!0),uT(T,c5,oe,n,a)):oe&&(S||(a.polygonStart(),S=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),S&&(a.polygonEnd(),S=!1),T=E=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function R(oe,ie){var ce=i(oe,ie);t(oe=ce[0],ie=ce[1])&&a.point(oe,ie)}function z(oe,ie){var ce=i(oe,ie);c.point(ce[0],ce[1])}function U(){k.point=z,c.lineStart()}function F(){k.point=R,c.lineEnd()}function G(oe,ie){M.push([oe,ie]);var ce=i(oe,ie);v.point(ce[0],ce[1])}function H(){v.lineStart(),M=[]}function J(){G(M[0][0],M[0][1]),v.lineEnd();var oe=v.clean(),ie=d.result(),ce,fe=ie.length,Te,Q,de;if(M.pop(),E.push(M),M=null,!!fe){if(oe&1){if(Q=ie[0],(Te=Q.length-1)>0){for(S||(a.polygonStart(),S=!0),a.lineStart(),ce=0;ce1&&oe&2&&ie.push(ie.pop().concat(ie.shift())),T.push(ie.filter(u5))}}return k}}function u5(t){return t.length>1}function c5(t,e){return((t=t.x)[0]<0?t[1]-wl-Dr:wl-t[1])-((e=e.x)[0]<0?e[1]-wl-Dr:wl-e[1])}const wS=fT(function(){return!0},h5,p5,[-Qn,-wl]);function h5(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,c){var l=a>0?Qn:-Qn,d=eo(a-e);eo(d-Qn)0?wl:-wl),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(a,n),i=0):r!==l&&d>=Qn&&(eo(e-r)Dr?QO((ii(e)*(a=ri(r))*ii(n)-ii(r)*(i=ri(e))*ii(t))/(i*a*c)):(e+r)/2}function p5(t,e,n,r){var i;if(t==null)i=n*wl,r.point(-Qn,i),r.point(0,i),r.point(Qn,i),r.point(Qn,0),r.point(Qn,-i),r.point(0,-i),r.point(-Qn,-i),r.point(-Qn,0),r.point(-Qn,i);else if(eo(t[0]-e[0])>Dr){var a=t[0]0,i=eo(n)>Dr;function a(S,E,T,M){n5(M,t,e,T,S,E)}function c(S,E){return ri(S)*ri(E)>n}function l(S){var E,T,M,k,R;return{lineStart:function(){k=M=!1,R=1},point:function(z,U){var F=[z,U],G,H=c(z,U),J=r?H?0:v(z,U):H?v(z+(z<0?Qn:-Qn),U):0;if(!E&&(k=M=H)&&S.lineStart(),H!==M&&(G=d(E,F),(!G||s_(E,G)||s_(F,G))&&(F[0]+=Dr,F[1]+=Dr,H=c(F[0],F[1]))),H!==M)R=0,H?(S.lineStart(),G=d(F,E),S.point(G[0],G[1])):(G=d(E,F),S.point(G[0],G[1]),S.lineEnd()),E=G;else if(i&&E&&r^H){var oe;!(J&T)&&(oe=d(F,E,!0))&&(R=0,r?(S.lineStart(),S.point(oe[0][0],oe[0][1]),S.point(oe[1][0],oe[1][1]),S.lineEnd()):(S.point(oe[1][0],oe[1][1]),S.lineEnd(),S.lineStart(),S.point(oe[0][0],oe[0][1])))}H&&(!E||!s_(E,F))&&S.point(F[0],F[1]),E=F,M=H,T=J},lineEnd:function(){M&&S.lineEnd(),E=null},clean:function(){return R|(k&&M)<<1}}}function d(S,E,T){var M=Qf(S),k=Qf(E),R=[1,0,0],z=G_(M,k),U=Ug(z,z),F=z[0],G=U-F*F;if(!G)return!T&&S;var H=n*U/G,J=-n*F/G,oe=G_(R,z),ie=jg(R,H),ce=jg(z,J);av(ie,ce);var fe=oe,Te=Ug(ie,fe),Q=Ug(fe,fe),de=Te*Te-Q*(Ug(ie,ie)-1);if(!(de<0)){var Qe=mp(de),Me=jg(fe,(-Te-Qe)/Q);if(av(Me,ie),Me=e1(Me),!T)return Me;var it=S[0],ct=E[0],je=S[1],Ot=E[1],jt;ct0^Me[1]<(eo(Me[0]-it)Qn^(it<=Me[0]&&Me[0]<=ct)){var rn=jg(fe,(-Te+Qe)/Q);return av(rn,ie),[Me,e1(rn)]}}}function v(S,E){var T=r?t:Qn-t,M=0;return S<-T?M|=1:S>T&&(M|=2),E<-T?M|=4:E>T&&(M|=8),M}return fT(c,l,a,r?[0,-t]:[-Qn,t-Qn])}function pT(t){return function(e){var n=new r1;for(var r in t)n[r]=t[r];return n.stream=e,n}}function r1(){}r1.prototype={constructor:r1,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function dT(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),a!=null&&t.clipExtent(null),e5(n,t.stream(xS));var c=xS.result(),l=Math.min(r/(c[1][0]-c[0][0]),i/(c[1][1]-c[0][1])),d=+e[0][0]+(r-l*(c[1][0]+c[0][0]))/2,v=+e[0][1]+(i-l*(c[1][1]+c[0][1]))/2;return a!=null&&t.clipExtent(a),t.scale(l*150).translate([d,v])}function m5(t,e,n){return dT(t,[[0,0],e],n)}var SS=16,g5=ri(30*aa);function ES(t,e){return+e?y5(t,e):_5(t)}function _5(t){return pT({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function y5(t,e){function n(r,i,a,c,l,d,v,S,E,T,M,k,R,z){var U=v-r,F=S-i,G=U*U+F*F;if(G>4*e&&R--){var H=c+T,J=l+M,oe=d+k,ie=mp(H*H+J*J+oe*oe),ce=oh(oe/=ie),fe=eo(eo(oe)-1)e||eo((U*Qe+F*Me)/G-.5)>.3||c*T+l*M+d*k2?Me[2]%360*aa:0,de()):[v*Uu,S*Uu,E*Uu]},fe.precision=function(Me){return arguments.length?(oe=ES(Q,J=Me*Me),Qe()):mp(J)},fe.fitExtent=function(Me,it){return dT(fe,Me,it)},fe.fitSize=function(Me,it){return m5(fe,Me,it)};function de(){M=aT(T=t5(v,S,E),e);var Me=e(l,d);return a=r-Me[0]*n,c=i+Me[1]*n,Qe()}function Qe(){return ie=ce=null,fe}return function(){return e=t.apply(this,arguments),fe.invert=e.invert&&Te,de()}}function mT(t){return function(e,n){var r=ri(e),i=ri(n),a=t(r*i);return[a*i*ii(e),a*ii(n)]}}function gT(t){return function(e,n){var r=mp(e*e+n*n),i=t(r),a=ii(i),c=ri(i);return[$f(e*a,r*c),oh(r&&n*a/r)]}}var w5=mT(function(t){return mp(2/(1+t))});w5.invert=gT(function(t){return 2*oh(t/2)});var _T=mT(function(t){return(t=sT(t))&&t/ii(t)});_T.invert=gT(function(t){return t});function S5(){return b5(_T).scale(79.4188).clipAngle(180-.001)}function IS(t,e){return[t,e]}IS.invert=IS;function E5(t,e,n){n=n||{};var r=n.units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if(typeof n!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var a=[];switch(t.type){case"GeometryCollection":return kC(t,function(c){var l=a_(c,e,r,i);l&&a.push(l)}),Kv(a);case"FeatureCollection":return oS(t,function(c){var l=a_(c,e,r,i);l&&oS(l,function(d){d&&a.push(d)})}),Kv(a)}return a_(t,e,r,i)}function a_(t,e,n,r){var i=t.properties||{},a=t.type==="Feature"?t.geometry:t;if(a.type==="GeometryCollection"){var c=[];return kC(t,function(R){var z=a_(R,e,n,r);z&&c.push(z)}),Kv(c)}var l=I5(a),d={type:a.type,coordinates:vT(a.coordinates,l)},v=new eb,S=v.read(d),E=kO(DO(e,n),"meters"),T=Ai.bufferOp(S,E,r),M=new jC;if(T=M.write(T),!yT(T.coordinates)){var k={type:T.type,coordinates:bT(T.coordinates,l)};return hy(k,i)}}function yT(t){return Array.isArray(t[0])?yT(t[0]):isNaN(t[0])}function vT(t,e){return typeof t[0]!="object"?e(t):t.map(function(n){return vT(n,e)})}function bT(t,e){return typeof t[0]!="object"?e.invert(t):t.map(function(n){return bT(n,e)})}function I5(t){var e=NO(t).geometry.coordinates,n=[-e[0],-e[1]];return S5().rotate(n).scale(Ko)}function C5(t,e){var n=N_(t),r=N_(e),i=t.properties||{},a=TC.difference(n.coordinates,r.coordinates);return a.length===0?null:a.length===1?PC(a[0],i):MC(a,i)}function CS(t){let e;for(const n of t)e&&n[0]-e[0]>=180?n[0]-=360:e&&n[0]-e[0]<-180&&(n[0]+=360),e=n}function TS(t,e){const n=C5({type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]},t);if(!n)return;n.properties={isMask:"y"};const r=E5(t,0);if(r.geometry.type==="Polygon")for(const i of r.geometry.coordinates)CS(i);else for(const i of r.geometry.coordinates)for(const a of i)CS(a);e({type:"FeatureCollection",features:[r,n]})}let LS={type:"FeatureCollection",features:[]};function T5(t,e,n=!0,r=!0,i={},a={},c={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}}){let l,d=[],v,S;function E(){(c!=null&&c.fill||c!=null&&c.line)&&t.addSource("full-geom",{type:"geojson",data:LS}),c!=null&&c.fill&&t.addLayer({...c==null?void 0:c.fill,id:"full-geom-fill",type:"fill",source:"full-geom"}),c!=null&&c.line&&t.addLayer({...c==null?void 0:c.line,id:"full-geom-line",type:"line",source:"full-geom"})}t.loaded()?E():t.once("load",()=>{E()});const T=k=>{l==null||l({type:"mapClick",coordinates:[k.lngLat.lng,k.lngLat.lat]})};function M(k=!1){if(!e)throw new Error;const R=document.createElement("div");return k&&R.classList.add("marker-interactive"),new nO({props:{displayIn:"maplibre"},target:R}),new e.Marker({element:R,offset:[1,-13]})}return{setEventHandler(k){k?(l=k,t.on("click",T)):(l=void 0,t.off("click",T))},flyTo(k,R){t.flyTo({center:k,zoom:R,...i})},fitBounds(k,R,z){t.fitBounds([[k[0],k[1]],[k[2],k[3]]],{padding:R,maxZoom:z,...a})},indicateReverse(k){t.getCanvasContainer().style.cursor=k?"crosshair":""},setReverseMarker(k){!e||!n||(S?k?S.setLngLat(k):(S.remove(),S=void 0):k&&(S=(typeof n=="object"?new e.Marker(n):M()).setLngLat(k).addTo(t),S.getElement().classList.add("marker-reverse")))},setMarkers(k,R){if(!n)return;function z(U){var F;(F=t.getSource("full-geom"))==null||F.setData(U)}for(const U of d)U.remove();if(d.length=0,z(LS),!!e){if(R){let U=!1;if(R.geometry.type==="GeometryCollection"){const F=R.geometry.geometries.filter(G=>G.type==="Polygon"||G.type==="MultiPolygon");if(F.length>0){let G=F.pop();for(const H of F)G=RO(G,H);TS({...R,geometry:G},z),U=!0}else{const G=R.geometry.geometries.filter(H=>H.type==="LineString"||H.type==="MultiLineString");G.length>0&&(z({...R,geometry:{type:"GeometryCollection",geometries:G}}),U=!0)}}if(!U){if(R.geometry.type==="Polygon"||R.geometry.type==="MultiPolygon")TS(R,z);else if(R.geometry.type==="LineString"||R.geometry.type==="MultiLineString"){z(R);return}}n&&d.push((typeof n=="object"?new e.Marker(n):M()).setLngLat(R.center).addTo(t))}if(r)for(const U of k??[]){if(U===R)continue;const F=(typeof r=="object"?new e.Marker(r):M(!0)).setLngLat(U.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(U.place_type[0]==="reverse"?U.place_name:U.place_name.replace(/,.*/,""))).addTo(t),G=F.getElement();G.addEventListener("click",H=>{H.stopPropagation(),l==null||l({type:"markerClick",id:U.id})}),G.addEventListener("mouseenter",()=>{l==null||l({type:"markerMouseEnter",id:U.id}),F.togglePopup()}),G.addEventListener("mouseleave",()=>{l==null||l({type:"markerMouseLeave",id:U.id}),F.togglePopup()}),d.push(F)}}},setSelectedMarker(k){v&&v.getElement().classList.toggle("marker-selected",!1),v=k>-1?d[k]:void 0,v==null||v.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const k=t.getCenter();return[t.getZoom(),k.lng,k.lat]}}}function L5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),Ce(e,"viewBox","0 0 14 14"),Ce(e,"width","13"),Ce(e,"height","13"),Ce(e,"class","svelte-en2qvf")},m(r,i){we(r,e,i),ae(e,n)},p:Mt,i:Mt,o:Mt,d(r){r&&xe(e)}}}class xT extends Xt{constructor(e){super(),Zt(this,e,null,L5,Vt,{})}}function P5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),Ce(e,"viewBox","0 0 30 30"),Ce(e,"fill","none"),Ce(e,"xmlns","http://www.w3.org/2000/svg"),Ce(e,"class","svelte-d2loi5")},m(r,i){we(r,e,i),ae(e,n)},p:Mt,i:Mt,o:Mt,d(r){r&&xe(e)}}}class wT extends Xt{constructor(e){super(),Zt(this,e,null,P5,Vt,{})}}function M5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"area.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"area.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function A5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"reverse.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"reverse.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function k5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"poi.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"poi.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function D5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"postal_code.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"postal_code.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function R5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"street.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"street.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function N5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"road.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"road.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function O5(t){let e,n;return{c(){e=ye("img"),Wn(e.src,n=t[3]+"housenumber.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){we(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"housenumber.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&xe(e)}}}function z5(t){let e,n,r,i;return{c(){e=ye("img"),Wn(e.src,n=t[5])||Ce(e,"src",n),Ce(e,"alt",t[4]),Ce(e,"class","svelte-ltkwvy")},m(a,c){we(a,e,c),r||(i=Pt(e,"error",t[14]),r=!0)},p(a,c){c&32&&!Wn(e.src,n=a[5])&&Ce(e,"src",n),c&16&&Ce(e,"alt",a[4])},d(a){a&&xe(e),r=!1,i()}}}function PS(t){let e,n;return{c(){e=ye("span"),n=ut(t[6]),Ce(e,"class","secondary svelte-ltkwvy")},m(r,i){we(r,e,i),ae(e,n)},p(r,i){i&64&&cr(n,r[6])},d(r){r&&xe(e)}}}function F5(t){var ie,ce;let e,n,r,i,a,c,l,d,v=(t[7]?t[0].place_name:t[0].place_name.replace(/,.*/,""))+"",S,E,T=t[2]==="always"||t[2]&&!t[0].address&&((ie=t[0].properties)==null?void 0:ie.kind)!=="road"&&((ce=t[0].properties)==null?void 0:ce.kind)!=="road_relation"&&!t[0].id.startsWith("address.")&&!t[0].id.startsWith("postal_code.")&&(!t[0].id.startsWith("poi.")||!t[5])&&!t[7],M,k,R=(t[7]?"":t[0].place_name.replace(/[^,]*,?\s*/,""))+"",z,U,F;function G(fe,Te){var Q,de;return Te&1&&(n=null),Te&1&&(r=null),Te&1&&(i=null),fe[5]?z5:fe[0].address?O5:((Q=fe[0].properties)==null?void 0:Q.kind)==="road"||((de=fe[0].properties)==null?void 0:de.kind)==="road_relation"?N5:(n==null&&(n=!!fe[0].id.startsWith("address.")),n?R5:(r==null&&(r=!!fe[0].id.startsWith("postal_code.")),r?D5:(i==null&&(i=!!fe[0].id.startsWith("poi.")),i?k5:fe[7]?A5:M5)))}let H=G(t,-1),J=H(t),oe=T&&PS(t);return{c(){e=ye("li"),J.c(),a=Xe(),c=ye("span"),l=ye("span"),d=ye("span"),S=ut(v),E=Xe(),oe&&oe.c(),M=Xe(),k=ye("span"),z=ut(R),Ce(d,"class","primary svelte-ltkwvy"),Ce(l,"class","svelte-ltkwvy"),Ce(k,"class","line2 svelte-ltkwvy"),Ce(c,"class","texts svelte-ltkwvy"),Ce(e,"tabindex","0"),Ce(e,"data-selected",t[1]),Ce(e,"class","svelte-ltkwvy"),xl(e,"selected",t[1])},m(fe,Te){we(fe,e,Te),J.m(e,null),ae(e,a),ae(e,c),ae(c,l),ae(l,d),ae(d,S),ae(l,E),oe&&oe.m(l,null),ae(c,M),ae(c,k),ae(k,z),U||(F=[Pt(e,"mouseenter",t[12]),Pt(e,"focus",t[13])],U=!0)},p(fe,[Te]){var Q,de;H===(H=G(fe,Te))&&J?J.p(fe,Te):(J.d(1),J=H(fe),J&&(J.c(),J.m(e,a))),Te&1&&v!==(v=(fe[7]?fe[0].place_name:fe[0].place_name.replace(/,.*/,""))+"")&&cr(S,v),Te&37&&(T=fe[2]==="always"||fe[2]&&!fe[0].address&&((Q=fe[0].properties)==null?void 0:Q.kind)!=="road"&&((de=fe[0].properties)==null?void 0:de.kind)!=="road_relation"&&!fe[0].id.startsWith("address.")&&!fe[0].id.startsWith("postal_code.")&&(!fe[0].id.startsWith("poi.")||!fe[5])&&!fe[7]),T?oe?oe.p(fe,Te):(oe=PS(fe),oe.c(),oe.m(l,null)):oe&&(oe.d(1),oe=null),Te&1&&R!==(R=(fe[7]?"":fe[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&cr(z,R),Te&2&&Ce(e,"data-selected",fe[1]),Te&2&&xl(e,"selected",fe[1])},i:Mt,o:Mt,d(fe){fe&&xe(e),J.d(),oe&&oe.d(),U=!1,Jr(F)}}}function B5(t,e,n){var G;let r,i,{feature:a}=e,{selected:c=!1}=e,{showPlaceType:l}=e,{missingIconsCache:d}=e,{iconsBaseUrl:v}=e;const S=(G=a.properties)==null?void 0:G.categories;let E,T,M=0,k=a.place_type[0]==="reverse";function R(H){T&&d.add(T),n(10,M++,M)}function z(H){gn.call(this,t,H)}function U(H){gn.call(this,t,H)}const F=H=>R(H.currentTarget);return t.$$set=H=>{"feature"in H&&n(0,a=H.feature),"selected"in H&&n(1,c=H.selected),"showPlaceType"in H&&n(2,l=H.showPlaceType),"missingIconsCache"in H&&n(9,d=H.missingIconsCache),"iconsBaseUrl"in H&&n(3,v=H.iconsBaseUrl)},t.$$.update=()=>{var H,J,oe,ie;if(t.$$.dirty&3640)do n(11,r--,r),n(4,E=S==null?void 0:S[r]),n(5,T=E?v+E.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!T||d.has(T)));t.$$.dirty&1&&n(6,i=a.id.startsWith("poi.")?(J=(H=a.properties)==null?void 0:H.categories)==null?void 0:J.join(", "):((ie=(oe=a.properties)==null?void 0:oe.place_type_name)==null?void 0:ie[0])??a.place_type[0])},n(11,r=(S==null?void 0:S.length)??0),[a,c,l,v,E,T,i,k,R,d,M,r,z,U,F]}class V5 extends Xt{constructor(e){super(),Zt(this,e,B5,F5,Vt,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function U5(t){let e;return{c(){e=ye("div"),e.innerHTML='',Ce(e,"class","svelte-7cmwmc")},m(n,r){we(n,e,r)},p:Mt,i:Mt,o:Mt,d(n){n&&xe(e)}}}class j5 extends Xt{constructor(e){super(),Zt(this,e,null,U5,Vt,{})}}function G5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),Ce(e,"viewBox","0 0 60.006 21.412"),Ce(e,"width","14"),Ce(e,"height","20"),Ce(e,"class","svelte-en2qvf")},m(r,i){we(r,e,i),ae(e,n)},p:Mt,i:Mt,o:Mt,d(r){r&&xe(e)}}}class q5 extends Xt{constructor(e){super(),Zt(this,e,null,G5,Vt,{})}}function W5(t){let e,n,r;return{c(){e=su("svg"),n=su("circle"),r=su("path"),Ce(n,"cx","4.789"),Ce(n,"cy","4.787"),Ce(n,"r","3.85"),or(n,"stroke-width","1.875"),or(n,"fill","none"),Ce(r,"d","M12.063 12.063 7.635 7.635"),or(r,"stroke-width","1.875"),or(r,"stroke-linecap","round"),Ce(e,"xmlns","http://www.w3.org/2000/svg"),Ce(e,"width","13"),Ce(e,"height","13"),Ce(e,"viewBox","0 0 13 13"),Ce(e,"class","svelte-1bpbt60")},m(i,a){we(i,e,a),ae(e,n),ae(e,r)},p:Mt,i:Mt,o:Mt,d(i){i&&xe(e)}}}class H5 extends Xt{constructor(e){super(),Zt(this,e,null,W5,Vt,{})}}function Z5(t,e,n){const r=e[1],i=e[0],a=r-i;return t===r&&n?t:((t-i)%a+a)%a+i}function MS(t){const e=[...t];return e[2]r[0]||i.maxZoom!=null&&i.maxZoomDate.now()){if(!wd.coords)break e;return wd.coords}let a;try{return a=await new Promise((c,l)=>{n.signal.addEventListener("abort",()=>{l(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{c([d.coords.longitude,d.coords.latitude].map(v=>v.toFixed(6)).join(","))},d=>{l(d)},i)}),a}catch{}finally{i.cachedLocationExpiry&&(wd={time:Date.now(),coords:a})}if(n.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}const AS=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,kS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,DS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,RS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function Y5(t){if(!["DMS","DM","DD"].includes(t))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(t=="DD")return this.decimalCoordinates;const e=this.decimalCoordinates.split(",").map(c=>Number(c.trim()));let n=NS(e[0],t),r=NS(e[1],t);n.endsWith('.0"')&&r.endsWith('.0"')&&(n=n.replace(/\.0"$/,'"'),r=r.replace(/\.0"$/,'"'));const i=e[0]>=0?" N":" S",a=e[1]>=0?" E":" W";return`${n+i}, ${r+a}`}else throw new Error("no decimal coordinates to convert")}function NS(t,e){const n=Math.abs(t),r=Math.floor(n),i=(n-r)*60;if(e=="DM"){let l=K5(i,3).toFixed(3).padStart(6,"0");return`${r}° ${l}'`}let a=Math.floor(i),c=((i-a)*60).toFixed(1).padStart(4,"0");return a=a.toString().padStart(2,"0"),`${r}° ${a}' ${c}"`}function K5(t,e){const n=Math.pow(10,e);return Math.round((t+Number.EPSILON)*n)/n}function ub(t,e){e||(e=5),t=t.replace(/\s+/g," ").trim();let n=null,r=null,i="",a="",c=[],l=!1;if(AS.test(t))if(c=AS.exec(t),l=Wg(c),l){if(n=c[2],r=c[6],n.includes(",")&&(n=n.replace(",",".")),r.includes(",")&&(r=r.replace(",",".")),Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");if(Number(Math.round(r))==Number(r))throw new Error("integer only coordinate provided");c[1]?(i=c[1],a=c[5]):c[4]&&(i=c[4],a=c[8])}else throw new Error("invalid decimal coordinate format");else if(kS.test(t))if(c=kS.exec(t),l=Wg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6].replace(",",".")/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[9])),c[11]&&(r+=c[11]/60),c[13]&&(r+=c[13].replace(",",".")/3600),parseInt(c[9])<0&&(r=-1*r),c[1]?(i=c[1],a=c[8]):c[7]&&(i=c[7],a=c[14]);else throw new Error("invalid DMS coordinates format");else if(DS.test(t))if(c=DS.exec(t),l=Wg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],a=c[9]):c[8]&&(i=c[8],a=c[16]);else throw new Error("invalid DMS coordinates format");else if(RS.test(t))if(c=RS.exec(t),l=Wg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],a=c[9]):c[8]&&(i=c[8],a=c[16]);else throw new Error("invalid coordinates format");if(l){if(Math.abs(r)>=180)throw new Error("invalid longitude value");if(Math.abs(n)>=90)throw new Error("invalid latitude value");if((i||a)&&(!i||!a))throw new Error("invalid coordinates format");if(i&&i==a)throw new Error("invalid coordinates format");let d=/S|SOUTH/i;d.test(i)&&n>0&&(n=-1*n),d=/W|WEST/i,d.test(a)&&r>0&&(r=-1*r);const v=c[0].trim();let S,E;const T=/[,/;\u0020]/g,M=v.match(T);if(M==null){const z=Math.floor(t.length/2);S=v.substring(0,z).trim(),E=v.substring(z).trim()}else{let z;M.length%2==1?z=Math.floor(M.length/2):z=M.length/2-1;let U=0;if(z==0)U=v.indexOf(M[0]),S=v.substring(0,U).trim(),E=v.substring(U+1).trim();else{let F=0,G=0;for(;F<=z;)U=v.indexOf(M[F],G),G=U+1,F++;S=v.substring(0,U).trim(),E=v.substring(U+1).trim()}}const k=S.split(".");if(k.length==2&&k[1]==0&&k[1].length!=2)throw new Error("invalid coordinates format");const R=E.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(S)||/^\d+$/.test(E))throw new Error("degree only coordinate/s provided");return isNaN(n)&&n.includes(",")&&(n=n.replace(",",".")),n=Number(Number(n).toFixed(e)),isNaN(r)&&r.includes(",")&&(r=r.replace(",",".")),r=Number(Number(r).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:S,verbatimLongitude:E,decimalLatitude:n,decimalLongitude:r,decimalCoordinates:`${n},${r}`,closeEnough:J5,toCoordinateFormat:Y5})}else throw new Error("coordinates pattern match failed")}function Wg(t){if(!isNaN(t[0]))return!1;const e=[...t];if(e.shift(),e.length%2>0)return!1;const n=/^[-+]?\d+([\.,]\d+)?$/,r=/[eastsouthnorthwest]+/i,i=e.length/2;for(let a=0;a{e.decimalLatitude?t.push(e):t.push({...e,...ez})}),[...t,...tz,...nz]}const iz=rz();ub.formats=iz.map(t=>t.verbatimCoordinates);const oz=ub;function zS(t,e,n){const r=t.slice();return r[81]=e[n],r[83]=n,r}function FS(t){let e,n;return e=new j5({}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function BS(t){let e,n,r,i,a;return n=new q5({}),{c(){e=ye("button"),He(n.$$.fragment),Ce(e,"type","button"),Ce(e,"title",t[9]),Ce(e,"class","svelte-zh3kmv"),xl(e,"active",t[0])},m(c,l){we(c,e,l),qe(n,e,null),r=!0,i||(a=Pt(e,"click",t[67]),i=!0)},p(c,l){(!r||l[0]&512)&&Ce(e,"title",c[9]),(!r||l[0]&1)&&xl(e,"active",c[0])},i(c){r||(he(n.$$.fragment,c),r=!0)},o(c){ve(n.$$.fragment,c),r=!1},d(c){c&&xe(e),We(n),i=!1,a()}}}function sz(t){let e,n=[],r=new Map,i,a,c,l=vs(t[14]);const d=v=>v[81].id+(v[81].address?","+v[81].address:"");for(let v=0;v{ie=null}),jn()),(!G||it[0]&2)&&xl(v,"displayable",Me[1]!==""),Me[5]===!0?ce?(ce.p(Me,it),it[0]&32&&he(ce,1)):(ce=BS(Me),ce.c(),he(ce,1),ce.m(r,k)):ce&&(Un(),ve(ce,1,1,()=>{ce=null}),jn()),Te&&Te.p&&(!G||it[1]&134217728)&&Ir(Te,fe,Me,Me[58],G?Er(fe,Me[58],it,null):Cr(Me[58]),null);let ct=z;z=Qe(Me),z===ct?~z&&de[z].p(Me,it):(U&&(Un(),ve(de[ct],1,1,()=>{de[ct]=null}),jn()),~z?(U=de[z],U?U.p(Me,it):(U=de[z]=Q[z](Me),U.c()),he(U,1),U.m(n,null)):U=null),(!G||it[0]&4&&F!==(F=u_(Me[2])+" svelte-zh3kmv"))&&Ce(n,"class",F),(!G||it[0]&22)&&xl(n,"can-collapse",Me[4]&&Me[1]==="")},i(Me){G||(he(oe),he(a.$$.fragment,Me),he(E.$$.fragment,Me),he(ie),he(ce),he(Te,Me),he(U),G=!0)},o(Me){ve(oe),ve(a.$$.fragment,Me),ve(E.$$.fragment,Me),ve(ie),ve(ce),ve(Te,Me),ve(U),G=!1},d(Me){Me&&(xe(e),xe(n)),We(a),t[61](null),We(E),ie&&ie.d(),ce&&ce.d(),Te&&Te.d(Me),~z&&de[z].d(),H=!1,Jr(J)}}}function hz(t,e,n){let r,{$$slots:i={},$$scope:a}=e,{class:c=void 0}=e,{apiKey:l}=e,{bbox:d=void 0}=e,{clearButtonTitle:v="clear"}=e,{clearOnBlur:S=!1}=e,{collapsed:E=!1}=e,{country:T=void 0}=e,{debounceSearch:M=200}=e,{enableReverse:k=!1}=e,{errorMessage:R="Something went wrong…"}=e,{filter:z=()=>!0}=e,{flyTo:U=!0}=e,{fuzzyMatch:F=!0}=e,{language:G=void 0}=e,{limit:H=void 0}=e,{mapController:J=void 0}=e,{minLength:oe=2}=e,{noResultsMessage:ie="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:ce="Search"}=e,{proximity:fe=[{type:"server-geolocation"}]}=e,{reverseActive:Te=k==="always"}=e,{reverseButtonTitle:Q="toggle reverse geocoding"}=e,{searchValue:de=""}=e,{showFullGeometry:Qe=!0}=e,{showPlaceType:Me="ifNeeded"}=e,{showResultsWhileTyping:it=!0}=e,{selectFirst:ct=!0}=e,{flyToSelected:je=!1}=e,{markerOnSelected:Ot=!0}=e,{types:jt=void 0}=e,{excludeTypes:vt=!1}=e,{zoom:At=16}=e,{maxZoom:Lt=18}=e,{apiUrl:rn="https://api.maptiler.com/geocoding"}=e,{fetchParameters:xn={}}=e,{iconsBaseUrl:fn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.2.2/icons/"}=e,{adjustUrlQuery:_n=ee=>{}}=e;function pn(){Re.focus()}function Yn(){Re.blur()}function zr(ee,Pe=!0){n(1,de=ee),Pe?(n(15,It=-1),zl()):(li(),setTimeout(()=>{Re.focus(),Re.select()}))}function Ln(){n(14,te=void 0),n(55,dt=void 0),n(15,It=-1)}function sr(){n(54,Ae=[]),n(55,dt=void 0)}let Zn=!1,te,Ae,dt,en="",Re,It=-1,In,yn=[],lr,Bo,Is,Ks;const tl=new Set,Bi=vu();no(()=>{J&&(J.setEventHandler(void 0),J.indicateReverse(!1),J.setSelectedMarker(-1),J.setMarkers(void 0,void 0))});function zl(ee){if(Bo&&(clearTimeout(Bo),Bo=void 0),It>-1&&te)n(55,dt=te[It]),n(1,de=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),n(18,In=void 0),n(54,Ae=void 0),n(15,It=-1);else if(de){const Pe=ee||!Cs(de);ot(de,{exact:!0}).then(()=>{n(54,Ae=te),n(55,dt=void 0),Pe&&ls()}).catch(Se=>n(18,In=Se))}}function Cs(ee){try{return oz(ee,6)}catch{return!1}}async function ot(ee,{byId:Pe=!1,exact:Se=!1}={}){n(18,In=void 0),lr==null||lr.abort();const Ne=new AbortController;n(19,lr=Ne);try{const Ue=Cs(ee),Ye=new URLSearchParams;if(G!==void 0&&Ye.set("language",Array.isArray(G)?G.join(","):G??""),jt&&Ye.set("types",jt.join(",")),vt&&Ye.set("excludeTypes",String(vt)),d&&Ye.set("bbox",d.map(Qt=>Qt.toFixed(6)).join(",")),T&&Ye.set("country",Array.isArray(T)?T.join(","):T),!Pe&&!Ue){const Qt=await X5(J,fe,Ne);Qt&&Ye.set("proximity",Qt),(Se||!it)&&Ye.set("autocomplete","false"),Ye.set("fuzzyMatch",String(F))}H!==void 0&&(!Ue||(jt==null?void 0:jt.length)===1)&&Ye.set("limit",String(H)),Ye.set("key",l),_n(Ye);const Je=rn+"/"+encodeURIComponent(Ue?Ue.decimalLongitude+","+Ue.decimalLatitude:ee)+".json?"+Ye.toString();if(Je===en){Pe?(n(14,te=void 0),n(55,dt=yn[0])):n(14,te=yn);return}en=Je;const Dt=await fetch(Je,{signal:Ne.signal,...xn});if(!Dt.ok)throw new Error(await Dt.text());const zt=await Dt.json();Bi("response",{url:Je,featureCollection:zt}),Pe?(n(14,te=void 0),n(55,dt=zt.features[0]),yn=[dt]):(n(14,te=zt.features.filter(z)),Ue&&te.unshift({type:"Feature",properties:{},id:"reverse_"+Ue.decimalLongitude+"_"+Ue.decimalLatitude,text:Ue.decimalLatitude+", "+Ue.decimalLongitude,place_name:Ue.decimalLatitude+", "+Ue.decimalLongitude,place_type:["reverse"],center:[Ue.decimalLongitude,Ue.decimalLatitude],bbox:[Ue.decimalLongitude,Ue.decimalLatitude,Ue.decimalLongitude,Ue.decimalLatitude],geometry:{type:"Point",coordinates:[Ue.decimalLongitude,Ue.decimalLatitude]}}),yn=te,Ue&&Re.focus())}catch(Ue){if(Ue&&typeof Ue=="object"&&"name"in Ue&&Ue.name==="AbortError")return;throw Ue}finally{Ne===lr&&n(19,lr=void 0)}}function ls(){var Se;if(!(Ae!=null&&Ae.length)||!U)return;const ee=[180,90,-180,-90],Pe=!Ae.some(Ne=>!Ne.matching_text);for(const Ne of Ae)if(Pe||!Ne.matching_text)for(const Ue of[0,1,2,3])ee[Ue]=Math[Ue<2?"min":"max"](ee[Ue],((Se=Ne.bbox)==null?void 0:Se[Ue])??Ne.center[Ue%2]);J&&Ae.length>0&&(dt&&ee[0]===ee[2]&&ee[1]===ee[3]?J.flyTo(dt.center,At):J.fitBounds(MS(ee),50,Lt))}function lo(ee){n(0,Te=k==="always"),n(14,te=void 0),n(55,dt=void 0),n(15,It=-1),zr(ee[1].toFixed(6)+", "+Z5(ee[0],[-180,180],!0).toFixed(6),!1)}function Fl(ee){if(!te)return;let Pe=ee.key==="ArrowDown"?1:ee.key==="ArrowUp"?-1:0;Pe&&(It===(ct?0:-1)&&Pe===-1&&n(15,It=te.length),n(15,It+=Pe),It>=te.length&&n(15,It=-1),It<0&&ct&&n(15,It=0),ee.preventDefault())}function li(ee=!0){if(n(18,In=void 0),it){if(Bo&&clearTimeout(Bo),de.length{ot(Pe).catch(Se=>n(18,In=Se))},ee?M:0)}else n(14,te=void 0),n(18,In=void 0)}function ft(ee){n(55,dt=ee),n(1,de=ee.place_name),n(15,It=-1)}const ln=()=>Re.focus();function sn(ee){si[ee?"unshift":"push"](()=>{Re=ee,n(17,Re)})}function Hr(){de=this.value,n(1,de),n(13,Zn),n(27,S)}const us=()=>n(13,Zn=!0),on=()=>n(13,Zn=!1),Aa=()=>li(),$r=()=>{n(1,de=""),Re.focus()},me=()=>n(0,Te=!Te),q=()=>n(18,In=void 0),Z=ee=>n(15,It=ee),$=ee=>ft(ee),se=()=>{ct||n(15,It=-1)},Le=()=>{};return t.$$set=ee=>{"class"in ee&&n(2,c=ee.class),"apiKey"in ee&&n(25,l=ee.apiKey),"bbox"in ee&&n(26,d=ee.bbox),"clearButtonTitle"in ee&&n(3,v=ee.clearButtonTitle),"clearOnBlur"in ee&&n(27,S=ee.clearOnBlur),"collapsed"in ee&&n(4,E=ee.collapsed),"country"in ee&&n(28,T=ee.country),"debounceSearch"in ee&&n(29,M=ee.debounceSearch),"enableReverse"in ee&&n(5,k=ee.enableReverse),"errorMessage"in ee&&n(6,R=ee.errorMessage),"filter"in ee&&n(30,z=ee.filter),"flyTo"in ee&&n(31,U=ee.flyTo),"fuzzyMatch"in ee&&n(32,F=ee.fuzzyMatch),"language"in ee&&n(33,G=ee.language),"limit"in ee&&n(34,H=ee.limit),"mapController"in ee&&n(35,J=ee.mapController),"minLength"in ee&&n(36,oe=ee.minLength),"noResultsMessage"in ee&&n(7,ie=ee.noResultsMessage),"placeholder"in ee&&n(8,ce=ee.placeholder),"proximity"in ee&&n(37,fe=ee.proximity),"reverseActive"in ee&&n(0,Te=ee.reverseActive),"reverseButtonTitle"in ee&&n(9,Q=ee.reverseButtonTitle),"searchValue"in ee&&n(1,de=ee.searchValue),"showFullGeometry"in ee&&n(38,Qe=ee.showFullGeometry),"showPlaceType"in ee&&n(10,Me=ee.showPlaceType),"showResultsWhileTyping"in ee&&n(39,it=ee.showResultsWhileTyping),"selectFirst"in ee&&n(11,ct=ee.selectFirst),"flyToSelected"in ee&&n(40,je=ee.flyToSelected),"markerOnSelected"in ee&&n(41,Ot=ee.markerOnSelected),"types"in ee&&n(42,jt=ee.types),"excludeTypes"in ee&&n(43,vt=ee.excludeTypes),"zoom"in ee&&n(44,At=ee.zoom),"maxZoom"in ee&&n(45,Lt=ee.maxZoom),"apiUrl"in ee&&n(46,rn=ee.apiUrl),"fetchParameters"in ee&&n(47,xn=ee.fetchParameters),"iconsBaseUrl"in ee&&n(12,fn=ee.iconsBaseUrl),"adjustUrlQuery"in ee&&n(48,_n=ee.adjustUrlQuery),"$$scope"in ee&&n(58,a=ee.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&134225920&&setTimeout(()=>{n(16,Is=Zn),S&&!Zn&&n(1,de="")}),t.$$.dirty[0]&16386|t.$$.dirty[1]&32&&de.lengthn(18,In=ee)),t.$$.dirty[1]&50356241&&(J&&dt&&dt.id!==Ks&&U&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?J.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Lt:At):J.fitBounds(MS(dt.bbox),50,Lt),n(14,te=void 0),n(54,Ae=void 0),n(15,It=-1)),n(56,Ks=dt==null?void 0:dt.id)),t.$$.dirty[0]&18432&&ct&&te!=null&&te.length&&n(15,It=0),t.$$.dirty[0]&2050&&(ct||n(15,It=-1)),t.$$.dirty[0]&16384|t.$$.dirty[1]&8388608&&Ae!==te&&n(54,Ae=void 0),t.$$.dirty[0]&81921|t.$$.dirty[1]&8388624&&J&&J.setEventHandler(ee=>{switch(ee.type){case"mapClick":Te&&lo(ee.coordinates);break;case"markerClick":{const Pe=te==null?void 0:te.find(Se=>Se.id===ee.id);Pe&&ft(Pe)}break;case"markerMouseEnter":Ae&&n(15,It=Is?(te==null?void 0:te.findIndex(Pe=>Pe.id===ee.id))??-1:-1);break;case"markerMouseLeave":Ae&&n(15,It=-1);break}}),t.$$.dirty[0]&49152&&n(57,r=te==null?void 0:te[It]),t.$$.dirty[1]&67133969&&J&&r&&U&&je&&J.flyTo(r.center,r.id.startsWith("poi.")||r.id.startsWith("address.")?Lt:At),t.$$.dirty[1]&1040&&(Ot||J==null||J.setMarkers(void 0,void 0)),t.$$.dirty[1]&75498512&&J&&Ot&&!Ae&&(J.setMarkers(r?[r]:void 0,void 0),J.setSelectedMarker(r?0:-1)),t.$$.dirty[1]&25165840&&J&&J.setMarkers(Ae,dt),t.$$.dirty[0]&32768|t.$$.dirty[1]&8388624&&Ae&&J&&J.setSelectedMarker(It),t.$$.dirty[0]&2|t.$$.dirty[1]&16&&J){const ee=Cs(de);J.setReverseMarker(ee?[ee.decimalLongitude,ee.decimalLatitude]:void 0)}t.$$.dirty[1]&67108864&&Bi("select",r),t.$$.dirty[1]&16777216&&Bi("pick",dt),t.$$.dirty[0]&81920&&Bi("optionsVisibilityChange",Is&&!!te),t.$$.dirty[0]&16384&&Bi("featuresListed",te),t.$$.dirty[1]&8388608&&Bi("featuresMarked",Ae),t.$$.dirty[0]&1&&Bi("reverseToggle",Te),t.$$.dirty[0]&2&&Bi("queryChange",de),t.$$.dirty[0]&1|t.$$.dirty[1]&16&&J&&J.indicateReverse(Te)},[Te,de,c,v,E,k,R,ie,ce,Q,Me,ct,fn,Zn,te,It,Is,Re,In,lr,tl,zl,Fl,li,ft,l,d,S,T,M,z,U,F,G,H,J,oe,fe,Qe,it,je,Ot,jt,vt,At,Lt,rn,xn,_n,pn,Yn,zr,Ln,sr,Ae,dt,Ks,r,a,i,ln,sn,Hr,us,on,Aa,$r,me,q,Z,$,se,Le]}class fz extends Xt{constructor(e){super(),Zt(this,e,hz,cz,Vt,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}}function US(t){let e,n,r;return n=new fz({props:{mapController:t[1],apiKey:t[0]}}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"class","svelte-ixhnie")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p(i,a){const c={};a&2&&(c.mapController=i[1]),a&1&&(c.apiKey=i[0]),n.$set(c)},i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function pz(t){let e,n,r=t[1]&&US(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,[a]){i[1]?r?(r.p(i,a),a&2&&he(r,1)):(r=US(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function dz(t,e,n){let r,{apiKey:i}=e,{map:a}=e;return t.$$set=c=>{"apiKey"in c&&n(0,i=c.apiKey),"map"in c&&n(2,a=c.map)},t.$$.update=()=>{t.$$.dirty&4&&n(1,r=a?T5(a,Fs):null)},[i,r,a]}class mz extends Xt{constructor(e){super(),Zt(this,e,dz,pz,Vt,{apiKey:0,map:2})}}const gz=["==",["geometry-type"],"Polygon"],_z=["==",["geometry-type"],"LineString"],yz=["==",["geometry-type"],"Point"];function Rd(t,e,n){let r=["match",t];for(let[i,a]of Object.entries(e))r.push(i),r.push(a);return r.push(n),r}const vz=t=>({}),jS=t=>({}),bz=t=>({}),GS=t=>({}),xz=t=>({}),qS=t=>({});function wz(t){let e,n,r,i,a,c;const l=t[1].top,d=Sr(l,t,t[0],qS),v=t[1].left,S=Sr(v,t,t[0],GS),E=t[1].main,T=Sr(E,t,t[0],jS);return{c(){e=ye("div"),d&&d.c(),n=Xe(),r=ye("div"),S&&S.c(),i=Xe(),a=ye("div"),T&&T.c(),Ce(e,"class","top svelte-mpick2"),Ce(r,"class","left svelte-mpick2"),Ce(a,"class","main svelte-mpick2")},m(M,k){we(M,e,k),d&&d.m(e,null),we(M,n,k),we(M,r,k),S&&S.m(r,null),we(M,i,k),we(M,a,k),T&&T.m(a,null),c=!0},p(M,[k]){d&&d.p&&(!c||k&1)&&Ir(d,l,M,M[0],c?Er(l,M[0],k,xz):Cr(M[0]),qS),S&&S.p&&(!c||k&1)&&Ir(S,v,M,M[0],c?Er(v,M[0],k,bz):Cr(M[0]),GS),T&&T.p&&(!c||k&1)&&Ir(T,E,M,M[0],c?Er(E,M[0],k,vz):Cr(M[0]),jS)},i(M){c||(he(d,M),he(S,M),he(T,M),c=!0)},o(M){ve(d,M),ve(S,M),ve(T,M),c=!1},d(M){M&&(xe(e),xe(n),xe(r),xe(i),xe(a)),d&&d.d(M),S&&S.d(M),T&&T.d(M)}}}function Sz(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=a=>{"$$scope"in a&&n(0,i=a.$$scope)},[i,r]}class Ez extends Xt{constructor(e){super(),Zt(this,e,Sz,wz,Vt,{})}}const Iz=t=>({}),WS=t=>({}),Cz=t=>({}),HS=t=>({}),Tz=t=>({}),ZS=t=>({});function Lz(t){let e,n,r,i,a,c;const l=t[4].top,d=Sr(l,t,t[3],ZS),v=t[4].sidebar,S=Sr(v,t,t[3],HS),E=t[4].map,T=Sr(E,t,t[3],WS);return{c(){e=ye("div"),d&&d.c(),n=Xe(),r=ye("div"),S&&S.c(),i=Xe(),a=ye("div"),T&&T.c()},m(M,k){we(M,e,k),d&&d.m(e,null),t[5](e),we(M,n,k),we(M,r,k),S&&S.m(r,null),t[6](r),we(M,i,k),we(M,a,k),T&&T.m(a,null),t[7](a),c=!0},p(M,[k]){d&&d.p&&(!c||k&8)&&Ir(d,l,M,M[3],c?Er(l,M[3],k,Tz):Cr(M[3]),ZS),S&&S.p&&(!c||k&8)&&Ir(S,v,M,M[3],c?Er(v,M[3],k,Cz):Cr(M[3]),HS),T&&T.p&&(!c||k&8)&&Ir(T,E,M,M[3],c?Er(E,M[3],k,Iz):Cr(M[3]),WS)},i(M){c||(he(d,M),he(S,M),he(T,M),c=!0)},o(M){ve(d,M),ve(S,M),ve(T,M),c=!1},d(M){M&&(xe(e),xe(n),xe(r),xe(i),xe(a)),d&&d.d(M),t[5](null),S&&S.d(M),t[6](null),T&&T.d(M),t[7](null)}}}function Pz(t,e,n){let r,i,a;_t(t,i1,E=>n(0,r=E)),_t(t,o1,E=>n(1,i=E)),_t(t,s1,E=>n(2,a=E));let{$$slots:c={},$$scope:l}=e;function d(E){si[E?"unshift":"push"](()=>{r=E,i1.set(r)})}function v(E){si[E?"unshift":"push"](()=>{i=E,o1.set(i)})}function S(E){si[E?"unshift":"push"](()=>{a=E,s1.set(a)})}return t.$$set=E=>{"$$scope"in E&&n(3,l=E.$$scope)},[r,i,a,l,c,d,v,S]}class hc extends Xt{constructor(e){super(),Zt(this,e,Pz,Lz,Vt,{})}}let i1=Nn(null),o1=Nn(null),s1=Nn(null);function Mz(t){let e,n,r,i,a,c,l,d,v;return{c(){e=ye("label"),n=ut(`Basemap: - `),r=ye("select"),i=ye("option"),i.textContent="MapTiler Dataviz",a=ye("option"),a.textContent="MapTiler Streets",c=ye("option"),c.textContent="MapTiler Satellite",l=ye("option"),l.textContent="OS Open Zoomstack",i.__value="dataviz",Qo(i,i.__value),a.__value="streets",Qo(a,a.__value),c.__value="hybrid",Qo(c,c.__value),l.__value="uk-openzoomstack-light",Qo(l,l.__value),t[0]===void 0&&Hd(()=>t[1].call(r))},m(S,E){we(S,e,E),ae(e,n),ae(e,r),ae(r,i),ae(r,a),ae(r,c),ae(r,l),c_(r,t[0],!0),d||(v=Pt(r,"change",t[1]),d=!0)},p(S,[E]){E&1&&c_(r,S[0])},i:Mt,o:Mt,d(S){S&&xe(e),d=!1,v()}}}function Az(t,e,n){let r;_t(t,Fv,a=>n(0,r=a));function i(){r=OE(this),Fv.set(r)}return[r,i]}class kz extends Xt{constructor(e){super(),Zt(this,e,Az,Mz,Vt,{})}}let l_=Nn(!0);function Dz(t){let e,n;return e=new lh({props:{paint:{"fill-color":"black","fill-opacity":0},layout:{visibility:t[0]?"none":"visible"}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.layout={visibility:r[0]?"none":"visible"}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function Rz(t){let e,n;return e=new es({props:{data:t[1],$$slots:{default:[Dz]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&5&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function Nz(t,e,n){let r;return _t(t,l_,a=>n(0,r=a)),[r,{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]}}]}class Oz extends Xt{constructor(e){super(),Zt(this,e,Nz,Rz,Vt,{})}}function zz(t){let e,n,r,i;const a=t[1].default,c=Sr(a,t,t[0],null);return{c(){e=ye("a"),c&&c.c(),Ce(e,"href","#")},m(l,d){we(l,e,d),c&&c.m(e,null),n=!0,r||(i=Pt(e,"click",NE(t[2])),r=!0)},p(l,[d]){c&&c.p&&(!n||d&1)&&Ir(c,a,l,l[0],n?Er(a,l[0],d,null):Cr(l[0]),null)},i(l){n||(he(c,l),n=!0)},o(l){ve(c,l),n=!1},d(l){l&&xe(e),c&&c.d(l),r=!1,i()}}}function Fz(t,e,n){let{$$slots:r={},$$scope:i}=e;function a(c){gn.call(this,t,c)}return t.$$set=c=>{"$$scope"in c&&n(0,i=c.$$scope)},[i,r,a]}class _r extends Xt{constructor(e){super(),Zt(this,e,Fz,zz,Vt,{})}}const Bz=t=>({props:t&8}),XS=t=>({props:jz(t[3])});function Vz(t){let e;const n=t[1].default,r=Sr(n,t,t[2],XS);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&12)&&Ir(r,n,i,i[2],e?Er(n,i[2],a,Bz):Cr(i[2]),XS)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function Uz(t){let e,n;return e=new xN({props:{openOn:t[0],popupClass:"popup",$$slots:{default:[Vz,({features:r})=>({3:r}),({features:r})=>r?8:0]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&1&&(a.openOn=r[0]),i&12&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function jz(t){return t?t[0].properties??{}:(console.log("A Popup with null features should be impossible"),{})}function Gz(t,e,n){let{$$slots:r={},$$scope:i}=e,{openOn:a="hover"}=e;return t.$$set=c=>{"openOn"in c&&n(0,a=c.openOn),"$$scope"in c&&n(2,i=c.$$scope)},[a,r,i]}class fc extends Xt{constructor(e){super(),Zt(this,e,Gz,Uz,Vt,{openOn:0})}}function qz(t,e){let n=new Set(t.getStyle().layers.filter(r=>r.type=="line").map(r=>r.id));if(e=="dataviz")return["Road network","Path"].filter(r=>n.has(r));if(e=="hybrid")return["Path","Road","Tunnel"].filter(r=>n.has(r));if(e=="streets"){let r=[];for(let i of["road","bridge","tunnel"])for(let a of["link","minor","minor_construction","motorway","motorway_construction","motorway_link","path_pedestrian","secondary_tertiary","secondary_tertiary_construction","service_track","service_track_construction","street","trunk_primary","trunk_primary_construction","trunk_primary_link"])r.push(`${i}_${a}`);return r.filter(i=>n.has(i))}return e=="uk-openzoomstack-light"?t.getStyle().layers.filter(r=>r["source-layer"]=="roads"&&r.type=="line").map(r=>r.id):[]}const{window:Wz}=c1;function Hz(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k,R;return M=FP(t[8][0]),{c(){e=ye("button"),e.textContent="Stop StreetView",n=Xe(),r=ye("fieldset"),i=ye("legend"),i.textContent="Source:",a=Xe(),c=ye("label"),l=ye("input"),d=ut(` - Google Street View`),v=Xe(),S=ye("label"),E=ye("input"),T=ut(` - Bing Streetside`),Ce(e,"class","secondary"),Ce(l,"type","radio"),l.__value="google",Qo(l,l.__value),Ce(E,"type","radio"),E.__value="bing",Qo(E,E.__value),M.p(l,E)},m(z,U){we(z,e,U),we(z,n,U),we(z,r,U),ae(r,i),ae(r,a),ae(r,c),ae(c,l),l.checked=l.__value===t[0],ae(c,d),ae(r,v),ae(r,S),ae(S,E),E.checked=E.__value===t[0],ae(S,T),k||(R=[Pt(e,"click",t[3]),Pt(l,"change",t[7]),Pt(E,"change",t[9])],k=!0)},p(z,U){U&1&&(l.checked=l.__value===z[0]),U&1&&(E.checked=E.__value===z[0])},d(z){z&&(xe(e),xe(n),xe(r)),M.r(),k=!1,Jr(R)}}}function Zz(t){let e,n,r;return{c(){e=ye("button"),e.textContent="StreetView",Ce(e,"class","secondary")},m(i,a){we(i,e,a),n||(r=Pt(e,"click",t[2]),n=!0)},p:Mt,d(i){i&&xe(e),n=!1,r()}}}function Xz(t){let e,n,r;function i(l,d){return l[1]?Zz:Hz}let a=i(t),c=a(t);return{c(){c.c(),e=Fi()},m(l,d){c.m(l,d),we(l,e,d),n||(r=Pt(Wz,"keydown",t[4]),n=!0)},p(l,[d]){a===(a=i(l))&&c?c.p(l,d):(c.d(1),c=a(l),c&&(c.c(),c.m(e.parentNode,e)))},i:Mt,o:Mt,d(l){l&&xe(e),c.d(l),n=!1,r()}}}function Yz(t,e,n){let r;_t(t,l_,R=>n(1,r=R));let{map:i}=e,{maptilerBasemap:a}=e,c="google",l=[];function d(){qt(l_,r=!1,r),i.on("click",S),i.getCanvas().style.cursor="crosshair";for(let R of qz(i,a))l.push([R,i.getPaintProperty(R,"line-color")]),i.setPaintProperty(R,"line-color","cyan")}function v(){qt(l_,r=!0,r),i.off("click",S),i.getCanvas().style.cursor="inherit";for(let[R,z]of l)i.setPaintProperty(R,"line-color",z);l=[]}no(v);function S(R){let z=R.lngLat.lng,U=R.lngLat.lat;c=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${U},${z}&cbp=11,0,0,0,0`,"_blank"):c=="bing"&&window.open(`https://www.bing.com/maps?cp=${U}~${z}&style=x`,"_blank")}function E(R){!r&&R.key=="Escape"&&(R.stopPropagation(),v())}const T=[[]];function M(){c=this.__value,n(0,c)}function k(){c=this.__value,n(0,c)}return t.$$set=R=>{"map"in R&&n(5,i=R.map),"maptilerBasemap"in R&&n(6,a=R.maptilerBasemap)},[c,r,d,v,E,i,a,M,T,k]}class Kz extends Xt{constructor(e){super(),Zt(this,e,Yz,Xz,Vt,{map:5,maptilerBasemap:6})}}function Ri(t){return{id:t,beforeId:Jz(t)}}function Jz(t){let e=ca(uu);if(!e){console.warn(`getBeforeId(${t}) called before map is ready. Z-ordering may be incorrect.`);return}let n,r=!1;for(let i=YS.length-1;i>=0;i--){let a=YS[i];if(a==t){r=!0;break}e.getLayer(a)&&(n=a)}if(!r)throw new Error(`Layer ID ${t} not defined in layerZorder`);return n}const YS=["Background","neighbourhood-boundaries","Residential","debug-borders","debug-crosses","debug-filters","cells","interior-roads","compare-route","shortcuts","shortcuts-focus","Building","route-debug-nodes","route-points","route-lines","route-polygons","one-ways","Road labels","animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function $z(t){let e;return{c(){e=ut("Back")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function Qz(t){let e,n,r,i;return e=new _r({props:{$$slots:{default:[$z]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){He(e.$$.fragment)},m(a,c){qe(e,a,c),n=!0,r||(i=Pt(window,"keydown",t[1]),r=!0)},p(a,[c]){const l={};c&8&&(l.$$scope={dirty:c,ctx:a}),e.$set(l)},i(a){n||(he(e.$$.fragment,a),n=!0)},o(a){ve(e.$$.fragment,a),n=!1},d(a){We(e,a),r=!1,i()}}}function eF(t){let e=vu();function n(i){i.key=="Escape"&&(i.stopPropagation(),e("click"))}return[e,n,()=>e("click")]}class cb extends Xt{constructor(e){super(),Zt(this,e,eF,Qz,Vt,{})}}function tF(t){let e,n;const r=[Ri("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let i={};for(let a=0;a({}),KS=t=>({}),iF=t=>({}),JS=t=>({});function oF(t){let e,n;const r=[Ri("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let a=0;a{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function aF(t){let e,n,r,i,a,c,l,d,v;e=new es({props:{data:QS(t[3]),$$slots:{default:[oF]},$$scope:{ctx:t}}});const S=[Ri("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let E={};for(let z=0;zn.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function uF(t,e,n){let r,i,a,{$$slots:c={},$$scope:l}=e,{gjInput:d}=e,{interactive:v=!0}=e,{onClickLine:S=(T,M)=>{}}=e;const E=T=>v&&S(T.detail.features[0],T.detail.event.lngLat);return t.$$set=T=>{"gjInput"in T&&n(4,d=T.gjInput),"interactive"in T&&n(0,v=T.interactive),"onClickLine"in T&&n(1,S=T.onClickLine),"$$scope"in T&&n(8,l=T.$$scope)},t.$$.update=()=>{t.$$.dirty&16&&n(3,r=a1(d)),t.$$.dirty&16&&n(5,i=Math.max(...d.features.map(T=>T.properties.kind=="interior_road"?T.properties.shortcuts:0))),t.$$.dirty&32&&n(2,a=k_(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",i,"#A32015"],"blue"))},[v,S,a,r,d,i,c,E,l]}class Ey extends Xt{constructor(e){super(),Zt(this,e,uF,lF,Vt,{gjInput:4,interactive:0,onClickLine:1})}}function cF(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function hF(t){let e;return{c(){e=ut("Pick neighbourhood")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function fF(t){let e;return{c(){e=ut("Editing")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function pF(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k;return a=new _r({props:{$$slots:{default:[cF]},$$scope:{ctx:t}}}),a.$on("click",t[4]),d=new _r({props:{$$slots:{default:[hF]},$$scope:{ctx:t}}}),d.$on("click",t[5]),E=new _r({props:{$$slots:{default:[fF]},$$scope:{ctx:t}}}),E.$on("click",t[6]),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),He(d.$$.fragment),v=Xe(),S=ye("li"),He(E.$$.fragment),T=Xe(),M=ye("li"),M.textContent="Debug mode",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(R,z){we(R,e,z),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),qe(d,l,null),ae(r,v),ae(r,S),qe(E,S,null),ae(r,T),ae(r,M),k=!0},p(R,z){const U={};z&256&&(U.$$scope={dirty:z,ctx:R}),a.$set(U);const F={};z&256&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&256&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){k||(he(a.$$.fragment,R),he(d.$$.fragment,R),he(E.$$.fragment,R),k=!0)},o(R){ve(a.$$.fragment,R),ve(d.$$.fragment,R),ve(E.$$.fragment,R),k=!1},d(R){R&&xe(e),We(a),We(d),We(E)}}}function dF(t){let e,n,r;return n=new cb({}),n.$on("click",t[3]),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","sidebar")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p:Mt,i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function mF(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&128&&(a.properties=r[7]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function gF(t){let e,n,r;return n=new fc({props:{openOn:"hover",$$slots:{default:[mF,({props:i})=>({7:i}),({props:i})=>i?128:0]},$$scope:{ctx:t}}}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p(i,a){const c={};a&384&&(c.$$scope={dirty:a,ctx:i}),n.$set(c)},i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function _F(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&128&&(a.properties=r[7]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function yF(t){let e,n;return e=new fc({props:{openOn:"hover",$$slots:{default:[_F,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&384&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function vF(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&128&&(a.properties=r[7]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function bF(t){let e,n;return e=new fc({props:{openOn:"hover",$$slots:{default:[vF,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&384&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function xF(t){let e,n,r,i;const a=[Ri("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let c={$$slots:{default:[yF]},$$scope:{ctx:t}};for(let v=0;v({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&384&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function EF(t){let e,n;const r=[Ri("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let i={$$slots:{default:[SF]},$$scope:{ctx:t}};for(let a=0;an(0,r=S)),_t(t,Rn,S=>n(1,i=S)),[r,i,(S,E)=>window.open(Rr(S.properties).way,"_blank"),()=>qt(Rn,i={mode:"neighbourhood"},i),()=>qt(Rn,i={mode:"title"},i),()=>qt(Rn,i={mode:"network"},i),()=>qt(Rn,i={mode:"neighbourhood"},i)]}class LF extends Xt{constructor(e){super(),Zt(this,e,TF,CF,Vt,{})}}function eE(t,e,n){const r=t.slice();return r[7]=e[n][0],r[8]=e[n][1],r[9]=e[n][2],r}function tE(t){let e,n,r,i,a,c,l=t[8]+"",d,v,S,E,T;function M(){return t[3](t[7])}return{c(){e=ye("button"),n=ye("img"),i=Xe(),a=ye("br"),c=Xe(),d=ut(l),v=Xe(),Wn(n.src,r=`/ltn//filters/${t[7]}_icon.gif`)||Ce(n,"src",r),Ce(n,"width","80"),Ce(n,"alt",t[8]),Ce(e,"class","outline"),or(e,"width","100%"),e.disabled=S=t[0]==t[7]},m(k,R){we(k,e,R),ae(e,n),ae(e,i),ae(e,a),ae(e,c),ae(e,d),ae(e,v),E||(T=Pt(e,"click",M),E=!0)},p(k,R){t=k,R&1&&S!==(S=t[0]==t[7])&&(e.disabled=S)},d(k){k&&xe(e),E=!1,T()}}}function PF(t){let e,n,r,i,a,c,l,d,v,S,E,T,M=t[1][2]+"",k,R,z,U,F,G,H=vs(t[2]),J=[];for(let ie=0;ie({6:r}),({dialog:r})=>r?64:0]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&4163&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function AF(t,e,n){let r,i;_t(t,Uv,v=>n(0,i=v));let a=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const c=v=>qt(Uv,i=v,i),l=v=>Rr(v).close();function d(v){gn.call(this,t,v)}return t.$$.update=()=>{t.$$.dirty&1&&n(1,r=a.find(v=>v[0]==i))},[i,r,a,c,l,d]}class kF extends Xt{constructor(e){super(),Zt(this,e,AF,MF,Vt,{})}}function nE(t){let e,n;return e=new es({props:{data:t[0],$$slots:{default:[DF]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.data=r[0]),i&64&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function DF(t){let e,n;const r=[Ri("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let i={};for(let a=0;a{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function NF(t,e,n){let{map:r}=e,i=null;const a=vu();r.on("dragstart",c),r.on("mousemove",l),r.on("mouseup",d),no(()=>{r.dragPan.enable(),r.off("dragstart",c),r.off("mousemove",l),r.off("mouseup",d)});function c(){r.dragPan.disable(),n(0,i={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function l(v){i&&(i.geometry.coordinates.push(v.lngLat.toArray()),n(0,i))}function d(){i&&(a("done",i),n(0,i=null))}return t.$$set=v=>{"map"in v&&n(1,r=v.map)},[i,r]}class OF extends Xt{constructor(e){super(),Zt(this,e,NF,RF,Vt,{map:1})}}function zF(t){let e;const n=t[3].default,r=Sr(n,t,t[5],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&32)&&Ir(r,n,i,i[5],e?Er(n,i[5],a,null):Cr(i[5]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function FF(t){let e,n;const r=[Ri("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let i={$$slots:{default:[zF]},$$scope:{ctx:t}};for(let a=0;an(1,i=v)),_t(t,ju,v=>n(2,a=v));let{$$slots:c={},$$scope:l}=e;function d(v){gn.call(this,t,v)}return t.$$set=v=>{"$$scope"in v&&n(5,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&6&&n(0,r=a>0?JSON.parse(i.renderModalFilters()):null)},[r,i,a,c,d,l]}class Iy extends Xt{constructor(e){super(),Zt(this,e,VF,BF,Vt,{})}}var UF=Object.defineProperty,pr=(t,e)=>UF(t,"name",{value:e,configurable:!0}),jF=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!Nd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=l1(e),i=l1(n);return r.every(a=>i.some(c=>this.compare(a,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(a=>i.some(c=>this.compareLine(a,c,1,!0)))}return!1}compareGeometryCollection(e,n){return Nd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return Nd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};pr(jF,"GeojsonEquality");function Nd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}pr(Nd,"sameLength");function l1(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}pr(l1,"explode");var Os=63710088e-1,ST={centimeters:Os*100,centimetres:Os*100,degrees:360/(2*Math.PI),feet:Os*3.28084,inches:Os*39.37,kilometers:Os/1e3,kilometres:Os/1e3,meters:Os,metres:Os,miles:Os/1609.344,millimeters:Os*1e3,millimetres:Os*1e3,nauticalmiles:Os/1852,radians:1,yards:Os*1.0936},rE={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 pc(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}pr(pc,"feature");function GF(t,e,n={}){switch(t){case"Point":return tp(e).geometry;case"LineString":return fb(e).geometry;case"Polygon":return hb(e).geometry;case"MultiPoint":return IT(e).geometry;case"MultiLineString":return ET(e).geometry;case"MultiPolygon":return CT(e).geometry;default:throw new Error(t+" is invalid")}}pr(GF,"geometry");function tp(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!np(t[0])||!np(t[1]))throw new Error("coordinates must contain numbers");return pc({type:"Point",coordinates:t},e,n)}pr(tp,"point");function qF(t,e,n={}){return Cy(t.map(r=>tp(r,e)),n)}pr(qF,"points");function hb(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let a=0;ahb(r,e)),n)}pr(WF,"polygons");function fb(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return pc({type:"LineString",coordinates:t},e,n)}pr(fb,"lineString");function HF(t,e,n={}){return Cy(t.map(r=>fb(r,e)),n)}pr(HF,"lineStrings");function Cy(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}pr(Cy,"featureCollection");function ET(t,e,n={}){return pc({type:"MultiLineString",coordinates:t},e,n)}pr(ET,"multiLineString");function IT(t,e,n={}){return pc({type:"MultiPoint",coordinates:t},e,n)}pr(IT,"multiPoint");function CT(t,e,n={}){return pc({type:"MultiPolygon",coordinates:t},e,n)}pr(CT,"multiPolygon");function ZF(t,e,n={}){return pc({type:"GeometryCollection",geometries:t},e,n)}pr(ZF,"geometryCollection");function XF(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}pr(XF,"round");function pb(t,e="kilometers"){const n=ST[e];if(!n)throw new Error(e+" units is invalid");return t*n}pr(pb,"radiansToLength");function Ty(t,e="kilometers"){const n=ST[e];if(!n)throw new Error(e+" units is invalid");return t/n}pr(Ty,"lengthToRadians");function YF(t,e){return dm(Ty(t,e))}pr(YF,"lengthToDegrees");function KF(t){let e=t%360;return e<0&&(e+=360),e}pr(KF,"bearingToAzimuth");function dm(t){return t%(2*Math.PI)*180/Math.PI}pr(dm,"radiansToDegrees");function pa(t){return t%360*Math.PI/180}pr(pa,"degreesToRadians");function JF(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return pb(Ty(t,e),n)}pr(JF,"convertLength");function $F(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=rE[e];if(!r)throw new Error("invalid original units");const i=rE[n];if(!i)throw new Error("invalid final units");return t/r*i}pr($F,"convertArea");function np(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}pr(np,"isNumber");function QF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}pr(QF,"isObject");function e6(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!np(e))throw new Error("bbox must only contain numbers")})}pr(e6,"validateBBox");function t6(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}pr(t6,"validateId");var n6=Object.defineProperty,dc=(t,e)=>n6(t,"name",{value:e,configurable:!0});function rp(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}dc(rp,"getCoord");function r6(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}dc(r6,"getCoords");function TT(t){if(t.length>1&&np(t[0])&&np(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return TT(t[0]);throw new Error("coordinates must only contain numbers")}dc(TT,"containsNumber");function i6(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}dc(i6,"geojsonType");function o6(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}dc(o6,"featureOf");function s6(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||t.type!=="FeatureCollection")throw new Error("Invalid input to "+n+", FeatureCollection required");for(const r of t.features){if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+r.geometry.type)}}dc(s6,"collectionOf");function LT(t){return t.type==="Feature"?t.geometry:t}dc(LT,"getGeom");function a6(t,e){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}dc(a6,"getType");var l6=Object.defineProperty,PT=(t,e)=>l6(t,"name",{value:e,configurable:!0});function db(t,e,n={}){if(n.final===!0)return MT(t,e);const r=rp(t),i=rp(e),a=pa(r[0]),c=pa(i[0]),l=pa(r[1]),d=pa(i[1]),v=Math.sin(c-a)*Math.cos(d),S=Math.cos(l)*Math.sin(d)-Math.sin(l)*Math.cos(d)*Math.cos(c-a);return dm(Math.atan2(v,S))}PT(db,"bearing");function MT(t,e){let n=db(e,t);return n=(n+180)%360,n}PT(MT,"calculateFinalBearing");var u6=Object.defineProperty,c6=(t,e)=>u6(t,"name",{value:e,configurable:!0});function AT(t,e,n,r={}){const i=rp(t),a=pa(i[0]),c=pa(i[1]),l=pa(n),d=Ty(e,r.units),v=Math.asin(Math.sin(c)*Math.cos(d)+Math.cos(c)*Math.sin(d)*Math.cos(l)),S=a+Math.atan2(Math.sin(l)*Math.sin(d)*Math.cos(c),Math.cos(d)-Math.sin(c)*Math.sin(v)),E=dm(S),T=dm(v);return tp([E,T],r.properties)}c6(AT,"destination");var h6=Object.defineProperty,f6=(t,e)=>h6(t,"name",{value:e,configurable:!0});function kT(t,e,n={}){var r=rp(t),i=rp(e),a=pa(i[1]-r[1]),c=pa(i[0]-r[0]),l=pa(r[1]),d=pa(i[1]),v=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return pb(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}f6(kT,"distance");var p6=Object.defineProperty,d6=(t,e)=>p6(t,"name",{value:e,configurable:!0});function DT(t,e,n={}){const i=LT(t).coordinates;let a=0;for(let c=0;c=a&&c===i.length-1);c++)if(a>=e){const l=e-a;if(l){const d=db(i[c],i[c-1])-180;return AT(i[c],l,d,n)}else return tp(i[c])}else a+=kT(i[c],i[c+1],n);return tp(i[i.length-1])}d6(DT,"along");var m6=DT;function g6(t){let e,n;const r=[Ri("animate-shortcuts"),{paint:{"circle-radius":10,"circle-color":"purple","circle-stroke-color":"black","circle-stroke-width":1}}];let i={};for(let a=0;aclearInterval(l));function d(){return r.features.map(M=>1/M.properties.directness).reduce((M,k)=>M+k,0)}function v(){return r.features.length==0?[]:Array.from({length:y6},S)}function S(){let M=Math.random()*i,k=0;for(let[R,z]of r.features.entries())if(k+=1/z.properties.directness,Mm6(r.features[M],k,{units:"kilometers"}))}}function T(){for(let[M,k]of a.entries())k.distance+=b6,k.distance>=r.features[k.idx].properties.length_meters/1e3&&(a[M]=S());n(0,c=E())}return t.$$set=M=>{"paths"in M&&n(1,r=M.paths)},t.$$.update=()=>{t.$$.dirty&2&&r&&(i=d(),a=v())},[c,r]}class w6 extends Xt{constructor(e){super(),Zt(this,e,x6,_6,Vt,{paths:1})}}function S6(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function E6(t){let e;return{c(){e=ut("Pick neighbourhood")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function I6(t){let e;return{c(){e=ut("View shortcuts")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function C6(t){let e;return{c(){e=ut("Route")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function T6(t){let e;return{c(){e=ut("Change this boundary")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function L6(t){let e;return{c(){e=ut("Debug")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function P6(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k,R,z,U,F,G,H,J,oe,ie,ce,fe;return a=new _r({props:{$$slots:{default:[S6]},$$scope:{ctx:t}}}),a.$on("click",t[25]),d=new _r({props:{$$slots:{default:[E6]},$$scope:{ctx:t}}}),d.$on("click",t[26]),R=new _r({props:{$$slots:{default:[I6]},$$scope:{ctx:t}}}),R.$on("click",t[27]),F=new _r({props:{$$slots:{default:[C6]},$$scope:{ctx:t}}}),F.$on("click",t[28]),J=new _r({props:{$$slots:{default:[T6]},$$scope:{ctx:t}}}),J.$on("click",t[29]),ce=new _r({props:{$$slots:{default:[L6]},$$scope:{ctx:t}}}),ce.$on("click",t[30]),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),He(d.$$.fragment),v=Xe(),S=ye("li"),S.textContent="Editing",E=Xe(),T=ye("nav"),M=ye("ul"),k=ye("li"),He(R.$$.fragment),z=Xe(),U=ye("li"),He(F.$$.fragment),G=Xe(),H=ye("li"),He(J.$$.fragment),oe=Xe(),ie=ye("li"),He(ce.$$.fragment),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top"),or(e,"display","flex"),or(e,"justify-content","space-between")},m(Te,Q){we(Te,e,Q),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),qe(d,l,null),ae(r,v),ae(r,S),ae(e,E),ae(e,T),ae(T,M),ae(M,k),qe(R,k,null),ae(M,z),ae(M,U),qe(F,U,null),ae(M,G),ae(M,H),qe(J,H,null),ae(M,oe),ae(M,ie),qe(ce,ie,null),fe=!0},p(Te,Q){const de={};Q[1]&8&&(de.$$scope={dirty:Q,ctx:Te}),a.$set(de);const Qe={};Q[1]&8&&(Qe.$$scope={dirty:Q,ctx:Te}),d.$set(Qe);const Me={};Q[1]&8&&(Me.$$scope={dirty:Q,ctx:Te}),R.$set(Me);const it={};Q[1]&8&&(it.$$scope={dirty:Q,ctx:Te}),F.$set(it);const ct={};Q[1]&8&&(ct.$$scope={dirty:Q,ctx:Te}),J.$set(ct);const je={};Q[1]&8&&(je.$$scope={dirty:Q,ctx:Te}),ce.$set(je)},i(Te){fe||(he(a.$$.fragment,Te),he(d.$$.fragment,Te),he(R.$$.fragment,Te),he(F.$$.fragment,Te),he(J.$$.fragment,Te),he(ce.$$.fragment,Te),fe=!0)},o(Te){ve(a.$$.fragment,Te),ve(d.$$.fragment,Te),ve(R.$$.fragment,Te),ve(F.$$.fragment,Te),ve(J.$$.fragment,Te),ve(ce.$$.fragment,Te),fe=!1},d(Te){Te&&xe(e),We(a),We(d),We(R),We(F),We(J),We(ce)}}}function iE(t){let e;return{c(){e=ye("mark"),e.textContent=`Some parts of the neighbourhood aren't reachable by drivers, shown in - red`},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function M6(t){let e,n,r;return{c(){e=ut("Undo ("),n=ut(t[4]),r=ut(")")},m(i,a){we(i,e,a),we(i,n,a),we(i,r,a)},p(i,a){a[0]&16&&cr(n,i[4])},d(i){i&&(xe(e),xe(n),xe(r))}}}function A6(t){let e;return{c(){e=ut("Undo")},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function k6(t){let e,n,r;return{c(){e=ut("Redo ("),n=ut(t[5]),r=ut(")")},m(i,a){we(i,e,a),we(i,n,a),we(i,r,a)},p(i,a){a[0]&32&&cr(n,i[5])},d(i){i&&(xe(e),xe(n),xe(r))}}}function D6(t){let e;return{c(){e=ut("Redo")},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function oE(t){let e,n;return e=new kF({}),e.$on("close",t[24]),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p:Mt,i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function R6(t){let e,n,r,i,a=Rr(t[6]).properties.name+"",c,l,d=t[1].area_km2.toFixed(1)+"",v,S,E,T,M,k,R,z,U,F,G,H,J,oe,ie,ce,fe,Te,Q,de,Qe,Me,it,ct,je,Ot,jt,vt,At,Lt,rn,xn,fn,_n,pn,Yn,zr,Ln=t[8]>0&&iE();function sr(It,In){return It[4]==0?A6:M6}let Zn=sr(t),te=Zn(t);function Ae(It,In){return It[5]==0?D6:k6}let dt=Ae(t),en=dt(t),Re=t[3]&&oE(t);return{c(){e=ye("div"),n=ye("p"),r=ut("Editing neighbourhood "),i=ye("u"),c=ut(a),l=ut(` - , with an area of `),v=ut(d),S=ut(" km²"),E=Xe(),T=ye("details"),T.innerHTML=`Help

    Now that you've defined a neighbourhood boundary, you can see the - possible shortcuts that vehicles are currently able to take through it. - You can add a new modal filter to try and solve this. The colored "cell" - areas show what's reachable for drivers without leaving the boundary - you've drawn.

    `,M=Xe(),Ln&&Ln.c(),k=Xe(),R=ye("div"),z=ye("button"),U=ye("img"),G=ut(` - Add a modal filter`),J=Xe(),oe=ye("button"),ie=ut("Add many modal filters along line"),fe=Xe(),Te=ye("button"),Q=ut("Reverse directions"),Qe=Xe(),Me=ye("button"),Me.textContent="Change modal filter type",it=Xe(),ct=ye("label"),je=ye("input"),Ot=ut(` - Animate shortcuts`),jt=Xe(),vt=ye("div"),At=ye("button"),te.c(),rn=Xe(),xn=ye("button"),en.c(),_n=Xe(),Re&&Re.c(),Wn(U.src,F=`/ltn//filters/${t[9]}_icon.gif`)||Ce(U,"src",F),Ce(U,"width","30"),Ce(U,"alt","Add a modal filter"),z.disabled=H=t[0]=="filter",Ce(z,"data-tooltip","hotkey 1"),oe.disabled=ce=t[0]=="freehand-filters",Ce(oe,"data-tooltip","hotkey 2"),Te.disabled=de=t[0]=="oneway",Ce(Te,"data-tooltip","hotkey 3"),or(R,"display","flex"),or(R,"justify-content","space-between"),Ce(je,"type","checkbox"),At.disabled=Lt=t[4]==0,Ce(At,"data-tooltip","Ctrl+Z"),xn.disabled=fn=t[5]==0,Ce(xn,"data-tooltip","Ctrl+Y"),or(vt,"display","flex"),or(vt,"justify-content","space-between"),Ce(e,"slot","sidebar")},m(It,In){we(It,e,In),ae(e,n),ae(n,r),ae(n,i),ae(i,c),ae(n,l),ae(n,v),ae(n,S),ae(e,E),ae(e,T),ae(e,M),Ln&&Ln.m(e,null),ae(e,k),ae(e,R),ae(R,z),ae(z,U),ae(z,G),ae(R,J),ae(R,oe),ae(oe,ie),ae(R,fe),ae(R,Te),ae(Te,Q),ae(e,Qe),ae(e,Me),ae(e,it),ae(e,ct),ae(ct,je),je.checked=t[10],ae(ct,Ot),ae(e,jt),ae(e,vt),ae(vt,At),te.m(At,null),ae(vt,rn),ae(vt,xn),en.m(xn,null),ae(e,_n),Re&&Re.m(e,null),pn=!0,Yn||(zr=[Pt(z,"click",t[19]),Pt(oe,"click",t[20]),Pt(Te,"click",t[21]),Pt(Me,"click",t[22]),Pt(je,"change",t[23]),Pt(At,"click",t[15]),Pt(xn,"click",t[16])],Yn=!0)},p(It,In){(!pn||In[0]&64)&&a!==(a=Rr(It[6]).properties.name+"")&&cr(c,a),(!pn||In[0]&2)&&d!==(d=It[1].area_km2.toFixed(1)+"")&&cr(v,d),It[8]>0?Ln||(Ln=iE(),Ln.c(),Ln.m(e,k)):Ln&&(Ln.d(1),Ln=null),(!pn||In[0]&512&&!Wn(U.src,F=`/ltn//filters/${It[9]}_icon.gif`))&&Ce(U,"src",F),(!pn||In[0]&1&&H!==(H=It[0]=="filter"))&&(z.disabled=H),(!pn||In[0]&1&&ce!==(ce=It[0]=="freehand-filters"))&&(oe.disabled=ce),(!pn||In[0]&1&&de!==(de=It[0]=="oneway"))&&(Te.disabled=de),In[0]&1024&&(je.checked=It[10]),Zn===(Zn=sr(It))&&te?te.p(It,In):(te.d(1),te=Zn(It),te&&(te.c(),te.m(At,null))),(!pn||In[0]&16&&Lt!==(Lt=It[4]==0))&&(At.disabled=Lt),dt===(dt=Ae(It))&&en?en.p(It,In):(en.d(1),en=dt(It),en&&(en.c(),en.m(xn,null))),(!pn||In[0]&32&&fn!==(fn=It[5]==0))&&(xn.disabled=fn),It[3]?Re?(Re.p(It,In),In[0]&8&&he(Re,1)):(Re=oE(It),Re.c(),he(Re,1),Re.m(e,null)):Re&&(Un(),ve(Re,1,1,()=>{Re=null}),jn())},i(It){pn||(he(Re),pn=!0)},o(It){ve(Re),pn=!1},d(It){It&&xe(e),Ln&&Ln.d(),te.d(),en.d(),Re&&Re.d(),Yn=!1,Jr(zr)}}}function N6(t){let e;return{c(){e=ye("p"),e.textContent="Click to change direction"},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function O6(t){let e,n,r,i;return{c(){e=ye("div"),n=ye("img"),i=ut(` - Click to add modal filter`),Wn(n.src,r=`/ltn//filters/${t[9]}_icon.gif`)||Ce(n,"src",r),Ce(n,"width","20"),Ce(n,"alt","Add modal filter")},m(a,c){we(a,e,c),ae(e,n),ae(e,i)},p(a,c){c[0]&512&&!Wn(n.src,r=`/ltn//filters/${a[9]}_icon.gif`)&&Ce(n,"src",r)},d(a){a&&xe(e)}}}function z6(t){let e,n=t[33].shortcuts+"",r,i,a=(t[33].name??"unnamed road")+"",c,l,d;function v(T,M){return T[0]=="filter"?O6:N6}let S=v(t),E=S(t);return{c(){e=ye("p"),r=ut(n),i=ut(" shortcuts through "),c=ut(a),l=Xe(),E.c(),d=Fi()},m(T,M){we(T,e,M),ae(e,r),ae(e,i),ae(e,c),we(T,l,M),E.m(T,M),we(T,d,M)},p(T,M){M[1]&4&&n!==(n=T[33].shortcuts+"")&&cr(r,n),M[1]&4&&a!==(a=(T[33].name??"unnamed road")+"")&&cr(c,a),S===(S=v(T))&&E?E.p(T,M):(E.d(1),E=S(T),E&&(E.c(),E.m(d.parentNode,d)))},d(T){T&&(xe(e),xe(l),xe(d)),E.d(T)}}}function F6(t){let e,n,r;return n=new fc({props:{openOn:"hover",$$slots:{default:[z6,({props:i})=>({33:i}),({props:i})=>[0,i?4:0]]},$$scope:{ctx:t}}}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p(i,a){const c={};a[0]&513|a[1]&12&&(c.$$scope={dirty:a,ctx:i}),n.$set(c)},i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function sE(t){let e,n;return e=new w6({props:{paths:t[7]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i[0]&128&&(a.paths=r[7]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function B6(t){let e;return{c(){e=ut("Click to delete")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function V6(t){let e,n;return e=new fc({props:{openOn:"hover",$$slots:{default:[B6]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i[1]&8&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function aE(t){let e,n;return e=new OF({props:{map:Rr(t[2])}}),e.$on("done",t[17]),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i[0]&4&&(a.map=Rr(r[2])),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function U6(t){let e,n,r,i,a,c,l;n=new Ey({props:{gjInput:t[1],interactive:t[0]=="filter"||t[0]=="oneway",onClickLine:t[12],$$slots:{"line-popup":[F6]},$$scope:{ctx:t}}});let d=t[10]&&sE(t);a=new Iy({props:{$$slots:{default:[V6]},$$scope:{ctx:t}}}),a.$on("click",t[13]);let v=t[0]=="freehand-filters"&&aE(t);return{c(){e=ye("div"),He(n.$$.fragment),r=Xe(),d&&d.c(),i=Xe(),He(a.$$.fragment),c=Xe(),v&&v.c(),Ce(e,"slot","map")},m(S,E){we(S,e,E),qe(n,e,null),ae(e,r),d&&d.m(e,null),ae(e,i),qe(a,e,null),ae(e,c),v&&v.m(e,null),l=!0},p(S,E){const T={};E[0]&2&&(T.gjInput=S[1]),E[0]&1&&(T.interactive=S[0]=="filter"||S[0]=="oneway"),E[0]&513|E[1]&8&&(T.$$scope={dirty:E,ctx:S}),n.$set(T),S[10]?d?(d.p(S,E),E[0]&1024&&he(d,1)):(d=sE(S),d.c(),he(d,1),d.m(e,i)):d&&(Un(),ve(d,1,1,()=>{d=null}),jn());const M={};E[1]&8&&(M.$$scope={dirty:E,ctx:S}),a.$set(M),S[0]=="freehand-filters"?v?(v.p(S,E),E[0]&1&&he(v,1)):(v=aE(S),v.c(),he(v,1),v.m(e,null)):v&&(Un(),ve(v,1,1,()=>{v=null}),jn())},i(S){l||(he(n.$$.fragment,S),he(d),he(a.$$.fragment,S),he(v),l=!0)},o(S){ve(n.$$.fragment,S),ve(d),ve(a.$$.fragment,S),ve(v),l=!1},d(S){S&&xe(e),We(n),d&&d.d(),We(a),v&&v.d()}}}function j6(t){let e,n,r,i;return e=new hc({props:{$$slots:{map:[U6],sidebar:[R6],top:[P6]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(a,c){qe(e,a,c),n=!0,r||(i=Pt(window,"keydown",t[14]),r=!0)},p(a,c){const l={};c[0]&4095|c[1]&8&&(l.$$scope={dirty:c,ctx:a}),e.$set(l)},i(a){n||(he(e.$$.fragment,a),n=!0)},o(a){ve(e.$$.fragment,a),n=!1},d(a){We(e,a),r=!1,i()}}}function G6(t,e,n){let r,i,a,c,l,d,v;_t(t,ju,vt=>n(18,i=vt)),_t(t,Uv,vt=>n(9,a=vt)),_t(t,ro,vt=>n(31,c=vt)),_t(t,uu,vt=>n(2,l=vt)),_t(t,E2,vt=>n(10,d=vt)),_t(t,Rn,vt=>n(11,v=vt));let S="filter",E=!1,T=0,M=0,k,R,z=JSON.parse(c.getAllShortcuts());no(()=>{l.doubleClickZoom.enable()});function U(vt){n(1,R=JSON.parse(c.renderNeighbourhood())),n(6,k=R.features.find(At=>At.properties.kind=="boundary")),n(4,T=R.undo_length),n(5,M=R.redo_length),n(7,z=JSON.parse(c.getAllShortcuts())),Jd()}function F(vt,At){S=="filter"?(c.addModalFilter(At,a),qt(ju,i++,i)):S=="oneway"&&(c.toggleDirection(vt.properties.road),qt(ju,i++,i))}function G(vt){let At=vt.detail.features[0];c.deleteModalFilter(At.properties.road),qt(ju,i++,i)}function H(vt){vt.target.tagName!="INPUT"&&(vt.ctrlKey&&vt.key=="z"&&J(),vt.ctrlKey&&vt.key=="y"&&oe(),vt.key=="1"&&n(0,S="filter"),vt.key=="2"&&n(0,S="freehand-filters"),vt.key=="3"&&n(0,S="oneway"))}function J(){c.undo(),qt(ju,i++,i)}function oe(){c.redo(),qt(ju,i++,i)}function ie(vt){let At=vt.detail;At&&(c.addManyModalFilters(At,a),qt(ju,i++,i)),n(0,S="filter")}const ce=()=>n(0,S="filter"),fe=()=>n(0,S="freehand-filters"),Te=()=>n(0,S="oneway"),Q=()=>n(3,E=!0);function de(){d=this.checked,E2.set(d)}const Qe=()=>n(3,E=!1),Me=()=>qt(Rn,v={mode:"title"},v),it=()=>qt(Rn,v={mode:"network"},v),ct=()=>qt(Rn,v={mode:"view-shortcuts"},v),je=()=>qt(Rn,v={mode:"route",prevMode:"neighbourhood"},v),Ot=()=>qt(Rn,v={mode:"set-boundary",name:Rr(k).properties.name,existing:k},v),jt=()=>qt(Rn,v={mode:"debug"},v);return t.$$.update=()=>{t.$$.dirty[0]&5&&(S=="oneway"?l.doubleClickZoom.disable():l.doubleClickZoom.enable()),t.$$.dirty[0]&262144&&U(),t.$$.dirty[0]&2&&n(8,r=R.features.filter(vt=>vt.properties.kind=="cell"&&vt.properties.cell_color=="disconnected").length)},[S,R,l,E,T,M,k,z,r,a,d,v,F,G,H,J,oe,ie,i,ce,fe,Te,Q,de,Qe,Me,it,ct,je,Ot,jt]}class q6 extends Xt{constructor(e){super(),Zt(this,e,G6,j6,Vt,{},null,[-1,-1])}}const H_="/ltn/assets/delete_light-ec75e756.svg",Z_="/ltn/assets/delete_dark-953cd893.svg",X_="/ltn/assets/edit_light-f3f51206.svg",Y_="/ltn/assets/edit_dark-97c94d36.svg";function lE(t,e,n){const r=t.slice();return r[19]=e[n],r}function W6(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function H6(t){let e;return{c(){e=ut("Route")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function Z6(t){let e,n,r,i,a,c,l,d,v,S,E,T,M;return a=new _r({props:{$$slots:{default:[W6]},$$scope:{ctx:t}}}),a.$on("click",t[16]),T=new _r({props:{$$slots:{default:[H6]},$$scope:{ctx:t}}}),T.$on("click",t[17]),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),l.textContent="Pick neighbourhood",d=Xe(),v=ye("nav"),S=ye("ul"),E=ye("li"),He(T.$$.fragment),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top"),or(e,"display","flex"),or(e,"justify-content","space-between")},m(k,R){we(k,e,R),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),ae(e,d),ae(e,v),ae(v,S),ae(S,E),qe(T,E,null),M=!0},p(k,R){const z={};R&4194304&&(z.$$scope={dirty:R,ctx:k}),a.$set(z);const U={};R&4194304&&(U.$$scope={dirty:R,ctx:k}),T.$set(U)},i(k){M||(he(a.$$.fragment,k),he(T.$$.fragment,k),M=!0)},o(k){ve(a.$$.fragment,k),ve(T.$$.fragment,k),M=!1},d(k){k&&xe(e),We(a),We(T)}}}function X6(t){let e;return{c(){e=ut("Draw a new boundary")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function Y6(t){let e=t[19]+"",n;return{c(){n=ut(e)},m(r,i){we(r,n,i)},p(r,i){i&2&&e!==(e=r[19]+"")&&cr(n,e)},d(r){r&&xe(n)}}}function uE(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k,R;function z(){return t[13](t[19])}r=new _r({props:{$$slots:{default:[Y6]},$$scope:{ctx:t}}}),r.$on("click",z);function U(){return t[14](t[19])}function F(){return t[15](t[19])}return{c(){e=ye("li"),n=ye("span"),He(r.$$.fragment),i=Xe(),a=ye("button"),c=ye("img"),d=Xe(),v=ye("button"),S=ye("img"),T=Xe(),Wn(c.src,l=t[4]?X_:Y_)||Ce(c,"src",l),Ce(c,"alt","Rename neighbourhood"),Ce(a,"class","secondary"),Wn(S.src,E=t[4]?H_:Z_)||Ce(S,"src",E),Ce(S,"alt","Delete neighbourhood"),Ce(v,"class","secondary"),or(n,"display","flex"),or(n,"justify-content","space-between")},m(G,H){we(G,e,H),ae(e,n),qe(r,n,null),ae(n,i),ae(n,a),ae(a,c),ae(n,d),ae(n,v),ae(v,S),ae(e,T),M=!0,k||(R=[Pt(a,"click",U),Pt(v,"click",F)],k=!0)},p(G,H){t=G;const J={};H&4194306&&(J.$$scope={dirty:H,ctx:t}),r.$set(J),(!M||H&16&&!Wn(c.src,l=t[4]?X_:Y_))&&Ce(c,"src",l),(!M||H&16&&!Wn(S.src,E=t[4]?H_:Z_))&&Ce(S,"src",E)},i(G){M||(he(r.$$.fragment,G),M=!0)},o(G){ve(r.$$.fragment,G),M=!1},d(G){G&&xe(e),We(r),k=!1,Jr(R)}}}function K6(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k,R,z,U,F,G;i=new _r({props:{$$slots:{default:[X6]},$$scope:{ctx:t}}}),i.$on("click",t[8]);let H=vs(t[1]),J=[];for(let ie=0;ieve(J[ie],1,1,()=>{J[ie]=null});return{c(){e=ye("div"),n=ye("details"),n.innerHTML=`Help

    Inside the neighbourhood you define, the goal is to eliminate (or - deliberately permit) through-traffic. An appropriate neighbourhood - boundary depends on many factors. The simplest approach is to find the - area bounded on all sides by "main" roads, which are designed for higher - traffic volumes. There are many other considerations, though -- maybe - severances like rivers or rail should be part of a boundary. Bridges and - tunnels near a boundary may be confusing as well. And note that your - boundary may not match the conventional definition of "neighbourhood."

    `,r=Xe(),He(i.$$.fragment),a=Xe(),c=ye("ul");for(let ie=0;ie({18:r}),({props:r})=>r?262144:0]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&4456448&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function Q6(t){let e,n;const r=[Ri("neighbourhood-boundaries"),{filter:["==",["get","kind"],"boundary"]},{paint:{"fill-color":"red","fill-opacity":k_(.3,.5)}},{eventsIfTopMost:!0},{manageHoverState:!0},{hoverCursor:"pointer"}];let i={$$slots:{default:[$6]},$$scope:{ctx:t}};for(let a=0;an(11,a=J)),_t(t,Ku,J=>n(2,c=J)),_t(t,Rn,J=>n(3,l=J)),_t(t,Kd,J=>n(4,d=J));function v(J){a.setCurrentNeighbourhood(J),qt(Rn,l={mode:"neighbourhood"},l)}function S(J){window.confirm(`Really delete neighbourhood ${J}? You can't undo this.`)&&(a.deleteNeighbourhoodBoundary(J),Jd(),n(0,r=JSON.parse(a.toSavefile())))}function E(J){let oe=window.prompt(`Rename neighbourhood ${J} to what?`,J);oe&&(a.renameNeighbourhoodBoundary(J,oe),Jd(),n(0,r=JSON.parse(a.toSavefile())))}function T(){let J=window.prompt("What do you want to name the neighbourhood?");J&&qt(Rn,l={mode:"set-boundary",name:J,existing:null},l)}function M(){Kx(c+".geojson",a.toSavefile())}function k(){Kx("debug_route_snapper.geojson",a.toRouteSnapperGj())}const R=J=>v(Rr(J.detail.features[0].properties).name),z=J=>v(J),U=J=>E(J),F=J=>S(J),G=()=>qt(Rn,l={mode:"title"},l),H=()=>qt(Rn,l={mode:"route",prevMode:"network"},l);return t.$$.update=()=>{t.$$.dirty&2048&&n(0,r=JSON.parse(a.toSavefile())),t.$$.dirty&1&&n(1,i=r.features.filter(J=>J.properties.kind=="boundary").map(J=>J.properties.name))},[r,i,c,l,d,v,S,E,T,M,k,a,R,z,U,F,G,H]}class rB extends Xt{constructor(e){super(),Zt(this,e,nB,tB,Vt,{})}}function iB(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function oB(t){let e;return{c(){e=ut("Pick neighbourhood")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function cE(t){let e,n,r;return n=new _r({props:{$$slots:{default:[sB]},$$scope:{ctx:t}}}),n.$on("click",t[13]),{c(){e=ye("li"),He(n.$$.fragment)},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p(i,a){const c={};a&16384&&(c.$$scope={dirty:a,ctx:i}),n.$set(c)},i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function sB(t){let e;return{c(){e=ut("Editing")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function aB(t){let e,n,r,i,a,c,l,d,v,S,E,T;a=new _r({props:{$$slots:{default:[iB]},$$scope:{ctx:t}}}),a.$on("click",t[11]),d=new _r({props:{$$slots:{default:[oB]},$$scope:{ctx:t}}}),d.$on("click",t[12]);let M=t[0]=="neighbourhood"&&cE(t);return{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),He(d.$$.fragment),v=Xe(),M&&M.c(),S=Xe(),E=ye("li"),E.textContent="Routing",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(k,R){we(k,e,R),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),qe(d,l,null),ae(r,v),M&&M.m(r,null),ae(r,S),ae(r,E),T=!0},p(k,R){const z={};R&16384&&(z.$$scope={dirty:R,ctx:k}),a.$set(z);const U={};R&16384&&(U.$$scope={dirty:R,ctx:k}),d.$set(U),k[0]=="neighbourhood"?M?(M.p(k,R),R&1&&he(M,1)):(M=cE(k),M.c(),he(M,1),M.m(r,S)):M&&(Un(),ve(M,1,1,()=>{M=null}),jn())},i(k){T||(he(a.$$.fragment,k),he(d.$$.fragment,k),he(M),T=!0)},o(k){ve(a.$$.fragment,k),ve(d.$$.fragment,k),ve(M),T=!1},d(k){k&&xe(e),We(a),We(d),M&&M.d()}}}function lB(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k,R,z,U;return n=new cb({}),n.$on("click",t[7]),{c(){e=ye("div"),He(n.$$.fragment),r=Xe(),i=ye("p"),i.textContent="Drag markers for a route",a=Xe(),c=ye("p"),c.innerHTML=`Route before - , - route after`,l=Xe(),d=ye("label"),v=ut("Slow-down factor for main roads: "),S=ut(t[1]),E=Xe(),T=ye("input"),M=Xe(),k=ye("i"),k.textContent=`Increase to see how drivers may detour in heavy traffic. 1 means - free-flow.`,Ce(T,"type","range"),Ce(T,"min","1.0"),Ce(T,"max","5.0"),Ce(T,"step","0.1"),Ce(e,"slot","sidebar")},m(F,G){we(F,e,G),qe(n,e,null),ae(e,r),ae(e,i),ae(e,a),ae(e,c),ae(e,l),ae(e,d),ae(d,v),ae(d,S),ae(d,E),ae(d,T),Qo(T,t[1]),ae(e,M),ae(e,k),R=!0,z||(U=[Pt(T,"change",t[10]),Pt(T,"input",t[10])],z=!0)},p(F,G){(!R||G&2)&&cr(S,F[1]),G&2&&Qo(T,F[1])},i(F){R||(he(n.$$.fragment,F),R=!0)},o(F){ve(n.$$.fragment,F),R=!1},d(F){F&&xe(e),We(n),z=!1,Jr(U)}}}function hE(t){let e,n;return e=new Ey({props:{gjInput:JSON.parse(Rr(t[4]).renderNeighbourhood()),interactive:!1}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&16&&(a.gjInput=JSON.parse(Rr(r[4]).renderNeighbourhood())),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function uB(t){let e,n;const r=[Ri("compare-route"),{paint:{"line-width":10,"line-color":Rd(["get","kind"],{before:"red",after:"blue"},"red")}}];let i={};for(let a=0;aIl(l,"lngLat",k));function z(F){t[9](F)}let U={draggable:!0,$$slots:{default:[hB]},$$scope:{ctx:t}};return t[2]!==void 0&&(U.lngLat=t[2]),S=new B2({props:U}),si.push(()=>Il(S,"lngLat",z)),{c(){e=ye("div"),M&&M.c(),n=Xe(),He(r.$$.fragment),i=Xe(),He(a.$$.fragment),c=Xe(),He(l.$$.fragment),v=Xe(),He(S.$$.fragment),Ce(e,"slot","map")},m(F,G){we(F,e,G),M&&M.m(e,null),ae(e,n),qe(r,e,null),ae(e,i),qe(a,e,null),ae(e,c),qe(l,e,null),ae(e,v),qe(S,e,null),T=!0},p(F,G){F[0]=="neighbourhood"?M?(M.p(F,G),G&1&&he(M,1)):(M=hE(F),M.c(),he(M,1),M.m(e,n)):M&&(Un(),ve(M,1,1,()=>{M=null}),jn());const H={};G&32&&(H.data=F[5]),G&16384&&(H.$$scope={dirty:G,ctx:F}),a.$set(H);const J={};G&16384&&(J.$$scope={dirty:G,ctx:F}),!d&&G&8&&(d=!0,J.lngLat=F[3],El(()=>d=!1)),l.$set(J);const oe={};G&16384&&(oe.$$scope={dirty:G,ctx:F}),!E&&G&4&&(E=!0,oe.lngLat=F[2],El(()=>E=!1)),S.$set(oe)},i(F){T||(he(M),he(r.$$.fragment,F),he(a.$$.fragment,F),he(l.$$.fragment,F),he(S.$$.fragment,F),T=!0)},o(F){ve(M),ve(r.$$.fragment,F),ve(a.$$.fragment,F),ve(l.$$.fragment,F),ve(S.$$.fragment,F),T=!1},d(F){F&&xe(e),M&&M.d(),We(r),We(a),We(l),We(S)}}}function pB(t){let e,n;return e=new hc({props:{$$slots:{map:[fB],sidebar:[lB],top:[aB]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&16511&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function dB(t,e,n){let r,i,a,c,l,d;_t(t,Rn,U=>n(6,i=U)),_t(t,S2,U=>n(1,a=U)),_t(t,Vv,U=>n(2,c=U)),_t(t,Bv,U=>n(3,l=U)),_t(t,ro,U=>n(4,d=U));let{prevMode:v}=e;function S(){qt(Rn,i={mode:v},i)}function E(U){l=U,Bv.set(l)}function T(U){c=U,Vv.set(c)}function M(){a=BP(this.value),S2.set(a)}const k=()=>qt(Rn,i={mode:"title"},i),R=()=>qt(Rn,i={mode:"network"},i),z=()=>qt(Rn,i={mode:"neighbourhood"},i);return t.$$set=U=>{"prevMode"in U&&n(0,v=U.prevMode)},t.$$.update=()=>{t.$$.dirty&30&&n(5,r=JSON.parse(d.compareRoute(l.lng,l.lat,c.lng,c.lat,a)))},[v,a,c,l,d,r,i,S,E,T,M,k,R,z]}class mB extends Xt{constructor(e){super(),Zt(this,e,dB,pB,Vt,{prevMode:0})}}const fE="/ltn/assets/settings_light-342fb430.svg",pE="/ltn/assets/settings_dark-088e95f1.svg";function dE(t){let e,n;return e=new p1({props:{$$slots:{default:[gB]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&67&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function gB(t){let e,n,r,i,a,c,l,d,v,S,E,T,M;return r=new kz({}),{c(){e=ye("h1"),e.textContent="Settings",n=Xe(),He(r.$$.fragment),i=Xe(),a=ye("label"),c=ye("input"),l=ut(` - Light mode`),d=Xe(),v=ye("center"),S=ye("button"),S.textContent="Confirm",Ce(c,"type","checkbox"),Ce(c,"role","switch")},m(k,R){we(k,e,R),we(k,n,R),qe(r,k,R),we(k,i,R),we(k,a,R),ae(a,c),c.checked=t[0],ae(a,l),we(k,d,R),we(k,v,R),ae(v,S),E=!0,T||(M=[Pt(c,"change",t[3]),Pt(S,"click",t[4])],T=!0)},p(k,R){R&1&&(c.checked=k[0])},i(k){E||(he(r.$$.fragment,k),E=!0)},o(k){ve(r.$$.fragment,k),E=!1},d(k){k&&(xe(e),xe(n),xe(i),xe(a),xe(d),xe(v)),We(r,k),T=!1,Jr(M)}}}function _B(t){let e,n,r,i,a,c,l,d,v=t[1]&&dE(t);return{c(){e=ye("button"),n=ye("img"),i=Xe(),v&&v.c(),a=Fi(),Wn(n.src,r=t[0]?fE:pE)||Ce(n,"src",r),Ce(n,"alt","Settings"),Ce(e,"class","outline")},m(S,E){we(S,e,E),ae(e,n),we(S,i,E),v&&v.m(S,E),we(S,a,E),c=!0,l||(d=Pt(e,"click",t[2]),l=!0)},p(S,[E]){(!c||E&1&&!Wn(n.src,r=S[0]?fE:pE))&&Ce(n,"src",r),S[1]?v?(v.p(S,E),E&2&&he(v,1)):(v=dE(S),v.c(),he(v,1),v.m(a.parentNode,a)):v&&(Un(),ve(v,1,1,()=>{v=null}),jn())},i(S){c||(he(v),c=!0)},o(S){ve(v),c=!1},d(S){S&&(xe(e),xe(i),xe(a)),v&&v.d(S),l=!1,d()}}}function yB(t,e,n){let r;_t(t,Kd,v=>n(0,r=v));let i=!1;const a=()=>n(1,i=!0);function c(){r=this.checked,Kd.set(r)}const l=()=>n(1,i=!1),d=()=>n(1,i=!1);return t.$$.update=()=>{t.$$.dirty&1&&document.documentElement.setAttribute("data-theme",r?"light":"dark")},[r,i,a,c,l,d]}class vB extends Xt{constructor(e){super(),Zt(this,e,yB,_B,Vt,{})}}const RT=Nn({type:"FeatureCollection",features:[]}),bB=Nn(!0),NT=Nn(0),K_=Nn(!1),J_=Nn({type:"FeatureCollection",features:[]});function xB(t){let e,n,r,i,a,c;const l=[Ri("route-points"),{filter:yz},{paint:{"circle-color":Rd(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":Rd(["get","type"],{node:Hg/2},Hg)}}];let d={};for(let M=0;Mn(0,r=c)),_t(t,J_,c=>n(1,i=c)),_t(t,K_,c=>n(2,a=c)),[r,i,a]}class IB extends Xt{constructor(e){super(),Zt(this,e,EB,SB,Vt,{})}}function CB(t){let e,n,r;return{c(){e=ut("Undo ("),n=ut(t[2]),r=ut(")")},m(i,a){we(i,e,a),we(i,n,a),we(i,r,a)},p(i,a){a&4&&cr(n,i[2])},d(i){i&&(xe(e),xe(n),xe(r))}}}function TB(t){let e;return{c(){e=ut("Undo")},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function LB(t){let e,n,r,i,a,c,l,d,v,S;function E(k,R){return k[2]==0?TB:CB}let T=E(t),M=T(t);return{c(){e=ye("button"),M.c(),r=Xe(),i=ye("label"),a=ye("input"),c=ut(` - Show all snappable points`),l=Xe(),d=ye("ul"),d.innerHTML=`
  • Click - the map to add points
  • Click and drag - any point to move it
  • Click - a waypoint to delete it
  • Press Control+Z - to undo your last change
  • Press Enter - or - double click - to finish
  • Press Escape - to cancel
  • `,e.disabled=n=t[2]==0,Ce(e,"data-tooltip","Ctrl+Z"),Ce(a,"type","checkbox")},m(k,R){we(k,e,R),M.m(e,null),we(k,r,R),we(k,i,R),ae(i,a),a.checked=t[1],ae(i,c),we(k,l,R),we(k,d,R),v||(S=[Pt(e,"click",t[3]),Pt(a,"change",t[4])],v=!0)},p(k,[R]){T===(T=E(k))&&M?M.p(k,R):(M.d(1),M=T(k),M&&(M.c(),M.m(e,null))),R&4&&n!==(n=k[2]==0)&&(e.disabled=n),R&2&&(a.checked=k[1])},i:Mt,o:Mt,d(k){k&&(xe(e),xe(r),xe(i),xe(l),xe(d)),M.d(),v=!1,Jr(S)}}}function PB(t,e,n){let r,i,a;_t(t,K_,S=>n(1,r=S)),_t(t,J_,S=>n(5,i=S)),_t(t,NT,S=>n(2,a=S));let{route_tool:c}=e;function l(S){S&&i.features.length==0&&qt(J_,i=JSON.parse(c.inner.debugSnappableNodes()),i)}const d=()=>c.undo();function v(){r=this.checked,K_.set(r)}return t.$$set=S=>{"route_tool"in S&&n(0,c=S.route_tool)},t.$$.update=()=>{t.$$.dirty&2&&l(r)},[c,r,a,d,v]}class MB extends Xt{constructor(e){super(),Zt(this,e,PB,LB,Vt,{route_tool:0})}}function AB(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function kB(t){let e;return{c(){e=ut("Pick neighbourhood")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function DB(t){let e;return{c(){e=ye("li"),e.textContent="Creating new neighbourhood boundary"},m(n,r){we(n,e,r)},p:Mt,i:Mt,o:Mt,d(n){n&&xe(e)}}}function RB(t){let e,n,r,i,a;return n=new _r({props:{$$slots:{default:[NB]},$$scope:{ctx:t}}}),n.$on("click",t[8]),{c(){e=ye("li"),He(n.$$.fragment),r=Xe(),i=ye("li"),i.textContent="Changing neighbourhood boundary"},m(c,l){we(c,e,l),qe(n,e,null),we(c,r,l),we(c,i,l),a=!0},p(c,l){const d={};l&1024&&(d.$$scope={dirty:l,ctx:c}),n.$set(d)},i(c){a||(he(n.$$.fragment,c),a=!0)},o(c){ve(n.$$.fragment,c),a=!1},d(c){c&&(xe(e),xe(r),xe(i)),We(n)}}}function NB(t){let e;return{c(){e=ut("Editing")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function OB(t){let e,n,r,i,a,c,l,d,v,S,E,T;a=new _r({props:{$$slots:{default:[AB]},$$scope:{ctx:t}}}),a.$on("click",t[6]),d=new _r({props:{$$slots:{default:[kB]},$$scope:{ctx:t}}}),d.$on("click",t[7]);const M=[RB,DB],k=[];function R(z,U){return z[1]?0:1}return S=R(t),E=k[S]=M[S](t),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),He(d.$$.fragment),v=Xe(),E.c(),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(z,U){we(z,e,U),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),qe(d,l,null),ae(r,v),k[S].m(r,null),T=!0},p(z,U){const F={};U&1024&&(F.$$scope={dirty:U,ctx:z}),a.$set(F);const G={};U&1024&&(G.$$scope={dirty:U,ctx:z}),d.$set(G);let H=S;S=R(z),S===H?k[S].p(z,U):(Un(),ve(k[H],1,1,()=>{k[H]=null}),jn(),E=k[S],E?E.p(z,U):(E=k[S]=M[S](z),E.c()),he(E,1),E.m(r,null))},i(z){T||(he(a.$$.fragment,z),he(d.$$.fragment,z),he(E),T=!0)},o(z){ve(a.$$.fragment,z),ve(d.$$.fragment,z),ve(E),T=!1},d(z){z&&xe(e),We(a),We(d),k[S].d()}}}function zB(t){let e;return{c(){e=ut("Finish")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function FB(t){let e;return{c(){e=ut("Cancel")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function BB(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k;return l=new _r({props:{$$slots:{default:[zB]},$$scope:{ctx:t}}}),l.$on("click",t[5]),v=new _r({props:{$$slots:{default:[FB]},$$scope:{ctx:t}}}),v.$on("click",t[4]),M=new MB({props:{route_tool:Rr(t[2])}}),{c(){e=ye("div"),n=ye("h1"),r=ut("Draw your neighbourhood boundary for "),i=ut(t[0]),a=Xe(),c=ye("div"),He(l.$$.fragment),d=Xe(),He(v.$$.fragment),S=Xe(),E=ye("p"),E.textContent="TODO: maybe move the instructions from the previous screen to here...",T=Xe(),He(M.$$.fragment),or(c,"display","flex"),or(c,"justify-content","space-between"),Ce(e,"slot","sidebar")},m(R,z){we(R,e,z),ae(e,n),ae(n,r),ae(n,i),ae(e,a),ae(e,c),qe(l,c,null),ae(c,d),qe(v,c,null),ae(e,S),ae(e,E),ae(e,T),qe(M,e,null),k=!0},p(R,z){(!k||z&1)&&cr(i,R[0]);const U={};z&1024&&(U.$$scope={dirty:z,ctx:R}),l.$set(U);const F={};z&1024&&(F.$$scope={dirty:z,ctx:R}),v.$set(F);const G={};z&4&&(G.route_tool=Rr(R[2])),M.$set(G)},i(R){k||(he(l.$$.fragment,R),he(v.$$.fragment,R),he(M.$$.fragment,R),k=!0)},o(R){ve(l.$$.fragment,R),ve(v.$$.fragment,R),ve(M.$$.fragment,R),k=!1},d(R){R&&xe(e),We(l),We(v),We(M)}}}function VB(t){let e,n,r;return n=new IB({}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","map")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p:Mt,i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function UB(t){let e,n;return e=new hc({props:{$$slots:{map:[VB],sidebar:[BB],top:[OB]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&1039&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function jB(t,e,n){let r,i,a;_t(t,A_,M=>n(2,r=M)),_t(t,Rn,M=>n(3,i=M)),_t(t,ro,M=>n(9,a=M));let{name:c}=e,{existing:l}=e;l?r.editExistingArea(l):r.startArea(),no(()=>{r==null||r.clearEventListeners(),r==null||r.stop()});function d(){l?qt(Rn,i={mode:"neighbourhood"},i):qt(Rn,i={mode:"network"},i)}r.addEventListenerSuccess(M=>{try{a.setNeighbourhoodBoundary(c,M),Jd(),a.setCurrentNeighbourhood(c),qt(Rn,i={mode:"neighbourhood"},i)}catch{window.alert("Known georust bug hit, sorry. You may need to just refresh the page now."),d()}}),r.addEventListenerFailure(d);const v=()=>Rr(r).finish(),S=()=>qt(Rn,i={mode:"title"},i),E=()=>qt(Rn,i={mode:"network"},i),T=()=>qt(Rn,i={mode:"neighbourhood"},i);return t.$$set=M=>{"name"in M&&n(0,c=M.name),"existing"in M&&n(1,l=M.existing)},[c,l,r,i,d,v,S,E,T]}class GB extends Xt{constructor(e){super(),Zt(this,e,jB,UB,Vt,{name:0,existing:1})}}const qB=["==",["geometry-type"],"Polygon"],WB=["==",["geometry-type"],"LineString"],HB=["==",["geometry-type"],"Point"];function OT(){return{type:"FeatureCollection",features:[]}}function uv(t){return{type:"Feature",properties:{},geometry:{type:"Point",coordinates:zT(t)}}}function zT(t){return[Math.round(t[0]*1e7)/1e7,Math.round(t[1]*1e7)/1e7]}const FT=Nn(OT()),BT=Nn(0),ZB=100;class XB{constructor(e){Pi(this,"map");Pi(this,"active");Pi(this,"eventListenersSuccess");Pi(this,"eventListenersUpdated");Pi(this,"eventListenersFailure");Pi(this,"points");Pi(this,"cursor");Pi(this,"hover");Pi(this,"dragFrom");Pi(this,"previousStates");Pi(this,"onMouseMove",e=>{if(this.active&&!this.dragFrom)this.recalculateHovering(e);else if(this.active&&this.dragFrom){if(this.hover=="polygon"){let n=this.dragFrom[0]-e.lngLat.lng,r=this.dragFrom[1]-e.lngLat.lat;for(let i of this.points)i[0]-=n,i[1]-=r}else this.points[this.hover]=e.lngLat.toArray();this.dragFrom=e.lngLat.toArray(),this.redraw()}});Pi(this,"onClick",e=>{if(this.beforeUpdate(),this.active&&this.cursor){let n=[];if(mE(this.points).forEach((r,i)=>{n.push([i+1,yR(r,this.cursor).properties.dist])}),n.sort((r,i)=>r[1]-i[1]),n.length>0){let r=n[0][0];this.points.splice(r,0,this.cursor.geometry.coordinates),this.hover=r}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(e))});Pi(this,"onDoubleClick",e=>{this.active&&(e.preventDefault(),this.cursor=uv(e.lngLat.toArray()),this.onClick(e),this.finish())});Pi(this,"onMouseDown",e=>{this.active&&!this.dragFrom&&this.hover!=null&&(e.preventDefault(),this.cursor=null,this.dragFrom=e.lngLat.toArray(),this.beforeUpdate(),this.redraw())});Pi(this,"onMouseUp",()=>{this.active&&this.dragFrom&&(this.dragFrom=null,this.redraw(),this.pointsUpdated())});Pi(this,"onKeypress",e=>{this.active&&(e.key=="Enter"?(e.stopPropagation(),this.finish()):e.key=="z"&&e.ctrlKey&&this.undo())});Pi(this,"onKeyDown",e=>{this.active&&e.key=="Escape"&&(e.stopPropagation(),this.cancel())});this.map=e,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 e=this.polygonFeature();if(e)for(let n of this.eventListenersSuccess)n(e);else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){for(let e of this.eventListenersFailure)e();this.stop()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}startNew(){this.active=!0,this.map.doubleClickZoom.disable()}editExisting(e){this.active=!0,this.map.doubleClickZoom.disable(),this.points=JSON.parse(JSON.stringify(e.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 e=OT();this.points.forEach((i,a)=>{let c=uv(i);c.properties.hover=this.hover==a,c.properties.idx=a,e.features.push(c)}),e.features=e.features.concat(mE(this.points));let n=this.polygonFeature();n&&(n.properties.hover=this.hover=="polygon",e.features.push(n)),FT.set(e);let r="crosshair";this.hover!=null&&(r=this.dragFrom?"grabbing":"pointer"),this.map.getCanvas().style.cursor=r,BT.set(this.previousStates.length)}pointsUpdated(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersUpdated)n(e)}recalculateHovering(e){this.cursor=null,this.hover=null;for(let n of this.map.queryRenderedFeatures(e.point,{layers:["edit-polygon-fill","edit-polygon-vertices"]}))if(n.geometry.type=="Polygon"){this.hover="polygon";break}else if(n.geometry.type=="Point"&&Object.hasOwn(n.properties,"idx")){this.hover=n.properties.idx;break}this.hover==null&&(this.cursor=uv(e.lngLat.toArray())),this.redraw()}polygonFeature(){if(this.points.length<3)return null;let e=this.points.map(zT),n=[JSON.parse(JSON.stringify(e))];return n[0].push(JSON.parse(JSON.stringify(n[0][0]))),{type:"Feature",geometry:{type:"Polygon",coordinates:n},properties:{}}}beforeUpdate(){this.previousStates.push(JSON.parse(JSON.stringify(this.points))),this.previousStates.length>ZB&&this.previousStates.shift()}}function mE(t){let e=[];for(let n=0;n=3&&e.push({type:"Feature",geometry:{type:"LineString",coordinates:[t[t.length-1],t[0]]},properties:{}}),e}function YB(t){let e,n,r;return{c(){e=ut("Undo ("),n=ut(t[1]),r=ut(")")},m(i,a){we(i,e,a),we(i,n,a),we(i,r,a)},p(i,a){a&2&&cr(n,i[1])},d(i){i&&(xe(e),xe(n),xe(r))}}}function KB(t){let e;return{c(){e=ut("Undo")},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function JB(t){let e,n,r,i,a,c,l,d,v,S,E;function T(R,z){return R[1]==0?KB:YB}let M=T(t),k=M(t);return{c(){e=ye("div"),n=ye("button"),n.textContent="Finish",r=Xe(),i=ye("button"),i.textContent="Cancel",a=Xe(),c=ye("button"),k.c(),d=Xe(),v=ye("ul"),v.innerHTML=`
  • Click - the map to add a vertex
  • Click - a vertex to delete it
  • Drag - a vertex or the polygon to move it
  • Press Control+Z - to undo your last change
  • Press Enter - or - double click - to finish
  • Press Escape - to cancel
  • `,c.disabled=l=t[1]==0,or(e,"display","flex"),or(e,"justify-content","space-between")},m(R,z){we(R,e,z),ae(e,n),ae(e,r),ae(e,i),ae(e,a),ae(e,c),k.m(c,null),we(R,d,z),we(R,v,z),S||(E=[Pt(n,"click",t[2]),Pt(i,"click",t[3]),Pt(c,"click",t[4])],S=!0)},p(R,[z]){M===(M=T(R))&&k?k.p(R,z):(k.d(1),k=M(R),k&&(k.c(),k.m(c,null))),z&2&&l!==(l=R[1]==0)&&(c.disabled=l)},i:Mt,o:Mt,d(R){R&&(xe(e),xe(d),xe(v)),k.d(),S=!1,Jr(E)}}}function $B(t,e,n){let r;_t(t,BT,d=>n(1,r=d));let{polygonTool:i}=e;const a=()=>i.finish(),c=()=>i.cancel(),l=()=>i.undo();return t.$$set=d=>{"polygonTool"in d&&n(0,i=d.polygonTool)},[i,r,a,c,l]}class QB extends Xt{constructor(e){super(),Zt(this,e,$B,JB,Vt,{polygonTool:0})}}let e8=Date.now();function Lm(t){return`${t}-${e8++}`}const VT=Symbol.for("svelte-maplibre");function t8(){return zE(VT)}function gE(t){return{subscribe:t.subscribe}}function UT({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=t8(),a=Nn(null),c=gE(a),l={...i,[t]:gE(a)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),h1(VT,l),{...i,self:a}}function n8(){return UT({key:"source",setCluster:!0})}function r8(t=!0){return UT({key:"layer",setPopupTarget:t,setMouseEvent:t})}function _E(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],a=n[r];i!==a&&t(r,a,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function i8(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function o8(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function yE(t){let e=t[0],n,r,i=vE(t);return{c(){i.c(),n=Fi()},m(a,c){i.m(a,c),we(a,n,c),r=!0},p(a,c){c[0]&1&&Vt(e,e=a[0])?(Un(),ve(i,1,1,Mt),jn(),i=vE(a),i.c(),he(i,1),i.m(n.parentNode,n)):i.p(a,c)},i(a){r||(he(i),r=!0)},o(a){ve(i),r=!1},d(a){a&&xe(n),i.d(a)}}}function vE(t){let e;const n=t[36].default,r=Sr(n,t,t[35],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a[1]&16)&&Ir(r,n,i,i[35],e?Er(n,i[35],a,null):Cr(i[35]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function s8(t){let e,n,r=t[0]&&yE(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,a){i[0]?r?(r.p(i,a),a[0]&1&&he(r,1)):(r=yE(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function a8(t,e,n){let r,i,a,c,l,d,v,S,E,T,M,k,{$$slots:R={},$$scope:z}=e,{id:U=Lm("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:J=void 0}=e,{type:oe}=e,{paint:ie=void 0}=e,{layout:ce=void 0}=e,{filter:fe=void 0}=e,{applyToClusters:Te=void 0}=e,{minzoom:Q=void 0}=e,{maxzoom:de=void 0}=e,{manageHoverState:Qe=!1}=e,{hovered:Me=null}=e,{interactive:it=!0}=e,{hoverCursor:ct=void 0}=e,{eventsIfTopMost:je=!1}=e;const Ot=vu(),{map:jt,source:vt,self:At,minzoom:Lt,maxzoom:rn,eventTopMost:xn,layerInfo:fn}=r8();_t(t,jt,te=>n(31,E=te)),_t(t,vt,te=>n(32,T=te)),_t(t,At,te=>n(0,S=te)),_t(t,Lt,te=>n(34,k=te)),_t(t,rn,te=>n(33,M=te)),no(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(te){var Re,It;if(!it||!S||!E||je&&xn(te)!==S)return;let Ae=te.features??[],dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae};Ot(te.type,en)}function Yn(te){var Re,It;if(!it||!S||!E||je&&xn(te)!==S)return;ct&&(E.getCanvas().style.cursor=ct);let Ae=te.features??[];n(6,Me=Ae[0]??null);let dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae})}function zr(te){var Re,It,In;if(!it||!E)return;if(je&&xn(te)!==S){n(6,Me=null),Qe&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ct;let Ae=te.features??[],dt=(It=(Re=Ae[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(In=Ae[0])==null?void 0:In.id;en!==_n&&(Qe&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Me=Ae[0]??null)),Ot("mousemove",{event:te,map:E,clusterId:dt,layer:S,source:l,features:Ae})}function Ln(te){if(!(!it||!S||!E)){if(ct&&(E.getCanvas().style.cursor=""),n(6,Me=null),Qe&&_n!==void 0){const Ae={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Ae,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let sr=!0;function Zn(te){E&&(E.off("click",te,pn),E.off("dblclick",te,pn),E.off("contextmenu",te,pn),E.off("mouseenter",te,Yn),E.off("mousemove",te,zr),E.off("mouseleave",te,Ln))}return no(()=>{E&&S&&Zn(S)}),t.$$set=te=>{"id"in te&&n(7,U=te.id),"source"in te&&n(8,F=te.source),"sourceLayer"in te&&n(9,G=te.sourceLayer),"beforeId"in te&&n(10,H=te.beforeId),"beforeLayerType"in te&&n(11,J=te.beforeLayerType),"type"in te&&n(12,oe=te.type),"paint"in te&&n(13,ie=te.paint),"layout"in te&&n(14,ce=te.layout),"filter"in te&&n(15,fe=te.filter),"applyToClusters"in te&&n(16,Te=te.applyToClusters),"minzoom"in te&&n(17,Q=te.minzoom),"maxzoom"in te&&n(18,de=te.maxzoom),"manageHoverState"in te&&n(19,Qe=te.manageHoverState),"hovered"in te&&n(6,Me=te.hovered),"interactive"in te&&n(20,it=te.interactive),"hoverCursor"in te&&n(21,ct=te.hoverCursor),"eventsIfTopMost"in te&&n(22,je=te.eventsIfTopMost),"$$scope"in te&&n(35,z=te.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=o8(Te)),t.$$.dirty[0]&1073774592&&n(24,i=i8("all",r,fe)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,a=Q??k),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=de??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||T),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let te=H;if(!H&&J){let Ae=E.getStyle().layers,dt=typeof J=="function"?J:Re=>Re.type===J,en=Ae==null?void 0:Ae.find(dt);en&&(te=en.id)}qt(At,S=U,S),E.addLayer(Hc({id:S,type:oe,source:l,"source-layer":G,filter:i,paint:ie,layout:ce,minzoom:a,maxzoom:c}),te),n(23,sr=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Ln)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:it}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?_E((te,Ae)=>E==null?void 0:E.setPaintProperty(S,te,Ae)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?_E((te,Ae)=>E==null?void 0:E.setLayoutProperty(S,te,Ae)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(ie)),t.$$.dirty[0]&134234112&&(v==null||v(ce)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,a,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(sr?n(23,sr=!1):E==null||E.setFilter(S,i))},[S,jt,vt,At,Lt,rn,Me,U,F,G,H,J,oe,ie,ce,fe,Te,Q,de,Qe,it,ct,je,sr,i,c,a,v,d,l,r,E,T,M,k,z,R]}class mb extends Xt{constructor(e){super(),Zt(this,e,a8,s8,Vt,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}}function l8(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],a,null):Cr(i[24]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function u8(t){let e,n,r;function i(c){t[17](c)}let a={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:[l8]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new mb({props:a}),si.push(()=>Il(e,"hovered",i)),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(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function c8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=Lm("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function J(de){F=de,n(0,F)}function oe(de){gn.call(this,t,de)}function ie(de){gn.call(this,t,de)}function ce(de){gn.call(this,t,de)}function fe(de){gn.call(this,t,de)}function Te(de){gn.call(this,t,de)}function Q(de){gn.call(this,t,de)}return t.$$set=de=>{"id"in de&&n(1,a=de.id),"source"in de&&n(2,c=de.source),"sourceLayer"in de&&n(3,l=de.sourceLayer),"beforeId"in de&&n(4,d=de.beforeId),"beforeLayerType"in de&&n(5,v=de.beforeLayerType),"paint"in de&&n(6,S=de.paint),"layout"in de&&n(7,E=de.layout),"filter"in de&&n(8,T=de.filter),"applyToClusters"in de&&n(9,M=de.applyToClusters),"minzoom"in de&&n(10,k=de.minzoom),"maxzoom"in de&&n(11,R=de.maxzoom),"hoverCursor"in de&&n(12,z=de.hoverCursor),"manageHoverState"in de&&n(13,U=de.manageHoverState),"hovered"in de&&n(0,F=de.hovered),"eventsIfTopMost"in de&&n(14,G=de.eventsIfTopMost),"interactive"in de&&n(15,H=de.interactive),"$$scope"in de&&n(24,i=de.$$scope)},[F,a,c,l,d,v,S,E,T,M,k,R,z,U,G,H,r,J,oe,ie,ce,fe,Te,Q,i]}class h8 extends Xt{constructor(e){super(),Zt(this,e,c8,u8,Vt,{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 f8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],a,null):Cr(i[23]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function p8(t){let e,n,r;function i(c){t[16](c)}let a={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[f8]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new mb({props:a}),si.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function d8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=Lm("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Q){U=Q,n(0,U)}function J(Q){gn.call(this,t,Q)}function oe(Q){gn.call(this,t,Q)}function ie(Q){gn.call(this,t,Q)}function ce(Q){gn.call(this,t,Q)}function fe(Q){gn.call(this,t,Q)}function Te(Q){gn.call(this,t,Q)}return t.$$set=Q=>{"id"in Q&&n(1,a=Q.id),"source"in Q&&n(2,c=Q.source),"sourceLayer"in Q&&n(3,l=Q.sourceLayer),"beforeId"in Q&&n(4,d=Q.beforeId),"beforeLayerType"in Q&&n(5,v=Q.beforeLayerType),"paint"in Q&&n(6,S=Q.paint),"layout"in Q&&n(7,E=Q.layout),"filter"in Q&&n(8,T=Q.filter),"minzoom"in Q&&n(9,M=Q.minzoom),"maxzoom"in Q&&n(10,k=Q.maxzoom),"hoverCursor"in Q&&n(11,R=Q.hoverCursor),"manageHoverState"in Q&&n(12,z=Q.manageHoverState),"hovered"in Q&&n(0,U=Q.hovered),"eventsIfTopMost"in Q&&n(13,F=Q.eventsIfTopMost),"interactive"in Q&&n(14,G=Q.interactive),"$$scope"in Q&&n(23,i=Q.$$scope)},[U,a,c,l,d,v,S,E,T,M,k,R,z,F,G,r,H,J,oe,ie,ce,fe,Te,i]}class m8 extends Xt{constructor(e){super(),Zt(this,e,d8,p8,Vt,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function g8(t,e,n,r,i){let a=!1;t.getSource(e)&&(a=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(a){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function _8(t,e,n){VE().then(()=>{let r=ca(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function bE(t){let e=t[0],n,r,i=xE(t);return{c(){i.c(),n=Fi()},m(a,c){i.m(a,c),we(a,n,c),r=!0},p(a,c){c&1&&Vt(e,e=a[0])?(Un(),ve(i,1,1,Mt),jn(),i=xE(a),i.c(),he(i,1),i.m(n.parentNode,n)):i.p(a,c)},i(a){r||(he(i),r=!0)},o(a){ve(i),r=!1},d(a){a&&xe(n),i.d(a)}}}function xE(t){let e;const n=t[15].default,r=Sr(n,t,t[14],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&16384)&&Ir(r,n,i,i[14],e?Er(n,i[14],a,null):Cr(i[14]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function y8(t){let e,n,r=t[0]&&bE(t);return{c(){r&&r.c(),e=Fi()},m(i,a){r&&r.m(i,a),we(i,e,a),n=!0},p(i,[a]){i[0]?r?(r.p(i,a),a&1&&he(r,1)):(r=bE(i),r.c(),he(r,1),r.m(e.parentNode,e)):r&&(Un(),ve(r,1,1,()=>{r=null}),jn())},i(i){n||(he(r),n=!0)},o(i){ve(r),n=!1},d(i){i&&xe(e),r&&r.d(i)}}}function v8(t,e,n){let r,i,a,{$$slots:c={},$$scope:l}=e,{id:d=Lm("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:T=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:k=void 0}=e;const{map:R,cluster:z,self:U}=n8();_t(t,R,H=>n(13,i=H)),_t(t,z,H=>n(16,a=H)),_t(t,U,H=>n(0,r=H));let F,G=!0;return no(()=>{r&&F&&i&&(_8(R,r,F),qt(U,r=null,r),n(11,F=void 0))}),t.$$set=H=>{"id"in H&&n(4,d=H.id),"data"in H&&n(5,v=H.data),"generateId"in H&&n(6,S=H.generateId),"promoteId"in H&&n(7,E=H.promoteId),"filter"in H&&n(8,T=H.filter),"lineMetrics"in H&&n(9,M=H.lineMetrics),"cluster"in H&&n(10,k=H.cluster),"$$scope"in H&&n(14,l=H.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&qt(z,a=k,a),t.$$.dirty&12273&&i&&r!==d&&(qt(U,r=d,r),g8(i,r,Hc({type:"geojson",data:v,filter:T,lineMetrics:M,generateId:S,promoteId:E,cluster:!!k,clusterMinPoints:k==null?void 0:k.minPoints,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius,clusterProperties:k==null?void 0:k.properties}),H=>i&&H===r,()=>{r&&(n(11,F=i==null?void 0:i.getSource(r)),n(12,G=!0))})),t.$$.dirty&8208&&(i==null||i.on("style.load",()=>{n(11,F=i==null?void 0:i.getSource(d))})),t.$$.dirty&6176&&F&&(G?n(12,G=!1):F.setData(v)),t.$$.dirty&3072&&(F==null||F.setClusterOptions(Hc({cluster:!!k,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius})))},[r,R,z,U,d,v,S,E,T,M,k,F,G,i,l,c]}class b8 extends Xt{constructor(e){super(),Zt(this,e,v8,y8,Vt,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function x8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,a){r&&r.m(i,a),e=!0},p(i,a){r&&r.p&&(!e||a&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],a,null):Cr(i[23]),null)},i(i){e||(he(r,i),e=!0)},o(i){ve(r,i),e=!1},d(i){r&&r.d(i)}}}function w8(t){let e,n,r;function i(c){t[16](c)}let a={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[x8]},$$scope:{ctx:t}};return t[0]!==void 0&&(a.hovered=t[0]),e=new mb({props:a}),si.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){He(e.$$.fragment)},m(c,l){qe(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(he(e.$$.fragment,c),r=!0)},o(c){ve(e.$$.fragment,c),r=!1},d(c){We(e,c)}}}function S8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:a=Lm("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:T=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Q){U=Q,n(0,U)}function J(Q){gn.call(this,t,Q)}function oe(Q){gn.call(this,t,Q)}function ie(Q){gn.call(this,t,Q)}function ce(Q){gn.call(this,t,Q)}function fe(Q){gn.call(this,t,Q)}function Te(Q){gn.call(this,t,Q)}return t.$$set=Q=>{"id"in Q&&n(1,a=Q.id),"source"in Q&&n(2,c=Q.source),"sourceLayer"in Q&&n(3,l=Q.sourceLayer),"beforeId"in Q&&n(4,d=Q.beforeId),"beforeLayerType"in Q&&n(5,v=Q.beforeLayerType),"paint"in Q&&n(6,S=Q.paint),"layout"in Q&&n(7,E=Q.layout),"filter"in Q&&n(8,T=Q.filter),"minzoom"in Q&&n(9,M=Q.minzoom),"maxzoom"in Q&&n(10,k=Q.maxzoom),"hoverCursor"in Q&&n(11,R=Q.hoverCursor),"manageHoverState"in Q&&n(12,z=Q.manageHoverState),"hovered"in Q&&n(0,U=Q.hovered),"eventsIfTopMost"in Q&&n(13,F=Q.eventsIfTopMost),"interactive"in Q&&n(14,G=Q.interactive),"$$scope"in Q&&n(23,i=Q.$$scope)},[U,a,c,l,d,v,S,E,T,M,k,R,z,F,G,r,H,J,oe,ie,ce,fe,Te,i]}class E8 extends Xt{constructor(e){super(),Zt(this,e,S8,w8,Vt,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function I8(t){let e,n,r,i,a,c;return e=new m8({props:{id:"edit-polygon-fill",filter:qB,paint:{"fill-color":"red","fill-opacity":["case",["boolean",["get","hover"],"false"],1,.5]}}}),r=new E8({props:{id:"edit-polygon-lines",filter:WB,paint:{"line-color":"black","line-width":8,"line-opacity":.5}}}),a=new h8({props:{id:"edit-polygon-vertices",filter:HB,paint:{"circle-color":"black","circle-opacity":["case",["has","hovered"],1,.5],"circle-radius":10}}}),{c(){He(e.$$.fragment),n=Xe(),He(r.$$.fragment),i=Xe(),He(a.$$.fragment)},m(l,d){qe(e,l,d),we(l,n,d),qe(r,l,d),we(l,i,d),qe(a,l,d),c=!0},p:Mt,i(l){c||(he(e.$$.fragment,l),he(r.$$.fragment,l),he(a.$$.fragment,l),c=!0)},o(l){ve(e.$$.fragment,l),ve(r.$$.fragment,l),ve(a.$$.fragment,l),c=!1},d(l){l&&(xe(n),xe(i)),We(e,l),We(r,l),We(a,l)}}}function C8(t){let e,n;return e=new b8({props:{data:t[0],$$slots:{default:[I8]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&1&&(a.data=r[0]),i&2&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function T8(t,e,n){let r;return _t(t,FT,i=>n(0,r=i)),[r]}class L8 extends Xt{constructor(e){super(),Zt(this,e,T8,C8,Vt,{})}}function P8(t){let e,n,r,i,a,c,l;return{c(){e=ye("button"),e.textContent="Import current view",n=Xe(),r=ye("i"),r.textContent="or...",i=Xe(),a=ye("button"),a.textContent="Draw an area to import on the map",Ce(e,"type","button"),Ce(a,"type","button")},m(d,v){we(d,e,v),we(d,n,v),we(d,r,v),we(d,i,v),we(d,a,v),c||(l=[Pt(e,"click",t[1]),Pt(a,"click",t[2])],c=!0)},p:Mt,i:Mt,o:Mt,d(d){d&&(xe(e),xe(n),xe(r),xe(i),xe(a)),c=!1,Jr(l)}}}function M8(t){let e,n;return e=new QB({props:{polygonTool:t[0]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&1&&(a.polygonTool=r[0]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function A8(t){let e,n,r,i;const a=[M8,P8],c=[];function l(d,v){return d[0]?0:1}return e=l(t),n=c[e]=a[e](t),{c(){n.c(),r=Fi()},m(d,v){c[e].m(d,v),we(d,r,v),i=!0},p(d,[v]){let S=e;e=l(d),e===S?c[e].p(d,v):(Un(),ve(c[S],1,1,()=>{c[S]=null}),jn(),n=c[e],n?n.p(d,v):(n=c[e]=a[e](d),n.c()),he(n,1),n.m(r.parentNode,r))},i(d){i||(he(n),i=!0)},o(d){ve(n),i=!1},d(d){d&&xe(r),c[e].d(d)}}}function Sd(t){return[t.lng,t.lat]}function k8(t,e,n){let{map:r}=e;const i=vu();let a=null;async function c(S){try{i("loading","Loading from Overpass");let T=await(await fetch(jT(S))).text();i("gotXml",T)}catch(E){i("error",E.toString())}}function l(){let S=r.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[Sd(S.getSouthWest()),Sd(S.getNorthWest()),Sd(S.getNorthEast()),Sd(S.getSouthEast()),Sd(S.getSouthWest())]],type:"Polygon"}}}async function d(){if(r){if(r.getZoom()<13){i("error","Zoom in more to import");return}await c(l())}}function v(){r&&(n(0,a=new XB(r)),a.startNew(),a.addEventListenerSuccess(async S=>{n(0,a=null),await c(S)}),a.addEventListenerFailure(()=>{n(0,a=null)}))}return t.$$set=S=>{"map"in S&&n(3,r=S.map)},[a,d,v,r]}class D8 extends Xt{constructor(e){super(),Zt(this,e,k8,A8,Vt,{map:3})}}function jT(t){let e='poly:"';for(let[r,i]of t.geometry.coordinates[0])e+=`${i} ${r} `;return e=e.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${e}); node(w)->.x; <;); out meta;`}`}async function u1(t){Ku.set(t);try{let e=JSON.parse(window.localStorage.getItem(t));console.time("get OSM input");let n=await R8(e);console.timeEnd("get OSM input"),console.time("load"),ro.set(new WE(new Uint8Array(n),e.study_area_name||void 0)),ca(ro).loadSavefile(e),console.timeEnd("load"),GT()}catch(e){window.alert(`Couldn't open project: ${e}`),Ku.set("")}}async function R8(t){if(t.study_area_name){let e=ca(P_)?`/osm/${t.study_area_name}.pbf`:`https://assets.od2net.org/severance_pbfs/${t.study_area_name}.pbf`;return console.log(`Grabbing ${e}`),await(await fetch(e)).arrayBuffer()}else{console.log("Grabbing from Overpass");let e=t.features.find(i=>i.properties.kind=="study_area_boundary");return await(await fetch(jT(e))).arrayBuffer()}}function GT(){Rn.set({mode:"network"}),A_.set(new bR(ca(uu),ca(ro).toRouteSnapper(),RT,bB,NT)),K_.set(!1),J_.set({type:"FeatureCollection",features:[]}),ca(uu).fitBounds(Array.from(ca(ro).getBounds()),{animate:!1}),Bv.set(wE()),Vv.set(wE())}function wE(){let t=ca(ro).getBounds(),e=t[0]+Math.random()*(t[2]-t[0]),n=t[1]+Math.random()*(t[3]-t[1]);return new ny.LngLat(e,n)}function SE(t,e,n){const r=t.slice();return r[19]=e[n],r}function N8(t){let e;return{c(){e=ye("div"),e.innerHTML='',Ce(e,"slot","top")},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function O8(t){let e;return{c(){e=ye("p"),e.textContent="Waiting for MapLibre and WASM to load..."},m(n,r){we(n,e,r)},p:Mt,i:Mt,o:Mt,d(n){n&&xe(e)}}}function z8(t){let e,n,r,i,a,c,l,d,v,S,E,T,M;n=new _r({props:{$$slots:{default:[F8]},$$scope:{ctx:t}}}),n.$on("click",t[11]);let k=vs(t[2]),R=[];for(let U=0;Uve(R[U],1,1,()=>{R[U]=null});return{c(){e=ye("div"),He(n.$$.fragment),r=Xe(),i=ye("p"),i.textContent="Load a saved project:",a=Xe(),c=ye("ul");for(let U=0;U{c[S]=null}),jn(),r=c[n],r?r.p(d,v):(r=c[n]=a[n](d),r.c()),he(r,1),r.m(e,null))},i(d){i||(he(r),i=!0)},o(d){ve(r),i=!1},d(d){d&&xe(e),c[n].d()}}}function U8(t){let e,n,r,i;return e=new jE({props:{loading:t[1]}}),r=new hc({props:{$$slots:{sidebar:[V8],top:[N8]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment),n=Xe(),He(r.$$.fragment)},m(a,c){qe(e,a,c),we(a,n,c),qe(r,a,c),i=!0},p(a,[c]){const l={};c&2&&(l.loading=a[1]),e.$set(l);const d={};c&4194429&&(d.$$scope={dirty:c,ctx:a}),r.$set(d)},i(a){i||(he(e.$$.fragment,a),he(r.$$.fragment,a),i=!0)},o(a){ve(e.$$.fragment,a),ve(r.$$.fragment,a),i=!1},d(a){a&&xe(n),We(e,a),We(r,a)}}}function Zg(){let t=[];for(let e=0;en(16,r=oe)),_t(t,A_,oe=>n(17,i=oe)),_t(t,ro,oe=>n(18,a=oe)),_t(t,uu,oe=>n(4,c=oe)),_t(t,Rn,oe=>n(5,l=oe)),_t(t,Kd,oe=>n(6,d=oe));let{wasmReady:v}=e,S="";qt(ro,a=null,a),qt(A_,i=null,i),qt(Ku,r="",r);let E=Zg(),T;async function M(oe){let ie="ltn_"+T.files[0].name;n(1,S=`Loading from file ${ie}`),window.localStorage.setItem(ie,await T.files[0].text()),n(2,E=Zg()),await u1(ie),n(1,S="")}function k(oe){window.confirm(`Really delete project ${oe}? You can't undo this.`)&&(window.localStorage.removeItem(oe),n(2,E=Zg()))}function R(oe){let ie=window.prompt(`Rename project ${oe} to what?`,oe);if(ie){ie.startsWith("ltn_")||(ie=`ltn_${ie}`);let ce=window.localStorage.getItem(oe);window.localStorage.setItem(ie,ce),window.localStorage.removeItem(oe),n(2,E=Zg())}}async function z(oe){n(1,S=`Loading project ${oe}`),await u1(oe),n(1,S="")}const U=()=>qt(Rn,l={mode:"new-project"},l),F=oe=>z(oe),G=oe=>R(oe),H=oe=>k(oe);function J(oe){si[oe?"unshift":"push"](()=>{T=oe,n(3,T)})}return t.$$set=oe=>{"wasmReady"in oe&&n(0,v=oe.wasmReady)},[v,S,E,T,c,l,d,M,k,R,z,U,F,G,H,J]}class G8 extends Xt{constructor(e){super(),Zt(this,e,j8,U8,Vt,{wasmReady:0})}}function IE(t,e,n){const r=t.slice();return r[17]=e[n][0],r[18]=e[n][1],r}function CE(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function q8(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function W8(t){let e,n,r,i,a,c,l,d;return a=new _r({props:{$$slots:{default:[q8]},$$scope:{ctx:t}}}),a.$on("click",t[13]),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),l.textContent="New project",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(v,S){we(v,e,S),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),d=!0},p(v,S){const E={};S&33554432&&(E.$$scope={dirty:S,ctx:v}),a.$set(E)},i(v){d||(he(a.$$.fragment,v),d=!0)},o(v){ve(a.$$.fragment,v),d=!1},d(v){v&&xe(e),We(a)}}}function TE(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k;e=new jE({props:{loading:t[4]}});let R=vs(t[3]),z=[];for(let U=0;Ut[9].call(a))},m(U,F){qe(e,U,F),we(U,n,F),we(U,r,F),ae(r,i),ae(r,a),ae(a,c);for(let G=0;G{S=null}),jn())},i(E){l||(he(S),l=!0)},o(E){ve(S),l=!1},d(E){E&&xe(e),S&&S.d(),d=!1,v()}}}function Z8(t){let e,n,r;return n=new L8({}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","map")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p:Mt,i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function X8(t){let e,n;return e=new hc({props:{$$slots:{map:[Z8],sidebar:[H8],top:[W8]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,[i]){const a={};i&33554558&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function Y8(t,e,n){let r,i,a,c,l;_t(t,Ku,H=>n(14,r=H)),_t(t,ro,H=>n(15,i=H)),_t(t,P_,H=>n(16,a=H)),_t(t,uu,H=>n(5,c=H)),_t(t,Rn,H=>n(6,l=H));let d="",v="",S=[],E="";Q_(async()=>{let H=await fetch(a?"/osm/areas.json":"https://assets.od2net.org/severance_pbfs/areas.json");n(3,S=await H.json())});function T(H){n(4,E="Loading OSM");try{qt(ro,i=new WE(new TextEncoder().encode(H.detail),void 0),i),qt(Ku,r=`ltn_${d}`,r),GT(),Jd()}catch(J){window.alert(`Couldn't import from Overpass: ${J}`)}n(4,E="")}async function M(){if(v=="")return;let H=`ltn_${d}`;window.localStorage.setItem(H,JSON.stringify({type:"FeatureCollection",features:[],study_area_name:v})),n(4,E=`Loading pre-clipped OSM area ${v}`),await u1(H),n(4,E="")}function k(){d=this.value,n(1,d)}function R(){v=OE(this),n(2,v),n(3,S)}return[M,d,v,S,E,c,l,T,k,R,()=>M(),H=>n(4,E=H.detail),H=>window.alert(H.detail),()=>qt(Rn,l={mode:"title"},l)]}class K8 extends Xt{constructor(e){super(),Zt(this,e,Y8,X8,Vt,{loadExample:0})}get loadExample(){return this.$$.ctx[0]}}const{window:J8}=c1;function $8(t){let e;return{c(){e=ut("Choose project")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function Q8(t){let e;return{c(){e=ut("Pick neighbourhood")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function e7(t){let e;return{c(){e=ut("Editing")},m(n,r){we(n,e,r)},d(n){n&&xe(e)}}}function t7(t){let e,n,r,i,a,c,l,d,v,S,E,T,M,k;return a=new _r({props:{$$slots:{default:[$8]},$$scope:{ctx:t}}}),a.$on("click",t[9]),d=new _r({props:{$$slots:{default:[Q8]},$$scope:{ctx:t}}}),d.$on("click",t[10]),E=new _r({props:{$$slots:{default:[e7]},$$scope:{ctx:t}}}),E.$on("click",t[5]),{c(){e=ye("div"),n=ye("nav"),r=ye("ul"),i=ye("li"),He(a.$$.fragment),c=Xe(),l=ye("li"),He(d.$$.fragment),v=Xe(),S=ye("li"),He(E.$$.fragment),T=Xe(),M=ye("li"),M.textContent="Viewing shortcuts",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(R,z){we(R,e,z),ae(e,n),ae(n,r),ae(r,i),qe(a,i,null),ae(r,c),ae(r,l),qe(d,l,null),ae(r,v),ae(r,S),qe(E,S,null),ae(r,T),ae(r,M),k=!0},p(R,z){const U={};z&8192&&(U.$$scope={dirty:z,ctx:R}),a.$set(U);const F={};z&8192&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&8192&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){k||(he(a.$$.fragment,R),he(d.$$.fragment,R),he(E.$$.fragment,R),k=!0)},o(R){ve(a.$$.fragment,R),ve(d.$$.fragment,R),ve(E.$$.fragment,R),k=!1},d(R){R&&xe(e),We(a),We(d),We(E)}}}function n7(t){let e,n,r,i,a,c,l,d,v,S=t[0].shortcutIndex+1+"",E,T,M=t[0].gj.features.length+"",k,R,z,U,F,G,H,J,oe,ie=Rr(t[0].gj.features[t[0].shortcutIndex].properties).directness.toFixed(1)+"",ce,fe,Te,Q,de;return{c(){e=ye("p"),e.textContent=`This shows all possible shortcuts crossing the blue road you've chosen. - A shortcut is defined as a route starting and ending outside the - neighbourhood, but cutting through it. It might not actually be - considered a "good shortcut" in practice -- this tool doesn't know any - real traffic patterns; it's just looking for any possible path. This - view lets you understand the limits of this assumption.`,n=Xe(),r=ye("button"),r.textContent="Pick a different road",i=Xe(),a=ye("div"),c=ye("button"),l=ut("Previous"),v=Xe(),E=ut(S),T=ut(" / "),k=ut(M),R=Xe(),z=ye("button"),U=ut("Next"),G=Xe(),H=ye("p"),J=ut("This shortcut is "),oe=ye("b"),ce=ut(ie),fe=ut("x"),Te=ut(` - the length of the shortest route using all roads, not just this neighbourhood`),c.disabled=d=t[0].shortcutIndex==0,Ce(c,"data-tooltip","Left"),z.disabled=F=t[0].shortcutIndex==t[0].gj.features.length-1,Ce(z,"data-tooltip","Right"),or(a,"display","flex"),or(a,"justify-content","space-between")},m(Qe,Me){we(Qe,e,Me),we(Qe,n,Me),we(Qe,r,Me),we(Qe,i,Me),we(Qe,a,Me),ae(a,c),ae(c,l),ae(a,v),ae(a,E),ae(a,T),ae(a,k),ae(a,R),ae(a,z),ae(z,U),we(Qe,G,Me),we(Qe,H,Me),ae(H,J),ae(H,oe),ae(oe,ce),ae(oe,fe),ae(H,Te),Q||(de=[Pt(r,"click",t[8]),Pt(c,"click",t[6]),Pt(z,"click",t[7])],Q=!0)},p(Qe,Me){Me&1&&d!==(d=Qe[0].shortcutIndex==0)&&(c.disabled=d),Me&1&&S!==(S=Qe[0].shortcutIndex+1+"")&&cr(E,S),Me&1&&M!==(M=Qe[0].gj.features.length+"")&&cr(k,M),Me&1&&F!==(F=Qe[0].shortcutIndex==Qe[0].gj.features.length-1)&&(z.disabled=F),Me&1&&ie!==(ie=Rr(Qe[0].gj.features[Qe[0].shortcutIndex].properties).directness.toFixed(1)+"")&&cr(ce,ie)},d(Qe){Qe&&(xe(e),xe(n),xe(r),xe(i),xe(a),xe(G),xe(H)),Q=!1,Jr(de)}}}function r7(t){let e;return{c(){e=ye("p"),e.textContent="Click a road to see shortcuts"},m(n,r){we(n,e,r)},p:Mt,d(n){n&&xe(e)}}}function i7(t){let e,n,r,i;n=new cb({}),n.$on("click",t[5]);function a(d,v){if(d[0].state=="neutral")return r7;if(d[0].state=="chose-road")return n7}let c=a(t),l=c&&c(t);return{c(){e=ye("div"),He(n.$$.fragment),r=Xe(),l&&l.c(),Ce(e,"slot","sidebar")},m(d,v){we(d,e,v),qe(n,e,null),ae(e,r),l&&l.m(e,null),i=!0},p(d,v){c===(c=a(d))&&l?l.p(d,v):(l&&l.d(1),l=c&&c(d),l&&(l.c(),l.m(e,null)))},i(d){i||(he(n.$$.fragment,d),i=!0)},o(d){ve(n.$$.fragment,d),i=!1},d(d){d&&xe(e),We(n),l&&l.d()}}}function o7(t){let e,n,r,i,a,c;return e=new es({props:{data:a1(JSON.parse(Rr(t[2]).renderNeighbourhood())),$$slots:{default:[a7]},$$scope:{ctx:t}}}),r=new es({props:{data:t[0].gj.features[t[0].shortcutIndex],$$slots:{default:[l7]},$$scope:{ctx:t}}}),a=new es({props:{data:t[0].roadGj,$$slots:{default:[u7]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment),n=Xe(),He(r.$$.fragment),i=Xe(),He(a.$$.fragment)},m(l,d){qe(e,l,d),we(l,n,d),qe(r,l,d),we(l,i,d),qe(a,l,d),c=!0},p(l,d){const v={};d&4&&(v.data=a1(JSON.parse(Rr(l[2]).renderNeighbourhood()))),d&8192&&(v.$$scope={dirty:d,ctx:l}),e.$set(v);const S={};d&1&&(S.data=l[0].gj.features[l[0].shortcutIndex]),d&8192&&(S.$$scope={dirty:d,ctx:l}),r.$set(S);const E={};d&1&&(E.data=l[0].roadGj),d&8192&&(E.$$scope={dirty:d,ctx:l}),a.$set(E)},i(l){c||(he(e.$$.fragment,l),he(r.$$.fragment,l),he(a.$$.fragment,l),c=!0)},o(l){ve(e.$$.fragment,l),ve(r.$$.fragment,l),ve(a.$$.fragment,l),c=!1},d(l){l&&(xe(n),xe(i)),We(e,l),We(r,l),We(a,l)}}}function s7(t){let e,n;return e=new Ey({props:{gjInput:JSON.parse(Rr(t[2]).renderNeighbourhood()),onClickLine:t[3],$$slots:{"line-popup":[h7]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&4&&(a.gjInput=JSON.parse(Rr(r[2]).renderNeighbourhood())),i&8192&&(a.$$scope={dirty:i,ctx:r}),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function a7(t){let e,n;const r=[Ri("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let i={};for(let a=0;a({12:i}),({props:i})=>i?4096:0]},$$scope:{ctx:t}}}),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,a){we(i,e,a),qe(n,e,null),r=!0},p(i,a){const c={};a&12288&&(c.$$scope={dirty:a,ctx:i}),n.$set(c)},i(i){r||(he(n.$$.fragment,i),r=!0)},o(i){ve(n.$$.fragment,i),r=!1},d(i){i&&xe(e),We(n)}}}function f7(t){let e,n,r,i,a,c;const l=[s7,o7],d=[];function v(S,E){return S[0].state=="neutral"?0:S[0].state=="chose-road"?1:-1}return~(n=v(t))&&(r=d[n]=l[n](t)),a=new Iy({}),{c(){e=ye("div"),r&&r.c(),i=Xe(),He(a.$$.fragment),Ce(e,"slot","map")},m(S,E){we(S,e,E),~n&&d[n].m(e,null),ae(e,i),qe(a,e,null),c=!0},p(S,E){let T=n;n=v(S),n===T?~n&&d[n].p(S,E):(r&&(Un(),ve(d[T],1,1,()=>{d[T]=null}),jn()),~n?(r=d[n],r?r.p(S,E):(r=d[n]=l[n](S),r.c()),he(r,1),r.m(e,i)):r=null)},i(S){c||(he(r),he(a.$$.fragment,S),c=!0)},o(S){ve(r),ve(a.$$.fragment,S),c=!1},d(S){S&&xe(e),~n&&d[n].d(),We(a)}}}function p7(t){let e,n,r,i;return e=new hc({props:{$$slots:{map:[f7],sidebar:[i7],top:[t7]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment)},m(a,c){qe(e,a,c),n=!0,r||(i=Pt(J8,"keydown",t[4]),r=!0)},p(a,[c]){const l={};c&8199&&(l.$$scope={dirty:c,ctx:a}),e.$set(l)},i(a){n||(he(e.$$.fragment,a),n=!0)},o(a){ve(e.$$.fragment,a),n=!1},d(a){We(e,a),r=!1,i()}}}function d7(t,e,n){let r,i,a;_t(t,Rn,R=>n(1,r=R)),_t(t,uu,R=>n(11,i=R)),_t(t,ro,R=>n(2,a=R));let c={state:"neutral"};function l(R,z){let U=JSON.parse(a.getShortcutsCrossingRoad(R.properties.id));if(U.features.length==0){window.alert("No shortcuts here");return}n(0,c={state:"chose-road",roadGj:R,gj:U,shortcutIndex:0})}Q_(()=>{i==null||i.keyboard.disable()}),no(()=>{i==null||i.keyboard.enable()});function d(R){c.state=="chose-road"&&(R.key=="ArrowLeft"&&c.shortcutIndex>0&&(R.stopPropagation(),n(0,c.shortcutIndex--,c)),R.key=="ArrowRight"&&(R.stopPropagation(),c.shortcutIndex!=c.gj.features.length-1&&n(0,c.shortcutIndex++,c)))}function v(){qt(Rn,r={mode:"neighbourhood"},r)}function S(){c.state=="chose-road"&&n(0,c.shortcutIndex--,c)}function E(){c.state=="chose-road"&&n(0,c.shortcutIndex++,c)}return[c,r,a,l,d,v,S,E,()=>n(0,c={state:"neutral"}),()=>qt(Rn,r={mode:"title"},r),()=>qt(Rn,r={mode:"network"},r)]}class m7 extends Xt{constructor(e){super(),Zt(this,e,d7,p7,Vt,{})}}function g7(t){let e,n,r,i,a,c,l,d,v,S,E;return c=new vB({}),{c(){e=ye("div"),n=ye("button"),r=ye("img"),a=Xe(),He(c.$$.fragment),l=Xe(),d=ye("span"),Wn(r.src,i=t[10]?C2:T2)||Ce(r,"src",i),or(r,"height","6vh"),Ce(r,"alt","A/B Street logo"),Ce(n,"class","outline"),or(d,"width","100%"),Ce(e,"slot","top"),or(e,"display","flex")},m(T,M){we(T,e,M),ae(e,n),ae(n,r),ae(e,a),qe(c,e,null),ae(e,l),ae(e,d),t[20](d),v=!0,S||(E=Pt(n,"click",t[19]),S=!0)},p(T,M){(!v||M&1024&&!Wn(r.src,i=T[10]?C2:T2))&&Ce(r,"src",i)},i(T){v||(he(c.$$.fragment,T),v=!0)},o(T){ve(c.$$.fragment,T),v=!1},d(T){T&&xe(e),We(c),t[20](null),S=!1,E()}}}function ME(t){let e,n,r,i,a,c;return r=new Kz({props:{map:Rr(t[6]),maptilerBasemap:t[7]}}),{c(){e=ye("button"),e.textContent="Zoom to fit study area",n=Xe(),He(r.$$.fragment),Ce(e,"class","secondary")},m(l,d){we(l,e,d),we(l,n,d),qe(r,l,d),i=!0,a||(c=Pt(e,"click",t[11]),a=!0)},p(l,d){const v={};d&64&&(v.map=Rr(l[6])),d&128&&(v.maptilerBasemap=l[7]),r.$set(v)},i(l){i||(he(r.$$.fragment,l),i=!0)},o(l){ve(r.$$.fragment,l),i=!1},d(l){l&&(xe(e),xe(n)),We(r,l),a=!1,c()}}}function _7(t){let e,n,r,i,a,c,l=t[5]&&ME(t);return{c(){e=ye("div"),n=ye("div"),r=Xe(),i=ye("hr"),a=Xe(),l&&l.c(),Ce(e,"slot","left")},m(d,v){we(d,e,v),ae(e,n),t[18](n),ae(e,r),ae(e,i),ae(e,a),l&&l.m(e,null),c=!0},p(d,v){d[5]?l?(l.p(d,v),v&32&&he(l,1)):(l=ME(d),l.c(),he(l,1),l.m(e,null)):l&&(Un(),ve(l,1,1,()=>{l=null}),jn())},i(d){c||(he(l),c=!0)},o(d){ve(l),c=!1},d(d){d&&xe(e),t[18](null),l&&l.d()}}}function y7(t){let e,n;return e=new K8({}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p:Mt,i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function v7(t){let e,n;return e=new G8({props:{wasmReady:t[4]}}),{c(){He(e.$$.fragment)},m(r,i){qe(e,r,i),n=!0},p(r,i){const a={};i&16&&(a.wasmReady=r[4]),e.$set(a)},i(r){n||(he(e.$$.fragment,r),n=!0)},o(r){ve(e.$$.fragment,r),n=!1},d(r){We(e,r)}}}function AE(t){let e,n,r,i,a,c;e=new es({props:{data:JSON.parse(t[5].getInvertedBoundary()),$$slots:{default:[b7]},$$scope:{ctx:t}}});const l=[C7,I7,E7,S7,w7,x7],d=[];function v(S,E){return S[8].mode=="network"?0:S[8].mode=="set-boundary"?1:S[8].mode=="neighbourhood"?2:S[8].mode=="view-shortcuts"?3:S[8].mode=="route"?4:S[8].mode=="debug"?5:-1}return~(r=v(t))&&(i=d[r]=l[r](t)),{c(){He(e.$$.fragment),n=Xe(),i&&i.c(),a=Fi()},m(S,E){qe(e,S,E),we(S,n,E),~r&&d[r].m(S,E),we(S,a,E),c=!0},p(S,E){const T={};E&32&&(T.data=JSON.parse(S[5].getInvertedBoundary())),E&4194304&&(T.$$scope={dirty:E,ctx:S}),e.$set(T);let M=r;r=v(S),r===M?~r&&d[r].p(S,E):(i&&(Un(),ve(d[M],1,1,()=>{d[M]=null}),jn()),~r?(i=d[r],i?i.p(S,E):(i=d[r]=l[r](S),i.c()),he(i,1),i.m(a.parentNode,a)):i=null)},i(S){c||(he(e.$$.fragment,S),he(i),c=!0)},o(S){ve(e.$$.fragment,S),ve(i),c=!1},d(S){S&&(xe(n),xe(a)),We(e,S),~r&&d[r].d(S)}}}function b7(t){let e,n;const r=[Ri("boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let a=0;a{T[F]=null}),jn()),~a?(c=T[a],c?c.p(R,z):(c=T[a]=E[a](R),c.c()),he(c,1),c.m(l.parentNode,l)):c=null),R[5]?k?(k.p(R,z),z&32&&he(k,1)):(k=AE(R),k.c(),he(k,1),k.m(d.parentNode,d)):k&&(Un(),ve(k,1,1,()=>{k=null}),jn())},i(R){S||(he(e.$$.fragment,R),he(c),he(k),he(v.$$.fragment,R),S=!0)},o(R){ve(e.$$.fragment,R),ve(c),ve(k),ve(v.$$.fragment,R),S=!1},d(R){R&&(xe(n),xe(r),xe(i),xe(l),xe(d)),We(e,R),t[15](null),~a&&T[a].d(R),k&&k.d(R),We(v,R)}}}function L7(t){let e,n,r,i;function a(l){t[16](l)}let c={style:`https://api.maptiler.com/maps/${t[7]}/style.json?key=${zv}`,standardControls:!0,hash:!0,images:[{id:"walk_cycle_only",url:"/ltn//filters/walk_cycle_only_icon.gif"},{id:"no_entry",url:"/ltn//filters/no_entry_icon.gif"},{id:"bus_gate",url:"/ltn//filters/bus_gate_icon.gif"},{id:"school_street",url:"/ltn//filters/school_street_icon.gif"},{id:"oneway-arrow",url:IR}],$$slots:{default:[T7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new pN({props:c}),si.push(()=>Il(n,"map",a)),n.$on("error",t[17]),{c(){e=ye("div"),He(n.$$.fragment),Ce(e,"slot","main"),or(e,"position","relative"),or(e,"width","100%"),or(e,"height","100%")},m(l,d){we(l,e,d),qe(n,e,null),i=!0},p(l,d){const v={};d&128&&(v.style=`https://api.maptiler.com/maps/${l[7]}/style.json?key=${zv}`),d&4194617&&(v.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,v.map=l[0],El(()=>r=!1)),n.$set(v)},i(l){i||(he(n.$$.fragment,l),i=!0)},o(l){ve(n.$$.fragment,l),i=!1},d(l){l&&xe(e),We(n)}}}function P7(t){let e,n,r,i;return e=new ER({}),r=new Ez({props:{$$slots:{main:[L7],left:[_7],top:[g7]},$$scope:{ctx:t}}}),{c(){He(e.$$.fragment),n=Xe(),He(r.$$.fragment)},m(a,c){qe(e,a,c),we(a,n,c),qe(r,a,c),i=!0},p(a,[c]){const l={};c&4196351&&(l.$$scope={dirty:c,ctx:a}),r.$set(l)},i(a){i||(he(e.$$.fragment,a),he(r.$$.fragment,a),i=!0)},o(a){ve(e.$$.fragment,a),ve(r.$$.fragment,a),i=!1},d(a){a&&xe(n),We(e,a),We(r,a)}}}function M7(t,e,n){let r,i,a,c,l,d,v,S,E,T;_t(t,s1,fe=>n(12,r=fe)),_t(t,o1,fe=>n(13,i=fe)),_t(t,i1,fe=>n(14,a=fe)),_t(t,ro,fe=>n(5,c=fe)),_t(t,uu,fe=>n(6,l=fe)),_t(t,P_,fe=>n(21,d=fe)),_t(t,Fv,fe=>n(7,v=fe)),_t(t,Rn,fe=>n(8,S=fe)),_t(t,M_,fe=>n(9,E=fe)),_t(t,Kd,fe=>n(10,T=fe));let M=!1;Q_(async()=>{await HE(),await KE(),n(4,M=!0);try{(await fetch("/osm/areas.json")).ok&&(qt(P_,d=!0,d),console.log("Using local cache, not od2net.org"))}catch{}});let k;function R(){l.fitBounds(Array.from(c.getBounds()),{animate:!1})}let z,U,F;function G(fe){si[fe?"unshift":"push"](()=>{F=fe,n(3,F),n(12,r)})}function H(fe){k=fe,n(0,k)}const J=fe=>{console.log(fe.detail.error)};function oe(fe){si[fe?"unshift":"push"](()=>{U=fe,n(2,U),n(13,i)})}const ie=()=>qt(M_,E=!0,E);function ce(fe){si[fe?"unshift":"push"](()=>{z=fe,n(1,z),n(14,a)})}return t.$$.update=()=>{t.$$.dirty&1&&k&&uu.set(k),t.$$.dirty&16386&&z&&a&&(n(1,z.innerHTML="",z),z.appendChild(a)),t.$$.dirty&8196&&U&&i&&(n(2,U.innerHTML="",U),U.appendChild(i)),t.$$.dirty&4104&&F&&r&&(n(3,F.innerHTML="",F),F.appendChild(r))},[k,z,U,F,M,c,l,v,S,E,T,R,r,i,a,G,H,J,oe,ie,ce]}class A7 extends Xt{constructor(e){super(),Zt(this,e,M7,P7,Vt,{})}}new A7({target:document.getElementById("app")}); diff --git a/assets/main-9f5175a9.js b/assets/main-9f5175a9.js new file mode 100644 index 0000000..0457338 --- /dev/null +++ b/assets/main-9f5175a9.js @@ -0,0 +1,669 @@ +var NP=Object.defineProperty;var OP=(t,e,n)=>e in t?NP(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Mi=(t,e,n)=>(OP(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Lt(){}function si(t,e){for(const n in e)t[n]=e[n];return t}function kE(t){return t()}function Wx(){return Object.create(null)}function Kr(t){t.forEach(kE)}function J_(t){return typeof t=="function"}function Ut(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Ng;function Wn(t,e){return t===e?!0:(Ng||(Ng=document.createElement("a")),Ng.href=e,t===Ng.href)}function zP(t){return Object.keys(t).length===0}function DE(t,...e){if(t==null){for(const r of e)r(void 0);return Lt}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ca(t){let e;return DE(t,n=>e=n)(),e}function mt(t,e,n){t.$$.on_destroy.push(DE(e,n))}function Sr(t,e,n,r){if(t){const i=RE(t,e,n,r);return t[0](i)}}function RE(t,e,n,r){return t[1]&&r?si(n.ctx.slice(),t[1](r(e))):n.ctx}function Er(t,e,n,r){if(t[2]&&r){const i=t[2](r(n));if(e.dirty===void 0)return i;if(typeof i=="object"){const s=[],c=Math.max(e.dirty.length,i.length);for(let l=0;l32){const e=[],n=t.ctx.length/32;for(let r=0;rt.removeEventListener(e,n,r)}function NE(t){return function(e){return e.preventDefault(),t.call(this,e)}}function R0(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function Ce(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function BP(t){let e;return{p(...n){e=n,e.forEach(r=>t.push(r))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function VP(t){return t===""?null:+t}function UP(t){return Array.from(t.childNodes)}function hr(t,e){e=""+e,t.data!==e&&(t.data=e)}function es(t,e){t.value=e??""}function sr(t,e,n,r){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,r?"important":"")}function h_(t,e,n){for(let r=0;r{const i=t.$$.callbacks[e];if(i){const s=jP(e,n,{cancelable:r});return i.slice().forEach(c=>{c.call(t,s)}),!s.defaultPrevented}return!0}}function f1(t,e){return gm().$$.context.set(t,e),e}function zE(t){return gm().$$.context.get(t)}function gn(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(r=>r.call(this,e))}const bf=[],ai=[];let Cf=[];const fv=[],FE=Promise.resolve();let pv=!1;function BE(){pv||(pv=!0,FE.then(UE))}function VE(){return BE(),FE}function Xd(t){Cf.push(t)}function El(t){fv.push(t)}const N0=new Set;let pf=0;function UE(){if(pf!==0)return;const t=Zd;do{try{for(;pft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Cf=e}const Yg=new Set;let qc;function Un(){qc={r:0,c:[],p:qc}}function jn(){qc.r||Kr(qc.c),qc=qc.p}function ue(t,e){t&&t.i&&(Yg.delete(t),t.i(e))}function ye(t,e,n,r){if(t&&t.o){if(Yg.has(t))return;Yg.add(t),qc.c.push(()=>{Yg.delete(t),r&&(n&&t.d(1),r())}),t.o(e)}else r&&r()}function bs(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function WP(t,e){ye(t,1,1,()=>{e.delete(t.key)})}function HP(t,e,n,r,i,s,c,l,d,v,S,E){let C=t.length,M=s.length,k=C;const R={};for(;k--;)R[t[k].key]=k;const z=[],U=new Map,F=new Map,G=[];for(k=M;k--;){const fe=E(i,s,k),pe=n(fe);let se=c.get(pe);se?r&&G.push(()=>se.p(fe,e)):(se=v(pe,fe),se.c()),U.set(pe,z[k]=se),pe in R&&F.set(pe,Math.abs(k-R[pe]))}const H=new Set,te=new Set;function ee(fe){ue(fe,1),fe.m(l,S),c.set(fe.key,fe),S=fe.first,M--}for(;C&&M;){const fe=z[M-1],pe=t[C-1],se=fe.key,Ae=pe.key;fe===pe?(S=fe.first,C--,M--):U.has(Ae)?!c.has(se)||H.has(se)?ee(fe):te.has(Ae)?C--:F.get(se)>F.get(Ae)?(te.add(se),ee(fe)):(H.add(Ae),C--):(d(pe,c),C--)}for(;C--;){const fe=t[C];U.has(fe.key)||d(fe,c)}for(;M;)ee(z[M-1]);return Kr(G),z}function p1(t,e){const n={},r={},i={$$scope:1};let s=t.length;for(;s--;){const c=t[s],l=e[s];if(l){for(const d in c)d in l||(r[d]=1);for(const d in l)i[d]||(n[d]=l[d],i[d]=1);t[s]=l}else for(const d in c)i[d]=1}for(const c in r)c in n||(n[c]=void 0);return n}function Il(t,e,n){const r=t.$$.props[e];r!==void 0&&(t.$$.bound[r]=n,n(t.$$.ctx[r]))}function Ge(t){t&&t.c()}function Ue(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),Xd(()=>{const s=t.$$.on_mount.map(kE).filter(J_);t.$$.on_destroy?t.$$.on_destroy.push(...s):Kr(s),t.$$.on_mount=[]}),i.forEach(Xd)}function je(t,e){const n=t.$$;n.fragment!==null&&(qP(n.after_update),Kr(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function ZP(t,e){t.$$.dirty[0]===-1&&(bf.push(t),BE(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=k)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](k),S&&ZP(t,E)),C}):[],v.update(),S=!0,Kr(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=UP(e.target);v.fragment&&v.fragment.l(E),E.forEach(be)}else v.fragment&&v.fragment.c();e.intro&&ue(t.$$.fragment),Ue(t,e.target,e.anchor),UE()}Fd(d)}class Yt{constructor(){Mi(this,"$$");Mi(this,"$$set")}$destroy(){je(this,1),this.$destroy=Lt}$on(e,n){if(!J_(n))return Lt;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!zP(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const XP="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(XP);function Hx(t){let e,n;return{c(){e=_e("div"),n=at(t[0]),Ce(e,"class","svelte-1uuov7f")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&1&&hr(n,r[0])},d(r){r&&be(e)}}}function YP(t){let e,n=t[0]&&Hx(t);return{c(){n&&n.c(),e=Fi()},m(r,i){n&&n.m(r,i),xe(r,e,i)},p(r,[i]){r[0]?n?n.p(r,i):(n=Hx(r),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},i:Lt,o:Lt,d(r){r&&be(e),n&&n.d(r)}}}function $P(t,e,n){let{loading:r}=e;return t.$$set=i=>{"loading"in i&&n(0,r=i.loading)},[r]}class jE extends Yt{constructor(e){super(),Xt(this,e,$P,YP,Ut,{loading:0})}}const KP=t=>({dialog:t&1}),Zx=t=>({dialog:t[0]});function JP(t){let e,n,r,i,s;const c=t[4].default,l=Sr(c,t,t[3],Zx);return{c(){e=_e("dialog"),n=_e("article"),l&&l.c(),e.open=!0},m(d,v){xe(d,e,v),oe(e,n),l&&l.m(n,null),t[6](e),r=!0,i||(s=[Mt(window,"click",t[1]),Mt(window,"keydown",t[2]),Mt(e,"close",t[5])],i=!0)},p(d,[v]){l&&l.p&&(!r||v&9)&&Ir(l,c,d,d[3],r?Er(c,d[3],v,KP):Cr(d[3]),Zx)},i(d){r||(ue(l,d),r=!0)},o(d){ye(l,d),r=!1},d(d){d&&be(e),l&&l.d(d),t[6](null),i=!1,Kr(s)}}}function QP(t,e,n){let{$$slots:r={},$$scope:i}=e,s;function c(S){s.open&&S.target==s&&s.close()}function l(S){(S.key=="Escape"||S.key=="Enter")&&(S.stopPropagation(),s.close())}function d(S){gn.call(this,t,S)}function v(S){ai[S?"unshift":"push"](()=>{s=S,n(0,s)})}return t.$$set=S=>{"$$scope"in S&&n(3,i=S.$$scope)},[s,c,l,i,r,d,v]}class d1 extends Yt{constructor(e){super(),Xt(this,e,QP,JP,Ut,{})}}function Xx(t,e,n){const r=t.slice();return r[1]=e[n][0],r[2]=e[n][1],r}function Yx(t){let e,n,r=t[1]+"",i,s,c,l=t[2]+"",d,v;return{c(){e=_e("tr"),n=_e("td"),i=at(r),s=Ze(),c=_e("td"),d=at(l),v=Ze()},m(S,E){xe(S,e,E),oe(e,n),oe(n,i),oe(e,s),oe(e,c),oe(c,d),oe(e,v)},p(S,E){E&1&&r!==(r=S[1]+"")&&hr(i,r),E&1&&l!==(l=S[2]+"")&&hr(d,l)},d(S){S&&be(e)}}}function eM(t){let e,n,r=bs(Object.entries(t[0])),i=[];for(let s=0;s{"properties"in i&&n(0,r=i.properties)},[r]}class ey extends Yt{constructor(e){super(),Xt(this,e,tM,eM,Ut,{properties:0})}}function $x(t,e){let n=document.createElement("a");n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e)),n.setAttribute("download",t),document.body.appendChild(n),n.click(),document.body.removeChild(n)}function Rr(t){if(t==null||t==null)throw new Error("Oops, notNull given something null");return t}let ot;const nu=new Array(128).fill(void 0);nu.push(void 0,null,!0,!1);function vn(t){return nu[t]}let Bd=nu.length;function nM(t){t<132||(nu[t]=Bd,Bd=t)}function ko(t){const e=vn(t);return nM(t),e}const GE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&GE.decode();let Cd=null;function Tf(){return(Cd===null||Cd.byteLength===0)&&(Cd=new Uint8Array(ot.memory.buffer)),Cd}function ms(t,e){return t=t>>>0,GE.decode(Tf().subarray(t,t+e))}function cr(t){Bd===nu.length&&nu.push(nu.length+1);const e=Bd;return Bd=nu[e],nu[e]=t,e}let Jo=0;const $g=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},rM=typeof $g.encodeInto=="function"?function(t,e){return $g.encodeInto(t,e)}:function(t,e){const n=$g.encode(t);return e.set(n),{read:t.length,written:n.length}};function Ba(t,e,n){if(n===void 0){const l=$g.encode(t),d=e(l.length,1)>>>0;return Tf().subarray(d,d+l.length).set(l),Jo=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Tf();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Tf().subarray(i+c,i+r),d=rM(t,l);c+=d.written}return Jo=c,i}function xf(t){return t==null}let Td=null;function Wt(){return(Td===null||Td.byteLength===0)&&(Td=new Int32Array(ot.memory.buffer)),Td}let Ld=null;function qE(){return(Ld===null||Ld.byteLength===0)&&(Ld=new Float64Array(ot.memory.buffer)),Ld}let Pd=null;function iM(){return(Pd===null||Pd.byteLength===0)&&(Pd=new BigInt64Array(ot.memory.buffer)),Pd}function dv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=dv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:r}function oM(t,e){const n=e(t.length*1,1)>>>0;return Tf().set(t,n/1),Jo=t.length,n}function sM(t,e){return t=t>>>0,qE().subarray(t/8,t/8+e)}function aM(t,e){return t=t>>>0,Tf().subarray(t/1,t/1+e)}function Gc(t,e){try{return t.apply(this,e)}catch(n){ot.__wbindgen_exn_store(cr(n))}}class WE{__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();ot.__wbg_ltn_free(e)}constructor(e,n){try{const d=ot.__wbindgen_add_to_stack_pointer(-16),v=oM(e,ot.__wbindgen_malloc),S=Jo;var r=xf(n)?0:Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),i=Jo;ot.ltn_new(d,v,S,r,i);var s=Wt()[d/4+0],c=Wt()[d/4+1],l=Wt()[d/4+2];if(l)throw ko(c);return this.__wbg_ptr=s>>>0,this}finally{ot.__wbindgen_add_to_stack_pointer(16)}}getInvertedBoundary(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getInvertedBoundary(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}getBounds(){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getBounds(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=sM(e,n).slice();return ot.__wbindgen_free(e,n*8,8),r}finally{ot.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapper(){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toRouteSnapper(i,this.__wbg_ptr);var e=Wt()[i/4+0],n=Wt()[i/4+1],r=aM(e,n).slice();return ot.__wbindgen_free(e,n*1,1),r}finally{ot.__wbindgen_add_to_stack_pointer(16)}}toRouteSnapperGj(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toRouteSnapperGj(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderModalFilters(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderModalFilters(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderNeighbourhood(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderNeighbourhood(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}renderAutoBoundaries(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_renderAutoBoundaries(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}setNeighbourhoodBoundary(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_setNeighbourhoodBoundary(s,this.__wbg_ptr,c,l,cr(n));var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}deleteNeighbourhoodBoundary(e){const n=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),r=Jo;ot.ltn_deleteNeighbourhoodBoundary(this.__wbg_ptr,n,r)}renameNeighbourhoodBoundary(e,n){const r=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),i=Jo,s=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;ot.ltn_renameNeighbourhoodBoundary(this.__wbg_ptr,r,i,s,c)}setCurrentNeighbourhood(e){try{const i=ot.__wbindgen_add_to_stack_pointer(-16),s=Ba(e,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;ot.ltn_setCurrentNeighbourhood(i,this.__wbg_ptr,s,c);var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw ko(n)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}addModalFilter(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_addModalFilter(s,this.__wbg_ptr,cr(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}addManyModalFilters(e,n){try{const s=ot.__wbindgen_add_to_stack_pointer(-16),c=Ba(n,ot.__wbindgen_malloc,ot.__wbindgen_realloc),l=Jo;ot.ltn_addManyModalFilters(s,this.__wbg_ptr,cr(e),c,l);var r=Wt()[s/4+0],i=Wt()[s/4+1];if(i)throw ko(r)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}deleteModalFilter(e){ot.ltn_deleteModalFilter(this.__wbg_ptr,e)}toggleDirection(e){ot.ltn_toggleDirection(this.__wbg_ptr,e)}undo(){ot.ltn_undo(this.__wbg_ptr)}redo(){ot.ltn_redo(this.__wbg_ptr)}getShortcutsCrossingRoad(e){let n,r;try{const S=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getShortcutsCrossingRoad(S,this.__wbg_ptr,e);var i=Wt()[S/4+0],s=Wt()[S/4+1],c=Wt()[S/4+2],l=Wt()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,ko(c);return n=d,r=v,ms(d,v)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(n,r,1)}}getAllShortcuts(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_getAllShortcuts(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}toSavefile(){let e,n;try{const v=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_toSavefile(v,this.__wbg_ptr);var r=Wt()[v/4+0],i=Wt()[v/4+1],s=Wt()[v/4+2],c=Wt()[v/4+3],l=r,d=i;if(c)throw l=0,d=0,ko(s);return e=l,n=d,ms(l,d)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(e,n,1)}}loadSavefile(e){try{const i=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_loadSavefile(i,this.__wbg_ptr,cr(e));var n=Wt()[i/4+0],r=Wt()[i/4+1];if(r)throw ko(n)}finally{ot.__wbindgen_add_to_stack_pointer(16)}}compareRoute(e,n,r,i,s){let c,l;try{const k=ot.__wbindgen_add_to_stack_pointer(-16);ot.ltn_compareRoute(k,this.__wbg_ptr,e,n,r,i,s);var d=Wt()[k/4+0],v=Wt()[k/4+1],S=Wt()[k/4+2],E=Wt()[k/4+3],C=d,M=v;if(E)throw C=0,M=0,ko(S);return c=C,l=M,ms(C,M)}finally{ot.__wbindgen_add_to_stack_pointer(16),ot.__wbindgen_free(c,l,1)}}}async function lM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){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",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function uM(){const t={};return t.wbg={},t.wbg.__wbindgen_object_drop_ref=function(e){ko(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(ms(e,n));return cr(r)},t.wbg.__wbindgen_string_get=function(e,n){const r=vn(n),i=typeof r=="string"?r:void 0;var s=xf(i)?0:Ba(i,ot.__wbindgen_malloc,ot.__wbindgen_realloc),c=Jo;Wt()[e/4+1]=c,Wt()[e/4+0]=s},t.wbg.__wbindgen_string_new=function(e,n){const r=ms(e,n);return cr(r)},t.wbg.__wbindgen_boolean_get=function(e){const n=vn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_is_bigint=function(e){return typeof vn(e)=="bigint"},t.wbg.__wbindgen_number_get=function(e,n){const r=vn(n),i=typeof r=="number"?r:void 0;qE()[e/8+1]=xf(i)?0:i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_is_object=function(e){const n=vn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_in=function(e,n){return vn(e)in vn(n)},t.wbg.__wbindgen_bigint_from_i64=function(e){return cr(e)},t.wbg.__wbindgen_jsval_eq=function(e,n){return vn(e)===vn(n)},t.wbg.__wbindgen_bigint_from_u64=function(e){const n=BigInt.asUintN(64,e);return cr(n)},t.wbg.__wbindgen_is_undefined=function(e){return vn(e)===void 0},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return vn(e)==vn(n)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=vn(e);return cr(n)},t.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(e,n){const r=vn(e)[vn(n)];return cr(r)},t.wbg.__wbg_debug_34c9290896ec9856=function(e){console.debug(vn(e))},t.wbg.__wbg_error_e60eff06f24ab7a4=function(e){console.error(vn(e))},t.wbg.__wbg_info_d7d58472d0bab115=function(e){console.info(vn(e))},t.wbg.__wbg_log_a4530b4fe289336f=function(e){console.log(vn(e))},t.wbg.__wbg_warn_f260f49434e45e62=function(e){console.warn(vn(e))},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return cr(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=vn(n).stack,i=Ba(r,ot.__wbindgen_malloc,ot.__wbindgen_realloc),s=Jo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(ms(e,n))}finally{ot.__wbindgen_free(r,i,1)}},t.wbg.__wbg_performance_3f3012faa4463882=function(e){const n=vn(e).performance;return cr(n)},t.wbg.__wbg_now_2fd65358804c9485=function(e){return vn(e).now()},t.wbg.__wbg_get_f01601b5a68d10e3=function(e,n){const r=vn(e)[n>>>0];return cr(r)},t.wbg.__wbg_length_1009b1af0c481d7b=function(e){return vn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof vn(e)=="function"},t.wbg.__wbg_newnoargs_c62ea9419c21fbac=function(e,n){const r=new Function(ms(e,n));return cr(r)},t.wbg.__wbg_next_9b877f231f476d01=function(e){const n=vn(e).next;return cr(n)},t.wbg.__wbg_next_6529ee0cca8d57ed=function(){return Gc(function(e){const n=vn(e).next();return cr(n)},arguments)},t.wbg.__wbg_done_5fe336b092d60cf2=function(e){return vn(e).done},t.wbg.__wbg_value_0c248a78fdc8e19f=function(e){const n=vn(e).value;return cr(n)},t.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return cr(Symbol.iterator)},t.wbg.__wbg_get_7b48513de5dc5ea4=function(){return Gc(function(e,n){const r=Reflect.get(vn(e),vn(n));return cr(r)},arguments)},t.wbg.__wbg_call_90c26b09837aba1c=function(){return Gc(function(e,n){const r=vn(e).call(vn(n));return cr(r)},arguments)},t.wbg.__wbg_self_f0e34d89f33b99fd=function(){return Gc(function(){const e=self.self;return cr(e)},arguments)},t.wbg.__wbg_window_d3b084224f4774d7=function(){return Gc(function(){const e=window.window;return cr(e)},arguments)},t.wbg.__wbg_globalThis_9caa27ff917c6860=function(){return Gc(function(){const e=globalThis.globalThis;return cr(e)},arguments)},t.wbg.__wbg_global_35dfdd59a4da3e74=function(){return Gc(function(){const e=global.global;return cr(e)},arguments)},t.wbg.__wbg_isArray_74fb723e24f76012=function(e){return Array.isArray(vn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(e){let n;try{n=vn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(e){return Number.isSafeInteger(vn(e))},t.wbg.__wbg_entries_9e2e2aa45aa5094a=function(e){const n=Object.entries(vn(e));return cr(n)},t.wbg.__wbg_buffer_a448f833075b71ba=function(e){const n=vn(e).buffer;return cr(n)},t.wbg.__wbg_new_8f67e318f15d7254=function(e){const n=new Uint8Array(vn(e));return cr(n)},t.wbg.__wbg_set_2357bf09366ee480=function(e,n,r){vn(e).set(vn(n),r>>>0)},t.wbg.__wbg_length_1d25fa9e4ac21ce7=function(e){return vn(e).length},t.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(e){let n;try{n=vn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const r=vn(n),i=typeof r=="bigint"?r:void 0;iM()[e/8+1]=xf(i)?BigInt(0):i,Wt()[e/4+0]=!xf(i)},t.wbg.__wbindgen_debug_string=function(e,n){const r=dv(vn(n)),i=Ba(r,ot.__wbindgen_malloc,ot.__wbindgen_realloc),s=Jo;Wt()[e/4+1]=s,Wt()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(ms(e,n))},t.wbg.__wbindgen_memory=function(){const e=ot.memory;return cr(e)},t}function cM(t,e){return ot=t.exports,HE.__wbindgen_wasm_module=e,Pd=null,Ld=null,Td=null,Cd=null,ot}async function HE(t){if(ot!==void 0)return ot;typeof t>"u"&&(t="/ltn/assets/backend_bg.wasm");const e=uM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await lM(await t,e);return cM(n,r)}var _m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function m1(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ty(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var ZE={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(n,r){t.exports=r()})(_m,function(){var n={},r={};function i(c,l,d){if(r[c]=d,c==="index"){var v="var sharedModule = {}; ("+r.shared+")(sharedModule); ("+r.worker+")(sharedModule);",S={};return r.shared(S),r.index(n,S),typeof window<"u"&&n.setWorkerUrl(window.URL.createObjectURL(new Blob([v],{type:"text/javascript"}))),n}}i("shared",["exports"],function(c){function l(u,o,h,p){return new(h||(h=Promise))(function(_,x){function w(D){try{P(p.next(D))}catch(O){x(O)}}function I(D){try{P(p.throw(D))}catch(O){x(O)}}function P(D){var O;D.done?_(D.value):(O=D.value,O instanceof h?O:new h(function(B){B(O)})).then(w,I)}P((p=p.apply(u,o||[])).next())})}function d(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}typeof SuppressedError=="function"&&SuppressedError;var v=S;function S(u,o){this.x=u,this.y=o}S.prototype={clone:function(){return new S(this.x,this.y)},add:function(u){return this.clone()._add(u)},sub:function(u){return this.clone()._sub(u)},multByPoint:function(u){return this.clone()._multByPoint(u)},divByPoint:function(u){return this.clone()._divByPoint(u)},mult:function(u){return this.clone()._mult(u)},div:function(u){return this.clone()._div(u)},rotate:function(u){return this.clone()._rotate(u)},rotateAround:function(u,o){return this.clone()._rotateAround(u,o)},matMult:function(u){return this.clone()._matMult(u)},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(u){return this.x===u.x&&this.y===u.y},dist:function(u){return Math.sqrt(this.distSqr(u))},distSqr:function(u){var o=u.x-this.x,h=u.y-this.y;return o*o+h*h},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(u){return Math.atan2(this.y-u.y,this.x-u.x)},angleWith:function(u){return this.angleWithSep(u.x,u.y)},angleWithSep:function(u,o){return Math.atan2(this.x*o-this.y*u,this.x*u+this.y*o)},_matMult:function(u){var o=u[2]*this.x+u[3]*this.y;return this.x=u[0]*this.x+u[1]*this.y,this.y=o,this},_add:function(u){return this.x+=u.x,this.y+=u.y,this},_sub:function(u){return this.x-=u.x,this.y-=u.y,this},_mult:function(u){return this.x*=u,this.y*=u,this},_div:function(u){return this.x/=u,this.y/=u,this},_multByPoint:function(u){return this.x*=u.x,this.y*=u.y,this},_divByPoint:function(u){return this.x/=u.x,this.y/=u.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var u=this.y;return this.y=this.x,this.x=-u,this},_rotate:function(u){var o=Math.cos(u),h=Math.sin(u),p=h*this.x+o*this.y;return this.x=o*this.x-h*this.y,this.y=p,this},_rotateAround:function(u,o){var h=Math.cos(u),p=Math.sin(u),_=o.y+p*(this.x-o.x)+h*(this.y-o.y);return this.x=o.x+h*(this.x-o.x)-p*(this.y-o.y),this.y=_,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},S.convert=function(u){return u instanceof S?u:Array.isArray(u)?new S(u[0],u[1]):u};var E=d(v),C=M;function M(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}M.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var k=d(C);let R,z;function U(){return R==null&&(R=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),R}function F(){if(z==null&&(z=!1,U())){const o=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(o){for(let p=0;p<5*5;p++){const _=4*p;o.fillStyle=`rgb(${_},${_+1},${_+2})`,o.fillRect(p%5,Math.floor(p/5),1,1)}const h=o.getImageData(0,0,5,5).data;for(let p=0;p<5*5*4;p++)if(p%4!=3&&h[p]!==p){z=!0;break}}}return z||!1}function G(u,o,h,p){const _=new k(u,o,h,p);return function(x){return _.solve(x)}}const H=G(.25,.1,.25,1);function te(u,o,h){return Math.min(h,Math.max(o,u))}function ee(u,o,h){const p=h-o,_=((u-o)%p+p)%p+o;return _===o?h:_}function fe(u,...o){for(const h of o)for(const p in h)u[p]=h[p];return u}let pe=1;function se(u,o,h){const p={};for(const _ in u)p[_]=o.call(h||this,u[_],_,u);return p}function Ae(u,o,h){const p={};for(const _ in u)o.call(h||this,u[_],_,u)&&(p[_]=u[_]);return p}function Y(u){return Array.isArray(u)?u.map(Y):typeof u=="object"&&u?se(u,Y):u}const ae={};function Ke(u){ae[u]||(typeof console<"u"&&console.warn(u),ae[u]=!0)}function Le(u,o,h){return(h.y-u.y)*(o.x-u.x)>(o.y-u.y)*(h.x-u.x)}function tt(u){let o=0;for(let h,p,_=0,x=u.length,w=x-1;_"u")throw new Error("VideoFrame not supported");const x=new VideoFrame(u,{timestamp:0});try{const w=x==null?void 0:x.format;if(!w||!w.startsWith("BGR")&&!w.startsWith("RGB"))throw new Error(`Unrecognized format ${w}`);const I=w.startsWith("BGR"),P=new Uint8ClampedArray(p*_*4);if(yield x.copyTo(P,function(D,O,B,W,X){const K=4*Math.max(-O,0),ie=(Math.max(0,B)-B)*W*4+K,de=4*W,we=Math.max(0,O),Oe=Math.max(0,B);return{rect:{x:we,y:Oe,width:Math.min(D.width,O+W)-we,height:Math.min(D.height,B+X)-Oe},layout:[{offset:ie,stride:de}]}}(u,o,h,p,_)),I)for(let D=0;Dut(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,Pn=function(u,o){if(/:\/\//.test(u.url)&&!/^https?:|^file:/.test(u.url)){const p=_n(u.url);if(p)return p(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,targetMapId:pn},o)}if(!(/^file:/.test(h=u.url)||/^file:/.test(zr())&&!/^\w+:/.test(h))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(p,_){return l(this,void 0,void 0,function*(){const x=new Request(p.url,{method:p.method||"GET",body:p.body,credentials:p.credentials,headers:p.headers,cache:p.cache,referrer:zr(),signal:_.signal});p.type==="json"&&x.headers.set("Accept","application/json");const w=yield fetch(x);if(!w.ok){const D=yield w.blob();throw new Yn(w.status,w.statusText,p.url,D)}let I;I=p.type==="arrayBuffer"||p.type==="image"?w.arrayBuffer():p.type==="json"?w.json():w.text();const P=yield I;if(_.signal.aborted)throw wn();return{data:P,cacheControl:w.headers.get("Cache-Control"),expires:w.headers.get("Expires")}})}(u,o);if(ut(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:u,mustQueue:!0,targetMapId:pn},o)}var h;return function(p,_){return new Promise((x,w)=>{const I=new XMLHttpRequest;I.open(p.method||"GET",p.url,!0),p.type!=="arrayBuffer"&&p.type!=="image"||(I.responseType="arraybuffer");for(const P in p.headers)I.setRequestHeader(P,p.headers[P]);p.type==="json"&&(I.responseType="text",I.setRequestHeader("Accept","application/json")),I.withCredentials=p.credentials==="include",I.onerror=()=>{w(new Error(I.statusText))},I.onload=()=>{if(!_.signal.aborted)if((I.status>=200&&I.status<300||I.status===0)&&I.response!==null){let P=I.response;if(p.type==="json")try{P=JSON.parse(I.response)}catch(D){return void w(D)}x({data:P,cacheControl:I.getResponseHeader("Cache-Control"),expires:I.getResponseHeader("Expires")})}else{const P=new Blob([I.response],{type:I.getResponseHeader("Content-Type")});w(new Yn(I.status,I.statusText,p.url,P))}},_.signal.addEventListener("abort",()=>{I.abort(),w(wn())}),I.send(p.body)})}(u,o)};function ar(u){if(!u||u.indexOf("://")<=0||u.indexOf("data:image/")===0||u.indexOf("blob:")===0)return!0;const o=new URL(u),h=window.location;return o.protocol===h.protocol&&o.host===h.host}function Zn(u,o,h){h[u]&&h[u].indexOf(o)!==-1||(h[u]=h[u]||[],h[u].push(o))}function ne(u,o,h){if(h&&h[u]){const p=h[u].indexOf(o);p!==-1&&h[u].splice(p,1)}}class Me{constructor(o,h={}){fe(this,h),this.type=o}}class dt extends Me{constructor(o,h={}){super("error",fe({error:o},h))}}class en{on(o,h){return this._listeners=this._listeners||{},Zn(o,h,this._listeners),this}off(o,h){return ne(o,h,this._listeners),ne(o,h,this._oneTimeListeners),this}once(o,h){return h?(this._oneTimeListeners=this._oneTimeListeners||{},Zn(o,h,this._oneTimeListeners),this):new Promise(p=>this.once(o,p))}fire(o,h){typeof o=="string"&&(o=new Me(o,h||{}));const p=o.type;if(this.listens(p)){o.target=this;const _=this._listeners&&this._listeners[p]?this._listeners[p].slice():[];for(const I of _)I.call(this,o);const x=this._oneTimeListeners&&this._oneTimeListeners[p]?this._oneTimeListeners[p].slice():[];for(const I of x)ne(p,I,this._oneTimeListeners),I.call(this,o);const w=this._eventedParent;w&&(fe(o,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),w.fire(o))}else o instanceof dt&&console.error(o.error);return this}listens(o){return this._listeners&&this._listeners[o]&&this._listeners[o].length>0||this._oneTimeListeners&&this._oneTimeListeners[o]&&this._oneTimeListeners[o].length>0||this._eventedParent&&this._eventedParent.listens(o)}setEventedParent(o,h){return this._eventedParent=o,this._eventedParentData=h,this}}var Re={$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 It=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Cn(u,o){const h={};for(const p in u)p!=="ref"&&(h[p]=u[p]);return It.forEach(p=>{p in o&&(h[p]=o[p])}),h}function yn(u,o){if(Array.isArray(u)){if(!Array.isArray(o)||u.length!==o.length)return!1;for(let h=0;h`:u.itemType.kind==="value"?"array":`array<${o}>`}return u.kind}const Te=[ui,ft,ln,sn,Hr,Jr,us,J(on),me,q,Z];function Q(u,o){if(o.kind==="error")return null;if(u.kind==="array"){if(o.kind==="array"&&(o.N===0&&o.itemType.kind==="value"||!Q(u.itemType,o.itemType))&&(typeof u.N!="number"||u.N===o.N))return null}else{if(u.kind===o.kind)return null;if(u.kind==="value"){for(const h of Te)if(!Q(h,o))return null}}return`Expected ${le(u)} but found ${le(o)} instead.`}function Pe(u,o){return o.some(h=>h.kind===u.kind)}function Se(u,o){return o.some(h=>h==="null"?u===null:h==="array"?Array.isArray(u):h==="object"?u&&!Array.isArray(u)&&typeof u=="object":h===typeof u)}function Ne(u,o){return u.kind==="array"&&o.kind==="array"?u.itemType.kind===o.itemType.kind&&typeof u.N=="number":u.kind===o.kind}const qe=.96422,Ye=.82521,Je=4/29,Dt=6/29,zt=3*Dt*Dt,Qt=Dt*Dt*Dt,tn=Math.PI/180,Mn=180/Math.PI;function er(u){return(u%=360)<0&&(u+=360),u}function vr([u,o,h,p]){let _,x;const w=dn((.2225045*(u=ci(u))+.7168786*(o=ci(o))+.0606169*(h=ci(h)))/1);u===o&&o===h?_=x=w:(_=dn((.4360747*u+.3850649*o+.1430804*h)/qe),x=dn((.0139322*u+.0971045*o+.7141733*h)/Ye));const I=116*w-16;return[I<0?0:I,500*(_-w),200*(w-x),p]}function ci(u){return u<=.04045?u/12.92:Math.pow((u+.055)/1.055,2.4)}function dn(u){return u>Qt?Math.pow(u,1/3):u/zt+Je}function Fr([u,o,h,p]){let _=(u+16)/116,x=isNaN(o)?_:_+o/500,w=isNaN(h)?_:_-h/200;return _=1*uo(_),x=qe*uo(x),w=Ye*uo(w),[_i(3.1338561*x-1.6168667*_-.4906146*w),_i(-.9787684*x+1.9161415*_+.033454*w),_i(.0719453*x-.2289914*_+1.4052427*w),p]}function _i(u){return(u=u<=.00304?12.92*u:1.055*Math.pow(u,1/2.4)-.055)<0?0:u>1?1:u}function uo(u){return u>Dt?u*u*u:zt*(u-Je)}function So(u){return parseInt(u.padEnd(2,u),16)/255}function Pi(u,o){return Ks(o?u/100:u,0,1)}function Ks(u,o,h){return Math.min(Math.max(o,u),h)}function Mm(u){return!u.some(Number.isNaN)}const Py={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 $n{constructor(o,h,p,_=1,x=!0){this.r=o,this.g=h,this.b=p,this.a=_,x||(this.r*=_,this.g*=_,this.b*=_,_||this.overwriteGetter("rgb",[o,h,p,_]))}static parse(o){if(o instanceof $n)return o;if(typeof o!="string")return;const h=function(p){if((p=p.toLowerCase().trim())==="transparent")return[0,0,0,0];const _=Py[p];if(_){const[w,I,P]=_;return[w/255,I/255,P/255,1]}if(p.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(p)){const w=p.length<6?1:2;let I=1;return[So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+=w)),So(p.slice(I,I+w)||"ff")]}if(p.startsWith("rgb")){const w=p.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(w){const[I,P,D,O,B,W,X,K,ie,de,we,Oe]=w,Ee=[O||" ",X||" ",de].join("");if(Ee===" "||Ee===" /"||Ee===",,"||Ee===",,,"){const ke=[D,W,ie].join(""),Qe=ke==="%%%"?100:ke===""?255:0;if(Qe){const et=[Ks(+P/Qe,0,1),Ks(+B/Qe,0,1),Ks(+K/Qe,0,1),we?Pi(+we,Oe):1];if(Mm(et))return et}}return}}const x=p.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(x){const[w,I,P,D,O,B,W,X,K]=x,ie=[P||" ",O||" ",W].join("");if(ie===" "||ie===" /"||ie===",,"||ie===",,,"){const de=[+I,Ks(+D,0,100),Ks(+B,0,100),X?Pi(+X,K):1];if(Mm(de))return function([we,Oe,Ee,ke]){function Qe(et){const St=(et+we/30)%12,kt=Oe*Math.min(Ee,1-Ee);return Ee-kt*Math.max(-1,Math.min(St-3,9-St,1))}return we=er(we),Oe/=100,Ee/=100,[Qe(0),Qe(8),Qe(4),ke]}(de)}}}(o);return h?new $n(...h,!1):void 0}get rgb(){const{r:o,g:h,b:p,a:_}=this,x=_||1/0;return this.overwriteGetter("rgb",[o/x,h/x,p/x,_])}get hcl(){return this.overwriteGetter("hcl",function(o){const[h,p,_,x]=vr(o),w=Math.sqrt(p*p+_*_);return[Math.round(1e4*w)?er(Math.atan2(_,p)*Mn):NaN,w,h,x]}(this.rgb))}get lab(){return this.overwriteGetter("lab",vr(this.rgb))}overwriteGetter(o,h){return Object.defineProperty(this,o,{value:h}),h}toString(){const[o,h,p,_]=this.rgb;return`rgba(${[o,h,p].map(x=>Math.round(255*x)).join(",")},${_})`}}$n.black=new $n(0,0,0,1),$n.white=new $n(1,1,1,1),$n.transparent=new $n(0,0,0,0),$n.red=new $n(1,0,0,1);class yp{constructor(o,h,p){this.sensitivity=o?h?"variant":"case":h?"accent":"base",this.locale=p,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(o,h){return this.collator.compare(o,h)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class vp{constructor(o,h,p,_,x){this.text=o,this.image=h,this.scale=p,this.fontStack=_,this.textColor=x}}class jo{constructor(o){this.sections=o}static fromString(o){return new jo([new vp(o,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(o=>o.text.length!==0||o.image&&o.image.name.length!==0)}static factory(o){return o instanceof jo?o:jo.fromString(o)}toString(){return this.sections.length===0?"":this.sections.map(o=>o.text).join("")}}class Eo{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof Eo)return o;if(typeof o=="number")return new Eo([o,o,o,o]);if(Array.isArray(o)&&!(o.length<1||o.length>4)){for(const h of o)if(typeof h!="number")return;switch(o.length){case 1:o=[o[0],o[0],o[0],o[0]];break;case 2:o=[o[0],o[1],o[0],o[1]];break;case 3:o=[o[0],o[1],o[2],o[1]]}return new Eo(o)}}toString(){return JSON.stringify(this.values)}}const _c=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class cs{constructor(o){this.values=o.slice()}static parse(o){if(o instanceof cs)return o;if(Array.isArray(o)&&!(o.length<1)&&o.length%2==0){for(let h=0;h=0&&u<=255&&typeof o=="number"&&o>=0&&o<=255&&typeof h=="number"&&h>=0&&h<=255?p===void 0||typeof p=="number"&&p>=0&&p<=1?null:`Invalid rgba value [${[u,o,h,p].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof p=="number"?[u,o,h,p]:[u,o,h]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function mh(u){if(u===null||typeof u=="string"||typeof u=="boolean"||typeof u=="number"||u instanceof $n||u instanceof yp||u instanceof jo||u instanceof Eo||u instanceof cs||u instanceof hs)return!0;if(Array.isArray(u)){for(const o of u)if(!mh(o))return!1;return!0}if(typeof u=="object"){for(const o in u)if(!mh(u[o]))return!1;return!0}return!1}function hi(u){if(u===null)return ui;if(typeof u=="string")return ln;if(typeof u=="boolean")return sn;if(typeof u=="number")return ft;if(u instanceof $n)return Hr;if(u instanceof yp)return Aa;if(u instanceof jo)return Jr;if(u instanceof Eo)return me;if(u instanceof cs)return Z;if(u instanceof hs)return q;if(Array.isArray(u)){const o=u.length;let h;for(const p of u){const _=hi(p);if(h){if(h===_)continue;h=on;break}h=_}return J(h||on,o)}return us}function yc(u){const o=typeof u;return u===null?"":o==="string"||o==="number"||o==="boolean"?String(u):u instanceof $n||u instanceof jo||u instanceof Eo||u instanceof cs||u instanceof hs?u.toString():JSON.stringify(u)}class nl{constructor(o,h){this.type=o,this.value=h}static parse(o,h){if(o.length!==2)return h.error(`'literal' expression requires exactly one argument, but found ${o.length-1} instead.`);if(!mh(o[1]))return h.error("invalid value");const p=o[1];let _=hi(p);const x=h.expectedType;return _.kind!=="array"||_.N!==0||!x||x.kind!=="array"||typeof x.N=="number"&&x.N!==0||(_=x),new nl(_,p)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Pr{constructor(o){this.name="ExpressionEvaluationError",this.message=o}toJSON(){return this.message}}const gh={string:ln,number:ft,boolean:sn,object:us};class Go{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");let p,_=1;const x=o[0];if(x==="array"){let I,P;if(o.length>2){const D=o[1];if(typeof D!="string"||!(D in gh)||D==="object")return h.error('The item type argument of "array" must be one of string, number, boolean',1);I=gh[D],_++}else I=on;if(o.length>3){if(o[2]!==null&&(typeof o[2]!="number"||o[2]<0||o[2]!==Math.floor(o[2])))return h.error('The length argument to "array" must be a positive integer literal',2);P=o[2],_++}p=J(I,P)}else{if(!gh[x])throw new Error(`Types doesn't contain name = ${x}`);p=gh[x]}const w=[];for(;_o.outputDefined())}}const _h={"to-boolean":sn,"to-color":Hr,"to-number":ft,"to-string":ln};class Js{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[0];if(!_h[p])throw new Error(`Can't parse ${p} as it is not part of the known types`);if((p==="to-boolean"||p==="to-string")&&o.length!==2)return h.error("Expected one argument.");const _=_h[p],x=[];for(let w=1;w4?`Invalid rbga value ${JSON.stringify(h)}: expected an array containing either three or four numeric values.`:xu(h[0],h[1],h[2],h[3]),!p))return new $n(h[0]/255,h[1]/255,h[2]/255,h[3])}throw new Pr(p||`Could not parse color from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"padding":{let h;for(const p of this.args){h=p.evaluate(o);const _=Eo.parse(h);if(_)return _}throw new Pr(`Could not parse padding from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"variableAnchorOffsetCollection":{let h;for(const p of this.args){h=p.evaluate(o);const _=cs.parse(h);if(_)return _}throw new Pr(`Could not parse variableAnchorOffsetCollection from value '${typeof h=="string"?h:JSON.stringify(h)}'`)}case"number":{let h=null;for(const p of this.args){if(h=p.evaluate(o),h===null)return 0;const _=Number(h);if(!isNaN(_))return _}throw new Pr(`Could not convert ${JSON.stringify(h)} to number.`)}case"formatted":return jo.fromString(yc(this.args[0].evaluate(o)));case"resolvedImage":return hs.fromString(yc(this.args[0].evaluate(o)));default:return yc(this.args[0].evaluate(o))}}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}const vc=["Unknown","Point","LineString","Polygon"];class Kn{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"?vc[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(o){let h=this._parseColorCache[o];return h||(h=this._parseColorCache[o]=$n.parse(o)),h}}class yh{constructor(o,h,p=[],_,x=new Fl,w=[]){this.registry=o,this.path=p,this.key=p.map(I=>`[${I}]`).join(""),this.scope=x,this.errors=w,this.expectedType=_,this._isConstant=h}parse(o,h,p,_,x={}){return h?this.concat(h,p,_)._parse(o,x):this._parse(o,x)}_parse(o,h){function p(_,x,w){return w==="assert"?new Go(x,[_]):w==="coerce"?new Js(x,[_]):_}if(o!==null&&typeof o!="string"&&typeof o!="boolean"&&typeof o!="number"||(o=["literal",o]),Array.isArray(o)){if(o.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const _=o[0];if(typeof _!="string")return this.error(`Expression name must be a string, but found ${typeof _} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const x=this.registry[_];if(x){let w=x.parse(o,this);if(!w)return null;if(this.expectedType){const I=this.expectedType,P=w.type;if(I.kind!=="string"&&I.kind!=="number"&&I.kind!=="boolean"&&I.kind!=="object"&&I.kind!=="array"||P.kind!=="value")if(I.kind!=="color"&&I.kind!=="formatted"&&I.kind!=="resolvedImage"||P.kind!=="value"&&P.kind!=="string")if(I.kind!=="padding"||P.kind!=="value"&&P.kind!=="number"&&P.kind!=="array")if(I.kind!=="variableAnchorOffsetCollection"||P.kind!=="value"&&P.kind!=="array"){if(this.checkSubtype(I,P))return null}else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"coerce");else w=p(w,I,h.typeAnnotation||"assert")}if(!(w instanceof nl)&&w.type.kind!=="resolvedImage"&&this._isConstant(w)){const I=new Kn;try{w=new nl(w.type,w.evaluate(I))}catch(P){return this.error(P.message),null}}return w}return this.error(`Unknown expression "${_}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(o===void 0?"'undefined' value invalid. Use null instead.":typeof o=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof o} instead.`)}concat(o,h,p){const _=typeof o=="number"?this.path.concat(o):this.path,x=p?this.scope.concat(p):this.scope;return new yh(this.registry,this._isConstant,_,h||null,x,this.errors)}error(o,...h){const p=`${this.key}${h.map(_=>`[${_}]`).join("")}`;this.errors.push(new lo(p,o))}checkSubtype(o,h){const p=Q(o,h);return p&&this.error(p),p}}class wu{constructor(o,h,p){this.type=Aa,this.locale=p,this.caseSensitive=o,this.diacriticSensitive=h}static parse(o,h){if(o.length!==2)return h.error("Expected one argument.");const p=o[1];if(typeof p!="object"||Array.isArray(p))return h.error("Collator options argument must be an object.");const _=h.parse(p["case-sensitive"]!==void 0&&p["case-sensitive"],1,sn);if(!_)return null;const x=h.parse(p["diacritic-sensitive"]!==void 0&&p["diacritic-sensitive"],1,sn);if(!x)return null;let w=null;return p.locale&&(w=h.parse(p.locale,1,ln),!w)?null:new wu(_,x,w)}evaluate(o){return new yp(this.caseSensitive.evaluate(o),this.diacriticSensitive.evaluate(o),this.locale?this.locale.evaluate(o):null)}eachChild(o){o(this.caseSensitive),o(this.diacriticSensitive),this.locale&&o(this.locale)}outputDefined(){return!1}}const rl=8192;function vh(u,o){u[0]=Math.min(u[0],o[0]),u[1]=Math.min(u[1],o[1]),u[2]=Math.max(u[2],o[0]),u[3]=Math.max(u[3],o[1])}function bc(u,o){return!(u[0]<=o[0]||u[2]>=o[2]||u[1]<=o[1]||u[3]>=o[3])}function My(u,o){const h=(180+u[0])/360,p=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u[1]*Math.PI/360)))/360,_=Math.pow(2,o.z);return[Math.round(h*_*rl),Math.round(p*_*rl)]}function Am(u,o,h){const p=u[0]-o[0],_=u[1]-o[1],x=u[0]-h[0],w=u[1]-h[1];return p*w-x*_==0&&p*x<=0&&_*w<=0}function bh(u,o){let h=!1;for(let w=0,I=o.length;w(p=u)[1]!=(x=P[D+1])[1]>p[1]&&p[0]<(x[0]-_[0])*(p[1]-_[1])/(x[1]-_[1])+_[0]&&(h=!h)}}var p,_,x;return h}function Ay(u,o){for(let h=0;h0&&I<0||w<0&&I>0}function ky(u,o,h){for(const D of h)for(let O=0;Oh[2]){const _=.5*p;let x=u[0]-h[0]>_?-p:h[0]-u[0]>_?p:0;x===0&&(x=u[0]-h[2]>_?-p:h[2]-u[0]>_?p:0),u[0]+=x}vh(o,u)}function wh(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const I of u)for(const P of I){const D=[P.x+x[0],P.y+x[1]];Om(D,o,h,_),w.push(D)}return w}function zm(u,o,h,p){const _=Math.pow(2,p.z)*rl,x=[p.x*rl,p.y*rl],w=[];for(const P of u){const D=[];for(const O of P){const B=[O.x+x[0],O.y+x[1]];vh(o,B),D.push(B)}w.push(D)}if(o[2]-o[0]<=_/2){(I=o)[0]=I[1]=1/0,I[2]=I[3]=-1/0;for(const P of w)for(const D of P)Om(D,o,h,_)}var I;return w}class Bl{constructor(o,h){this.type=sn,this.geojson=o,this.geometries=h}static parse(o,h){if(o.length!==2)return h.error(`'within' expression requires exactly one argument, but found ${o.length-1} instead.`);if(mh(o[1])){const p=o[1];if(p.type==="FeatureCollection"){const _=[];for(const x of p.features){const{type:w,coordinates:I}=x.geometry;w==="Polygon"&&_.push(I),w==="MultiPolygon"&&_.push(...I)}if(_.length)return new Bl(p,{type:"MultiPolygon",coordinates:_})}else if(p.type==="Feature"){const _=p.geometry.type;if(_==="Polygon"||_==="MultiPolygon")return new Bl(p,p.geometry)}else if(p.type==="Polygon"||p.type==="MultiPolygon")return new Bl(p,p)}return h.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(o){if(o.geometry()!=null&&o.canonicalID()!=null){if(o.geometryType()==="Point")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!bh(D,I))return!1}if(p.type==="MultiPolygon"){const I=Nm(p.coordinates,x,w),P=wh(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Ay(D,I))return!1}return!0}(o,this.geometries);if(o.geometryType()==="LineString")return function(h,p){const _=[1/0,1/0,-1/0,-1/0],x=[1/0,1/0,-1/0,-1/0],w=h.canonicalID();if(p.type==="Polygon"){const I=xh(p.coordinates,x,w),P=zm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Dm(D,I))return!1}if(p.type==="MultiPolygon"){const I=Nm(p.coordinates,x,w),P=zm(h.geometry(),_,x,w);if(!bc(_,x))return!1;for(const D of P)if(!Rm(D,I))return!1}return!0}(o,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}class Sh{constructor(o,h){this.type=h.type,this.name=o,this.boundExpression=h}static parse(o,h){if(o.length!==2||typeof o[1]!="string")return h.error("'var' expression requires exactly one string literal argument.");const p=o[1];return h.scope.has(p)?new Sh(p,h.scope.get(p)):h.error(`Unknown variable "${p}". Make sure "${p}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(o){return this.boundExpression.evaluate(o)}eachChild(){}outputDefined(){return!1}}class qo{constructor(o,h,p,_){this.name=o,this.type=h,this._evaluate=p,this.args=_}evaluate(o){return this._evaluate(o,this.args)}eachChild(o){this.args.forEach(o)}outputDefined(){return!1}static parse(o,h){const p=o[0],_=qo.definitions[p];if(!_)return h.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`,0);const x=Array.isArray(_)?_[0]:_.type,w=Array.isArray(_)?[[_[1],_[2]]]:_.overloads,I=w.filter(([D])=>!Array.isArray(D)||D.length===o.length-1);let P=null;for(const[D,O]of I){P=new yh(h.registry,xc,h.path,null,h.scope);const B=[];let W=!1;for(let X=1;X{return W=B,Array.isArray(W)?`(${W.map(le).join(", ")})`:`(${le(W.type)}...)`;var W}).join(" | "),O=[];for(let B=1;B{h=o?h&&xc(p):h&&p instanceof nl}),!!h&&Eh(u)&&Sc(u,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Eh(u){if(u instanceof qo&&(u.name==="get"&&u.args.length===1||u.name==="feature-state"||u.name==="has"&&u.args.length===1||u.name==="properties"||u.name==="geometry-type"||u.name==="id"||/^filter-/.test(u.name))||u instanceof Bl)return!1;let o=!0;return u.eachChild(h=>{o&&!Eh(h)&&(o=!1)}),o}function wc(u){if(u instanceof qo&&u.name==="feature-state")return!1;let o=!0;return u.eachChild(h=>{o&&!wc(h)&&(o=!1)}),o}function Sc(u,o){if(u instanceof qo&&o.indexOf(u.name)>=0)return!1;let h=!0;return u.eachChild(p=>{h&&!Sc(p,o)&&(h=!1)}),h}function Ec(u,o){const h=u.length-1;let p,_,x=0,w=h,I=0;for(;x<=w;)if(I=Math.floor((x+w)/2),p=u[I],_=u[I+1],p<=o){if(I===h||o<_)return I;x=I+1}else{if(!(p>o))throw new Pr("Input is not a number.");w=I-1}return 0}class Ic{constructor(o,h,p){this.type=o,this.input=h,this.labels=[],this.outputs=[];for(const[_,x]of p)this.labels.push(_),this.outputs.push(x)}static parse(o,h){if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=[];let x=null;h.expectedType&&h.expectedType.kind!=="value"&&(x=h.expectedType);for(let w=1;w=I)return h.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',D);const B=h.parse(P,O,x);if(!B)return null;x=x||B.type,_.push([I,B])}return new Ic(x,p,_)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;return _>=h[x-1]?p[x-1].evaluate(o):p[Ec(h,_)].evaluate(o)}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Dy(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Ry=Fm;function Fm(u,o,h,p){this.cx=3*u,this.bx=3*(h-u)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*o,this.by=3*(p-o)-this.cy,this.ay=1-this.cy-this.by,this.p1x=u,this.p1y=o,this.p2x=h,this.p2y=p}Fm.prototype={sampleCurveX:function(u){return((this.ax*u+this.bx)*u+this.cx)*u},sampleCurveY:function(u){return((this.ay*u+this.by)*u+this.cy)*u},sampleCurveDerivativeX:function(u){return(3*this.ax*u+2*this.bx)*u+this.cx},solveCurveX:function(u,o){if(o===void 0&&(o=1e-6),u<0)return 0;if(u>1)return 1;for(var h=u,p=0;p<8;p++){var _=this.sampleCurveX(h)-u;if(Math.abs(_)_?w=h:I=h,h=.5*(I-w)+w;return h},solve:function(u,o){return this.sampleCurveY(this.solveCurveX(u,o))}};var Ny=Dy(Ry);function Vl(u,o,h){return u+h*(o-u)}function Ih(u,o,h){return u.map((p,_)=>Vl(p,o[_],h))}const co={number:Vl,color:function(u,o,h,p="rgb"){switch(p){case"rgb":{const[_,x,w,I]=Ih(u.rgb,o.rgb,h);return new $n(_,x,w,I,!1)}case"hcl":{const[_,x,w,I]=u.hcl,[P,D,O,B]=o.hcl;let W,X;if(isNaN(_)||isNaN(P))isNaN(_)?isNaN(P)?W=NaN:(W=P,w!==1&&w!==0||(X=D)):(W=_,O!==1&&O!==0||(X=x));else{let Oe=P-_;P>_&&Oe>180?Oe-=360:P<_&&_-P>180&&(Oe+=360),W=_+h*Oe}const[K,ie,de,we]=function([Oe,Ee,ke,Qe]){return Oe=isNaN(Oe)?0:Oe*tn,Fr([ke,Math.cos(Oe)*Ee,Math.sin(Oe)*Ee,Qe])}([W,X??Vl(x,D,h),Vl(w,O,h),Vl(I,B,h)]);return new $n(K,ie,de,we,!1)}case"lab":{const[_,x,w,I]=Fr(Ih(u.lab,o.lab,h));return new $n(_,x,w,I,!1)}}},array:Ih,padding:function(u,o,h){return new Eo(Ih(u.values,o.values,h))},variableAnchorOffsetCollection:function(u,o,h){const p=u.values,_=o.values;if(p.length!==_.length)throw new Pr(`Cannot interpolate values of different length. from: ${u.toString()}, to: ${o.toString()}`);const x=[];for(let w=0;wtypeof O!="number"||O<0||O>1))return h.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);_={name:"cubic-bezier",controlPoints:D}}}if(o.length-1<4)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if((o.length-1)%2!=0)return h.error("Expected an even number of arguments.");if(x=h.parse(x,2,ft),!x)return null;const I=[];let P=null;p==="interpolate-hcl"||p==="interpolate-lab"?P=Hr:h.expectedType&&h.expectedType.kind!=="value"&&(P=h.expectedType);for(let D=0;D=O)return h.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',W);const K=h.parse(B,X,P);if(!K)return null;P=P||K.type,I.push([O,K])}return Ne(P,ft)||Ne(P,Hr)||Ne(P,me)||Ne(P,Z)||Ne(P,J(ft))?new Zi(P,p,_,x,I):h.error(`Type ${le(P)} is not interpolatable.`)}evaluate(o){const h=this.labels,p=this.outputs;if(h.length===1)return p[0].evaluate(o);const _=this.input.evaluate(o);if(_<=h[0])return p[0].evaluate(o);const x=h.length;if(_>=h[x-1])return p[x-1].evaluate(o);const w=Ec(h,_),I=Zi.interpolationFactor(this.interpolation,_,h[w],h[w+1]),P=p[w].evaluate(o),D=p[w+1].evaluate(o);switch(this.operator){case"interpolate":return co[this.type.kind](P,D,I);case"interpolate-hcl":return co.color(P,D,I,"hcl");case"interpolate-lab":return co.color(P,D,I,"lab")}}eachChild(o){o(this.input);for(const h of this.outputs)o(h)}outputDefined(){return this.outputs.every(o=>o.outputDefined())}}function Gn(u,o,h,p){const _=p-h,x=u-h;return _===0?0:o===1?x/_:(Math.pow(o,x)-1)/(Math.pow(o,_)-1)}class Ch{constructor(o,h){this.type=o,this.args=h}static parse(o,h){if(o.length<2)return h.error("Expectected at least one argument.");let p=null;const _=h.expectedType;_&&_.kind!=="value"&&(p=_);const x=[];for(const I of o.slice(1)){const P=h.parse(I,1+x.length,p,void 0,{typeAnnotation:"omit"});if(!P)return null;p=p||P.type,x.push(P)}if(!p)throw new Error("No output type");const w=_&&x.some(I=>Q(_,I.type));return new Ch(w?on:p,x)}evaluate(o){let h,p=null,_=0;for(const x of this.args)if(_++,p=x.evaluate(o),p&&p instanceof hs&&!p.available&&(h||(h=p.name),p=null,_===this.args.length&&(p=h)),p!==null)break;return p}eachChild(o){this.args.forEach(o)}outputDefined(){return this.args.every(o=>o.outputDefined())}}class Th{constructor(o,h){this.type=h.type,this.bindings=[].concat(o),this.result=h}evaluate(o){return this.result.evaluate(o)}eachChild(o){for(const h of this.bindings)o(h[1]);o(this.result)}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found ${o.length-1} instead.`);const p=[];for(let x=1;x=p.length)throw new Pr(`Array index out of bounds: ${h} > ${p.length-1}.`);if(h!==Math.floor(h))throw new Pr(`Array index must be an integer, but found ${h} instead.`);return p[h]}eachChild(o){o(this.index),o(this.input)}outputDefined(){return!1}}class xp{constructor(o,h){this.type=sn,this.needle=o,this.haystack=h}static parse(o,h){if(o.length!==3)return h.error(`Expected 2 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);return p&&_?Pe(p.type,[sn,ln,ft,ui,on])?new xp(p,_):h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`):null}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!p)return!1;if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);return p.indexOf(h)>=0}eachChild(o){o(this.needle),o(this.haystack)}outputDefined(){return!0}}class Lh{constructor(o,h,p){this.type=ft,this.needle=o,this.haystack=h,this.fromIndex=p}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,on);if(!p||!_)return null;if(!Pe(p.type,[sn,ln,ft,ui,on]))return h.error(`Expected first argument to be of type boolean, string, number or null, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Lh(p,_,x):null}return new Lh(p,_)}evaluate(o){const h=this.needle.evaluate(o),p=this.haystack.evaluate(o);if(!Se(h,["boolean","string","number","null"]))throw new Pr(`Expected first argument to be of type boolean, string, number or null, but found ${le(hi(h))} instead.`);if(!Se(p,["string","array"]))throw new Pr(`Expected second argument to be of type array or string, but found ${le(hi(p))} instead.`);if(this.fromIndex){const _=this.fromIndex.evaluate(o);return p.indexOf(h,_)}return p.indexOf(h)}eachChild(o){o(this.needle),o(this.haystack),this.fromIndex&&o(this.fromIndex)}outputDefined(){return!1}}class wp{constructor(o,h,p,_,x,w){this.inputType=o,this.type=h,this.input=p,this.cases=_,this.outputs=x,this.otherwise=w}static parse(o,h){if(o.length<5)return h.error(`Expected at least 4 arguments, but found only ${o.length-1}.`);if(o.length%2!=1)return h.error("Expected an even number of arguments.");let p,_;h.expectedType&&h.expectedType.kind!=="value"&&(_=h.expectedType);const x={},w=[];for(let D=2;DNumber.MAX_SAFE_INTEGER)return W.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof K=="number"&&Math.floor(K)!==K)return W.error("Numeric branch labels must be integer values.");if(p){if(W.checkSubtype(p,hi(K)))return null}else p=hi(K);if(x[String(K)]!==void 0)return W.error("Branch labels must be unique.");x[String(K)]=w.length}const X=h.parse(B,D,_);if(!X)return null;_=_||X.type,w.push(X)}const I=h.parse(o[1],1,on);if(!I)return null;const P=h.parse(o[o.length-1],o.length-1,_);return P?I.type.kind!=="value"&&h.concat(1).checkSubtype(p,I.type)?null:new wp(p,_,I,x,w,P):null}evaluate(o){const h=this.input.evaluate(o);return(hi(h)===this.inputType&&this.outputs[this.cases[h]]||this.otherwise).evaluate(o)}eachChild(o){o(this.input),this.outputs.forEach(o),o(this.otherwise)}outputDefined(){return this.outputs.every(o=>o.outputDefined())&&this.otherwise.outputDefined()}}class Sp{constructor(o,h,p){this.type=o,this.branches=h,this.otherwise=p}static parse(o,h){if(o.length<4)return h.error(`Expected at least 3 arguments, but found only ${o.length-1}.`);if(o.length%2!=0)return h.error("Expected an odd number of arguments.");let p;h.expectedType&&h.expectedType.kind!=="value"&&(p=h.expectedType);const _=[];for(let w=1;wh.outputDefined())&&this.otherwise.outputDefined()}}class Ph{constructor(o,h,p,_){this.type=o,this.input=h,this.beginIndex=p,this.endIndex=_}static parse(o,h){if(o.length<=2||o.length>=5)return h.error(`Expected 3 or 4 arguments, but found ${o.length-1} instead.`);const p=h.parse(o[1],1,on),_=h.parse(o[2],2,ft);if(!p||!_)return null;if(!Pe(p.type,[J(on),ln,on]))return h.error(`Expected first argument to be of type array or string, but found ${le(p.type)} instead`);if(o.length===4){const x=h.parse(o[3],3,ft);return x?new Ph(p.type,p,_,x):null}return new Ph(p.type,p,_)}evaluate(o){const h=this.input.evaluate(o),p=this.beginIndex.evaluate(o);if(!Se(h,["string","array"]))throw new Pr(`Expected first argument to be of type array or string, but found ${le(hi(h))} instead.`);if(this.endIndex){const _=this.endIndex.evaluate(o);return h.slice(p,_)}return h.slice(p)}eachChild(o){o(this.input),o(this.beginIndex),this.endIndex&&o(this.endIndex)}outputDefined(){return!1}}function Bm(u,o){return u==="=="||u==="!="?o.kind==="boolean"||o.kind==="string"||o.kind==="number"||o.kind==="null"||o.kind==="value":o.kind==="string"||o.kind==="number"||o.kind==="value"}function Vm(u,o,h,p){return p.compare(o,h)===0}function Su(u,o,h){const p=u!=="=="&&u!=="!=";return class XE{constructor(x,w,I){this.type=sn,this.lhs=x,this.rhs=w,this.collator=I,this.hasUntypedArgument=x.type.kind==="value"||w.type.kind==="value"}static parse(x,w){if(x.length!==3&&x.length!==4)return w.error("Expected two or three arguments.");const I=x[0];let P=w.parse(x[1],1,on);if(!P)return null;if(!Bm(I,P.type))return w.concat(1).error(`"${I}" comparisons are not supported for type '${le(P.type)}'.`);let D=w.parse(x[2],2,on);if(!D)return null;if(!Bm(I,D.type))return w.concat(2).error(`"${I}" comparisons are not supported for type '${le(D.type)}'.`);if(P.type.kind!==D.type.kind&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error(`Cannot compare types '${le(P.type)}' and '${le(D.type)}'.`);p&&(P.type.kind==="value"&&D.type.kind!=="value"?P=new Go(D.type,[P]):P.type.kind!=="value"&&D.type.kind==="value"&&(D=new Go(P.type,[D])));let O=null;if(x.length===4){if(P.type.kind!=="string"&&D.type.kind!=="string"&&P.type.kind!=="value"&&D.type.kind!=="value")return w.error("Cannot use collator to compare non-string types.");if(O=w.parse(x[3],3,Aa),!O)return null}return new XE(P,D,O)}evaluate(x){const w=this.lhs.evaluate(x),I=this.rhs.evaluate(x);if(p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!==D.kind||P.kind!=="string"&&P.kind!=="number")throw new Pr(`Expected arguments for "${u}" to be (string, string) or (number, number), but found (${P.kind}, ${D.kind}) instead.`)}if(this.collator&&!p&&this.hasUntypedArgument){const P=hi(w),D=hi(I);if(P.kind!=="string"||D.kind!=="string")return o(x,w,I)}return this.collator?h(x,w,I,this.collator.evaluate(x)):o(x,w,I)}eachChild(x){x(this.lhs),x(this.rhs),this.collator&&x(this.collator)}outputDefined(){return!0}}}const Oy=Su("==",function(u,o,h){return o===h},Vm),zy=Su("!=",function(u,o,h){return o!==h},function(u,o,h,p){return!Vm(0,o,h,p)}),Fy=Su("<",function(u,o,h){return o",function(u,o,h){return o>h},function(u,o,h,p){return p.compare(o,h)>0}),Vy=Su("<=",function(u,o,h){return o<=h},function(u,o,h,p){return p.compare(o,h)<=0}),Uy=Su(">=",function(u,o,h){return o>=h},function(u,o,h,p){return p.compare(o,h)>=0});class Ep{constructor(o,h,p,_,x){this.type=ln,this.number=o,this.locale=h,this.currency=p,this.minFractionDigits=_,this.maxFractionDigits=x}static parse(o,h){if(o.length!==3)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ft);if(!p)return null;const _=o[2];if(typeof _!="object"||Array.isArray(_))return h.error("NumberFormat options argument must be an object.");let x=null;if(_.locale&&(x=h.parse(_.locale,1,ln),!x))return null;let w=null;if(_.currency&&(w=h.parse(_.currency,1,ln),!w))return null;let I=null;if(_["min-fraction-digits"]&&(I=h.parse(_["min-fraction-digits"],1,ft),!I))return null;let P=null;return _["max-fraction-digits"]&&(P=h.parse(_["max-fraction-digits"],1,ft),!P)?null:new Ep(p,x,w,I,P)}evaluate(o){return new Intl.NumberFormat(this.locale?this.locale.evaluate(o):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(o):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(o):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(o):void 0}).format(this.number.evaluate(o))}eachChild(o){o(this.number),this.locale&&o(this.locale),this.currency&&o(this.currency),this.minFractionDigits&&o(this.minFractionDigits),this.maxFractionDigits&&o(this.maxFractionDigits)}outputDefined(){return!1}}class Mh{constructor(o){this.type=Jr,this.sections=o}static parse(o,h){if(o.length<2)return h.error("Expected at least one argument.");const p=o[1];if(!Array.isArray(p)&&typeof p=="object")return h.error("First argument must be an image or text section.");const _=[];let x=!1;for(let w=1;w<=o.length-1;++w){const I=o[w];if(x&&typeof I=="object"&&!Array.isArray(I)){x=!1;let P=null;if(I["font-scale"]&&(P=h.parse(I["font-scale"],1,ft),!P))return null;let D=null;if(I["text-font"]&&(D=h.parse(I["text-font"],1,J(ln)),!D))return null;let O=null;if(I["text-color"]&&(O=h.parse(I["text-color"],1,Hr),!O))return null;const B=_[_.length-1];B.scale=P,B.font=D,B.textColor=O}else{const P=h.parse(o[w],1,on);if(!P)return null;const D=P.type.kind;if(D!=="string"&&D!=="value"&&D!=="null"&&D!=="resolvedImage")return h.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");x=!0,_.push({content:P,scale:null,font:null,textColor:null})}}return new Mh(_)}evaluate(o){return new jo(this.sections.map(h=>{const p=h.content.evaluate(o);return hi(p)===q?new vp("",p,null,null,null):new vp(yc(p),null,h.scale?h.scale.evaluate(o):null,h.font?h.font.evaluate(o).join(","):null,h.textColor?h.textColor.evaluate(o):null)}))}eachChild(o){for(const h of this.sections)o(h.content),h.scale&&o(h.scale),h.font&&o(h.font),h.textColor&&o(h.textColor)}outputDefined(){return!1}}class Ip{constructor(o){this.type=q,this.input=o}static parse(o,h){if(o.length!==2)return h.error("Expected two arguments.");const p=h.parse(o[1],1,ln);return p?new Ip(p):h.error("No image name provided.")}evaluate(o){const h=this.input.evaluate(o),p=hs.fromString(h);return p&&o.availableImages&&(p.available=o.availableImages.indexOf(h)>-1),p}eachChild(o){o(this.input)}outputDefined(){return!1}}class Cp{constructor(o){this.type=ft,this.input=o}static parse(o,h){if(o.length!==2)return h.error(`Expected 1 argument, but found ${o.length-1} instead.`);const p=h.parse(o[1],1);return p?p.type.kind!=="array"&&p.type.kind!=="string"&&p.type.kind!=="value"?h.error(`Expected argument of type string or array, but found ${le(p.type)} instead.`):new Cp(p):null}evaluate(o){const h=this.input.evaluate(o);if(typeof h=="string"||Array.isArray(h))return h.length;throw new Pr(`Expected value to be of type string or array, but found ${le(hi(h))} instead.`)}eachChild(o){o(this.input)}outputDefined(){return!1}}const Eu={"==":Oy,"!=":zy,">":By,"<":Fy,">=":Uy,"<=":Vy,array:Go,at:bp,boolean:Go,case:Sp,coalesce:Ch,collator:wu,format:Mh,image:Ip,in:xp,"index-of":Lh,interpolate:Zi,"interpolate-hcl":Zi,"interpolate-lab":Zi,length:Cp,let:Th,literal:nl,match:wp,number:Go,"number-format":Ep,object:Go,slice:Ph,step:Ic,string:Go,"to-boolean":Js,"to-color":Js,"to-number":Js,"to-string":Js,var:Sh,within:Bl};function Um(u,[o,h,p,_]){o=o.evaluate(u),h=h.evaluate(u),p=p.evaluate(u);const x=_?_.evaluate(u):1,w=xu(o,h,p,x);if(w)throw new Pr(w);return new $n(o/255,h/255,p/255,x,!1)}function jm(u,o){return u in o}function Tp(u,o){const h=o[u];return h===void 0?null:h}function Ul(u){return{type:u}}function Gm(u){return{result:"success",value:u}}function Iu(u){return{result:"error",value:u}}function Cu(u){return u["property-type"]==="data-driven"||u["property-type"]==="cross-faded-data-driven"}function qm(u){return!!u.expression&&u.expression.parameters.indexOf("zoom")>-1}function Lp(u){return!!u.expression&&u.expression.interpolated}function On(u){return u instanceof Number?"number":u instanceof String?"string":u instanceof Boolean?"boolean":Array.isArray(u)?"array":u===null?"null":typeof u}function Ah(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)}function jy(u){return u}function Wm(u,o){const h=o.type==="color",p=u.stops&&typeof u.stops[0][0]=="object",_=p||!(p||u.property!==void 0),x=u.type||(Lp(o)?"exponential":"interval");if(h||o.type==="padding"){const O=h?$n.parse:Eo.parse;(u=ls({},u)).stops&&(u.stops=u.stops.map(B=>[B[0],O(B[1])])),u.default=O(u.default?u.default:o.default)}if(u.colorSpace&&(w=u.colorSpace)!=="rgb"&&w!=="hcl"&&w!=="lab")throw new Error(`Unknown color space: "${u.colorSpace}"`);var w;let I,P,D;if(x==="exponential")I=An;else if(x==="interval")I=Gy;else if(x==="categorical"){I=Qr,P=Object.create(null);for(const O of u.stops)P[O[0]]=O[1];D=typeof u.stops[0][0]}else{if(x!=="identity")throw new Error(`Unknown function type "${x}"`);I=Pp}if(p){const O={},B=[];for(let K=0;KK[0]),evaluate:({zoom:K},ie)=>An({stops:W,base:u.base},o,K).evaluate(K,ie)}}if(_){const O=x==="exponential"?{name:"exponential",base:u.base!==void 0?u.base:1}:null;return{kind:"camera",interpolationType:O,interpolationFactor:Zi.interpolationFactor.bind(void 0,O),zoomStops:u.stops.map(B=>B[0]),evaluate:({zoom:B})=>I(u,o,B,P,D)}}return{kind:"source",evaluate(O,B){const W=B&&B.properties?B.properties[u.property]:void 0;return W===void 0?Cc(u.default,o.default):I(u,o,W,P,D)}}}function Cc(u,o,h){return u!==void 0?u:o!==void 0?o:h!==void 0?h:void 0}function Qr(u,o,h,p,_){return Cc(typeof h===_?p[h]:void 0,u.default,o.default)}function Gy(u,o,h){if(On(h)!=="number")return Cc(u.default,o.default);const p=u.stops.length;if(p===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[p-1][0])return u.stops[p-1][1];const _=Ec(u.stops.map(x=>x[0]),h);return u.stops[_][1]}function An(u,o,h){const p=u.base!==void 0?u.base:1;if(On(h)!=="number")return Cc(u.default,o.default);const _=u.stops.length;if(_===1||h<=u.stops[0][0])return u.stops[0][1];if(h>=u.stops[_-1][0])return u.stops[_-1][1];const x=Ec(u.stops.map(O=>O[0]),h),w=function(O,B,W,X){const K=X-W,ie=O-W;return K===0?0:B===1?ie/K:(Math.pow(B,ie)-1)/(Math.pow(B,K)-1)}(h,p,u.stops[x][0],u.stops[x+1][0]),I=u.stops[x][1],P=u.stops[x+1][1],D=co[o.type]||jy;return typeof I.evaluate=="function"?{evaluate(...O){const B=I.evaluate.apply(void 0,O),W=P.evaluate.apply(void 0,O);if(B!==void 0&&W!==void 0)return D(B,W,w,u.colorSpace)}}:D(I,P,w,u.colorSpace)}function Pp(u,o,h){switch(o.type){case"color":h=$n.parse(h);break;case"formatted":h=jo.fromString(h.toString());break;case"resolvedImage":h=hs.fromString(h.toString());break;case"padding":h=Eo.parse(h);break;default:On(h)===o.type||o.type==="enum"&&o.values[h]||(h=void 0)}return Cc(h,u.default,o.default)}qo.register(Eu,{error:[{kind:"error"},[ln],(u,[o])=>{throw new Pr(o.evaluate(u))}],typeof:[ln,[on],(u,[o])=>le(hi(o.evaluate(u)))],"to-rgba":[J(ft,4),[Hr],(u,[o])=>{const[h,p,_,x]=o.evaluate(u).rgb;return[255*h,255*p,255*_,x]}],rgb:[Hr,[ft,ft,ft],Um],rgba:[Hr,[ft,ft,ft,ft],Um],has:{type:sn,overloads:[[[ln],(u,[o])=>jm(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>jm(o.evaluate(u),h.evaluate(u))]]},get:{type:on,overloads:[[[ln],(u,[o])=>Tp(o.evaluate(u),u.properties())],[[ln,us],(u,[o,h])=>Tp(o.evaluate(u),h.evaluate(u))]]},"feature-state":[on,[ln],(u,[o])=>Tp(o.evaluate(u),u.featureState||{})],properties:[us,[],u=>u.properties()],"geometry-type":[ln,[],u=>u.geometryType()],id:[on,[],u=>u.id()],zoom:[ft,[],u=>u.globals.zoom],"heatmap-density":[ft,[],u=>u.globals.heatmapDensity||0],"line-progress":[ft,[],u=>u.globals.lineProgress||0],accumulated:[on,[],u=>u.globals.accumulated===void 0?null:u.globals.accumulated],"+":[ft,Ul(ft),(u,o)=>{let h=0;for(const p of o)h+=p.evaluate(u);return h}],"*":[ft,Ul(ft),(u,o)=>{let h=1;for(const p of o)h*=p.evaluate(u);return h}],"-":{type:ft,overloads:[[[ft,ft],(u,[o,h])=>o.evaluate(u)-h.evaluate(u)],[[ft],(u,[o])=>-o.evaluate(u)]]},"/":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)/h.evaluate(u)],"%":[ft,[ft,ft],(u,[o,h])=>o.evaluate(u)%h.evaluate(u)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(u,[o,h])=>Math.pow(o.evaluate(u),h.evaluate(u))],sqrt:[ft,[ft],(u,[o])=>Math.sqrt(o.evaluate(u))],log10:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN10],ln:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))],log2:[ft,[ft],(u,[o])=>Math.log(o.evaluate(u))/Math.LN2],sin:[ft,[ft],(u,[o])=>Math.sin(o.evaluate(u))],cos:[ft,[ft],(u,[o])=>Math.cos(o.evaluate(u))],tan:[ft,[ft],(u,[o])=>Math.tan(o.evaluate(u))],asin:[ft,[ft],(u,[o])=>Math.asin(o.evaluate(u))],acos:[ft,[ft],(u,[o])=>Math.acos(o.evaluate(u))],atan:[ft,[ft],(u,[o])=>Math.atan(o.evaluate(u))],min:[ft,Ul(ft),(u,o)=>Math.min(...o.map(h=>h.evaluate(u)))],max:[ft,Ul(ft),(u,o)=>Math.max(...o.map(h=>h.evaluate(u)))],abs:[ft,[ft],(u,[o])=>Math.abs(o.evaluate(u))],round:[ft,[ft],(u,[o])=>{const h=o.evaluate(u);return h<0?-Math.round(-h):Math.round(h)}],floor:[ft,[ft],(u,[o])=>Math.floor(o.evaluate(u))],ceil:[ft,[ft],(u,[o])=>Math.ceil(o.evaluate(u))],"filter-==":[sn,[ln,on],(u,[o,h])=>u.properties()[o.value]===h.value],"filter-id-==":[sn,[on],(u,[o])=>u.id()===o.value],"filter-type-==":[sn,[ln],(u,[o])=>u.geometryType()===o.value],"filter-<":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<_}],"filter-id-<":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>_}],"filter-id->":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>p}],"filter-<=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p<=_}],"filter-id-<=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h<=p}],"filter->=":[sn,[ln,on],(u,[o,h])=>{const p=u.properties()[o.value],_=h.value;return typeof p==typeof _&&p>=_}],"filter-id->=":[sn,[on],(u,[o])=>{const h=u.id(),p=o.value;return typeof h==typeof p&&h>=p}],"filter-has":[sn,[on],(u,[o])=>o.value in u.properties()],"filter-has-id":[sn,[],u=>u.id()!==null&&u.id()!==void 0],"filter-type-in":[sn,[J(ln)],(u,[o])=>o.value.indexOf(u.geometryType())>=0],"filter-id-in":[sn,[J(on)],(u,[o])=>o.value.indexOf(u.id())>=0],"filter-in-small":[sn,[ln,J(on)],(u,[o,h])=>h.value.indexOf(u.properties()[o.value])>=0],"filter-in-large":[sn,[ln,J(on)],(u,[o,h])=>function(p,_,x,w){for(;x<=w;){const I=x+w>>1;if(_[I]===p)return!0;_[I]>p?w=I-1:x=I+1}return!1}(u.properties()[o.value],h.value,0,h.value.length-1)],all:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)&&h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(!h.evaluate(u))return!1;return!0}]]},any:{type:sn,overloads:[[[sn,sn],(u,[o,h])=>o.evaluate(u)||h.evaluate(u)],[Ul(sn),(u,o)=>{for(const h of o)if(h.evaluate(u))return!0;return!1}]]},"!":[sn,[sn],(u,[o])=>!o.evaluate(u)],"is-supported-script":[sn,[ln],(u,[o])=>{const h=u.globals&&u.globals.isSupportedScript;return!h||h(o.evaluate(u))}],upcase:[ln,[ln],(u,[o])=>o.evaluate(u).toUpperCase()],downcase:[ln,[ln],(u,[o])=>o.evaluate(u).toLowerCase()],concat:[ln,Ul(on),(u,o)=>o.map(h=>yc(h.evaluate(u))).join("")],"resolved-locale":[ln,[Aa],(u,[o])=>o.evaluate(u).resolvedLocale()]});class mr{constructor(o,h){var p;this.expression=o,this._warningHistory={},this._evaluator=new Kn,this._defaultValue=h?(p=h).type==="color"&&Ah(p.default)?new $n(0,0,0,0):p.type==="color"?$n.parse(p.default)||null:p.type==="padding"?Eo.parse(p.default)||null:p.type==="variableAnchorOffsetCollection"?cs.parse(p.default)||null:p.default===void 0?null:p.default:null,this._enumValues=h&&h.type==="enum"?h.values:null}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._evaluator.globals=o,this._evaluator.feature=h,this._evaluator.featureState=p,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w,this.expression.evaluate(this._evaluator)}evaluate(o,h,p,_,x,w){this._evaluator.globals=o,this._evaluator.feature=h||null,this._evaluator.featureState=p||null,this._evaluator.canonical=_,this._evaluator.availableImages=x||null,this._evaluator.formattedSection=w||null;try{const I=this.expression.evaluate(this._evaluator);if(I==null||typeof I=="number"&&I!=I)return this._defaultValue;if(this._enumValues&&!(I in this._enumValues))throw new Pr(`Expected value to be one of ${Object.keys(this._enumValues).map(P=>JSON.stringify(P)).join(", ")}, but found ${JSON.stringify(I)} instead.`);return I}catch(I){return this._warningHistory[I.message]||(this._warningHistory[I.message]=!0,typeof console<"u"&&console.warn(I.message)),this._defaultValue}}}function lr(u){return Array.isArray(u)&&u.length>0&&typeof u[0]=="string"&&u[0]in Eu}function jl(u,o){const h=new yh(Eu,xc,[],o?function(_){const x={color:Hr,string:ln,number:ft,enum:ln,boolean:sn,formatted:Jr,padding:me,resolvedImage:q,variableAnchorOffsetCollection:Z};return _.type==="array"?J(x[_.value]||on,_.length):x[_.type]}(o):void 0),p=h.parse(u,void 0,void 0,void 0,o&&o.type==="string"?{typeAnnotation:"coerce"}:void 0);return p?Gm(new mr(p,o)):Iu(h.errors)}class kh{constructor(o,h){this.kind=o,this._styleExpression=h,this.isStateDependent=o!=="constant"&&!wc(h.expression)}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}}class Mp{constructor(o,h,p,_){this.kind=o,this.zoomStops=p,this._styleExpression=h,this.isStateDependent=o!=="camera"&&!wc(h.expression),this.interpolationType=_}evaluateWithoutErrorHandling(o,h,p,_,x,w){return this._styleExpression.evaluateWithoutErrorHandling(o,h,p,_,x,w)}evaluate(o,h,p,_,x,w){return this._styleExpression.evaluate(o,h,p,_,x,w)}interpolationFactor(o,h,p){return this.interpolationType?Zi.interpolationFactor(this.interpolationType,o,h,p):0}}function Hm(u,o){const h=jl(u,o);if(h.result==="error")return h;const p=h.value.expression,_=Eh(p);if(!_&&!Cu(o))return Iu([new lo("","data expressions not supported")]);const x=Sc(p,["zoom"]);if(!x&&!qm(o))return Iu([new lo("","zoom expressions not supported")]);const w=Rh(p);return w||x?w instanceof lo?Iu([w]):w instanceof Zi&&!Lp(o)?Iu([new lo("",'"interpolate" expressions cannot be used with this property')]):Gm(w?new Mp(_?"camera":"composite",h.value,w.labels,w instanceof Zi?w.interpolation:void 0):new kh(_?"constant":"source",h.value)):Iu([new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Dh{constructor(o,h){this._parameters=o,this._specification=h,ls(this,Wm(this._parameters,this._specification))}static deserialize(o){return new Dh(o._parameters,o._specification)}static serialize(o){return{_parameters:o._parameters,_specification:o._specification}}}function Rh(u){let o=null;if(u instanceof Th)o=Rh(u.result);else if(u instanceof Ch){for(const h of u.args)if(o=Rh(h),o)break}else(u instanceof Ic||u instanceof Zi)&&u.input instanceof qo&&u.input.name==="zoom"&&(o=u);return o instanceof lo||u.eachChild(h=>{const p=Rh(h);p instanceof lo?o=p:!o&&p?o=new lo("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):o&&p&&o!==p&&(o=new lo("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),o}function Nh(u){if(u===!0||u===!1)return!0;if(!Array.isArray(u)||u.length===0)return!1;switch(u[0]){case"has":return u.length>=2&&u[1]!=="$id"&&u[1]!=="$type";case"in":return u.length>=3&&(typeof u[1]!="string"||Array.isArray(u[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return u.length!==3||Array.isArray(u[1])||Array.isArray(u[2]);case"any":case"all":for(const o of u.slice(1))if(!Nh(o)&&typeof o!="boolean")return!1;return!0;default:return!0}}const Zm={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Oh(u){if(u==null)return{filter:()=>!0,needGeometry:!1};Nh(u)||(u=Fh(u));const o=jl(u,Zm);if(o.result==="error")throw new Error(o.value.map(h=>`${h.key}: ${h.message}`).join(", "));return{filter:(h,p,_)=>o.value.evaluate(h,p,{},_),needGeometry:zh(u)}}function Xm(u,o){return uo?1:0}function zh(u){if(!Array.isArray(u))return!1;if(u[0]==="within")return!0;for(let o=1;o"||o==="<="||o===">="?Ap(u[1],u[2],o):o==="any"?(h=u.slice(1),["any"].concat(h.map(Fh))):o==="all"?["all"].concat(u.slice(1).map(Fh)):o==="none"?["all"].concat(u.slice(1).map(Fh).map(Bh)):o==="in"?Ym(u[1],u.slice(2)):o==="!in"?Bh(Ym(u[1],u.slice(2))):o==="has"?$m(u[1]):o==="!has"?Bh($m(u[1])):o!=="within"||u;var h}function Ap(u,o,h){switch(u){case"$type":return[`filter-type-${h}`,o];case"$id":return[`filter-id-${h}`,o];default:return[`filter-${h}`,u,o]}}function Ym(u,o){if(o.length===0)return!1;switch(u){case"$type":return["filter-type-in",["literal",o]];case"$id":return["filter-id-in",["literal",o]];default:return o.length>200&&!o.some(h=>typeof h!=typeof o[0])?["filter-in-large",u,["literal",o.sort(Xm)]]:["filter-in-small",u,["literal",o]]}}function $m(u){switch(u){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",u]}}function Bh(u){return["!",u]}function kp(u){const o=typeof u;if(o==="number"||o==="boolean"||o==="string"||u==null)return JSON.stringify(u);if(Array.isArray(u)){let _="[";for(const x of u)_+=`${kp(x)},`;return`${_}]`}const h=Object.keys(u).sort();let p="{";for(let _=0;_p.maximum?[new st(o,h,`${h} is greater than the maximum value ${p.maximum}`)]:[]}function Jm(u){const o=u.valueSpec,h=Br(u.value.type);let p,_,x,w={};const I=h!=="categorical"&&u.value.property===void 0,P=!I,D=On(u.value.stops)==="array"&&On(u.value.stops[0])==="array"&&On(u.value.stops[0][0])==="object",O=ho({key:u.key,value:u.value,valueSpec:u.styleSpec.function,validateSpec:u.validateSpec,style:u.style,styleSpec:u.styleSpec,objectElementValidators:{stops:function(X){if(h==="identity")return[new st(X.key,X.value,'identity function may not have a "stops" property')];let K=[];const ie=X.value;return K=K.concat(Dp({key:X.key,value:ie,valueSpec:X.valueSpec,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,arrayElementValidator:B})),On(ie)==="array"&&ie.length===0&&K.push(new st(X.key,ie,"array must have at least one stop")),K},default:function(X){return X.validateSpec({key:X.key,value:X.value,valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec})}}});return h==="identity"&&I&&O.push(new st(u.key,u.value,'missing required property "property"')),h==="identity"||u.value.stops||O.push(new st(u.key,u.value,'missing required property "stops"')),h==="exponential"&&u.valueSpec.expression&&!Lp(u.valueSpec)&&O.push(new st(u.key,u.value,"exponential functions not supported")),u.styleSpec.$version>=8&&(P&&!Cu(u.valueSpec)?O.push(new st(u.key,u.value,"property functions not supported")):I&&!qm(u.valueSpec)&&O.push(new st(u.key,u.value,"zoom functions not supported"))),h!=="categorical"&&!D||u.value.property!==void 0||O.push(new st(u.key,u.value,'"property" property is required')),O;function B(X){let K=[];const ie=X.value,de=X.key;if(On(ie)!=="array")return[new st(de,ie,`array expected, ${On(ie)} found`)];if(ie.length!==2)return[new st(de,ie,`array length 2 expected, length ${ie.length} found`)];if(D){if(On(ie[0])!=="object")return[new st(de,ie,`object expected, ${On(ie[0])} found`)];if(ie[0].zoom===void 0)return[new st(de,ie,"object stop key must have zoom")];if(ie[0].value===void 0)return[new st(de,ie,"object stop key must have value")];if(x&&x>Br(ie[0].zoom))return[new st(de,ie[0].zoom,"stop zoom values must appear in ascending order")];Br(ie[0].zoom)!==x&&(x=Br(ie[0].zoom),_=void 0,w={}),K=K.concat(ho({key:`${de}[0]`,value:ie[0],valueSpec:{zoom:{}},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec,objectElementValidators:{zoom:Vh,value:W}}))}else K=K.concat(W({key:`${de}[0]`,value:ie[0],valueSpec:{},validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec},ie));return lr(il(ie[1]))?K.concat([new st(`${de}[1]`,ie[1],"expressions are not allowed in function stops.")]):K.concat(X.validateSpec({key:`${de}[1]`,value:ie[1],valueSpec:o,validateSpec:X.validateSpec,style:X.style,styleSpec:X.styleSpec}))}function W(X,K){const ie=On(X.value),de=Br(X.value),we=X.value!==null?X.value:K;if(p){if(ie!==p)return[new st(X.key,we,`${ie} stop domain type must match previous stop domain type ${p}`)]}else p=ie;if(ie!=="number"&&ie!=="string"&&ie!=="boolean")return[new st(X.key,we,"stop domain value must be a number, string, or boolean")];if(ie!=="number"&&h!=="categorical"){let Oe=`number expected, ${ie} found`;return Cu(o)&&h===void 0&&(Oe+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new st(X.key,we,Oe)]}return h!=="categorical"||ie!=="number"||isFinite(de)&&Math.floor(de)===de?h!=="categorical"&&ie==="number"&&_!==void 0&&de<_?[new st(X.key,we,"stop domain values must appear in ascending order")]:(_=de,h==="categorical"&&de in w?[new st(X.key,we,"stop domain values must be unique")]:(w[de]=!0,[])):[new st(X.key,we,`integer expected, found ${de}`)]}}function ol(u){const o=(u.expressionContext==="property"?Hm:jl)(il(u.value),u.valueSpec);if(o.result==="error")return o.value.map(p=>new st(`${u.key}${p.key}`,u.value,p.message));const h=o.value.expression||o.value._styleExpression.expression;if(u.expressionContext==="property"&&u.propertyKey==="text-font"&&!h.outputDefined())return[new st(u.key,u.value,`Invalid data expression for "${u.propertyKey}". Output values must be contained as literals within the expression.`)];if(u.expressionContext==="property"&&u.propertyType==="layout"&&!wc(h))return[new st(u.key,u.value,'"feature-state" data expressions are not supported with layout properties.')];if(u.expressionContext==="filter"&&!wc(h))return[new st(u.key,u.value,'"feature-state" data expressions are not supported with filters.')];if(u.expressionContext&&u.expressionContext.indexOf("cluster")===0){if(!Sc(h,["zoom","feature-state"]))return[new st(u.key,u.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(u.expressionContext==="cluster-initial"&&!Eh(h))return[new st(u.key,u.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function sl(u){const o=u.key,h=u.value,p=u.valueSpec,_=[];return Array.isArray(p.values)?p.values.indexOf(Br(h))===-1&&_.push(new st(o,h,`expected one of [${p.values.join(", ")}], ${JSON.stringify(h)} found`)):Object.keys(p.values).indexOf(Br(h))===-1&&_.push(new st(o,h,`expected one of [${Object.keys(p.values).join(", ")}], ${JSON.stringify(h)} found`)),_}function Tu(u){return Nh(il(u.value))?ol(ls({},u,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Rp(u)}function Rp(u){const o=u.value,h=u.key;if(On(o)!=="array")return[new st(h,o,`array expected, ${On(o)} found`)];const p=u.styleSpec;let _,x=[];if(o.length<1)return[new st(h,o,"filter array must have at least 1 element")];switch(x=x.concat(sl({key:`${h}[0]`,value:o[0],valueSpec:p.filter_operator,style:u.style,styleSpec:u.styleSpec})),Br(o[0])){case"<":case"<=":case">":case">=":o.length>=2&&Br(o[1])==="$type"&&x.push(new st(h,o,`"$type" cannot be use with operator "${o[0]}"`));case"==":case"!=":o.length!==3&&x.push(new st(h,o,`filter array for operator "${o[0]}" must have 3 elements`));case"in":case"!in":o.length>=2&&(_=On(o[1]),_!=="string"&&x.push(new st(`${h}[1]`,o[1],`string expected, ${_} found`)));for(let w=2;w{D in h&&o.push(new st(p,h[D],`"${D}" is prohibited for ref layers`))}),_.layers.forEach(D=>{Br(D.id)===I&&(P=D)}),P?P.ref?o.push(new st(p,h.ref,"ref cannot reference another ref layer")):w=Br(P.type):o.push(new st(p,h.ref,`ref layer "${I}" not found`))}else if(w!=="background")if(h.source){const P=_.sources&&_.sources[h.source],D=P&&Br(P.type);P?D==="vector"&&w==="raster"?o.push(new st(p,h.source,`layer "${h.id}" requires a raster source`)):D!=="raster-dem"&&w==="hillshade"?o.push(new st(p,h.source,`layer "${h.id}" requires a raster-dem source`)):D==="raster"&&w!=="raster"?o.push(new st(p,h.source,`layer "${h.id}" requires a vector source`)):D!=="vector"||h["source-layer"]?D==="raster-dem"&&w!=="hillshade"?o.push(new st(p,h.source,"raster-dem source can only be used with layer type 'hillshade'.")):w!=="line"||!h.paint||!h.paint["line-gradient"]||D==="geojson"&&P.lineMetrics||o.push(new st(p,h,`layer "${h.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):o.push(new st(p,h,`layer "${h.id}" must specify a "source-layer"`)):o.push(new st(p,h.source,`source "${h.source}" not found`))}else o.push(new st(p,h,'missing required property "source"'));return o=o.concat(ho({key:p,value:h,valueSpec:x.layer,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,objectElementValidators:{"*":()=>[],type:()=>u.validateSpec({key:`${p}.type`,value:h.type,valueSpec:x.layer.type,style:u.style,styleSpec:u.styleSpec,validateSpec:u.validateSpec,object:h,objectKey:"type"}),filter:Tu,layout:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Op(ls({layerType:w},D))}}),paint:P=>ho({layer:h,key:P.key,value:P.value,style:P.style,styleSpec:P.styleSpec,validateSpec:P.validateSpec,objectElementValidators:{"*":D=>Np(ls({layerType:w},D))}})}})),o}function Gl(u){const o=u.value,h=u.key,p=On(o);return p!=="string"?[new st(h,o,`string expected, ${p} found`)]:[]}const Qm={promoteId:function({key:u,value:o}){if(On(o)==="string")return Gl({key:u,value:o});{const h=[];for(const p in o)h.push(...Gl({key:`${u}.${p}`,value:o[p]}));return h}}};function eg(u){const o=u.value,h=u.key,p=u.styleSpec,_=u.style,x=u.validateSpec;if(!o.type)return[new st(h,o,'"type" is required')];const w=Br(o.type);let I;switch(w){case"vector":case"raster":return I=ho({key:h,value:o,valueSpec:p[`source_${w.replace("-","_")}`],style:u.style,styleSpec:p,objectElementValidators:Qm,validateSpec:x}),I;case"raster-dem":return I=function(P){var D;const O=(D=P.sourceName)!==null&&D!==void 0?D:"",B=P.value,W=P.styleSpec,X=W.source_raster_dem,K=P.style;let ie=[];const de=On(B);if(B===void 0)return ie;if(de!=="object")return ie.push(new st("source_raster_dem",B,`object expected, ${de} found`)),ie;const we=Br(B.encoding)==="custom",Oe=["redFactor","greenFactor","blueFactor","baseShift"],Ee=P.value.encoding?`"${P.value.encoding}"`:"Default";for(const ke in B)!we&&Oe.includes(ke)?ie.push(new st(ke,B[ke],`In "${O}": "${ke}" is only valid when "encoding" is set to "custom". ${Ee} encoding found`)):X[ke]?ie=ie.concat(P.validateSpec({key:ke,value:B[ke],valueSpec:X[ke],validateSpec:P.validateSpec,style:K,styleSpec:W})):ie.push(new st(ke,B[ke],`unknown property "${ke}"`));return ie}({sourceName:h,value:o,style:u.style,styleSpec:p,validateSpec:x}),I;case"geojson":if(I=ho({key:h,value:o,valueSpec:p.source_geojson,style:_,styleSpec:p,validateSpec:x,objectElementValidators:Qm}),o.cluster)for(const P in o.clusterProperties){const[D,O]=o.clusterProperties[P],B=typeof D=="string"?[D,["accumulated"],["get",P]]:D;I.push(...ol({key:`${h}.${P}.map`,value:O,validateSpec:x,expressionContext:"cluster-map"})),I.push(...ol({key:`${h}.${P}.reduce`,value:B,validateSpec:x,expressionContext:"cluster-reduce"}))}return I;case"video":return ho({key:h,value:o,valueSpec:p.source_video,style:_,validateSpec:x,styleSpec:p});case"image":return ho({key:h,value:o,valueSpec:p.source_image,style:_,validateSpec:x,styleSpec:p});case"canvas":return[new st(h,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return sl({key:`${h}.type`,value:o.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:_,validateSpec:x,styleSpec:p})}}function tg(u){const o=u.value,h=u.styleSpec,p=h.light,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new st("light",o,`object expected, ${w} found`)]),x;for(const I in o){const P=I.match(/^(.*)-transition$/);x=x.concat(P&&p[P[1]]&&p[P[1]].transition?u.validateSpec({key:I,value:o[I],valueSpec:h.transition,validateSpec:u.validateSpec,style:_,styleSpec:h}):p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new st(I,o[I],`unknown property "${I}"`)])}return x}function ng(u){const o=u.value,h=u.styleSpec,p=h.sky,_=u.style,x=On(o);if(o===void 0)return[];if(x!=="object")return[new st("sky",o,`object expected, ${x} found`)];let w=[];for(const I in o)w=w.concat(p[I]?Qs({key:I,value:o[I],valueSpec:p[I],style:_,styleSpec:h}):[new st(I,o[I],`unknown property "${I}"`)]);return w}function Lc(u){const o=u.value,h=u.styleSpec,p=h.terrain,_=u.style;let x=[];const w=On(o);if(o===void 0)return x;if(w!=="object")return x=x.concat([new st("terrain",o,`object expected, ${w} found`)]),x;for(const I in o)x=x.concat(p[I]?u.validateSpec({key:I,value:o[I],valueSpec:p[I],validateSpec:u.validateSpec,style:_,styleSpec:h}):[new st(I,o[I],`unknown property "${I}"`)]);return x}function Pc(u){let o=[];const h=u.value,p=u.key;if(Array.isArray(h)){const _=[],x=[];for(const w in h)h[w].id&&_.includes(h[w].id)&&o.push(new st(p,h,`all the sprites' ids must be unique, but ${h[w].id} is duplicated`)),_.push(h[w].id),h[w].url&&x.includes(h[w].url)&&o.push(new st(p,h,`all the sprites' URLs must be unique, but ${h[w].url} is duplicated`)),x.push(h[w].url),o=o.concat(ho({key:`${p}[${w}]`,value:h[w],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:u.validateSpec}));return o}return Gl({key:p,value:h})}const Io={"*":()=>[],array:Dp,boolean:function(u){const o=u.value,h=u.key,p=On(o);return p!=="boolean"?[new st(h,o,`boolean expected, ${p} found`)]:[]},number:Vh,color:function(u){const o=u.key,h=u.value,p=On(h);return p!=="string"?[new st(o,h,`color expected, ${p} found`)]:$n.parse(String(h))?[]:[new st(o,h,`color expected, "${h}" found`)]},constants:Km,enum:sl,filter:Tu,function:Jm,layer:Tc,object:ho,source:eg,light:tg,sky:ng,terrain:Lc,string:Gl,formatted:function(u){return Gl(u).length===0?[]:ol(u)},resolvedImage:function(u){return Gl(u).length===0?[]:ol(u)},padding:function(u){const o=u.key,h=u.value;if(On(h)==="array"){if(h.length<1||h.length>4)return[new st(o,h,`padding requires 1 to 4 values; ${h.length} values found`)];const p={type:"number"};let _=[];for(let x=0;x[]}})),u.constants&&(h=h.concat(Km({key:"constants",value:u.constants,style:u,styleSpec:o,validateSpec:Qs}))),Lu(h)}function ea(u){return function(o){return u({...o,validateSpec:Qs})}}function Lu(u){return[].concat(u).sort((o,h)=>o.line-h.line)}function Ps(u){return function(...o){return Lu(u.apply(this,o))}}Ls.source=Ps(ea(eg)),Ls.sprite=Ps(ea(Pc)),Ls.glyphs=Ps(ea(zp)),Ls.light=Ps(ea(tg)),Ls.sky=Ps(ea(ng)),Ls.terrain=Ps(ea(Lc)),Ls.layer=Ps(ea(Tc)),Ls.filter=Ps(ea(Tu)),Ls.paintProperty=Ps(ea(Np)),Ls.layoutProperty=Ps(ea(Op));const ql=Ls,Wy=ql.light,Fp=ql.paintProperty,Hy=ql.layoutProperty;function Pu(u,o){let h=!1;if(o&&o.length)for(const p of o)u.fire(new dt(new Error(p.message))),h=!0;return h}class Mc{constructor(o,h,p){const _=this.cells=[];if(o instanceof ArrayBuffer){this.arrayBuffer=o;const w=new Int32Array(this.arrayBuffer);o=w[0],this.d=(h=w[1])+2*(p=w[2]);for(let P=0;P=B[K+0]&&_>=B[K+1])?(I[X]=!0,w.push(O[X])):I[X]=!1}}}}_forEachCell(o,h,p,_,x,w,I,P){const D=this._convertToCellCoord(o),O=this._convertToCellCoord(h),B=this._convertToCellCoord(p),W=this._convertToCellCoord(_);for(let X=D;X<=B;X++)for(let K=O;K<=W;K++){const ie=this.d*K+X;if((!P||P(this._convertFromCellCoord(X),this._convertFromCellCoord(K),this._convertFromCellCoord(X+1),this._convertFromCellCoord(K+1)))&&x.call(this,o,h,p,_,ie,w,I,P))return}}_convertFromCellCoord(o){return(o-this.padding)/this.scale}_convertToCellCoord(o){return Math.max(0,Math.min(this.d-1,Math.floor(o*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const o=this.cells,h=3+this.cells.length+1+1;let p=0;for(let w=0;w=0)continue;const w=u[x];_[x]=ta[p].shallow.indexOf(x)>=0?w:Mu(w,o)}u instanceof Error&&(_.message=u.message)}if(_.$name)throw new Error("$name property is reserved for worker serialization logic.");return p!=="Object"&&(_.$name=p),_}throw new Error("can't serialize object of type "+typeof u)}function Au(u){if(u==null||typeof u=="boolean"||typeof u=="number"||typeof u=="string"||u instanceof Boolean||u instanceof Number||u instanceof String||u instanceof Date||u instanceof RegExp||u instanceof Blob||u instanceof Error||jh(u)||Ot(u)||ArrayBuffer.isView(u)||u instanceof ImageData)return u;if(Array.isArray(u))return u.map(Au);if(typeof u=="object"){const o=u.$name||"Object";if(!ta[o])throw new Error(`can't deserialize unregistered class ${o}`);const{klass:h}=ta[o];if(!h)throw new Error(`can't deserialize unregistered class ${o}`);if(h.deserialize)return h.deserialize(u);const p=Object.create(h.prototype);for(const _ of Object.keys(u)){if(_==="$name")continue;const x=u[_];p[_]=ta[o].shallow.indexOf(_)>=0?x:Au(x)}return p}throw new Error("can't deserialize object of type "+typeof u)}class rg{constructor(){this.first=!0}update(o,h){const p=Math.floor(o);return this.first?(this.first=!1,this.lastIntegerZoom=p,this.lastIntegerZoomTime=0,this.lastZoom=o,this.lastFloorZoom=p,!0):(this.lastFloorZoom>p?(this.lastIntegerZoom=p+1,this.lastIntegerZoomTime=h):this.lastFloorZoomu>=128&&u<=255,Arabic:u=>u>=1536&&u<=1791,"Arabic Supplement":u=>u>=1872&&u<=1919,"Arabic Extended-A":u=>u>=2208&&u<=2303,"Hangul Jamo":u=>u>=4352&&u<=4607,"Unified Canadian Aboriginal Syllabics":u=>u>=5120&&u<=5759,Khmer:u=>u>=6016&&u<=6143,"Unified Canadian Aboriginal Syllabics Extended":u=>u>=6320&&u<=6399,"General Punctuation":u=>u>=8192&&u<=8303,"Letterlike Symbols":u=>u>=8448&&u<=8527,"Number Forms":u=>u>=8528&&u<=8591,"Miscellaneous Technical":u=>u>=8960&&u<=9215,"Control Pictures":u=>u>=9216&&u<=9279,"Optical Character Recognition":u=>u>=9280&&u<=9311,"Enclosed Alphanumerics":u=>u>=9312&&u<=9471,"Geometric Shapes":u=>u>=9632&&u<=9727,"Miscellaneous Symbols":u=>u>=9728&&u<=9983,"Miscellaneous Symbols and Arrows":u=>u>=11008&&u<=11263,"CJK Radicals Supplement":u=>u>=11904&&u<=12031,"Kangxi Radicals":u=>u>=12032&&u<=12255,"Ideographic Description Characters":u=>u>=12272&&u<=12287,"CJK Symbols and Punctuation":u=>u>=12288&&u<=12351,Hiragana:u=>u>=12352&&u<=12447,Katakana:u=>u>=12448&&u<=12543,Bopomofo:u=>u>=12544&&u<=12591,"Hangul Compatibility Jamo":u=>u>=12592&&u<=12687,Kanbun:u=>u>=12688&&u<=12703,"Bopomofo Extended":u=>u>=12704&&u<=12735,"CJK Strokes":u=>u>=12736&&u<=12783,"Katakana Phonetic Extensions":u=>u>=12784&&u<=12799,"Enclosed CJK Letters and Months":u=>u>=12800&&u<=13055,"CJK Compatibility":u=>u>=13056&&u<=13311,"CJK Unified Ideographs Extension A":u=>u>=13312&&u<=19903,"Yijing Hexagram Symbols":u=>u>=19904&&u<=19967,"CJK Unified Ideographs":u=>u>=19968&&u<=40959,"Yi Syllables":u=>u>=40960&&u<=42127,"Yi Radicals":u=>u>=42128&&u<=42191,"Hangul Jamo Extended-A":u=>u>=43360&&u<=43391,"Hangul Syllables":u=>u>=44032&&u<=55215,"Hangul Jamo Extended-B":u=>u>=55216&&u<=55295,"Private Use Area":u=>u>=57344&&u<=63743,"CJK Compatibility Ideographs":u=>u>=63744&&u<=64255,"Arabic Presentation Forms-A":u=>u>=64336&&u<=65023,"Vertical Forms":u=>u>=65040&&u<=65055,"CJK Compatibility Forms":u=>u>=65072&&u<=65103,"Small Form Variants":u=>u>=65104&&u<=65135,"Arabic Presentation Forms-B":u=>u>=65136&&u<=65279,"Halfwidth and Fullwidth Forms":u=>u>=65280&&u<=65519};function ku(u){for(const o of u)if(Gh(o.charCodeAt(0)))return!0;return!1}function ig(u){for(const o of u)if(!og(o.charCodeAt(0)))return!1;return!0}function og(u){return!(xt.Arabic(u)||xt["Arabic Supplement"](u)||xt["Arabic Extended-A"](u)||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u))}function Gh(u){return!(u!==746&&u!==747&&(u<4352||!(xt["Bopomofo Extended"](u)||xt.Bopomofo(u)||xt["CJK Compatibility Forms"](u)&&!(u>=65097&&u<=65103)||xt["CJK Compatibility Ideographs"](u)||xt["CJK Compatibility"](u)||xt["CJK Radicals Supplement"](u)||xt["CJK Strokes"](u)||!(!xt["CJK Symbols and Punctuation"](u)||u>=12296&&u<=12305||u>=12308&&u<=12319||u===12336)||xt["CJK Unified Ideographs Extension A"](u)||xt["CJK Unified Ideographs"](u)||xt["Enclosed CJK Letters and Months"](u)||xt["Hangul Compatibility Jamo"](u)||xt["Hangul Jamo Extended-A"](u)||xt["Hangul Jamo Extended-B"](u)||xt["Hangul Jamo"](u)||xt["Hangul Syllables"](u)||xt.Hiragana(u)||xt["Ideographic Description Characters"](u)||xt.Kanbun(u)||xt["Kangxi Radicals"](u)||xt["Katakana Phonetic Extensions"](u)||xt.Katakana(u)&&u!==12540||!(!xt["Halfwidth and Fullwidth Forms"](u)||u===65288||u===65289||u===65293||u>=65306&&u<=65310||u===65339||u===65341||u===65343||u>=65371&&u<=65503||u===65507||u>=65512&&u<=65519)||!(!xt["Small Form Variants"](u)||u>=65112&&u<=65118||u>=65123&&u<=65126)||xt["Unified Canadian Aboriginal Syllabics"](u)||xt["Unified Canadian Aboriginal Syllabics Extended"](u)||xt["Vertical Forms"](u)||xt["Yijing Hexagram Symbols"](u)||xt["Yi Syllables"](u)||xt["Yi Radicals"](u))))}function Bp(u){return!(Gh(u)||function(o){return!!(xt["Latin-1 Supplement"](o)&&(o===167||o===169||o===174||o===177||o===188||o===189||o===190||o===215||o===247)||xt["General Punctuation"](o)&&(o===8214||o===8224||o===8225||o===8240||o===8241||o===8251||o===8252||o===8258||o===8263||o===8264||o===8265||o===8273)||xt["Letterlike Symbols"](o)||xt["Number Forms"](o)||xt["Miscellaneous Technical"](o)&&(o>=8960&&o<=8967||o>=8972&&o<=8991||o>=8996&&o<=9e3||o===9003||o>=9085&&o<=9114||o>=9150&&o<=9165||o===9167||o>=9169&&o<=9179||o>=9186&&o<=9215)||xt["Control Pictures"](o)&&o!==9251||xt["Optical Character Recognition"](o)||xt["Enclosed Alphanumerics"](o)||xt["Geometric Shapes"](o)||xt["Miscellaneous Symbols"](o)&&!(o>=9754&&o<=9759)||xt["Miscellaneous Symbols and Arrows"](o)&&(o>=11026&&o<=11055||o>=11088&&o<=11097||o>=11192&&o<=11243)||xt["CJK Symbols and Punctuation"](o)||xt.Katakana(o)||xt["Private Use Area"](o)||xt["CJK Compatibility Forms"](o)||xt["Small Form Variants"](o)||xt["Halfwidth and Fullwidth Forms"](o)||o===8734||o===8756||o===8757||o>=9984&&o<=10087||o>=10102&&o<=10131||o===65532||o===65533)}(u))}function qh(u){return u>=1424&&u<=2303||xt["Arabic Presentation Forms-A"](u)||xt["Arabic Presentation Forms-B"](u)}function sg(u,o){return!(!o&&qh(u)||u>=2304&&u<=3583||u>=3840&&u<=4255||xt.Khmer(u))}function Zy(u){for(const o of u)if(qh(o.charCodeAt(0)))return!0;return!1}const al=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(u){this.pluginStatus=u.pluginStatus,this.pluginURL=u.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(u){this.applyArabicShaping=u.applyArabicShaping,this.processBidirectionalText=u.processBidirectionalText,this.processStyledBidirectionalText=u.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class br{constructor(o,h){this.zoom=o,h?(this.now=h.now,this.fadeDuration=h.fadeDuration,this.zoomHistory=h.zoomHistory,this.transition=h.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new rg,this.transition={})}isSupportedScript(o){return function(h,p){for(const _ of h)if(!sg(_.charCodeAt(0),p))return!1;return!0}(o,al.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const o=this.zoom,h=o-Math.floor(o),p=this.crossFadingFactor();return o>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:h+(1-h)*p}:{fromScale:.5,toScale:1,t:1-(1-p)*h}}}class Ac{constructor(o,h){this.property=o,this.value=h,this.expression=function(p,_){if(Ah(p))return new Dh(p,_);if(lr(p)){const x=Hm(p,_);if(x.result==="error")throw new Error(x.value.map(w=>`${w.key}: ${w.message}`).join(", "));return x.value}{let x=p;return _.type==="color"&&typeof p=="string"?x=$n.parse(p):_.type!=="padding"||typeof p!="number"&&!Array.isArray(p)?_.type==="variableAnchorOffsetCollection"&&Array.isArray(p)&&(x=cs.parse(p)):x=Eo.parse(p),{kind:"constant",evaluate:()=>x}}}(h===void 0?o.specification.default:h,o.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(o,h,p){return this.property.possiblyEvaluate(this,o,h,p)}}class Wh{constructor(o){this.property=o,this.value=new Ac(o,void 0)}transitioned(o,h){return new ag(this.property,this.value,h,fe({},o.transition,this.transition),o.now)}untransitioned(){return new ag(this.property,this.value,null,{},0)}}class Vp{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitionablePropertyValues)}getValue(o){return Y(this._values[o].value.value)}setValue(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].value=new Ac(this._values[o].property,h===null?void 0:Y(h))}getTransition(o){return Y(this._values[o].transition)}setTransition(o,h){Object.prototype.hasOwnProperty.call(this._values,o)||(this._values[o]=new Wh(this._values[o].property)),this._values[o].transition=Y(h)||void 0}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p);const _=this.getTransition(h);_!==void 0&&(o[`${h}-transition`]=_)}return o}transitioned(o,h){const p=new lg(this._properties);for(const _ of Object.keys(this._values))p._values[_]=this._values[_].transitioned(o,h._values[_]);return p}untransitioned(){const o=new lg(this._properties);for(const h of Object.keys(this._values))o._values[h]=this._values[h].untransitioned();return o}}class ag{constructor(o,h,p,_,x){this.property=o,this.value=h,this.begin=x+_.delay||0,this.end=this.begin+_.duration||0,o.specification.transition&&(_.delay||_.duration)&&(this.prior=p)}possiblyEvaluate(o,h,p){const _=o.now||0,x=this.value.possiblyEvaluate(o,h,p),w=this.prior;if(w){if(_>this.end)return this.prior=null,x;if(this.value.isDataDriven())return this.prior=null,x;if(_=1)return 1;const D=P*P,O=D*P;return 4*(P<.5?O:3*(P-D)+O-.75)}(I))}}return x}}class lg{constructor(o){this._properties=o,this._values=Object.create(o.defaultTransitioningPropertyValues)}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}hasTransition(){for(const o of Object.keys(this._values))if(this._values[o].prior)return!0;return!1}}class ug{constructor(o){this._properties=o,this._values=Object.create(o.defaultPropertyValues)}hasValue(o){return this._values[o].value!==void 0}getValue(o){return Y(this._values[o].value)}setValue(o,h){this._values[o]=new Ac(this._values[o].property,h===null?void 0:Y(h))}serialize(){const o={};for(const h of Object.keys(this._values)){const p=this.getValue(h);p!==void 0&&(o[h]=p)}return o}possiblyEvaluate(o,h,p){const _=new kc(this._properties);for(const x of Object.keys(this._values))_._values[x]=this._values[x].possiblyEvaluate(o,h,p);return _}}class Ms{constructor(o,h,p){this.property=o,this.value=h,this.parameters=p}isConstant(){return this.value.kind==="constant"}constantOr(o){return this.value.kind==="constant"?this.value.value:o}evaluate(o,h,p,_){return this.property.evaluate(this.value,this.parameters,o,h,p,_)}}class kc{constructor(o){this._properties=o,this._values=Object.create(o.defaultPossiblyEvaluatedValues)}get(o){return this._values[o]}}class Nt{constructor(o){this.specification=o}possiblyEvaluate(o,h){if(o.isDataDriven())throw new Error("Value should not be data driven");return o.expression.evaluate(h)}interpolate(o,h,p){const _=co[this.specification.type];return _?_(o,h,p):o}}class qt{constructor(o,h){this.specification=o,this.overrides=h}possiblyEvaluate(o,h,p,_){return new Ms(this,o.expression.kind==="constant"||o.expression.kind==="camera"?{kind:"constant",value:o.expression.evaluate(h,null,{},p,_)}:o.expression,h)}interpolate(o,h,p){if(o.value.kind!=="constant"||h.value.kind!=="constant")return o;if(o.value.value===void 0||h.value.value===void 0)return new Ms(this,{kind:"constant",value:void 0},o.parameters);const _=co[this.specification.type];if(_){const x=_(o.value.value,h.value.value,p);return new Ms(this,{kind:"constant",value:x},o.parameters)}return o}evaluate(o,h,p,_,x,w){return o.kind==="constant"?o.value:o.evaluate(h,p,_,x,w)}}class Hh extends qt{possiblyEvaluate(o,h,p,_){if(o.value===void 0)return new Ms(this,{kind:"constant",value:void 0},h);if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_),w=o.property.specification.type==="resolvedImage"&&typeof x!="string"?x.name:x,I=this._calculate(w,w,w,h);return new Ms(this,{kind:"constant",value:I},h)}if(o.expression.kind==="camera"){const x=this._calculate(o.expression.evaluate({zoom:h.zoom-1}),o.expression.evaluate({zoom:h.zoom}),o.expression.evaluate({zoom:h.zoom+1}),h);return new Ms(this,{kind:"constant",value:x},h)}return new Ms(this,o.expression,h)}evaluate(o,h,p,_,x,w){if(o.kind==="source"){const I=o.evaluate(h,p,_,x,w);return this._calculate(I,I,I,h)}return o.kind==="composite"?this._calculate(o.evaluate({zoom:Math.floor(h.zoom)-1},p,_),o.evaluate({zoom:Math.floor(h.zoom)},p,_),o.evaluate({zoom:Math.floor(h.zoom)+1},p,_),h):o.value}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Dc{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){if(o.value!==void 0){if(o.expression.kind==="constant"){const x=o.expression.evaluate(h,null,{},p,_);return this._calculate(x,x,x,h)}return this._calculate(o.expression.evaluate(new br(Math.floor(h.zoom-1),h)),o.expression.evaluate(new br(Math.floor(h.zoom),h)),o.expression.evaluate(new br(Math.floor(h.zoom+1),h)),h)}}_calculate(o,h,p,_){return _.zoom>_.zoomHistory.lastIntegerZoom?{from:o,to:h}:{from:p,to:h}}interpolate(o){return o}}class Up{constructor(o){this.specification=o}possiblyEvaluate(o,h,p,_){return!!o.expression.evaluate(h,null,{},p,_)}interpolate(){return!1}}class Co{constructor(o){this.properties=o,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const h in o){const p=o[h];p.specification.overridable&&this.overridableProperties.push(h);const _=this.defaultPropertyValues[h]=new Ac(p,void 0),x=this.defaultTransitionablePropertyValues[h]=new Wh(p);this.defaultTransitioningPropertyValues[h]=x.untransitioned(),this.defaultPossiblyEvaluatedValues[h]=_.possiblyEvaluate({})}}}Ct("DataDrivenProperty",qt),Ct("DataConstantProperty",Nt),Ct("CrossFadedDataDrivenProperty",Hh),Ct("CrossFadedProperty",Dc),Ct("ColorRampProperty",Up);const jp="-transition";class As extends en{constructor(o,h){if(super(),this.id=o.id,this.type=o.type,this._featureFilter={filter:()=>!0,needGeometry:!1},o.type!=="custom"&&(this.metadata=o.metadata,this.minzoom=o.minzoom,this.maxzoom=o.maxzoom,o.type!=="background"&&(this.source=o.source,this.sourceLayer=o["source-layer"],this.filter=o.filter),h.layout&&(this._unevaluatedLayout=new ug(h.layout)),h.paint)){this._transitionablePaint=new Vp(h.paint);for(const p in o.paint)this.setPaintProperty(p,o.paint[p],{validate:!1});for(const p in o.layout)this.setLayoutProperty(p,o.layout[p],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new kc(h.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(o){return o==="visibility"?this.visibility:this._unevaluatedLayout.getValue(o)}setLayoutProperty(o,h,p={}){h!=null&&this._validate(Hy,`layers.${this.id}.layout.${o}`,o,h,p)||(o!=="visibility"?this._unevaluatedLayout.setValue(o,h):this.visibility=h)}getPaintProperty(o){return o.endsWith(jp)?this._transitionablePaint.getTransition(o.slice(0,-11)):this._transitionablePaint.getValue(o)}setPaintProperty(o,h,p={}){if(h!=null&&this._validate(Fp,`layers.${this.id}.paint.${o}`,o,h,p))return!1;if(o.endsWith(jp))return this._transitionablePaint.setTransition(o.slice(0,-11),h||void 0),!1;{const _=this._transitionablePaint._values[o],x=_.property.specification["property-type"]==="cross-faded-data-driven",w=_.value.isDataDriven(),I=_.value;this._transitionablePaint.setValue(o,h),this._handleSpecialPaintPropertyUpdate(o);const P=this._transitionablePaint._values[o].value;return P.isDataDriven()||w||x||this._handleOverridablePaintPropertyUpdate(o,I,P)}}_handleSpecialPaintPropertyUpdate(o){}_handleOverridablePaintPropertyUpdate(o,h,p){return!1}isHidden(o){return!!(this.minzoom&&o=this.maxzoom)||this.visibility==="none"}updateTransitions(o){this._transitioningPaint=this._transitionablePaint.transitioned(o,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(o,h){o.getCrossfadeParameters&&(this._crossfadeParameters=o.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(o,void 0,h)),this.paint=this._transitioningPaint.possiblyEvaluate(o,void 0,h)}serialize(){const o={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(o.layout=o.layout||{},o.layout.visibility=this.visibility),Ae(o,(h,p)=>!(h===void 0||p==="layout"&&!Object.keys(h).length||p==="paint"&&!Object.keys(h).length))}_validate(o,h,p,_,x={}){return(!x||x.validate!==!1)&&Pu(this,o.call(ql,{key:h,layerType:this.type,objectKey:p,value:_,styleSpec:Re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const o in this.paint._values){const h=this.paint.get(o);if(h instanceof Ms&&Cu(h.property.specification)&&(h.value.kind==="source"||h.value.kind==="composite")&&h.value.isStateDependent)return!0}return!1}}const cg={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Rc{constructor(o,h){this._structArray=o,this._pos1=h*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Vr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(o,h){return o._trim(),h&&(o.isTransferred=!0,h.push(o.arrayBuffer)),{length:o.length,arrayBuffer:o.arrayBuffer}}static deserialize(o){const h=Object.create(this.prototype);return h.arrayBuffer=o.arrayBuffer,h.length=o.length,h.capacity=o.arrayBuffer.byteLength/h.bytesPerElement,h._refreshViews(),h}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(o){this.reserve(o),this.length=o}reserve(o){if(o>this.capacity){this.capacity=Math.max(o,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const h=this.uint8;this._refreshViews(),h&&this.uint8.set(h)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function ei(u,o=1){let h=0,p=0;return{members:u.map(_=>{const x=cg[_.type].BYTES_PER_ELEMENT,w=h=hg(h,Math.max(o,x)),I=_.components||1;return p=Math.max(p,x),h+=x*I,{name:_.name,type:_.type,components:I,offset:w}}),size:hg(h,Math.max(p,o)),alignment:o}}function hg(u,o){return Math.ceil(u/o)*o}class Nc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.int16[_+0]=h,this.int16[_+1]=p,o}}Nc.prototype.bytesPerElement=4,Ct("StructArrayLayout2i4",Nc);class ka extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.int16[x+0]=h,this.int16[x+1]=p,this.int16[x+2]=_,o}}ka.prototype.bytesPerElement=6,Ct("StructArrayLayout3i6",ka);class Gp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.int16[w+0]=h,this.int16[w+1]=p,this.int16[w+2]=_,this.int16[w+3]=x,o}}Gp.prototype.bytesPerElement=8,Ct("StructArrayLayout4i8",Gp);class qp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}qp.prototype.bytesPerElement=12,Ct("StructArrayLayout2i4i12",qp);class Wp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=4*o,D=8*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.uint8[D+4]=_,this.uint8[D+5]=x,this.uint8[D+6]=w,this.uint8[D+7]=I,o}}Wp.prototype.bytesPerElement=8,Ct("StructArrayLayout2i4ub8",Wp);class Oc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.float32[_+0]=h,this.float32[_+1]=p,o}}Oc.prototype.bytesPerElement=8,Ct("StructArrayLayout2f8",Oc);class Zh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O){const B=this.length;return this.resize(B+1),this.emplace(B,o,h,p,_,x,w,I,P,D,O)}emplace(o,h,p,_,x,w,I,P,D,O,B){const W=10*o;return this.uint16[W+0]=h,this.uint16[W+1]=p,this.uint16[W+2]=_,this.uint16[W+3]=x,this.uint16[W+4]=w,this.uint16[W+5]=I,this.uint16[W+6]=P,this.uint16[W+7]=D,this.uint16[W+8]=O,this.uint16[W+9]=B,o}}Zh.prototype.bytesPerElement=20,Ct("StructArrayLayout10ui20",Zh);class Hp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W){const X=this.length;return this.resize(X+1),this.emplace(X,o,h,p,_,x,w,I,P,D,O,B,W)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X){const K=12*o;return this.int16[K+0]=h,this.int16[K+1]=p,this.int16[K+2]=_,this.int16[K+3]=x,this.uint16[K+4]=w,this.uint16[K+5]=I,this.uint16[K+6]=P,this.uint16[K+7]=D,this.int16[K+8]=O,this.int16[K+9]=B,this.int16[K+10]=W,this.int16[K+11]=X,o}}Hp.prototype.bytesPerElement=24,Ct("StructArrayLayout4i4ui4i24",Hp);class Zp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.float32[x+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Zp.prototype.bytesPerElement=12,Ct("StructArrayLayout3f12",Zp);class Da extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint32[1*o+0]=h,o}}Da.prototype.bytesPerElement=4,Ct("StructArrayLayout1ul4",Da);class Xh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D){const O=this.length;return this.resize(O+1),this.emplace(O,o,h,p,_,x,w,I,P,D)}emplace(o,h,p,_,x,w,I,P,D,O){const B=10*o,W=5*o;return this.int16[B+0]=h,this.int16[B+1]=p,this.int16[B+2]=_,this.int16[B+3]=x,this.int16[B+4]=w,this.int16[B+5]=I,this.uint32[W+3]=P,this.uint16[B+8]=D,this.uint16[B+9]=O,o}}Xh.prototype.bytesPerElement=20,Ct("StructArrayLayout6i1ul2ui20",Xh);class zc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w){const I=this.length;return this.resize(I+1),this.emplace(I,o,h,p,_,x,w)}emplace(o,h,p,_,x,w,I){const P=6*o;return this.int16[P+0]=h,this.int16[P+1]=p,this.int16[P+2]=_,this.int16[P+3]=x,this.int16[P+4]=w,this.int16[P+5]=I,o}}zc.prototype.bytesPerElement=12,Ct("StructArrayLayout2i2i2i12",zc);class Yh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x){const w=this.length;return this.resize(w+1),this.emplace(w,o,h,p,_,x)}emplace(o,h,p,_,x,w){const I=4*o,P=8*o;return this.float32[I+0]=h,this.float32[I+1]=p,this.float32[I+2]=_,this.int16[P+6]=x,this.int16[P+7]=w,o}}Yh.prototype.bytesPerElement=16,Ct("StructArrayLayout2f1f2i16",Yh);class Fc extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=12*o,I=3*o;return this.uint8[w+0]=h,this.uint8[w+1]=p,this.float32[I+1]=_,this.float32[I+2]=x,o}}Fc.prototype.bytesPerElement=12,Ct("StructArrayLayout2ub2f12",Fc);class $h extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[x+0]=h,this.uint16[x+1]=p,this.uint16[x+2]=_,o}}$h.prototype.bytesPerElement=6,Ct("StructArrayLayout3ui6",$h);class Du extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we){const Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe){const Ee=24*o,ke=12*o,Qe=48*o;return this.int16[Ee+0]=h,this.int16[Ee+1]=p,this.uint16[Ee+2]=_,this.uint16[Ee+3]=x,this.uint32[ke+2]=w,this.uint32[ke+3]=I,this.uint32[ke+4]=P,this.uint16[Ee+10]=D,this.uint16[Ee+11]=O,this.uint16[Ee+12]=B,this.float32[ke+7]=W,this.float32[ke+8]=X,this.uint8[Qe+36]=K,this.uint8[Qe+37]=ie,this.uint8[Qe+38]=de,this.uint32[ke+10]=we,this.int16[Ee+22]=Oe,o}}Du.prototype.bytesPerElement=48,Ct("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Du);class Wl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt){const _t=this.length;return this.resize(_t+1),this.emplace(_t,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt)}emplace(o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie,de,we,Oe,Ee,ke,Qe,et,St,kt,wt,bt,ht,Tt,_t){const it=32*o,jt=16*o;return this.int16[it+0]=h,this.int16[it+1]=p,this.int16[it+2]=_,this.int16[it+3]=x,this.int16[it+4]=w,this.int16[it+5]=I,this.int16[it+6]=P,this.int16[it+7]=D,this.uint16[it+8]=O,this.uint16[it+9]=B,this.uint16[it+10]=W,this.uint16[it+11]=X,this.uint16[it+12]=K,this.uint16[it+13]=ie,this.uint16[it+14]=de,this.uint16[it+15]=we,this.uint16[it+16]=Oe,this.uint16[it+17]=Ee,this.uint16[it+18]=ke,this.uint16[it+19]=Qe,this.uint16[it+20]=et,this.uint16[it+21]=St,this.uint16[it+22]=kt,this.uint32[jt+12]=wt,this.float32[jt+13]=bt,this.float32[jt+14]=ht,this.uint16[it+30]=Tt,this.uint16[it+31]=_t,o}}Wl.prototype.bytesPerElement=64,Ct("StructArrayLayout8i15ui1ul2f2ui64",Wl);class Kh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.float32[1*o+0]=h,o}}Kh.prototype.bytesPerElement=4,Ct("StructArrayLayout1f4",Kh);class Jh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=3*o;return this.uint16[6*o+0]=h,this.float32[x+1]=p,this.float32[x+2]=_,o}}Jh.prototype.bytesPerElement=12,Ct("StructArrayLayout1ui2f12",Jh);class Hl extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h,p){const _=this.length;return this.resize(_+1),this.emplace(_,o,h,p)}emplace(o,h,p,_){const x=4*o;return this.uint32[2*o+0]=h,this.uint16[x+2]=p,this.uint16[x+3]=_,o}}Hl.prototype.bytesPerElement=8,Ct("StructArrayLayout1ul2ui8",Hl);class Xp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o,h){const p=this.length;return this.resize(p+1),this.emplace(p,o,h)}emplace(o,h,p){const _=2*o;return this.uint16[_+0]=h,this.uint16[_+1]=p,o}}Xp.prototype.bytesPerElement=4,Ct("StructArrayLayout2ui4",Xp);class Yp extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(o){const h=this.length;return this.resize(h+1),this.emplace(h,o)}emplace(o,h){return this.uint16[1*o+0]=h,o}}Yp.prototype.bytesPerElement=2,Ct("StructArrayLayout1ui2",Yp);class Qh extends Vr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(o,h,p,_){const x=this.length;return this.resize(x+1),this.emplace(x,o,h,p,_)}emplace(o,h,p,_,x){const w=4*o;return this.float32[w+0]=h,this.float32[w+1]=p,this.float32[w+2]=_,this.float32[w+3]=x,o}}Qh.prototype.bytesPerElement=16,Ct("StructArrayLayout4f16",Qh);class fg extends Rc{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new E(this.anchorPointX,this.anchorPointY)}}fg.prototype.size=20;class y extends Xh{get(o){return new fg(this,o)}}Ct("CollisionBoxArray",y);class a extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(o){this._structArray.uint8[this._pos1+37]=o}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(o){this._structArray.uint8[this._pos1+38]=o}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(o){this._structArray.uint32[this._pos4+10]=o}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}a.prototype.size=48;class f extends Du{get(o){return new a(this,o)}}Ct("PlacedSymbolArray",f);class m extends Rc{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(o){this._structArray.uint32[this._pos4+12]=o}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}m.prototype.size=64;class g extends Wl{get(o){return new m(this,o)}}Ct("SymbolInstanceArray",g);class b extends Kh{getoffsetX(o){return this.float32[1*o+0]}}Ct("GlyphOffsetArray",b);class T extends ka{getx(o){return this.int16[3*o+0]}gety(o){return this.int16[3*o+1]}gettileUnitDistanceFromAnchor(o){return this.int16[3*o+2]}}Ct("SymbolLineVertexArray",T);class L extends Rc{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}L.prototype.size=12;class A extends Jh{get(o){return new L(this,o)}}Ct("TextAnchorOffsetArray",A);class N extends Rc{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}N.prototype.size=8;class V extends Hl{get(o){return new N(this,o)}}Ct("FeatureIndexArray",V);class j extends Nc{}class $ extends Nc{}class he extends Nc{}class ce extends qp{}class ge extends Wp{}class re extends Oc{}class Ie extends Zh{}class Be extends Hp{}class ve extends Zp{}class De extends Da{}class Ve extends zc{}class He extends Fc{}class $e extends $h{}class rt extends Xp{}const nt=ei([{name:"a_pos",components:2,type:"Int16"}],4),{members:ct}=nt;class pt{constructor(o=[]){this.segments=o}prepareSegment(o,h,p,_){let x=this.segments[this.segments.length-1];return o>pt.MAX_VERTEX_ARRAY_LENGTH&&Ke(`Max vertices per segment is ${pt.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${o}`),(!x||x.vertexLength+o>pt.MAX_VERTEX_ARRAY_LENGTH||x.sortKey!==_)&&(x={vertexOffset:h.length,primitiveOffset:p.length,vertexLength:0,primitiveLength:0},_!==void 0&&(x.sortKey=_),this.segments.push(x)),x}get(){return this.segments}destroy(){for(const o of this.segments)for(const h in o.vaos)o.vaos[h].destroy()}static simpleSegment(o,h,p,_){return new pt([{vertexOffset:o,primitiveOffset:h,vertexLength:p,primitiveLength:_,vaos:{},sortKey:0}])}}function un(u,o){return 256*(u=te(Math.floor(u),0,255))+te(Math.floor(o),0,255)}pt.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ct("SegmentVector",pt);const gt=ei([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ht={exports:{}},cn={exports:{}};cn.exports=function(u,o){var h,p,_,x,w,I,P,D;for(p=u.length-(h=3&u.length),_=o,w=3432918353,I=461845907,D=0;D>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295)<<13|_>>>19))+((5*(_>>>16)&65535)<<16)&4294967295))+((58964+(x>>>16)&65535)<<16);switch(P=0,h){case 3:P^=(255&u.charCodeAt(D+2))<<16;case 2:P^=(255&u.charCodeAt(D+1))<<8;case 1:_^=P=(65535&(P=(P=(65535&(P^=255&u.charCodeAt(D)))*w+(((P>>>16)*w&65535)<<16)&4294967295)<<15|P>>>17))*I+(((P>>>16)*I&65535)<<16)&4294967295}return _^=u.length,_=2246822507*(65535&(_^=_>>>16))+((2246822507*(_>>>16)&65535)<<16)&4294967295,_=3266489909*(65535&(_^=_>>>13))+((3266489909*(_>>>16)&65535)<<16)&4294967295,(_^=_>>>16)>>>0};var kn=cn.exports,Jt={exports:{}};Jt.exports=function(u,o){for(var h,p=u.length,_=o^p,x=0;p>=4;)h=1540483477*(65535&(h=255&u.charCodeAt(x)|(255&u.charCodeAt(++x))<<8|(255&u.charCodeAt(++x))<<16|(255&u.charCodeAt(++x))<<24))+((1540483477*(h>>>16)&65535)<<16),_=1540483477*(65535&_)+((1540483477*(_>>>16)&65535)<<16)^(h=1540483477*(65535&(h^=h>>>24))+((1540483477*(h>>>16)&65535)<<16)),p-=4,++x;switch(p){case 3:_^=(255&u.charCodeAt(x+2))<<16;case 2:_^=(255&u.charCodeAt(x+1))<<8;case 1:_=1540483477*(65535&(_^=255&u.charCodeAt(x)))+((1540483477*(_>>>16)&65535)<<16)}return _=1540483477*(65535&(_^=_>>>13))+((1540483477*(_>>>16)&65535)<<16),(_^=_>>>15)>>>0};var mn=kn,bn=Jt.exports;Ht.exports=mn,Ht.exports.murmur3=mn,Ht.exports.murmur2=bn;var Ur=d(Ht.exports);class Jn{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(o,h,p,_){this.ids.push(Wo(o)),this.positions.push(h,p,_)}getPositions(o){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const h=Wo(o);let p=0,_=this.ids.length-1;for(;p<_;){const w=p+_>>1;this.ids[w]>=h?_=w:p=w+1}const x=[];for(;this.ids[p]===h;)x.push({index:this.positions[3*p],start:this.positions[3*p+1],end:this.positions[3*p+2]}),p++;return x}static serialize(o,h){const p=new Float64Array(o.ids),_=new Uint32Array(o.positions);return yi(p,_,0,p.length-1),h&&h.push(p.buffer,_.buffer),{ids:p,positions:_}}static deserialize(o){const h=new Jn;return h.ids=o.ids,h.positions=o.positions,h.indexed=!0,h}}function Wo(u){const o=+u;return!isNaN(o)&&o<=Number.MAX_SAFE_INTEGER?o:Ur(String(u))}function yi(u,o,h,p){for(;h>1];let x=h-1,w=p+1;for(;;){do x++;while(u[x]<_);do w--;while(u[w]>_);if(x>=w)break;Mr(u,x,w),Mr(o,3*x,3*w),Mr(o,3*x+1,3*w+1),Mr(o,3*x+2,3*w+2)}w-h`u_${_}`),this.type=p}setUniform(o,h,p){o.set(p.constantOr(this.value))}getBinding(o,h,p){return this.type==="color"?new ll(o,h):new Ho(o,h)}}class fi{constructor(o,h){this.uniformNames=h.map(p=>`u_${p}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(o,h){this.pixelRatioFrom=h.pixelRatio,this.pixelRatioTo=o.pixelRatio,this.patternFrom=h.tlbr,this.patternTo=o.tlbr}setUniform(o,h,p,_){const x=_==="u_pattern_to"?this.patternTo:_==="u_pattern_from"?this.patternFrom:_==="u_pixel_ratio_to"?this.pixelRatioTo:_==="u_pixel_ratio_from"?this.pixelRatioFrom:null;x&&o.set(x)}getBinding(o,h,p){return p.substr(0,9)==="u_pattern"?new na(o,h):new Ho(o,h)}}class Ar{constructor(o,h,p,_){this.expression=o,this.type=p,this.maxValue=0,this.paintVertexAttributes=h.map(x=>({name:`a_${x}`,type:"Float32",components:p==="color"?2:1,offset:0})),this.paintVertexArray=new _}populatePaintArray(o,h,p,_,x){const w=this.paintVertexArray.length,I=this.expression.evaluate(new br(0),h,{},_,[],x);this.paintVertexArray.resize(o),this._setPaintValue(w,o,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:0},p,_);this._setPaintValue(o,h,x)}_setPaintValue(o,h,p){if(this.type==="color"){const _=ul(p);for(let x=o;x`u_${I}_t`),this.type=p,this.useIntegerZoom=_,this.zoom=x,this.maxValue=0,this.paintVertexAttributes=h.map(I=>({name:`a_${I}`,type:"Float32",components:p==="color"?4:2,offset:0})),this.paintVertexArray=new w}populatePaintArray(o,h,p,_,x){const w=this.expression.evaluate(new br(this.zoom),h,{},_,[],x),I=this.expression.evaluate(new br(this.zoom+1),h,{},_,[],x),P=this.paintVertexArray.length;this.paintVertexArray.resize(o),this._setPaintValue(P,o,w,I)}updatePaintArray(o,h,p,_){const x=this.expression.evaluate({zoom:this.zoom},p,_),w=this.expression.evaluate({zoom:this.zoom+1},p,_);this._setPaintValue(o,h,x,w)}_setPaintValue(o,h,p,_){if(this.type==="color"){const x=ul(p),w=ul(_);for(let I=o;I`#define HAS_UNIFORM_${_}`))}return o}getBinderAttributes(){const o=[];for(const h in this.binders){const p=this.binders[h];if(p instanceof Ar||p instanceof xr)for(let _=0;_!0){this.programConfigurations={};for(const _ of o)this.programConfigurations[_.id]=new pi(_,h,p);this.needsUpload=!1,this._featureMap=new Jn,this._bufferOffset=0}populatePaintArrays(o,h,p,_,x,w){for(const I in this.programConfigurations)this.programConfigurations[I].populatePaintArrays(o,h,_,x,w);h.id!==void 0&&this._featureMap.add(h.id,p,this._bufferOffset,o),this._bufferOffset=o,this.needsUpload=!0}updatePaintArrays(o,h,p,_){for(const x of p)this.needsUpload=this.programConfigurations[x.id].updatePaintArrays(o,this._featureMap,h,x,_)||this.needsUpload}get(o){return this.programConfigurations[o]}upload(o){if(this.needsUpload){for(const h in this.programConfigurations)this.programConfigurations[h].upload(o);this.needsUpload=!1}}destroy(){for(const o in this.programConfigurations)this.programConfigurations[o].destroy()}}function ps(u,o){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[u]||[u.replace(`${o}-`,"").replace(/-/g,"_")]}function di(u,o,h){const p={color:{source:Oc,composite:Qh},number:{source:Kh,composite:Oc}},_=function(x){return{"line-pattern":{source:Ie,composite:Ie},"fill-pattern":{source:Ie,composite:Ie},"fill-extrusion-pattern":{source:Ie,composite:Ie}}[x]}(u);return _&&_[h]||p[o][h]}Ct("ConstantBinder",ra),Ct("CrossFadedConstantBinder",fi),Ct("SourceExpressionBinder",Ar),Ct("CrossFadedCompositeBinder",fs),Ct("CompositeExpressionBinder",xr),Ct("ProgramConfiguration",pi,{omit:["_buffers"]}),Ct("ProgramConfigurationSet",kr);const Zr=8192,$p=Math.pow(2,14)-1,pg=-$p-1;function Zl(u){const o=Zr/u.extent,h=u.loadGeometry();for(let p=0;pw.x+1||Pw.y+1)&&Ke("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return h}function Xl(u,o){return{type:u.type,id:u.id,properties:u.properties,geometry:o?Zl(u):[]}}function ef(u,o,h,p,_){u.emplaceBack(2*o+(p+1)/2,2*h+(_+1)/2)}class cl{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new $,this.indexArray=new $e,this.segments=new pt,this.programConfigurations=new kr(o.layers,o.zoom),this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){const _=this.layers[0],x=[];let w=null,I=!1;_.type==="circle"&&(w=_.layout.get("circle-sort-key"),I=!w.isConstant());for(const{feature:P,id:D,index:O,sourceLayerIndex:B}of o){const W=this.layers[0]._featureFilter.needGeometry,X=Xl(P,W);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),X,p))continue;const K=I?w.evaluate(X,{},p):void 0,ie={id:D,properties:P.properties,type:P.type,sourceLayerIndex:B,index:O,geometry:W?X.geometry:Zl(P),patterns:{},sortKey:K};x.push(ie)}I&&x.sort((P,D)=>P.sortKey-D.sortKey);for(const P of x){const{geometry:D,index:O,sourceLayerIndex:B}=P,W=o[O].feature;this.addFeature(P,D,O,p),h.featureIndex.insert(W,D,O,B,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,ct),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(o,h,p,_){for(const x of h)for(const w of x){const I=w.x,P=w.y;if(I<0||I>=Zr||P<0||P>=Zr)continue;const D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,o.sortKey),O=D.vertexLength;ef(this.layoutVertexArray,I,P,-1,-1),ef(this.layoutVertexArray,I,P,1,-1),ef(this.layoutVertexArray,I,P,1,1),ef(this.layoutVertexArray,I,P,-1,1),this.indexArray.emplaceBack(O,O+1,O+2),this.indexArray.emplaceBack(O,O+3,O+2),D.vertexLength+=4,D.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,{},_)}}function Kp(u,o){for(let h=0;h1){if(tf(u,o))return!0;for(let p=0;p1?h:h.sub(o)._mult(_)._add(o))}function _b(u,o){let h,p,_,x=!1;for(let w=0;wo.y!=_.y>o.y&&o.x<(_.x-p.x)*(o.y-p.y)/(_.y-p.y)+p.x&&(x=!x)}return x}function nf(u,o){let h=!1;for(let p=0,_=u.length-1;po.y!=w.y>o.y&&o.x<(w.x-x.x)*(o.y-x.y)/(w.y-x.y)+x.x&&(h=!h)}return h}function WT(u,o,h){const p=h[0],_=h[2];if(u.x_.x&&o.x>_.x||u.y_.y&&o.y>_.y)return!1;const x=Le(u,o,h[0]);return x!==Le(u,o,h[1])||x!==Le(u,o,h[2])||x!==Le(u,o,h[3])}function td(u,o,h){const p=o.paint.get(u).value;return p.kind==="constant"?p.value:h.programConfigurations.get(o.id).getMaxValue(u)}function mg(u){return Math.sqrt(u[0]*u[0]+u[1]*u[1])}function gg(u,o,h,p,_){if(!o[0]&&!o[1])return u;const x=E.convert(o)._mult(_);h==="viewport"&&x._rotate(-p);const w=[];for(let I=0;Ixb(de,ie))}(D,P),X=B?O*I:O;for(const K of _)for(const ie of K){const de=B?ie:xb(ie,P);let we=X;const Oe=_g([],[ie.x,ie.y,0,1],P);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?we*=Oe[3]/w.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(we*=w.cameraToCenterDistance/Oe[3]),dg(W,de,we))return!0}return!1}}function xb(u,o){const h=_g([],[u.x,u.y,0,1],o);return new E(h[0]/h[3],h[1]/h[3])}class wb extends cl{}let Sb;Ct("HeatmapBucket",wb,{omit:["layers"]});var YT={get paint(){return Sb=Sb||new Co({"heatmap-radius":new qt(Re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new qt(Re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Nt(Re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Up(Re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Nt(Re.paint_heatmap["heatmap-opacity"])})}};function $y(u,{width:o,height:h},p,_){if(_){if(_ instanceof Uint8ClampedArray)_=new Uint8Array(_.buffer);else if(_.length!==o*h*p)throw new RangeError(`mismatched image size. expected: ${_.length} but got: ${o*h*p}`)}else _=new Uint8Array(o*h*p);return u.width=o,u.height=h,u.data=_,u}function Eb(u,{width:o,height:h},p){if(o===u.width&&h===u.height)return;const _=$y({},{width:o,height:h},p);Ky(u,_,{x:0,y:0},{x:0,y:0},{width:Math.min(u.width,o),height:Math.min(u.height,h)},p),u.width=o,u.height=h,u.data=_.data}function Ky(u,o,h,p,_,x){if(_.width===0||_.height===0)return o;if(_.width>u.width||_.height>u.height||h.x>u.width-_.width||h.y>u.height-_.height)throw new RangeError("out of range source coordinates for image copy");if(_.width>o.width||_.height>o.height||p.x>o.width-_.width||p.y>o.height-_.height)throw new RangeError("out of range destination coordinates for image copy");const w=u.data,I=o.data;if(w===I)throw new Error("srcData equals dstData, so image is already copied");for(let P=0;P<_.height;P++){const D=((h.y+P)*u.width+h.x)*x,O=((p.y+P)*o.width+p.x)*x;for(let B=0;B<_.width*x;B++)I[O+B]=w[D+B]}return o}class rd{constructor(o,h){$y(this,o,1,h)}resize(o){Eb(this,o,1)}clone(){return new rd({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Ky(o,h,p,_,x,1)}}class ks{constructor(o,h){$y(this,o,4,h)}resize(o){Eb(this,o,4)}replace(o,h){h?this.data.set(o):this.data=o instanceof Uint8ClampedArray?new Uint8Array(o.buffer):o}clone(){return new ks({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(o,h,p,_,x){Ky(o,h,p,_,x,4)}}function Ib(u){const o={},h=u.resolution||256,p=u.clips?u.clips.length:1,_=u.image||new ks({width:h,height:p});if(Math.log(h)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${h}`);const x=(w,I,P)=>{o[u.evaluationKey]=P;const D=u.expression.evaluate(o);_.data[w+I+0]=Math.floor(255*D.r/D.a),_.data[w+I+1]=Math.floor(255*D.g/D.a),_.data[w+I+2]=Math.floor(255*D.b/D.a),_.data[w+I+3]=Math.floor(255*D.a)};if(u.clips)for(let w=0,I=0;w80*h){p=x=u[0],_=w=u[1];for(var K=h;Kx&&(x=I),P>w&&(w=P);D=(D=Math.max(x-p,w-_))!==0?32767/D:0}return id(W,X,h,p,_,D,0),X}function Tb(u,o,h,p,_){var x,w;if(_===t0(u,o,h,p)>0)for(x=o;x=o;x-=p)w=Mb(x,u[x],u[x+1],w);return w&&vg(w,w.next)&&(sd(w),w=w.next),w}function Vc(u,o){if(!u)return u;o||(o=u);var h,p=u;do if(h=!1,p.steiner||!vg(p,p.next)&&ti(p.prev,p,p.next)!==0)p=p.next;else{if(sd(p),(p=o=p.prev)===p.next)break;h=!0}while(h||p!==o);return o}function id(u,o,h,p,_,x,w){if(u){!w&&x&&function(O,B,W,X){var K=O;do K.z===0&&(K.z=Qy(K.x,K.y,B,W,X)),K.prevZ=K.prev,K.nextZ=K.next,K=K.next;while(K!==O);K.prevZ.nextZ=null,K.prevZ=null,function(ie){var de,we,Oe,Ee,ke,Qe,et,St,kt=1;do{for(we=ie,ie=null,ke=null,Qe=0;we;){for(Qe++,Oe=we,et=0,de=0;de0||St>0&&Oe;)et!==0&&(St===0||!Oe||we.z<=Oe.z)?(Ee=we,we=we.nextZ,et--):(Ee=Oe,Oe=Oe.nextZ,St--),ke?ke.nextZ=Ee:ie=Ee,Ee.prevZ=ke,ke=Ee;we=Oe}ke.nextZ=null,kt*=2}while(Qe>1)}(K)}(u,p,_,x);for(var I,P,D=u;u.prev!==u.next;)if(I=u.prev,P=u.next,x?nL(u,p,_,x):tL(u))o.push(I.i/h|0),o.push(u.i/h|0),o.push(P.i/h|0),sd(u),u=P.next,D=P.next;else if((u=P)===D){w?w===1?id(u=rL(Vc(u),o,h),o,h,p,_,x,2):w===2&&iL(u,o,h,p,_,x):id(Vc(u),o,h,p,_,x,1);break}}}function tL(u){var o=u.prev,h=u,p=u.next;if(ti(o,h,p)>=0)return!1;for(var _=o.x,x=h.x,w=p.x,I=o.y,P=h.y,D=p.y,O=_x?_>w?_:w:x>w?x:w,X=I>P?I>D?I:D:P>D?P:D,K=p.next;K!==o;){if(K.x>=O&&K.x<=W&&K.y>=B&&K.y<=X&&of(_,I,x,P,w,D,K.x,K.y)&&ti(K.prev,K,K.next)>=0)return!1;K=K.next}return!0}function nL(u,o,h,p){var _=u.prev,x=u,w=u.next;if(ti(_,x,w)>=0)return!1;for(var I=_.x,P=x.x,D=w.x,O=_.y,B=x.y,W=w.y,X=IP?I>D?I:D:P>D?P:D,de=O>B?O>W?O:W:B>W?B:W,we=Qy(X,K,o,h,p),Oe=Qy(ie,de,o,h,p),Ee=u.prevZ,ke=u.nextZ;Ee&&Ee.z>=we&&ke&&ke.z<=Oe;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0||(Ee=Ee.prevZ,ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0))return!1;ke=ke.nextZ}for(;Ee&&Ee.z>=we;){if(Ee.x>=X&&Ee.x<=ie&&Ee.y>=K&&Ee.y<=de&&Ee!==_&&Ee!==w&&of(I,O,P,B,D,W,Ee.x,Ee.y)&&ti(Ee.prev,Ee,Ee.next)>=0)return!1;Ee=Ee.prevZ}for(;ke&&ke.z<=Oe;){if(ke.x>=X&&ke.x<=ie&&ke.y>=K&&ke.y<=de&&ke!==_&&ke!==w&&of(I,O,P,B,D,W,ke.x,ke.y)&&ti(ke.prev,ke,ke.next)>=0)return!1;ke=ke.nextZ}return!0}function rL(u,o,h){var p=u;do{var _=p.prev,x=p.next.next;!vg(_,x)&&Lb(_,p,p.next,x)&&od(_,x)&&od(x,_)&&(o.push(_.i/h|0),o.push(p.i/h|0),o.push(x.i/h|0),sd(p),sd(p.next),p=u=x),p=p.next}while(p!==u);return Vc(p)}function iL(u,o,h,p,_,x){var w=u;do{for(var I=w.next.next;I!==w.prev;){if(w.i!==I.i&&uL(w,I)){var P=Pb(w,I);return w=Vc(w,w.next),P=Vc(P,P.next),id(w,o,h,p,_,x,0),void id(P,o,h,p,_,x,0)}I=I.next}w=w.next}while(w!==u)}function oL(u,o){return u.x-o.x}function sL(u,o){var h=function(_,x){var w,I=x,P=_.x,D=_.y,O=-1/0;do{if(D<=I.y&&D>=I.next.y&&I.next.y!==I.y){var B=I.x+(D-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(B<=P&&B>O&&(O=B,w=I.x=I.x&&I.x>=K&&P!==I.x&&of(Dw.x||I.x===w.x&&aL(w,I)))&&(w=I,de=W)),I=I.next;while(I!==X);return w}(u,o);if(!h)return o;var p=Pb(h,u);return Vc(p,p.next),Vc(h,h.next)}function aL(u,o){return ti(u.prev,u,o.prev)<0&&ti(o.next,u,u.next)<0}function Qy(u,o,h,p,_){return(u=1431655765&((u=858993459&((u=252645135&((u=16711935&((u=(u-h)*_|0)|u<<8))|u<<4))|u<<2))|u<<1))|(o=1431655765&((o=858993459&((o=252645135&((o=16711935&((o=(o-p)*_|0)|o<<8))|o<<4))|o<<2))|o<<1))<<1}function lL(u){var o=u,h=u;do(o.x=(u-w)*(x-I)&&(u-w)*(p-I)>=(h-w)*(o-I)&&(h-w)*(x-I)>=(_-w)*(p-I)}function uL(u,o){return u.next.i!==o.i&&u.prev.i!==o.i&&!function(h,p){var _=h;do{if(_.i!==h.i&&_.next.i!==h.i&&_.i!==p.i&&_.next.i!==p.i&&Lb(_,_.next,h,p))return!0;_=_.next}while(_!==h);return!1}(u,o)&&(od(u,o)&&od(o,u)&&function(h,p){var _=h,x=!1,w=(h.x+p.x)/2,I=(h.y+p.y)/2;do _.y>I!=_.next.y>I&&_.next.y!==_.y&&w<(_.next.x-_.x)*(I-_.y)/(_.next.y-_.y)+_.x&&(x=!x),_=_.next;while(_!==h);return x}(u,o)&&(ti(u.prev,u,o.prev)||ti(u,o.prev,o))||vg(u,o)&&ti(u.prev,u,u.next)>0&&ti(o.prev,o,o.next)>0)}function ti(u,o,h){return(o.y-u.y)*(h.x-o.x)-(o.x-u.x)*(h.y-o.y)}function vg(u,o){return u.x===o.x&&u.y===o.y}function Lb(u,o,h,p){var _=xg(ti(u,o,h)),x=xg(ti(u,o,p)),w=xg(ti(h,p,u)),I=xg(ti(h,p,o));return _!==x&&w!==I||!(_!==0||!bg(u,h,o))||!(x!==0||!bg(u,p,o))||!(w!==0||!bg(h,u,p))||!(I!==0||!bg(h,o,p))}function bg(u,o,h){return o.x<=Math.max(u.x,h.x)&&o.x>=Math.min(u.x,h.x)&&o.y<=Math.max(u.y,h.y)&&o.y>=Math.min(u.y,h.y)}function xg(u){return u>0?1:u<0?-1:0}function od(u,o){return ti(u.prev,u,u.next)<0?ti(u,o,u.next)>=0&&ti(u,u.prev,o)>=0:ti(u,o,u.prev)<0||ti(u,u.next,o)<0}function Pb(u,o){var h=new e0(u.i,u.x,u.y),p=new e0(o.i,o.x,o.y),_=u.next,x=o.prev;return u.next=o,o.prev=u,h.next=_,_.prev=h,p.next=h,h.prev=p,x.next=p,p.prev=x,p}function Mb(u,o,h,p){var _=new e0(u,o,h);return p?(_.next=p.next,_.prev=p,p.next.prev=_,p.next=_):(_.prev=_,_.next=_),_}function sd(u){u.next.prev=u.prev,u.prev.next=u.next,u.prevZ&&(u.prevZ.nextZ=u.nextZ),u.nextZ&&(u.nextZ.prevZ=u.prevZ)}function e0(u,o,h){this.i=u,this.x=o,this.y=h,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function t0(u,o,h,p){for(var _=0,x=o,w=h-p;x0&&h.holes.push(p+=u[_-1].length)}return h};var Ab=d(Jy.exports);function cL(u,o,h,p,_){kb(u,o,h||0,p||u.length-1,_||hL)}function kb(u,o,h,p,_){for(;p>h;){if(p-h>600){var x=p-h+1,w=o-h+1,I=Math.log(x),P=.5*Math.exp(2*I/3),D=.5*Math.sqrt(I*P*(x-P)/x)*(w-x/2<0?-1:1);kb(u,o,Math.max(h,Math.floor(o-w*P/x+D)),Math.min(p,Math.floor(o+(x-w)*P/x+D)),_)}var O=u[o],B=h,W=p;for(ad(u,h,o),_(u[p],O)>0&&ad(u,h,p);B0;)W--}_(u[h],O)===0?ad(u,h,W):ad(u,++W,p),W<=o&&(h=W+1),o<=W&&(p=W-1)}}function ad(u,o,h){var p=u[o];u[o]=u[h],u[h]=p}function hL(u,o){return uo?1:0}function n0(u,o){const h=u.length;if(h<=1)return[u];const p=[];let _,x;for(let w=0;w1)for(let w=0;wh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new he,this.indexArray=new $e,this.indexArray2=new rt,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.segments2=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=r0("fill",this.layers,h);const _=this.layers[0].layout.get("fill-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p,h.availableImages):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=i0("fill",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,eL),this.indexBuffer=o.createIndexBuffer(this.indexArray),this.indexBuffer2=o.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(o,h,p,_,x){for(const w of n0(h,500)){let I=0;for(const X of w)I+=X.length;const P=this.segments.prepareSegment(I,this.layoutVertexArray,this.indexArray),D=P.vertexLength,O=[],B=[];for(const X of w){if(X.length===0)continue;X!==w[0]&&B.push(O.length/2);const K=this.segments2.prepareSegment(X.length,this.layoutVertexArray,this.indexArray2),ie=K.vertexLength;this.layoutVertexArray.emplaceBack(X[0].x,X[0].y),this.indexArray2.emplaceBack(ie+X.length-1,ie),O.push(X[0].x),O.push(X[0].y);for(let de=1;de>3}if(_--,p===1||p===2)x+=u.readSVarint(),w+=u.readSVarint(),p===1&&(o&&I.push(o),o=[]),o.push(new yL(x,w));else{if(p!==7)throw new Error("unknown command "+p);o&&o.push(o[0].clone())}}return o&&I.push(o),I},sf.prototype.bbox=function(){var u=this._pbf;u.pos=this._geometry;for(var o=u.readVarint()+u.pos,h=1,p=0,_=0,x=0,w=1/0,I=-1/0,P=1/0,D=-1/0;u.pos>3}if(p--,h===1||h===2)(_+=u.readSVarint())I&&(I=_),(x+=u.readSVarint())D&&(D=x);else if(h!==7)throw new Error("unknown command "+h)}return[w,P,I,D]},sf.prototype.toGeoJSON=function(u,o,h){var p,_,x=this.extent*Math.pow(2,h),w=this.extent*u,I=this.extent*o,P=this.loadGeometry(),D=sf.types[this.type];function O(X){for(var K=0;K>3;_=w===1?p.readString():w===2?p.readFloat():w===3?p.readDouble():w===4?p.readVarint64():w===5?p.readVarint():w===6?p.readSVarint():w===7?p.readBoolean():null}return _}(h))}zb.prototype.feature=function(u){if(u<0||u>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[u];var o=this._pbf.readVarint()+this._pbf.pos;return new xL(this._pbf,o,this.extent,this._keys,this._values)};var SL=Ob;function EL(u,o,h){if(u===3){var p=new SL(h,h.readVarint()+h.pos);p.length&&(o[p.name]=p)}}Ru.VectorTile=function(u,o){this.layers=u.readFields(EL,{},o)},Ru.VectorTileFeature=Nb,Ru.VectorTileLayer=Ob;const IL=Ru.VectorTileFeature.types,s0=Math.pow(2,13);function ld(u,o,h,p,_,x,w,I){u.emplaceBack(o,h,2*Math.floor(p*s0)+w,_*s0*2,x*s0*2,Math.round(I))}class a0{constructor(o){this.zoom=o.zoom,this.overscaling=o.overscaling,this.layers=o.layers,this.layerIds=this.layers.map(h=>h.id),this.index=o.index,this.hasPattern=!1,this.layoutVertexArray=new ce,this.centroidVertexArray=new j,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.features=[],this.hasPattern=r0("fill-extrusion",this.layers,h);for(const{feature:_,id:x,index:w,sourceLayerIndex:I}of o){const P=this.layers[0]._featureFilter.needGeometry,D=Xl(_,P);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),D,p))continue;const O={id:x,sourceLayerIndex:I,index:w,geometry:P?D.geometry:Zl(_),properties:_.properties,type:_.type,patterns:{}};this.hasPattern?this.features.push(i0("fill-extrusion",this.layers,O,this.zoom,h)):this.addFeature(O,O.geometry,w,p,{}),h.featureIndex.insert(_,O.geometry,w,I,this.index,!0)}}addFeatures(o,h,p){for(const _ of this.features){const{geometry:x}=_;this.addFeature(_,x,_.index,h,p)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,_L),this.centroidVertexBuffer=o.createVertexBuffer(this.centroidVertexArray,gL.members,!0),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(o,h,p,_,x){const w={x:0,y:0,vertexCount:0};for(const I of n0(h,500)){let P=0;for(const K of I)P+=K.length;let D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const K of I){if(K.length===0||TL(K))continue;let ie=0;for(let de=0;de=1){const Oe=K[de-1];if(!CL(we,Oe)){D.vertexLength+4>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const Ee=we.sub(Oe)._perp()._unit(),ke=Oe.dist(we);ie+ke>32768&&(ie=0),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,we.x,we.y,Ee.x,Ee.y,0,1,ie),w.x+=2*we.x,w.y+=2*we.y,w.vertexCount+=2,ie+=ke,ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,0,ie),ld(this.layoutVertexArray,Oe.x,Oe.y,Ee.x,Ee.y,0,1,ie),w.x+=2*Oe.x,w.y+=2*Oe.y,w.vertexCount+=2;const Qe=D.vertexLength;this.indexArray.emplaceBack(Qe,Qe+2,Qe+1),this.indexArray.emplaceBack(Qe+1,Qe+2,Qe+3),D.vertexLength+=4,D.primitiveLength+=2}}}}if(D.vertexLength+P>pt.MAX_VERTEX_ARRAY_LENGTH&&(D=this.segments.prepareSegment(P,this.layoutVertexArray,this.indexArray)),IL[o.type]!=="Polygon")continue;const O=[],B=[],W=D.vertexLength;for(const K of I)if(K.length!==0){K!==I[0]&&B.push(O.length/2);for(let ie=0;ieZr)||u.y===o.y&&(u.y<0||u.y>Zr)}function TL(u){return u.every(o=>o.x<0)||u.every(o=>o.x>Zr)||u.every(o=>o.y<0)||u.every(o=>o.y>Zr)}let Fb;Ct("FillExtrusionBucket",a0,{omit:["layers","features"]});var LL={get paint(){return Fb=Fb||new Co({"fill-extrusion-opacity":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new qt(Re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Hh(Re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new qt(Re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new qt(Re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Nt(Re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class PL extends As{constructor(o){super(o,LL)}createBucket(o){return new a0(o)}queryRadius(){return mg(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(o,h,p,_,x,w,I,P){const D=gg(o,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),w.angle,I),O=this.paint.get("fill-extrusion-height").evaluate(h,p),B=this.paint.get("fill-extrusion-base").evaluate(h,p),W=function(K,ie,de,we){const Oe=[];for(const Ee of K){const ke=[Ee.x,Ee.y,0,1];_g(ke,ke,ie),Oe.push(new E(ke[0]/ke[3],ke[1]/ke[3]))}return Oe}(D,P),X=function(K,ie,de,we){const Oe=[],Ee=[],ke=we[8]*ie,Qe=we[9]*ie,et=we[10]*ie,St=we[11]*ie,kt=we[8]*de,wt=we[9]*de,bt=we[10]*de,ht=we[11]*de;for(const Tt of K){const _t=[],it=[];for(const jt of Tt){const Rt=jt.x,Sn=jt.y,gr=we[0]*Rt+we[4]*Sn+we[12],wr=we[1]*Rt+we[5]*Sn+we[13],xi=we[2]*Rt+we[6]*Sn+we[14],ds=we[3]*Rt+we[7]*Sn+we[15],Lo=xi+et,mi=ds+St,Vi=gr+kt,Yi=wr+wt,Po=xi+bt,Mo=ds+ht,wi=new E((gr+ke)/mi,(wr+Qe)/mi);wi.z=Lo/mi,_t.push(wi);const Si=new E(Vi/Mo,Yi/Mo);Si.z=Po/Mo,it.push(Si)}Oe.push(_t),Ee.push(it)}return[Oe,Ee]}(_,B,O,P);return function(K,ie,de){let we=1/0;Jp(de,ie)&&(we=Bb(de,ie[0]));for(let Oe=0;Oeh.id),this.index=o.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(h=>{this.gradients[h.id]={}}),this.layoutVertexArray=new ge,this.layoutVertexArray2=new re,this.indexArray=new $e,this.programConfigurations=new kr(o.layers,o.zoom),this.segments=new pt,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(h=>h.isStateDependent()).map(h=>h.id)}populate(o,h,p){this.hasPattern=r0("line",this.layers,h);const _=this.layers[0].layout.get("line-sort-key"),x=!_.isConstant(),w=[];for(const{feature:I,id:P,index:D,sourceLayerIndex:O}of o){const B=this.layers[0]._featureFilter.needGeometry,W=Xl(I,B);if(!this.layers[0]._featureFilter.filter(new br(this.zoom),W,p))continue;const X=x?_.evaluate(W,{},p):void 0,K={id:P,properties:I.properties,type:I.type,sourceLayerIndex:O,index:D,geometry:B?W.geometry:Zl(I),patterns:{},sortKey:X};w.push(K)}x&&w.sort((I,P)=>I.sortKey-P.sortKey);for(const I of w){const{geometry:P,index:D,sourceLayerIndex:O}=I;if(this.hasPattern){const B=i0("line",this.layers,I,this.zoom,h);this.patternFeatures.push(B)}else this.addFeature(I,P,D,p,{});h.featureIndex.insert(o[D].feature,P,D,O,this.index)}}update(o,h,p){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(o,h,this.stateDependentLayers,p)}addFeatures(o,h,p){for(const _ of this.patternFeatures)this.addFeature(_,_.geometry,_.index,h,p)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(o){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=o.createVertexBuffer(this.layoutVertexArray2,DL)),this.layoutVertexBuffer=o.createVertexBuffer(this.layoutVertexArray,AL),this.indexBuffer=o.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(o),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(o){if(o.properties&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(o.properties,"mapbox_clip_end"))return{start:+o.properties.mapbox_clip_start,end:+o.properties.mapbox_clip_end}}addFeature(o,h,p,_,x){const w=this.layers[0].layout,I=w.get("line-join").evaluate(o,{}),P=w.get("line-cap"),D=w.get("line-miter-limit"),O=w.get("line-round-limit");this.lineClips=this.lineFeatureClips(o);for(const B of h)this.addLine(B,o,I,P,D,O);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,o,p,x,_)}addLine(o,h,p,_,x,w){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let we=0;we=2&&o[P-1].equals(o[P-2]);)P--;let D=0;for(;D0;if(St&&we>D){const ht=W.dist(X);if(ht>2*O){const Tt=W.sub(W.sub(X)._mult(O/ht)._round());this.updateDistance(X,Tt),this.addCurrentVertex(Tt,ie,0,0,B),X=Tt}}const wt=X&&K;let bt=wt?p:I?"butt":_;if(wt&&bt==="round"&&(Qex&&(bt="bevel"),bt==="bevel"&&(Qe>2&&(bt="flipbevel"),Qe100)Oe=de.mult(-1);else{const ht=Qe*ie.add(de).mag()/ie.sub(de).mag();Oe._perp()._mult(ht*(kt?-1:1))}this.addCurrentVertex(W,Oe,0,0,B),this.addCurrentVertex(W,Oe.mult(-1),0,0,B)}else if(bt==="bevel"||bt==="fakeround"){const ht=-Math.sqrt(Qe*Qe-1),Tt=kt?ht:0,_t=kt?0:ht;if(X&&this.addCurrentVertex(W,ie,Tt,_t,B),bt==="fakeround"){const it=Math.round(180*et/Math.PI/20);for(let jt=1;jt2*O){const Tt=W.add(K.sub(W)._mult(O/ht)._round());this.updateDistance(W,Tt),this.addCurrentVertex(Tt,de,0,0,B),W=Tt}}}}addCurrentVertex(o,h,p,_,x,w=!1){const I=h.y*_-h.x,P=-h.y-h.x*_;this.addHalfVertex(o,h.x+h.y*p,h.y-h.x*p,w,!1,p,x),this.addHalfVertex(o,I,P,w,!0,-_,x),this.distance>Vb/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(o,h,p,_,x,w))}addHalfVertex({x:o,y:h},p,_,x,w,I,P){const D=.5*(this.lineClips?this.scaledDistance*(Vb-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((o<<1)+(x?1:0),(h<<1)+(w?1:0),Math.round(63*p)+128,Math.round(63*_)+128,1+(I===0?0:I<0?-1:1)|(63&D)<<2,D>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const O=P.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,O),P.primitiveLength++),w?this.e2=O:this.e1=O}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(o,h){this.distance+=o.dist(h),this.updateScaledDistance()}}let Ub,jb;Ct("LineBucket",l0,{omit:["layers","patternFeatures"]});var Gb={get paint(){return jb=jb||new Co({"line-opacity":new qt(Re.paint_line["line-opacity"]),"line-color":new qt(Re.paint_line["line-color"]),"line-translate":new Nt(Re.paint_line["line-translate"]),"line-translate-anchor":new Nt(Re.paint_line["line-translate-anchor"]),"line-width":new qt(Re.paint_line["line-width"]),"line-gap-width":new qt(Re.paint_line["line-gap-width"]),"line-offset":new qt(Re.paint_line["line-offset"]),"line-blur":new qt(Re.paint_line["line-blur"]),"line-dasharray":new Dc(Re.paint_line["line-dasharray"]),"line-pattern":new Hh(Re.paint_line["line-pattern"]),"line-gradient":new Up(Re.paint_line["line-gradient"])})},get layout(){return Ub=Ub||new Co({"line-cap":new Nt(Re.layout_line["line-cap"]),"line-join":new qt(Re.layout_line["line-join"]),"line-miter-limit":new Nt(Re.layout_line["line-miter-limit"]),"line-round-limit":new Nt(Re.layout_line["line-round-limit"]),"line-sort-key":new qt(Re.layout_line["line-sort-key"])})}};class OL extends qt{possiblyEvaluate(o,h){return h=new br(Math.floor(h.zoom),{now:h.now,fadeDuration:h.fadeDuration,zoomHistory:h.zoomHistory,transition:h.transition}),super.possiblyEvaluate(o,h)}evaluate(o,h,p,_){return h=fe({},h,{zoom:Math.floor(h.zoom)}),super.evaluate(o,h,p,_)}}let wg;class zL extends As{constructor(o){super(o,Gb),this.gradientVersion=0,wg||(wg=new OL(Gb.paint.properties["line-width"].specification),wg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(o){if(o==="line-gradient"){const h=this.gradientExpression();this.stepInterpolant=!!function(p){return p._styleExpression!==void 0}(h)&&h._styleExpression.expression instanceof Ic,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(o,h){super.recalculate(o,h),this.paint._values["line-floorwidth"]=wg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,o)}createBucket(o){return new l0(o)}queryRadius(o){const h=o,p=qb(td("line-width",this,h),td("line-gap-width",this,h)),_=td("line-offset",this,h);return p/2+Math.abs(_)+mg(this.paint.get("line-translate"))}queryIntersectsFeature(o,h,p,_,x,w,I){const P=gg(o,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),w.angle,I),D=I/2*qb(this.paint.get("line-width").evaluate(h,p),this.paint.get("line-gap-width").evaluate(h,p)),O=this.paint.get("line-offset").evaluate(h,p);return O&&(_=function(B,W){const X=[];for(let K=0;K=3){for(let de=0;de0?o+2*u:u}const FL=ei([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),BL=ei([{name:"a_projected_pos",components:3,type:"Float32"}],4);ei([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const VL=ei([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);ei([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);const Wb=ei([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),UL=ei([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function jL(u,o,h){return u.sections.forEach(p=>{p.text=function(_,x,w){const I=x.layout.get("text-transform").evaluate(w,{});return I==="uppercase"?_=_.toLocaleUpperCase():I==="lowercase"&&(_=_.toLocaleLowerCase()),al.applyArabicShaping&&(_=al.applyArabicShaping(_)),_}(p.text,o,h)}),u}ei([{name:"triangle",components:3,type:"Uint16"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ei([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ei([{type:"Float32",name:"offsetX"}]),ei([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ei([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const cd={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bi=24,Hb=tr,Zb=function(u,o,h,p,_){var x,w,I=8*_-p-1,P=(1<>1,O=-7,B=h?_-1:0,W=h?-1:1,X=u[o+B];for(B+=W,x=X&(1<<-O)-1,X>>=-O,O+=I;O>0;x=256*x+u[o+B],B+=W,O-=8);for(w=x&(1<<-O)-1,x>>=-O,O+=p;O>0;w=256*w+u[o+B],B+=W,O-=8);if(x===0)x=1-D;else{if(x===P)return w?NaN:1/0*(X?-1:1);w+=Math.pow(2,p),x-=D}return(X?-1:1)*w*Math.pow(2,x-p)},Xb=function(u,o,h,p,_,x){var w,I,P,D=8*x-_-1,O=(1<>1,W=_===23?Math.pow(2,-24)-Math.pow(2,-77):0,X=p?0:x-1,K=p?1:-1,ie=o<0||o===0&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(I=isNaN(o)?1:0,w=O):(w=Math.floor(Math.log(o)/Math.LN2),o*(P=Math.pow(2,-w))<1&&(w--,P*=2),(o+=w+B>=1?W/P:W*Math.pow(2,1-B))*P>=2&&(w++,P/=2),w+B>=O?(I=0,w=O):w+B>=1?(I=(o*P-1)*Math.pow(2,_),w+=B):(I=o*Math.pow(2,B-1)*Math.pow(2,_),w=0));_>=8;u[h+X]=255&I,X+=K,I/=256,_-=8);for(w=w<<_|I,D+=_;D>0;u[h+X]=255&w,X+=K,w/=256,D-=8);u[h+X-K]|=128*ie};function tr(u){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(u)?u:new Uint8Array(u||0),this.pos=0,this.type=0,this.length=this.buf.length}tr.Varint=0,tr.Fixed64=1,tr.Bytes=2,tr.Fixed32=5;var u0=4294967296,Yb=1/u0,$b=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Yl(u){return u.type===tr.Bytes?u.readVarint()+u.pos:u.pos+1}function af(u,o,h){return h?4294967296*o+(u>>>0):4294967296*(o>>>0)+(u>>>0)}function Kb(u,o,h){var p=o<=16383?1:o<=2097151?2:o<=268435455?3:Math.floor(Math.log(o)/(7*Math.LN2));h.realloc(p);for(var _=h.pos-1;_>=u;_--)h.buf[_+p]=h.buf[_]}function GL(u,o){for(var h=0;h>>8,u[h+2]=o>>>16,u[h+3]=o>>>24}function Jb(u,o){return(u[o]|u[o+1]<<8|u[o+2]<<16)+(u[o+3]<<24)}tr.prototype={destroy:function(){this.buf=null},readFields:function(u,o,h){for(h=h||this.length;this.pos>3,x=this.pos;this.type=7&p,u(_,o,this),this.pos===x&&this.skip(p)}return o},readMessage:function(u,o){return this.readFields(u,o,this.readVarint()+this.pos)},readFixed32:function(){var u=Sg(this.buf,this.pos);return this.pos+=4,u},readSFixed32:function(){var u=Jb(this.buf,this.pos);return this.pos+=4,u},readFixed64:function(){var u=Sg(this.buf,this.pos)+Sg(this.buf,this.pos+4)*u0;return this.pos+=8,u},readSFixed64:function(){var u=Sg(this.buf,this.pos)+Jb(this.buf,this.pos+4)*u0;return this.pos+=8,u},readFloat:function(){var u=Zb(this.buf,this.pos,!0,23,4);return this.pos+=4,u},readDouble:function(){var u=Zb(this.buf,this.pos,!0,52,8);return this.pos+=8,u},readVarint:function(u){var o,h,p=this.buf;return o=127&(h=p[this.pos++]),h<128?o:(o|=(127&(h=p[this.pos++]))<<7,h<128?o:(o|=(127&(h=p[this.pos++]))<<14,h<128?o:(o|=(127&(h=p[this.pos++]))<<21,h<128?o:function(_,x,w){var I,P,D=w.buf;if(I=(112&(P=D[w.pos++]))>>4,P<128||(I|=(127&(P=D[w.pos++]))<<3,P<128)||(I|=(127&(P=D[w.pos++]))<<10,P<128)||(I|=(127&(P=D[w.pos++]))<<17,P<128)||(I|=(127&(P=D[w.pos++]))<<24,P<128)||(I|=(1&(P=D[w.pos++]))<<31,P<128))return af(_,I,x);throw new Error("Expected varint not more than 10 bytes")}(o|=(15&(h=p[this.pos]))<<28,u,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var u=this.readVarint();return u%2==1?(u+1)/-2:u/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var u=this.readVarint()+this.pos,o=this.pos;return this.pos=u,u-o>=12&&$b?function(h,p,_){return $b.decode(h.subarray(p,_))}(this.buf,o,u):function(h,p,_){for(var x="",w=p;w<_;){var I,P,D,O=h[w],B=null,W=O>239?4:O>223?3:O>191?2:1;if(w+W>_)break;W===1?O<128&&(B=O):W===2?(192&(I=h[w+1]))==128&&(B=(31&O)<<6|63&I)<=127&&(B=null):W===3?(P=h[w+2],(192&(I=h[w+1]))==128&&(192&P)==128&&((B=(15&O)<<12|(63&I)<<6|63&P)<=2047||B>=55296&&B<=57343)&&(B=null)):W===4&&(P=h[w+2],D=h[w+3],(192&(I=h[w+1]))==128&&(192&P)==128&&(192&D)==128&&((B=(15&O)<<18|(63&I)<<12|(63&P)<<6|63&D)<=65535||B>=1114112)&&(B=null)),B===null?(B=65533,W=1):B>65535&&(B-=65536,x+=String.fromCharCode(B>>>10&1023|55296),B=56320|1023&B),x+=String.fromCharCode(B),w+=W}return x}(this.buf,o,u)},readBytes:function(){var u=this.readVarint()+this.pos,o=this.buf.subarray(this.pos,u);return this.pos=u,o},readPackedVarint:function(u,o){if(this.type!==tr.Bytes)return u.push(this.readVarint(o));var h=Yl(this);for(u=u||[];this.pos127;);else if(o===tr.Bytes)this.pos=this.readVarint()+this.pos;else if(o===tr.Fixed32)this.pos+=4;else{if(o!==tr.Fixed64)throw new Error("Unimplemented type: "+o);this.pos+=8}},writeTag:function(u,o){this.writeVarint(u<<3|o)},realloc:function(u){for(var o=this.length||16;o268435455||u<0?function(o,h){var p,_;if(o>=0?(p=o%4294967296|0,_=o/4294967296|0):(_=~(-o/4294967296),4294967295^(p=~(-o%4294967296))?p=p+1|0:(p=0,_=_+1|0)),o>=18446744073709552e3||o<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");h.realloc(10),function(x,w,I){I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,x>>>=7,I.buf[I.pos++]=127&x|128,I.buf[I.pos]=127&(x>>>=7)}(p,0,h),function(x,w){var I=(7&x)<<4;w.buf[w.pos++]|=I|((x>>>=3)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x|((x>>>=7)?128:0),x&&(w.buf[w.pos++]=127&x)))))}(_,h)}(u,this):(this.realloc(4),this.buf[this.pos++]=127&u|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=127&(u>>>=7)|(u>127?128:0),u<=127||(this.buf[this.pos++]=u>>>7&127))))},writeSVarint:function(u){this.writeVarint(u<0?2*-u-1:2*u)},writeBoolean:function(u){this.writeVarint(!!u)},writeString:function(u){u=String(u),this.realloc(4*u.length),this.pos++;var o=this.pos;this.pos=function(p,_,x){for(var w,I,P=0;P<_.length;P++){if((w=_.charCodeAt(P))>55295&&w<57344){if(!I){w>56319||P+1===_.length?(p[x++]=239,p[x++]=191,p[x++]=189):I=w;continue}if(w<56320){p[x++]=239,p[x++]=191,p[x++]=189,I=w;continue}w=I-55296<<10|w-56320|65536,I=null}else I&&(p[x++]=239,p[x++]=191,p[x++]=189,I=null);w<128?p[x++]=w:(w<2048?p[x++]=w>>6|192:(w<65536?p[x++]=w>>12|224:(p[x++]=w>>18|240,p[x++]=w>>12&63|128),p[x++]=w>>6&63|128),p[x++]=63&w|128)}return x}(this.buf,u,this.pos);var h=this.pos-o;h>=128&&Kb(o,h,this),this.pos=o-1,this.writeVarint(h),this.pos+=h},writeFloat:function(u){this.realloc(4),Xb(this.buf,u,this.pos,!0,23,4),this.pos+=4},writeDouble:function(u){this.realloc(8),Xb(this.buf,u,this.pos,!0,52,8),this.pos+=8},writeBytes:function(u){var o=u.length;this.writeVarint(o),this.realloc(o);for(var h=0;h=128&&Kb(h,p,this),this.pos=h-1,this.writeVarint(p),this.pos+=p},writeMessage:function(u,o,h){this.writeTag(u,tr.Bytes),this.writeRawMessage(o,h)},writePackedVarint:function(u,o){o.length&&this.writeMessage(u,GL,o)},writePackedSVarint:function(u,o){o.length&&this.writeMessage(u,qL,o)},writePackedBoolean:function(u,o){o.length&&this.writeMessage(u,ZL,o)},writePackedFloat:function(u,o){o.length&&this.writeMessage(u,WL,o)},writePackedDouble:function(u,o){o.length&&this.writeMessage(u,HL,o)},writePackedFixed32:function(u,o){o.length&&this.writeMessage(u,XL,o)},writePackedSFixed32:function(u,o){o.length&&this.writeMessage(u,YL,o)},writePackedFixed64:function(u,o){o.length&&this.writeMessage(u,$L,o)},writePackedSFixed64:function(u,o){o.length&&this.writeMessage(u,KL,o)},writeBytesField:function(u,o){this.writeTag(u,tr.Bytes),this.writeBytes(o)},writeFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFixed32(o)},writeSFixed32Field:function(u,o){this.writeTag(u,tr.Fixed32),this.writeSFixed32(o)},writeFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeFixed64(o)},writeSFixed64Field:function(u,o){this.writeTag(u,tr.Fixed64),this.writeSFixed64(o)},writeVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeVarint(o)},writeSVarintField:function(u,o){this.writeTag(u,tr.Varint),this.writeSVarint(o)},writeStringField:function(u,o){this.writeTag(u,tr.Bytes),this.writeString(o)},writeFloatField:function(u,o){this.writeTag(u,tr.Fixed32),this.writeFloat(o)},writeDoubleField:function(u,o){this.writeTag(u,tr.Fixed64),this.writeDouble(o)},writeBooleanField:function(u,o){this.writeVarintField(u,!!o)}};var c0=d(Hb);const h0=3;function JL(u,o,h){u===1&&h.readMessage(QL,o)}function QL(u,o,h){if(u===3){const{id:p,bitmap:_,width:x,height:w,left:I,top:P,advance:D}=h.readMessage(eP,{});o.push({id:p,bitmap:new rd({width:x+2*h0,height:w+2*h0},_),metrics:{width:x,height:w,left:I,top:P,advance:D}})}}function eP(u,o,h){u===1?o.id=h.readVarint():u===2?o.bitmap=h.readBytes():u===3?o.width=h.readVarint():u===4?o.height=h.readVarint():u===5?o.left=h.readSVarint():u===6?o.top=h.readSVarint():u===7&&(o.advance=h.readVarint())}const Qb=h0;function ex(u){let o=0,h=0;for(const w of u)o+=w.w*w.h,h=Math.max(h,w.w);u.sort((w,I)=>I.h-w.h);const p=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(o/.95)),h),h:1/0}];let _=0,x=0;for(const w of u)for(let I=p.length-1;I>=0;I--){const P=p[I];if(!(w.w>P.w||w.h>P.h)){if(w.x=P.x,w.y=P.y,x=Math.max(x,w.y+w.h),_=Math.max(_,w.x+w.w),w.w===P.w&&w.h===P.h){const D=p.pop();I=0&&p>=o&&Ig[this.text.charCodeAt(p)];p--)h--;this.text=this.text.substring(o,h),this.sectionIndex=this.sectionIndex.slice(o,h)}substring(o,h){const p=new uf;return p.text=this.text.substring(o,h),p.sectionIndex=this.sectionIndex.slice(o,h),p.sections=this.sections,p}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((o,h)=>Math.max(o,this.sections[h].scale),0)}addTextSection(o,h){this.text+=o.text,this.sections.push(fd.forText(o.scale,o.fontStack||h));const p=this.sections.length-1;for(let _=0;_=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Eg(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K,ie){const de=uf.fromFeature(u,_);let we;B===c.ah.vertical&&de.verticalizePunctuation();const{processBidirectionalText:Oe,processStyledBidirectionalText:Ee}=al;if(Oe&&de.sections.length===1){we=[];const et=Oe(de.toString(),p0(de,D,x,o,p,X,K));for(const St of et){const kt=new uf;kt.text=St,kt.sections=de.sections;for(let wt=0;wt0&&Kl>Xo&&(Xo=Kl)}else{const Rs=kt[Tn.fontStack],$o=Rs&&Rs[$i];if($o&&$o.rect)Ra=$o.rect,ia=$o.metrics;else{const Kl=St[Tn.fontStack],_d=Kl&&Kl[$i];if(!_d)continue;ia=_d.metrics}Ii=(Si-Tn.scale)*bi}oa?(et.verticalizable=!0,po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:oa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:ia,rect:Ra}),gr+=$l*Tn.scale+jt):(po.push({glyph:$i,imageName:Na,x:gr,y:wr+Ii,vertical:oa,scale:Tn.scale,fontStack:Tn.fontStack,sectionIndex:mo,metrics:ia,rect:Ra}),gr+=ia.advance*Tn.scale+jt)}po.length!==0&&(xi=Math.max(gr-jt,xi),rP(po,0,po.length-1,Lo,Xo)),gr=0;const Yo=ht*Si+Xo;Ao.lineOffset=Math.max(Xo,fo),wr+=Yo,ds=Math.max(Yo,ds),++mi}var Vi;const Yi=wr-hd,{horizontalAlign:Po,verticalAlign:Mo}=d0(Tt);(function(wi,Si,fo,Ao,po,Xo,Yo,Ei,Tn){const mo=(Si-fo)*po;let $i=0;$i=Xo!==Yo?-Ei*Ao-hd:(-Ao*Tn+.5)*Yo;for(const Ii of wi)for(const ia of Ii.positionedGlyphs)ia.x+=mo,ia.y+=$i})(et.positionedLines,Lo,Po,Mo,xi,ds,ht,Yi,bt.length),et.top+=-Mo*Yi,et.bottom=et.top+Yi,et.left+=-Po*xi,et.right=et.left+xi}(Qe,o,h,p,we,w,I,P,B,D,W,ie),!function(et){for(const St of et)if(St.positionedGlyphs.length!==0)return!1;return!0}(ke)&&Qe}const Ig={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},tP={10:!0,32:!0,38:!0,40:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0};function nx(u,o,h,p,_,x){if(o.imageName){const w=p[o.imageName];return w?w.displaySize[0]*o.scale*bi/x+_:0}{const w=h[o.fontStack],I=w&&w[u];return I?I.metrics.advance*o.scale+_:0}}function rx(u,o,h,p){const _=Math.pow(u-o,2);return p?u=0;let O=0;for(let W=0;Ww.id),this.index=o.index,this.pixelRatio=o.pixelRatio,this.sourceLayerIndex=o.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Yy([]),this.placementViewportMatrix=Yy([]);const h=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ax(this.zoom,h["text-size"]),this.iconSizeData=ax(this.zoom,h["icon-size"]);const p=this.layers[0].layout,_=p.get("symbol-sort-key"),x=p.get("symbol-z-order");this.canOverlap=m0(p,"text-overlap","text-allow-overlap")!=="never"||m0(p,"icon-overlap","icon-allow-overlap")!=="never"||p.get("text-ignore-placement")||p.get("icon-ignore-placement"),this.sortFeaturesByKey=x!=="viewport-y"&&!_.isConstant(),this.sortFeaturesByY=(x==="viewport-y"||x==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,p.get("symbol-placement")==="point"&&(this.writingModes=p.get("text-writing-mode").map(w=>c.ah[w])),this.stateDependentLayerIds=this.layers.filter(w=>w.isStateDependent()).map(w=>w.id),this.sourceID=o.sourceID}createArrays(){this.text=new _0(new kr(this.layers,this.zoom,o=>/^text/.test(o))),this.icon=new _0(new kr(this.layers,this.zoom,o=>/^icon/.test(o))),this.glyphOffsetArray=new b,this.lineVertexArray=new T,this.symbolInstances=new g,this.textAnchorOffsets=new A}calculateGlyphDependencies(o,h,p,_,x){for(let w=0;w0)&&(w.value.kind!=="constant"||w.value.value.length>0),O=P.value.kind!=="constant"||!!P.value.value||Object.keys(P.parameters).length>0,B=x.get("symbol-sort-key");if(this.features=[],!D&&!O)return;const W=h.iconDependencies,X=h.glyphDependencies,K=h.availableImages,ie=new br(this.zoom);for(const{feature:de,id:we,index:Oe,sourceLayerIndex:Ee}of o){const ke=_._featureFilter.needGeometry,Qe=Xl(de,ke);if(!_._featureFilter.filter(ie,Qe,p))continue;let et,St;if(ke||(Qe.geometry=Zl(de)),D){const wt=_.getValueAndResolveTokens("text-field",Qe,p,K),bt=jo.factory(wt),ht=this.hasRTLText=this.hasRTLText||aP(bt);(!ht||al.getRTLTextPluginStatus()==="unavailable"||ht&&al.isParsed())&&(et=jL(bt,_,Qe))}if(O){const wt=_.getValueAndResolveTokens("icon-image",Qe,p,K);St=wt instanceof hs?wt:hs.fromString(wt)}if(!et&&!St)continue;const kt=this.sortFeaturesByKey?B.evaluate(Qe,{},p):void 0;if(this.features.push({id:we,text:et,icon:St,index:Oe,sourceLayerIndex:Ee,geometry:Qe.geometry,properties:de.properties,type:oP[de.type],sortKey:kt}),St&&(W[St.name]=!0),et){const wt=w.evaluate(Qe,{},p).join(","),bt=x.get("text-rotation-alignment")!=="viewport"&&x.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(c.ah.vertical)>=0;for(const ht of et.sections)if(ht.image)W[ht.image.name]=!0;else{const Tt=ku(et.toString()),_t=ht.fontStack||wt,it=X[_t]=X[_t]||{};this.calculateGlyphDependencies(ht.text,it,bt,this.allowVerticalPlacement,Tt)}}}x.get("symbol-placement")==="line"&&(this.features=function(de){const we={},Oe={},Ee=[];let ke=0;function Qe(wt){Ee.push(de[wt]),ke++}function et(wt,bt,ht){const Tt=Oe[wt];return delete Oe[wt],Oe[bt]=Tt,Ee[Tt].geometry[0].pop(),Ee[Tt].geometry[0]=Ee[Tt].geometry[0].concat(ht[0]),Tt}function St(wt,bt,ht){const Tt=we[bt];return delete we[bt],we[wt]=Tt,Ee[Tt].geometry[0].shift(),Ee[Tt].geometry[0]=ht[0].concat(Ee[Tt].geometry[0]),Tt}function kt(wt,bt,ht){const Tt=ht?bt[0][bt[0].length-1]:bt[0][0];return`${wt}:${Tt.x}:${Tt.y}`}for(let wt=0;wtwt.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((de,we)=>de.sortKey-we.sortKey)}update(o,h,p){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(o,h,this.layers,p),this.icon.programConfigurations.updatePaintArrays(o,h,this.layers,p))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(o){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(o),this.iconCollisionBox.upload(o)),this.text.upload(o,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(o,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(o,h){const p=this.lineVertexArray.length;if(o.segment!==void 0){let _=o.dist(h[o.segment+1]),x=o.dist(h[o.segment]);const w={};for(let I=o.segment+1;I=0;I--)w[I]={x:h[I].x,y:h[I].y,tileUnitDistanceFromAnchor:x},I>0&&(x+=h[I-1].dist(h[I]));for(let I=0;I0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(o,h){const p=o.placedSymbolArray.get(h),_=p.vertexStartIndex+4*p.numGlyphs;for(let x=p.vertexStartIndex;x<_;x+=4)o.indexArray.emplaceBack(x,x+1,x+2),o.indexArray.emplaceBack(x+1,x+2,x+3)}getSortedSymbolIndexes(o){if(this.sortedAngle===o&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const h=Math.sin(o),p=Math.cos(o),_=[],x=[],w=[];for(let I=0;I_[I]-_[P]||x[P]-x[I]),w}addToSortKeyRanges(o,h){const p=this.sortKeyRanges[this.sortKeyRanges.length-1];p&&p.sortKey===h?p.symbolInstanceEnd=o+1:this.sortKeyRanges.push({sortKey:h,symbolInstanceStart:o,symbolInstanceEnd:o+1})}sortFeatures(o){if(this.sortFeaturesByY&&this.sortedAngle!==o&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(o),this.sortedAngle=o,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const h of this.symbolInstanceIndexes){const p=this.symbolInstances.get(h);this.featureSortOrder.push(p.featureIndex),[p.rightJustifiedTextSymbolIndex,p.centerJustifiedTextSymbolIndex,p.leftJustifiedTextSymbolIndex].forEach((_,x,w)=>{_>=0&&w.indexOf(_)===x&&this.addIndicesForPlacedSymbol(this.text,_)}),p.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,p.verticalPlacedTextSymbolIndex),p.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.placedIconSymbolIndex),p.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,p.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let lx,ux;Ct("SymbolBucket",cf,{omit:["layers","collisionBoxArray","features","compareText"]}),cf.MAX_GLYPHS=65535,cf.addDynamicAttributes=g0;var v0={get paint(){return ux=ux||new Co({"icon-opacity":new qt(Re.paint_symbol["icon-opacity"]),"icon-color":new qt(Re.paint_symbol["icon-color"]),"icon-halo-color":new qt(Re.paint_symbol["icon-halo-color"]),"icon-halo-width":new qt(Re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new qt(Re.paint_symbol["icon-halo-blur"]),"icon-translate":new Nt(Re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Nt(Re.paint_symbol["icon-translate-anchor"]),"text-opacity":new qt(Re.paint_symbol["text-opacity"]),"text-color":new qt(Re.paint_symbol["text-color"],{runtimeType:Hr,getOverride:u=>u.textColor,hasOverride:u=>!!u.textColor}),"text-halo-color":new qt(Re.paint_symbol["text-halo-color"]),"text-halo-width":new qt(Re.paint_symbol["text-halo-width"]),"text-halo-blur":new qt(Re.paint_symbol["text-halo-blur"]),"text-translate":new Nt(Re.paint_symbol["text-translate"]),"text-translate-anchor":new Nt(Re.paint_symbol["text-translate-anchor"])})},get layout(){return lx=lx||new Co({"symbol-placement":new Nt(Re.layout_symbol["symbol-placement"]),"symbol-spacing":new Nt(Re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Nt(Re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new qt(Re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Nt(Re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Nt(Re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Nt(Re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Nt(Re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Nt(Re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Nt(Re.layout_symbol["icon-rotation-alignment"]),"icon-size":new qt(Re.layout_symbol["icon-size"]),"icon-text-fit":new Nt(Re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Nt(Re.layout_symbol["icon-text-fit-padding"]),"icon-image":new qt(Re.layout_symbol["icon-image"]),"icon-rotate":new qt(Re.layout_symbol["icon-rotate"]),"icon-padding":new qt(Re.layout_symbol["icon-padding"]),"icon-keep-upright":new Nt(Re.layout_symbol["icon-keep-upright"]),"icon-offset":new qt(Re.layout_symbol["icon-offset"]),"icon-anchor":new qt(Re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Nt(Re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Nt(Re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Nt(Re.layout_symbol["text-rotation-alignment"]),"text-field":new qt(Re.layout_symbol["text-field"]),"text-font":new qt(Re.layout_symbol["text-font"]),"text-size":new qt(Re.layout_symbol["text-size"]),"text-max-width":new qt(Re.layout_symbol["text-max-width"]),"text-line-height":new Nt(Re.layout_symbol["text-line-height"]),"text-letter-spacing":new qt(Re.layout_symbol["text-letter-spacing"]),"text-justify":new qt(Re.layout_symbol["text-justify"]),"text-radial-offset":new qt(Re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Nt(Re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new qt(Re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new qt(Re.layout_symbol["text-anchor"]),"text-max-angle":new Nt(Re.layout_symbol["text-max-angle"]),"text-writing-mode":new Nt(Re.layout_symbol["text-writing-mode"]),"text-rotate":new qt(Re.layout_symbol["text-rotate"]),"text-padding":new Nt(Re.layout_symbol["text-padding"]),"text-keep-upright":new Nt(Re.layout_symbol["text-keep-upright"]),"text-transform":new qt(Re.layout_symbol["text-transform"]),"text-offset":new qt(Re.layout_symbol["text-offset"]),"text-allow-overlap":new Nt(Re.layout_symbol["text-allow-overlap"]),"text-overlap":new Nt(Re.layout_symbol["text-overlap"]),"text-ignore-placement":new Nt(Re.layout_symbol["text-ignore-placement"]),"text-optional":new Nt(Re.layout_symbol["text-optional"])})}};class cx{constructor(o){if(o.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=o.property.overrides?o.property.overrides.runtimeType:ui,this.defaultValue=o}evaluate(o){if(o.formattedSection){const h=this.defaultValue.property.overrides;if(h&&h.hasOverride(o.formattedSection))return h.getOverride(o.formattedSection)}return o.feature&&o.featureState?this.defaultValue.evaluate(o.feature,o.featureState):this.defaultValue.property.specification.default}eachChild(o){this.defaultValue.isConstant()||o(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ct("FormatSectionOverride",cx,{omit:["defaultValue"]});class Tg extends As{constructor(o){super(o,v0)}recalculate(o,h){if(super.recalculate(o,h),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const p=this.layout.get("text-writing-mode");if(p){const _=[];for(const x of p)_.indexOf(x)<0&&_.push(x);this.layout._values["text-writing-mode"]=_}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(o,h,p,_){const x=this.layout.get(o).evaluate(h,{},p,_),w=this._unevaluatedLayout._values[o];return w.isDataDriven()||lr(w.value)||!x?x:function(I,P){return P.replace(/{([^{}]+)}/g,(D,O)=>I&&O in I?String(I[O]):"")}(h.properties,x)}createBucket(o){return new cf(o)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const o of v0.paint.overridableProperties){if(!Tg.hasPaintOverride(this.layout,o))continue;const h=this.paint.get(o),p=new cx(h),_=new mr(p,h.property.specification);let x=null;x=h.value.kind==="constant"||h.value.kind==="source"?new kh("source",_):new Mp("composite",_,h.value.zoomStops),this.paint._values[o]=new Ms(h.property,x,h.parameters)}}_handleOverridablePaintPropertyUpdate(o,h,p){return!(!this.layout||h.isDataDriven()||p.isDataDriven())&&Tg.hasPaintOverride(this.layout,o)}static hasPaintOverride(o,h){const p=o.get("text-field"),_=v0.paint.properties[h];let x=!1;const w=I=>{for(const P of I)if(_.overrides&&_.overrides.hasOverride(P))return void(x=!0)};if(p.value.kind==="constant"&&p.value.value instanceof jo)w(p.value.value.sections);else if(p.value.kind==="source"){const I=D=>{x||(D instanceof nl&&hi(D.value)===Jr?w(D.value.sections):D instanceof Mh?w(D.sections):D.eachChild(I))},P=p.value;P._styleExpression&&I(P._styleExpression.expression)}return x}}let hx;var lP={get paint(){return hx=hx||new Co({"background-color":new Nt(Re.paint_background["background-color"]),"background-pattern":new Dc(Re.paint_background["background-pattern"]),"background-opacity":new Nt(Re.paint_background["background-opacity"])})}};class uP extends As{constructor(o){super(o,lP)}}let fx;var cP={get paint(){return fx=fx||new Co({"raster-opacity":new Nt(Re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Nt(Re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Nt(Re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Nt(Re.paint_raster["raster-brightness-max"]),"raster-saturation":new Nt(Re.paint_raster["raster-saturation"]),"raster-contrast":new Nt(Re.paint_raster["raster-contrast"]),"raster-resampling":new Nt(Re.paint_raster["raster-resampling"]),"raster-fade-duration":new Nt(Re.paint_raster["raster-fade-duration"])})}};class hP extends As{constructor(o){super(o,cP)}}class fP extends As{constructor(o){super(o,{}),this.onAdd=h=>{this.implementation.onAdd&&this.implementation.onAdd(h,h.painter.context.gl)},this.onRemove=h=>{this.implementation.onRemove&&this.implementation.onRemove(h,h.painter.context.gl)},this.implementation=o}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class pP{constructor(o){this._methodToThrottle=o,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const b0=63710088e-1;class zu{constructor(o,h){if(isNaN(o)||isNaN(h))throw new Error(`Invalid LngLat object: (${o}, ${h})`);if(this.lng=+o,this.lat=+h,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new zu(ee(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(o){const h=Math.PI/180,p=this.lat*h,_=o.lat*h,x=Math.sin(p)*Math.sin(_)+Math.cos(p)*Math.cos(_)*Math.cos((o.lng-this.lng)*h);return b0*Math.acos(Math.min(x,1))}static convert(o){if(o instanceof zu)return o;if(Array.isArray(o)&&(o.length===2||o.length===3))return new zu(Number(o[0]),Number(o[1]));if(!Array.isArray(o)&&typeof o=="object"&&o!==null)return new zu(Number("lng"in o?o.lng:o.lon),Number(o.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}const px=2*Math.PI*b0;function dx(u){return px*Math.cos(u*Math.PI/180)}function mx(u){return(180+u)/360}function gx(u){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+u*Math.PI/360)))/360}function _x(u,o){return u/dx(o)}function x0(u){return 360/Math.PI*Math.atan(Math.exp((180-360*u)*Math.PI/180))-90}class Lg{constructor(o,h,p=0){this.x=+o,this.y=+h,this.z=+p}static fromLngLat(o,h=0){const p=zu.convert(o);return new Lg(mx(p.lng),gx(p.lat),_x(h,p.lat))}toLngLat(){return new zu(360*this.x-180,x0(this.y))}toAltitude(){return this.z*dx(x0(this.y))}meterInMercatorCoordinateUnits(){return 1/px*(o=x0(this.y),1/Math.cos(o*Math.PI/180));var o}}function yx(u,o,h){var p=2*Math.PI*6378137/256/Math.pow(2,h);return[u*p-2*Math.PI*6378137/2,o*p-2*Math.PI*6378137/2]}class w0{constructor(o,h,p){if(o<0||o>25||p<0||p>=Math.pow(2,o)||h<0||h>=Math.pow(2,o))throw new Error(`x=${h}, y=${p}, z=${o} outside of bounds. 0<=x<${Math.pow(2,o)}, 0<=y<${Math.pow(2,o)} 0<=z<=25 `);this.z=o,this.x=h,this.y=p,this.key=dd(0,o,o,h,p)}equals(o){return this.z===o.z&&this.x===o.x&&this.y===o.y}url(o,h,p){const _=(w=this.y,I=this.z,P=yx(256*(x=this.x),256*(w=Math.pow(2,I)-w-1),I),D=yx(256*(x+1),256*(w+1),I),P[0]+","+P[1]+","+D[0]+","+D[1]);var x,w,I,P,D;const O=function(B,W,X){let K,ie="";for(let de=B;de>0;de--)K=1<1?"@2x":"").replace(/{quadkey}/g,O).replace(/{bbox-epsg-3857}/g,_)}isChildOf(o){const h=this.z-o.z;return h>0&&o.x===this.x>>h&&o.y===this.y>>h}getTilePoint(o){const h=Math.pow(2,this.z);return new E((o.x*h-this.x)*Zr,(o.y*h-this.y)*Zr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class vx{constructor(o,h){this.wrap=o,this.canonical=h,this.key=dd(o,h.z,h.z,h.x,h.y)}}class Ds{constructor(o,h,p,_,x){if(o= z; overscaledZ = ${o}; z = ${p}`);this.overscaledZ=o,this.wrap=h,this.canonical=new w0(p,+_,+x),this.key=dd(h,o,p,_,x)}clone(){return new Ds(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(o){return this.overscaledZ===o.overscaledZ&&this.wrap===o.wrap&&this.canonical.equals(o.canonical)}scaledTo(o){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const h=this.canonical.z-o;return o>this.canonical.z?new Ds(o,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ds(o,this.wrap,o,this.canonical.x>>h,this.canonical.y>>h)}calculateScaledKey(o,h){if(o>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${o}; overscaledZ = ${this.overscaledZ}`);const p=this.canonical.z-o;return o>this.canonical.z?dd(this.wrap*+h,o,this.canonical.z,this.canonical.x,this.canonical.y):dd(this.wrap*+h,o,o,this.canonical.x>>p,this.canonical.y>>p)}isChildOf(o){if(o.wrap!==this.wrap)return!1;const h=this.canonical.z-o.canonical.z;return o.overscaledZ===0||o.overscaledZ>h&&o.canonical.y===this.canonical.y>>h}children(o){if(this.overscaledZ>=o)return[new Ds(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const h=this.canonical.z+1,p=2*this.canonical.x,_=2*this.canonical.y;return[new Ds(h,this.wrap,h,p,_),new Ds(h,this.wrap,h,p+1,_),new Ds(h,this.wrap,h,p,_+1),new Ds(h,this.wrap,h,p+1,_+1)]}isLessThan(o){return this.wrapo.wrap)&&(this.overscaledZo.overscaledZ)&&(this.canonical.xo.canonical.x)&&this.canonical.ythis.max&&(this.max=B),B=this.dim+1||h<-1||h>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(h+1)*this.stride+(o+1)}unpack(o,h,p){return o*this.redFactor+h*this.greenFactor+p*this.blueFactor-this.baseShift}getPixels(){return new ks({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(o,h,p){if(this.dim!==o.dim)throw new Error("dem dimension mismatch");let _=h*this.dim,x=h*this.dim+this.dim,w=p*this.dim,I=p*this.dim+this.dim;switch(h){case-1:_=x-1;break;case 1:x=_+1}switch(p){case-1:w=I-1;break;case 1:I=w+1}const P=-h*this.dim,D=-p*this.dim;for(let O=w;O=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${o} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[o]}}class wx{constructor(o,h,p,_,x){this.type="Feature",this._vectorTileFeature=o,o._z=h,o._x=p,o._y=_,this.properties=o.properties,this.id=x}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(o){this._geometry=o}toJSON(){const o={geometry:this.geometry};for(const h in this)h!=="_geometry"&&h!=="_vectorTileFeature"&&(o[h]=this[h]);return o}}class Sx{constructor(o,h){this.tileID=o,this.x=o.canonical.x,this.y=o.canonical.y,this.z=o.canonical.z,this.grid=new Mc(Zr,16,0),this.grid3D=new Mc(Zr,16,0),this.featureIndexArray=new V,this.promoteId=h}insert(o,h,p,_,x,w){const I=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(p,_,x);const P=w?this.grid3D:this.grid;for(let D=0;D=0&&B[3]>=0&&P.insert(I,B[0],B[1],B[2],B[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ru.VectorTile(new c0(this.rawTileData)).layers,this.sourceLayerCoder=new xx(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(o,h,p,_){this.loadVTLayers();const x=o.params||{},w=Zr/o.tileSize/o.scale,I=Oh(x.filter),P=o.queryGeometry,D=o.queryPadding*w,O=Ix(P),B=this.grid.query(O.minX-D,O.minY-D,O.maxX+D,O.maxY+D),W=Ix(o.cameraQueryGeometry),X=this.grid3D.query(W.minX-D,W.minY-D,W.maxX+D,W.maxY+D,(de,we,Oe,Ee)=>function(ke,Qe,et,St,kt){for(const bt of ke)if(Qe<=bt.x&&et<=bt.y&&St>=bt.x&&kt>=bt.y)return!0;const wt=[new E(Qe,et),new E(Qe,kt),new E(St,kt),new E(St,et)];if(ke.length>2){for(const bt of wt)if(nf(ke,bt))return!0}for(let bt=0;bt(Ee||(Ee=Zl(ke)),Qe.queryIntersectsFeature(P,ke,et,Ee,this.z,o.transform,w,o.pixelPosMatrix)))}return K}loadMatchingFeature(o,h,p,_,x,w,I,P,D,O,B){const W=this.bucketLayerIDs[h];if(w&&!function(de,we){for(let Oe=0;Oe=0)return!0;return!1}(w,W))return;const X=this.sourceLayerCoder.decode(p),K=this.vtLayers[X].feature(_);if(x.needGeometry){const de=Xl(K,!0);if(!x.filter(new br(this.tileID.overscaledZ),de,this.tileID.canonical))return}else if(!x.filter(new br(this.tileID.overscaledZ),K))return;const ie=this.getId(K,X);for(let de=0;de{const I=o instanceof kc?o.get(w):null;return I&&I.evaluate?I.evaluate(h,p,_):I})}function Ix(u){let o=1/0,h=1/0,p=-1/0,_=-1/0;for(const x of u)o=Math.min(o,x.x),h=Math.min(h,x.y),p=Math.max(p,x.x),_=Math.max(_,x.y);return{minX:o,minY:h,maxX:p,maxY:_}}function dP(u,o){return o-u}function Cx(u,o,h,p,_){const x=[];for(let w=0;w=p&&B.x>=p||(O.x>=p?O=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round():B.x>=p&&(B=new E(p,O.y+(p-O.x)/(B.x-O.x)*(B.y-O.y))._round()),O.y>=_&&B.y>=_||(O.y>=_?O=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round():B.y>=_&&(B=new E(O.x+(_-O.y)/(B.y-O.y)*(B.x-O.x),_)._round()),P&&O.equals(P[P.length-1])||(P=[O],x.push(P)),P.push(B)))))}}return x}Ct("FeatureIndex",Sx,{omit:["rawTileData","sourceLayerCoder"]});class Fu extends E{constructor(o,h,p,_){super(o,h),this.angle=p,_!==void 0&&(this.segment=_)}clone(){return new Fu(this.x,this.y,this.angle,this.segment)}}function Tx(u,o,h,p,_){if(o.segment===void 0||h===0)return!0;let x=o,w=o.segment+1,I=0;for(;I>-h/2;){if(w--,w<0)return!1;I-=u[w].dist(x),x=u[w]}I+=u[w].dist(u[w+1]),w++;const P=[];let D=0;for(;Ip;)D-=P.shift().angleDelta;if(D>_)return!1;w++,I+=O.dist(B)}return!0}function Lx(u){let o=0;for(let h=0;hD){const K=(D-P)/X,ie=co.number(B.x,W.x,K),de=co.number(B.y,W.y,K),we=new Fu(ie,de,W.angleTo(B),O);return we._round(),!w||Tx(u,we,I,w,o)?we:void 0}P+=X}}function gP(u,o,h,p,_,x,w,I,P){const D=Px(p,x,w),O=Mx(p,_),B=O*w,W=u[0].x===0||u[0].x===P||u[0].y===0||u[0].y===P;return o-B=0&&ke=0&&Qe=0&&W+D<=O){const et=new Fu(ke,Qe,Oe,K);et._round(),p&&!Tx(u,et,x,p,_)||X.push(et)}}B+=we}return I||X.length||w||(X=Ax(u,B/2,h,p,_,x,w,!0,P)),X}Ct("Anchor",Fu);const hf=Zo;function kx(u,o,h,p){const _=[],x=u.image,w=x.pixelRatio,I=x.paddedRect.w-2*hf,P=x.paddedRect.h-2*hf,D=u.right-u.left,O=u.bottom-u.top,B=x.stretchX||[[0,I]],W=x.stretchY||[[0,P]],X=(ht,Tt)=>ht+Tt[1]-Tt[0],K=B.reduce(X,0),ie=W.reduce(X,0),de=I-K,we=P-ie;let Oe=0,Ee=K,ke=0,Qe=ie,et=0,St=de,kt=0,wt=we;if(x.content&&p){const ht=x.content;Oe=Pg(B,0,ht[0]),ke=Pg(W,0,ht[1]),Ee=Pg(B,ht[0],ht[2]),Qe=Pg(W,ht[1],ht[3]),et=ht[0]-Oe,kt=ht[1]-ke,St=ht[2]-ht[0]-Ee,wt=ht[3]-ht[1]-Qe}const bt=(ht,Tt,_t,it)=>{const jt=Mg(ht.stretch-Oe,Ee,D,u.left),Rt=Ag(ht.fixed-et,St,ht.stretch,K),Sn=Mg(Tt.stretch-ke,Qe,O,u.top),gr=Ag(Tt.fixed-kt,wt,Tt.stretch,ie),wr=Mg(_t.stretch-Oe,Ee,D,u.left),xi=Ag(_t.fixed-et,St,_t.stretch,K),ds=Mg(it.stretch-ke,Qe,O,u.top),Lo=Ag(it.fixed-kt,wt,it.stretch,ie),mi=new E(jt,Sn),Vi=new E(wr,Sn),Yi=new E(wr,ds),Po=new E(jt,ds),Mo=new E(Rt/w,gr/w),wi=new E(xi/w,Lo/w),Si=o*Math.PI/180;if(Si){const po=Math.sin(Si),Xo=Math.cos(Si),Yo=[Xo,-po,po,Xo];mi._matMult(Yo),Vi._matMult(Yo),Po._matMult(Yo),Yi._matMult(Yo)}const fo=ht.stretch+ht.fixed,Ao=Tt.stretch+Tt.fixed;return{tl:mi,tr:Vi,bl:Po,br:Yi,tex:{x:x.paddedRect.x+hf+fo,y:x.paddedRect.y+hf+Ao,w:_t.stretch+_t.fixed-fo,h:it.stretch+it.fixed-Ao},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Mo,pixelOffsetBR:wi,minFontScaleX:St/w/D,minFontScaleY:wt/w/O,isSDF:h}};if(p&&(x.stretchX||x.stretchY)){const ht=Dx(B,de,K),Tt=Dx(W,we,ie);for(let _t=0;_t0&&(K=Math.max(10,K),this.circleDiameter=K)}else{let B=w.top*I-P[0],W=w.bottom*I+P[2],X=w.left*I-P[3],K=w.right*I+P[1];const ie=w.collisionPadding;if(ie&&(X-=ie[0]*I,B-=ie[1]*I,K+=ie[2]*I,W+=ie[3]*I),O){const de=new E(X,B),we=new E(K,B),Oe=new E(X,W),Ee=new E(K,W),ke=O*Math.PI/180;de._rotate(ke),we._rotate(ke),Oe._rotate(ke),Ee._rotate(ke),X=Math.min(de.x,we.x,Oe.x,Ee.x),K=Math.max(de.x,we.x,Oe.x,Ee.x),B=Math.min(de.y,we.y,Oe.y,Ee.y),W=Math.max(de.y,we.y,Oe.y,Ee.y)}o.emplaceBack(h.x,h.y,X,B,K,W,p,_,x)}this.boxEndIndex=o.length}}class _P{constructor(o=[],h=yP){if(this.data=o,this.length=this.data.length,this.compare=h,this.length>0)for(let p=(this.length>>1)-1;p>=0;p--)this._down(p)}push(o){this.data.push(o),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const o=this.data[0],h=this.data.pop();return this.length--,this.length>0&&(this.data[0]=h,this._down(0)),o}peek(){return this.data[0]}_up(o){const{data:h,compare:p}=this,_=h[o];for(;o>0;){const x=o-1>>1,w=h[x];if(p(_,w)>=0)break;h[o]=w,o=x}h[o]=_}_down(o){const{data:h,compare:p}=this,_=this.length>>1,x=h[o];for(;o<_;){let w=1+(o<<1),I=h[w];const P=w+1;if(P=0)break;h[o]=I,o=w}h[o]=x}}function yP(u,o){return uo?1:0}function vP(u,o=1,h=!1){let p=1/0,_=1/0,x=-1/0,w=-1/0;const I=u[0];for(let X=0;Xx)&&(x=K.x),(!X||K.y>w)&&(w=K.y)}const P=Math.min(x-p,w-_);let D=P/2;const O=new _P([],bP);if(P===0)return new E(p,_);for(let X=p;XB.d||!B.d)&&(B=X,h&&console.log("found best %d after %d probes",Math.round(1e4*X.d)/1e4,W)),X.max-B.d<=o||(D=X.h/2,O.push(new ff(X.p.x-D,X.p.y-D,D,u)),O.push(new ff(X.p.x+D,X.p.y-D,D,u)),O.push(new ff(X.p.x-D,X.p.y+D,D,u)),O.push(new ff(X.p.x+D,X.p.y+D,D,u)),W+=4)}return h&&(console.log(`num probes: ${W}`),console.log(`best distance: ${B.d}`)),B.p}function bP(u,o){return o.max-u.max}function ff(u,o,h,p){this.p=new E(u,o),this.h=h,this.d=function(_,x){let w=!1,I=1/0;for(let P=0;P_.y!=K.y>_.y&&_.x<(K.x-X.x)*(_.y-X.y)/(K.y-X.y)+X.x&&(w=!w),I=Math.min(I,gb(_,X,K))}}return(w?1:-1)*Math.sqrt(I)}(this.p,p),this.max=this.d+this.h*Math.SQRT2}var Xi;c.ap=void 0,(Xi=c.ap||(c.ap={}))[Xi.center=1]="center",Xi[Xi.left=2]="left",Xi[Xi.right=3]="right",Xi[Xi.top=4]="top",Xi[Xi.bottom=5]="bottom",Xi[Xi["top-left"]=6]="top-left",Xi[Xi["top-right"]=7]="top-right",Xi[Xi["bottom-left"]=8]="bottom-left",Xi[Xi["bottom-right"]=9]="bottom-right";const Bu=7,S0=Number.POSITIVE_INFINITY;function Rx(u,o){return o[1]!==S0?function(h,p,_){let x=0,w=0;switch(p=Math.abs(p),_=Math.abs(_),h){case"top-right":case"top-left":case"top":w=_-Bu;break;case"bottom-right":case"bottom-left":case"bottom":w=-_+Bu}switch(h){case"top-right":case"bottom-right":case"right":x=-p;break;case"top-left":case"bottom-left":case"left":x=p}return[x,w]}(u,o[0],o[1]):function(h,p){let _=0,x=0;p<0&&(p=0);const w=p/Math.SQRT2;switch(h){case"top-right":case"top-left":x=w-Bu;break;case"bottom-right":case"bottom-left":x=-w+Bu;break;case"bottom":x=-p+Bu;break;case"top":x=p-Bu}switch(h){case"top-right":case"bottom-right":_=-w;break;case"top-left":case"bottom-left":_=w;break;case"left":_=p;break;case"right":_=-p}return[_,x]}(u,o[0])}function Nx(u,o,h){var p;const _=u.layout,x=(p=_.get("text-variable-anchor-offset"))===null||p===void 0?void 0:p.evaluate(o,{},h);if(x){const I=x.values,P=[];for(let D=0;DW*bi);O.startsWith("top")?B[1]-=Bu:O.startsWith("bottom")&&(B[1]+=Bu),P[D+1]=B}return new cs(P)}const w=_.get("text-variable-anchor");if(w){let I;I=u._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[_.get("text-radial-offset").evaluate(o,{},h)*bi,S0]:_.get("text-offset").evaluate(o,{},h).map(D=>D*bi);const P=[];for(const D of w)P.push(D,Rx(D,I));return new cs(P)}return null}function E0(u){switch(u){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function xP(u,o,h,p,_,x,w,I,P,D,O){let B=x.textMaxSize.evaluate(o,{});B===void 0&&(B=w);const W=u.layers[0].layout,X=W.get("icon-offset").evaluate(o,{},O),K=zx(h.horizontal),ie=w/24,de=u.tilePixelRatio*ie,we=u.tilePixelRatio*B/24,Oe=u.tilePixelRatio*I,Ee=u.tilePixelRatio*W.get("symbol-spacing"),ke=W.get("text-padding")*u.tilePixelRatio,Qe=function(it,jt,Rt,Sn=1){const gr=it.get("icon-padding").evaluate(jt,{},Rt),wr=gr&&gr.values;return[wr[0]*Sn,wr[1]*Sn,wr[2]*Sn,wr[3]*Sn]}(W,o,O,u.tilePixelRatio),et=W.get("text-max-angle")/180*Math.PI,St=W.get("text-rotation-alignment")!=="viewport"&&W.get("symbol-placement")!=="point",kt=W.get("icon-rotation-alignment")==="map"&&W.get("symbol-placement")!=="point",wt=W.get("symbol-placement"),bt=Ee/2,ht=W.get("icon-text-fit");let Tt;p&&ht!=="none"&&(u.allowVerticalPlacement&&h.vertical&&(Tt=sx(p,h.vertical,ht,W.get("icon-text-fit-padding"),X,ie)),K&&(p=sx(p,K,ht,W.get("icon-text-fit-padding"),X,ie)));const _t=(it,jt)=>{jt.x<0||jt.x>=Zr||jt.y<0||jt.y>=Zr||function(Rt,Sn,gr,wr,xi,ds,Lo,mi,Vi,Yi,Po,Mo,wi,Si,fo,Ao,po,Xo,Yo,Ei,Tn,mo,$i,Ii,ia){const Ra=Rt.addToLineVertexArray(Sn,gr);let Na,$l,oa,Rs,$o=0,Kl=0,_d=0,Ux=0,k0=-1,D0=-1;const Jl={};let jx=Ur("");if(Rt.allowVerticalPlacement&&wr.vertical){const go=mi.layout.get("text-rotate").evaluate(Tn,{},Ii)+90;oa=new kg(Vi,Sn,Yi,Po,Mo,wr.vertical,wi,Si,fo,go),Lo&&(Rs=new kg(Vi,Sn,Yi,Po,Mo,Lo,po,Xo,fo,go))}if(xi){const go=mi.layout.get("icon-rotate").evaluate(Tn,{}),Ns=mi.layout.get("icon-text-fit")!=="none",Uc=kx(xi,go,$i,Ns),za=Lo?kx(Lo,go,$i,Ns):void 0;$l=new kg(Vi,Sn,Yi,Po,Mo,xi,po,Xo,!1,go),$o=4*Uc.length;const jc=Rt.iconSizeData;let fl=null;jc.kind==="source"?(fl=[hl*mi.layout.get("icon-size").evaluate(Tn,{})],fl[0]>Ou&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)):jc.kind==="composite"&&(fl=[hl*mo.compositeIconSizes[0].evaluate(Tn,{},Ii),hl*mo.compositeIconSizes[1].evaluate(Tn,{},Ii)],(fl[0]>Ou||fl[1]>Ou)&&Ke(`${Rt.layerIds[0]}: Value for "icon-size" is >= ${pd}. Reduce your "icon-size".`)),Rt.addSymbols(Rt.icon,Uc,fl,Ei,Yo,Tn,c.ah.none,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),k0=Rt.icon.placedSymbolArray.length-1,za&&(Kl=4*za.length,Rt.addSymbols(Rt.icon,za,fl,Ei,Yo,Tn,c.ah.vertical,Sn,Ra.lineStartIndex,Ra.lineLength,-1,Ii),D0=Rt.icon.placedSymbolArray.length-1)}const Gx=Object.keys(wr.horizontal);for(const go of Gx){const Ns=wr.horizontal[go];if(!Na){jx=Ur(Ns.text);const za=mi.layout.get("text-rotate").evaluate(Tn,{},Ii);Na=new kg(Vi,Sn,Yi,Po,Mo,Ns,wi,Si,fo,za)}const Uc=Ns.positionedLines.length===1;if(_d+=Ox(Rt,Sn,Ns,ds,mi,fo,Tn,Ao,Ra,wr.vertical?c.ah.horizontal:c.ah.horizontalOnly,Uc?Gx:[go],Jl,k0,mo,Ii),Uc)break}wr.vertical&&(Ux+=Ox(Rt,Sn,wr.vertical,ds,mi,fo,Tn,Ao,Ra,c.ah.vertical,["vertical"],Jl,D0,mo,Ii));const EP=Na?Na.boxStartIndex:Rt.collisionBoxArray.length,IP=Na?Na.boxEndIndex:Rt.collisionBoxArray.length,CP=oa?oa.boxStartIndex:Rt.collisionBoxArray.length,TP=oa?oa.boxEndIndex:Rt.collisionBoxArray.length,LP=$l?$l.boxStartIndex:Rt.collisionBoxArray.length,PP=$l?$l.boxEndIndex:Rt.collisionBoxArray.length,MP=Rs?Rs.boxStartIndex:Rt.collisionBoxArray.length,AP=Rs?Rs.boxEndIndex:Rt.collisionBoxArray.length;let Oa=-1;const Rg=(go,Ns)=>go&&go.circleDiameter?Math.max(go.circleDiameter,Ns):Ns;Oa=Rg(Na,Oa),Oa=Rg(oa,Oa),Oa=Rg($l,Oa),Oa=Rg(Rs,Oa);const qx=Oa>-1?1:0;qx&&(Oa*=ia/bi),Rt.glyphOffsetArray.length>=cf.MAX_GLYPHS&&Ke("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Tn.sortKey!==void 0&&Rt.addToSortKeyRanges(Rt.symbolInstances.length,Tn.sortKey);const kP=Nx(mi,Tn,Ii),[DP,RP]=function(go,Ns){const Uc=go.length,za=Ns==null?void 0:Ns.values;if((za==null?void 0:za.length)>0)for(let jc=0;jc=0?Jl.right:-1,Jl.center>=0?Jl.center:-1,Jl.left>=0?Jl.left:-1,Jl.vertical||-1,k0,D0,jx,EP,IP,CP,TP,LP,PP,MP,AP,Yi,_d,Ux,$o,Kl,qx,0,wi,Oa,DP,RP)}(u,jt,it,h,p,_,Tt,u.layers[0],u.collisionBoxArray,o.index,o.sourceLayerIndex,u.index,de,[ke,ke,ke,ke],St,P,Oe,Qe,kt,X,o,x,D,O,w)};if(wt==="line")for(const it of Cx(o.geometry,0,0,Zr,Zr)){const jt=gP(it,Ee,et,h.vertical||K,p,24,we,u.overscaling,Zr);for(const Rt of jt)K&&wP(u,K.text,bt,Rt)||_t(it,Rt)}else if(wt==="line-center"){for(const it of o.geometry)if(it.length>1){const jt=mP(it,et,h.vertical||K,p,24,we);jt&&_t(it,jt)}}else if(o.type==="Polygon")for(const it of n0(o.geometry,0)){const jt=vP(it,16);_t(it[0],new Fu(jt.x,jt.y,0))}else if(o.type==="LineString")for(const it of o.geometry)_t(it,new Fu(it[0].x,it[0].y,0));else if(o.type==="Point")for(const it of o.geometry)for(const jt of it)_t([jt],new Fu(jt.x,jt.y,0))}function Ox(u,o,h,p,_,x,w,I,P,D,O,B,W,X,K){const ie=function(Oe,Ee,ke,Qe,et,St,kt,wt){const bt=Qe.layout.get("text-rotate").evaluate(St,{})*Math.PI/180,ht=[];for(const Tt of Ee.positionedLines)for(const _t of Tt.positionedGlyphs){if(!_t.rect)continue;const it=_t.rect||{};let jt=Qb+1,Rt=!0,Sn=1,gr=0;const wr=(et||wt)&&_t.vertical,xi=_t.metrics.advance*_t.scale/2;if(wt&&Ee.verticalizable&&(gr=Tt.lineOffset/2-(_t.imageName?-(bi-_t.metrics.width*_t.scale)/2:(_t.scale-1)*bi)),_t.imageName){const Ei=kt[_t.imageName];Rt=Ei.sdf,Sn=Ei.pixelRatio,jt=Zo/Sn}const ds=et?[_t.x+xi,_t.y]:[0,0];let Lo=et?[0,0]:[_t.x+xi+ke[0],_t.y+ke[1]-gr],mi=[0,0];wr&&(mi=Lo,Lo=[0,0]);const Vi=_t.metrics.isDoubleResolution?2:1,Yi=(_t.metrics.left-jt)*_t.scale-xi+Lo[0],Po=(-_t.metrics.top-jt)*_t.scale+Lo[1],Mo=Yi+it.w/Vi*_t.scale/Sn,wi=Po+it.h/Vi*_t.scale/Sn,Si=new E(Yi,Po),fo=new E(Mo,Po),Ao=new E(Yi,wi),po=new E(Mo,wi);if(wr){const Ei=new E(-xi,xi-hd),Tn=-Math.PI/2,mo=bi/2-xi,$i=new E(5-hd-mo,-(_t.imageName?mo:0)),Ii=new E(...mi);Si._rotateAround(Tn,Ei)._add($i)._add(Ii),fo._rotateAround(Tn,Ei)._add($i)._add(Ii),Ao._rotateAround(Tn,Ei)._add($i)._add(Ii),po._rotateAround(Tn,Ei)._add($i)._add(Ii)}if(bt){const Ei=Math.sin(bt),Tn=Math.cos(bt),mo=[Tn,-Ei,Ei,Tn];Si._matMult(mo),fo._matMult(mo),Ao._matMult(mo),po._matMult(mo)}const Xo=new E(0,0),Yo=new E(0,0);ht.push({tl:Si,tr:fo,bl:Ao,br:po,tex:it,writingMode:Ee.writingMode,glyphOffset:ds,sectionIndex:_t.sectionIndex,isSDF:Rt,pixelOffsetTL:Xo,pixelOffsetBR:Yo,minFontScaleX:0,minFontScaleY:0})}return ht}(0,h,I,_,x,w,p,u.allowVerticalPlacement),de=u.textSizeData;let we=null;de.kind==="source"?(we=[hl*_.layout.get("text-size").evaluate(w,{})],we[0]>Ou&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)):de.kind==="composite"&&(we=[hl*X.compositeTextSizes[0].evaluate(w,{},K),hl*X.compositeTextSizes[1].evaluate(w,{},K)],(we[0]>Ou||we[1]>Ou)&&Ke(`${u.layerIds[0]}: Value for "text-size" is >= ${pd}. Reduce your "text-size".`)),u.addSymbols(u.text,ie,we,I,x,w,D,o,P.lineStartIndex,P.lineLength,W,K);for(const Oe of O)B[Oe]=u.text.placedSymbolArray.length-1;return 4*ie.length}function zx(u){for(const o in u)return u[o];return null}function wP(u,o,h,p){const _=u.compareText;if(o in _){const x=_[o];for(let w=x.length-1;w>=0;w--)if(p.dist(x[w])>4;if(_!==1)throw new Error(`Got v${_} data when expected v1.`);const x=Fx[15&p];if(!x)throw new Error("Unrecognized array type.");const[w]=new Uint16Array(o,2,1),[I]=new Uint32Array(o,4,1);return new I0(I,w,x,o)}constructor(o,h=64,p=Float64Array,_){if(isNaN(o)||o<0)throw new Error(`Unpexpected numItems value: ${o}.`);this.numItems=+o,this.nodeSize=Math.min(Math.max(+h,2),65535),this.ArrayType=p,this.IndexArrayType=o<65536?Uint16Array:Uint32Array;const x=Fx.indexOf(this.ArrayType),w=2*o*this.ArrayType.BYTES_PER_ELEMENT,I=o*this.IndexArrayType.BYTES_PER_ELEMENT,P=(8-I%8)%8;if(x<0)throw new Error(`Unexpected typed array class: ${p}.`);_&&_ instanceof ArrayBuffer?(this.data=_,this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=2*o,this._finished=!0):(this.data=new ArrayBuffer(8+w+I+P),this.ids=new this.IndexArrayType(this.data,8,o),this.coords=new this.ArrayType(this.data,8+I+P,2*o),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+x]),new Uint16Array(this.data,2,1)[0]=h,new Uint32Array(this.data,4,1)[0]=o)}add(o,h){const p=this._pos>>1;return this.ids[p]=p,this.coords[this._pos++]=o,this.coords[this._pos++]=h,p}finish(){const o=this._pos>>1;if(o!==this.numItems)throw new Error(`Added ${o} items when expected ${this.numItems}.`);return C0(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(o,h,p,_){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:x,coords:w,nodeSize:I}=this,P=[0,x.length-1,0],D=[];for(;P.length;){const O=P.pop()||0,B=P.pop()||0,W=P.pop()||0;if(B-W<=I){for(let de=W;de<=B;de++){const we=w[2*de],Oe=w[2*de+1];we>=o&&we<=p&&Oe>=h&&Oe<=_&&D.push(x[de])}continue}const X=W+B>>1,K=w[2*X],ie=w[2*X+1];K>=o&&K<=p&&ie>=h&&ie<=_&&D.push(x[X]),(O===0?o<=K:h<=ie)&&(P.push(W),P.push(X-1),P.push(1-O)),(O===0?p>=K:_>=ie)&&(P.push(X+1),P.push(B),P.push(1-O))}return D}within(o,h,p){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:_,coords:x,nodeSize:w}=this,I=[0,_.length-1,0],P=[],D=p*p;for(;I.length;){const O=I.pop()||0,B=I.pop()||0,W=I.pop()||0;if(B-W<=w){for(let de=W;de<=B;de++)Vx(x[2*de],x[2*de+1],o,h)<=D&&P.push(_[de]);continue}const X=W+B>>1,K=x[2*X],ie=x[2*X+1];Vx(K,ie,o,h)<=D&&P.push(_[X]),(O===0?o-p<=K:h-p<=ie)&&(I.push(W),I.push(X-1),I.push(1-O)),(O===0?o+p>=K:h+p>=ie)&&(I.push(X+1),I.push(B),I.push(1-O))}return P}}function C0(u,o,h,p,_,x){if(_-p<=h)return;const w=p+_>>1;Bx(u,o,w,p,_,x),C0(u,o,h,p,w-1,1-x),C0(u,o,h,w+1,_,1-x)}function Bx(u,o,h,p,_,x){for(;_>p;){if(_-p>600){const D=_-p+1,O=h-p+1,B=Math.log(D),W=.5*Math.exp(2*B/3),X=.5*Math.sqrt(B*W*(D-W)/D)*(O-D/2<0?-1:1);Bx(u,o,h,Math.max(p,Math.floor(h-O*W/D+X)),Math.min(_,Math.floor(h+(D-O)*W/D+X)),x)}const w=o[2*h+x];let I=p,P=_;for(md(u,o,p,h),o[2*_+x]>w&&md(u,o,p,_);Iw;)P--}o[2*p+x]===w?md(u,o,p,P):(P++,md(u,o,P,_)),P<=h&&(p=P+1),h<=P&&(_=P-1)}}function md(u,o,h,p){T0(u,h,p),T0(o,2*h,2*p),T0(o,2*h+1,2*p+1)}function T0(u,o,h){const p=u[o];u[o]=u[h],u[h]=p}function Vx(u,o,h,p){const _=u-h,x=o-p;return _*_+x*x}var L0;c.bd=void 0,(L0=c.bd||(c.bd={})).create="create",L0.load="load",L0.fullLoad="fullLoad";let Dg=null,gd=[];const P0=1e3/60,M0="loadTime",A0="fullLoadTime",SP={mark(u){performance.mark(u)},frame(u){const o=u;Dg!=null&&gd.push(o-Dg),Dg=o},clearMetrics(){Dg=null,gd=[],performance.clearMeasures(M0),performance.clearMeasures(A0);for(const u in c.bd)performance.clearMarks(c.bd[u])},getPerformanceMetrics(){performance.measure(M0,c.bd.create,c.bd.load),performance.measure(A0,c.bd.create,c.bd.fullLoad);const u=performance.getEntriesByName(M0)[0].duration,o=performance.getEntriesByName(A0)[0].duration,h=gd.length,p=1/(gd.reduce((x,w)=>x+w,0)/h/1e3),_=gd.filter(x=>x>P0).reduce((x,w)=>x+(w-P0)/P0,0);return{loadTime:u,fullLoadTime:o,fps:p,percentDroppedFrames:_/(h+_)*100,totalFrames:h}}};c.$=pt,c.A=rf,c.B=function(u){if(We==null){const o=u.navigator?u.navigator.userAgent:null;We=!!u.safari||!(!o||!(/\b(iPad|iPhone|iPod)\b/.test(o)||o.match("Safari")&&!o.match("Chrome")))}return We},c.C=class{constructor(u,o){this.target=u,this.mapId=o,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new pP(()=>this.process()),this.subscription=function(h,p,_,x){return h.addEventListener(p,_,!1),{unsubscribe:()=>{h.removeEventListener(p,_,!1)}}}(this.target,"message",h=>this.receive(h)),this.globalScope=ut(self)?u:window}registerMessageHandler(u,o){this.messageHandlers[u]=o}sendAsync(u,o){return new Promise((h,p)=>{const _=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[_]={resolve:h,reject:p},o&&o.signal.addEventListener("abort",()=>{delete this.resolveRejects[_];const I={id:_,type:"",origin:location.origin,targetMapId:u.targetMapId,sourceMapId:this.mapId};this.target.postMessage(I)},{once:!0});const x=[],w=Object.assign(Object.assign({},u),{id:_,sourceMapId:this.mapId,origin:location.origin,data:Mu(u.data,x)});this.target.postMessage(w,{transfer:x})})}receive(u){const o=u.data,h=o.id;if(!(o.origin!=="file://"&&location.origin!=="file://"&&o.origin!==location.origin||o.targetMapId&&this.mapId!==o.targetMapId)){if(o.type===""){delete this.tasks[h];const p=this.abortControllers[h];return delete this.abortControllers[h],void(p&&p.abort())}if(ut(self)||o.mustQueue)return this.tasks[h]=o,this.taskQueue.push(h),void this.invoker.trigger();this.processTask(h,o)}}process(){if(this.taskQueue.length===0)return;const u=this.taskQueue.shift(),o=this.tasks[u];delete this.tasks[u],this.taskQueue.length>0&&this.invoker.trigger(),o&&this.processTask(u,o)}processTask(u,o){return l(this,void 0,void 0,function*(){if(o.type===""){const _=this.resolveRejects[u];return delete this.resolveRejects[u],_?void(o.error?_.reject(Au(o.error)):_.resolve(Au(o.data))):void 0}if(!this.messageHandlers[o.type])return void this.completeTask(u,new Error(`Could not find a registered handler for ${o.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const h=Au(o.data),p=new AbortController;this.abortControllers[u]=p;try{const _=yield this.messageHandlers[o.type](o.sourceMapId,h,p);this.completeTask(u,null,_)}catch(_){this.completeTask(u,_)}})}completeTask(u,o,h){const p=[];delete this.abortControllers[u];const _={id:u,type:"",sourceMapId:this.mapId,origin:location.origin,error:o?Mu(o):null,data:Mu(h,p)};this.target.postMessage(_,{transfer:p})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},c.D=Nt,c.E=en,c.F=function(){var u=new rf(16);return rf!=Float32Array&&(u[1]=0,u[2]=0,u[3]=0,u[4]=0,u[6]=0,u[7]=0,u[8]=0,u[9]=0,u[11]=0,u[12]=0,u[13]=0,u[14]=0),u[0]=1,u[5]=1,u[10]=1,u[15]=1,u},c.G=pn,c.H=function(u,o,h){var p,_,x,w,I,P,D,O,B,W,X,K,ie=h[0],de=h[1],we=h[2];return o===u?(u[12]=o[0]*ie+o[4]*de+o[8]*we+o[12],u[13]=o[1]*ie+o[5]*de+o[9]*we+o[13],u[14]=o[2]*ie+o[6]*de+o[10]*we+o[14],u[15]=o[3]*ie+o[7]*de+o[11]*we+o[15]):(_=o[1],x=o[2],w=o[3],I=o[4],P=o[5],D=o[6],O=o[7],B=o[8],W=o[9],X=o[10],K=o[11],u[0]=p=o[0],u[1]=_,u[2]=x,u[3]=w,u[4]=I,u[5]=P,u[6]=D,u[7]=O,u[8]=B,u[9]=W,u[10]=X,u[11]=K,u[12]=p*ie+I*de+B*we+o[12],u[13]=_*ie+P*de+W*we+o[13],u[14]=x*ie+D*de+X*we+o[14],u[15]=w*ie+O*de+K*we+o[15]),u},c.I=f0,c.J=function(u,o,h){var p=h[0],_=h[1],x=h[2];return u[0]=o[0]*p,u[1]=o[1]*p,u[2]=o[2]*p,u[3]=o[3]*p,u[4]=o[4]*_,u[5]=o[5]*_,u[6]=o[6]*_,u[7]=o[7]*_,u[8]=o[8]*x,u[9]=o[9]*x,u[10]=o[10]*x,u[11]=o[11]*x,u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15],u},c.K=bb,c.L=function(u,o){const h={};for(let p=0;p{const o=window.document.createElement("video");return o.muted=!0,new Promise(h=>{o.onloadstart=()=>{h(o)};for(const p of u){const _=window.document.createElement("source");ar(p)||(o.crossOrigin="Anonymous"),_.src=p,o.appendChild(_)}})},c.a3=function(){return pe++},c.a4=y,c.a5=cf,c.a6=Oh,c.a7=Xl,c.a8=br,c.a9=wx,c.aA=Y,c.aB=function(u,o){if(!u)return[{command:"setStyle",args:[o]}];let h=[];try{if(!yn(u.version,o.version))return[{command:"setStyle",args:[o]}];yn(u.center,o.center)||h.push({command:"setCenter",args:[o.center]}),yn(u.zoom,o.zoom)||h.push({command:"setZoom",args:[o.zoom]}),yn(u.bearing,o.bearing)||h.push({command:"setBearing",args:[o.bearing]}),yn(u.pitch,o.pitch)||h.push({command:"setPitch",args:[o.pitch]}),yn(u.sprite,o.sprite)||h.push({command:"setSprite",args:[o.sprite]}),yn(u.glyphs,o.glyphs)||h.push({command:"setGlyphs",args:[o.glyphs]}),yn(u.transition,o.transition)||h.push({command:"setTransition",args:[o.transition]}),yn(u.light,o.light)||h.push({command:"setLight",args:[o.light]}),yn(u.terrain,o.terrain)||h.push({command:"setTerrain",args:[o.terrain]}),yn(u.sky,o.sky)||h.push({command:"setSky",args:[o.sky]});const p={},_=[];(function(w,I,P,D){let O;for(O in I=I||{},w=w||{})Object.prototype.hasOwnProperty.call(w,O)&&(Object.prototype.hasOwnProperty.call(I,O)||Cs(O,P,D));for(O in I)Object.prototype.hasOwnProperty.call(I,O)&&(Object.prototype.hasOwnProperty.call(w,O)?yn(w[O],I[O])||(w[O].type==="geojson"&&I[O].type==="geojson"&&tl(w,I,O)?ur(P,{command:"setGeoJSONSourceData",args:[O,I[O].data]}):$s(O,I,P,D)):Uo(O,I,P))})(u.sources,o.sources,_,p);const x=[];u.layers&&u.layers.forEach(w=>{"source"in w&&p[w.source]?h.push({command:"removeLayer",args:[w.id]}):x.push(w)}),h=h.concat(_),function(w,I,P){I=I||[];const D=(w=w||[]).map(zl),O=I.map(zl),B=w.reduce(Ts,{}),W=I.reduce(Ts,{}),X=D.slice(),K=Object.create(null);let ie,de,we,Oe,Ee;for(let ke=0,Qe=0;ke@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(h,p,_,x)=>{const w=_||x;return o[p]=!w||w.toLowerCase(),""}),o["max-age"]){const h=parseInt(o["max-age"],10);isNaN(h)?delete o["max-age"]:o["max-age"]=h}return o},c.ab=function(u,o){const h=[];for(const p in u)p in o||h.push(p);return h},c.ac=te,c.ad=function(u,o,h){var p=Math.sin(h),_=Math.cos(h),x=o[0],w=o[1],I=o[2],P=o[3],D=o[4],O=o[5],B=o[6],W=o[7];return o!==u&&(u[8]=o[8],u[9]=o[9],u[10]=o[10],u[11]=o[11],u[12]=o[12],u[13]=o[13],u[14]=o[14],u[15]=o[15]),u[0]=x*_+D*p,u[1]=w*_+O*p,u[2]=I*_+B*p,u[3]=P*_+W*p,u[4]=D*_-x*p,u[5]=O*_-w*p,u[6]=B*_-I*p,u[7]=W*_-P*p,u},c.ae=function(u){var o=new rf(16);return o[0]=u[0],o[1]=u[1],o[2]=u[2],o[3]=u[3],o[4]=u[4],o[5]=u[5],o[6]=u[6],o[7]=u[7],o[8]=u[8],o[9]=u[9],o[10]=u[10],o[11]=u[11],o[12]=u[12],o[13]=u[13],o[14]=u[14],o[15]=u[15],o},c.af=_g,c.ag=function(u,o){let h=0,p=0;if(u.kind==="constant")p=u.layoutSize;else if(u.kind!=="source"){const{interpolationType:_,minZoom:x,maxZoom:w}=u,I=_?te(Zi.interpolationFactor(_,o,x,w),0,1):0;u.kind==="camera"?p=co.number(u.minSize,u.maxSize,I):h=I}return{uSizeT:h,uSize:p}},c.ai=function(u,{uSize:o,uSizeT:h},{lowerSize:p,upperSize:_}){return u.kind==="source"?p/hl:u.kind==="composite"?co.number(p/hl,_/hl,h):o},c.aj=g0,c.ak=function(u,o,h,p){const _=o.y-u.y,x=o.x-u.x,w=p.y-h.y,I=p.x-h.x,P=w*x-I*_;if(P===0)return null;const D=(I*(u.y-h.y)-w*(u.x-h.x))/P;return new E(u.x+D*x,u.y+D*_)},c.al=Cx,c.am=Kp,c.an=Yy,c.ao=bi,c.aq=m0,c.ar=function(u,o){var h=o[0],p=o[1],_=o[2],x=o[3],w=o[4],I=o[5],P=o[6],D=o[7],O=o[8],B=o[9],W=o[10],X=o[11],K=o[12],ie=o[13],de=o[14],we=o[15],Oe=h*I-p*w,Ee=h*P-_*w,ke=h*D-x*w,Qe=p*P-_*I,et=p*D-x*I,St=_*D-x*P,kt=O*ie-B*K,wt=O*de-W*K,bt=O*we-X*K,ht=B*de-W*ie,Tt=B*we-X*ie,_t=W*we-X*de,it=Oe*_t-Ee*Tt+ke*ht+Qe*bt-et*wt+St*kt;return it?(u[0]=(I*_t-P*Tt+D*ht)*(it=1/it),u[1]=(_*Tt-p*_t-x*ht)*it,u[2]=(ie*St-de*et+we*Qe)*it,u[3]=(W*et-B*St-X*Qe)*it,u[4]=(P*bt-w*_t-D*wt)*it,u[5]=(h*_t-_*bt+x*wt)*it,u[6]=(de*ke-K*St-we*Ee)*it,u[7]=(O*St-W*ke+X*Ee)*it,u[8]=(w*Tt-I*bt+D*kt)*it,u[9]=(p*bt-h*Tt-x*kt)*it,u[10]=(K*et-ie*ke+we*Oe)*it,u[11]=(B*ke-O*et-X*Oe)*it,u[12]=(I*wt-w*ht-P*kt)*it,u[13]=(h*ht-p*wt+_*kt)*it,u[14]=(ie*Ee-K*Qe-de*Oe)*it,u[15]=(O*Qe-B*Ee+W*Oe)*it,u):null},c.as=E0,c.at=d0,c.au=I0,c.av=function(){const u={},o=Re.$version;for(const h in Re.$root){const p=Re.$root[h];if(p.required){let _=null;_=h==="version"?o:p.type==="array"?[]:{},_!=null&&(u[h]=_)}}return u},c.aw=rg,c.ax=zr,c.ay=function(u){u=u.slice();const o=Object.create(null);for(let h=0;hit*bi)}let wt=w?"center":h.get("text-justify").evaluate(D,{},u.canonical);const bt=h.get("symbol-placement"),ht=bt==="point"?h.get("text-max-width").evaluate(D,{},u.canonical)*bi:0,Tt=()=>{u.bucket.allowVerticalPlacement&&ku(ke)&&(K.vertical=Eg(ie,u.glyphMap,u.glyphPositions,u.imagePositions,O,ht,x,St,"left",et,we,c.ah.vertical,!0,bt,W,B))};if(!w&&kt){const _t=new Set;if(wt==="auto")for(let jt=0;jtl(void 0,void 0,void 0,function*(){if(u.byteLength===0)return createImageBitmap(new ImageData(1,1));const o=new Blob([new Uint8Array(u)],{type:"image/png"});try{return createImageBitmap(o)}catch(h){throw new Error(`Could not load image because of ${h.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),c.e=fe,c.f=u=>new Promise((o,h)=>{const p=new Image;p.onload=()=>{o(p),URL.revokeObjectURL(p.src),p.onload=null,window.requestAnimationFrame(()=>{p.src=Gt})},p.onerror=()=>h(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const _=new Blob([new Uint8Array(u)],{type:"image/png"});p.src=u.byteLength?URL.createObjectURL(_):Gt}),c.g=_n,c.h=(u,o)=>Pn(fe(u,{type:"json"}),o),c.i=ut,c.j=dt,c.k=Me,c.l=(u,o)=>Pn(fe(u,{type:"arrayBuffer"}),o),c.m=Pn,c.n=function(u){return new c0(u).readFields(JL,[])},c.o=rd,c.p=ex,c.q=Co,c.r=Wy,c.s=ar,c.t=Pu,c.u=xt,c.v=Re,c.w=Ke,c.x=ql,c.y=function([u,o,h]){return o+=90,o*=Math.PI/180,h*=Math.PI/180,{x:u*Math.cos(o)*Math.sin(h),y:u*Math.sin(o)*Math.sin(h),z:u*Math.cos(h)}},c.z=co}),i("worker",["./shared"],function(c){class l{constructor(q){this.keyCache={},q&&this.replace(q)}replace(q){this._layerConfigs={},this._layers={},this.update(q,[])}update(q,Z){for(const le of q){this._layerConfigs[le.id]=le;const Te=this._layers[le.id]=c.az(le);Te._featureFilter=c.a6(Te.filter),this.keyCache[le.id]&&delete this.keyCache[le.id]}for(const le of Z)delete this.keyCache[le],delete this._layerConfigs[le],delete this._layers[le];this.familiesBySource={};const J=c.bh(Object.values(this._layerConfigs),this.keyCache);for(const le of J){const Te=le.map(Ye=>this._layers[Ye.id]),Q=Te[0];if(Q.visibility==="none")continue;const Pe=Q.source||"";let Se=this.familiesBySource[Pe];Se||(Se=this.familiesBySource[Pe]={});const Ne=Q.sourceLayer||"_geojsonTileLayer";let qe=Se[Ne];qe||(qe=Se[Ne]=[]),qe.push(Te)}}}class d{constructor(q){const Z={},J=[];for(const Pe in q){const Se=q[Pe],Ne=Z[Pe]={};for(const qe in Se){const Ye=Se[+qe];if(!Ye||Ye.bitmap.width===0||Ye.bitmap.height===0)continue;const Je={x:0,y:0,w:Ye.bitmap.width+2,h:Ye.bitmap.height+2};J.push(Je),Ne[qe]={rect:Je,metrics:Ye.metrics}}}const{w:le,h:Te}=c.p(J),Q=new c.o({width:le||1,height:Te||1});for(const Pe in q){const Se=q[Pe];for(const Ne in Se){const qe=Se[+Ne];if(!qe||qe.bitmap.width===0||qe.bitmap.height===0)continue;const Ye=Z[Pe][Ne].rect;c.o.copy(qe.bitmap,Q,{x:0,y:0},{x:Ye.x+1,y:Ye.y+1},qe.bitmap)}}this.image=Q,this.positions=Z}}c.bi("GlyphAtlas",d);class v{constructor(q){this.tileID=new c.Q(q.tileID.overscaledZ,q.tileID.wrap,q.tileID.canonical.z,q.tileID.canonical.x,q.tileID.canonical.y),this.uid=q.uid,this.zoom=q.zoom,this.pixelRatio=q.pixelRatio,this.tileSize=q.tileSize,this.source=q.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=q.showCollisionBoxes,this.collectResourceTiming=!!q.collectResourceTiming,this.returnDependencies=!!q.returnDependencies,this.promoteId=q.promoteId,this.inFlightDependencies=[]}parse(q,Z,J,le){return c._(this,void 0,void 0,function*(){this.status="parsing",this.data=q,this.collisionBoxArray=new c.a4;const Te=new c.bj(Object.keys(q.layers).sort()),Q=new c.bk(this.tileID,this.promoteId);Q.bucketLayerIDs=[];const Pe={},Se={featureIndex:Q,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:J},Ne=Z.familiesBySource[this.source];for(const dn in Ne){const Fr=q.layers[dn];if(!Fr)continue;Fr.version===1&&c.w(`Vector tile source "${this.source}" layer "${dn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const _i=Te.encode(dn),uo=[];for(let So=0;So=Pi.maxzoom||Pi.visibility!=="none"&&(S(So,this.zoom,J),(Pe[Pi.id]=Pi.createBucket({index:Q.bucketLayerIDs.length,layers:So,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_i,sourceID:this.source})).populate(uo,Se,this.tileID.canonical),Q.bucketLayerIDs.push(So.map(Ks=>Ks.id)))}}const qe=c.aE(Se.glyphDependencies,dn=>Object.keys(dn).map(Number));this.inFlightDependencies.forEach(dn=>dn==null?void 0:dn.abort()),this.inFlightDependencies=[];let Ye=Promise.resolve({});if(Object.keys(qe).length){const dn=new AbortController;this.inFlightDependencies.push(dn),Ye=le.sendAsync({type:"GG",data:{stacks:qe,source:this.source,tileID:this.tileID,type:"glyphs"}},dn)}const Je=Object.keys(Se.iconDependencies);let Dt=Promise.resolve({});if(Je.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Dt=le.sendAsync({type:"GI",data:{icons:Je,source:this.source,tileID:this.tileID,type:"icons"}},dn)}const zt=Object.keys(Se.patternDependencies);let Qt=Promise.resolve({});if(zt.length){const dn=new AbortController;this.inFlightDependencies.push(dn),Qt=le.sendAsync({type:"GI",data:{icons:zt,source:this.source,tileID:this.tileID,type:"patterns"}},dn)}const[tn,Mn,er]=yield Promise.all([Ye,Dt,Qt]),vr=new d(tn),ci=new c.bl(Mn,er);for(const dn in Pe){const Fr=Pe[dn];Fr instanceof c.a5?(S(Fr.layers,this.zoom,J),c.bm({bucket:Fr,glyphMap:tn,glyphPositions:vr.positions,imageMap:Mn,imagePositions:ci.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Fr.hasPattern&&(Fr instanceof c.bn||Fr instanceof c.bo||Fr instanceof c.bp)&&(S(Fr.layers,this.zoom,J),Fr.addFeatures(Se,this.tileID.canonical,ci.patternPositions))}return this.status="done",{buckets:Object.values(Pe).filter(dn=>!dn.isEmpty()),featureIndex:Q,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:vr.image,imageAtlas:ci,glyphMap:this.returnDependencies?tn:null,iconMap:this.returnDependencies?Mn:null,glyphPositions:this.returnDependencies?vr.positions:null}})}}function S(me,q,Z){const J=new c.a8(q);for(const le of me)le.recalculate(J,Z)}class E{constructor(q,Z,J){this.actor=q,this.layerIndex=Z,this.availableImages=J,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=yield c.l(q.request,Z);try{return{vectorTile:new c.bq.VectorTile(new c.br(J.data)),rawData:J.data,cacheControl:J.cacheControl,expires:J.expires}}catch(le){const Te=new Uint8Array(J.data);let Q=`Unable to parse the tile at ${q.request.url}, `;throw Q+=Te[0]===31&&Te[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${le.messge}`,new Error(Q)}})}loadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid,J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request),le=new v(q);this.loading[Z]=le;const Te=new AbortController;le.abort=Te;try{const Q=yield this.loadVectorTile(q,Te);if(delete this.loading[Z],!Q)return null;const Pe=Q.rawData,Se={};Q.expires&&(Se.expires=Q.expires),Q.cacheControl&&(Se.cacheControl=Q.cacheControl);const Ne={};if(J){const Ye=J.finish();Ye&&(Ne.resourceTiming=JSON.parse(JSON.stringify(Ye)))}le.vectorTile=Q.vectorTile;const qe=le.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Z]=le,this.fetching[Z]={rawTileData:Pe,cacheControl:Se,resourceTiming:Ne};try{const Ye=yield qe;return c.e({rawTileData:Pe.slice(0)},Ye,Se,Ne)}finally{delete this.fetching[Z]}}catch(Q){throw delete this.loading[Z],le.status="done",this.loaded[Z]=le,Q}})}reloadTile(q){return c._(this,void 0,void 0,function*(){const Z=q.uid;if(!this.loaded||!this.loaded[Z])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const J=this.loaded[Z];if(J.showCollisionBoxes=q.showCollisionBoxes,J.status==="parsing"){const le=yield J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor);let Te;if(this.fetching[Z]){const{rawTileData:Q,cacheControl:Pe,resourceTiming:Se}=this.fetching[Z];delete this.fetching[Z],Te=c.e({rawTileData:Q.slice(0)},le,Pe,Se)}else Te=le;return Te}if(J.status==="done"&&J.vectorTile)return J.parse(J.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(q){return c._(this,void 0,void 0,function*(){const Z=this.loading,J=q.uid;Z&&Z[J]&&Z[J].abort&&(Z[J].abort.abort(),delete Z[J])})}removeTile(q){return c._(this,void 0,void 0,function*(){this.loaded&&this.loaded[q.uid]&&delete this.loaded[q.uid]})}}class C{constructor(){this.loaded={}}loadTile(q){return c._(this,void 0,void 0,function*(){const{uid:Z,encoding:J,rawImageData:le,redFactor:Te,greenFactor:Q,blueFactor:Pe,baseShift:Se}=q,Ne=le.width+2,qe=le.height+2,Ye=c.b(le)?new c.R({width:Ne,height:qe},yield c.bt(le,-1,-1,Ne,qe)):le,Je=new c.bu(Z,Ye,J,Te,Q,Pe,Se);return this.loaded=this.loaded||{},this.loaded[Z]=Je,Je})}removeTile(q){const Z=this.loaded,J=q.uid;Z&&Z[J]&&delete Z[J]}}function M(me,q){if(me.length!==0){k(me[0],q);for(var Z=1;Z=Math.abs(Pe)?Z-Se+Pe:Pe-Se+Z,Z=Se}Z+J>=0!=!!q&&me.reverse()}var R=c.bv(function me(q,Z){var J,le=q&&q.type;if(le==="FeatureCollection")for(J=0;J>31}function tt(me,q){for(var Z=me.loadGeometry(),J=me.type,le=0,Te=0,Q=Z.length,Pe=0;Peme},Gt=Math.fround||(vt=new Float32Array(1),me=>(vt[0]=+me,vt[0]));var vt;const At=3,Pt=5,rn=6;class wn{constructor(q){this.options=Object.assign(Object.create(Ot),q),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(q){const{log:Z,minZoom:J,maxZoom:le}=this.options;Z&&console.time("total time");const Te=`prepare ${q.length} points`;Z&&console.time(Te),this.points=q;const Q=[];for(let Se=0;Se=J;Se--){const Ne=+Date.now();Pe=this.trees[Se]=this._createTree(this._cluster(Pe,Se)),Z&&console.log("z%d: %d clusters in %dms",Se,Pe.numItems,+Date.now()-Ne)}return Z&&console.timeEnd("total time"),this}getClusters(q,Z){let J=((q[0]+180)%360+360)%360-180;const le=Math.max(-90,Math.min(90,q[1]));let Te=q[2]===180?180:((q[2]+180)%360+360)%360-180;const Q=Math.max(-90,Math.min(90,q[3]));if(q[2]-q[0]>=360)J=-180,Te=180;else if(J>Te){const Ye=this.getClusters([J,le,180,Q],Z),Je=this.getClusters([-180,le,Te,Q],Z);return Ye.concat(Je)}const Pe=this.trees[this._limitZoom(Z)],Se=Pe.range(pn(J),Yn(Q),pn(Te),Yn(le)),Ne=Pe.data,qe=[];for(const Ye of Se){const Je=this.stride*Ye;qe.push(Ne[Je+Pt]>1?fn(Ne,Je,this.clusterProps):this.points[Ne[Je+At]])}return qe}getChildren(q){const Z=this._getOriginId(q),J=this._getOriginZoom(q),le="No cluster with the specified id.",Te=this.trees[J];if(!Te)throw new Error(le);const Q=Te.data;if(Z*this.stride>=Q.length)throw new Error(le);const Pe=this.options.radius/(this.options.extent*Math.pow(2,J-1)),Se=Te.within(Q[Z*this.stride],Q[Z*this.stride+1],Pe),Ne=[];for(const qe of Se){const Ye=qe*this.stride;Q[Ye+4]===q&&Ne.push(Q[Ye+Pt]>1?fn(Q,Ye,this.clusterProps):this.points[Q[Ye+At]])}if(Ne.length===0)throw new Error(le);return Ne}getLeaves(q,Z,J){const le=[];return this._appendLeaves(le,q,Z=Z||10,J=J||0,0),le}getTile(q,Z,J){const le=this.trees[this._limitZoom(q)],Te=Math.pow(2,q),{extent:Q,radius:Pe}=this.options,Se=Pe/Q,Ne=(J-Se)/Te,qe=(J+1+Se)/Te,Ye={features:[]};return this._addTileFeatures(le.range((Z-Se)/Te,Ne,(Z+1+Se)/Te,qe),le.data,Z,J,Te,Ye),Z===0&&this._addTileFeatures(le.range(1-Se/Te,Ne,1,qe),le.data,Te,J,Te,Ye),Z===Te-1&&this._addTileFeatures(le.range(0,Ne,Se/Te,qe),le.data,-1,J,Te,Ye),Ye.features.length?Ye:null}getClusterExpansionZoom(q){let Z=this._getOriginZoom(q)-1;for(;Z<=this.options.maxZoom;){const J=this.getChildren(q);if(Z++,J.length!==1)break;q=J[0].properties.cluster_id}return Z}_appendLeaves(q,Z,J,le,Te){const Q=this.getChildren(Z);for(const Pe of Q){const Se=Pe.properties;if(Se&&Se.cluster?Te+Se.point_count<=le?Te+=Se.point_count:Te=this._appendLeaves(q,Se.cluster_id,J,le,Te):Te1;let qe,Ye,Je;if(Ne)qe=_n(Z,Se,this.clusterProps),Ye=Z[Se],Je=Z[Se+1];else{const Qt=this.points[Z[Se+At]];qe=Qt.properties;const[tn,Mn]=Qt.geometry.coordinates;Ye=pn(tn),Je=Yn(Mn)}const Dt={type:1,geometry:[[Math.round(this.options.extent*(Ye*Te-J)),Math.round(this.options.extent*(Je*Te-le))]],tags:qe};let zt;zt=Ne||this.options.generateId?Z[Se+At]:this.points[Z[Se+At]].id,zt!==void 0&&(Dt.id=zt),Q.features.push(Dt)}}_limitZoom(q){return Math.max(this.options.minZoom,Math.min(Math.floor(+q),this.options.maxZoom+1))}_cluster(q,Z){const{radius:J,extent:le,reduce:Te,minPoints:Q}=this.options,Pe=J/(le*Math.pow(2,Z)),Se=q.data,Ne=[],qe=this.stride;for(let Ye=0;YeZ&&(tn+=Se[er+Pt])}if(tn>Qt&&tn>=Q){let Mn,er=Je*Qt,vr=Dt*Qt,ci=-1;const dn=((Ye/qe|0)<<5)+(Z+1)+this.points.length;for(const Fr of zt){const _i=Fr*qe;if(Se[_i+2]<=Z)continue;Se[_i+2]=Z;const uo=Se[_i+Pt];er+=Se[_i]*uo,vr+=Se[_i+1]*uo,Se[_i+4]=dn,Te&&(Mn||(Mn=this._map(Se,Ye,!0),ci=this.clusterProps.length,this.clusterProps.push(Mn)),Te(Mn,this._map(Se,_i)))}Se[Ye+4]=dn,Ne.push(er/tn,vr/tn,1/0,dn,-1,tn),Te&&Ne.push(ci)}else{for(let Mn=0;Mn1)for(const Mn of zt){const er=Mn*qe;if(!(Se[er+2]<=Z)){Se[er+2]=Z;for(let vr=0;vr>5}_getOriginZoom(q){return(q-this.points.length)%32}_map(q,Z,J){if(q[Z+Pt]>1){const Q=this.clusterProps[q[Z+rn]];return J?Object.assign({},Q):Q}const le=this.points[q[Z+At]].properties,Te=this.options.map(le);return J&&Te===le?Object.assign({},Te):Te}}function fn(me,q,Z){return{type:"Feature",id:me[q+At],properties:_n(me,q,Z),geometry:{type:"Point",coordinates:[(J=me[q],360*(J-.5)),zr(me[q+1])]}};var J}function _n(me,q,Z){const J=me[q+Pt],le=J>=1e4?`${Math.round(J/1e3)}k`:J>=1e3?Math.round(J/100)/10+"k":J,Te=me[q+rn],Q=Te===-1?{}:Object.assign({},Z[Te]);return Object.assign(Q,{cluster:!0,cluster_id:me[q+At],point_count:J,point_count_abbreviated:le})}function pn(me){return me/360+.5}function Yn(me){const q=Math.sin(me*Math.PI/180),Z=.5-.25*Math.log((1+q)/(1-q))/Math.PI;return Z<0?0:Z>1?1:Z}function zr(me){const q=(180-360*me)*Math.PI/180;return 360*Math.atan(Math.exp(q))/Math.PI-90}function Pn(me,q,Z,J){for(var le,Te=J,Q=Z-q>>1,Pe=Z-q,Se=me[q],Ne=me[q+1],qe=me[Z],Ye=me[Z+1],Je=q+3;JeTe)le=Je,Te=Dt;else if(Dt===Te){var zt=Math.abs(Je-Q);ztJ&&(le-q>3&&Pn(me,q,le,J),me[le+2]=Te,Z-le>3&&Pn(me,le,Z,J))}function ar(me,q,Z,J,le,Te){var Q=le-Z,Pe=Te-J;if(Q!==0||Pe!==0){var Se=((me-Z)*Q+(q-J)*Pe)/(Q*Q+Pe*Pe);Se>1?(Z=le,J=Te):Se>0&&(Z+=Q*Se,J+=Pe*Se)}return(Q=me-Z)*Q+(Pe=q-J)*Pe}function Zn(me,q,Z,J){var le={id:me===void 0?null:me,type:q,geometry:Z,tags:J,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Te){var Q=Te.geometry,Pe=Te.type;if(Pe==="Point"||Pe==="MultiPoint"||Pe==="LineString")ne(Te,Q);else if(Pe==="Polygon"||Pe==="MultiLineString")for(var Se=0;Se0&&(Q+=J?(le*Ne-Se*Te)/2:Math.sqrt(Math.pow(Se-le,2)+Math.pow(Ne-Te,2))),le=Se,Te=Ne}var qe=q.length-3;q[2]=1,Pn(q,0,qe,Z),q[qe+2]=1,q.size=Math.abs(Q),q.start=0,q.end=q.size}function Re(me,q,Z,J){for(var le=0;le1?1:Z}function yn(me,q,Z,J,le,Te,Q,Pe){if(J/=q,Te>=(Z/=q)&&Q=J)return null;for(var Se=[],Ne=0;Ne=Z&&zt=J)){var Qt=[];if(Je==="Point"||Je==="MultiPoint")ur(Ye,Qt,Z,J,le);else if(Je==="LineString")Uo(Ye,Qt,Z,J,le,!1,Pe.lineMetrics);else if(Je==="MultiLineString")$s(Ye,Qt,Z,J,le,!1);else if(Je==="Polygon")$s(Ye,Qt,Z,J,le,!0);else if(Je==="MultiPolygon")for(var tn=0;tn=Z&&Q<=J&&(q.push(me[Te]),q.push(me[Te+1]),q.push(me[Te+2]))}}function Uo(me,q,Z,J,le,Te,Q){for(var Pe,Se,Ne=Cs(me),qe=le===0?Bi:zl,Ye=me.start,Je=0;JeZ&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),Q&&(Ne.start=Ye+Pe*Se)):er>J?vr=Z&&(Se=qe(Ne,Dt,zt,tn,Mn,Z),ci=!0),vr>J&&er<=J&&(Se=qe(Ne,Dt,zt,tn,Mn,J),ci=!0),!Te&&ci&&(Q&&(Ne.end=Ye+Pe*Se),q.push(Ne),Ne=Cs(me)),Q&&(Ye+=Pe)}var dn=me.length-3;Dt=me[dn],zt=me[dn+1],Qt=me[dn+2],(er=le===0?Dt:zt)>=Z&&er<=J&&tl(Ne,Dt,zt,Qt),dn=Ne.length-3,Te&&dn>=3&&(Ne[dn]!==Ne[0]||Ne[dn+1]!==Ne[1])&&tl(Ne,Ne[0],Ne[1],Ne[2]),Ne.length&&q.push(Ne)}function Cs(me){var q=[];return q.size=me.size,q.start=me.start,q.end=me.end,q}function $s(me,q,Z,J,le,Te){for(var Q=0;QQ.maxX&&(Q.maxX=qe),Ye>Q.maxY&&(Q.maxY=Ye)}return Q}function ui(me,q,Z,J){var le=q.geometry,Te=q.type,Q=[];if(Te==="Point"||Te==="MultiPoint")for(var Pe=0;Pe0&&q.size<(le?Q:J))Z.numPoints+=q.length/3;else{for(var Pe=[],Se=0;SeQ)&&(Z.numSimplified++,Pe.push(q[Se]),Pe.push(q[Se+1])),Z.numPoints++;le&&function(Ne,qe){for(var Ye=0,Je=0,Dt=Ne.length,zt=Dt-2;Je0===qe)for(Je=0,Dt=Ne.length;Je
    24)throw new Error("maxZoom should be in the 0-24 range");if(q.promoteId&&q.generateId)throw new Error("promoteId and generateId cannot be used together.");var J=function(le,Te){var Q=[];if(le.type==="FeatureCollection")for(var Pe=0;Pe1&&console.time("creation"),Je=this.tiles[Ye]=Fl(me,q,Z,J,Se),this.tileCoords.push({z:q,x:Z,y:J}),Ne)){Ne>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",q,Z,J,Je.numFeatures,Je.numPoints,Je.numSimplified),console.timeEnd("creation"));var Dt="z"+q;this.stats[Dt]=(this.stats[Dt]||0)+1,this.total++}if(Je.source=me,le){if(q===Se.maxZoom||q===le)continue;var zt=1<1&&console.time("clipping");var Qt,tn,Mn,er,vr,ci,dn=.5*Se.buffer/Se.extent,Fr=.5-dn,_i=.5+dn,uo=1+dn;Qt=tn=Mn=er=null,vr=yn(me,qe,Z-dn,Z+_i,0,Je.minX,Je.maxX,Se),ci=yn(me,qe,Z+Fr,Z+uo,0,Je.minX,Je.maxX,Se),me=null,vr&&(Qt=yn(vr,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),tn=yn(vr,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),vr=null),ci&&(Mn=yn(ci,qe,J-dn,J+_i,1,Je.minY,Je.maxY,Se),er=yn(ci,qe,J+Fr,J+uo,1,Je.minY,Je.maxY,Se),ci=null),Ne>1&&console.timeEnd("clipping"),Pe.push(Qt||[],q+1,2*Z,2*J),Pe.push(tn||[],q+1,2*Z,2*J+1),Pe.push(Mn||[],q+1,2*Z+1,2*J),Pe.push(er||[],q+1,2*Z+1,2*J+1)}}},ln.prototype.getTile=function(me,q,Z){var J=this.options,le=J.extent,Te=J.debug;if(me<0||me>24)return null;var Q=1<1&&console.log("drilling down to z%d-%d-%d",me,q,Z);for(var Se,Ne=me,qe=q,Ye=Z;!Se&&Ne>0;)Ne--,qe=Math.floor(qe/2),Ye=Math.floor(Ye/2),Se=this.tiles[sn(Ne,qe,Ye)];return Se&&Se.source?(Te>1&&console.log("found parent tile z%d-%d-%d",Ne,qe,Ye),Te>1&&console.time("drilling down"),this.splitTile(Se.source,Ne,qe,Ye,me,q,Z),Te>1&&console.timeEnd("drilling down"),this.tiles[Pe]?ls(this.tiles[Pe],le):null):null};class Aa extends E{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(q,Z){return c._(this,void 0,void 0,function*(){const J=q.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const le=this._geoJSONIndex.getTile(J.z,J.x,J.y);if(!le)return null;const Te=new class{constructor(Pe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=c.W,this.length=Pe.length,this._features=Pe}feature(Pe){return new class{constructor(Se){this._feature=Se,this.extent=c.W,this.type=Se.type,this.properties=Se.tags,"id"in Se&&!isNaN(Se.id)&&(this.id=parseInt(Se.id,10))}loadGeometry(){if(this._feature.type===1){const Se=[];for(const Ne of this._feature.geometry)Se.push([new c.P(Ne[0],Ne[1])]);return Se}{const Se=[];for(const Ne of this._feature.geometry){const qe=[];for(const Ye of Ne)qe.push(new c.P(Ye[0],Ye[1]));Se.push(qe)}return Se}}toGeoJSON(Se,Ne,qe){return z.call(this,Se,Ne,qe)}}(this._features[Pe])}}(le.features);let Q=We(Te);return Q.byteOffset===0&&Q.byteLength===Q.buffer.byteLength||(Q=new Uint8Array(Q)),{vectorTile:Te,rawData:Q.buffer}})}loadData(q){return c._(this,void 0,void 0,function*(){var Z;(Z=this._pendingRequest)===null||Z===void 0||Z.abort();const J=!!(q&&q.request&&q.request.collectResourceTiming)&&new c.bs(q.request);this._pendingRequest=new AbortController;try{let le=yield this.loadGeoJSON(q,this._pendingRequest);if(delete this._pendingRequest,typeof le!="object")throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(R(le,!0),q.filter){const Q=c.by(q.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Q.result==="error")throw new Error(Q.value.map(Se=>`${Se.key}: ${Se.message}`).join(", "));le={type:"FeatureCollection",features:le.features.filter(Se=>Q.value.evaluate({zoom:0},Se))}}this._geoJSONIndex=q.cluster?new wn(function({superclusterOptions:Q,clusterProperties:Pe}){if(!Pe||!Q)return Q;const Se={},Ne={},qe={accumulated:null,zoom:0},Ye={properties:null},Je=Object.keys(Pe);for(const Dt of Je){const[zt,Qt]=Pe[Dt],tn=c.by(Qt),Mn=c.by(typeof zt=="string"?[zt,["accumulated"],["get",Dt]]:zt);Se[Dt]=tn.value,Ne[Dt]=Mn.value}return Q.map=Dt=>{Ye.properties=Dt;const zt={};for(const Qt of Je)zt[Qt]=Se[Qt].evaluate(qe,Ye);return zt},Q.reduce=(Dt,zt)=>{Ye.properties=zt;for(const Qt of Je)qe.accumulated=Dt[Qt],Dt[Qt]=Ne[Qt].evaluate(qe,Ye)},Q}(q)).load(le.features):function(Q,Pe){return new ln(Q,Pe)}(le,q.geojsonVtOptions),this.loaded={};const Te={};if(J){const Q=J.finish();Q&&(Te.resourceTiming={},Te.resourceTiming[q.source]=JSON.parse(JSON.stringify(Q)))}return Te}catch(le){if(delete this._pendingRequest,c.bz(le))return{abandoned:!0};throw le}})}reloadTile(q){const Z=this.loaded;return Z&&Z[q.uid]?super.reloadTile(q):this.loadTile(q)}loadGeoJSON(q,Z){return c._(this,void 0,void 0,function*(){const{promoteId:J}=q;if(q.request){const le=yield c.h(q.request,Z);return this._dataUpdateable=us(le.data,J)?on(le.data,J):void 0,le.data}if(typeof q.data=="string")try{const le=JSON.parse(q.data);return this._dataUpdateable=us(le,J)?on(le,J):void 0,le}catch{throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`)}if(!q.dataDiff)throw new Error(`Input data given to '${q.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${q.source}`);return function(le,Te,Q){var Pe,Se,Ne,qe;if(Te.removeAll&&le.clear(),Te.remove)for(const Ye of Te.remove)le.delete(Ye);if(Te.add)for(const Ye of Te.add){const Je=Hr(Ye,Q);Je!=null&&le.set(Je,Ye)}if(Te.update)for(const Ye of Te.update){let Je=le.get(Ye.id);if(Je==null)continue;const Dt=!Ye.removeAllProperties&&(((Pe=Ye.removeProperties)===null||Pe===void 0?void 0:Pe.length)>0||((Se=Ye.addOrUpdateProperties)===null||Se===void 0?void 0:Se.length)>0);if((Ye.newGeometry||Ye.removeAllProperties||Dt)&&(Je=Object.assign({},Je),le.set(Ye.id,Je),Dt&&(Je.properties=Object.assign({},Je.properties))),Ye.newGeometry&&(Je.geometry=Ye.newGeometry),Ye.removeAllProperties)Je.properties={};else if(((Ne=Ye.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0)for(const zt of Ye.removeProperties)Object.prototype.hasOwnProperty.call(Je.properties,zt)&&delete Je.properties[zt];if(((qe=Ye.addOrUpdateProperties)===null||qe===void 0?void 0:qe.length)>0)for(const{key:zt,value:Qt}of Ye.addOrUpdateProperties)Je.properties[zt]=Qt}}(this._dataUpdateable,q.dataDiff,J),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(q){return c._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(q){return this._geoJSONIndex.getClusterExpansionZoom(q.clusterId)}getClusterChildren(q){return this._geoJSONIndex.getChildren(q.clusterId)}getClusterLeaves(q){return this._geoJSONIndex.getLeaves(q.clusterId,q.limit,q.offset)}}class Jr{constructor(q){this.self=q,this.actor=new c.C(q),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Z,J)=>{if(this.externalWorkerSourceTypes[Z])throw new Error(`Worker source with name "${Z}" already registered.`);this.externalWorkerSourceTypes[Z]=J},this.self.addProtocol=c.bf,this.self.removeProtocol=c.bg,this.self.registerRTLTextPlugin=Z=>{if(c.bA.isParsed())throw new Error("RTL text plugin already registered.");c.bA.setMethods(Z)},this.actor.registerMessageHandler("LDT",(Z,J)=>this._getDEMWorkerSource(Z,J.source).loadTile(J)),this.actor.registerMessageHandler("RDT",(Z,J)=>c._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Z,J.source).removeTile(J)})),this.actor.registerMessageHandler("GCEZ",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterExpansionZoom(J)})),this.actor.registerMessageHandler("GCC",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterChildren(J)})),this.actor.registerMessageHandler("GCL",(Z,J)=>c._(this,void 0,void 0,function*(){return this._getWorkerSource(Z,J.type,J.source).getClusterLeaves(J)})),this.actor.registerMessageHandler("LD",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadData(J)),this.actor.registerMessageHandler("LT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).loadTile(J)),this.actor.registerMessageHandler("RT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).reloadTile(J)),this.actor.registerMessageHandler("AT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).abortTile(J)),this.actor.registerMessageHandler("RMT",(Z,J)=>this._getWorkerSource(Z,J.type,J.source).removeTile(J)),this.actor.registerMessageHandler("RS",(Z,J)=>c._(this,void 0,void 0,function*(){if(!this.workerSources[Z]||!this.workerSources[Z][J.type]||!this.workerSources[Z][J.type][J.source])return;const le=this.workerSources[Z][J.type][J.source];delete this.workerSources[Z][J.type][J.source],le.removeSource!==void 0&&le.removeSource(J)})),this.actor.registerMessageHandler("RM",Z=>c._(this,void 0,void 0,function*(){delete this.layerIndexes[Z],delete this.availableImages[Z],delete this.workerSources[Z],delete this.demWorkerSources[Z]})),this.actor.registerMessageHandler("SR",(Z,J)=>c._(this,void 0,void 0,function*(){this.referrer=J})),this.actor.registerMessageHandler("SRPS",(Z,J)=>this._syncRTLPluginState(Z,J)),this.actor.registerMessageHandler("IS",(Z,J)=>c._(this,void 0,void 0,function*(){this.self.importScripts(J)})),this.actor.registerMessageHandler("SI",(Z,J)=>this._setImages(Z,J)),this.actor.registerMessageHandler("UL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).update(J.layers,J.removedIds)})),this.actor.registerMessageHandler("SL",(Z,J)=>c._(this,void 0,void 0,function*(){this._getLayerIndex(Z).replace(J)}))}_setImages(q,Z){return c._(this,void 0,void 0,function*(){this.availableImages[q]=Z;for(const J in this.workerSources[q]){const le=this.workerSources[q][J];for(const Te in le)le[Te].availableImages=Z}})}_syncRTLPluginState(q,Z){return c._(this,void 0,void 0,function*(){if(c.bA.isParsed())return c.bA.getState();if(Z.pluginStatus!=="loading")return c.bA.setState(Z),Z;const J=Z.pluginURL;if(this.self.importScripts(J),c.bA.isParsed()){const le={pluginStatus:"loaded",pluginURL:J};return c.bA.setState(le),le}throw c.bA.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${J}`)})}_getAvailableImages(q){let Z=this.availableImages[q];return Z||(Z=[]),Z}_getLayerIndex(q){let Z=this.layerIndexes[q];return Z||(Z=this.layerIndexes[q]=new l),Z}_getWorkerSource(q,Z,J){if(this.workerSources[q]||(this.workerSources[q]={}),this.workerSources[q][Z]||(this.workerSources[q][Z]={}),!this.workerSources[q][Z][J]){const le={sendAsync:(Te,Q)=>(Te.targetMapId=q,this.actor.sendAsync(Te,Q))};switch(Z){case"vector":this.workerSources[q][Z][J]=new E(le,this._getLayerIndex(q),this._getAvailableImages(q));break;case"geojson":this.workerSources[q][Z][J]=new Aa(le,this._getLayerIndex(q),this._getAvailableImages(q));break;default:this.workerSources[q][Z][J]=new this.externalWorkerSourceTypes[Z](le,this._getLayerIndex(q),this._getAvailableImages(q))}}return this.workerSources[q][Z][J]}_getDEMWorkerSource(q,Z){return this.demWorkerSources[q]||(this.demWorkerSources[q]={}),this.demWorkerSources[q][Z]||(this.demWorkerSources[q][Z]=new C),this.demWorkerSources[q][Z]}}return c.i(self)&&(self.worker=new Jr(self)),Jr}),i("index",["exports","./shared"],function(c,l){var d="4.1.3";let v,S;const E={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:y=>new Promise((a,f)=>{const m=requestAnimationFrame(a);y.signal.addEventListener("abort",()=>{cancelAnimationFrame(m),f(l.c())})}),getImageData(y,a=0){return this.getImageCanvasContext(y).getImageData(-a,-a,y.width+2*a,y.height+2*a)},getImageCanvasContext(y){const a=window.document.createElement("canvas"),f=a.getContext("2d",{willReadFrequently:!0});if(!f)throw new Error("failed to create canvas 2d context");return a.width=y.width,a.height=y.height,f.drawImage(y,0,0,y.width,y.height),f},resolveURL:y=>(v||(v=document.createElement("a")),v.href=y,v.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(S==null&&(S=matchMedia("(prefers-reduced-motion: reduce)")),S.matches)}};class C{static testProp(a){if(!C.docStyle)return a[0];for(let f=0;f{window.removeEventListener("click",C.suppressClickInternal,!0)},0)}static getScale(a){const f=a.getBoundingClientRect();return{x:f.width/a.offsetWidth||1,y:f.height/a.offsetHeight||1,boundingClientRect:f}}static getPoint(a,f,m){const g=f.boundingClientRect;return new l.P((m.clientX-g.left)/f.x-a.clientLeft,(m.clientY-g.top)/f.y-a.clientTop)}static mousePos(a,f){const m=C.getScale(a);return C.getPoint(a,m,f)}static touchPos(a,f){const m=[],g=C.getScale(a);for(let b=0;b{a=[],f=0,m=0,g={}},y.addThrottleControl=A=>{const N=m++;return g[N]=A,N},y.removeThrottleControl=A=>{delete g[A],T()},y.getImage=(A,N,V=!0)=>new Promise((j,$)=>{M.supported&&(A.headers||(A.headers={}),A.headers.accept="image/webp,*/*"),l.e(A,{type:"image"}),a.push({abortController:N,requestParameters:A,supportImageRefresh:V,state:"queued",onError:he=>{$(he)},onSuccess:he=>{j(he)}}),T()});const b=A=>l._(this,void 0,void 0,function*(){A.state="running";const{requestParameters:N,supportImageRefresh:V,onError:j,onSuccess:$,abortController:he}=A,ce=V===!1&&!l.i(self)&&!l.g(N.url)&&(!N.headers||Object.keys(N.headers).reduce((Ie,Be)=>Ie&&Be==="accept",!0));f++;const ge=ce?L(N,he):l.m(N,he);try{const Ie=yield ge;delete A.abortController,A.state="completed",Ie.data instanceof HTMLImageElement||l.b(Ie.data)?$(Ie):Ie.data&&$({data:yield(re=Ie.data,typeof createImageBitmap=="function"?l.d(re):l.f(re)),cacheControl:Ie.cacheControl,expires:Ie.expires})}catch(Ie){delete A.abortController,j(Ie)}finally{f--,T()}var re}),T=()=>{const A=(()=>{for(const N of Object.keys(g))if(g[N]())return!0;return!1})()?l.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:l.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let N=f;N0;N++){const V=a.shift();V.abortController.signal.aborted?N--:b(V)}},L=(A,N)=>new Promise((V,j)=>{const $=new Image,he=A.url,ce=A.credentials;ce&&ce==="include"?$.crossOrigin="use-credentials":(ce&&ce==="same-origin"||!l.s(he))&&($.crossOrigin="anonymous"),N.signal.addEventListener("abort",()=>{$.src="",j(l.c())}),$.fetchPriority="high",$.onload=()=>{$.onerror=$.onload=null,V({data:$})},$.onerror=()=>{$.onerror=$.onload=null,N.signal.aborted||j(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},$.src=he})}(G||(G={})),G.resetRequestQueue();class H{constructor(a){this._transformRequestFn=a}transformRequest(a,f){return this._transformRequestFn&&this._transformRequestFn(a,f)||{url:a}}normalizeSpriteURL(a,f,m){const g=function(b){const T=b.match(te);if(!T)throw new Error(`Unable to parse URL "${b}"`);return{protocol:T[1],authority:T[2],path:T[3]||"/",params:T[4]?T[4].split("&"):[]}}(a);return g.path+=`${f}${m}`,function(b){const T=b.params.length?`?${b.params.join("&")}`:"";return`${b.protocol}://${b.authority}${b.path}${T}`}(g)}setTransformRequest(a){this._transformRequestFn=a}}const te=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function ee(y){var a=new l.A(3);return a[0]=y[0],a[1]=y[1],a[2]=y[2],a}var fe,pe=function(y,a,f){return y[0]=a[0]-f[0],y[1]=a[1]-f[1],y[2]=a[2]-f[2],y};fe=new l.A(3),l.A!=Float32Array&&(fe[0]=0,fe[1]=0,fe[2]=0);var se=function(y){var a=y[0],f=y[1];return a*a+f*f};function Ae(y){const a=[];if(typeof y=="string")a.push({id:"default",url:y});else if(y&&y.length>0){const f=[];for(const{id:m,url:g}of y){const b=`${m}${g}`;f.indexOf(b)===-1&&(f.push(b),a.push({id:m,url:g}))}}return a}(function(){var y=new l.A(2);l.A!=Float32Array&&(y[0]=0,y[1]=0)})();class Y{constructor(a,f,m,g){this.context=a,this.format=m,this.texture=a.gl.createTexture(),this.update(f,g)}update(a,f,m){const{width:g,height:b}=a,T=!(this.size&&this.size[0]===g&&this.size[1]===b||m),{context:L}=this,{gl:A}=L;if(this.useMipmap=!!(f&&f.useMipmap),A.bindTexture(A.TEXTURE_2D,this.texture),L.pixelStoreUnpackFlipY.set(!1),L.pixelStoreUnpack.set(1),L.pixelStoreUnpackPremultiplyAlpha.set(this.format===A.RGBA&&(!f||f.premultiply!==!1)),T)this.size=[g,b],a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,A.UNSIGNED_BYTE,a):A.texImage2D(A.TEXTURE_2D,0,this.format,g,b,0,this.format,A.UNSIGNED_BYTE,a.data);else{const{x:N,y:V}=m||{x:0,y:0};a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof HTMLVideoElement||a instanceof ImageData||l.b(a)?A.texSubImage2D(A.TEXTURE_2D,0,N,V,A.RGBA,A.UNSIGNED_BYTE,a):A.texSubImage2D(A.TEXTURE_2D,0,N,V,g,b,A.RGBA,A.UNSIGNED_BYTE,a.data)}this.useMipmap&&this.isSizePowerOfTwo()&&A.generateMipmap(A.TEXTURE_2D)}bind(a,f,m){const{context:g}=this,{gl:b}=g;b.bindTexture(b.TEXTURE_2D,this.texture),m!==b.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(m=b.LINEAR),a!==this.filter&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,a),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,m||a),this.filter=a),f!==this.wrap&&(b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,f),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,f),this.wrap=f)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:a}=this.context;a.deleteTexture(this.texture),this.texture=null}}function ae(y){const{userImage:a}=y;return!!(a&&a.render&&a.render())&&(y.data.replace(new Uint8Array(a.data.buffer)),!0)}class Ke extends l.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(a){if(this.loaded!==a&&(this.loaded=a,a)){for(const{ids:f,promiseResolve:m}of this.requestors)m(this._getImagesForIds(f));this.requestors=[]}}getImage(a){const f=this.images[a];if(f&&!f.data&&f.spriteData){const m=f.spriteData;f.data=new l.R({width:m.width,height:m.height},m.context.getImageData(m.x,m.y,m.width,m.height).data),f.spriteData=null}return f}addImage(a,f){if(this.images[a])throw new Error(`Image id ${a} already exist, use updateImage instead`);this._validate(a,f)&&(this.images[a]=f)}_validate(a,f){let m=!0;const g=f.data||f.spriteData;return this._validateStretch(f.stretchX,g&&g.width)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchX" value`))),m=!1),this._validateStretch(f.stretchY,g&&g.height)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "stretchY" value`))),m=!1),this._validateContent(f.content,f)||(this.fire(new l.j(new Error(`Image "${a}" has invalid "content" value`))),m=!1),m}_validateStretch(a,f){if(!a)return!0;let m=0;for(const g of a){if(g[0]{let g=!0;if(!this.isLoaded())for(const b of a)this.images[b]||(g=!1);this.isLoaded()||g?f(this._getImagesForIds(a)):this.requestors.push({ids:a,promiseResolve:f})})}_getImagesForIds(a){const f={};for(const m of a){let g=this.getImage(m);g||(this.fire(new l.k("styleimagemissing",{id:m})),g=this.getImage(m)),g?f[m]={data:g.data.clone(),pixelRatio:g.pixelRatio,sdf:g.sdf,version:g.version,stretchX:g.stretchX,stretchY:g.stretchY,content:g.content,hasRenderCallback:!!(g.userImage&&g.userImage.render)}:l.w(`Image "${m}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return f}getPixelSize(){const{width:a,height:f}=this.atlasImage;return{width:a,height:f}}getPattern(a){const f=this.patterns[a],m=this.getImage(a);if(!m)return null;if(f&&f.position.version===m.version)return f.position;if(f)f.position.version=m.version;else{const g={w:m.data.width+2,h:m.data.height+2,x:0,y:0},b=new l.I(g,m);this.patterns[a]={bin:g,position:b}}return this._updatePatternAtlas(),this.patterns[a].position}bind(a){const f=a.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new Y(a,this.atlasImage,f.RGBA),this.atlasTexture.bind(f.LINEAR,f.CLAMP_TO_EDGE)}_updatePatternAtlas(){const a=[];for(const b in this.patterns)a.push(this.patterns[b].bin);const{w:f,h:m}=l.p(a),g=this.atlasImage;g.resize({width:f||1,height:m||1});for(const b in this.patterns){const{bin:T}=this.patterns[b],L=T.x+1,A=T.y+1,N=this.getImage(b).data,V=N.width,j=N.height;l.R.copy(N,g,{x:0,y:0},{x:L,y:A},{width:V,height:j}),l.R.copy(N,g,{x:0,y:j-1},{x:L,y:A-1},{width:V,height:1}),l.R.copy(N,g,{x:0,y:0},{x:L,y:A+j},{width:V,height:1}),l.R.copy(N,g,{x:V-1,y:0},{x:L-1,y:A},{width:1,height:j}),l.R.copy(N,g,{x:0,y:0},{x:L+V,y:A},{width:1,height:j})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(a){for(const f of a){if(this.callbackDispatchedThisFrame[f])continue;this.callbackDispatchedThisFrame[f]=!0;const m=this.getImage(f);m||l.w(`Image with ID: "${f}" was not found`),ae(m)&&this.updateImage(f,m)}}}const Le=1e20;function tt(y,a,f,m,g,b,T,L,A){for(let N=a;N-1);A++,b[A]=L,T[A]=N,T[A+1]=Le}for(let L=0,A=0;L65535)throw new Error("glyphs > 65535 not supported");if(m.ranges[b])return{stack:a,id:f,glyph:g};if(!this.url)throw new Error("glyphsUrl is not set");if(!m.requests[b]){const L=We.loadGlyphRange(a,b,this.url,this.requestManager);m.requests[b]=L}const T=yield m.requests[b];for(const L in T)this._doesCharSupportLocalGlyph(+L)||(m.glyphs[+L]=T[+L]);return m.ranges[b]=!0,{stack:a,id:f,glyph:T[f]||null}})}_doesCharSupportLocalGlyph(a){return!!this.localIdeographFontFamily&&(l.u["CJK Unified Ideographs"](a)||l.u["Hangul Syllables"](a)||l.u.Hiragana(a)||l.u.Katakana(a))}_tinySDF(a,f,m){const g=this.localIdeographFontFamily;if(!g||!this._doesCharSupportLocalGlyph(m))return;let b=a.tinySDF;if(!b){let L="400";/bold/i.test(f)?L="900":/medium/i.test(f)?L="500":/light/i.test(f)&&(L="200"),b=a.tinySDF=new We.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:g,fontWeight:L})}const T=b.draw(String.fromCharCode(m));return{id:m,bitmap:new l.o({width:T.width||60,height:T.height||60},T.data),metrics:{width:T.glyphWidth/2||24,height:T.glyphHeight/2||24,left:T.glyphLeft/2+.5||0,top:T.glyphTop/2-27.5||-8,advance:T.glyphAdvance/2||24,isDoubleResolution:!0}}}}We.loadGlyphRange=function(y,a,f,m){return l._(this,void 0,void 0,function*(){const g=256*a,b=g+255,T=m.transformRequest(f.replace("{fontstack}",y).replace("{range}",`${g}-${b}`),"Glyphs"),L=yield l.l(T,new AbortController);if(!L||!L.data)throw new Error(`Could not load glyph range. range: ${a}, ${g}-${b}`);const A={};for(const N of l.n(L.data))A[N.id]=N;return A})},We.TinySDF=class{constructor({fontSize:y=24,buffer:a=3,radius:f=8,cutoff:m=.25,fontFamily:g="sans-serif",fontWeight:b="normal",fontStyle:T="normal"}={}){this.buffer=a,this.cutoff=m,this.radius=f;const L=this.size=y+4*a,A=this._createCanvas(L),N=this.ctx=A.getContext("2d",{willReadFrequently:!0});N.font=`${T} ${b} ${y}px ${g}`,N.textBaseline="alphabetic",N.textAlign="left",N.fillStyle="black",this.gridOuter=new Float64Array(L*L),this.gridInner=new Float64Array(L*L),this.f=new Float64Array(L),this.z=new Float64Array(L+1),this.v=new Uint16Array(L)}_createCanvas(y){const a=document.createElement("canvas");return a.width=a.height=y,a}draw(y){const{width:a,actualBoundingBoxAscent:f,actualBoundingBoxDescent:m,actualBoundingBoxLeft:g,actualBoundingBoxRight:b}=this.ctx.measureText(y),T=Math.ceil(f),L=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(b-g))),A=Math.min(this.size-this.buffer,T+Math.ceil(m)),N=L+2*this.buffer,V=A+2*this.buffer,j=Math.max(N*V,0),$=new Uint8ClampedArray(j),he={data:$,width:N,height:V,glyphWidth:L,glyphHeight:A,glyphTop:T,glyphLeft:0,glyphAdvance:a};if(L===0||A===0)return he;const{ctx:ce,buffer:ge,gridInner:re,gridOuter:Ie}=this;ce.clearRect(ge,ge,L,A),ce.fillText(y,ge,ge+T);const Be=ce.getImageData(ge,ge,L,A);Ie.fill(Le,0,j),re.fill(0,0,j);for(let ve=0;ve0?$e*$e:0,re[He]=$e<0?$e*$e:0}}tt(Ie,0,0,N,V,N,this.f,this.v,this.z),tt(re,ge,ge,L,A,N,this.f,this.v,this.z);for(let ve=0;ve1&&(A=a[++L]);const V=Math.abs(N-A.left),j=Math.abs(N-A.right),$=Math.min(V,j);let he;const ce=b/m*(g+1);if(A.isDash){const ge=g-Math.abs(ce);he=Math.sqrt($*$+ge*ge)}else he=g-Math.sqrt($*$+ce*ce);this.data[T+N]=Math.max(0,Math.min(255,he+128))}}}addRegularDash(a){for(let L=a.length-1;L>=0;--L){const A=a[L],N=a[L+1];A.zeroLength?a.splice(L,1):N&&N.isDash===A.isDash&&(N.left=A.left,a.splice(L,1))}const f=a[0],m=a[a.length-1];f.isDash===m.isDash&&(f.left=m.left-this.width,m.right=f.right+this.width);const g=this.width*this.nextRow;let b=0,T=a[b];for(let L=0;L1&&(T=a[++b]);const A=Math.abs(L-T.left),N=Math.abs(L-T.right),V=Math.min(A,N);this.data[g+L]=Math.max(0,Math.min(255,(T.isDash?V:-V)+128))}}addDash(a,f){const m=f?7:0,g=2*m+1;if(this.nextRow+g>this.height)return l.w("LineAtlas out of space"),null;let b=0;for(let L=0;L{f.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Pt]}numActive(){return Object.keys(this.active).length}}const wn=Math.floor(E.hardwareConcurrency/2);let fn,_n;function pn(){return fn||(fn=new rn),fn}rn.workerCount=l.B(globalThis)?Math.max(Math.min(wn,3),1):1;class Yn{constructor(a,f){this.workerPool=a,this.actors=[],this.currentActor=0,this.id=f;const m=this.workerPool.acquire(f);for(let g=0;g{f.remove()}),this.actors=[],a&&this.workerPool.release(this.id)}registerMessageHandler(a,f){for(const m of this.actors)m.registerMessageHandler(a,f)}}function zr(){return _n||(_n=new Yn(pn(),l.G),_n.registerMessageHandler("GR",(y,a,f)=>l.m(a,f))),_n}function Pn(y,a){const f=l.F();return l.H(f,f,[1,1,0]),l.J(f,f,[.5*y.width,.5*y.height,1]),l.K(f,f,y.calculatePosMatrix(a.toUnwrapped()))}function ar(y,a,f,m,g,b){const T=function(j,$,he){if(j)for(const ce of j){const ge=$[ce];if(ge&&ge.source===he&&ge.type==="fill-extrusion")return!0}else for(const ce in $){const ge=$[ce];if(ge.source===he&&ge.type==="fill-extrusion")return!0}return!1}(g&&g.layers,a,y.id),L=b.maxPitchScaleFactor(),A=y.tilesIn(m,L,T);A.sort(Zn);const N=[];for(const j of A)N.push({wrappedTileID:j.tileID.wrapped().key,queryResults:j.tile.queryRenderedFeatures(a,f,y._state,j.queryGeometry,j.cameraQueryGeometry,j.scale,g,b,L,Pn(y.transform,j.tileID))});const V=function(j){const $={},he={};for(const ce of j){const ge=ce.queryResults,re=ce.wrappedTileID,Ie=he[re]=he[re]||{};for(const Be in ge){const ve=ge[Be],De=Ie[Be]=Ie[Be]||{},Ve=$[Be]=$[Be]||[];for(const He of ve)De[He.featureIndex]||(De[He.featureIndex]=!0,Ve.push(He))}}return $}(N);for(const j in V)V[j].forEach($=>{const he=$.feature,ce=y.getFeatureState(he.layer["source-layer"],he.id);he.source=he.layer.source,he.layer["source-layer"]&&(he.sourceLayer=he.layer["source-layer"]),he.state=ce});return V}function Zn(y,a){const f=y.tileID,m=a.tileID;return f.overscaledZ-m.overscaledZ||f.canonical.y-m.canonical.y||f.wrap-m.wrap||f.canonical.x-m.canonical.x}function ne(y,a,f){return l._(this,void 0,void 0,function*(){let m=y;if(y.url?m=(yield l.h(a.transformRequest(y.url,"Source"),f)).data:yield E.frameAsync(f),!m)return null;const g=l.L(l.e(m,y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in m&&m.vector_layers&&(g.vectorLayerIds=m.vector_layers.map(b=>b.id)),g})}class Me{constructor(a,f){a&&(f?this.setSouthWest(a).setNorthEast(f):Array.isArray(a)&&(a.length===4?this.setSouthWest([a[0],a[1]]).setNorthEast([a[2],a[3]]):this.setSouthWest(a[0]).setNorthEast(a[1])))}setNorthEast(a){return this._ne=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}setSouthWest(a){return this._sw=a instanceof l.M?new l.M(a.lng,a.lat):l.M.convert(a),this}extend(a){const f=this._sw,m=this._ne;let g,b;if(a instanceof l.M)g=a,b=a;else{if(!(a instanceof Me))return Array.isArray(a)?a.length===4||a.every(Array.isArray)?this.extend(Me.convert(a)):this.extend(l.M.convert(a)):a&&("lng"in a||"lon"in a)&&"lat"in a?this.extend(l.M.convert(a)):this;if(g=a._sw,b=a._ne,!g||!b)return this}return f||m?(f.lng=Math.min(g.lng,f.lng),f.lat=Math.min(g.lat,f.lat),m.lng=Math.max(b.lng,m.lng),m.lat=Math.max(b.lat,m.lat)):(this._sw=new l.M(g.lng,g.lat),this._ne=new l.M(b.lng,b.lat)),this}getCenter(){return new l.M((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new l.M(this.getWest(),this.getNorth())}getSouthEast(){return new l.M(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(a){const{lng:f,lat:m}=l.M.convert(a);let g=this._sw.lng<=f&&f<=this._ne.lng;return this._sw.lng>this._ne.lng&&(g=this._sw.lng>=f&&f>=this._ne.lng),this._sw.lat<=m&&m<=this._ne.lat&&g}static convert(a){return a instanceof Me?a:a&&new Me(a)}static fromLngLat(a,f=0){const m=360*f/40075017,g=m/Math.cos(Math.PI/180*a.lat);return new Me(new l.M(a.lng-g,a.lat-m),new l.M(a.lng+g,a.lat+m))}}class dt{constructor(a,f,m){this.bounds=Me.convert(this.validateBounds(a)),this.minzoom=f||0,this.maxzoom=m||24}validateBounds(a){return Array.isArray(a)&&a.length===4?[Math.max(-180,a[0]),Math.max(-90,a[1]),Math.min(180,a[2]),Math.min(90,a[3])]:[-180,-90,180,90]}contains(a){const f=Math.pow(2,a.z),m=Math.floor(l.N(this.bounds.getWest())*f),g=Math.floor(l.O(this.bounds.getNorth())*f),b=Math.ceil(l.N(this.bounds.getEast())*f),T=Math.ceil(l.O(this.bounds.getSouth())*f);return a.x>=m&&a.x=g&&a.y{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return l.e({},this._options)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m={request:this.map._requestManager.transformRequest(f,"Tile"),uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,tileSize:this.tileSize*a.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};m.request.collectResourceTiming=this._collectResourceTiming;let g="RT";if(a.actor&&a.state!=="expired"){if(a.state==="loading")return new Promise((b,T)=>{a.reloadPromise={resolve:b,reject:T}})}else a.actor=this.dispatcher.getActor(),g="LT";a.abortController=new AbortController;try{const b=yield a.actor.sendAsync({type:g,data:m},a.abortController);if(delete a.abortController,a.aborted)return;this._afterTileLoadWorkerResponse(a,b)}catch(b){if(delete a.abortController,a.aborted)return;if(b&&b.status!==404)throw b;this._afterTileLoadWorkerResponse(a,null)}})}_afterTileLoadWorkerResponse(a,f){if(f&&f.resourceTiming&&(a.resourceTiming=f.resourceTiming),f&&this.map._refreshExpiredTiles&&a.setExpiryData(f),a.loadVectorData(f,this.map.painter),a.reloadPromise){const m=a.reloadPromise;a.reloadPromise=null,this.loadTile(a).then(m.resolve).catch(m.reject)}}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.actor&&(yield a.actor.sendAsync({type:"AT",data:{uid:a.uid,type:this.type,source:this.id}}))})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),a.actor&&(yield a.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Re extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.setEventedParent(g),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.e({type:"raster"},f),l.e(this,l.L(f,["url","scheme","tileSize"]))}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const a=yield ne(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,a&&(l.e(this,a),a.bounds&&(this.tileBounds=new dt(a.bounds,this.minzoom,this.maxzoom)),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})))}catch(a){this._tileJSONRequest=null,this.fire(new l.j(a))}})}loaded(){return this._loaded}onAdd(a){this.map=a,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(a){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),a(),this.load()}setTiles(a){return this.setSourceProperty(()=>{this._options.tiles=a}),this}setUrl(a){return this.setSourceProperty(()=>{this.url=a,this._options.url=a}),this}serialize(){return l.e({},this._options)}hasTile(a){return!this.tileBounds||this.tileBounds.contains(a.canonical)}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);a.abortController=new AbortController;try{const m=yield G.getImage(this.map._requestManager.transformRequest(f,"Tile"),a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(m&&m.data){this.map._refreshExpiredTiles&&m.cacheControl&&m.expires&&a.setExpiryData({cacheControl:m.cacheControl,expires:m.expires});const g=this.map.painter.context,b=g.gl,T=m.data;a.texture=this.map.painter.getTileTexture(T.width),a.texture?a.texture.update(T,{useMipmap:!0}):(a.texture=new Y(g,T,b.RGBA,{useMipmap:!0}),a.texture.bind(b.LINEAR,b.CLAMP_TO_EDGE,b.LINEAR_MIPMAP_NEAREST),g.extTextureFilterAnisotropic&&b.texParameterf(b.TEXTURE_2D,g.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,g.extTextureFilterAnisotropicMax)),a.state="loaded"}}catch(m){if(delete a.abortController,a.aborted)a.state="unloaded";else if(m)throw a.state="errored",m}})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController)})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.texture&&this.map.painter.saveTileTexture(a.texture)})}hasTransition(){return!1}}class It extends Re{constructor(a,f,m,g){super(a,f,m,g),this.type="raster-dem",this.maxzoom=22,this._options=l.e({type:"raster-dem"},f),this.encoding=f.encoding||"mapbox",this.redFactor=f.redFactor,this.greenFactor=f.greenFactor,this.blueFactor=f.blueFactor,this.baseShift=f.baseShift}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),m=this.map._requestManager.transformRequest(f,"Tile");a.neighboringTiles=this._getNeighboringTiles(a.tileID),a.abortController=new AbortController;try{const g=yield G.getImage(m,a.abortController,this.map._refreshExpiredTiles);if(delete a.abortController,a.aborted)return void(a.state="unloaded");if(g&&g.data){const b=g.data;this.map._refreshExpiredTiles&&g.cacheControl&&g.expires&&a.setExpiryData({cacheControl:g.cacheControl,expires:g.expires});const T=l.b(b)&&l.S()?b:yield this.readImageNow(b),L={type:this.type,uid:a.uid,source:this.id,rawImageData:T,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!a.actor||a.state==="expired"){a.actor=this.dispatcher.getActor();const A=yield a.actor.sendAsync({type:"LDT",data:L});a.dem=A,a.needsHillshadePrepare=!0,a.needsTerrainPrepare=!0,a.state="loaded"}}}catch(g){if(delete a.abortController,a.aborted)a.state="unloaded";else if(g)throw a.state="errored",g}})}readImageNow(a){return l._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&l.U()){const f=a.width+2,m=a.height+2;try{return new l.R({width:f,height:m},yield l.V(a,-1,-1,f,m))}catch{}}return E.getImageData(a,1)})}_getNeighboringTiles(a){const f=a.canonical,m=Math.pow(2,f.z),g=(f.x-1+m)%m,b=f.x===0?a.wrap-1:a.wrap,T=(f.x+1+m)%m,L=f.x+1===m?a.wrap+1:a.wrap,A={};return A[new l.Q(a.overscaledZ,b,f.z,g,f.y).key]={backfilled:!1},A[new l.Q(a.overscaledZ,L,f.z,T,f.y).key]={backfilled:!1},f.y>0&&(A[new l.Q(a.overscaledZ,b,f.z,g,f.y-1).key]={backfilled:!1},A[new l.Q(a.overscaledZ,a.wrap,f.z,f.x,f.y-1).key]={backfilled:!1},A[new l.Q(a.overscaledZ,L,f.z,T,f.y-1).key]={backfilled:!1}),f.y+10&&l.e(b,{resourceTiming:g}),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"metadata"}))),this.fire(new l.k("data",Object.assign(Object.assign({},b),{sourceDataType:"content"})))}catch(m){if(this._pendingLoads--,this._removed)return void this.fire(new l.k("dataabort",{dataType:"source"}));this.fire(new l.j(m))}})}loaded(){return this._pendingLoads===0}loadTile(a){return l._(this,void 0,void 0,function*(){const f=a.actor?"RT":"LT";a.actor=this.actor;const m={type:this.type,uid:a.uid,tileID:a.tileID,zoom:a.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};a.abortController=new AbortController;const g=yield this.actor.sendAsync({type:f,data:m},a.abortController);delete a.abortController,a.unloadVectorData(),a.aborted||a.loadVectorData(g,this.map.painter,f==="RT")})}abortTile(a){return l._(this,void 0,void 0,function*(){a.abortController&&(a.abortController.abort(),delete a.abortController),a.aborted=!0})}unloadTile(a){return l._(this,void 0,void 0,function*(){a.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:a.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return l.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var yn=l.X([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ur extends l.E{constructor(a,f,m,g){super(),this.id=a,this.dispatcher=m,this.coordinates=f.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(g),this.options=f}load(a){return l._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new l.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const f=yield G.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,f&&f.data&&(this.image=f.data,a&&(this.coordinates=a),this._finishLoading())}catch(f){this._request=null,this._loaded=!0,this.fire(new l.j(f))}})}loaded(){return this._loaded}updateImage(a){return a.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=a.url,this.load(a.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(a){this.map=a,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(a){this.coordinates=a;const f=a.map(l.Y.fromLngLat);this.tileID=function(g){let b=1/0,T=1/0,L=-1/0,A=-1/0;for(const $ of g)b=Math.min(b,$.x),T=Math.min(T,$.y),L=Math.max(L,$.x),A=Math.max(A,$.y);const N=Math.max(L-b,A-T),V=Math.max(0,Math.floor(-Math.log(N)/Math.LN2)),j=Math.pow(2,V);return new l.a0(V,Math.floor((b+L)/2*j),Math.floor((T+A)/2*j))}(f),this.minzoom=this.maxzoom=this.tileID.z;const m=f.map(g=>this.tileID.getTilePoint(g)._round());return this._boundsArray=new l.Z,this._boundsArray.emplaceBack(m[0].x,m[0].y,0,0),this._boundsArray.emplaceBack(m[1].x,m[1].y,l.W,0),this._boundsArray.emplaceBack(m[3].x,m[3].y,0,l.W),this._boundsArray.emplaceBack(m[2].x,m[2].y,l.W,l.W),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture||(this.texture=new Y(a,this.image,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(a){return l._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(a.tileID.canonical)?(this.tiles[String(a.tileID.wrap)]=a,a.buckets={}):a.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Uo extends ur{constructor(a,f,m,g){super(a,f,m,g),this.roundZoom=!0,this.type="video",this.options=f}load(){return l._(this,void 0,void 0,function*(){this._loaded=!1;const a=this.options;this.urls=[];for(const f of a.urls)this.urls.push(this.map._requestManager.transformRequest(f,"Source").url);try{const f=yield l.a2(this.urls);if(this._loaded=!0,!f)return;this.video=f,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(f){this.fire(new l.j(f))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(a){if(this.video){const f=this.video.seekable;af.end(0)?this.fire(new l.j(new l.a1(`sources.${this.id}`,null,`Playback for this video can be set only between the ${f.start(0)} and ${f.end(0)}-second mark.`))):this.video.currentTime=a}}getVideo(){return this.video}onAdd(a){this.map||(this.map=a,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const a=this.map.painter.context,f=a.gl;this.boundsBuffer||(this.boundsBuffer=a.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE),f.texSubImage2D(f.TEXTURE_2D,0,0,0,f.RGBA,f.UNSIGNED_BYTE,this.video)):(this.texture=new Y(a,this.video,f.RGBA),this.texture.bind(f.LINEAR,f.CLAMP_TO_EDGE));let m=!1;for(const g in this.tiles){const b=this.tiles[g];b.state!=="loaded"&&(b.state="loaded",b.texture=this.texture,m=!0)}m&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Cs extends ur{constructor(a,f,m,g){super(a,f,m,g),f.coordinates?Array.isArray(f.coordinates)&&f.coordinates.length===4&&!f.coordinates.some(b=>!Array.isArray(b)||b.length!==2||b.some(T=>typeof T!="number"))||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "coordinates"'))),f.animate&&typeof f.animate!="boolean"&&this.fire(new l.j(new l.a1(`sources.${a}`,null,'optional "animate" property must be a boolean value'))),f.canvas?typeof f.canvas=="string"||f.canvas instanceof HTMLCanvasElement||this.fire(new l.j(new l.a1(`sources.${a}`,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.j(new l.a1(`sources.${a}`,null,'missing required property "canvas"'))),this.options=f,this.animate=f.animate===void 0||f.animate}load(){return l._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(a){this.map=a,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let a=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,a=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,a=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const f=this.map.painter.context,m=f.gl;this.boundsBuffer||(this.boundsBuffer=f.createVertexBuffer(this._boundsArray,yn.members)),this.boundsSegments||(this.boundsSegments=l.$.simpleSegment(0,0,4,2)),this.texture?(a||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new Y(f,this.canvas,m.RGBA,{premultiply:!0});let g=!1;for(const b in this.tiles){const T=this.tiles[b];T.state!=="loaded"&&(T.state="loaded",T.texture=this.texture,g=!0)}g&&this.fire(new l.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const a of[this.canvas.width,this.canvas.height])if(isNaN(a)||a<=0)return!0;return!1}}const $s={},tl=y=>{switch(y){case"geojson":return Cn;case"image":return ur;case"raster":return Re;case"raster-dem":return It;case"vector":return en;case"video":return Uo;case"canvas":return Cs}return $s[y]},Bi="RTLPluginLoaded";class zl extends l.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=zr()}_syncState(a){return this.status=a,this.dispatcher.broadcast("SRPS",{pluginStatus:a,pluginURL:this.url}).catch(f=>{throw this.status="error",f})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(a){return l._(this,arguments,void 0,function*(f,m=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=E.resolveURL(f),!this.url)throw new Error(`requested url ${f} is invalid`);if(this.status==="unavailable"){if(!m)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return l._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new l.k(Bi))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ts=null;function st(){return Ts||(Ts=new zl),Ts}class ls{constructor(a,f){this.timeAdded=0,this.fadeEndTime=0,this.tileID=a,this.uid=l.a3(),this.uses=0,this.tileSize=f,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(a){const f=a+this.timeAdded;fb.getLayer(N)).filter(Boolean);if(A.length!==0){L.layers=A,L.stateDependentLayerIds&&(L.stateDependentLayers=L.stateDependentLayerIds.map(N=>A.filter(V=>V.id===N)[0]));for(const N of A)T[N.id]=L}}return T}(a.buckets,f.style),this.hasSymbolBuckets=!1;for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5){if(this.hasSymbolBuckets=!0,!m)break;b.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const g in this.buckets){const b=this.buckets[g];if(b instanceof l.a5&&b.hasRTLText){this.hasRTLText=!0,st().lazyLoad();break}}this.queryPadding=0;for(const g in this.buckets){const b=this.buckets[g];this.queryPadding=Math.max(this.queryPadding,f.style.getLayer(g).queryRadius(b))}a.imageAtlas&&(this.imageAtlas=a.imageAtlas),a.glyphAtlasImage&&(this.glyphAtlasImage=a.glyphAtlasImage)}else this.collisionBoxArray=new l.a4}unloadVectorData(){for(const a in this.buckets)this.buckets[a].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(a){return this.buckets[a.id]}upload(a){for(const m in this.buckets){const g=this.buckets[m];g.uploadPending()&&g.upload(a)}const f=a.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Y(a,this.imageAtlas.image,f.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Y(a,this.glyphAtlasImage,f.ALPHA),this.glyphAtlasImage=null)}prepare(a){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(a,this.imageAtlasTexture)}queryRenderedFeatures(a,f,m,g,b,T,L,A,N,V){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:g,cameraQueryGeometry:b,scale:T,tileSize:this.tileSize,pixelPosMatrix:V,transform:A,params:L,queryPadding:this.queryPadding*N},a,f,m):{}}querySourceFeatures(a,f){const m=this.latestFeatureIndex;if(!m||!m.rawTileData)return;const g=m.loadVTLayers(),b=f&&f.sourceLayer?f.sourceLayer:"",T=g._geojsonTileLayer||g[b];if(!T)return;const L=l.a6(f&&f.filter),{z:A,x:N,y:V}=this.tileID.canonical,j={z:A,x:N,y:V};for(let $=0;$m)g=!1;else if(f)if(this.expirationTime{this.remove(a,b)},m)),this.data[g].push(b),this.order.push(g),this.order.length>this.max){const T=this._getAndRemoveByKey(this.order[0]);T&&this.onRemove(T)}return this}has(a){return a.wrapped().key in this.data}getAndRemove(a){return this.has(a)?this._getAndRemoveByKey(a.wrapped().key):null}_getAndRemoveByKey(a){const f=this.data[a].shift();return f.timeout&&clearTimeout(f.timeout),this.data[a].length===0&&delete this.data[a],this.order.splice(this.order.indexOf(a),1),f.value}getByKey(a){const f=this.data[a];return f?f[0].value:null}get(a){return this.has(a)?this.data[a.wrapped().key][0].value:null}remove(a,f){if(!this.has(a))return this;const m=a.wrapped().key,g=f===void 0?0:this.data[m].indexOf(f),b=this.data[m][g];return this.data[m].splice(g,1),b.timeout&&clearTimeout(b.timeout),this.data[m].length===0&&delete this.data[m],this.onRemove(b.value),this.order.splice(this.order.indexOf(m),1),this}setMaxSize(a){for(this.max=a;this.order.length>this.max;){const f=this._getAndRemoveByKey(this.order[0]);f&&this.onRemove(f)}return this}filter(a){const f=[];for(const m in this.data)for(const g of this.data[m])a(g.value)||f.push(g);for(const m of f)this.remove(m.value.tileID,m)}}class Fl{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(a,f,m){const g=String(f);if(this.stateChanges[a]=this.stateChanges[a]||{},this.stateChanges[a][g]=this.stateChanges[a][g]||{},l.e(this.stateChanges[a][g],m),this.deletedStates[a]===null){this.deletedStates[a]={};for(const b in this.state[a])b!==g&&(this.deletedStates[a][b]=null)}else if(this.deletedStates[a]&&this.deletedStates[a][g]===null){this.deletedStates[a][g]={};for(const b in this.state[a][g])m[b]||(this.deletedStates[a][g][b]=null)}else for(const b in m)this.deletedStates[a]&&this.deletedStates[a][g]&&this.deletedStates[a][g][b]===null&&delete this.deletedStates[a][g][b]}removeFeatureState(a,f,m){if(this.deletedStates[a]===null)return;const g=String(f);if(this.deletedStates[a]=this.deletedStates[a]||{},m&&f!==void 0)this.deletedStates[a][g]!==null&&(this.deletedStates[a][g]=this.deletedStates[a][g]||{},this.deletedStates[a][g][m]=null);else if(f!==void 0)if(this.stateChanges[a]&&this.stateChanges[a][g])for(m in this.deletedStates[a][g]={},this.stateChanges[a][g])this.deletedStates[a][g][m]=null;else this.deletedStates[a][g]=null;else this.deletedStates[a]=null}getState(a,f){const m=String(f),g=l.e({},(this.state[a]||{})[m],(this.stateChanges[a]||{})[m]);if(this.deletedStates[a]===null)return{};if(this.deletedStates[a]){const b=this.deletedStates[a][f];if(b===null)return{};for(const T in b)delete g[T]}return g}initializeTileState(a,f){a.setFeatureState(this.state,f)}coalesceChanges(a,f){const m={};for(const g in this.stateChanges){this.state[g]=this.state[g]||{};const b={};for(const T in this.stateChanges[g])this.state[g][T]||(this.state[g][T]={}),l.e(this.state[g][T],this.stateChanges[g][T]),b[T]=this.state[g][T];m[g]=b}for(const g in this.deletedStates){this.state[g]=this.state[g]||{};const b={};if(this.deletedStates[g]===null)for(const T in this.state[g])b[T]={},this.state[g][T]={};else for(const T in this.deletedStates[g]){if(this.deletedStates[g][T]===null)this.state[g][T]={};else for(const L of Object.keys(this.deletedStates[g][T]))delete this.state[g][T][L];b[T]=this.state[g][T]}m[g]=m[g]||{},l.e(m[g],b)}if(this.stateChanges={},this.deletedStates={},Object.keys(m).length!==0)for(const g in a)a[g].setFeatureState(m,f)}}class ui extends l.E{constructor(a,f,m){super(),this.id=a,this.dispatcher=m,this.on("data",g=>this._dataHandler(g)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((g,b,T,L)=>{const A=new(tl(b.type))(g,b,T,L);if(A.id!==g)throw new Error(`Expected Source id to be ${g} instead of ${A.id}`);return A})(a,f,m,this),this._tiles={},this._cache=new lo(0,g=>this._unloadTile(g)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Fl,this._didEmitContent=!1,this._updated=!1}onAdd(a){this.map=a,this._maxTileCacheSize=a?a._maxTileCacheSize:null,this._maxTileCacheZoomLevels=a?a._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(a)}onRemove(a){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(a)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(const a in this._tiles){const f=this._tiles[a];if(f.state!=="loaded"&&f.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const a=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,a&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(a,f,m){return l._(this,void 0,void 0,function*(){try{yield this._source.loadTile(a),this._tileLoaded(a,f,m)}catch(g){a.state="errored",g.status!==404?this._source.fire(new l.j(g,{tile:a})):this.update(this.transform,this.terrain)}})}_unloadTile(a){this._source.unloadTile&&this._source.unloadTile(a)}_abortTile(a){this._source.abortTile&&this._source.abortTile(a),this._source.fire(new l.k("dataabort",{tile:a,coord:a.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(a){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const f in this._tiles){const m=this._tiles[f];m.upload(a),m.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(a=>a.tileID).sort(ft).map(a=>a.key)}getRenderableIds(a){const f=[];for(const m in this._tiles)this._isIdRenderable(m,a)&&f.push(this._tiles[m]);return a?f.sort((m,g)=>{const b=m.tileID,T=g.tileID,L=new l.P(b.canonical.x,b.canonical.y)._rotate(this.transform.angle),A=new l.P(T.canonical.x,T.canonical.y)._rotate(this.transform.angle);return b.overscaledZ-T.overscaledZ||A.y-L.y||A.x-L.x}).map(m=>m.tileID.key):f.map(m=>m.tileID).sort(ft).map(m=>m.key)}hasRenderableParent(a){const f=this.findLoadedParent(a,0);return!!f&&this._isIdRenderable(f.tileID.key)}_isIdRenderable(a,f){return this._tiles[a]&&this._tiles[a].hasData()&&!this._coveredTiles[a]&&(f||!this._tiles[a].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const a in this._tiles)this._tiles[a].state!=="errored"&&this._reloadTile(a,"reloading")}}_reloadTile(a,f){return l._(this,void 0,void 0,function*(){const m=this._tiles[a];m&&(m.state!=="loading"&&(m.state=f),yield this._loadTile(m,a,f))})}_tileLoaded(a,f,m){a.timeAdded=E.now(),m==="expired"&&(a.refreshedUponExpiration=!0),this._setTileReloadTimer(f,a),this.getSource().type==="raster-dem"&&a.dem&&this._backfillDEM(a),this._state.initializeTileState(a,this.map?this.map.painter:null),a.aborted||this._source.fire(new l.k("data",{dataType:"source",tile:a,coord:a.tileID}))}_backfillDEM(a){const f=this.getRenderableIds();for(let g=0;g1||(Math.abs(T)>1&&(Math.abs(T+A)===1?T+=A:Math.abs(T-A)===1&&(T-=A)),b.dem&&g.dem&&(g.dem.backfillBorder(b.dem,T,L),g.neighboringTiles&&g.neighboringTiles[N]&&(g.neighboringTiles[N].backfilled=!0)))}}getTile(a){return this.getTileByID(a.key)}getTileByID(a){return this._tiles[a]}_retainLoadedChildren(a,f,m,g){for(const b in this._tiles){let T=this._tiles[b];if(g[b]||!T.hasData()||T.tileID.overscaledZ<=f||T.tileID.overscaledZ>m)continue;let L=T.tileID;for(;T&&T.tileID.overscaledZ>f+1;){const N=T.tileID.scaledTo(T.tileID.overscaledZ-1);T=this._tiles[N.key],T&&T.hasData()&&(L=N)}let A=L;for(;A.overscaledZ>f;)if(A=A.scaledTo(A.overscaledZ-1),a[A.key]){g[L.key]=L;break}}}findLoadedParent(a,f){if(a.key in this._loadedParentTiles){const m=this._loadedParentTiles[a.key];return m&&m.tileID.overscaledZ>=f?m:null}for(let m=a.overscaledZ-1;m>=f;m--){const g=a.scaledTo(m),b=this._getLoadedTile(g);if(b)return b}}_getLoadedTile(a){const f=this._tiles[a.key];return f&&f.hasData()?f:this._cache.getByKey(a.wrapped().key)}updateCacheSize(a){const f=Math.ceil(a.width/this._source.tileSize)+1,m=Math.ceil(a.height/this._source.tileSize)+1,g=Math.floor(f*m*(this._maxTileCacheZoomLevels===null?l.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),b=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,g):g;this._cache.setMaxSize(b)}handleWrapJump(a){const f=Math.round((a-(this._prevLng===void 0?a:this._prevLng))/360);if(this._prevLng=a,f){const m={};for(const g in this._tiles){const b=this._tiles[g];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+f),m[b.tileID.key]=b}this._tiles=m;for(const g in this._timers)clearTimeout(this._timers[g]),delete this._timers[g];for(const g in this._tiles)this._setTileReloadTimer(g,this._tiles[g])}}update(a,f){if(!this._sourceLoaded||this._paused)return;let m;this.transform=a,this.terrain=f,this.updateCacheSize(a),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?m=a.getVisibleUnwrappedCoordinates(this._source.tileID).map(V=>new l.Q(V.canonical.z,V.wrap,V.canonical.z,V.canonical.x,V.canonical.y)):(m=a.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:f}),this._source.hasTile&&(m=m.filter(V=>this._source.hasTile(V)))):m=[];const g=a.coveringZoomLevel(this._source),b=Math.max(g-ui.maxOverzooming,this._source.minzoom),T=Math.max(g+ui.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const V={};for(const j of m)if(j.canonical.z>this._source.minzoom){const $=j.scaledTo(j.canonical.z-1);V[$.key]=$;const he=j.scaledTo(Math.max(this._source.minzoom,Math.min(j.canonical.z,5)));V[he.key]=he}m=m.concat(Object.values(V))}const L=m.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,L&&this.fire(new l.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const A=this._updateRetainedTiles(m,g);if(ln(this._source.type)){const V={},j={},$=Object.keys(A),he=E.now();for(const ce of $){const ge=A[ce],re=this._tiles[ce];if(!re||re.fadeEndTime!==0&&re.fadeEndTime<=he)continue;const Ie=this.findLoadedParent(ge,b);Ie&&(this._addTile(Ie.tileID),V[Ie.tileID.key]=Ie.tileID),j[ce]=ge}this._retainLoadedChildren(j,g,T,A);for(const ce in V)A[ce]||(this._coveredTiles[ce]=!0,A[ce]=V[ce]);if(f){const ce={},ge={};for(const re of m)this._tiles[re.key].hasData()?ce[re.key]=re:ge[re.key]=re;for(const re in ge){const Ie=ge[re].children(this._source.maxzoom);this._tiles[Ie[0].key]&&this._tiles[Ie[1].key]&&this._tiles[Ie[2].key]&&this._tiles[Ie[3].key]&&(ce[Ie[0].key]=A[Ie[0].key]=Ie[0],ce[Ie[1].key]=A[Ie[1].key]=Ie[1],ce[Ie[2].key]=A[Ie[2].key]=Ie[2],ce[Ie[3].key]=A[Ie[3].key]=Ie[3],delete ge[re])}for(const re in ge){const Ie=this.findLoadedParent(ge[re],this._source.minzoom);if(Ie){ce[Ie.tileID.key]=A[Ie.tileID.key]=Ie.tileID;for(const Be in ce)ce[Be].isChildOf(Ie.tileID)&&delete ce[Be]}}for(const re in this._tiles)ce[re]||(this._coveredTiles[re]=!0)}}for(const V in A)this._tiles[V].clearFadeHold();const N=l.ab(this._tiles,A);for(const V of N){const j=this._tiles[V];j.hasSymbolBuckets&&!j.holdingForFade()?j.setHoldDuration(this.map._fadeDuration):j.hasSymbolBuckets&&!j.symbolFadeFinished()||this._removeTile(V)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const a in this._tiles)this._tiles[a].holdingForFade()&&this._removeTile(a)}_updateRetainedTiles(a,f){const m={},g={},b=Math.max(f-ui.maxOverzooming,this._source.minzoom),T=Math.max(f+ui.maxUnderzooming,this._source.minzoom),L={};for(const A of a){const N=this._addTile(A);m[A.key]=A,N.hasData()||fthis._source.maxzoom){const j=A.children(this._source.maxzoom)[0],$=this.getTile(j);if($&&$.hasData()){m[j.key]=j;continue}}else{const j=A.children(this._source.maxzoom);if(m[j[0].key]&&m[j[1].key]&&m[j[2].key]&&m[j[3].key])continue}let V=N.wasRequested();for(let j=A.overscaledZ-1;j>=b;--j){const $=A.scaledTo(j);if(g[$.key])break;if(g[$.key]=!0,N=this.getTile($),!N&&V&&(N=this._addTile($)),N){const he=N.hasData();if((V||he)&&(m[$.key]=$),V=N.wasRequested(),he)break}}}return m}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const a in this._tiles){const f=[];let m,g=this._tiles[a].tileID;for(;g.overscaledZ>0;){if(g.key in this._loadedParentTiles){m=this._loadedParentTiles[g.key];break}f.push(g.key);const b=g.scaledTo(g.overscaledZ-1);if(m=this._getLoadedTile(b),m)break;g=b}for(const b of f)this._loadedParentTiles[b]=m}}_addTile(a){let f=this._tiles[a.key];if(f)return f;f=this._cache.getAndRemove(a),f&&(this._setTileReloadTimer(a.key,f),f.tileID=a,this._state.initializeTileState(f,this.map?this.map.painter:null),this._cacheTimers[a.key]&&(clearTimeout(this._cacheTimers[a.key]),delete this._cacheTimers[a.key],this._setTileReloadTimer(a.key,f)));const m=f;return f||(f=new ls(a,this._source.tileSize*a.overscaleFactor()),this._loadTile(f,a.key,f.state)),f.uses++,this._tiles[a.key]=f,m||this._source.fire(new l.k("dataloading",{tile:f,coord:f.tileID,dataType:"source"})),f}_setTileReloadTimer(a,f){a in this._timers&&(clearTimeout(this._timers[a]),delete this._timers[a]);const m=f.getExpiryTimeout();m&&(this._timers[a]=setTimeout(()=>{this._reloadTile(a,"expired"),delete this._timers[a]},m))}_removeTile(a){const f=this._tiles[a];f&&(f.uses--,delete this._tiles[a],this._timers[a]&&(clearTimeout(this._timers[a]),delete this._timers[a]),f.uses>0||(f.hasData()&&f.state!=="reloading"?this._cache.add(f.tileID,f,f.getExpiryTimeout()):(f.aborted=!0,this._abortTile(f),this._unloadTile(f))))}_dataHandler(a){const f=a.sourceDataType;a.dataType==="source"&&f==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&a.dataType==="source"&&f==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const a in this._tiles)this._removeTile(a);this._cache.reset()}tilesIn(a,f,m){const g=[],b=this.transform;if(!b)return g;const T=m?b.getCameraQueryGeometry(a):a,L=a.map(ce=>b.pointCoordinate(ce,this.terrain)),A=T.map(ce=>b.pointCoordinate(ce,this.terrain)),N=this.getIds();let V=1/0,j=1/0,$=-1/0,he=-1/0;for(const ce of A)V=Math.min(V,ce.x),j=Math.min(j,ce.y),$=Math.max($,ce.x),he=Math.max(he,ce.y);for(let ce=0;ce=0&&ve[1].y+Be>=0){const De=L.map(He=>re.getTilePoint(He)),Ve=A.map(He=>re.getTilePoint(He));g.push({tile:ge,tileID:re,queryGeometry:De,cameraQueryGeometry:Ve,scale:Ie})}}return g}getVisibleCoordinates(a){const f=this.getRenderableIds(a).map(m=>this._tiles[m].tileID);for(const m of f)m.posMatrix=this.transform.calculatePosMatrix(m.toUnwrapped());return f}hasTransition(){if(this._source.hasTransition())return!0;if(ln(this._source.type)){const a=E.now();for(const f in this._tiles)if(this._tiles[f].fadeEndTime>=a)return!0}return!1}setFeatureState(a,f,m){this._state.updateState(a=a||"_geojsonTileLayer",f,m)}removeFeatureState(a,f,m){this._state.removeFeatureState(a=a||"_geojsonTileLayer",f,m)}getFeatureState(a,f){return this._state.getState(a=a||"_geojsonTileLayer",f)}setDependencies(a,f,m){const g=this._tiles[a];g&&g.setDependencies(f,m)}reloadTilesForDependencies(a,f){for(const m in this._tiles)this._tiles[m].hasDependency(a,f)&&this._reloadTile(m,"reloading");this._cache.filter(m=>!m.hasDependency(a,f))}}function ft(y,a){const f=Math.abs(2*y.wrap)-+(y.wrap<0),m=Math.abs(2*a.wrap)-+(a.wrap<0);return y.overscaledZ-a.overscaledZ||m-f||a.canonical.y-y.canonical.y||a.canonical.x-y.canonical.x}function ln(y){return y==="raster"||y==="image"||y==="video"}ui.maxOverzooming=10,ui.maxUnderzooming=3;class sn{constructor(a,f){this.reset(a,f)}reset(a,f){this.points=a||[],this._distances=[0];for(let m=1;m0?(g-T)/L:0;return this.points[b].mult(1-A).add(this.points[f].mult(A))}}function Hr(y,a){let f=!0;return y==="always"||y!=="never"&&a!=="never"||(f=!1),f}class us{constructor(a,f,m){const g=this.boxCells=[],b=this.circleCells=[];this.xCellCount=Math.ceil(a/m),this.yCellCount=Math.ceil(f/m);for(let T=0;Tthis.width||g<0||f>this.height)return[];const A=[];if(a<=0&&f<=0&&this.width<=m&&this.height<=g){if(b)return[{key:null,x1:a,y1:f,x2:m,y2:g}];for(let N=0;N0}hitTestCircle(a,f,m,g,b){const T=a-m,L=a+m,A=f-m,N=f+m;if(L<0||T>this.width||N<0||A>this.height)return!1;const V=[];return this._forEachCell(T,A,L,N,this._queryCellCircle,V,{hitTest:!0,overlapMode:g,circle:{x:a,y:f,radius:m},seenUids:{box:{},circle:{}}},b),V.length>0}_queryCell(a,f,m,g,b,T,L,A){const{seenUids:N,hitTest:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!N.box[ge]){N.box[ge]=!0;const re=4*ge,Ie=this.boxKeys[ge];if(a<=ce[re+2]&&f<=ce[re+3]&&m>=ce[re+0]&&g>=ce[re+1]&&(!A||A(Ie))&&(!V||!Hr(j,Ie.overlapMode))&&(T.push({key:Ie,x1:ce[re],y1:ce[re+1],x2:ce[re+2],y2:ce[re+3]}),V))return!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!N.circle[ge]){N.circle[ge]=!0;const re=3*ge,Ie=this.circleKeys[ge];if(this._circleAndRectCollide(ce[re],ce[re+1],ce[re+2],a,f,m,g)&&(!A||A(Ie))&&(!V||!Hr(j,Ie.overlapMode))){const Be=ce[re],ve=ce[re+1],De=ce[re+2];if(T.push({key:Ie,x1:Be-De,y1:ve-De,x2:Be+De,y2:ve+De}),V)return!0}}}return!1}_queryCellCircle(a,f,m,g,b,T,L,A){const{circle:N,seenUids:V,overlapMode:j}=L,$=this.boxCells[b];if($!==null){const ce=this.bboxes;for(const ge of $)if(!V.box[ge]){V.box[ge]=!0;const re=4*ge,Ie=this.boxKeys[ge];if(this._circleAndRectCollide(N.x,N.y,N.radius,ce[re+0],ce[re+1],ce[re+2],ce[re+3])&&(!A||A(Ie))&&!Hr(j,Ie.overlapMode))return T.push(!0),!0}}const he=this.circleCells[b];if(he!==null){const ce=this.circles;for(const ge of he)if(!V.circle[ge]){V.circle[ge]=!0;const re=3*ge,Ie=this.circleKeys[ge];if(this._circlesCollide(ce[re],ce[re+1],ce[re+2],N.x,N.y,N.radius)&&(!A||A(Ie))&&!Hr(j,Ie.overlapMode))return T.push(!0),!0}}}_forEachCell(a,f,m,g,b,T,L,A){const N=this._convertToXCellCoord(a),V=this._convertToYCellCoord(f),j=this._convertToXCellCoord(m),$=this._convertToYCellCoord(g);for(let he=N;he<=j;he++)for(let ce=V;ce<=$;ce++)if(b.call(this,a,f,m,g,this.xCellCount*ce+he,T,L,A))return}_convertToXCellCoord(a){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(a*this.xScale)))}_convertToYCellCoord(a){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(a*this.yScale)))}_circlesCollide(a,f,m,g,b,T){const L=g-a,A=b-f,N=m+T;return N*N>L*L+A*A}_circleAndRectCollide(a,f,m,g,b,T,L){const A=(T-g)/2,N=Math.abs(a-(g+A));if(N>A+m)return!1;const V=(L-b)/2,j=Math.abs(f-(b+V));if(j>V+m)return!1;if(N<=A||j<=V)return!0;const $=N-A,he=j-V;return $*$+he*he<=m*m}}function on(y,a,f,m,g){const b=l.F();return a?(l.J(b,b,[1/g,1/g,1]),f||l.ad(b,b,m.angle)):l.K(b,m.labelPlaneMatrix,y),b}function Aa(y,a,f,m,g){if(a){const b=l.ae(y);return l.J(b,b,[g,g,1]),f||l.ad(b,b,-m.angle),b}return m.glCoordMatrix}function Jr(y,a,f){let m;f?(m=[y.x,y.y,f(y.x,y.y),1],l.af(m,m,a)):(m=[y.x,y.y,0,1],Dt(m,m,a));const g=m[3];return{point:new l.P(m[0]/g,m[1]/g),signedDistanceFromCamera:g}}function me(y,a){return .5+y/a*.5}function q(y,a){const f=y[0]/y[3],m=y[1]/y[3];return f>=-a[0]&&f<=a[0]&&m>=-a[1]&&m<=a[1]}function Z(y,a,f,m,g,b,T,L,A,N){const V=m?y.textSizeData:y.iconSizeData,j=l.ag(V,f.transform.zoom),$=[256/f.width*2+1,256/f.height*2+1],he=m?y.text.dynamicLayoutVertexArray:y.icon.dynamicLayoutVertexArray;he.clear();const ce=y.lineVertexArray,ge=m?y.text.placedSymbolArray:y.icon.placedSymbolArray,re=f.transform.width/f.transform.height;let Ie=!1;for(let Be=0;BeMath.abs(f.x-a.x)*m?{useVertical:!0}:(y===l.ah.vertical?a.yf.x)?{needsFlipping:!0}:null}function Te(y,a,f,m,g,b,T,L,A,N,V,j,$,he,ce,ge){const re=a/24,Ie=y.lineOffsetX*re,Be=y.lineOffsetY*re;let ve;if(y.numGlyphs>1){const De=y.glyphStartIndex+y.numGlyphs,Ve=y.lineStartIndex,He=y.lineStartIndex+y.lineLength,$e=J(re,L,Ie,Be,f,V,j,y,A,b,$,ce,ge);if(!$e)return{notEnoughRoom:!0};const rt=Jr($e.first.point,T,ge).point,nt=Jr($e.last.point,T,ge).point;if(m&&!f){const ct=le(y.writingMode,rt,nt,he);if(ct)return ct}ve=[$e.first];for(let ct=y.glyphStartIndex+1;ct0?rt.point:Q(j,$e,Ve,1,g,ge),ct=le(y.writingMode,Ve,nt,he);if(ct)return ct}const De=qe(re*L.getoffsetX(y.glyphStartIndex),Ie,Be,f,V,j,y.segment,y.lineStartIndex,y.lineStartIndex+y.lineLength,A,b,$,ce,ge);if(!De)return{notEnoughRoom:!0};ve=[De]}for(const De of ve)l.aj(N,De.point,De.angle);return{}}function Q(y,a,f,m,g,b){const T=Jr(y.add(y.sub(a)._unit()),g,b).point,L=f.sub(T);return f.add(L._mult(m/L.mag()))}function Pe(y,a){const{projectionCache:f,lineVertexArray:m,labelPlaneMatrix:g,tileAnchorPoint:b,distanceFromAnchor:T,getElevation:L,previousVertex:A,direction:N,absOffsetX:V}=a;if(f.projections[y])return f.projections[y];const j=new l.P(m.getx(y),m.gety(y)),$=Jr(j,g,L);if($.signedDistanceFromCamera>0)return f.projections[y]=$.point,$.point;const he=y-N;return Q(T===0?b:new l.P(m.getx(he),m.gety(he)),j,A,V-T+1,g,L)}function Se(y,a,f){return y._unit()._perp()._mult(a*f)}function Ne(y,a,f,m,g,b,T,L){const{projectionCache:A,direction:N}=L;if(A.offsets[y])return A.offsets[y];const V=f.add(a);if(y+N=g)return A.offsets[y]=V,V;const j=Pe(y+N,L),$=Se(j.sub(f),T,N),he=f.add($),ce=j.add($);return A.offsets[y]=l.ak(b,V,he,ce)||V,A.offsets[y]}function qe(y,a,f,m,g,b,T,L,A,N,V,j,$,he){const ce=m?y-a:y+a;let ge=ce>0?1:-1,re=0;m&&(ge*=-1,re=Math.PI),ge<0&&(re+=Math.PI);let Ie,Be,ve=ge>0?L+T:L+T+1,De=g,Ve=g,He=0,$e=0;const rt=Math.abs(ce),nt=[];let ct;for(;He+$e<=rt;){if(ve+=ge,ve=A)return null;He+=$e,Ve=De,Be=Ie;const gt={projectionCache:j,lineVertexArray:N,labelPlaneMatrix:V,tileAnchorPoint:b,distanceFromAnchor:He,getElevation:he,previousVertex:Ve,direction:ge,absOffsetX:rt};if(De=Pe(ve,gt),f===0)nt.push(Ve),ct=De.sub(Ve);else{let Ht;const cn=De.sub(Ve);Ht=cn.mag()===0?Se(Pe(ve+ge,gt).sub(De),f,ge):Se(cn,f,ge),Be||(Be=Ve.add(Ht)),Ie=Ne(ve,Ht,De,L,A,Be,f,gt),nt.push(Be),ct=Ie.sub(Be)}$e=ct.mag()}const pt=ct._mult((rt-He)/$e)._add(Be||Ve),un=re+Math.atan2(De.y-Ve.y,De.x-Ve.x);return nt.push(pt),{point:pt,angle:$?un:0,path:nt}}const Ye=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Je(y,a){for(let f=0;f=1;mn--)cn.push(gt.path[mn]);for(let mn=1;mnJr(bn,A,ce));cn=mn.some(bn=>bn.signedDistanceFromCamera<=0)?[]:mn.map(bn=>bn.point)}let Jt=[];if(cn.length>0){const mn=cn[0].clone(),bn=cn[0].clone();for(let Ur=1;Ur=ct.x&&bn.x<=pt.x&&mn.y>=ct.y&&bn.y<=pt.y?[cn]:bn.xpt.x||bn.ypt.y?[]:l.al([cn],ct.x,ct.y,pt.x,pt.y)}for(const mn of Jt){un.reset(mn,.25*nt);let bn=0;bn=un.length<=.5*nt?1:Math.ceil(un.paddedLength/kn)+1;for(let Ur=0;Ur=this.screenRightBoundary||gthis.screenBottomBoundary}isInsideGrid(a,f,m,g){return m>=0&&a=0&&fm.collisionGroupID===f}}return this.collisionGroups[a]}}function _i(y,a,f,m,g){const{horizontalAlign:b,verticalAlign:T}=l.at(y);return new l.P(-(b-.5)*a+m[0]*g,-(T-.5)*f+m[1]*g)}function uo(y,a,f,m,g,b){const{x1:T,x2:L,y1:A,y2:N,anchorPointX:V,anchorPointY:j}=y,$=new l.P(a,f);return m&&$._rotate(g?b:-b),{x1:T+$.x,y1:A+$.y,x2:L+$.x,y2:N+$.y,anchorPointX:V,anchorPointY:j}}class So{constructor(a,f,m,g,b){this.transform=a.clone(),this.terrain=f,this.collisionIndex=new Qt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=m,this.retainedQueryData={},this.collisionGroups=new Fr(g),this.collisionCircleArrays={},this.prevPlacement=b,b&&(b.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(a,f,m,g){const b=m.getBucket(f),T=m.latestFeatureIndex;if(!b||!T||f.id!==b.layerIds[0])return;const L=m.collisionBoxArray,A=b.layers[0].layout,N=Math.pow(2,this.transform.zoom-m.tileID.overscaledZ),V=m.tileSize/l.W,j=this.transform.calculatePosMatrix(m.tileID.toUnwrapped()),$=A.get("text-pitch-alignment")==="map",he=A.get("text-rotation-alignment")==="map",ce=tn(m,1,this.transform.zoom),ge=on(j,$,he,this.transform,ce);let re=null;if($){const Be=Aa(j,$,he,this.transform,ce);re=l.K([],this.transform.labelPlaneMatrix,Be)}this.retainedQueryData[b.bucketInstanceId]=new dn(b.bucketInstanceId,T,b.sourceLayerIndex,b.index,m.tileID);const Ie={bucket:b,layout:A,posMatrix:j,textLabelPlaneMatrix:ge,labelToScreenMatrix:re,scale:N,textPixelRatio:V,holdingForFade:m.holdingForFade(),collisionBoxArray:L,partiallyEvaluatedTextSize:l.ag(b.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(b.sourceID)};if(g)for(const Be of b.sortKeyRanges){const{sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve}=Be;a.push({sortKey:ve,symbolInstanceStart:De,symbolInstanceEnd:Ve,parameters:Ie})}else a.push({symbolInstanceStart:0,symbolInstanceEnd:b.symbolInstances.length,parameters:Ie})}attemptAnchorPlacement(a,f,m,g,b,T,L,A,N,V,j,$,he,ce,ge,re){const Ie=l.ap[a.textAnchor],Be=[a.textOffset0,a.textOffset1],ve=_i(Ie,m,g,Be,b),De=this.collisionIndex.placeCollisionBox(uo(f,ve.x,ve.y,T,L,this.transform.angle),j,A,N,V.predicate,re);if((!ge||this.collisionIndex.placeCollisionBox(uo(ge,ve.x,ve.y,T,L,this.transform.angle),j,A,N,V.predicate,re).box.length!==0)&&De.box.length>0){let Ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID]&&this.prevPlacement.placements[$.crossTileID].text&&(Ve=this.prevPlacement.variableOffsets[$.crossTileID].anchor),$.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[$.crossTileID]={textOffset:Be,width:m,height:g,anchor:Ie,textBoxScale:b,prevAnchor:Ve},this.markUsedJustification(he,Ie,$,ce),he.allowVerticalPlacement&&(this.markUsedOrientation(he,ce,$),this.placedOrientations[$.crossTileID]=ce),{shift:ve,placedGlyphBoxes:De}}}placeLayerBucketPart(a,f,m){const{bucket:g,layout:b,posMatrix:T,textLabelPlaneMatrix:L,labelToScreenMatrix:A,textPixelRatio:N,holdingForFade:V,collisionBoxArray:j,partiallyEvaluatedTextSize:$,collisionGroup:he}=a.parameters,ce=b.get("text-optional"),ge=b.get("icon-optional"),re=l.aq(b,"text-overlap","text-allow-overlap"),Ie=re==="always",Be=l.aq(b,"icon-overlap","icon-allow-overlap"),ve=Be==="always",De=b.get("text-rotation-alignment")==="map",Ve=b.get("text-pitch-alignment")==="map",He=b.get("icon-text-fit")!=="none",$e=b.get("symbol-z-order")==="viewport-y",rt=Ie&&(ve||!g.hasIconData()||ge),nt=ve&&(Ie||!g.hasTextData()||ce);!g.collisionArrays&&j&&g.deserializeCollisionBoxes(j);const ct=this.retainedQueryData[g.bucketInstanceId].tileID,pt=this.terrain?(gt,Ht)=>this.terrain.getElevation(ct,gt,Ht):null,un=(gt,Ht)=>{var cn,kn;if(f[gt.crossTileID])return;if(V)return void(this.placements[gt.crossTileID]=new vr(!1,!1,!1));let Jt=!1,mn=!1,bn=!0,Ur=null,Jn={box:null,offscreen:null},Wo={box:null,offscreen:null},yi=null,Mr=null,vi=null,Ho=0,na=0,ll=0;Ht.textFeatureIndex?Ho=Ht.textFeatureIndex:gt.useRuntimeCollisionCircles&&(Ho=gt.featureIndex),Ht.verticalTextFeatureIndex&&(na=Ht.verticalTextFeatureIndex);const Bc=Ht.textBox;if(Bc){const fi=pi=>{let kr=l.ah.horizontal;if(g.allowVerticalPlacement&&!pi&&this.prevPlacement){const ps=this.prevPlacement.placedOrientations[gt.crossTileID];ps&&(this.placedOrientations[gt.crossTileID]=ps,kr=ps,this.markUsedOrientation(g,kr,gt))}return kr},Ar=(pi,kr)=>{if(g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&Ht.verticalTextBox){for(const ps of g.writingModes)if(ps===l.ah.vertical?(Jn=kr(),Wo=Jn):Jn=pi(),Jn&&Jn.box&&Jn.box.length)break}else Jn=pi()},xr=gt.textAnchorOffsetStartIndex,fs=gt.textAnchorOffsetEndIndex;if(fs===xr){const pi=(kr,ps)=>{const di=this.collisionIndex.placeCollisionBox(kr,re,N,T,he.predicate,pt);return di&&di.box&&di.box.length&&(this.markUsedOrientation(g,ps,gt),this.placedOrientations[gt.crossTileID]=ps),di};Ar(()=>pi(Bc,l.ah.horizontal),()=>{const kr=Ht.verticalTextBox;return g.allowVerticalPlacement&>.numVerticalGlyphVertices>0&&kr?pi(kr,l.ah.vertical):{box:null,offscreen:null}}),fi(Jn&&Jn.box&&Jn.box.length)}else{let pi=l.ap[(kn=(cn=this.prevPlacement)===null||cn===void 0?void 0:cn.variableOffsets[gt.crossTileID])===null||kn===void 0?void 0:kn.anchor];const kr=(di,Zr,$p)=>{const pg=di.x2-di.x1,Zl=di.y2-di.y1,Xl=gt.textBoxScale,ef=He&&Be==="never"?Zr:null;let cl={box:[],offscreen:!1},Kp=re==="never"?1:2,dg="never";pi&&Kp++;for(let Jp=0;Jpkr(Bc,Ht.iconBox,l.ah.horizontal),()=>{const di=Ht.verticalTextBox;return g.allowVerticalPlacement&&!(Jn&&Jn.box&&Jn.box.length)&>.numVerticalGlyphVertices>0&&di?kr(di,Ht.verticalIconBox,l.ah.vertical):{box:null,offscreen:null}}),Jn&&(Jt=Jn.box,bn=Jn.offscreen);const ps=fi(Jn&&Jn.box);if(!Jt&&this.prevPlacement){const di=this.prevPlacement.variableOffsets[gt.crossTileID];di&&(this.variableOffsets[gt.crossTileID]=di,this.markUsedJustification(g,di.anchor,gt,ps))}}}if(yi=Jn,Jt=yi&&yi.box&&yi.box.length>0,bn=yi&&yi.offscreen,gt.useRuntimeCollisionCircles){const fi=g.text.placedSymbolArray.get(gt.centerJustifiedTextSymbolIndex),Ar=l.ai(g.textSizeData,$,fi),xr=b.get("text-padding");Mr=this.collisionIndex.placeCollisionCircles(re,fi,g.lineVertexArray,g.glyphOffsetArray,Ar,T,L,A,m,Ve,he.predicate,gt.collisionCircleDiameter,xr,pt),Mr.circles.length&&Mr.collisionDetected&&!m&&l.w("Collisions detected, but collision boxes are not shown"),Jt=Ie||Mr.circles.length>0&&!Mr.collisionDetected,bn=bn&&Mr.offscreen}if(Ht.iconFeatureIndex&&(ll=Ht.iconFeatureIndex),Ht.iconBox){const fi=Ar=>{const xr=He&&Ur?uo(Ar,Ur.x,Ur.y,De,Ve,this.transform.angle):Ar;return this.collisionIndex.placeCollisionBox(xr,Be,N,T,he.predicate,pt)};Wo&&Wo.box&&Wo.box.length&&Ht.verticalIconBox?(vi=fi(Ht.verticalIconBox),mn=vi.box.length>0):(vi=fi(Ht.iconBox),mn=vi.box.length>0),bn=bn&&vi.offscreen}const ul=ce||gt.numHorizontalGlyphVertices===0&>.numVerticalGlyphVertices===0,ra=ge||gt.numIconVertices===0;if(ul||ra?ra?ul||(mn=mn&&Jt):Jt=mn&&Jt:mn=Jt=mn&&Jt,Jt&&yi&&yi.box&&this.collisionIndex.insertCollisionBox(yi.box,re,b.get("text-ignore-placement"),g.bucketInstanceId,Wo&&Wo.box&&na?na:Ho,he.ID),mn&&vi&&this.collisionIndex.insertCollisionBox(vi.box,Be,b.get("icon-ignore-placement"),g.bucketInstanceId,ll,he.ID),Mr&&(Jt&&this.collisionIndex.insertCollisionCircles(Mr.circles,re,b.get("text-ignore-placement"),g.bucketInstanceId,Ho,he.ID),m)){const fi=g.bucketInstanceId;let Ar=this.collisionCircleArrays[fi];Ar===void 0&&(Ar=this.collisionCircleArrays[fi]=new ci);for(let xr=0;xr=0;--Ht){const cn=gt[Ht];un(g.symbolInstances.get(cn),g.collisionArrays[cn])}}else for(let gt=a.symbolInstanceStart;gt=0&&(a.text.placedSymbolArray.get(L).crossTileID=b>=0&&L!==b?0:m.crossTileID)}markUsedOrientation(a,f,m){const g=f===l.ah.horizontal||f===l.ah.horizontalOnly?f:0,b=f===l.ah.vertical?f:0,T=[m.leftJustifiedTextSymbolIndex,m.centerJustifiedTextSymbolIndex,m.rightJustifiedTextSymbolIndex];for(const L of T)a.text.placedSymbolArray.get(L).placedOrientation=g;m.verticalPlacedTextSymbolIndex&&(a.text.placedSymbolArray.get(m.verticalPlacedTextSymbolIndex).placedOrientation=b)}commit(a){this.commitTime=a,this.zoomAtLastRecencyCheck=this.transform.zoom;const f=this.prevPlacement;let m=!1;this.prevZoomAdjustment=f?f.zoomAdjustment(this.transform.zoom):0;const g=f?f.symbolFadeChange(a):1,b=f?f.opacities:{},T=f?f.variableOffsets:{},L=f?f.placedOrientations:{};for(const A in this.placements){const N=this.placements[A],V=b[A];V?(this.opacities[A]=new er(V,g,N.text,N.icon),m=m||N.text!==V.text.placed||N.icon!==V.icon.placed):(this.opacities[A]=new er(null,g,N.text,N.icon,N.skipFade),m=m||N.text||N.icon)}for(const A in b){const N=b[A];if(!this.opacities[A]){const V=new er(N,g,!1,!1);V.isHidden()||(this.opacities[A]=V,m=m||N.text.placed||N.icon.placed)}}for(const A in T)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=T[A]);for(const A in L)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=L[A]);if(f&&f.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");m?this.lastPlacementChangeTime=a:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=f?f.lastPlacementChangeTime:a)}updateLayerOpacities(a,f){const m={};for(const g of f){const b=g.getBucket(a);b&&g.latestFeatureIndex&&a.id===b.layerIds[0]&&this.updateBucketOpacities(b,m,g.collisionBoxArray)}}updateBucketOpacities(a,f,m){a.hasTextData()&&(a.text.opacityVertexArray.clear(),a.text.hasVisibleVertices=!1),a.hasIconData()&&(a.icon.opacityVertexArray.clear(),a.icon.hasVisibleVertices=!1),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexArray.clear(),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexArray.clear();const g=a.layers[0],b=g.layout,T=new er(null,0,!1,!1,!0),L=b.get("text-allow-overlap"),A=b.get("icon-allow-overlap"),N=g._unevaluatedLayout.hasValue("text-variable-anchor")||g._unevaluatedLayout.hasValue("text-variable-anchor-offset"),V=b.get("text-rotation-alignment")==="map",j=b.get("text-pitch-alignment")==="map",$=b.get("icon-text-fit")!=="none",he=new er(null,0,L&&(A||!a.hasIconData()||b.get("icon-optional")),A&&(L||!a.hasTextData()||b.get("text-optional")),!0);!a.collisionArrays&&m&&(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData())&&a.deserializeCollisionBoxes(m);const ce=(ge,re,Ie)=>{for(let Be=0;Be0,He=this.placedOrientations[re.crossTileID],$e=He===l.ah.vertical,rt=He===l.ah.horizontal||He===l.ah.horizontalOnly;if(Ie>0||Be>0){const nt=Eo(De.text);ce(a.text,Ie,$e?_c:nt),ce(a.text,Be,rt?_c:nt);const ct=De.text.isHidden();[re.rightJustifiedTextSymbolIndex,re.centerJustifiedTextSymbolIndex,re.leftJustifiedTextSymbolIndex].forEach(gt=>{gt>=0&&(a.text.placedSymbolArray.get(gt).hidden=ct||$e?1:0)}),re.verticalPlacedTextSymbolIndex>=0&&(a.text.placedSymbolArray.get(re.verticalPlacedTextSymbolIndex).hidden=ct||rt?1:0);const pt=this.variableOffsets[re.crossTileID];pt&&this.markUsedJustification(a,pt.anchor,re,He);const un=this.placedOrientations[re.crossTileID];un&&(this.markUsedJustification(a,"left",re,un),this.markUsedOrientation(a,un,re))}if(Ve){const nt=Eo(De.icon),ct=!($&&re.verticalPlacedIconSymbolIndex&&$e);re.placedIconSymbolIndex>=0&&(ce(a.icon,re.numIconVertices,ct?nt:_c),a.icon.placedSymbolArray.get(re.placedIconSymbolIndex).hidden=De.icon.isHidden()),re.verticalPlacedIconSymbolIndex>=0&&(ce(a.icon,re.numVerticalIconVertices,ct?_c:nt),a.icon.placedSymbolArray.get(re.verticalPlacedIconSymbolIndex).hidden=De.icon.isHidden())}if(a.hasIconCollisionBoxData()||a.hasTextCollisionBoxData()){const nt=a.collisionArrays[ge];if(nt){let ct=new l.P(0,0);if(nt.textBox||nt.verticalTextBox){let un=!0;if(N){const gt=this.variableOffsets[ve];gt?(ct=_i(gt.anchor,gt.width,gt.height,gt.textOffset,gt.textBoxScale),V&&ct._rotate(j?this.transform.angle:-this.transform.angle)):un=!1}nt.textBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||$e,ct.x,ct.y),nt.verticalTextBox&&Pi(a.textCollisionBox.collisionVertexArray,De.text.placed,!un||rt,ct.x,ct.y)}const pt=!!(!rt&&nt.verticalIconBox);nt.iconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,pt,$?ct.x:0,$?ct.y:0),nt.verticalIconBox&&Pi(a.iconCollisionBox.collisionVertexArray,De.icon.placed,!pt,$?ct.x:0,$?ct.y:0)}}}if(a.sortFeatures(this.transform.angle),this.retainedQueryData[a.bucketInstanceId]&&(this.retainedQueryData[a.bucketInstanceId].featureSortOrder=a.featureSortOrder),a.hasTextData()&&a.text.opacityVertexBuffer&&a.text.opacityVertexBuffer.updateData(a.text.opacityVertexArray),a.hasIconData()&&a.icon.opacityVertexBuffer&&a.icon.opacityVertexBuffer.updateData(a.icon.opacityVertexArray),a.hasIconCollisionBoxData()&&a.iconCollisionBox.collisionVertexBuffer&&a.iconCollisionBox.collisionVertexBuffer.updateData(a.iconCollisionBox.collisionVertexArray),a.hasTextCollisionBoxData()&&a.textCollisionBox.collisionVertexBuffer&&a.textCollisionBox.collisionVertexBuffer.updateData(a.textCollisionBox.collisionVertexArray),a.text.opacityVertexArray.length!==a.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${a.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${a.text.layoutVertexArray.length}) / 4`);if(a.icon.opacityVertexArray.length!==a.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${a.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${a.icon.layoutVertexArray.length}) / 4`);if(a.bucketInstanceId in this.collisionCircleArrays){const ge=this.collisionCircleArrays[a.bucketInstanceId];a.placementInvProjMatrix=ge.invProjMatrix,a.placementViewportMatrix=ge.viewportMatrix,a.collisionCircleArray=ge.circles,delete this.collisionCircleArrays[a.bucketInstanceId]}}symbolFadeChange(a){return this.fadeDuration===0?1:(a-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(a){return Math.max(0,(this.transform.zoom-a)/1.5)}hasTransitions(a){return this.stale||a-this.lastPlacementChangeTimea}setStale(){this.stale=!0}}function Pi(y,a,f,m,g){y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0),y.emplaceBack(a?1:0,f?1:0,m||0,g||0)}const Ks=Math.pow(2,25),Mm=Math.pow(2,24),Py=Math.pow(2,17),$n=Math.pow(2,16),yp=Math.pow(2,9),vp=Math.pow(2,8),jo=Math.pow(2,1);function Eo(y){if(y.opacity===0&&!y.placed)return 0;if(y.opacity===1&&y.placed)return 4294967295;const a=y.placed?1:0,f=Math.floor(127*y.opacity);return f*Ks+a*Mm+f*Py+a*$n+f*yp+a*vp+f*jo+a}const _c=0;class cs{constructor(a){this._sortAcrossTiles=a.layout.get("symbol-z-order")!=="viewport-y"&&!a.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(a,f,m,g,b){const T=this._bucketParts;for(;this._currentTileIndexL.sortKey-A.sortKey));this._currentPartIndex!this._forceFullPlacement&&E.now()-g>2;for(;this._currentPlacementIndex>=0;){const T=f[a[this._currentPlacementIndex]],L=this.placement.collisionIndex.transform.zoom;if(T.type==="symbol"&&(!T.minzoom||T.minzoom<=L)&&(!T.maxzoom||T.maxzoom>L)){if(this._inProgressLayer||(this._inProgressLayer=new cs(T)),this._inProgressLayer.continuePlacement(m[T.source],this.placement,this._showCollisionBoxes,T,b))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(a){return this.placement.commit(a),this.placement}}const xu=512/l.W/2;class mh{constructor(a,f,m){this.tileID=a,this.bucketInstanceId=m,this._symbolsByKey={};const g=new Map;for(let b=0;b({x:Math.floor(A.anchorX*xu),y:Math.floor(A.anchorY*xu)})),crossTileIDs:T.map(A=>A.crossTileID)};if(L.positions.length>128){const A=new l.au(L.positions.length,16,Uint16Array);for(const{x:N,y:V}of L.positions)A.add(N,V);A.finish(),delete L.positions,L.index=A}this._symbolsByKey[b]=L}}getScaledCoordinates(a,f){const{x:m,y:g,z:b}=this.tileID.canonical,{x:T,y:L,z:A}=f.canonical,N=xu/Math.pow(2,A-b),V=(L*l.W+a.anchorY)*N,j=g*l.W*xu;return{x:Math.floor((T*l.W+a.anchorX)*N-m*l.W*xu),y:Math.floor(V-j)}}findMatches(a,f,m){const g=this.tileID.canonical.za)}}class hi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class yc{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(a){const f=Math.round((a-this.lng)/360);if(f!==0)for(const m in this.indexes){const g=this.indexes[m],b={};for(const T in g){const L=g[T];L.tileID=L.tileID.unwrapTo(L.tileID.wrap+f),b[L.tileID.key]=L}this.indexes[m]=b}this.lng=a}addBucket(a,f,m){if(this.indexes[a.overscaledZ]&&this.indexes[a.overscaledZ][a.key]){if(this.indexes[a.overscaledZ][a.key].bucketInstanceId===f.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(a.overscaledZ,this.indexes[a.overscaledZ][a.key])}for(let b=0;ba.overscaledZ)for(const L in T){const A=T[L];A.tileID.isChildOf(a)&&A.findMatches(f.symbolInstances,a,g)}else{const L=T[a.scaledTo(Number(b)).key];L&&L.findMatches(f.symbolInstances,a,g)}}for(let b=0;b{f[m]=!0});for(const m in this.layerIndexes)f[m]||delete this.layerIndexes[m]}}const Pr=(y,a)=>l.t(y,a&&a.filter(f=>f.identifier!=="source.canvas")),gh=l.av();class Go extends l.E{constructor(a,f={}){super(),this._rtlPluginLoaded=()=>{for(const m in this.sourceCaches){const g=this.sourceCaches[m].getSource().type;g!=="vector"&&g!=="geojson"||this.sourceCaches[m].reload()}},this.map=a,this.dispatcher=new Yn(pn(),a._getMapId()),this.dispatcher.registerMessageHandler("GG",(m,g)=>this.getGlyphs(m,g)),this.dispatcher.registerMessageHandler("GI",(m,g)=>this.getImages(m,g)),this.imageManager=new Ke,this.imageManager.setEventedParent(this),this.glyphManager=new We(a._requestManager,f.localIdeographFontFamily),this.lineAtlas=new At(256,512),this.crossTileSymbolIndex=new nl,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.aw,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",l.ax()),st().on(Bi,this._rtlPluginLoaded),this.on("data",m=>{if(m.dataType!=="source"||m.sourceDataType!=="metadata")return;const g=this.sourceCaches[m.sourceId];if(!g)return;const b=g.getSource();if(b&&b.vectorLayerIds)for(const T in this._layers){const L=this._layers[T];L.source===b.id&&this._validateLayer(L)}})}loadURL(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),f.validate=typeof f.validate!="boolean"||f.validate;const g=this.map._requestManager.transformRequest(a,"Style");this._loadStyleRequest=new AbortController,l.h(g,this._loadStyleRequest).then(b=>{this._loadStyleRequest=null,this._load(b.data,f,m)}).catch(b=>{this._loadStyleRequest=null,b&&this.fire(new l.j(b))})}loadJSON(a,f={},m){this.fire(new l.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,f.validate=f.validate!==!1,this._load(a,f,m)}).catch(()=>{})}loadEmpty(){this.fire(new l.k("dataloading",{dataType:"style"})),this._load(gh,{validate:!1})}_load(a,f,m){var g;const b=f.transformStyle?f.transformStyle(m,a):a;if(!f.validate||!Pr(this,l.x(b))){this._loaded=!0,this.stylesheet=b;for(const T in b.sources)this.addSource(T,b.sources[T],{validate:!1});b.sprite?this._loadSprite(b.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(b.glyphs),this._createLayers(),this.light=new vt(this.stylesheet.light),this.map.setTerrain((g=this.stylesheet.terrain)!==null&&g!==void 0?g:null),this.fire(new l.k("data",{dataType:"style"})),this.fire(new l.k("style.load"))}}_createLayers(){const a=l.ay(this.stylesheet.layers);this.dispatcher.broadcast("SL",a),this._order=a.map(f=>f.id),this._layers={},this._serializedLayers=null;for(const f of a){const m=l.az(f);m.setEventedParent(this,{layer:{id:f.id}}),this._layers[f.id]=m}}_loadSprite(a,f=!1,m=void 0){let g;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(b,T,L,A){return l._(this,void 0,void 0,function*(){const N=Ae(b),V=L>1?"@2x":"",j={},$={};for(const{id:he,url:ce}of N){const ge=T.transformRequest(T.normalizeSpriteURL(ce,V,".json"),"SpriteJSON");j[he]=l.h(ge,A);const re=T.transformRequest(T.normalizeSpriteURL(ce,V,".png"),"SpriteImage");$[he]=G.getImage(re,A)}return yield Promise.all([...Object.values(j),...Object.values($)]),function(he,ce){return l._(this,void 0,void 0,function*(){const ge={};for(const re in he){ge[re]={};const Ie=E.getImageCanvasContext((yield ce[re]).data),Be=(yield he[re]).data;for(const ve in Be){const{width:De,height:Ve,x:He,y:$e,sdf:rt,pixelRatio:nt,stretchX:ct,stretchY:pt,content:un}=Be[ve];ge[re][ve]={data:null,pixelRatio:nt,sdf:rt,stretchX:ct,stretchY:pt,content:un,spriteData:{width:De,height:Ve,x:He,y:$e,context:Ie}}}}return ge})}(j,$)})}(a,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(b=>{if(this._spriteRequest=null,b)for(const T in b){this._spritesImagesIds[T]=[];const L=this._spritesImagesIds[T]?this._spritesImagesIds[T].filter(A=>!(A in b)):[];for(const A of L)this.imageManager.removeImage(A),this._changedImages[A]=!0;for(const A in b[T]){const N=T==="default"?A:`${T}:${A}`;this._spritesImagesIds[T].push(N),N in this.imageManager.images?this.imageManager.updateImage(N,b[T][A],!1):this.imageManager.addImage(N,b[T][A]),f&&(this._changedImages[N]=!0)}}}).catch(b=>{this._spriteRequest=null,g=b,this.fire(new l.j(g))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),f&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"})),m&&m(g)})}_unloadSprite(){for(const a of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(a),this._changedImages[a]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}_validateLayer(a){const f=this.sourceCaches[a.source];if(!f)return;const m=a.sourceLayer;if(!m)return;const g=f.getSource();(g.type==="geojson"||g.vectorLayerIds&&g.vectorLayerIds.indexOf(m)===-1)&&this.fire(new l.j(new Error(`Source layer "${m}" does not exist on source "${g.id}" as specified by style layer "${a.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const a in this.sourceCaches)if(!this.sourceCaches[a].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(a){const f=this._serializedAllLayers();if(!a||a.length===0)return Object.values(f);const m=[];for(const g of a)f[g]&&m.push(f[g]);return m}_serializedAllLayers(){let a=this._serializedLayers;if(a)return a;a=this._serializedLayers={};const f=Object.keys(this._layers);for(const m of f){const g=this._layers[m];g.type!=="custom"&&(a[m]=g.serialize())}return a}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const a in this.sourceCaches)if(this.sourceCaches[a].hasTransition())return!0;for(const a in this._layers)if(this._layers[a].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(a){if(!this._loaded)return;const f=this._changed;if(f){const g=Object.keys(this._updatedLayers),b=Object.keys(this._removedLayers);(g.length||b.length)&&this._updateWorkerLayers(g,b);for(const T in this._updatedSources){const L=this._updatedSources[T];if(L==="reload")this._reloadSource(T);else{if(L!=="clear")throw new Error(`Invalid action ${L}`);this._clearSource(T)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const T in this._updatedPaintProps)this._layers[T].updateTransitions(a);this.light.updateTransitions(a),this._resetUpdates()}const m={};for(const g in this.sourceCaches){const b=this.sourceCaches[g];m[g]=b.used,b.used=!1}for(const g of this._order){const b=this._layers[g];b.recalculate(a,this._availableImages),!b.isHidden(a.zoom)&&b.source&&(this.sourceCaches[b.source].used=!0)}for(const g in m){const b=this.sourceCaches[g];!!m[g]!=!!b.used&&b.fire(new l.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:g}))}this.light.recalculate(a),this.z=a.zoom,f&&this.fire(new l.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const a=Object.keys(this._changedImages);if(a.length){for(const f in this.sourceCaches)this.sourceCaches[f].reloadTilesForDependencies(["icons","patterns"],a);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const a in this.sourceCaches)this.sourceCaches[a].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(a,f){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(a),removedIds:f})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(a,f={}){var m;this._checkLoaded();const g=this.serialize();if(a=f.transformStyle?f.transformStyle(g,a):a,((m=f.validate)===null||m===void 0||m)&&Pr(this,l.x(a)))return!1;(a=l.aA(a)).layers=l.ay(a.layers);const b=l.aB(g,a),T=this._getOperationsToPerform(b);if(T.unimplemented.length>0)throw new Error(`Unimplemented: ${T.unimplemented.join(", ")}.`);if(T.operations.length===0)return!1;for(const L of T.operations)L();return this.stylesheet=a,this._serializedLayers=null,!0}_getOperationsToPerform(a){const f=[],m=[];for(const g of a)switch(g.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":f.push(()=>this.addLayer.apply(this,g.args));break;case"removeLayer":f.push(()=>this.removeLayer.apply(this,g.args));break;case"setPaintProperty":f.push(()=>this.setPaintProperty.apply(this,g.args));break;case"setLayoutProperty":f.push(()=>this.setLayoutProperty.apply(this,g.args));break;case"setFilter":f.push(()=>this.setFilter.apply(this,g.args));break;case"addSource":f.push(()=>this.addSource.apply(this,g.args));break;case"removeSource":f.push(()=>this.removeSource.apply(this,g.args));break;case"setLayerZoomRange":f.push(()=>this.setLayerZoomRange.apply(this,g.args));break;case"setLight":f.push(()=>this.setLight.apply(this,g.args));break;case"setGeoJSONSourceData":f.push(()=>this.setGeoJSONSourceData.apply(this,g.args));break;case"setGlyphs":f.push(()=>this.setGlyphs.apply(this,g.args));break;case"setSprite":f.push(()=>this.setSprite.apply(this,g.args));break;case"setTerrain":f.push(()=>this.map.setTerrain.apply(this,g.args));break;case"setTransition":f.push(()=>{});break;default:m.push(g.command)}return{operations:f,unimplemented:m}}addImage(a,f){if(this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" already exists.`)));this.imageManager.addImage(a,f),this._afterImageUpdated(a)}updateImage(a,f){this.imageManager.updateImage(a,f)}getImage(a){return this.imageManager.getImage(a)}removeImage(a){if(!this.getImage(a))return this.fire(new l.j(new Error(`An image named "${a}" does not exist.`)));this.imageManager.removeImage(a),this._afterImageUpdated(a)}_afterImageUpdated(a){this._availableImages=this.imageManager.listImages(),this._changedImages[a]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(a,f,m={}){if(this._checkLoaded(),this.sourceCaches[a]!==void 0)throw new Error(`Source "${a}" already exists.`);if(!f.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(f).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(f.type)>=0&&this._validate(l.x.source,`sources.${a}`,f,null,m))return;this.map&&this.map._collectResourceTiming&&(f.collectResourceTiming=!0);const g=this.sourceCaches[a]=new ui(a,f,this.dispatcher);g.style=this,g.setEventedParent(this,()=>({isSourceLoaded:g.loaded(),source:g.serialize(),sourceId:a})),g.onAdd(this.map),this._changed=!0}removeSource(a){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error("There is no source with this ID");for(const m in this._layers)if(this._layers[m].source===a)return this.fire(new l.j(new Error(`Source "${a}" cannot be removed while layer "${m}" is using it.`)));const f=this.sourceCaches[a];delete this.sourceCaches[a],delete this._updatedSources[a],f.fire(new l.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:a})),f.setEventedParent(null),f.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(a,f){if(this._checkLoaded(),this.sourceCaches[a]===void 0)throw new Error(`There is no source with this ID=${a}`);const m=this.sourceCaches[a].getSource();if(m.type!=="geojson")throw new Error(`geojsonSource.type is ${m.type}, which is !== 'geojson`);m.setData(f),this._changed=!0}getSource(a){return this.sourceCaches[a]&&this.sourceCaches[a].getSource()}addLayer(a,f,m={}){this._checkLoaded();const g=a.id;if(this.getLayer(g))return void this.fire(new l.j(new Error(`Layer "${g}" already exists on this map.`)));let b;if(a.type==="custom"){if(Pr(this,l.aC(a)))return;b=l.az(a)}else{if("source"in a&&typeof a.source=="object"&&(this.addSource(g,a.source),a=l.aA(a),a=l.e(a,{source:g})),this._validate(l.x.layer,`layers.${g}`,a,{arrayIndex:-1},m))return;b=l.az(a),this._validateLayer(b),b.setEventedParent(this,{layer:{id:g}})}const T=f?this._order.indexOf(f):this._order.length;if(f&&T===-1)this.fire(new l.j(new Error(`Cannot add layer "${g}" before non-existing layer "${f}".`)));else{if(this._order.splice(T,0,g),this._layerOrderChanged=!0,this._layers[g]=b,this._removedLayers[g]&&b.source&&b.type!=="custom"){const L=this._removedLayers[g];delete this._removedLayers[g],L.type!==b.type?this._updatedSources[b.source]="clear":(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause())}this._updateLayer(b),b.onAdd&&b.onAdd(this.map)}}moveLayer(a,f){if(this._checkLoaded(),this._changed=!0,!this._layers[a])return void this.fire(new l.j(new Error(`The layer '${a}' does not exist in the map's style and cannot be moved.`)));if(a===f)return;const m=this._order.indexOf(a);this._order.splice(m,1);const g=f?this._order.indexOf(f):this._order.length;f&&g===-1?this.fire(new l.j(new Error(`Cannot move layer "${a}" before non-existing layer "${f}".`))):(this._order.splice(g,0,a),this._layerOrderChanged=!0)}removeLayer(a){this._checkLoaded();const f=this._layers[a];if(!f)return void this.fire(new l.j(new Error(`Cannot remove non-existing layer "${a}".`)));f.setEventedParent(null);const m=this._order.indexOf(a);this._order.splice(m,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[a]=f,delete this._layers[a],this._serializedLayers&&delete this._serializedLayers[a],delete this._updatedLayers[a],delete this._updatedPaintProps[a],f.onRemove&&f.onRemove(this.map)}getLayer(a){return this._layers[a]}getLayersOrder(){return[...this._order]}hasLayer(a){return a in this._layers}setLayerZoomRange(a,f,m){this._checkLoaded();const g=this.getLayer(a);g?g.minzoom===f&&g.maxzoom===m||(f!=null&&(g.minzoom=f),m!=null&&(g.maxzoom=m),this._updateLayer(g)):this.fire(new l.j(new Error(`Cannot set the zoom range of non-existing layer "${a}".`)))}setFilter(a,f,m={}){this._checkLoaded();const g=this.getLayer(a);if(g){if(!l.aD(g.filter,f))return f==null?(g.filter=void 0,void this._updateLayer(g)):void(this._validate(l.x.filter,`layers.${g.id}.filter`,f,null,m)||(g.filter=l.aA(f),this._updateLayer(g)))}else this.fire(new l.j(new Error(`Cannot filter non-existing layer "${a}".`)))}getFilter(a){return l.aA(this.getLayer(a).filter)}setLayoutProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getLayoutProperty(f),m)||(b.setLayoutProperty(f,m,g),this._updateLayer(b)):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getLayoutProperty(a,f){const m=this.getLayer(a);if(m)return m.getLayoutProperty(f);this.fire(new l.j(new Error(`Cannot get style of non-existing layer "${a}".`)))}setPaintProperty(a,f,m,g={}){this._checkLoaded();const b=this.getLayer(a);b?l.aD(b.getPaintProperty(f),m)||(b.setPaintProperty(f,m,g)&&this._updateLayer(b),this._changed=!0,this._updatedPaintProps[a]=!0,this._serializedLayers=null):this.fire(new l.j(new Error(`Cannot style non-existing layer "${a}".`)))}getPaintProperty(a,f){return this.getLayer(a).getPaintProperty(f)}setFeatureState(a,f){this._checkLoaded();const m=a.source,g=a.sourceLayer,b=this.sourceCaches[m];if(b===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const T=b.getSource().type;T==="geojson"&&g?this.fire(new l.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):T!=="vector"||g?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),b.setFeatureState(g,a.id,f)):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(a,f){this._checkLoaded();const m=a.source,g=this.sourceCaches[m];if(g===void 0)return void this.fire(new l.j(new Error(`The source '${m}' does not exist in the map's style.`)));const b=g.getSource().type,T=b==="vector"?a.sourceLayer:void 0;b!=="vector"||T?f&&typeof a.id!="string"&&typeof a.id!="number"?this.fire(new l.j(new Error("A feature id is required to remove its specific state property."))):g.removeFeatureState(T,a.id,f):this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(a){this._checkLoaded();const f=a.source,m=a.sourceLayer,g=this.sourceCaches[f];if(g!==void 0)return g.getSource().type!=="vector"||m?(a.id===void 0&&this.fire(new l.j(new Error("The feature id parameter must be provided."))),g.getFeatureState(m,a.id)):void this.fire(new l.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new l.j(new Error(`The source '${f}' does not exist in the map's style.`)))}getTransition(){return l.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const a=l.aE(this.sourceCaches,b=>b.serialize()),f=this._serializeByIds(this._order),m=this.map.getTerrain()||void 0,g=this.stylesheet;return l.aF({version:g.version,name:g.name,metadata:g.metadata,light:g.light,center:g.center,zoom:g.zoom,bearing:g.bearing,pitch:g.pitch,sprite:g.sprite,glyphs:g.glyphs,transition:g.transition,sources:a,layers:f,terrain:m},b=>b!==void 0)}_updateLayer(a){this._updatedLayers[a.id]=!0,a.source&&!this._updatedSources[a.source]&&this.sourceCaches[a.source].getSource().type!=="raster"&&(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(a){const f=T=>this._layers[T].type==="fill-extrusion",m={},g=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L)){m[L]=T;for(const A of a){const N=A[L];if(N)for(const V of N)g.push(V)}}}g.sort((T,L)=>L.intersectionZ-T.intersectionZ);const b=[];for(let T=this._order.length-1;T>=0;T--){const L=this._order[T];if(f(L))for(let A=g.length-1;A>=0;A--){const N=g[A].feature;if(m[N.layer.id]{const rt=Ie.featureSortOrder;if(rt){const nt=rt.indexOf(He.featureIndex);return rt.indexOf($e.featureIndex)-nt}return $e.featureIndex-He.featureIndex});for(const He of Ve)De.push(He)}}for(const Ie in ce)ce[Ie].forEach(Be=>{const ve=Be.feature,De=N[L[Ie].source].getFeatureState(ve.layer["source-layer"],ve.id);ve.source=ve.layer.source,ve.layer["source-layer"]&&(ve.sourceLayer=ve.layer["source-layer"]),ve.state=De});return ce}(this._layers,T,this.sourceCaches,a,f,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(b)}querySourceFeatures(a,f){f&&f.filter&&this._validate(l.x.filter,"querySourceFeatures.filter",f.filter,null,f);const m=this.sourceCaches[a];return m?function(g,b){const T=g.getRenderableIds().map(N=>g.getTileByID(N)),L=[],A={};for(let N=0;N$.getTileByID(he)).sort((he,ce)=>ce.tileID.overscaledZ-he.tileID.overscaledZ||(he.tileID.isLessThan(ce.tileID)?-1:1))}const j=this.crossTileSymbolIndex.addLayer(V,A[V.source],a.center.lng);T=T||j}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((b=b||this._layerOrderChanged||m===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(E.now(),a.zoom))&&(this.pauseablePlacement=new hs(a,this.map.terrain,this._order,b,f,m,g,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(E.now()),L=!0),T&&this.pauseablePlacement.placement.setStale()),L||T)for(const N of this._order){const V=this._layers[N];V.type==="symbol"&&this.placement.updateLayerOpacities(V,A[V.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(E.now())}_releaseSymbolFadeTiles(){for(const a in this.sourceCaches)this.sourceCaches[a].releaseSymbolFadeTiles()}getImages(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.imageManager.getImages(f.icons);this._updateTilesForChangedImages();const g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,f.icons),m})}getGlyphs(a,f){return l._(this,void 0,void 0,function*(){const m=yield this.glyphManager.getGlyphs(f.stacks),g=this.sourceCaches[f.source];return g&&g.setDependencies(f.tileID.key,f.type,[""]),m})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(a,f={}){this._checkLoaded(),a&&this._validate(l.x.glyphs,"glyphs",a,null,f)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=a,this.glyphManager.entries={},this.glyphManager.setURL(a))}addSprite(a,f,m={},g){this._checkLoaded();const b=[{id:a,url:f}],T=[...Ae(this.stylesheet.sprite),...b];this._validate(l.x.sprite,"sprite",T,null,m)||(this.stylesheet.sprite=T,this._loadSprite(b,!0,g))}removeSprite(a){this._checkLoaded();const f=Ae(this.stylesheet.sprite);if(f.find(m=>m.id===a)){if(this._spritesImagesIds[a])for(const m of this._spritesImagesIds[a])this.imageManager.removeImage(m),this._changedImages[m]=!0;f.splice(f.findIndex(m=>m.id===a),1),this.stylesheet.sprite=f.length>0?f:void 0,delete this._spritesImagesIds[a],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new l.k("data",{dataType:"style"}))}else this.fire(new l.j(new Error(`Sprite "${a}" doesn't exists on this map.`)))}getSprite(){return Ae(this.stylesheet.sprite)}setSprite(a,f={},m){this._checkLoaded(),a&&this._validate(l.x.sprite,"sprite",a,null,f)||(this.stylesheet.sprite=a,a?this._loadSprite(a,!0,m):(this._unloadSprite(),m&&m(null)))}}var _h=l.X([{name:"a_pos",type:"Int16",components:2}]),Js="attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_depth;void main() {float extent=8192.0;float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/extent;gl_Position=u_matrix*vec4(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}";const vc={prelude:Kn(`#ifdef GL_ES +precision mediump float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +`,`#ifdef GL_ES +precision highp float; +#else +#if !defined(lowp) +#define lowp +#endif +#if !defined(mediump) +#define mediump +#endif +#if !defined(highp) +#define highp +#endif +#endif +vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 +);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} +#ifdef TERRAIN3D +uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; +#endif +const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { +#ifdef TERRAIN3D +highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); +#else +return 1.0; +#endif +}float calculate_visibility(vec4 pos) { +#ifdef TERRAIN3D +vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}`),background:Kn(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Kn(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Kn(`varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Kn("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Kn(`uniform highp float u_intensity;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`),heatmapTexture:Kn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Kn("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,get_elevation(a_pos),1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Kn("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Kn("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Kn(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_FragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Kn(`varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Kn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Kn(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Kn(`varying vec4 v_color;void main() {gl_FragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Kn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +#ifdef TERRAIN3D +attribute vec2 a_centroid; +#endif +varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Kn(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Kn(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent; +#define PI 3.141592653589793 +void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Kn(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:Kn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:Kn(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Kn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude; +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Kn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Kn(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),z,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Kn(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Kn(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +#ifdef OVERDRAW_INSPECTOR +gl_FragColor=vec4(1.0); +#endif +}`,`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,ele,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),ele,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,ele,1.0);float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),z,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Kn("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",Js),terrainDepth:Kn("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}",Js),terrainCoords:Kn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}",Js)};function Kn(y,a){const f=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,m=a.match(/attribute ([\w]+) ([\w]+)/g),g=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),b=a.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),T=b?b.concat(g):g,L={};return{fragmentSource:y=y.replace(f,(A,N,V,j,$)=>(L[$]=!0,N==="define"?` +#ifndef HAS_UNIFORM_u_${$} +varying ${V} ${j} ${$}; +#else +uniform ${V} ${j} u_${$}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${$} + ${V} ${j} ${$} = u_${$}; +#endif +`)),vertexSource:a=a.replace(f,(A,N,V,j,$)=>{const he=j==="float"?"vec2":"vec4",ce=$.match(/color/)?"color":he;return L[$]?N==="define"?` +#ifndef HAS_UNIFORM_u_${$} +uniform lowp float u_${$}_t; +attribute ${V} ${he} a_${$}; +varying ${V} ${j} ${$}; +#else +uniform ${V} ${j} u_${$}; +#endif +`:ce==="vec4"?` +#ifndef HAS_UNIFORM_u_${$} + ${$} = a_${$}; +#else + ${V} ${j} ${$} = u_${$}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${$} + ${$} = unpack_mix_${ce}(a_${$}, u_${$}_t); +#else + ${V} ${j} ${$} = u_${$}; +#endif +`:N==="define"?` +#ifndef HAS_UNIFORM_u_${$} +uniform lowp float u_${$}_t; +attribute ${V} ${he} a_${$}; +#else +uniform ${V} ${j} u_${$}; +#endif +`:ce==="vec4"?` +#ifndef HAS_UNIFORM_u_${$} + ${V} ${j} ${$} = a_${$}; +#else + ${V} ${j} ${$} = u_${$}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${$} + ${V} ${j} ${$} = unpack_mix_${ce}(a_${$}, u_${$}_t); +#else + ${V} ${j} ${$} = u_${$}; +#endif +`}),staticAttributes:m,staticUniforms:T}}class yh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(a,f,m,g,b,T,L,A,N){this.context=a;let V=this.boundPaintVertexBuffers.length!==g.length;for(let j=0;!V&&j({u_depth:new l.aG(He,$e.u_depth),u_terrain:new l.aG(He,$e.u_terrain),u_terrain_dim:new l.aH(He,$e.u_terrain_dim),u_terrain_matrix:new l.aI(He,$e.u_terrain_matrix),u_terrain_unpack:new l.aJ(He,$e.u_terrain_unpack),u_terrain_exaggeration:new l.aH(He,$e.u_terrain_exaggeration)}))(a,Ve),this.binderUniforms=m?m.getUniforms(a,Ve):[]}draw(a,f,m,g,b,T,L,A,N,V,j,$,he,ce,ge,re,Ie,Be){const ve=a.gl;if(this.failedToCreate)return;if(a.program.set(this.program),a.setDepthMode(m),a.setStencilMode(g),a.setColorMode(b),a.setCullFace(T),A){a.activeTexture.set(ve.TEXTURE2),ve.bindTexture(ve.TEXTURE_2D,A.depthTexture),a.activeTexture.set(ve.TEXTURE3),ve.bindTexture(ve.TEXTURE_2D,A.texture);for(const Ve in this.terrainUniforms)this.terrainUniforms[Ve].set(A[Ve])}for(const Ve in this.fixedUniforms)this.fixedUniforms[Ve].set(L[Ve]);ge&&ge.setUniforms(a,this.binderUniforms,he,{zoom:ce});let De=0;switch(f){case ve.LINES:De=2;break;case ve.TRIANGLES:De=3;break;case ve.LINE_STRIP:De=1}for(const Ve of $.get()){const He=Ve.vaos||(Ve.vaos={});(He[N]||(He[N]=new yh)).bind(a,this,V,ge?ge.getPaintVertexBuffers():[],j,Ve.vertexOffset,re,Ie,Be),ve.drawElements(f,Ve.primitiveLength*De,ve.UNSIGNED_SHORT,Ve.primitiveOffset*De*2)}}}function vh(y,a,f){const m=1/tn(f,1,a.transform.tileZoom),g=Math.pow(2,f.tileID.overscaledZ),b=f.tileSize*Math.pow(2,a.transform.tileZoom)/g,T=b*(f.tileID.canonical.x+f.tileID.wrap*g),L=b*f.tileID.canonical.y;return{u_image:0,u_texsize:f.imageAtlasTexture.size,u_scale:[m,y.fromScale,y.toScale],u_fade:y.t,u_pixel_coord_upper:[T>>16,L>>16],u_pixel_coord_lower:[65535&T,65535&L]}}const bc=(y,a,f,m)=>{const g=a.style.light,b=g.properties.get("position"),T=[b.x,b.y,b.z],L=function(){var N=new l.A(9);return l.A!=Float32Array&&(N[1]=0,N[2]=0,N[3]=0,N[5]=0,N[6]=0,N[7]=0),N[0]=1,N[4]=1,N[8]=1,N}();g.properties.get("anchor")==="viewport"&&function(N,V){var j=Math.sin(V),$=Math.cos(V);N[0]=$,N[1]=j,N[2]=0,N[3]=-j,N[4]=$,N[5]=0,N[6]=0,N[7]=0,N[8]=1}(L,-a.transform.angle),function(N,V,j){var $=V[0],he=V[1],ce=V[2];N[0]=$*j[0]+he*j[3]+ce*j[6],N[1]=$*j[1]+he*j[4]+ce*j[7],N[2]=$*j[2]+he*j[5]+ce*j[8]}(T,T,L);const A=g.properties.get("color");return{u_matrix:y,u_lightpos:T,u_lightintensity:g.properties.get("intensity"),u_lightcolor:[A.r,A.g,A.b],u_vertical_gradient:+f,u_opacity:m}},My=(y,a,f,m,g,b,T)=>l.e(bc(y,a,f,m),vh(b,a,T),{u_height_factor:-Math.pow(2,g.overscaledZ)/T.tileSize/8}),Am=y=>({u_matrix:y}),bh=(y,a,f,m)=>l.e(Am(y),vh(f,a,m)),Ay=(y,a)=>({u_matrix:y,u_world:a}),km=(y,a,f,m,g)=>l.e(bh(y,a,f,m),{u_world:g}),ky=(y,a,f,m)=>{const g=y.transform;let b,T;if(m.paint.get("circle-pitch-alignment")==="map"){const L=tn(f,1,g.zoom);b=!0,T=[L,L]}else b=!1,T=g.pixelsToGLUnits;return{u_camera_to_center_distance:g.cameraToCenterDistance,u_scale_with_map:+(m.paint.get("circle-pitch-scale")==="map"),u_matrix:y.translatePosMatrix(a.posMatrix,f,m.paint.get("circle-translate"),m.paint.get("circle-translate-anchor")),u_pitch_with_map:+b,u_device_pixel_ratio:y.pixelRatio,u_extrude_scale:T}},Dm=(y,a,f)=>{const m=tn(f,1,a.zoom),g=Math.pow(2,a.zoom-f.tileID.overscaledZ),b=f.tileID.overscaleFactor();return{u_matrix:y,u_camera_to_center_distance:a.cameraToCenterDistance,u_pixels_to_tile_units:m,u_extrude_scale:[a.pixelsToGLUnits[0]/(m*g),a.pixelsToGLUnits[1]/(m*g)],u_overscale_factor:b}},Rm=(y,a,f=1)=>({u_matrix:y,u_color:a,u_overlay:0,u_overlay_scale:f}),xh=y=>({u_matrix:y}),Nm=(y,a,f,m)=>({u_matrix:y,u_extrude_scale:tn(a,1,f),u_intensity:m});function Om(y,a){const f=Math.pow(2,a.canonical.z),m=a.canonical.y;return[new l.Y(0,m/f).toLngLat().lat,new l.Y(0,(m+1)/f).toLngLat().lat]}const wh=(y,a,f,m)=>{const g=y.transform;return{u_matrix:xc(y,a,f,m),u_ratio:1/tn(a,1,g.zoom),u_device_pixel_ratio:y.pixelRatio,u_units_to_pixels:[1/g.pixelsToGLUnits[0],1/g.pixelsToGLUnits[1]]}},zm=(y,a,f,m,g)=>l.e(wh(y,a,f,g),{u_image:0,u_image_height:m}),Bl=(y,a,f,m,g)=>{const b=y.transform,T=qo(a,b);return{u_matrix:xc(y,a,f,g),u_texsize:a.imageAtlasTexture.size,u_ratio:1/tn(a,1,b.zoom),u_device_pixel_ratio:y.pixelRatio,u_image:0,u_scale:[T,m.fromScale,m.toScale],u_fade:m.t,u_units_to_pixels:[1/b.pixelsToGLUnits[0],1/b.pixelsToGLUnits[1]]}},Sh=(y,a,f,m,g,b)=>{const T=y.lineAtlas,L=qo(a,y.transform),A=f.layout.get("line-cap")==="round",N=T.getDash(m.from,A),V=T.getDash(m.to,A),j=N.width*g.fromScale,$=V.width*g.toScale;return l.e(wh(y,a,f,b),{u_patternscale_a:[L/j,-N.height/2],u_patternscale_b:[L/$,-V.height/2],u_sdfgamma:T.width/(256*Math.min(j,$)*y.pixelRatio)/2,u_image:0,u_tex_y_a:N.y,u_tex_y_b:V.y,u_mix:g.t})};function qo(y,a){return 1/tn(y,1,a.tileZoom)}function xc(y,a,f,m){return y.translatePosMatrix(m?m.posMatrix:a.tileID.posMatrix,a,f.paint.get("line-translate"),f.paint.get("line-translate-anchor"))}const Eh=(y,a,f,m,g)=>{return{u_matrix:y,u_tl_parent:a,u_scale_parent:f,u_buffer_scale:1,u_fade_t:m.mix,u_opacity:m.opacity*g.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:g.paint.get("raster-brightness-min"),u_brightness_high:g.paint.get("raster-brightness-max"),u_saturation_factor:(T=g.paint.get("raster-saturation"),T>0?1-1/(1.001-T):-T),u_contrast_factor:(b=g.paint.get("raster-contrast"),b>0?1/(1-b):1+b),u_spin_weights:wc(g.paint.get("raster-hue-rotate"))};var b,T};function wc(y){y*=Math.PI/180;const a=Math.sin(y),f=Math.cos(y);return[(2*f+1)/3,(-Math.sqrt(3)*a-f+1)/3,(Math.sqrt(3)*a-f+1)/3]}const Sc=(y,a,f,m,g,b,T,L,A,N)=>{const V=g.transform;return{u_is_size_zoom_constant:+(y==="constant"||y==="source"),u_is_size_feature_constant:+(y==="constant"||y==="camera"),u_size_t:a?a.uSizeT:0,u_size:a?a.uSize:0,u_camera_to_center_distance:V.cameraToCenterDistance,u_pitch:V.pitch/360*2*Math.PI,u_rotate_symbol:+f,u_aspect_ratio:V.width/V.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_matrix:b,u_label_plane_matrix:T,u_coord_matrix:L,u_is_text:+A,u_pitch_with_map:+m,u_texsize:N,u_texture:0}},Ec=(y,a,f,m,g,b,T,L,A,N,V)=>{const j=g.transform;return l.e(Sc(y,a,f,m,g,b,T,L,A,N),{u_gamma_scale:m?Math.cos(j._pitch)*j.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:+V})},Ic=(y,a,f,m,g,b,T,L,A,N)=>l.e(Ec(y,a,f,m,g,b,T,L,!0,A,!0),{u_texsize_icon:N,u_texture_icon:1}),Dy=(y,a,f)=>({u_matrix:y,u_opacity:a,u_color:f}),Ry=(y,a,f,m,g,b)=>l.e(function(T,L,A,N){const V=A.imageManager.getPattern(T.from.toString()),j=A.imageManager.getPattern(T.to.toString()),{width:$,height:he}=A.imageManager.getPixelSize(),ce=Math.pow(2,N.tileID.overscaledZ),ge=N.tileSize*Math.pow(2,A.transform.tileZoom)/ce,re=ge*(N.tileID.canonical.x+N.tileID.wrap*ce),Ie=ge*N.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:V.tl,u_pattern_br_a:V.br,u_pattern_tl_b:j.tl,u_pattern_br_b:j.br,u_texsize:[$,he],u_mix:L.t,u_pattern_size_a:V.displaySize,u_pattern_size_b:j.displaySize,u_scale_a:L.fromScale,u_scale_b:L.toScale,u_tile_units_to_pixels:1/tn(N,1,A.transform.tileZoom),u_pixel_coord_upper:[re>>16,Ie>>16],u_pixel_coord_lower:[65535&re,65535&Ie]}}(m,b,f,g),{u_matrix:y,u_opacity:a}),Fm={fillExtrusion:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_opacity:new l.aH(y,a.u_opacity)}),fillExtrusionPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_lightpos:new l.aK(y,a.u_lightpos),u_lightintensity:new l.aH(y,a.u_lightintensity),u_lightcolor:new l.aK(y,a.u_lightcolor),u_vertical_gradient:new l.aH(y,a.u_vertical_gradient),u_height_factor:new l.aH(y,a.u_height_factor),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade),u_opacity:new l.aH(y,a.u_opacity)}),fill:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),fillPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),fillOutline:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world)}),fillOutlinePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_texsize:new l.aL(y,a.u_texsize),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),circle:(y,a)=>({u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_scale_with_map:new l.aG(y,a.u_scale_with_map),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_matrix:new l.aI(y,a.u_matrix)}),collisionBox:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pixels_to_tile_units:new l.aH(y,a.u_pixels_to_tile_units),u_extrude_scale:new l.aL(y,a.u_extrude_scale),u_overscale_factor:new l.aH(y,a.u_overscale_factor)}),collisionCircle:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_inv_matrix:new l.aI(y,a.u_inv_matrix),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_viewport_size:new l.aL(y,a.u_viewport_size)}),debug:(y,a)=>({u_color:new l.aM(y,a.u_color),u_matrix:new l.aI(y,a.u_matrix),u_overlay:new l.aG(y,a.u_overlay),u_overlay_scale:new l.aH(y,a.u_overlay_scale)}),clippingMask:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix)}),heatmap:(y,a)=>({u_extrude_scale:new l.aH(y,a.u_extrude_scale),u_intensity:new l.aH(y,a.u_intensity),u_matrix:new l.aI(y,a.u_matrix)}),heatmapTexture:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_world:new l.aL(y,a.u_world),u_image:new l.aG(y,a.u_image),u_color_ramp:new l.aG(y,a.u_color_ramp),u_opacity:new l.aH(y,a.u_opacity)}),hillshade:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_latrange:new l.aL(y,a.u_latrange),u_light:new l.aL(y,a.u_light),u_shadow:new l.aM(y,a.u_shadow),u_highlight:new l.aM(y,a.u_highlight),u_accent:new l.aM(y,a.u_accent)}),hillshadePrepare:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_image:new l.aG(y,a.u_image),u_dimension:new l.aL(y,a.u_dimension),u_zoom:new l.aH(y,a.u_zoom),u_unpack:new l.aJ(y,a.u_unpack)}),line:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels)}),lineGradient:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_image:new l.aG(y,a.u_image),u_image_height:new l.aH(y,a.u_image_height)}),linePattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texsize:new l.aL(y,a.u_texsize),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_image:new l.aG(y,a.u_image),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_scale:new l.aK(y,a.u_scale),u_fade:new l.aH(y,a.u_fade)}),lineSDF:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ratio:new l.aH(y,a.u_ratio),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_units_to_pixels:new l.aL(y,a.u_units_to_pixels),u_patternscale_a:new l.aL(y,a.u_patternscale_a),u_patternscale_b:new l.aL(y,a.u_patternscale_b),u_sdfgamma:new l.aH(y,a.u_sdfgamma),u_image:new l.aG(y,a.u_image),u_tex_y_a:new l.aH(y,a.u_tex_y_a),u_tex_y_b:new l.aH(y,a.u_tex_y_b),u_mix:new l.aH(y,a.u_mix)}),raster:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_tl_parent:new l.aL(y,a.u_tl_parent),u_scale_parent:new l.aH(y,a.u_scale_parent),u_buffer_scale:new l.aH(y,a.u_buffer_scale),u_fade_t:new l.aH(y,a.u_fade_t),u_opacity:new l.aH(y,a.u_opacity),u_image0:new l.aG(y,a.u_image0),u_image1:new l.aG(y,a.u_image1),u_brightness_low:new l.aH(y,a.u_brightness_low),u_brightness_high:new l.aH(y,a.u_brightness_high),u_saturation_factor:new l.aH(y,a.u_saturation_factor),u_contrast_factor:new l.aH(y,a.u_contrast_factor),u_spin_weights:new l.aK(y,a.u_spin_weights)}),symbolIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture)}),symbolSDF:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texture:new l.aG(y,a.u_texture),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),symbolTextAndIcon:(y,a)=>({u_is_size_zoom_constant:new l.aG(y,a.u_is_size_zoom_constant),u_is_size_feature_constant:new l.aG(y,a.u_is_size_feature_constant),u_size_t:new l.aH(y,a.u_size_t),u_size:new l.aH(y,a.u_size),u_camera_to_center_distance:new l.aH(y,a.u_camera_to_center_distance),u_pitch:new l.aH(y,a.u_pitch),u_rotate_symbol:new l.aG(y,a.u_rotate_symbol),u_aspect_ratio:new l.aH(y,a.u_aspect_ratio),u_fade_change:new l.aH(y,a.u_fade_change),u_matrix:new l.aI(y,a.u_matrix),u_label_plane_matrix:new l.aI(y,a.u_label_plane_matrix),u_coord_matrix:new l.aI(y,a.u_coord_matrix),u_is_text:new l.aG(y,a.u_is_text),u_pitch_with_map:new l.aG(y,a.u_pitch_with_map),u_texsize:new l.aL(y,a.u_texsize),u_texsize_icon:new l.aL(y,a.u_texsize_icon),u_texture:new l.aG(y,a.u_texture),u_texture_icon:new l.aG(y,a.u_texture_icon),u_gamma_scale:new l.aH(y,a.u_gamma_scale),u_device_pixel_ratio:new l.aH(y,a.u_device_pixel_ratio),u_is_halo:new l.aG(y,a.u_is_halo)}),background:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_color:new l.aM(y,a.u_color)}),backgroundPattern:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_opacity:new l.aH(y,a.u_opacity),u_image:new l.aG(y,a.u_image),u_pattern_tl_a:new l.aL(y,a.u_pattern_tl_a),u_pattern_br_a:new l.aL(y,a.u_pattern_br_a),u_pattern_tl_b:new l.aL(y,a.u_pattern_tl_b),u_pattern_br_b:new l.aL(y,a.u_pattern_br_b),u_texsize:new l.aL(y,a.u_texsize),u_mix:new l.aH(y,a.u_mix),u_pattern_size_a:new l.aL(y,a.u_pattern_size_a),u_pattern_size_b:new l.aL(y,a.u_pattern_size_b),u_scale_a:new l.aH(y,a.u_scale_a),u_scale_b:new l.aH(y,a.u_scale_b),u_pixel_coord_upper:new l.aL(y,a.u_pixel_coord_upper),u_pixel_coord_lower:new l.aL(y,a.u_pixel_coord_lower),u_tile_units_to_pixels:new l.aH(y,a.u_tile_units_to_pixels)}),terrain:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainDepth:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_ele_delta:new l.aH(y,a.u_ele_delta)}),terrainCoords:(y,a)=>({u_matrix:new l.aI(y,a.u_matrix),u_texture:new l.aG(y,a.u_texture),u_terrain_coords_id:new l.aH(y,a.u_terrain_coords_id),u_ele_delta:new l.aH(y,a.u_ele_delta)})};class Ny{constructor(a,f,m){this.context=a;const g=a.gl;this.buffer=g.createBuffer(),this.dynamicDraw=!!m,this.context.unbindVAO(),a.bindElementBuffer.set(this.buffer),g.bufferData(g.ELEMENT_ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?g.DYNAMIC_DRAW:g.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(a){const f=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),f.bufferSubData(f.ELEMENT_ARRAY_BUFFER,0,a.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Vl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Ih{constructor(a,f,m,g){this.length=f.length,this.attributes=m,this.itemSize=f.bytesPerElement,this.dynamicDraw=g,this.context=a;const b=a.gl;this.buffer=b.createBuffer(),a.bindVertexBuffer.set(this.buffer),b.bufferData(b.ARRAY_BUFFER,f.arrayBuffer,this.dynamicDraw?b.DYNAMIC_DRAW:b.STATIC_DRAW),this.dynamicDraw||delete f.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(a){if(a.length!==this.length)throw new Error(`Length of new data is ${a.length}, which doesn't match current length of ${this.length}`);const f=this.context.gl;this.bind(),f.bufferSubData(f.ARRAY_BUFFER,0,a.arrayBuffer)}enableAttributes(a,f){for(let m=0;m0){const ct=l.F(),pt=$e;l.aP(ct,He.placementInvProjMatrix,y.transform.glCoordMatrix),l.aP(ct,ct,He.placementViewportMatrix),V.push({circleArray:nt,circleOffset:$,transform:pt,invTransform:ct,coord:De}),j+=nt.length/4,$=j}rt&&N.draw(L,A.LINES,An.disabled,mr.disabled,y.colorModeForRenderPass(),lr.disabled,Dm($e,y.transform,Ve),y.style.map.terrain&&y.style.map.terrain.getTerrainData(De),f.id,rt.layoutVertexBuffer,rt.indexBuffer,rt.segments,null,y.transform.zoom,null,null,rt.collisionVertexBuffer)}if(!T||!V.length)return;const he=y.useProgram("collisionCircle"),ce=new l.aQ;ce.resize(4*j),ce._trim();let ge=0;for(const ve of V)for(let De=0;De=0&&(ce[re.associatedIconIndex]={shiftedAnchor:un,angle:gt})}else Je(re.numGlyphs,$)}if(N){he.clear();const ge=y.icon.placedSymbolArray;for(let re=0;rey.style.map.terrain.getElevation(rt,ps,di):null,kr=f.layout.get("text-rotation-alignment")==="map";Z(ct,rt.posMatrix,y,g,Ho,na,re,N,kr,pi)}const ul=y.translatePosMatrix(rt.posMatrix,nt,b,T),ra=Ie||g&&He||Bc?Mp:Ho,fi=y.translatePosMatrix(na,nt,b,T,!0),Ar=gt&&f.paint.get(g?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let xr;xr=gt?ct.iconsInText?Ic(Ht.kind,Jt,Be,re,y,ul,ra,fi,bn,yi):Ec(Ht.kind,Jt,Be,re,y,ul,ra,fi,g,bn,!0):Sc(Ht.kind,Jt,Be,re,y,ul,ra,fi,g,bn);const fs={program:kn,buffers:pt,uniformValues:xr,atlasTexture:Ur,atlasTextureIcon:Mr,atlasInterpolation:Jn,atlasInterpolationIcon:Wo,isSDF:gt,hasHalo:Ar};if(ve&&ct.canOverlap){De=!0;const pi=pt.segments.get();for(const kr of pi)$e.push({segments:new l.$([kr]),sortKey:kr.sortKey,state:fs,terrainData:mn})}else $e.push({segments:pt.segments,sortKey:0,state:fs,terrainData:mn})}De&&$e.sort((rt,nt)=>rt.sortKey-nt.sortKey);for(const rt of $e){const nt=rt.state;if($.activeTexture.set(he.TEXTURE0),nt.atlasTexture.bind(nt.atlasInterpolation,he.CLAMP_TO_EDGE),nt.atlasTextureIcon&&($.activeTexture.set(he.TEXTURE1),nt.atlasTextureIcon&&nt.atlasTextureIcon.bind(nt.atlasInterpolationIcon,he.CLAMP_TO_EDGE)),nt.isSDF){const ct=nt.uniformValues;nt.hasHalo&&(ct.u_is_halo=1,Zm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,ct,rt.terrainData)),ct.u_is_halo=0}Zm(nt.buffers,rt.segments,f,y,nt.program,Ve,V,j,nt.uniformValues,rt.terrainData)}}function Zm(y,a,f,m,g,b,T,L,A,N){const V=m.context;g.draw(V,V.gl.TRIANGLES,b,T,L,lr.disabled,A,N,f.id,y.layoutVertexBuffer,y.indexBuffer,a,f.paint,m.transform.zoom,y.programConfigurations.get(f.id),y.dynamicLayoutVertexBuffer,y.opacityVertexBuffer)}function Oh(y,a,f,m,g){if(!f||!m||!m.imageAtlas)return;const b=m.imageAtlas.patternPositions;let T=b[f.to.toString()],L=b[f.from.toString()];if(!T&&L&&(T=L),!L&&T&&(L=T),!T||!L){const A=g.getPaintProperty(a);T=b[A],L=b[A]}T&&L&&y.setConstantPatternPositions(T,L)}function Xm(y,a,f,m,g,b,T){const L=y.context.gl,A="fill-pattern",N=f.paint.get(A),V=N&&N.constantOr(1),j=f.getCrossfadeParameters();let $,he,ce,ge,re;T?(he=V&&!f.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",$=L.LINES):(he=V?"fillPattern":"fill",$=L.TRIANGLES);const Ie=N.constantOr(null);for(const Be of m){const ve=a.getTile(Be);if(V&&!ve.patternsLoaded())continue;const De=ve.getBucket(f);if(!De)continue;const Ve=De.programConfigurations.get(f.id),He=y.useProgram(he,Ve),$e=y.style.map.terrain&&y.style.map.terrain.getTerrainData(Be);V&&(y.context.activeTexture.set(L.TEXTURE0),ve.imageAtlasTexture.bind(L.LINEAR,L.CLAMP_TO_EDGE),Ve.updatePaintBuffers(j)),Oh(Ve,A,Ie,ve,f);const rt=$e?Be:null,nt=y.translatePosMatrix(rt?rt.posMatrix:Be.posMatrix,ve,f.paint.get("fill-translate"),f.paint.get("fill-translate-anchor"));if(T){ge=De.indexBuffer2,re=De.segments2;const ct=[L.drawingBufferWidth,L.drawingBufferHeight];ce=he==="fillOutlinePattern"&&V?km(nt,y,j,ve,ct):Ay(nt,ct)}else ge=De.indexBuffer,re=De.segments,ce=V?bh(nt,y,j,ve):Am(nt);He.draw(y.context,$,g,y.stencilModeForClipping(Be),b,lr.disabled,ce,$e,f.id,De.layoutVertexBuffer,ge,re,f.paint,y.transform.zoom,Ve)}}function zh(y,a,f,m,g,b,T){const L=y.context,A=L.gl,N="fill-extrusion-pattern",V=f.paint.get(N),j=V.constantOr(1),$=f.getCrossfadeParameters(),he=f.paint.get("fill-extrusion-opacity"),ce=V.constantOr(null);for(const ge of m){const re=a.getTile(ge),Ie=re.getBucket(f);if(!Ie)continue;const Be=y.style.map.terrain&&y.style.map.terrain.getTerrainData(ge),ve=Ie.programConfigurations.get(f.id),De=y.useProgram(j?"fillExtrusionPattern":"fillExtrusion",ve);j&&(y.context.activeTexture.set(A.TEXTURE0),re.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),ve.updatePaintBuffers($)),Oh(ve,N,ce,re,f);const Ve=y.translatePosMatrix(ge.posMatrix,re,f.paint.get("fill-extrusion-translate"),f.paint.get("fill-extrusion-translate-anchor")),He=f.paint.get("fill-extrusion-vertical-gradient"),$e=j?My(Ve,y,He,he,ge,$,re):bc(Ve,y,He,he);De.draw(L,L.gl.TRIANGLES,g,b,T,lr.backCCW,$e,Be,f.id,Ie.layoutVertexBuffer,Ie.indexBuffer,Ie.segments,f.paint,y.transform.zoom,ve,y.style.map.terrain&&Ie.centroidVertexBuffer)}}function Fh(y,a,f,m,g,b,T){const L=y.context,A=L.gl,N=f.fbo;if(!N)return;const V=y.useProgram("hillshade"),j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(a);L.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,N.colorAttachment.get()),V.draw(L,A.TRIANGLES,g,b,T,lr.disabled,(($,he,ce,ge)=>{const re=ce.paint.get("hillshade-shadow-color"),Ie=ce.paint.get("hillshade-highlight-color"),Be=ce.paint.get("hillshade-accent-color");let ve=ce.paint.get("hillshade-illumination-direction")*(Math.PI/180);ce.paint.get("hillshade-illumination-anchor")==="viewport"&&(ve-=$.transform.angle);const De=!$.options.moving;return{u_matrix:ge?ge.posMatrix:$.transform.calculatePosMatrix(he.tileID.toUnwrapped(),De),u_image:0,u_latrange:Om(0,he.tileID),u_light:[ce.paint.get("hillshade-exaggeration"),ve],u_shadow:re,u_highlight:Ie,u_accent:Be}})(y,f,m,j?a:null),j,m.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments)}function Ap(y,a,f,m,g,b){const T=y.context,L=T.gl,A=a.dem;if(A&&A.data){const N=A.dim,V=A.stride,j=A.getPixels();if(T.activeTexture.set(L.TEXTURE1),T.pixelStoreUnpackPremultiplyAlpha.set(!1),a.demTexture=a.demTexture||y.getTileTexture(V),a.demTexture){const he=a.demTexture;he.update(j,{premultiply:!1}),he.bind(L.NEAREST,L.CLAMP_TO_EDGE)}else a.demTexture=new Y(T,j,L.RGBA,{premultiply:!1}),a.demTexture.bind(L.NEAREST,L.CLAMP_TO_EDGE);T.activeTexture.set(L.TEXTURE0);let $=a.fbo;if(!$){const he=new Y(T,{width:N,height:N,data:null},L.RGBA);he.bind(L.LINEAR,L.CLAMP_TO_EDGE),$=a.fbo=T.createFramebuffer(N,N,!0,!1),$.colorAttachment.set(he.texture)}T.bindFramebuffer.set($.framebuffer),T.viewport.set([0,0,N,N]),y.useProgram("hillshadePrepare").draw(T,L.TRIANGLES,m,g,b,lr.disabled,((he,ce)=>{const ge=ce.stride,re=l.F();return l.aN(re,0,l.W,-l.W,0,0,1),l.H(re,re,[0,-l.W,0]),{u_matrix:re,u_image:1,u_dimension:[ge,ge],u_zoom:he.overscaledZ,u_unpack:ce.getUnpackVector()}})(a.tileID,A),null,f.id,y.rasterBoundsBuffer,y.quadTriangleIndexBuffer,y.rasterBoundsSegments),a.needsHillshadePrepare=!1}}function Ym(y,a,f,m,g,b){const T=m.paint.get("raster-fade-duration");if(!b&&T>0){const L=E.now(),A=(L-y.timeAdded)/T,N=a?(L-a.timeAdded)/T:-1,V=f.getSource(),j=g.coveringZoomLevel({tileSize:V.tileSize,roundZoom:V.roundZoom}),$=!a||Math.abs(a.tileID.overscaledZ-j)>Math.abs(y.tileID.overscaledZ-j),he=$&&y.refreshedUponExpiration?1:l.ac($?A:1-N,0,1);return y.refreshedUponExpiration&&A>=1&&(y.refreshedUponExpiration=!1),a?{opacity:1,mix:1-he}:{opacity:he,mix:0}}return{opacity:1,mix:0}}const $m=new l.aO(1,0,0,1),Bh=new l.aO(0,1,0,1),kp=new l.aO(0,0,1,1),qy=new l.aO(1,0,1,1),Km=new l.aO(0,1,1,1);function Br(y,a,f,m){ho(y,0,a+f/2,y.transform.width,f,m)}function il(y,a,f,m){ho(y,a-f/2,0,f,y.transform.height,m)}function ho(y,a,f,m,g,b){const T=y.context,L=T.gl;L.enable(L.SCISSOR_TEST),L.scissor(a*y.pixelRatio,f*y.pixelRatio,m*y.pixelRatio,g*y.pixelRatio),T.clear({color:b}),L.disable(L.SCISSOR_TEST)}function Dp(y,a,f){const m=y.context,g=m.gl,b=f.posMatrix,T=y.useProgram("debug"),L=An.disabled,A=mr.disabled,N=y.colorModeForRenderPass(),V="$debug",j=y.style.map.terrain&&y.style.map.terrain.getTerrainData(f);m.activeTexture.set(g.TEXTURE0);const $=a.getTileByID(f.key).latestRawTileData,he=Math.floor(($&&$.byteLength||0)/1024),ce=a.getTile(f).tileSize,ge=512/Math.min(ce,512)*(f.overscaledZ/y.transform.zoom)*.5;let re=f.canonical.toString();f.overscaledZ!==f.canonical.z&&(re+=` => ${f.overscaledZ}`),function(Ie,Be){Ie.initDebugOverlayCanvas();const ve=Ie.debugOverlayCanvas,De=Ie.context.gl,Ve=Ie.debugOverlayCanvas.getContext("2d");Ve.clearRect(0,0,ve.width,ve.height),Ve.shadowColor="white",Ve.shadowBlur=2,Ve.lineWidth=1.5,Ve.strokeStyle="white",Ve.textBaseline="top",Ve.font="bold 36px Open Sans, sans-serif",Ve.fillText(Be,5,5),Ve.strokeText(Be,5,5),Ie.debugOverlayTexture.update(ve),Ie.debugOverlayTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE)}(y,`${re} ${he}kB`),T.draw(m,g.TRIANGLES,L,A,Qr.alphaBlended,lr.disabled,Rm(b,l.aO.transparent,ge),null,V,y.debugBuffer,y.quadTriangleIndexBuffer,y.debugSegments),T.draw(m,g.LINE_STRIP,L,A,N,lr.disabled,Rm(b,l.aO.red),j,V,y.debugBuffer,y.tileBorderIndexBuffer,y.debugSegments)}function Vh(y,a,f){const m=y.context,g=m.gl,b=y.colorModeForRenderPass(),T=new An(g.LEQUAL,An.ReadWrite,y.depthRangeFor3D),L=y.useProgram("terrain"),A=a.getTerrainMesh();m.bindFramebuffer.set(null),m.viewport.set([0,0,y.width,y.height]);for(const N of f){const V=y.renderToTexture.getTexture(N),j=a.getTerrainData(N.tileID);m.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,V.texture);const $={u_matrix:y.transform.calculatePosMatrix(N.tileID.toUnwrapped()),u_texture:0,u_ele_delta:a.getMeshFrameDelta(y.transform.zoom)};L.draw(m,g.TRIANGLES,T,mr.disabled,b,lr.backCCW,$,j,"terrain",A.vertexBuffer,A.indexBuffer,A.segments)}}class Jm{constructor(a,f){this.context=new Gy(a),this.transform=f,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:l.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ui.maxUnderzooming+ui.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new nl}resize(a,f,m){if(this.width=Math.floor(a*m),this.height=Math.floor(f*m),this.pixelRatio=m,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const g of this.style._order)this.style._layers[g].resize()}setup(){const a=this.context,f=new l.aV;f.emplaceBack(0,0),f.emplaceBack(l.W,0),f.emplaceBack(0,l.W),f.emplaceBack(l.W,l.W),this.tileExtentBuffer=a.createVertexBuffer(f,_h.members),this.tileExtentSegments=l.$.simpleSegment(0,0,4,2);const m=new l.aV;m.emplaceBack(0,0),m.emplaceBack(l.W,0),m.emplaceBack(0,l.W),m.emplaceBack(l.W,l.W),this.debugBuffer=a.createVertexBuffer(m,_h.members),this.debugSegments=l.$.simpleSegment(0,0,4,5);const g=new l.Z;g.emplaceBack(0,0,0,0),g.emplaceBack(l.W,0,l.W,0),g.emplaceBack(0,l.W,0,l.W),g.emplaceBack(l.W,l.W,l.W,l.W),this.rasterBoundsBuffer=a.createVertexBuffer(g,yn.members),this.rasterBoundsSegments=l.$.simpleSegment(0,0,4,2);const b=new l.aV;b.emplaceBack(0,0),b.emplaceBack(1,0),b.emplaceBack(0,1),b.emplaceBack(1,1),this.viewportBuffer=a.createVertexBuffer(b,_h.members),this.viewportSegments=l.$.simpleSegment(0,0,4,2);const T=new l.aW;T.emplaceBack(0),T.emplaceBack(1),T.emplaceBack(3),T.emplaceBack(2),T.emplaceBack(0),this.tileBorderIndexBuffer=a.createIndexBuffer(T);const L=new l.aX;L.emplaceBack(0,1,2),L.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=a.createIndexBuffer(L);const A=this.context.gl;this.stencilClearMode=new mr({func:A.ALWAYS,mask:0},0,255,A.ZERO,A.ZERO,A.ZERO)}clearStencil(){const a=this.context,f=a.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const m=l.F();l.aN(m,0,this.width,this.height,0,0,1),l.J(m,m,[f.drawingBufferWidth,f.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(a,f.TRIANGLES,An.disabled,this.stencilClearMode,Qr.disabled,lr.disabled,xh(m),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(a,f){if(this.currentStencilSource===a.source||!a.isTileClipped()||!f||!f.length)return;this.currentStencilSource=a.source;const m=this.context,g=m.gl;this.nextStencilID+f.length>256&&this.clearStencil(),m.setColorMode(Qr.disabled),m.setDepthMode(An.disabled);const b=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const T of f){const L=this._tileClippingMaskIDs[T.key]=this.nextStencilID++,A=this.style.map.terrain&&this.style.map.terrain.getTerrainData(T);b.draw(m,g.TRIANGLES,An.disabled,new mr({func:g.ALWAYS,mask:0},L,255,g.KEEP,g.KEEP,g.REPLACE),Qr.disabled,lr.disabled,xh(T.posMatrix),A,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const a=this.nextStencilID++,f=this.context.gl;return new mr({func:f.NOTEQUAL,mask:255},a,255,f.KEEP,f.KEEP,f.REPLACE)}stencilModeForClipping(a){const f=this.context.gl;return new mr({func:f.EQUAL,mask:255},this._tileClippingMaskIDs[a.key],0,f.KEEP,f.KEEP,f.REPLACE)}stencilConfigForOverlap(a){const f=this.context.gl,m=a.sort((T,L)=>L.overscaledZ-T.overscaledZ),g=m[m.length-1].overscaledZ,b=m[0].overscaledZ-g+1;if(b>1){this.currentStencilSource=void 0,this.nextStencilID+b>256&&this.clearStencil();const T={};for(let L=0;L=0;this.currentLayer--){const A=this.style._layers[m[this.currentLayer]],N=g[A.source],V=b[A.source];this._renderTileClippingMasks(A,V),this.renderLayer(this,N,A,V)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerre.source&&!re.isHidden(V)?[N.sourceCaches[re.source]]:[]),he=$.filter(re=>re.getSource().type==="vector"),ce=$.filter(re=>re.getSource().type!=="vector"),ge=re=>{(!j||j.getSource().maxzoomge(re)),j||ce.forEach(re=>ge(re)),j}(this.style,this.transform.zoom);A&&function(N,V,j){for(let $=0;$0),g&&(l.a_(f,m),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(b,T){const L=b.context,A=L.gl,N=Qr.unblended,V=new An(A.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.sourceCache.getRenderableTiles(),he=b.useProgram("terrainDepth");L.bindFramebuffer.set(T.getFramebuffer("depth").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1});for(const ce of $){const ge=T.getTerrainData(ce.tileID),re={u_matrix:b.transform.calculatePosMatrix(ce.tileID.toUnwrapped()),u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};he.draw(L,A.TRIANGLES,V,mr.disabled,N,lr.backCCW,re,ge,"terrain",j.vertexBuffer,j.indexBuffer,j.segments)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain),function(b,T){const L=b.context,A=L.gl,N=Qr.unblended,V=new An(A.LEQUAL,An.ReadWrite,[0,1]),j=T.getTerrainMesh(),$=T.getCoordsTexture(),he=T.sourceCache.getRenderableTiles(),ce=b.useProgram("terrainCoords");L.bindFramebuffer.set(T.getFramebuffer("coords").framebuffer),L.viewport.set([0,0,b.width/devicePixelRatio,b.height/devicePixelRatio]),L.clear({color:l.aO.transparent,depth:1}),T.coordsIndex=[];for(const ge of he){const re=T.getTerrainData(ge.tileID);L.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,$.texture);const Ie={u_matrix:b.transform.calculatePosMatrix(ge.tileID.toUnwrapped()),u_terrain_coords_id:(255-T.coordsIndex.length)/255,u_texture:0,u_ele_delta:T.getMeshFrameDelta(b.transform.zoom)};ce.draw(L,A.TRIANGLES,V,mr.disabled,N,lr.backCCW,Ie,re,"terrain",j.vertexBuffer,j.indexBuffer,j.segments),T.coordsIndex.push(ge.tileID.key)}L.bindFramebuffer.set(null),L.viewport.set([0,0,b.width,b.height])}(this,this.style.map.terrain))}renderLayer(a,f,m,g){if(!m.isHidden(this.transform.zoom)&&(m.type==="background"||m.type==="custom"||(g||[]).length))switch(this.id=m.id,m.type){case"symbol":(function(b,T,L,A,N){if(b.renderPass!=="translucent")return;const V=mr.disabled,j=b.colorModeForRenderPass();(L._unevaluatedLayout.hasValue("text-variable-anchor")||L._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function($,he,ce,ge,re,Ie,Be){const ve=he.transform,De=re==="map",Ve=Ie==="map";for(const He of $){const $e=ge.getTile(He),rt=$e.getBucket(ce);if(!rt||!rt.text||!rt.text.segments.get().length)continue;const nt=l.ag(rt.textSizeData,ve.zoom),ct=tn($e,1,he.transform.zoom),pt=on(He.posMatrix,Ve,De,he.transform,ct),un=ce.layout.get("icon-text-fit")!=="none"&&rt.hasIconData();if(nt){const gt=Math.pow(2,ve.zoom-$e.tileID.overscaledZ);Dh(rt,De,Ve,Be,ve,pt,He.posMatrix,gt,nt,un,he.style.map.terrain?(Ht,cn)=>he.style.map.terrain.getElevation(He,Ht,cn):null)}}}(A,b,L,T,L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),N),L.paint.get("icon-opacity").constantOr(1)!==0&&Nh(b,T,L,A,!1,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),L.layout.get("icon-rotation-alignment"),L.layout.get("icon-pitch-alignment"),L.layout.get("icon-keep-upright"),V,j),L.paint.get("text-opacity").constantOr(1)!==0&&Nh(b,T,L,A,!0,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),L.layout.get("text-rotation-alignment"),L.layout.get("text-pitch-alignment"),L.layout.get("text-keep-upright"),V,j),T.map.showCollisionBoxes&&(kh(b,T,L,A,L.paint.get("text-translate"),L.paint.get("text-translate-anchor"),!0),kh(b,T,L,A,L.paint.get("icon-translate"),L.paint.get("icon-translate-anchor"),!1))})(a,f,m,g,this.style.placement.variableOffsets);break;case"circle":(function(b,T,L,A){if(b.renderPass!=="translucent")return;const N=L.paint.get("circle-opacity"),V=L.paint.get("circle-stroke-width"),j=L.paint.get("circle-stroke-opacity"),$=!L.layout.get("circle-sort-key").isConstant();if(N.constantOr(1)===0&&(V.constantOr(1)===0||j.constantOr(1)===0))return;const he=b.context,ce=he.gl,ge=b.depthModeForSublayer(0,An.ReadOnly),re=mr.disabled,Ie=b.colorModeForRenderPass(),Be=[];for(let ve=0;veve.sortKey-De.sortKey);for(const ve of Be){const{programConfiguration:De,program:Ve,layoutVertexBuffer:He,indexBuffer:$e,uniformValues:rt,terrainData:nt}=ve.state;Ve.draw(he,ce.TRIANGLES,ge,re,Ie,lr.disabled,rt,nt,L.id,He,$e,ve.segments,L.paint,b.transform.zoom,De)}})(a,f,m,g);break;case"heatmap":(function(b,T,L,A){if(L.paint.get("heatmap-opacity")!==0)if(b.renderPass==="offscreen"){const N=b.context,V=N.gl,j=mr.disabled,$=new Qr([V.ONE,V.ONE],l.aO.transparent,[!0,!0,!0,!0]);(function(he,ce,ge){const re=he.gl;he.activeTexture.set(re.TEXTURE1),he.viewport.set([0,0,ce.width/4,ce.height/4]);let Ie=ge.heatmapFbo;if(Ie)re.bindTexture(re.TEXTURE_2D,Ie.colorAttachment.get()),he.bindFramebuffer.set(Ie.framebuffer);else{const Be=re.createTexture();re.bindTexture(re.TEXTURE_2D,Be),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_S,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_WRAP_T,re.CLAMP_TO_EDGE),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MIN_FILTER,re.LINEAR),re.texParameteri(re.TEXTURE_2D,re.TEXTURE_MAG_FILTER,re.LINEAR),Ie=ge.heatmapFbo=he.createFramebuffer(ce.width/4,ce.height/4,!1,!1),function(ve,De,Ve,He){var $e,rt;const nt=ve.gl,ct=($e=ve.HALF_FLOAT)!==null&&$e!==void 0?$e:nt.UNSIGNED_BYTE,pt=(rt=ve.RGBA16F)!==null&&rt!==void 0?rt:nt.RGBA;nt.texImage2D(nt.TEXTURE_2D,0,pt,De.width/4,De.height/4,0,nt.RGBA,ct,null),He.colorAttachment.set(Ve)}(he,ce,Be,Ie)}})(N,b,L),N.clear({color:l.aO.transparent});for(let he=0;he{const ve=l.F();l.aN(ve,0,ge.width,ge.height,0,0,1);const De=ge.context.gl;return{u_matrix:ve,u_world:[De.drawingBufferWidth,De.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:re.paint.get("heatmap-opacity")}})(N,V),null,V.id,N.viewportBuffer,N.quadTriangleIndexBuffer,N.viewportSegments,V.paint,N.transform.zoom)}(b,L))})(a,f,m,g);break;case"line":(function(b,T,L,A){if(b.renderPass!=="translucent")return;const N=L.paint.get("line-opacity"),V=L.paint.get("line-width");if(N.constantOr(1)===0||V.constantOr(1)===0)return;const j=b.depthModeForSublayer(0,An.ReadOnly),$=b.colorModeForRenderPass(),he=L.paint.get("line-dasharray"),ce=L.paint.get("line-pattern"),ge=ce.constantOr(1),re=L.paint.get("line-gradient"),Ie=L.getCrossfadeParameters(),Be=ge?"linePattern":he?"lineSDF":re?"lineGradient":"line",ve=b.context,De=ve.gl;let Ve=!0;for(const He of A){const $e=T.getTile(He);if(ge&&!$e.patternsLoaded())continue;const rt=$e.getBucket(L);if(!rt)continue;const nt=rt.programConfigurations.get(L.id),ct=b.context.program.get(),pt=b.useProgram(Be,nt),un=Ve||pt.program!==ct,gt=b.style.map.terrain&&b.style.map.terrain.getTerrainData(He),Ht=ce.constantOr(null);if(Ht&&$e.imageAtlas){const Jt=$e.imageAtlas,mn=Jt.patternPositions[Ht.to.toString()],bn=Jt.patternPositions[Ht.from.toString()];mn&&bn&&nt.setConstantPatternPositions(mn,bn)}const cn=gt?He:null,kn=ge?Bl(b,$e,L,Ie,cn):he?Sh(b,$e,L,he,Ie,cn):re?zm(b,$e,L,rt.lineClipsArray.length,cn):wh(b,$e,L,cn);if(ge)ve.activeTexture.set(De.TEXTURE0),$e.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),nt.updatePaintBuffers(Ie);else if(he&&(un||b.lineAtlas.dirty))ve.activeTexture.set(De.TEXTURE0),b.lineAtlas.bind(ve);else if(re){const Jt=rt.gradients[L.id];let mn=Jt.texture;if(L.gradientVersion!==Jt.version){let bn=256;if(L.stepInterpolant){const Ur=T.getSource().maxzoom,Jn=He.canonical.z===Ur?Math.ceil(1<0?f.pop():null}isPatternMissing(a){if(!a)return!1;if(!a.from||!a.to)return!0;const f=this.imageManager.getPattern(a.from.toString()),m=this.imageManager.getPattern(a.to.toString());return!f||!m}useProgram(a,f){this.cache=this.cache||{};const m=a+(f?f.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[m]||(this.cache[m]=new rl(this.context,vc[a],f,Fm[a],this._showOverdrawInspector,this.style.map.terrain)),this.cache[m]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const a=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(a.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new Y(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:a,drawingBufferHeight:f}=this.context.gl;return this.width!==a||this.height!==f}}class ol{constructor(a,f){this.points=a,this.planes=f}static fromInvProjectionMatrix(a,f,m){const g=Math.pow(2,m),b=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(L=>{const A=1/(L=l.af([],L,a))[3]/f*g;return l.a$(L,L,[A,A,1/L[3],A])}),T=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(L=>{const A=function($,he){var ce=he[0],ge=he[1],re=he[2],Ie=ce*ce+ge*ge+re*re;return Ie>0&&(Ie=1/Math.sqrt(Ie)),$[0]=he[0]*Ie,$[1]=he[1]*Ie,$[2]=he[2]*Ie,$}([],function($,he,ce){var ge=he[0],re=he[1],Ie=he[2],Be=ce[0],ve=ce[1],De=ce[2];return $[0]=re*De-Ie*ve,$[1]=Ie*Be-ge*De,$[2]=ge*ve-re*Be,$}([],pe([],b[L[0]],b[L[1]]),pe([],b[L[2]],b[L[1]]))),N=-((V=A)[0]*(j=b[L[1]])[0]+V[1]*j[1]+V[2]*j[2]);var V,j;return A.concat(N)});return new ol(b,T)}}class sl{constructor(a,f){this.min=a,this.max=f,this.center=function(m,g,b){return m[0]=.5*g[0],m[1]=.5*g[1],m[2]=.5*g[2],m}([],function(m,g,b){return m[0]=g[0]+b[0],m[1]=g[1]+b[1],m[2]=g[2]+b[2],m}([],this.min,this.max))}quadrant(a){const f=[a%2==0,a<2],m=ee(this.min),g=ee(this.max);for(let b=0;b=0&&T++;if(T===0)return 0;T!==f.length&&(m=!1)}if(m)return 2;for(let g=0;g<3;g++){let b=Number.MAX_VALUE,T=-Number.MAX_VALUE;for(let L=0;Lthis.max[g]-this.min[g])return 0}return 1}}class Tu{constructor(a=0,f=0,m=0,g=0){if(isNaN(a)||a<0||isNaN(f)||f<0||isNaN(m)||m<0||isNaN(g)||g<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=a,this.bottom=f,this.left=m,this.right=g}interpolate(a,f,m){return f.top!=null&&a.top!=null&&(this.top=l.z.number(a.top,f.top,m)),f.bottom!=null&&a.bottom!=null&&(this.bottom=l.z.number(a.bottom,f.bottom,m)),f.left!=null&&a.left!=null&&(this.left=l.z.number(a.left,f.left,m)),f.right!=null&&a.right!=null&&(this.right=l.z.number(a.right,f.right,m)),this}getCenter(a,f){const m=l.ac((this.left+a-this.right)/2,0,a),g=l.ac((this.top+f-this.bottom)/2,0,f);return new l.P(m,g)}equals(a){return this.top===a.top&&this.bottom===a.bottom&&this.left===a.left&&this.right===a.right}clone(){return new Tu(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Rp=85.051129;class Uh{constructor(a,f,m,g,b){this.tileSize=512,this._renderWorldCopies=b===void 0||!!b,this._minZoom=a||0,this._maxZoom=f||22,this._minPitch=m??0,this._maxPitch=g??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.M(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Tu,this._posMatrixCache={},this._alignedPosMatrixCache={},this.minElevationForCurrentTile=0}clone(){const a=new Uh(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return a.apply(this),a}apply(a){this.tileSize=a.tileSize,this.latRange=a.latRange,this.width=a.width,this.height=a.height,this._center=a._center,this._elevation=a._elevation,this.minElevationForCurrentTile=a.minElevationForCurrentTile,this.zoom=a.zoom,this.angle=a.angle,this._fov=a._fov,this._pitch=a._pitch,this._unmodified=a._unmodified,this._edgeInsets=a._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(a){this._minZoom!==a&&(this._minZoom=a,this.zoom=Math.max(this.zoom,a))}get maxZoom(){return this._maxZoom}set maxZoom(a){this._maxZoom!==a&&(this._maxZoom=a,this.zoom=Math.min(this.zoom,a))}get minPitch(){return this._minPitch}set minPitch(a){this._minPitch!==a&&(this._minPitch=a,this.pitch=Math.max(this.pitch,a))}get maxPitch(){return this._maxPitch}set maxPitch(a){this._maxPitch!==a&&(this._maxPitch=a,this.pitch=Math.min(this.pitch,a))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(a){a===void 0?a=!0:a===null&&(a=!1),this._renderWorldCopies=a}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new l.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(a){const f=-l.b1(a,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=function(){var m=new l.A(4);return l.A!=Float32Array&&(m[1]=0,m[2]=0),m[0]=1,m[3]=1,m}(),function(m,g,b){var T=g[0],L=g[1],A=g[2],N=g[3],V=Math.sin(b),j=Math.cos(b);m[0]=T*j+A*V,m[1]=L*j+N*V,m[2]=T*-V+A*j,m[3]=L*-V+N*j}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(a){const f=l.ac(a,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==f&&(this._unmodified=!1,this._pitch=f,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(a){a=Math.max(.01,Math.min(60,a)),this._fov!==a&&(this._unmodified=!1,this._fov=a/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(a){const f=Math.min(Math.max(a,this.minZoom),this.maxZoom);this._zoom!==f&&(this._unmodified=!1,this._zoom=f,this.tileZoom=Math.max(0,Math.floor(f)),this.scale=this.zoomScale(f),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(a){a.lat===this._center.lat&&a.lng===this._center.lng||(this._unmodified=!1,this._center=a,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(a){a!==this._elevation&&(this._elevation=a,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(a){this._edgeInsets.equals(a)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,a,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(a){return this._edgeInsets.equals(a)}interpolatePadding(a,f,m){this._unmodified=!1,this._edgeInsets.interpolate(a,f,m),this._constrain(),this._calcMatrices()}coveringZoomLevel(a){const f=(a.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/a.tileSize));return Math.max(0,f)}getVisibleUnwrappedCoordinates(a){const f=[new l.b2(0,a)];if(this._renderWorldCopies){const m=this.pointCoordinate(new l.P(0,0)),g=this.pointCoordinate(new l.P(this.width,0)),b=this.pointCoordinate(new l.P(this.width,this.height)),T=this.pointCoordinate(new l.P(0,this.height)),L=Math.floor(Math.min(m.x,g.x,b.x,T.x)),A=Math.floor(Math.max(m.x,g.x,b.x,T.x)),N=1;for(let V=L-N;V<=A+N;V++)V!==0&&f.push(new l.b2(V,a))}return f}coveringTiles(a){var f,m;let g=this.coveringZoomLevel(a);const b=g;if(a.minzoom!==void 0&&ga.maxzoom&&(g=a.maxzoom);const T=this.pointCoordinate(this.getCameraPoint()),L=l.Y.fromLngLat(this.center),A=Math.pow(2,g),N=[A*T.x,A*T.y,0],V=[A*L.x,A*L.y,0],j=ol.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,g);let $=a.minzoom||0;!a.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&($=g);const he=a.terrain?2/Math.min(this.tileSize,a.tileSize)*this.tileSize:3,ce=ve=>({aabb:new sl([ve*A,0,0],[(ve+1)*A,A,0]),zoom:0,x:0,y:0,wrap:ve,fullyVisible:!1}),ge=[],re=[],Ie=g,Be=a.reparseOverscaled?b:g;if(this._renderWorldCopies)for(let ve=1;ve<=3;ve++)ge.push(ce(-ve)),ge.push(ce(ve));for(ge.push(ce(0));ge.length>0;){const ve=ge.pop(),De=ve.x,Ve=ve.y;let He=ve.fullyVisible;if(!He){const pt=ve.aabb.intersects(j);if(pt===0)continue;He=pt===2}const $e=a.terrain?N:V,rt=ve.aabb.distanceX($e),nt=ve.aabb.distanceY($e),ct=Math.max(Math.abs(rt),Math.abs(nt));if(ve.zoom===Ie||ct>he+(1<=$){const pt=Ie-ve.zoom,un=N[0]-.5-(De<>1),Ht=ve.zoom+1;let cn=ve.aabb.quadrant(pt);if(a.terrain){const kn=new l.Q(Ht,ve.wrap,Ht,un,gt),Jt=a.terrain.getMinMaxElevation(kn),mn=(f=Jt.minElevation)!==null&&f!==void 0?f:this.elevation,bn=(m=Jt.maxElevation)!==null&&m!==void 0?m:this.elevation;cn=new sl([cn.min[0],cn.min[1],mn],[cn.max[0],cn.max[1],bn])}ge.push({aabb:cn,zoom:Ht,x:un,y:gt,wrap:ve.wrap,fullyVisible:He})}}return re.sort((ve,De)=>ve.distanceSq-De.distanceSq).map(ve=>ve.tileID)}resize(a,f){this.width=a,this.height=f,this.pixelsToGLUnits=[2/a,-2/f],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(a){return Math.pow(2,a)}scaleZoom(a){return Math.log(a)/Math.LN2}project(a){const f=l.ac(a.lat,-85.051129,Rp);return new l.P(l.N(a.lng)*this.worldSize,l.O(f)*this.worldSize)}unproject(a){return new l.Y(a.x/this.worldSize,a.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(a){const f=this.elevation,m=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,g=this.pointLocation(this.centerPoint,a),b=a.getElevationForLngLatZoom(g,this.tileZoom);if(!(this.elevation-b))return;const T=m+f-b,L=Math.cos(this._pitch)*this.cameraToCenterDistance/T/l.b3(1,g.lat),A=this.scaleZoom(L/this.tileSize);this._elevation=b,this._center=g,this.zoom=A}setLocationAtPoint(a,f){const m=this.pointCoordinate(f),g=this.pointCoordinate(this.centerPoint),b=this.locationCoordinate(a),T=new l.Y(b.x-(m.x-g.x),b.y-(m.y-g.y));this.center=this.coordinateLocation(T),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(a,f){return f?this.coordinatePoint(this.locationCoordinate(a),f.getElevationForLngLatZoom(a,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(a))}pointLocation(a,f){return this.coordinateLocation(this.pointCoordinate(a,f))}locationCoordinate(a){return l.Y.fromLngLat(a)}coordinateLocation(a){return a&&a.toLngLat()}pointCoordinate(a,f){if(f){const $=f.pointCoordinate(a);if($!=null)return $}const m=[a.x,a.y,0,1],g=[a.x,a.y,1,1];l.af(m,m,this.pixelMatrixInverse),l.af(g,g,this.pixelMatrixInverse);const b=m[3],T=g[3],L=m[1]/b,A=g[1]/T,N=m[2]/b,V=g[2]/T,j=N===V?0:(0-N)/(V-N);return new l.Y(l.z.number(m[0]/b,g[0]/T,j)/this.worldSize,l.z.number(L,A,j)/this.worldSize)}coordinatePoint(a,f=0,m=this.pixelMatrix){const g=[a.x*this.worldSize,a.y*this.worldSize,f,1];return l.af(g,g,m),new l.P(g[0]/g[3],g[1]/g[3])}getBounds(){const a=Math.max(0,this.height/2-this.getHorizon());return new Me().extend(this.pointLocation(new l.P(0,a))).extend(this.pointLocation(new l.P(this.width,a))).extend(this.pointLocation(new l.P(this.width,this.height))).extend(this.pointLocation(new l.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Me([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(a){a?(this.lngRange=[a.getWest(),a.getEast()],this.latRange=[a.getSouth(),a.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Rp])}calculatePosMatrix(a,f=!1){const m=a.key,g=f?this._alignedPosMatrixCache:this._posMatrixCache;if(g[m])return g[m];const b=a.canonical,T=this.worldSize/this.zoomScale(b.z),L=b.x+Math.pow(2,b.z)*a.wrap,A=l.an(new Float64Array(16));return l.H(A,A,[L*T,b.y*T,0]),l.J(A,A,[T/l.W,T/l.W,1]),l.K(A,f?this.alignedProjMatrix:this.projMatrix,A),g[m]=new Float32Array(A),g[m]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(a,f){f=l.ac(+f,this.minZoom,this.maxZoom);const m={center:new l.M(a.lng,a.lat),zoom:f};let g=this.lngRange;if(!this._renderWorldCopies&&g===null){const ve=179.9999999999;g=[-ve,ve]}const b=this.tileSize*this.zoomScale(m.zoom);let T=0,L=b,A=0,N=b,V=0,j=0;const{x:$,y:he}=this.size;if(this.latRange){const ve=this.latRange;T=l.O(ve[1])*b,L=l.O(ve[0])*b,L-TL&&(Ie=L-ve)}if(g){const ve=(A+N)/2;let De=ce;this._renderWorldCopies&&(De=l.b1(ce,ve-b/2,ve+b/2));const Ve=$/2;De-VeN&&(re=N-Ve)}if(re!==void 0||Ie!==void 0){const ve=new l.P(re??ce,Ie??ge);m.center=this.unproject.call({worldSize:b},ve).wrap()}return m}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const a=this._unmodified,{center:f,zoom:m}=this.getConstrained(this.center,this.zoom);this.center=f,this.zoom=m,this._unmodified=a,this._constraining=!1}_calcMatrices(){if(!this.height)return;const a=this.centerOffset,f=this.point.x,m=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=l.b3(1,this.center.lat)*this.worldSize;let g=l.an(new Float64Array(16));l.J(g,g,[this.width/2,-this.height/2,1]),l.H(g,g,[1,-1,0]),this.labelPlaneMatrix=g,g=l.an(new Float64Array(16)),l.J(g,g,[1,-1,1]),l.H(g,g,[-1,-1,0]),l.J(g,g,[2/this.width,2/this.height,1]),this.glCoordMatrix=g;const b=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),T=Math.min(this.elevation,this.minElevationForCurrentTile),L=b-T*this._pixelPerMeter/Math.cos(this._pitch),A=T<0?L:b,N=Math.PI/2+this._pitch,V=this._fov*(.5+a.y/this.height),j=Math.sin(V)*A/Math.sin(l.ac(Math.PI-N-V,.01,Math.PI-.01)),$=this.getHorizon(),he=2*Math.atan($/this.cameraToCenterDistance)*(.5+a.y/(2*$)),ce=Math.sin(he)*A/Math.sin(l.ac(Math.PI-N-he,.01,Math.PI-.01)),ge=Math.min(j,ce),re=1.01*(Math.cos(Math.PI/2-this._pitch)*ge+A),Ie=this.height/50;g=new Float64Array(16),l.b4(g,this._fov,this.width/this.height,Ie,re),g[8]=2*-a.x/this.width,g[9]=2*a.y/this.height,l.J(g,g,[1,-1,1]),l.H(g,g,[0,0,-this.cameraToCenterDistance]),l.b5(g,g,this._pitch),l.ad(g,g,this.angle),l.H(g,g,[-f,-m,0]),this.mercatorMatrix=l.J([],g,[this.worldSize,this.worldSize,this.worldSize]),l.J(g,g,[1,1,this._pixelPerMeter]),this.pixelMatrix=l.K(new Float64Array(16),this.labelPlaneMatrix,g),l.H(g,g,[0,0,-this.elevation]),this.projMatrix=g,this.invProjMatrix=l.ar([],g),this.pixelMatrix3D=l.K(new Float64Array(16),this.labelPlaneMatrix,g);const Be=this.width%2/2,ve=this.height%2/2,De=Math.cos(this.angle),Ve=Math.sin(this.angle),He=f-Math.round(f)+De*Be+Ve*ve,$e=m-Math.round(m)+De*ve+Ve*Be,rt=new Float64Array(g);if(l.H(rt,rt,[He>.5?He-1:He,$e>.5?$e-1:$e,0]),this.alignedProjMatrix=rt,g=l.ar(new Float64Array(16),this.pixelMatrix),!g)throw new Error("failed to invert matrix");this.pixelMatrixInverse=g,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const a=this.pointCoordinate(new l.P(0,0)),f=[a.x*this.worldSize,a.y*this.worldSize,0,1];return l.af(f,f,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const a=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.P(0,a))}getCameraQueryGeometry(a){const f=this.getCameraPoint();if(a.length===1)return[a[0],f];{let m=f.x,g=f.y,b=f.x,T=f.y;for(const L of a)m=Math.min(m,L.x),g=Math.min(g,L.y),b=Math.max(b,L.x),T=Math.max(T,L.y);return[new l.P(m,g),new l.P(b,g),new l.P(b,T),new l.P(m,T),new l.P(m,g)]}}lngLatToCameraDepth(a,f){const m=this.locationCoordinate(a),g=[m.x*this.worldSize,m.y*this.worldSize,f,1];return l.af(g,g,this.projMatrix),g[2]/g[3]}}function Np(y,a){let f,m=!1,g=null,b=null;const T=()=>{g=null,m&&(y.apply(b,f),g=setTimeout(T,a),m=!1)};return(...L)=>(m=!0,b=this,f=L,g||T(),g)}class Op{constructor(a){this._getCurrentHash=()=>{const f=window.location.hash.replace("#","");if(this._hashName){let m;return f.split("&").map(g=>g.split("=")).forEach(g=>{g[0]===this._hashName&&(m=g)}),(m&&m[1]||"").split("/")}return f.split("/")},this._onHashChange=()=>{const f=this._getCurrentHash();if(f.length>=3&&!f.some(m=>isNaN(m))){const m=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(f[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+f[2],+f[1]],zoom:+f[0],bearing:m,pitch:+(f[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const f=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,f)}catch{}},this._updateHash=Np(this._updateHashUnthrottled,300),this._hashName=a&&encodeURIComponent(a)}addTo(a){return this._map=a,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this}getHashString(a){const f=this._map.getCenter(),m=Math.round(100*this._map.getZoom())/100,g=Math.ceil((m*Math.LN2+Math.log(512/360/.5))/Math.LN10),b=Math.pow(10,g),T=Math.round(f.lng*b)/b,L=Math.round(f.lat*b)/b,A=this._map.getBearing(),N=this._map.getPitch();let V="";if(V+=a?`/${T}/${L}/${m}`:`${m}/${L}/${T}`,(A||N)&&(V+="/"+Math.round(10*A)/10),N&&(V+=`/${Math.round(N)}`),this._hashName){const j=this._hashName;let $=!1;const he=window.location.hash.slice(1).split("&").map(ce=>{const ge=ce.split("=")[0];return ge===j?($=!0,`${ge}=${V}`):ce}).filter(ce=>ce);return $||he.push(`${j}=${V}`),`#${he.join("&")}`}return`#${V}`}}const Tc={linearity:.3,easing:l.b6(0,0,.3,1)},Gl=l.e({deceleration:2500,maxSpeed:1400},Tc),Qm=l.e({deceleration:20,maxSpeed:1400},Tc),eg=l.e({deceleration:1e3,maxSpeed:360},Tc),tg=l.e({deceleration:1e3,maxSpeed:90},Tc);class ng{constructor(a){this._map=a,this.clear()}clear(){this._inertiaBuffer=[]}record(a){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:E.now(),settings:a})}_drainInertiaBuffer(){const a=this._inertiaBuffer,f=E.now();for(;a.length>0&&f-a[0].time>160;)a.shift()}_onMoveEnd(a){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const f={zoom:0,bearing:0,pitch:0,pan:new l.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:b}of this._inertiaBuffer)f.zoom+=b.zoomDelta||0,f.bearing+=b.bearingDelta||0,f.pitch+=b.pitchDelta||0,b.panDelta&&f.pan._add(b.panDelta),b.around&&(f.around=b.around),b.pinchAround&&(f.pinchAround=b.pinchAround);const m=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,g={};if(f.pan.mag()){const b=Pc(f.pan.mag(),m,l.e({},Gl,a||{}));g.offset=f.pan.mult(b.amount/f.pan.mag()),g.center=this._map.transform.center,Lc(g,b)}if(f.zoom){const b=Pc(f.zoom,m,Qm);g.zoom=this._map.transform.zoom+b.amount,Lc(g,b)}if(f.bearing){const b=Pc(f.bearing,m,eg);g.bearing=this._map.transform.bearing+l.ac(b.amount,-179,179),Lc(g,b)}if(f.pitch){const b=Pc(f.pitch,m,tg);g.pitch=this._map.transform.pitch+b.amount,Lc(g,b)}if(g.zoom||g.bearing){const b=f.pinchAround===void 0?f.around:f.pinchAround;g.around=b?this._map.unproject(b):this._map.getCenter()}return this.clear(),l.e(g,{noMoveStart:!0})}}function Lc(y,a){(!y.duration||y.durationf.unproject(A)),L=b.reduce((A,N,V,j)=>A.add(N.div(j.length)),new l.P(0,0));super(a,{points:b,point:L,lngLats:T,lngLat:f.unproject(L),originalEvent:m}),this._defaultPrevented=!1}}class zp extends l.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(a,f,m){super(a,{originalEvent:m}),this._defaultPrevented=!1}}class Ls{constructor(a,f){this._map=a,this._clickTolerance=f.clickTolerance}reset(){delete this._mousedownPos}wheel(a){return this._firePreventable(new zp(a.type,this._map,a))}mousedown(a,f){return this._mousedownPos=f,this._firePreventable(new Io(a.type,this._map,a))}mouseup(a){this._map.fire(new Io(a.type,this._map,a))}click(a,f){this._mousedownPos&&this._mousedownPos.dist(f)>=this._clickTolerance||this._map.fire(new Io(a.type,this._map,a))}dblclick(a){return this._firePreventable(new Io(a.type,this._map,a))}mouseover(a){this._map.fire(new Io(a.type,this._map,a))}mouseout(a){this._map.fire(new Io(a.type,this._map,a))}touchstart(a){return this._firePreventable(new Qs(a.type,this._map,a))}touchmove(a){this._map.fire(new Qs(a.type,this._map,a))}touchend(a){this._map.fire(new Qs(a.type,this._map,a))}touchcancel(a){this._map.fire(new Qs(a.type,this._map,a))}_firePreventable(a){if(this._map.fire(a),a.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ea{constructor(a){this._map=a}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(a){this._map.fire(new Io(a.type,this._map,a))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Io("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(a){this._delayContextMenu?this._contextMenuEvent=a:this._ignoreContextMenu||this._map.fire(new Io(a.type,this._map,a)),this._map.listens("contextmenu")&&a.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lu{constructor(a){this._map=a}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(a){return this.transform.pointLocation(l.P.convert(a),this._map.terrain)}}class Ps{constructor(a,f){this._map=a,this._tr=new Lu(a),this._el=a.getCanvasContainer(),this._container=a.getContainer(),this._clickTolerance=f.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(a,f){this.isEnabled()&&a.shiftKey&&a.button===0&&(C.disableDrag(),this._startPos=this._lastPos=f,this._active=!0)}mousemoveWindow(a,f){if(!this._active)return;const m=f;if(this._lastPos.equals(m)||!this._box&&m.dist(this._startPos)b.fitScreenCoordinates(m,g,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",a)}keydown(a){this._active&&a.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",a))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(C.remove(this._box),this._box=null),C.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(a,f){return this._map.fire(new l.k(a,{originalEvent:f}))}}function ql(y,a){if(y.length!==a.length)throw new Error(`The number of touches and points are not equal - touches ${y.length}, points ${a.length}`);const f={};for(let m=0;mthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=a.timeStamp),m.length===this.numTouches&&(this.centroid=function(g){const b=new l.P(0,0);for(const T of g)b._add(T);return b.div(g.length)}(f),this.touches=ql(m,f)))}touchmove(a,f,m){if(this.aborted||!this.centroid)return;const g=ql(m,f);for(const b in this.touches){const T=g[b];(!T||T.dist(this.touches[b])>30)&&(this.aborted=!0)}}touchend(a,f,m){if((!this.centroid||a.timeStamp-this.startTime>500)&&(this.aborted=!0),m.length===0){const g=!this.aborted&&this.centroid;if(this.reset(),g)return g}}}class Fp{constructor(a){this.singleTap=new Wy(a),this.numTaps=a.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(a,f,m){this.singleTap.touchstart(a,f,m)}touchmove(a,f,m){this.singleTap.touchmove(a,f,m)}touchend(a,f,m){const g=this.singleTap.touchend(a,f,m);if(g){const b=a.timeStamp-this.lastTime<500,T=!this.lastTap||this.lastTap.dist(g)<30;if(b&&T||this.reset(),this.count++,this.lastTime=a.timeStamp,this.lastTap=g,this.count===this.numTaps)return this.reset(),g}}}class Hy{constructor(a){this._tr=new Lu(a),this._zoomIn=new Fp({numTouches:1,numTaps:2}),this._zoomOut=new Fp({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(a,f,m){this._zoomIn.touchstart(a,f,m),this._zoomOut.touchstart(a,f,m)}touchmove(a,f,m){this._zoomIn.touchmove(a,f,m),this._zoomOut.touchmove(a,f,m)}touchend(a,f,m){const g=this._zoomIn.touchend(a,f,m),b=this._zoomOut.touchend(a,f,m),T=this._tr;return g?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom+1,around:T.unproject(g)},{originalEvent:a})}):b?(this._active=!0,a.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:L=>L.easeTo({duration:300,zoom:T.zoom-1,around:T.unproject(b)},{originalEvent:a})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Pu{constructor(a){this._enabled=!!a.enable,this._moveStateManager=a.moveStateManager,this._clickTolerance=a.clickTolerance||1,this._moveFunction=a.move,this._activateOnStart=!!a.activateOnStart,a.assignEvents(this),this.reset()}reset(a){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(a)}_move(...a){const f=this._moveFunction(...a);if(f.bearingDelta||f.pitchDelta||f.around||f.panDelta)return this._active=!0,f}dragStart(a,f){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(a)&&(this._moveStateManager.startMove(a),this._lastPoint=f.length?f[0]:f,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(a,f){if(!this.isEnabled())return;const m=this._lastPoint;if(!m)return;if(a.preventDefault(),!this._moveStateManager.isValidMoveEvent(a))return void this.reset(a);const g=f.length?f[0]:f;return!this._moved&&g.dist(m){y.mousedown=y.dragStart,y.mousemoveWindow=y.dragMove,y.mouseup=y.dragEnd,y.contextmenu=function(a){a.preventDefault()}},Mu=({enable:y,clickTolerance:a,bearingDegreesPerPixelMoved:f=.8})=>{const m=new ta({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Pu({clickTolerance:a,move:(g,b)=>({bearingDelta:(b.x-g.x)*f}),moveStateManager:m,enable:y,assignEvents:jh})},Au=({enable:y,clickTolerance:a,pitchDegreesPerPixelMoved:f=-.5})=>{const m=new ta({checkCorrectEvent:g=>C.mouseButton(g)===0&&g.ctrlKey||C.mouseButton(g)===2});return new Pu({clickTolerance:a,move:(g,b)=>({pitchDelta:(b.y-g.y)*f}),moveStateManager:m,enable:y,assignEvents:jh})};class rg{constructor(a,f){this._clickTolerance=a.clickTolerance||1,this._map=f,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new l.P(0,0)}minTouchs(){return this._map.cooperativeGestures.isEnabled()?2:1}touchstart(a,f,m){return this._calculateTransform(a,f,m)}touchmove(a,f,m){if(this._active&&!(m.length0&&(this._active=!0);const g=ql(m,f),b=new l.P(0,0),T=new l.P(0,0);let L=0;for(const N in g){const V=g[N],j=this._touches[N];j&&(b._add(V),T._add(V.sub(j)),L++,g[N]=V)}if(this._touches=g,LMath.abs(y.x)}class sg extends xt{constructor(a){super(),this._currentTouchCount=0,this._map=a}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(a,f,m){super.touchstart(a,f,m),this._currentTouchCount=m.length}_start(a){this._lastPoints=a,qh(a[0].sub(a[1]))&&(this._valid=!1)}_move(a,f,m){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const g=a[0].sub(this._lastPoints[0]),b=a[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(g,b,m.timeStamp),this._valid?(this._lastPoints=a,this._active=!0,{pitchDelta:(g.y+b.y)/2*-.5}):void 0}gestureBeginsVertically(a,f,m){if(this._valid!==void 0)return this._valid;const g=a.mag()>=2,b=f.mag()>=2;if(!g&&!b)return;if(!g||!b)return this._firstMove===void 0&&(this._firstMove=m),m-this._firstMove<100&&void 0;const T=a.y>0==f.y>0;return qh(a)&&qh(f)&&T}}const Zy={panStep:100,bearingStep:15,pitchStep:10};class al{constructor(a){this._tr=new Lu(a);const f=Zy;this._panStep=f.panStep,this._bearingStep=f.bearingStep,this._pitchStep=f.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(a){if(a.altKey||a.ctrlKey||a.metaKey)return;let f=0,m=0,g=0,b=0,T=0;switch(a.keyCode){case 61:case 107:case 171:case 187:f=1;break;case 189:case 109:case 173:f=-1;break;case 37:a.shiftKey?m=-1:(a.preventDefault(),b=-1);break;case 39:a.shiftKey?m=1:(a.preventDefault(),b=1);break;case 38:a.shiftKey?g=1:(a.preventDefault(),T=-1);break;case 40:a.shiftKey?g=-1:(a.preventDefault(),T=1);break;default:return}return this._rotationDisabled&&(m=0,g=0),{cameraAnimation:L=>{const A=this._tr;L.easeTo({duration:300,easeId:"keyboardHandler",easing:br,zoom:f?Math.round(A.zoom)+f*(a.shiftKey?2:1):A.zoom,bearing:A.bearing+m*this._bearingStep,pitch:A.pitch+g*this._pitchStep,offset:[-b*this._panStep,-T*this._panStep],center:A.center},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function br(y){return y*(2-y)}const Ac=4.000244140625;class Wh{constructor(a,f){this._onTimeout=m=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(m)},this._map=a,this._tr=new Lu(a),this._triggerRenderFrame=f,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(a){this._defaultZoomRate=a}setWheelZoomRate(a){this._wheelZoomRate=a}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(a){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!a&&a.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(a){if(!this.isEnabled()||this._map.cooperativeGestures.isEnabled()&&!a[this._map.cooperativeGestures._bypassKey])return;let f=a.deltaMode===WheelEvent.DOM_DELTA_LINE?40*a.deltaY:a.deltaY;const m=E.now(),g=m-(this._lastWheelEventTime||0);this._lastWheelEventTime=m,f!==0&&f%Ac==0?this._type="wheel":f!==0&&Math.abs(f)<4?this._type="trackpad":g>400?(this._type=null,this._lastValue=f,this._timeout=setTimeout(this._onTimeout,40,a)):this._type||(this._type=Math.abs(g*f)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,f+=this._lastValue)),a.shiftKey&&f&&(f/=4),this._type&&(this._lastWheelEvent=a,this._delta-=f,this._active||this._start(a)),a.preventDefault()}_start(a){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const f=C.mousePos(this._map.getCanvas(),a),m=this._tr;this._around=f.y>m.transform.height/2-m.transform.getHorizon()?l.M.convert(this._aroundCenter?m.center:m.unproject(f)):l.M.convert(m.center),this._aroundPoint=m.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const a=this._tr.transform;if(this._delta!==0){const L=this._type==="wheel"&&Math.abs(this._delta)>Ac?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*L)));this._delta<0&&A!==0&&(A=1/A);const N=typeof this._targetZoom=="number"?a.zoomScale(this._targetZoom):a.scale;this._targetZoom=Math.min(a.maxZoom,Math.max(a.minZoom,a.scaleZoom(N*A))),this._type==="wheel"&&(this._startZoom=a.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const f=typeof this._targetZoom=="number"?this._targetZoom:a.zoom,m=this._startZoom,g=this._easing;let b,T=!1;if(this._type==="wheel"&&m&&g){const L=Math.min((E.now()-this._lastWheelEventTime)/200,1),A=g(L);b=l.z.number(m,f,A),L<1?this._frameId||(this._frameId=!0):T=!0}else b=f,T=!0;return this._active=!0,T&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!T,zoomDelta:b-a.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(a){let f=l.b7;if(this._prevEase){const m=this._prevEase,g=(E.now()-m.start)/m.duration,b=m.easing(g+.01)-m.easing(g),T=.27/Math.sqrt(b*b+1e-4)*.01,L=Math.sqrt(.0729-T*T);f=l.b6(T,L,.25,1)}return this._prevEase={start:E.now(),duration:a,easing:f},f}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Vp{constructor(a,f){this._clickZoom=a,this._tapZoom=f}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ag{constructor(a){this._tr=new Lu(a),this.reset()}reset(){this._active=!1}dblclick(a,f){return a.preventDefault(),{cameraAnimation:m=>{m.easeTo({duration:300,zoom:this._tr.zoom+(a.shiftKey?-1:1),around:this._tr.unproject(f)},{originalEvent:a})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class lg{constructor(){this._tap=new Fp({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(a,f,m){if(!this._swipePoint)if(this._tapTime){const g=f[0],b=a.timeStamp-this._tapTime<500,T=this._tapPoint.dist(g)<30;b&&T?m.length>0&&(this._swipePoint=g,this._swipeTouch=m[0].identifier):this.reset()}else this._tap.touchstart(a,f,m)}touchmove(a,f,m){if(this._tapTime){if(this._swipePoint){if(m[0].identifier!==this._swipeTouch)return;const g=f[0],b=g.y-this._swipePoint.y;return this._swipePoint=g,a.preventDefault(),this._active=!0,{zoomDelta:b/128}}}else this._tap.touchmove(a,f,m)}touchend(a,f,m){if(this._tapTime)this._swipePoint&&m.length===0&&this.reset();else{const g=this._tap.touchend(a,f,m);g&&(this._tapTime=a.timeStamp,this._tapPoint=g)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ug{constructor(a,f,m){this._el=a,this._mousePan=f,this._touchPan=m}enable(a){this._inertiaOptions=a||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Ms{constructor(a,f,m){this._pitchWithRotate=a.pitchWithRotate,this._mouseRotate=f,this._mousePitch=m}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class kc{constructor(a,f,m,g){this._el=a,this._touchZoom=f,this._touchRotate=m,this._tapDragZoom=g,this._rotationDisabled=!1,this._enabled=!0}enable(a){this._touchZoom.enable(a),this._rotationDisabled||this._touchRotate.enable(a),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Nt{constructor(a,f){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=a,this._options=f,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const a=this._map.getCanvasContainer();a.classList.add("maplibregl-cooperative-gestures"),this._container=C.create("div","maplibregl-cooperative-gesture-screen",a);let f=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(f=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const m=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),g=document.createElement("div");g.className="maplibregl-desktop-message",g.textContent=f,this._container.appendChild(g);const b=document.createElement("div");b.className="maplibregl-mobile-message",b.textContent=m,this._container.appendChild(b),this._container.setAttribute("aria-hidden","true")}_destoryUI(){this._container&&(C.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destoryUI()}isEnabled(){return this._enabled}touchmove(a){this._onCooperativeGesture(a.touches.length===1)}wheel(a){this._map.scrollZoom.isEnabled()&&this._onCooperativeGesture(!a[this._bypassKey])}_onCooperativeGesture(a){this._enabled&&a&&(this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const qt=y=>y.zoom||y.drag||y.pitch||y.rotate;class Hh extends l.k{}function Dc(y){return y.panDelta&&y.panDelta.mag()||y.zoomDelta||y.bearingDelta||y.pitchDelta}class Up{constructor(a,f){this.handleWindowEvent=g=>{this.handleEvent(g,`${g.type}Window`)},this.handleEvent=(g,b)=>{if(g.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const T=g.type==="renderFrame"?void 0:g,L={needsRenderFrame:!1},A={},N={},V=g.touches,j=V?this._getMapTouches(V):void 0,$=j?C.touchPos(this._map.getCanvas(),j):C.mousePos(this._map.getCanvas(),g);for(const{handlerName:ge,handler:re,allowed:Ie}of this._handlers){if(!re.isEnabled())continue;let Be;this._blockedByActive(N,Ie,ge)?re.reset():re[b||g.type]&&(Be=re[b||g.type](g,$,j),this.mergeHandlerResult(L,A,Be,ge,T),Be&&Be.needsRenderFrame&&this._triggerRenderFrame()),(Be||re.isActive())&&(N[ge]=re)}const he={};for(const ge in this._previousActiveHandlers)N[ge]||(he[ge]=T);this._previousActiveHandlers=N,(Object.keys(he).length||Dc(L))&&(this._changes.push([L,A,he]),this._triggerRenderFrame()),(Object.keys(N).length||Dc(L))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:ce}=L;ce&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],ce(this._map))},this._map=a,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new ng(a),this._bearingSnap=f.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(f);const m=this._el;this._listeners=[[m,"touchstart",{passive:!0}],[m,"touchmove",{passive:!1}],[m,"touchend",void 0],[m,"touchcancel",void 0],[m,"mousedown",void 0],[m,"mousemove",void 0],[m,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[m,"mouseover",void 0],[m,"mouseout",void 0],[m,"dblclick",void 0],[m,"click",void 0],[m,"keydown",{capture:!1}],[m,"keyup",void 0],[m,"wheel",{passive:!1}],[m,"contextmenu",void 0],[window,"blur",void 0]];for(const[g,b,T]of this._listeners)C.addEventListener(g,b,g===document?this.handleWindowEvent:this.handleEvent,T)}destroy(){for(const[a,f,m]of this._listeners)C.removeEventListener(a,f,a===document?this.handleWindowEvent:this.handleEvent,m)}_addDefaultHandlers(a){const f=this._map,m=f.getCanvasContainer();this._add("mapEvent",new Ls(f,a));const g=f.boxZoom=new Ps(f,a);this._add("boxZoom",g),a.interactive&&a.boxZoom&&g.enable();const b=f.cooperativeGestures=new Nt(f,a.cooperativeGestures);this._add("cooperativeGestures",b),a.cooperativeGestures&&b.enable();const T=new Hy(f),L=new ag(f);f.doubleClickZoom=new Vp(L,T),this._add("tapZoom",T),this._add("clickZoom",L),a.interactive&&a.doubleClickZoom&&f.doubleClickZoom.enable();const A=new lg;this._add("tapDragZoom",A);const N=f.touchPitch=new sg(f);this._add("touchPitch",N),a.interactive&&a.touchPitch&&f.touchPitch.enable(a.touchPitch);const V=Mu(a),j=Au(a);f.dragRotate=new Ms(a,V,j),this._add("mouseRotate",V,["mousePitch"]),this._add("mousePitch",j,["mouseRotate"]),a.interactive&&a.dragRotate&&f.dragRotate.enable();const $=(({enable:Be,clickTolerance:ve})=>{const De=new ta({checkCorrectEvent:Ve=>C.mouseButton(Ve)===0&&!Ve.ctrlKey});return new Pu({clickTolerance:ve,move:(Ve,He)=>({around:He,panDelta:He.sub(Ve)}),activateOnStart:!0,moveStateManager:De,enable:Be,assignEvents:jh})})(a),he=new rg(a,f);f.dragPan=new ug(m,$,he),this._add("mousePan",$),this._add("touchPan",he,["touchZoom","touchRotate"]),a.interactive&&a.dragPan&&f.dragPan.enable(a.dragPan);const ce=new Bp,ge=new og;f.touchZoomRotate=new kc(m,ge,ce,A),this._add("touchRotate",ce,["touchPan","touchZoom"]),this._add("touchZoom",ge,["touchPan","touchRotate"]),a.interactive&&a.touchZoomRotate&&f.touchZoomRotate.enable(a.touchZoomRotate);const re=f.scrollZoom=new Wh(f,()=>this._triggerRenderFrame());this._add("scrollZoom",re,["mousePan"]),a.interactive&&a.scrollZoom&&f.scrollZoom.enable(a.scrollZoom);const Ie=f.keyboard=new al(f);this._add("keyboard",Ie),a.interactive&&a.keyboard&&f.keyboard.enable(),this._add("blockableMapEvent",new ea(f))}_add(a,f,m){this._handlers.push({handlerName:a,handler:f,allowed:m}),this._handlersById[a]=f}stop(a){if(!this._updatingCamera){for(const{handler:f}of this._handlers)f.reset();this._inertia.clear(),this._fireEvents({},{},a),this._changes=[]}}isActive(){for(const{handler:a}of this._handlers)if(a.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!qt(this._eventsInProgress)||this.isZooming()}_blockedByActive(a,f,m){for(const g in a)if(g!==m&&(!f||f.indexOf(g)<0))return!0;return!1}_getMapTouches(a){const f=[];for(const m of a)this._el.contains(m.target)&&f.push(m);return f}mergeHandlerResult(a,f,m,g,b){if(!m)return;l.e(a,m);const T={handlerName:g,originalEvent:m.originalEvent||b};m.zoomDelta!==void 0&&(f.zoom=T),m.panDelta!==void 0&&(f.drag=T),m.pitchDelta!==void 0&&(f.pitch=T),m.bearingDelta!==void 0&&(f.rotate=T)}_applyChanges(){const a={},f={},m={};for(const[g,b,T]of this._changes)g.panDelta&&(a.panDelta=(a.panDelta||new l.P(0,0))._add(g.panDelta)),g.zoomDelta&&(a.zoomDelta=(a.zoomDelta||0)+g.zoomDelta),g.bearingDelta&&(a.bearingDelta=(a.bearingDelta||0)+g.bearingDelta),g.pitchDelta&&(a.pitchDelta=(a.pitchDelta||0)+g.pitchDelta),g.around!==void 0&&(a.around=g.around),g.pinchAround!==void 0&&(a.pinchAround=g.pinchAround),g.noInertia&&(a.noInertia=g.noInertia),l.e(f,b),l.e(m,T);this._updateMapTransform(a,f,m),this._changes=[]}_updateMapTransform(a,f,m){const g=this._map,b=g._getTransformForUpdate(),T=g.terrain;if(!(Dc(a)||T&&this._terrainMovement))return this._fireEvents(f,m,!0);let{panDelta:L,zoomDelta:A,bearingDelta:N,pitchDelta:V,around:j,pinchAround:$}=a;$!==void 0&&(j=$),g._stop(!0),j=j||g.transform.centerPoint;const he=b.pointLocation(L?j.sub(L):j);N&&(b.bearing+=N),V&&(b.pitch+=V),A&&(b.zoom+=A),T?this._terrainMovement||!f.drag&&!f.zoom?f.drag&&this._terrainMovement?b.center=b.pointLocation(b.centerPoint.sub(L)):b.setLocationAtPoint(he,j):(this._terrainMovement=!0,this._map._elevationFreeze=!0,b.setLocationAtPoint(he,j),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,b.recalculateZoom(g.terrain)})):b.setLocationAtPoint(he,j),g._applyUpdatedTransform(b),this._map._update(),a.noInertia||this._inertia.record(a),this._fireEvents(f,m,!0)}_fireEvents(a,f,m){const g=qt(this._eventsInProgress),b=qt(a),T={};for(const V in a){const{originalEvent:j}=a[V];this._eventsInProgress[V]||(T[`${V}start`]=j),this._eventsInProgress[V]=a[V]}!g&&b&&this._fireEvent("movestart",b.originalEvent);for(const V in T)this._fireEvent(V,T[V]);b&&this._fireEvent("move",b.originalEvent);for(const V in a){const{originalEvent:j}=a[V];this._fireEvent(V,j)}const L={};let A;for(const V in this._eventsInProgress){const{handlerName:j,originalEvent:$}=this._eventsInProgress[V];this._handlersById[j].isActive()||(delete this._eventsInProgress[V],A=f[j]||$,L[`${V}end`]=A)}for(const V in L)this._fireEvent(V,L[V]);const N=qt(this._eventsInProgress);if(m&&(g||b)&&!N){this._updatingCamera=!0;const V=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),j=$=>$!==0&&-this._bearingSnap<$&&${delete this._frameId,this.handleEvent(new Hh("renderFrame",{timeStamp:a})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Co extends l.E{constructor(a,f){super(),this._renderFrameCallback=()=>{const m=Math.min((E.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(m)),m<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=a,this._bearingSnap=f.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new l.M(this.transform.center.lng,this.transform.center.lat)}setCenter(a,f){return this.jumpTo({center:a},f)}panBy(a,f,m){return a=l.P.convert(a).mult(-1),this.panTo(this.transform.center,l.e({offset:a},f),m)}panTo(a,f,m){return this.easeTo(l.e({center:a},f),m)}getZoom(){return this.transform.zoom}setZoom(a,f){return this.jumpTo({zoom:a},f),this}zoomTo(a,f,m){return this.easeTo(l.e({zoom:a},f),m)}zoomIn(a,f){return this.zoomTo(this.getZoom()+1,a,f),this}zoomOut(a,f){return this.zoomTo(this.getZoom()-1,a,f),this}getBearing(){return this.transform.bearing}setBearing(a,f){return this.jumpTo({bearing:a},f),this}getPadding(){return this.transform.padding}setPadding(a,f){return this.jumpTo({padding:a},f),this}rotateTo(a,f,m){return this.easeTo(l.e({bearing:a},f),m)}resetNorth(a,f){return this.rotateTo(0,l.e({duration:1e3},a),f),this}resetNorthPitch(a,f){return this.easeTo(l.e({bearing:0,pitch:0,duration:1e3},a),f),this}snapToNorth(a,f){return Math.abs(this.getBearing()){if(this._zooming&&(g.zoom=l.z.number(b,re,$e)),this._rotating&&(g.bearing=l.z.number(T,N,$e)),this._pitching&&(g.pitch=l.z.number(L,V,$e)),this._padding&&(g.interpolatePadding(A,j,$e),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation($e),De)g.setLocationAtPoint(De,Ve);else{const rt=g.zoomScale(g.zoom-b),nt=re>b?Math.min(2,ve):Math.max(.5,ve),ct=Math.pow(nt,1-$e),pt=g.unproject(Ie.add(Be.mult($e*ct)).mult(rt));g.setLocationAtPoint(g.renderWorldCopies?pt.wrap():pt,he)}this._applyUpdatedTransform(g),this._fireMoveEvents(f)},$e=>{this.terrain&&this._finalizeElevation(),this._afterEase(f,$e)},a),this}_prepareEase(a,f,m={}){this._moving=!0,f||m.moving||this.fire(new l.k("movestart",a)),this._zooming&&!m.zooming&&this.fire(new l.k("zoomstart",a)),this._rotating&&!m.rotating&&this.fire(new l.k("rotatestart",a)),this._pitching&&!m.pitching&&this.fire(new l.k("pitchstart",a))}_prepareElevation(a){this._elevationCenter=a,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(a,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(a){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const f=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(a<1&&f!==this._elevationTarget){const m=this._elevationTarget-this._elevationStart;this._elevationStart+=a*(m-(f-(m*a+this._elevationStart))/(1-a)),this._elevationTarget=f}this.transform.elevation=l.z.number(this._elevationStart,this._elevationTarget,a)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_applyUpdatedTransform(a){if(!this.transformCameraUpdate)return;const f=a.clone(),{center:m,zoom:g,pitch:b,bearing:T,elevation:L}=this.transformCameraUpdate(f);m&&(f.center=m),g!==void 0&&(f.zoom=g),b!==void 0&&(f.pitch=b),T!==void 0&&(f.bearing=T),L!==void 0&&(f.elevation=L),this.transform.apply(f)}_fireMoveEvents(a){this.fire(new l.k("move",a)),this._zooming&&this.fire(new l.k("zoom",a)),this._rotating&&this.fire(new l.k("rotate",a)),this._pitching&&this.fire(new l.k("pitch",a))}_afterEase(a,f){if(this._easeId&&f&&this._easeId===f)return;delete this._easeId;const m=this._zooming,g=this._rotating,b=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,m&&this.fire(new l.k("zoomend",a)),g&&this.fire(new l.k("rotateend",a)),b&&this.fire(new l.k("pitchend",a)),this.fire(new l.k("moveend",a))}flyTo(a,f){var m;if(!a.essential&&E.prefersReducedMotion){const kn=l.L(a,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,f)}this.stop(),a=l.e({offset:[0,0],speed:1.2,curve:1.42,easing:l.b7},a);const g=this._getTransformForUpdate(),b=this.getZoom(),T=this.getBearing(),L=this.getPitch(),A=this.getPadding(),N="bearing"in a?this._normalizeBearing(a.bearing,T):T,V="pitch"in a?+a.pitch:L,j="padding"in a?a.padding:g.padding,$=l.P.convert(a.offset);let he=g.centerPoint.add($);const ce=g.pointLocation(he),{center:ge,zoom:re}=g.getConstrained(l.M.convert(a.center||ce),(m=a.zoom)!==null&&m!==void 0?m:b);this._normalizeCenter(ge);const Ie=g.zoomScale(re-b),Be=g.project(ce),ve=g.project(ge).sub(Be);let De=a.curve;const Ve=Math.max(g.width,g.height),He=Ve/Ie,$e=ve.mag();if("minZoom"in a){const kn=l.ac(Math.min(a.minZoom,b,re),g.minZoom,g.maxZoom),Jt=Ve/g.zoomScale(kn-b);De=Math.sqrt(Jt/$e*2)}const rt=De*De;function nt(kn){const Jt=(He*He-Ve*Ve+(kn?-1:1)*rt*rt*$e*$e)/(2*(kn?He:Ve)*rt*$e);return Math.log(Math.sqrt(Jt*Jt+1)-Jt)}function ct(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function pt(kn){return(Math.exp(kn)+Math.exp(-kn))/2}const un=nt(!1);let gt=function(kn){return pt(un)/pt(un+De*kn)},Ht=function(kn){return Ve*((pt(un)*(ct(Jt=un+De*kn)/pt(Jt))-ct(un))/rt)/$e;var Jt},cn=(nt(!0)-un)/De;if(Math.abs($e)<1e-6||!isFinite(cn)){if(Math.abs(Ve-He)<1e-6)return this.easeTo(a,f);const kn=Hea.maxDuration&&(a.duration=0),this._zooming=!0,this._rotating=T!==N,this._pitching=V!==L,this._padding=!g.isPaddingEqual(j),this._prepareEase(f,!1),this.terrain&&this._prepareElevation(ge),this._ease(kn=>{const Jt=kn*cn,mn=1/gt(Jt);g.zoom=kn===1?re:b+g.scaleZoom(mn),this._rotating&&(g.bearing=l.z.number(T,N,kn)),this._pitching&&(g.pitch=l.z.number(L,V,kn)),this._padding&&(g.interpolatePadding(A,j,kn),he=g.centerPoint.add($)),this.terrain&&!a.freezeElevation&&this._updateElevation(kn);const bn=kn===1?ge:g.unproject(Be.add(ve.mult(Ht(Jt))).mult(mn));g.setLocationAtPoint(g.renderWorldCopies?bn.wrap():bn,he),this._applyUpdatedTransform(g),this._fireMoveEvents(f)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(f)},a),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(a,f){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const m=this._onEaseEnd;delete this._onEaseEnd,m.call(this,f)}if(!a){const m=this.handlers;m&&m.stop(!1)}return this}_ease(a,f,m){m.animate===!1||m.duration===0?(a(1),f()):(this._easeStart=E.now(),this._easeOptions=m,this._onEaseFrame=a,this._onEaseEnd=f,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(a,f){a=l.b1(a,-180,180);const m=Math.abs(a-f);return Math.abs(a-360-f)180?-360:m<-180?360:0}queryTerrainElevation(a){return this.terrain?this.terrain.getElevationForLngLatZoom(l.M.convert(a),this.transform.tileZoom)-this.transform.elevation:null}}const jp={compact:!0,customAttribution:'MapLibre'};class As{constructor(a=jp){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=f=>{!f||f.sourceDataType!=="metadata"&&f.sourceDataType!=="visibility"&&f.dataType!=="style"&&f.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=a}getDefaultPosition(){return"bottom-right"}onAdd(a){return this._map=a,this._compact=this.options.compact,this._container=C.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=C.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=C.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(a,f){const m=this._map._getUIString(`AttributionControl.${f}`);a.title=m,a.setAttribute("aria-label",m)}_updateAttributions(){if(!this._map.style)return;let a=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?a=a.concat(this.options.customAttribution.map(g=>typeof g!="string"?"":g)):typeof this.options.customAttribution=="string"&&a.push(this.options.customAttribution)),this._map.style.stylesheet){const g=this._map.style.stylesheet;this.styleOwner=g.owner,this.styleId=g.id}const f=this._map.style.sourceCaches;for(const g in f){const b=f[g];if(b.used||b.usedForTerrain){const T=b.getSource();T.attribution&&a.indexOf(T.attribution)<0&&a.push(T.attribution)}}a=a.filter(g=>String(g).trim()),a.sort((g,b)=>g.length-b.length),a=a.filter((g,b)=>{for(let T=b+1;T=0)return!1;return!0});const m=a.join(" | ");m!==this._attribHTML&&(this._attribHTML=m,a.length?(this._innerContainer.innerHTML=m,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class cg{constructor(a={}){this._updateCompact=()=>{const f=this._container.children;if(f.length){const m=f[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&m.classList.add("maplibregl-compact"):m.classList.remove("maplibregl-compact")}},this.options=a}getDefaultPosition(){return"bottom-left"}onAdd(a){this._map=a,this._compact=this.options&&this.options.compact,this._container=C.create("div","maplibregl-ctrl");const f=C.create("a","maplibregl-ctrl-logo");return f.target="_blank",f.rel="noopener nofollow",f.href="https://maplibre.org/",f.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),f.setAttribute("rel","noopener nofollow"),this._container.appendChild(f),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){C.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Rc{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(a){const f=++this._id;return this._queue.push({callback:a,id:f,cancelled:!1}),f}remove(a){const f=this._currentlyRunning,m=f?this._queue.concat(f):this._queue;for(const g of m)if(g.id===a)return void(g.cancelled=!0)}run(a=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const f=this._currentlyRunning=this._queue;this._queue=[];for(const m of f)if(!m.cancelled&&(m.callback(a),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Vr=l.X([{name:"a_pos3d",type:"Int16",components:3}]);class ei extends l.E{constructor(a){super(),this.sourceCache=a,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,a.usedForTerrain=!0,a.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(a,f){this.sourceCache.update(a,f),this._renderableTilesKeys=[];const m={};for(const g of a.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:f}))m[g.key]=!0,this._renderableTilesKeys.push(g.key),this._tiles[g.key]||(g.posMatrix=new Float64Array(16),l.aN(g.posMatrix,0,l.W,0,l.W,0,1),this._tiles[g.key]=new ls(g,this.tileSize));for(const g in this._tiles)m[g]||delete this._tiles[g]}freeRtt(a){for(const f in this._tiles){const m=this._tiles[f];(!a||m.tileID.equals(a)||m.tileID.isChildOf(a)||a.isChildOf(m.tileID))&&(m.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(a=>this.getTileByID(a))}getTileByID(a){return this._tiles[a]}getTerrainCoords(a){const f={};for(const m of this._renderableTilesKeys){const g=this._tiles[m].tileID;if(g.canonical.equals(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16),l.aN(b.posMatrix,0,l.W,0,l.W,0,1),f[m]=b}else if(g.canonical.isChildOf(a.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=g.canonical.z-a.canonical.z,L=g.canonical.x-(g.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,N,0,N,0,1),l.H(b.posMatrix,b.posMatrix,[-L*N,-A*N,0]),f[m]=b}else if(a.canonical.isChildOf(g.canonical)){const b=a.clone();b.posMatrix=new Float64Array(16);const T=a.canonical.z-g.canonical.z,L=a.canonical.x-(a.canonical.x>>T<>T<>T;l.aN(b.posMatrix,0,l.W,0,l.W,0,1),l.H(b.posMatrix,b.posMatrix,[L*N,A*N,0]),l.J(b.posMatrix,b.posMatrix,[1/2**T,1/2**T,0]),f[m]=b}}return f}getSourceTile(a,f){const m=this.sourceCache._source;let g=a.overscaledZ-this.deltaZoom;if(g>m.maxzoom&&(g=m.maxzoom),g=m.minzoom&&(!b||!b.dem);)b=this.sourceCache.getTileByID(a.scaledTo(g--).key);return b}tilesAfterTime(a=Date.now()){return Object.values(this._tiles).filter(f=>f.timeAdded>=a)}}class hg{constructor(a,f,m){this.painter=a,this.sourceCache=new ei(f),this.options=m,this.exaggeration=typeof m.exaggeration=="number"?m.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(a,f,m,g=l.W){var b;if(!(f>=0&&f=0&&ma.canonical.z&&(a.canonical.z>=g?b=a.canonical.z-g:l.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const T=a.canonical.x-(a.canonical.x>>b<>b<>8<<4|b>>8,f[T+3]=0;const m=new l.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(f.buffer)),g=new Y(a,m,a.gl.RGBA,{premultiply:!1});return g.bind(a.gl.NEAREST,a.gl.CLAMP_TO_EDGE),this._coordsTexture=g,g}pointCoordinate(a){this.painter.maybeDrawDepthAndCoords(!0);const f=new Uint8Array(4),m=this.painter.context,g=m.gl,b=Math.round(a.x*this.painter.pixelRatio/devicePixelRatio),T=Math.round(a.y*this.painter.pixelRatio/devicePixelRatio),L=Math.round(this.painter.height/devicePixelRatio);m.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),g.readPixels(b,L-T-1,1,1,g.RGBA,g.UNSIGNED_BYTE,f),m.bindFramebuffer.set(null);const A=f[0]+(f[2]>>4<<8),N=f[1]+((15&f[2])<<8),V=this.coordsIndex[255-f[3]],j=V&&this.sourceCache.getTileByID(V);if(!j)return null;const $=this._coordsTextureSize,he=(1<a.id!==f),this._recentlyUsed.push(a.id)}stampObject(a){a.stamp=++this._stamp}getOrCreateFreeObject(){for(const f of this._recentlyUsed)if(!this._objects[f].inUse)return this._objects[f];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const a=this._createObject(this._objects.length);return this._objects.push(a),a}freeObject(a){a.inUse=!1}freeAllObjects(){for(const a of this._objects)this.freeObject(a)}isFull(){return!(this._objects.length!a.inUse)===!1}}const ka={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Gp{constructor(a,f){this.painter=a,this.terrain=f,this.pool=new Nc(a.context,30,f.sourceCache.tileSize*f.qualityFactor)}destruct(){this.pool.destruct()}getTexture(a){return this.pool.getObjectForId(a.rtt[this._stacks.length-1].id).texture}prepareForRender(a,f){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=a._order.filter(m=>!a._layers[m].isHidden(f)),this._coordsDescendingInv={};for(const m in a.sourceCaches){this._coordsDescendingInv[m]={};const g=a.sourceCaches[m].getVisibleCoordinates();for(const b of g){const T=this.terrain.sourceCache.getTerrainCoords(b);for(const L in T)this._coordsDescendingInv[m][L]||(this._coordsDescendingInv[m][L]=[]),this._coordsDescendingInv[m][L].push(T[L])}}this._coordsDescendingInvStr={};for(const m of a._order){const g=a._layers[m],b=g.source;if(ka[g.type]&&!this._coordsDescendingInvStr[b]){this._coordsDescendingInvStr[b]={};for(const T in this._coordsDescendingInv[b])this._coordsDescendingInvStr[b][T]=this._coordsDescendingInv[b][T].map(L=>L.key).sort().join()}}for(const m of this._renderableTiles)for(const g in this._coordsDescendingInvStr){const b=this._coordsDescendingInvStr[g][m.tileID.key];b&&b!==m.rttCoords[g]&&(m.rtt=[])}}renderLayer(a){if(a.isHidden(this.painter.transform.zoom))return!1;const f=a.type,m=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===a.id;if(ka[f]&&(this._prevType&&ka[this._prevType]||this._stacks.push([]),this._prevType=f,this._stacks[this._stacks.length-1].push(a.id),!g))return!0;if(ka[this._prevType]||ka[f]&&g){this._prevType=f;const b=this._stacks.length-1,T=this._stacks[b]||[];for(const L of this._renderableTiles){if(this.pool.isFull()&&(Vh(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(L),L.rtt[b]){const N=this.pool.getObjectForId(L.rtt[b].id);if(N.stamp===L.rtt[b].stamp){this.pool.useObject(N);continue}}const A=this.pool.getOrCreateFreeObject();this.pool.useObject(A),this.pool.stampObject(A),L.rtt[b]={id:A.id,stamp:A.stamp},m.context.bindFramebuffer.set(A.fbo.framebuffer),m.context.clear({color:l.aO.transparent,stencil:0}),m.currentStencilSource=void 0;for(let N=0;N{y.touchstart=y.dragStart,y.touchmoveWindow=y.dragMove,y.touchend=y.dragEnd},Hp={showCompass:!0,showZoom:!0,visualizePitch:!1};class Zp{constructor(a,f,m=!1){this.mousedown=T=>{this.startMouse(l.e({},T,{ctrlKey:!0,preventDefault:()=>T.preventDefault()}),C.mousePos(this.element,T)),C.addEventListener(window,"mousemove",this.mousemove),C.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=T=>{this.moveMouse(T,C.mousePos(this.element,T))},this.mouseup=T=>{this.mouseRotate.dragEnd(T),this.mousePitch&&this.mousePitch.dragEnd(T),this.offTemp()},this.touchstart=T=>{T.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.startTouch(T,this._startPos),C.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.addEventListener(window,"touchend",this.touchend))},this.touchmove=T=>{T.targetTouches.length!==1?this.reset():(this._lastPos=C.touchPos(this.element,T.targetTouches)[0],this.moveTouch(T,this._lastPos))},this.touchend=T=>{T.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const g=a.dragRotate._mouseRotate.getClickTolerance(),b=a.dragRotate._mousePitch.getClickTolerance();this.element=f,this.mouseRotate=Mu({clickTolerance:g,enable:!0}),this.touchRotate=(({enable:T,clickTolerance:L,bearingDegreesPerPixelMoved:A=.8})=>{const N=new Ct;return new Pu({clickTolerance:L,move:(V,j)=>({bearingDelta:(j.x-V.x)*A}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:g,enable:!0}),this.map=a,m&&(this.mousePitch=Au({clickTolerance:b,enable:!0}),this.touchPitch=(({enable:T,clickTolerance:L,pitchDegreesPerPixelMoved:A=-.5})=>{const N=new Ct;return new Pu({clickTolerance:L,move:(V,j)=>({pitchDelta:(j.y-V.y)*A}),moveStateManager:N,enable:T,assignEvents:Zh})})({clickTolerance:b,enable:!0})),C.addEventListener(f,"mousedown",this.mousedown),C.addEventListener(f,"touchstart",this.touchstart,{passive:!1}),C.addEventListener(f,"touchcancel",this.reset)}startMouse(a,f){this.mouseRotate.dragStart(a,f),this.mousePitch&&this.mousePitch.dragStart(a,f),C.disableDrag()}startTouch(a,f){this.touchRotate.dragStart(a,f),this.touchPitch&&this.touchPitch.dragStart(a,f),C.disableDrag()}moveMouse(a,f){const m=this.map,{bearingDelta:g}=this.mouseRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.mousePitch){const{pitchDelta:b}=this.mousePitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}moveTouch(a,f){const m=this.map,{bearingDelta:g}=this.touchRotate.dragMove(a,f)||{};if(g&&m.setBearing(m.getBearing()+g),this.touchPitch){const{pitchDelta:b}=this.touchPitch.dragMove(a,f)||{};b&&m.setPitch(m.getPitch()+b)}}off(){const a=this.element;C.removeEventListener(a,"mousedown",this.mousedown),C.removeEventListener(a,"touchstart",this.touchstart,{passive:!1}),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend),C.removeEventListener(a,"touchcancel",this.reset),this.offTemp()}offTemp(){C.enableDrag(),C.removeEventListener(window,"mousemove",this.mousemove),C.removeEventListener(window,"mouseup",this.mouseup),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend)}}let Da;function Xh(y,a,f){const m=new l.M(y.lng,y.lat);if(y=new l.M(y.lng,y.lat),a){const g=new l.M(y.lng-360,y.lat),b=new l.M(y.lng+360,y.lat),T=f.locationPoint(y).distSqr(a);f.locationPoint(g).distSqr(a)180;){const g=f.locationPoint(y);if(g.x>=0&&g.y>=0&&g.x<=f.width&&g.y<=f.height)break;y.lng>f.center.lng?y.lng-=360:y.lng+=360}return y.lng!==m.lng&&f.locationPoint(y).y>f.height/2-f.getHorizon()?y:m}const zc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Yh(y,a,f){const m=y.classList;for(const g in zc)m.remove(`maplibregl-${f}-anchor-${g}`);m.add(`maplibregl-${f}-anchor-${a}`)}class Fc extends l.E{constructor(a){if(super(),this._onKeyPress=f=>{const m=f.code,g=f.charCode||f.keyCode;m!=="Space"&&m!=="Enter"&&g!==32&&g!==13||this.togglePopup()},this._onMapClick=f=>{const m=f.originalEvent.target,g=this._element;this._popup&&(m===g||g.contains(m))&&this.togglePopup()},this._update=f=>{var m;if(!this._map)return;const g=this._map.loaded()&&!this._map.isMoving();((f==null?void 0:f.type)==="terrain"||(f==null?void 0:f.type)==="render"&&!g)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Xh(this._lngLat,this._flatPos,this._map.transform):(m=this._lngLat)===null||m===void 0?void 0:m.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let b="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?b=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(b=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let T="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?T="rotateX(0deg)":this._pitchAlignment==="map"&&(T=`rotateX(${this._map.getPitch()}deg)`),f&&f.type!=="moveend"||(this._pos=this._pos.round()),C.setTransform(this._element,`${zc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${T} ${b}`),E.frameAsync(new AbortController).then(()=>{this._updateOpacity(f&&f.type==="moveend")}).catch(()=>{})},this._onMove=f=>{if(!this._isDragging){const m=this._clickTolerance||this._map._clickTolerance;this._isDragging=f.point.dist(this._pointerdownPos)>=m}this._isDragging&&(this._pos=f.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new l.k("dragstart"))),this.fire(new l.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new l.k("dragend")),this._state="inactive"},this._addDragHandler=f=>{this._element.contains(f.originalEvent.target)&&(f.preventDefault(),this._positionDelta=f.point.sub(this._pos).add(this._offset),this._pointerdownPos=f.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=a&&a.anchor||"center",this._color=a&&a.color||"#3FB1CE",this._scale=a&&a.scale||1,this._draggable=a&&a.draggable||!1,this._clickTolerance=a&&a.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=a&&a.rotation||0,this._rotationAlignment=a&&a.rotationAlignment||"auto",this._pitchAlignment=a&&a.pitchAlignment&&a.pitchAlignment!=="auto"?a.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(a==null?void 0:a.opacity,a==null?void 0:a.opacityWhenCovered),a&&a.element)this._element=a.element,this._offset=l.P.convert(a&&a.offset||[0,0]);else{this._defaultMarker=!0,this._element=C.create("div"),this._element.setAttribute("aria-label","Map marker");const f=C.createNS("http://www.w3.org/2000/svg","svg"),m=41,g=27;f.setAttributeNS(null,"display","block"),f.setAttributeNS(null,"height",`${m}px`),f.setAttributeNS(null,"width",`${g}px`),f.setAttributeNS(null,"viewBox",`0 0 ${g} ${m}`);const b=C.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"stroke","none"),b.setAttributeNS(null,"stroke-width","1"),b.setAttributeNS(null,"fill","none"),b.setAttributeNS(null,"fill-rule","evenodd");const T=C.createNS("http://www.w3.org/2000/svg","g");T.setAttributeNS(null,"fill-rule","nonzero");const L=C.createNS("http://www.w3.org/2000/svg","g");L.setAttributeNS(null,"transform","translate(3.0, 29.0)"),L.setAttributeNS(null,"fill","#000000");const A=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const Ie of A){const Be=C.createNS("http://www.w3.org/2000/svg","ellipse");Be.setAttributeNS(null,"opacity","0.04"),Be.setAttributeNS(null,"cx","10.5"),Be.setAttributeNS(null,"cy","5.80029008"),Be.setAttributeNS(null,"rx",Ie.rx),Be.setAttributeNS(null,"ry",Ie.ry),L.appendChild(Be)}const N=C.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"fill",this._color);const V=C.createNS("http://www.w3.org/2000/svg","path");V.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),N.appendChild(V);const j=C.createNS("http://www.w3.org/2000/svg","g");j.setAttributeNS(null,"opacity","0.25"),j.setAttributeNS(null,"fill","#000000");const $=C.createNS("http://www.w3.org/2000/svg","path");$.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),j.appendChild($);const he=C.createNS("http://www.w3.org/2000/svg","g");he.setAttributeNS(null,"transform","translate(6.0, 7.0)"),he.setAttributeNS(null,"fill","#FFFFFF");const ce=C.createNS("http://www.w3.org/2000/svg","g");ce.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ge=C.createNS("http://www.w3.org/2000/svg","circle");ge.setAttributeNS(null,"fill","#000000"),ge.setAttributeNS(null,"opacity","0.25"),ge.setAttributeNS(null,"cx","5.5"),ge.setAttributeNS(null,"cy","5.5"),ge.setAttributeNS(null,"r","5.4999962");const re=C.createNS("http://www.w3.org/2000/svg","circle");re.setAttributeNS(null,"fill","#FFFFFF"),re.setAttributeNS(null,"cx","5.5"),re.setAttributeNS(null,"cy","5.5"),re.setAttributeNS(null,"r","5.4999962"),ce.appendChild(ge),ce.appendChild(re),T.appendChild(L),T.appendChild(N),T.appendChild(j),T.appendChild(he),T.appendChild(ce),f.appendChild(T),f.setAttributeNS(null,"height",m*this._scale+"px"),f.setAttributeNS(null,"width",g*this._scale+"px"),this._element.appendChild(f),this._offset=l.P.convert(a&&a.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",f=>{f.preventDefault()}),this._element.addEventListener("mousedown",f=>{f.preventDefault()}),Yh(this._element,this._anchor,"marker"),a&&a.className)for(const f of a.className.split(" "))this._element.classList.add(f);this._popup=null}addTo(a){return this.remove(),this._map=a,a.getCanvasContainer().appendChild(this._element),a.on("move",this._update),a.on("moveend",this._update),a.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),C.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(a){return this._lngLat=l.M.convert(a),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(a){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),a){if(!("offset"in a.options)){const g=Math.abs(13.5)/Math.SQRT2;a.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[g,-1*(38.1-13.5+g)],"bottom-right":[-g,-1*(38.1-13.5+g)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=a,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}getPopup(){return this._popup}togglePopup(){const a=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:a?(a.isOpen()?a.remove():(a.setLngLat(this._lngLat),a.addTo(this._map)),this):this}_updateOpacity(a=!1){var f,m;if(!(!((f=this._map)===null||f===void 0)&&f.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(a)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,b=g.terrain.depthAtPoint(this._pos),T=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,T)-b<.006)return void(this._element.style.opacity=this._opacity);const L=-this._offset.y/g.transform._pixelPerMeter,A=Math.sin(g.getPitch()*Math.PI/180)*L,N=g.terrain.depthAtPoint(new l.P(this._pos.x,this._pos.y-this._offset.y)),V=g.transform.lngLatToCameraDepth(this._lngLat,T+A)-N>.006;!((m=this._popup)===null||m===void 0)&&m.isOpen()&&V&&this._popup.remove(),this._element.style.opacity=V?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(a){return this._offset=l.P.convert(a),this._update(),this}addClassName(a){this._element.classList.add(a)}removeClassName(a){this._element.classList.remove(a)}toggleClassName(a){return this._element.classList.toggle(a)}setDraggable(a){return this._draggable=!!a,this._map&&(a?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(a){return this._rotation=a||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(a){return this._rotationAlignment=a||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(a){return this._pitchAlignment=a&&a!=="auto"?a:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(a,f){return a===void 0&&f===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),a!==void 0&&(this._opacity=a),f!==void 0&&(this._opacityWhenCovered=f),this._map&&this._updateOpacity(!0),this}}const $h={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Du=0,Wl=!1;const Kh={maxWidth:100,unit:"metric"};function Jh(y,a,f){const m=f&&f.maxWidth||100,g=y._container.clientHeight/2,b=y.unproject([0,g]),T=y.unproject([m,g]),L=b.distanceTo(T);if(f&&f.unit==="imperial"){const A=3.2808*L;A>5280?Hl(a,m,A/5280,y._getUIString("ScaleControl.Miles")):Hl(a,m,A,y._getUIString("ScaleControl.Feet"))}else f&&f.unit==="nautical"?Hl(a,m,L/1852,y._getUIString("ScaleControl.NauticalMiles")):L>=1e3?Hl(a,m,L/1e3,y._getUIString("ScaleControl.Kilometers")):Hl(a,m,L,y._getUIString("ScaleControl.Meters"))}function Hl(y,a,f,m){const g=function(b){const T=Math.pow(10,`${Math.floor(b)}`.length-1);let L=b/T;return L=L>=10?10:L>=5?5:L>=3?3:L>=2?2:L>=1?1:function(A){const N=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*N)/N}(L),T*L}(f);y.style.width=a*(g/f)+"px",y.innerHTML=`${g} ${m}`}const Xp={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Yp=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Qh(y){if(y){if(typeof y=="number"){const a=Math.round(Math.abs(y)/Math.SQRT2);return{center:new l.P(0,0),top:new l.P(0,y),"top-left":new l.P(a,a),"top-right":new l.P(-a,a),bottom:new l.P(0,-y),"bottom-left":new l.P(a,-a),"bottom-right":new l.P(-a,-a),left:new l.P(y,0),right:new l.P(-y,0)}}if(y instanceof l.P||Array.isArray(y)){const a=l.P.convert(y);return{center:a,top:a,"top-left":a,"top-right":a,bottom:a,"bottom-left":a,"bottom-right":a,left:a,right:a}}return{center:l.P.convert(y.center||[0,0]),top:l.P.convert(y.top||[0,0]),"top-left":l.P.convert(y["top-left"]||[0,0]),"top-right":l.P.convert(y["top-right"]||[0,0]),bottom:l.P.convert(y.bottom||[0,0]),"bottom-left":l.P.convert(y["bottom-left"]||[0,0]),"bottom-right":l.P.convert(y["bottom-right"]||[0,0]),left:l.P.convert(y.left||[0,0]),right:l.P.convert(y.right||[0,0])}}return Qh(new l.P(0,0))}const fg=d;c.AJAXError=l.be,c.Evented=l.E,c.LngLat=l.M,c.MercatorCoordinate=l.Y,c.Point=l.P,c.addProtocol=l.bf,c.config=l.a,c.removeProtocol=l.bg,c.AttributionControl=As,c.BoxZoomHandler=Ps,c.CanvasSource=Cs,c.CooperativeGesturesHandler=Nt,c.DoubleClickZoomHandler=Vp,c.DragPanHandler=ug,c.DragRotateHandler=Ms,c.EdgeInsets=Tu,c.FullscreenControl=class extends l.E{constructor(y={}){super(),this._onFullscreenChange=()=>{var a;let f=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((a=f==null?void 0:f.shadowRoot)===null||a===void 0)&&a.fullscreenElement;)f=f.shadowRoot.fullscreenElement;f===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,y&&y.container&&(y.container instanceof HTMLElement?this._container=y.container:l.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(y){return this._map=y,this._container||(this._container=this._map.getContainer()),this._controlContainer=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){C.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const y=this._fullscreenButton=C.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);C.create("span","maplibregl-ctrl-icon",y).setAttribute("aria-hidden","true"),y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",y),this._fullscreenButton.title=y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new l.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new l.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},c.GeoJSONSource=Cn,c.GeolocateControl=class extends l.E{constructor(y){super(),this._onSuccess=a=>{if(this._map){if(this._isOutOfMapMaxBounds(a))return this._setErrorState(),this.fire(new l.k("outofmaxbounds",a)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=a,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(a),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(a),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new l.k("geolocate",a)),this._finish()}},this._updateCamera=a=>{const f=new l.M(a.coords.longitude,a.coords.latitude),m=a.coords.accuracy,g=this._map.getBearing(),b=l.e({bearing:g},this.options.fitBoundsOptions),T=Me.fromLngLat(f,m);this._map.fitBounds(T,b,{geolocateSource:!0})},this._updateMarker=a=>{if(a){const f=new l.M(a.coords.longitude,a.coords.latitude);this._accuracyCircleMarker.setLngLat(f).addTo(this._map),this._userLocationDotMarker.setLngLat(f).addTo(this._map),this._accuracy=a.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=a=>{if(this._map){if(this.options.trackUserLocation)if(a.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(a.code===3&&Wl)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new l.k("error",a)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=a=>{if(this._map){if(this._container.addEventListener("contextmenu",f=>f.preventDefault()),this._geolocateButton=C.create("button","maplibregl-ctrl-geolocate",this._container),C.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",a===!1){l.w("Geolocation support is not available so the GeolocateControl will be disabled.");const f=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}else{const f=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=f,this._geolocateButton.setAttribute("aria-label",f)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=C.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fc({element:this._dotElement}),this._circleElement=C.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",f=>{f.geolocateSource||this._watchState!=="ACTIVE_LOCK"||f.originalEvent&&f.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new l.k("trackuserlocationend")))})}},this.options=l.e({},$h,y)}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(){return l._(this,arguments,void 0,function*(a=!1){if(Da!==void 0&&!a)return Da;if(window.navigator.permissions===void 0)return Da=!!window.navigator.geolocation,Da;try{Da=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Da=!!window.navigator.geolocation}return Da})}().then(a=>this._setupUI(a)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),C.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Du=0,Wl=!1}_isOutOfMapMaxBounds(y){const a=this._map.getMaxBounds(),f=y.coords;return a&&(f.longitudea.getEast()||f.latitudea.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const y=this._map.getBounds(),a=y.getSouthEast(),f=y.getNorthEast(),m=a.distanceTo(f),g=Math.ceil(this._accuracy/(m/this._map._container.clientHeight)*2);this._circleElement.style.width=`${g}px`,this._circleElement.style.height=`${g}px`}trigger(){if(!this._setup)return l.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Du--,Wl=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new l.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.k("trackuserlocationstart"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Du++,Du>1?(y={maximumAge:6e5,timeout:0},Wl=!0):(y=this.options.positionOptions,Wl=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},c.Hash=Op,c.ImageSource=ur,c.KeyboardHandler=al,c.LngLatBounds=Me,c.LogoControl=cg,c.Map=class extends Co{constructor(y){if(l.bc.mark(l.bd.create),(y=l.e({},Oc,y)).minZoom!=null&&y.maxZoom!=null&&y.minZoom>y.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(y.minPitch!=null&&y.maxPitch!=null&&y.minPitch>y.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(y.minPitch!=null&&y.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(y.maxPitch!=null&&y.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Uh(y.minZoom,y.maxZoom,y.minPitch,y.maxPitch,y.renderWorldCopies),{bearingSnap:y.bearingSnap}),this._contextLost=a=>{a.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new l.k("webglcontextlost",{originalEvent:a}))},this._contextRestored=a=>{this._setupPainter(),this.resize(),this._update(),this.fire(new l.k("webglcontextrestored",{originalEvent:a}))},this._onMapScroll=a=>{if(a.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=y.interactive,this._maxTileCacheSize=y.maxTileCacheSize,this._maxTileCacheZoomLevels=y.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=y.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=y.preserveDrawingBuffer,this._antialias=y.antialias,this._trackResize=y.trackResize,this._bearingSnap=y.bearingSnap,this._refreshExpiredTiles=y.refreshExpiredTiles,this._fadeDuration=y.fadeDuration,this._crossSourceCollisions=y.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=y.collectResourceTiming,this._renderTaskQueue=new Rc,this._controls=[],this._mapId=l.a3(),this._locale=l.e({},qp,y.locale),this._clickTolerance=y.clickTolerance,this._overridePixelRatio=y.pixelRatio,this._maxCanvasSize=y.maxCanvasSize,this.transformCameraUpdate=y.transformCameraUpdate,this._imageQueueHandle=G.addThrottleControl(()=>this.isMoving()),this._requestManager=new H(y.transformRequest),typeof y.container=="string"){if(this._container=document.getElementById(y.container),!this._container)throw new Error(`Container '${y.container}' not found.`)}else{if(!(y.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=y.container}if(y.maxBounds&&this.setMaxBounds(y.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}),this.once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let a=!1;const f=Np(m=>{this._trackResize&&!this._removed&&this.resize(m)._update()},50);this._resizeObserver=new ResizeObserver(m=>{a?f(m):a=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Up(this,y),this._hash=y.hash&&new Op(typeof y.hash=="string"&&y.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:y.center,zoom:y.zoom,bearing:y.bearing,pitch:y.pitch}),y.bounds&&(this.resize(),this.fitBounds(y.bounds,l.e({},y.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=y.localIdeographFontFamily,this._validateStyle=y.validateStyle,y.style&&this.setStyle(y.style,{localIdeographFontFamily:y.localIdeographFontFamily}),y.attributionControl&&this.addControl(new As(typeof y.attributionControl=="boolean"?void 0:y.attributionControl)),y.maplibreLogo&&this.addControl(new cg,y.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",a=>{this._update(a.dataType==="style"),this.fire(new l.k(`${a.dataType}data`,a))}),this.on("dataloading",a=>{this.fire(new l.k(`${a.dataType}dataloading`,a))}),this.on("dataabort",a=>{this.fire(new l.k("sourcedataabort",a))})}_getMapId(){return this._mapId}addControl(y,a){if(a===void 0&&(a=y.getDefaultPosition?y.getDefaultPosition():"top-right"),!y||!y.onAdd)return this.fire(new l.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const f=y.onAdd(this);this._controls.push(y);const m=this._controlPositions[a];return a.indexOf("bottom")!==-1?m.insertBefore(f,m.firstChild):m.appendChild(f),this}removeControl(y){if(!y||!y.onRemove)return this.fire(new l.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const a=this._controls.indexOf(y);return a>-1&&this._controls.splice(a,1),y.onRemove(this),this}hasControl(y){return this._controls.indexOf(y)>-1}calculateCameraOptionsFromTo(y,a,f,m){return m==null&&this.terrain&&(m=this.terrain.getElevationForLngLatZoom(f,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(y,a,f,m)}resize(y){var a;const f=this._containerDimensions(),m=f[0],g=f[1],b=this._getClampedPixelRatio(m,g);if(this._resizeCanvas(m,g,b),this.painter.resize(m,g,b),this.painter.overLimit()){const L=this.painter.context.gl;this._maxCanvasSize=[L.drawingBufferWidth,L.drawingBufferHeight];const A=this._getClampedPixelRatio(m,g);this._resizeCanvas(m,g,A),this.painter.resize(m,g,A)}this.transform.resize(m,g),(a=this._requestedCameraState)===null||a===void 0||a.resize(m,g);const T=!this._moving;return T&&(this.stop(),this.fire(new l.k("movestart",y)).fire(new l.k("move",y))),this.fire(new l.k("resize",y)),T&&this.fire(new l.k("moveend",y)),this}_getClampedPixelRatio(y,a){const{0:f,1:m}=this._maxCanvasSize,g=this.getPixelRatio(),b=y*g,T=a*g;return Math.min(b>f?f/b:1,T>m?m/T:1)*g}getPixelRatio(){var y;return(y=this._overridePixelRatio)!==null&&y!==void 0?y:devicePixelRatio}setPixelRatio(y){this._overridePixelRatio=y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(y){return this.transform.setMaxBounds(Me.convert(y)),this._update()}setMinZoom(y){if((y=y??-2)>=-2&&y<=this.transform.maxZoom)return this.transform.minZoom=y,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=y,this._update(),this.getZoom()>y&&this.setZoom(y),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(y){if((y=y??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(y>=0&&y<=this.transform.maxPitch)return this.transform.minPitch=y,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(y>=this.transform.minPitch)return this.transform.maxPitch=y,this._update(),this.getPitch()>y&&this.setPitch(y),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(y){return this.transform.renderWorldCopies=y,this._update()}project(y){return this.transform.locationPoint(l.M.convert(y),this.style&&this.terrain)}unproject(y){return this.transform.pointLocation(l.P.convert(y),this.terrain)}isMoving(){var y;return this._moving||((y=this.handlers)===null||y===void 0?void 0:y.isMoving())}isZooming(){var y;return this._zooming||((y=this.handlers)===null||y===void 0?void 0:y.isZooming())}isRotating(){var y;return this._rotating||((y=this.handlers)===null||y===void 0?void 0:y.isRotating())}_createDelegatedListener(y,a,f){if(y==="mouseenter"||y==="mouseover"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:b=>{const T=this.getLayer(a)?this.queryRenderedFeatures(b.point,{layers:[a]}):[];T.length?m||(m=!0,f.call(this,new Io(y,this,b.originalEvent,{features:T}))):m=!1},mouseout:()=>{m=!1}}}}if(y==="mouseleave"||y==="mouseout"){let m=!1;return{layer:a,listener:f,delegates:{mousemove:T=>{(this.getLayer(a)?this.queryRenderedFeatures(T.point,{layers:[a]}):[]).length?m=!0:m&&(m=!1,f.call(this,new Io(y,this,T.originalEvent)))},mouseout:T=>{m&&(m=!1,f.call(this,new Io(y,this,T.originalEvent)))}}}}{const m=g=>{const b=this.getLayer(a)?this.queryRenderedFeatures(g.point,{layers:[a]}):[];b.length&&(g.features=b,f.call(this,g),delete g.features)};return{layer:a,listener:f,delegates:{[y]:m}}}}on(y,a,f){if(f===void 0)return super.on(y,a);const m=this._createDelegatedListener(y,a,f);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[y]=this._delegatedListeners[y]||[],this._delegatedListeners[y].push(m);for(const g in m.delegates)this.on(g,m.delegates[g]);return this}once(y,a,f){if(f===void 0)return super.once(y,a);const m=this._createDelegatedListener(y,a,f);for(const g in m.delegates)this.once(g,m.delegates[g]);return this}off(y,a,f){return f===void 0?super.off(y,a):(this._delegatedListeners&&this._delegatedListeners[y]&&(m=>{const g=this._delegatedListeners[y];for(let b=0;bthis._updateStyle(y,a));const f=this.style&&a.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!y)),y?(this.style=new Go(this,a||{}),this.style.setEventedParent(this,{style:this.style}),typeof y=="string"?this.style.loadURL(y,a,f):this.style.loadJSON(y,a,f),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Go(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(y,a){if(typeof y=="string"){const f=this._requestManager.transformRequest(y,"Style");l.h(f,new AbortController).then(m=>{this._updateDiff(m.data,a)}).catch(m=>{m&&this.fire(new l.j(m))})}else typeof y=="object"&&this._updateDiff(y,a)}_updateDiff(y,a){try{this.style.setState(y,a)&&this._update(!0)}catch(f){l.w(`Unable to perform style diff: ${f.message||f.error||f}. Rebuilding the style from scratch.`),this._updateStyle(y,a)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():l.w("There is no style added to the map.")}addSource(y,a){return this._lazyInitEmptyStyle(),this.style.addSource(y,a),this._update(!0)}isSourceLoaded(y){const a=this.style&&this.style.sourceCaches[y];if(a!==void 0)return a.loaded();this.fire(new l.j(new Error(`There is no source with ID '${y}'`)))}setTerrain(y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),y){const a=this.style.sourceCaches[y.source];if(!a)throw new Error(`cannot load terrain, because there exists no source with ID: ${y.source}`);this.terrain===null&&a.reload();for(const f in this.style._layers){const m=this.style._layers[f];m.type==="hillshade"&&m.source===y.source&&l.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new hg(this.painter,a,y),this.painter.renderToTexture=new Gp(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=f=>{f.dataType==="style"?this.terrain.sourceCache.freeRtt():f.dataType==="source"&&f.tile&&(f.sourceId!==y.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(f.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new l.k("terrain",{terrain:y})),this}getTerrain(){var y,a;return(a=(y=this.terrain)===null||y===void 0?void 0:y.options)!==null&&a!==void 0?a:null}areTilesLoaded(){const y=this.style&&this.style.sourceCaches;for(const a in y){const f=y[a]._tiles;for(const m in f){const g=f[m];if(g.state!=="loaded"&&g.state!=="errored")return!1}}return!0}removeSource(y){return this.style.removeSource(y),this._update(!0)}getSource(y){return this.style.getSource(y)}addImage(y,a,f={}){const{pixelRatio:m=1,sdf:g=!1,stretchX:b,stretchY:T,content:L}=f;if(this._lazyInitEmptyStyle(),!(a instanceof HTMLImageElement||l.b(a))){if(a.width===void 0||a.height===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:A,height:N,data:V}=a,j=a;return this.style.addImage(y,{data:new l.R({width:A,height:N},new Uint8Array(V)),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0,userImage:j}),j.onAdd&&j.onAdd(this,y),this}}{const{width:A,height:N,data:V}=E.getImageData(a);this.style.addImage(y,{data:new l.R({width:A,height:N},V),pixelRatio:m,stretchX:b,stretchY:T,content:L,sdf:g,version:0})}}updateImage(y,a){const f=this.style.getImage(y);if(!f)return this.fire(new l.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const m=a instanceof HTMLImageElement||l.b(a)?E.getImageData(a):a,{width:g,height:b,data:T}=m;if(g===void 0||b===void 0)return this.fire(new l.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(g!==f.data.width||b!==f.data.height)return this.fire(new l.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const L=!(a instanceof HTMLImageElement||l.b(a));return f.data.replace(T,L),this.style.updateImage(y,f),this}getImage(y){return this.style.getImage(y)}hasImage(y){return y?!!this.style.getImage(y):(this.fire(new l.j(new Error("Missing required image id"))),!1)}removeImage(y){this.style.removeImage(y)}loadImage(y){return G.getImage(this._requestManager.transformRequest(y,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(y,a){return this._lazyInitEmptyStyle(),this.style.addLayer(y,a),this._update(!0)}moveLayer(y,a){return this.style.moveLayer(y,a),this._update(!0)}removeLayer(y){return this.style.removeLayer(y),this._update(!0)}getLayer(y){return this.style.getLayer(y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(y,a,f){return this.style.setLayerZoomRange(y,a,f),this._update(!0)}setFilter(y,a,f={}){return this.style.setFilter(y,a,f),this._update(!0)}getFilter(y){return this.style.getFilter(y)}setPaintProperty(y,a,f,m={}){return this.style.setPaintProperty(y,a,f,m),this._update(!0)}getPaintProperty(y,a){return this.style.getPaintProperty(y,a)}setLayoutProperty(y,a,f,m={}){return this.style.setLayoutProperty(y,a,f,m),this._update(!0)}getLayoutProperty(y,a){return this.style.getLayoutProperty(y,a)}setGlyphs(y,a={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(y,a),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(y,a,f={}){return this._lazyInitEmptyStyle(),this.style.addSprite(y,a,f,m=>{m||this._update(!0)}),this}removeSprite(y){return this._lazyInitEmptyStyle(),this.style.removeSprite(y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(y,a={}){return this._lazyInitEmptyStyle(),this.style.setSprite(y,a,f=>{f||this._update(!0)}),this}setLight(y,a={}){return this._lazyInitEmptyStyle(),this.style.setLight(y,a),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(y,a){return this.style.setFeatureState(y,a),this._update()}removeFeatureState(y,a){return this.style.removeFeatureState(y,a),this._update()}getFeatureState(y){return this.style.getFeatureState(y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let y=0,a=0;return this._container&&(y=this._container.clientWidth||400,a=this._container.clientHeight||300),[y,a]}_setupContainer(){const y=this._container;y.classList.add("maplibregl-map");const a=this._canvasContainer=C.create("div","maplibregl-canvas-container",y);this._interactive&&a.classList.add("maplibregl-interactive"),this._canvas=C.create("canvas","maplibregl-canvas",a),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");const f=this._containerDimensions(),m=this._getClampedPixelRatio(f[0],f[1]);this._resizeCanvas(f[0],f[1],m);const g=this._controlContainer=C.create("div","maplibregl-control-container",y),b=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(T=>{b[T]=C.create("div",`maplibregl-ctrl-${T} `,g)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(y,a,f){this._canvas.width=Math.floor(f*y),this._canvas.height=Math.floor(f*a),this._canvas.style.width=`${y}px`,this._canvas.style.height=`${a}px`}_setupPainter(){const y={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let a=null;this._canvas.addEventListener("webglcontextcreationerror",m=>{a={requestedAttributes:y},m&&(a.statusMessage=m.statusMessage,a.type=m.type)},{once:!0});const f=this._canvas.getContext("webgl2",y)||this._canvas.getContext("webgl",y);if(!f){const m="Failed to initialize WebGL";throw a?(a.message=m,new Error(JSON.stringify(a))):new Error(m)}this.painter=new Jm(f,this.transform),M.testSupport(f)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(y){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||y,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(y){return this._update(),this._renderTaskQueue.add(y)}_cancelRenderFrame(y){this._renderTaskQueue.remove(y)}_render(y){const a=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(y),this._removed)return;let f=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const g=this.transform.zoom,b=E.now();this.style.zoomHistory.update(g,b);const T=new l.a8(g,{now:b,fadeDuration:a,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),L=T.crossFadingFactor();L===1&&L===this._crossFadingFactor||(f=!0,this._crossFadingFactor=L),this.style.update(T)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,a,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:a,showPadding:this.showPadding}),this.fire(new l.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,l.bc.mark(l.bd.load),this.fire(new l.k("load"))),this.style&&(this.style.hasTransitions()||f)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const m=this._sourcesDirty||this._styleDirty||this._placementDirty;return m||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new l.k("idle")),!this._loaded||this._fullyLoaded||m||(this._fullyLoaded=!0,l.bc.mark(l.bd.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var y;this._hash&&this._hash.remove();for(const f of this._controls)f.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),G.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();const a=this.painter.context.gl.getExtension("WEBGL_lose_context");a&&a.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),C.remove(this._canvasContainer),C.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),l.bc.clearMetrics(),this._removed=!0,this.fire(new l.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,E.frameAsync(this._frameRequest).then(y=>{l.bc.frame(y),this._frameRequest=null,this._render(y)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(y){this._showTileBoundaries!==y&&(this._showTileBoundaries=y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(y){this._showPadding!==y&&(this._showPadding=y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(y){this._showCollisionBoxes!==y&&(this._showCollisionBoxes=y,y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(y){this._showOverdrawInspector!==y&&(this._showOverdrawInspector=y,this._update())}get repaint(){return!!this._repaint}set repaint(y){this._repaint!==y&&(this._repaint=y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(y){this._vertices=y,this._update()}get version(){return Wp}getCameraTargetElevation(){return this.transform.elevation}},c.MapMouseEvent=Io,c.MapTouchEvent=Qs,c.MapWheelEvent=zp,c.Marker=Fc,c.NavigationControl=class{constructor(y){this._updateZoomButtons=()=>{const a=this._map.getZoom(),f=a===this._map.getMaxZoom(),m=a===this._map.getMinZoom();this._zoomInButton.disabled=f,this._zoomOutButton.disabled=m,this._zoomInButton.setAttribute("aria-disabled",f.toString()),this._zoomOutButton.setAttribute("aria-disabled",m.toString())},this._rotateCompassArrow=()=>{const a=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=a},this._setButtonTitle=(a,f)=>{const m=this._map._getUIString(`NavigationControl.${f}`);a.title=m,a.setAttribute("aria-label",m)},this.options=l.e({},Hp,y),this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",a=>a.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",a=>this._map.zoomIn({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",a=>this._map.zoomOut({},{originalEvent:a})),C.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",a=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:a}):this._map.resetNorth({},{originalEvent:a})}),this._compassIcon=C.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(y){return this._map=y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Zp(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){C.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(y,a){const f=C.create("button",y,this._container);return f.type="button",f.addEventListener("click",a),f}},c.Popup=class extends l.E{constructor(y){super(),this.remove=()=>(this._content&&C.remove(this._content),this._container&&(C.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new l.k("close"))),this),this._onMouseUp=a=>{this._update(a.point)},this._onMouseMove=a=>{this._update(a.point)},this._onDrag=a=>{this._update(a.point)},this._update=a=>{var f;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=C.create("div","maplibregl-popup",this._map.getContainer()),this._tip=C.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const L of this.options.className.split(" "))this._container.classList.add(L);this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Xh(this._lngLat,this._flatPos,this._map.transform):(f=this._lngLat)===null||f===void 0?void 0:f.wrap(),this._trackPointer&&!a)return;const m=this._flatPos=this._pos=this._trackPointer&&a?a:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&a?a:this._map.transform.locationPoint(this._lngLat));let g=this.options.anchor;const b=Qh(this.options.offset);if(!g){const L=this._container.offsetWidth,A=this._container.offsetHeight;let N;N=m.y+b.bottom.ythis._map.transform.height-A?["bottom"]:[],m.xthis._map.transform.width-L/2&&N.push("right"),g=N.length===0?"bottom":N.join("-")}let T=m.add(b[g]);this.options.subpixelPositioning||(T=T.round()),C.setTransform(this._container,`${zc[g]} translate(${T.x}px,${T.y}px)`),Yh(this._container,g,"popup")},this._onClose=()=>{this.remove()},this.options=l.e(Object.create(Xp),y)}addTo(y){return this._map&&this.remove(),this._map=y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new l.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=l.M.convert(y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(y){return this.setDOMContent(document.createTextNode(y))}setHTML(y){const a=document.createDocumentFragment(),f=document.createElement("body");let m;for(f.innerHTML=y;m=f.firstChild,m;)a.appendChild(m);return this.setDOMContent(a)}getMaxWidth(){var y;return(y=this._container)===null||y===void 0?void 0:y.style.maxWidth}setMaxWidth(y){return this.options.maxWidth=y,this._update(),this}setDOMContent(y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=C.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(y){this._container&&this._container.classList.add(y)}removeClassName(y){this._container&&this._container.classList.remove(y)}setOffset(y){return this.options.offset=y,this._update(),this}toggleClassName(y){if(this._container)return this._container.classList.toggle(y)}setSubpixelPositioning(y){this.options.subpixelPositioning=y}_createCloseButton(){this.options.closeButton&&(this._closeButton=C.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const y=this._container.querySelector(Yp);y&&y.focus()}},c.RasterDEMTileSource=It,c.RasterTileSource=Re,c.ScaleControl=class{constructor(y){this._onMove=()=>{Jh(this._map,this._container,this.options)},this.setUnit=a=>{this.options.unit=a,Jh(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Kh),y)}getDefaultPosition(){return"bottom-left"}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-scale",y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){C.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},c.ScrollZoomHandler=Wh,c.Style=Go,c.TerrainControl=class{constructor(y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=y}onAdd(y){return this._map=y,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=C.create("button","maplibregl-ctrl-terrain",this._container),C.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){C.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},c.TwoFingersTouchPitchHandler=sg,c.TwoFingersTouchRotateHandler=Bp,c.TwoFingersTouchZoomHandler=og,c.TwoFingersTouchZoomRotateHandler=kc,c.VectorTileSource=en,c.VideoSource=Uo,c.addSourceType=(y,a)=>l._(void 0,void 0,void 0,function*(){if(tl(y))throw new Error(`A source type called "${y}" already exists.`);((f,m)=>{$s[f]=m})(y,a)}),c.clearPrewarmedResources=function(){const y=fn;y&&(y.isPreloaded()&&y.numActive()===1?(y.release(Pt),fn=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},c.getMaxParallelImageRequests=function(){return l.a.MAX_PARALLEL_IMAGE_REQUESTS},c.getRTLTextPluginStatus=function(){return st().getRTLTextPluginStatus()},c.getVersion=function(){return fg},c.getWorkerCount=function(){return rn.workerCount},c.getWorkerUrl=function(){return l.a.WORKER_URL},c.importScriptInWorkers=function(y){return zr().broadcast("IS",y)},c.prewarm=function(){pn().acquire(Pt)},c.setMaxParallelImageRequests=function(y){l.a.MAX_PARALLEL_IMAGE_REQUESTS=y},c.setRTLTextPlugin=function(y,a){return st().setRTLTextPlugin(y,a)},c.setWorkerCount=function(y){rn.workerCount=y},c.setWorkerUrl=function(y){l.a.WORKER_URL=y}});var s=n;return s})})(ZE);var ny=ZE.exports;const Fs=m1(ny),df=[];function O0(t,e){return{subscribe:Nn(t,e).subscribe}}function Nn(t,e=Lt){let n;const r=new Set;function i(l){if(Ut(t,l)&&(t=l,n)){const d=!df.length;for(const v of r)v[1](),df.push(v,t);if(d){for(let v=0;v{r.delete(v),r.size===0&&n&&(n(),n=null)}}return{set:i,update:s,subscribe:c}}let Zt;const YE=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&YE.decode();let Md=null;function Vd(){return(Md===null||Md.byteLength===0)&&(Md=new Uint8Array(Zt.memory.buffer)),Md}function vl(t,e){return t=t>>>0,YE.decode(Vd().subarray(t,t+e))}const ru=new Array(128).fill(void 0);ru.push(void 0,null,!0,!1);let Ud=ru.length;function Ui(t){Ud===ru.length&&ru.push(ru.length+1);const e=Ud;return Ud=ru[e],ru[e]=t,e}function Dn(t){return ru[t]}function hM(t){t<132||(ru[t]=Ud,Ud=t)}function Kg(t){const e=Dn(t);return hM(t),e}function z0(t){return t==null}let Ad=null;function fM(){return(Ad===null||Ad.byteLength===0)&&(Ad=new Float64Array(Zt.memory.buffer)),Ad}let kd=null;function _r(){return(kd===null||kd.byteLength===0)&&(kd=new Int32Array(Zt.memory.buffer)),kd}let Hu=0;const Jg=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},pM=typeof Jg.encodeInto=="function"?function(t,e){return Jg.encodeInto(t,e)}:function(t,e){const n=Jg.encode(t);return e.set(n),{read:t.length,written:n.length}};function Og(t,e,n){if(n===void 0){const l=Jg.encode(t),d=e(l.length,1)>>>0;return Vd().subarray(d,d+l.length).set(l),Hu=l.length,d}let r=t.length,i=e(r,1)>>>0;const s=Vd();let c=0;for(;c127)break;s[i+c]=l}if(c!==r){c!==0&&(t=t.slice(c)),i=n(i,r,r=c+t.length*3,1)>>>0;const l=Vd().subarray(i+c,i+r),d=pM(t,l);c+=d.written}return Hu=c,i}function mv(t){const e=typeof t;if(e=="number"||e=="boolean"||t==null)return`${t}`;if(e=="string")return`"${t}"`;if(e=="symbol"){const i=t.description;return i==null?"Symbol":`Symbol(${i})`}if(e=="function"){const i=t.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(t)){const i=t.length;let s="[";i>0&&(s+=mv(t[0]));for(let c=1;c1)r=n[1];else return toString.call(t);if(r=="Object")try{return"Object("+JSON.stringify(t)+")"}catch{return"Object"}return t instanceof Error?`${t.name}: ${t.message} +${t.stack}`:r}function dM(t,e){const n=e(t.length*1,1)>>>0;return Vd().set(t,n/1),Hu=t.length,n}function F0(t,e){try{return t.apply(this,e)}catch(n){Zt.__wbindgen_exn_store(Ui(n))}}class f_{static __wrap(e){e=e>>>0;const n=Object.create(f_.prototype);return n.__wbg_ptr=e,n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,e}free(){const e=this.__destroy_into_raw();Zt.__wbg_jsroutesnapper_free(e)}constructor(e){try{const s=Zt.__wbindgen_add_to_stack_pointer(-16),c=dM(e,Zt.__wbindgen_malloc),l=Hu;Zt.jsroutesnapper_new(s,c,l);var n=_r()[s/4+0],r=_r()[s/4+1],i=_r()[s/4+2];if(i)throw Kg(r);return f_.__wrap(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(e){Zt.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Ui(e))}setAreaMode(){Zt.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_getConfig(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toFinalFeature(){try{const r=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_toFinalFeature(r,this.__wbg_ptr);var e=_r()[r/4+0],n=_r()[r/4+1];let i;return e!==0&&(i=vl(e,n).slice(),Zt.__wbindgen_free(e,n*1)),i}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_renderGeojson(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}toggleSnapMode(){Zt.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(e,n,r){return Zt.jsroutesnapper_onMouseMove(this.__wbg_ptr,e,n,r)!==0}onClick(){Zt.jsroutesnapper_onClick(this.__wbg_ptr)}onDragStart(){return Zt.jsroutesnapper_onDragStart(this.__wbg_ptr)!==0}onMouseUp(){return Zt.jsroutesnapper_onMouseUp(this.__wbg_ptr)!==0}clearState(){Zt.jsroutesnapper_clearState(this.__wbg_ptr)}editExisting(e){try{const i=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_editExisting(i,this.__wbg_ptr,Ui(e));var n=_r()[i/4+0],r=_r()[i/4+1];if(r)throw Kg(n)}finally{Zt.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugRenderGraph(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}debugSnappableNodes(){let e,n;try{const s=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_debugSnappableNodes(s,this.__wbg_ptr);var r=_r()[s/4+0],i=_r()[s/4+1];return e=r,n=i,vl(r,i)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(e,n,1)}}routeNameForWaypoints(e){let n,r;try{const S=Zt.__wbindgen_add_to_stack_pointer(-16);Zt.jsroutesnapper_routeNameForWaypoints(S,this.__wbg_ptr,Ui(e));var i=_r()[S/4+0],s=_r()[S/4+1],c=_r()[S/4+2],l=_r()[S/4+3],d=i,v=s;if(l)throw d=0,v=0,Kg(c);return n=d,r=v,vl(d,v)}finally{Zt.__wbindgen_add_to_stack_pointer(16),Zt.__wbindgen_free(n,r,1)}}addSnappedWaypoint(e,n){Zt.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,e,n)}undo(){Zt.jsroutesnapper_undo(this.__wbg_ptr)}}async function mM(t,e){if(typeof Response=="function"&&t instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(t,e)}catch(r){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",r);else throw r}const n=await t.arrayBuffer();return await WebAssembly.instantiate(n,e)}else{const n=await WebAssembly.instantiate(t,e);return n instanceof WebAssembly.Instance?{instance:n,module:t}:n}}function gM(){const t={};return t.wbg={},t.wbg.__wbindgen_string_new=function(e,n){const r=vl(e,n);return Ui(r)},t.wbg.__wbindgen_object_drop_ref=function(e){Kg(e)},t.wbg.__wbindgen_error_new=function(e,n){const r=new Error(vl(e,n));return Ui(r)},t.wbg.__wbindgen_is_object=function(e){const n=Dn(e);return typeof n=="object"&&n!==null},t.wbg.__wbindgen_is_undefined=function(e){return Dn(e)===void 0},t.wbg.__wbindgen_in=function(e,n){return Dn(e)in Dn(n)},t.wbg.__wbindgen_number_get=function(e,n){const r=Dn(n),i=typeof r=="number"?r:void 0;fM()[e/8+1]=z0(i)?0:i,_r()[e/4+0]=!z0(i)},t.wbg.__wbindgen_boolean_get=function(e){const n=Dn(e);return typeof n=="boolean"?n?1:0:2},t.wbg.__wbindgen_jsval_loose_eq=function(e,n){return Dn(e)==Dn(n)},t.wbg.__wbindgen_string_get=function(e,n){const r=Dn(n),i=typeof r=="string"?r:void 0;var s=z0(i)?0:Og(i,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),c=Hu;_r()[e/4+1]=c,_r()[e/4+0]=s},t.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(e,n){const r=Dn(e)[Dn(n)];return Ui(r)},t.wbg.__wbindgen_object_clone_ref=function(e){const n=Dn(e);return Ui(n)},t.wbg.__wbg_String_4370c5505c674d30=function(e,n){const r=String(Dn(n)),i=Og(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_new_abda76e883ba8a5f=function(){const e=new Error;return Ui(e)},t.wbg.__wbg_stack_658279fe44541cf6=function(e,n){const r=Dn(n).stack,i=Og(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbg_error_f851667af71bcfc6=function(e,n){let r,i;try{r=e,i=n,console.error(vl(e,n))}finally{Zt.__wbindgen_free(r,i,1)}},t.wbg.__wbg_debug_9a6b3243fbbebb61=function(e){console.debug(Dn(e))},t.wbg.__wbg_error_788ae33f81d3b84b=function(e){console.error(Dn(e))},t.wbg.__wbg_info_2e30e8204b29d91d=function(e){console.info(Dn(e))},t.wbg.__wbg_log_1d3ae0273d8f4f8a=function(e){console.log(Dn(e))},t.wbg.__wbg_warn_d60e832f9882c1b2=function(e){console.warn(Dn(e))},t.wbg.__wbg_get_44be0491f933a435=function(e,n){const r=Dn(e)[n>>>0];return Ui(r)},t.wbg.__wbg_length_fff51ee6522a1a18=function(e){return Dn(e).length},t.wbg.__wbindgen_is_function=function(e){return typeof Dn(e)=="function"},t.wbg.__wbg_next_526fc47e980da008=function(e){const n=Dn(e).next;return Ui(n)},t.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return F0(function(e){const n=Dn(e).next();return Ui(n)},arguments)},t.wbg.__wbg_done_5c1f01fb660d73b5=function(e){return Dn(e).done},t.wbg.__wbg_value_1695675138684bd5=function(e){const n=Dn(e).value;return Ui(n)},t.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Ui(Symbol.iterator)},t.wbg.__wbg_get_97b561fb56f034b5=function(){return F0(function(e,n){const r=Reflect.get(Dn(e),Dn(n));return Ui(r)},arguments)},t.wbg.__wbg_call_cb65541d95d71282=function(){return F0(function(e,n){const r=Dn(e).call(Dn(n));return Ui(r)},arguments)},t.wbg.__wbg_isArray_4c24b343cb13cfb1=function(e){return Array.isArray(Dn(e))},t.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(e){let n;try{n=Dn(e)instanceof ArrayBuffer}catch{n=!1}return n},t.wbg.__wbg_buffer_085ec1f694018c4f=function(e){const n=Dn(e).buffer;return Ui(n)},t.wbg.__wbg_new_8125e318e6245eed=function(e){const n=new Uint8Array(Dn(e));return Ui(n)},t.wbg.__wbg_set_5cf90238115182c3=function(e,n,r){Dn(e).set(Dn(n),r>>>0)},t.wbg.__wbg_length_72e2208bbc0efc61=function(e){return Dn(e).length},t.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(e){let n;try{n=Dn(e)instanceof Uint8Array}catch{n=!1}return n},t.wbg.__wbindgen_debug_string=function(e,n){const r=mv(Dn(n)),i=Og(r,Zt.__wbindgen_malloc,Zt.__wbindgen_realloc),s=Hu;_r()[e/4+1]=s,_r()[e/4+0]=i},t.wbg.__wbindgen_throw=function(e,n){throw new Error(vl(e,n))},t.wbg.__wbindgen_memory=function(){const e=Zt.memory;return Ui(e)},t}function _M(t,e){return Zt=t.exports,$E.__wbindgen_wasm_module=e,Ad=null,kd=null,Md=null,Zt}async function $E(t){if(Zt!==void 0)return Zt;typeof t>"u"&&(t="/ltn/assets/route_snapper_bg.wasm");const e=gM();(typeof t=="string"||typeof Request=="function"&&t instanceof Request||typeof URL=="function"&&t instanceof URL)&&(t=fetch(t));const{instance:n,module:r}=await mM(await t,e);return _M(n,r)}var Do=63710088e-1,g1={centimeters:Do*100,centimetres:Do*100,degrees:Do/111325,feet:Do*3.28084,inches:Do*39.37,kilometers:Do/1e3,kilometres:Do/1e3,meters:Do,metres:Do,miles:Do/1609.344,millimeters:Do*1e3,millimetres:Do*1e3,nauticalmiles:Do/1852,radians:1,yards:Do*1.0936},yM={centimeters:100,centimetres:100,degrees:1/111325,feet:3.28084,inches:39.37,kilometers:1/1e3,kilometres:1/1e3,meters:1,metres:1,miles:1/1609.344,millimeters:1e3,millimetres:1e3,nauticalmiles:1/1852,radians:1/Do,yards:1.0936133},gv={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,millimeters:1e6,millimetres:1e6,yards:1.195990046};function ga(t,e,n){n===void 0&&(n={});var r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function vM(t,e,n){switch(t){case"Point":return gs(e).geometry;case"LineString":return ha(e).geometry;case"Polygon":return _1(e).geometry;case"MultiPoint":return JE(e).geometry;case"MultiLineString":return KE(e).geometry;case"MultiPolygon":return QE(e).geometry;default:throw new Error(t+" is invalid")}}function gs(t,e,n){if(n===void 0&&(n={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!p_(t[0])||!p_(t[1]))throw new Error("coordinates must contain numbers");var r={type:"Point",coordinates:t};return ga(r,e,n)}function bM(t,e,n){return n===void 0&&(n={}),Zc(t.map(function(r){return gs(r,e)}),n)}function _1(t,e,n){n===void 0&&(n={});for(var r=0,i=t;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n}function y1(t,e){e===void 0&&(e="kilometers");var n=g1[e];if(!n)throw new Error(e+" units is invalid");return t*n}function ry(t,e){e===void 0&&(e="kilometers");var n=g1[e];if(!n)throw new Error(e+" units is invalid");return t/n}function IM(t,e){return Yd(ry(t,e))}function CM(t){var e=t%360;return e<0&&(e+=360),e}function Yd(t){var e=t%(2*Math.PI);return e*180/Math.PI}function fa(t){var e=t%360;return e*Math.PI/180}function TM(t,e,n){if(e===void 0&&(e="kilometers"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return y1(ry(t,e),n)}function LM(t,e,n){if(e===void 0&&(e="meters"),n===void 0&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=gv[e];if(!r)throw new Error("invalid original units");var i=gv[n];if(!i)throw new Error("invalid final units");return t/r*i}function p_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}function v1(t){return!!t&&t.constructor===Object}function PM(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(function(e){if(!p_(e))throw new Error("bbox must only contain numbers")})}function MM(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}const AM=Object.freeze(Object.defineProperty({__proto__:null,areaFactors:gv,bearingToAzimuth:CM,convertArea:LM,convertLength:TM,degreesToRadians:fa,earthRadius:Do,factors:g1,feature:ga,featureCollection:Zc,geometry:vM,geometryCollection:SM,isNumber:p_,isObject:v1,lengthToDegrees:IM,lengthToRadians:ry,lineString:ha,lineStrings:wM,multiLineString:KE,multiPoint:JE,multiPolygon:QE,point:gs,points:bM,polygon:_1,polygons:xM,radiansToDegrees:Yd,radiansToLength:y1,round:EM,unitsFactors:yM,validateBBox:PM,validateId:MM},Symbol.toStringTag,{value:"Module"}));function $d(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return t.geometry.coordinates;if(t.type==="Point")return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function Mf(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function yd(t,e,n){n===void 0&&(n={});var r=$d(t),i=$d(e),s=fa(i[1]-r[1]),c=fa(i[0]-r[0]),l=fa(r[1]),d=fa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return y1(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}function ym(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,k=M==="FeatureCollection",R=M==="Feature",z=k?t.features.length:1,U=0;Ud||k>v||R>S){l=E,d=r,v=k,S=R,s=0;return}var z=ha([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}function FM(t,e,n){var r=n,i=!1;return tI(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}function nI(t,e){if(!t)throw new Error("geojson is required");ap(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;li?n:i,v=r>s?r:s;return[c,l,d,v]}var x1={exports:{}},iI={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(_m,function(){function n(F,G,H,te,ee){(function fe(pe,se,Ae,Y,ae){for(;Y>Ae;){if(Y-Ae>600){var Ke=Y-Ae+1,Le=se-Ae+1,tt=Math.log(Ke),ut=.5*Math.exp(2*tt/3),We=.5*Math.sqrt(tt*ut*(Ke-ut)/Ke)*(Le-Ke/2<0?-1:1),Ot=Math.max(Ae,Math.floor(se-Le*ut/Ke+We)),Gt=Math.min(Y,Math.floor(se+(Ke-Le)*ut/Ke+We));fe(pe,se,Ot,Gt,ae)}var vt=pe[se],At=Ae,Pt=Y;for(r(pe,Ae,se),ae(pe[Y],vt)>0&&r(pe,Ae,Y);At0;)Pt--}ae(pe[Ae],vt)===0?r(pe,Ae,Pt):r(pe,++Pt,Y),Pt<=se&&(Ae=Pt+1),se<=Pt&&(Y=Pt-1)}})(F,G,H||0,te||F.length-1,ee||i)}function r(F,G,H){var te=F[G];F[G]=F[H],F[H]=te}function i(F,G){return FG?1:0}var s=function(F){F===void 0&&(F=9),this._maxEntries=Math.max(4,F),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function c(F,G,H){if(!H)return G.indexOf(F);for(var te=0;te=F.minX&&G.maxY>=F.minY}function z(F){return{children:F,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function U(F,G,H,te,ee){for(var fe=[G,H];fe.length;)if(!((H=fe.pop())-(G=fe.pop())<=te)){var pe=G+Math.ceil((H-G)/te/2)*te;n(F,pe,G,H,ee),fe.push(G,pe,pe,H)}}return s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(F){var G=this.data,H=[];if(!R(F,G))return H;for(var te=this.toBBox,ee=[];G;){for(var fe=0;fe=0&&ee[G].children.length>this._maxEntries;)this._split(ee,G),G--;this._adjustParentBBoxes(te,ee,G)},s.prototype._split=function(F,G){var H=F[G],te=H.children.length,ee=this._minEntries;this._chooseSplitAxis(H,ee,te);var fe=this._chooseSplitIndex(H,ee,te),pe=z(H.children.splice(fe,H.children.length-fe));pe.height=H.height,pe.leaf=H.leaf,l(H,this.toBBox),l(pe,this.toBBox),G?F[G-1].children.push(pe):this._splitRoot(H,pe)},s.prototype._splitRoot=function(F,G){this.data=z([F,G]),this.data.height=F.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(F,G,H){for(var te,ee,fe,pe,se,Ae,Y,ae=1/0,Ke=1/0,Le=G;Le<=H-G;Le++){var tt=d(F,0,Le,this.toBBox),ut=d(F,Le,H,this.toBBox),We=(ee=tt,fe=ut,pe=void 0,se=void 0,Ae=void 0,Y=void 0,pe=Math.max(ee.minX,fe.minX),se=Math.max(ee.minY,fe.minY),Ae=Math.min(ee.maxX,fe.maxX),Y=Math.min(ee.maxY,fe.maxY),Math.max(0,Ae-pe)*Math.max(0,Y-se)),Ot=C(tt)+C(ut);We=G;ae--){var Ke=F.children[ae];v(pe,F.leaf?ee(Ke):Ke),se+=M(pe)}return se},s.prototype._adjustParentBBoxes=function(F,G,H){for(var te=H;te>=0;te--)v(G[te],F)},s.prototype._condense=function(F){for(var G=F.length-1,H=void 0;G>=0;G--)F[G].children.length===0?G>0?(H=F[G-1].children).splice(H.indexOf(F[G]),1):this.clear():l(F[G],this.toBBox)},s})})(iI);var ZM=iI.exports;const XM=ty(AM),YM=ty(jM);var Qx=Object.prototype.toString,oI=function(e){var n=Qx.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Qx.call(e.callee)==="[object Function]"),r},B0,ew;function $M(){if(ew)return B0;ew=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=oI,i=Object.prototype.propertyIsEnumerable,s=!i.call({toString:null},"toString"),c=i.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(C){var M=C.constructor;return M&&M.prototype===C},v={$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},S=function(){if(typeof window>"u")return!1;for(var C in window)try{if(!v["$"+C]&&e.call(window,C)&&window[C]!==null&&typeof window[C]=="object")try{d(window[C])}catch{return!0}}catch{return!0}return!1}(),E=function(C){if(typeof window>"u"||!S)return d(C);try{return d(C)}catch{return!1}};t=function(M){var k=M!==null&&typeof M=="object",R=n.call(M)==="[object Function]",z=r(M),U=k&&n.call(M)==="[object String]",F=[];if(!k&&!R&&!z)throw new TypeError("Object.keys called on a non-object");var G=c&&R;if(U&&M.length>0&&!e.call(M,0))for(var H=0;H0)for(var te=0;te"u"||!Ki?qn:Ki(Uint8Array),Hc={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?qn:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?qn:ArrayBuffer,"%ArrayIteratorPrototype%":mf&&Ki?Ki([][Symbol.iterator]()):qn,"%AsyncFromSyncIteratorPrototype%":qn,"%AsyncFunction%":wf,"%AsyncGenerator%":wf,"%AsyncGeneratorFunction%":wf,"%AsyncIteratorPrototype%":wf,"%Atomics%":typeof Atomics>"u"?qn:Atomics,"%BigInt%":typeof BigInt>"u"?qn:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?qn:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?qn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?qn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yA,"%eval%":eval,"%EvalError%":vA,"%Float32Array%":typeof Float32Array>"u"?qn:Float32Array,"%Float64Array%":typeof Float64Array>"u"?qn:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?qn:FinalizationRegistry,"%Function%":lI,"%GeneratorFunction%":wf,"%Int8Array%":typeof Int8Array>"u"?qn:Int8Array,"%Int16Array%":typeof Int16Array>"u"?qn:Int16Array,"%Int32Array%":typeof Int32Array>"u"?qn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mf&&Ki?Ki(Ki([][Symbol.iterator]())):qn,"%JSON%":typeof JSON=="object"?JSON:qn,"%Map%":typeof Map>"u"?qn:Map,"%MapIteratorPrototype%":typeof Map>"u"||!mf||!Ki?qn:Ki(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?qn:Promise,"%Proxy%":typeof Proxy>"u"?qn:Proxy,"%RangeError%":bA,"%ReferenceError%":xA,"%Reflect%":typeof Reflect>"u"?qn:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?qn:Set,"%SetIteratorPrototype%":typeof Set>"u"||!mf||!Ki?qn:Ki(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?qn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mf&&Ki?Ki(""[Symbol.iterator]()):qn,"%Symbol%":mf?Symbol:qn,"%SyntaxError%":Af,"%ThrowTypeError%":SA,"%TypedArray%":IA,"%TypeError%":Lf,"%Uint8Array%":typeof Uint8Array>"u"?qn:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?qn:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?qn:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?qn:Uint32Array,"%URIError%":wA,"%WeakMap%":typeof WeakMap>"u"?qn:WeakMap,"%WeakRef%":typeof WeakRef>"u"?qn:WeakRef,"%WeakSet%":typeof WeakSet>"u"?qn:WeakSet};if(Ki)try{null.error}catch(t){var CA=Ki(Ki(t));Hc["%Error.prototype%"]=CA}var TA=function t(e){var n;if(e==="%AsyncFunction%")n=U0("async function () {}");else if(e==="%GeneratorFunction%")n=U0("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=U0("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Ki&&(n=Ki(i.prototype))}return Hc[e]=n,n},ow={__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"]},vm=E1,m_=aI,LA=vm.call(Function.call,Array.prototype.concat),PA=vm.call(Function.apply,Array.prototype.splice),sw=vm.call(Function.call,String.prototype.replace),g_=vm.call(Function.call,String.prototype.slice),MA=vm.call(Function.call,RegExp.prototype.exec),AA=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,kA=/\\(\\)?/g,DA=function(e){var n=g_(e,0,1),r=g_(e,-1);if(n==="%"&&r!=="%")throw new Af("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Af("invalid intrinsic syntax, expected opening `%`");var i=[];return sw(e,AA,function(s,c,l,d){i[i.length]=l?sw(d,kA,"$1"):c||s}),i},RA=function(e,n){var r=e,i;if(m_(ow,r)&&(i=ow[r],r="%"+i[0]+"%"),m_(Hc,r)){var s=Hc[r];if(s===wf&&(s=TA(r)),typeof s>"u"&&!n)throw new Lf("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:s}}throw new Af("intrinsic "+e+" does not exist!")},Dl=function(e,n){if(typeof e!="string"||e.length===0)throw new Lf("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Lf('"allowMissing" argument must be a boolean');if(MA(/^%?[^%]*%?$/,e)===null)throw new Af("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=DA(e),i=r.length>0?r[0]:"",s=RA("%"+i+"%",n),c=s.name,l=s.value,d=!1,v=s.alias;v&&(i=v[0],PA(r,LA([0,1],v)));for(var S=1,E=!0;S=r.length){var R=Wc(l,C);E=!!R,E&&"get"in R&&!("originalValue"in R.get)?l=R.get:l=l[C]}else E=m_(l,C),l=l[C];E&&!d&&(Hc[c]=l)}}return l},G0,aw;function I1(){if(aw)return G0;aw=1;var t=Dl,e=t("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return G0=e,G0}var NA=Dl,e_=NA("%Object.getOwnPropertyDescriptor%",!0);if(e_)try{e_([],"length")}catch{e_=null}var C1=e_,lw=I1(),OA=sI,gf=lc,uw=C1,T1=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new gf("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new gf("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new gf("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new gf("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new gf("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new gf("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,d=!!uw&&uw(e,n);if(lw)lw(e,n,{configurable:c===null&&d?d.configurable:!c,enumerable:i===null&&d?d.enumerable:!i,value:r,writable:s===null&&d?d.writable:!s});else if(l||!i&&!s&&!c)e[n]=r;else throw new OA("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},_v=I1(),uI=function(){return!!_v};uI.hasArrayLengthDefineBug=function(){if(!_v)return null;try{return _v([],"length",{value:1}).length!==1}catch{return!0}};var L1=uI,zA=w1,FA=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",BA=Object.prototype.toString,VA=Array.prototype.concat,cw=T1,UA=function(t){return typeof t=="function"&&BA.call(t)==="[object Function]"},cI=L1(),jA=function(t,e,n,r){if(e in t){if(r===!0){if(t[e]===n)return}else if(!UA(r)||!r())return}cI?cw(t,e,n,!0):cw(t,e,n)},hI=function(t,e){var n=arguments.length>2?arguments[2]:{},r=zA(e);FA&&(r=VA.call(r,Object.getOwnPropertySymbols(e)));for(var i=0;i4294967295||WA(n)!==n)throw new pw("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in e&&fw){var c=fw(e,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(s=!1)}return(i||s||!r)&&(qA?hw(e,"length",n,!0,!0):hw(e,"length",n)),e};(function(t){var e=E1,n=Dl,r=HA,i=lc,s=n("%Function.prototype.apply%"),c=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||e.call(c,s),d=I1(),v=n("%Math.max%");t.exports=function(C){if(typeof C!="function")throw new i("a function is required");var M=l(e,c,arguments);return r(M,1+v(0,C.length-(arguments.length-1)),!0)};var S=function(){return l(e,s,arguments)};d?d(t.exports,"apply",{value:S}):t.exports.apply=S})(fI);var lp=fI.exports,pI=Dl,dI=lp,ZA=dI(pI("String.prototype.indexOf")),Ta=function(e,n){var r=pI(e,!!n);return typeof r=="function"&&ZA(e,".prototype.")>-1?dI(r):r},XA=w1,mI=iy(),gI=Ta,dw=Object,YA=gI("Array.prototype.push"),mw=gI("Object.prototype.propertyIsEnumerable"),$A=mI?Object.getOwnPropertySymbols:null,_I=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=dw(e);if(arguments.length===1)return r;for(var i=1;i2&&!!arguments[2];return(!r||hk)&&(ck?gw(e,"name",n,!0,!0):gw(e,"name",n)),e},dk=pk,mk=lc,gk=Object,xI=dk(function(){if(this==null||this!==gk(this))throw new mk("RegExp.prototype.flags getter called on non-object");var e="";return this.hasIndices&&(e+="d"),this.global&&(e+="g"),this.ignoreCase&&(e+="i"),this.multiline&&(e+="m"),this.dotAll&&(e+="s"),this.unicode&&(e+="u"),this.unicodeSets&&(e+="v"),this.sticky&&(e+="y"),e},"get flags",!0),_k=xI,yk=lh.supportsDescriptors,vk=Object.getOwnPropertyDescriptor,wI=function(){if(yk&&/a/mig.flags==="gim"){var e=vk(RegExp.prototype,"flags");if(e&&typeof e.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return e.get}}return _k},bk=lh.supportsDescriptors,xk=wI,wk=Object.getOwnPropertyDescriptor,Sk=Object.defineProperty,Ek=TypeError,_w=Object.getPrototypeOf,Ik=/a/,Ck=function(){if(!bk||!_w)throw new Ek("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var e=xk(),n=_w(Ik),r=wk(n,"flags");return(!r||r.get!==e)&&Sk(n,"flags",{configurable:!0,enumerable:!1,get:e}),e},Tk=lh,Lk=lp,Pk=xI,SI=wI,Mk=Ck,EI=Lk(SI());Tk(EI,{getPolyfill:SI,implementation:Pk,shim:Mk});var Ak=EI,t_={exports:{}},kk=iy,uh=function(){return kk()&&!!Symbol.toStringTag},Dk=uh(),Rk=Ta,yv=Rk("Object.prototype.toString"),oy=function(e){return Dk&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:yv(e)==="[object Arguments]"},II=function(e){return oy(e)?!0:e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&yv(e)!=="[object Array]"&&yv(e.callee)==="[object Function]"},Nk=function(){return oy(arguments)}();oy.isLegacyArguments=II;var CI=Nk?oy:II;const Ok={},zk=Object.freeze(Object.defineProperty({__proto__:null,default:Ok},Symbol.toStringTag,{value:"Module"})),Fk=ty(zk);var P1=typeof Map=="function"&&Map.prototype,W0=Object.getOwnPropertyDescriptor&&P1?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,__=P1&&W0&&typeof W0.get=="function"?W0.get:null,yw=P1&&Map.prototype.forEach,M1=typeof Set=="function"&&Set.prototype,H0=Object.getOwnPropertyDescriptor&&M1?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,y_=M1&&H0&&typeof H0.get=="function"?H0.get:null,vw=M1&&Set.prototype.forEach,Bk=typeof WeakMap=="function"&&WeakMap.prototype,Gd=Bk?WeakMap.prototype.has:null,Vk=typeof WeakSet=="function"&&WeakSet.prototype,qd=Vk?WeakSet.prototype.has:null,Uk=typeof WeakRef=="function"&&WeakRef.prototype,bw=Uk?WeakRef.prototype.deref:null,jk=Boolean.prototype.valueOf,Gk=Object.prototype.toString,qk=Function.prototype.toString,Wk=String.prototype.match,A1=String.prototype.slice,Zu=String.prototype.replace,Hk=String.prototype.toUpperCase,xw=String.prototype.toLowerCase,TI=RegExp.prototype.test,ww=Array.prototype.concat,bl=Array.prototype.join,Zk=Array.prototype.slice,Sw=Math.floor,vv=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Z0=Object.getOwnPropertySymbols,bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,kf=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Oo=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kf||"symbol")?Symbol.toStringTag:null,LI=Object.prototype.propertyIsEnumerable,Ew=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function Iw(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||TI.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var r=t<0?-Sw(-t):Sw(t);if(r!==t){var i=String(r),s=A1.call(e,i.length+1);return Zu.call(i,n,"$&_")+"."+Zu.call(Zu.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Zu.call(e,n,"$&_")}var xv=Fk,Cw=xv.custom,Tw=MI(Cw)?Cw:null,Xk=function t(e,n,r,i){var s=n||{};if(qu(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(qu(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=qu(s,"customInspect")?s.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(qu(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(qu(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=s.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return kI(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var d=String(e);return l?Iw(e,d):d}if(typeof e=="bigint"){var v=String(e)+"n";return l?Iw(e,v):v}var S=typeof s.depth>"u"?5:s.depth;if(typeof r>"u"&&(r=0),r>=S&&S>0&&typeof e=="object")return wv(e)?"[Array]":"[Object]";var E=f3(s,r);if(typeof i>"u")i=[];else if(AI(i,e)>=0)return"[Circular]";function C(Ke,Le,tt){if(Le&&(i=Zk.call(i),i.push(Le)),tt){var ut={depth:s.depth};return qu(s,"quoteStyle")&&(ut.quoteStyle=s.quoteStyle),t(Ke,ut,r+1,i)}return t(Ke,s,r+1,i)}if(typeof e=="function"&&!Lw(e)){var M=r3(e),k=zg(e,C);return"[Function"+(M?": "+M:" (anonymous)")+"]"+(k.length>0?" { "+bl.call(k,", ")+" }":"")}if(MI(e)){var R=kf?Zu.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):bv.call(e);return typeof e=="object"&&!kf?vd(R):R}if(u3(e)){for(var z="<"+xw.call(String(e.nodeName)),U=e.attributes||[],F=0;F",z}if(wv(e)){if(e.length===0)return"[]";var G=zg(e,C);return E&&!h3(G)?"["+Sv(G,E)+"]":"[ "+bl.call(G,", ")+" ]"}if(Kk(e)){var H=zg(e,C);return!("cause"in Error.prototype)&&"cause"in e&&!LI.call(e,"cause")?"{ ["+String(e)+"] "+bl.call(ww.call("[cause]: "+C(e.cause),H),", ")+" }":H.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+bl.call(H,", ")+" }"}if(typeof e=="object"&&c){if(Tw&&typeof e[Tw]=="function"&&xv)return xv(e,{depth:S-r});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(i3(e)){var te=[];return yw&&yw.call(e,function(Ke,Le){te.push(C(Le,e,!0)+" => "+C(Ke,e))}),Pw("Map",__.call(e),te,E)}if(a3(e)){var ee=[];return vw&&vw.call(e,function(Ke){ee.push(C(Ke,e))}),Pw("Set",y_.call(e),ee,E)}if(o3(e))return X0("WeakMap");if(l3(e))return X0("WeakSet");if(s3(e))return X0("WeakRef");if(Qk(e))return vd(C(Number(e)));if(t3(e))return vd(C(vv.call(e)));if(e3(e))return vd(jk.call(e));if(Jk(e))return vd(C(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(e===_m)return"{ [object globalThis] }";if(!$k(e)&&!Lw(e)){var fe=zg(e,C),pe=Ew?Ew(e)===Object.prototype:e instanceof Object||e.constructor===Object,se=e instanceof Object?"":"null prototype",Ae=!pe&&Oo&&Object(e)===e&&Oo in e?A1.call(uc(e),8,-1):se?"Object":"",Y=pe||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",ae=Y+(Ae||se?"["+bl.call(ww.call([],Ae||[],se||[]),": ")+"] ":"");return fe.length===0?ae+"{}":E?ae+"{"+Sv(fe,E)+"}":ae+"{ "+bl.call(fe,", ")+" }"}return String(e)};function PI(t,e,n){var r=(n.quoteStyle||e)==="double"?'"':"'";return r+t+r}function Yk(t){return Zu.call(String(t),/"/g,""")}function wv(t){return uc(t)==="[object Array]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function $k(t){return uc(t)==="[object Date]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Lw(t){return uc(t)==="[object RegExp]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Kk(t){return uc(t)==="[object Error]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Jk(t){return uc(t)==="[object String]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function Qk(t){return uc(t)==="[object Number]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function e3(t){return uc(t)==="[object Boolean]"&&(!Oo||!(typeof t=="object"&&Oo in t))}function MI(t){if(kf)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!bv)return!1;try{return bv.call(t),!0}catch{}return!1}function t3(t){if(!t||typeof t!="object"||!vv)return!1;try{return vv.call(t),!0}catch{}return!1}var n3=Object.prototype.hasOwnProperty||function(t){return t in this};function qu(t,e){return n3.call(t,e)}function uc(t){return Gk.call(t)}function r3(t){if(t.name)return t.name;var e=Wk.call(qk.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function AI(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;ne.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return kI(A1.call(t,0,e.maxStringLength),e)+r}var i=Zu.call(Zu.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,c3);return PI(i,"single",e)}function c3(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+Hk.call(e.toString(16))}function vd(t){return"Object("+t+")"}function X0(t){return t+" { ? }"}function Pw(t,e,n,r){var i=r?Sv(n,r):bl.call(n,", ");return t+" ("+e+") {"+i+"}"}function h3(t){for(var e=0;e=0)return!1;return!0}function f3(t,e){var n;if(t.indent===" ")n=" ";else if(typeof t.indent=="number"&&t.indent>0)n=bl.call(Array(t.indent+1)," ");else return null;return{base:n,prev:bl.call(Array(e+1),n)}}function Sv(t,e){if(t.length===0)return"";var n=` +`+e.prev+e.base;return n+bl.call(t,","+n)+` +`+e.prev}function zg(t,e){var n=wv(t),r=[];if(n){r.length=t.length;for(var i=0;i=r)return n+1;var i=zw(e,n);if(i<55296||i>56319)return n+1;var s=zw(e,n+1);return s<56320||s>57343?n+1:n+2},$0=function(e){var n=0;return{next:function(){var i=n>=e.length,s;return i||(s=e[n],n+=1),{done:i,value:s}}}},Fw=function(e,n){if(O3(e)||Dw(e))return $0(e);if(z3(e)){var r=0;return{next:function(){var s=U3(e,r),c=V3(e,r,s);return r=s,{done:s>e.length,value:c}}}}if(n&&typeof e["_es6-shim iterator_"]<"u")return e["_es6-shim iterator_"]()};if(!F3&&!B3)t_.exports=function(e){if(e!=null)return Fw(e,!0)};else{var j3=FI,G3=VI,Bw=Fa("Map.prototype.forEach",!0),Vw=Fa("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var Uw=Fa("Map.prototype.iterator",!0),jw=Fa("Set.prototype.iterator",!0);var Gw=Fa("Map.prototype.@@iterator",!0)||Fa("Map.prototype._es6-shim iterator_",!0),qw=Fa("Set.prototype.@@iterator",!0)||Fa("Set.prototype._es6-shim iterator_",!0),q3=function(e){if(j3(e)){if(Uw)return Rw(Uw(e));if(Gw)return Gw(e);if(Bw){var n=[];return Bw(e,function(i,s){Ow(n,[s,i])}),$0(n)}}if(G3(e)){if(jw)return Rw(jw(e));if(qw)return qw(e);if(Vw){var r=[];return Vw(e,function(i){Ow(r,i)}),$0(r)}}};t_.exports=function(e){return q3(e)||Fw(e)}}}var W3=t_.exports,Ww=function(t){return t!==t},UI=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||Ww(e)&&Ww(n))},H3=UI,jI=function(){return typeof Object.is=="function"?Object.is:H3},Z3=jI,X3=lh,Y3=function(){var e=Z3();return X3(Object,{is:e},{is:function(){return Object.is!==e}}),e},$3=lh,K3=lp,J3=UI,GI=jI,Q3=Y3,qI=K3(GI(),Object);$3(qI,{getPolyfill:GI,implementation:J3,shim:Q3});var e4=qI,t4=lp,WI=Ta,n4=Dl,Ev=n4("%ArrayBuffer%",!0),n_=WI("ArrayBuffer.prototype.byteLength",!0),r4=WI("Object.prototype.toString"),Hw=!!Ev&&!n_&&new Ev(0).slice,Zw=!!Hw&&t4(Hw),HI=n_||Zw?function(e){if(!e||typeof e!="object")return!1;try{return n_?n_(e):Zw(e,0),!0}catch{return!1}}:Ev?function(e){return r4(e)==="[object ArrayBuffer]"}:function(e){return!1},i4=Date.prototype.getDay,o4=function(e){try{return i4.call(e),!0}catch{return!1}},s4=Object.prototype.toString,a4="[object Date]",l4=uh(),u4=function(e){return typeof e!="object"||e===null?!1:l4?o4(e):s4.call(e)===a4},Iv=Ta,ZI=uh(),XI,YI,Cv,Tv;if(ZI){XI=Iv("Object.prototype.hasOwnProperty"),YI=Iv("RegExp.prototype.exec"),Cv={};var K0=function(){throw Cv};Tv={toString:K0,valueOf:K0},typeof Symbol.toPrimitive=="symbol"&&(Tv[Symbol.toPrimitive]=K0)}var c4=Iv("Object.prototype.toString"),h4=Object.getOwnPropertyDescriptor,f4="[object RegExp]",p4=ZI?function(e){if(!e||typeof e!="object")return!1;var n=h4(e,"lastIndex"),r=n&&XI(n,"value");if(!r)return!1;try{YI(e,Tv)}catch(i){return i===Cv}}:function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:c4(e)===f4},d4=Ta,Xw=d4("SharedArrayBuffer.prototype.byteLength",!0),m4=Xw?function(e){if(!e||typeof e!="object")return!1;try{return Xw(e),!0}catch{return!1}}:function(e){return!1},g4=Number.prototype.toString,_4=function(e){try{return g4.call(e),!0}catch{return!1}},y4=Object.prototype.toString,v4="[object Number]",b4=uh(),x4=function(e){return typeof e=="number"?!0:typeof e!="object"?!1:b4?_4(e):y4.call(e)===v4},$I=Ta,w4=$I("Boolean.prototype.toString"),S4=$I("Object.prototype.toString"),E4=function(e){try{return w4(e),!0}catch{return!1}},I4="[object Boolean]",C4=uh(),T4=function(e){return typeof e=="boolean"?!0:e===null||typeof e!="object"?!1:C4&&Symbol.toStringTag in e?E4(e):S4(e)===I4},Lv={exports:{}},L4=Object.prototype.toString,P4=S1();if(P4){var M4=Symbol.prototype.toString,A4=/^Symbol\(.*\)$/,k4=function(e){return typeof e.valueOf()!="symbol"?!1:A4.test(M4.call(e))};Lv.exports=function(e){if(typeof e=="symbol")return!0;if(L4.call(e)!=="[object Symbol]")return!1;try{return k4(e)}catch{return!1}}}else Lv.exports=function(e){return!1};var D4=Lv.exports,Pv={exports:{}},Yw=typeof BigInt<"u"&&BigInt,R4=function(){return typeof Yw=="function"&&typeof BigInt=="function"&&typeof Yw(42)=="bigint"&&typeof BigInt(42)=="bigint"},N4=R4();if(N4){var O4=BigInt.prototype.valueOf,z4=function(e){try{return O4.call(e),!0}catch{}return!1};Pv.exports=function(e){return e===null||typeof e>"u"||typeof e=="boolean"||typeof e=="string"||typeof e=="number"||typeof e=="symbol"||typeof e=="function"?!1:typeof e=="bigint"?!0:z4(e)}}else Pv.exports=function(e){return!1};var F4=Pv.exports,B4=OI,V4=x4,U4=T4,j4=D4,G4=F4,q4=function(e){if(e==null||typeof e!="object"&&typeof e!="function")return null;if(B4(e))return"String";if(V4(e))return"Number";if(U4(e))return"Boolean";if(j4(e))return"Symbol";if(G4(e))return"BigInt"},x_=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,$w=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,w_;x_||(w_=function(e){return!1});var Mv=x_?x_.prototype.has:null,J0=$w?$w.prototype.has:null;!w_&&!Mv&&(w_=function(e){return!1});var W4=w_||function(e){if(!e||typeof e!="object")return!1;try{if(Mv.call(e,Mv),J0)try{J0.call(e,J0)}catch{return!0}return e instanceof x_}catch{}return!1},Av={exports:{}},H4=Dl,KI=Ta,Z4=H4("%WeakSet%",!0),Q0=KI("WeakSet.prototype.has",!0);if(Q0){var ev=KI("WeakMap.prototype.has",!0);Av.exports=function(e){if(!e||typeof e!="object")return!1;try{if(Q0(e,Q0),ev)try{ev(e,ev)}catch{return!0}return e instanceof Z4}catch{}return!1}}else Av.exports=function(e){return!1};var X4=Av.exports,Y4=FI,$4=VI,K4=W4,J4=X4,Q4=function(e){if(e&&typeof e=="object"){if(Y4(e))return"Map";if($4(e))return"Set";if(K4(e))return"WeakMap";if(J4(e))return"WeakSet"}return!1},JI=Function.prototype.toString,Ef=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,kv,r_;if(typeof Ef=="function"&&typeof Object.defineProperty=="function")try{kv=Object.defineProperty({},"length",{get:function(){throw r_}}),r_={},Ef(function(){throw 42},null,kv)}catch(t){t!==r_&&(Ef=null)}else Ef=null;var eD=/^\s*class\b/,Dv=function(e){try{var n=JI.call(e);return eD.test(n)}catch{return!1}},tv=function(e){try{return Dv(e)?!1:(JI.call(e),!0)}catch{return!1}},i_=Object.prototype.toString,tD="[object Object]",nD="[object Function]",rD="[object GeneratorFunction]",iD="[object HTMLAllCollection]",oD="[object HTML document.all class]",sD="[object HTMLCollection]",aD=typeof Symbol=="function"&&!!Symbol.toStringTag,lD=!(0 in[,]),Rv=function(){return!1};if(typeof document=="object"){var uD=document.all;i_.call(uD)===i_.call(document.all)&&(Rv=function(e){if((lD||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=i_.call(e);return(n===iD||n===oD||n===sD||n===tD)&&e("")==null}catch{}return!1})}var cD=Ef?function(e){if(Rv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ef(e,null,kv)}catch(n){if(n!==r_)return!1}return!Dv(e)&&tv(e)}:function(e){if(Rv(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(aD)return tv(e);if(Dv(e))return!1;var n=i_.call(e);return n!==nD&&n!==rD&&!/^\[object HTML/.test(n)?!1:tv(e)},hD=cD,fD=Object.prototype.toString,QI=Object.prototype.hasOwnProperty,pD=function(e,n,r){for(var i=0,s=e.length;i=3&&(i=r),fD.call(e)==="[object Array]"?pD(e,n,i):typeof e=="string"?dD(e,n,i):mD(e,n,i)},_D=gD,yD=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],nv=yD,vD=typeof globalThis>"u"?_m:globalThis,bD=function(){for(var e=[],n=0;n"u"?_m:globalThis,Nv=xD(),z1=O1("String.prototype.slice"),rv=Object.getPrototypeOf,SD=O1("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r-1?n:n!=="Object"?!1:ID(e)}return o_?ED(e):null},TD=Ta,Qw=TD("ArrayBuffer.prototype.byteLength",!0),LD=HI,PD=function(e){return LD(e)?Qw?Qw(e):e.byteLength:NaN},tC=ak,Rl=Ta,e2=Ak,MD=Dl,Df=W3,AD=RI,t2=e4,n2=CI,r2=NI,i2=HI,o2=u4,s2=p4,a2=m4,l2=w1,u2=q4,c2=Q4,h2=CD,f2=PD,p2=Rl("SharedArrayBuffer.prototype.byteLength",!0),d2=Rl("Date.prototype.getTime"),iv=Object.getPrototypeOf,m2=Rl("Object.prototype.toString"),I_=MD("%Set%",!0),Ov=Rl("Map.prototype.has",!0),C_=Rl("Map.prototype.get",!0),g2=Rl("Map.prototype.size",!0),T_=Rl("Set.prototype.add",!0),nC=Rl("Set.prototype.delete",!0),L_=Rl("Set.prototype.has",!0),s_=Rl("Set.prototype.size",!0);function _2(t,e,n,r){for(var i=Df(t),s;(s=i.next())&&!s.done;)if(ja(e,s.value,n,r))return nC(t,s.value),!0;return!1}function rC(t){if(typeof t>"u")return null;if(typeof t!="object")return typeof t=="symbol"?!1:typeof t=="string"||typeof t=="number"?+t==+t:!0}function kD(t,e,n,r,i,s){var c=rC(n);if(c!=null)return c;var l=C_(e,c),d=tC({},i,{strict:!1});return typeof l>"u"&&!Ov(e,c)||!ja(r,l,d,s)?!1:!Ov(t,c)&&ja(r,l,d,s)}function DD(t,e,n){var r=rC(n);return r??(L_(e,r)&&!L_(t,r))}function y2(t,e,n,r,i,s){for(var c=Df(t),l,d;(l=c.next())&&!l.done;)if(d=l.value,ja(n,d,i,s)&&ja(r,C_(e,d),i,s))return nC(t,d),!0;return!1}function ja(t,e,n,r){var i=n||{};if(i.strict?t2(t,e):t===e)return!0;var s=u2(t),c=u2(e);if(s!==c)return!1;if(!t||!e||typeof t!="object"&&typeof e!="object")return i.strict?t2(t,e):t==e;var l=r.has(t),d=r.has(e),v;if(l&&d){if(r.get(t)===r.get(e))return!0}else v={};return l||r.set(t,v),d||r.set(e,v),OD(t,e,i,r)}function v2(t){return!t||typeof t!="object"||typeof t.length!="number"||typeof t.copy!="function"||typeof t.slice!="function"||t.length>0&&typeof t[0]!="number"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))}function RD(t,e,n,r){if(s_(t)!==s_(e))return!1;for(var i=Df(t),s=Df(e),c,l,d;(c=i.next())&&!c.done;)if(c.value&&typeof c.value=="object")d||(d=new I_),T_(d,c.value);else if(!L_(e,c.value)){if(n.strict||!DD(t,e,c.value))return!1;d||(d=new I_),T_(d,c.value)}if(d){for(;(l=s.next())&&!l.done;)if(l.value&&typeof l.value=="object"){if(!_2(d,l.value,n.strict,r))return!1}else if(!n.strict&&!L_(t,l.value)&&!_2(d,l.value,n.strict,r))return!1;return s_(d)===0}return!0}function ND(t,e,n,r){if(g2(t)!==g2(e))return!1;for(var i=Df(t),s=Df(e),c,l,d,v,S,E;(c=i.next())&&!c.done;)if(v=c.value[0],S=c.value[1],v&&typeof v=="object")d||(d=new I_),T_(d,v);else if(E=C_(e,v),typeof E>"u"&&!Ov(e,v)||!ja(S,E,n,r)){if(n.strict||!kD(t,e,v,S,n,r))return!1;d||(d=new I_),T_(d,v)}if(d){for(;(l=s.next())&&!l.done;)if(v=l.value[0],E=l.value[1],v&&typeof v=="object"){if(!y2(d,t,v,E,n,r))return!1}else if(!n.strict&&(!t.has(v)||!ja(C_(t,v),E,n,r))&&!y2(d,t,v,E,tC({},n,{strict:!1}),r))return!1;return s_(d)===0}return!0}function OD(t,e,n,r){var i,s;if(typeof t!=typeof e||t==null||e==null||m2(t)!==m2(e)||n2(t)!==n2(e))return!1;var c=r2(t),l=r2(e);if(c!==l)return!1;var d=t instanceof Error,v=e instanceof Error;if(d!==v||(d||v)&&(t.name!==e.name||t.message!==e.message))return!1;var S=s2(t),E=s2(e);if(S!==E||(S||E)&&(t.source!==e.source||e2(t)!==e2(e)))return!1;var C=o2(t),M=o2(e);if(C!==M||(C||M)&&d2(t)!==d2(e)||n.strict&&iv&&iv(t)!==iv(e))return!1;var k=h2(t),R=h2(e);if(k!==R)return!1;if(k||R){if(t.length!==e.length)return!1;for(i=0;i=0;i--)if(ee[i]!=fe[i])return!1;for(i=ee.length-1;i>=0;i--)if(s=ee[i],!ja(t[s],e[s],n,r))return!1;var pe=c2(t),se=c2(e);return pe!==se?!1:pe==="Set"||se==="Set"?RD(t,e,n,r):pe==="Map"?ND(t,e,n,r):!0}var zD=function(e,n,r){return ja(e,n,r,AD())};const iC=m1(zD);var FD=Object.defineProperty,pr=(t,e)=>FD(t,"name",{value:e,configurable:!0}),BD=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!Dd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=zv(e),i=zv(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return Dd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return Dd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};pr(BD,"GeojsonEquality");function Dd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}pr(Dd,"sameLength");function zv(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}pr(zv,"explode");var Os=63710088e-1,oC={centimeters:Os*100,centimetres:Os*100,degrees:360/(2*Math.PI),feet:Os*3.28084,inches:Os*39.37,kilometers:Os/1e3,kilometres:Os/1e3,meters:Os,metres:Os,miles:Os/1609.344,millimeters:Os*1e3,millimetres:Os*1e3,nauticalmiles:Os/1852,radians:1,yards:Os*1.0936},b2={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 Cl(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}pr(Cl,"feature");function VD(t,e,n={}){switch(t){case"Point":return tu(e).geometry;case"LineString":return iu(e).geometry;case"Polygon":return F1(e).geometry;case"MultiPoint":return aC(e).geometry;case"MultiLineString":return sC(e).geometry;case"MultiPolygon":return lC(e).geometry;default:throw new Error(t+" is invalid")}}pr(VD,"geometry");function tu(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!P_(t[0])||!P_(t[1]))throw new Error("coordinates must contain numbers");return Cl({type:"Point",coordinates:t},e,n)}pr(tu,"point");function UD(t,e,n={}){return sy(t.map(r=>tu(r,e)),n)}pr(UD,"points");function F1(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;sF1(r,e)),n)}pr(jD,"polygons");function iu(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return Cl({type:"LineString",coordinates:t},e,n)}pr(iu,"lineString");function GD(t,e,n={}){return sy(t.map(r=>iu(r,e)),n)}pr(GD,"lineStrings");function sy(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}pr(sy,"featureCollection");function sC(t,e,n={}){return Cl({type:"MultiLineString",coordinates:t},e,n)}pr(sC,"multiLineString");function aC(t,e,n={}){return Cl({type:"MultiPoint",coordinates:t},e,n)}pr(aC,"multiPoint");function lC(t,e,n={}){return Cl({type:"MultiPolygon",coordinates:t},e,n)}pr(lC,"multiPolygon");function qD(t,e,n={}){return Cl({type:"GeometryCollection",geometries:t},e,n)}pr(qD,"geometryCollection");function WD(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}pr(WD,"round");function uC(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t*n}pr(uC,"radiansToLength");function B1(t,e="kilometers"){const n=oC[e];if(!n)throw new Error(e+" units is invalid");return t/n}pr(B1,"lengthToRadians");function HD(t,e){return cC(B1(t,e))}pr(HD,"lengthToDegrees");function ZD(t){let e=t%360;return e<0&&(e+=360),e}pr(ZD,"bearingToAzimuth");function cC(t){return t%(2*Math.PI)*180/Math.PI}pr(cC,"radiansToDegrees");function XD(t){return t%360*Math.PI/180}pr(XD,"degreesToRadians");function YD(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return uC(B1(t,e),n)}pr(YD,"convertLength");function $D(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=b2[e];if(!r)throw new Error("invalid original units");const i=b2[n];if(!i)throw new Error("invalid final units");return t/r*i}pr($D,"convertArea");function P_(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}pr(P_,"isNumber");function V1(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}pr(V1,"isObject");function KD(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!P_(e))throw new Error("bbox must only contain numbers")})}pr(KD,"validateBBox");function JD(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}pr(JD,"validateId");var QD=Object.defineProperty,wo=(t,e)=>QD(t,"name",{value:e,configurable:!0});function cp(t,e,n){if(t!==null)for(var r,i,s,c,l,d,v,S=0,E=0,C,M=t.type,k=M==="FeatureCollection",R=M==="Feature",z=k?t.features.length:1,U=0;Ud||k>v||R>S){l=E,d=r,v=k,S=R,s=0;return}var z=iu([l,E],n.properties);if(e(z,r,i,R,s)===!1)return!1;s++,l=E})===!1)return!1}}})}wo(pC,"segmentEach");function sR(t,e,n){var r=n,i=!1;return pC(t,function(s,c,l,d,v){i===!1&&n===void 0?r=s:r=e(r,s,c,l,d,v),i=!0}),r}wo(sR,"segmentReduce");function dC(t,e){if(!t)throw new Error("geojson is required");ay(t,function(n,r,i){if(n.geometry!==null){var s=n.geometry.type,c=n.geometry.coordinates;switch(s){case"LineString":if(e(n,r,i,0,0)===!1)return!1;break;case"Polygon":for(var l=0;lcR(t,"name",{value:e,configurable:!0});function j1(t,e={}){if(t.bbox!=null&&e.recompute!==!0)return t.bbox;const n=[1/0,1/0,-1/0,-1/0];return cp(t,r=>{n[0]>r[0]&&(n[0]=r[0]),n[1]>r[1]&&(n[1]=r[1]),n[2] line1 must only contain 2 coordinates");if(r.length!==2)throw new Error(" line2 must only contain 2 coordinates");var i=n[0][0],s=n[0][1],c=n[1][0],l=n[1][1],d=r[0][0],v=r[0][1],S=r[1][0],E=r[1][1],C=(E-v)*(c-i)-(S-d)*(l-s),M=(S-d)*(s-v)-(E-v)*(i-d),k=(c-i)*(s-v)-(l-s)*(i-d);if(C===0)return null;var R=M/C,z=k/C;if(R>=0&&R<=1&&z>=0&&z<=1){var U=i+R*(c-i),F=s+R*(l-s);return gs([U,F])}return null}function vR(t,e,n){n===void 0&&(n={});var r=gs([1/0,1/0],{dist:1/0}),i=0;return ap(t,function(s){for(var c=Mf(s),l=0;l0&&(z=R.features[0],z.properties.dist=yd(e,z,n),z.properties.location=i+yd(d,z,n)),d.properties.dist{if(!this.active)return;const l=[c.point.x-bR,c.point.y],d=this.map.unproject(c.point).distanceTo(this.map.unproject(l));this.inner.onMouseMove(c.lngLat.lng,c.lngLat.lat,d)&&(this.redraw(),this.dataUpdated())},this.onClick=()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())},this.onDoubleClick=c=>{this.active&&(c.preventDefault(),this.inner.onClick(),this.finish())},this.onDragStart=()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()},this.onMouseUp=()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()},this.onKeyDown=c=>{this.active&&c.key=="Escape"&&(c.stopPropagation(),this.cancel())},this.onKeyPress=c=>{this.active&&c.target.tagName!="INPUT"&&(c.key=="Enter"?(c.stopPropagation(),this.finish()):c.key=="s"||c.key=="S"?(c.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):c.key=="z"&&c.ctrlKey&&this.undo())},this.map=e,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new f_(n),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],this.routeToolGj=r,this.snapMode=i,this.undoLength=s,this.map.on("mousemove",this.onMouseMove),this.map.on("click",this.onClick),this.map.on("dblclick",this.onDoubleClick),this.map.on("dragstart",this.onDragStart),this.map.on("mouseup",this.onMouseUp),document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keypress",this.onKeyPress)}tearDown(){this.map.off("mousemove",this.onMouseMove),this.map.off("click",this.onClick),this.map.off("dblclick",this.onDoubleClick),this.map.off("dragstart",this.onDragStart),this.map.off("mouseup",this.onMouseUp),document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keypress",this.onKeyPress)}startRoute(){this.active||(this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}startArea(){this.active||(this.inner.setAreaMode(),this.active=!0,this.map.boxZoom.disable(),this.map.doubleClickZoom.disable())}stop(){this.active=!1,this.inner.clearState(),this.redraw(),this.map.boxZoom.enable(),this.map.doubleClickZoom.enable()}editExistingRoute(e){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),e.properties.waypoints||(e.properties.waypoints=[{lon:e.geometry.coordinates[0][0],lat:e.geometry.coordinates[0][1],snapped:!0},{lon:e.geometry.coordinates[e.geometry.coordinates.length-1][0],lat:e.geometry.coordinates[e.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(e.properties.waypoints),this.redraw()}editExistingArea(e){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),e.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(e.properties.waypoints),this.redraw()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersSuccess)n(JSON.parse(e));else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(e){this.inner.setRouteConfig(e),this.redraw()}addSnappedWaypoint(e){this.inner.addSnappedWaypoint(e[0],e[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}toggleSnapMode(){this.inner.toggleSnapMode(),this.redraw()}redraw(){let e=JSON.parse(this.inner.renderGeojson());this.routeToolGj.set(e),this.map.getCanvas().style.cursor=e.cursor,this.snapMode.set(e.snap_mode),this.undoLength.set(e.undo_length)}dataUpdated(){let e=this.inner.toFinalFeature();if(e)for(let n of this.eventListenersUpdated)n(JSON.parse(e))}}const Fv="MZEJTanw3WpxRvt7qDfo";let uu=Nn(null),Bv=Nn("dataviz"),Jd=Nn(!window.matchMedia("(prefers-color-scheme: dark)").matches),M_=Nn(!1),Ku=Nn(""),A_=Nn(!0),Gi=Nn(null),k_=Nn(null),Vv=Nn(new ny.LngLat(0,0)),Uv=Nn(new ny.LngLat(0,0)),S2=Nn(1),Gu=Nn(1),xn=Nn({mode:"title"}),jv=Nn("walk_cycle_only"),E2=Nn(!1);function Rf(){let t=ca(Ku);t||window.alert("Autosave failed; no projectName set?!"),window.localStorage.setItem(t,ca(Gi).toSavefile())}function I2(t){let e,n;return e=new d1({props:{$$slots:{default:[wR,({dialog:r})=>({3:r}),({dialog:r})=>r?8:0]},$$scope:{ctx:t}}}),e.$on("close",t[2]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&24&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function wR(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k;function R(){return t[1](t[3])}return{c(){e=_e("h1"),e.textContent="The low-traffic neighbourhood (LTN) tool, v2",n=Ze(),r=_e("p"),r.innerHTML=`This is an experimental + version of the + A/B Street LTN tool + . Most parts of it do not work yet, and you should probably use the other version + of the tool instead.`,i=Ze(),s=_e("p"),s.textContent="To use this tool, you need to:",c=Ze(),l=_e("ol"),l.innerHTML=`
  • Choose your study area to analyze
  • Define one or more neighbourhood boundaries
  • Optionally, fix the basemap data on existing modal filters, turn + restrictions, one-ways, etc
  • Create one or more proposals with new modal filters, and explore their + effects
  • `,d=Ze(),v=_e("p"),v.innerHTML=`This tool is created by Dustin Carlino + and relies heavily on + OpenStreetMap + data.`,S=Ze(),E=_e("center"),C=_e("button"),C.textContent="Start!"},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),xe(z,i,U),xe(z,s,U),xe(z,c,U),xe(z,l,U),xe(z,d,U),xe(z,v,U),xe(z,S,U),xe(z,E,U),oe(E,C),M||(k=Mt(C,"click",R),M=!0)},p(z,U){t=z},d(z){z&&(be(e),be(n),be(r),be(i),be(s),be(c),be(l),be(d),be(v),be(S),be(E)),M=!1,k()}}}function SR(t){let e,n,r=t[0]&&I2(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=I2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function ER(t,e,n){let r;return mt(t,A_,c=>n(0,r=c)),[r,c=>Rr(c).close(),()=>Ft(A_,r=!1,r)]}class IR extends Yt{constructor(e){super(),Xt(this,e,ER,SR,Ut,{})}}const CR="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAk0lEQVRIS+3U0Q2AIAwEUNjMUXQydRJH0zZB0wjGuwJfSsKfuWfO1hg6n9g5P3wPWKTSXe6EVstUNEjoloIVghAG0OxR7swgLEAjHoBCvACM1AAQUgJ0DL0nm67WwJom7XrBlhVl4arUAHYniuE1ABTuBeBwD0CFs4D92T12fp9v9iPrnJ8LBu0KC0Ch9qEfeK3sAPceHxk8hJ17AAAAAElFTkSuQmCC",C2="/ltn/assets/logo_light-97f2d067.svg",T2="/ltn/assets/logo_dark-ed08d841.svg";let TR=Date.now();function hp(t){return`${t}-${TR++}`}const G1=Symbol.for("svelte-maplibre");function fp(){return zE(G1)}function LR(t){let e=new WeakMap;return n=>{var c;let r=e.get(n.originalEvent);if(r!==void 0)return r;let s=(c=n.target.queryRenderedFeatures(n.point).find(l=>{var d;return(d=t.get(l.layer.id))==null?void 0:d.interactive}))==null?void 0:c.layer.id;return e.set(n.originalEvent,s),s}}function PR(){let t=new Map;return f1(G1,{map:Nn(null),source:O0(null),layer:O0(null),popupTarget:O0(null),cluster:Nn(),loadedImages:Nn(new Set),minzoom:Nn(0),maxzoom:Nn(24),layerEvent:Nn(null),layerInfo:t,eventTopMost:LR(t)})}function L2(t){return{subscribe:t.subscribe}}function q1({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=fp(),s=Nn(null),c=L2(s),l={...i,[t]:L2(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),f1(G1,l),{...i,self:s}}function MR(){return q1({key:"source",setCluster:!0})}function AR(t=!0){return q1({key:"layer",setPopupTarget:t,setMouseEvent:t})}function kR(){return q1({key:"popupTarget",setPopupTarget:!0,setMouseEvent:!0})}function DR(t){return"layerType"in t&&t.layerType==="deckgl"}function P2(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function RR(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function NR(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function Nf(t,e){return["case",["boolean",["feature-state","hover"],!1],e,t]}var Xc=OR;function OR(t){var e,n,r;if(t){if(Array.isArray(t)){for(e=[],n=t.length,r=0;r{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function FR(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,k,{$$slots:R={},$$scope:z}=e,{id:U=hp("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:We=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Pt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=AR();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Pt,ne=>n(34,k=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||We&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||We&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(We&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,We=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=NR(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=RR("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??k),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?P2((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?P2((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Pt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,We,ar,i,c,s,v,d,l,r,E,C,M,k,z,R]}let ly=class extends Yt{constructor(e){super(),Xt(this,e,FR,zR,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}};function BR(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function VR(t){let e,n,r;function i(c){t[17](c)}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:[BR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ly({props:s}),ai.push(()=>Il(e,"hovered",i)),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(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function UR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,k=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,k,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}let bm=class extends Yt{constructor(e){super(),Xt(this,e,UR,VR,Ut,{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 jR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function GR(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[jR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ly({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function qR(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,k=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,k,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let cc=class extends Yt{constructor(e){super(),Xt(this,e,qR,GR,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function WR(t,e,n){let r;const{map:i}=fp();mt(t,i,d=>n(4,r=d));let{position:s="top-left"}=e,{container:c=void 0}=e,l=null;return ro(()=>{r!=null&&r.loaded()&&l&&r.removeControl(l)}),t.$$set=d=>{"position"in d&&n(1,s=d.position),"container"in d&&n(2,c=d.container)},t.$$.update=()=>{if(t.$$.dirty&30&&r&&!l){let d;typeof c=="string"?d=document.querySelector(c)??void 0:d=c,n(3,l=new Fs.FullscreenControl({container:d})),r.addControl(l,s)}},[i,s,c,l,r]}class HR extends Yt{constructor(e){super(),Xt(this,e,WR,null,Ut,{position:1,container:2})}}function ZR(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function XR(t,e,n){VE().then(()=>{let r=ca(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function k2(t){let e=t[0],n,r,i=D2(t);return{c(){i.c(),n=Fi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Lt),jn(),i=D2(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function D2(t){let e;const n=t[19].default,r=Sr(n,t,t[18],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&262144)&&Ir(r,n,i,i[18],e?Er(n,i[18],s,null):Cr(i[18]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function YR(t){let e,n,r=t[0]&&k2(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=k2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function $R(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=hp("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:k=void 0}=e,{maxzoom:R=void 0}=e,{attribution:z=void 0}=e,{buffer:U=void 0}=e,{tolerance:F=void 0}=e;const{map:G,cluster:H,self:te}=MR();mt(t,G,pe=>n(17,i=pe)),mt(t,H,pe=>n(20,s=pe)),mt(t,te,pe=>n(0,r=pe));let ee,fe=!0;return ro(()=>{r&&ee&&i&&(XR(G,r,ee),Ft(te,r=null,r),n(15,ee=void 0))}),t.$$set=pe=>{"id"in pe&&n(4,d=pe.id),"data"in pe&&n(5,v=pe.data),"generateId"in pe&&n(6,S=pe.generateId),"promoteId"in pe&&n(7,E=pe.promoteId),"filter"in pe&&n(8,C=pe.filter),"lineMetrics"in pe&&n(9,M=pe.lineMetrics),"cluster"in pe&&n(10,k=pe.cluster),"maxzoom"in pe&&n(11,R=pe.maxzoom),"attribution"in pe&&n(12,z=pe.attribution),"buffer"in pe&&n(13,U=pe.buffer),"tolerance"in pe&&n(14,F=pe.tolerance),"$$scope"in pe&&n(18,l=pe.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(H,s=k,s),t.$$.dirty&196593&&i&&r!==d&&(Ft(te,r=d,r),ZR(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!k,clusterMinPoints:k==null?void 0:k.minPoints,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius,clusterProperties:k==null?void 0:k.properties,maxzoom:R,attribution:z,buffer:U,tolerance:F}),pe=>i&&pe===r,()=>{r&&(n(15,ee=i==null?void 0:i.getSource(r)),n(16,fe=!0))})),t.$$.dirty&131088&&(i==null||i.on("style.load",()=>{n(15,ee=i==null?void 0:i.getSource(d))})),t.$$.dirty&98336&&ee&&(fe?n(16,fe=!1):ee.setData(v)),t.$$.dirty&33792&&(ee==null||ee.setClusterOptions(Xc({cluster:!!k,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius})))},[r,G,H,te,d,v,S,E,C,M,k,R,z,U,F,ee,fe,i,l,c]}let Ro=class extends Yt{constructor(e){super(),Xt(this,e,$R,YR,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10,maxzoom:11,attribution:12,buffer:13,tolerance:14})}};function KR(t,e,n){let r;const{map:i}=fp();mt(t,i,C=>n(8,r=C));let{position:s="top-left"}=e,{positionOptions:c=void 0}=e,{fitBoundsOptions:l=void 0}=e,{trackUserLocation:d=!1}=e,{showAccuracyCircle:v=!0}=e,{showUserLocation:S=!0}=e,{control:E=null}=e;return ro(()=>{r!=null&&r.loaded()&&E&&r.removeControl(E)}),t.$$set=C=>{"position"in C&&n(2,s=C.position),"positionOptions"in C&&n(3,c=C.positionOptions),"fitBoundsOptions"in C&&n(4,l=C.fitBoundsOptions),"trackUserLocation"in C&&n(5,d=C.trackUserLocation),"showAccuracyCircle"in C&&n(6,v=C.showAccuracyCircle),"showUserLocation"in C&&n(7,S=C.showUserLocation),"control"in C&&n(1,E=C.control)},t.$$.update=()=>{t.$$.dirty&510&&r&&!E&&(n(1,E=new Fs.GeolocateControl({positionOptions:c,fitBoundsOptions:l,trackUserLocation:d,showAccuracyCircle:v,showUserLocation:S})),r.addControl(E,s))},[i,E,s,c,l,d,v,S,r]}class JR extends Yt{constructor(e){super(),Xt(this,e,KR,null,Ut,{position:2,positionOptions:3,fitBoundsOptions:4,trackUserLocation:5,showAccuracyCircle:6,showUserLocation:7,control:1})}}function QR(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function eN(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[QR]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ly({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function tN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,k=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,k,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}let hc=class extends Yt{constructor(e){super(),Xt(this,e,tN,eN,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}};function nN(t){let e=t.getCenter(),n=Math.round(t.getZoom()*100)/100,r=Math.ceil((n*Math.LN2+Math.log(512/360/.5))/Math.LN10),i=Math.pow(10,r),s=Math.round(e.lat*i)/i,c=Math.round(e.lng*i)/i,l=`${n}/${s}/${c}`,d=t.getBearing(),v=t.getPitch();return(d||v)&&(l+=`/${Math.round(d*10)/10}`),v&&(l+=`/${Math.round(v)}`),`#${l}`}function rN(t){return t.replace("#","").split("/").map(parseFloat)}var yf=W1;function W1(t,e){return t===e||t!==t&&e!==e?!0:typeof t!=typeof e||{}.toString.call(t)!={}.toString.call(e)||t!==Object(t)||!t?!1:Array.isArray(t)?R2(t,e):{}.toString.call(t)=="[object Set]"?R2(Array.from(t),Array.from(e)):{}.toString.call(t)=="[object Object]"?oN(t,e):iN(t,e)}function iN(t,e){return t.toString()===e.toString()}function R2(t,e){var n=t.length;if(n!=e.length)return!1;for(var r=0;rn(6,r=S));let{position:s="top-left"}=e,{showCompass:c=!0}=e,{showZoom:l=!0}=e,{visualizePitch:d=!1}=e,v=null;return ro(()=>{r!=null&&r.loaded()&&v&&r.removeControl(v)}),t.$$set=S=>{"position"in S&&n(1,s=S.position),"showCompass"in S&&n(2,c=S.showCompass),"showZoom"in S&&n(3,l=S.showZoom),"visualizePitch"in S&&n(4,d=S.visualizePitch)},t.$$.update=()=>{t.$$.dirty&126&&r&&!v&&(n(5,v=new Fs.NavigationControl({showCompass:c,showZoom:l,visualizePitch:d})),r.addControl(v,s))},[i,s,c,l,d,v,r]}class aN extends Yt{constructor(e){super(),Xt(this,e,sN,null,Ut,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function lN(t,e,n){let r;const{map:i}=fp();mt(t,i,v=>n(5,r=v));let{position:s="bottom-left"}=e,{maxWidth:c=void 0}=e,{unit:l="metric"}=e,d=null;return ro(()=>{r!=null&&r.loaded()&&d&&r.removeControl(d)}),t.$$set=v=>{"position"in v&&n(1,s=v.position),"maxWidth"in v&&n(2,c=v.maxWidth),"unit"in v&&n(3,l=v.unit)},t.$$.update=()=>{t.$$.dirty&62&&r&&!d&&(n(4,d=new Fs.ScaleControl({maxWidth:c,unit:l})),r.addControl(d,s))},[i,s,c,l,d,r]}class uN extends Yt{constructor(e){super(),Xt(this,e,lN,null,Ut,{position:1,maxWidth:2,unit:3})}}const{window:cN}=h1,hN=t=>({map:t[0]&16,loadedImages:t[0]&32,allImagesLoaded:t[0]&64}),N2=t=>({map:t[4],loadedImages:t[5],allImagesLoaded:t[6]});function O2(t){let e,n,r=t[3]&&z2(t);const i=t[40].default,s=Sr(i,t,t[39],N2);return{c(){r&&r.c(),e=Ze(),s&&s.c()},m(c,l){r&&r.m(c,l),xe(c,e,l),s&&s.m(c,l),n=!0},p(c,l){c[3]?r?(r.p(c,l),l[0]&8&&ue(r,1)):(r=z2(c),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn()),s&&s.p&&(!n||l[0]&112|l[1]&256)&&Ir(s,i,c,c[39],n?Er(i,c[39],l,hN):Cr(c[39]),N2)},i(c){n||(ue(r),ue(s,c),n=!0)},o(c){ye(r),ye(s,c),n=!1},d(c){c&&be(e),r&&r.d(c),s&&s.d(c)}}}function z2(t){let e,n,r,i,s,c,l,d;return e=new aN({props:{position:t[7]}}),r=new JR({props:{position:t[7],fitBoundsOptions:{maxZoom:12}}}),s=new HR({props:{position:t[7]}}),l=new uN({props:{position:t[7]}}),{c(){Ge(e.$$.fragment),n=Ze(),Ge(r.$$.fragment),i=Ze(),Ge(s.$$.fragment),c=Ze(),Ge(l.$$.fragment)},m(v,S){Ue(e,v,S),xe(v,n,S),Ue(r,v,S),xe(v,i,S),Ue(s,v,S),xe(v,c,S),Ue(l,v,S),d=!0},p(v,S){const E={};S[0]&128&&(E.position=v[7]),e.$set(E);const C={};S[0]&128&&(C.position=v[7]),r.$set(C);const M={};S[0]&128&&(M.position=v[7]),s.$set(M);const k={};S[0]&128&&(k.position=v[7]),l.$set(k)},i(v){d||(ue(e.$$.fragment,v),ue(r.$$.fragment,v),ue(s.$$.fragment,v),ue(l.$$.fragment,v),d=!0)},o(v){ye(e.$$.fragment,v),ye(r.$$.fragment,v),ye(s.$$.fragment,v),ye(l.$$.fragment,v),d=!1},d(v){v&&(be(n),be(i),be(c)),je(e,v),je(r,v),je(s,v),je(l,v)}}}function fN(t){let e,n,r,i,s,c=t[4]&&t[0]&&O2(t);return{c(){e=_e("div"),c&&c.c(),Ce(e,"class",n=c_(t[2])+" svelte-p00lfq"),Ce(e,"data-testid","map-container"),xl(e,"expand-map",!t[2])},m(l,d){xe(l,e,d),c&&c.m(e,null),t[41](e),r=!0,i||(s=[Mt(cN,"hashchange",t[11]),hv(t[10].call(null,e))],i=!0)},p(l,d){l[4]&&l[0]?c?(c.p(l,d),d[0]&17&&ue(c,1)):(c=O2(l),c.c(),ue(c,1),c.m(e,null)):c&&(Un(),ye(c,1,1,()=>{c=null}),jn()),(!r||d[0]&4&&n!==(n=c_(l[2])+" svelte-p00lfq"))&&Ce(e,"class",n),(!r||d[0]&4)&&xl(e,"expand-map",!l[2])},i(l){r||(ue(c),r=!0)},o(l){ye(c),r=!1},d(l){l&&be(e),c&&c.d(),t[41](null),i=!1,Kr(s)}}}function pN(t,e,n){let r,i,s,c,{$$slots:l={},$$scope:d}=e,{map:v=null}=e,{mapContainer:S=void 0}=e,{class:E=void 0}=e,{style:C}=e,{diffStyleUpdates:M=!1}=e,{center:k=void 0}=e,{zoom:R=void 0}=e,{pitch:z=0}=e,{bearing:U=0}=e,{bounds:F=void 0}=e,{hash:G=!1}=e,{updateHash:H=ne=>{window.history.replaceState(window.history.state,"",ne)}}=e,{loaded:te=!1}=e,{minZoom:ee=0}=e,{maxZoom:fe=22}=e,{antialias:pe=void 0}=e,{zoomOnDoubleClick:se=!0}=e,{locale:Ae=void 0}=e,{interactive:Y=!0}=e,{attributionControl:ae=!0}=e,{cooperativeGestures:Ke=!1}=e,{preserveDrawingBuffer:Le=!1}=e,{maxBounds:tt=void 0}=e,{images:ut=[]}=e,{standardControls:We=!1}=e,{filterLayers:Ot=void 0}=e,{transformRequest:Gt=void 0}=e;const vt=vu(),{map:At,loadedImages:Pt}=PR();mt(t,At,ne=>n(4,s=ne)),mt(t,Pt,ne=>n(5,c=ne));let rn=new Set;async function wn(ne,Me=!1){if(s&&!(!s.loaded()&&!Me))if("url"in ne){rn.add(ne.id);try{let dt=await s.loadImage(ne.url);s==null||s.addImage(ne.id,dt.data,ne.options),c.add(ne.id),Pt.set(c)}catch(dt){vt("error",dt)}finally{rn.delete(ne.id)}}else s.addImage(ne.id,ne.data,ne.options),c.add(ne.id),Pt.set(c)}let fn,_n,pn,Yn;function zr(ne){return ar(),Ft(At,s=new Fs.Map(Xc({container:ne,style:C,locale:Ae,center:k,zoom:R,pitch:z,bearing:U,minZoom:ee,maxZoom:fe,antialias:pe,interactive:Y,preserveDrawingBuffer:Le,maxBounds:tt,bounds:F,attributionControl:ae,transformRequest:Gt,cooperativeGestures:Ke})),s),s.on("load",Me=>{Me.target.getContainer().setAttribute("data-testid","map"),Me.target.getCanvas().setAttribute("data-testid","map-canvas"),n(0,te=!0),vt("load",s)}),s.on("error",Me=>vt("error",{...Me,map:s})),s.on("movestart",Me=>vt("movestart",{...Me,map:s})),s.on("moveend",Me=>{if(n(12,k=Me.target.getCenter()),n(13,R=Me.target.getZoom()),n(14,z=Me.target.getPitch()),n(15,U=Me.target.getBearing()),n(16,F=Me.target.getBounds()),vt("moveend",{...Me,map:s}),G){let dt=new URL(window.location.href.replace(/(#.+)?$/,nN(s)));H(dt)}}),s.on("click",Me=>vt("click",{...Me,map:s})),s.on("dblclick",Me=>vt("dblclick",{...Me,map:s})),s.on("contextmenu",Me=>vt("contextmenu",{...Me,map:s})),s.on("zoomstart",Me=>vt("zoomstart",{...Me,map:s})),s.on("zoom",Me=>{vt("zoom",{...Me,map:s})}),s.on("zoomend",Me=>{vt("zoomend",{...Me,map:s})}),s.on("style.load",()=>{if(s){const Me=s.getStyle();if(n(36,fn=Me.layers.map(dt=>dt.id)),n(37,_n=Object.keys(Me.sources)),Yn)for(const[dt,en]of Object.entries(Yn))s.addSource(dt,en);if(pn)for(const dt of pn)s.addLayer(dt);for(const dt of ut)wn(dt,!0)}}),s.on("styledata",Me=>{if(s&&Ot){const dt=s.getStyle().layers;if(dt)for(let en of dt)Ot(en)||s.setLayoutProperty(en.id,"visibility","none")}vt("styledata",{...Me,map:s})}),{destroy(){n(0,te=!1),s==null||s.remove(),Ft(At,s=null,s)}}}let Pn=C;function ar(){if(G){let ne=rN(window.location.hash);ne.length>=3&&(n(13,R=ne[0]),n(12,k=[ne[2],ne[1]])),ne.length==5&&(n(15,U=ne[3]),n(14,z=ne[4]))}}function Zn(ne){ai[ne?"unshift":"push"](()=>{S=ne,n(1,S)})}return t.$$set=ne=>{"map"in ne&&n(17,v=ne.map),"mapContainer"in ne&&n(1,S=ne.mapContainer),"class"in ne&&n(2,E=ne.class),"style"in ne&&n(18,C=ne.style),"diffStyleUpdates"in ne&&n(19,M=ne.diffStyleUpdates),"center"in ne&&n(12,k=ne.center),"zoom"in ne&&n(13,R=ne.zoom),"pitch"in ne&&n(14,z=ne.pitch),"bearing"in ne&&n(15,U=ne.bearing),"bounds"in ne&&n(16,F=ne.bounds),"hash"in ne&&n(20,G=ne.hash),"updateHash"in ne&&n(21,H=ne.updateHash),"loaded"in ne&&n(0,te=ne.loaded),"minZoom"in ne&&n(22,ee=ne.minZoom),"maxZoom"in ne&&n(23,fe=ne.maxZoom),"antialias"in ne&&n(24,pe=ne.antialias),"zoomOnDoubleClick"in ne&&n(25,se=ne.zoomOnDoubleClick),"locale"in ne&&n(26,Ae=ne.locale),"interactive"in ne&&n(27,Y=ne.interactive),"attributionControl"in ne&&n(28,ae=ne.attributionControl),"cooperativeGestures"in ne&&n(29,Ke=ne.cooperativeGestures),"preserveDrawingBuffer"in ne&&n(30,Le=ne.preserveDrawingBuffer),"maxBounds"in ne&&n(31,tt=ne.maxBounds),"images"in ne&&n(32,ut=ne.images),"standardControls"in ne&&n(3,We=ne.standardControls),"filterLayers"in ne&&n(33,Ot=ne.filterLayers),"transformRequest"in ne&&n(34,Gt=ne.transformRequest),"$$scope"in ne&&n(39,d=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&8&&n(7,r=typeof We=="boolean"?void 0:We),t.$$.dirty[0]&16&&n(17,v=s),t.$$.dirty[0]&786448|t.$$.dirty[1]&224&&s&&!yf(C,Pn)){const ne=s.getStyle();if(fn&&(pn=ne.layers.filter(Me=>!fn.includes(Me.id))),_n){const Me=Object.keys(ne.sources).filter(dt=>!_n.includes(dt));Yn={};for(const dt of Me)Yn[dt]=ne.sources[dt]}n(38,Pn=C),s.setStyle(C,{diff:M}),Ft(Pt,c=new Set,c),n(35,rn=new Set)}if(t.$$.dirty[0]&49|t.$$.dirty[1]&18&&te&&s!=null&&s.loaded())for(let ne of ut)!c.has(ne.id)&&!rn.has(ne.id)&&!s.hasImage(ne.id)&&wn(ne);if(t.$$.dirty[0]&32|t.$$.dirty[1]&2&&n(6,i=ut.every(ne=>c.has(ne.id))),t.$$.dirty[0]&61456&&s){let ne={};k!=null&&!yf(k,s==null?void 0:s.getCenter())&&(ne.center=k),R!=null&&!yf(R,s==null?void 0:s.getZoom())&&(ne.zoom=R),U!=null&&!yf(U,s==null?void 0:s.getBearing())&&(ne.bearing=U),z!=null&&!yf(z,s==null?void 0:s.getPitch())&&(ne.pitch=z),Object.keys(ne).length&&s.easeTo(ne)}t.$$.dirty[0]&65552&&F&&!yf(F,s==null?void 0:s.getBounds())&&(s==null||s.fitBounds(F)),t.$$.dirty[0]&33554448&&(se?s==null||s.doubleClickZoom.enable():s==null||s.doubleClickZoom.disable())},[te,S,E,We,s,c,i,r,At,Pt,zr,ar,k,R,z,U,F,v,C,M,G,H,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,Ot,Gt,rn,fn,_n,Pn,d,l,Zn]}class dN extends Yt{constructor(e){super(),Xt(this,e,pN,fN,Ut,{map:17,mapContainer:1,class:2,style:18,diffStyleUpdates:19,center:12,zoom:13,pitch:14,bearing:15,bounds:16,hash:20,updateHash:21,loaded:0,minZoom:22,maxZoom:23,antialias:24,zoomOnDoubleClick:25,locale:26,interactive:27,attributionControl:28,cooperativeGestures:29,preserveDrawingBuffer:30,maxBounds:31,images:32,standardControls:3,filterLayers:33,transformRequest:34},null,[-1,-1])}}const mN=t=>({marker:t&8}),F2=t=>({marker:t[3]});function gN(t){let e,n,r,i,s,c,l;const d=t[19].default,v=Sr(d,t,t[18],F2);return{c(){e=_e("div"),v&&v.c(),Ce(e,"tabindex",n=t[1]?0:void 0),Ce(e,"role",r=t[1]?"button":void 0),sr(e,"z-index",t[2])},m(S,E){xe(S,e,E),v&&v.m(e,null),s=!0,c||(l=[hv(t[7].call(null,e)),hv(i=_N.call(null,e,t[0])),Mt(e,"click",R0(t[20])),Mt(e,"dblclick",R0(t[21])),Mt(e,"contextmenu",R0(t[22])),Mt(e,"mouseenter",t[23]),Mt(e,"mouseleave",t[24]),Mt(e,"mousemove",t[25]),Mt(e,"keydown",t[8])],c=!0)},p(S,[E]){v&&v.p&&(!s||E&262152)&&Ir(v,d,S,S[18],s?Er(d,S[18],E,mN):Cr(S[18]),F2),(!s||E&2&&n!==(n=S[1]?0:void 0))&&Ce(e,"tabindex",n),(!s||E&2&&r!==(r=S[1]?"button":void 0))&&Ce(e,"role",r),i&&J_(i.update)&&E&1&&i.update.call(null,S[0]),E&4&&sr(e,"z-index",S[2])},i(S){s||(ue(v,S),s=!0)},o(S){ye(v,S),s=!1},d(S){S&&be(e),v&&v.d(S),c=!1,Kr(l)}}}function _N(t,e){const n=t.className;function r(i){i?t.className=`${n} ${i}`:t.className=n}return r(e),{update:r}}function yN(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{marker:d=void 0}=e,{lngLat:v}=e,{class:S=void 0}=e,{interactive:E=!0}=e,{asButton:C=!1}=e,{draggable:M=!1}=e,{feature:k=null}=e,{offset:R=void 0}=e,{zIndex:z=void 0}=e,{rotation:U=0}=e,{opacity:F=1}=e;const G=vu(),{map:H,layerEvent:te,self:ee}=kR();mt(t,H,We=>n(27,s=We)),mt(t,te,We=>n(26,r=We)),mt(t,ee,We=>n(3,i=We));function fe(We){Ft(ee,i=new Fs.Marker({element:We,rotation:U,draggable:M,offset:R,opacity:F.toString()}).setLngLat(v).addTo(s),i),n(11,d=i);const Ot=()=>Ae("dragstart"),Gt=()=>{pe(),Ae("drag")},vt=()=>{pe(),Ae("dragend")};return M&&(i.on("dragstart",Ot),i.on("drag",Gt),i.on("dragend",vt)),{destroy(){M&&(i==null||i.off("dragstart",Ot),i==null||i.off("drag",Gt),i==null||i.off("dragend",vt)),n(11,d=void 0),i==null||i.remove()}}}function pe(){let We=i==null?void 0:i.getLngLat();We&&(Array.isArray(v)?n(10,v=[We.lng,We.lat]):v&&"lon"in v?n(10,v={lon:We.lng,lat:We.lat}):n(10,v=We))}function se(We){We.key===" "&&(We.preventDefault(),We.stopPropagation(),Ae("click"))}function Ae(We){if(!E)return;let Ot=i==null?void 0:i.getLngLat();if(!Ot)return;const Gt=[Ot.lng,Ot.lat];let vt={map:s,marker:i,lngLat:Gt,features:[{type:"Feature",properties:(k==null?void 0:k.properties)??{},geometry:{type:"Point",coordinates:Gt}}]};Ft(te,r={...vt,layerType:"marker",type:We},r),G(We,vt)}const Y=()=>Ae("click"),ae=()=>Ae("dblclick"),Ke=()=>Ae("contextmenu"),Le=We=>{Ae("mouseenter")},tt=()=>{Ae("mouseleave")},ut=()=>Ae("mousemove");return t.$$set=We=>{"marker"in We&&n(11,d=We.marker),"lngLat"in We&&n(10,v=We.lngLat),"class"in We&&n(0,S=We.class),"interactive"in We&&n(12,E=We.interactive),"asButton"in We&&n(1,C=We.asButton),"draggable"in We&&n(13,M=We.draggable),"feature"in We&&n(14,k=We.feature),"offset"in We&&n(15,R=We.offset),"zIndex"in We&&n(2,z=We.zIndex),"rotation"in We&&n(16,U=We.rotation),"opacity"in We&&n(17,F=We.opacity),"$$scope"in We&&n(18,l=We.$$scope)},t.$$.update=()=>{t.$$.dirty&1032&&(i==null||i.setLngLat(v)),t.$$.dirty&32776&&(i==null||i.setOffset(R??[0,0])),t.$$.dirty&65544&&(i==null||i.setRotation(U)),t.$$.dirty&131080&&(i==null||i.setOpacity(F.toString()))},[S,C,z,i,H,te,ee,fe,se,Ae,v,d,E,M,k,R,U,F,l,c,Y,ae,Ke,Le,tt,ut]}class B2 extends Yt{constructor(e){super(),Xt(this,e,yN,gN,Ut,{marker:11,lngLat:10,class:0,interactive:12,asButton:1,draggable:13,feature:14,offset:15,zIndex:2,rotation:16,opacity:17})}}const vN=t=>({features:t[0]&16,data:t[0]&16,map:t[0]&4,close:t[0]&1}),V2=t=>{var e;return{features:t[4],data:(e=t[4])==null?void 0:e[0],map:t[2],close:t[31]}};function U2(t){let e,n,r=(t[4]||t[3]instanceof Fs.Marker)&&j2(t);return{c(){e=_e("div"),r&&r.c()},m(i,s){xe(i,e,s),r&&r.m(e,null),t[32](e),n=!0},p(i,s){i[4]||i[3]instanceof Fs.Marker?r?(r.p(i,s),s[0]&24&&ue(r,1)):(r=j2(i),r.c(),ue(r,1),r.m(e,null)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(),t[32](null)}}}function j2(t){let e;const n=t[30].default,r=Sr(n,t,t[29],V2);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[0]&536870933)&&Ir(r,n,i,i[29],e?Er(n,i[29],s,vN):Cr(i[29]),V2)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function bN(t){let e,n,r=t[9].default&&U2(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[9].default?r?(r.p(i,s),s[0]&512&&ue(r,1)):(r=U2(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function xN(t,e,n){let r,i,s,c,l,d,{$$slots:v={},$$scope:S}=e;const E=FP(v);let{closeButton:C=void 0}=e,{closeOnClickOutside:M=!0}=e,{closeOnClickInside:k=!1}=e,{closeOnMove:R=!1}=e,{openOn:z="click"}=e,{openIfTopMost:U=!0}=e,{focusAfterOpen:F=!0}=e,{anchor:G=void 0}=e,{offset:H=void 0}=e,{popupClass:te=void 0}=e,{maxWidth:ee=void 0}=e,{lngLat:fe=void 0}=e,{html:pe=void 0}=e,{open:se=!1}=e;const Ae=vu(),{map:Y,popupTarget:ae,layerEvent:Ke,layer:Le,eventTopMost:tt}=fp();mt(t,Y,Me=>n(2,s=Me)),mt(t,ae,Me=>n(3,l=Me)),mt(t,Ke,Me=>n(28,c=Me)),mt(t,Le,Me=>n(35,d=Me));const ut=["click","dblclick","contextmenu"];let We,Ot=!1,Gt;function vt(){if(!We)return;let Me=We.getElement();!Me||Me===Gt||(Gt=Me,z==="hover"&&(Gt.style.pointerEvents="none"),Gt.addEventListener("mouseenter",()=>{n(24,Ot=!0)},{passive:!0}),Gt.addEventListener("mouseleave",()=>{n(24,Ot=!1)},{passive:!0}),Gt.addEventListener("click",()=>{k&&n(0,se=!1)},{passive:!0}))}Q_(()=>{if(s)return s.on("click",Pn),s.on("contextmenu",Pn),typeof l=="string"&&(s.on("click",l,wn),s.on("dblclick",l,wn),s.on("contextmenu",l,wn),s.on("mousemove",l,zr),s.on("mouseleave",l,Yn),s.on("touchstart",l,_n),s.on("touchend",l,pn)),()=>{s!=null&&s.loaded()&&(We==null||We.remove(),s.off("click",Pn),s.off("contextmenu",Pn),l instanceof Fs.Marker?l.getPopup()===We&&l.setPopup(void 0):typeof l=="string"&&(s.off("click",l,wn),s.off("dblclick",l,wn),s.off("contextmenu",l,wn),s.off("mousemove",l,zr),s.off("mouseleave",l,Yn),s.off("touchstart",l,_n),s.off("touchend",l,pn)))}});function At(Me){return U?!("marker"in Me)&&!DR(Me)&&tt(Me)!==d:!1}let Pt=null,rn="normal";function wn(Me){Me.type===z&&(At(Me)||("layerType"in Me?Me.layerType==="deckgl"?(n(10,fe=Me.coordinate),n(4,Pt=Me.object?[Me.object]:null)):(n(10,fe=Me.lngLat),n(4,Pt=Me.features??[])):(n(10,fe=Me.lngLat),n(4,Pt=Me.features??[])),setTimeout(()=>n(0,se=!0))))}let fn=null;function _n(Me){fn=Me.point}function pn(Me){if(!fn||z!=="hover")return;let dt=fn.dist(Me.point);fn=null,dt<3&&(n(10,fe=Me.lngLat),n(4,Pt=Me.features??[]),We.isOpen()?n(25,rn="justOpened"):(n(25,rn="opening"),n(0,se=!0)))}function Yn(Me){z!=="hover"||fn||rn!=="normal"||(n(0,se=!1),n(4,Pt=null))}function zr(Me){if(!(z!=="hover"||fn||rn!=="normal")){if(At(Me)){n(0,se=!1),n(4,Pt=null);return}n(0,se=!0),n(4,Pt=Me.features??[]),n(10,fe=Me.lngLat)}}function Pn(Me){if(rn==="justOpened"){n(25,rn="normal");return}if(!M)return;let dt=[Gt,l instanceof Fs.Marker?l==null?void 0:l.getElement():null];se&&We.isOpen()&&!dt.some(en=>en==null?void 0:en.contains(Me.originalEvent.target))&&(Me.type==="contextmenu"&&z==="contextmenu"||Me.type!=="contextmenu")&&n(0,se=!1)}ro(()=>{s&&(We!=null&&We.isOpen())&&We.remove()});let ar;const Zn=()=>n(0,se=!1);function ne(Me){ai[Me?"unshift":"push"](()=>{ar=Me,n(1,ar)})}return t.$$set=Me=>{"closeButton"in Me&&n(11,C=Me.closeButton),"closeOnClickOutside"in Me&&n(12,M=Me.closeOnClickOutside),"closeOnClickInside"in Me&&n(13,k=Me.closeOnClickInside),"closeOnMove"in Me&&n(14,R=Me.closeOnMove),"openOn"in Me&&n(15,z=Me.openOn),"openIfTopMost"in Me&&n(16,U=Me.openIfTopMost),"focusAfterOpen"in Me&&n(17,F=Me.focusAfterOpen),"anchor"in Me&&n(18,G=Me.anchor),"offset"in Me&&n(19,H=Me.offset),"popupClass"in Me&&n(20,te=Me.popupClass),"maxWidth"in Me&&n(21,ee=Me.maxWidth),"lngLat"in Me&&n(10,fe=Me.lngLat),"html"in Me&&n(22,pe=Me.html),"open"in Me&&n(0,se=Me.open),"$$scope"in Me&&n(29,S=Me.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&14336&&n(27,r=C??(!M&&!k)),t.$$.dirty[0]&146685952&&(We||(n(23,We=new Fs.Popup({closeButton:r,closeOnClick:!1,closeOnMove:R,focusAfterOpen:F,maxWidth:ee,className:te,anchor:G,offset:H})),Gt=We.getElement(),We.on("open",()=>{n(0,se=!0),vt(),Ae("open",We)}),We.on("close",()=>{n(0,se=!1),Ae("close",We)}),We.on("hover",()=>{Ae("hover",We)}))),t.$$.dirty[0]&8421384&&We&&l instanceof Fs.Marker&&(z==="click"?l.setPopup(We):l.getPopup()===We&&l.setPopup(void 0)),t.$$.dirty[0]&268468224&&ut.includes(z)&&(c==null?void 0:c.type)===z&&(wn(c),Ft(Ke,c=null,c)),t.$$.dirty[0]&268468224&&n(26,i=z==="hover"&&((c==null?void 0:c.type)==="mousemove"||(c==null?void 0:c.type)==="mouseenter")),t.$$.dirty[0]&352354304&&z==="hover"&&Ke&&(i&&c&&(c.layerType==="deckgl"?(n(10,fe=c.coordinate),n(4,Pt=c.object?[c.object]:null)):(n(10,fe=c.lngLat),n(4,Pt=c.features??[]))),n(0,se=(i||Ot)??!1)),t.$$.dirty[0]&12582914&&(ar?We.setDOMContent(ar):pe&&We.setHTML(pe)),t.$$.dirty[0]&8389632&&fe&&We.setLngLat(fe),t.$$.dirty[0]&41943045&&s){let Me=We.isOpen();se&&!Me?(We.addTo(s),rn==="opening"&&n(25,rn="justOpened")):!se&&Me&&We.remove()}},[se,ar,s,l,Pt,Y,ae,Ke,Le,E,fe,C,M,k,R,z,U,F,G,H,te,ee,pe,We,Ot,rn,i,r,c,S,v,Zn,ne]}class wN extends Yt{constructor(e){super(),Xt(this,e,xN,bN,Ut,{closeButton:11,closeOnClickOutside:12,closeOnClickInside:13,closeOnMove:14,openOn:15,openIfTopMost:16,focusAfterOpen:17,anchor:18,offset:19,popupClass:20,maxWidth:21,lngLat:10,html:22,open:0},null,[-1,-1])}}function SN(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function EN(t){let e,n,r;function i(c){t[17](c)}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:[SN]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new ly({props:s}),ai.push(()=>Il(e,"hovered",i)),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(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function IN(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=hp("symbol")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S=void 0}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,k=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,k,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class yC extends Yt{constructor(e){super(),Xt(this,e,IN,EN,Ut,{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})}}var xm=Uint8Array,vC=Uint16Array,CN=Int32Array,TN=new xm([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]),LN=new xm([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]),bC=function(t,e){for(var n=new vC(31),r=0;r<31;++r)n[r]=e+=1<>1|(ir&21845)<<1,eu=(eu&52428)>>2|(eu&13107)<<2,eu=(eu&61680)>>4|(eu&3855)<<4,AN[ir]=((eu&65280)>>8|(eu&255)<<8)>>1;var eu,ir,uy=new xm(288);for(ir=0;ir<144;++ir)uy[ir]=8;var ir;for(ir=144;ir<256;++ir)uy[ir]=9;var ir;for(ir=256;ir<280;++ir)uy[ir]=7;var ir;for(ir=280;ir<288;++ir)uy[ir]=8;var ir,kN=new xm(32);for(ir=0;ir<32;++ir)kN[ir]=5;var ir,DN=new xm(0),RN=typeof TextDecoder<"u"&&new TextDecoder,NN=0;try{RN.decode(DN,{stream:!0}),NN=1}catch{}var ON=Object.defineProperty,zN=(t,e,n)=>e in t?ON(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G2=(t,e,n)=>(zN(t,typeof e!="symbol"?e+"":e,n),n);function Qd(){}function wC(t){return t()}function q2(){return Object.create(null)}function cy(t){t.forEach(wC)}function SC(t){return typeof t=="function"}function FN(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}function BN(t){return Object.keys(t).length===0}function VN(t,e){t.appendChild(e)}function UN(t,e,n){t.insertBefore(e,n||null)}function EC(t){t.parentNode&&t.parentNode.removeChild(t)}function W2(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Vu(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function jN(t){return Array.from(t.childNodes)}function Vg(t,e,n){t.classList.toggle(e,!!n)}let H1;function Wd(t){H1=t}const Sf=[],H2=[];let Pf=[];const Z2=[],GN=Promise.resolve();let Gv=!1;function qN(){Gv||(Gv=!0,GN.then(IC))}function qv(t){Pf.push(t)}const ov=new Set;let vf=0;function IC(){if(vf!==0)return;const t=H1;do{try{for(;vft.indexOf(r)===-1?e.push(r):n.push(r)),n.forEach(r=>r()),Pf=e}const ZN=new Set;function XN(t,e){t&&t.i&&(ZN.delete(t),t.i(e))}function YN(t,e,n){const{fragment:r,after_update:i}=t.$$;r&&r.m(e,n),qv(()=>{const s=t.$$.on_mount.map(wC).filter(SC);t.$$.on_destroy?t.$$.on_destroy.push(...s):cy(s),t.$$.on_mount=[]}),i.forEach(qv)}function $N(t,e){const n=t.$$;n.fragment!==null&&(HN(n.after_update),cy(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function KN(t,e){t.$$.dirty[0]===-1&&(Sf.push(t),qN(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const k=M.length?M[0]:C;return v.ctx&&i(v.ctx[E],v.ctx[E]=k)&&(!v.skip_bound&&v.bound[E]&&v.bound[E](k),S&&KN(t,E)),C}):[],v.update(),S=!0,cy(v.before_update),v.fragment=r?r(v.ctx):!1,e.target){if(e.hydrate){const E=jN(e.target);v.fragment&&v.fragment.l(E),E.forEach(EC)}else v.fragment&&v.fragment.c();e.intro&&XN(t.$$.fragment),YN(t,e.target,e.anchor),IC()}Wd(d)}class QN{constructor(){G2(this,"$$"),G2(this,"$$set")}$destroy(){$N(this,1),this.$destroy=Qd}$on(e,n){if(!SC(n))return Qd;const r=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i!==-1&&r.splice(i,1)}}$set(e){this.$$set&&!BN(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const eO="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(eO);function tO(t){let e,n,r;return{c(){e=W2("svg"),n=W2("path"),Vu(n,"stroke-width","4"),Vu(n,"d","M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"),Vu(n,"class","svelte-gzo3ar"),Vu(e,"width",r=t[0]==="list"?20:void 0),Vu(e,"viewBox","0 0 70 85"),Vu(e,"fill","none"),Vu(e,"class","svelte-gzo3ar"),Vg(e,"in-map",t[0]!=="list"),Vg(e,"list-icon",t[0]==="list")},m(i,s){UN(i,e,s),VN(e,n)},p(i,[s]){s&1&&r!==(r=i[0]==="list"?20:void 0)&&Vu(e,"width",r),s&1&&Vg(e,"in-map",i[0]!=="list"),s&1&&Vg(e,"list-icon",i[0]==="list")},i:Qd,o:Qd,d(i){i&&EC(e)}}}function nO(t,e,n){let{displayIn:r}=e;return t.$$set=i=>{"displayIn"in i&&n(0,r=i.displayIn)},[r]}class rO extends QN{constructor(e){super(),JN(this,e,nO,tO,FN,{displayIn:0})}}const iO=[{verbatimCoordinates:"40.123, -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:"40.123° N 74.123° W",verbatimLatitude:"40.123° N",verbatimLongitude:"74.123° W"},{verbatimCoordinates:'40° 7´ 22.8" N 74° 7´ 22.8" W',verbatimLatitude:'40° 7´ 22.8" N',verbatimLongitude:'74° 7´ 22.8" W'},{verbatimCoordinates:"40° 7.38’ , -74° 7.38’",verbatimLatitude:"40° 7.38’",verbatimLongitude:"-74° 7.38’"},{verbatimCoordinates:"N40°7’22.8’’, W74°7’22.8’’",verbatimLatitude:"N40°7’22.8’’",verbatimLongitude:"W74°7’22.8’’"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:`40°7'22.8"N, 74°7'22.8"W`,verbatimLatitude:`40°7'22.8"N`,verbatimLongitude:`74°7'22.8"W`},{verbatimCoordinates:"40 7 22.8, -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"},{verbatimCoordinates:"40.123 -74.123",verbatimLatitude:"40.123",verbatimLongitude:"-74.123"},{verbatimCoordinates:"40.123°,-74.123°",verbatimLatitude:"40.123°",verbatimLongitude:"-74.123°"},{verbatimCoordinates:"40.123N74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"4007.38N7407.38W",verbatimLatitude:"4007.38N",verbatimLongitude:"7407.38W"},{verbatimCoordinates:'40°7’22.8"N, 74°7’22.8"W',verbatimLatitude:'40°7’22.8"N',verbatimLongitude:'74°7’22.8"W'},{verbatimCoordinates:"400722.8N740722.8W",verbatimLatitude:"400722.8N",verbatimLongitude:"740722.8W"},{verbatimCoordinates:"N 40 7.38 W 74 7.38",verbatimLatitude:"N 40 7.38",verbatimLongitude:"W 74 7.38"},{verbatimCoordinates:"40:7:22.8N 74:7:22.8W",verbatimLatitude:"40:7:22.8N",verbatimLongitude:"74:7:22.8W"},{verbatimCoordinates:"40:7:23N,74:7:23W",verbatimLatitude:"40:7:23N",verbatimLongitude:"74:7:23W",decimalLatitude:40.1230555555,decimalLongitude:-74.1230555555},{verbatimCoordinates:'40°7’23"N 74°7’23"W',verbatimLatitude:'40°7’23"N',verbatimLongitude:'74°7’23"W',decimalLatitude:40.1230555555,decimalLongitude:-74.12305555555555},{verbatimCoordinates:'40°7’23"S 74°7’23"E',verbatimLatitude:'40°7’23"S',verbatimLongitude:'74°7’23"E',decimalLatitude:-40.1230555555,decimalLongitude:74.12305555555555},{verbatimCoordinates:'40°7’23" -74°7’23"',verbatimLatitude:'40°7’23"',verbatimLongitude:'-74°7’23"',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:'40d 7’ 23" N 74d 7’ 23" W',verbatimLatitude:'40d 7’ 23" N',verbatimLongitude:'74d 7’ 23" W',decimalLatitude:40.1230555555,decimalLongitude:-74.123055555},{verbatimCoordinates:"40.123N 74.123W",verbatimLatitude:"40.123N",verbatimLongitude:"74.123W"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40° 7.38, -74° 7.38",verbatimLatitude:"40° 7.38",verbatimLongitude:"-74° 7.38"},{verbatimCoordinates:"40 7 22.8; -74 7 22.8",verbatimLatitude:"40 7 22.8",verbatimLongitude:"-74 7 22.8"}],oO={decimalLatitude:40.123,decimalLongitude:-74.123},sO=[{verbatimCoordinates:`50°4'17.698"south, 14°24'2.826"east`,verbatimLatitude:`50°4'17.698"south`,verbatimLongitude:`14°24'2.826"east`,decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"50d4m17.698S 14d24m2.826E",verbatimLatitude:"50d4m17.698S",verbatimLongitude:"14d24m2.826E",decimalLatitude:-50.07158277777778,decimalLongitude:14.400785},{verbatimCoordinates:"40:26:46N,79:56:55W",verbatimLatitude:"40:26:46N",verbatimLongitude:"79:56:55W",decimalLatitude:40.44611111111111,decimalLongitude:-79.9486111111111},{verbatimCoordinates:"40:26:46.302N 79:56:55.903W",verbatimLatitude:"40:26:46.302N",verbatimLongitude:"79:56:55.903W",decimalLatitude:40.446195,decimalLongitude:-79.94886194444445},{verbatimCoordinates:"40°26′47″N 79°58′36″W",verbatimLatitude:"40°26′47″N",verbatimLongitude:"79°58′36″W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40d 26′ 47″ N 79d 58′ 36″ W",verbatimLatitude:"40d 26′ 47″ N",verbatimLongitude:"79d 58′ 36″ W",decimalLatitude:40.44638888888889,decimalLongitude:-79.97666666666667},{verbatimCoordinates:"40.446195N 79.948862W",verbatimLatitude:"40.446195N",verbatimLongitude:"79.948862W",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40,446195° 79,948862°",verbatimLatitude:"40,446195°",verbatimLongitude:"79,948862°",decimalLatitude:40.446195,decimalLongitude:79.948862},{verbatimCoordinates:"40° 26.7717, -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.446195, -79.948862",verbatimLatitude:"40.446195",verbatimLongitude:"-79.948862",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"40.123256; -74.123256",verbatimLatitude:"40.123256",verbatimLongitude:"-74.123256",decimalLatitude:40.123256,decimalLongitude:-74.123256},{verbatimCoordinates:"18°24S 22°45E",verbatimLatitude:"18°24S",verbatimLongitude:"22°45E",decimalLatitude:-18.4,decimalLongitude:22.75}],aO=[{verbatimCoordinates:"10.432342S 10.6345345E",verbatimLatitude:"10.432342S",verbatimLongitude:"10.6345345E",decimalLatitude:-10.432342,decimalLongitude:10.6345345},{verbatimCoordinates:"10.00S 10.00E",verbatimLatitude:"10.00S",verbatimLongitude:"10.00E",decimalLatitude:-10,decimalLongitude:10},{verbatimCoordinates:"00.00S 01.00E",verbatimLatitude:"00.00S",verbatimLongitude:"01.00E",decimalLatitude:0,decimalLongitude:1},{verbatimCoordinates:"18.24S 22.45E",verbatimLatitude:"18.24S",verbatimLongitude:"22.45E",decimalLatitude:-18.4,decimalLongitude:22.75},{verbatimCoordinates:"27deg 15min 45.2sec S 18deg 32min 53.7sec E",verbatimLatitude:"27deg 15min 45.2sec S",verbatimLongitude:"18deg 32min 53.7sec E",decimalLatitude:-27.262555555555554,decimalLongitude:18.54825},{verbatimCoordinates:"-23.3245° S / 28.2344° E",verbatimLatitude:"-23.3245° S",verbatimLongitude:"28.2344° E",decimalLatitude:-23.3245,decimalLongitude:28.2344},{verbatimCoordinates:"40° 26.7717 -79° 56.93172",verbatimLatitude:"40° 26.7717",verbatimLongitude:"-79° 56.93172",decimalLatitude:40.446195,decimalLongitude:-79.948862},{verbatimCoordinates:"27.15.45S 18.32.53E",verbatimLatitude:"27.15.45S",verbatimLongitude:"18.32.53E",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"-27.15.45 18.32.53",verbatimLatitude:"-27.15.45",verbatimLongitude:"18.32.53",decimalLatitude:-27.2625,decimalLongitude:18.548055},{verbatimCoordinates:"27.15.45.2S 18.32.53.4E",verbatimLatitude:"27.15.45.2S",verbatimLongitude:"18.32.53.4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"27.15.45,2S 18.32.53,4E",verbatimLatitude:"27.15.45,2S",verbatimLongitude:"18.32.53,4E",decimalLatitude:-27.262556,decimalLongitude:18.548167},{verbatimCoordinates:"S23.43563 ° E22.45634 °",verbatimLatitude:"S23.43563 °",verbatimLongitude:"E22.45634 °",decimalLatitude:-23.43563,decimalLongitude:22.45634},{verbatimCoordinates:"27,71372° S 23,07771° E",verbatimLatitude:"27,71372° S",verbatimLongitude:"23,07771° E",decimalLatitude:-27.71372,decimalLongitude:23.07771},{verbatimCoordinates:"27.45.34 S 23.23.23 E",verbatimLatitude:"27.45.34 S",verbatimLongitude:"23.23.23 E",decimalLatitude:-27.759444,decimalLongitude:23.38972222},{verbatimCoordinates:"S 27.45.34 E 23.23.23",verbatimLatitude:"S 27.45.34",verbatimLongitude:"E 23.23.23",decimalLatitude:-27.759444,decimalLongitude:23.38972222}];function lO(){const t=[];return iO.forEach(e=>{e.decimalLatitude?t.push(e):t.push({...e,...oO})}),[...t,...sO,...aO]}const uO=lO();uO.map(t=>t.verbatimCoordinates);/** + * splaytree v3.1.2 + * Fast Splay tree for Node and browser + * + * @author Alexander Milevski + * @license MIT + * @preserve + *//*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */function cO(t,e){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,c;return c={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(v){return function(S){return d([v,S])}}function d(v){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=v[0]&2?i.return:v[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,v[1])).done)return s;switch(i=0,s&&(v=[v[0]&2,s.value]),v[0]){case 0:case 1:s=v;break;case 4:return n.label++,{value:v[1],done:!1};case 5:n.label++,i=v[1],v=[0];continue;case 7:v=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(v[0]===6||v[0]===2)){n=0;continue}if(v[0]===3&&(!s||v[1]>s[0]&&v[1]e?1:t0){if(e.right===null)break;if(n(t,e.right.key)>0){var l=e.right;if(e.right=l.left,l.left=e,e=l,e.right===null)break}i.right=e,i=e,e=e.right}else break}return i.right=e.left,s.left=e.right,e.left=r.right,e.right=r.left,e}function sv(t,e,n,r){var i=new Ju(t,e);if(n===null)return i.left=i.right=null,i;n=Wu(t,n,r);var s=r(t,n.key);return s<0?(i.left=n.left,i.right=n,n.left=null):s>=0&&(i.right=n.right,i.left=n,n.right=null),i}function X2(t,e,n){var r=null,i=null;if(e){e=Wu(t,e,n);var s=n(e.key,t);s===0?(r=e.left,i=e.right):s<0?(i=e.right,e.right=null,r=e):(r=e.left,e.left=null,i=e)}return{left:r,right:i}}function fO(t,e,n){return e===null?t:(t===null||(e=Wu(t.key,e,n),e.left=t),e)}function Wv(t,e,n,r,i){if(t){r(""+e+(n?"└── ":"├── ")+i(t)+` +`);var s=e+(n?" ":"│ ");t.left&&Wv(t.left,s,!1,r,i),t.right&&Wv(t.right,s,!0,r,i)}}var Z1=function(){function t(e){e===void 0&&(e=hO),this._root=null,this._size=0,this._comparator=e}return t.prototype.insert=function(e,n){return this._size++,this._root=sv(e,n,this._root,this._comparator)},t.prototype.add=function(e,n){var r=new Ju(e,n);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=Wu(e,this._root,i),c=i(e,s.key);return c===0?this._root=s:(c<0?(r.left=s.left,r.right=s,s.left=null):c>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},t.prototype.remove=function(e){this._root=this._remove(e,this._root,this._comparator)},t.prototype._remove=function(e,n,r){var i;if(n===null)return null;n=Wu(e,n,r);var s=r(e,n.key);return s===0?(n.left===null?i=n.right:(i=Wu(e,n.left,r),i.right=n.right),this._size--,i):n},t.prototype.pop=function(){var e=this._root;if(e){for(;e.left;)e=e.left;return this._root=Wu(e.key,this._root,this._comparator),this._root=this._remove(e.key,this._root,this._comparator),{key:e.key,data:e.data}}return null},t.prototype.findStatic=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return n;i<0?n=n.left:n=n.right}return null},t.prototype.find=function(e){return this._root&&(this._root=Wu(e,this._root,this._comparator),this._comparator(e,this._root.key)!==0)?null:this._root},t.prototype.contains=function(e){for(var n=this._root,r=this._comparator;n;){var i=r(e,n.key);if(i===0)return!0;i<0?n=n.left:n=n.right}return!1},t.prototype.forEach=function(e,n){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),e.call(n,r),r=r.right):s=!0;return this},t.prototype.range=function(e,n,r,i){for(var s=[],c=this._comparator,l=this._root,d;s.length!==0||l;)if(l)s.push(l),l=l.left;else{if(l=s.pop(),d=c(l.key,n),d>0)break;if(c(l.key,e)>=0&&r.call(i,l))return this;l=l.right}return this},t.prototype.keys=function(){var e=[];return this.forEach(function(n){var r=n.key;return e.push(r)}),e},t.prototype.values=function(){var e=[];return this.forEach(function(n){var r=n.data;return e.push(r)}),e},t.prototype.min=function(){return this._root?this.minNode(this._root).key:null},t.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},t.prototype.minNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.left;)e=e.left;return e},t.prototype.maxNode=function(e){if(e===void 0&&(e=this._root),e)for(;e.right;)e=e.right;return e},t.prototype.at=function(e){for(var n=this._root,r=!1,i=0,s=[];!r;)if(n)s.push(n),n=n.left;else if(s.length>0){if(n=s.pop(),i===e)return n;i++,n=n.right}else r=!0;return null},t.prototype.next=function(e){var n=this._root,r=null;if(e.right){for(r=e.right;r.left;)r=r.left;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?(r=n,n=n.left):n=n.right}return r},t.prototype.prev=function(e){var n=this._root,r=null;if(e.left!==null){for(r=e.left;r.right;)r=r.right;return r}for(var i=this._comparator;n;){var s=i(e.key,n.key);if(s===0)break;s<0?n=n.left:(r=n,n=n.right)}return r},t.prototype.clear=function(){return this._root=null,this._size=0,this},t.prototype.toList=function(){return dO(this._root)},t.prototype.load=function(e,n,r){n===void 0&&(n=[]),r===void 0&&(r=!1);var i=e.length,s=this._comparator;if(r&&Xv(e,n,0,i-1,s),this._root===null)this._root=Hv(e,n,0,i),this._size=i;else{var c=mO(this.toList(),pO(e,n),s);i=this._size+i,this._root=Zv({head:c},0,i)}return this},t.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){e===void 0&&(e=function(r){return String(r.key)});var n=[];return Wv(this._root,"",!0,function(r){return n.push(r)},e),n.join("")},t.prototype.update=function(e,n,r){var i=this._comparator,s=X2(e,this._root,i),c=s.left,l=s.right;i(e,n)<0?l=sv(n,r,l,i):c=sv(n,r,c,i),this._root=fO(c,l,i)},t.prototype.split=function(e){return X2(e,this._root,this._comparator)},t.prototype[Symbol.iterator]=function(){var e,n,r;return cO(this,function(i){switch(i.label){case 0:e=this._root,n=[],r=!1,i.label=1;case 1:return r?[3,6]:e===null?[3,2]:(n.push(e),e=e.left,[3,5]);case 2:return n.length===0?[3,4]:(e=n.pop(),[4,e]);case 3:return i.sent(),e=e.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},t}();function Hv(t,e,n,r){var i=r-n;if(i>0){var s=n+Math.floor(i/2),c=t[s],l=e[s],d=new Ju(c,l);return d.left=Hv(t,e,n,s),d.right=Hv(t,e,s+1,r),d}return null}function pO(t,e){for(var n=new Ju(null,null),r=n,i=0;i0?(e=s=s.next=n.pop(),e=e.right):r=!0;return s.next=null,i.next}function Zv(t,e,n){var r=n-e;if(r>0){var i=e+Math.floor(r/2),s=Zv(t,e,i),c=t.head;return c.left=s,t.head=t.head.next,c.right=Zv(t,i+1,n),c}return null}function mO(t,e,n){for(var r=new Ju(null,null),i=r,s=t,c=e;s!==null&&c!==null;)n(s.key,c.key)<0?(i.next=s,s=s.next):(i.next=c,c=c.next),i=i.next;return s!==null?i.next=s:c!==null&&(i.next=c),r.next}function Xv(t,e,n,r,i){if(!(n>=r)){for(var s=t[n+r>>1],c=n-1,l=r+1;;){do c++;while(i(t[c],s)<0);do l--;while(i(t[l],s)>0);if(c>=l)break;var d=t[c];t[c]=t[l],t[l]=d,d=e[c],e[c]=e[l],e[l]=d}Xv(t,e,n,l,i),Xv(t,e,l+1,r,i)}}function La(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Y2(t,e){for(var n=0;nn.x?1:e.yn.y?1:0}}]);function t(e,n){La(this,t),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=n}return ns(t,[{key:"link",value:function(e){if(e.point===this.point)throw new Error("Tried to link already linked events");for(var n=e.point.events,r=0,i=n.length;r=0&&E>=0?vC?-1:0:d<0&&E<0?vC?1:0:Ed?1:0}}}]),t}(),xO=0,R_=function(){ns(t,null,[{key:"compare",value:function(e,n){var r=e.leftSE.point.x,i=n.leftSE.point.x,s=e.rightSE.point.x,c=n.rightSE.point.x;if(cl&&d>v)return-1;var E=e.comparePoint(n.leftSE.point);if(E<0)return 1;if(E>0)return-1;var C=n.comparePoint(e.rightSE.point);return C!==0?C:-1}if(r>i){if(ld&&l>S)return 1;var M=n.comparePoint(e.leftSE.point);if(M!==0)return M;var k=e.comparePoint(n.rightSE.point);return k<0?1:k>0?-1:1}if(ld)return 1;if(sc){var z=e.comparePoint(n.rightSE.point);if(z<0)return 1;if(z>0)return-1}if(s!==c){var U=v-l,F=s-r,G=S-d,H=c-i;if(U>F&&GH)return-1}return s>c?1:sS?1:e.idn.id?1:0}}]);function t(e,n,r,i){La(this,t),this.id=++xO,this.leftSE=e,e.segment=this,e.otherSE=n,this.rightSE=n,n.segment=this,n.otherSE=e,this.rings=r,this.windings=i}return ns(t,[{key:"replaceRightSE",value:function(e){this.rightSE=e,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var e=this.leftSE.point.y,n=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:en?e:n}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(e){return e.x===this.leftSE.point.x&&e.y===this.leftSE.point.y||e.x===this.rightSE.point.x&&e.y===this.rightSE.point.y}},{key:"comparePoint",value:function(e){if(this.isAnEndpoint(e))return 0;var n=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(n.x===r.x)return e.x===n.x?0:e.x0&&l.swapEvents(),_l.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),n}},{key:"swapEvents",value:function(){var e=this.rightSE;this.rightSE=this.leftSE,this.leftSE=e,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var n=0,r=this.windings.length;n0){var s=n;n=r,r=s}if(n.prev===r){var c=n;n=r,r=c}for(var l=0,d=r.rings.length;l0)i=n,s=e,c=-1;else throw new Error("Tried to create degenerate segment at [".concat(e.x,", ").concat(e.y,"]"));var d=new _l(i,!0),v=new _l(s,!1);return new t(d,v,[r],[c])}}]),t}(),eS=function(){function t(e,n,r){if(La(this,t),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=n,this.isExterior=r,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var i=em.round(e[0][0],e[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};for(var s=i,c=1,l=e.length;cthis.bbox.ur.x&&(this.bbox.ur.x=d.x),d.y>this.bbox.ur.y&&(this.bbox.ur.y=d.y),s=d)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(R_.fromRing(s,i,this))}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.segments.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=this.exteriorRing.getSweepEvents(),n=0,r=this.interiorRings.length;nthis.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=n}return ns(t,[{key:"getSweepEvents",value:function(){for(var e=[],n=0,r=this.polys.length;n0&&(e=i)}for(var s=e.segment.prevInResult(),c=s?s.prevInResult():null;;){if(!s)return null;if(!c)return s.ringOut;if(c.ringOut!==s.ringOut)return c.ringOut.enclosingRing()!==s.ringOut?s.ringOut:s.ringOut.enclosingRing();s=c.prevInResult(),c=s?s.prevInResult():null}}}]),t}(),nS=function(){function t(e){La(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return ns(t,[{key:"addInterior",value:function(e){this.interiorRings.push(e),e.poly=this}},{key:"getGeom",value:function(){var e=[this.exteriorRing.getGeom()];if(e[0]===null)return null;for(var n=0,r=this.interiorRings.length;n1&&arguments[1]!==void 0?arguments[1]:R_.compare;La(this,t),this.queue=e,this.tree=new Z1(n),this.segments=[]}return ns(t,[{key:"process",value:function(e){var n=e.segment,r=[];if(e.consumedBy)return e.isLeft?this.queue.remove(e.otherSE):this.tree.remove(n),r;var i=e.isLeft?this.tree.insert(n):this.tree.find(n);if(!i)throw new Error("Unable to find segment #".concat(n.id," ")+"[".concat(n.leftSE.point.x,", ").concat(n.leftSE.point.y,"] -> ")+"[".concat(n.rightSE.point.x,", ").concat(n.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var s=i,c=i,l=void 0,d=void 0;l===void 0;)s=this.tree.prev(s),s===null?l=null:s.key.consumedBy===void 0&&(l=s.key);for(;d===void 0;)c=this.tree.next(c),c===null?d=null:c.key.consumedBy===void 0&&(d=c.key);if(e.isLeft){var v=null;if(l){var S=l.getIntersection(n);if(S!==null&&(n.isAnEndpoint(S)||(v=S),!l.isAnEndpoint(S)))for(var E=this._splitSafely(l,S),C=0,M=E.length;C0?(this.tree.remove(n),r.push(e)):(this.segments.push(n),n.prev=l)}else{if(l&&d){var pe=l.getIntersection(d);if(pe!==null){if(!l.isAnEndpoint(pe))for(var se=this._splitSafely(l,pe),Ae=0,Y=se.length;AerS)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var H=new IO(k),te=k.size,ee=k.pop();ee;){var fe=ee.key;if(k.size===te){var pe=fe.segment;throw new Error("Unable to pop() ".concat(fe.isLeft?"left":"right"," SweepEvent ")+"[".concat(fe.point.x,", ").concat(fe.point.y,"] from segment #").concat(pe.id," ")+"[".concat(pe.leftSE.point.x,", ").concat(pe.leftSE.point.y,"] -> ")+"[".concat(pe.rightSE.point.x,", ").concat(pe.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(k.size>rS)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(H.segments.length>CO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var se=H.process(fe),Ae=0,Y=se.length;Ae1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;r1?e-1:0),r=1;rn[0]&&(e[0]=n[0]),e[1]>n[1]&&(e[1]=n[1]),e[2]e.x?1:this.ye.y?1:0};ze.prototype.clone=function(){};ze.prototype.copy=function(){return new ze(this)};ze.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"};ze.prototype.distance3D=function(t){var e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return Math.sqrt(e*e+n*n+r*r)};ze.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)};ze.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this.x),t=37*t+ze.hashCode(this.y),t};ze.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z};ze.prototype.interfaces_=function(){return[Es,fy,Is]};ze.prototype.getClass=function(){return ze};ze.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=nn.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}};ch.DimensionalComparator.get=function(){return ou};ch.serialVersionUID.get=function(){return 6683108902428367e3};ch.NULL_ORDINATE.get=function(){return nn.NaN};ch.X.get=function(){return 0};ch.Y.get=function(){return 1};ch.Z.get=function(){return 2};Object.defineProperties(ze,ch);var ou=function(t){if(this._dimensionsToTest=2,arguments.length!==0&&arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new yr("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}};ou.prototype.compare=function(t,e){var n=t,r=e,i=ou.compare(n.x,r.x);if(i!==0)return i;var s=ou.compare(n.y,r.y);if(s!==0)return s;if(this._dimensionsToTest<=2)return 0;var c=ou.compare(n.z,r.z);return c};ou.prototype.interfaces_=function(){return[Of]};ou.prototype.getClass=function(){return ou};ou.compare=function(t,e){return te?1:nn.isNaN(t)?nn.isNaN(e)?0:-1:nn.isNaN(e)?1:0};var zf=function(){};zf.prototype.create=function(){};zf.prototype.interfaces_=function(){return[]};zf.prototype.getClass=function(){return zf};var Fe=function(){},wm={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};Fe.prototype.interfaces_=function(){return[]};Fe.prototype.getClass=function(){return Fe};Fe.toLocationSymbol=function(t){switch(t){case Fe.EXTERIOR:return"e";case Fe.BOUNDARY:return"b";case Fe.INTERIOR:return"i";case Fe.NONE:return"-"}throw new yr("Unknown location value: "+t)};wm.INTERIOR.get=function(){return 0};wm.BOUNDARY.get=function(){return 1};wm.EXTERIOR.get=function(){return 2};wm.NONE.get=function(){return-1};Object.defineProperties(Fe,wm);var Kt=function(t,e){return t.interfaces_&&t.interfaces_().indexOf(e)>-1},rs=function(){},RC={LOG_10:{configurable:!0}};rs.prototype.interfaces_=function(){return[]};rs.prototype.getClass=function(){return rs};rs.log10=function(t){var e=Math.log(t);return nn.isInfinite(e)||nn.isNaN(e)?e:e/rs.LOG_10};rs.min=function(t,e,n,r){var i=t;return en?n:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var r=arguments[0],i=arguments[1],s=arguments[2];return rs?s:r}};rs.wrap=function(t,e){return t<0?e- -t%e:t%e};rs.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2],r=t;return e>r&&(r=e),n>r&&(r=n),r}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3],d=i;return s>d&&(d=s),c>d&&(d=c),l>d&&(d=l),d}};rs.average=function(t,e){return(t+e)/2};RC.LOG_10.get=function(){return Math.log(10)};Object.defineProperties(rs,RC);var Pa=function(t){this.str=t};Pa.prototype.append=function(t){this.str+=t};Pa.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)};Pa.prototype.toString=function(t){return this.str};var _a=function(t){this.value=t};_a.prototype.intValue=function(){return this.value};_a.prototype.compareTo=function(t){return this.valuet?1:0};_a.isNaN=function(t){return Number.isNaN(t)};var tm=function(){};tm.isWhitespace=function(t){return t<=32&&t>=0||t===127};tm.toUpperCase=function(t){return t.toUpperCase()};var Xe=function t(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var e=arguments[0];this.init(e)}else if(arguments[0]instanceof t){var n=arguments[0];this.init(n)}else if(typeof arguments[0]=="string"){var r=arguments[0];t.call(this,t.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},Xs={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};Xe.prototype.le=function(t){return(this._hi9?(S=!0,E="9"):E="0"+v,c.append(E),n=n.subtract(Xe.valueOf(v)).multiply(Xe.TEN),S&&n.selfAdd(Xe.TEN);var C=!0,M=Xe.magnitude(n._hi);if(M<0&&Math.abs(M)>=l-d&&(C=!1),!C)break}return e[0]=r,c.toString()};Xe.prototype.sqr=function(){return this.multiply(this)};Xe.prototype.doubleValue=function(){return this._hi+this._lo};Xe.prototype.subtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}};Xe.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}};Xe.prototype.isZero=function(){return this._hi===0&&this._lo===0};Xe.prototype.selfSubtract=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}};Xe.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null};Xe.prototype.min=function(t){return this.le(t)?this:t};Xe.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null,S=null,E=null;return d=this._hi/n,v=Xe.SPLIT*d,i=v-d,E=Xe.SPLIT*n,i=v-i,s=d-i,c=E-n,S=d*n,c=E-c,l=n-c,E=i*c-S+i*l+s*c+s*l,v=(this._hi-S-E+this._lo-d*r)/n,E=d+v,this._hi=E,this._lo=d-E+v,this}};Xe.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"};Xe.prototype.divide=function(){if(arguments[0]instanceof Xe){var t=arguments[0],e=null,n=null,r=null,i=null,s=null,c=null,l=null,d=null;s=this._hi/t._hi,c=Xe.SPLIT*s,e=c-s,d=Xe.SPLIT*t._hi,e=c-e,n=s-e,r=d-t._hi,l=s*t._hi,r=d-r,i=t._hi-r,d=e*r-l+e*i+n*r+n*i,c=(this._hi-l-d+this._lo-s*t._lo)/t._hi,d=s+c;var v=d,S=s-d+c;return new Xe(v,S)}else if(typeof arguments[0]=="number"){var E=arguments[0];return nn.isNaN(E)?Xe.createNaN():Xe.copy(this).selfDivide(E,0)}};Xe.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo};Xe.prototype.pow=function(t){if(t===0)return Xe.valueOf(1);var e=new Xe(this),n=Xe.valueOf(1),r=Math.abs(t);if(r>1)for(;r>0;)r%2===1&&n.selfMultiply(e),r/=2,r>0&&(e=e.sqr());else n=e;return t<0?n.reciprocal():n};Xe.prototype.ceil=function(){if(this.isNaN())return Xe.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new Xe(t,e)};Xe.prototype.compareTo=function(t){var e=t;return this._hie._hi?1:this._loe._lo?1:0};Xe.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()};Xe.prototype.setValue=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}};Xe.prototype.max=function(t){return this.ge(t)?this:t};Xe.prototype.sqrt=function(){if(this.isZero())return Xe.valueOf(0);if(this.isNegative())return Xe.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,n=Xe.valueOf(e),r=this.subtract(n.sqr()),i=r._hi*(t*.5);return n.add(i)};Xe.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],n=null,r=null,i=null,s=null,c=null,l=null;return i=this._hi+e,c=i-this._hi,s=i-c,s=e-c+(this._hi-s),l=s+this._lo,n=i+l,r=l+(i-n),this._hi=n+r,this._lo=r+(n-this._hi),this}}else if(arguments.length===2){var d=arguments[0],v=arguments[1],S=null,E=null,C=null,M=null,k=null,R=null,z=null,U=null;k=this._hi+d,C=this._lo+v,z=k-this._hi,U=C-this._lo,R=k-z,M=C-U,R=d-z+(this._hi-R),M=v-U+(this._lo-M),z=R+C,S=k+z,E=z+(k-S),z=M+E;var F=S+z,G=z+(S-F);return this._hi=F,this._lo=G,this}};Xe.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof Xe){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=null,s=null,c=null,l=null,d=null,v=null;d=Xe.SPLIT*this._hi,i=d-this._hi,v=Xe.SPLIT*n,i=d-i,s=this._hi-i,c=v-n,d=this._hi*n,c=v-c,l=n-c,v=i*c-d+i*l+s*c+s*l+(this._hi*r+this._lo*n);var S=d+v;i=d-S;var E=v+i;return this._hi=S,this._lo=E,this}};Xe.prototype.selfSqr=function(){return this.selfMultiply(this)};Xe.prototype.floor=function(){if(this.isNaN())return Xe.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new Xe(t,e)};Xe.prototype.negate=function(){return this.isNaN()?this:new Xe(-this._hi,-this._lo)};Xe.prototype.clone=function(){};Xe.prototype.multiply=function(){if(arguments[0]instanceof Xe){var t=arguments[0];return t.isNaN()?Xe.createNaN():Xe.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return nn.isNaN(e)?Xe.createNaN():Xe.copy(this).selfMultiply(e,0)}};Xe.prototype.isNaN=function(){return nn.isNaN(this._hi)};Xe.prototype.intValue=function(){return Math.trunc(this._hi)};Xe.prototype.toString=function(){var t=Xe.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()};Xe.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!0,e),r=e[0]+1,i=n;if(n.charAt(0)===".")i="0"+n;else if(r<0)i="0."+Xe.stringOfChar("0",-r)+n;else if(n.indexOf(".")===-1){var s=r-n.length,c=Xe.stringOfChar("0",s);i=n+c+".0"}return this.isNegative()?"-"+i:i};Xe.prototype.reciprocal=function(){var t=null,e=null,n=null,r=null,i=null,s=null,c=null,l=null;i=1/this._hi,s=Xe.SPLIT*i,t=s-i,l=Xe.SPLIT*this._hi,t=s-t,e=i-t,n=l-this._hi,c=i*this._hi,n=l-n,r=this._hi-n,l=t*n-c+t*r+e*n+e*r,s=(1-c-l-i*this._lo)/this._hi;var d=i+s,v=i-d+s;return new Xe(d,v)};Xe.prototype.toSciNotation=function(){if(this.isZero())return Xe.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),n=this.extractSignificantDigits(!1,e),r=Xe.SCI_NOT_EXPONENT_CHAR+e[0];if(n.charAt(0)==="0")throw new Error("Found leading zero: "+n);var i="";n.length>1&&(i=n.substring(1));var s=n.charAt(0)+"."+i;return this.isNegative()?"-"+s+r:s+r};Xe.prototype.abs=function(){return this.isNaN()?Xe.NaN:this.isNegative()?this.negate():new Xe(this)};Xe.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0};Xe.prototype.lt=function(t){return(this._hit._hi||this._hi===t._hi)&&this._lo>t._lo};Xe.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0};Xe.prototype.trunc=function(){return this.isNaN()?Xe.NaN:this.isPositive()?this.floor():this.ceil()};Xe.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0};Xe.prototype.interfaces_=function(){return[Is,Es,fy]};Xe.prototype.getClass=function(){return Xe};Xe.sqr=function(t){return Xe.valueOf(t).selfMultiply(t)};Xe.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return Xe.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new Xe(e)}};Xe.sqrt=function(t){return Xe.valueOf(t).sqrt()};Xe.parse=function(t){for(var e=0,n=t.length;tm.isWhitespace(t.charAt(e));)e++;var r=!1;if(e=n);){var v=t.charAt(e);if(e++,tm.isDigit(v)){var S=v-"0";s.selfMultiply(Xe.TEN),s.selfAdd(S),c++;continue}if(v==="."){l=c;continue}if(v==="e"||v==="E"){var E=t.substring(e);try{d=_a.parseInt(E)}catch(z){throw z instanceof Error?new Error("Invalid exponent "+E+" in string "+t):z}finally{}break}throw new Error("Unexpected character '"+v+"' at position "+e+" in string "+t)}var C=s,M=c-l-d;if(M===0)C=s;else if(M>0){var k=Xe.TEN.pow(M);C=s.divide(k)}else if(M<0){var R=Xe.TEN.pow(-M);C=s.multiply(R)}return r?C.negate():C};Xe.createNaN=function(){return new Xe(nn.NaN,nn.NaN)};Xe.copy=function(t){return new Xe(t)};Xe.magnitude=function(t){var e=Math.abs(t),n=Math.log(e)/Math.log(10),r=Math.trunc(Math.floor(n)),i=Math.pow(10,r);return i*10<=e&&(r+=1),r};Xe.stringOfChar=function(t,e){for(var n=new Pa,r=0;r0){if(s<=0)return yo.signum(c);r=i+s}else if(i<0){if(s>=0)return yo.signum(c);r=-i-s}else return yo.signum(c);var l=yo.DP_SAFE_EPSILON*r;return c>=l||-c>=l?yo.signum(c):2};yo.signum=function(t){return t>0?1:t<0?-1:0};NC.DP_SAFE_EPSILON.get=function(){return 1e-15};Object.defineProperties(yo,NC);var Rn=function(){},Sm={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};Sm.X.get=function(){return 0};Sm.Y.get=function(){return 1};Sm.Z.get=function(){return 2};Sm.M.get=function(){return 3};Rn.prototype.setOrdinate=function(t,e,n){};Rn.prototype.size=function(){};Rn.prototype.getOrdinate=function(t,e){};Rn.prototype.getCoordinate=function(){};Rn.prototype.getCoordinateCopy=function(t){};Rn.prototype.getDimension=function(){};Rn.prototype.getX=function(t){};Rn.prototype.clone=function(){};Rn.prototype.expandEnvelope=function(t){};Rn.prototype.copy=function(){};Rn.prototype.getY=function(t){};Rn.prototype.toCoordinateArray=function(){};Rn.prototype.interfaces_=function(){return[fy]};Rn.prototype.getClass=function(){return Rn};Object.defineProperties(Rn,Sm);var OC=function(){},pp=function(t){function e(){t.call(this,"Projective point not representable on the Cartesian plane.")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(OC),Ri=function(){};Ri.arraycopy=function(t,e,n,r,i){for(var s=0,c=e;ct._minx?this._minx:t._minx,n=this._miny>t._miny?this._miny:t._miny,r=this._maxx=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.isNull()?!1:n>=this._minx&&n<=this._maxx&&r>=this._miny&&r<=this._maxy}};Bt.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxxthis._maxy||t._maxythis._maxx||nthis._maxy||rthis._maxx&&(this._maxx=e._maxx),e._minythis._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.isNull()?(this._minx=n,this._maxx=n,this._miny=r,this._maxy=r):(nthis._maxx&&(this._maxx=n),rthis._maxy&&(this._maxy=r))}};Bt.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return te._minx?1:this._minye._miny?1:this._maxxe._maxx?1:this._maxye._maxy?1:0};Bt.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)};Bt.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"};Bt.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1};Bt.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny};Bt.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e};Bt.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=n,this._maxy+=n,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}};Bt.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof Bt){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof ze){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];return this.covers(n,r)}};Bt.prototype.centre=function(){return this.isNull()?null:new ze((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)};Bt.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof Bt){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.init(n.x,r.x,n.y,r.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];it._maxx&&(e=this._minx-t._maxx);var n=0;return this._maxyt._maxy&&(n=this._miny-t._maxy),e===0?n:n===0?e:Math.sqrt(e*e+n*n)};Bt.prototype.hashCode=function(){var t=17;return t=37*t+ze.hashCode(this._minx),t=37*t+ze.hashCode(this._maxx),t=37*t+ze.hashCode(this._miny),t=37*t+ze.hashCode(this._maxy),t};Bt.prototype.interfaces_=function(){return[Es,Is]};Bt.prototype.getClass=function(){return Bt};Bt.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],n=arguments[2];return n.x>=(t.xe.x?t.x:e.x)&&n.y>=(t.ye.y?t.y:e.y)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],c=arguments[3],l=Math.min(s.x,c.x),d=Math.max(s.x,c.x),v=Math.min(r.x,i.x),S=Math.max(r.x,i.x);return!(v>d||Sd)||Sn?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}};Tr.prototype.isProper=function(){return this.hasIntersection()&&this._isProper};Tr.prototype.setPrecisionModel=function(t){this._precisionModel=t};Tr.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],n=0;ni?s=r:s=i;else{var c=Math.abs(t.x-e.x),l=Math.abs(t.y-e.y);r>i?s=c:s=l,s===0&&!t.equals(e)&&(s=Math.max(c,l))}return hn.isTrue(!(s===0&&!t.equals(e)),"Bad distance calculation"),s};Tr.nonRobustComputeEdgeDistance=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=Math.sqrt(r*r+i*i);return hn.isTrue(!(s===0&&!t.equals(e)),"Invalid distance calculation"),s};hh.DONT_INTERSECT.get=function(){return 0};hh.DO_INTERSECT.get=function(){return 1};hh.COLLINEAR.get=function(){return 2};hh.NO_INTERSECTION.get=function(){return 0};hh.POINT_INTERSECTION.get=function(){return 1};hh.COLLINEAR_INTERSECTION.get=function(){return 2};Object.defineProperties(Tr,hh);var fc=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isInSegmentEnvelopes=function(n){var r=new Bt(this._inputLines[0][0],this._inputLines[0][1]),i=new Bt(this._inputLines[1][0],this._inputLines[1][1]);return r.contains(n)&&i.contains(n)},e.prototype.computeIntersection=function(){if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];if(this._isProper=!1,Bt.intersects(r,i,n)&&Et.orientationIndex(r,i,n)===0&&Et.orientationIndex(i,r,n)===0)return this._isProper=!0,(n.equals(r)||n.equals(i))&&(this._isProper=!1),this._result=t.POINT_INTERSECTION,null;this._result=t.NO_INTERSECTION}else return t.prototype.computeIntersection.apply(this,arguments)},e.prototype.normalizeToMinimum=function(n,r,i,s,c){c.x=this.smallestInAbsValue(n.x,r.x,i.x,s.x),c.y=this.smallestInAbsValue(n.y,r.y,i.y,s.y),n.x-=c.x,n.y-=c.y,r.x-=c.x,r.y-=c.y,i.x-=c.x,i.y-=c.y,s.x-=c.x,s.y-=c.y},e.prototype.safeHCoordinateIntersection=function(n,r,i,s){var c=null;try{c=Bs.intersection(n,r,i,s)}catch(l){if(l instanceof pp)c=e.nearestEndpoint(n,r,i,s);else throw l}finally{}return c},e.prototype.intersection=function(n,r,i,s){var c=this.intersectionWithNormalization(n,r,i,s);return this.isInSegmentEnvelopes(c)||(c=new ze(e.nearestEndpoint(n,r,i,s))),this._precisionModel!==null&&this._precisionModel.makePrecise(c),c},e.prototype.smallestInAbsValue=function(n,r,i,s){var c=n,l=Math.abs(c);return Math.abs(r)1e-4&&Ri.out.println("Distance = "+c.distance(l))},e.prototype.intersectionWithNormalization=function(n,r,i,s){var c=new ze(n),l=new ze(r),d=new ze(i),v=new ze(s),S=new ze;this.normalizeToEnvCentre(c,l,d,v,S);var E=this.safeHCoordinateIntersection(c,l,d,v);return E.x+=S.x,E.y+=S.y,E},e.prototype.computeCollinearIntersection=function(n,r,i,s){var c=Bt.intersects(n,r,i),l=Bt.intersects(n,r,s),d=Bt.intersects(i,s,n),v=Bt.intersects(i,s,r);return c&&l?(this._intPt[0]=i,this._intPt[1]=s,t.COLLINEAR_INTERSECTION):d&&v?(this._intPt[0]=n,this._intPt[1]=r,t.COLLINEAR_INTERSECTION):c&&d?(this._intPt[0]=i,this._intPt[1]=n,i.equals(n)&&!l&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):c&&v?(this._intPt[0]=i,this._intPt[1]=r,i.equals(r)&&!l&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&d?(this._intPt[0]=s,this._intPt[1]=n,s.equals(n)&&!c&&!v?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):l&&v?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!c&&!d?t.POINT_INTERSECTION:t.COLLINEAR_INTERSECTION):t.NO_INTERSECTION},e.prototype.normalizeToEnvCentre=function(n,r,i,s,c){var l=n.xr.x?n.x:r.x,S=n.y>r.y?n.y:r.y,E=i.xs.x?i.x:s.x,k=i.y>s.y?i.y:s.y,R=l>E?l:E,z=vC?d:C,F=S0&&l>0||c<0&&l<0)return t.NO_INTERSECTION;var d=Et.orientationIndex(i,s,n),v=Et.orientationIndex(i,s,r);if(d>0&&v>0||d<0&&v<0)return t.NO_INTERSECTION;var S=c===0&&l===0&&d===0&&v===0;return S?this.computeCollinearIntersection(n,r,i,s):(c===0||l===0||d===0||v===0?(this._isProper=!1,n.equals2D(i)||n.equals2D(s)?this._intPt[0]=n:r.equals2D(i)||r.equals2D(s)?this._intPt[0]=r:c===0?this._intPt[0]=new ze(i):l===0?this._intPt[0]=new ze(s):d===0?this._intPt[0]=new ze(n):v===0&&(this._intPt[0]=new ze(r))):(this._isProper=!0,this._intPt[0]=this.intersection(n,r,i,s)),t.POINT_INTERSECTION)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.nearestEndpoint=function(n,r,i,s){var c=n,l=Et.distancePointLine(n,i,s),d=Et.distancePointLine(r,i,s);return d0?n>0?-i:i:n>0?i:-i;if(e===0||n===0)return r>0?t>0?i:-i:t>0?-i:i;if(e>0?r>0?e<=r||(i=-i,s=t,t=n,n=s,s=e,e=r,r=s):e<=-r?(i=-i,n=-n,r=-r):(s=t,t=-n,n=s,s=e,e=-r,r=s):r>0?-e<=r?(i=-i,t=-t,e=-e):(s=-t,t=n,n=s,s=-e,e=r,r=s):e>=r?(t=-t,e=-e,n=-n,r=-r):(i=-i,s=-t,t=-n,n=s,s=-e,e=-r,r=s),t>0)if(n>0){if(!(t<=n))return i}else return i;else{if(n>0)return-i;if(t>=n)i=-i,t=-t,n=-n;else return-i}for(;;){if(c=Math.floor(n/t),n=n-c*t,r=r-c*e,r<0)return-i;if(r>e)return i;if(t>n+n){if(er+r)return-i;n=t-n,r=e-r,i=-i}if(r===0)return n===0?0:-i;if(n===0||(c=Math.floor(t/n),t=t-c*n,e=e-c*r,e<0))return i;if(e>r)return-i;if(n>t+t){if(re+e)return i;t=n-t,e=r-e,i=-i}if(e===0)return t===0?0:i;if(t===0)return-i}};var da=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};da.prototype.countSegment=function(t,e){if(t.xr&&(n=e.x,r=t.x),this._p.x>=n&&this._p.x<=r&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var i=t.x-this._p.x,s=t.y-this._p.y,c=e.x-this._p.x,l=e.y-this._p.y,d=$c.signOfDet2x2(i,s,c,l);if(d===0)return this._isPointOnSegment=!0,null;l0&&this._crossingCount++}};da.prototype.isPointInPolygon=function(){return this.getLocation()!==Fe.EXTERIOR};da.prototype.getLocation=function(){return this._isPointOnSegment?Fe.BOUNDARY:this._crossingCount%2===1?Fe.INTERIOR:Fe.EXTERIOR};da.prototype.isOnSegment=function(){return this._isPointOnSegment};da.prototype.interfaces_=function(){return[]};da.prototype.getClass=function(){return da};da.locatePointInRing=function(){if(arguments[0]instanceof ze&&Kt(arguments[1],Rn)){for(var t=arguments[0],e=arguments[1],n=new da(t),r=new ze,i=new ze,s=1;s1||d<0||d>1)&&(i=!0)}}return i?rs.min(Et.distancePointLine(t,n,r),Et.distancePointLine(e,n,r),Et.distancePointLine(n,t,e),Et.distancePointLine(r,t,e)):0};Et.isPointInRing=function(t,e){return Et.locatePointInRing(t,e)!==Fe.EXTERIOR};Et.computeLength=function(t){var e=t.size();if(e<=1)return 0;var n=0,r=new ze;t.getCoordinate(0,r);for(var i=r.x,s=r.y,c=1;cn.y&&(n=s,r=i)}var c=r;do c=c-1,c<0&&(c=e);while(t[c].equals2D(n)&&c!==r);var l=r;do l=(l+1)%e;while(t[l].equals2D(n)&&l!==r);var d=t[c],v=t[l];if(d.equals2D(n)||v.equals2D(n)||d.equals2D(v))return!1;var S=Et.computeOrientation(d,n,v),E=!1;return S===0?E=d.x>v.x:E=S>0,E};Et.locatePointInRing=function(t,e){return da.locatePointInRing(t,e)};Et.distancePointLinePerpendicular=function(t,e,n){var r=(n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y),i=((e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y))/r;return Math.abs(i)*Math.sqrt(r)};Et.computeOrientation=function(t,e,n){return Et.orientationIndex(t,e,n)};Et.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new yr("Line array must contain at least one vertex");for(var n=t.distance(e[0]),r=0;r=1)return s.distance(l);var S=((c.y-s.y)*(l.x-c.x)-(c.x-s.x)*(l.y-c.y))/d;return Math.abs(S)*Math.sqrt(d)}};Et.isOnLine=function(t,e){for(var n=new fc,r=1;r0};Bf.prototype.interfaces_=function(){return[xs]};Bf.prototype.getClass=function(){return Bf};var Vf=function(){};Vf.prototype.isInBoundary=function(t){return t>1};Vf.prototype.interfaces_=function(){return[xs]};Vf.prototype.getClass=function(){return Vf};var Uf=function(){};Uf.prototype.isInBoundary=function(t){return t===1};Uf.prototype.interfaces_=function(){return[xs]};Uf.prototype.getClass=function(){return Uf};var ni=function(){};ni.prototype.add=function(){};ni.prototype.addAll=function(){};ni.prototype.isEmpty=function(){};ni.prototype.iterator=function(){};ni.prototype.size=function(){};ni.prototype.toArray=function(){};ni.prototype.remove=function(){};function Y1(t){this.message=t||""}Y1.prototype=new Error;Y1.prototype.name="IndexOutOfBoundsException";var dp=function(){};dp.prototype.hasNext=function(){};dp.prototype.next=function(){};dp.prototype.remove=function(){};var Vs=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(){},e.prototype.set=function(){},e.prototype.isEmpty=function(){},e}(ni);function mp(t){this.message=t||""}mp.prototype=new Error;mp.prototype.name="NoSuchElementException";var yt=function(t){function e(){t.call(this),this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.ensureCapacity=function(){},e.prototype.interfaces_=function(){return[t,ni]},e.prototype.add=function(n){return arguments.length===1?this.array_.push(n):this.array_.splice(arguments[0],arguments[1]),!0},e.prototype.clear=function(){this.array_=[]},e.prototype.addAll=function(n){for(var r=this,i=n.iterator();i.hasNext();)r.add(i.next());return!0},e.prototype.set=function(n,r){var i=this.array_[n];return this.array_[n]=r,i},e.prototype.iterator=function(){return new zO(this)},e.prototype.get=function(n){if(n<0||n>=this.size())throw new Y1;return this.array_[n]},e.prototype.isEmpty=function(){return this.array_.length===0},e.prototype.size=function(){return this.array_.length},e.prototype.toArray=function(){for(var n=this,r=[],i=0,s=this.array_.length;i=1){var v=this.get(this.size()-1);if(v.equals2D(l))return null}t.prototype.add.call(this,l)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var S=arguments[0],E=arguments[1];return this.add(S,E),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var C=arguments[0],M=arguments[1],k=arguments[2];if(k)for(var R=0;R=0;z--)r.add(C[z],M);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof ze){var U=arguments[0],F=arguments[1],G=arguments[2];if(!G){var H=this.size();if(H>0){if(U>0){var te=this.get(U-1);if(te.equals2D(F))return null}if(UAe&&(Y=-1);for(var ae=se;ae!==Ae;ae+=Y)r.add(fe[ae],pe);return!0}},e.prototype.closeRing=function(){this.size()>0&&this.add(new ze(this.get(0)),!1)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},Object.defineProperties(e,n),e}(yt),In=function(){},dy={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};dy.ForwardComparator.get=function(){return nm};dy.BidirectionalComparator.get=function(){return jf};dy.coordArrayType.get=function(){return new Array(0).fill(null)};In.prototype.interfaces_=function(){return[]};In.prototype.getClass=function(){return In};In.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))};In.ptNotInList=function(t,e){for(var n=0;n=t?e:[]};In.indexOf=function(t,e){for(var n=0;n0)&&(e=t[n]);return e};In.extract=function(t,e,n){e=rs.clamp(e,0,t.length),n=rs.clamp(n,-1,t.length);var r=n-e+1;n<0&&(r=0),e>=t.length&&(r=0),nr.length)return 1;if(n.length===0)return 0;var i=In.compare(n,r),s=In.isEqualReversed(n,r);return s?0:i};jf.prototype.OLDcompare=function(t,e){var n=t,r=e;if(n.lengthr.length)return 1;if(n.length===0)return 0;for(var i=In.increasingDirection(n),s=In.increasingDirection(r),c=i>0?0:n.length-1,l=s>0?0:n.length-1,d=0;d0)e=e.right;else return e.value}return null};qi.prototype.put=function(t,e){if(this.root_===null)return this.root_={key:t,value:e,left:null,right:null,parent:null,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var n=this.root_,r,i;do if(r=n,i=t.compareTo(n.key),i<0)n=n.left;else if(i>0)n=n.right;else{var s=n.value;return n.value=e,s}while(n!==null);var c={key:t,left:null,right:null,value:e,parent:r,color:yl,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=c:r.right=c,this.fixAfterInsertion(c),this.size_++,null};qi.prototype.fixAfterInsertion=function(t){var e=this;for(t.color=Uu;t!=null&&t!==this.root_&&t.parent.color===Uu;)if(nr(t)===av(nr(nr(t)))){var n=aS(nr(nr(t)));sS(n)===Uu?(dl(nr(t),yl),dl(n,yl),dl(nr(nr(t)),Uu),t=nr(nr(t))):(t===aS(nr(t))&&(t=nr(t),e.rotateLeft(t)),dl(nr(t),yl),dl(nr(nr(t)),Uu),e.rotateRight(nr(nr(t))))}else{var r=av(nr(nr(t)));sS(r)===Uu?(dl(nr(t),yl),dl(r,yl),dl(nr(nr(t)),Uu),t=nr(nr(t))):(t===av(nr(t))&&(t=nr(t),e.rotateRight(t)),dl(nr(t),yl),dl(nr(nr(t)),Uu),e.rotateLeft(nr(nr(t))))}this.root_.color=yl};qi.prototype.values=function(){var t=new yt,e=this.getFirstEntry();if(e!==null)for(t.add(e.value);(e=qi.successor(e))!==null;)t.add(e.value);return t};qi.prototype.entrySet=function(){var t=new $1,e=this.getFirstEntry();if(e!==null)for(t.add(e);(e=qi.successor(e))!==null;)t.add(e);return t};qi.prototype.rotateLeft=function(t){if(t!=null){var e=t.right;t.right=e.left,e.left!=null&&(e.left.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.left===t?t.parent.left=e:t.parent.right=e,e.left=t,t.parent=e}};qi.prototype.rotateRight=function(t){if(t!=null){var e=t.left;t.left=e.right,e.right!=null&&(e.right.parent=t),e.parent=t.parent,t.parent===null?this.root_=e:t.parent.right===t?t.parent.right=e:t.parent.left=e,e.right=t,t.parent=e}};qi.prototype.getFirstEntry=function(){var t=this.root_;if(t!=null)for(;t.left!=null;)t=t.left;return t};qi.successor=function(t){if(t===null)return null;if(t.right!==null){for(var e=t.right;e.left!==null;)e=e.left;return e}else{for(var n=t.parent,r=t;n!==null&&r===n.right;)r=n,n=n.parent;return n}};qi.prototype.size=function(){return this.size_};var rm=function(){};rm.prototype.interfaces_=function(){return[]};rm.prototype.getClass=function(){return rm};function FC(){}FC.prototype=new my;function ya(){this.array_=[],arguments[0]instanceof ni&&this.addAll(arguments[0])}ya.prototype=new FC;ya.prototype.contains=function(t){for(var e=this,n=0,r=this.array_.length;n=0;){var c=i.substring(0,s);r.add(c),i=i.substring(s+n),s=i.indexOf(e)}i.length>0&&r.add(i);for(var l=new Array(r.size()).fill(null),d=0;d0)for(var s=i;s0&&r.append(" ");for(var s=0;s0&&r.append(","),r.append(ys.toString(t.getOrdinate(i,s)))}return r.append(")"),r.toString()}};qr.ensureValidRing=function(t,e){var n=e.size();if(n===0)return e;if(n<=3)return qr.createClosedRing(t,e,4);var r=e.getOrdinate(0,Rn.X)===e.getOrdinate(n-1,Rn.X)&&e.getOrdinate(0,Rn.Y)===e.getOrdinate(n-1,Rn.Y);return r?e:qr.createClosedRing(t,e,n+1)};qr.createClosedRing=function(t,e,n){var r=t.create(n,e.getDimension()),i=e.size();qr.copy(e,0,r,0,i);for(var s=i;s0&&qr.reverse(r._points),null}},e.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},e.prototype.getBoundaryDimension=function(){return this.isClosed()?zn.FALSE:0},e.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},e.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},e.prototype.getDimension=function(){return 1},e.prototype.getLength=function(){return Et.computeLength(this._points)},e.prototype.getNumPoints=function(){return this._points.size()},e.prototype.reverse=function(){var r=this._points.copy();qr.reverse(r);var i=this.getFactory().createLineString(r);return i},e.prototype.compareToSameClass=function(){var r=this;if(arguments.length===1){for(var i=arguments[0],s=i,c=0,l=0;c= 2)");this._points=r},e.prototype.isCoordinate=function(r){for(var i=this,s=0;s=1&&this.getCoordinateSequence().size()= 4)")},e.prototype.getGeometryType=function(){return"LinearRing"},e.prototype.copy=function(){return new e(this._points.copy(),this._factory)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.MINIMUM_VALID_SIZE.get=function(){return 4},n.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(e,n),e}(Nr),Ga=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={serialVersionUID:{configurable:!0}};return e.prototype.getSortIndex=function(){return $t.SORTINDEX_MULTIPOLYGON},e.prototype.equalsExact=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isEquivalentClass(r)?t.prototype.equalsExact.call(this,r,i):!1}else return t.prototype.equalsExact.apply(this,arguments)},e.prototype.getBoundaryDimension=function(){return 1},e.prototype.getDimension=function(){return 2},e.prototype.reverse=function(){for(var r=this,i=this._geometries.length,s=new Array(i).fill(null),c=0;c0?e.createPoint(n[0]):e.createPoint():t};sm.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};sm.prototype.getClass=function(){return sm};var am=function(){};am.prototype.edit=function(t,e){return t instanceof Ha?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof Nr?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof zo?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t};am.prototype.interfaces_=function(){return[ws.GeometryEditorOperation]};am.prototype.getClass=function(){return am};var jr=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var n=0;n0){var e=new Pa(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var n=1;n3&&(r=3),r<2?new jr(n):new jr(n,r)}};Za.prototype.interfaces_=function(){return[zf,Is]};Za.prototype.getClass=function(){return Za};Za.instance=function(){return Za.instanceObject};J1.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00};J1.instanceObject.get=function(){return new Za};Object.defineProperties(Za,J1);var VC=function(t){function e(){t.call(this),this.map_=new Map}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n){return this.map_.get(n)||null},e.prototype.put=function(n,r){return this.map_.set(n,r),r},e.prototype.values=function(){for(var n=new yt,r=this.map_.values(),i=r.next();!i.done;)n.add(i.value),i=r.next();return n},e.prototype.entrySet=function(){var n=new $1;return this.map_.entries().forEach(function(r){return n.add(r)}),n},e.prototype.size=function(){return this.map_.size()},e}(ph),Bn=function t(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=t.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof ba){var e=arguments[0];this._modelType=e,e===t.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var n=arguments[0];this._modelType=t.FIXED,this.setScale(n)}else if(arguments[0]instanceof t){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},Q1={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Bn.prototype.equals=function(t){if(!(t instanceof Bn))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale};Bn.prototype.compareTo=function(t){var e=t,n=this.getMaximumSignificantDigits(),r=e.getMaximumSignificantDigits();return new _a(n).compareTo(new _a(r))};Bn.prototype.getScale=function(){return this._scale};Bn.prototype.isFloating=function(){return this._modelType===Bn.FLOATING||this._modelType===Bn.FLOATING_SINGLE};Bn.prototype.getType=function(){return this._modelType};Bn.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Bn.FLOATING?t="Floating":this._modelType===Bn.FLOATING_SINGLE?t="Floating-Single":this._modelType===Bn.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t};Bn.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(nn.isNaN(t))return t;if(this._modelType===Bn.FLOATING_SINGLE){var e=t;return e}return this._modelType===Bn.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof ze){var n=arguments[0];if(this._modelType===Bn.FLOATING)return null;n.x=this.makePrecise(n.x),n.y=this.makePrecise(n.y)}};Bn.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Bn.FLOATING?t=16:this._modelType===Bn.FLOATING_SINGLE?t=6:this._modelType===Bn.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t};Bn.prototype.setScale=function(t){this._scale=Math.abs(t)};Bn.prototype.interfaces_=function(){return[Is,Es]};Bn.prototype.getClass=function(){return Bn};Bn.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e};Q1.serialVersionUID.get=function(){return 7777263578777804e3};Q1.maximumPreciseValue.get=function(){return 9007199254740992};Object.defineProperties(Bn,Q1);var ba=function t(e){this._name=e||null,t.nameToTypeMap.put(e,this)},eb={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};ba.prototype.readResolve=function(){return ba.nameToTypeMap.get(this._name)};ba.prototype.toString=function(){return this._name};ba.prototype.interfaces_=function(){return[Is]};ba.prototype.getClass=function(){return ba};eb.serialVersionUID.get=function(){return-552860263173159e4};eb.nameToTypeMap.get=function(){return new VC};Object.defineProperties(ba,eb);Bn.Type=ba;Bn.FIXED=new ba("FIXED");Bn.FLOATING=new ba("FLOATING");Bn.FLOATING_SINGLE=new ba("FLOATING SINGLE");var En=function t(){this._precisionModel=new Bn,this._SRID=0,this._coordinateSequenceFactory=t.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?Kt(arguments[0],zf)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Bn&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},UC={serialVersionUID:{configurable:!0}};En.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new ze(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new ze(t.getMinX(),t.getMinY()),new ze(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new ze(t.getMinX(),t.getMinY()),new ze(t.getMinX(),t.getMaxY()),new ze(t.getMaxX(),t.getMaxY()),new ze(t.getMaxX(),t.getMinY()),new ze(t.getMinX(),t.getMinY())]),null)};En.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new Nr(this.getCoordinateSequenceFactory().create(t),this);if(Kt(t,Rn))return new Nr(t,this)}else return new Nr(this.getCoordinateSequenceFactory().create([]),this)};En.prototype.createMultiLineString=function(){if(arguments.length===0)return new Qu(null,this);if(arguments.length===1){var t=arguments[0];return new Qu(t,this)}};En.prototype.buildGeometry=function(t){for(var e=null,n=!1,r=!1,i=t.iterator();i.hasNext();){var s=i.next(),c=s.getClass();e===null&&(e=c),c!==e&&(n=!0),s.isGeometryCollectionOrDerived()&&(r=!0)}if(e===null)return this.createGeometryCollection();if(n||r)return this.createGeometryCollection(En.toGeometryArray(t));var l=t.iterator().next(),d=t.size()>1;if(d){if(l instanceof li)return this.createMultiPolygon(En.toPolygonArray(t));if(l instanceof Nr)return this.createMultiLineString(En.toLineStringArray(t));if(l instanceof zo)return this.createMultiPoint(En.toPointArray(t));hn.shouldNeverReachHere("Unhandled class: "+l.getClass().getName())}return l};En.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)};En.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof ze){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new zo(e,this)}}};En.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory};En.prototype.createPolygon=function(){if(arguments.length===0)return new li(null,null,this);if(arguments.length===1){if(Kt(arguments[0],Rn)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof Ha){var n=arguments[0];return this.createPolygon(n,null)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return new li(r,i,this)}};En.prototype.getSRID=function(){return this._SRID};En.prototype.createGeometryCollection=function(){if(arguments.length===0)return new io(null,this);if(arguments.length===1){var t=arguments[0];return new io(t,this)}};En.prototype.createGeometry=function(t){var e=new ws(this);return e.edit(t,{edit:function(){if(arguments.length===2){var n=arguments[0];return this._coordinateSequenceFactory.create(n)}}})};En.prototype.getPrecisionModel=function(){return this._precisionModel};En.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(Kt(arguments[0],Rn)){var e=arguments[0];return new Ha(e,this)}}};En.prototype.createMultiPolygon=function(){if(arguments.length===0)return new Ga(null,this);if(arguments.length===1){var t=arguments[0];return new Ga(t,this)}};En.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new Gf(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new Gf(e,this)}else if(arguments[0]instanceof Array){var n=arguments[0];return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}else if(Kt(arguments[0],Rn)){var r=arguments[0];if(r===null)return this.createMultiPoint(new Array(0).fill(null));for(var i=new Array(r.size()).fill(null),s=0;s=this.size())throw new Error;return this.array_[t]};Ma.prototype.push=function(t){return this.array_.push(t),t};Ma.prototype.pop=function(t){if(this.array_.length===0)throw new by;return this.array_.pop()};Ma.prototype.peek=function(){if(this.array_.length===0)throw new by;return this.array_[this.array_.length-1]};Ma.prototype.empty=function(){return this.array_.length===0};Ma.prototype.isEmpty=function(){return this.empty()};Ma.prototype.search=function(t){return this.array_.indexOf(t)};Ma.prototype.size=function(){return this.array_.length};Ma.prototype.toArray=function(){for(var t=this,e=[],n=0,r=this.array_.length;n0&&this._minIndexthis._minCoord.y&&n.y>this._minCoord.y&&r===Et.CLOCKWISE)&&(i=!0),i&&(this._minIndex=this._minIndex-1)};xa.prototype.getRightmostSideOfSegment=function(t,e){var n=t.getEdge(),r=n.getCoordinates();if(e<0||e+1>=r.length||r[e].y===r[e+1].y)return-1;var i=lt.LEFT;return r[e].ye._minCoord.x)&&(e._minDe=t,e._minIndex=r,e._minCoord=n[r])};xa.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)};xa.prototype.findEdge=function(t){for(var e=this,n=t.iterator();n.hasNext();){var r=n.next();r.isForward()&&e.checkForRightmostCoordinate(r)}hn.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var i=this.getRightmostSide(this._minDe,this._minIndex);i===lt.LEFT&&(this._orientedDe=this._minDe.getSym())};xa.prototype.interfaces_=function(){return[]};xa.prototype.getClass=function(){return xa};var Pl=function(t){function e(n,r){t.call(this,e.msgWithCoord(n,r)),this.pt=r?new ze(r):null,this.name="TopologyException"}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCoordinate=function(){return this.pt},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.msgWithCoord=function(n,r){return r?n:n+" [ "+r+" ]"},e}(Tl),xy=function(){this.array_=[]};xy.prototype.addLast=function(t){this.array_.push(t)};xy.prototype.removeFirst=function(){return this.array_.shift()};xy.prototype.isEmpty=function(){return this.array_.length===0};var oo=function(){this._finder=null,this._dirEdgeList=new yt,this._nodes=new yt,this._rightMostCoord=null,this._env=null,this._finder=new xa};oo.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}};oo.prototype.getRightmostCoordinate=function(){return this._rightMostCoord};oo.prototype.computeNodeDepth=function(t){for(var e=this,n=null,r=t.getEdges().iterator();r.hasNext();){var i=r.next();if(i.isVisited()||i.getSym().isVisited()){n=i;break}}if(n===null)throw new Pl("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(n);for(var s=t.getEdges().iterator();s.hasNext();){var c=s.next();c.setVisited(!0),e.copySymDepths(c)}};oo.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(lt.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)};oo.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()};oo.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(lt.RIGHT)>=1&&e.getDepth(lt.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}};oo.prototype.computeDepths=function(t){var e=this,n=new $1,r=new xy,i=t.getNode();for(r.addLast(i),n.add(i),t.setVisited(!0);!r.isEmpty();){var s=r.removeFirst();n.add(s),e.computeNodeDepth(s);for(var c=s.getEdges().iterator();c.hasNext();){var l=c.next(),d=l.getSym();if(!d.isVisited()){var v=d.getNode();n.contains(v)||(r.addLast(v),n.add(v))}}}};oo.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.xe._rightMostCoord.x?1:0};oo.prototype.getEnvelope=function(){if(this._env===null){for(var t=new Bt,e=this._dirEdgeList.iterator();e.hasNext();)for(var n=e.next(),r=n.getEdge().getCoordinates(),i=0;ithis.location.length){var n=new Array(3).fill(null);n[lt.ON]=this.location[lt.ON],n[lt.LEFT]=Fe.NONE,n[lt.RIGHT]=Fe.NONE,this.location=n}for(var r=0;r1&&t.append(Fe.toLocationSymbol(this.location[lt.LEFT])),t.append(Fe.toLocationSymbol(this.location[lt.ON])),this.location.length>1&&t.append(Fe.toLocationSymbol(this.location[lt.RIGHT])),t.toString()};rr.prototype.setLocations=function(t,e,n){this.location[lt.ON]=t,this.location[lt.LEFT]=e,this.location[lt.RIGHT]=n};rr.prototype.get=function(t){return t1};rr.prototype.isAnyNull=function(){for(var t=this,e=0;et._maxNodeDegree&&(t._maxNodeDegree=r),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2};$r.prototype.addPoints=function(t,e,n){var r=this,i=t.getCoordinates();if(e){var s=1;n&&(s=0);for(var c=s;c=0;d--)r._pts.add(i[d])}};$r.prototype.isHole=function(){return this._isHole};$r.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)};$r.prototype.containsPoint=function(t){var e=this.getLinearRing(),n=e.getEnvelopeInternal();if(!n.contains(t)||!Et.isPointInRing(t,e.getCoordinates()))return!1;for(var r=this._holes.iterator();r.hasNext();){var i=r.next();if(i.containsPoint(t))return!1}return!0};$r.prototype.addHole=function(t){this._holes.add(t)};$r.prototype.isShell=function(){return this._shell===null};$r.prototype.getLabel=function(){return this._label};$r.prototype.getEdges=function(){return this._edges};$r.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree};$r.prototype.getShell=function(){return this._shell};$r.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=e.getLocation(n,lt.RIGHT);if(r===Fe.NONE)return null;if(this._label.getLocation(n)===Fe.NONE)return this._label.setLocation(n,r),null}};$r.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)};$r.prototype.toPolygon=function(t){for(var e=this,n=new Array(this._holes.size()).fill(null),r=0;r=2,"found partial label"),this.computeIM(t)};is.prototype.isInResult=function(){return this._isInResult};is.prototype.isVisited=function(){return this._isVisited};is.prototype.interfaces_=function(){return[]};is.prototype.getClass=function(){return is};var wy=function(t){function e(){t.call(this),this._coord=null,this._edges=null;var n=arguments[0],r=arguments[1];this._coord=n,this._edges=r,this._label=new Hn(0,Fe.NONE)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isIncidentEdgeInResult=function(){for(var n=this.getEdges().getEdges().iterator();n.hasNext();){var r=n.next();if(r.getEdge().isInResult())return!0}return!1},e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},e.prototype.getCoordinate=function(){return this._coord},e.prototype.print=function(n){n.println("node "+this._coord+" lbl: "+this._label)},e.prototype.computeIM=function(n){},e.prototype.computeMergedLocation=function(n,r){var i=Fe.NONE;if(i=this._label.getLocation(r),!n.isNull(r)){var s=n.getLocation(r);i!==Fe.BOUNDARY&&(i=s)}return i},e.prototype.setLabel=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1];this._label===null?this._label=new Hn(n,r):this._label.setLocation(n,r)}else return t.prototype.setLabel.apply(this,arguments)},e.prototype.getEdges=function(){return this._edges},e.prototype.mergeLabel=function(){var n=this;if(arguments[0]instanceof e){var r=arguments[0];this.mergeLabel(r._label)}else if(arguments[0]instanceof Hn)for(var i=arguments[0],s=0;s<2;s++){var c=n.computeMergedLocation(i,s),l=n._label.getLocation(s);l===Fe.NONE&&n._label.setLocation(s,c)}},e.prototype.add=function(n){this._edges.insert(n),n.setNode(this)},e.prototype.setLabelBoundary=function(n){if(this._label===null)return null;var r=Fe.NONE;this._label!==null&&(r=this._label.getLocation(n));var i=null;switch(r){case Fe.BOUNDARY:i=Fe.INTERIOR;break;case Fe.INTERIOR:i=Fe.BOUNDARY;break;default:i=Fe.BOUNDARY;break}this._label.setLocation(n,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(is),wa=function(){this.nodeMap=new qi,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};wa.prototype.find=function(t){return this.nodeMap.get(t)};wa.prototype.addNode=function(){if(arguments[0]instanceof ze){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof wy){var n=arguments[0],r=this.nodeMap.get(n.getCoordinate());return r===null?(this.nodeMap.put(n.getCoordinate(),n),n):(r.mergeLabel(n),r)}};wa.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};wa.prototype.iterator=function(){return this.nodeMap.values().iterator()};wa.prototype.values=function(){return this.nodeMap.values()};wa.prototype.getBoundaryNodes=function(t){for(var e=new yt,n=this.iterator();n.hasNext();){var r=n.next();r.getLabel().getLocation(t)===Fe.BOUNDARY&&e.add(r)}return e};wa.prototype.add=function(t){var e=t.getCoordinate(),n=this.addNode(e);n.add(t)};wa.prototype.interfaces_=function(){return[]};wa.prototype.getClass=function(){return wa};var Xn=function(){},Cm={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Xn.prototype.interfaces_=function(){return[]};Xn.prototype.getClass=function(){return Xn};Xn.isNorthern=function(t){return t===Xn.NE||t===Xn.NW};Xn.isOpposite=function(t,e){if(t===e)return!1;var n=(t-e+4)%4;return n===2};Xn.commonHalfPlane=function(t,e){if(t===e)return t;var n=(t-e+4)%4;if(n===2)return-1;var r=te?t:e;return r===0&&i===3?3:r};Xn.isInHalfPlane=function(t,e){return e===Xn.SE?t===Xn.SE||t===Xn.SW:t===e||t===e+1};Xn.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new yr("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Xn.NE:Xn.SE:e>=0?Xn.NW:Xn.SW}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var n=arguments[0],r=arguments[1];if(r.x===n.x&&r.y===n.y)throw new yr("Cannot compute the quadrant for two identical points "+n);return r.x>=n.x?r.y>=n.y?Xn.NE:Xn.SE:r.y>=n.y?Xn.NW:Xn.SW}};Cm.NE.get=function(){return 0};Cm.NW.get=function(){return 1};Cm.SW.get=function(){return 2};Cm.SE.get=function(){return 3};Object.defineProperties(Xn,Cm);var Wi=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=null;this._edge=e,this.init(n,r),this._label=i}else if(arguments.length===4){var s=arguments[0],c=arguments[1],l=arguments[2],d=arguments[3];this._edge=s,this.init(c,l),this._label=d}};Wi.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant2){c.linkDirectedEdgesForMinimalEdgeRings();var l=c.buildMinimalRings(),d=r.findShell(l);d!==null?(r.placePolygonHoles(d,l),e.add(d)):n.addAll(l)}else i.add(c)}return i};Fo.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var n=e.next();if(n.containsPoint(t))return!0}return!1};Fo.prototype.buildMaximalEdgeRings=function(t){for(var e=this,n=new yt,r=t.iterator();r.hasNext();){var i=r.next();if(i.isInResult()&&i.getLabel().isArea()&&i.getEdgeRing()===null){var s=new XO(i,e._geometryFactory);n.add(s),s.setInResult()}}return n};Fo.prototype.placePolygonHoles=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next();r.isHole()&&r.setShell(t)}};Fo.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t};Fo.prototype.findEdgeRingContaining=function(t,e){for(var n=t.getLinearRing(),r=n.getEnvelopeInternal(),i=n.getCoordinateN(0),s=null,c=null,l=e.iterator();l.hasNext();){var d=l.next(),v=d.getLinearRing(),S=v.getEnvelopeInternal();s!==null&&(c=s.getLinearRing().getEnvelopeInternal());var E=!1;S.contains(r)&&Et.isPointInRing(i,v.getCoordinates())&&(E=!0),E&&(s===null||c.contains(S))&&(s=d)}return s};Fo.prototype.findShell=function(t){for(var e=0,n=null,r=t.iterator();r.hasNext();){var i=r.next();i.isHole()||(n=i,e++)}return hn.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),n};Fo.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],n=arguments[1];Lr.linkResultDirectedEdges(n);var r=this.buildMaximalEdgeRings(e),i=new yt,s=this.buildMinimalEdgeRings(r,this._shellList,i);this.sortShellsAndHoles(s,this._shellList,i),this.placeFreeHoles(this._shellList,i)}};Fo.prototype.interfaces_=function(){return[]};Fo.prototype.getClass=function(){return Fo};var Wf=function(){};Wf.prototype.getBounds=function(){};Wf.prototype.interfaces_=function(){return[]};Wf.prototype.getClass=function(){return Wf};var Gs=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};Gs.prototype.getItem=function(){return this._item};Gs.prototype.getBounds=function(){return this._bounds};Gs.prototype.interfaces_=function(){return[Wf,Is]};Gs.prototype.getClass=function(){return Gs};var Ml=function(){this._size=null,this._items=null,this._size=0,this._items=new yt,this._items.add(null)};Ml.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t};Ml.prototype.size=function(){return this._size};Ml.prototype.reorder=function(t){for(var e=this,n=null,r=this._items.get(t);t*2<=this._size&&(n=t*2,n!==e._size&&e._items.get(n+1).compareTo(e._items.get(n))<0&&n++,e._items.get(n).compareTo(r)<0);t=n)e._items.set(t,e._items.get(n));this._items.set(t,r)};Ml.prototype.clear=function(){this._size=0,this._items.clear()};Ml.prototype.isEmpty=function(){return this._size===0};Ml.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)e._items.set(n,e._items.get(Math.trunc(n/2)));this._items.set(n,t)};Ml.prototype.interfaces_=function(){return[]};Ml.prototype.getClass=function(){return Ml};var hu=function(){};hu.prototype.visitItem=function(t){};hu.prototype.interfaces_=function(){return[]};hu.prototype.getClass=function(){return hu};var Kc=function(){};Kc.prototype.insert=function(t,e){};Kc.prototype.remove=function(t,e){};Kc.prototype.query=function(){};Kc.prototype.interfaces_=function(){return[]};Kc.prototype.getClass=function(){return Kc};var oi=function(){if(this._childBoundables=new yt,this._bounds=null,this._level=null,arguments.length!==0&&arguments.length===1){var t=arguments[0];this._level=t}},GC={serialVersionUID:{configurable:!0}};oi.prototype.getLevel=function(){return this._level};oi.prototype.size=function(){return this._childBoundables.size()};oi.prototype.getChildBoundables=function(){return this._childBoundables};oi.prototype.addChildBoundable=function(t){hn.isTrue(this._bounds===null),this._childBoundables.add(t)};oi.prototype.isEmpty=function(){return this._childBoundables.isEmpty()};oi.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds};oi.prototype.interfaces_=function(){return[Wf,Is]};oi.prototype.getClass=function(){return oi};GC.serialVersionUID.get=function(){return 6493722185909574e3};Object.defineProperties(oi,GC);var qs=function(){};qs.reverseOrder=function(){return{compare:function(t,e){return e.compareTo(t)}}};qs.min=function(t){return qs.sort(t),t.get(0)};qs.sort=function(t,e){var n=t.toArray();e?Yu.sort(n,e):Yu.sort(n);for(var r=t.iterator(),i=0,s=n.length;iXr.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(n)return this.expand(this._boundable1,this._boundable2,t,e),null;if(r)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new yr("neither boundable is composite")};Xr.prototype.isLeaves=function(){return!(Xr.isComposite(this._boundable1)||Xr.isComposite(this._boundable2))};Xr.prototype.compareTo=function(t){var e=t;return this._distancee._distance?1:0};Xr.prototype.expand=function(t,e,n,r){for(var i=this,s=t.getChildBoundables(),c=s.iterator();c.hasNext();){var l=c.next(),d=new Xr(l,e,i._itemDistance);d.getDistance()1,"Node capacity must be greater than 1"),this._nodeCapacity=n}},Sy={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};Ci.prototype.getNodeCapacity=function(){return this._nodeCapacity};Ci.prototype.lastNode=function(t){return t.get(t.size()-1)};Ci.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],n=0,r=e.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof oi?n+=t.size(i):i instanceof Gs&&(n+=1)}return n}};Ci.prototype.removeItem=function(t,e){for(var n=null,r=t.getChildBoundables().iterator();r.hasNext();){var i=r.next();i instanceof Gs&&i.getItem()===e&&(n=i)}return n!==null?(t.getChildBoundables().remove(n),!0):!1};Ci.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new yt:e}else if(arguments.length===1){for(var n=arguments[0],r=new yt,i=n.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof oi){var c=t.itemsTree(s);c!==null&&r.add(c)}else s instanceof Gs?r.add(s.getItem()):hn.shouldNeverReachHere()}return r.size()<=0?null:r}};Ci.prototype.insert=function(t,e){hn.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new Gs(t,e))};Ci.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],n=new yt;return this.boundablesAtLevel(e,this._root,n),n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(hn.isTrue(r>-2),i.getLevel()===r)return s.add(i),null;for(var c=i.getChildBoundables().iterator();c.hasNext();){var l=c.next();l instanceof oi?t.boundablesAtLevel(r,l,s):(hn.isTrue(l instanceof Gs),r===-1&&s.add(l))}return null}};Ci.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var n=new yt;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,n),n}else if(arguments.length===2){var r=arguments[0],i=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),r)&&this.query(r,this._root,i)}else if(arguments.length===3){if(Kt(arguments[2],hu)&&arguments[0]instanceof Object&&arguments[1]instanceof oi)for(var s=arguments[0],c=arguments[1],l=arguments[2],d=c.getChildBoundables(),v=0;vn&&(n=s)}}return n+1}};Ci.prototype.createParentBoundables=function(t,e){var n=this;hn.isTrue(!t.isEmpty());var r=new yt;r.add(this.createNode(e));var i=new yt(t);qs.sort(i,this.getComparator());for(var s=i.iterator();s.hasNext();){var c=s.next();n.lastNode(r).getChildBoundables().size()===n.getNodeCapacity()&&r.add(n.createNode(e)),n.lastNode(r).addChildBoundable(c)}return r};Ci.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()};Ci.prototype.interfaces_=function(){return[Is]};Ci.prototype.getClass=function(){return Ci};Ci.compareDoubles=function(t,e){return t>e?1:t0);for(var c=new yt,l=0;l0;){var k=M.poll(),R=k.getDistance();if(R>=E)break;k.isLeaves()?(E=R,C=k):k.expandToQueue(M,E)}return[C.getBoundable(0).getItem(),C.getBoundable(1).getItem()]}}else if(arguments.length===3){var z=arguments[0],U=arguments[1],F=arguments[2],G=new Gs(z,U),H=new Xr(this.getRoot(),G,F);return this.nearestNeighbour(H)[0]}},e.prototype.interfaces_=function(){return[Kc,Is]},e.prototype.getClass=function(){return e},e.centreX=function(r){return e.avg(r.getMinX(),r.getMaxX())},e.avg=function(r,i){return(r+i)/2},e.centreY=function(r){return e.avg(r.getMinY(),r.getMaxY())},n.STRtreeNode.get=function(){return lS},n.serialVersionUID.get=function(){return 0x39920f7d5f261e0},n.xComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreX(r.getBounds()),e.centreX(i.getBounds()))}}},n.yComparator.get=function(){return{interfaces_:function(){return[Of]},compare:function(r,i){return t.compareDoubles(e.centreY(r.getBounds()),e.centreY(i.getBounds()))}}},n.intersectsOp.get=function(){return{interfaces_:function(){return[t.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},n.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(e,n),e}(Ci),lS=function(t){function e(){var n=arguments[0];t.call(this,n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.computeBounds=function(){for(var n=null,r=this.getChildBoundables().iterator();r.hasNext();){var i=r.next();n===null?n=new Bt(i.getBounds()):n.expandToInclude(i.getBounds())}return n},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(oi),_o=function(){};_o.prototype.interfaces_=function(){return[]};_o.prototype.getClass=function(){return _o};_o.relativeSign=function(t,e){return te?1:0};_o.compare=function(t,e,n){if(e.equals2D(n))return 0;var r=_o.relativeSign(e.x,n.x),i=_o.relativeSign(e.y,n.y);switch(t){case 0:return _o.compareValue(r,i);case 1:return _o.compareValue(i,r);case 2:return _o.compareValue(i,-r);case 3:return _o.compareValue(-r,i);case 4:return _o.compareValue(-r,-i);case 5:return _o.compareValue(-i,-r);case 6:return _o.compareValue(-i,r);case 7:return _o.compareValue(r,-i)}return hn.shouldNeverReachHere("invalid octant value"),0};_o.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var fu=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._segString=t,this.coord=new ze(e),this.segmentIndex=n,this._segmentOctant=r,this._isInterior=!e.equals2D(t.getCoordinate(n))};fu.prototype.getCoordinate=function(){return this.coord};fu.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)};fu.prototype.compareTo=function(t){var e=t;return this.segmentIndexe.segmentIndex?1:this.coord.equals2D(e.coord)?0:_o.compare(this._segmentOctant,this.coord,e.coord)};fu.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t};fu.prototype.isInterior=function(){return this._isInterior};fu.prototype.interfaces_=function(){return[Es]};fu.prototype.getClass=function(){return fu};var so=function(){this._nodeMap=new qi,this._edge=null;var t=arguments[0];this._edge=t};so.prototype.getSplitCoordinates=function(){var t=this,e=new Em;this.addEndpoints();for(var n=this.iterator(),r=n.next();n.hasNext();){var i=n.next();t.addEdgeCoordinates(r,i,e),r=i}return e.toCoordinateArray()};so.prototype.addCollapsedNodes=function(){var t=this,e=new yt;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var n=e.iterator();n.hasNext();){var r=n.next().intValue();t.add(t._edge.getCoordinate(r),r)}};so.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var n=e.next();n.print(t)}};so.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,n=0;n=0?e>=0?n>=r?0:1:n>=r?7:6:e>=0?n>=r?3:2:n>=r?4:5}else if(arguments[0]instanceof ze&&arguments[1]instanceof ze){var i=arguments[0],s=arguments[1],c=s.x-i.x,l=s.y-i.y;if(c===0&&l===0)throw new yr("Cannot compute the octant for two identical points "+i);return Jc.octant(c,l)}};var Xa=function(){};Xa.prototype.getCoordinates=function(){};Xa.prototype.size=function(){};Xa.prototype.getCoordinate=function(t){};Xa.prototype.isClosed=function(){};Xa.prototype.setData=function(t){};Xa.prototype.getData=function(){};Xa.prototype.interfaces_=function(){return[]};Xa.prototype.getClass=function(){return Xa};var lm=function(){};lm.prototype.addIntersection=function(t,e){};lm.prototype.interfaces_=function(){return[Xa]};lm.prototype.getClass=function(){return lm};var Wr=function(){this._nodeList=new so(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Wr.prototype.getCoordinates=function(){return this._pts};Wr.prototype.size=function(){return this._pts.length};Wr.prototype.getCoordinate=function(t){return this._pts[t]};Wr.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Wr.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))};Wr.prototype.setData=function(t){this._data=t};Wr.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:Jc.octant(t,e)};Wr.prototype.getData=function(){return this._data};Wr.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[3],s=new ze(n.getIntersection(i));this.addIntersection(s,r)}};Wr.prototype.toString=function(){return Us.toLineString(new jr(this._pts))};Wr.prototype.getNodeList=function(){return this._nodeList};Wr.prototype.addIntersectionNode=function(t,e){var n=e,r=n+1;if(r=0&&n>=0||e<=0&&n<=0?Math.max(e,n):0}else if(arguments[0]instanceof ze){var r=arguments[0];return Et.orientationIndex(this.p0,this.p1,r)}};Vt.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])};Vt.prototype.isVertical=function(){return this.p0.x===this.p1.x};Vt.prototype.equals=function(t){if(!(t instanceof Vt))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)};Vt.prototype.intersection=function(t){var e=new fc;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null};Vt.prototype.project=function(){if(arguments[0]instanceof ze){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new ze(t);var e=this.projectionFactor(t),n=new ze;return n.x=this.p0.x+e*(this.p1.x-this.p0.x),n.y=this.p0.y+e*(this.p1.y-this.p0.y),n}else if(arguments[0]instanceof Vt){var r=arguments[0],i=this.projectionFactor(r.p0),s=this.projectionFactor(r.p1);if(i>=1&&s>=1||i<=0&&s<=0)return null;var c=this.project(r.p0);i<0&&(c=this.p0),i>1&&(c=this.p1);var l=this.project(r.p1);return s<0&&(l=this.p0),s>1&&(l=this.p1),new Vt(c,l)}};Vt.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()};Vt.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)};Vt.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1};Vt.prototype.distancePerpendicular=function(t){return Et.distancePointLinePerpendicular(t,this.p0,this.p1)};Vt.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)};Vt.prototype.midPoint=function(){return Vt.midPoint(this.p0,this.p1)};Vt.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,n=this.p1.y-this.p0.y,r=e*e+n*n;if(r<=0)return nn.NaN;var i=((t.x-this.p0.x)*e+(t.y-this.p0.y)*n)/r;return i};Vt.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var n=new Array(2).fill(null),r=nn.MAX_VALUE,i=null,s=this.closestPoint(t.p0);r=s.distance(t.p0),n[0]=s,n[1]=t.p0;var c=this.closestPoint(t.p1);i=c.distance(t.p1),i0&&e<1)return this.project(t);var n=this.p0.distance(t),r=this.p1.distance(t);return n1||nn.isNaN(e))&&(e=1),e};Vt.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"};Vt.prototype.isHorizontal=function(){return this.p0.y===this.p1.y};Vt.prototype.distance=function(){if(arguments[0]instanceof Vt){var t=arguments[0];return Et.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof ze){var e=arguments[0];return Et.distancePointLine(e,this.p0,this.p1)}};Vt.prototype.pointAlong=function(t){var e=new ze;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e};Vt.prototype.hashCode=function(){var t=nn.doubleToLongBits(this.p0.x);t^=nn.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),n=nn.doubleToLongBits(this.p1.x);n^=nn.doubleToLongBits(this.p1.y)*31;var r=Math.trunc(n)^Math.trunc(n>>32);return e^r};Vt.prototype.interfaces_=function(){return[Es,Is]};Vt.prototype.getClass=function(){return Vt};Vt.midPoint=function(t,e){return new ze((t.x+e.x)/2,(t.y+e.y)/2)};WC.serialVersionUID.get=function(){return 0x2d2172135f411c00};Object.defineProperties(Vt,WC);var um=function(){this.tempEnv1=new Bt,this.tempEnv2=new Bt,this._overlapSeg1=new Vt,this._overlapSeg2=new Vt};um.prototype.overlap=function(){if(arguments.length!==2&&arguments.length===4){var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];t.getLineSegment(e,this._overlapSeg1),n.getLineSegment(r,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}};um.prototype.interfaces_=function(){return[]};um.prototype.getClass=function(){return um};var Bo=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],n=arguments[2],r=arguments[3];this._pts=t,this._start=e,this._end=n,this._context=r};Bo.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]};Bo.prototype.computeSelect=function(t,e,n,r){var i=this._pts[e],s=this._pts[n];if(r.tempEnv1.init(i,s),n-e===1)return r.select(this,e),null;if(!t.intersects(r.tempEnv1))return null;var c=Math.trunc((e+n)/2);e=t.length-1)return t.length-1;for(var r=Xn.quadrant(t[n],t[n+1]),i=e+1;ic.getId()&&(c.computeOverlaps(v,i),r._nOverlaps++),r._segInt.isDone())return null}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},n.SegmentOverlapAction.get=function(){return uS},Object.defineProperties(e,n),e}(cm),uS=function(t){function e(){t.call(this),this._si=null;var n=arguments[0];this._si=n}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.overlap=function(){if(arguments.length===4){var n=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3],c=n.getContext(),l=i.getContext();this._si.processIntersections(c,r,l,s)}else return t.prototype.overlap.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(um),Fn=function t(){if(this._quadrantSegments=t.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=t.CAP_ROUND,this._joinStyle=t.JOIN_ROUND,this._mitreLimit=t.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=t.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var e=arguments[0];this.setQuadrantSegments(e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1];this.setQuadrantSegments(n),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],c=arguments[2],l=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(c),this.setMitreLimit(l)}}},Ol={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};Fn.prototype.getEndCapStyle=function(){return this._endCapStyle};Fn.prototype.isSingleSided=function(){return this._isSingleSided};Fn.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=Fn.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=Fn.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==Fn.JOIN_ROUND&&(this._quadrantSegments=Fn.DEFAULT_QUADRANT_SEGMENTS)};Fn.prototype.getJoinStyle=function(){return this._joinStyle};Fn.prototype.setJoinStyle=function(t){this._joinStyle=t};Fn.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t};Fn.prototype.getSimplifyFactor=function(){return this._simplifyFactor};Fn.prototype.getQuadrantSegments=function(){return this._quadrantSegments};Fn.prototype.setEndCapStyle=function(t){this._endCapStyle=t};Fn.prototype.getMitreLimit=function(){return this._mitreLimit};Fn.prototype.setMitreLimit=function(t){this._mitreLimit=t};Fn.prototype.setSingleSided=function(t){this._isSingleSided=t};Fn.prototype.interfaces_=function(){return[]};Fn.prototype.getClass=function(){return Fn};Fn.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)};Ol.CAP_ROUND.get=function(){return 1};Ol.CAP_FLAT.get=function(){return 2};Ol.CAP_SQUARE.get=function(){return 3};Ol.JOIN_ROUND.get=function(){return 1};Ol.JOIN_MITRE.get=function(){return 2};Ol.JOIN_BEVEL.get=function(){return 3};Ol.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8};Ol.DEFAULT_MITRE_LIMIT.get=function(){return 5};Ol.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01};Object.defineProperties(Fn,Ol);var Or=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=Et.COUNTERCLOCKWISE,this._inputLine=t||null},Tm={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};Or.prototype.isDeletable=function(t,e,n,r){var i=this._inputLine[t],s=this._inputLine[e],c=this._inputLine[n];return!this.isConcave(i,s,c)||!this.isShallow(i,s,c,r)?!1:this.isShallowSampled(i,s,t,n,r)};Or.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,n=this.findNextNonDeletedIndex(e),r=this.findNextNonDeletedIndex(n),i=!1;r=0;i--)n.addPt(t[i])};os.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),n=t.distance(e);return nMath.PI;)t-=Ln.PI_TIMES_2;for(;t<=-Math.PI;)t+=Ln.PI_TIMES_2;return t};Ln.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=n.x-e.x,i=n.y-e.y;return Math.atan2(i,r)}};Ln.isAcute=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l>0};Ln.isObtuse=function(t,e,n){var r=t.x-e.x,i=t.y-e.y,s=n.x-e.x,c=n.y-e.y,l=r*s+i*c;return l<0};Ln.interiorAngle=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Math.abs(i-r)};Ln.normalizePositive=function(t){if(t<0){for(;t<0;)t+=Ln.PI_TIMES_2;t>=Ln.PI_TIMES_2&&(t=0)}else{for(;t>=Ln.PI_TIMES_2;)t-=Ln.PI_TIMES_2;t<0&&(t=0)}return t};Ln.angleBetween=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n);return Ln.diff(r,i)};Ln.diff=function(t,e){var n=null;return tMath.PI&&(n=2*Math.PI-n),n};Ln.toRadians=function(t){return t*Math.PI/180};Ln.getTurn=function(t,e){var n=Math.sin(e-t);return n>0?Ln.COUNTERCLOCKWISE:n<0?Ln.CLOCKWISE:Ln.NONE};Ln.angleBetweenOriented=function(t,e,n){var r=Ln.angle(e,t),i=Ln.angle(e,n),s=i-r;return s<=-Math.PI?s+Ln.PI_TIMES_2:s>Math.PI?s-Ln.PI_TIMES_2:s};dh.PI_TIMES_2.get=function(){return 2*Math.PI};dh.PI_OVER_2.get=function(){return Math.PI/2};dh.PI_OVER_4.get=function(){return Math.PI/4};dh.COUNTERCLOCKWISE.get=function(){return Et.COUNTERCLOCKWISE};dh.CLOCKWISE.get=function(){return Et.CLOCKWISE};dh.NONE.get=function(){return Et.COLLINEAR};Object.defineProperties(Ln,dh);var fr=function t(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new Vt,this._seg1=new Vt,this._offset0=new Vt,this._offset1=new Vt,this._side=0,this._hasNarrowConcaveAngle=!1;var e=arguments[0],n=arguments[1],r=arguments[2];this._precisionModel=e,this._bufParams=n,this._li=new fc,this._filletAngleQuantum=Math.PI/2/n.getQuadrantSegments(),n.getQuadrantSegments()>=8&&n.getJoinStyle()===Fn.JOIN_ROUND&&(this._closingSegLengthFactor=t.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},Lm={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};fr.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var n=Et.computeOrientation(this._s0,this._s1,this._s2),r=n===Et.CLOCKWISE&&this._side===lt.LEFT||n===Et.COUNTERCLOCKWISE&&this._side===lt.RIGHT;n===0?this.addCollinear(e):r?this.addOutsideTurn(n,e):this.addInsideTurn(n,e)};fr.prototype.addLineEndCap=function(t,e){var n=new Vt(t,e),r=new Vt;this.computeOffsetSegment(n,lt.LEFT,this._distance,r);var i=new Vt;this.computeOffsetSegment(n,lt.RIGHT,this._distance,i);var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s);switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:this._segList.addPt(r.p1),this.addFilletArc(e,l+Math.PI/2,l-Math.PI/2,Et.CLOCKWISE,this._distance),this._segList.addPt(i.p1);break;case Fn.CAP_FLAT:this._segList.addPt(r.p1),this._segList.addPt(i.p1);break;case Fn.CAP_SQUARE:var d=new ze;d.x=Math.abs(this._distance)*Math.cos(l),d.y=Math.abs(this._distance)*Math.sin(l);var v=new ze(r.p1.x+d.x,r.p1.y+d.y),S=new ze(i.p1.x+d.x,i.p1.y+d.y);this._segList.addPt(v),this._segList.addPt(S);break}};fr.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t};fr.prototype.addMitreJoin=function(t,e,n,r){var i=!0,s=null;try{s=Bs.intersection(e.p0,e.p1,n.p0,n.p1);var c=r<=0?1:s.distance(t)/Math.abs(r);c>this._bufParams.getMitreLimit()&&(i=!1)}catch(l){if(l instanceof pp)s=new ze(0,0),i=!1;else throw l}finally{}i?this._segList.addPt(s):this.addLimitedMitreJoin(e,n,r,this._bufParams.getMitreLimit())};fr.prototype.addFilletCorner=function(t,e,n,r,i){var s=e.x-t.x,c=e.y-t.y,l=Math.atan2(c,s),d=n.x-t.x,v=n.y-t.y,S=Math.atan2(v,d);r===Et.CLOCKWISE?l<=S&&(l+=2*Math.PI):l>=S&&(l-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,l,S,r,i),this._segList.addPt(n)};fr.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)0){var n=new ze((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(n);var r=new ze((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}};fr.prototype.createCircle=function(t){var e=new ze(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()};fr.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)};fr.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new os,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*fr.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)};fr.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===Fn.JOIN_BEVEL||this._bufParams.getJoinStyle()===Fn.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,Et.CLOCKWISE,this._distance))};fr.prototype.closeRing=function(){this._segList.closeRing()};fr.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle};fr.prototype.interfaces_=function(){return[]};fr.prototype.getClass=function(){return fr};Lm.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001};Lm.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001};Lm.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6};Lm.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80};Object.defineProperties(fr,Lm);var vo=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};vo.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var n=e<0,r=Math.abs(e),i=this.getSegGen(r);t.length<=1?this.computePointCurve(t[0],i):this.computeOffsetCurve(t,n,i);var s=i.getCoordinates();return n&&In.reverse(s),s};vo.prototype.computeSingleSidedBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){n.addSegments(t,!0);var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{n.addSegments(t,!1);var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment(),n.closeRing()};vo.prototype.computeRingBufferCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);e===lt.RIGHT&&(r=-r);var i=Or.simplify(t,r),s=i.length-1;n.initSideSegments(i[s-1],i[0],e);for(var c=1;c<=s;c++){var l=c!==1;n.addNextSegment(i[c],l)}n.closeRing()};vo.prototype.computeLineBufferCurve=function(t,e){var n=this.simplifyTolerance(this._distance),r=Or.simplify(t,n),i=r.length-1;e.initSideSegments(r[0],r[1],lt.LEFT);for(var s=2;s<=i;s++)e.addNextSegment(r[s],!0);e.addLastSegment(),e.addLineEndCap(r[i-1],r[i]);var c=Or.simplify(t,-n),l=c.length-1;e.initSideSegments(c[l],c[l-1],lt.LEFT);for(var d=l-2;d>=0;d--)e.addNextSegment(c[d],!0);e.addLastSegment(),e.addLineEndCap(c[1],c[0]),e.closeRing()};vo.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case Fn.CAP_ROUND:e.createCircle(t);break;case Fn.CAP_SQUARE:e.createSquare(t);break}};vo.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var n=Math.abs(e),r=this.getSegGen(n);if(t.length<=1)this.computePointCurve(t[0],r);else if(this._bufParams.isSingleSided()){var i=e<0;this.computeSingleSidedBufferCurve(t,i,r)}else this.computeLineBufferCurve(t,r);var s=r.getCoordinates();return s};vo.prototype.getBufferParameters=function(){return this._bufParams};vo.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()};vo.prototype.getRingCurve=function(t,e,n){if(this._distance=n,t.length<=2)return this.getLineCurve(t,n);if(n===0)return vo.copyCoordinates(t);var r=this.getSegGen(n);return this.computeRingBufferCurve(t,e,r),r.getCoordinates()};vo.prototype.computeOffsetCurve=function(t,e,n){var r=this.simplifyTolerance(this._distance);if(e){var i=Or.simplify(t,-r),s=i.length-1;n.initSideSegments(i[s],i[s-1],lt.LEFT),n.addFirstSegment();for(var c=s-2;c>=0;c--)n.addNextSegment(i[c],!0)}else{var l=Or.simplify(t,r),d=l.length-1;n.initSideSegments(l[0],l[1],lt.LEFT),n.addFirstSegment();for(var v=2;v<=d;v++)n.addNextSegment(l[v],!0)}n.addLastSegment()};vo.prototype.getSegGen=function(t){return new fr(this._precisionModel,this._bufParams,t)};vo.prototype.interfaces_=function(){return[]};vo.prototype.getClass=function(){return vo};vo.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),n=0;ns.getMaxY()||t.findStabbedSegments(e,i.getDirectedEdges(),n)}return n}else if(arguments.length===3){if(Kt(arguments[2],Vs)&&arguments[0]instanceof ze&&arguments[1]instanceof Qv)for(var c=arguments[0],l=arguments[1],d=arguments[2],v=l.getEdge().getCoordinates(),S=0;St._seg.p1.y&&t._seg.reverse();var E=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(Et._seg.p1.y)&&Et.computeOrientation(t._seg.p0,t._seg.p1,c)!==Et.RIGHT){var C=l.getDepth(lt.LEFT);t._seg.p0.equals(v[S])||(C=l.getDepth(lt.RIGHT));var M=new tc(t._seg,C);d.add(M)}}else if(Kt(arguments[2],Vs)&&arguments[0]instanceof ze&&Kt(arguments[1],Vs))for(var k=arguments[0],R=arguments[1],z=arguments[2],U=R.iterator();U.hasNext();){var F=U.next();F.isForward()&&t.findStabbedSegments(k,F,z)}}};Qc.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var n=qs.min(e);return n._leftDepth};Qc.prototype.interfaces_=function(){return[]};Qc.prototype.getClass=function(){return Qc};ZC.DepthSegment.get=function(){return tc};Object.defineProperties(Qc,ZC);var tc=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new Vt(t),this._leftDepth=e};tc.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var n=this._upwardSeg.orientationIndex(e._upwardSeg);return n!==0||(n=-1*e._upwardSeg.orientationIndex(this._upwardSeg),n!==0)?n:this._upwardSeg.compareTo(e._upwardSeg)};tc.prototype.compareX=function(t,e){var n=t.p0.compareTo(e.p0);return n!==0?n:t.p1.compareTo(e.p1)};tc.prototype.toString=function(){return this._upwardSeg.toString()};tc.prototype.interfaces_=function(){return[Es]};tc.prototype.getClass=function(){return tc};var Vn=function(t,e,n){this.p0=t||null,this.p1=e||null,this.p2=n||null};Vn.prototype.area=function(){return Vn.area(this.p0,this.p1,this.p2)};Vn.prototype.signedArea=function(){return Vn.signedArea(this.p0,this.p1,this.p2)};Vn.prototype.interpolateZ=function(t){if(t===null)throw new yr("Supplied point is null.");return Vn.interpolateZ(t,this.p0,this.p1,this.p2)};Vn.prototype.longestSideLength=function(){return Vn.longestSideLength(this.p0,this.p1,this.p2)};Vn.prototype.isAcute=function(){return Vn.isAcute(this.p0,this.p1,this.p2)};Vn.prototype.circumcentre=function(){return Vn.circumcentre(this.p0,this.p1,this.p2)};Vn.prototype.area3D=function(){return Vn.area3D(this.p0,this.p1,this.p2)};Vn.prototype.centroid=function(){return Vn.centroid(this.p0,this.p1,this.p2)};Vn.prototype.inCentre=function(){return Vn.inCentre(this.p0,this.p1,this.p2)};Vn.prototype.interfaces_=function(){return[]};Vn.prototype.getClass=function(){return Vn};Vn.area=function(t,e,n){return Math.abs(((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2)};Vn.signedArea=function(t,e,n){return((n.x-t.x)*(e.y-t.y)-(e.x-t.x)*(n.y-t.y))/2};Vn.det=function(t,e,n,r){return t*r-e*n};Vn.interpolateZ=function(t,e,n,r){var i=e.x,s=e.y,c=n.x-i,l=r.x-i,d=n.y-s,v=r.y-s,S=c*v-l*d,E=t.x-i,C=t.y-s,M=(v*E-l*C)/S,k=(-d*E+c*C)/S,R=e.z+M*(n.z-e.z)+k*(r.z-e.z);return R};Vn.longestSideLength=function(t,e,n){var r=t.distance(e),i=e.distance(n),s=n.distance(t),c=r;return i>c&&(c=i),s>c&&(c=s),c};Vn.isAcute=function(t,e,n){return!(!Ln.isAcute(t,e,n)||!Ln.isAcute(e,n,t)||!Ln.isAcute(n,t,e))};Vn.circumcentre=function(t,e,n){var r=n.x,i=n.y,s=t.x-r,c=t.y-i,l=e.x-r,d=e.y-i,v=2*Vn.det(s,c,l,d),S=Vn.det(c,s*s+c*c,d,l*l+d*d),E=Vn.det(s,s*s+c*c,l,l*l+d*d),C=r-S/v,M=i+E/v;return new ze(C,M)};Vn.perpendicularBisector=function(t,e){var n=e.x-t.x,r=e.y-t.y,i=new Bs(t.x+n/2,t.y+r/2,1),s=new Bs(t.x-r+n/2,t.y+n+r/2,1);return new Bs(i,s)};Vn.angleBisector=function(t,e,n){var r=e.distance(t),i=e.distance(n),s=r/(r+i),c=n.x-t.x,l=n.y-t.y,d=new ze(t.x+s*c,t.y+s*l);return d};Vn.area3D=function(t,e,n){var r=e.x-t.x,i=e.y-t.y,s=e.z-t.z,c=n.x-t.x,l=n.y-t.y,d=n.z-t.z,v=i*d-s*l,S=s*c-r*d,E=r*l-i*c,C=v*v+S*S+E*E,M=Math.sqrt(C)/2;return M};Vn.centroid=function(t,e,n){var r=(t.x+e.x+n.x)/3,i=(t.y+e.y+n.y)/3;return new ze(r,i)};Vn.inCentre=function(t,e,n){var r=e.distance(n),i=t.distance(n),s=t.distance(e),c=r+i+s,l=(r*t.x+i*e.x+s*n.x)/c,d=(r*t.y+i*e.y+s*n.y)/c;return new ze(l,d)};var Ss=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new yt;var t=arguments[0],e=arguments[1],n=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=n};Ss.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),n=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(n,Fe.EXTERIOR,Fe.INTERIOR)};Ss.prototype.addPolygon=function(t){var e=this,n=this._distance,r=lt.LEFT;this._distance<0&&(n=-this._distance,r=lt.RIGHT);var i=t.getExteriorRing(),s=In.removeRepeatedPoints(i.getCoordinates());if(this._distance<0&&this.isErodedCompletely(i,this._distance)||this._distance<=0&&s.length<3)return null;this.addPolygonRing(s,n,r,Fe.EXTERIOR,Fe.INTERIOR);for(var c=0;c0&&e.isErodedCompletely(l,-e._distance)||e.addPolygonRing(d,n,lt.opposite(r),Fe.INTERIOR,Fe.EXTERIOR)}};Ss.prototype.isTriangleErodedCompletely=function(t,e){var n=new Vn(t[0],t[1],t[2]),r=n.inCentre(),i=Et.distancePointLine(r,n.p0,n.p1);return i=Ha.MINIMUM_VALID_SIZE&&Et.isCCW(t)&&(s=i,c=r,n=lt.opposite(n));var l=this._curveBuilder.getRingCurve(t,n,e);this.addCurve(l,s,c)};Ss.prototype.add=function(t){if(t.isEmpty())return null;t instanceof li?this.addPolygon(t):t instanceof Nr?this.addLineString(t):t instanceof zo?this.addPoint(t):t instanceof Gf?this.addCollection(t):t instanceof Qu?this.addCollection(t):t instanceof Ga?this.addCollection(t):t instanceof io&&this.addCollection(t)};Ss.prototype.isErodedCompletely=function(t,e){var n=t.getCoordinates();if(n.length<4)return e<0;if(n.length===4)return this.isTriangleErodedCompletely(n,e);var r=t.getEnvelopeInternal(),i=Math.min(r.getHeight(),r.getWidth());return e<0&&2*Math.abs(e)>i};Ss.prototype.addCollection=function(t){for(var e=this,n=0;n=this._max)throw new mp;var t=this._parent.getGeometryN(this._index++);return t instanceof io?(this._subcollectionIterator=new qa(t),this._subcollectionIterator.next()):t};qa.prototype.remove=function(){throw new Error(this.getClass().getName())};qa.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)};qa.prototype.interfaces_=function(){return[dp]};qa.prototype.getClass=function(){return qa};qa.isAtomic=function(t){return!(t instanceof io)};var ts=function(){this._geom=null;var t=arguments[0];this._geom=t};ts.prototype.locate=function(t){return ts.locate(t,this._geom)};ts.prototype.interfaces_=function(){return[Zf]};ts.prototype.getClass=function(){return ts};ts.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?Et.isPointInRing(t,e.getCoordinates()):!1};ts.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var n=e.getExteriorRing();if(!ts.isPointInRing(t,n))return!1;for(var r=0;r=0;s--){var c=n._edgeList.get(s),l=c.getSym();i===null&&(i=l),r!==null&&l.setNext(r),r=c}i.setNext(r)},e.prototype.computeDepths=function(){var n=this;if(arguments.length===1){var r=arguments[0],i=this.findIndex(r),s=r.getDepth(lt.LEFT),c=r.getDepth(lt.RIGHT),l=this.computeDepths(i+1,this._edgeList.size(),s),d=this.computeDepths(0,i,l);if(d!==c)throw new Pl("depth mismatch at "+r.getCoordinate())}else if(arguments.length===3){for(var v=arguments[0],S=arguments[1],E=arguments[2],C=E,M=v;M=0;l--){var d=r._resultAreaEdgeList.get(l),v=d.getSym();switch(i===null&&d.getEdgeRing()===n&&(i=d),c){case r._SCANNING_FOR_INCOMING:if(v.getEdgeRing()!==n)continue;s=v,c=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(d.getEdgeRing()!==n)continue;s.setNextMin(d),c=r._SCANNING_FOR_INCOMING;break}}c===this._LINKING_TO_OUTGOING&&(hn.isTrue(i!==null,"found null for first outgoing dirEdge"),hn.isTrue(i.getEdgeRing()===n,"unable to link last incoming dirEdge"),s.setNextMin(i))},e.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var n=0,r=this.iterator();r.hasNext();){var i=r.next();i.isInResult()&&n++}return n}else if(arguments.length===1){for(var s=arguments[0],c=0,l=this.iterator();l.hasNext();){var d=l.next();d.getEdgeRing()===s&&c++}return c}},e.prototype.getLabel=function(){return this._label},e.prototype.findCoveredLineEdges=function(){for(var n=Fe.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getSym();if(!i.isLineEdge()){if(i.isInResult()){n=Fe.INTERIOR;break}if(s.isInResult()){n=Fe.EXTERIOR;break}}}if(n===Fe.NONE)return null;for(var c=n,l=this.iterator();l.hasNext();){var d=l.next(),v=d.getSym();d.isLineEdge()?d.getEdge().setCovered(c===Fe.INTERIOR):(d.isInResult()&&(c=Fe.EXTERIOR),v.isInResult()&&(c=Fe.INTERIOR))}},e.prototype.computeLabelling=function(n){var r=this;t.prototype.computeLabelling.call(this,n),this._label=new Hn(Fe.NONE);for(var i=this.iterator();i.hasNext();)for(var s=i.next(),c=s.getEdge(),l=c.getLabel(),d=0;d<2;d++){var v=l.getLocation(d);(v===Fe.INTERIOR||v===Fe.BOUNDARY)&&r._label.setLocation(d,Fe.INTERIOR)}},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Hi),XC=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createNode=function(n){return new wy(n,new $O)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(qf),pu=function t(){this._pts=null,this._orientation=null;var e=arguments[0];this._pts=e,this._orientation=t.orientation(e)};pu.prototype.compareTo=function(t){var e=t,n=pu.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return n};pu.prototype.interfaces_=function(){return[Es]};pu.prototype.getClass=function(){return pu};pu.orientation=function(t){return In.increasingDirection(t)===1};pu.compareOriented=function(t,e,n,r){for(var i=e?1:-1,s=r?1:-1,c=e?t.length:-1,l=r?n.length:-1,d=e?0:t.length-1,v=r?0:n.length-1;;){var S=t[d].compareTo(n[v]);if(S!==0)return S;d+=i,v+=s;var E=d===c,C=v===l;if(E&&!C)return-1;if(!E&&C)return 1;if(E&&C)return 0}};var Ws=function(){this._edges=new yt,this._ocaMap=new qi};Ws.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var n=0;n0&&t.print(","),t.print("(");for(var i=r.getCoordinates(),s=0;s0&&t.print(","),t.print(i[s].x+" "+i[s].y);t.println(")")}t.print(") ")};Ws.prototype.addAll=function(t){for(var e=this,n=t.iterator();n.hasNext();)e.add(n.next())};Ws.prototype.findEdgeIndex=function(t){for(var e=this,n=0;n0||!e.coord.equals2D(i);s||r--;var c=new Array(r).fill(null),l=0;c[l++]=new ze(t.coord);for(var d=t.segmentIndex+1;d<=e.segmentIndex;d++)c[l++]=n.edge.pts[d];return s&&(c[l]=e.coord),new F_(c,new Hn(this.edge._label))};Ya.prototype.add=function(t,e,n){var r=new Sa(t,e,n),i=this._nodeMap.get(r);return i!==null?i:(this._nodeMap.put(r,r),r)};Ya.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var n=e.next();if(n.coord.equals(t))return!0}return!1};Ya.prototype.interfaces_=function(){return[]};Ya.prototype.getClass=function(){return Ya};var rc=function(){};rc.prototype.getChainStartIndices=function(t){var e=this,n=0,r=new yt;r.add(new _a(n));do{var i=e.findChainEnd(t,n);r.add(new _a(i)),n=i}while(nn?e:n};Al.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,n=this.pts[this.startIndex[t+1]].x;return en&&(i=1),t._depth[e][r]=i}}};Di.prototype.getDelta=function(t){return this._depth[t][lt.RIGHT]-this._depth[t][lt.LEFT]};Di.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?Fe.EXTERIOR:Fe.INTERIOR};Di.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]};Di.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],n=0;n<2;n++)for(var r=1;r<3;r++){var i=e.getLocation(n,r);(i===Fe.EXTERIOR||i===Fe.INTERIOR)&&(t.isNull(n,r)?t._depth[n][r]=Di.depthAtLocation(i):t._depth[n][r]+=Di.depthAtLocation(i))}else if(arguments.length===3){var s=arguments[0],c=arguments[1],l=arguments[2];l===Fe.INTERIOR&&this._depth[s][c]++}};Di.prototype.interfaces_=function(){return[]};Di.prototype.getClass=function(){return Di};Di.depthAtLocation=function(t){return t===Fe.EXTERIOR?0:t===Fe.INTERIOR?1:Di.NULL_VALUE};YC.NULL_VALUE.get=function(){return-1};Object.defineProperties(Di,YC);var F_=function(t){function e(){if(t.call(this),this.pts=null,this._env=null,this.eiList=new Ya(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Di,this._depthDelta=0,arguments.length===1){var n=arguments[0];e.call(this,n,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDepth=function(){return this._depth},e.prototype.getCollapsedEdge=function(){var n=new Array(2).fill(null);n[0]=this.pts[0],n[1]=this.pts[1];var r=new e(n,Hn.toLineLabel(this._label));return r},e.prototype.isIsolated=function(){return this._isIsolated},e.prototype.getCoordinates=function(){return this.pts},e.prototype.setIsolated=function(n){this._isIsolated=n},e.prototype.setName=function(n){this._name=n},e.prototype.equals=function(n){var r=this;if(!(n instanceof e))return!1;var i=n;if(this.pts.length!==i.pts.length)return!1;for(var s=!0,c=!0,l=this.pts.length,d=0;d0?this.pts[0]:null;if(arguments.length===1){var n=arguments[0];return this.pts[n]}},e.prototype.print=function(n){var r=this;n.print("edge "+this._name+": "),n.print("LINESTRING (");for(var i=0;i0&&n.print(","),n.print(r.pts[i].x+" "+r.pts[i].y);n.print(") "+this._label+" "+this._depthDelta)},e.prototype.computeIM=function(n){e.updateIM(this._label,n)},e.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},e.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},e.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},e.prototype.getDepthDelta=function(){return this._depthDelta},e.prototype.getNumPoints=function(){return this.pts.length},e.prototype.printReverse=function(n){var r=this;n.print("edge "+this._name+": ");for(var i=this.pts.length-1;i>=0;i--)n.print(r.pts[i]+" ");n.println("")},e.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new Al(this)),this._mce},e.prototype.getEnvelope=function(){var n=this;if(this._env===null){this._env=new Bt;for(var r=0;r0&&r.append(","),r.append(n.pts[i].x+" "+n.pts[i].y);return r.append(") "+this._label+" "+this._depthDelta),r.toString()},e.prototype.isPointwiseEqual=function(n){var r=this;if(this.pts.length!==n.pts.length)return!1;for(var i=0;ir||this._maxys;if(c)return!1;var l=this.intersectsToleranceSquare(t,e);return hn.isTrue(!(c&&l),"Found bad envelope test"),l};bo.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new ze(this._maxx,this._maxy),this._corner[1]=new ze(this._minx,this._maxy),this._corner[2]=new ze(this._minx,this._miny),this._corner[3]=new ze(this._maxx,this._miny)};bo.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))};bo.prototype.scale=function(t){return Math.round(t*this._scaleFactor)};bo.prototype.getCoordinate=function(){return this._originalPt};bo.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)};bo.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=bo.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new Bt(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv};bo.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))};bo.prototype.intersectsToleranceSquare=function(t,e){var n=!1,r=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(n=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||n&&r||t.equals(this._pt)||e.equals(this._pt))};bo.prototype.addSnappedNode=function(t,e){var n=t.getCoordinate(e),r=t.getCoordinate(e+1);return this.intersects(n,r)?(t.addIntersection(this.getCoordinate(),e),!0):!1};bo.prototype.interfaces_=function(){return[]};bo.prototype.getClass=function(){return bo};KC.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75};Object.defineProperties(bo,KC);var hm=function(){this.tempEnv1=new Bt,this.selectedSegment=new Vt};hm.prototype.select=function(){if(arguments.length!==1&&arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}};hm.prototype.interfaces_=function(){return[]};hm.prototype.getClass=function(){return hm};var Xf=function(){this._index=null;var t=arguments[0];this._index=t},JC={HotPixelSnapAction:{configurable:!0}};Xf.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],n=arguments[1],r=arguments[2],i=e.getSafeEnvelope(),s=new QC(e,n,r);return this._index.query(i,{interfaces_:function(){return[hu]},visitItem:function(c){var l=c;l.select(i,s)}}),s.isNodeAdded()}};Xf.prototype.interfaces_=function(){return[]};Xf.prototype.getClass=function(){return Xf};JC.HotPixelSnapAction.get=function(){return QC};Object.defineProperties(Xf,JC);var QC=function(t){function e(){t.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var n=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=n,this._parentEdge=r,this._hotPixelVertexIndex=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.isNodeAdded=function(){return this._isNodeAdded},e.prototype.select=function(){if(arguments.length===2){var n=arguments[0],r=arguments[1],i=n.getContext();if(this._parentEdge!==null&&i===this._parentEdge&&r===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(i,r)}else return t.prototype.select.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(hm),eh=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new yt};eh.prototype.processIntersections=function(t,e,n,r){var i=this;if(t===n&&e===r)return null;var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];if(this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var v=0;v=0;e--){try{t.bufferReducedPrecision(e)}catch(s){if(s instanceof Pl)t._saveException=s;else throw s}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var n=arguments[0],r=ki.precisionScaleFactor(this._argGeom,this._distance,n),i=new Bn(r);this.bufferFixedPrecision(i)}};ki.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Bn.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()};ki.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)};ki.prototype.bufferOriginalPrecision=function(){try{var t=new no(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof Tl)this._saveException=e;else throw e}finally{}};ki.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry};ki.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)};ki.prototype.interfaces_=function(){return[]};ki.prototype.getClass=function(){return ki};ki.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new ki(t),r=n.getResultGeometry(e);return r}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var i=arguments[0],s=arguments[1],c=arguments[2],l=new ki(i);l.setQuadrantSegments(c);var d=l.getResultGeometry(s);return d}else if(arguments[2]instanceof Fn&&arguments[0]instanceof $t&&typeof arguments[1]=="number"){var v=arguments[0],S=arguments[1],E=arguments[2],C=new ki(v,E),M=C.getResultGeometry(S);return M}}else if(arguments.length===4){var k=arguments[0],R=arguments[1],z=arguments[2],U=arguments[3],F=new ki(k);F.setQuadrantSegments(z),F.setEndCapStyle(U);var G=F.getResultGeometry(R);return G}};ki.precisionScaleFactor=function(t,e,n){var r=t.getEnvelopeInternal(),i=rs.max(Math.abs(r.getMaxX()),Math.abs(r.getMaxY()),Math.abs(r.getMinX()),Math.abs(r.getMinY())),s=e>0?e:0,c=i+2*s,l=Math.trunc(Math.log(c)/Math.log(10)+1),d=n-l,v=Math.pow(10,d);return v};gp.CAP_ROUND.get=function(){return Fn.CAP_ROUND};gp.CAP_BUTT.get=function(){return Fn.CAP_FLAT};gp.CAP_FLAT.get=function(){return Fn.CAP_FLAT};gp.CAP_SQUARE.get=function(){return Fn.CAP_SQUARE};gp.MAX_PRECISION_DIGITS.get=function(){return 12};Object.defineProperties(ki,gp);var Qi=function(){this._pt=[new ze,new ze],this._distance=nn.NaN,this._isNull=!0};Qi.prototype.getCoordinates=function(){return this._pt};Qi.prototype.getCoordinate=function(t){return this._pt[t]};Qi.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],n=arguments[1];if(this._isNull)return this.initialize(e,n),null;var r=e.distance(n);rthis._distance&&this.initialize(e,n,r)}};Qi.prototype.interfaces_=function(){return[]};Qi.prototype.getClass=function(){return Qi};var Va=function(){};Va.prototype.interfaces_=function(){return[]};Va.prototype.getClass=function(){return Va};Va.computeDistance=function(){if(arguments[2]instanceof Qi&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=t.getCoordinates(),i=new Vt,s=0;s0||this._isIn?Fe.INTERIOR:Fe.EXTERIOR)};Hs.prototype.interfaces_=function(){return[]};Hs.prototype.getClass=function(){return Hs};var eo=function t(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var e=arguments[0],n=arguments[1];t.call(this,e,t.INSIDE_AREA,n)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},eT={INSIDE_AREA:{configurable:!0}};eo.prototype.isInsideArea=function(){return this._segIndex===eo.INSIDE_AREA};eo.prototype.getCoordinate=function(){return this._pt};eo.prototype.getGeometryComponent=function(){return this._component};eo.prototype.getSegmentIndex=function(){return this._segIndex};eo.prototype.interfaces_=function(){return[]};eo.prototype.getClass=function(){return eo};eT.INSIDE_AREA.get=function(){return-1};Object.defineProperties(eo,eT);var au=function(t){this._pts=t||null};au.prototype.filter=function(t){t instanceof zo&&this._pts.add(t)};au.prototype.interfaces_=function(){return[va]};au.prototype.getClass=function(){return au};au.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof zo?qs.singletonList(t):au.getPoints(t,new yt)}else if(arguments.length===2){var e=arguments[0],n=arguments[1];return e instanceof zo?n.add(e):e instanceof io&&e.apply(new au(n)),n}};var nh=function(){this._locations=null;var t=arguments[0];this._locations=t};nh.prototype.filter=function(t){(t instanceof zo||t instanceof Nr||t instanceof li)&&this._locations.add(new eo(t,0,t.getCoordinate()))};nh.prototype.interfaces_=function(){return[va]};nh.prototype.getClass=function(){return nh};nh.getLocations=function(t){var e=new yt;return t.apply(new nh(e)),e};var Ni=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new Hs,this._minDistanceLocation=null,this._minDistance=nn.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var n=arguments[0],r=arguments[1],i=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=n,this._geom[1]=r,this._terminateDistance=i}};Ni.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var n=arguments[0],r=arguments[1],i=1-n,s=Sl.getPolygons(this._geom[n]);if(s.size()>0){var c=nh.getLocations(this._geom[i]);if(this.computeContainmentDistance(c,s,r),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[i]=r[0],this._minDistanceLocation[n]=r[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&Kt(arguments[0],Vs)&&Kt(arguments[1],Vs)){for(var l=arguments[0],d=arguments[1],v=arguments[2],S=0;Sthis._minDistance)return null;for(var i=e.getCoordinates(),s=n.getCoordinate(),c=0;cthis._minDistance)return null;for(var M=S.getCoordinates(),k=E.getCoordinates(),R=0;Rthis._distance&&this.initialize(e,n,r)}};ji.prototype.interfaces_=function(){return[]};ji.prototype.getClass=function(){return ji};var ua=function(){};ua.prototype.interfaces_=function(){return[]};ua.prototype.getClass=function(){return ua};ua.computeDistance=function(){if(arguments[2]instanceof ji&&arguments[0]instanceof Nr&&arguments[1]instanceof ze)for(var t=arguments[0],e=arguments[1],n=arguments[2],r=new Vt,i=t.getCoordinates(),s=0;s1||t<=0)throw new yr("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t};vs.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)};vs.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()};vs.prototype.computeOrientedDistance=function(t,e,n){var r=new rh(e);if(t.apply(r),n.setMaximum(r.getMaxPointDistance()),this._densifyFrac>0){var i=new gu(e,this._densifyFrac);t.apply(i),n.setMaximum(i.getMaxPointDistance())}};vs.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()};vs.prototype.interfaces_=function(){return[]};vs.prototype.getClass=function(){return vs};vs.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],n=new vs(t,e);return n.distance()}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2],c=new vs(r,i);return c.setDensifyFraction(s),c.distance()}};ib.MaxPointDistanceFilter.get=function(){return rh};ib.MaxDensifiedByFractionDistanceFilter.get=function(){return gu};Object.defineProperties(vs,ib);var rh=function(){this._maxPtDist=new ji,this._minPtDist=new ji,this._euclideanDist=new ua,this._geom=null;var t=arguments[0];this._geom=t};rh.prototype.filter=function(t){this._minPtDist.initialize(),ua.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)};rh.prototype.getMaxPointDistance=function(){return this._maxPtDist};rh.prototype.interfaces_=function(){return[Wa]};rh.prototype.getClass=function(){return rh};var gu=function(){this._maxPtDist=new ji,this._minPtDist=new ji,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};gu.prototype.filter=function(t,e){var n=this;if(e===0)return null;for(var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=(i.x-r.x)/this._numSubSegs,c=(i.y-r.y)/this._numSubSegs,l=0;ln){this._isValid=!1;var i=r.getCoordinates();this._errorLocation=i[1],this._errorIndicator=t.getFactory().createLineString(i),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+Us.toLineString(i[0],i[1])+")"}};No.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=No.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),No.VERBOSE&&Ri.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)};No.prototype.checkNegativeValid=function(){if(!(this._input instanceof li||this._input instanceof Ga||this._input instanceof io))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)};No.prototype.getErrorIndicator=function(){return this._errorIndicator};No.prototype.checkMinimumDistance=function(t,e,n){var r=new Ni(t,e,n);if(this._minDistanceFound=r.distance(),this._minDistanceFound0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")};Oi.prototype.report=function(t){if(!Oi.VERBOSE)return null;Ri.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))};Oi.prototype.getErrorMessage=function(){return this._errorMsg};Oi.prototype.interfaces_=function(){return[]};Oi.prototype.getClass=function(){return Oi};Oi.isValidMsg=function(t,e,n){var r=new Oi(t,e,n);return r.isValid()?null:r.getErrorMessage()};Oi.isValid=function(t,e,n){var r=new Oi(t,e,n);return!!r.isValid()};sb.VERBOSE.get=function(){return!1};sb.MAX_ENV_DIFF_FRAC.get=function(){return .012};Object.defineProperties(Oi,sb);var Ia=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Ia.prototype.getCoordinates=function(){return this._pts};Ia.prototype.size=function(){return this._pts.length};Ia.prototype.getCoordinate=function(t){return this._pts[t]};Ia.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])};Ia.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:Jc.octant(this.getCoordinate(t),this.getCoordinate(t+1))};Ia.prototype.setData=function(t){this._data=t};Ia.prototype.getData=function(){return this._data};Ia.prototype.toString=function(){return Us.toLineString(new jr(this._pts))};Ia.prototype.interfaces_=function(){return[Xa]};Ia.prototype.getClass=function(){return Ia};var Ti=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new yt,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Ti.prototype.getInteriorIntersection=function(){return this._interiorIntersection};Ti.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t};Ti.prototype.getIntersectionSegments=function(){return this._intSegments};Ti.prototype.count=function(){return this._intersectionCount};Ti.prototype.getIntersections=function(){return this._intersections};Ti.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Ti.prototype.setKeepIntersections=function(t){this._keepIntersections=t};Ti.prototype.processIntersections=function(t,e,n,r){if(!this._findAllIntersections&&this.hasIntersection()||t===n&&e===r)return null;if(this._isCheckEndSegmentsOnly){var i=this.isEndSegment(t,e)||this.isEndSegment(n,r);if(!i)return null}var s=t.getCoordinates()[e],c=t.getCoordinates()[e+1],l=n.getCoordinates()[r],d=n.getCoordinates()[r+1];this._li.computeIntersection(s,c,l,d),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=s,this._intSegments[1]=c,this._intSegments[2]=l,this._intSegments[3]=d,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)};Ti.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2};Ti.prototype.hasIntersection=function(){return this._interiorIntersection!==null};Ti.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null};Ti.prototype.interfaces_=function(){return[nc]};Ti.prototype.getClass=function(){return Ti};Ti.createAllIntersectionsFinder=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e};Ti.createAnyIntersectionFinder=function(t){return new Ti(t)};Ti.createIntersectionCounter=function(t){var e=new Ti(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var Zs=function(){this._li=new fc,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};Zs.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()};Zs.prototype.getIntersections=function(){return this._segInt.getIntersections()};Zs.prototype.isValid=function(){return this.execute(),this._isValid};Zs.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t};Zs.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Ti(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new nb;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null};Zs.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Pl(this.getErrorMessage(),this._segInt.getInteriorIntersection())};Zs.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+Us.toLineString(t[0],t[1])+" and "+Us.toLineString(t[2],t[3])};Zs.prototype.interfaces_=function(){return[]};Zs.prototype.getClass=function(){return Zs};Zs.computeIntersections=function(t){var e=new Zs(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var oc=function t(){this._nv=null;var e=arguments[0];this._nv=new Zs(t.toSegmentStrings(e))};oc.prototype.checkValid=function(){this._nv.checkValid()};oc.prototype.interfaces_=function(){return[]};oc.prototype.getClass=function(){return oc};oc.toSegmentStrings=function(t){for(var e=new yt,n=t.iterator();n.hasNext();){var r=n.next();e.add(new Ia(r.getCoordinates(),r))}return e};oc.checkValid=function(t){var e=new oc(t);e.checkValid()};var ih=function(t){this._mapOp=t};ih.prototype.map=function(t){for(var e=this,n=new yt,r=0;r0&&r<4&&!this._preserveType?this._factory.createLineString(n):this._factory.createLinearRing(n)};xo.prototype.interfaces_=function(){return[]};xo.prototype.getClass=function(){return xo};var Ka=function t(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new Vt,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof Nr&&typeof arguments[1]=="number"){var e=arguments[0],n=arguments[1];t.call(this,e.getCoordinates(),n)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=t.isClosed(r),this._snapTolerance=i}};Ka.prototype.snapVertices=function(t,e){for(var n=this,r=this._isClosed?t.size()-1:t.size(),i=0;i=0&&t.add(c+1,new ze(s),!1)}};Ka.prototype.findSegmentIndexToSnap=function(t,e){for(var n=this,r=nn.MAX_VALUE,i=-1,s=0;se&&(e=r)}return e}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return Math.min(Gr.computeOverlaySnapTolerance(i),Gr.computeOverlaySnapTolerance(s))}};Gr.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),n=Math.min(e.getHeight(),e.getWidth()),r=n*Gr.SNAP_PRECISION_FACTOR;return r};Gr.snapToSelf=function(t,e,n){var r=new Gr(t);return r.snapToSelf(e,n)};tT.SNAP_PRECISION_FACTOR.get=function(){return 1e-9};Object.defineProperties(Gr,tT);var nT=function(t){function e(n,r,i){t.call(this),this._snapTolerance=n||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.snapLine=function(n,r){var i=new Ka(n,this._snapTolerance);return i.setAllowSnappingToSourceVertices(this._isSelfSnap),i.snapTo(r)},e.prototype.transformCoordinates=function(n,r){var i=n.toCoordinateArray(),s=this.snapLine(i,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(s)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(xo),Ji=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};Ji.prototype.getCommon=function(){return nn.longBitsToDouble(this._commonBits)};Ji.prototype.add=function(t){var e=nn.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=Ji.signExpBits(this._commonBits),this._isFirst=!1,null;var n=Ji.signExpBits(e);if(n!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=Ji.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=Ji.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))};Ji.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=nn.longBitsToDouble(t),n=nn.toBinaryString(t),r="0000000000000000000000000000000000000000000000000000000000000000"+n,i=r.substring(r.length-64),s=i.substring(0,1)+" "+i.substring(1,12)+"(exp) "+i.substring(12)+" [ "+e+" ]";return s}};Ji.prototype.interfaces_=function(){return[]};Ji.prototype.getClass=function(){return Ji};Ji.getBit=function(t,e){var n=1<>52};Ji.zeroLowerBits=function(t,e){var n=(1<=0;r--){if(Ji.getBit(t,r)!==Ji.getBit(e,r))return n;n++}return 52};var _u=function(){this._commonCoord=null,this._ccFilter=new sh},ab={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};_u.prototype.addCommonBits=function(t){var e=new yu(this._commonCoord);t.apply(e),t.geometryChanged()};_u.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new ze(this._commonCoord);e.x=-e.x,e.y=-e.y;var n=new yu(e);return t.apply(n),t.geometryChanged(),t};_u.prototype.getCommonCoordinate=function(){return this._commonCoord};_u.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()};_u.prototype.interfaces_=function(){return[]};_u.prototype.getClass=function(){return _u};ab.CommonCoordinateFilter.get=function(){return sh};ab.Translater.get=function(){return yu};Object.defineProperties(_u,ab);var sh=function(){this._commonBitsX=new Ji,this._commonBitsY=new Ji};sh.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)};sh.prototype.getCommonCoordinate=function(){return new ze(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())};sh.prototype.interfaces_=function(){return[Wa]};sh.prototype.getClass=function(){return sh};var yu=function(){this.trans=null;var t=arguments[0];this.trans=t};yu.prototype.filter=function(t,e){var n=t.getOrdinate(e,0)+this.trans.x,r=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,n),t.setOrdinate(e,1,r)};yu.prototype.isDone=function(){return!1};yu.prototype.isGeometryChanged=function(){return!0};yu.prototype.interfaces_=function(){return[js]};yu.prototype.getClass=function(){return yu};var Li=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Li.prototype.selfSnap=function(t){var e=new Gr(t),n=e.snapTo(t,this._snapTolerance);return n};Li.prototype.removeCommonBits=function(t){this._cbr=new _u,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e};Li.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t};Li.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),n=an.overlayOp(e[0],e[1],t);return this.prepareResult(n)};Li.prototype.checkValid=function(t){t.isValid()||Ri.out.println("Snapped geometry is invalid")};Li.prototype.computeSnapTolerance=function(){this._snapTolerance=Gr.computeOverlaySnapTolerance(this._geom[0],this._geom[1])};Li.prototype.snap=function(t){var e=this.removeCommonBits(t),n=Gr.snap(e[0],e[1],this._snapTolerance);return n};Li.prototype.interfaces_=function(){return[]};Li.prototype.getClass=function(){return Li};Li.overlayOp=function(t,e,n){var r=new Li(t,e);return r.getResultGeometry(n)};Li.union=function(t,e){return Li.overlayOp(t,e,an.UNION)};Li.intersection=function(t,e){return Li.overlayOp(t,e,an.INTERSECTION)};Li.symDifference=function(t,e){return Li.overlayOp(t,e,an.SYMDIFFERENCE)};Li.difference=function(t,e){return Li.overlayOp(t,e,an.DIFFERENCE)};var ao=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};ao.prototype.getResultGeometry=function(t){var e=null,n=!1,r=null;try{e=an.overlayOp(this._geom[0],this._geom[1],t);var i=!0;i&&(n=!0)}catch(s){if(s instanceof Tl)r=s;else throw s}finally{}if(!n)try{e=Li.overlayOp(this._geom[0],this._geom[1],t)}catch(s){throw s instanceof Tl?r:s}finally{}return e};ao.prototype.interfaces_=function(){return[]};ao.prototype.getClass=function(){return ao};ao.overlayOp=function(t,e,n){var r=new ao(t,e);return r.getResultGeometry(n)};ao.union=function(t,e){return ao.overlayOp(t,e,an.UNION)};ao.intersection=function(t,e){return ao.overlayOp(t,e,an.INTERSECTION)};ao.symDifference=function(t,e){return ao.overlayOp(t,e,an.SYMDIFFERENCE)};ao.difference=function(t,e){return ao.overlayOp(t,e,an.DIFFERENCE)};var fm=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};fm.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)};fm.prototype.interfaces_=function(){return[]};fm.prototype.getClass=function(){return fm};var Vo=function t(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var e=arguments[0],n=arguments[1];this._eventType=t.DELETE,this._xValue=e,this._insertEvent=n}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=t.INSERT,this._label=r,this._xValue=i,this._obj=s}},lb={INSERT:{configurable:!0},DELETE:{configurable:!0}};Vo.prototype.isDelete=function(){return this._eventType===Vo.DELETE};Vo.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t};Vo.prototype.getObject=function(){return this._obj};Vo.prototype.compareTo=function(t){var e=t;return this._xValuee._xValue?1:this._eventTypee._eventType?1:0};Vo.prototype.getInsertEvent=function(){return this._insertEvent};Vo.prototype.isInsert=function(){return this._eventType===Vo.INSERT};Vo.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label};Vo.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex};Vo.prototype.interfaces_=function(){return[Es]};Vo.prototype.getClass=function(){return Vo};lb.INSERT.get=function(){return 1};lb.DELETE.get=function(){return 2};Object.defineProperties(Vo,lb);var B_=function(){};B_.prototype.interfaces_=function(){return[]};B_.prototype.getClass=function(){return B_};var zi=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],n=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=n};zi.prototype.isTrivialIntersection=function(t,e,n,r){if(t===n&&this._li.getIntersectionNum()===1){if(zi.isAdjacentSegments(e,r))return!0;if(t.isClosed()){var i=t.getNumPoints()-1;if(e===0&&r===i||r===0&&e===i)return!0}}return!1};zi.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint};zi.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t};zi.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior};zi.prototype.isBoundaryPointInternal=function(t,e){for(var n=e.iterator();n.hasNext();){var r=n.next(),i=r.getCoordinate();if(t.isIntersection(i))return!0}return!1};zi.prototype.hasProperIntersection=function(){return this._hasProper};zi.prototype.hasIntersection=function(){return this._hasIntersection};zi.prototype.isDone=function(){return this._isDone};zi.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))};zi.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e};zi.prototype.addIntersections=function(t,e,n,r){if(t===n&&e===r)return null;this.numTests++;var i=t.getCoordinates()[e],s=t.getCoordinates()[e+1],c=n.getCoordinates()[r],l=n.getCoordinates()[r+1];this._li.computeIntersection(i,s,c,l),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),n.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,n,r)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),n.addIntersections(this._li,r,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))};zi.prototype.interfaces_=function(){return[]};zi.prototype.getClass=function(){return zi};zi.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var KO=function(t){function e(){t.call(this),this.events=new yt,this.nOverlaps=null}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.prepareEvents=function(){var n=this;qs.sort(this.events);for(var r=0;re||this._maxs?1:0};pm.prototype.interfaces_=function(){return[Of]};pm.prototype.getClass=function(){return pm};var JO=function(t){function e(){t.call(this),this._item=null;var n=arguments[0],r=arguments[1],i=arguments[2];this._min=n,this._max=r,this._item=i}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;i.visitItem(this._item)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),QO=function(t){function e(){t.call(this),this._node1=null,this._node2=null;var n=arguments[0],r=arguments[1];this._node1=n,this._node2=r,this.buildExtent(this._node1,this._node2)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.buildExtent=function(n,r){this._min=Math.min(n._min,r._min),this._max=Math.max(n._max,r._max)},e.prototype.query=function(n,r,i){if(!this.intersects(n,r))return null;this._node1!==null&&this._node1.query(n,r,i),this._node2!==null&&this._node2.query(n,r,i)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e}(Ja),Qa=function(){this._leaves=new yt,this._root=null,this._level=0};Qa.prototype.buildTree=function(){var t=this;qs.sort(this._leaves,new Ja.NodeComparator);for(var e=this._leaves,n=null,r=new yt;;){if(t.buildLevel(e,r),r.size()===1)return r.get(0);n=e,e=r,r=n}};Qa.prototype.insert=function(t,e,n){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new JO(t,e,n))};Qa.prototype.query=function(t,e,n){this.init(),this._root.query(t,e,n)};Qa.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()};Qa.prototype.printNode=function(t){Ri.out.println(Us.toLineString(new ze(t._min,this._level),new ze(t._max,this._level)))};Qa.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()};Qa.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var n=0;n=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,r[0]),this.insertBoundaryPoint(this._argIndex,r[r.length-1])},e.prototype.getInvalidPoint=function(){return this._invalidPoint},e.prototype.getBoundaryPoints=function(){for(var n=this.getBoundaryNodes(),r=new Array(n.size()).fill(null),i=0,s=n.iterator();s.hasNext();){var c=s.next();r[i++]=c.getCoordinate().copy()}return r},e.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},e.prototype.addSelfIntersectionNode=function(n,r,i){if(this.isBoundaryNode(n,r))return null;i===Fe.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(n,r):this.insertPoint(n,r,i)},e.prototype.addPolygonRing=function(n,r,i){if(n.isEmpty())return null;var s=In.removeRepeatedPoints(n.getCoordinates());if(s.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=s[0],null;var c=r,l=i;Et.isCCW(s)&&(c=i,l=r);var d=new F_(s,new Hn(this._argIndex,Fe.BOUNDARY,c,l));this._lineEdgeMap.put(n,d),this.insertEdge(d),this.insertPoint(this._argIndex,s[0],Fe.BOUNDARY)},e.prototype.insertPoint=function(n,r,i){var s=this._nodes.addNode(r),c=s.getLabel();c===null?s._label=new Hn(n,i):c.setLocation(n,i)},e.prototype.createEdgeSetIntersector=function(){return new KO},e.prototype.addSelfIntersectionNodes=function(n){for(var r=this,i=this._edges.iterator();i.hasNext();)for(var s=i.next(),c=s.getLabel().getLocation(n),l=s.eiList.iterator();l.hasNext();){var d=l.next();r.addSelfIntersectionNode(n,d.coord,c)}},e.prototype.add=function(){if(arguments.length===1){var n=arguments[0];if(n.isEmpty())return null;if(n instanceof Ga&&(this._useBoundaryDeterminationRule=!1),n instanceof li)this.addPolygon(n);else if(n instanceof Nr)this.addLineString(n);else if(n instanceof zo)this.addPoint(n);else if(n instanceof Gf)this.addCollection(n);else if(n instanceof Qu)this.addCollection(n);else if(n instanceof Ga)this.addCollection(n);else if(n instanceof io)this.addCollection(n);else throw new Error(n.getClass().getName())}else return t.prototype.add.apply(this,arguments)},e.prototype.addCollection=function(n){for(var r=this,i=0;i50?(this._areaPtLocator===null&&(this._areaPtLocator=new $f(this._parentGeom)),this._areaPtLocator.locate(n)):this._ptLocator.locate(n,this._parentGeom)},e.prototype.findEdge=function(){if(arguments.length===1){var n=arguments[0];return this._lineEdgeMap.get(n)}else return t.prototype.findEdge.apply(this,arguments)},e.prototype.interfaces_=function(){return[]},e.prototype.getClass=function(){return e},e.determineBoundary=function(n,r){return n.isInBoundary(r)?Fe.BOUNDARY:Fe.INTERIOR},e}(Lr),Jf=function(){if(this._li=new fc,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Sd(0,t)}else if(arguments.length===2){var e=arguments[0],n=arguments[1],r=xs.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(n.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(n.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,e,r),this._arg[1]=new Sd(1,n,r)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],c=arguments[2];i.getPrecisionModel().compareTo(s.getPrecisionModel())>=0?this.setComputationPrecision(i.getPrecisionModel()):this.setComputationPrecision(s.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Sd(0,i,c),this._arg[1]=new Sd(1,s,c)}};Jf.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()};Jf.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)};Jf.prototype.interfaces_=function(){return[]};Jf.prototype.getClass=function(){return Jf};var $u=function(){};$u.prototype.interfaces_=function(){return[]};$u.prototype.getClass=function(){return $u};$u.map=function(){if(arguments[0]instanceof $t&&Kt(arguments[1],$u.MapOp)){for(var t=arguments[0],e=arguments[1],n=new yt,r=0;r=t.size()?null:t.get(e)};Yr.union=function(t){var e=new Yr(t);return e.union()};oT.STRTREE_NODE_CAPACITY.get=function(){return 4};Object.defineProperties(Yr,oT);var V_=function(){};V_.prototype.interfaces_=function(){return[]};V_.prototype.getClass=function(){return V_};V_.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return an.createEmptyResult(an.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),ao.overlayOp(t,e,an.UNION)};function pc(){return new U_}function U_(){this.reset()}U_.prototype={constructor:U_,reset:function(){this.s=this.t=0},add:function(t){cS(Ug,t,this.t),cS(this,Ug.s,this.s),this.s?this.t+=Ug.t:this.s=Ug.t},valueOf:function(){return this.s}};var Ug=new U_;function cS(t,e,n){var r=t.s=e+n,i=r-e,s=r-i;t.t=e-s+(n-i)}var Dr=1e-6,Qn=Math.PI,wl=Qn/2,hS=Qn/4,kl=Qn*2,ju=180/Qn,aa=Qn/180,to=Math.abs,e5=Math.atan,ep=Math.atan2,ri=Math.cos,ii=Math.sin,_p=Math.sqrt;function sT(t){return t>1?0:t<-1?Qn:Math.acos(t)}function ah(t){return t>1?wl:t<-1?-wl:Math.asin(t)}function Rd(){}function j_(t,e){t&&pS.hasOwnProperty(t.type)&&pS[t.type](t,e)}var fS={Feature:function(t,e){j_(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rQn?t-kl:t<-Qn?t+kl:t,e]}r1.invert=r1;function n5(t,e,n){return(t%=kl)?e||n?aT(gS(t),_S(e,n)):gS(t):e||n?_S(e,n):r1}function mS(t){return function(e,n){return e+=t,[e>Qn?e-kl:e<-Qn?e+kl:e,n]}}function gS(t){var e=mS(t);return e.invert=mS(-t),e}function _S(t,e){var n=ri(t),r=ii(t),i=ri(e),s=ii(e);function c(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*n+S*r;return[ep(E*i-M*s,S*n-C*r),ah(M*i+E*s)]}return c.invert=function(l,d){var v=ri(d),S=ri(l)*v,E=ii(l)*v,C=ii(d),M=C*i-E*s;return[ep(E*i+C*s,S*n+M*r),ah(M*n-S*r)]},c}function r5(t,e,n,r,i,s){if(n){var c=ri(e),l=ii(e),d=r*n;i==null?(i=e+r*kl,s=e-d/2):(i=yS(c,i),s=yS(c,s),(r>0?is)&&(i+=r*kl));for(var v,S=i;r>0?S>s:S1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function i5(t,e,n,r,i,s){var c=t[0],l=t[1],d=e[0],v=e[1],S=0,E=1,C=d-c,M=v-l,k;if(k=n-c,!(!C&&k>0)){if(k/=C,C<0){if(k0){if(k>E)return;k>S&&(S=k)}if(k=i-c,!(!C&&k<0)){if(k/=C,C<0){if(k>E)return;k>S&&(S=k)}else if(C>0){if(k0)){if(k/=M,M<0){if(k0){if(k>E)return;k>S&&(S=k)}if(k=s-l,!(!M&&k<0)){if(k/=M,M<0){if(k>E)return;k>S&&(S=k)}else if(M>0){if(k0&&(t[0]=c+S*C,t[1]=l+S*M),E<1&&(e[0]=c+E*C,e[1]=l+E*M),!0}}}}}function a_(t,e){return to(t[0]-e[0])=0;--l)i.point((E=S[l])[0],E[1]);else r(C.x,C.p.x,-1,i);C=C.p}C=C.o,S=C.z,M=!M}while(!C.v);i.lineEnd()}}}function vS(t){if(e=t.length){for(var e,n=0,r=t[0],i;++ne?1:t>=e?0:NaN}function o5(t){return t.length===1&&(t=s5(t)),{left:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)<0?r=s+1:i=s}return r},right:function(e,n,r,i){for(r==null&&(r=0),i==null&&(i=e.length);r>>1;t(e[s],n)>0?i=s:r=s+1}return r}}}function s5(t){return function(e,n){return cT(t(e),n)}}o5(cT);function hT(t){for(var e=t.length,n,r=-1,i=0,s,c;++r=0;)for(c=t[e],n=c.length;--n>=0;)s[--i]=c[n];return s}var Nd=1e9,Wg=-Nd;function a5(t,e,n,r){function i(v,S){return t<=v&&v<=n&&e<=S&&S<=r}function s(v,S,E,C){var M=0,k=0;if(v==null||(M=c(v,E))!==(k=c(S,E))||d(v,S)<0^E>0)do C.point(M===0||M===3?t:n,M>1?r:e);while((M=(M+E+4)%4)!==k);else C.point(S[0],S[1])}function c(v,S){return to(v[0]-t)0?0:3:to(v[0]-n)0?2:1:to(v[1]-e)0?1:0:S>0?3:2}function l(v,S){return d(v.x,S.x)}function d(v,S){var E=c(v,1),C=c(S,1);return E!==C?E-C:E===0?S[1]-v[1]:E===1?v[0]-S[0]:E===2?v[1]-S[1]:S[0]-v[0]}return function(v){var S=v,E=lT(),C,M,k,R,z,U,F,G,H,te,ee,fe={point:pe,lineStart:ae,lineEnd:Ke,polygonStart:Ae,polygonEnd:Y};function pe(tt,ut){i(tt,ut)&&S.point(tt,ut)}function se(){for(var tt=0,ut=0,We=M.length;utr&&(wn-Pt)*(r-rn)>(fn-rn)*(t-Pt)&&++tt:fn<=r&&(wn-Pt)*(r-rn)<(fn-rn)*(t-Pt)&&--tt;return tt}function Ae(){S=E,C=[],M=[],ee=!0}function Y(){var tt=se(),ut=ee&&tt,We=(C=hT(C)).length;(ut||We)&&(v.polygonStart(),ut&&(v.lineStart(),s(null,null,1,v),v.lineEnd()),We&&uT(C,l,tt,s,v),v.polygonEnd()),S=v,C=M=k=null}function ae(){fe.point=Le,M&&M.push(k=[]),te=!0,H=!1,F=G=NaN}function Ke(){C&&(Le(R,z),U&&H&&E.rejoin(),C.push(E.result())),fe.point=pe,H&&S.lineEnd()}function Le(tt,ut){var We=i(tt,ut);if(M&&k.push([tt,ut]),te)R=tt,z=ut,U=We,te=!1,We&&(S.lineStart(),S.point(tt,ut));else if(We&&H)S.point(tt,ut);else{var Ot=[F=Math.max(Wg,Math.min(Nd,F)),G=Math.max(Wg,Math.min(Nd,G))],Gt=[tt=Math.max(Wg,Math.min(Nd,tt)),ut=Math.max(Wg,Math.min(Nd,ut))];i5(Ot,Gt,t,e,n,r)?(H||(S.lineStart(),S.point(Ot[0],Ot[1])),S.point(Gt[0],Gt[1]),We||S.lineEnd(),ee=!1):We&&(S.lineStart(),S.point(tt,ut),ee=!1)}F=tt,G=ut,H=We}return fe}}var uv=pc();function l5(t,e){var n=e[0],r=e[1],i=[ii(n),-ri(n),0],s=0,c=0;uv.reset();for(var l=0,d=t.length;l=0?1:-1,pe=fe*ee,se=pe>Qn,Ae=k*H;if(uv.add(ep(Ae*fe*ii(pe),R*te+Ae*ri(pe))),s+=se?ee+fe*kl:ee,se^C>=n^F>=n){var Y=G_(tp(E),tp(U));n1(Y);var ae=G_(i,Y);n1(ae);var Ke=(se^ee>=0?-1:1)*ah(ae[2]);(r>Ke||r===Ke&&(Y[0]||Y[1]))&&(c+=se^ee>=0?1:-1)}}return(s<-Dr||sdm&&(dm=t),eW_&&(W_=e)}pc();function fT(t,e,n,r){return function(i,s){var c=e(s),l=i.invert(r[0],r[1]),d=lT(),v=e(d),S=!1,E,C,M,k={point:R,lineStart:U,lineEnd:F,polygonStart:function(){k.point=G,k.lineStart=H,k.lineEnd=te,C=[],E=[]},polygonEnd:function(){k.point=R,k.lineStart=U,k.lineEnd=F,C=hT(C);var ee=l5(E,l);C.length?(S||(s.polygonStart(),S=!0),uT(C,h5,ee,n,s)):ee&&(S||(s.polygonStart(),S=!0),s.lineStart(),n(null,null,1,s),s.lineEnd()),S&&(s.polygonEnd(),S=!1),C=E=null},sphere:function(){s.polygonStart(),s.lineStart(),n(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function R(ee,fe){var pe=i(ee,fe);t(ee=pe[0],fe=pe[1])&&s.point(ee,fe)}function z(ee,fe){var pe=i(ee,fe);c.point(pe[0],pe[1])}function U(){k.point=z,c.lineStart()}function F(){k.point=R,c.lineEnd()}function G(ee,fe){M.push([ee,fe]);var pe=i(ee,fe);v.point(pe[0],pe[1])}function H(){v.lineStart(),M=[]}function te(){G(M[0][0],M[0][1]),v.lineEnd();var ee=v.clean(),fe=d.result(),pe,se=fe.length,Ae,Y,ae;if(M.pop(),E.push(M),M=null,!!se){if(ee&1){if(Y=fe[0],(Ae=Y.length-1)>0){for(S||(s.polygonStart(),S=!0),s.lineStart(),pe=0;pe1&&ee&2&&fe.push(fe.pop().concat(fe.shift())),C.push(fe.filter(c5))}}return k}}function c5(t){return t.length>1}function h5(t,e){return((t=t.x)[0]<0?t[1]-wl-Dr:wl-t[1])-((e=e.x)[0]<0?e[1]-wl-Dr:wl-e[1])}const wS=fT(function(){return!0},f5,d5,[-Qn,-wl]);function f5(t){var e=NaN,n=NaN,r=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(s,c){var l=s>0?Qn:-Qn,d=to(s-e);to(d-Qn)0?wl:-wl),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(s,n),i=0):r!==l&&d>=Qn&&(to(e-r)Dr?e5((ii(e)*(s=ri(r))*ii(n)-ii(r)*(i=ri(e))*ii(t))/(i*s*c)):(e+r)/2}function d5(t,e,n,r){var i;if(t==null)i=n*wl,r.point(-Qn,i),r.point(0,i),r.point(Qn,i),r.point(Qn,0),r.point(Qn,-i),r.point(0,-i),r.point(-Qn,-i),r.point(-Qn,0),r.point(-Qn,i);else if(to(t[0]-e[0])>Dr){var s=t[0]0,i=to(n)>Dr;function s(S,E,C,M){r5(M,t,e,C,S,E)}function c(S,E){return ri(S)*ri(E)>n}function l(S){var E,C,M,k,R;return{lineStart:function(){k=M=!1,R=1},point:function(z,U){var F=[z,U],G,H=c(z,U),te=r?H?0:v(z,U):H?v(z+(z<0?Qn:-Qn),U):0;if(!E&&(k=M=H)&&S.lineStart(),H!==M&&(G=d(E,F),(!G||a_(E,G)||a_(F,G))&&(F[0]+=Dr,F[1]+=Dr,H=c(F[0],F[1]))),H!==M)R=0,H?(S.lineStart(),G=d(F,E),S.point(G[0],G[1])):(G=d(E,F),S.point(G[0],G[1]),S.lineEnd()),E=G;else if(i&&E&&r^H){var ee;!(te&C)&&(ee=d(F,E,!0))&&(R=0,r?(S.lineStart(),S.point(ee[0][0],ee[0][1]),S.point(ee[1][0],ee[1][1]),S.lineEnd()):(S.point(ee[1][0],ee[1][1]),S.lineEnd(),S.lineStart(),S.point(ee[0][0],ee[0][1])))}H&&(!E||!a_(E,F))&&S.point(F[0],F[1]),E=F,M=H,C=te},lineEnd:function(){M&&S.lineEnd(),E=null},clean:function(){return R|(k&&M)<<1}}}function d(S,E,C){var M=tp(S),k=tp(E),R=[1,0,0],z=G_(M,k),U=jg(z,z),F=z[0],G=U-F*F;if(!G)return!C&&S;var H=n*U/G,te=-n*F/G,ee=G_(R,z),fe=Gg(R,H),pe=Gg(z,te);lv(fe,pe);var se=ee,Ae=jg(fe,se),Y=jg(se,se),ae=Ae*Ae-Y*(jg(fe,fe)-1);if(!(ae<0)){var Ke=_p(ae),Le=Gg(se,(-Ae-Ke)/Y);if(lv(Le,fe),Le=t1(Le),!C)return Le;var tt=S[0],ut=E[0],We=S[1],Ot=E[1],Gt;ut0^Le[1]<(to(Le[0]-tt)Qn^(tt<=Le[0]&&Le[0]<=ut)){var rn=Gg(se,(-Ae+Ke)/Y);return lv(rn,fe),[Le,t1(rn)]}}}function v(S,E){var C=r?t:Qn-t,M=0;return S<-C?M|=1:S>C&&(M|=2),E<-C?M|=4:E>C&&(M|=8),M}return fT(c,l,s,r?[0,-t]:[-Qn,t-Qn])}function pT(t){return function(e){var n=new i1;for(var r in t)n[r]=t[r];return n.stream=e,n}}function i1(){}i1.prototype={constructor:i1,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function dT(t,e,n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],s=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),s!=null&&t.clipExtent(null),t5(n,t.stream(xS));var c=xS.result(),l=Math.min(r/(c[1][0]-c[0][0]),i/(c[1][1]-c[0][1])),d=+e[0][0]+(r-l*(c[1][0]+c[0][0]))/2,v=+e[0][1]+(i-l*(c[1][1]+c[0][1]))/2;return s!=null&&t.clipExtent(s),t.scale(l*150).translate([d,v])}function g5(t,e,n){return dT(t,[[0,0],e],n)}var SS=16,_5=ri(30*aa);function ES(t,e){return+e?v5(t,e):y5(t)}function y5(t){return pT({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function v5(t,e){function n(r,i,s,c,l,d,v,S,E,C,M,k,R,z){var U=v-r,F=S-i,G=U*U+F*F;if(G>4*e&&R--){var H=c+C,te=l+M,ee=d+k,fe=_p(H*H+te*te+ee*ee),pe=ah(ee/=fe),se=to(to(ee)-1)e||to((U*Ke+F*Le)/G-.5)>.3||c*C+l*M+d*k<_5)&&(n(r,i,s,c,l,d,Y,ae,se,H/=fe,te/=fe,ee,R,z),z.point(Y,ae),n(Y,ae,se,H,te,ee,v,S,E,C,M,k,R,z))}}return function(r){var i,s,c,l,d,v,S,E,C,M,k,R,z={point:U,lineStart:F,lineEnd:H,polygonStart:function(){r.polygonStart(),z.lineStart=te},polygonEnd:function(){r.polygonEnd(),z.lineStart=F}};function U(pe,se){pe=t(pe,se),r.point(pe[0],pe[1])}function F(){E=NaN,z.point=G,r.lineStart()}function G(pe,se){var Ae=tp([pe,se]),Y=t(pe,se);n(E,C,S,M,k,R,E=Y[0],C=Y[1],S=pe,M=Ae[0],k=Ae[1],R=Ae[2],SS,r),r.point(E,C)}function H(){z.point=U,r.lineEnd()}function te(){F(),z.point=ee,z.lineEnd=fe}function ee(pe,se){G(i=pe,se),s=E,c=C,l=M,d=k,v=R,z.point=G}function fe(){n(E,C,S,M,k,R,s,c,i,l,d,v,SS,r),z.lineEnd=H,H()}return z}}var b5=pT({point:function(t,e){this.stream.point(t*aa,e*aa)}});function x5(t){return w5(function(){return t})()}function w5(t){var e,n=150,r=480,i=250,s,c,l=0,d=0,v=0,S=0,E=0,C,M,k=null,R=wS,z=null,U,F,G,H=bS,te=.5,ee=ES(Y,te),fe,pe;function se(Le){return Le=M(Le[0]*aa,Le[1]*aa),[Le[0]*n+s,c-Le[1]*n]}function Ae(Le){return Le=M.invert((Le[0]-s)/n,(c-Le[1])/n),Le&&[Le[0]*ju,Le[1]*ju]}function Y(Le,tt){return Le=e(Le,tt),[Le[0]*n+s,c-Le[1]*n]}se.stream=function(Le){return fe&&pe===Le?fe:fe=b5(R(C,ee(H(pe=Le))))},se.clipAngle=function(Le){return arguments.length?(R=+Le?m5(k=Le*aa,6*aa):(k=null,wS),Ke()):k*ju},se.clipExtent=function(Le){return arguments.length?(H=Le==null?(z=U=F=G=null,bS):a5(z=+Le[0][0],U=+Le[0][1],F=+Le[1][0],G=+Le[1][1]),Ke()):z==null?null:[[z,U],[F,G]]},se.scale=function(Le){return arguments.length?(n=+Le,ae()):n},se.translate=function(Le){return arguments.length?(r=+Le[0],i=+Le[1],ae()):[r,i]},se.center=function(Le){return arguments.length?(l=Le[0]%360*aa,d=Le[1]%360*aa,ae()):[l*ju,d*ju]},se.rotate=function(Le){return arguments.length?(v=Le[0]%360*aa,S=Le[1]%360*aa,E=Le.length>2?Le[2]%360*aa:0,ae()):[v*ju,S*ju,E*ju]},se.precision=function(Le){return arguments.length?(ee=ES(Y,te=Le*Le),Ke()):_p(te)},se.fitExtent=function(Le,tt){return dT(se,Le,tt)},se.fitSize=function(Le,tt){return g5(se,Le,tt)};function ae(){M=aT(C=n5(v,S,E),e);var Le=e(l,d);return s=r-Le[0]*n,c=i+Le[1]*n,Ke()}function Ke(){return fe=pe=null,se}return function(){return e=t.apply(this,arguments),se.invert=e.invert&&Ae,ae()}}function mT(t){return function(e,n){var r=ri(e),i=ri(n),s=t(r*i);return[s*i*ii(e),s*ii(n)]}}function gT(t){return function(e,n){var r=_p(e*e+n*n),i=t(r),s=ii(i),c=ri(i);return[ep(e*s,r*c),ah(r&&n*s/r)]}}var S5=mT(function(t){return _p(2/(1+t))});S5.invert=gT(function(t){return 2*ah(t/2)});var _T=mT(function(t){return(t=sT(t))&&t/ii(t)});_T.invert=gT(function(t){return t});function E5(){return x5(_T).scale(79.4188).clipAngle(180-.001)}function IS(t,e){return[t,e]}IS.invert=IS;function I5(t,e,n){n=n||{};var r=n.units||"kilometers",i=n.steps||8;if(!t)throw new Error("geojson is required");if(typeof n!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(e===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return kC(t,function(c){var l=l_(c,e,r,i);l&&s.push(l)}),Kv(s);case"FeatureCollection":return oS(t,function(c){var l=l_(c,e,r,i);l&&oS(l,function(d){d&&s.push(d)})}),Kv(s)}return l_(t,e,r,i)}function l_(t,e,n,r){var i=t.properties||{},s=t.type==="Feature"?t.geometry:t;if(s.type==="GeometryCollection"){var c=[];return kC(t,function(R){var z=l_(R,e,n,r);z&&c.push(z)}),Kv(c)}var l=C5(s),d={type:s.type,coordinates:vT(s.coordinates,l)},v=new tb,S=v.read(d),E=DO(RO(e,n),"meters"),C=ki.bufferOp(S,E,r),M=new jC;if(C=M.write(C),!yT(C.coordinates)){var k={type:C.type,coordinates:bT(C.coordinates,l)};return hy(k,i)}}function yT(t){return Array.isArray(t[0])?yT(t[0]):isNaN(t[0])}function vT(t,e){return typeof t[0]!="object"?e(t):t.map(function(n){return vT(n,e)})}function bT(t,e){return typeof t[0]!="object"?e.invert(t):t.map(function(n){return bT(n,e)})}function C5(t){var e=OO(t).geometry.coordinates,n=[-e[0],-e[1]];return E5().rotate(n).scale(Ko)}function T5(t,e){var n=N_(t),r=N_(e),i=t.properties||{},s=TC.difference(n.coordinates,r.coordinates);return s.length===0?null:s.length===1?PC(s[0],i):MC(s,i)}function CS(t){let e;for(const n of t)e&&n[0]-e[0]>=180?n[0]-=360:e&&n[0]-e[0]<-180&&(n[0]+=360),e=n}function TS(t,e){const n=T5({type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]},t);if(!n)return;n.properties={isMask:"y"};const r=I5(t,0);if(r.geometry.type==="Polygon")for(const i of r.geometry.coordinates)CS(i);else for(const i of r.geometry.coordinates)for(const s of i)CS(s);e({type:"FeatureCollection",features:[r,n]})}let LS={type:"FeatureCollection",features:[]};function L5(t,e,n=!0,r=!0,i={},s={},c={fill:{paint:{"fill-color":"#000","fill-opacity":.1},filter:["all",["==",["geometry-type"],"Polygon"],["has","isMask"]]},line:{layout:{"line-cap":"square"},paint:{"line-width":["case",["==",["geometry-type"],"Polygon"],2,3],"line-dasharray":[1,1],"line-color":"#3170fe"},filter:["!",["has","isMask"]]}}){let l,d=[],v,S;function E(){(c!=null&&c.fill||c!=null&&c.line)&&t.addSource("full-geom",{type:"geojson",data:LS}),c!=null&&c.fill&&t.addLayer({...c==null?void 0:c.fill,id:"full-geom-fill",type:"fill",source:"full-geom"}),c!=null&&c.line&&t.addLayer({...c==null?void 0:c.line,id:"full-geom-line",type:"line",source:"full-geom"})}t.loaded()?E():t.once("load",()=>{E()});const C=k=>{l==null||l({type:"mapClick",coordinates:[k.lngLat.lng,k.lngLat.lat]})};function M(k=!1){if(!e)throw new Error;const R=document.createElement("div");return k&&R.classList.add("marker-interactive"),new rO({props:{displayIn:"maplibre"},target:R}),new e.Marker({element:R,offset:[1,-13]})}return{setEventHandler(k){k?(l=k,t.on("click",C)):(l=void 0,t.off("click",C))},flyTo(k,R){t.flyTo({center:k,zoom:R,...i})},fitBounds(k,R,z){t.fitBounds([[k[0],k[1]],[k[2],k[3]]],{padding:R,maxZoom:z,...s})},indicateReverse(k){t.getCanvasContainer().style.cursor=k?"crosshair":""},setReverseMarker(k){!e||!n||(S?k?S.setLngLat(k):(S.remove(),S=void 0):k&&(S=(typeof n=="object"?new e.Marker(n):M()).setLngLat(k).addTo(t),S.getElement().classList.add("marker-reverse")))},setMarkers(k,R){if(!n)return;function z(U){var F;(F=t.getSource("full-geom"))==null||F.setData(U)}for(const U of d)U.remove();if(d.length=0,z(LS),!!e){if(R){let U=!1;if(R.geometry.type==="GeometryCollection"){const F=R.geometry.geometries.filter(G=>G.type==="Polygon"||G.type==="MultiPolygon");if(F.length>0){let G=F.pop();for(const H of F)G=NO(G,H);TS({...R,geometry:G},z),U=!0}else{const G=R.geometry.geometries.filter(H=>H.type==="LineString"||H.type==="MultiLineString");G.length>0&&(z({...R,geometry:{type:"GeometryCollection",geometries:G}}),U=!0)}}if(!U){if(R.geometry.type==="Polygon"||R.geometry.type==="MultiPolygon")TS(R,z);else if(R.geometry.type==="LineString"||R.geometry.type==="MultiLineString"){z(R);return}}n&&d.push((typeof n=="object"?new e.Marker(n):M()).setLngLat(R.center).addTo(t))}if(r)for(const U of k??[]){if(U===R)continue;const F=(typeof r=="object"?new e.Marker(r):M(!0)).setLngLat(U.center).setPopup(new e.Popup({offset:[1,-27],closeButton:!1,closeOnMove:!0,className:"maptiler-gc-popup"}).setText(U.place_type[0]==="reverse"?U.place_name:U.place_name.replace(/,.*/,""))).addTo(t),G=F.getElement();G.addEventListener("click",H=>{H.stopPropagation(),l==null||l({type:"markerClick",id:U.id})}),G.addEventListener("mouseenter",()=>{l==null||l({type:"markerMouseEnter",id:U.id}),F.togglePopup()}),G.addEventListener("mouseleave",()=>{l==null||l({type:"markerMouseLeave",id:U.id}),F.togglePopup()}),d.push(F)}}},setSelectedMarker(k){v&&v.getElement().classList.toggle("marker-selected",!1),v=k>-1?d[k]:void 0,v==null||v.getElement().classList.toggle("marker-selected",!0)},getCenterAndZoom(){const k=t.getCenter();return[t.getZoom(),k.lng,k.lat]}}}function P5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"),Ce(e,"viewBox","0 0 14 14"),Ce(e,"width","13"),Ce(e,"height","13"),Ce(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Lt,i:Lt,o:Lt,d(r){r&&be(e)}}}class xT extends Yt{constructor(e){super(),Xt(this,e,null,P5,Ut,{})}}function M5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"),Ce(e,"viewBox","0 0 30 30"),Ce(e,"fill","none"),Ce(e,"xmlns","http://www.w3.org/2000/svg"),Ce(e,"class","svelte-d2loi5")},m(r,i){xe(r,e,i),oe(e,n)},p:Lt,i:Lt,o:Lt,d(r){r&&be(e)}}}class wT extends Yt{constructor(e){super(),Xt(this,e,null,M5,Ut,{})}}function A5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"area.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"area.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function k5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"reverse.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"reverse.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function D5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"poi.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"poi.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function R5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"postal_code.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"postal_code.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function N5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"street.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"street.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function O5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"road.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"road.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function z5(t){let e,n;return{c(){e=_e("img"),Wn(e.src,n=t[3]+"housenumber.svg")||Ce(e,"src",n),Ce(e,"alt",t[6]),Ce(e,"class","svelte-ltkwvy")},m(r,i){xe(r,e,i)},p(r,i){i&8&&!Wn(e.src,n=r[3]+"housenumber.svg")&&Ce(e,"src",n),i&64&&Ce(e,"alt",r[6])},d(r){r&&be(e)}}}function F5(t){let e,n,r,i;return{c(){e=_e("img"),Wn(e.src,n=t[5])||Ce(e,"src",n),Ce(e,"alt",t[4]),Ce(e,"class","svelte-ltkwvy")},m(s,c){xe(s,e,c),r||(i=Mt(e,"error",t[14]),r=!0)},p(s,c){c&32&&!Wn(e.src,n=s[5])&&Ce(e,"src",n),c&16&&Ce(e,"alt",s[4])},d(s){s&&be(e),r=!1,i()}}}function PS(t){let e,n;return{c(){e=_e("span"),n=at(t[6]),Ce(e,"class","secondary svelte-ltkwvy")},m(r,i){xe(r,e,i),oe(e,n)},p(r,i){i&64&&hr(n,r[6])},d(r){r&&be(e)}}}function B5(t){var fe,pe;let e,n,r,i,s,c,l,d,v=(t[7]?t[0].place_name:t[0].place_name.replace(/,.*/,""))+"",S,E,C=t[2]==="always"||t[2]&&!t[0].address&&((fe=t[0].properties)==null?void 0:fe.kind)!=="road"&&((pe=t[0].properties)==null?void 0:pe.kind)!=="road_relation"&&!t[0].id.startsWith("address.")&&!t[0].id.startsWith("postal_code.")&&(!t[0].id.startsWith("poi.")||!t[5])&&!t[7],M,k,R=(t[7]?"":t[0].place_name.replace(/[^,]*,?\s*/,""))+"",z,U,F;function G(se,Ae){var Y,ae;return Ae&1&&(n=null),Ae&1&&(r=null),Ae&1&&(i=null),se[5]?F5:se[0].address?z5:((Y=se[0].properties)==null?void 0:Y.kind)==="road"||((ae=se[0].properties)==null?void 0:ae.kind)==="road_relation"?O5:(n==null&&(n=!!se[0].id.startsWith("address.")),n?N5:(r==null&&(r=!!se[0].id.startsWith("postal_code.")),r?R5:(i==null&&(i=!!se[0].id.startsWith("poi.")),i?D5:se[7]?k5:A5)))}let H=G(t,-1),te=H(t),ee=C&&PS(t);return{c(){e=_e("li"),te.c(),s=Ze(),c=_e("span"),l=_e("span"),d=_e("span"),S=at(v),E=Ze(),ee&&ee.c(),M=Ze(),k=_e("span"),z=at(R),Ce(d,"class","primary svelte-ltkwvy"),Ce(l,"class","svelte-ltkwvy"),Ce(k,"class","line2 svelte-ltkwvy"),Ce(c,"class","texts svelte-ltkwvy"),Ce(e,"tabindex","0"),Ce(e,"data-selected",t[1]),Ce(e,"class","svelte-ltkwvy"),xl(e,"selected",t[1])},m(se,Ae){xe(se,e,Ae),te.m(e,null),oe(e,s),oe(e,c),oe(c,l),oe(l,d),oe(d,S),oe(l,E),ee&&ee.m(l,null),oe(c,M),oe(c,k),oe(k,z),U||(F=[Mt(e,"mouseenter",t[12]),Mt(e,"focus",t[13])],U=!0)},p(se,[Ae]){var Y,ae;H===(H=G(se,Ae))&&te?te.p(se,Ae):(te.d(1),te=H(se),te&&(te.c(),te.m(e,s))),Ae&1&&v!==(v=(se[7]?se[0].place_name:se[0].place_name.replace(/,.*/,""))+"")&&hr(S,v),Ae&37&&(C=se[2]==="always"||se[2]&&!se[0].address&&((Y=se[0].properties)==null?void 0:Y.kind)!=="road"&&((ae=se[0].properties)==null?void 0:ae.kind)!=="road_relation"&&!se[0].id.startsWith("address.")&&!se[0].id.startsWith("postal_code.")&&(!se[0].id.startsWith("poi.")||!se[5])&&!se[7]),C?ee?ee.p(se,Ae):(ee=PS(se),ee.c(),ee.m(l,null)):ee&&(ee.d(1),ee=null),Ae&1&&R!==(R=(se[7]?"":se[0].place_name.replace(/[^,]*,?\s*/,""))+"")&&hr(z,R),Ae&2&&Ce(e,"data-selected",se[1]),Ae&2&&xl(e,"selected",se[1])},i:Lt,o:Lt,d(se){se&&be(e),te.d(),ee&&ee.d(),U=!1,Kr(F)}}}function V5(t,e,n){var G;let r,i,{feature:s}=e,{selected:c=!1}=e,{showPlaceType:l}=e,{missingIconsCache:d}=e,{iconsBaseUrl:v}=e;const S=(G=s.properties)==null?void 0:G.categories;let E,C,M=0,k=s.place_type[0]==="reverse";function R(H){C&&d.add(C),n(10,M++,M)}function z(H){gn.call(this,t,H)}function U(H){gn.call(this,t,H)}const F=H=>R(H.currentTarget);return t.$$set=H=>{"feature"in H&&n(0,s=H.feature),"selected"in H&&n(1,c=H.selected),"showPlaceType"in H&&n(2,l=H.showPlaceType),"missingIconsCache"in H&&n(9,d=H.missingIconsCache),"iconsBaseUrl"in H&&n(3,v=H.iconsBaseUrl)},t.$$.update=()=>{var H,te,ee,fe;if(t.$$.dirty&3640)do n(11,r--,r),n(4,E=S==null?void 0:S[r]),n(5,C=E?v+E.replace(/ /g,"_")+".svg":void 0);while(r>-1&&(!C||d.has(C)));t.$$.dirty&1&&n(6,i=s.id.startsWith("poi.")?(te=(H=s.properties)==null?void 0:H.categories)==null?void 0:te.join(", "):((fe=(ee=s.properties)==null?void 0:ee.place_type_name)==null?void 0:fe[0])??s.place_type[0])},n(11,r=(S==null?void 0:S.length)??0),[s,c,l,v,E,C,i,k,R,d,M,r,z,U,F]}class U5 extends Yt{constructor(e){super(),Xt(this,e,V5,B5,Ut,{feature:0,selected:1,showPlaceType:2,missingIconsCache:9,iconsBaseUrl:3})}}function j5(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ce(e,"class","svelte-7cmwmc")},m(n,r){xe(n,e,r)},p:Lt,i:Lt,o:Lt,d(n){n&&be(e)}}}class G5 extends Yt{constructor(e){super(),Xt(this,e,null,j5,Ut,{})}}function q5(t){let e,n;return{c(){e=su("svg"),n=su("path"),Ce(n,"d","M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"),Ce(e,"viewBox","0 0 60.006 21.412"),Ce(e,"width","14"),Ce(e,"height","20"),Ce(e,"class","svelte-en2qvf")},m(r,i){xe(r,e,i),oe(e,n)},p:Lt,i:Lt,o:Lt,d(r){r&&be(e)}}}class W5 extends Yt{constructor(e){super(),Xt(this,e,null,q5,Ut,{})}}function H5(t){let e,n,r;return{c(){e=su("svg"),n=su("circle"),r=su("path"),Ce(n,"cx","4.789"),Ce(n,"cy","4.787"),Ce(n,"r","3.85"),sr(n,"stroke-width","1.875"),sr(n,"fill","none"),Ce(r,"d","M12.063 12.063 7.635 7.635"),sr(r,"stroke-width","1.875"),sr(r,"stroke-linecap","round"),Ce(e,"xmlns","http://www.w3.org/2000/svg"),Ce(e,"width","13"),Ce(e,"height","13"),Ce(e,"viewBox","0 0 13 13"),Ce(e,"class","svelte-1bpbt60")},m(i,s){xe(i,e,s),oe(e,n),oe(e,r)},p:Lt,i:Lt,o:Lt,d(i){i&&be(e)}}}class Z5 extends Yt{constructor(e){super(),Xt(this,e,null,H5,Ut,{})}}function X5(t,e,n){const r=e[1],i=e[0],s=r-i;return t===r&&n?t:((t-i)%s+s)%s+i}function MS(t){const e=[...t];return e[2]r[0]||i.maxZoom!=null&&i.maxZoomDate.now()){if(!Ed.coords)break e;return Ed.coords}let s;try{return s=await new Promise((c,l)=>{n.signal.addEventListener("abort",()=>{l(Error("aborted"))}),navigator.geolocation.getCurrentPosition(d=>{c([d.coords.longitude,d.coords.latitude].map(v=>v.toFixed(6)).join(","))},d=>{l(d)},i)}),s}catch{}finally{i.cachedLocationExpiry&&(Ed={time:Date.now(),coords:s})}if(n.signal.aborted)return}if(i.type==="server-geolocation")return"ip";if(r&&i.type==="map-center")return r[1].toFixed(6)+","+r[2].toFixed(6)}}const AS=/(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?/i,kS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?/i,DS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?/i,RS=/(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?/i;function $5(t){if(!["DMS","DM","DD"].includes(t))throw new Error("invalid format specified");if(this.decimalCoordinates&&this.decimalCoordinates.trim()){if(t=="DD")return this.decimalCoordinates;const e=this.decimalCoordinates.split(",").map(c=>Number(c.trim()));let n=NS(e[0],t),r=NS(e[1],t);n.endsWith('.0"')&&r.endsWith('.0"')&&(n=n.replace(/\.0"$/,'"'),r=r.replace(/\.0"$/,'"'));const i=e[0]>=0?" N":" S",s=e[1]>=0?" E":" W";return`${n+i}, ${r+s}`}else throw new Error("no decimal coordinates to convert")}function NS(t,e){const n=Math.abs(t),r=Math.floor(n),i=(n-r)*60;if(e=="DM"){let l=K5(i,3).toFixed(3).padStart(6,"0");return`${r}° ${l}'`}let s=Math.floor(i),c=((i-s)*60).toFixed(1).padStart(4,"0");return s=s.toString().padStart(2,"0"),`${r}° ${s}' ${c}"`}function K5(t,e){const n=Math.pow(10,e);return Math.round((t+Number.EPSILON)*n)/n}function cb(t,e){e||(e=5),t=t.replace(/\s+/g," ").trim();let n=null,r=null,i="",s="",c=[],l=!1;if(AS.test(t))if(c=AS.exec(t),l=Hg(c),l){if(n=c[2],r=c[6],n.includes(",")&&(n=n.replace(",",".")),r.includes(",")&&(r=r.replace(",",".")),Number(Math.round(n))==Number(n))throw new Error("integer only coordinate provided");if(Number(Math.round(r))==Number(r))throw new Error("integer only coordinate provided");c[1]?(i=c[1],s=c[5]):c[4]&&(i=c[4],s=c[8])}else throw new Error("invalid decimal coordinate format");else if(kS.test(t))if(c=kS.exec(t),l=Hg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6].replace(",",".")/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[9])),c[11]&&(r+=c[11]/60),c[13]&&(r+=c[13].replace(",",".")/3600),parseInt(c[9])<0&&(r=-1*r),c[1]?(i=c[1],s=c[8]):c[7]&&(i=c[7],s=c[14]);else throw new Error("invalid DMS coordinates format");else if(DS.test(t))if(c=DS.exec(t),l=Hg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid DMS coordinates format");else if(RS.test(t))if(c=RS.exec(t),l=Hg(c),l)n=Math.abs(parseInt(c[2])),c[4]&&(n+=c[4]/60),c[6]&&(n+=c[6]/3600),parseInt(c[2])<0&&(n=-1*n),r=Math.abs(parseInt(c[10])),c[12]&&(r+=c[12]/60),c[14]&&(r+=c[14]/3600),parseInt(c[10])<0&&(r=-1*r),c[1]?(i=c[1],s=c[9]):c[8]&&(i=c[8],s=c[16]);else throw new Error("invalid coordinates format");if(l){if(Math.abs(r)>=180)throw new Error("invalid longitude value");if(Math.abs(n)>=90)throw new Error("invalid latitude value");if((i||s)&&(!i||!s))throw new Error("invalid coordinates format");if(i&&i==s)throw new Error("invalid coordinates format");let d=/S|SOUTH/i;d.test(i)&&n>0&&(n=-1*n),d=/W|WEST/i,d.test(s)&&r>0&&(r=-1*r);const v=c[0].trim();let S,E;const C=/[,/;\u0020]/g,M=v.match(C);if(M==null){const z=Math.floor(t.length/2);S=v.substring(0,z).trim(),E=v.substring(z).trim()}else{let z;M.length%2==1?z=Math.floor(M.length/2):z=M.length/2-1;let U=0;if(z==0)U=v.indexOf(M[0]),S=v.substring(0,U).trim(),E=v.substring(U+1).trim();else{let F=0,G=0;for(;F<=z;)U=v.indexOf(M[F],G),G=U+1,F++;S=v.substring(0,U).trim(),E=v.substring(U+1).trim()}}const k=S.split(".");if(k.length==2&&k[1]==0&&k[1].length!=2)throw new Error("invalid coordinates format");const R=E.split(".");if(R.length==2&&R[1]==0&&R[1].length!=2)throw new Error("invalid coordinates format");if(/^\d+$/.test(S)||/^\d+$/.test(E))throw new Error("degree only coordinate/s provided");return isNaN(n)&&n.includes(",")&&(n=n.replace(",",".")),n=Number(Number(n).toFixed(e)),isNaN(r)&&r.includes(",")&&(r=r.replace(",",".")),r=Number(Number(r).toFixed(e)),Object.freeze({verbatimCoordinates:v,verbatimLatitude:S,verbatimLongitude:E,decimalLatitude:n,decimalLongitude:r,decimalCoordinates:`${n},${r}`,closeEnough:J5,toCoordinateFormat:$5})}else throw new Error("coordinates pattern match failed")}function Hg(t){if(!isNaN(t[0]))return!1;const e=[...t];if(e.shift(),e.length%2>0)return!1;const n=/^[-+]?\d+([\.,]\d+)?$/,r=/[eastsouthnorthwest]+/i,i=e.length/2;for(let s=0;s{e.decimalLatitude?t.push(e):t.push({...e,...tz})}),[...t,...nz,...rz]}const oz=iz();cb.formats=oz.map(t=>t.verbatimCoordinates);const sz=cb;function zS(t,e,n){const r=t.slice();return r[81]=e[n],r[83]=n,r}function FS(t){let e,n;return e=new G5({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function BS(t){let e,n,r,i,s;return n=new W5({}),{c(){e=_e("button"),Ge(n.$$.fragment),Ce(e,"type","button"),Ce(e,"title",t[9]),Ce(e,"class","svelte-zh3kmv"),xl(e,"active",t[0])},m(c,l){xe(c,e,l),Ue(n,e,null),r=!0,i||(s=Mt(e,"click",t[67]),i=!0)},p(c,l){(!r||l[0]&512)&&Ce(e,"title",c[9]),(!r||l[0]&1)&&xl(e,"active",c[0])},i(c){r||(ue(n.$$.fragment,c),r=!0)},o(c){ye(n.$$.fragment,c),r=!1},d(c){c&&be(e),je(n),i=!1,s()}}}function az(t){let e,n=[],r=new Map,i,s,c,l=bs(t[14]);const d=v=>v[81].id+(v[81].address?","+v[81].address:"");for(let v=0;v{fe=null}),jn()),(!G||tt[0]&2)&&xl(v,"displayable",Le[1]!==""),Le[5]===!0?pe?(pe.p(Le,tt),tt[0]&32&&ue(pe,1)):(pe=BS(Le),pe.c(),ue(pe,1),pe.m(r,k)):pe&&(Un(),ye(pe,1,1,()=>{pe=null}),jn()),Ae&&Ae.p&&(!G||tt[1]&134217728)&&Ir(Ae,se,Le,Le[58],G?Er(se,Le[58],tt,null):Cr(Le[58]),null);let ut=z;z=Ke(Le),z===ut?~z&&ae[z].p(Le,tt):(U&&(Un(),ye(ae[ut],1,1,()=>{ae[ut]=null}),jn()),~z?(U=ae[z],U?U.p(Le,tt):(U=ae[z]=Y[z](Le),U.c()),ue(U,1),U.m(n,null)):U=null),(!G||tt[0]&4&&F!==(F=c_(Le[2])+" svelte-zh3kmv"))&&Ce(n,"class",F),(!G||tt[0]&22)&&xl(n,"can-collapse",Le[4]&&Le[1]==="")},i(Le){G||(ue(ee),ue(s.$$.fragment,Le),ue(E.$$.fragment,Le),ue(fe),ue(pe),ue(Ae,Le),ue(U),G=!0)},o(Le){ye(ee),ye(s.$$.fragment,Le),ye(E.$$.fragment,Le),ye(fe),ye(pe),ye(Ae,Le),ye(U),G=!1},d(Le){Le&&(be(e),be(n)),je(s),t[61](null),je(E),fe&&fe.d(),pe&&pe.d(),Ae&&Ae.d(Le),~z&&ae[z].d(),H=!1,Kr(te)}}}function fz(t,e,n){let r,{$$slots:i={},$$scope:s}=e,{class:c=void 0}=e,{apiKey:l}=e,{bbox:d=void 0}=e,{clearButtonTitle:v="clear"}=e,{clearOnBlur:S=!1}=e,{collapsed:E=!1}=e,{country:C=void 0}=e,{debounceSearch:M=200}=e,{enableReverse:k=!1}=e,{errorMessage:R="Something went wrong…"}=e,{filter:z=()=>!0}=e,{flyTo:U=!0}=e,{fuzzyMatch:F=!0}=e,{language:G=void 0}=e,{limit:H=void 0}=e,{mapController:te=void 0}=e,{minLength:ee=2}=e,{noResultsMessage:fe="Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!"}=e,{placeholder:pe="Search"}=e,{proximity:se=[{type:"server-geolocation"}]}=e,{reverseActive:Ae=k==="always"}=e,{reverseButtonTitle:Y="toggle reverse geocoding"}=e,{searchValue:ae=""}=e,{showFullGeometry:Ke=!0}=e,{showPlaceType:Le="ifNeeded"}=e,{showResultsWhileTyping:tt=!0}=e,{selectFirst:ut=!0}=e,{flyToSelected:We=!1}=e,{markerOnSelected:Ot=!0}=e,{types:Gt=void 0}=e,{excludeTypes:vt=!1}=e,{zoom:At=16}=e,{maxZoom:Pt=18}=e,{apiUrl:rn="https://api.maptiler.com/geocoding"}=e,{fetchParameters:wn={}}=e,{iconsBaseUrl:fn="https://cdn.maptiler.com/maptiler-geocoding-control/v1.2.2/icons/"}=e,{adjustUrlQuery:_n=Q=>{}}=e;function pn(){Re.focus()}function Yn(){Re.blur()}function zr(Q,Pe=!0){n(1,ae=Q),Pe?(n(15,It=-1),zl()):(ui(),setTimeout(()=>{Re.focus(),Re.select()}))}function Pn(){n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1)}function ar(){n(54,Me=[]),n(55,dt=void 0)}let Zn=!1,ne,Me,dt,en="",Re,It=-1,Cn,yn=[],ur,Uo,Cs,$s;const tl=new Set,Bi=vu();ro(()=>{te&&(te.setEventHandler(void 0),te.indicateReverse(!1),te.setSelectedMarker(-1),te.setMarkers(void 0,void 0))});function zl(Q){if(Uo&&(clearTimeout(Uo),Uo=void 0),It>-1&&ne)n(55,dt=ne[It]),n(1,ae=dt.place_type[0]==="reverse"?dt.place_name:dt.place_name.replace(/,.*/,"")),n(18,Cn=void 0),n(54,Me=void 0),n(15,It=-1);else if(ae){const Pe=Q||!Ts(ae);st(ae,{exact:!0}).then(()=>{n(54,Me=ne),n(55,dt=void 0),Pe&&ls()}).catch(Se=>n(18,Cn=Se))}}function Ts(Q){try{return sz(Q,6)}catch{return!1}}async function st(Q,{byId:Pe=!1,exact:Se=!1}={}){n(18,Cn=void 0),ur==null||ur.abort();const Ne=new AbortController;n(19,ur=Ne);try{const qe=Ts(Q),Ye=new URLSearchParams;if(G!==void 0&&Ye.set("language",Array.isArray(G)?G.join(","):G??""),Gt&&Ye.set("types",Gt.join(",")),vt&&Ye.set("excludeTypes",String(vt)),d&&Ye.set("bbox",d.map(Qt=>Qt.toFixed(6)).join(",")),C&&Ye.set("country",Array.isArray(C)?C.join(","):C),!Pe&&!qe){const Qt=await Y5(te,se,Ne);Qt&&Ye.set("proximity",Qt),(Se||!tt)&&Ye.set("autocomplete","false"),Ye.set("fuzzyMatch",String(F))}H!==void 0&&(!qe||(Gt==null?void 0:Gt.length)===1)&&Ye.set("limit",String(H)),Ye.set("key",l),_n(Ye);const Je=rn+"/"+encodeURIComponent(qe?qe.decimalLongitude+","+qe.decimalLatitude:Q)+".json?"+Ye.toString();if(Je===en){Pe?(n(14,ne=void 0),n(55,dt=yn[0])):n(14,ne=yn);return}en=Je;const Dt=await fetch(Je,{signal:Ne.signal,...wn});if(!Dt.ok)throw new Error(await Dt.text());const zt=await Dt.json();Bi("response",{url:Je,featureCollection:zt}),Pe?(n(14,ne=void 0),n(55,dt=zt.features[0]),yn=[dt]):(n(14,ne=zt.features.filter(z)),qe&&ne.unshift({type:"Feature",properties:{},id:"reverse_"+qe.decimalLongitude+"_"+qe.decimalLatitude,text:qe.decimalLatitude+", "+qe.decimalLongitude,place_name:qe.decimalLatitude+", "+qe.decimalLongitude,place_type:["reverse"],center:[qe.decimalLongitude,qe.decimalLatitude],bbox:[qe.decimalLongitude,qe.decimalLatitude,qe.decimalLongitude,qe.decimalLatitude],geometry:{type:"Point",coordinates:[qe.decimalLongitude,qe.decimalLatitude]}}),yn=ne,qe&&Re.focus())}catch(qe){if(qe&&typeof qe=="object"&&"name"in qe&&qe.name==="AbortError")return;throw qe}finally{Ne===ur&&n(19,ur=void 0)}}function ls(){var Se;if(!(Me!=null&&Me.length)||!U)return;const Q=[180,90,-180,-90],Pe=!Me.some(Ne=>!Ne.matching_text);for(const Ne of Me)if(Pe||!Ne.matching_text)for(const qe of[0,1,2,3])Q[qe]=Math[qe<2?"min":"max"](Q[qe],((Se=Ne.bbox)==null?void 0:Se[qe])??Ne.center[qe%2]);te&&Me.length>0&&(dt&&Q[0]===Q[2]&&Q[1]===Q[3]?te.flyTo(dt.center,At):te.fitBounds(MS(Q),50,Pt))}function lo(Q){n(0,Ae=k==="always"),n(14,ne=void 0),n(55,dt=void 0),n(15,It=-1),zr(Q[1].toFixed(6)+", "+X5(Q[0],[-180,180],!0).toFixed(6),!1)}function Fl(Q){if(!ne)return;let Pe=Q.key==="ArrowDown"?1:Q.key==="ArrowUp"?-1:0;Pe&&(It===(ut?0:-1)&&Pe===-1&&n(15,It=ne.length),n(15,It+=Pe),It>=ne.length&&n(15,It=-1),It<0&&ut&&n(15,It=0),Q.preventDefault())}function ui(Q=!0){if(n(18,Cn=void 0),tt){if(Uo&&clearTimeout(Uo),ae.length{st(Pe).catch(Se=>n(18,Cn=Se))},Q?M:0)}else n(14,ne=void 0),n(18,Cn=void 0)}function ft(Q){n(55,dt=Q),n(1,ae=Q.place_name),n(15,It=-1)}const ln=()=>Re.focus();function sn(Q){ai[Q?"unshift":"push"](()=>{Re=Q,n(17,Re)})}function Hr(){ae=this.value,n(1,ae),n(13,Zn),n(27,S)}const us=()=>n(13,Zn=!0),on=()=>n(13,Zn=!1),Aa=()=>ui(),Jr=()=>{n(1,ae=""),Re.focus()},me=()=>n(0,Ae=!Ae),q=()=>n(18,Cn=void 0),Z=Q=>n(15,It=Q),J=Q=>ft(Q),le=()=>{ut||n(15,It=-1)},Te=()=>{};return t.$$set=Q=>{"class"in Q&&n(2,c=Q.class),"apiKey"in Q&&n(25,l=Q.apiKey),"bbox"in Q&&n(26,d=Q.bbox),"clearButtonTitle"in Q&&n(3,v=Q.clearButtonTitle),"clearOnBlur"in Q&&n(27,S=Q.clearOnBlur),"collapsed"in Q&&n(4,E=Q.collapsed),"country"in Q&&n(28,C=Q.country),"debounceSearch"in Q&&n(29,M=Q.debounceSearch),"enableReverse"in Q&&n(5,k=Q.enableReverse),"errorMessage"in Q&&n(6,R=Q.errorMessage),"filter"in Q&&n(30,z=Q.filter),"flyTo"in Q&&n(31,U=Q.flyTo),"fuzzyMatch"in Q&&n(32,F=Q.fuzzyMatch),"language"in Q&&n(33,G=Q.language),"limit"in Q&&n(34,H=Q.limit),"mapController"in Q&&n(35,te=Q.mapController),"minLength"in Q&&n(36,ee=Q.minLength),"noResultsMessage"in Q&&n(7,fe=Q.noResultsMessage),"placeholder"in Q&&n(8,pe=Q.placeholder),"proximity"in Q&&n(37,se=Q.proximity),"reverseActive"in Q&&n(0,Ae=Q.reverseActive),"reverseButtonTitle"in Q&&n(9,Y=Q.reverseButtonTitle),"searchValue"in Q&&n(1,ae=Q.searchValue),"showFullGeometry"in Q&&n(38,Ke=Q.showFullGeometry),"showPlaceType"in Q&&n(10,Le=Q.showPlaceType),"showResultsWhileTyping"in Q&&n(39,tt=Q.showResultsWhileTyping),"selectFirst"in Q&&n(11,ut=Q.selectFirst),"flyToSelected"in Q&&n(40,We=Q.flyToSelected),"markerOnSelected"in Q&&n(41,Ot=Q.markerOnSelected),"types"in Q&&n(42,Gt=Q.types),"excludeTypes"in Q&&n(43,vt=Q.excludeTypes),"zoom"in Q&&n(44,At=Q.zoom),"maxZoom"in Q&&n(45,Pt=Q.maxZoom),"apiUrl"in Q&&n(46,rn=Q.apiUrl),"fetchParameters"in Q&&n(47,wn=Q.fetchParameters),"iconsBaseUrl"in Q&&n(12,fn=Q.iconsBaseUrl),"adjustUrlQuery"in Q&&n(48,_n=Q.adjustUrlQuery),"$$scope"in Q&&n(58,s=Q.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&134225920&&setTimeout(()=>{n(16,Cs=Zn),S&&!Zn&&n(1,ae="")}),t.$$.dirty[0]&16386|t.$$.dirty[1]&32&&ae.lengthn(18,Cn=Q)),t.$$.dirty[1]&50356241&&(te&&dt&&dt.id!==$s&&U&&(!dt.bbox||dt.bbox[0]===dt.bbox[2]&&dt.bbox[1]===dt.bbox[3]?te.flyTo(dt.center,dt.id.startsWith("poi.")||dt.id.startsWith("address.")?Pt:At):te.fitBounds(MS(dt.bbox),50,Pt),n(14,ne=void 0),n(54,Me=void 0),n(15,It=-1)),n(56,$s=dt==null?void 0:dt.id)),t.$$.dirty[0]&18432&&ut&&ne!=null&&ne.length&&n(15,It=0),t.$$.dirty[0]&2050&&(ut||n(15,It=-1)),t.$$.dirty[0]&16384|t.$$.dirty[1]&8388608&&Me!==ne&&n(54,Me=void 0),t.$$.dirty[0]&81921|t.$$.dirty[1]&8388624&&te&&te.setEventHandler(Q=>{switch(Q.type){case"mapClick":Ae&&lo(Q.coordinates);break;case"markerClick":{const Pe=ne==null?void 0:ne.find(Se=>Se.id===Q.id);Pe&&ft(Pe)}break;case"markerMouseEnter":Me&&n(15,It=Cs?(ne==null?void 0:ne.findIndex(Pe=>Pe.id===Q.id))??-1:-1);break;case"markerMouseLeave":Me&&n(15,It=-1);break}}),t.$$.dirty[0]&49152&&n(57,r=ne==null?void 0:ne[It]),t.$$.dirty[1]&67133969&&te&&r&&U&&We&&te.flyTo(r.center,r.id.startsWith("poi.")||r.id.startsWith("address.")?Pt:At),t.$$.dirty[1]&1040&&(Ot||te==null||te.setMarkers(void 0,void 0)),t.$$.dirty[1]&75498512&&te&&Ot&&!Me&&(te.setMarkers(r?[r]:void 0,void 0),te.setSelectedMarker(r?0:-1)),t.$$.dirty[1]&25165840&&te&&te.setMarkers(Me,dt),t.$$.dirty[0]&32768|t.$$.dirty[1]&8388624&&Me&&te&&te.setSelectedMarker(It),t.$$.dirty[0]&2|t.$$.dirty[1]&16&&te){const Q=Ts(ae);te.setReverseMarker(Q?[Q.decimalLongitude,Q.decimalLatitude]:void 0)}t.$$.dirty[1]&67108864&&Bi("select",r),t.$$.dirty[1]&16777216&&Bi("pick",dt),t.$$.dirty[0]&81920&&Bi("optionsVisibilityChange",Cs&&!!ne),t.$$.dirty[0]&16384&&Bi("featuresListed",ne),t.$$.dirty[1]&8388608&&Bi("featuresMarked",Me),t.$$.dirty[0]&1&&Bi("reverseToggle",Ae),t.$$.dirty[0]&2&&Bi("queryChange",ae),t.$$.dirty[0]&1|t.$$.dirty[1]&16&&te&&te.indicateReverse(Ae)},[Ae,ae,c,v,E,k,R,fe,pe,Y,Le,ut,fn,Zn,ne,It,Cs,Re,Cn,ur,tl,zl,Fl,ui,ft,l,d,S,C,M,z,U,F,G,H,te,ee,se,Ke,tt,We,Ot,Gt,vt,At,Pt,rn,wn,_n,pn,Yn,zr,Pn,ar,Me,dt,$s,r,s,i,ln,sn,Hr,us,on,Aa,Jr,me,q,Z,J,le,Te]}class pz extends Yt{constructor(e){super(),Xt(this,e,fz,hz,Ut,{class:2,apiKey:25,bbox:26,clearButtonTitle:3,clearOnBlur:27,collapsed:4,country:28,debounceSearch:29,enableReverse:5,errorMessage:6,filter:30,flyTo:31,fuzzyMatch:32,language:33,limit:34,mapController:35,minLength:36,noResultsMessage:7,placeholder:8,proximity:37,reverseActive:0,reverseButtonTitle:9,searchValue:1,showFullGeometry:38,showPlaceType:10,showResultsWhileTyping:39,selectFirst:11,flyToSelected:40,markerOnSelected:41,types:42,excludeTypes:43,zoom:44,maxZoom:45,apiUrl:46,fetchParameters:47,iconsBaseUrl:12,adjustUrlQuery:48,focus:49,blur:50,setQuery:51,clearList:52,clearMap:53},null,[-1,-1,-1])}get focus(){return this.$$.ctx[49]}get blur(){return this.$$.ctx[50]}get setQuery(){return this.$$.ctx[51]}get clearList(){return this.$$.ctx[52]}get clearMap(){return this.$$.ctx[53]}}function US(t){let e,n,r;return n=new pz({props:{mapController:t[1],apiKey:t[0]}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"class","svelte-ixhnie")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&2&&(c.mapController=i[1]),s&1&&(c.apiKey=i[0]),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function dz(t){let e,n,r=t[1]&&US(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[1]?r?(r.p(i,s),s&2&&ue(r,1)):(r=US(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function mz(t,e,n){let r,{apiKey:i}=e,{map:s}=e;return t.$$set=c=>{"apiKey"in c&&n(0,i=c.apiKey),"map"in c&&n(2,s=c.map)},t.$$.update=()=>{t.$$.dirty&4&&n(1,r=s?L5(s,Fs):null)},[i,r,s]}class gz extends Yt{constructor(e){super(),Xt(this,e,mz,dz,Ut,{apiKey:0,map:2})}}const _z=["==",["geometry-type"],"Polygon"],ST=["==",["geometry-type"],"LineString"],yz=["==",["geometry-type"],"Point"];function Od(t,e,n){let r=["match",t];for(let[i,s]of Object.entries(e))r.push(i),r.push(s);return r.push(n),r}const vz=t=>({}),jS=t=>({}),bz=t=>({}),GS=t=>({}),xz=t=>({}),qS=t=>({});function wz(t){let e,n,r,i,s,c;const l=t[1].top,d=Sr(l,t,t[0],qS),v=t[1].left,S=Sr(v,t,t[0],GS),E=t[1].main,C=Sr(E,t,t[0],jS);return{c(){e=_e("div"),d&&d.c(),n=Ze(),r=_e("div"),S&&S.c(),i=Ze(),s=_e("div"),C&&C.c(),Ce(e,"class","top svelte-mpick2"),Ce(r,"class","left svelte-mpick2"),Ce(s,"class","main svelte-mpick2")},m(M,k){xe(M,e,k),d&&d.m(e,null),xe(M,n,k),xe(M,r,k),S&&S.m(r,null),xe(M,i,k),xe(M,s,k),C&&C.m(s,null),c=!0},p(M,[k]){d&&d.p&&(!c||k&1)&&Ir(d,l,M,M[0],c?Er(l,M[0],k,xz):Cr(M[0]),qS),S&&S.p&&(!c||k&1)&&Ir(S,v,M,M[0],c?Er(v,M[0],k,bz):Cr(M[0]),GS),C&&C.p&&(!c||k&1)&&Ir(C,E,M,M[0],c?Er(E,M[0],k,vz):Cr(M[0]),jS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),S&&S.d(M),C&&C.d(M)}}}function Sz(t,e,n){let{$$slots:r={},$$scope:i}=e;return t.$$set=s=>{"$$scope"in s&&n(0,i=s.$$scope)},[i,r]}class Ez extends Yt{constructor(e){super(),Xt(this,e,Sz,wz,Ut,{})}}const Iz=t=>({}),WS=t=>({}),Cz=t=>({}),HS=t=>({}),Tz=t=>({}),ZS=t=>({});function Lz(t){let e,n,r,i,s,c;const l=t[4].top,d=Sr(l,t,t[3],ZS),v=t[4].sidebar,S=Sr(v,t,t[3],HS),E=t[4].map,C=Sr(E,t,t[3],WS);return{c(){e=_e("div"),d&&d.c(),n=Ze(),r=_e("div"),S&&S.c(),i=Ze(),s=_e("div"),C&&C.c()},m(M,k){xe(M,e,k),d&&d.m(e,null),t[5](e),xe(M,n,k),xe(M,r,k),S&&S.m(r,null),t[6](r),xe(M,i,k),xe(M,s,k),C&&C.m(s,null),t[7](s),c=!0},p(M,[k]){d&&d.p&&(!c||k&8)&&Ir(d,l,M,M[3],c?Er(l,M[3],k,Tz):Cr(M[3]),ZS),S&&S.p&&(!c||k&8)&&Ir(S,v,M,M[3],c?Er(v,M[3],k,Cz):Cr(M[3]),HS),C&&C.p&&(!c||k&8)&&Ir(C,E,M,M[3],c?Er(E,M[3],k,Iz):Cr(M[3]),WS)},i(M){c||(ue(d,M),ue(S,M),ue(C,M),c=!0)},o(M){ye(d,M),ye(S,M),ye(C,M),c=!1},d(M){M&&(be(e),be(n),be(r),be(i),be(s)),d&&d.d(M),t[5](null),S&&S.d(M),t[6](null),C&&C.d(M),t[7](null)}}}function Pz(t,e,n){let r,i,s;mt(t,o1,E=>n(0,r=E)),mt(t,s1,E=>n(1,i=E)),mt(t,a1,E=>n(2,s=E));let{$$slots:c={},$$scope:l}=e;function d(E){ai[E?"unshift":"push"](()=>{r=E,o1.set(r)})}function v(E){ai[E?"unshift":"push"](()=>{i=E,s1.set(i)})}function S(E){ai[E?"unshift":"push"](()=>{s=E,a1.set(s)})}return t.$$set=E=>{"$$scope"in E&&n(3,l=E.$$scope)},[r,i,s,l,c,d,v,S]}class bu extends Yt{constructor(e){super(),Xt(this,e,Pz,Lz,Ut,{})}}let o1=Nn(null),s1=Nn(null),a1=Nn(null);function Mz(t){let e,n,r,i,s,c,l,d,v;return{c(){e=_e("label"),n=at(`Basemap: + `),r=_e("select"),i=_e("option"),i.textContent="MapTiler Dataviz",s=_e("option"),s.textContent="MapTiler Streets",c=_e("option"),c.textContent="MapTiler Satellite",l=_e("option"),l.textContent="OS Open Zoomstack",i.__value="dataviz",es(i,i.__value),s.__value="streets",es(s,s.__value),c.__value="hybrid",es(c,c.__value),l.__value="uk-openzoomstack-light",es(l,l.__value),t[0]===void 0&&Xd(()=>t[1].call(r))},m(S,E){xe(S,e,E),oe(e,n),oe(e,r),oe(r,i),oe(r,s),oe(r,c),oe(r,l),h_(r,t[0],!0),d||(v=Mt(r,"change",t[1]),d=!0)},p(S,[E]){E&1&&h_(r,S[0])},i:Lt,o:Lt,d(S){S&&be(e),d=!1,v()}}}function Az(t,e,n){let r;mt(t,Bv,s=>n(0,r=s));function i(){r=OE(this),Bv.set(r)}return[r,i]}class kz extends Yt{constructor(e){super(),Xt(this,e,Az,Mz,Ut,{})}}let u_=Nn(!0);function Dz(t){let e,n;return e=new cc({props:{paint:{"fill-color":"black","fill-opacity":0},layout:{visibility:t[0]?"none":"visible"}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.layout={visibility:r[0]?"none":"visible"}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Rz(t){let e,n;return e=new Ro({props:{data:t[1],$$slots:{default:[Dz]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&5&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function Nz(t,e,n){let r;return mt(t,u_,s=>n(0,r=s)),[r,{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]]}}]}class Oz extends Yt{constructor(e){super(),Xt(this,e,Nz,Rz,Ut,{})}}function zz(t){let e,n,r,i;const s=t[1].default,c=Sr(s,t,t[0],null);return{c(){e=_e("a"),c&&c.c(),Ce(e,"href","#")},m(l,d){xe(l,e,d),c&&c.m(e,null),n=!0,r||(i=Mt(e,"click",NE(t[2])),r=!0)},p(l,[d]){c&&c.p&&(!n||d&1)&&Ir(c,s,l,l[0],n?Er(s,l[0],d,null):Cr(l[0]),null)},i(l){n||(ue(c,l),n=!0)},o(l){ye(c,l),n=!1},d(l){l&&be(e),c&&c.d(l),r=!1,i()}}}function Fz(t,e,n){let{$$slots:r={},$$scope:i}=e;function s(c){gn.call(this,t,c)}return t.$$set=c=>{"$$scope"in c&&n(0,i=c.$$scope)},[i,r,s]}class or extends Yt{constructor(e){super(),Xt(this,e,Fz,zz,Ut,{})}}const Bz=t=>({props:t&8}),XS=t=>({props:jz(t[3])});function Vz(t){let e;const n=t[1].default,r=Sr(n,t,t[2],XS);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&12)&&Ir(r,n,i,i[2],e?Er(n,i[2],s,Bz):Cr(i[2]),XS)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function Uz(t){let e,n;return e=new wN({props:{openOn:t[0],popupClass:"popup",$$slots:{default:[Vz,({features:r})=>({3:r}),({features:r})=>r?8:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.openOn=r[0]),i&12&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function jz(t){return t?t[0].properties??{}:(console.log("A Popup with null features should be impossible"),{})}function Gz(t,e,n){let{$$slots:r={},$$scope:i}=e,{openOn:s="hover"}=e;return t.$$set=c=>{"openOn"in c&&n(0,s=c.openOn),"$$scope"in c&&n(2,i=c.$$scope)},[s,r,i]}class dc extends Yt{constructor(e){super(),Xt(this,e,Gz,Uz,Ut,{openOn:0})}}function qz(t,e){let n=new Set(t.getStyle().layers.filter(r=>r.type=="line").map(r=>r.id));if(e=="dataviz")return["Road network","Path"].filter(r=>n.has(r));if(e=="hybrid")return["Path","Road","Tunnel"].filter(r=>n.has(r));if(e=="streets"){let r=[];for(let i of["road","bridge","tunnel"])for(let s of["link","minor","minor_construction","motorway","motorway_construction","motorway_link","path_pedestrian","secondary_tertiary","secondary_tertiary_construction","service_track","service_track_construction","street","trunk_primary","trunk_primary_construction","trunk_primary_link"])r.push(`${i}_${s}`);return r.filter(i=>n.has(i))}return e=="uk-openzoomstack-light"?t.getStyle().layers.filter(r=>r["source-layer"]=="roads"&&r.type=="line").map(r=>r.id):[]}const{window:Wz}=h1;function Hz(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k,R;return M=BP(t[8][0]),{c(){e=_e("button"),e.textContent="Stop StreetView",n=Ze(),r=_e("fieldset"),i=_e("legend"),i.textContent="Source:",s=Ze(),c=_e("label"),l=_e("input"),d=at(` + Google Street View`),v=Ze(),S=_e("label"),E=_e("input"),C=at(` + Bing Streetside`),Ce(e,"class","secondary"),Ce(l,"type","radio"),l.__value="google",es(l,l.__value),Ce(E,"type","radio"),E.__value="bing",es(E,E.__value),M.p(l,E)},m(z,U){xe(z,e,U),xe(z,n,U),xe(z,r,U),oe(r,i),oe(r,s),oe(r,c),oe(c,l),l.checked=l.__value===t[0],oe(c,d),oe(r,v),oe(r,S),oe(S,E),E.checked=E.__value===t[0],oe(S,C),k||(R=[Mt(e,"click",t[3]),Mt(l,"change",t[7]),Mt(E,"change",t[9])],k=!0)},p(z,U){U&1&&(l.checked=l.__value===z[0]),U&1&&(E.checked=E.__value===z[0])},d(z){z&&(be(e),be(n),be(r)),M.r(),k=!1,Kr(R)}}}function Zz(t){let e,n,r;return{c(){e=_e("button"),e.textContent="StreetView",Ce(e,"class","secondary")},m(i,s){xe(i,e,s),n||(r=Mt(e,"click",t[2]),n=!0)},p:Lt,d(i){i&&be(e),n=!1,r()}}}function Xz(t){let e,n,r;function i(l,d){return l[1]?Zz:Hz}let s=i(t),c=s(t);return{c(){c.c(),e=Fi()},m(l,d){c.m(l,d),xe(l,e,d),n||(r=Mt(Wz,"keydown",t[4]),n=!0)},p(l,[d]){s===(s=i(l))&&c?c.p(l,d):(c.d(1),c=s(l),c&&(c.c(),c.m(e.parentNode,e)))},i:Lt,o:Lt,d(l){l&&be(e),c.d(l),n=!1,r()}}}function Yz(t,e,n){let r;mt(t,u_,R=>n(1,r=R));let{map:i}=e,{maptilerBasemap:s}=e,c="google",l=[];function d(){Ft(u_,r=!1,r),i.on("click",S),i.getCanvas().style.cursor="crosshair";for(let R of qz(i,s))l.push([R,i.getPaintProperty(R,"line-color")]),i.setPaintProperty(R,"line-color","cyan")}function v(){Ft(u_,r=!0,r),i.off("click",S),i.getCanvas().style.cursor="inherit";for(let[R,z]of l)i.setPaintProperty(R,"line-color",z);l=[]}ro(v);function S(R){let z=R.lngLat.lng,U=R.lngLat.lat;c=="google"?window.open(`http://maps.google.com/maps?q=&layer=c&cbll=${U},${z}&cbp=11,0,0,0,0`,"_blank"):c=="bing"&&window.open(`https://www.bing.com/maps?cp=${U}~${z}&style=x`,"_blank")}function E(R){!r&&R.key=="Escape"&&(R.stopPropagation(),v())}const C=[[]];function M(){c=this.__value,n(0,c)}function k(){c=this.__value,n(0,c)}return t.$$set=R=>{"map"in R&&n(5,i=R.map),"maptilerBasemap"in R&&n(6,s=R.maptilerBasemap)},[c,r,d,v,E,i,s,M,C,k]}class $z extends Yt{constructor(e){super(),Xt(this,e,Yz,Xz,Ut,{map:5,maptilerBasemap:6})}}function gi(t){return{id:t,beforeId:Kz(t)}}function Kz(t){let e=ca(uu);if(!e){console.warn(`getBeforeId(${t}) called before map is ready. Z-ordering may be incorrect.`);return}let n,r=!1;for(let i=YS.length-1;i>=0;i--){let s=YS[i];if(s==t){r=!0;break}e.getLayer(s)&&(n=s)}if(!r)throw new Error(`Layer ID ${t} not defined in layerZorder`);return n}const YS=["Background","neighbourhood-boundaries","Residential","debug-borders","debug-crosses","debug-filters","cells","interior-roads","compare-route","shortcuts","shortcuts-focus","Building","route-debug-nodes","route-points","route-lines","route-polygons","one-ways","Road labels","animate-shortcuts","modal-filters","boundary","neighbourhood-boundary","auto-boundaries-areas","auto-boundaries-severances","freehand-line","edit-polygon-fill","edit-polygon-lines","edit-polygon-vertices"];function Jz(t){let e;return{c(){e=at("Back")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Qz(t){let e,n,r,i;return e=new or({props:{$$slots:{default:[Jz]},$$scope:{ctx:t}}}),e.$on("click",t[2]),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Mt(window,"keydown",t[1]),r=!0)},p(s,[c]){const l={};c&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function eF(t){let e=vu();function n(i){i.key=="Escape"&&(i.stopPropagation(),e("click"))}return[e,n,()=>e("click")]}class Ey extends Yt{constructor(e){super(),Xt(this,e,eF,Qz,Ut,{})}}function tF(t){let e,n;const r=[gi("one-ways"),{filter:["all",["==",["get","kind"],"interior_road"],["!=",["get","direction"],"both"]]},{layout:{"icon-image":"oneway-arrow","icon-size":1,"symbol-placement":"line","symbol-spacing":50,"icon-allow-overlap":!0,"icon-rotate":["case",["==",["get","direction"],"forwards"],0,180]}},{paint:{"icon-opacity":["case",["get","direction_edited"],1,.5]}}];let i={};for(let s=0;s({}),$S=t=>({}),iF=t=>({}),KS=t=>({});function oF(t){let e,n;const r=[gi("neighbourhood-boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function aF(t){let e,n,r,i,s,c,l,d,v;e=new Ro({props:{data:QS(t[3]),$$slots:{default:[oF]},$$scope:{ctx:t}}});const S=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let E={};for(let z=0;zn.properties.kind=="boundary");return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]],e.geometry.coordinates[0]]}}}function uF(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{gjInput:d}=e,{interactive:v=!0}=e,{onClickLine:S=(C,M)=>{}}=e;const E=C=>v&&S(C.detail.features[0],C.detail.event.lngLat);return t.$$set=C=>{"gjInput"in C&&n(4,d=C.gjInput),"interactive"in C&&n(0,v=C.interactive),"onClickLine"in C&&n(1,S=C.onClickLine),"$$scope"in C&&n(8,l=C.$$scope)},t.$$.update=()=>{t.$$.dirty&16&&n(3,r=l1(d)),t.$$.dirty&16&&n(5,i=Math.max(...d.features.map(C=>C.properties.kind=="interior_road"?C.properties.shortcuts:0))),t.$$.dirty&32&&n(2,s=Nf(["interpolate-hcl",["linear"],["get","shortcuts"],0,"white",1,"#F19A93",i,"#A32015"],"blue"))},[v,S,s,r,d,i,c,E,l]}class Iy extends Yt{constructor(e){super(),Xt(this,e,uF,lF,Ut,{gjInput:4,interactive:0,onClickLine:1})}}function cF(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function hF(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function fF(t){let e;return{c(){e=at("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function pF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k;return s=new or({props:{$$slots:{default:[cF]},$$scope:{ctx:t}}}),s.$on("click",t[4]),d=new or({props:{$$slots:{default:[hF]},$$scope:{ctx:t}}}),d.$on("click",t[5]),E=new or({props:{$$slots:{default:[fF]},$$scope:{ctx:t}}}),E.$on("click",t[6]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),S=_e("li"),Ge(E.$$.fragment),C=Ze(),M=_e("li"),M.textContent="Debug mode",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),k=!0},p(R,z){const U={};z&256&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&256&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&256&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){k||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),k=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),k=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function dF(t){let e,n,r;return n=new Ey({}),n.$on("click",t[3]),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","sidebar")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Lt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function mF(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function gF(t){let e,n,r;return n=new dc({props:{openOn:"hover",$$slots:{default:[mF,({props:i})=>({7:i}),({props:i})=>i?128:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function _F(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function yF(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[_F,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function vF(t){let e,n;return e=new ey({props:{properties:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&128&&(s.properties=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function bF(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[vF,({props:r})=>({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function xF(t){let e,n,r,i;const s=[gi("debug-borders"),{filter:["==",["get","kind"],"border_intersection"]},{paint:{"circle-radius":15,"circle-color":"green"}}];let c={$$slots:{default:[yF]},$$scope:{ctx:t}};for(let v=0;v({7:r}),({props:r})=>r?128:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&384&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function EF(t){let e,n;const r=[gi("debug-filters"),{paint:{"circle-radius":15,"circle-color":"black"}}];let i={$$slots:{default:[SF]},$$scope:{ctx:t}};for(let s=0;sn(0,r=S)),mt(t,xn,S=>n(1,i=S)),[r,i,(S,E)=>window.open(Rr(S.properties).way,"_blank"),()=>Ft(xn,i={mode:"neighbourhood"},i),()=>Ft(xn,i={mode:"title"},i),()=>Ft(xn,i={mode:"network"},i),()=>Ft(xn,i={mode:"neighbourhood"},i)]}class LF extends Yt{constructor(e){super(),Xt(this,e,TF,CF,Ut,{})}}function eE(t,e,n){const r=t.slice();return r[7]=e[n][0],r[8]=e[n][1],r[9]=e[n][2],r}function tE(t){let e,n,r,i,s,c,l=t[8]+"",d,v,S,E,C;function M(){return t[3](t[7])}return{c(){e=_e("button"),n=_e("img"),i=Ze(),s=_e("br"),c=Ze(),d=at(l),v=Ze(),Wn(n.src,r=`/ltn//filters/${t[7]}_icon.gif`)||Ce(n,"src",r),Ce(n,"width","80"),Ce(n,"alt",t[8]),Ce(e,"class","outline"),sr(e,"width","100%"),e.disabled=S=t[0]==t[7]},m(k,R){xe(k,e,R),oe(e,n),oe(e,i),oe(e,s),oe(e,c),oe(e,d),oe(e,v),E||(C=Mt(e,"click",M),E=!0)},p(k,R){t=k,R&1&&S!==(S=t[0]==t[7])&&(e.disabled=S)},d(k){k&&be(e),E=!1,C()}}}function PF(t){let e,n,r,i,s,c,l,d,v,S,E,C,M=t[1][2]+"",k,R,z,U,F,G,H=bs(t[2]),te=[];for(let fe=0;fe({6:r}),({dialog:r})=>r?64:0]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&4163&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function AF(t,e,n){let r,i;mt(t,jv,v=>n(0,i=v));let s=[["walk_cycle_only","Walking/cycling only","A physical barrier that only allows people walking, cycling, and rolling to pass. Often planters or bollards. Larger vehicles cannot enter."],["no_entry","No entry","An alternative sign to indicate vehicles are not allowed to enter the street. Only people walking, cycling, and rolling may pass through."],["bus_gate","Bus gate","A bus gate sign and traffic cameras are installed to allow buses, pedestrians, and cyclists to pass. There is no physical barrier."],["school_street","School street","A closure during school hours only. The barrier usually allows teachers and staff to access the school."]];const c=v=>Ft(jv,i=v,i),l=v=>Rr(v).close();function d(v){gn.call(this,t,v)}return t.$$.update=()=>{t.$$.dirty&1&&n(1,r=s.find(v=>v[0]==i))},[i,r,s,c,l,d]}class kF extends Yt{constructor(e){super(),Xt(this,e,AF,MF,Ut,{})}}function nE(t){let e,n;return e=new Ro({props:{data:t[0],$$slots:{default:[DF]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.data=r[0]),i&64&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function DF(t){let e,n;const r=[gi("freehand-line"),{paint:{"line-width":5,"line-color":"red"}}];let i={};for(let s=0;s{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function NF(t,e,n){let{map:r}=e,i=null;const s=vu();r.on("dragstart",c),r.on("mousemove",l),r.on("mouseup",d),ro(()=>{r.dragPan.enable(),r.off("dragstart",c),r.off("mousemove",l),r.off("mouseup",d)});function c(){r.dragPan.disable(),n(0,i={type:"Feature",properties:{},geometry:{type:"LineString",coordinates:[]}})}function l(v){i&&(i.geometry.coordinates.push(v.lngLat.toArray()),n(0,i))}function d(){i&&(s("done",i),n(0,i=null))}return t.$$set=v=>{"map"in v&&n(1,r=v.map)},[i,r]}class OF extends Yt{constructor(e){super(),Xt(this,e,NF,RF,Ut,{map:1})}}function zF(t){let e;const n=t[3].default,r=Sr(n,t,t[5],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&32)&&Ir(r,n,i,i[5],e?Er(n,i[5],s,null):Cr(i[5]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function FF(t){let e,n;const r=[gi("modal-filters"),{layout:{"icon-image":["get","filter_kind"],"icon-allow-overlap":!0,"icon-size":.1}},{paint:{"icon-opacity":["case",["get","edited"],1,.5]}}];let i={$$slots:{default:[zF]},$$scope:{ctx:t}};for(let s=0;sn(1,i=v)),mt(t,Gu,v=>n(2,s=v));let{$$slots:c={},$$scope:l}=e;function d(v){gn.call(this,t,v)}return t.$$set=v=>{"$$scope"in v&&n(5,l=v.$$scope)},t.$$.update=()=>{t.$$.dirty&6&&n(0,r=s>0?JSON.parse(i.renderModalFilters()):null)},[r,i,s,c,d,l]}class Cy extends Yt{constructor(e){super(),Xt(this,e,VF,BF,Ut,{})}}var UF=Object.defineProperty,dr=(t,e)=>UF(t,"name",{value:e,configurable:!0}),jF=class{constructor(e){this.direction=!1,this.compareProperties=!0;var n,r,i;this.precision=10**-((n=e==null?void 0:e.precision)!=null?n:17),this.direction=(r=e==null?void 0:e.direction)!=null?r:!1,this.compareProperties=(i=e==null?void 0:e.compareProperties)!=null?i:!0}compare(e,n){if(e.type!==n.type||!zd(e,n))return!1;switch(e.type){case"Point":return this.compareCoord(e.coordinates,n.coordinates);case"LineString":return this.compareLine(e.coordinates,n.coordinates);case"Polygon":return this.comparePolygon(e,n);case"GeometryCollection":return this.compareGeometryCollection(e,n);case"Feature":return this.compareFeature(e,n);case"FeatureCollection":return this.compareFeatureCollection(e,n);default:if(e.type.startsWith("Multi")){const r=u1(e),i=u1(n);return r.every(s=>i.some(c=>this.compare(s,c)))}}return!1}compareCoord(e,n){return e.length===n.length&&e.every((r,i)=>Math.abs(r-n[i])=0&&(r=[].concat(e.slice(i,e.length),e.slice(1,i+1))),r}comparePath(e,n){return e.every((r,i)=>this.compareCoord(r,n[i]))}comparePolygon(e,n){if(this.compareLine(e.coordinates[0],n.coordinates[0],1,!0)){const r=e.coordinates.slice(1,e.coordinates.length),i=n.coordinates.slice(1,n.coordinates.length);return r.every(s=>i.some(c=>this.compareLine(s,c,1,!0)))}return!1}compareGeometryCollection(e,n){return zd(e.geometries,n.geometries)&&this.compareBBox(e,n)&&e.geometries.every((r,i)=>this.compare(r,n.geometries[i]))}compareFeature(e,n){return e.id===n.id&&(this.compareProperties?iC(e.properties,n.properties):!0)&&this.compareBBox(e,n)&&this.compare(e.geometry,n.geometry)}compareFeatureCollection(e,n){return zd(e.features,n.features)&&this.compareBBox(e,n)&&e.features.every((r,i)=>this.compare(r,n.features[i]))}compareBBox(e,n){return!e.bbox&&!n.bbox||(e.bbox&&n.bbox?this.compareCoord(e.bbox,n.bbox):!1)}};dr(jF,"GeojsonEquality");function zd(t,e){return t.coordinates?t.coordinates.length===e.coordinates.length:t.length===e.length}dr(zd,"sameLength");function u1(t){return t.coordinates.map(e=>({type:t.type.replace("Multi",""),coordinates:e}))}dr(u1,"explode");var zs=63710088e-1,ET={centimeters:zs*100,centimetres:zs*100,degrees:360/(2*Math.PI),feet:zs*3.28084,inches:zs*39.37,kilometers:zs/1e3,kilometres:zs/1e3,meters:zs,metres:zs,miles:zs/1609.344,millimeters:zs*1e3,millimetres:zs*1e3,nauticalmiles:zs/1852,radians:1,yards:zs*1.0936},rE={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 mc(t,e,n={}){const r={type:"Feature"};return(n.id===0||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}dr(mc,"feature");function GF(t,e,n={}){switch(t){case"Point":return rp(e).geometry;case"LineString":return fb(e).geometry;case"Polygon":return hb(e).geometry;case"MultiPoint":return CT(e).geometry;case"MultiLineString":return IT(e).geometry;case"MultiPolygon":return TT(e).geometry;default:throw new Error(t+" is invalid")}}dr(GF,"geometry");function rp(t,e,n={}){if(!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!ip(t[0])||!ip(t[1]))throw new Error("coordinates must contain numbers");return mc({type:"Point",coordinates:t},e,n)}dr(rp,"point");function qF(t,e,n={}){return Ty(t.map(r=>rp(r,e)),n)}dr(qF,"points");function hb(t,e,n={}){for(const i of t){if(i.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(i[i.length-1].length!==i[0].length)throw new Error("First and last Position are not equivalent.");for(let s=0;shb(r,e)),n)}dr(WF,"polygons");function fb(t,e,n={}){if(t.length<2)throw new Error("coordinates must be an array of two or more positions");return mc({type:"LineString",coordinates:t},e,n)}dr(fb,"lineString");function HF(t,e,n={}){return Ty(t.map(r=>fb(r,e)),n)}dr(HF,"lineStrings");function Ty(t,e={}){const n={type:"FeatureCollection"};return e.id&&(n.id=e.id),e.bbox&&(n.bbox=e.bbox),n.features=t,n}dr(Ty,"featureCollection");function IT(t,e,n={}){return mc({type:"MultiLineString",coordinates:t},e,n)}dr(IT,"multiLineString");function CT(t,e,n={}){return mc({type:"MultiPoint",coordinates:t},e,n)}dr(CT,"multiPoint");function TT(t,e,n={}){return mc({type:"MultiPolygon",coordinates:t},e,n)}dr(TT,"multiPolygon");function ZF(t,e,n={}){return mc({type:"GeometryCollection",geometries:t},e,n)}dr(ZF,"geometryCollection");function XF(t,e=0){if(e&&!(e>=0))throw new Error("precision must be a positive number");const n=Math.pow(10,e||0);return Math.round(t*n)/n}dr(XF,"round");function pb(t,e="kilometers"){const n=ET[e];if(!n)throw new Error(e+" units is invalid");return t*n}dr(pb,"radiansToLength");function Ly(t,e="kilometers"){const n=ET[e];if(!n)throw new Error(e+" units is invalid");return t/n}dr(Ly,"lengthToRadians");function YF(t,e){return mm(Ly(t,e))}dr(YF,"lengthToDegrees");function $F(t){let e=t%360;return e<0&&(e+=360),e}dr($F,"bearingToAzimuth");function mm(t){return t%(2*Math.PI)*180/Math.PI}dr(mm,"radiansToDegrees");function pa(t){return t%360*Math.PI/180}dr(pa,"degreesToRadians");function KF(t,e="kilometers",n="kilometers"){if(!(t>=0))throw new Error("length must be a positive number");return pb(Ly(t,e),n)}dr(KF,"convertLength");function JF(t,e="meters",n="kilometers"){if(!(t>=0))throw new Error("area must be a positive number");const r=rE[e];if(!r)throw new Error("invalid original units");const i=rE[n];if(!i)throw new Error("invalid final units");return t/r*i}dr(JF,"convertArea");function ip(t){return!isNaN(t)&&t!==null&&!Array.isArray(t)}dr(ip,"isNumber");function QF(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}dr(QF,"isObject");function e6(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(t.length!==4&&t.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach(e=>{if(!ip(e))throw new Error("bbox must only contain numbers")})}dr(e6,"validateBBox");function t6(t){if(!t)throw new Error("id is required");if(["string","number"].indexOf(typeof t)===-1)throw new Error("id must be a number or a string")}dr(t6,"validateId");var n6=Object.defineProperty,gc=(t,e)=>n6(t,"name",{value:e,configurable:!0});function op(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if(t.type==="Feature"&&t.geometry!==null&&t.geometry.type==="Point")return[...t.geometry.coordinates];if(t.type==="Point")return[...t.coordinates]}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw new Error("coord must be GeoJSON Point or an Array of numbers")}gc(op,"getCoord");function r6(t){if(Array.isArray(t))return t;if(t.type==="Feature"){if(t.geometry!==null)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")}gc(r6,"getCoords");function LT(t){if(t.length>1&&ip(t[0])&&ip(t[1]))return!0;if(Array.isArray(t[0])&&t[0].length)return LT(t[0]);throw new Error("coordinates must only contain numbers")}gc(LT,"containsNumber");function i6(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)}gc(i6,"geojsonType");function o6(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||t.type!=="Feature"||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)}gc(o6,"featureOf");function s6(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||t.type!=="FeatureCollection")throw new Error("Invalid input to "+n+", FeatureCollection required");for(const r of t.features){if(!r||r.type!=="Feature"||!r.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!r.geometry||r.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+r.geometry.type)}}gc(s6,"collectionOf");function PT(t){return t.type==="Feature"?t.geometry:t}gc(PT,"getGeom");function a6(t,e){return t.type==="FeatureCollection"?"FeatureCollection":t.type==="GeometryCollection"?"GeometryCollection":t.type==="Feature"&&t.geometry!==null?t.geometry.type:t.type}gc(a6,"getType");var l6=Object.defineProperty,MT=(t,e)=>l6(t,"name",{value:e,configurable:!0});function db(t,e,n={}){if(n.final===!0)return AT(t,e);const r=op(t),i=op(e),s=pa(r[0]),c=pa(i[0]),l=pa(r[1]),d=pa(i[1]),v=Math.sin(c-s)*Math.cos(d),S=Math.cos(l)*Math.sin(d)-Math.sin(l)*Math.cos(d)*Math.cos(c-s);return mm(Math.atan2(v,S))}MT(db,"bearing");function AT(t,e){let n=db(e,t);return n=(n+180)%360,n}MT(AT,"calculateFinalBearing");var u6=Object.defineProperty,c6=(t,e)=>u6(t,"name",{value:e,configurable:!0});function kT(t,e,n,r={}){const i=op(t),s=pa(i[0]),c=pa(i[1]),l=pa(n),d=Ly(e,r.units),v=Math.asin(Math.sin(c)*Math.cos(d)+Math.cos(c)*Math.sin(d)*Math.cos(l)),S=s+Math.atan2(Math.sin(l)*Math.sin(d)*Math.cos(c),Math.cos(d)-Math.sin(c)*Math.sin(v)),E=mm(S),C=mm(v);return rp([E,C],r.properties)}c6(kT,"destination");var h6=Object.defineProperty,f6=(t,e)=>h6(t,"name",{value:e,configurable:!0});function DT(t,e,n={}){var r=op(t),i=op(e),s=pa(i[1]-r[1]),c=pa(i[0]-r[0]),l=pa(r[1]),d=pa(i[1]),v=Math.pow(Math.sin(s/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(d);return pb(2*Math.atan2(Math.sqrt(v),Math.sqrt(1-v)),n.units)}f6(DT,"distance");var p6=Object.defineProperty,d6=(t,e)=>p6(t,"name",{value:e,configurable:!0});function RT(t,e,n={}){const i=PT(t).coordinates;let s=0;for(let c=0;c=s&&c===i.length-1);c++)if(s>=e){const l=e-s;if(l){const d=db(i[c],i[c-1])-180;return kT(i[c],l,d,n)}else return rp(i[c])}else s+=DT(i[c],i[c+1],n);return rp(i[i.length-1])}d6(RT,"along");var m6=RT;function g6(t){let e,n;const r=[gi("animate-shortcuts"),{paint:{"circle-radius":10,"circle-color":"purple","circle-stroke-color":"black","circle-stroke-width":1}}];let i={};for(let s=0;sclearInterval(l));function d(){return r.features.map(M=>1/M.properties.directness).reduce((M,k)=>M+k,0)}function v(){return r.features.length==0?[]:Array.from({length:y6},S)}function S(){let M=Math.random()*i,k=0;for(let[R,z]of r.features.entries())if(k+=1/z.properties.directness,Mm6(r.features[M],k,{units:"kilometers"}))}}function C(){for(let[M,k]of s.entries())k.distance+=b6,k.distance>=r.features[k.idx].properties.length_meters/1e3&&(s[M]=S());n(0,c=E())}return t.$$set=M=>{"paths"in M&&n(1,r=M.paths)},t.$$.update=()=>{t.$$.dirty&2&&r&&(i=d(),s=v())},[c,r]}class w6 extends Yt{constructor(e){super(),Xt(this,e,x6,_6,Ut,{paths:1})}}function S6(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function E6(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function I6(t){let e;return{c(){e=at("View shortcuts")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function C6(t){let e;return{c(){e=at("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function T6(t){let e;return{c(){e=at("Change this boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function L6(t){let e;return{c(){e=at("Debug")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function P6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k,R,z,U,F,G,H,te,ee,fe,pe,se;return s=new or({props:{$$slots:{default:[S6]},$$scope:{ctx:t}}}),s.$on("click",t[25]),d=new or({props:{$$slots:{default:[E6]},$$scope:{ctx:t}}}),d.$on("click",t[26]),R=new or({props:{$$slots:{default:[I6]},$$scope:{ctx:t}}}),R.$on("click",t[27]),F=new or({props:{$$slots:{default:[C6]},$$scope:{ctx:t}}}),F.$on("click",t[28]),te=new or({props:{$$slots:{default:[T6]},$$scope:{ctx:t}}}),te.$on("click",t[29]),pe=new or({props:{$$slots:{default:[L6]},$$scope:{ctx:t}}}),pe.$on("click",t[30]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),S=_e("li"),S.textContent="Editing",E=Ze(),C=_e("nav"),M=_e("ul"),k=_e("li"),Ge(R.$$.fragment),z=Ze(),U=_e("li"),Ge(F.$$.fragment),G=Ze(),H=_e("li"),Ge(te.$$.fragment),ee=Ze(),fe=_e("li"),Ge(pe.$$.fragment),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(Ae,Y){xe(Ae,e,Y),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),oe(e,E),oe(e,C),oe(C,M),oe(M,k),Ue(R,k,null),oe(M,z),oe(M,U),Ue(F,U,null),oe(M,G),oe(M,H),Ue(te,H,null),oe(M,ee),oe(M,fe),Ue(pe,fe,null),se=!0},p(Ae,Y){const ae={};Y[1]&8&&(ae.$$scope={dirty:Y,ctx:Ae}),s.$set(ae);const Ke={};Y[1]&8&&(Ke.$$scope={dirty:Y,ctx:Ae}),d.$set(Ke);const Le={};Y[1]&8&&(Le.$$scope={dirty:Y,ctx:Ae}),R.$set(Le);const tt={};Y[1]&8&&(tt.$$scope={dirty:Y,ctx:Ae}),F.$set(tt);const ut={};Y[1]&8&&(ut.$$scope={dirty:Y,ctx:Ae}),te.$set(ut);const We={};Y[1]&8&&(We.$$scope={dirty:Y,ctx:Ae}),pe.$set(We)},i(Ae){se||(ue(s.$$.fragment,Ae),ue(d.$$.fragment,Ae),ue(R.$$.fragment,Ae),ue(F.$$.fragment,Ae),ue(te.$$.fragment,Ae),ue(pe.$$.fragment,Ae),se=!0)},o(Ae){ye(s.$$.fragment,Ae),ye(d.$$.fragment,Ae),ye(R.$$.fragment,Ae),ye(F.$$.fragment,Ae),ye(te.$$.fragment,Ae),ye(pe.$$.fragment,Ae),se=!1},d(Ae){Ae&&be(e),je(s),je(d),je(R),je(F),je(te),je(pe)}}}function iE(t){let e;return{c(){e=_e("mark"),e.textContent=`Some parts of the neighbourhood aren't reachable by drivers, shown in + red`},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function M6(t){let e,n,r;return{c(){e=at("Undo ("),n=at(t[4]),r=at(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&16&&hr(n,i[4])},d(i){i&&(be(e),be(n),be(r))}}}function A6(t){let e;return{c(){e=at("Undo")},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function k6(t){let e,n,r;return{c(){e=at("Redo ("),n=at(t[5]),r=at(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s[0]&32&&hr(n,i[5])},d(i){i&&(be(e),be(n),be(r))}}}function D6(t){let e;return{c(){e=at("Redo")},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function oE(t){let e,n;return e=new kF({}),e.$on("close",t[24]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Lt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function R6(t){let e,n,r,i,s=Rr(t[6]).properties.name+"",c,l,d=t[1].area_km2.toFixed(1)+"",v,S,E,C,M,k,R,z,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,Le,tt,ut,We,Ot,Gt,vt,At,Pt,rn,wn,fn,_n,pn,Yn,zr,Pn=t[8]>0&&iE();function ar(It,Cn){return It[4]==0?A6:M6}let Zn=ar(t),ne=Zn(t);function Me(It,Cn){return It[5]==0?D6:k6}let dt=Me(t),en=dt(t),Re=t[3]&&oE(t);return{c(){e=_e("div"),n=_e("p"),r=at("Editing neighbourhood "),i=_e("u"),c=at(s),l=at(` + , with an area of `),v=at(d),S=at(" km²"),E=Ze(),C=_e("details"),C.innerHTML=`Help

    Now that you've defined a neighbourhood boundary, you can see the + possible shortcuts that vehicles are currently able to take through it. + You can add a new modal filter to try and solve this. The colored "cell" + areas show what's reachable for drivers without leaving the boundary + you've drawn.

    `,M=Ze(),Pn&&Pn.c(),k=Ze(),R=_e("div"),z=_e("button"),U=_e("img"),G=at(` + Add a modal filter`),te=Ze(),ee=_e("button"),fe=at("Add many modal filters along line"),se=Ze(),Ae=_e("button"),Y=at("Reverse directions"),Ke=Ze(),Le=_e("button"),Le.textContent="Change modal filter type",tt=Ze(),ut=_e("label"),We=_e("input"),Ot=at(` + Animate shortcuts`),Gt=Ze(),vt=_e("div"),At=_e("button"),ne.c(),rn=Ze(),wn=_e("button"),en.c(),_n=Ze(),Re&&Re.c(),Wn(U.src,F=`/ltn//filters/${t[9]}_icon.gif`)||Ce(U,"src",F),Ce(U,"width","30"),Ce(U,"alt","Add a modal filter"),z.disabled=H=t[0]=="filter",Ce(z,"data-tooltip","hotkey 1"),ee.disabled=pe=t[0]=="freehand-filters",Ce(ee,"data-tooltip","hotkey 2"),Ae.disabled=ae=t[0]=="oneway",Ce(Ae,"data-tooltip","hotkey 3"),sr(R,"display","flex"),sr(R,"justify-content","space-between"),Ce(We,"type","checkbox"),At.disabled=Pt=t[4]==0,Ce(At,"data-tooltip","Ctrl+Z"),wn.disabled=fn=t[5]==0,Ce(wn,"data-tooltip","Ctrl+Y"),sr(vt,"display","flex"),sr(vt,"justify-content","space-between"),Ce(e,"slot","sidebar")},m(It,Cn){xe(It,e,Cn),oe(e,n),oe(n,r),oe(n,i),oe(i,c),oe(n,l),oe(n,v),oe(n,S),oe(e,E),oe(e,C),oe(e,M),Pn&&Pn.m(e,null),oe(e,k),oe(e,R),oe(R,z),oe(z,U),oe(z,G),oe(R,te),oe(R,ee),oe(ee,fe),oe(R,se),oe(R,Ae),oe(Ae,Y),oe(e,Ke),oe(e,Le),oe(e,tt),oe(e,ut),oe(ut,We),We.checked=t[10],oe(ut,Ot),oe(e,Gt),oe(e,vt),oe(vt,At),ne.m(At,null),oe(vt,rn),oe(vt,wn),en.m(wn,null),oe(e,_n),Re&&Re.m(e,null),pn=!0,Yn||(zr=[Mt(z,"click",t[19]),Mt(ee,"click",t[20]),Mt(Ae,"click",t[21]),Mt(Le,"click",t[22]),Mt(We,"change",t[23]),Mt(At,"click",t[15]),Mt(wn,"click",t[16])],Yn=!0)},p(It,Cn){(!pn||Cn[0]&64)&&s!==(s=Rr(It[6]).properties.name+"")&&hr(c,s),(!pn||Cn[0]&2)&&d!==(d=It[1].area_km2.toFixed(1)+"")&&hr(v,d),It[8]>0?Pn||(Pn=iE(),Pn.c(),Pn.m(e,k)):Pn&&(Pn.d(1),Pn=null),(!pn||Cn[0]&512&&!Wn(U.src,F=`/ltn//filters/${It[9]}_icon.gif`))&&Ce(U,"src",F),(!pn||Cn[0]&1&&H!==(H=It[0]=="filter"))&&(z.disabled=H),(!pn||Cn[0]&1&&pe!==(pe=It[0]=="freehand-filters"))&&(ee.disabled=pe),(!pn||Cn[0]&1&&ae!==(ae=It[0]=="oneway"))&&(Ae.disabled=ae),Cn[0]&1024&&(We.checked=It[10]),Zn===(Zn=ar(It))&&ne?ne.p(It,Cn):(ne.d(1),ne=Zn(It),ne&&(ne.c(),ne.m(At,null))),(!pn||Cn[0]&16&&Pt!==(Pt=It[4]==0))&&(At.disabled=Pt),dt===(dt=Me(It))&&en?en.p(It,Cn):(en.d(1),en=dt(It),en&&(en.c(),en.m(wn,null))),(!pn||Cn[0]&32&&fn!==(fn=It[5]==0))&&(wn.disabled=fn),It[3]?Re?(Re.p(It,Cn),Cn[0]&8&&ue(Re,1)):(Re=oE(It),Re.c(),ue(Re,1),Re.m(e,null)):Re&&(Un(),ye(Re,1,1,()=>{Re=null}),jn())},i(It){pn||(ue(Re),pn=!0)},o(It){ye(Re),pn=!1},d(It){It&&be(e),Pn&&Pn.d(),ne.d(),en.d(),Re&&Re.d(),Yn=!1,Kr(zr)}}}function N6(t){let e;return{c(){e=_e("p"),e.textContent="Click to change direction"},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function O6(t){let e,n,r,i;return{c(){e=_e("div"),n=_e("img"),i=at(` + Click to add modal filter`),Wn(n.src,r=`/ltn//filters/${t[9]}_icon.gif`)||Ce(n,"src",r),Ce(n,"width","20"),Ce(n,"alt","Add modal filter")},m(s,c){xe(s,e,c),oe(e,n),oe(e,i)},p(s,c){c[0]&512&&!Wn(n.src,r=`/ltn//filters/${s[9]}_icon.gif`)&&Ce(n,"src",r)},d(s){s&&be(e)}}}function z6(t){let e,n=t[33].shortcuts+"",r,i,s=(t[33].name??"unnamed road")+"",c,l,d;function v(C,M){return C[0]=="filter"?O6:N6}let S=v(t),E=S(t);return{c(){e=_e("p"),r=at(n),i=at(" shortcuts through "),c=at(s),l=Ze(),E.c(),d=Fi()},m(C,M){xe(C,e,M),oe(e,r),oe(e,i),oe(e,c),xe(C,l,M),E.m(C,M),xe(C,d,M)},p(C,M){M[1]&4&&n!==(n=C[33].shortcuts+"")&&hr(r,n),M[1]&4&&s!==(s=(C[33].name??"unnamed road")+"")&&hr(c,s),S===(S=v(C))&&E?E.p(C,M):(E.d(1),E=S(C),E&&(E.c(),E.m(d.parentNode,d)))},d(C){C&&(be(e),be(l),be(d)),E.d(C)}}}function F6(t){let e,n,r;return n=new dc({props:{openOn:"hover",$$slots:{default:[z6,({props:i})=>({33:i}),({props:i})=>[0,i?4:0]]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s[0]&513|s[1]&12&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function sE(t){let e,n;return e=new w6({props:{paths:t[7]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&128&&(s.paths=r[7]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function B6(t){let e;return{c(){e=at("Click to delete")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function V6(t){let e,n;return e=new dc({props:{openOn:"hover",$$slots:{default:[B6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[1]&8&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function aE(t){let e,n;return e=new OF({props:{map:Rr(t[2])}}),e.$on("done",t[17]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i[0]&4&&(s.map=Rr(r[2])),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function U6(t){let e,n,r,i,s,c,l;n=new Iy({props:{gjInput:t[1],interactive:t[0]=="filter"||t[0]=="oneway",onClickLine:t[12],$$slots:{"line-popup":[F6]},$$scope:{ctx:t}}});let d=t[10]&&sE(t);s=new Cy({props:{$$slots:{default:[V6]},$$scope:{ctx:t}}}),s.$on("click",t[13]);let v=t[0]=="freehand-filters"&&aE(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=Ze(),d&&d.c(),i=Ze(),Ge(s.$$.fragment),c=Ze(),v&&v.c(),Ce(e,"slot","map")},m(S,E){xe(S,e,E),Ue(n,e,null),oe(e,r),d&&d.m(e,null),oe(e,i),Ue(s,e,null),oe(e,c),v&&v.m(e,null),l=!0},p(S,E){const C={};E[0]&2&&(C.gjInput=S[1]),E[0]&1&&(C.interactive=S[0]=="filter"||S[0]=="oneway"),E[0]&513|E[1]&8&&(C.$$scope={dirty:E,ctx:S}),n.$set(C),S[10]?d?(d.p(S,E),E[0]&1024&&ue(d,1)):(d=sE(S),d.c(),ue(d,1),d.m(e,i)):d&&(Un(),ye(d,1,1,()=>{d=null}),jn());const M={};E[1]&8&&(M.$$scope={dirty:E,ctx:S}),s.$set(M),S[0]=="freehand-filters"?v?(v.p(S,E),E[0]&1&&ue(v,1)):(v=aE(S),v.c(),ue(v,1),v.m(e,null)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){l||(ue(n.$$.fragment,S),ue(d),ue(s.$$.fragment,S),ue(v),l=!0)},o(S){ye(n.$$.fragment,S),ye(d),ye(s.$$.fragment,S),ye(v),l=!1},d(S){S&&be(e),je(n),d&&d.d(),je(s),v&&v.d()}}}function j6(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[U6],sidebar:[R6],top:[P6]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Mt(window,"keydown",t[14]),r=!0)},p(s,c){const l={};c[0]&4095|c[1]&8&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function G6(t,e,n){let r,i,s,c,l,d,v;mt(t,Gu,vt=>n(18,i=vt)),mt(t,jv,vt=>n(9,s=vt)),mt(t,Gi,vt=>n(31,c=vt)),mt(t,uu,vt=>n(2,l=vt)),mt(t,E2,vt=>n(10,d=vt)),mt(t,xn,vt=>n(11,v=vt));let S="filter",E=!1,C=0,M=0,k,R,z=JSON.parse(c.getAllShortcuts());ro(()=>{l.doubleClickZoom.enable()});function U(vt){n(1,R=JSON.parse(c.renderNeighbourhood())),n(6,k=R.features.find(At=>At.properties.kind=="boundary")),n(4,C=R.undo_length),n(5,M=R.redo_length),n(7,z=JSON.parse(c.getAllShortcuts())),Rf()}function F(vt,At){S=="filter"?(c.addModalFilter(At,s),Ft(Gu,i++,i)):S=="oneway"&&(c.toggleDirection(vt.properties.road),Ft(Gu,i++,i))}function G(vt){let At=vt.detail.features[0];c.deleteModalFilter(At.properties.road),Ft(Gu,i++,i)}function H(vt){vt.target.tagName!="INPUT"&&(vt.ctrlKey&&vt.key=="z"&&te(),vt.ctrlKey&&vt.key=="y"&&ee(),vt.key=="1"&&n(0,S="filter"),vt.key=="2"&&n(0,S="freehand-filters"),vt.key=="3"&&n(0,S="oneway"))}function te(){c.undo(),Ft(Gu,i++,i)}function ee(){c.redo(),Ft(Gu,i++,i)}function fe(vt){let At=vt.detail;At&&(c.addManyModalFilters(At,s),Ft(Gu,i++,i)),n(0,S="filter")}const pe=()=>n(0,S="filter"),se=()=>n(0,S="freehand-filters"),Ae=()=>n(0,S="oneway"),Y=()=>n(3,E=!0);function ae(){d=this.checked,E2.set(d)}const Ke=()=>n(3,E=!1),Le=()=>Ft(xn,v={mode:"title"},v),tt=()=>Ft(xn,v={mode:"network"},v),ut=()=>Ft(xn,v={mode:"view-shortcuts"},v),We=()=>Ft(xn,v={mode:"route",prevMode:"neighbourhood"},v),Ot=()=>Ft(xn,v={mode:"set-boundary",name:Rr(k).properties.name,existing:k},v),Gt=()=>Ft(xn,v={mode:"debug"},v);return t.$$.update=()=>{t.$$.dirty[0]&5&&(S=="oneway"?l.doubleClickZoom.disable():l.doubleClickZoom.enable()),t.$$.dirty[0]&262144&&U(),t.$$.dirty[0]&2&&n(8,r=R.features.filter(vt=>vt.properties.kind=="cell"&&vt.properties.cell_color=="disconnected").length)},[S,R,l,E,C,M,k,z,r,s,d,v,F,G,H,te,ee,fe,i,pe,se,Ae,Y,ae,Ke,Le,tt,ut,We,Ot,Gt]}class q6 extends Yt{constructor(e){super(),Xt(this,e,G6,j6,Ut,{},null,[-1,-1])}}const H_="/ltn/assets/delete_light-ec75e756.svg",Z_="/ltn/assets/delete_dark-953cd893.svg",X_="/ltn/assets/edit_light-f3f51206.svg",Y_="/ltn/assets/edit_dark-97c94d36.svg";function lE(t,e,n){const r=t.slice();return r[20]=e[n],r}function W6(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function H6(t){let e;return{c(){e=at("Route")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Z6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return s=new or({props:{$$slots:{default:[W6]},$$scope:{ctx:t}}}),s.$on("click",t[17]),C=new or({props:{$$slots:{default:[H6]},$$scope:{ctx:t}}}),C.$on("click",t[18]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),l.textContent="Pick neighbourhood",d=Ze(),v=_e("nav"),S=_e("ul"),E=_e("li"),Ge(C.$$.fragment),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top"),sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(k,R){xe(k,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),oe(e,d),oe(e,v),oe(v,S),oe(S,E),Ue(C,E,null),M=!0},p(k,R){const z={};R&8388608&&(z.$$scope={dirty:R,ctx:k}),s.$set(z);const U={};R&8388608&&(U.$$scope={dirty:R,ctx:k}),C.$set(U)},i(k){M||(ue(s.$$.fragment,k),ue(C.$$.fragment,k),M=!0)},o(k){ye(s.$$.fragment,k),ye(C.$$.fragment,k),M=!1},d(k){k&&be(e),je(s),je(C)}}}function X6(t){let e;return{c(){e=at("Draw a new boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function Y6(t){let e;return{c(){e=at("Use an auto-generated boundary")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function $6(t){let e=t[20]+"",n;return{c(){n=at(e)},m(r,i){xe(r,n,i)},p(r,i){i&2&&e!==(e=r[20]+"")&&hr(n,e)},d(r){r&&be(n)}}}function uE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k,R;function z(){return t[14](t[20])}r=new or({props:{$$slots:{default:[$6]},$$scope:{ctx:t}}}),r.$on("click",z);function U(){return t[15](t[20])}function F(){return t[16](t[20])}return{c(){e=_e("li"),n=_e("span"),Ge(r.$$.fragment),i=Ze(),s=_e("button"),c=_e("img"),d=Ze(),v=_e("button"),S=_e("img"),C=Ze(),Wn(c.src,l=t[4]?X_:Y_)||Ce(c,"src",l),Ce(c,"alt","Rename neighbourhood"),Ce(s,"class","secondary"),Wn(S.src,E=t[4]?H_:Z_)||Ce(S,"src",E),Ce(S,"alt","Delete neighbourhood"),Ce(v,"class","secondary"),sr(n,"display","flex"),sr(n,"justify-content","space-between")},m(G,H){xe(G,e,H),oe(e,n),Ue(r,n,null),oe(n,i),oe(n,s),oe(s,c),oe(n,d),oe(n,v),oe(v,S),oe(e,C),M=!0,k||(R=[Mt(s,"click",U),Mt(v,"click",F)],k=!0)},p(G,H){t=G;const te={};H&8388610&&(te.$$scope={dirty:H,ctx:t}),r.$set(te),(!M||H&16&&!Wn(c.src,l=t[4]?X_:Y_))&&Ce(c,"src",l),(!M||H&16&&!Wn(S.src,E=t[4]?H_:Z_))&&Ce(S,"src",E)},i(G){M||(ue(r.$$.fragment,G),M=!0)},o(G){ye(r.$$.fragment,G),M=!1},d(G){G&&be(e),je(r),k=!1,Kr(R)}}}function K6(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k,R,z,U,F,G,H,te,ee,fe;s=new or({props:{$$slots:{default:[X6]},$$scope:{ctx:t}}}),s.$on("click",t[8]),d=new or({props:{$$slots:{default:[Y6]},$$scope:{ctx:t}}}),d.$on("click",t[13]);let pe=bs(t[1]),se=[];for(let Y=0;Yye(se[Y],1,1,()=>{se[Y]=null});return{c(){e=_e("div"),n=_e("details"),n.innerHTML=`Help

    Inside the neighbourhood you define, the goal is to eliminate (or + deliberately permit) through-traffic. An appropriate neighbourhood + boundary depends on many factors. The simplest approach is to find the + area bounded on all sides by "main" roads, which are designed for higher + traffic volumes. There are many other considerations, though -- maybe + severances like rivers or rail should be part of a boundary. Bridges and + tunnels near a boundary may be confusing as well. And note that your + boundary may not match the conventional definition of "neighbourhood."

    `,r=Ze(),i=_e("div"),Ge(s.$$.fragment),c=Ze(),l=_e("div"),Ge(d.$$.fragment),v=Ze(),S=_e("ul");for(let Y=0;Y({19:r}),({props:r})=>r?524288:0]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&8912896&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function eB(t){let e,n;const r=[gi("neighbourhood-boundaries"),{filter:["==",["get","kind"],"boundary"]},{paint:{"fill-color":"red","fill-opacity":Nf(.3,.5)}},{eventsIfTopMost:!0},{manageHoverState:!0},{hoverCursor:"pointer"}];let i={$$slots:{default:[Q6]},$$scope:{ctx:t}};for(let s=0;sn(11,s=ee)),mt(t,Ku,ee=>n(2,c=ee)),mt(t,xn,ee=>n(3,l=ee)),mt(t,Jd,ee=>n(4,d=ee));function v(ee){s.setCurrentNeighbourhood(ee),Ft(xn,l={mode:"neighbourhood"},l)}function S(ee){window.confirm(`Really delete neighbourhood ${ee}? You can't undo this.`)&&(s.deleteNeighbourhoodBoundary(ee),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function E(ee){let fe=window.prompt(`Rename neighbourhood ${ee} to what?`,ee);fe&&(s.renameNeighbourhoodBoundary(ee,fe),Rf(),n(0,r=JSON.parse(s.toSavefile())))}function C(){let ee=window.prompt("What do you want to name the neighbourhood?");ee&&Ft(xn,l={mode:"set-boundary",name:ee,existing:null},l)}function M(){$x(c+".geojson",s.toSavefile())}function k(){$x("debug_route_snapper.geojson",s.toRouteSnapperGj())}const R=ee=>v(Rr(ee.detail.features[0].properties).name),z=()=>Ft(xn,l={mode:"auto-boundaries"},l),U=ee=>v(ee),F=ee=>E(ee),G=ee=>S(ee),H=()=>Ft(xn,l={mode:"title"},l),te=()=>Ft(xn,l={mode:"route",prevMode:"network"},l);return t.$$.update=()=>{t.$$.dirty&2048&&n(0,r=JSON.parse(s.toSavefile())),t.$$.dirty&1&&n(1,i=r.features.filter(ee=>ee.properties.kind=="boundary").map(ee=>ee.properties.name))},[r,i,c,l,d,v,S,E,C,M,k,s,R,z,U,F,G,H,te]}class iB extends Yt{constructor(e){super(),Xt(this,e,rB,nB,Ut,{})}}function oB(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function sB(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function cE(t){let e,n,r;return n=new or({props:{$$slots:{default:[aB]},$$scope:{ctx:t}}}),n.$on("click",t[13]),{c(){e=_e("li"),Ge(n.$$.fragment)},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&16384&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function aB(t){let e;return{c(){e=at("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function lB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[oB]},$$scope:{ctx:t}}}),s.$on("click",t[11]),d=new or({props:{$$slots:{default:[sB]},$$scope:{ctx:t}}}),d.$on("click",t[12]);let M=t[0]=="neighbourhood"&&cE(t);return{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),M&&M.c(),S=Ze(),E=_e("li"),E.textContent="Routing",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(k,R){xe(k,e,R),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),M&&M.m(r,null),oe(r,S),oe(r,E),C=!0},p(k,R){const z={};R&16384&&(z.$$scope={dirty:R,ctx:k}),s.$set(z);const U={};R&16384&&(U.$$scope={dirty:R,ctx:k}),d.$set(U),k[0]=="neighbourhood"?M?(M.p(k,R),R&1&&ue(M,1)):(M=cE(k),M.c(),ue(M,1),M.m(r,S)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn())},i(k){C||(ue(s.$$.fragment,k),ue(d.$$.fragment,k),ue(M),C=!0)},o(k){ye(s.$$.fragment,k),ye(d.$$.fragment,k),ye(M),C=!1},d(k){k&&be(e),je(s),je(d),M&&M.d()}}}function uB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k,R,z,U;return n=new Ey({}),n.$on("click",t[7]),{c(){e=_e("div"),Ge(n.$$.fragment),r=Ze(),i=_e("p"),i.textContent="Drag markers for a route",s=Ze(),c=_e("p"),c.innerHTML=`Route before + , + route after`,l=Ze(),d=_e("label"),v=at("Slow-down factor for main roads: "),S=at(t[1]),E=Ze(),C=_e("input"),M=Ze(),k=_e("i"),k.textContent=`Increase to see how drivers may detour in heavy traffic. 1 means + free-flow.`,Ce(C,"type","range"),Ce(C,"min","1.0"),Ce(C,"max","5.0"),Ce(C,"step","0.1"),Ce(e,"slot","sidebar")},m(F,G){xe(F,e,G),Ue(n,e,null),oe(e,r),oe(e,i),oe(e,s),oe(e,c),oe(e,l),oe(e,d),oe(d,v),oe(d,S),oe(d,E),oe(d,C),es(C,t[1]),oe(e,M),oe(e,k),R=!0,z||(U=[Mt(C,"change",t[10]),Mt(C,"input",t[10])],z=!0)},p(F,G){(!R||G&2)&&hr(S,F[1]),G&2&&es(C,F[1])},i(F){R||(ue(n.$$.fragment,F),R=!0)},o(F){ye(n.$$.fragment,F),R=!1},d(F){F&&be(e),je(n),z=!1,Kr(U)}}}function hE(t){let e,n;return e=new Iy({props:{gjInput:JSON.parse(Rr(t[4]).renderNeighbourhood()),interactive:!1}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.gjInput=JSON.parse(Rr(r[4]).renderNeighbourhood())),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function cB(t){let e,n;const r=[gi("compare-route"),{paint:{"line-width":10,"line-color":Od(["get","kind"],{before:"red",after:"blue"},"red")}}];let i={};for(let s=0;sIl(l,"lngLat",k));function z(F){t[9](F)}let U={draggable:!0,$$slots:{default:[fB]},$$scope:{ctx:t}};return t[2]!==void 0&&(U.lngLat=t[2]),S=new B2({props:U}),ai.push(()=>Il(S,"lngLat",z)),{c(){e=_e("div"),M&&M.c(),n=Ze(),Ge(r.$$.fragment),i=Ze(),Ge(s.$$.fragment),c=Ze(),Ge(l.$$.fragment),v=Ze(),Ge(S.$$.fragment),Ce(e,"slot","map")},m(F,G){xe(F,e,G),M&&M.m(e,null),oe(e,n),Ue(r,e,null),oe(e,i),Ue(s,e,null),oe(e,c),Ue(l,e,null),oe(e,v),Ue(S,e,null),C=!0},p(F,G){F[0]=="neighbourhood"?M?(M.p(F,G),G&1&&ue(M,1)):(M=hE(F),M.c(),ue(M,1),M.m(e,n)):M&&(Un(),ye(M,1,1,()=>{M=null}),jn());const H={};G&32&&(H.data=F[5]),G&16384&&(H.$$scope={dirty:G,ctx:F}),s.$set(H);const te={};G&16384&&(te.$$scope={dirty:G,ctx:F}),!d&&G&8&&(d=!0,te.lngLat=F[3],El(()=>d=!1)),l.$set(te);const ee={};G&16384&&(ee.$$scope={dirty:G,ctx:F}),!E&&G&4&&(E=!0,ee.lngLat=F[2],El(()=>E=!1)),S.$set(ee)},i(F){C||(ue(M),ue(r.$$.fragment,F),ue(s.$$.fragment,F),ue(l.$$.fragment,F),ue(S.$$.fragment,F),C=!0)},o(F){ye(M),ye(r.$$.fragment,F),ye(s.$$.fragment,F),ye(l.$$.fragment,F),ye(S.$$.fragment,F),C=!1},d(F){F&&be(e),M&&M.d(),je(r),je(s),je(l),je(S)}}}function dB(t){let e,n;return e=new bu({props:{$$slots:{map:[pB],sidebar:[uB],top:[lB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&16511&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function mB(t,e,n){let r,i,s,c,l,d;mt(t,xn,U=>n(6,i=U)),mt(t,S2,U=>n(1,s=U)),mt(t,Uv,U=>n(2,c=U)),mt(t,Vv,U=>n(3,l=U)),mt(t,Gi,U=>n(4,d=U));let{prevMode:v}=e;function S(){Ft(xn,i={mode:v},i)}function E(U){l=U,Vv.set(l)}function C(U){c=U,Uv.set(c)}function M(){s=VP(this.value),S2.set(s)}const k=()=>Ft(xn,i={mode:"title"},i),R=()=>Ft(xn,i={mode:"network"},i),z=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=U=>{"prevMode"in U&&n(0,v=U.prevMode)},t.$$.update=()=>{t.$$.dirty&30&&n(5,r=JSON.parse(d.compareRoute(l.lng,l.lat,c.lng,c.lat,s)))},[v,s,c,l,d,r,i,S,E,C,M,k,R,z]}class gB extends Yt{constructor(e){super(),Xt(this,e,mB,dB,Ut,{prevMode:0})}}const fE="/ltn/assets/settings_light-342fb430.svg",pE="/ltn/assets/settings_dark-088e95f1.svg";function dE(t){let e,n;return e=new d1({props:{$$slots:{default:[_B]},$$scope:{ctx:t}}}),e.$on("close",t[5]),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&67&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function _B(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;return r=new kz({}),{c(){e=_e("h1"),e.textContent="Settings",n=Ze(),Ge(r.$$.fragment),i=Ze(),s=_e("label"),c=_e("input"),l=at(` + Light mode`),d=Ze(),v=_e("center"),S=_e("button"),S.textContent="Confirm",Ce(c,"type","checkbox"),Ce(c,"role","switch")},m(k,R){xe(k,e,R),xe(k,n,R),Ue(r,k,R),xe(k,i,R),xe(k,s,R),oe(s,c),c.checked=t[0],oe(s,l),xe(k,d,R),xe(k,v,R),oe(v,S),E=!0,C||(M=[Mt(c,"change",t[3]),Mt(S,"click",t[4])],C=!0)},p(k,R){R&1&&(c.checked=k[0])},i(k){E||(ue(r.$$.fragment,k),E=!0)},o(k){ye(r.$$.fragment,k),E=!1},d(k){k&&(be(e),be(n),be(i),be(s),be(d),be(v)),je(r,k),C=!1,Kr(M)}}}function yB(t){let e,n,r,i,s,c,l,d,v=t[1]&&dE(t);return{c(){e=_e("button"),n=_e("img"),i=Ze(),v&&v.c(),s=Fi(),Wn(n.src,r=t[0]?fE:pE)||Ce(n,"src",r),Ce(n,"alt","Settings"),Ce(e,"class","outline")},m(S,E){xe(S,e,E),oe(e,n),xe(S,i,E),v&&v.m(S,E),xe(S,s,E),c=!0,l||(d=Mt(e,"click",t[2]),l=!0)},p(S,[E]){(!c||E&1&&!Wn(n.src,r=S[0]?fE:pE))&&Ce(n,"src",r),S[1]?v?(v.p(S,E),E&2&&ue(v,1)):(v=dE(S),v.c(),ue(v,1),v.m(s.parentNode,s)):v&&(Un(),ye(v,1,1,()=>{v=null}),jn())},i(S){c||(ue(v),c=!0)},o(S){ye(v),c=!1},d(S){S&&(be(e),be(i),be(s)),v&&v.d(S),l=!1,d()}}}function vB(t,e,n){let r;mt(t,Jd,v=>n(0,r=v));let i=!1;const s=()=>n(1,i=!0);function c(){r=this.checked,Jd.set(r)}const l=()=>n(1,i=!1),d=()=>n(1,i=!1);return t.$$.update=()=>{t.$$.dirty&1&&document.documentElement.setAttribute("data-theme",r?"light":"dark")},[r,i,s,c,l,d]}class bB extends Yt{constructor(e){super(),Xt(this,e,vB,yB,Ut,{})}}const NT=Nn({type:"FeatureCollection",features:[]}),xB=Nn(!0),OT=Nn(0),$_=Nn(!1),K_=Nn({type:"FeatureCollection",features:[]});function wB(t){let e,n,r,i,s,c;const l=[gi("route-points"),{filter:yz},{paint:{"circle-color":Od(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":Od(["get","type"],{node:Zg/2},Zg)}}];let d={};for(let M=0;Mn(0,r=c)),mt(t,K_,c=>n(1,i=c)),mt(t,$_,c=>n(2,s=c)),[r,i,s]}class CB extends Yt{constructor(e){super(),Xt(this,e,IB,EB,Ut,{})}}function TB(t){let e,n,r;return{c(){e=at("Undo ("),n=at(t[2]),r=at(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&4&&hr(n,i[2])},d(i){i&&(be(e),be(n),be(r))}}}function LB(t){let e;return{c(){e=at("Undo")},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function PB(t){let e,n,r,i,s,c,l,d,v,S;function E(k,R){return k[2]==0?LB:TB}let C=E(t),M=C(t);return{c(){e=_e("button"),M.c(),r=Ze(),i=_e("label"),s=_e("input"),c=at(` + Show all snappable points`),l=Ze(),d=_e("ul"),d.innerHTML=`
  • Click + the map to add points
  • Click and drag + any point to move it
  • Click + a waypoint to delete it
  • Press Control+Z + to undo your last change
  • Press Enter + or + double click + to finish
  • Press Escape + to cancel
  • `,e.disabled=n=t[2]==0,Ce(e,"data-tooltip","Ctrl+Z"),Ce(s,"type","checkbox")},m(k,R){xe(k,e,R),M.m(e,null),xe(k,r,R),xe(k,i,R),oe(i,s),s.checked=t[1],oe(i,c),xe(k,l,R),xe(k,d,R),v||(S=[Mt(e,"click",t[3]),Mt(s,"change",t[4])],v=!0)},p(k,[R]){C===(C=E(k))&&M?M.p(k,R):(M.d(1),M=C(k),M&&(M.c(),M.m(e,null))),R&4&&n!==(n=k[2]==0)&&(e.disabled=n),R&2&&(s.checked=k[1])},i:Lt,o:Lt,d(k){k&&(be(e),be(r),be(i),be(l),be(d)),M.d(),v=!1,Kr(S)}}}function MB(t,e,n){let r,i,s;mt(t,$_,S=>n(1,r=S)),mt(t,K_,S=>n(5,i=S)),mt(t,OT,S=>n(2,s=S));let{route_tool:c}=e;function l(S){S&&i.features.length==0&&Ft(K_,i=JSON.parse(c.inner.debugSnappableNodes()),i)}const d=()=>c.undo();function v(){r=this.checked,$_.set(r)}return t.$$set=S=>{"route_tool"in S&&n(0,c=S.route_tool)},t.$$.update=()=>{t.$$.dirty&2&&l(r)},[c,r,s,d,v]}class AB extends Yt{constructor(e){super(),Xt(this,e,MB,PB,Ut,{route_tool:0})}}function kB(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function DB(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function RB(t){let e;return{c(){e=_e("li"),e.textContent="Creating new neighbourhood boundary"},m(n,r){xe(n,e,r)},p:Lt,i:Lt,o:Lt,d(n){n&&be(e)}}}function NB(t){let e,n,r,i,s;return n=new or({props:{$$slots:{default:[OB]},$$scope:{ctx:t}}}),n.$on("click",t[8]),{c(){e=_e("li"),Ge(n.$$.fragment),r=Ze(),i=_e("li"),i.textContent="Changing neighbourhood boundary"},m(c,l){xe(c,e,l),Ue(n,e,null),xe(c,r,l),xe(c,i,l),s=!0},p(c,l){const d={};l&1024&&(d.$$scope={dirty:l,ctx:c}),n.$set(d)},i(c){s||(ue(n.$$.fragment,c),s=!0)},o(c){ye(n.$$.fragment,c),s=!1},d(c){c&&(be(e),be(r),be(i)),je(n)}}}function OB(t){let e;return{c(){e=at("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function zB(t){let e,n,r,i,s,c,l,d,v,S,E,C;s=new or({props:{$$slots:{default:[kB]},$$scope:{ctx:t}}}),s.$on("click",t[6]),d=new or({props:{$$slots:{default:[DB]},$$scope:{ctx:t}}}),d.$on("click",t[7]);const M=[NB,RB],k=[];function R(z,U){return z[1]?0:1}return S=R(t),E=k[S]=M[S](t),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),E.c(),Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(z,U){xe(z,e,U),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),k[S].m(r,null),C=!0},p(z,U){const F={};U&1024&&(F.$$scope={dirty:U,ctx:z}),s.$set(F);const G={};U&1024&&(G.$$scope={dirty:U,ctx:z}),d.$set(G);let H=S;S=R(z),S===H?k[S].p(z,U):(Un(),ye(k[H],1,1,()=>{k[H]=null}),jn(),E=k[S],E?E.p(z,U):(E=k[S]=M[S](z),E.c()),ue(E,1),E.m(r,null))},i(z){C||(ue(s.$$.fragment,z),ue(d.$$.fragment,z),ue(E),C=!0)},o(z){ye(s.$$.fragment,z),ye(d.$$.fragment,z),ye(E),C=!1},d(z){z&&be(e),je(s),je(d),k[S].d()}}}function FB(t){let e;return{c(){e=at("Finish")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function BB(t){let e;return{c(){e=at("Cancel")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function VB(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k;return l=new or({props:{$$slots:{default:[FB]},$$scope:{ctx:t}}}),l.$on("click",t[5]),v=new or({props:{$$slots:{default:[BB]},$$scope:{ctx:t}}}),v.$on("click",t[4]),M=new AB({props:{route_tool:Rr(t[2])}}),{c(){e=_e("div"),n=_e("h1"),r=at("Draw your neighbourhood boundary for "),i=at(t[0]),s=Ze(),c=_e("div"),Ge(l.$$.fragment),d=Ze(),Ge(v.$$.fragment),S=Ze(),E=_e("p"),E.textContent="TODO: maybe move the instructions from the previous screen to here...",C=Ze(),Ge(M.$$.fragment),sr(c,"display","flex"),sr(c,"justify-content","space-between"),Ce(e,"slot","sidebar")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(n,i),oe(e,s),oe(e,c),Ue(l,c,null),oe(c,d),Ue(v,c,null),oe(e,S),oe(e,E),oe(e,C),Ue(M,e,null),k=!0},p(R,z){(!k||z&1)&&hr(i,R[0]);const U={};z&1024&&(U.$$scope={dirty:z,ctx:R}),l.$set(U);const F={};z&1024&&(F.$$scope={dirty:z,ctx:R}),v.$set(F);const G={};z&4&&(G.route_tool=Rr(R[2])),M.$set(G)},i(R){k||(ue(l.$$.fragment,R),ue(v.$$.fragment,R),ue(M.$$.fragment,R),k=!0)},o(R){ye(l.$$.fragment,R),ye(v.$$.fragment,R),ye(M.$$.fragment,R),k=!1},d(R){R&&be(e),je(l),je(v),je(M)}}}function UB(t){let e,n,r;return n=new CB({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Lt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function jB(t){let e,n;return e=new bu({props:{$$slots:{map:[UB],sidebar:[VB],top:[zB]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1039&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function GB(t,e,n){let r,i,s;mt(t,k_,M=>n(2,r=M)),mt(t,xn,M=>n(3,i=M)),mt(t,Gi,M=>n(9,s=M));let{name:c}=e,{existing:l}=e;l?r.editExistingArea(l):r.startArea(),ro(()=>{r==null||r.clearEventListeners(),r==null||r.stop()});function d(){l?Ft(xn,i={mode:"neighbourhood"},i):Ft(xn,i={mode:"network"},i)}r.addEventListenerSuccess(M=>{try{s.setNeighbourhoodBoundary(c,M),Rf(),s.setCurrentNeighbourhood(c),Ft(xn,i={mode:"neighbourhood"},i)}catch{window.alert("Known georust bug hit, sorry. You may need to just refresh the page now."),d()}}),r.addEventListenerFailure(d);const v=()=>Rr(r).finish(),S=()=>Ft(xn,i={mode:"title"},i),E=()=>Ft(xn,i={mode:"network"},i),C=()=>Ft(xn,i={mode:"neighbourhood"},i);return t.$$set=M=>{"name"in M&&n(0,c=M.name),"existing"in M&&n(1,l=M.existing)},[c,l,r,i,d,v,S,E,C]}class qB extends Yt{constructor(e){super(),Xt(this,e,GB,jB,Ut,{name:0,existing:1})}}function WB(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function HB(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function ZB(t){let e,n,r,i,s,c,l,d,v,S,E;return s=new or({props:{$$slots:{default:[WB]},$$scope:{ctx:t}}}),s.$on("click",t[4]),d=new or({props:{$$slots:{default:[HB]},$$scope:{ctx:t}}}),d.$on("click",t[5]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),S=_e("li"),S.textContent="Use an auto-generated boundary",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),E=!0},p(C,M){const k={};M&128&&(k.$$scope={dirty:M,ctx:C}),s.$set(k);const R={};M&128&&(R.$$scope={dirty:M,ctx:C}),d.$set(R)},i(C){E||(ue(s.$$.fragment,C),ue(d.$$.fragment,C),E=!0)},o(C){ye(s.$$.fragment,C),ye(d.$$.fragment,C),E=!1},d(C){C&&be(e),je(s),je(d)}}}function XB(t){let e,n,r,i,s;return n=new Ey({}),n.$on("click",t[3]),{c(){e=_e("div"),Ge(n.$$.fragment),r=Ze(),i=_e("p"),i.textContent=`Click an area to use it as a neighbourhood. These are generated by finding + roads, railways, and water thatform severances. There are many bugs; this + is experimental.`,Ce(e,"slot","sidebar")},m(c,l){xe(c,e,l),Ue(n,e,null),oe(e,r),oe(e,i),s=!0},p:Lt,i(c){s||(ue(n.$$.fragment,c),s=!0)},o(c){ye(n.$$.fragment,c),s=!1},d(c){c&&be(e),je(n)}}}function YB(t){let e,n,r,i;const s=[gi("auto-boundaries-areas"),{manageHoverState:!0},{paint:{"fill-color":Nf("cyan","red"),"fill-opacity":.3}},{hoverCursor:"pointer"}];let c={};for(let v=0;vn(0,r=S)),mt(t,Gi,S=>n(6,i=S));let s=JSON.parse(i.renderAutoBoundaries());function c(S){let E=window.prompt("What do you want to name the neighbourhood?");if(E)try{let C={type:"Feature",properties:{},geometry:s.features[S.detail.features[0].id].geometry};i.setNeighbourhoodBoundary(E,C),Rf(),i.setCurrentNeighbourhood(E),Ft(xn,r={mode:"neighbourhood"},r)}catch(C){console.log(C),window.alert("Known georust bug hit, sorry. You may need to just refresh the page now.")}}return[r,s,c,()=>Ft(xn,r={mode:"network"},r),()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class QB extends Yt{constructor(e){super(),Xt(this,e,JB,KB,Ut,{})}}const e8=["==",["geometry-type"],"Polygon"],t8=["==",["geometry-type"],"LineString"],n8=["==",["geometry-type"],"Point"];function zT(){return{type:"FeatureCollection",features:[]}}function cv(t){return{type:"Feature",properties:{},geometry:{type:"Point",coordinates:FT(t)}}}function FT(t){return[Math.round(t[0]*1e7)/1e7,Math.round(t[1]*1e7)/1e7]}const BT=Nn(zT()),VT=Nn(0),r8=100;class i8{constructor(e){Mi(this,"map");Mi(this,"active");Mi(this,"eventListenersSuccess");Mi(this,"eventListenersUpdated");Mi(this,"eventListenersFailure");Mi(this,"points");Mi(this,"cursor");Mi(this,"hover");Mi(this,"dragFrom");Mi(this,"previousStates");Mi(this,"onMouseMove",e=>{if(this.active&&!this.dragFrom)this.recalculateHovering(e);else if(this.active&&this.dragFrom){if(this.hover=="polygon"){let n=this.dragFrom[0]-e.lngLat.lng,r=this.dragFrom[1]-e.lngLat.lat;for(let i of this.points)i[0]-=n,i[1]-=r}else this.points[this.hover]=e.lngLat.toArray();this.dragFrom=e.lngLat.toArray(),this.redraw()}});Mi(this,"onClick",e=>{if(this.beforeUpdate(),this.active&&this.cursor){let n=[];if(mE(this.points).forEach((r,i)=>{n.push([i+1,vR(r,this.cursor).properties.dist])}),n.sort((r,i)=>r[1]-i[1]),n.length>0){let r=n[0][0];this.points.splice(r,0,this.cursor.geometry.coordinates),this.hover=r}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(e))});Mi(this,"onDoubleClick",e=>{this.active&&(e.preventDefault(),this.cursor=cv(e.lngLat.toArray()),this.onClick(e),this.finish())});Mi(this,"onMouseDown",e=>{this.active&&!this.dragFrom&&this.hover!=null&&(e.preventDefault(),this.cursor=null,this.dragFrom=e.lngLat.toArray(),this.beforeUpdate(),this.redraw())});Mi(this,"onMouseUp",()=>{this.active&&this.dragFrom&&(this.dragFrom=null,this.redraw(),this.pointsUpdated())});Mi(this,"onKeypress",e=>{this.active&&(e.key=="Enter"?(e.stopPropagation(),this.finish()):e.key=="z"&&e.ctrlKey&&this.undo())});Mi(this,"onKeyDown",e=>{this.active&&e.key=="Escape"&&(e.stopPropagation(),this.cancel())});this.map=e,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 e=this.polygonFeature();if(e)for(let n of this.eventListenersSuccess)n(e);else for(let n of this.eventListenersFailure)n();this.stop()}cancel(){for(let e of this.eventListenersFailure)e();this.stop()}addEventListenerSuccess(e){this.eventListenersSuccess.push(e)}addEventListenerUpdated(e){this.eventListenersUpdated.push(e)}addEventListenerFailure(e){this.eventListenersFailure.push(e)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}startNew(){this.active=!0,this.map.doubleClickZoom.disable()}editExisting(e){this.active=!0,this.map.doubleClickZoom.disable(),this.points=JSON.parse(JSON.stringify(e.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 e=zT();this.points.forEach((i,s)=>{let c=cv(i);c.properties.hover=this.hover==s,c.properties.idx=s,e.features.push(c)}),e.features=e.features.concat(mE(this.points));let n=this.polygonFeature();n&&(n.properties.hover=this.hover=="polygon",e.features.push(n)),BT.set(e);let r="crosshair";this.hover!=null&&(r=this.dragFrom?"grabbing":"pointer"),this.map.getCanvas().style.cursor=r,VT.set(this.previousStates.length)}pointsUpdated(){let e=this.polygonFeature();if(e)for(let n of this.eventListenersUpdated)n(e)}recalculateHovering(e){this.cursor=null,this.hover=null;for(let n of this.map.queryRenderedFeatures(e.point,{layers:["edit-polygon-fill","edit-polygon-vertices"]}))if(n.geometry.type=="Polygon"){this.hover="polygon";break}else if(n.geometry.type=="Point"&&Object.hasOwn(n.properties,"idx")){this.hover=n.properties.idx;break}this.hover==null&&(this.cursor=cv(e.lngLat.toArray())),this.redraw()}polygonFeature(){if(this.points.length<3)return null;let e=this.points.map(FT),n=[JSON.parse(JSON.stringify(e))];return n[0].push(JSON.parse(JSON.stringify(n[0][0]))),{type:"Feature",geometry:{type:"Polygon",coordinates:n},properties:{}}}beforeUpdate(){this.previousStates.push(JSON.parse(JSON.stringify(this.points))),this.previousStates.length>r8&&this.previousStates.shift()}}function mE(t){let e=[];for(let n=0;n=3&&e.push({type:"Feature",geometry:{type:"LineString",coordinates:[t[t.length-1],t[0]]},properties:{}}),e}function o8(t){let e,n,r;return{c(){e=at("Undo ("),n=at(t[1]),r=at(")")},m(i,s){xe(i,e,s),xe(i,n,s),xe(i,r,s)},p(i,s){s&2&&hr(n,i[1])},d(i){i&&(be(e),be(n),be(r))}}}function s8(t){let e;return{c(){e=at("Undo")},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function a8(t){let e,n,r,i,s,c,l,d,v,S,E;function C(R,z){return R[1]==0?s8:o8}let M=C(t),k=M(t);return{c(){e=_e("div"),n=_e("button"),n.textContent="Finish",r=Ze(),i=_e("button"),i.textContent="Cancel",s=Ze(),c=_e("button"),k.c(),d=Ze(),v=_e("ul"),v.innerHTML=`
  • Click + the map to add a vertex
  • Click + a vertex to delete it
  • Drag + a vertex or the polygon to move it
  • Press Control+Z + to undo your last change
  • Press Enter + or + double click + to finish
  • Press Escape + to cancel
  • `,c.disabled=l=t[1]==0,sr(e,"display","flex"),sr(e,"justify-content","space-between")},m(R,z){xe(R,e,z),oe(e,n),oe(e,r),oe(e,i),oe(e,s),oe(e,c),k.m(c,null),xe(R,d,z),xe(R,v,z),S||(E=[Mt(n,"click",t[2]),Mt(i,"click",t[3]),Mt(c,"click",t[4])],S=!0)},p(R,[z]){M===(M=C(R))&&k?k.p(R,z):(k.d(1),k=M(R),k&&(k.c(),k.m(c,null))),z&2&&l!==(l=R[1]==0)&&(c.disabled=l)},i:Lt,o:Lt,d(R){R&&(be(e),be(d),be(v)),k.d(),S=!1,Kr(E)}}}function l8(t,e,n){let r;mt(t,VT,d=>n(1,r=d));let{polygonTool:i}=e;const s=()=>i.finish(),c=()=>i.cancel(),l=()=>i.undo();return t.$$set=d=>{"polygonTool"in d&&n(0,i=d.polygonTool)},[i,r,s,c,l]}class u8 extends Yt{constructor(e){super(),Xt(this,e,l8,a8,Ut,{polygonTool:0})}}let c8=Date.now();function Pm(t){return`${t}-${c8++}`}const UT=Symbol.for("svelte-maplibre");function h8(){return zE(UT)}function gE(t){return{subscribe:t.subscribe}}function jT({key:t,setPopupTarget:e=!1,setCluster:n=!1,setMouseEvent:r=!1}){let i=h8(),s=Nn(null),c=gE(s),l={...i,[t]:gE(s)};if(e&&(l.popupTarget=c),r){let d=Nn(null);l.layerEvent=d,i.layerEvent=d}return n&&(l.cluster=Nn()),f1(UT,l),{...i,self:s}}function f8(){return jT({key:"source",setCluster:!0})}function p8(t=!0){return jT({key:"layer",setPopupTarget:t,setMouseEvent:t})}function _E(t){let e;return n=>{if(n)for(let r in n){let i=e==null?void 0:e[r],s=n[r];i!==s&&t(r,s,i)}else if(e)for(let r in e)t(r,void 0,e[r]);e=n}}function d8(t,...e){let n=[t];for(let r of e)if(r)Array.isArray(r)&&r[0]===t?n.push(...r.slice(1)):n.push(r);else continue;if(n.length!==1)return n.length===2?n[1]:n}function m8(t){return t===!0?["has","point_count"]:t===!1?["!",["has","point_count"]]:void 0}function yE(t){let e=t[0],n,r,i=vE(t);return{c(){i.c(),n=Fi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c[0]&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Lt),jn(),i=vE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function vE(t){let e;const n=t[36].default,r=Sr(n,t,t[35],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s[1]&16)&&Ir(r,n,i,i[35],e?Er(n,i[35],s,null):Cr(i[35]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function g8(t){let e,n,r=t[0]&&yE(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,s){i[0]?r?(r.p(i,s),s[0]&1&&ue(r,1)):(r=yE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function _8(t,e,n){let r,i,s,c,l,d,v,S,E,C,M,k,{$$slots:R={},$$scope:z}=e,{id:U=Pm("layer")}=e,{source:F=void 0}=e,{sourceLayer:G=void 0}=e,{beforeId:H=void 0}=e,{beforeLayerType:te=void 0}=e,{type:ee}=e,{paint:fe=void 0}=e,{layout:pe=void 0}=e,{filter:se=void 0}=e,{applyToClusters:Ae=void 0}=e,{minzoom:Y=void 0}=e,{maxzoom:ae=void 0}=e,{manageHoverState:Ke=!1}=e,{hovered:Le=null}=e,{interactive:tt=!0}=e,{hoverCursor:ut=void 0}=e,{eventsIfTopMost:We=!1}=e;const Ot=vu(),{map:Gt,source:vt,self:At,minzoom:Pt,maxzoom:rn,eventTopMost:wn,layerInfo:fn}=p8();mt(t,Gt,ne=>n(31,E=ne)),mt(t,vt,ne=>n(32,C=ne)),mt(t,At,ne=>n(0,S=ne)),mt(t,Pt,ne=>n(34,k=ne)),mt(t,rn,ne=>n(33,M=ne)),ro(()=>{S&&E&&(fn.delete(S),E==null||E.removeLayer(S))});let _n;function pn(ne){var Re,It;if(!tt||!S||!E||We&&wn(ne)!==S)return;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en={event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me};Ot(ne.type,en)}function Yn(ne){var Re,It;if(!tt||!S||!E||We&&wn(ne)!==S)return;ut&&(E.getCanvas().style.cursor=ut);let Me=ne.features??[];n(6,Le=Me[0]??null);let dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id;Ot("mouseenter",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function zr(ne){var Re,It,Cn;if(!tt||!E)return;if(We&&wn(ne)!==S){n(6,Le=null),Ke&&_n!==void 0&&(E==null||E.setFeatureState({source:l,sourceLayer:G,id:_n},{hover:!1}),_n=void 0);return}E.getCanvas().style.cursor=ut;let Me=ne.features??[],dt=(It=(Re=Me[0])==null?void 0:Re.properties)==null?void 0:It.cluster_id,en=(Cn=Me[0])==null?void 0:Cn.id;en!==_n&&(Ke&&(_n!==void 0&&(E==null||E.setFeatureState({source:l,id:_n,sourceLayer:G},{hover:!1})),E==null||E.setFeatureState({source:l,id:en,sourceLayer:G},{hover:!0})),_n=en,n(6,Le=Me[0]??null)),Ot("mousemove",{event:ne,map:E,clusterId:dt,layer:S,source:l,features:Me})}function Pn(ne){if(!(!tt||!S||!E)){if(ut&&(E.getCanvas().style.cursor=""),n(6,Le=null),Ke&&_n!==void 0){const Me={source:l,id:_n,sourceLayer:G};E==null||E.setFeatureState(Me,{hover:!1}),_n=void 0}Ot("mouseleave",{map:E,layer:S,source:l})}}let ar=!0;function Zn(ne){E&&(E.off("click",ne,pn),E.off("dblclick",ne,pn),E.off("contextmenu",ne,pn),E.off("mouseenter",ne,Yn),E.off("mousemove",ne,zr),E.off("mouseleave",ne,Pn))}return ro(()=>{E&&S&&Zn(S)}),t.$$set=ne=>{"id"in ne&&n(7,U=ne.id),"source"in ne&&n(8,F=ne.source),"sourceLayer"in ne&&n(9,G=ne.sourceLayer),"beforeId"in ne&&n(10,H=ne.beforeId),"beforeLayerType"in ne&&n(11,te=ne.beforeLayerType),"type"in ne&&n(12,ee=ne.type),"paint"in ne&&n(13,fe=ne.paint),"layout"in ne&&n(14,pe=ne.layout),"filter"in ne&&n(15,se=ne.filter),"applyToClusters"in ne&&n(16,Ae=ne.applyToClusters),"minzoom"in ne&&n(17,Y=ne.minzoom),"maxzoom"in ne&&n(18,ae=ne.maxzoom),"manageHoverState"in ne&&n(19,Ke=ne.manageHoverState),"hovered"in ne&&n(6,Le=ne.hovered),"interactive"in ne&&n(20,tt=ne.interactive),"hoverCursor"in ne&&n(21,ut=ne.hoverCursor),"eventsIfTopMost"in ne&&n(22,We=ne.eventsIfTopMost),"$$scope"in ne&&n(35,z=ne.$$scope)},t.$$.update=()=>{if(t.$$.dirty[0]&65536&&n(30,r=m8(Ae)),t.$$.dirty[0]&1073774592&&n(24,i=d8("all",r,se)),t.$$.dirty[0]&131072|t.$$.dirty[1]&8&&n(26,s=Y??k),t.$$.dirty[0]&262144|t.$$.dirty[1]&4&&n(25,c=ae??M),t.$$.dirty[0]&256|t.$$.dirty[1]&2&&n(29,l=F||C),t.$$.dirty[0]&654343809|t.$$.dirty[1]&1&&E&&S!==U&&l){S&&(Zn(S),fn.delete(S));let ne=H;if(!H&&te){let Me=E.getStyle().layers,dt=typeof te=="function"?te:Re=>Re.type===te,en=Me==null?void 0:Me.find(dt);en&&(ne=en.id)}Ft(At,S=U,S),E.addLayer(Xc({id:S,type:ee,source:l,"source-layer":G,filter:i,paint:fe,layout:pe,minzoom:s,maxzoom:c}),ne),n(23,ar=!0),E.on("click",S,pn),E.on("dblclick",S,pn),E.on("contextmenu",S,pn),E.on("mouseenter",S,Yn),E.on("mousemove",S,zr),E.on("mouseleave",S,Pn)}t.$$.dirty[0]&1048577&&S&&fn.set(S,{interactive:tt}),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(28,d=S?_E((ne,Me)=>E==null?void 0:E.setPaintProperty(S,ne,Me)):void 0),t.$$.dirty[0]&1|t.$$.dirty[1]&1&&n(27,v=S?_E((ne,Me)=>E==null?void 0:E.setLayoutProperty(S,ne,Me)):void 0),t.$$.dirty[0]&268443648&&(d==null||d(fe)),t.$$.dirty[0]&134234112&&(v==null||v(pe)),t.$$.dirty[0]&100663297|t.$$.dirty[1]&1&&S&&(E==null||E.setLayerZoomRange(S,s,c)),t.$$.dirty[0]&25165825|t.$$.dirty[1]&1&&S&&(ar?n(23,ar=!1):E==null||E.setFilter(S,i))},[S,Gt,vt,At,Pt,rn,Le,U,F,G,H,te,ee,fe,pe,se,Ae,Y,ae,Ke,tt,ut,We,ar,i,c,s,v,d,l,r,E,C,M,k,z,R]}class mb extends Yt{constructor(e){super(),Xt(this,e,_8,g8,Ut,{id:7,source:8,sourceLayer:9,beforeId:10,beforeLayerType:11,type:12,paint:13,layout:14,filter:15,applyToClusters:16,minzoom:17,maxzoom:18,manageHoverState:19,hovered:6,interactive:20,hoverCursor:21,eventsIfTopMost:22},null,[-1,-1])}}function y8(t){let e;const n=t[16].default,r=Sr(n,t,t[24],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16777216)&&Ir(r,n,i,i[24],e?Er(n,i[24],s,null):Cr(i[24]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function v8(t){let e,n,r;function i(c){t[17](c)}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:[y8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new mb({props:s}),ai.push(()=>Il(e,"hovered",i)),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(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.applyToClusters=c[9]),l&1024&&(d.minzoom=c[10]),l&2048&&(d.maxzoom=c[11]),l&4096&&(d.hoverCursor=c[12]),l&8192&&(d.manageHoverState=c[13]),l&16384&&(d.eventsIfTopMost=c[14]),l&32768&&(d.interactive=c[15]),l&16777216&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function b8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Pm("circle")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{applyToClusters:M=void 0}=e,{minzoom:k=void 0}=e,{maxzoom:R=void 0}=e,{hoverCursor:z=void 0}=e,{manageHoverState:U=!1}=e,{hovered:F=null}=e,{eventsIfTopMost:G=!1}=e,{interactive:H=!0}=e;function te(ae){F=ae,n(0,F)}function ee(ae){gn.call(this,t,ae)}function fe(ae){gn.call(this,t,ae)}function pe(ae){gn.call(this,t,ae)}function se(ae){gn.call(this,t,ae)}function Ae(ae){gn.call(this,t,ae)}function Y(ae){gn.call(this,t,ae)}return t.$$set=ae=>{"id"in ae&&n(1,s=ae.id),"source"in ae&&n(2,c=ae.source),"sourceLayer"in ae&&n(3,l=ae.sourceLayer),"beforeId"in ae&&n(4,d=ae.beforeId),"beforeLayerType"in ae&&n(5,v=ae.beforeLayerType),"paint"in ae&&n(6,S=ae.paint),"layout"in ae&&n(7,E=ae.layout),"filter"in ae&&n(8,C=ae.filter),"applyToClusters"in ae&&n(9,M=ae.applyToClusters),"minzoom"in ae&&n(10,k=ae.minzoom),"maxzoom"in ae&&n(11,R=ae.maxzoom),"hoverCursor"in ae&&n(12,z=ae.hoverCursor),"manageHoverState"in ae&&n(13,U=ae.manageHoverState),"hovered"in ae&&n(0,F=ae.hovered),"eventsIfTopMost"in ae&&n(14,G=ae.eventsIfTopMost),"interactive"in ae&&n(15,H=ae.interactive),"$$scope"in ae&&n(24,i=ae.$$scope)},[F,s,c,l,d,v,S,E,C,M,k,R,z,U,G,H,r,te,ee,fe,pe,se,Ae,Y,i]}class x8 extends Yt{constructor(e){super(),Xt(this,e,b8,v8,Ut,{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 w8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function S8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"fill",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[w8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new mb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function E8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Pm("fill")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,k=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,k,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class I8 extends Yt{constructor(e){super(),Xt(this,e,E8,S8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function C8(t,e,n,r,i){let s=!1;t.getSource(e)&&(s=!0,t.removeSource(e));const c=()=>{r(e)&&(t.addSource(e,n),i())};if(s){const l=()=>{e&&(t.getSource(e)?setTimeout(l,1):c())};l()}else c()}function T8(t,e,n){VE().then(()=>{let r=ca(t);if(!r)return;r.getSource(e)===n&&r.removeSource(e)})}function bE(t){let e=t[0],n,r,i=xE(t);return{c(){i.c(),n=Fi()},m(s,c){i.m(s,c),xe(s,n,c),r=!0},p(s,c){c&1&&Ut(e,e=s[0])?(Un(),ye(i,1,1,Lt),jn(),i=xE(s),i.c(),ue(i,1),i.m(n.parentNode,n)):i.p(s,c)},i(s){r||(ue(i),r=!0)},o(s){ye(i),r=!1},d(s){s&&be(n),i.d(s)}}}function xE(t){let e;const n=t[15].default,r=Sr(n,t,t[14],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&16384)&&Ir(r,n,i,i[14],e?Er(n,i[14],s,null):Cr(i[14]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function L8(t){let e,n,r=t[0]&&bE(t);return{c(){r&&r.c(),e=Fi()},m(i,s){r&&r.m(i,s),xe(i,e,s),n=!0},p(i,[s]){i[0]?r?(r.p(i,s),s&1&&ue(r,1)):(r=bE(i),r.c(),ue(r,1),r.m(e.parentNode,e)):r&&(Un(),ye(r,1,1,()=>{r=null}),jn())},i(i){n||(ue(r),n=!0)},o(i){ye(r),n=!1},d(i){i&&be(e),r&&r.d(i)}}}function P8(t,e,n){let r,i,s,{$$slots:c={},$$scope:l}=e,{id:d=Pm("geojson")}=e,{data:v}=e,{generateId:S=!1}=e,{promoteId:E=void 0}=e,{filter:C=void 0}=e,{lineMetrics:M=void 0}=e,{cluster:k=void 0}=e;const{map:R,cluster:z,self:U}=f8();mt(t,R,H=>n(13,i=H)),mt(t,z,H=>n(16,s=H)),mt(t,U,H=>n(0,r=H));let F,G=!0;return ro(()=>{r&&F&&i&&(T8(R,r,F),Ft(U,r=null,r),n(11,F=void 0))}),t.$$set=H=>{"id"in H&&n(4,d=H.id),"data"in H&&n(5,v=H.data),"generateId"in H&&n(6,S=H.generateId),"promoteId"in H&&n(7,E=H.promoteId),"filter"in H&&n(8,C=H.filter),"lineMetrics"in H&&n(9,M=H.lineMetrics),"cluster"in H&&n(10,k=H.cluster),"$$scope"in H&&n(14,l=H.$$scope)},t.$$.update=()=>{t.$$.dirty&1024&&Ft(z,s=k,s),t.$$.dirty&12273&&i&&r!==d&&(Ft(U,r=d,r),C8(i,r,Xc({type:"geojson",data:v,filter:C,lineMetrics:M,generateId:S,promoteId:E,cluster:!!k,clusterMinPoints:k==null?void 0:k.minPoints,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius,clusterProperties:k==null?void 0:k.properties}),H=>i&&H===r,()=>{r&&(n(11,F=i==null?void 0:i.getSource(r)),n(12,G=!0))})),t.$$.dirty&8208&&(i==null||i.on("style.load",()=>{n(11,F=i==null?void 0:i.getSource(d))})),t.$$.dirty&6176&&F&&(G?n(12,G=!1):F.setData(v)),t.$$.dirty&3072&&(F==null||F.setClusterOptions(Xc({cluster:!!k,clusterMaxZoom:k==null?void 0:k.maxZoom,clusterRadius:k==null?void 0:k.radius})))},[r,R,z,U,d,v,S,E,C,M,k,F,G,i,l,c]}class M8 extends Yt{constructor(e){super(),Xt(this,e,P8,L8,Ut,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function A8(t){let e;const n=t[15].default,r=Sr(n,t,t[23],null);return{c(){r&&r.c()},m(i,s){r&&r.m(i,s),e=!0},p(i,s){r&&r.p&&(!e||s&8388608)&&Ir(r,n,i,i[23],e?Er(n,i[23],s,null):Cr(i[23]),null)},i(i){e||(ue(r,i),e=!0)},o(i){ye(r,i),e=!1},d(i){r&&r.d(i)}}}function k8(t){let e,n,r;function i(c){t[16](c)}let s={id:t[1],type:"line",source:t[2],sourceLayer:t[3],beforeId:t[4],beforeLayerType:t[5],paint:t[6],layout:t[7],filter:t[8],minzoom:t[9],maxzoom:t[10],hoverCursor:t[11],manageHoverState:t[12],eventsIfTopMost:t[13],interactive:t[14],$$slots:{default:[A8]},$$scope:{ctx:t}};return t[0]!==void 0&&(s.hovered=t[0]),e=new mb({props:s}),ai.push(()=>Il(e,"hovered",i)),e.$on("click",t[17]),e.$on("dblclick",t[18]),e.$on("contextmenu",t[19]),e.$on("mouseenter",t[20]),e.$on("mousemove",t[21]),e.$on("mouseleave",t[22]),{c(){Ge(e.$$.fragment)},m(c,l){Ue(e,c,l),r=!0},p(c,[l]){const d={};l&2&&(d.id=c[1]),l&4&&(d.source=c[2]),l&8&&(d.sourceLayer=c[3]),l&16&&(d.beforeId=c[4]),l&32&&(d.beforeLayerType=c[5]),l&64&&(d.paint=c[6]),l&128&&(d.layout=c[7]),l&256&&(d.filter=c[8]),l&512&&(d.minzoom=c[9]),l&1024&&(d.maxzoom=c[10]),l&2048&&(d.hoverCursor=c[11]),l&4096&&(d.manageHoverState=c[12]),l&8192&&(d.eventsIfTopMost=c[13]),l&16384&&(d.interactive=c[14]),l&8388608&&(d.$$scope={dirty:l,ctx:c}),!n&&l&1&&(n=!0,d.hovered=c[0],El(()=>n=!1)),e.$set(d)},i(c){r||(ue(e.$$.fragment,c),r=!0)},o(c){ye(e.$$.fragment,c),r=!1},d(c){je(e,c)}}}function D8(t,e,n){let{$$slots:r={},$$scope:i}=e,{id:s=Pm("line")}=e,{source:c=void 0}=e,{sourceLayer:l=void 0}=e,{beforeId:d=void 0}=e,{beforeLayerType:v=void 0}=e,{paint:S}=e,{layout:E=void 0}=e,{filter:C=void 0}=e,{minzoom:M=void 0}=e,{maxzoom:k=void 0}=e,{hoverCursor:R=void 0}=e,{manageHoverState:z=!1}=e,{hovered:U=null}=e,{eventsIfTopMost:F=!1}=e,{interactive:G=!0}=e;function H(Y){U=Y,n(0,U)}function te(Y){gn.call(this,t,Y)}function ee(Y){gn.call(this,t,Y)}function fe(Y){gn.call(this,t,Y)}function pe(Y){gn.call(this,t,Y)}function se(Y){gn.call(this,t,Y)}function Ae(Y){gn.call(this,t,Y)}return t.$$set=Y=>{"id"in Y&&n(1,s=Y.id),"source"in Y&&n(2,c=Y.source),"sourceLayer"in Y&&n(3,l=Y.sourceLayer),"beforeId"in Y&&n(4,d=Y.beforeId),"beforeLayerType"in Y&&n(5,v=Y.beforeLayerType),"paint"in Y&&n(6,S=Y.paint),"layout"in Y&&n(7,E=Y.layout),"filter"in Y&&n(8,C=Y.filter),"minzoom"in Y&&n(9,M=Y.minzoom),"maxzoom"in Y&&n(10,k=Y.maxzoom),"hoverCursor"in Y&&n(11,R=Y.hoverCursor),"manageHoverState"in Y&&n(12,z=Y.manageHoverState),"hovered"in Y&&n(0,U=Y.hovered),"eventsIfTopMost"in Y&&n(13,F=Y.eventsIfTopMost),"interactive"in Y&&n(14,G=Y.interactive),"$$scope"in Y&&n(23,i=Y.$$scope)},[U,s,c,l,d,v,S,E,C,M,k,R,z,F,G,r,H,te,ee,fe,pe,se,Ae,i]}class R8 extends Yt{constructor(e){super(),Xt(this,e,D8,k8,Ut,{id:1,source:2,sourceLayer:3,beforeId:4,beforeLayerType:5,paint:6,layout:7,filter:8,minzoom:9,maxzoom:10,hoverCursor:11,manageHoverState:12,hovered:0,eventsIfTopMost:13,interactive:14})}}function N8(t){let e,n,r,i,s,c;return e=new I8({props:{id:"edit-polygon-fill",filter:e8,paint:{"fill-color":"red","fill-opacity":["case",["boolean",["get","hover"],"false"],1,.5]}}}),r=new R8({props:{id:"edit-polygon-lines",filter:t8,paint:{"line-color":"black","line-width":8,"line-opacity":.5}}}),s=new x8({props:{id:"edit-polygon-vertices",filter:n8,paint:{"circle-color":"black","circle-opacity":["case",["has","hovered"],1,.5],"circle-radius":10}}}),{c(){Ge(e.$$.fragment),n=Ze(),Ge(r.$$.fragment),i=Ze(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p:Lt,i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function O8(t){let e,n;return e=new M8({props:{data:t[0],$$slots:{default:[N8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&1&&(s.data=r[0]),i&2&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function z8(t,e,n){let r;return mt(t,BT,i=>n(0,r=i)),[r]}class F8 extends Yt{constructor(e){super(),Xt(this,e,z8,O8,Ut,{})}}function B8(t){let e,n,r,i,s,c,l;return{c(){e=_e("button"),e.textContent="Import current view",n=Ze(),r=_e("i"),r.textContent="or...",i=Ze(),s=_e("button"),s.textContent="Draw an area to import on the map",Ce(e,"type","button"),Ce(s,"type","button")},m(d,v){xe(d,e,v),xe(d,n,v),xe(d,r,v),xe(d,i,v),xe(d,s,v),c||(l=[Mt(e,"click",t[1]),Mt(s,"click",t[2])],c=!0)},p:Lt,i:Lt,o:Lt,d(d){d&&(be(e),be(n),be(r),be(i),be(s)),c=!1,Kr(l)}}}function V8(t){let e,n;return e=new u8({props:{polygonTool:t[0]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&1&&(s.polygonTool=r[0]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function U8(t){let e,n,r,i;const s=[V8,B8],c=[];function l(d,v){return d[0]?0:1}return e=l(t),n=c[e]=s[e](t),{c(){n.c(),r=Fi()},m(d,v){c[e].m(d,v),xe(d,r,v),i=!0},p(d,[v]){let S=e;e=l(d),e===S?c[e].p(d,v):(Un(),ye(c[S],1,1,()=>{c[S]=null}),jn(),n=c[e],n?n.p(d,v):(n=c[e]=s[e](d),n.c()),ue(n,1),n.m(r.parentNode,r))},i(d){i||(ue(n),i=!0)},o(d){ye(n),i=!1},d(d){d&&be(r),c[e].d(d)}}}function Id(t){return[t.lng,t.lat]}function j8(t,e,n){let{map:r}=e;const i=vu();let s=null;async function c(S){try{i("loading","Loading from Overpass");let C=await(await fetch(GT(S))).text();i("gotXml",C)}catch(E){i("error",E.toString())}}function l(){let S=r.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[Id(S.getSouthWest()),Id(S.getNorthWest()),Id(S.getNorthEast()),Id(S.getSouthEast()),Id(S.getSouthWest())]],type:"Polygon"}}}async function d(){if(r){if(r.getZoom()<13){i("error","Zoom in more to import");return}await c(l())}}function v(){r&&(n(0,s=new i8(r)),s.startNew(),s.addEventListenerSuccess(async S=>{n(0,s=null),await c(S)}),s.addEventListenerFailure(()=>{n(0,s=null)}))}return t.$$set=S=>{"map"in S&&n(3,r=S.map)},[s,d,v,r]}class G8 extends Yt{constructor(e){super(),Xt(this,e,j8,U8,Ut,{map:3})}}function GT(t){let e='poly:"';for(let[r,i]of t.geometry.coordinates[0])e+=`${i} ${r} `;return e=e.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${e}); node(w)->.x; <;); out meta;`}`}async function c1(t){Ku.set(t);try{let e=JSON.parse(window.localStorage.getItem(t));console.time("get OSM input");let n=await q8(e);console.timeEnd("get OSM input"),console.time("load"),Gi.set(new WE(new Uint8Array(n),e.study_area_name||void 0)),ca(Gi).loadSavefile(e),console.timeEnd("load"),qT()}catch(e){window.alert(`Couldn't open project: ${e}`),Ku.set("")}}async function q8(t){if(t.study_area_name){let e=ca(M_)?`/osm/${t.study_area_name}.pbf`:`https://assets.od2net.org/severance_pbfs/${t.study_area_name}.pbf`;return console.log(`Grabbing ${e}`),await(await fetch(e)).arrayBuffer()}else{console.log("Grabbing from Overpass");let e=t.features.find(i=>i.properties.kind=="study_area_boundary");return await(await fetch(GT(e))).arrayBuffer()}}function qT(){xn.set({mode:"network"}),k_.set(new xR(ca(uu),ca(Gi).toRouteSnapper(),NT,xB,OT)),$_.set(!1),K_.set({type:"FeatureCollection",features:[]}),ca(uu).fitBounds(Array.from(ca(Gi).getBounds()),{animate:!1}),Vv.set(wE()),Uv.set(wE())}function wE(){let t=ca(Gi).getBounds(),e=t[0]+Math.random()*(t[2]-t[0]),n=t[1]+Math.random()*(t[3]-t[1]);return new ny.LngLat(e,n)}function SE(t,e,n){const r=t.slice();return r[19]=e[n],r}function W8(t){let e;return{c(){e=_e("div"),e.innerHTML='',Ce(e,"slot","top")},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function H8(t){let e;return{c(){e=_e("p"),e.textContent="Waiting for MapLibre and WASM to load..."},m(n,r){xe(n,e,r)},p:Lt,i:Lt,o:Lt,d(n){n&&be(e)}}}function Z8(t){let e,n,r,i,s,c,l,d,v,S,E,C,M;n=new or({props:{$$slots:{default:[X8]},$$scope:{ctx:t}}}),n.$on("click",t[11]);let k=bs(t[2]),R=[];for(let U=0;Uye(R[U],1,1,()=>{R[U]=null});return{c(){e=_e("div"),Ge(n.$$.fragment),r=Ze(),i=_e("p"),i.textContent="Load a saved project:",s=Ze(),c=_e("ul");for(let U=0;U{c[S]=null}),jn(),r=c[n],r?r.p(d,v):(r=c[n]=s[n](d),r.c()),ue(r,1),r.m(e,null))},i(d){i||(ue(r),i=!0)},o(d){ye(r),i=!1},d(d){d&&be(e),c[n].d()}}}function K8(t){let e,n,r,i;return e=new jE({props:{loading:t[1]}}),r=new bu({props:{$$slots:{sidebar:[$8],top:[W8]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=Ze(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&2&&(l.loading=s[1]),e.$set(l);const d={};c&4194429&&(d.$$scope={dirty:c,ctx:s}),r.$set(d)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function Xg(){let t=[];for(let e=0;en(16,r=ee)),mt(t,k_,ee=>n(17,i=ee)),mt(t,Gi,ee=>n(18,s=ee)),mt(t,uu,ee=>n(4,c=ee)),mt(t,xn,ee=>n(5,l=ee)),mt(t,Jd,ee=>n(6,d=ee));let{wasmReady:v}=e,S="";Ft(Gi,s=null,s),Ft(k_,i=null,i),Ft(Ku,r="",r);let E=Xg(),C;async function M(ee){let fe="ltn_"+C.files[0].name;n(1,S=`Loading from file ${fe}`),window.localStorage.setItem(fe,await C.files[0].text()),n(2,E=Xg()),await c1(fe),n(1,S="")}function k(ee){window.confirm(`Really delete project ${ee}? You can't undo this.`)&&(window.localStorage.removeItem(ee),n(2,E=Xg()))}function R(ee){let fe=window.prompt(`Rename project ${ee} to what?`,ee);if(fe){fe.startsWith("ltn_")||(fe=`ltn_${fe}`);let pe=window.localStorage.getItem(ee);window.localStorage.setItem(fe,pe),window.localStorage.removeItem(ee),n(2,E=Xg())}}async function z(ee){n(1,S=`Loading project ${ee}`),await c1(ee),n(1,S="")}const U=()=>Ft(xn,l={mode:"new-project"},l),F=ee=>z(ee),G=ee=>R(ee),H=ee=>k(ee);function te(ee){ai[ee?"unshift":"push"](()=>{C=ee,n(3,C)})}return t.$$set=ee=>{"wasmReady"in ee&&n(0,v=ee.wasmReady)},[v,S,E,C,c,l,d,M,k,R,z,U,F,G,H,te]}class Q8 extends Yt{constructor(e){super(),Xt(this,e,J8,K8,Ut,{wasmReady:0})}}function IE(t,e,n){const r=t.slice();return r[17]=e[n][0],r[18]=e[n][1],r}function CE(t,e,n){const r=t.slice();return r[21]=e[n][0],r[22]=e[n][1],r}function e7(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function t7(t){let e,n,r,i,s,c,l,d;return s=new or({props:{$$slots:{default:[e7]},$$scope:{ctx:t}}}),s.$on("click",t[13]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),l.textContent="New project",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(v,S){xe(v,e,S),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),d=!0},p(v,S){const E={};S&33554432&&(E.$$scope={dirty:S,ctx:v}),s.$set(E)},i(v){d||(ue(s.$$.fragment,v),d=!0)},o(v){ye(s.$$.fragment,v),d=!1},d(v){v&&be(e),je(s)}}}function TE(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k;e=new jE({props:{loading:t[4]}});let R=bs(t[3]),z=[];for(let U=0;Ut[9].call(s))},m(U,F){Ue(e,U,F),xe(U,n,F),xe(U,r,F),oe(r,i),oe(r,s),oe(s,c);for(let G=0;G{S=null}),jn())},i(E){l||(ue(S),l=!0)},o(E){ye(S),l=!1},d(E){E&&be(e),S&&S.d(),d=!1,v()}}}function r7(t){let e,n,r;return n=new F8({}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","map")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p:Lt,i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function i7(t){let e,n;return e=new bu({props:{$$slots:{map:[r7],sidebar:[n7],top:[t7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,[i]){const s={};i&33554558&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function o7(t,e,n){let r,i,s,c,l;mt(t,Ku,H=>n(14,r=H)),mt(t,Gi,H=>n(15,i=H)),mt(t,M_,H=>n(16,s=H)),mt(t,uu,H=>n(5,c=H)),mt(t,xn,H=>n(6,l=H));let d="",v="",S=[],E="";Q_(async()=>{let H=await fetch(s?"/osm/areas.json":"https://assets.od2net.org/severance_pbfs/areas.json");n(3,S=await H.json())});function C(H){n(4,E="Loading OSM");try{Ft(Gi,i=new WE(new TextEncoder().encode(H.detail),void 0),i),Ft(Ku,r=`ltn_${d}`,r),qT(),Rf()}catch(te){window.alert(`Couldn't import from Overpass: ${te}`)}n(4,E="")}async function M(){if(v=="")return;let H=`ltn_${d}`;window.localStorage.setItem(H,JSON.stringify({type:"FeatureCollection",features:[],study_area_name:v})),n(4,E=`Loading pre-clipped OSM area ${v}`),await c1(H),n(4,E="")}function k(){d=this.value,n(1,d)}function R(){v=OE(this),n(2,v),n(3,S)}return[M,d,v,S,E,c,l,C,k,R,()=>M(),H=>n(4,E=H.detail),H=>window.alert(H.detail),()=>Ft(xn,l={mode:"title"},l)]}class s7 extends Yt{constructor(e){super(),Xt(this,e,o7,i7,Ut,{loadExample:0})}get loadExample(){return this.$$.ctx[0]}}const{window:a7}=h1;function l7(t){let e;return{c(){e=at("Choose project")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function u7(t){let e;return{c(){e=at("Pick neighbourhood")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function c7(t){let e;return{c(){e=at("Editing")},m(n,r){xe(n,e,r)},d(n){n&&be(e)}}}function h7(t){let e,n,r,i,s,c,l,d,v,S,E,C,M,k;return s=new or({props:{$$slots:{default:[l7]},$$scope:{ctx:t}}}),s.$on("click",t[9]),d=new or({props:{$$slots:{default:[u7]},$$scope:{ctx:t}}}),d.$on("click",t[10]),E=new or({props:{$$slots:{default:[c7]},$$scope:{ctx:t}}}),E.$on("click",t[5]),{c(){e=_e("div"),n=_e("nav"),r=_e("ul"),i=_e("li"),Ge(s.$$.fragment),c=Ze(),l=_e("li"),Ge(d.$$.fragment),v=Ze(),S=_e("li"),Ge(E.$$.fragment),C=Ze(),M=_e("li"),M.textContent="Viewing shortcuts",Ce(n,"aria-label","breadcrumb"),Ce(e,"slot","top")},m(R,z){xe(R,e,z),oe(e,n),oe(n,r),oe(r,i),Ue(s,i,null),oe(r,c),oe(r,l),Ue(d,l,null),oe(r,v),oe(r,S),Ue(E,S,null),oe(r,C),oe(r,M),k=!0},p(R,z){const U={};z&8192&&(U.$$scope={dirty:z,ctx:R}),s.$set(U);const F={};z&8192&&(F.$$scope={dirty:z,ctx:R}),d.$set(F);const G={};z&8192&&(G.$$scope={dirty:z,ctx:R}),E.$set(G)},i(R){k||(ue(s.$$.fragment,R),ue(d.$$.fragment,R),ue(E.$$.fragment,R),k=!0)},o(R){ye(s.$$.fragment,R),ye(d.$$.fragment,R),ye(E.$$.fragment,R),k=!1},d(R){R&&be(e),je(s),je(d),je(E)}}}function f7(t){let e,n,r,i,s,c,l,d,v,S=t[0].shortcutIndex+1+"",E,C,M=t[0].gj.features.length+"",k,R,z,U,F,G,H,te,ee,fe=Rr(t[0].gj.features[t[0].shortcutIndex].properties).directness.toFixed(1)+"",pe,se,Ae,Y,ae;return{c(){e=_e("p"),e.textContent=`This shows all possible shortcuts crossing the blue road you've chosen. + A shortcut is defined as a route starting and ending outside the + neighbourhood, but cutting through it. It might not actually be + considered a "good shortcut" in practice -- this tool doesn't know any + real traffic patterns; it's just looking for any possible path. This + view lets you understand the limits of this assumption.`,n=Ze(),r=_e("button"),r.textContent="Pick a different road",i=Ze(),s=_e("div"),c=_e("button"),l=at("Previous"),v=Ze(),E=at(S),C=at(" / "),k=at(M),R=Ze(),z=_e("button"),U=at("Next"),G=Ze(),H=_e("p"),te=at("This shortcut is "),ee=_e("b"),pe=at(fe),se=at("x"),Ae=at(` + the length of the shortest route using all roads, not just this neighbourhood`),c.disabled=d=t[0].shortcutIndex==0,Ce(c,"data-tooltip","Left"),z.disabled=F=t[0].shortcutIndex==t[0].gj.features.length-1,Ce(z,"data-tooltip","Right"),sr(s,"display","flex"),sr(s,"justify-content","space-between")},m(Ke,Le){xe(Ke,e,Le),xe(Ke,n,Le),xe(Ke,r,Le),xe(Ke,i,Le),xe(Ke,s,Le),oe(s,c),oe(c,l),oe(s,v),oe(s,E),oe(s,C),oe(s,k),oe(s,R),oe(s,z),oe(z,U),xe(Ke,G,Le),xe(Ke,H,Le),oe(H,te),oe(H,ee),oe(ee,pe),oe(ee,se),oe(H,Ae),Y||(ae=[Mt(r,"click",t[8]),Mt(c,"click",t[6]),Mt(z,"click",t[7])],Y=!0)},p(Ke,Le){Le&1&&d!==(d=Ke[0].shortcutIndex==0)&&(c.disabled=d),Le&1&&S!==(S=Ke[0].shortcutIndex+1+"")&&hr(E,S),Le&1&&M!==(M=Ke[0].gj.features.length+"")&&hr(k,M),Le&1&&F!==(F=Ke[0].shortcutIndex==Ke[0].gj.features.length-1)&&(z.disabled=F),Le&1&&fe!==(fe=Rr(Ke[0].gj.features[Ke[0].shortcutIndex].properties).directness.toFixed(1)+"")&&hr(pe,fe)},d(Ke){Ke&&(be(e),be(n),be(r),be(i),be(s),be(G),be(H)),Y=!1,Kr(ae)}}}function p7(t){let e;return{c(){e=_e("p"),e.textContent="Click a road to see shortcuts"},m(n,r){xe(n,e,r)},p:Lt,d(n){n&&be(e)}}}function d7(t){let e,n,r,i;n=new Ey({}),n.$on("click",t[5]);function s(d,v){if(d[0].state=="neutral")return p7;if(d[0].state=="chose-road")return f7}let c=s(t),l=c&&c(t);return{c(){e=_e("div"),Ge(n.$$.fragment),r=Ze(),l&&l.c(),Ce(e,"slot","sidebar")},m(d,v){xe(d,e,v),Ue(n,e,null),oe(e,r),l&&l.m(e,null),i=!0},p(d,v){c===(c=s(d))&&l?l.p(d,v):(l&&l.d(1),l=c&&c(d),l&&(l.c(),l.m(e,null)))},i(d){i||(ue(n.$$.fragment,d),i=!0)},o(d){ye(n.$$.fragment,d),i=!1},d(d){d&&be(e),je(n),l&&l.d()}}}function m7(t){let e,n,r,i,s,c;return e=new Ro({props:{data:l1(JSON.parse(Rr(t[2]).renderNeighbourhood())),$$slots:{default:[_7]},$$scope:{ctx:t}}}),r=new Ro({props:{data:t[0].gj.features[t[0].shortcutIndex],$$slots:{default:[y7]},$$scope:{ctx:t}}}),s=new Ro({props:{data:t[0].roadGj,$$slots:{default:[v7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=Ze(),Ge(r.$$.fragment),i=Ze(),Ge(s.$$.fragment)},m(l,d){Ue(e,l,d),xe(l,n,d),Ue(r,l,d),xe(l,i,d),Ue(s,l,d),c=!0},p(l,d){const v={};d&4&&(v.data=l1(JSON.parse(Rr(l[2]).renderNeighbourhood()))),d&8192&&(v.$$scope={dirty:d,ctx:l}),e.$set(v);const S={};d&1&&(S.data=l[0].gj.features[l[0].shortcutIndex]),d&8192&&(S.$$scope={dirty:d,ctx:l}),r.$set(S);const E={};d&1&&(E.data=l[0].roadGj),d&8192&&(E.$$scope={dirty:d,ctx:l}),s.$set(E)},i(l){c||(ue(e.$$.fragment,l),ue(r.$$.fragment,l),ue(s.$$.fragment,l),c=!0)},o(l){ye(e.$$.fragment,l),ye(r.$$.fragment,l),ye(s.$$.fragment,l),c=!1},d(l){l&&(be(n),be(i)),je(e,l),je(r,l),je(s,l)}}}function g7(t){let e,n;return e=new Iy({props:{gjInput:JSON.parse(Rr(t[2]).renderNeighbourhood()),onClickLine:t[3],$$slots:{"line-popup":[x7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&4&&(s.gjInput=JSON.parse(Rr(r[2]).renderNeighbourhood())),i&8192&&(s.$$scope={dirty:i,ctx:r}),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function _7(t){let e,n;const r=[gi("cells"),{filter:["==",["get","kind"],"cell"]},{paint:{"fill-color":["get","color"],"fill-opacity":.3}}];let i={};for(let s=0;s({12:i}),({props:i})=>i?4096:0]},$$scope:{ctx:t}}}),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","line-popup")},m(i,s){xe(i,e,s),Ue(n,e,null),r=!0},p(i,s){const c={};s&12288&&(c.$$scope={dirty:s,ctx:i}),n.$set(c)},i(i){r||(ue(n.$$.fragment,i),r=!0)},o(i){ye(n.$$.fragment,i),r=!1},d(i){i&&be(e),je(n)}}}function w7(t){let e,n,r,i,s,c;const l=[g7,m7],d=[];function v(S,E){return S[0].state=="neutral"?0:S[0].state=="chose-road"?1:-1}return~(n=v(t))&&(r=d[n]=l[n](t)),s=new Cy({}),{c(){e=_e("div"),r&&r.c(),i=Ze(),Ge(s.$$.fragment),Ce(e,"slot","map")},m(S,E){xe(S,e,E),~n&&d[n].m(e,null),oe(e,i),Ue(s,e,null),c=!0},p(S,E){let C=n;n=v(S),n===C?~n&&d[n].p(S,E):(r&&(Un(),ye(d[C],1,1,()=>{d[C]=null}),jn()),~n?(r=d[n],r?r.p(S,E):(r=d[n]=l[n](S),r.c()),ue(r,1),r.m(e,i)):r=null)},i(S){c||(ue(r),ue(s.$$.fragment,S),c=!0)},o(S){ye(r),ye(s.$$.fragment,S),c=!1},d(S){S&&be(e),~n&&d[n].d(),je(s)}}}function S7(t){let e,n,r,i;return e=new bu({props:{$$slots:{map:[w7],sidebar:[d7],top:[h7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment)},m(s,c){Ue(e,s,c),n=!0,r||(i=Mt(a7,"keydown",t[4]),r=!0)},p(s,[c]){const l={};c&8199&&(l.$$scope={dirty:c,ctx:s}),e.$set(l)},i(s){n||(ue(e.$$.fragment,s),n=!0)},o(s){ye(e.$$.fragment,s),n=!1},d(s){je(e,s),r=!1,i()}}}function E7(t,e,n){let r,i,s;mt(t,xn,R=>n(1,r=R)),mt(t,uu,R=>n(11,i=R)),mt(t,Gi,R=>n(2,s=R));let c={state:"neutral"};function l(R,z){let U=JSON.parse(s.getShortcutsCrossingRoad(R.properties.id));if(U.features.length==0){window.alert("No shortcuts here");return}n(0,c={state:"chose-road",roadGj:R,gj:U,shortcutIndex:0})}Q_(()=>{i==null||i.keyboard.disable()}),ro(()=>{i==null||i.keyboard.enable()});function d(R){c.state=="chose-road"&&(R.key=="ArrowLeft"&&c.shortcutIndex>0&&(R.stopPropagation(),n(0,c.shortcutIndex--,c)),R.key=="ArrowRight"&&(R.stopPropagation(),c.shortcutIndex!=c.gj.features.length-1&&n(0,c.shortcutIndex++,c)))}function v(){Ft(xn,r={mode:"neighbourhood"},r)}function S(){c.state=="chose-road"&&n(0,c.shortcutIndex--,c)}function E(){c.state=="chose-road"&&n(0,c.shortcutIndex++,c)}return[c,r,s,l,d,v,S,E,()=>n(0,c={state:"neutral"}),()=>Ft(xn,r={mode:"title"},r),()=>Ft(xn,r={mode:"network"},r)]}class I7 extends Yt{constructor(e){super(),Xt(this,e,E7,S7,Ut,{})}}function C7(t){let e,n,r,i,s,c,l,d,v,S,E;return c=new bB({}),{c(){e=_e("div"),n=_e("button"),r=_e("img"),s=Ze(),Ge(c.$$.fragment),l=Ze(),d=_e("span"),Wn(r.src,i=t[10]?C2:T2)||Ce(r,"src",i),sr(r,"height","6vh"),Ce(r,"alt","A/B Street logo"),Ce(n,"class","outline"),sr(d,"width","100%"),Ce(e,"slot","top"),sr(e,"display","flex")},m(C,M){xe(C,e,M),oe(e,n),oe(n,r),oe(e,s),Ue(c,e,null),oe(e,l),oe(e,d),t[20](d),v=!0,S||(E=Mt(n,"click",t[19]),S=!0)},p(C,M){(!v||M&1024&&!Wn(r.src,i=C[10]?C2:T2))&&Ce(r,"src",i)},i(C){v||(ue(c.$$.fragment,C),v=!0)},o(C){ye(c.$$.fragment,C),v=!1},d(C){C&&be(e),je(c),t[20](null),S=!1,E()}}}function ME(t){let e,n,r,i,s,c;return r=new $z({props:{map:Rr(t[6]),maptilerBasemap:t[7]}}),{c(){e=_e("button"),e.textContent="Zoom to fit study area",n=Ze(),Ge(r.$$.fragment),Ce(e,"class","secondary")},m(l,d){xe(l,e,d),xe(l,n,d),Ue(r,l,d),i=!0,s||(c=Mt(e,"click",t[11]),s=!0)},p(l,d){const v={};d&64&&(v.map=Rr(l[6])),d&128&&(v.maptilerBasemap=l[7]),r.$set(v)},i(l){i||(ue(r.$$.fragment,l),i=!0)},o(l){ye(r.$$.fragment,l),i=!1},d(l){l&&(be(e),be(n)),je(r,l),s=!1,c()}}}function T7(t){let e,n,r,i,s,c,l=t[5]&&ME(t);return{c(){e=_e("div"),n=_e("div"),r=Ze(),i=_e("hr"),s=Ze(),l&&l.c(),Ce(e,"slot","left")},m(d,v){xe(d,e,v),oe(e,n),t[18](n),oe(e,r),oe(e,i),oe(e,s),l&&l.m(e,null),c=!0},p(d,v){d[5]?l?(l.p(d,v),v&32&&ue(l,1)):(l=ME(d),l.c(),ue(l,1),l.m(e,null)):l&&(Un(),ye(l,1,1,()=>{l=null}),jn())},i(d){c||(ue(l),c=!0)},o(d){ye(l),c=!1},d(d){d&&be(e),t[18](null),l&&l.d()}}}function L7(t){let e,n;return e=new s7({}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p:Lt,i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function P7(t){let e,n;return e=new Q8({props:{wasmReady:t[4]}}),{c(){Ge(e.$$.fragment)},m(r,i){Ue(e,r,i),n=!0},p(r,i){const s={};i&16&&(s.wasmReady=r[4]),e.$set(s)},i(r){n||(ue(e.$$.fragment,r),n=!0)},o(r){ye(e.$$.fragment,r),n=!1},d(r){je(e,r)}}}function AE(t){let e,n,r,i,s,c;e=new Ro({props:{data:JSON.parse(t[5].getInvertedBoundary()),$$slots:{default:[M7]},$$scope:{ctx:t}}});const l=[z7,O7,N7,R7,D7,k7,A7],d=[];function v(S,E){return S[8].mode=="network"?0:S[8].mode=="set-boundary"?1:S[8].mode=="auto-boundaries"?2:S[8].mode=="neighbourhood"?3:S[8].mode=="view-shortcuts"?4:S[8].mode=="route"?5:S[8].mode=="debug"?6:-1}return~(r=v(t))&&(i=d[r]=l[r](t)),{c(){Ge(e.$$.fragment),n=Ze(),i&&i.c(),s=Fi()},m(S,E){Ue(e,S,E),xe(S,n,E),~r&&d[r].m(S,E),xe(S,s,E),c=!0},p(S,E){const C={};E&32&&(C.data=JSON.parse(S[5].getInvertedBoundary())),E&4194304&&(C.$$scope={dirty:E,ctx:S}),e.$set(C);let M=r;r=v(S),r===M?~r&&d[r].p(S,E):(i&&(Un(),ye(d[M],1,1,()=>{d[M]=null}),jn()),~r?(i=d[r],i?i.p(S,E):(i=d[r]=l[r](S),i.c()),ue(i,1),i.m(s.parentNode,s)):i=null)},i(S){c||(ue(e.$$.fragment,S),ue(i),c=!0)},o(S){ye(e.$$.fragment,S),ye(i),c=!1},d(S){S&&(be(n),be(s)),je(e,S),~r&&d[r].d(S)}}}function M7(t){let e,n;const r=[gi("boundary"),{paint:{"fill-color":"black","fill-opacity":.3}}];let i={};for(let s=0;s{C[F]=null}),jn()),~s?(c=C[s],c?c.p(R,z):(c=C[s]=E[s](R),c.c()),ue(c,1),c.m(l.parentNode,l)):c=null),R[5]?k?(k.p(R,z),z&32&&ue(k,1)):(k=AE(R),k.c(),ue(k,1),k.m(d.parentNode,d)):k&&(Un(),ye(k,1,1,()=>{k=null}),jn())},i(R){S||(ue(e.$$.fragment,R),ue(c),ue(k),ue(v.$$.fragment,R),S=!0)},o(R){ye(e.$$.fragment,R),ye(c),ye(k),ye(v.$$.fragment,R),S=!1},d(R){R&&(be(n),be(r),be(i),be(l),be(d)),je(e,R),t[15](null),~s&&C[s].d(R),k&&k.d(R),je(v,R)}}}function B7(t){let e,n,r,i;function s(l){t[16](l)}let c={style:`https://api.maptiler.com/maps/${t[7]}/style.json?key=${Fv}`,standardControls:!0,hash:!0,images:[{id:"walk_cycle_only",url:"/ltn//filters/walk_cycle_only_icon.gif"},{id:"no_entry",url:"/ltn//filters/no_entry_icon.gif"},{id:"bus_gate",url:"/ltn//filters/bus_gate_icon.gif"},{id:"school_street",url:"/ltn//filters/school_street_icon.gif"},{id:"oneway-arrow",url:CR}],$$slots:{default:[F7]},$$scope:{ctx:t}};return t[0]!==void 0&&(c.map=t[0]),n=new dN({props:c}),ai.push(()=>Il(n,"map",s)),n.$on("error",t[17]),{c(){e=_e("div"),Ge(n.$$.fragment),Ce(e,"slot","main"),sr(e,"position","relative"),sr(e,"width","100%"),sr(e,"height","100%")},m(l,d){xe(l,e,d),Ue(n,e,null),i=!0},p(l,d){const v={};d&128&&(v.style=`https://api.maptiler.com/maps/${l[7]}/style.json?key=${Fv}`),d&4194617&&(v.$$scope={dirty:d,ctx:l}),!r&&d&1&&(r=!0,v.map=l[0],El(()=>r=!1)),n.$set(v)},i(l){i||(ue(n.$$.fragment,l),i=!0)},o(l){ye(n.$$.fragment,l),i=!1},d(l){l&&be(e),je(n)}}}function V7(t){let e,n,r,i;return e=new IR({}),r=new Ez({props:{$$slots:{main:[B7],left:[T7],top:[C7]},$$scope:{ctx:t}}}),{c(){Ge(e.$$.fragment),n=Ze(),Ge(r.$$.fragment)},m(s,c){Ue(e,s,c),xe(s,n,c),Ue(r,s,c),i=!0},p(s,[c]){const l={};c&4196351&&(l.$$scope={dirty:c,ctx:s}),r.$set(l)},i(s){i||(ue(e.$$.fragment,s),ue(r.$$.fragment,s),i=!0)},o(s){ye(e.$$.fragment,s),ye(r.$$.fragment,s),i=!1},d(s){s&&be(n),je(e,s),je(r,s)}}}function U7(t,e,n){let r,i,s,c,l,d,v,S,E,C;mt(t,a1,se=>n(12,r=se)),mt(t,s1,se=>n(13,i=se)),mt(t,o1,se=>n(14,s=se)),mt(t,Gi,se=>n(5,c=se)),mt(t,uu,se=>n(6,l=se)),mt(t,M_,se=>n(21,d=se)),mt(t,Bv,se=>n(7,v=se)),mt(t,xn,se=>n(8,S=se)),mt(t,A_,se=>n(9,E=se)),mt(t,Jd,se=>n(10,C=se));let M=!1;Q_(async()=>{await HE(),await $E(),n(4,M=!0);try{(await fetch("/osm/areas.json")).ok&&(Ft(M_,d=!0,d),console.log("Using local cache, not od2net.org"))}catch{}});let k;function R(){l.fitBounds(Array.from(c.getBounds()),{animate:!1})}let z,U,F;function G(se){ai[se?"unshift":"push"](()=>{F=se,n(3,F),n(12,r)})}function H(se){k=se,n(0,k)}const te=se=>{console.log(se.detail.error)};function ee(se){ai[se?"unshift":"push"](()=>{U=se,n(2,U),n(13,i)})}const fe=()=>Ft(A_,E=!0,E);function pe(se){ai[se?"unshift":"push"](()=>{z=se,n(1,z),n(14,s)})}return t.$$.update=()=>{t.$$.dirty&1&&k&&uu.set(k),t.$$.dirty&16386&&z&&s&&(n(1,z.innerHTML="",z),z.appendChild(s)),t.$$.dirty&8196&&U&&i&&(n(2,U.innerHTML="",U),U.appendChild(i)),t.$$.dirty&4104&&F&&r&&(n(3,F.innerHTML="",F),F.appendChild(r))},[k,z,U,F,M,c,l,v,S,E,C,R,r,i,s,G,H,te,ee,fe,pe]}class j7 extends Yt{constructor(e){super(),Xt(this,e,U7,V7,Ut,{})}}new j7({target:document.getElementById("app")}); diff --git a/index.html b/index.html index 82f15d0..fcc016a 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ The low-traffic neighbourhood (LTN) tool, v2 - +

    @Qw4vCY10t{W!e z%(uF|Idw=ROa$FC09ug$<;(K6wT-Ws{qh(589U`|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