From 06939a3c9eb6e15058b299085481b62637cdc436 Mon Sep 17 00:00:00 2001 From: dabreegster Date: Wed, 20 Dec 2023 07:33:32 +0000 Subject: [PATCH] deploy: 2dbb67e2da1d609746b855a0dda71a7fa6fe9fd1 --- assets/backend_bg.wasm | Bin 699322 -> 700792 bytes assets/{main-470f99ba.js => main-0e765889.js} | 60 +++++++++--------- index.html | 2 +- 3 files changed, 31 insertions(+), 31 deletions(-) rename assets/{main-470f99ba.js => main-0e765889.js} (68%) diff --git a/assets/backend_bg.wasm b/assets/backend_bg.wasm index 75b0a6631d2d25e4ab7cb8e587312d1bbd7b2cee..8b0d53d87308f02d3f20bbc3e0110d768a2e416b 100644 GIT binary patch delta 201312 zcmc${3t&{m^*?@R?qheeo8%@WBq4#^T>>OL1XP})a*>xJ71XxYCqA$mR6wa{MK=gq zR8VlyD+-EA72nukgNhmz6_qL=RB}w?=?R9h;EbakGd*L5 zNH2KgMe~+K@61f$XKt4RGS7&2hm@Ui%JkFDKJSd*PCW0FvoAR1cjuik@yxT&n|Ov{ zo6}GGZDp(6$*0v%Jbl_Jr=K(VyoslrKk-b%&TNu3U20h5x2ODe;%4g;CA+Ek_E+#+Ulf z@?2pWLfW>4G^>FBQpHZUswhhJa@ zH3*ksbTIOre0~Ba8Z69^{;z|OQUGg+A&Jn67|@8O@-wH$`nT)VI}+=QN@&wesQ=8& z{jmc}R5#flc8UfvyJB@fSQ%Ra%=`)e%l3wL^7Au?1Ng1ku&Xvw1=2y-q>fbWw9($YhjkQpIg`8F94s({c$G+a#Xua-iw;Pmz#szV5NVvcE*^bCtfrZZcnYKCzdk zk#&pnf%RAC1?wIAEyV7yb!=-G{>^^Z&Zcd#-?qPUzLV?am(Fd@@b1bEmW1x!U@pbF0&2y=UH>8^fFSMgV%X{i6N8eV4t& zS?s)E|J}YDUoYFw+wa-S@O8EQoc)3QN0qzQ-e%uvzhr-CFSqZpzXKR=I-fdg5#F7) zHp(UTdh03kGwUn)qWQFZ7EpcV{0YCGS}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_Ra1Z>La+m~U=Kq2Wi?1ma(amBMyi zfX^N&9MA_eR$Gd1P1V3kx_Cg__5T3z CGWnJO diff --git a/assets/main-470f99ba.js b/assets/main-0e765889.js similarity index 68% rename from assets/main-470f99ba.js rename to assets/main-0e765889.js index 0babf78..7eb2f36 100644 --- a/assets/main-470f99ba.js +++ b/assets/main-0e765889.js @@ -1,6 +1,6 @@ -var a_=Object.defineProperty;var l_=(m,f,_)=>f in m?a_(m,f,{enumerable:!0,configurable:!0,writable:!0,value:_}):m[f]=_;var Nn=(m,f,_)=>(l_(m,typeof f!="symbol"?f+"":f,_),_);(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))v(E);new MutationObserver(E=>{for(const k of E)if(k.type==="childList")for(const B of k.addedNodes)B.tagName==="LINK"&&B.rel==="modulepreload"&&v(B)}).observe(document,{childList:!0,subtree:!0});function _(E){const k={};return E.integrity&&(k.integrity=E.integrity),E.referrerPolicy&&(k.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?k.credentials="include":E.crossOrigin==="anonymous"?k.credentials="omit":k.credentials="same-origin",k}function v(E){if(E.ep)return;E.ep=!0;const k=_(E);fetch(E.href,k)}})();function Mr(){}function c_(m,f){for(const _ in f)m[_]=f[_];return m}function Np(m){return m()}function pp(){return Object.create(null)}function Ra(m){m.forEach(Np)}function Th(m){return typeof m=="function"}function Sr(m,f){return m!=m?f==f:m!==f||m&&typeof m=="object"||typeof m=="function"}function u_(m){return Object.keys(m).length===0}function Vp(m,...f){if(m==null){for(const v of f)v(void 0);return Mr}const _=m.subscribe(...f);return _.unsubscribe?()=>_.unsubscribe():_}function h_(m){let f;return Vp(m,_=>f=_)(),f}function Qr(m,f,_){m.$$.on_destroy.push(Vp(f,_))}function Ks(m,f,_,v){if(m){const E=Up(m,f,_,v);return m[0](E)}}function Up(m,f,_,v){return m[1]&&v?c_(_.ctx.slice(),m[1](v(f))):_.ctx}function Js(m,f,_,v){if(m[2]&&v){const E=m[2](v(_));if(f.dirty===void 0)return E;if(typeof E=="object"){const k=[],B=Math.max(f.dirty.length,E.length);for(let s=0;s32){const f=[],_=m.ctx.length/32;for(let v=0;v<_;v++)f[v]=-1;return f}return-1}function d_(m){const f={};for(const _ in m)f[_]=!0;return f}function fp(m){return m??""}function il(m,f,_){return m.set(_),f}function p_(m){return m&&Th(m.destroy)?m.destroy:Mr}function _i(m,f){m.appendChild(f)}function hi(m,f,_){m.insertBefore(f,_||null)}function li(m){m.parentNode&&m.parentNode.removeChild(m)}function f_(m,f){for(let _=0;_m.removeEventListener(f,_,v)}function vs(m,f,_){_==null?m.removeAttribute(f):m.getAttribute(f)!==_&&m.setAttribute(f,_)}function m_(m){return Array.from(m.childNodes)}function yh(m,f){f=""+f,m.data!==f&&(m.data=f)}function Uo(m,f){m.value=f??""}function Tc(m,f,_,v){_==null?m.style.removeProperty(f):m.style.setProperty(f,_,v?"important":"")}function mp(m,f,_){for(let v=0;v{const E=m.$$.callbacks[f];if(E){const k=g_(f,_,{cancelable:v});return E.slice().forEach(B=>{B.call(m,k)}),!k.defaultPrevented}return!0}}function qp(m,f){return kc().$$.context.set(m,f),f}function y_(m){return kc().$$.context.get(m)}function pn(m,f){const _=m.$$.callbacks[f.type];_&&_.slice().forEach(v=>v.call(this,f))}const Ml=[],$s=[];let Pl=[];const vh=[],Zp=Promise.resolve();let xh=!1;function Gp(){xh||(xh=!0,Zp.then(Wp))}function v_(){return Gp(),Zp}function _u(m){Pl.push(m)}function Pc(m){vh.push(m)}const dh=new Set;let El=0;function Wp(){if(El!==0)return;const m=Ac;do{try{for(;Elm.indexOf(v)===-1?f.push(v):_.push(v)),_.forEach(v=>v()),Pl=f}const hu=new Set;let tl;function rs(){tl={r:0,c:[],p:tl}}function ns(){tl.r||Ra(tl.c),tl=tl.p}function ft(m,f){m&&m.i&&(hu.delete(m),m.i(f))}function St(m,f,_,v){if(m&&m.o){if(hu.has(m))return;hu.add(m),tl.c.push(()=>{hu.delete(m),v&&(_&&m.d(1),v())}),m.o(f)}else v&&v()}function gp(m){return(m==null?void 0:m.length)!==void 0?m:Array.from(m)}function zc(m,f,_){const v=m.$$.props[f];v!==void 0&&(m.$$.bound[v]=_,_(m.$$.ctx[v]))}function Ri(m){m&&m.c()}function Ai(m,f,_){const{fragment:v,after_update:E}=m.$$;v&&v.m(f,_),_u(()=>{const k=m.$$.on_mount.map(Np).filter(Th);m.$$.on_destroy?m.$$.on_destroy.push(...k):Ra(k),m.$$.on_mount=[]}),E.forEach(_u)}function ki(m,f){const _=m.$$;_.fragment!==null&&(b_(_.after_update),Ra(_.on_destroy),_.fragment&&_.fragment.d(f),_.on_destroy=_.fragment=null,_.ctx=[])}function w_(m,f){m.$$.dirty[0]===-1&&(Ml.push(m),Gp(),m.$$.dirty.fill(0)),m.$$.dirty[f/31|0]|=1<{const Le=Oe.length?Oe[0]:ye;return N.ctx&&E(N.ctx[be],N.ctx[be]=Le)&&(!N.skip_bound&&N.bound[be]&&N.bound[be](Le),_e&&w_(m,be)),ye}):[],N.update(),_e=!0,Ra(N.before_update),N.fragment=v?v(N.ctx):!1,f.target){if(f.hydrate){const be=m_(f.target);N.fragment&&N.fragment.l(be),be.forEach(li)}else N.fragment&&N.fragment.c();f.intro&&ft(m.$$.fragment),Ai(m,f.target,f.anchor),Wp()}Ic(H)}class Gr{constructor(){Nn(this,"$$");Nn(this,"$$set")}$destroy(){ki(this,1),this.$destroy=Mr}$on(f,_){if(!Th(_))return Mr;const v=this.$$.callbacks[f]||(this.$$.callbacks[f]=[]);return v.push(_),()=>{const E=v.indexOf(_);E!==-1&&v.splice(E,1)}}$set(f){this.$$set&&!u_(f)&&(this.$$.skip_bound=!0,this.$$set(f),this.$$.skip_bound=!1)}}const S_="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(S_);function Hp(m,f,_){if(m!==null)for(var v,E,k,B,s,H,N,_e=0,be=0,ye,Oe=m.type,Le=Oe==="FeatureCollection",Be=Oe==="Feature",Ne=Le?m.features.length:1,et=0;et_[0]&&(f[0]=_[0]),f[1]>_[1]&&(f[1]=_[1]),f[2]<_[0]&&(f[2]=_[0]),f[3]<_[1]&&(f[3]=_[1])}),f}bh.default=bh;let Si;const Ws=new Array(128).fill(void 0);Ws.push(void 0,null,!0,!1);function oi(m){return Ws[m]}let Ec=Ws.length;function T_(m){m<132||(Ws[m]=Ec,Ec=m)}function du(m){const f=oi(m);return T_(m),f}let rl=0,gc=null;function zl(){return(gc===null||gc.byteLength===0)&&(gc=new Uint8Array(Si.memory.buffer)),gc}const pu=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},I_=typeof pu.encodeInto=="function"?function(m,f){return pu.encodeInto(m,f)}:function(m,f){const _=pu.encode(m);return f.set(_),{read:m.length,written:_.length}};function ph(m,f,_){if(_===void 0){const s=pu.encode(m),H=f(s.length,1)>>>0;return zl().subarray(H,H+s.length).set(s),rl=s.length,H}let v=m.length,E=f(v,1)>>>0;const k=zl();let B=0;for(;B127)break;k[E+B]=s}if(B!==v){B!==0&&(m=m.slice(B)),E=_(E,v,v=B+m.length*3,1)>>>0;const s=zl().subarray(E+B,E+v),H=I_(m,s);B+=H.written}return rl=B,E}function mc(m){return m==null}let yc=null;function Br(){return(yc===null||yc.byteLength===0)&&(yc=new Int32Array(Si.memory.buffer)),yc}function dn(m){Ec===Ws.length&&Ws.push(Ws.length+1);const f=Ec;return Ec=Ws[f],Ws[f]=m,f}let vc=null;function E_(){return(vc===null||vc.byteLength===0)&&(vc=new Float64Array(Si.memory.buffer)),vc}const Xp=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Xp.decode();function kl(m,f){return m=m>>>0,Xp.decode(zl().subarray(m,m+f))}let xc=null;function C_(){return(xc===null||xc.byteLength===0)&&(xc=new BigInt64Array(Si.memory.buffer)),xc}function wh(m){const f=typeof m;if(f=="number"||f=="boolean"||m==null)return`${m}`;if(f=="string")return`"${m}"`;if(f=="symbol"){const E=m.description;return E==null?"Symbol":`Symbol(${E})`}if(f=="function"){const E=m.name;return typeof E=="string"&&E.length>0?`Function(${E})`:"Function"}if(Array.isArray(m)){const E=m.length;let k="[";E>0&&(k+=wh(m[0]));for(let B=1;B1)v=_[1];else return toString.call(m);if(v=="Object")try{return"Object("+JSON.stringify(m)+")"}catch{return"Object"}return m instanceof Error?`${m.name}: ${m.message} -${m.stack}`:v}function M_(m,f){const _=f(m.length*1,1)>>>0;return zl().set(m,_/1),rl=m.length,_}function A_(m,f){return m=m>>>0,zl().subarray(m/1,m/1+f)}function fh(m,f){try{return m.apply(this,f)}catch(_){Si.__wbindgen_exn_store(dn(_))}}class k_{__destroy_into_raw(){const f=this.__wbg_ptr;return this.__wbg_ptr=0,f}free(){const f=this.__destroy_into_raw();Si.__wbg_mapmodel_free(f)}constructor(f){try{const k=Si.__wbindgen_add_to_stack_pointer(-16),B=M_(f,Si.__wbindgen_malloc),s=rl;Si.mapmodel_new(k,B,s);var _=Br()[k/4+0],v=Br()[k/4+1],E=Br()[k/4+2];if(E)throw du(v);return this.__wbg_ptr=_>>>0,this}finally{Si.__wbindgen_add_to_stack_pointer(16)}}render(){let f,_;try{const N=Si.__wbindgen_add_to_stack_pointer(-16);Si.mapmodel_render(N,this.__wbg_ptr);var v=Br()[N/4+0],E=Br()[N/4+1],k=Br()[N/4+2],B=Br()[N/4+3],s=v,H=E;if(B)throw s=0,H=0,du(k);return f=s,_=H,kl(s,H)}finally{Si.__wbindgen_add_to_stack_pointer(16),Si.__wbindgen_free(f,_,1)}}toRouteSnapper(){try{const E=Si.__wbindgen_add_to_stack_pointer(-16);Si.mapmodel_toRouteSnapper(E,this.__wbg_ptr);var f=Br()[E/4+0],_=Br()[E/4+1],v=A_(f,_).slice();return Si.__wbindgen_free(f,_*1,1),v}finally{Si.__wbindgen_add_to_stack_pointer(16)}}analyzeNeighbourhood(f){let _,v;try{const _e=Si.__wbindgen_add_to_stack_pointer(-16);Si.mapmodel_analyzeNeighbourhood(_e,this.__wbg_ptr,dn(f));var E=Br()[_e/4+0],k=Br()[_e/4+1],B=Br()[_e/4+2],s=Br()[_e/4+3],H=E,N=k;if(s)throw H=0,N=0,du(B);return _=H,v=N,kl(H,N)}finally{Si.__wbindgen_add_to_stack_pointer(16),Si.__wbindgen_free(_,v,1)}}}async function P_(m,f){if(typeof Response=="function"&&m instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(m,f)}catch(v){if(m.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",v);else throw v}const _=await m.arrayBuffer();return await WebAssembly.instantiate(_,f)}else{const _=await WebAssembly.instantiate(m,f);return _ instanceof WebAssembly.Instance?{instance:_,module:m}:_}}function z_(){const m={};return m.wbg={},m.wbg.__wbindgen_object_drop_ref=function(f){du(f)},m.wbg.__wbindgen_string_get=function(f,_){const v=oi(_),E=typeof v=="string"?v:void 0;var k=mc(E)?0:ph(E,Si.__wbindgen_malloc,Si.__wbindgen_realloc),B=rl;Br()[f/4+1]=B,Br()[f/4+0]=k},m.wbg.__wbindgen_boolean_get=function(f){const _=oi(f);return typeof _=="boolean"?_?1:0:2},m.wbg.__wbindgen_is_bigint=function(f){return typeof oi(f)=="bigint"},m.wbg.__wbindgen_bigint_from_i64=function(f){return dn(f)},m.wbg.__wbindgen_jsval_eq=function(f,_){return oi(f)===oi(_)},m.wbg.__wbindgen_bigint_from_u64=function(f){const _=BigInt.asUintN(64,f);return dn(_)},m.wbg.__wbindgen_number_get=function(f,_){const v=oi(_),E=typeof v=="number"?v:void 0;E_()[f/8+1]=mc(E)?0:E,Br()[f/4+0]=!mc(E)},m.wbg.__wbindgen_is_object=function(f){const _=oi(f);return typeof _=="object"&&_!==null},m.wbg.__wbindgen_in=function(f,_){return oi(f)in oi(_)},m.wbg.__wbindgen_error_new=function(f,_){const v=new Error(kl(f,_));return dn(v)},m.wbg.__wbindgen_string_new=function(f,_){const v=kl(f,_);return dn(v)},m.wbg.__wbindgen_jsval_loose_eq=function(f,_){return oi(f)==oi(_)},m.wbg.__wbg_debug_34c9290896ec9856=function(f){console.debug(oi(f))},m.wbg.__wbg_error_e60eff06f24ab7a4=function(f){console.error(oi(f))},m.wbg.__wbg_info_d7d58472d0bab115=function(f){console.info(oi(f))},m.wbg.__wbg_log_a4530b4fe289336f=function(f){console.log(oi(f))},m.wbg.__wbg_warn_f260f49434e45e62=function(f){console.warn(oi(f))},m.wbg.__wbg_get_f01601b5a68d10e3=function(f,_){const v=oi(f)[_>>>0];return dn(v)},m.wbg.__wbg_length_1009b1af0c481d7b=function(f){return oi(f).length},m.wbg.__wbindgen_is_function=function(f){return typeof oi(f)=="function"},m.wbg.__wbg_next_9b877f231f476d01=function(f){const _=oi(f).next;return dn(_)},m.wbg.__wbg_next_6529ee0cca8d57ed=function(){return fh(function(f){const _=oi(f).next();return dn(_)},arguments)},m.wbg.__wbg_done_5fe336b092d60cf2=function(f){return oi(f).done},m.wbg.__wbg_value_0c248a78fdc8e19f=function(f){const _=oi(f).value;return dn(_)},m.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return dn(Symbol.iterator)},m.wbg.__wbg_get_7b48513de5dc5ea4=function(){return fh(function(f,_){const v=Reflect.get(oi(f),oi(_));return dn(v)},arguments)},m.wbg.__wbg_call_90c26b09837aba1c=function(){return fh(function(f,_){const v=oi(f).call(oi(_));return dn(v)},arguments)},m.wbg.__wbg_isArray_74fb723e24f76012=function(f){return Array.isArray(oi(f))},m.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(f){let _;try{_=oi(f)instanceof ArrayBuffer}catch{_=!1}return _},m.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(f){return Number.isSafeInteger(oi(f))},m.wbg.__wbg_entries_9e2e2aa45aa5094a=function(f){const _=Object.entries(oi(f));return dn(_)},m.wbg.__wbg_buffer_a448f833075b71ba=function(f){const _=oi(f).buffer;return dn(_)},m.wbg.__wbg_new_8f67e318f15d7254=function(f){const _=new Uint8Array(oi(f));return dn(_)},m.wbg.__wbg_set_2357bf09366ee480=function(f,_,v){oi(f).set(oi(_),v>>>0)},m.wbg.__wbg_length_1d25fa9e4ac21ce7=function(f){return oi(f).length},m.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(f){let _;try{_=oi(f)instanceof Uint8Array}catch{_=!1}return _},m.wbg.__wbg_new_abda76e883ba8a5f=function(){const f=new Error;return dn(f)},m.wbg.__wbg_stack_658279fe44541cf6=function(f,_){const v=oi(_).stack,E=ph(v,Si.__wbindgen_malloc,Si.__wbindgen_realloc),k=rl;Br()[f/4+1]=k,Br()[f/4+0]=E},m.wbg.__wbg_error_f851667af71bcfc6=function(f,_){let v,E;try{v=f,E=_,console.error(kl(f,_))}finally{Si.__wbindgen_free(v,E,1)}},m.wbg.__wbindgen_bigint_get_as_i64=function(f,_){const v=oi(_),E=typeof v=="bigint"?v:void 0;C_()[f/8+1]=mc(E)?BigInt(0):E,Br()[f/4+0]=!mc(E)},m.wbg.__wbindgen_debug_string=function(f,_){const v=wh(oi(_)),E=ph(v,Si.__wbindgen_malloc,Si.__wbindgen_realloc),k=rl;Br()[f/4+1]=k,Br()[f/4+0]=E},m.wbg.__wbindgen_throw=function(f,_){throw new Error(kl(f,_))},m.wbg.__wbindgen_memory=function(){const f=Si.memory;return dn(f)},m}function L_(m,f){return Si=m.exports,Kp.__wbindgen_wasm_module=f,xc=null,vc=null,yc=null,gc=null,Si}async function Kp(m){if(Si!==void 0)return Si;typeof m>"u"&&(m="/ltn/assets/backend_bg.wasm");const f=z_();(typeof m=="string"||typeof Request=="function"&&m instanceof Request||typeof URL=="function"&&m instanceof URL)&&(m=fetch(m));const{instance:_,module:v}=await P_(await m,f);return L_(_,v)}const Cl=[];function mh(m,f){return{subscribe:bo(m,f).subscribe}}function bo(m,f=Mr){let _;const v=new Set;function E(s){if(Sr(m,s)&&(m=s,_)){const H=!Cl.length;for(const N of v)N[1](),Cl.push(N,m);if(H){for(let N=0;N{v.delete(N),v.size===0&&_&&(_(),_=null)}}return{set:E,update:k,subscribe:B}}let D_=Date.now();function Lc(m){return`${m}-${D_++}`}const Eh=Symbol.for("svelte-maplibre");function Ll(){return y_(Eh)}function F_(m){let f=new WeakMap;return _=>{var B;let v=f.get(_.originalEvent);if(v!==void 0)return v;let k=(B=_.target.queryRenderedFeatures(_.point).find(s=>{var H;return(H=m.get(s.layer.id))==null?void 0:H.interactive}))==null?void 0:B.layer.id;return f.set(_.originalEvent,k),k}}function R_(){let m=new Map;return qp(Eh,{map:bo(null),source:mh(null),layer:mh(null),popupTarget:mh(null),cluster:bo(),loadedImages:bo(new Set),minzoom:bo(0),maxzoom:bo(24),layerEvent:bo(null),layerInfo:m,eventTopMost:F_(m)})}function yp(m){return{subscribe:m.subscribe}}function Jp({key:m,setPopupTarget:f=!1,setCluster:_=!1,setMouseEvent:v=!1}){let E=Ll(),k=bo(null),B=yp(k),s={...E,[m]:yp(k)};if(f&&(s.popupTarget=B),v){let H=bo(null);s.layerEvent=H,E.layerEvent=H}return _&&(s.cluster=bo()),qp(Eh,s),{...E,self:k}}function O_(){return Jp({key:"source",setCluster:!0})}function B_(m=!0){return Jp({key:"layer",setPopupTarget:m,setMouseEvent:m})}function N_(m){return"layerType"in m&&m.layerType==="deckgl"}var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yp(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Qp={exports:{}};(function(m,f){(function(_,v){m.exports=v()})(Al,function(){var _,v,E;function k(s,H){if(!_)_=H;else if(!v)v=H;else{var N="var sharedChunk = {}; ("+_+")(sharedChunk); ("+v+")(sharedChunk);",_e={};_(_e),E=H(_e),typeof window<"u"&&(E.workerUrl=window.URL.createObjectURL(new Blob([N],{type:"text/javascript"})))}}k(["exports"],function(s){function H(i,e,r,o){return new(r||(r=Promise))(function(l,h){function p(T){try{w(o.next(T))}catch(M){h(M)}}function y(T){try{w(o.throw(T))}catch(M){h(M)}}function w(T){var M;T.done?l(T.value):(M=T.value,M instanceof r?M:new r(function(z){z(M)})).then(p,y)}w((o=o.apply(i,e||[])).next())})}function N(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}typeof SuppressedError=="function"&&SuppressedError;var _e=be;function be(i,e){this.x=i,this.y=e}be.prototype={clone:function(){return new be(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)},rotateAround:function(i,e){return this.clone()._rotateAround(i,e)},matMult:function(i){return this.clone()._matMult(i)},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(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var e=i.x-this.x,r=i.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,e){return Math.atan2(this.x*e-this.y*i,this.x*i+this.y*e)},_matMult:function(i){var e=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=e,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var e=Math.cos(i),r=Math.sin(i),o=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=o,this},_rotateAround:function(i,e){var r=Math.cos(i),o=Math.sin(i),l=e.y+o*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-o*(this.y-e.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},be.convert=function(i){return i instanceof be?i:Array.isArray(i)?new be(i[0],i[1]):i};var ye=N(_e),Oe=Le;function Le(i,e,r,o){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(o-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=o}Le.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,o=0;o<8;o++){var l=this.sampleCurveX(r)-i;if(Math.abs(l)l?p=r:y=r,r=.5*(y-p)+p;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Be=N(Oe);let Ne,et;function at(){return Ne==null&&(Ne=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Ne}function nt(){if(et==null&&(et=!1,at())){const e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let o=0;o<5*5;o++){const l=4*o;e.fillStyle=`rgb(${l},${l+1},${l+2})`,e.fillRect(o%5,Math.floor(o/5),1,1)}const r=e.getImageData(0,0,5,5).data;for(let o=0;o<5*5*4;o++)if(o%4!=3&&r[o]!==o){et=!0;break}}}return et||!1}function it(i,e,r,o){const l=new Be(i,e,r,o);return function(h){return l.solve(h)}}const Vt=it(.25,.1,.25,1);function ei(i,e,r){return Math.min(r,Math.max(e,i))}function Ht(i,e,r){const o=r-e,l=((i-e)%o+o)%o+e;return l===e?r:l}function Nt(i,...e){for(const r of e)for(const o in r)i[o]=r[o];return i}let Jt=1;function At(i,e,r){const o={};for(const l in i)o[l]=e.call(r||this,i[l],l,i);return o}function Ae(i,e,r){const o={};for(const l in i)e.call(r||this,i[l],l,i)&&(o[l]=i[l]);return o}function Ge(i){return Array.isArray(i)?i.map(Ge):typeof i=="object"&&i?At(i,Ge):i}const Ui={};function Dt(i){Ui[i]||(typeof console<"u"&&console.warn(i),Ui[i]=!0)}function qt(i,e,r){return(r.y-i.y)*(e.x-i.x)>(e.y-i.y)*(r.x-i.x)}function Lt(i){let e=0;for(let r,o,l=0,h=i.length,p=h-1;l"u")throw new Error("VideoFrame not supported");const h=new VideoFrame(i,{timestamp:0});try{const p=h==null?void 0:h.format;if(!p||!p.startsWith("BGR")&&!p.startsWith("RGB"))throw new Error(`Unrecognized format ${p}`);const y=p.startsWith("BGR"),w=new Uint8ClampedArray(o*l*4);if(yield h.copyTo(w,function(T,M,z,D,V){const U=4*Math.max(-M,0),Z=(Math.max(0,z)-z)*D*4+U,$=4*D,ie=Math.max(0,M),ue=Math.max(0,z);return{rect:{x:ie,y:ue,width:Math.min(T.width,M+D)-ie,height:Math.min(T.height,z+V)-ue},layout:[{offset:Z,stride:$}]}}(i,e,r,o,l)),y)for(let T=0;TcancelAnimationFrame(e)}},getImageData(i,e=0){return this.getImageCanvasContext(i).getImageData(-e,-e,i.width+2*e,i.height+2*e)},getImageCanvasContext(i){const e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=i.width,e.height=i.height,r.drawImage(i,0,0,i.width,i.height),r},resolveURL:i=>(pi||(pi=document.createElement("a")),pi.href=i,pi.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Oi==null&&(Oi=matchMedia("(prefers-reduced-motion: reduce)")),Oi.matches)}},Pt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};class He extends Error{constructor(e,r,o,l){super(`AJAXError: ${r} (${e}): ${o}`),this.status=e,this.statusText=r,this.url=o,this.body=l}}const Zt=di()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href,ct=i=>Pt.REGISTERED_PROTOCOLS[i.substring(0,i.indexOf("://"))];function Zi(i,e){const r=new AbortController,o=new Request(i.url,{method:i.method||"GET",body:i.body,credentials:i.credentials,headers:i.headers,cache:i.cache,referrer:Zt(),signal:r.signal});let l=!1,h=!1;return i.type==="json"&&o.headers.set("Accept","application/json"),h||fetch(o).then(p=>p.ok?(y=>{(i.type==="arrayBuffer"||i.type==="image"?y.arrayBuffer():i.type==="json"?y.json():y.text()).then(w=>{h||(l=!0,e(null,w,y.headers.get("Cache-Control"),y.headers.get("Expires")))}).catch(w=>{h||e(new Error(w.message))})})(p):p.blob().then(y=>e(new He(p.status,p.statusText,i.url,y)))).catch(p=>{p.code!==20&&e(new Error(p.message))}),{cancel:()=>{h=!0,l||r.abort()}}}const _r=function(i,e){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){if(di()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e);if(!di())return(ct(i.url)||Zi)(i,e)}if(!(/^file:/.test(r=i.url)||/^file:/.test(Zt())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return Zi(i,e);if(di()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e,void 0,!0)}var r;return function(o,l){const h=new XMLHttpRequest;h.open(o.method||"GET",o.url,!0),o.type!=="arrayBuffer"&&o.type!=="image"||(h.responseType="arraybuffer");for(const p in o.headers)h.setRequestHeader(p,o.headers[p]);return o.type==="json"&&(h.responseType="text",h.setRequestHeader("Accept","application/json")),h.withCredentials=o.credentials==="include",h.onerror=()=>{l(new Error(h.statusText))},h.onload=()=>{if((h.status>=200&&h.status<300||h.status===0)&&h.response!==null){let p=h.response;if(o.type==="json")try{p=JSON.parse(h.response)}catch(y){return l(y)}l(null,p,h.getResponseHeader("Cache-Control"),h.getResponseHeader("Expires"))}else{const p=new Blob([h.response],{type:h.getResponseHeader("Content-Type")});l(new He(h.status,h.statusText,o.url,p))}},h.send(o.body),{cancel:()=>h.abort()}}(i,e)},Ue=function(i,e){return _r(Nt(i,{type:"arrayBuffer"}),e)};function Bi(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const e=new URL(i),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function gr(i,e,r){r[i]&&r[i].indexOf(e)!==-1||(r[i]=r[i]||[],r[i].push(e))}function ci(i,e,r){if(r&&r[i]){const o=r[i].indexOf(e);o!==-1&&r[i].splice(o,1)}}class co{constructor(e,r={}){Nt(this,r),this.type=e}}class wo extends co{constructor(e,r={}){super("error",Nt({error:e},r))}}class jo{on(e,r){return this._listeners=this._listeners||{},gr(e,r,this._listeners),this}off(e,r){return ci(e,r,this._listeners),ci(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},gr(e,r,this._oneTimeListeners),this):new Promise(o=>this.once(e,o))}fire(e,r){typeof e=="string"&&(e=new co(e,r||{}));const o=e.type;if(this.listens(o)){e.target=this;const l=this._listeners&&this._listeners[o]?this._listeners[o].slice():[];for(const y of l)y.call(this,e);const h=this._oneTimeListeners&&this._oneTimeListeners[o]?this._oneTimeListeners[o].slice():[];for(const y of h)ci(o,y,this._oneTimeListeners),y.call(this,e);const p=this._eventedParent;p&&(Nt(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(e))}else e instanceof wo&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var Se={$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"},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}},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 en=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function In(i,e){const r={};for(const o in i)o!=="ref"&&(r[o]=i[o]);return en.forEach(o=>{o in e&&(r[o]=e[o])}),r}function Ii(i,e){if(Array.isArray(i)){if(!Array.isArray(e)||i.length!==e.length)return!1;for(let r=0;r`:i.itemType.kind==="value"?"array":`array<${e}>`}return i.kind}const he=[tn,We,Bt,Mt,Vr,X,mn,J(It),L,F,j];function oe(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!oe(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value"){for(const r of he)if(!oe(r,e))return null}}return`Expected ${Q(i)} but found ${Q(e)} instead.`}function te(i,e){return e.some(r=>r.kind===i.kind)}function ae(i,e){return e.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function Te(i,e){return i.kind==="array"&&e.kind==="array"?i.itemType.kind===e.itemType.kind&&typeof i.N=="number":i.kind===e.kind}const Ie=.96422,Ee=.82521,mt=4/29,kt=6/29,ut=3*kt*kt,vt=kt*kt*kt,Ft=Math.PI/180,mi=180/Math.PI;function Ut(i){return(i%=360)<0&&(i+=360),i}function si([i,e,r,o]){let l,h;const p=Ur((.2225045*(i=ii(i))+.7168786*(e=ii(e))+.0606169*(r=ii(r)))/1);i===e&&e===r?l=h=p:(l=Ur((.4360747*i+.3850649*e+.1430804*r)/Ie),h=Ur((.0139322*i+.0971045*e+.7141733*r)/Ee));const y=116*p-16;return[y<0?0:y,500*(l-p),200*(p-h),o]}function ii(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function Ur(i){return i>vt?Math.pow(i,1/3):i/ut+mt}function Ei([i,e,r,o]){let l=(i+16)/116,h=isNaN(e)?l:l+e/500,p=isNaN(r)?l:l-r/200;return l=1*yr(l),h=Ie*yr(h),p=Ee*yr(p),[ur(3.1338561*h-1.6168667*l-.4906146*p),ur(-.9787684*h+1.9161415*l+.033454*p),ur(.0719453*h-.2289914*l+1.4052427*p),o]}function ur(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function yr(i){return i>kt?i*i*i:ut*(i-mt)}function An(i){return parseInt(i.padEnd(2,i),16)/255}function xs(i,e){return To(e?i/100:i,0,1)}function To(i,e,r){return Math.min(Math.max(e,i),r)}function Io(i){return!i.some(Number.isNaN)}const vr={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 gi{constructor(e,r,o,l=1,h=!0){this.r=e,this.g=r,this.b=o,this.a=l,h||(this.r*=l,this.g*=l,this.b*=l,l||this.overwriteGetter("rgb",[e,r,o,l]))}static parse(e){if(e instanceof gi)return e;if(typeof e!="string")return;const r=function(o){if((o=o.toLowerCase().trim())==="transparent")return[0,0,0,0];const l=vr[o];if(l){const[p,y,w]=l;return[p/255,y/255,w/255,1]}if(o.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(o)){const p=o.length<6?1:2;let y=1;return[An(o.slice(y,y+=p)),An(o.slice(y,y+=p)),An(o.slice(y,y+=p)),An(o.slice(y,y+p)||"ff")]}if(o.startsWith("rgb")){const p=o.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[y,w,T,M,z,D,V,U,Z,$,ie,ue]=p,re=[M||" ",V||" ",$].join("");if(re===" "||re===" /"||re===",,"||re===",,,"){const pe=[T,D,Z].join(""),ge=pe==="%%%"?100:pe===""?255:0;if(ge){const Me=[To(+w/ge,0,1),To(+z/ge,0,1),To(+U/ge,0,1),ie?xs(+ie,ue):1];if(Io(Me))return Me}}return}}const h=o.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(h){const[p,y,w,T,M,z,D,V,U]=h,Z=[w||" ",M||" ",D].join("");if(Z===" "||Z===" /"||Z===",,"||Z===",,,"){const $=[+y,To(+T,0,100),To(+z,0,100),V?xs(+V,U):1];if(Io($))return function([ie,ue,re,pe]){function ge(Me){const lt=(Me+ie/30)%12,pt=ue*Math.min(re,1-re);return re-pt*Math.max(-1,Math.min(lt-3,9-lt,1))}return ie=Ut(ie),ue/=100,re/=100,[ge(0),ge(8),ge(4),pe]}($)}}}(e);return r?new gi(...r,!1):void 0}get rgb(){const{r:e,g:r,b:o,a:l}=this,h=l||1/0;return this.overwriteGetter("rgb",[e/h,r/h,o/h,l])}get hcl(){return this.overwriteGetter("hcl",function(e){const[r,o,l,h]=si(e),p=Math.sqrt(o*o+l*l);return[Math.round(1e4*p)?Ut(Math.atan2(l,o)*mi):NaN,p,r,h]}(this.rgb))}get lab(){return this.overwriteGetter("lab",si(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){const[e,r,o,l]=this.rgb;return`rgba(${[e,r,o].map(h=>Math.round(255*h)).join(",")},${l})`}}gi.black=new gi(0,0,0,1),gi.white=new gi(1,1,1,1),gi.transparent=new gi(0,0,0,0),gi.red=new gi(1,0,0,1);class ea{constructor(e,r,o){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class jn{constructor(e,r,o,l,h){this.text=e,this.image=r,this.scale=o,this.fontStack=l,this.textColor=h}}class ji{constructor(e){this.sections=e}static fromString(e){return new ji([new jn(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof ji?e:ji.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class jr{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof jr)return e;if(typeof e=="number")return new jr([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new jr(e)}}toString(){return JSON.stringify(this.values)}}const Go=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Tr{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Tr)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let r=0;r=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?o===void 0||typeof o=="number"&&o>=0&&o<=1?null:`Invalid rgba value [${[i,e,r,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof o=="number"?[i,e,r,o]:[i,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function os(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof gi||i instanceof ea||i instanceof ji||i instanceof jr||i instanceof Tr||i instanceof Ir)return!0;if(Array.isArray(i)){for(const e of i)if(!os(e))return!1;return!0}if(typeof i=="object"){for(const e in i)if(!os(i[e]))return!1;return!0}return!1}function Gi(i){if(i===null)return tn;if(typeof i=="string")return Bt;if(typeof i=="boolean")return Mt;if(typeof i=="number")return We;if(i instanceof gi)return Vr;if(i instanceof ea)return Mn;if(i instanceof ji)return X;if(i instanceof jr)return L;if(i instanceof Tr)return j;if(i instanceof Ir)return F;if(Array.isArray(i)){const e=i.length;let r;for(const o of i){const l=Gi(o);if(r){if(r===l)continue;r=It;break}r=l}return J(r||It,e)}return mn}function ui(i){const e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof gi||i instanceof ji||i instanceof jr||i instanceof Tr||i instanceof Ir?i.toString():JSON.stringify(i)}class uo{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!os(e[1]))return r.error("invalid value");const o=e[1];let l=Gi(o);const h=r.expectedType;return l.kind!=="array"||l.N!==0||!h||h.kind!=="array"||typeof h.N=="number"&&h.N!==0||(l=h),new uo(l,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Wi{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const bs={string:Bt,number:We,boolean:Mt,object:mn};class kn{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let o,l=1;const h=e[0];if(h==="array"){let y,w;if(e.length>2){const T=e[1];if(typeof T!="string"||!(T in bs)||T==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);y=bs[T],l++}else y=It;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);w=e[2],l++}o=J(y,w)}else{if(!bs[h])throw new Error(`Types doesn't contain name = ${h}`);o=bs[h]}const p=[];for(;le.outputDefined())}}const Ba={"to-boolean":Mt,"to-color":Vr,"to-number":We,"to-string":Bt};class Eo{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const o=e[0];if(!Ba[o])throw new Error(`Can't parse ${o} as it is not part of the known types`);if((o==="to-boolean"||o==="to-string")&&e.length!==2)return r.error("Expected one argument.");const l=Ba[o],h=[];for(let p=1;p4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:ta(r[0],r[1],r[2],r[3]),!o))return new gi(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Wi(o||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const o of this.args){r=o.evaluate(e);const l=jr.parse(r);if(l)return l}throw new Wi(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const o of this.args){r=o.evaluate(e);const l=Tr.parse(r);if(l)return l}throw new Wi(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const o of this.args){if(r=o.evaluate(e),r===null)return 0;const l=Number(r);if(!isNaN(l))return l}throw new Wi(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return ji.fromString(ui(this.args[0].evaluate(e)));case"resolvedImage":return Ir.fromString(ui(this.args[0].evaluate(e)));default:return ui(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const ws=["Unknown","Point","LineString","Polygon"];class g{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"?ws[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(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=gi.parse(e)),r}}class I{constructor(e,r,o=[],l,h=new Zo,p=[]){this.registry=e,this.path=o,this.key=o.map(y=>`[${y}]`).join(""),this.scope=h,this.errors=p,this.expectedType=l,this._isConstant=r}parse(e,r,o,l,h={}){return r?this.concat(r,o,l)._parse(e,h):this._parse(e,h)}_parse(e,r){function o(l,h,p){return p==="assert"?new kn(h,[l]):p==="coerce"?new Eo(h,[l]):l}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const l=e[0];if(typeof l!="string")return this.error(`Expression name must be a string, but found ${typeof l} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const h=this.registry[l];if(h){let p=h.parse(e,this);if(!p)return null;if(this.expectedType){const y=this.expectedType,w=p.type;if(y.kind!=="string"&&y.kind!=="number"&&y.kind!=="boolean"&&y.kind!=="object"&&y.kind!=="array"||w.kind!=="value")if(y.kind!=="color"&&y.kind!=="formatted"&&y.kind!=="resolvedImage"||w.kind!=="value"&&w.kind!=="string")if(y.kind!=="padding"||w.kind!=="value"&&w.kind!=="number"&&w.kind!=="array")if(y.kind!=="variableAnchorOffsetCollection"||w.kind!=="value"&&w.kind!=="array"){if(this.checkSubtype(y,w))return null}else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"assert")}if(!(p instanceof uo)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const y=new g;try{p=new uo(p.type,p.evaluate(y))}catch(w){return this.error(w.message),null}}return p}return this.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,o){const l=typeof e=="number"?this.path.concat(e):this.path,h=o?this.scope.concat(o):this.scope;return new I(this.registry,this._isConstant,l,r||null,h,this.errors)}error(e,...r){const o=`${this.key}${r.map(l=>`[${l}]`).join("")}`;this.errors.push(new er(o,e))}checkSubtype(e,r){const o=oe(e,r);return o&&this.error(o),o}}class O{constructor(e,r,o){this.type=Mn,this.locale=o,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");const o=e[1];if(typeof o!="object"||Array.isArray(o))return r.error("Collator options argument must be an object.");const l=r.parse(o["case-sensitive"]!==void 0&&o["case-sensitive"],1,Mt);if(!l)return null;const h=r.parse(o["diacritic-sensitive"]!==void 0&&o["diacritic-sensitive"],1,Mt);if(!h)return null;let p=null;return o.locale&&(p=r.parse(o.locale,1,Bt),!p)?null:new O(l,h,p)}evaluate(e){return new ea(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const Y=8192;function ne(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function se(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function fe(i,e){const r=(180+i[0])/360,o=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,l=Math.pow(2,e.z);return[Math.round(r*l*Y),Math.round(o*l*Y)]}function De(i,e,r){const o=i[0]-e[0],l=i[1]-e[1],h=i[0]-r[0],p=i[1]-r[1];return o*p-h*l==0&&o*h<=0&&l*p<=0}function Ve(i,e){let r=!1;for(let p=0,y=e.length;p(o=i)[1]!=(h=w[T+1])[1]>o[1]&&o[0]<(h[0]-l[0])*(o[1]-l[1])/(h[1]-l[1])+l[0]&&(r=!r)}}var o,l,h;return r}function rt(i,e){for(let r=0;r0&&y<0||p<0&&y>0}function Je(i,e,r){for(const T of r)for(let M=0;Mr[2]){const l=.5*o;let h=i[0]-r[0]>l?-o:r[0]-i[0]>l?o:0;h===0&&(h=i[0]-r[2]>l?-o:r[2]-i[0]>l?o:0),i[0]+=h}ne(e,i)}function _t(i,e,r,o){const l=Math.pow(2,o.z)*Y,h=[o.x*Y,o.y*Y],p=[];for(const y of i)for(const w of y){const T=[w.x+h[0],w.y+h[1]];ke(T,e,r,l),p.push(T)}return p}function yi(i,e,r,o){const l=Math.pow(2,o.z)*Y,h=[o.x*Y,o.y*Y],p=[];for(const w of i){const T=[];for(const M of w){const z=[M.x+h[0],M.y+h[1]];ne(e,z),T.push(z)}p.push(T)}if(e[2]-e[0]<=l/2){(y=e)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(const w of p)for(const T of w)ke(T,e,r,l)}var y;return p}class Xi{constructor(e,r){this.type=Mt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(os(e[1])){const o=e[1];if(o.type==="FeatureCollection")for(let l=0;l!Array.isArray(T)||T.length===e.length-1);let w=null;for(const[T,M]of y){w=new I(r.registry,ia,r.path,null,r.scope);const z=[];let D=!1;for(let V=1;V{return D=z,Array.isArray(D)?`(${D.map(Q).join(", ")})`:`(${Q(D.type)}...)`;var D}).join(" | "),M=[];for(let z=1;z{r=e?r&&ia(o):r&&o instanceof uo}),!!r&&Ci(i)&&ra(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Ci(i){if(i instanceof rn&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof Xi)return!1;let e=!0;return i.eachChild(r=>{e&&!Ci(r)&&(e=!1)}),e}function ss(i){if(i instanceof rn&&i.name==="feature-state")return!1;let e=!0;return i.eachChild(r=>{e&&!ss(r)&&(e=!1)}),e}function ra(i,e){if(i instanceof rn&&e.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(o=>{r&&!ra(o,e)&&(r=!1)}),r}function nn(i,e){const r=i.length-1;let o,l,h=0,p=r,y=0;for(;h<=p;)if(y=Math.floor((h+p)/2),o=i[y],l=i[y+1],o<=e){if(y===r||ee))throw new Wi("Input is not a number.");p=y-1}return 0}class ho{constructor(e,r,o){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[l,h]of o)this.labels.push(l),this.outputs.push(h)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");const o=r.parse(e[1],1,We);if(!o)return null;const l=[];let h=null;r.expectedType&&r.expectedType.kind!=="value"&&(h=r.expectedType);for(let p=1;p=y)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',T);const z=r.parse(w,M,h);if(!z)return null;h=h||z.type,l.push([y,z])}return new ho(h,o,l)}evaluate(e){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return o[0].evaluate(e);const h=r.length;return l>=r[h-1]?o[h-1].evaluate(e):o[nn(r,l)].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Xt(i,e,r){return i+r*(e-i)}function Ss(i,e,r){return i.map((o,l)=>Xt(o,e[l],r))}const Wr={number:Xt,color:function(i,e,r,o="rgb"){switch(o){case"rgb":{const[l,h,p,y]=Ss(i.rgb,e.rgb,r);return new gi(l,h,p,y,!1)}case"hcl":{const[l,h,p,y]=i.hcl,[w,T,M,z]=e.hcl;let D,V;if(isNaN(l)||isNaN(w))isNaN(l)?isNaN(w)?D=NaN:(D=w,p!==1&&p!==0||(V=T)):(D=l,M!==1&&M!==0||(V=h));else{let ue=w-l;w>l&&ue>180?ue-=360:w180&&(ue+=360),D=l+r*ue}const[U,Z,$,ie]=function([ue,re,pe,ge]){return ue=isNaN(ue)?0:ue*Ft,Ei([pe,Math.cos(ue)*re,Math.sin(ue)*re,ge])}([D,V??Xt(h,T,r),Xt(p,M,r),Xt(y,z,r)]);return new gi(U,Z,$,ie,!1)}case"lab":{const[l,h,p,y]=Ei(Ss(i.lab,e.lab,r));return new gi(l,h,p,y,!1)}}},array:Ss,padding:function(i,e,r){return new jr(Ss(i.values,e.values,r))},variableAnchorOffsetCollection:function(i,e,r){const o=i.values,l=e.values;if(o.length!==l.length)throw new Wi(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${e.toString()}`);const h=[];for(let p=0;ptypeof M!="number"||M<0||M>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);l={name:"cubic-bezier",controlPoints:T}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(h=r.parse(h,2,We),!h)return null;const y=[];let w=null;o==="interpolate-hcl"||o==="interpolate-lab"?w=Vr:r.expectedType&&r.expectedType.kind!=="value"&&(w=r.expectedType);for(let T=0;T=M)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',D);const U=r.parse(z,V,w);if(!U)return null;w=w||U.type,y.push([M,U])}return Te(w,We)||Te(w,Vr)||Te(w,L)||Te(w,j)||Te(w,J(We))?new on(w,o,l,h,y):r.error(`Type ${Q(w)} is not interpolatable.`)}evaluate(e){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return o[0].evaluate(e);const h=r.length;if(l>=r[h-1])return o[h-1].evaluate(e);const p=nn(r,l),y=on.interpolationFactor(this.interpolation,l,r[p],r[p+1]),w=o[p].evaluate(e),T=o[p+1].evaluate(e);switch(this.operator){case"interpolate":return Wr[this.type.kind](w,T,y);case"interpolate-hcl":return Wr.color(w,T,y,"hcl");case"interpolate-lab":return Wr.color(w,T,y,"lab")}}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function na(i,e,r,o){const l=o-r,h=i-r;return l===0?0:e===1?h/l:(Math.pow(e,h)-1)/(Math.pow(e,l)-1)}class oa{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expectected at least one argument.");let o=null;const l=r.expectedType;l&&l.kind!=="value"&&(o=l);const h=[];for(const y of e.slice(1)){const w=r.parse(y,1+h.length,o,void 0,{typeAnnotation:"omit"});if(!w)return null;o=o||w.type,h.push(w)}if(!o)throw new Error("No output type");const p=l&&h.some(y=>oe(l,y.type));return new oa(p?It:o,h)}evaluate(e){let r,o=null,l=0;for(const h of this.args)if(l++,o=h.evaluate(e),o&&o instanceof Ir&&!o.available&&(r||(r=o.name),o=null,l===this.args.length&&(o=r)),o!==null)break;return o}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}class sa{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const o=[];for(let h=1;h=o.length)throw new Wi(`Array index out of bounds: ${r} > ${o.length-1}.`);if(r!==Math.floor(r))throw new Wi(`Array index must be an integer, but found ${r} instead.`);return o[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class aa{constructor(e,r){this.type=Mt,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,It);return o&&l?te(o.type,[Mt,Bt,We,tn,It])?new aa(o,l):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Q(o.type)} instead`):null}evaluate(e){const r=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!o)return!1;if(!ae(r,["boolean","string","number","null"]))throw new Wi(`Expected first argument to be of type boolean, string, number or null, but found ${Q(Gi(r))} instead.`);if(!ae(o,["string","array"]))throw new Wi(`Expected second argument to be of type array or string, but found ${Q(Gi(o))} instead.`);return o.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Ts{constructor(e,r,o){this.type=We,this.needle=e,this.haystack=r,this.fromIndex=o}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,It);if(!o||!l)return null;if(!te(o.type,[Mt,Bt,We,tn,It]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Q(o.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,We);return h?new Ts(o,l,h):null}return new Ts(o,l)}evaluate(e){const r=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!ae(r,["boolean","string","number","null"]))throw new Wi(`Expected first argument to be of type boolean, string, number or null, but found ${Q(Gi(r))} instead.`);if(!ae(o,["string","array"]))throw new Wi(`Expected second argument to be of type array or string, but found ${Q(Gi(o))} instead.`);if(this.fromIndex){const l=this.fromIndex.evaluate(e);return o.indexOf(r,l)}return o.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class la{constructor(e,r,o,l,h,p){this.inputType=e,this.type=r,this.input=o,this.cases=l,this.outputs=h,this.otherwise=p}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let o,l;r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);const h={},p=[];for(let T=2;TNumber.MAX_SAFE_INTEGER)return D.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof U=="number"&&Math.floor(U)!==U)return D.error("Numeric branch labels must be integer values.");if(o){if(D.checkSubtype(o,Gi(U)))return null}else o=Gi(U);if(h[String(U)]!==void 0)return D.error("Branch labels must be unique.");h[String(U)]=p.length}const V=r.parse(z,T,l);if(!V)return null;l=l||V.type,p.push(V)}const y=r.parse(e[1],1,It);if(!y)return null;const w=r.parse(e[e.length-1],e.length-1,l);return w?y.type.kind!=="value"&&r.concat(1).checkSubtype(o,y.type)?null:new la(o,l,y,h,p,w):null}evaluate(e){const r=this.input.evaluate(e);return(Gi(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class Va{constructor(e,r,o){this.type=e,this.branches=r,this.otherwise=o}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let o;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);const l=[];for(let p=1;pr.outputDefined())&&this.otherwise.outputDefined()}}class ca{constructor(e,r,o,l){this.type=e,this.input=r,this.beginIndex=o,this.endIndex=l}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,We);if(!o||!l)return null;if(!te(o.type,[J(It),Bt,It]))return r.error(`Expected first argument to be of type array or string, but found ${Q(o.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,We);return h?new ca(o.type,o,l,h):null}return new ca(o.type,o,l)}evaluate(e){const r=this.input.evaluate(e),o=this.beginIndex.evaluate(e);if(!ae(r,["string","array"]))throw new Wi(`Expected first argument to be of type array or string, but found ${Q(Gi(r))} instead.`);if(this.endIndex){const l=this.endIndex.evaluate(e);return r.slice(o,l)}return r.slice(o)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function Is(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function ua(i,e,r,o){return o.compare(e,r)===0}function Wo(i,e,r){const o=i!=="=="&&i!=="!=";return class $p{constructor(h,p,y){this.type=Mt,this.lhs=h,this.rhs=p,this.collator=y,this.hasUntypedArgument=h.type.kind==="value"||p.type.kind==="value"}static parse(h,p){if(h.length!==3&&h.length!==4)return p.error("Expected two or three arguments.");const y=h[0];let w=p.parse(h[1],1,It);if(!w)return null;if(!Is(y,w.type))return p.concat(1).error(`"${y}" comparisons are not supported for type '${Q(w.type)}'.`);let T=p.parse(h[2],2,It);if(!T)return null;if(!Is(y,T.type))return p.concat(2).error(`"${y}" comparisons are not supported for type '${Q(T.type)}'.`);if(w.type.kind!==T.type.kind&&w.type.kind!=="value"&&T.type.kind!=="value")return p.error(`Cannot compare types '${Q(w.type)}' and '${Q(T.type)}'.`);o&&(w.type.kind==="value"&&T.type.kind!=="value"?w=new kn(T.type,[w]):w.type.kind!=="value"&&T.type.kind==="value"&&(T=new kn(w.type,[T])));let M=null;if(h.length===4){if(w.type.kind!=="string"&&T.type.kind!=="string"&&w.type.kind!=="value"&&T.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(M=p.parse(h[3],3,Mn),!M)return null}return new $p(w,T,M)}evaluate(h){const p=this.lhs.evaluate(h),y=this.rhs.evaluate(h);if(o&&this.hasUntypedArgument){const w=Gi(p),T=Gi(y);if(w.kind!==T.kind||w.kind!=="string"&&w.kind!=="number")throw new Wi(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${w.kind}, ${T.kind}) instead.`)}if(this.collator&&!o&&this.hasUntypedArgument){const w=Gi(p),T=Gi(y);if(w.kind!=="string"||T.kind!=="string")return e(h,p,y)}return this.collator?r(h,p,y,this.collator.evaluate(h)):e(h,p,y)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}}}const eo=Wo("==",function(i,e,r){return e===r},ua),sl=Wo("!=",function(i,e,r){return e!==r},function(i,e,r,o){return!ua(0,e,r,o)}),al=Wo("<",function(i,e,r){return e",function(i,e,r){return e>r},function(i,e,r,o){return o.compare(e,r)>0}),ll=Wo("<=",function(i,e,r){return e<=r},function(i,e,r,o){return o.compare(e,r)<=0}),ha=Wo(">=",function(i,e,r){return e>=r},function(i,e,r,o){return o.compare(e,r)>=0});class da{constructor(e,r,o,l,h){this.type=Bt,this.number=e,this.locale=r,this.currency=o,this.minFractionDigits=l,this.maxFractionDigits=h}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const o=r.parse(e[1],1,We);if(!o)return null;const l=e[2];if(typeof l!="object"||Array.isArray(l))return r.error("NumberFormat options argument must be an object.");let h=null;if(l.locale&&(h=r.parse(l.locale,1,Bt),!h))return null;let p=null;if(l.currency&&(p=r.parse(l.currency,1,Bt),!p))return null;let y=null;if(l["min-fraction-digits"]&&(y=r.parse(l["min-fraction-digits"],1,We),!y))return null;let w=null;return l["max-fraction-digits"]&&(w=r.parse(l["max-fraction-digits"],1,We),!w)?null:new da(o,h,p,y,w)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Es{constructor(e){this.type=X,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const o=e[1];if(!Array.isArray(o)&&typeof o=="object")return r.error("First argument must be an image or text section.");const l=[];let h=!1;for(let p=1;p<=e.length-1;++p){const y=e[p];if(h&&typeof y=="object"&&!Array.isArray(y)){h=!1;let w=null;if(y["font-scale"]&&(w=r.parse(y["font-scale"],1,We),!w))return null;let T=null;if(y["text-font"]&&(T=r.parse(y["text-font"],1,J(Bt)),!T))return null;let M=null;if(y["text-color"]&&(M=r.parse(y["text-color"],1,Vr),!M))return null;const z=l[l.length-1];z.scale=w,z.font=T,z.textColor=M}else{const w=r.parse(e[p],1,It);if(!w)return null;const T=w.type.kind;if(T!=="string"&&T!=="value"&&T!=="null"&&T!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,l.push({content:w,scale:null,font:null,textColor:null})}}return new Es(l)}evaluate(e){return new ji(this.sections.map(r=>{const o=r.content.evaluate(e);return Gi(o)===F?new jn("",o,null,null,null):new jn(ui(o),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)}))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}}class Ua{constructor(e){this.type=F,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const o=r.parse(e[1],1,Bt);return o?new Ua(o):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),o=Ir.fromString(r);return o&&e.availableImages&&(o.available=e.availableImages.indexOf(r)>-1),o}eachChild(e){e(this.input)}outputDefined(){return!1}}class po{constructor(e){this.type=We,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const o=r.parse(e[1],1);return o?o.type.kind!=="array"&&o.type.kind!=="string"&&o.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Q(o.type)} instead.`):new po(o):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new Wi(`Expected value to be of type string or array, but found ${Q(Gi(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const Ho={"==":eo,"!=":sl,">":Dl,"<":al,">=":ha,"<=":ll,array:kn,at:Na,boolean:kn,case:Va,coalesce:oa,collator:O,format:Es,image:Ua,in:aa,"index-of":Ts,interpolate:on,"interpolate-hcl":on,"interpolate-lab":on,length:po,let:sa,literal:uo,match:la,number:kn,"number-format":da,object:kn,slice:ca,step:ho,string:kn,"to-boolean":Eo,"to-color":Eo,"to-number":Eo,"to-string":Eo,var:tr,within:Xi};function cl(i,[e,r,o,l]){e=e.evaluate(i),r=r.evaluate(i),o=o.evaluate(i);const h=l?l.evaluate(i):1,p=ta(e,r,o,h);if(p)throw new Wi(p);return new gi(e/255,r/255,o/255,h,!1)}function ul(i,e){return i in e}function Cs(i,e){const r=e[i];return r===void 0?null:r}function qn(i){return{type:i}}function pa(i){return{result:"success",value:i}}function to(i){return{result:"error",value:i}}function Co(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function as(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function ja(i){return!!i.expression&&i.expression.interpolated}function fi(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function Ki(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Fl(i){return i}function Yt(i,e){const r=e.type==="color",o=i.stops&&typeof i.stops[0][0]=="object",l=o||!(o||i.property!==void 0),h=i.type||(ja(e)?"exponential":"interval");if(r||e.type==="padding"){const M=r?gi.parse:jr.parse;(i=fn({},i)).stops&&(i.stops=i.stops.map(z=>[z[0],M(z[1])])),i.default=M(i.default?i.default:e.default)}if(i.colorSpace&&(p=i.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var p;let y,w,T;if(h==="exponential")y=_n;else if(h==="interval")y=vi;else if(h==="categorical"){y=Ni,w=Object.create(null);for(const M of i.stops)w[M[0]]=M[1];T=typeof i.stops[0][0]}else{if(h!=="identity")throw new Error(`Unknown function type "${h}"`);y=Ao}if(o){const M={},z=[];for(let U=0;UU[0]),evaluate:({zoom:U},Z)=>_n({stops:D,base:i.base},e,U).evaluate(U,Z)}}if(l){const M=h==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:M,interpolationFactor:on.interpolationFactor.bind(void 0,M),zoomStops:i.stops.map(z=>z[0]),evaluate:({zoom:z})=>y(i,e,z,w,T)}}return{kind:"source",evaluate(M,z){const D=z&&z.properties?z.properties[i.property]:void 0;return D===void 0?Mo(i.default,e.default):y(i,e,D,w,T)}}}function Mo(i,e,r){return i!==void 0?i:e!==void 0?e:r!==void 0?r:void 0}function Ni(i,e,r,o,l){return Mo(typeof r===l?o[r]:void 0,i.default,e.default)}function vi(i,e,r){if(fi(r)!=="number")return Mo(i.default,e.default);const o=i.stops.length;if(o===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[o-1][0])return i.stops[o-1][1];const l=nn(i.stops.map(h=>h[0]),r);return i.stops[l][1]}function _n(i,e,r){const o=i.base!==void 0?i.base:1;if(fi(r)!=="number")return Mo(i.default,e.default);const l=i.stops.length;if(l===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[l-1][0])return i.stops[l-1][1];const h=nn(i.stops.map(M=>M[0]),r),p=function(M,z,D,V){const U=V-D,Z=M-D;return U===0?0:z===1?Z/U:(Math.pow(z,Z)-1)/(Math.pow(z,U)-1)}(r,o,i.stops[h][0],i.stops[h+1][0]),y=i.stops[h][1],w=i.stops[h+1][1],T=Wr[e.type]||Fl;return typeof y.evaluate=="function"?{evaluate(...M){const z=y.evaluate.apply(void 0,M),D=w.evaluate.apply(void 0,M);if(z!==void 0&&D!==void 0)return T(z,D,p,i.colorSpace)}}:T(y,w,p,i.colorSpace)}function Ao(i,e,r){switch(e.type){case"color":r=gi.parse(r);break;case"formatted":r=ji.fromString(r.toString());break;case"resolvedImage":r=Ir.fromString(r.toString());break;case"padding":r=jr.parse(r);break;default:fi(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return Mo(r,i.default,e.default)}rn.register(Ho,{error:[{kind:"error"},[Bt],(i,[e])=>{throw new Wi(e.evaluate(i))}],typeof:[Bt,[It],(i,[e])=>Q(Gi(e.evaluate(i)))],"to-rgba":[J(We,4),[Vr],(i,[e])=>{const[r,o,l,h]=e.evaluate(i).rgb;return[255*r,255*o,255*l,h]}],rgb:[Vr,[We,We,We],cl],rgba:[Vr,[We,We,We,We],cl],has:{type:Mt,overloads:[[[Bt],(i,[e])=>ul(e.evaluate(i),i.properties())],[[Bt,mn],(i,[e,r])=>ul(e.evaluate(i),r.evaluate(i))]]},get:{type:It,overloads:[[[Bt],(i,[e])=>Cs(e.evaluate(i),i.properties())],[[Bt,mn],(i,[e,r])=>Cs(e.evaluate(i),r.evaluate(i))]]},"feature-state":[It,[Bt],(i,[e])=>Cs(e.evaluate(i),i.featureState||{})],properties:[mn,[],i=>i.properties()],"geometry-type":[Bt,[],i=>i.geometryType()],id:[It,[],i=>i.id()],zoom:[We,[],i=>i.globals.zoom],"heatmap-density":[We,[],i=>i.globals.heatmapDensity||0],"line-progress":[We,[],i=>i.globals.lineProgress||0],accumulated:[It,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[We,qn(We),(i,e)=>{let r=0;for(const o of e)r+=o.evaluate(i);return r}],"*":[We,qn(We),(i,e)=>{let r=1;for(const o of e)r*=o.evaluate(i);return r}],"-":{type:We,overloads:[[[We,We],(i,[e,r])=>e.evaluate(i)-r.evaluate(i)],[[We],(i,[e])=>-e.evaluate(i)]]},"/":[We,[We,We],(i,[e,r])=>e.evaluate(i)/r.evaluate(i)],"%":[We,[We,We],(i,[e,r])=>e.evaluate(i)%r.evaluate(i)],ln2:[We,[],()=>Math.LN2],pi:[We,[],()=>Math.PI],e:[We,[],()=>Math.E],"^":[We,[We,We],(i,[e,r])=>Math.pow(e.evaluate(i),r.evaluate(i))],sqrt:[We,[We],(i,[e])=>Math.sqrt(e.evaluate(i))],log10:[We,[We],(i,[e])=>Math.log(e.evaluate(i))/Math.LN10],ln:[We,[We],(i,[e])=>Math.log(e.evaluate(i))],log2:[We,[We],(i,[e])=>Math.log(e.evaluate(i))/Math.LN2],sin:[We,[We],(i,[e])=>Math.sin(e.evaluate(i))],cos:[We,[We],(i,[e])=>Math.cos(e.evaluate(i))],tan:[We,[We],(i,[e])=>Math.tan(e.evaluate(i))],asin:[We,[We],(i,[e])=>Math.asin(e.evaluate(i))],acos:[We,[We],(i,[e])=>Math.acos(e.evaluate(i))],atan:[We,[We],(i,[e])=>Math.atan(e.evaluate(i))],min:[We,qn(We),(i,e)=>Math.min(...e.map(r=>r.evaluate(i)))],max:[We,qn(We),(i,e)=>Math.max(...e.map(r=>r.evaluate(i)))],abs:[We,[We],(i,[e])=>Math.abs(e.evaluate(i))],round:[We,[We],(i,[e])=>{const r=e.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[We,[We],(i,[e])=>Math.floor(e.evaluate(i))],ceil:[We,[We],(i,[e])=>Math.ceil(e.evaluate(i))],"filter-==":[Mt,[Bt,It],(i,[e,r])=>i.properties()[e.value]===r.value],"filter-id-==":[Mt,[It],(i,[e])=>i.id()===e.value],"filter-type-==":[Mt,[Bt],(i,[e])=>i.geometryType()===e.value],"filter-<":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o{const r=i.id(),o=e.value;return typeof r==typeof o&&r":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o>l}],"filter-id->":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r>o}],"filter-<=":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o<=l}],"filter-id-<=":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r<=o}],"filter->=":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o>=l}],"filter-id->=":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r>=o}],"filter-has":[Mt,[It],(i,[e])=>e.value in i.properties()],"filter-has-id":[Mt,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[Mt,[J(Bt)],(i,[e])=>e.value.indexOf(i.geometryType())>=0],"filter-id-in":[Mt,[J(It)],(i,[e])=>e.value.indexOf(i.id())>=0],"filter-in-small":[Mt,[Bt,J(It)],(i,[e,r])=>r.value.indexOf(i.properties()[e.value])>=0],"filter-in-large":[Mt,[Bt,J(It)],(i,[e,r])=>function(o,l,h,p){for(;h<=p;){const y=h+p>>1;if(l[y]===o)return!0;l[y]>o?p=y-1:h=y+1}return!1}(i.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Mt,overloads:[[[Mt,Mt],(i,[e,r])=>e.evaluate(i)&&r.evaluate(i)],[qn(Mt),(i,e)=>{for(const r of e)if(!r.evaluate(i))return!1;return!0}]]},any:{type:Mt,overloads:[[[Mt,Mt],(i,[e,r])=>e.evaluate(i)||r.evaluate(i)],[qn(Mt),(i,e)=>{for(const r of e)if(r.evaluate(i))return!0;return!1}]]},"!":[Mt,[Mt],(i,[e])=>!e.evaluate(i)],"is-supported-script":[Mt,[Bt],(i,[e])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(e.evaluate(i))}],upcase:[Bt,[Bt],(i,[e])=>e.evaluate(i).toUpperCase()],downcase:[Bt,[Bt],(i,[e])=>e.evaluate(i).toLowerCase()],concat:[Bt,qn(It),(i,e)=>e.map(r=>ui(r.evaluate(i))).join("")],"resolved-locale":[Bt,[Mn],(i,[e])=>e.evaluate(i).resolvedLocale()]});class ls{constructor(e,r){var o;this.expression=e,this._warningHistory={},this._evaluator=new g,this._defaultValue=r?(o=r).type==="color"&&Ki(o.default)?new gi(0,0,0,0):o.type==="color"?gi.parse(o.default)||null:o.type==="padding"?jr.parse(o.default)||null:o.type==="variableAnchorOffsetCollection"?Tr.parse(o.default)||null:o.default===void 0?null:o.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=o,this._evaluator.canonical=l,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(e,r,o,l,h,p){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=o||null,this._evaluator.canonical=l,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=p||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!=y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new Wi(`Expected value to be one of ${Object.keys(this._enumValues).map(w=>JSON.stringify(w)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function Zn(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Ho}function fa(i,e){const r=new I(Ho,ia,[],e?function(l){const h={color:Vr,string:Bt,number:We,enum:Bt,boolean:Mt,formatted:X,padding:L,resolvedImage:F,variableAnchorOffsetCollection:j};return l.type==="array"?J(h[l.value]||It,l.length):h[l.type]}(e):void 0),o=r.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?pa(new ls(o,e)):to(r.errors)}class cs{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!ss(r.expression)}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,o,l,h,p)}evaluate(e,r,o,l,h,p){return this._styleExpression.evaluate(e,r,o,l,h,p)}}class ko{constructor(e,r,o,l){this.kind=e,this.zoomStops=o,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!ss(r.expression),this.interpolationType=l}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,o,l,h,p)}evaluate(e,r,o,l,h,p){return this._styleExpression.evaluate(e,r,o,l,h,p)}interpolationFactor(e,r,o){return this.interpolationType?on.interpolationFactor(this.interpolationType,e,r,o):0}}function ma(i,e){const r=fa(i,e);if(r.result==="error")return r;const o=r.value.expression,l=Ci(o);if(!l&&!Co(e))return to([new er("","data expressions not supported")]);const h=ra(o,["zoom"]);if(!h&&!as(e))return to([new er("","zoom expressions not supported")]);const p=Ms(o);return p||h?p instanceof er?to([p]):p instanceof on&&!ja(e)?to([new er("",'"interpolate" expressions cannot be used with this property')]):pa(p?new ko(l?"camera":"composite",r.value,p.labels,p instanceof on?p.interpolation:void 0):new cs(l?"constant":"source",r.value)):to([new er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class us{constructor(e,r){this._parameters=e,this._specification=r,fn(this,Yt(this._parameters,this._specification))}static deserialize(e){return new us(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Ms(i){let e=null;if(i instanceof sa)e=Ms(i.result);else if(i instanceof oa){for(const r of i.args)if(e=Ms(r),e)break}else(i instanceof ho||i instanceof on)&&i.input instanceof rn&&i.input.name==="zoom"&&(e=i);return e instanceof er||i.eachChild(r=>{const o=Ms(r);o instanceof er?e=o:!e&&o?e=new er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&o&&e!==o&&(e=new er("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function As(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const e of i.slice(1))if(!As(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const hl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function _a(i){if(i==null)return{filter:()=>!0,needGeometry:!1};As(i)||(i=ya(i));const e=fa(i,hl);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,o,l)=>e.value.evaluate(r,o,{},l),needGeometry:Xo(i)}}function ga(i,e){return ie?1:0}function Xo(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(let e=1;e"||e==="<="||e===">="?io(i[1],i[2],e):e==="any"?(r=i.slice(1),["any"].concat(r.map(ya))):e==="all"?["all"].concat(i.slice(1).map(ya)):e==="none"?["all"].concat(i.slice(1).map(ya).map(hs)):e==="in"?dl(i[1],i.slice(2)):e==="!in"?hs(dl(i[1],i.slice(2))):e==="has"?Po(i[1]):e==="!has"?hs(Po(i[1])):e!=="within"||i;var r}function io(i,e,r){switch(i){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,i,e]}}function dl(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",i,["literal",e.sort(ga)]]:["filter-in-small",i,["literal",e]]}}function Po(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function hs(i){return["!",i]}function va(i){const e=typeof i;if(e==="number"||e==="boolean"||e==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let l="[";for(const h of i)l+=`${va(h)},`;return`${l}]`}const r=Object.keys(i).sort();let o="{";for(let l=0;lo.maximum?[new qe(e,r,`${r} is greater than the maximum value ${o.maximum}`)]:[]}function ba(i){const e=i.valueSpec,r=Ji(i.value.type);let o,l,h,p={};const y=r!=="categorical"&&i.value.property===void 0,w=!y,T=fi(i.value.stops)==="array"&&fi(i.value.stops[0])==="array"&&fi(i.value.stops[0][0])==="object",M=Hr({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(V){if(r==="identity")return[new qe(V.key,V.value,'identity function may not have a "stops" property')];let U=[];const Z=V.value;return U=U.concat(ro({key:V.key,value:Z,valueSpec:V.valueSpec,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,arrayElementValidator:z})),fi(Z)==="array"&&Z.length===0&&U.push(new qe(V.key,Z,"array must have at least one stop")),U},default:function(V){return V.validateSpec({key:V.key,value:V.value,valueSpec:e,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec})}}});return r==="identity"&&y&&M.push(new qe(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||M.push(new qe(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!ja(i.valueSpec)&&M.push(new qe(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(w&&!Co(i.valueSpec)?M.push(new qe(i.key,i.value,"property functions not supported")):y&&!as(i.valueSpec)&&M.push(new qe(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!T||i.value.property!==void 0||M.push(new qe(i.key,i.value,'"property" property is required')),M;function z(V){let U=[];const Z=V.value,$=V.key;if(fi(Z)!=="array")return[new qe($,Z,`array expected, ${fi(Z)} found`)];if(Z.length!==2)return[new qe($,Z,`array length 2 expected, length ${Z.length} found`)];if(T){if(fi(Z[0])!=="object")return[new qe($,Z,`object expected, ${fi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new qe($,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new qe($,Z,"object stop key must have value")];if(h&&h>Ji(Z[0].zoom))return[new qe($,Z[0].zoom,"stop zoom values must appear in ascending order")];Ji(Z[0].zoom)!==h&&(h=Ji(Z[0].zoom),l=void 0,p={}),U=U.concat(Hr({key:`${$}[0]`,value:Z[0],valueSpec:{zoom:{}},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{zoom:ds,value:D}}))}else U=U.concat(D({key:`${$}[0]`,value:Z[0],valueSpec:{},validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec},Z));return Zn(zo(Z[1]))?U.concat([new qe(`${$}[1]`,Z[1],"expressions are not allowed in function stops.")]):U.concat(V.validateSpec({key:`${$}[1]`,value:Z[1],valueSpec:e,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec}))}function D(V,U){const Z=fi(V.value),$=Ji(V.value),ie=V.value!==null?V.value:U;if(o){if(Z!==o)return[new qe(V.key,ie,`${Z} stop domain type must match previous stop domain type ${o}`)]}else o=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean")return[new qe(V.key,ie,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&r!=="categorical"){let ue=`number expected, ${Z} found`;return Co(e)&&r===void 0&&(ue+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qe(V.key,ie,ue)]}return r!=="categorical"||Z!=="number"||isFinite($)&&Math.floor($)===$?r!=="categorical"&&Z==="number"&&l!==void 0&&$new qe(`${i.key}${o.key}`,i.value,o.message));const r=e.value.expression||e.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new qe(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!ss(r))return[new qe(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!ss(r))return[new qe(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!ra(r,["zoom","feature-state"]))return[new qe(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!Ci(r))return[new qe(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function we(i){const e=i.key,r=i.value,o=i.valueSpec,l=[];return Array.isArray(o.values)?o.values.indexOf(Ji(r))===-1&&l.push(new qe(e,r,`expected one of [${o.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(o.values).indexOf(Ji(r))===-1&&l.push(new qe(e,r,`expected one of [${Object.keys(o.values).join(", ")}], ${JSON.stringify(r)} found`)),l}function Ye(i){return As(zo(i.value))?de(fn({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):wt(i)}function wt(i){const e=i.value,r=i.key;if(fi(e)!=="array")return[new qe(r,e,`array expected, ${fi(e)} found`)];const o=i.styleSpec;let l,h=[];if(e.length<1)return[new qe(r,e,"filter array must have at least 1 element")];switch(h=h.concat(we({key:`${r}[0]`,value:e[0],valueSpec:o.filter_operator,style:i.style,styleSpec:i.styleSpec})),Ji(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Ji(e[1])==="$type"&&h.push(new qe(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&h.push(new qe(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(l=fi(e[1]),l!=="string"&&h.push(new qe(`${r}[1]`,e[1],`string expected, ${l} found`)));for(let p=2;p{T in r&&e.push(new qe(o,r[T],`"${T}" is prohibited for ref layers`))}),l.layers.forEach(T=>{Ji(T.id)===y&&(w=T)}),w?w.ref?e.push(new qe(o,r.ref,"ref cannot reference another ref layer")):p=Ji(w.type):e.push(new qe(o,r.ref,`ref layer "${y}" not found`))}else if(p!=="background")if(r.source){const w=l.sources&&l.sources[r.source],T=w&&Ji(w.type);w?T==="vector"&&p==="raster"?e.push(new qe(o,r.source,`layer "${r.id}" requires a raster source`)):T!=="raster-dem"&&p==="hillshade"?e.push(new qe(o,r.source,`layer "${r.id}" requires a raster-dem source`)):T==="raster"&&p!=="raster"?e.push(new qe(o,r.source,`layer "${r.id}" requires a vector source`)):T!=="vector"||r["source-layer"]?T==="raster-dem"&&p!=="hillshade"?e.push(new qe(o,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):p!=="line"||!r.paint||!r.paint["line-gradient"]||T==="geojson"&&w.lineMetrics||e.push(new qe(o,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new qe(o,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new qe(o,r.source,`source "${r.source}" not found`))}else e.push(new qe(o,r,'missing required property "source"'));return e=e.concat(Hr({key:o,value:r,valueSpec:h.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${o}.type`,value:r.type,valueSpec:h.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:Ye,layout:w=>Hr({layer:r,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":T=>ir(fn({layerType:p},T))}}),paint:w=>Hr({layer:r,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":T=>ri(fn({layerType:p},T))}})}})),e}function hr(i){const e=i.value,r=i.key,o=fi(e);return o!=="string"?[new qe(r,e,`string expected, ${o} found`)]:[]}const rr={promoteId:function({key:i,value:e}){if(fi(e)==="string")return hr({key:i,value:e});{const r=[];for(const o in e)r.push(...hr({key:`${i}.${o}`,value:e[o]}));return r}}};function xi(i){const e=i.value,r=i.key,o=i.styleSpec,l=i.style,h=i.validateSpec;if(!e.type)return[new qe(r,e,'"type" is required')];const p=Ji(e.type);let y;switch(p){case"vector":case"raster":return y=Hr({key:r,value:e,valueSpec:o[`source_${p.replace("-","_")}`],style:i.style,styleSpec:o,objectElementValidators:rr,validateSpec:h}),y;case"raster-dem":return y=function(w){var T;const M=(T=w.sourceName)!==null&&T!==void 0?T:"",z=w.value,D=w.styleSpec,V=D.source_raster_dem,U=w.style;let Z=[];const $=fi(z);if(z===void 0)return Z;if($!=="object")return Z.push(new qe("source_raster_dem",z,`object expected, ${$} found`)),Z;const ie=Ji(z.encoding)==="custom",ue=["redFactor","greenFactor","blueFactor","baseShift"],re=w.value.encoding?`"${w.value.encoding}"`:"Default";for(const pe in z)!ie&&ue.includes(pe)?Z.push(new qe(pe,z[pe],`In "${M}": "${pe}" is only valid when "encoding" is set to "custom". ${re} encoding found`)):V[pe]?Z=Z.concat(w.validateSpec({key:pe,value:z[pe],valueSpec:V[pe],validateSpec:w.validateSpec,style:U,styleSpec:D})):Z.push(new qe(pe,z[pe],`unknown property "${pe}"`));return Z}({sourceName:r,value:e,style:i.style,styleSpec:o,validateSpec:h}),y;case"geojson":if(y=Hr({key:r,value:e,valueSpec:o.source_geojson,style:l,styleSpec:o,validateSpec:h,objectElementValidators:rr}),e.cluster)for(const w in e.clusterProperties){const[T,M]=e.clusterProperties[w],z=typeof T=="string"?[T,["accumulated"],["get",w]]:T;y.push(...de({key:`${r}.${w}.map`,value:M,validateSpec:h,expressionContext:"cluster-map"})),y.push(...de({key:`${r}.${w}.reduce`,value:z,validateSpec:h,expressionContext:"cluster-reduce"}))}return y;case"video":return Hr({key:r,value:e,valueSpec:o.source_video,style:l,validateSpec:h,styleSpec:o});case"image":return Hr({key:r,value:e,valueSpec:o.source_image,style:l,validateSpec:h,styleSpec:o});case"canvas":return[new qe(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return we({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:l,validateSpec:h,styleSpec:o})}}function sn(i){const e=i.value,r=i.styleSpec,o=r.light,l=i.style;let h=[];const p=fi(e);if(e===void 0)return h;if(p!=="object")return h=h.concat([new qe("light",e,`object expected, ${p} found`)]),h;for(const y in e){const w=y.match(/^(.*)-transition$/);h=h.concat(w&&o[w[1]]&&o[w[1]].transition?i.validateSpec({key:y,value:e[y],valueSpec:r.transition,validateSpec:i.validateSpec,style:l,styleSpec:r}):o[y]?i.validateSpec({key:y,value:e[y],valueSpec:o[y],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new qe(y,e[y],`unknown property "${y}"`)])}return h}function no(i){const e=i.value,r=i.styleSpec,o=r.terrain,l=i.style;let h=[];const p=fi(e);if(e===void 0)return h;if(p!=="object")return h=h.concat([new qe("terrain",e,`object expected, ${p} found`)]),h;for(const y in e)h=h.concat(o[y]?i.validateSpec({key:y,value:e[y],valueSpec:o[y],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new qe(y,e[y],`unknown property "${y}"`)]);return h}function qr(i){let e=[];const r=i.value,o=i.key;if(Array.isArray(r)){const l=[],h=[];for(const p in r)r[p].id&&l.includes(r[p].id)&&e.push(new qe(o,r,`all the sprites' ids must be unique, but ${r[p].id} is duplicated`)),l.push(r[p].id),r[p].url&&h.includes(r[p].url)&&e.push(new qe(o,r,`all the sprites' URLs must be unique, but ${r[p].url} is duplicated`)),h.push(r[p].url),e=e.concat(Hr({key:`${o}[${p}]`,value:r[p],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return e}return hr({key:o,value:r})}const oo={"*":()=>[],array:ro,boolean:function(i){const e=i.value,r=i.key,o=fi(e);return o!=="boolean"?[new qe(r,e,`boolean expected, ${o} found`)]:[]},number:ds,color:function(i){const e=i.key,r=i.value,o=fi(r);return o!=="string"?[new qe(e,r,`color expected, ${o} found`)]:gi.parse(String(r))?[]:[new qe(e,r,`color expected, "${r}" found`)]},constants:xa,enum:we,filter:Ye,function:ba,layer:lr,object:Hr,source:xi,light:sn,terrain:no,string:hr,formatted:function(i){return hr(i).length===0?[]:de(i)},resolvedImage:function(i){return hr(i).length===0?[]:de(i)},padding:function(i){const e=i.key,r=i.value;if(fi(r)==="array"){if(r.length<1||r.length>4)return[new qe(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];const o={type:"number"};let l=[];for(let h=0;h[]}})),i.constants&&(r=r.concat(xa({key:"constants",value:i.constants,style:i,styleSpec:e,validateSpec:an}))),Ps(r)}function gn(i){return function(e){return i({...e,validateSpec:an})}}function Ps(i){return[].concat(i).sort((e,r)=>e.line-r.line)}function fo(i){return function(...e){return Ps(i.apply(this,e))}}Ar.source=fo(gn(xi)),Ar.sprite=fo(gn(qr)),Ar.glyphs=fo(gn(ks)),Ar.light=fo(gn(sn)),Ar.terrain=fo(gn(no)),Ar.layer=fo(gn(lr)),Ar.filter=fo(gn(Ye)),Ar.paintProperty=fo(gn(ri)),Ar.layoutProperty=fo(gn(ir));const mo=Ar,Li=mo.light,bi=mo.paintProperty,zs=mo.layoutProperty;function Gn(i,e){let r=!1;if(e&&e.length)for(const o of e)i.fire(new wo(new Error(o.message))),r=!0;return r}class Lo{constructor(e,r,o){const l=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const p=new Int32Array(this.arrayBuffer);e=p[0],this.d=(r=p[1])+2*(o=p[2]);for(let w=0;w=z[U+0]&&l>=z[U+1])?(y[V]=!0,p.push(M[V])):y[V]=!1}}}}_forEachCell(e,r,o,l,h,p,y,w){const T=this._convertToCellCoord(e),M=this._convertToCellCoord(r),z=this._convertToCellCoord(o),D=this._convertToCellCoord(l);for(let V=T;V<=z;V++)for(let U=M;U<=D;U++){const Z=this.d*U+V;if((!w||w(this._convertFromCellCoord(V),this._convertFromCellCoord(U),this._convertFromCellCoord(V+1),this._convertFromCellCoord(U+1)))&&h.call(this,e,r,o,l,Z,p,y,w))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,r=3+this.cells.length+1+1;let o=0;for(let p=0;p=0)continue;const p=i[h];l[h]=dr[o].shallow.indexOf(h)>=0?p:Pn(p,e)}i instanceof Error&&(l.message=i.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return o!=="Object"&&(l.$name=o),l}throw new Error("can't serialize object of type "+typeof i)}function _o(i){if(i==null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||i instanceof Boolean||i instanceof Number||i instanceof String||i instanceof Date||i instanceof RegExp||i instanceof Blob||Wn(i)||$r(i)||ArrayBuffer.isView(i)||i instanceof ImageData)return i;if(Array.isArray(i))return i.map(_o);if(typeof i=="object"){const e=i.$name||"Object";if(!dr[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:r}=dr[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(i);const o=Object.create(r.prototype);for(const l of Object.keys(i)){if(l==="$name")continue;const h=i[l];o[l]=dr[e].shallow.indexOf(l)>=0?h:_o(h)}return o}throw new Error("can't deserialize object of type "+typeof i)}class Jo{constructor(){this.first=!0}update(e,r){const o=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=o,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=o,!0):(this.lastFloorZoom>o?(this.lastIntegerZoom=o+1,this.lastIntegerZoomTime=r):this.lastFloorZoomi>=128&&i<=255,Arabic:i=>i>=1536&&i<=1791,"Arabic Supplement":i=>i>=1872&&i<=1919,"Arabic Extended-A":i=>i>=2208&&i<=2303,"Hangul Jamo":i=>i>=4352&&i<=4607,"Unified Canadian Aboriginal Syllabics":i=>i>=5120&&i<=5759,Khmer:i=>i>=6016&&i<=6143,"Unified Canadian Aboriginal Syllabics Extended":i=>i>=6320&&i<=6399,"General Punctuation":i=>i>=8192&&i<=8303,"Letterlike Symbols":i=>i>=8448&&i<=8527,"Number Forms":i=>i>=8528&&i<=8591,"Miscellaneous Technical":i=>i>=8960&&i<=9215,"Control Pictures":i=>i>=9216&&i<=9279,"Optical Character Recognition":i=>i>=9280&&i<=9311,"Enclosed Alphanumerics":i=>i>=9312&&i<=9471,"Geometric Shapes":i=>i>=9632&&i<=9727,"Miscellaneous Symbols":i=>i>=9728&&i<=9983,"Miscellaneous Symbols and Arrows":i=>i>=11008&&i<=11263,"CJK Radicals Supplement":i=>i>=11904&&i<=12031,"Kangxi Radicals":i=>i>=12032&&i<=12255,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Hiragana:i=>i>=12352&&i<=12447,Katakana:i=>i>=12448&&i<=12543,Bopomofo:i=>i>=12544&&i<=12591,"Hangul Compatibility Jamo":i=>i>=12592&&i<=12687,Kanbun:i=>i>=12688&&i<=12703,"Bopomofo Extended":i=>i>=12704&&i<=12735,"CJK Strokes":i=>i>=12736&&i<=12783,"Katakana Phonetic Extensions":i=>i>=12784&&i<=12799,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"CJK Unified Ideographs Extension A":i=>i>=13312&&i<=19903,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"CJK Unified Ideographs":i=>i>=19968&&i<=40959,"Yi Syllables":i=>i>=40960&&i<=42127,"Yi Radicals":i=>i>=42128&&i<=42191,"Hangul Jamo Extended-A":i=>i>=43360&&i<=43391,"Hangul Syllables":i=>i>=44032&&i<=55215,"Hangul Jamo Extended-B":i=>i>=55216&&i<=55295,"Private Use Area":i=>i>=57344&&i<=63743,"CJK Compatibility Ideographs":i=>i>=63744&&i<=64255,"Arabic Presentation Forms-A":i=>i>=64336&&i<=65023,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Arabic Presentation Forms-B":i=>i>=65136&&i<=65279,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function wa(i){for(const e of i)if(fs(e.charCodeAt(0)))return!0;return!1}function ps(i){for(const e of i)if(!qa(e.charCodeAt(0)))return!1;return!0}function qa(i){return!(Xe.Arabic(i)||Xe["Arabic Supplement"](i)||Xe["Arabic Extended-A"](i)||Xe["Arabic Presentation Forms-A"](i)||Xe["Arabic Presentation Forms-B"](i))}function fs(i){return!(i!==746&&i!==747&&(i<4352||!(Xe["Bopomofo Extended"](i)||Xe.Bopomofo(i)||Xe["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||Xe["CJK Compatibility Ideographs"](i)||Xe["CJK Compatibility"](i)||Xe["CJK Radicals Supplement"](i)||Xe["CJK Strokes"](i)||!(!Xe["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||Xe["CJK Unified Ideographs Extension A"](i)||Xe["CJK Unified Ideographs"](i)||Xe["Enclosed CJK Letters and Months"](i)||Xe["Hangul Compatibility Jamo"](i)||Xe["Hangul Jamo Extended-A"](i)||Xe["Hangul Jamo Extended-B"](i)||Xe["Hangul Jamo"](i)||Xe["Hangul Syllables"](i)||Xe.Hiragana(i)||Xe["Ideographic Description Characters"](i)||Xe.Kanbun(i)||Xe["Kangxi Radicals"](i)||Xe["Katakana Phonetic Extensions"](i)||Xe.Katakana(i)&&i!==12540||!(!Xe["Halfwidth and Fullwidth Forms"](i)||i===65288||i===65289||i===65293||i>=65306&&i<=65310||i===65339||i===65341||i===65343||i>=65371&&i<=65503||i===65507||i>=65512&&i<=65519)||!(!Xe["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||Xe["Unified Canadian Aboriginal Syllabics"](i)||Xe["Unified Canadian Aboriginal Syllabics Extended"](i)||Xe["Vertical Forms"](i)||Xe["Yijing Hexagram Symbols"](i)||Xe["Yi Syllables"](i)||Xe["Yi Radicals"](i))))}function Ls(i){return!(fs(i)||function(e){return!!(Xe["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||Xe["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||Xe["Letterlike Symbols"](e)||Xe["Number Forms"](e)||Xe["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||Xe["Control Pictures"](e)&&e!==9251||Xe["Optical Character Recognition"](e)||Xe["Enclosed Alphanumerics"](e)||Xe["Geometric Shapes"](e)||Xe["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||Xe["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||Xe["CJK Symbols and Punctuation"](e)||Xe.Katakana(e)||Xe["Private Use Area"](e)||Xe["CJK Compatibility Forms"](e)||Xe["Small Form Variants"](e)||Xe["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(i))}function Za(i){return i>=1424&&i<=2303||Xe["Arabic Presentation Forms-A"](i)||Xe["Arabic Presentation Forms-B"](i)}function Ds(i,e){return!(!e&&Za(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||Xe.Khmer(i))}function Sa(i){for(const e of i)if(Za(e.charCodeAt(0)))return!0;return!1}const Rl="deferred",Ol="loading",Bl="loaded";let Nl=null,zn="unavailable",ms=null;const Ga=function(i){i&&typeof i=="string"&&i.indexOf("NetworkError")>-1&&(zn="error"),Nl&&Nl(i)};function Vl(){Wa.fire(new co("pluginStateChange",{pluginStatus:zn,pluginURL:ms}))}const Wa=new jo,Ul=function(){return zn},Fc=function(){if(zn!==Rl||!ms)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");zn=Ol,Vl(),ms&&Ue({url:ms},i=>{i?Ga(i):(zn=Bl,Vl())})},Hn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>zn===Bl||Hn.applyArabicShaping!=null,isLoading:()=>zn===Ol,setState(i){if(!di())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");zn=i.pluginStatus,ms=i.pluginURL},isParsed(){if(!di())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return Hn.applyArabicShaping!=null&&Hn.processBidirectionalText!=null&&Hn.processStyledBidirectionalText!=null},getPluginURL(){if(!di())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return ms}};class Yi{constructor(e,r){this.zoom=e,r?(this.now=r.now,this.fadeDuration=r.fadeDuration,this.zoomHistory=r.zoomHistory,this.transition=r.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Jo,this.transition={})}isSupportedScript(e){return function(r,o){for(const l of r)if(!Ds(l.charCodeAt(0),o))return!1;return!0}(e,Hn.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,r=e-Math.floor(e),o=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*o}:{fromScale:.5,toScale:1,t:1-(1-o)*r}}}class pl{constructor(e,r){this.property=e,this.value=r,this.expression=function(o,l){if(Ki(o))return new us(o,l);if(Zn(o)){const h=ma(o,l);if(h.result==="error")throw new Error(h.value.map(p=>`${p.key}: ${p.message}`).join(", "));return h.value}{let h=o;return l.type==="color"&&typeof o=="string"?h=gi.parse(o):l.type!=="padding"||typeof o!="number"&&!Array.isArray(o)?l.type==="variableAnchorOffsetCollection"&&Array.isArray(o)&&(h=Tr.parse(o)):h=jr.parse(o),{kind:"constant",evaluate:()=>h}}}(r===void 0?e.specification.default:r,e.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,r,o){return this.property.possiblyEvaluate(this,e,r,o)}}class jl{constructor(e){this.property=e,this.value=new pl(e,void 0)}transitioned(e,r){return new Oc(this.property,this.value,r,Nt({},e.transition,this.transition),e.now)}untransitioned(){return new Oc(this.property,this.value,null,{},0)}}class Rc{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return Ge(this._values[e].value.value)}setValue(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].value=new pl(this._values[e].property,r===null?void 0:Ge(r))}getTransition(e){return Ge(this._values[e].transition)}setTransition(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].transition=Ge(r)||void 0}serialize(){const e={};for(const r of Object.keys(this._values)){const o=this.getValue(r);o!==void 0&&(e[r]=o);const l=this.getTransition(r);l!==void 0&&(e[`${r}-transition`]=l)}return e}transitioned(e,r){const o=new Bc(this._properties);for(const l of Object.keys(this._values))o._values[l]=this._values[l].transitioned(e,r._values[l]);return o}untransitioned(){const e=new Bc(this._properties);for(const r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}}class Oc{constructor(e,r,o,l,h){this.property=e,this.value=r,this.begin=h+l.delay||0,this.end=this.begin+l.duration||0,e.specification.transition&&(l.delay||l.duration)&&(this.prior=o)}possiblyEvaluate(e,r,o){const l=e.now||0,h=this.value.possiblyEvaluate(e,r,o),p=this.prior;if(p){if(l>this.end)return this.prior=null,h;if(this.value.isDataDriven())return this.prior=null,h;if(l=1)return 1;const T=w*w,M=T*w;return 4*(w<.5?M:3*(w-T)+M-.75)}(y))}}return h}}class Bc{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,r,o){const l=new fl(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].possiblyEvaluate(e,r,o);return l}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class bu{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return this._values[e].value!==void 0}getValue(e){return Ge(this._values[e].value)}setValue(e,r){this._values[e]=new pl(this._values[e].property,r===null?void 0:Ge(r))}serialize(){const e={};for(const r of Object.keys(this._values)){const o=this.getValue(r);o!==void 0&&(e[r]=o)}return e}possiblyEvaluate(e,r,o){const l=new fl(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].possiblyEvaluate(e,r,o);return l}}class yn{constructor(e,r,o){this.property=e,this.value=r,this.parameters=o}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,r,o,l){return this.property.evaluate(this.value,this.parameters,e,r,o,l)}}class fl{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class xt{constructor(e){this.specification=e}possiblyEvaluate(e,r){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(r)}interpolate(e,r,o){const l=Wr[this.specification.type];return l?l(e,r,o):e}}class Et{constructor(e,r){this.specification=e,this.overrides=r}possiblyEvaluate(e,r,o,l){return new yn(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(r,null,{},o,l)}:e.expression,r)}interpolate(e,r,o){if(e.value.kind!=="constant"||r.value.kind!=="constant")return e;if(e.value.value===void 0||r.value.value===void 0)return new yn(this,{kind:"constant",value:void 0},e.parameters);const l=Wr[this.specification.type];if(l){const h=l(e.value.value,r.value.value,o);return new yn(this,{kind:"constant",value:h},e.parameters)}return e}evaluate(e,r,o,l,h,p){return e.kind==="constant"?e.value:e.evaluate(r,o,l,h,p)}}class Ha extends Et{possiblyEvaluate(e,r,o,l){if(e.value===void 0)return new yn(this,{kind:"constant",value:void 0},r);if(e.expression.kind==="constant"){const h=e.expression.evaluate(r,null,{},o,l),p=e.property.specification.type==="resolvedImage"&&typeof h!="string"?h.name:h,y=this._calculate(p,p,p,r);return new yn(this,{kind:"constant",value:y},r)}if(e.expression.kind==="camera"){const h=this._calculate(e.expression.evaluate({zoom:r.zoom-1}),e.expression.evaluate({zoom:r.zoom}),e.expression.evaluate({zoom:r.zoom+1}),r);return new yn(this,{kind:"constant",value:h},r)}return new yn(this,e.expression,r)}evaluate(e,r,o,l,h,p){if(e.kind==="source"){const y=e.evaluate(r,o,l,h,p);return this._calculate(y,y,y,r)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(r.zoom)-1},o,l),e.evaluate({zoom:Math.floor(r.zoom)},o,l),e.evaluate({zoom:Math.floor(r.zoom)+1},o,l),r):e.value}_calculate(e,r,o,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:o,to:r}}interpolate(e){return e}}class ql{constructor(e){this.specification=e}possiblyEvaluate(e,r,o,l){if(e.value!==void 0){if(e.expression.kind==="constant"){const h=e.expression.evaluate(r,null,{},o,l);return this._calculate(h,h,h,r)}return this._calculate(e.expression.evaluate(new Yi(Math.floor(r.zoom-1),r)),e.expression.evaluate(new Yi(Math.floor(r.zoom),r)),e.expression.evaluate(new Yi(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,o,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:o,to:r}}interpolate(e){return e}}class Zl{constructor(e){this.specification=e}possiblyEvaluate(e,r,o,l){return!!e.expression.evaluate(r,null,{},o,l)}interpolate(){return!1}}class xr{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in e){const o=e[r];o.specification.overridable&&this.overridableProperties.push(r);const l=this.defaultPropertyValues[r]=new pl(o,void 0),h=this.defaultTransitionablePropertyValues[r]=new jl(o);this.defaultTransitioningPropertyValues[r]=h.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=l.possiblyEvaluate({})}}}tt("DataDrivenProperty",Et),tt("DataConstantProperty",xt),tt("CrossFadedDataDrivenProperty",Ha),tt("CrossFadedProperty",ql),tt("ColorRampProperty",Zl);const Gl="-transition";class so extends jo{constructor(e,r){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new bu(r.layout)),r.paint)){this._transitionablePaint=new Rc(r.paint);for(const o in e.paint)this.setPaintProperty(o,e.paint[o],{validate:!1});for(const o in e.layout)this.setLayoutProperty(o,e.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new fl(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return e==="visibility"?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,r,o={}){r!=null&&this._validate(zs,`layers.${this.id}.layout.${e}`,e,r,o)||(e!=="visibility"?this._unevaluatedLayout.setValue(e,r):this.visibility=r)}getPaintProperty(e){return e.endsWith(Gl)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,r,o={}){if(r!=null&&this._validate(bi,`layers.${this.id}.paint.${e}`,e,r,o))return!1;if(e.endsWith(Gl))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{const l=this._transitionablePaint._values[e],h=l.property.specification["property-type"]==="cross-faded-data-driven",p=l.value.isDataDriven(),y=l.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);const w=this._transitionablePaint._values[e].value;return w.isDataDriven()||p||h||this._handleOverridablePaintPropertyUpdate(e,y,w)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,o){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||this.visibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){const e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),Ae(e,(r,o)=>!(r===void 0||o==="layout"&&!Object.keys(r).length||o==="paint"&&!Object.keys(r).length))}_validate(e,r,o,l,h={}){return(!h||h.validate!==!1)&&Gn(this,e.call(mo,{key:r,layerType:this.type,objectKey:o,value:l,styleSpec:Se,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const r=this.paint.get(e);if(r instanceof yn&&Co(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const Nc={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Fs{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class cr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function or(i,e=1){let r=0,o=0;return{members:i.map(l=>{const h=Nc[l.type].BYTES_PER_ELEMENT,p=r=Ta(r,Math.max(e,h)),y=l.components||1;return o=Math.max(o,h),r+=h*y,{name:l.name,type:l.type,components:y,offset:p}}),size:Ta(r,Math.max(o,e)),alignment:e}}function Ta(i,e){return Math.ceil(i/e)*e}class Xa extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.int16[l+0]=r,this.int16[l+1]=o,e}}Xa.prototype.bytesPerElement=4,tt("StructArrayLayout2i4",Xa);class Ka extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.int16[h+0]=r,this.int16[h+1]=o,this.int16[h+2]=l,e}}Ka.prototype.bytesPerElement=6,tt("StructArrayLayout3i6",Ka);class Rs extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=4*e;return this.int16[p+0]=r,this.int16[p+1]=o,this.int16[p+2]=l,this.int16[p+3]=h,e}}Rs.prototype.bytesPerElement=8,tt("StructArrayLayout4i8",Rs);class Wl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=6*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.int16[w+2]=l,this.int16[w+3]=h,this.int16[w+4]=p,this.int16[w+5]=y,e}}Wl.prototype.bytesPerElement=12,tt("StructArrayLayout2i4i12",Wl);class Hl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=4*e,T=8*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.uint8[T+4]=l,this.uint8[T+5]=h,this.uint8[T+6]=p,this.uint8[T+7]=y,e}}Hl.prototype.bytesPerElement=8,tt("StructArrayLayout2i4ub8",Hl);class Ia extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.float32[l+0]=r,this.float32[l+1]=o,e}}Ia.prototype.bytesPerElement=8,tt("StructArrayLayout2f8",Ia);class Xl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p,y,w,T,M){const z=this.length;return this.resize(z+1),this.emplace(z,e,r,o,l,h,p,y,w,T,M)}emplace(e,r,o,l,h,p,y,w,T,M,z){const D=10*e;return this.uint16[D+0]=r,this.uint16[D+1]=o,this.uint16[D+2]=l,this.uint16[D+3]=h,this.uint16[D+4]=p,this.uint16[D+5]=y,this.uint16[D+6]=w,this.uint16[D+7]=T,this.uint16[D+8]=M,this.uint16[D+9]=z,e}}Xl.prototype.bytesPerElement=20,tt("StructArrayLayout10ui20",Xl);class Kl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p,y,w,T,M,z,D){const V=this.length;return this.resize(V+1),this.emplace(V,e,r,o,l,h,p,y,w,T,M,z,D)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,V){const U=12*e;return this.int16[U+0]=r,this.int16[U+1]=o,this.int16[U+2]=l,this.int16[U+3]=h,this.uint16[U+4]=p,this.uint16[U+5]=y,this.uint16[U+6]=w,this.uint16[U+7]=T,this.int16[U+8]=M,this.int16[U+9]=z,this.int16[U+10]=D,this.int16[U+11]=V,e}}Kl.prototype.bytesPerElement=24,tt("StructArrayLayout4i4ui4i24",Kl);class wi extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.float32[h+0]=r,this.float32[h+1]=o,this.float32[h+2]=l,e}}wi.prototype.bytesPerElement=12,tt("StructArrayLayout3f12",wi);class u extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint32[1*e+0]=r,e}}u.prototype.bytesPerElement=4,tt("StructArrayLayout1ul4",u);class t extends cr{_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(e,r,o,l,h,p,y,w,T){const M=this.length;return this.resize(M+1),this.emplace(M,e,r,o,l,h,p,y,w,T)}emplace(e,r,o,l,h,p,y,w,T,M){const z=10*e,D=5*e;return this.int16[z+0]=r,this.int16[z+1]=o,this.int16[z+2]=l,this.int16[z+3]=h,this.int16[z+4]=p,this.int16[z+5]=y,this.uint32[D+3]=w,this.uint16[z+8]=T,this.uint16[z+9]=M,e}}t.prototype.bytesPerElement=20,tt("StructArrayLayout6i1ul2ui20",t);class n extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=6*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.int16[w+2]=l,this.int16[w+3]=h,this.int16[w+4]=p,this.int16[w+5]=y,e}}n.prototype.bytesPerElement=12,tt("StructArrayLayout2i2i2i12",n);class a extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h){const p=this.length;return this.resize(p+1),this.emplace(p,e,r,o,l,h)}emplace(e,r,o,l,h,p){const y=4*e,w=8*e;return this.float32[y+0]=r,this.float32[y+1]=o,this.float32[y+2]=l,this.int16[w+6]=h,this.int16[w+7]=p,e}}a.prototype.bytesPerElement=16,tt("StructArrayLayout2f1f2i16",a);class c extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=12*e,y=3*e;return this.uint8[p+0]=r,this.uint8[p+1]=o,this.float32[y+1]=l,this.float32[y+2]=h,e}}c.prototype.bytesPerElement=12,tt("StructArrayLayout2ub2f12",c);class d extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.uint16[h+0]=r,this.uint16[h+1]=o,this.uint16[h+2]=l,e}}d.prototype.bytesPerElement=6,tt("StructArrayLayout3ui6",d);class x extends cr{_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(e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie){const ue=this.length;return this.resize(ue+1),this.emplace(ue,e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie,ue){const re=24*e,pe=12*e,ge=48*e;return this.int16[re+0]=r,this.int16[re+1]=o,this.uint16[re+2]=l,this.uint16[re+3]=h,this.uint32[pe+2]=p,this.uint32[pe+3]=y,this.uint32[pe+4]=w,this.uint16[re+10]=T,this.uint16[re+11]=M,this.uint16[re+12]=z,this.float32[pe+7]=D,this.float32[pe+8]=V,this.uint8[ge+36]=U,this.uint8[ge+37]=Z,this.uint8[ge+38]=$,this.uint32[pe+10]=ie,this.int16[re+22]=ue,e}}x.prototype.bytesPerElement=48,tt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",x);class b extends cr{_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(e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie,ue,re,pe,ge,Me,lt,pt,st,$e,Ze,ht){const Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie,ue,re,pe,ge,Me,lt,pt,st,$e,Ze,ht)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z,$,ie,ue,re,pe,ge,Me,lt,pt,st,$e,Ze,ht,Ke){const Re=32*e,bt=16*e;return this.int16[Re+0]=r,this.int16[Re+1]=o,this.int16[Re+2]=l,this.int16[Re+3]=h,this.int16[Re+4]=p,this.int16[Re+5]=y,this.int16[Re+6]=w,this.int16[Re+7]=T,this.uint16[Re+8]=M,this.uint16[Re+9]=z,this.uint16[Re+10]=D,this.uint16[Re+11]=V,this.uint16[Re+12]=U,this.uint16[Re+13]=Z,this.uint16[Re+14]=$,this.uint16[Re+15]=ie,this.uint16[Re+16]=ue,this.uint16[Re+17]=re,this.uint16[Re+18]=pe,this.uint16[Re+19]=ge,this.uint16[Re+20]=Me,this.uint16[Re+21]=lt,this.uint16[Re+22]=pt,this.uint32[bt+12]=st,this.float32[bt+13]=$e,this.float32[bt+14]=Ze,this.uint16[Re+30]=ht,this.uint16[Re+31]=Ke,e}}b.prototype.bytesPerElement=64,tt("StructArrayLayout8i15ui1ul2f2ui64",b);class S extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.float32[1*e+0]=r,e}}S.prototype.bytesPerElement=4,tt("StructArrayLayout1f4",S);class C extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.uint16[6*e+0]=r,this.float32[h+1]=o,this.float32[h+2]=l,e}}C.prototype.bytesPerElement=12,tt("StructArrayLayout1ui2f12",C);class A extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=4*e;return this.uint32[2*e+0]=r,this.uint16[h+2]=o,this.uint16[h+3]=l,e}}A.prototype.bytesPerElement=8,tt("StructArrayLayout1ul2ui8",A);class P extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.uint16[l+0]=r,this.uint16[l+1]=o,e}}P.prototype.bytesPerElement=4,tt("StructArrayLayout2ui4",P);class R extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint16[1*e+0]=r,e}}R.prototype.bytesPerElement=2,tt("StructArrayLayout1ui2",R);class W extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=4*e;return this.float32[p+0]=r,this.float32[p+1]=o,this.float32[p+2]=l,this.float32[p+3]=h,e}}W.prototype.bytesPerElement=16,tt("StructArrayLayout4f16",W);class G extends Fs{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 ye(this.anchorPointX,this.anchorPointY)}}G.prototype.size=20;class K extends t{get(e){return new G(this,e)}}tt("CollisionBoxArray",K);class q extends Fs{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}q.prototype.size=48;class le extends x{get(e){return new q(this,e)}}tt("PlacedSymbolArray",le);class me extends Fs{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(e){this._structArray.uint32[this._pos4+12]=e}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]}}me.prototype.size=64;class ee extends b{get(e){return new me(this,e)}}tt("SymbolInstanceArray",ee);class ce extends S{getoffsetX(e){return this.float32[1*e+0]}}tt("GlyphOffsetArray",ce);class ve extends Ka{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}tt("SymbolLineVertexArray",ve);class xe extends Fs{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]}}xe.prototype.size=12;class Ce extends C{get(e){return new xe(this,e)}}tt("TextAnchorOffsetArray",Ce);class Fe extends Fs{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]}}Fe.prototype.size=8;class Pe extends A{get(e){return new Fe(this,e)}}tt("FeatureIndexArray",Pe);class je extends Xa{}class dt extends Xa{}class Qt extends Xa{}class Qe extends Wl{}class Ct extends Hl{}class gt extends Ia{}class Mi extends Xl{}class Kt extends Kl{}class jt extends wi{}class $t extends u{}class pr extends n{}class qi extends c{}class Xr extends d{}class kr extends P{}const br=or([{name:"a_pos",components:2,type:"Int16"}],4),{members:Xn}=br;class Qi{constructor(e=[]){this.segments=e}prepareSegment(e,r,o,l){let h=this.segments[this.segments.length-1];return e>Qi.MAX_VERTEX_ARRAY_LENGTH&&Dt(`Max vertices per segment is ${Qi.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!h||h.vertexLength+e>Qi.MAX_VERTEX_ARRAY_LENGTH||h.sortKey!==l)&&(h={vertexOffset:r.length,primitiveOffset:o.length,vertexLength:0,primitiveLength:0},l!==void 0&&(h.sortKey=l),this.segments.push(h)),h}get(){return this.segments}destroy(){for(const e of this.segments)for(const r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,o,l){return new Qi([{vertexOffset:e,primitiveOffset:r,vertexLength:o,primitiveLength:l,vaos:{},sortKey:0}])}}function Do(i,e){return 256*(i=ei(Math.floor(i),0,255))+ei(Math.floor(e),0,255)}Qi.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,tt("SegmentVector",Qi);const Fo=or([{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 _s={exports:{}},Os={exports:{}};Os.exports=function(i,e){var r,o,l,h,p,y,w,T;for(o=i.length-(r=3&i.length),l=e,p=3432918353,y=461845907,T=0;T>>16)*p&65535)<<16)&4294967295)<<15|w>>>17))*y+(((w>>>16)*y&65535)<<16)&4294967295)<<13|l>>>19))+((5*(l>>>16)&65535)<<16)&4294967295))+((58964+(h>>>16)&65535)<<16);switch(w=0,r){case 3:w^=(255&i.charCodeAt(T+2))<<16;case 2:w^=(255&i.charCodeAt(T+1))<<8;case 1:l^=w=(65535&(w=(w=(65535&(w^=255&i.charCodeAt(T)))*p+(((w>>>16)*p&65535)<<16)&4294967295)<<15|w>>>17))*y+(((w>>>16)*y&65535)<<16)&4294967295}return l^=i.length,l=2246822507*(65535&(l^=l>>>16))+((2246822507*(l>>>16)&65535)<<16)&4294967295,l=3266489909*(65535&(l^=l>>>13))+((3266489909*(l>>>16)&65535)<<16)&4294967295,(l^=l>>>16)>>>0};var Ea=Os.exports,ln={exports:{}};ln.exports=function(i,e){for(var r,o=i.length,l=e^o,h=0;o>=4;)r=1540483477*(65535&(r=255&i.charCodeAt(h)|(255&i.charCodeAt(++h))<<8|(255&i.charCodeAt(++h))<<16|(255&i.charCodeAt(++h))<<24))+((1540483477*(r>>>16)&65535)<<16),l=1540483477*(65535&l)+((1540483477*(l>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),o-=4,++h;switch(o){case 3:l^=(255&i.charCodeAt(h+2))<<16;case 2:l^=(255&i.charCodeAt(h+1))<<8;case 1:l=1540483477*(65535&(l^=255&i.charCodeAt(h)))+((1540483477*(l>>>16)&65535)<<16)}return l=1540483477*(65535&(l^=l>>>13))+((1540483477*(l>>>16)&65535)<<16),(l^=l>>>15)>>>0};var Kr=Ea,vn=ln.exports;_s.exports=Kr,_s.exports.murmur3=Kr,_s.exports.murmur2=vn;var Bs=N(_s.exports);class fr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,o,l){this.ids.push(Pr(e)),this.positions.push(r,o,l)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=Pr(e);let o=0,l=this.ids.length-1;for(;o>1;this.ids[p]>=r?l=p:o=p+1}const h=[];for(;this.ids[o]===r;)h.push({index:this.positions[3*o],start:this.positions[3*o+1],end:this.positions[3*o+2]}),o++;return h}static serialize(e,r){const o=new Float64Array(e.ids),l=new Uint32Array(e.positions);return Ln(o,l,0,o.length-1),r&&r.push(o.buffer,l.buffer),{ids:o,positions:l}}static deserialize(e){const r=new fr;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}}function Pr(i){const e=+i;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:Bs(String(i))}function Ln(i,e,r,o){for(;r>1];let h=r-1,p=o+1;for(;;){do h++;while(i[h]l);if(h>=p)break;mr(i,h,p),mr(e,3*h,3*p),mr(e,3*h+1,3*p+1),mr(e,3*h+2,3*p+2)}p-r`u_${l}`),this.type=o}setUniform(e,r,o){e.set(o.constantOr(this.value))}getBinding(e,r,o){return this.type==="color"?new Uc(e,r):new ml(e,r)}}class Vs{constructor(e,r){this.uniformNames=r.map(o=>`u_${o}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setUniform(e,r,o,l){const h=l==="u_pattern_to"?this.patternTo:l==="u_pattern_from"?this.patternFrom:l==="u_pixel_ratio_to"?this.pixelRatioTo:l==="u_pixel_ratio_from"?this.pixelRatioFrom:null;h&&e.set(h)}getBinding(e,r,o){return o.substr(0,9)==="u_pattern"?new Vc(e,r):new ml(e,r)}}class Oo{constructor(e,r,o,l){this.expression=e,this.type=o,this.maxValue=0,this.paintVertexAttributes=r.map(h=>({name:`a_${h}`,type:"Float32",components:o==="color"?2:1,offset:0})),this.paintVertexArray=new l}populatePaintArray(e,r,o,l,h){const p=this.paintVertexArray.length,y=this.expression.evaluate(new Yi(0),r,{},l,[],h);this.paintVertexArray.resize(e),this._setPaintValue(p,e,y)}updatePaintArray(e,r,o,l){const h=this.expression.evaluate({zoom:0},o,l);this._setPaintValue(e,r,h)}_setPaintValue(e,r,o){if(this.type==="color"){const l=Jl(o);for(let h=e;h`u_${y}_t`),this.type=o,this.useIntegerZoom=l,this.zoom=h,this.maxValue=0,this.paintVertexAttributes=r.map(y=>({name:`a_${y}`,type:"Float32",components:o==="color"?4:2,offset:0})),this.paintVertexArray=new p}populatePaintArray(e,r,o,l,h){const p=this.expression.evaluate(new Yi(this.zoom),r,{},l,[],h),y=this.expression.evaluate(new Yi(this.zoom+1),r,{},l,[],h),w=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(w,e,p,y)}updatePaintArray(e,r,o,l){const h=this.expression.evaluate({zoom:this.zoom},o,l),p=this.expression.evaluate({zoom:this.zoom+1},o,l);this._setPaintValue(e,r,h,p)}_setPaintValue(e,r,o,l){if(this.type==="color"){const h=Jl(o),p=Jl(l);for(let y=e;y`#define HAS_UNIFORM_${l}`))}return e}getBinderAttributes(){const e=[];for(const r in this.binders){const o=this.binders[r];if(o instanceof Oo||o instanceof ao)for(let l=0;l!0){this.programConfigurations={};for(const l of e)this.programConfigurations[l.id]=new Yl(l,r,o);this.needsUpload=!1,this._featureMap=new fr,this._bufferOffset=0}populatePaintArrays(e,r,o,l,h,p){for(const y in this.programConfigurations)this.programConfigurations[y].populatePaintArrays(e,r,l,h,p);r.id!==void 0&&this._featureMap.add(r.id,o,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,o,l){for(const h of o)this.needsUpload=this.programConfigurations[h.id].updatePaintArrays(e,this._featureMap,r,h,l)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function pf(i,e){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"]}[i]||[i.replace(`${e}-`,"").replace(/-/g,"_")]}function Lh(i,e,r){const o={color:{source:Ia,composite:W},number:{source:S,composite:Ia}},l=function(h){return{"line-pattern":{source:Mi,composite:Mi},"fill-pattern":{source:Mi,composite:Mi},"fill-extrusion-pattern":{source:Mi,composite:Mi}}[h]}(i);return l&&l[r]||o[e][r]}tt("ConstantBinder",Ro),tt("CrossFadedConstantBinder",Vs),tt("SourceExpressionBinder",Oo),tt("CrossFadedCompositeBinder",Bo),tt("CompositeExpressionBinder",ao),tt("ProgramConfiguration",Yl,{omit:["_buffers"]}),tt("ProgramConfigurationSet",Yo);const Er=8192,Su=Math.pow(2,14)-1,Dh=-Su-1;function Ja(i){const e=Er/i.extent,r=i.loadGeometry();for(let o=0;op.x+1||wp.y+1)&&Dt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Ya(i,e){return{type:i.type,id:i.id,properties:i.properties,geometry:e?Ja(i):[]}}function jc(i,e,r,o,l){i.emplaceBack(2*e+(o+1)/2,2*r+(l+1)/2)}class Tu{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new dt,this.indexArray=new Xr,this.segments=new Qi,this.programConfigurations=new Yo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){const l=this.layers[0],h=[];let p=null,y=!1;l.type==="circle"&&(p=l.layout.get("circle-sort-key"),y=!p.isConstant());for(const{feature:w,id:T,index:M,sourceLayerIndex:z}of e){const D=this.layers[0]._featureFilter.needGeometry,V=Ya(w,D);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),V,o))continue;const U=y?p.evaluate(V,{},o):void 0,Z={id:T,properties:w.properties,type:w.type,sourceLayerIndex:z,index:M,geometry:D?V.geometry:Ja(w),patterns:{},sortKey:U};h.push(Z)}y&&h.sort((w,T)=>w.sortKey-T.sortKey);for(const w of h){const{geometry:T,index:M,sourceLayerIndex:z}=w,D=e[M].feature;this.addFeature(w,T,M,o),r.featureIndex.insert(D,T,M,z,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Xn),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,o,l){for(const h of r)for(const p of h){const y=p.x,w=p.y;if(y<0||y>=Er||w<0||w>=Er)continue;const T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),M=T.vertexLength;jc(this.layoutVertexArray,y,w,-1,-1),jc(this.layoutVertexArray,y,w,1,-1),jc(this.layoutVertexArray,y,w,1,1),jc(this.layoutVertexArray,y,w,-1,1),this.indexArray.emplaceBack(M,M+1,M+2),this.indexArray.emplaceBack(M,M+3,M+2),T.vertexLength+=4,T.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,{},l)}}function Fh(i,e){for(let r=0;r1){if(Iu(i,e))return!0;for(let o=0;o1?r:r.sub(e)._mult(l)._add(e))}function Bh(i,e){let r,o,l,h=!1;for(let p=0;pe.y!=l.y>e.y&&e.x<(l.x-o.x)*(e.y-o.y)/(l.y-o.y)+o.x&&(h=!h)}return h}function _l(i,e){let r=!1;for(let o=0,l=i.length-1;oe.y!=p.y>e.y&&e.x<(p.x-h.x)*(e.y-h.y)/(p.y-h.y)+h.x&&(r=!r)}return r}function gf(i,e,r){const o=r[0],l=r[2];if(i.xl.x&&e.x>l.x||i.yl.y&&e.y>l.y)return!1;const h=qt(i,e,r[0]);return h!==qt(i,e,r[1])||h!==qt(i,e,r[2])||h!==qt(i,e,r[3])}function Ql(i,e,r){const o=e.paint.get(i).value;return o.kind==="constant"?o.value:r.programConfigurations.get(e.id).getMaxValue(i)}function qc(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function Zc(i,e,r,o,l){if(!e[0]&&!e[1])return i;const h=ye.convert(e)._mult(l);r==="viewport"&&h._rotate(-o);const p=[];for(let y=0;yjh($,Z))}(T,w),V=z?M*y:M;for(const U of l)for(const Z of U){const $=z?Z:jh(Z,w);let ie=V;const ue=Gc([],[Z.x,Z.y,0,1],w);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ie*=ue[3]/p.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ie*=p.cameraToCenterDistance/ue[3]),ff(D,$,ie))return!0}return!1}}function jh(i,e){const r=Gc([],[i.x,i.y,0,1],e);return new ye(r[0]/r[3],r[1]/r[3])}class qh extends Tu{}let Zh;tt("HeatmapBucket",qh,{omit:["layers"]});var bf={get paint(){return Zh=Zh||new xr({"heatmap-radius":new Et(Se.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Et(Se.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xt(Se.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Zl(Se.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xt(Se.paint_heatmap["heatmap-opacity"])})}};function Mu(i,{width:e,height:r},o,l){if(l){if(l instanceof Uint8ClampedArray)l=new Uint8Array(l.buffer);else if(l.length!==e*r*o)throw new RangeError(`mismatched image size. expected: ${l.length} but got: ${e*r*o}`)}else l=new Uint8Array(e*r*o);return i.width=e,i.height=r,i.data=l,i}function Gh(i,{width:e,height:r},o){if(e===i.width&&r===i.height)return;const l=Mu({},{width:e,height:r},o);Au(i,l,{x:0,y:0},{x:0,y:0},{width:Math.min(i.width,e),height:Math.min(i.height,r)},o),i.width=e,i.height=r,i.data=l.data}function Au(i,e,r,o,l,h){if(l.width===0||l.height===0)return e;if(l.width>i.width||l.height>i.height||r.x>i.width-l.width||r.y>i.height-l.height)throw new RangeError("out of range source coordinates for image copy");if(l.width>e.width||l.height>e.height||o.x>e.width-l.width||o.y>e.height-l.height)throw new RangeError("out of range destination coordinates for image copy");const p=i.data,y=e.data;if(p===y)throw new Error("srcData equals dstData, so image is already copied");for(let w=0;w{e[i.evaluationKey]=w;const T=i.expression.evaluate(e);l.data[p+y+0]=Math.floor(255*T.r/T.a),l.data[p+y+1]=Math.floor(255*T.g/T.a),l.data[p+y+2]=Math.floor(255*T.b/T.a),l.data[p+y+3]=Math.floor(255*T.a)};if(i.clips)for(let p=0,y=0;p80*r){o=h=i[0],l=p=i[1];for(var U=r;Uh&&(h=y),w>p&&(p=w);T=(T=Math.max(h-o,p-l))!==0?32767/T:0}return tc(D,V,r,o,l,T,0),V}function Xh(i,e,r,o,l){var h,p;if(l===Lu(i,e,r,o)>0)for(h=e;h=e;h-=o)p=Yh(h,i[h],i[h+1],p);return p&&Hc(p,p.next)&&(rc(p),p=p.next),p}function Qa(i,e){if(!i)return i;e||(e=i);var r,o=i;do if(r=!1,o.steiner||!Hc(o,o.next)&&wr(o.prev,o,o.next)!==0)o=o.next;else{if(rc(o),(o=e=o.prev)===o.next)break;r=!0}while(r||o!==e);return e}function tc(i,e,r,o,l,h,p){if(i){!p&&h&&function(M,z,D,V){var U=M;do U.z===0&&(U.z=Pu(U.x,U.y,z,D,V)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==M);U.prevZ.nextZ=null,U.prevZ=null,function(Z){var $,ie,ue,re,pe,ge,Me,lt,pt=1;do{for(ie=Z,Z=null,pe=null,ge=0;ie;){for(ge++,ue=ie,Me=0,$=0;$0||lt>0&&ue;)Me!==0&&(lt===0||!ue||ie.z<=ue.z)?(re=ie,ie=ie.nextZ,Me--):(re=ue,ue=ue.nextZ,lt--),pe?pe.nextZ=re:Z=re,re.prevZ=pe,pe=re;ie=ue}pe.nextZ=null,pt*=2}while(ge>1)}(U)}(i,o,l,h);for(var y,w,T=i;i.prev!==i.next;)if(y=i.prev,w=i.next,h?Mf(i,o,l,h):Cf(i))e.push(y.i/r|0),e.push(i.i/r|0),e.push(w.i/r|0),rc(i),i=w.next,T=w.next;else if((i=w)===T){p?p===1?tc(i=Af(Qa(i),e,r),e,r,o,l,h,2):p===2&&kf(i,e,r,o,l,h):tc(Qa(i),e,r,o,l,h,1);break}}}function Cf(i){var e=i.prev,r=i,o=i.next;if(wr(e,r,o)>=0)return!1;for(var l=e.x,h=r.x,p=o.x,y=e.y,w=r.y,T=o.y,M=lh?l>p?l:p:h>p?h:p,V=y>w?y>T?y:T:w>T?w:T,U=o.next;U!==e;){if(U.x>=M&&U.x<=D&&U.y>=z&&U.y<=V&&yl(l,y,h,w,p,T,U.x,U.y)&&wr(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function Mf(i,e,r,o){var l=i.prev,h=i,p=i.next;if(wr(l,h,p)>=0)return!1;for(var y=l.x,w=h.x,T=p.x,M=l.y,z=h.y,D=p.y,V=yw?y>T?y:T:w>T?w:T,$=M>z?M>D?M:D:z>D?z:D,ie=Pu(V,U,e,r,o),ue=Pu(Z,$,e,r,o),re=i.prevZ,pe=i.nextZ;re&&re.z>=ie&&pe&&pe.z<=ue;){if(re.x>=V&&re.x<=Z&&re.y>=U&&re.y<=$&&re!==l&&re!==p&&yl(y,M,w,z,T,D,re.x,re.y)&&wr(re.prev,re,re.next)>=0||(re=re.prevZ,pe.x>=V&&pe.x<=Z&&pe.y>=U&&pe.y<=$&&pe!==l&&pe!==p&&yl(y,M,w,z,T,D,pe.x,pe.y)&&wr(pe.prev,pe,pe.next)>=0))return!1;pe=pe.nextZ}for(;re&&re.z>=ie;){if(re.x>=V&&re.x<=Z&&re.y>=U&&re.y<=$&&re!==l&&re!==p&&yl(y,M,w,z,T,D,re.x,re.y)&&wr(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;pe&&pe.z<=ue;){if(pe.x>=V&&pe.x<=Z&&pe.y>=U&&pe.y<=$&&pe!==l&&pe!==p&&yl(y,M,w,z,T,D,pe.x,pe.y)&&wr(pe.prev,pe,pe.next)>=0)return!1;pe=pe.nextZ}return!0}function Af(i,e,r){var o=i;do{var l=o.prev,h=o.next.next;!Hc(l,h)&&Kh(l,o,o.next,h)&&ic(l,h)&&ic(h,l)&&(e.push(l.i/r|0),e.push(o.i/r|0),e.push(h.i/r|0),rc(o),rc(o.next),o=i=h),o=o.next}while(o!==i);return Qa(o)}function kf(i,e,r,o,l,h){var p=i;do{for(var y=p.next.next;y!==p.prev;){if(p.i!==y.i&&Ff(p,y)){var w=Jh(p,y);return p=Qa(p,p.next),w=Qa(w,w.next),tc(p,e,r,o,l,h,0),void tc(w,e,r,o,l,h,0)}y=y.next}p=p.next}while(p!==i)}function Pf(i,e){return i.x-e.x}function zf(i,e){var r=function(l,h){var p,y=h,w=l.x,T=l.y,M=-1/0;do{if(T<=y.y&&T>=y.next.y&&y.next.y!==y.y){var z=y.x+(T-y.y)*(y.next.x-y.x)/(y.next.y-y.y);if(z<=w&&z>M&&(M=z,p=y.x=y.x&&y.x>=U&&w!==y.x&&yl(Tp.x||y.x===p.x&&Lf(p,y)))&&(p=y,$=D)),y=y.next;while(y!==V);return p}(i,e);if(!r)return e;var o=Jh(r,i);return Qa(o,o.next),Qa(r,r.next)}function Lf(i,e){return wr(i.prev,i,e.prev)<0&&wr(e.next,i,i.next)<0}function Pu(i,e,r,o,l){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-r)*l|0)|i<<8))|i<<4))|i<<2))|i<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-o)*l|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Df(i){var e=i,r=i;do(e.x=(i-p)*(h-y)&&(i-p)*(o-y)>=(r-p)*(e-y)&&(r-p)*(h-y)>=(l-p)*(o-y)}function Ff(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!function(r,o){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==o.i&&l.next.i!==o.i&&Kh(l,l.next,r,o))return!0;l=l.next}while(l!==r);return!1}(i,e)&&(ic(i,e)&&ic(e,i)&&function(r,o){var l=r,h=!1,p=(r.x+o.x)/2,y=(r.y+o.y)/2;do l.y>y!=l.next.y>y&&l.next.y!==l.y&&p<(l.next.x-l.x)*(y-l.y)/(l.next.y-l.y)+l.x&&(h=!h),l=l.next;while(l!==r);return h}(i,e)&&(wr(i.prev,i,e.prev)||wr(i,e.prev,e))||Hc(i,e)&&wr(i.prev,i,i.next)>0&&wr(e.prev,e,e.next)>0)}function wr(i,e,r){return(e.y-i.y)*(r.x-e.x)-(e.x-i.x)*(r.y-e.y)}function Hc(i,e){return i.x===e.x&&i.y===e.y}function Kh(i,e,r,o){var l=Kc(wr(i,e,r)),h=Kc(wr(i,e,o)),p=Kc(wr(r,o,i)),y=Kc(wr(r,o,e));return l!==h&&p!==y||!(l!==0||!Xc(i,r,e))||!(h!==0||!Xc(i,o,e))||!(p!==0||!Xc(r,i,o))||!(y!==0||!Xc(r,e,o))}function Xc(i,e,r){return e.x<=Math.max(i.x,r.x)&&e.x>=Math.min(i.x,r.x)&&e.y<=Math.max(i.y,r.y)&&e.y>=Math.min(i.y,r.y)}function Kc(i){return i>0?1:i<0?-1:0}function ic(i,e){return wr(i.prev,i,i.next)<0?wr(i,e,i.next)>=0&&wr(i,i.prev,e)>=0:wr(i,e,i.prev)<0||wr(i,i.next,e)<0}function Jh(i,e){var r=new zu(i.i,i.x,i.y),o=new zu(e.i,e.x,e.y),l=i.next,h=e.prev;return i.next=e,e.prev=i,r.next=l,l.prev=r,o.next=r,r.prev=o,h.next=o,o.prev=h,o}function Yh(i,e,r,o){var l=new zu(i,e,r);return o?(l.next=o.next,l.prev=o,o.next.prev=l,o.next=l):(l.prev=l,l.next=l),l}function rc(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function zu(i,e,r){this.i=i,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Lu(i,e,r,o){for(var l=0,h=e,p=r-o;h0&&r.holes.push(o+=i[l-1].length)}return r};var Qh=N(ku.exports);function Rf(i,e,r,o,l){$h(i,e,r||0,o||i.length-1,l||Of)}function $h(i,e,r,o,l){for(;o>r;){if(o-r>600){var h=o-r+1,p=e-r+1,y=Math.log(h),w=.5*Math.exp(2*y/3),T=.5*Math.sqrt(y*w*(h-w)/h)*(p-h/2<0?-1:1);$h(i,e,Math.max(r,Math.floor(e-p*w/h+T)),Math.min(o,Math.floor(e+(h-p)*w/h+T)),l)}var M=i[e],z=r,D=o;for(nc(i,r,e),l(i[o],M)>0&&nc(i,r,o);z0;)D--}l(i[r],M)===0?nc(i,r,D):nc(i,++D,o),D<=e&&(r=D+1),e<=D&&(o=D-1)}}function nc(i,e,r){var o=i[e];i[e]=i[r],i[r]=o}function Of(i,e){return ie?1:0}function Du(i,e){const r=i.length;if(r<=1)return[i];const o=[];let l,h;for(let p=0;p1)for(let p=0;pr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Qt,this.indexArray=new Xr,this.indexArray2=new kr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.segments2=new Qi,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.hasPattern=Fu("fill",this.layers,r);const l=this.layers[0].layout.get("fill-sort-key"),h=!l.isConstant(),p=[];for(const{feature:y,id:w,index:T,sourceLayerIndex:M}of e){const z=this.layers[0]._featureFilter.needGeometry,D=Ya(y,z);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),D,o))continue;const V=h?l.evaluate(D,{},o,r.availableImages):void 0,U={id:w,properties:y.properties,type:y.type,sourceLayerIndex:M,index:T,geometry:z?D.geometry:Ja(y),patterns:{},sortKey:V};p.push(U)}h&&p.sort((y,w)=>y.sortKey-w.sortKey);for(const y of p){const{geometry:w,index:T,sourceLayerIndex:M}=y;if(this.hasPattern){const z=Ru("fill",this.layers,y,this.zoom,r);this.patternFeatures.push(z)}else this.addFeature(y,w,T,o,{});r.featureIndex.insert(e[T].feature,w,T,M,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}addFeatures(e,r,o){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ef),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,r,o,l,h){for(const p of Du(r,500)){let y=0;for(const V of p)y+=V.length;const w=this.segments.prepareSegment(y,this.layoutVertexArray,this.indexArray),T=w.vertexLength,M=[],z=[];for(const V of p){if(V.length===0)continue;V!==p[0]&&z.push(M.length/2);const U=this.segments2.prepareSegment(V.length,this.layoutVertexArray,this.indexArray2),Z=U.vertexLength;this.layoutVertexArray.emplaceBack(V[0].x,V[0].y),this.indexArray2.emplaceBack(Z+V.length-1,Z),M.push(V[0].x),M.push(V[0].y);for(let $=1;$>3}if(l--,o===1||o===2)h+=i.readSVarint(),p+=i.readSVarint(),o===1&&(e&&y.push(e),e=[]),e.push(new Zf(h,p));else{if(o!==7)throw new Error("unknown command "+o);e&&e.push(e[0].clone())}}return e&&y.push(e),y},vl.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var e=i.readVarint()+i.pos,r=1,o=0,l=0,h=0,p=1/0,y=-1/0,w=1/0,T=-1/0;i.pos>3}if(o--,r===1||r===2)(l+=i.readSVarint())y&&(y=l),(h+=i.readSVarint())T&&(T=h);else if(r!==7)throw new Error("unknown command "+r)}return[p,w,y,T]},vl.prototype.toGeoJSON=function(i,e,r){var o,l,h=this.extent*Math.pow(2,r),p=this.extent*i,y=this.extent*e,w=this.loadGeometry(),T=vl.types[this.type];function M(V){for(var U=0;U>3;l=p===1?o.readString():p===2?o.readFloat():p===3?o.readDouble():p===4?o.readVarint64():p===5?o.readVarint():p===6?o.readSVarint():p===7?o.readBoolean():null}return l}(r))}nd.prototype.feature=function(i){if(i<0||i>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[i];var e=this._pbf.readVarint()+this._pbf.pos;return new Hf(this._pbf,e,this.extent,this._keys,this._values)};var Kf=rd;function Jf(i,e,r){if(i===3){var o=new Kf(r,r.readVarint()+r.pos);o.length&&(e[o.name]=o)}}Ca.VectorTile=function(i,e){this.layers=i.readFields(Jf,{},e)},Ca.VectorTileFeature=id,Ca.VectorTileLayer=rd;const Yf=Ca.VectorTileFeature.types,Bu=Math.pow(2,13);function oc(i,e,r,o,l,h,p,y){i.emplaceBack(e,r,2*Math.floor(o*Bu)+p,l*Bu*2,h*Bu*2,Math.round(y))}class Nu{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Qe,this.centroidVertexArray=new je,this.indexArray=new Xr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.features=[],this.hasPattern=Fu("fill-extrusion",this.layers,r);for(const{feature:l,id:h,index:p,sourceLayerIndex:y}of e){const w=this.layers[0]._featureFilter.needGeometry,T=Ya(l,w);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),T,o))continue;const M={id:h,sourceLayerIndex:y,index:p,geometry:w?T.geometry:Ja(l),properties:l.properties,type:l.type,patterns:{}};this.hasPattern?this.features.push(Ru("fill-extrusion",this.layers,M,this.zoom,r)):this.addFeature(M,M.geometry,p,o,{}),r.featureIndex.insert(l,M.geometry,p,y,this.index,!0)}}addFeatures(e,r,o){for(const l of this.features){const{geometry:h}=l;this.addFeature(l,h,l.index,r,o)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,qf),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,jf.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,o,l,h){const p={x:0,y:0,vertexCount:0};for(const y of Du(r,500)){let w=0;for(const U of y)w+=U.length;let T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const U of y){if(U.length===0||$f(U))continue;let Z=0;for(let $=0;$=1){const ue=U[$-1];if(!Qf(ie,ue)){T.vertexLength+4>Qi.MAX_VERTEX_ARRAY_LENGTH&&(T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const re=ie.sub(ue)._perp()._unit(),pe=ue.dist(ie);Z+pe>32768&&(Z=0),oc(this.layoutVertexArray,ie.x,ie.y,re.x,re.y,0,0,Z),oc(this.layoutVertexArray,ie.x,ie.y,re.x,re.y,0,1,Z),p.x+=2*ie.x,p.y+=2*ie.y,p.vertexCount+=2,Z+=pe,oc(this.layoutVertexArray,ue.x,ue.y,re.x,re.y,0,0,Z),oc(this.layoutVertexArray,ue.x,ue.y,re.x,re.y,0,1,Z),p.x+=2*ue.x,p.y+=2*ue.y,p.vertexCount+=2;const ge=T.vertexLength;this.indexArray.emplaceBack(ge,ge+2,ge+1),this.indexArray.emplaceBack(ge+1,ge+2,ge+3),T.vertexLength+=4,T.primitiveLength+=2}}}}if(T.vertexLength+w>Qi.MAX_VERTEX_ARRAY_LENGTH&&(T=this.segments.prepareSegment(w,this.layoutVertexArray,this.indexArray)),Yf[e.type]!=="Polygon")continue;const M=[],z=[],D=T.vertexLength;for(const U of y)if(U.length!==0){U!==y[0]&&z.push(M.length/2);for(let Z=0;ZEr)||i.y===e.y&&(i.y<0||i.y>Er)}function $f(i){return i.every(e=>e.x<0)||i.every(e=>e.x>Er)||i.every(e=>e.y<0)||i.every(e=>e.y>Er)}let od;tt("FillExtrusionBucket",Nu,{omit:["layers","features"]});var em={get paint(){return od=od||new xr({"fill-extrusion-opacity":new xt(Se["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Et(Se["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xt(Se["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xt(Se["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ha(Se["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Et(Se["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Et(Se["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xt(Se["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class tm extends so{constructor(e){super(e,em)}createBucket(e){return new Nu(e)}queryRadius(){return qc(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,r,o,l,h,p,y,w){const T=Zc(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),p.angle,y),M=this.paint.get("fill-extrusion-height").evaluate(r,o),z=this.paint.get("fill-extrusion-base").evaluate(r,o),D=function(U,Z,$,ie){const ue=[];for(const re of U){const pe=[re.x,re.y,0,1];Gc(pe,pe,Z),ue.push(new ye(pe[0]/pe[3],pe[1]/pe[3]))}return ue}(T,w),V=function(U,Z,$,ie){const ue=[],re=[],pe=ie[8]*Z,ge=ie[9]*Z,Me=ie[10]*Z,lt=ie[11]*Z,pt=ie[8]*$,st=ie[9]*$,$e=ie[10]*$,Ze=ie[11]*$;for(const ht of U){const Ke=[],Re=[];for(const bt of ht){const yt=bt.x,Gt=bt.y,$i=ie[0]*yt+ie[4]*Gt+ie[12],nr=ie[1]*yt+ie[5]*Gt+ie[13],Lr=ie[2]*yt+ie[6]*Gt+ie[14],lo=ie[3]*yt+ie[7]*Gt+ie[15],Fn=Lr+Me,Cr=lo+lt,Jr=$i+pt,un=nr+st,Rn=Lr+$e,On=lo+Ze,Dr=new ye(($i+pe)/Cr,(nr+ge)/Cr);Dr.z=Fn/Cr,Ke.push(Dr);const Fr=new ye(Jr/On,un/On);Fr.z=Rn/On,Re.push(Fr)}ue.push(Ke),re.push(Re)}return[ue,re]}(l,z,M,w);return function(U,Z,$){let ie=1/0;Rh($,Z)&&(ie=sd($,Z[0]));for(let ue=0;uer.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new Ct,this.layoutVertexArray2=new gt,this.indexArray=new Xr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.hasPattern=Fu("line",this.layers,r);const l=this.layers[0].layout.get("line-sort-key"),h=!l.isConstant(),p=[];for(const{feature:y,id:w,index:T,sourceLayerIndex:M}of e){const z=this.layers[0]._featureFilter.needGeometry,D=Ya(y,z);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),D,o))continue;const V=h?l.evaluate(D,{},o):void 0,U={id:w,properties:y.properties,type:y.type,sourceLayerIndex:M,index:T,geometry:z?D.geometry:Ja(y),patterns:{},sortKey:V};p.push(U)}h&&p.sort((y,w)=>y.sortKey-w.sortKey);for(const y of p){const{geometry:w,index:T,sourceLayerIndex:M}=y;if(this.hasPattern){const z=Ru("line",this.layers,y,this.zoom,r);this.patternFeatures.push(z)}else this.addFeature(y,w,T,o,{});r.featureIndex.insert(e[T].feature,w,T,M,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}addFeatures(e,r,o){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,om)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,rm),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,r,o,l,h){const p=this.layers[0].layout,y=p.get("line-join").evaluate(e,{}),w=p.get("line-cap"),T=p.get("line-miter-limit"),M=p.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const z of r)this.addLine(z,e,y,w,T,M);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,h,l)}addLine(e,r,o,l,h,p){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ie=0;ie=2&&e[w-1].equals(e[w-2]);)w--;let T=0;for(;T0;if(lt&&ie>T){const Ze=D.dist(V);if(Ze>2*M){const ht=D.sub(D.sub(V)._mult(M/Ze)._round());this.updateDistance(V,ht),this.addCurrentVertex(ht,Z,0,0,z),V=ht}}const st=V&&U;let $e=st?o:y?"butt":l;if(st&&$e==="round"&&(geh&&($e="bevel"),$e==="bevel"&&(ge>2&&($e="flipbevel"),ge100)ue=$.mult(-1);else{const Ze=ge*Z.add($).mag()/Z.sub($).mag();ue._perp()._mult(Ze*(pt?-1:1))}this.addCurrentVertex(D,ue,0,0,z),this.addCurrentVertex(D,ue.mult(-1),0,0,z)}else if($e==="bevel"||$e==="fakeround"){const Ze=-Math.sqrt(ge*ge-1),ht=pt?Ze:0,Ke=pt?0:Ze;if(V&&this.addCurrentVertex(D,Z,ht,Ke,z),$e==="fakeround"){const Re=Math.round(180*Me/Math.PI/20);for(let bt=1;bt2*M){const ht=D.add(U.sub(D)._mult(M/Ze)._round());this.updateDistance(D,ht),this.addCurrentVertex(ht,$,0,0,z),D=ht}}}}addCurrentVertex(e,r,o,l,h,p=!1){const y=r.y*l-r.x,w=-r.y-r.x*l;this.addHalfVertex(e,r.x+r.y*o,r.y-r.x*o,p,!1,o,h),this.addHalfVertex(e,y,w,p,!0,-l,h),this.distance>ad/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,o,l,h,p))}addHalfVertex({x:e,y:r},o,l,h,p,y,w){const T=.5*(this.lineClips?this.scaledDistance*(ad-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(h?1:0),(r<<1)+(p?1:0),Math.round(63*o)+128,Math.round(63*l)+128,1+(y===0?0:y<0?-1:1)|(63&T)<<2,T>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const M=w.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,M),w.primitiveLength++),p?this.e2=M:this.e1=M}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}}let ld,cd;tt("LineBucket",Vu,{omit:["layers","patternFeatures"]});var ud={get paint(){return cd=cd||new xr({"line-opacity":new Et(Se.paint_line["line-opacity"]),"line-color":new Et(Se.paint_line["line-color"]),"line-translate":new xt(Se.paint_line["line-translate"]),"line-translate-anchor":new xt(Se.paint_line["line-translate-anchor"]),"line-width":new Et(Se.paint_line["line-width"]),"line-gap-width":new Et(Se.paint_line["line-gap-width"]),"line-offset":new Et(Se.paint_line["line-offset"]),"line-blur":new Et(Se.paint_line["line-blur"]),"line-dasharray":new ql(Se.paint_line["line-dasharray"]),"line-pattern":new Ha(Se.paint_line["line-pattern"]),"line-gradient":new Zl(Se.paint_line["line-gradient"])})},get layout(){return ld=ld||new xr({"line-cap":new xt(Se.layout_line["line-cap"]),"line-join":new Et(Se.layout_line["line-join"]),"line-miter-limit":new xt(Se.layout_line["line-miter-limit"]),"line-round-limit":new xt(Se.layout_line["line-round-limit"]),"line-sort-key":new Et(Se.layout_line["line-sort-key"])})}};class lm extends Et{possiblyEvaluate(e,r){return r=new Yi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,o,l){return r=Nt({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,o,l)}}let Jc;class cm extends so{constructor(e){super(e,ud),this.gradientVersion=0,Jc||(Jc=new lm(ud.paint.properties["line-width"].specification),Jc.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!function(o){return o._styleExpression!==void 0}(r)&&r._styleExpression.expression instanceof ho,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=Jc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Vu(e)}queryRadius(e){const r=e,o=hd(Ql("line-width",this,r),Ql("line-gap-width",this,r)),l=Ql("line-offset",this,r);return o/2+Math.abs(l)+qc(this.paint.get("line-translate"))}queryIntersectsFeature(e,r,o,l,h,p,y){const w=Zc(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),p.angle,y),T=y/2*hd(this.paint.get("line-width").evaluate(r,o),this.paint.get("line-gap-width").evaluate(r,o)),M=this.paint.get("line-offset").evaluate(r,o);return M&&(l=function(z,D){const V=[];for(let U=0;U=3){for(let $=0;$0?e+2*i:i}const um=or([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hm=or([{name:"a_projected_pos",components:3,type:"Float32"}],4);or([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const dm=or([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);or([{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 dd=or([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),pm=or([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function fm(i,e,r){return i.sections.forEach(o=>{o.text=function(l,h,p){const y=h.layout.get("text-transform").evaluate(p,{});return y==="uppercase"?l=l.toLocaleUpperCase():y==="lowercase"&&(l=l.toLocaleLowerCase()),Hn.applyArabicShaping&&(l=Hn.applyArabicShaping(l)),l}(o.text,e,r)}),i}or([{name:"triangle",components:3,type:"Uint16"}]),or([{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"}]),or([{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"}]),or([{type:"Float32",name:"offsetX"}]),or([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),or([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const ac={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var zr=24,pd=Di,fd=function(i,e,r,o,l){var h,p,y=8*l-o-1,w=(1<>1,M=-7,z=r?l-1:0,D=r?-1:1,V=i[e+z];for(z+=D,h=V&(1<<-M)-1,V>>=-M,M+=y;M>0;h=256*h+i[e+z],z+=D,M-=8);for(p=h&(1<<-M)-1,h>>=-M,M+=o;M>0;p=256*p+i[e+z],z+=D,M-=8);if(h===0)h=1-T;else{if(h===w)return p?NaN:1/0*(V?-1:1);p+=Math.pow(2,o),h-=T}return(V?-1:1)*p*Math.pow(2,h-o)},md=function(i,e,r,o,l,h){var p,y,w,T=8*h-l-1,M=(1<>1,D=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,V=o?0:h-1,U=o?1:-1,Z=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,p=M):(p=Math.floor(Math.log(e)/Math.LN2),e*(w=Math.pow(2,-p))<1&&(p--,w*=2),(e+=p+z>=1?D/w:D*Math.pow(2,1-z))*w>=2&&(p++,w/=2),p+z>=M?(y=0,p=M):p+z>=1?(y=(e*w-1)*Math.pow(2,l),p+=z):(y=e*Math.pow(2,z-1)*Math.pow(2,l),p=0));l>=8;i[r+V]=255&y,V+=U,y/=256,l-=8);for(p=p<0;i[r+V]=255&p,V+=U,p/=256,T-=8);i[r+V-U]|=128*Z};function Di(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Di.Varint=0,Di.Fixed64=1,Di.Bytes=2,Di.Fixed32=5;var Uu=4294967296,_d=1/Uu,gd=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Us(i){return i.type===Di.Bytes?i.readVarint()+i.pos:i.pos+1}function xl(i,e,r){return r?4294967296*e+(i>>>0):4294967296*(e>>>0)+(i>>>0)}function yd(i,e,r){var o=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(o);for(var l=r.pos-1;l>=i;l--)r.buf[l+o]=r.buf[l]}function mm(i,e){for(var r=0;r>>8,i[r+2]=e>>>16,i[r+3]=e>>>24}function vd(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+(i[e+3]<<24)}Di.prototype={destroy:function(){this.buf=null},readFields:function(i,e,r){for(r=r||this.length;this.pos>3,h=this.pos;this.type=7&o,i(l,e,this),this.pos===h&&this.skip(o)}return e},readMessage:function(i,e){return this.readFields(i,e,this.readVarint()+this.pos)},readFixed32:function(){var i=Yc(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=vd(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=Yc(this.buf,this.pos)+Yc(this.buf,this.pos+4)*Uu;return this.pos+=8,i},readSFixed64:function(){var i=Yc(this.buf,this.pos)+vd(this.buf,this.pos+4)*Uu;return this.pos+=8,i},readFloat:function(){var i=fd(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=fd(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var e,r,o=this.buf;return e=127&(r=o[this.pos++]),r<128?e:(e|=(127&(r=o[this.pos++]))<<7,r<128?e:(e|=(127&(r=o[this.pos++]))<<14,r<128?e:(e|=(127&(r=o[this.pos++]))<<21,r<128?e:function(l,h,p){var y,w,T=p.buf;if(y=(112&(w=T[p.pos++]))>>4,w<128||(y|=(127&(w=T[p.pos++]))<<3,w<128)||(y|=(127&(w=T[p.pos++]))<<10,w<128)||(y|=(127&(w=T[p.pos++]))<<17,w<128)||(y|=(127&(w=T[p.pos++]))<<24,w<128)||(y|=(1&(w=T[p.pos++]))<<31,w<128))return xl(l,y,h);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=o[this.pos]))<<28,i,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2==1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,e=this.pos;return this.pos=i,i-e>=12&&gd?function(r,o,l){return gd.decode(r.subarray(o,l))}(this.buf,e,i):function(r,o,l){for(var h="",p=o;p239?4:M>223?3:M>191?2:1;if(p+D>l)break;D===1?M<128&&(z=M):D===2?(192&(y=r[p+1]))==128&&(z=(31&M)<<6|63&y)<=127&&(z=null):D===3?(w=r[p+2],(192&(y=r[p+1]))==128&&(192&w)==128&&((z=(15&M)<<12|(63&y)<<6|63&w)<=2047||z>=55296&&z<=57343)&&(z=null)):D===4&&(w=r[p+2],T=r[p+3],(192&(y=r[p+1]))==128&&(192&w)==128&&(192&T)==128&&((z=(15&M)<<18|(63&y)<<12|(63&w)<<6|63&T)<=65535||z>=1114112)&&(z=null)),z===null?(z=65533,D=1):z>65535&&(z-=65536,h+=String.fromCharCode(z>>>10&1023|55296),z=56320|1023&z),h+=String.fromCharCode(z),p+=D}return h}(this.buf,e,i)},readBytes:function(){var i=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,i);return this.pos=i,e},readPackedVarint:function(i,e){if(this.type!==Di.Bytes)return i.push(this.readVarint(e));var r=Us(this);for(i=i||[];this.pos127;);else if(e===Di.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Di.Fixed32)this.pos+=4;else{if(e!==Di.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(i,e){this.writeVarint(i<<3|e)},realloc:function(i){for(var e=this.length||16;e268435455||i<0?function(e,r){var o,l;if(e>=0?(o=e%4294967296|0,l=e/4294967296|0):(l=~(-e/4294967296),4294967295^(o=~(-e%4294967296))?o=o+1|0:(o=0,l=l+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(h,p,y){y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,y.buf[y.pos]=127&(h>>>=7)}(o,0,r),function(h,p){var y=(7&h)<<4;p.buf[p.pos++]|=y|((h>>>=3)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h)))))}(l,r)}(i,this):(this.realloc(4),this.buf[this.pos++]=127&i|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=i>>>7&127))))},writeSVarint:function(i){this.writeVarint(i<0?2*-i-1:2*i)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(4*i.length),this.pos++;var e=this.pos;this.pos=function(o,l,h){for(var p,y,w=0;w55295&&p<57344){if(!y){p>56319||w+1===l.length?(o[h++]=239,o[h++]=191,o[h++]=189):y=p;continue}if(p<56320){o[h++]=239,o[h++]=191,o[h++]=189,y=p;continue}p=y-55296<<10|p-56320|65536,y=null}else y&&(o[h++]=239,o[h++]=191,o[h++]=189,y=null);p<128?o[h++]=p:(p<2048?o[h++]=p>>6|192:(p<65536?o[h++]=p>>12|224:(o[h++]=p>>18|240,o[h++]=p>>12&63|128),o[h++]=p>>6&63|128),o[h++]=63&p|128)}return h}(this.buf,i,this.pos);var r=this.pos-e;r>=128&&yd(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(i){this.realloc(4),md(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),md(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var e=i.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&yd(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o},writeMessage:function(i,e,r){this.writeTag(i,Di.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(i,e){e.length&&this.writeMessage(i,mm,e)},writePackedSVarint:function(i,e){e.length&&this.writeMessage(i,_m,e)},writePackedBoolean:function(i,e){e.length&&this.writeMessage(i,vm,e)},writePackedFloat:function(i,e){e.length&&this.writeMessage(i,gm,e)},writePackedDouble:function(i,e){e.length&&this.writeMessage(i,ym,e)},writePackedFixed32:function(i,e){e.length&&this.writeMessage(i,xm,e)},writePackedSFixed32:function(i,e){e.length&&this.writeMessage(i,bm,e)},writePackedFixed64:function(i,e){e.length&&this.writeMessage(i,wm,e)},writePackedSFixed64:function(i,e){e.length&&this.writeMessage(i,Sm,e)},writeBytesField:function(i,e){this.writeTag(i,Di.Bytes),this.writeBytes(e)},writeFixed32Field:function(i,e){this.writeTag(i,Di.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(i,e){this.writeTag(i,Di.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(i,e){this.writeTag(i,Di.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(i,e){this.writeTag(i,Di.Fixed64),this.writeSFixed64(e)},writeVarintField:function(i,e){this.writeTag(i,Di.Varint),this.writeVarint(e)},writeSVarintField:function(i,e){this.writeTag(i,Di.Varint),this.writeSVarint(e)},writeStringField:function(i,e){this.writeTag(i,Di.Bytes),this.writeString(e)},writeFloatField:function(i,e){this.writeTag(i,Di.Fixed32),this.writeFloat(e)},writeDoubleField:function(i,e){this.writeTag(i,Di.Fixed64),this.writeDouble(e)},writeBooleanField:function(i,e){this.writeVarintField(i,!!e)}};var ju=N(pd);const qu=3;function Tm(i,e,r){i===1&&r.readMessage(Im,e)}function Im(i,e,r){if(i===3){const{id:o,bitmap:l,width:h,height:p,left:y,top:w,advance:T}=r.readMessage(Em,{});e.push({id:o,bitmap:new ec({width:h+2*qu,height:p+2*qu},l),metrics:{width:h,height:p,left:y,top:w,advance:T}})}}function Em(i,e,r){i===1?e.id=r.readVarint():i===2?e.bitmap=r.readBytes():i===3?e.width=r.readVarint():i===4?e.height=r.readVarint():i===5?e.left=r.readSVarint():i===6?e.top=r.readSVarint():i===7&&(e.advance=r.readVarint())}const xd=qu;function bd(i){let e=0,r=0;for(const p of i)e+=p.w*p.h,r=Math.max(r,p.w);i.sort((p,y)=>y.h-p.h);const o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let l=0,h=0;for(const p of i)for(let y=o.length-1;y>=0;y--){const w=o[y];if(!(p.w>w.w||p.h>w.h)){if(p.x=w.x,p.y=w.y,h=Math.max(h,p.y+p.h),l=Math.max(l,p.x+p.w),p.w===w.w&&p.h===w.h){const T=o.pop();y=0&&o>=e&&$c[this.text.charCodeAt(o)];o--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)}substring(e,r){const o=new wl;return o.text=this.text.substring(e,r),o.sectionIndex=this.sectionIndex.slice(e,r),o.sections=this.sections,o}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}addTextSection(e,r){this.text+=e.text,this.sections.push(cc.forText(e.scale,e.fontStack||r));const o=this.sections.length-1;for(let l=0;l=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Qc(i,e,r,o,l,h,p,y,w,T,M,z,D,V,U,Z){const $=wl.fromFeature(i,l);let ie;z===s.ai.vertical&&$.verticalizePunctuation();const{processBidirectionalText:ue,processStyledBidirectionalText:re}=Hn;if(ue&&$.sections.length===1){ie=[];const Me=ue($.toString(),Gu($,T,h,e,o,V,U));for(const lt of Me){const pt=new wl;pt.text=lt,pt.sections=$.sections;for(let st=0;st0&&qs>Jn&&(Jn=qs)}else{const vo=pt[ni.fontStack],Qn=vo&&vo[hn];if(Qn&&Qn.rect)Qo=Qn.rect,No=Qn.metrics;else{const qs=lt[ni.fontStack],fc=qs&&qs[hn];if(!fc)continue;No=fc.metrics}Or=(Fr-ni.scale)*zr}Vo?(Me.verticalizable=!0,bn.push({glyph:hn,imageName:$o,x:$i,y:nr+Or,vertical:Vo,scale:ni.scale,fontStack:ni.fontStack,sectionIndex:wn,metrics:No,rect:Qo}),$i+=js*ni.scale+bt):(bn.push({glyph:hn,imageName:$o,x:$i,y:nr+Or,vertical:Vo,scale:ni.scale,fontStack:ni.fontStack,sectionIndex:wn,metrics:No,rect:Qo}),$i+=No.advance*ni.scale+bt)}bn.length!==0&&(Lr=Math.max($i-bt,Lr),Am(bn,0,bn.length-1,Fn,Jn)),$i=0;const Yn=Ze*Fr+Jn;Bn.lineOffset=Math.max(Jn,xn),nr+=Yn,lo=Math.max(Yn,lo),++Cr}var Jr;const un=nr-lc,{horizontalAlign:Rn,verticalAlign:On}=Wu(ht);(function(Dr,Fr,xn,Bn,bn,Jn,Yn,Rr,ni){const wn=(Fr-xn)*bn;let hn=0;hn=Jn!==Yn?-Rr*Bn-lc:(-Bn*ni+.5)*Yn;for(const Or of Dr)for(const No of Or.positionedGlyphs)No.x+=wn,No.y+=hn})(Me.positionedLines,Fn,Rn,On,Lr,lo,Ze,un,$e.length),Me.top+=-On*un,Me.bottom=Me.top+un,Me.left+=-Rn*Lr,Me.right=Me.left+Lr}(ge,e,r,o,ie,p,y,w,z,T,D,Z),!function(Me){for(const lt of Me)if(lt.positionedGlyphs.length!==0)return!1;return!0}(pe)&&ge}const $c={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Cm={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 Sd(i,e,r,o,l,h){if(e.imageName){const p=o[e.imageName];return p?p.displaySize[0]*e.scale*zr/h+l:0}{const p=r[e.fontStack],y=p&&p[i];return y?y.metrics.advance*e.scale+l:0}}function Td(i,e,r,o){const l=Math.pow(i-e,2);return o?i=0;let M=0;for(let D=0;Dp.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Cu([]),this.placementViewportMatrix=Cu([]);const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Md(this.zoom,r["text-size"]),this.iconSizeData=Md(this.zoom,r["icon-size"]);const o=this.layers[0].layout,l=o.get("symbol-sort-key"),h=o.get("symbol-z-order");this.canOverlap=Hu(o,"text-overlap","text-allow-overlap")!=="never"||Hu(o,"icon-overlap","icon-allow-overlap")!=="never"||o.get("text-ignore-placement")||o.get("icon-ignore-placement"),this.sortFeaturesByKey=h!=="viewport-y"&&!l.isConstant(),this.sortFeaturesByY=(h==="viewport-y"||h==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,o.get("symbol-placement")==="point"&&(this.writingModes=o.get("text-writing-mode").map(p=>s.ai[p])),this.stateDependentLayerIds=this.layers.filter(p=>p.isStateDependent()).map(p=>p.id),this.sourceID=e.sourceID}createArrays(){this.text=new Ku(new Yo(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new Ku(new Yo(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new ce,this.lineVertexArray=new ve,this.symbolInstances=new ee,this.textAnchorOffsets=new Ce}calculateGlyphDependencies(e,r,o,l,h){for(let p=0;p0)&&(p.value.kind!=="constant"||p.value.value.length>0),M=w.value.kind!=="constant"||!!w.value.value||Object.keys(w.parameters).length>0,z=h.get("symbol-sort-key");if(this.features=[],!T&&!M)return;const D=r.iconDependencies,V=r.glyphDependencies,U=r.availableImages,Z=new Yi(this.zoom);for(const{feature:$,id:ie,index:ue,sourceLayerIndex:re}of e){const pe=l._featureFilter.needGeometry,ge=Ya($,pe);if(!l._featureFilter.filter(Z,ge,o))continue;let Me,lt;if(pe||(ge.geometry=Ja($)),T){const st=l.getValueAndResolveTokens("text-field",ge,o,U),$e=ji.factory(st);Lm($e)&&(this.hasRTLText=!0),(!this.hasRTLText||Ul()==="unavailable"||this.hasRTLText&&Hn.isParsed())&&(Me=fm($e,l,ge))}if(M){const st=l.getValueAndResolveTokens("icon-image",ge,o,U);lt=st instanceof Ir?st:Ir.fromString(st)}if(!Me&&!lt)continue;const pt=this.sortFeaturesByKey?z.evaluate(ge,{},o):void 0;if(this.features.push({id:ie,text:Me,icon:lt,index:ue,sourceLayerIndex:re,geometry:ge.geometry,properties:$.properties,type:Pm[$.type],sortKey:pt}),lt&&(D[lt.name]=!0),Me){const st=p.evaluate(ge,{},o).join(","),$e=h.get("text-rotation-alignment")!=="viewport"&&h.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(s.ai.vertical)>=0;for(const Ze of Me.sections)if(Ze.image)D[Ze.image.name]=!0;else{const ht=wa(Me.toString()),Ke=Ze.fontStack||st,Re=V[Ke]=V[Ke]||{};this.calculateGlyphDependencies(Ze.text,Re,$e,this.allowVerticalPlacement,ht)}}}h.get("symbol-placement")==="line"&&(this.features=function($){const ie={},ue={},re=[];let pe=0;function ge(st){re.push($[st]),pe++}function Me(st,$e,Ze){const ht=ue[st];return delete ue[st],ue[$e]=ht,re[ht].geometry[0].pop(),re[ht].geometry[0]=re[ht].geometry[0].concat(Ze[0]),ht}function lt(st,$e,Ze){const ht=ie[$e];return delete ie[$e],ie[st]=ht,re[ht].geometry[0].shift(),re[ht].geometry[0]=Ze[0].concat(re[ht].geometry[0]),ht}function pt(st,$e,Ze){const ht=Ze?$e[0][$e[0].length-1]:$e[0][0];return`${st}:${ht.x}:${ht.y}`}for(let st=0;st<$.length;st++){const $e=$[st],Ze=$e.geometry,ht=$e.text?$e.text.toString():null;if(!ht){ge(st);continue}const Ke=pt(ht,Ze),Re=pt(ht,Ze,!0);if(Ke in ue&&Re in ie&&ue[Ke]!==ie[Re]){const bt=lt(Ke,Re,Ze),yt=Me(Ke,Re,re[bt].geometry);delete ie[Ke],delete ue[Re],ue[pt(ht,re[yt].geometry,!0)]=yt,re[bt].geometry=null}else Ke in ue?Me(Ke,Re,Ze):Re in ie?lt(Ke,Re,Ze):(ge(st),ie[Ke]=pe-1,ue[Re]=pe-1)}return re.filter(st=>st.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($,ie)=>$.sortKey-ie.sortKey)}update(e,r,o){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,o),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,o))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,r){const o=this.lineVertexArray.length;if(e.segment!==void 0){let l=e.dist(r[e.segment+1]),h=e.dist(r[e.segment]);const p={};for(let y=e.segment+1;y=0;y--)p[y]={x:r[y].x,y:r[y].y,tileUnitDistanceFromAnchor:h},y>0&&(h+=r[y-1].dist(r[y]));for(let y=0;y0}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(e,r){const o=e.placedSymbolArray.get(r),l=o.vertexStartIndex+4*o.numGlyphs;for(let h=o.vertexStartIndex;hl[y]-l[w]||h[w]-h[y]),p}addToSortKeyRanges(e,r){const o=this.sortKeyRanges[this.sortKeyRanges.length-1];o&&o.sortKey===r?o.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((l,h,p)=>{l>=0&&p.indexOf(l)===h&&this.addIndicesForPlacedSymbol(this.text,l)}),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Ad,kd;tt("SymbolBucket",Sl,{omit:["layers","collisionBoxArray","features","compareText"]}),Sl.MAX_GLYPHS=65535,Sl.addDynamicAttributes=Xu;var Yu={get paint(){return kd=kd||new xr({"icon-opacity":new Et(Se.paint_symbol["icon-opacity"]),"icon-color":new Et(Se.paint_symbol["icon-color"]),"icon-halo-color":new Et(Se.paint_symbol["icon-halo-color"]),"icon-halo-width":new Et(Se.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Et(Se.paint_symbol["icon-halo-blur"]),"icon-translate":new xt(Se.paint_symbol["icon-translate"]),"icon-translate-anchor":new xt(Se.paint_symbol["icon-translate-anchor"]),"text-opacity":new Et(Se.paint_symbol["text-opacity"]),"text-color":new Et(Se.paint_symbol["text-color"],{runtimeType:Vr,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new Et(Se.paint_symbol["text-halo-color"]),"text-halo-width":new Et(Se.paint_symbol["text-halo-width"]),"text-halo-blur":new Et(Se.paint_symbol["text-halo-blur"]),"text-translate":new xt(Se.paint_symbol["text-translate"]),"text-translate-anchor":new xt(Se.paint_symbol["text-translate-anchor"])})},get layout(){return Ad=Ad||new xr({"symbol-placement":new xt(Se.layout_symbol["symbol-placement"]),"symbol-spacing":new xt(Se.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xt(Se.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Et(Se.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xt(Se.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xt(Se.layout_symbol["icon-allow-overlap"]),"icon-overlap":new xt(Se.layout_symbol["icon-overlap"]),"icon-ignore-placement":new xt(Se.layout_symbol["icon-ignore-placement"]),"icon-optional":new xt(Se.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xt(Se.layout_symbol["icon-rotation-alignment"]),"icon-size":new Et(Se.layout_symbol["icon-size"]),"icon-text-fit":new xt(Se.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xt(Se.layout_symbol["icon-text-fit-padding"]),"icon-image":new Et(Se.layout_symbol["icon-image"]),"icon-rotate":new Et(Se.layout_symbol["icon-rotate"]),"icon-padding":new Et(Se.layout_symbol["icon-padding"]),"icon-keep-upright":new xt(Se.layout_symbol["icon-keep-upright"]),"icon-offset":new Et(Se.layout_symbol["icon-offset"]),"icon-anchor":new Et(Se.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xt(Se.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xt(Se.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xt(Se.layout_symbol["text-rotation-alignment"]),"text-field":new Et(Se.layout_symbol["text-field"]),"text-font":new Et(Se.layout_symbol["text-font"]),"text-size":new Et(Se.layout_symbol["text-size"]),"text-max-width":new Et(Se.layout_symbol["text-max-width"]),"text-line-height":new xt(Se.layout_symbol["text-line-height"]),"text-letter-spacing":new Et(Se.layout_symbol["text-letter-spacing"]),"text-justify":new Et(Se.layout_symbol["text-justify"]),"text-radial-offset":new Et(Se.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xt(Se.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Et(Se.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Et(Se.layout_symbol["text-anchor"]),"text-max-angle":new xt(Se.layout_symbol["text-max-angle"]),"text-writing-mode":new xt(Se.layout_symbol["text-writing-mode"]),"text-rotate":new Et(Se.layout_symbol["text-rotate"]),"text-padding":new xt(Se.layout_symbol["text-padding"]),"text-keep-upright":new xt(Se.layout_symbol["text-keep-upright"]),"text-transform":new Et(Se.layout_symbol["text-transform"]),"text-offset":new Et(Se.layout_symbol["text-offset"]),"text-allow-overlap":new xt(Se.layout_symbol["text-allow-overlap"]),"text-overlap":new xt(Se.layout_symbol["text-overlap"]),"text-ignore-placement":new xt(Se.layout_symbol["text-ignore-placement"]),"text-optional":new xt(Se.layout_symbol["text-optional"])})}};class Pd{constructor(e){if(e.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:tn,this.defaultValue=e}evaluate(e){if(e.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}tt("FormatSectionOverride",Pd,{omit:["defaultValue"]});class tu extends so{constructor(e){super(e,Yu)}recalculate(e,r){if(super.recalculate(e,r),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 o=this.layout.get("text-writing-mode");if(o){const l=[];for(const h of o)l.indexOf(h)<0&&l.push(h);this.layout._values["text-writing-mode"]=l}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,o,l){const h=this.layout.get(e).evaluate(r,{},o,l),p=this._unevaluatedLayout._values[e];return p.isDataDriven()||Zn(p.value)||!h?h:function(y,w){return w.replace(/{([^{}]+)}/g,(T,M)=>y&&M in y?String(y[M]):"")}(r.properties,h)}createBucket(e){return new Sl(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of Yu.paint.overridableProperties){if(!tu.hasPaintOverride(this.layout,e))continue;const r=this.paint.get(e),o=new Pd(r),l=new ls(o,r.property.specification);let h=null;h=r.value.kind==="constant"||r.value.kind==="source"?new cs("source",l):new ko("composite",l,r.value.zoomStops),this.paint._values[e]=new yn(r.property,h,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,o){return!(!this.layout||r.isDataDriven()||o.isDataDriven())&&tu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){const o=e.get("text-field"),l=Yu.paint.properties[r];let h=!1;const p=y=>{for(const w of y)if(l.overrides&&l.overrides.hasOverride(w))return void(h=!0)};if(o.value.kind==="constant"&&o.value.value instanceof ji)p(o.value.value.sections);else if(o.value.kind==="source"){const y=T=>{h||(T instanceof uo&&Gi(T.value)===X?p(T.value.sections):T instanceof Es?p(T.sections):T.eachChild(y))},w=o.value;w._styleExpression&&y(w._styleExpression.expression)}return h}}let zd;var Dm={get paint(){return zd=zd||new xr({"background-color":new xt(Se.paint_background["background-color"]),"background-pattern":new ql(Se.paint_background["background-pattern"]),"background-opacity":new xt(Se.paint_background["background-opacity"])})}};class Fm extends so{constructor(e){super(e,Dm)}}let Ld;var Rm={get paint(){return Ld=Ld||new xr({"raster-opacity":new xt(Se.paint_raster["raster-opacity"]),"raster-hue-rotate":new xt(Se.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xt(Se.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xt(Se.paint_raster["raster-brightness-max"]),"raster-saturation":new xt(Se.paint_raster["raster-saturation"]),"raster-contrast":new xt(Se.paint_raster["raster-contrast"]),"raster-resampling":new xt(Se.paint_raster["raster-resampling"]),"raster-fade-duration":new xt(Se.paint_raster["raster-fade-duration"])})}};class Om extends so{constructor(e){super(e,Rm)}}class Bm extends so{constructor(e){super(e,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}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 Nm{constructor(e){this._callback=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const Qu=63710088e-1;class ka{constructor(e,r){if(isNaN(e)||isNaN(r))throw new Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new ka(Ht(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const r=Math.PI/180,o=this.lat*r,l=e.lat*r,h=Math.sin(o)*Math.sin(l)+Math.cos(o)*Math.cos(l)*Math.cos((e.lng-this.lng)*r);return Qu*Math.acos(Math.min(h,1))}static convert(e){if(e instanceof ka)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new ka(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new ka(Number("lng"in e?e.lng:e.lon),Number(e.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 Dd=2*Math.PI*Qu;function Fd(i){return Dd*Math.cos(i*Math.PI/180)}function Rd(i){return(180+i)/360}function Od(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Bd(i,e){return i/Fd(e)}function Nd(i){return 360*i-180}function $u(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180))-90}class iu{constructor(e,r,o=0){this.x=+e,this.y=+r,this.z=+o}static fromLngLat(e,r=0){const o=ka.convert(e);return new iu(Rd(o.lng),Od(o.lat),Bd(r,o.lat))}toLngLat(){return new ka(Nd(this.x),$u(this.y))}toAltitude(){return this.z*Fd($u(this.y))}meterInMercatorCoordinateUnits(){return 1/Dd*(e=$u(this.y),1/Math.cos(e*Math.PI/180));var e}}function Vd(i,e,r){var o=2*Math.PI*6378137/256/Math.pow(2,r);return[i*o-2*Math.PI*6378137/2,e*o-2*Math.PI*6378137/2]}class eh{constructor(e,r,o){if(e<0||e>25||o<0||o>=Math.pow(2,e)||r<0||r>=Math.pow(2,e))throw new Error(`x=${r}, y=${o}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=r,this.y=o,this.key=hc(0,e,e,r,o)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,o){const l=(p=this.y,y=this.z,w=Vd(256*(h=this.x),256*(p=Math.pow(2,y)-p-1),y),T=Vd(256*(h+1),256*(p+1),y),w[0]+","+w[1]+","+T[0]+","+T[1]);var h,p,y,w,T;const M=function(z,D,V){let U,Z="";for(let $=z;$>0;$--)U=1<<$-1,Z+=(D&U?1:0)+(V&U?2:0);return Z}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(o==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,M).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){const r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){const r=Math.pow(2,this.z);return new ye((e.x*r-this.x)*Er,(e.y*r-this.y)*Er)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ud{constructor(e,r){this.wrap=e,this.canonical=r,this.key=hc(e,r.z,r.z,r.x,r.y)}}class yo{constructor(e,r,o,l,h){if(e= z; overscaledZ = ${e}; z = ${o}`);this.overscaledZ=e,this.wrap=r,this.canonical=new eh(o,+l,+h),this.key=hc(r,e,o,l,h)}clone(){return new yo(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-e;return e>this.canonical.z?new yo(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new yo(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(e,r){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const o=this.canonical.z-e;return e>this.canonical.z?hc(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):hc(this.wrap*+r,e,e,this.canonical.x>>o,this.canonical.y>>o)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const r=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new yo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,o=2*this.canonical.x,l=2*this.canonical.y;return[new yo(r,this.wrap,r,o,l),new yo(r,this.wrap,r,o+1,l),new yo(r,this.wrap,r,o,l+1),new yo(r,this.wrap,r,o+1,l+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=z),z=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(e+1)}unpack(e,r,o){return e*this.redFactor+r*this.greenFactor+o*this.blueFactor-this.baseShift}getPixels(){return new go({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,r,o){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let l=r*this.dim,h=r*this.dim+this.dim,p=o*this.dim,y=o*this.dim+this.dim;switch(r){case-1:l=h-1;break;case 1:h=l+1}switch(o){case-1:p=y-1;break;case 1:y=p+1}const w=-r*this.dim,T=-o*this.dim;for(let M=p;M=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Zd{constructor(e,r,o,l,h){this.type="Feature",this._vectorTileFeature=e,e._z=r,e._x=o,e._y=l,this.properties=e.properties,this.id=h}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(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(e[r]=this[r]);return e}}class Gd{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Lo(Er,16,0),this.grid3D=new Lo(Er,16,0),this.featureIndexArray=new Pe,this.promoteId=r}insert(e,r,o,l,h,p){const y=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(o,l,h);const w=p?this.grid3D:this.grid;for(let T=0;T=0&&z[3]>=0&&w.insert(y,z[0],z[1],z[2],z[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ca.VectorTile(new ju(this.rawTileData)).layers,this.sourceLayerCoder=new qd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,r,o,l){this.loadVTLayers();const h=e.params||{},p=Er/e.tileSize/e.scale,y=_a(h.filter),w=e.queryGeometry,T=e.queryPadding*p,M=Hd(w),z=this.grid.query(M.minX-T,M.minY-T,M.maxX+T,M.maxY+T),D=Hd(e.cameraQueryGeometry),V=this.grid3D.query(D.minX-T,D.minY-T,D.maxX+T,D.maxY+T,($,ie,ue,re)=>function(pe,ge,Me,lt,pt){for(const $e of pe)if(ge<=$e.x&&Me<=$e.y&<>=$e.x&&pt>=$e.y)return!0;const st=[new ye(ge,Me),new ye(ge,pt),new ye(lt,pt),new ye(lt,Me)];if(pe.length>2){for(const $e of st)if(_l(pe,$e))return!0}for(let $e=0;$e(re||(re=Ja(pe)),ge.queryIntersectsFeature(w,pe,Me,re,this.z,e.transform,p,e.pixelPosMatrix)))}return U}loadMatchingFeature(e,r,o,l,h,p,y,w,T,M,z){const D=this.bucketLayerIDs[r];if(p&&!function($,ie){for(let ue=0;ue<$.length;ue++)if(ie.indexOf($[ue])>=0)return!0;return!1}(p,D))return;const V=this.sourceLayerCoder.decode(o),U=this.vtLayers[V].feature(l);if(h.needGeometry){const $=Ya(U,!0);if(!h.filter(new Yi(this.tileID.overscaledZ),$,this.tileID.canonical))return}else if(!h.filter(new Yi(this.tileID.overscaledZ),U))return;const Z=this.getId(U,V);for(let $=0;${const y=e instanceof fl?e.get(p):null;return y&&y.evaluate?y.evaluate(r,o,l):y})}function Hd(i){let e=1/0,r=1/0,o=-1/0,l=-1/0;for(const h of i)e=Math.min(e,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),l=Math.max(l,h.y);return{minX:e,minY:r,maxX:o,maxY:l}}function Vm(i,e){return e-i}function Xd(i,e,r,o,l){const h=[];for(let p=0;p=o&&z.x>=o||(M.x>=o?M=new ye(o,M.y+(o-M.x)/(z.x-M.x)*(z.y-M.y))._round():z.x>=o&&(z=new ye(o,M.y+(o-M.x)/(z.x-M.x)*(z.y-M.y))._round()),M.y>=l&&z.y>=l||(M.y>=l?M=new ye(M.x+(l-M.y)/(z.y-M.y)*(z.x-M.x),l)._round():z.y>=l&&(z=new ye(M.x+(l-M.y)/(z.y-M.y)*(z.x-M.x),l)._round()),w&&M.equals(w[w.length-1])||(w=[M],h.push(w)),w.push(z)))))}}return h}tt("FeatureIndex",Gd,{omit:["rawTileData","sourceLayerCoder"]});class Pa extends ye{constructor(e,r,o,l){super(e,r),this.angle=o,l!==void 0&&(this.segment=l)}clone(){return new Pa(this.x,this.y,this.angle,this.segment)}}function Kd(i,e,r,o,l){if(e.segment===void 0||r===0)return!0;let h=e,p=e.segment+1,y=0;for(;y>-r/2;){if(p--,p<0)return!1;y-=i[p].dist(h),h=i[p]}y+=i[p].dist(i[p+1]),p++;const w=[];let T=0;for(;yo;)T-=w.shift().angleDelta;if(T>l)return!1;p++,y+=M.dist(z)}return!0}function Jd(i){let e=0;for(let r=0;rT){const U=(T-w)/V,Z=Wr.number(z.x,D.x,U),$=Wr.number(z.y,D.y,U),ie=new Pa(Z,$,D.angleTo(z),M);return ie._round(),!p||Kd(i,ie,y,p,e)?ie:void 0}w+=V}}function jm(i,e,r,o,l,h,p,y,w){const T=Yd(o,h,p),M=Qd(o,l),z=M*p,D=i[0].x===0||i[0].x===w||i[0].y===0||i[0].y===w;return e-z=0&&pe=0&&ge=0&&D+T<=M){const Me=new Pa(pe,ge,ue,U);Me._round(),o&&!Kd(i,Me,h,o,l)||V.push(Me)}}z+=ie}return y||V.length||p||(V=$d(i,z/2,r,o,l,h,p,!0,w)),V}tt("Anchor",Pa);const Tl=Kn;function ep(i,e,r,o){const l=[],h=i.image,p=h.pixelRatio,y=h.paddedRect.w-2*Tl,w=h.paddedRect.h-2*Tl,T=i.right-i.left,M=i.bottom-i.top,z=h.stretchX||[[0,y]],D=h.stretchY||[[0,w]],V=(Ze,ht)=>Ze+ht[1]-ht[0],U=z.reduce(V,0),Z=D.reduce(V,0),$=y-U,ie=w-Z;let ue=0,re=U,pe=0,ge=Z,Me=0,lt=$,pt=0,st=ie;if(h.content&&o){const Ze=h.content;ue=ru(z,0,Ze[0]),pe=ru(D,0,Ze[1]),re=ru(z,Ze[0],Ze[2]),ge=ru(D,Ze[1],Ze[3]),Me=Ze[0]-ue,pt=Ze[1]-pe,lt=Ze[2]-Ze[0]-re,st=Ze[3]-Ze[1]-ge}const $e=(Ze,ht,Ke,Re)=>{const bt=nu(Ze.stretch-ue,re,T,i.left),yt=ou(Ze.fixed-Me,lt,Ze.stretch,U),Gt=nu(ht.stretch-pe,ge,M,i.top),$i=ou(ht.fixed-pt,st,ht.stretch,Z),nr=nu(Ke.stretch-ue,re,T,i.left),Lr=ou(Ke.fixed-Me,lt,Ke.stretch,U),lo=nu(Re.stretch-pe,ge,M,i.top),Fn=ou(Re.fixed-pt,st,Re.stretch,Z),Cr=new ye(bt,Gt),Jr=new ye(nr,Gt),un=new ye(nr,lo),Rn=new ye(bt,lo),On=new ye(yt/p,$i/p),Dr=new ye(Lr/p,Fn/p),Fr=e*Math.PI/180;if(Fr){const bn=Math.sin(Fr),Jn=Math.cos(Fr),Yn=[Jn,-bn,bn,Jn];Cr._matMult(Yn),Jr._matMult(Yn),Rn._matMult(Yn),un._matMult(Yn)}const xn=Ze.stretch+Ze.fixed,Bn=ht.stretch+ht.fixed;return{tl:Cr,tr:Jr,bl:Rn,br:un,tex:{x:h.paddedRect.x+Tl+xn,y:h.paddedRect.y+Tl+Bn,w:Ke.stretch+Ke.fixed-xn,h:Re.stretch+Re.fixed-Bn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:On,pixelOffsetBR:Dr,minFontScaleX:lt/p/T,minFontScaleY:st/p/M,isSDF:r}};if(o&&(h.stretchX||h.stretchY)){const Ze=tp(z,$,U),ht=tp(D,ie,Z);for(let Ke=0;Ke0&&(U=Math.max(10,U),this.circleDiameter=U)}else{let z=p.top*y-w[0],D=p.bottom*y+w[2],V=p.left*y-w[3],U=p.right*y+w[1];const Z=p.collisionPadding;if(Z&&(V-=Z[0]*y,z-=Z[1]*y,U+=Z[2]*y,D+=Z[3]*y),M){const $=new ye(V,z),ie=new ye(U,z),ue=new ye(V,D),re=new ye(U,D),pe=M*Math.PI/180;$._rotate(pe),ie._rotate(pe),ue._rotate(pe),re._rotate(pe),V=Math.min($.x,ie.x,ue.x,re.x),U=Math.max($.x,ie.x,ue.x,re.x),z=Math.min($.y,ie.y,ue.y,re.y),D=Math.max($.y,ie.y,ue.y,re.y)}e.emplaceBack(r.x,r.y,V,z,U,D,o,l,h)}this.boxEndIndex=e.length}}class qm{constructor(e=[],r=Zm){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:r,compare:o}=this,l=r[e];for(;e>0;){const h=e-1>>1,p=r[h];if(o(l,p)>=0)break;r[e]=p,e=h}r[e]=l}_down(e){const{data:r,compare:o}=this,l=this.length>>1,h=r[e];for(;e=0)break;r[e]=y,e=p}r[e]=h}}function Zm(i,e){return ie?1:0}function Gm(i,e=1,r=!1){let o=1/0,l=1/0,h=-1/0,p=-1/0;const y=i[0];for(let V=0;Vh)&&(h=U.x),(!V||U.y>p)&&(p=U.y)}const w=Math.min(h-o,p-l);let T=w/2;const M=new qm([],Wm);if(w===0)return new ye(o,l);for(let V=o;Vz.d||!z.d)&&(z=V,r&&console.log("found best %d after %d probes",Math.round(1e4*V.d)/1e4,D)),V.max-z.d<=e||(T=V.h/2,M.push(new Il(V.p.x-T,V.p.y-T,T,i)),M.push(new Il(V.p.x+T,V.p.y-T,T,i)),M.push(new Il(V.p.x-T,V.p.y+T,T,i)),M.push(new Il(V.p.x+T,V.p.y+T,T,i)),D+=4)}return r&&(console.log(`num probes: ${D}`),console.log(`best distance: ${z.d}`)),z.p}function Wm(i,e){return e.max-i.max}function Il(i,e,r,o){this.p=new ye(i,e),this.h=r,this.d=function(l,h){let p=!1,y=1/0;for(let w=0;wl.y!=U.y>l.y&&l.x<(U.x-V.x)*(l.y-V.y)/(U.y-V.y)+V.x&&(p=!p),y=Math.min(y,Oh(l,V,U))}}return(p?1:-1)*Math.sqrt(y)}(this.p,o),this.max=this.d+this.h*Math.SQRT2}var cn;s.aq=void 0,(cn=s.aq||(s.aq={}))[cn.center=1]="center",cn[cn.left=2]="left",cn[cn.right=3]="right",cn[cn.top=4]="top",cn[cn.bottom=5]="bottom",cn[cn["top-left"]=6]="top-left",cn[cn["top-right"]=7]="top-right",cn[cn["bottom-left"]=8]="bottom-left",cn[cn["bottom-right"]=9]="bottom-right";const za=7,th=Number.POSITIVE_INFINITY;function ip(i,e){return e[1]!==th?function(r,o,l){let h=0,p=0;switch(o=Math.abs(o),l=Math.abs(l),r){case"top-right":case"top-left":case"top":p=l-za;break;case"bottom-right":case"bottom-left":case"bottom":p=-l+za}switch(r){case"top-right":case"bottom-right":case"right":h=-o;break;case"top-left":case"bottom-left":case"left":h=o}return[h,p]}(i,e[0],e[1]):function(r,o){let l=0,h=0;o<0&&(o=0);const p=o/Math.SQRT2;switch(r){case"top-right":case"top-left":h=p-za;break;case"bottom-right":case"bottom-left":h=-p+za;break;case"bottom":h=-o+za;break;case"top":h=o-za}switch(r){case"top-right":case"bottom-right":l=-p;break;case"top-left":case"bottom-left":l=p;break;case"left":l=o;break;case"right":l=-o}return[l,h]}(i,e[0])}function rp(i,e,r){var o;const l=i.layout,h=(o=l.get("text-variable-anchor-offset"))===null||o===void 0?void 0:o.evaluate(e,{},r);if(h){const y=h.values,w=[];for(let T=0;TD*zr);M.startsWith("top")?z[1]-=za:M.startsWith("bottom")&&(z[1]+=za),w[T+1]=z}return new Tr(w)}const p=l.get("text-variable-anchor");if(p){let y;y=i._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[l.get("text-radial-offset").evaluate(e,{},r)*zr,th]:l.get("text-offset").evaluate(e,{},r).map(T=>T*zr);const w=[];for(const T of p)w.push(T,ip(T,y));return new Tr(w)}return null}function ih(i){switch(i){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Hm(i,e,r,o,l,h,p,y,w,T,M){let z=h.textMaxSize.evaluate(e,{});z===void 0&&(z=p);const D=i.layers[0].layout,V=D.get("icon-offset").evaluate(e,{},M),U=op(r.horizontal),Z=p/24,$=i.tilePixelRatio*Z,ie=i.tilePixelRatio*z/24,ue=i.tilePixelRatio*y,re=i.tilePixelRatio*D.get("symbol-spacing"),pe=D.get("text-padding")*i.tilePixelRatio,ge=function(Re,bt,yt,Gt=1){const $i=Re.get("icon-padding").evaluate(bt,{},yt),nr=$i&&$i.values;return[nr[0]*Gt,nr[1]*Gt,nr[2]*Gt,nr[3]*Gt]}(D,e,M,i.tilePixelRatio),Me=D.get("text-max-angle")/180*Math.PI,lt=D.get("text-rotation-alignment")!=="viewport"&&D.get("symbol-placement")!=="point",pt=D.get("icon-rotation-alignment")==="map"&&D.get("symbol-placement")!=="point",st=D.get("symbol-placement"),$e=re/2,Ze=D.get("icon-text-fit");let ht;o&&Ze!=="none"&&(i.allowVerticalPlacement&&r.vertical&&(ht=Cd(o,r.vertical,Ze,D.get("icon-text-fit-padding"),V,Z)),U&&(o=Cd(o,U,Ze,D.get("icon-text-fit-padding"),V,Z)));const Ke=(Re,bt)=>{bt.x<0||bt.x>=Er||bt.y<0||bt.y>=Er||function(yt,Gt,$i,nr,Lr,lo,Fn,Cr,Jr,un,Rn,On,Dr,Fr,xn,Bn,bn,Jn,Yn,Rr,ni,wn,hn,Or,No){const Qo=yt.addToLineVertexArray(Gt,$i);let $o,js,Vo,vo,Qn=0,qs=0,fc=0,cp=0,uh=-1,hh=-1;const Zs={};let up=Bs("");if(yt.allowVerticalPlacement&&nr.vertical){const Sn=Cr.layout.get("text-rotate").evaluate(ni,{},Or)+90;Vo=new su(Jr,Gt,un,Rn,On,nr.vertical,Dr,Fr,xn,Sn),Fn&&(vo=new su(Jr,Gt,un,Rn,On,Fn,bn,Jn,xn,Sn))}if(Lr){const Sn=Cr.layout.get("icon-rotate").evaluate(ni,{}),xo=Cr.layout.get("icon-text-fit")!=="none",$a=ep(Lr,Sn,hn,xo),ts=Fn?ep(Fn,Sn,hn,xo):void 0;js=new su(Jr,Gt,un,Rn,On,Lr,bn,Jn,!1,Sn),Qn=4*$a.length;const el=yt.iconSizeData;let ys=null;el.kind==="source"?(ys=[gs*Cr.layout.get("icon-size").evaluate(ni,{})],ys[0]>Aa&&Dt(`${yt.layerIds[0]}: Value for "icon-size" is >= ${uc}. Reduce your "icon-size".`)):el.kind==="composite"&&(ys=[gs*wn.compositeIconSizes[0].evaluate(ni,{},Or),gs*wn.compositeIconSizes[1].evaluate(ni,{},Or)],(ys[0]>Aa||ys[1]>Aa)&&Dt(`${yt.layerIds[0]}: Value for "icon-size" is >= ${uc}. Reduce your "icon-size".`)),yt.addSymbols(yt.icon,$a,ys,Rr,Yn,ni,s.ai.none,Gt,Qo.lineStartIndex,Qo.lineLength,-1,Or),uh=yt.icon.placedSymbolArray.length-1,ts&&(qs=4*ts.length,yt.addSymbols(yt.icon,ts,ys,Rr,Yn,ni,s.ai.vertical,Gt,Qo.lineStartIndex,Qo.lineLength,-1,Or),hh=yt.icon.placedSymbolArray.length-1)}const hp=Object.keys(nr.horizontal);for(const Sn of hp){const xo=nr.horizontal[Sn];if(!$o){up=Bs(xo.text);const ts=Cr.layout.get("text-rotate").evaluate(ni,{},Or);$o=new su(Jr,Gt,un,Rn,On,xo,Dr,Fr,xn,ts)}const $a=xo.positionedLines.length===1;if(fc+=np(yt,Gt,xo,lo,Cr,xn,ni,Bn,Qo,nr.vertical?s.ai.horizontal:s.ai.horizontalOnly,$a?hp:[Sn],Zs,uh,wn,Or),$a)break}nr.vertical&&(cp+=np(yt,Gt,nr.vertical,lo,Cr,xn,ni,Bn,Qo,s.ai.vertical,["vertical"],Zs,hh,wn,Or));const Jm=$o?$o.boxStartIndex:yt.collisionBoxArray.length,Ym=$o?$o.boxEndIndex:yt.collisionBoxArray.length,Qm=Vo?Vo.boxStartIndex:yt.collisionBoxArray.length,$m=Vo?Vo.boxEndIndex:yt.collisionBoxArray.length,e_=js?js.boxStartIndex:yt.collisionBoxArray.length,t_=js?js.boxEndIndex:yt.collisionBoxArray.length,i_=vo?vo.boxStartIndex:yt.collisionBoxArray.length,r_=vo?vo.boxEndIndex:yt.collisionBoxArray.length;let es=-1;const lu=(Sn,xo)=>Sn&&Sn.circleDiameter?Math.max(Sn.circleDiameter,xo):xo;es=lu($o,es),es=lu(Vo,es),es=lu(js,es),es=lu(vo,es);const dp=es>-1?1:0;dp&&(es*=No/zr),yt.glyphOffsetArray.length>=Sl.MAX_GLYPHS&&Dt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),ni.sortKey!==void 0&&yt.addToSortKeyRanges(yt.symbolInstances.length,ni.sortKey);const n_=rp(Cr,ni,Or),[o_,s_]=function(Sn,xo){const $a=Sn.length,ts=xo==null?void 0:xo.values;if((ts==null?void 0:ts.length)>0)for(let el=0;el=0?Zs.right:-1,Zs.center>=0?Zs.center:-1,Zs.left>=0?Zs.left:-1,Zs.vertical||-1,uh,hh,up,Jm,Ym,Qm,$m,e_,t_,i_,r_,un,fc,cp,Qn,qs,dp,0,Dr,es,o_,s_)}(i,bt,Re,r,o,l,ht,i.layers[0],i.collisionBoxArray,e.index,e.sourceLayerIndex,i.index,$,[pe,pe,pe,pe],lt,w,ue,ge,pt,V,e,h,T,M,p)};if(st==="line")for(const Re of Xd(e.geometry,0,0,Er,Er)){const bt=jm(Re,re,Me,r.vertical||U,o,24,ie,i.overscaling,Er);for(const yt of bt)U&&Xm(i,U.text,$e,yt)||Ke(Re,yt)}else if(st==="line-center"){for(const Re of e.geometry)if(Re.length>1){const bt=Um(Re,Me,r.vertical||U,o,24,ie);bt&&Ke(Re,bt)}}else if(e.type==="Polygon")for(const Re of Du(e.geometry,0)){const bt=Gm(Re,16);Ke(Re[0],new Pa(bt.x,bt.y,0))}else if(e.type==="LineString")for(const Re of e.geometry)Ke(Re,new Pa(Re[0].x,Re[0].y,0));else if(e.type==="Point")for(const Re of e.geometry)for(const bt of Re)Ke([bt],new Pa(bt.x,bt.y,0))}function np(i,e,r,o,l,h,p,y,w,T,M,z,D,V,U){const Z=function(ue,re,pe,ge,Me,lt,pt,st){const $e=ge.layout.get("text-rotate").evaluate(lt,{})*Math.PI/180,Ze=[];for(const ht of re.positionedLines)for(const Ke of ht.positionedGlyphs){if(!Ke.rect)continue;const Re=Ke.rect||{};let bt=xd+1,yt=!0,Gt=1,$i=0;const nr=(Me||st)&&Ke.vertical,Lr=Ke.metrics.advance*Ke.scale/2;if(st&&re.verticalizable&&($i=ht.lineOffset/2-(Ke.imageName?-(zr-Ke.metrics.width*Ke.scale)/2:(Ke.scale-1)*zr)),Ke.imageName){const Rr=pt[Ke.imageName];yt=Rr.sdf,Gt=Rr.pixelRatio,bt=Kn/Gt}const lo=Me?[Ke.x+Lr,Ke.y]:[0,0];let Fn=Me?[0,0]:[Ke.x+Lr+pe[0],Ke.y+pe[1]-$i],Cr=[0,0];nr&&(Cr=Fn,Fn=[0,0]);const Jr=Ke.metrics.isDoubleResolution?2:1,un=(Ke.metrics.left-bt)*Ke.scale-Lr+Fn[0],Rn=(-Ke.metrics.top-bt)*Ke.scale+Fn[1],On=un+Re.w/Jr*Ke.scale/Gt,Dr=Rn+Re.h/Jr*Ke.scale/Gt,Fr=new ye(un,Rn),xn=new ye(On,Rn),Bn=new ye(un,Dr),bn=new ye(On,Dr);if(nr){const Rr=new ye(-Lr,Lr-lc),ni=-Math.PI/2,wn=zr/2-Lr,hn=new ye(5-lc-wn,-(Ke.imageName?wn:0)),Or=new ye(...Cr);Fr._rotateAround(ni,Rr)._add(hn)._add(Or),xn._rotateAround(ni,Rr)._add(hn)._add(Or),Bn._rotateAround(ni,Rr)._add(hn)._add(Or),bn._rotateAround(ni,Rr)._add(hn)._add(Or)}if($e){const Rr=Math.sin($e),ni=Math.cos($e),wn=[ni,-Rr,Rr,ni];Fr._matMult(wn),xn._matMult(wn),Bn._matMult(wn),bn._matMult(wn)}const Jn=new ye(0,0),Yn=new ye(0,0);Ze.push({tl:Fr,tr:xn,bl:Bn,br:bn,tex:Re,writingMode:re.writingMode,glyphOffset:lo,sectionIndex:Ke.sectionIndex,isSDF:yt,pixelOffsetTL:Jn,pixelOffsetBR:Yn,minFontScaleX:0,minFontScaleY:0})}return Ze}(0,r,y,l,h,p,o,i.allowVerticalPlacement),$=i.textSizeData;let ie=null;$.kind==="source"?(ie=[gs*l.layout.get("text-size").evaluate(p,{})],ie[0]>Aa&&Dt(`${i.layerIds[0]}: Value for "text-size" is >= ${uc}. Reduce your "text-size".`)):$.kind==="composite"&&(ie=[gs*V.compositeTextSizes[0].evaluate(p,{},U),gs*V.compositeTextSizes[1].evaluate(p,{},U)],(ie[0]>Aa||ie[1]>Aa)&&Dt(`${i.layerIds[0]}: Value for "text-size" is >= ${uc}. Reduce your "text-size".`)),i.addSymbols(i.text,Z,ie,y,h,p,T,e,w.lineStartIndex,w.lineLength,D,U);for(const ue of M)z[ue]=i.text.placedSymbolArray.length-1;return 4*Z.length}function op(i){for(const e in i)return i[e];return null}function Xm(i,e,r,o){const l=i.compareText;if(e in l){const h=l[e];for(let p=h.length-1;p>=0;p--)if(o.dist(h[p])>4;if(l!==1)throw new Error(`Got v${l} data when expected v1.`);const h=sp[15&o];if(!h)throw new Error("Unrecognized array type.");const[p]=new Uint16Array(e,2,1),[y]=new Uint32Array(e,4,1);return new rh(y,p,h,e)}constructor(e,r=64,o=Float64Array,l){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=o,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const h=sp.indexOf(this.ArrayType),p=2*e*this.ArrayType.BYTES_PER_ELEMENT,y=e*this.IndexArrayType.BYTES_PER_ELEMENT,w=(8-y%8)%8;if(h<0)throw new Error(`Unexpected typed array class: ${o}.`);l&&l instanceof ArrayBuffer?(this.data=l,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+y+w,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+p+y+w),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+y+w,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+h]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=e,this.coords[this._pos++]=r,o}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return nh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,o,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:h,coords:p,nodeSize:y}=this,w=[0,h.length-1,0],T=[];for(;w.length;){const M=w.pop()||0,z=w.pop()||0,D=w.pop()||0;if(z-D<=y){for(let $=D;$<=z;$++){const ie=p[2*$],ue=p[2*$+1];ie>=e&&ie<=o&&ue>=r&&ue<=l&&T.push(h[$])}continue}const V=D+z>>1,U=p[2*V],Z=p[2*V+1];U>=e&&U<=o&&Z>=r&&Z<=l&&T.push(h[V]),(M===0?e<=U:r<=Z)&&(w.push(D),w.push(V-1),w.push(1-M)),(M===0?o>=U:l>=Z)&&(w.push(V+1),w.push(z),w.push(1-M))}return T}within(e,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:l,coords:h,nodeSize:p}=this,y=[0,l.length-1,0],w=[],T=o*o;for(;y.length;){const M=y.pop()||0,z=y.pop()||0,D=y.pop()||0;if(z-D<=p){for(let $=D;$<=z;$++)lp(h[2*$],h[2*$+1],e,r)<=T&&w.push(l[$]);continue}const V=D+z>>1,U=h[2*V],Z=h[2*V+1];lp(U,Z,e,r)<=T&&w.push(l[V]),(M===0?e-o<=U:r-o<=Z)&&(y.push(D),y.push(V-1),y.push(1-M)),(M===0?e+o>=U:r+o>=Z)&&(y.push(V+1),y.push(z),y.push(1-M))}return w}}function nh(i,e,r,o,l,h){if(l-o<=r)return;const p=o+l>>1;ap(i,e,p,o,l,h),nh(i,e,r,o,p-1,1-h),nh(i,e,r,p+1,l,1-h)}function ap(i,e,r,o,l,h){for(;l>o;){if(l-o>600){const T=l-o+1,M=r-o+1,z=Math.log(T),D=.5*Math.exp(2*z/3),V=.5*Math.sqrt(z*D*(T-D)/T)*(M-T/2<0?-1:1);ap(i,e,r,Math.max(o,Math.floor(r-M*D/T+V)),Math.min(l,Math.floor(r+(T-M)*D/T+V)),h)}const p=e[2*r+h];let y=o,w=l;for(dc(i,e,o,r),e[2*l+h]>p&&dc(i,e,o,l);yp;)w--}e[2*o+h]===p?dc(i,e,o,w):(w++,dc(i,e,w,l)),w<=r&&(o=w+1),r<=w&&(l=w-1)}}function dc(i,e,r,o){oh(i,r,o),oh(e,2*r,2*o),oh(e,2*r+1,2*o+1)}function oh(i,e,r){const o=i[e];i[e]=i[r],i[r]=o}function lp(i,e,r,o){const l=i-r,h=e-o;return l*l+h*h}var sh;s.bh=void 0,(sh=s.bh||(s.bh={})).create="create",sh.load="load",sh.fullLoad="fullLoad";let au=null,pc=[];const ah=1e3/60,lh="loadTime",ch="fullLoadTime",Km={mark(i){performance.mark(i)},frame(i){const e=i;au!=null&&pc.push(e-au),au=e},clearMetrics(){au=null,pc=[],performance.clearMeasures(lh),performance.clearMeasures(ch);for(const i in s.bh)performance.clearMarks(s.bh[i])},getPerformanceMetrics(){performance.measure(lh,s.bh.create,s.bh.load),performance.measure(ch,s.bh.create,s.bh.fullLoad);const i=performance.getEntriesByName(lh)[0].duration,e=performance.getEntriesByName(ch)[0].duration,r=pc.length,o=1/(pc.reduce((h,p)=>h+p,0)/r/1e3),l=pc.filter(h=>h>ah).reduce((h,p)=>h+(p-ah)/ah,0);return{loadTime:i,fullLoadTime:e,fps:o,percentDroppedFrames:l/(r+l)*100,totalFrames:r}}};s.$=function(i,e,r){var o,l,h,p,y,w,T,M,z,D,V,U,Z=r[0],$=r[1],ie=r[2];return e===i?(i[12]=e[0]*Z+e[4]*$+e[8]*ie+e[12],i[13]=e[1]*Z+e[5]*$+e[9]*ie+e[13],i[14]=e[2]*Z+e[6]*$+e[10]*ie+e[14],i[15]=e[3]*Z+e[7]*$+e[11]*ie+e[15]):(l=e[1],h=e[2],p=e[3],y=e[4],w=e[5],T=e[6],M=e[7],z=e[8],D=e[9],V=e[10],U=e[11],i[0]=o=e[0],i[1]=l,i[2]=h,i[3]=p,i[4]=y,i[5]=w,i[6]=T,i[7]=M,i[8]=z,i[9]=D,i[10]=V,i[11]=U,i[12]=o*Z+y*$+z*ie+e[12],i[13]=l*Z+w*$+D*ie+e[13],i[14]=h*Z+T*$+V*ie+e[14],i[15]=p*Z+M*$+U*ie+e[15]),i},s.A=gl,s.B=Wr,s.C=class{constructor(i,e,r){this.receive=o=>{const l=o.data,h=l.id;if(h&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type===""){delete this.tasks[h];const p=this.cancelCallbacks[h];delete this.cancelCallbacks[h],p&&p()}else di()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)},this.process=()=>{if(!this.taskQueue.length)return;const o=this.taskQueue.shift(),l=this.tasks[o];delete this.tasks[o],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(o,l)},this.target=i,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},this.invoker=new Nm(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=di()?i:window}send(i,e,r,o,l=!1){const h=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[h]=r);const p=[],y={id:h,type:i,hasCallback:!!r,targetMapId:o,mustQueue:l,sourceMapId:this.mapId,data:Pn(e,p)};return this.target.postMessage(y,{transfer:p}),{cancel:()=>{r&&delete this.callbacks[h],this.target.postMessage({id:h,type:"",targetMapId:o,sourceMapId:this.mapId})}}}processTask(i,e){if(e.type===""){const r=this.callbacks[i];delete this.callbacks[i],r&&(e.error?r(_o(e.error)):r(null,_o(e.data)))}else{let r=!1;const o=[],l=e.hasCallback?(y,w)=>{r=!0,delete this.cancelCallbacks[i];const T={id:i,type:"",sourceMapId:this.mapId,error:y?Pn(y):null,data:Pn(w,o)};this.target.postMessage(T,{transfer:o})}:y=>{r=!0};let h=null;const p=_o(e.data);if(this.parent[e.type])h=this.parent[e.type](e.sourceMapId,p,l);else if("getWorkerSource"in this.parent){const y=e.type.split(".");h=this.parent.getWorkerSource(e.sourceMapId,y[0],p.source)[y[1]](p,l)}else l(new Error(`Could not find function ${e.type}`));!r&&h&&h.cancel&&(this.cancelCallbacks[i]=h.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},s.D=xt,s.E=jo,s.F=function(i,e){const r={};for(let o=0;o{}}},s.Y=qe,s.Z=function(){var i=new gl(16);return gl!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i},s._=H,s.a=$r,s.a$=class extends R{},s.a0=function(i,e,r){var o=r[0],l=r[1],h=r[2];return i[0]=e[0]*o,i[1]=e[1]*o,i[2]=e[2]*o,i[3]=e[3]*o,i[4]=e[4]*l,i[5]=e[5]*l,i[6]=e[6]*l,i[7]=e[7]*l,i[8]=e[8]*h,i[9]=e[9]*h,i[10]=e[10]*h,i[11]=e[11]*h,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},s.a1=Uh,s.a2=function(){return Jt++},s.a3=K,s.a4=Sl,s.a5=function(){Hn.isLoading()||Hn.isLoaded()||Ul()!=="deferred"||Fc()},s.a6=_a,s.a7=Ya,s.a8=Yi,s.a9=Zd,s.aA=Ga,s.aB=function(i){i=i.slice();const e=Object.create(null);for(let r=0;r{o[p.source]?r.push({command:ti.removeLayer,args:[p.id]}):h.push(p)}),r=r.concat(l),function(p,y,w){y=y||[];const T=(p=p||[]).map(Cn),M=y.map(Cn),z=p.reduce($n,{}),D=y.reduce($n,{}),V=T.slice(),U=Object.create(null);let Z,$,ie,ue,re,pe,ge;for(Z=0,$=0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,o,l,h)=>{const p=l||h;return e[o]=!p||p.toLowerCase(),""}),e["max-age"]){const r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e},s.ab=function(i,e){const r=[];for(const o in i)o in e||r.push(o);return r},s.ac=function(i){if(Pi==null){const e=i.navigator?i.navigator.userAgent:null;Pi=!!i.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Pi},s.ad=ei,s.ae=function(i,e,r){var o=Math.sin(r),l=Math.cos(r),h=e[0],p=e[1],y=e[2],w=e[3],T=e[4],M=e[5],z=e[6],D=e[7];return e!==i&&(i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15]),i[0]=h*l+T*o,i[1]=p*l+M*o,i[2]=y*l+z*o,i[3]=w*l+D*o,i[4]=T*l-h*o,i[5]=M*l-p*o,i[6]=z*l-y*o,i[7]=D*l-w*o,i},s.af=function(i){var e=new gl(16);return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e},s.ag=Gc,s.ah=function(i,e){let r=0,o=0;if(i.kind==="constant")o=i.layoutSize;else if(i.kind!=="source"){const{interpolationType:l,minZoom:h,maxZoom:p}=i,y=l?ei(on.interpolationFactor(l,e,h,p),0,1):0;i.kind==="camera"?o=Wr.number(i.minSize,i.maxSize,y):r=y}return{uSizeT:r,uSize:o}},s.aj=function(i,{uSize:e,uSizeT:r},{lowerSize:o,upperSize:l}){return i.kind==="source"?o/gs:i.kind==="composite"?Wr.number(o/gs,l/gs,r):e},s.ak=Xu,s.al=function(i,e,r,o){const l=e.y-i.y,h=e.x-i.x,p=o.y-r.y,y=o.x-r.x,w=p*h-y*l;if(w===0)return null;const T=(y*(i.y-r.y)-p*(i.x-r.x))/w;return new ye(i.x+T*h,i.y+T*l)},s.am=Xd,s.an=Fh,s.ao=Cu,s.ap=zr,s.ar=Hu,s.as=function(i,e){var r=e[0],o=e[1],l=e[2],h=e[3],p=e[4],y=e[5],w=e[6],T=e[7],M=e[8],z=e[9],D=e[10],V=e[11],U=e[12],Z=e[13],$=e[14],ie=e[15],ue=r*y-o*p,re=r*w-l*p,pe=r*T-h*p,ge=o*w-l*y,Me=o*T-h*y,lt=l*T-h*w,pt=M*Z-z*U,st=M*$-D*U,$e=M*ie-V*U,Ze=z*$-D*Z,ht=z*ie-V*Z,Ke=D*ie-V*$,Re=ue*Ke-re*ht+pe*Ze+ge*$e-Me*st+lt*pt;return Re?(i[0]=(y*Ke-w*ht+T*Ze)*(Re=1/Re),i[1]=(l*ht-o*Ke-h*Ze)*Re,i[2]=(Z*lt-$*Me+ie*ge)*Re,i[3]=(D*Me-z*lt-V*ge)*Re,i[4]=(w*$e-p*Ke-T*st)*Re,i[5]=(r*Ke-l*$e+h*st)*Re,i[6]=($*pe-U*lt-ie*re)*Re,i[7]=(M*lt-D*pe+V*re)*Re,i[8]=(p*ht-y*$e+T*pt)*Re,i[9]=(o*$e-r*ht-h*pt)*Re,i[10]=(U*Me-Z*pe+ie*ue)*Re,i[11]=(z*pe-M*Me-V*ue)*Re,i[12]=(y*st-p*Ze-w*pt)*Re,i[13]=(r*Ze-o*st+l*pt)*Re,i[14]=(Z*re-U*ge-$*ue)*Re,i[15]=(M*ge-z*re+D*ue)*Re,i):null},s.at=ih,s.au=Wu,s.av=rh,s.aw=function(){const i={},e=Se.$version;for(const r in Se.$root){const o=Se.$root[r];if(o.required){let l=null;l=r==="version"?e:o.type==="array"?[]:{},l!=null&&(i[r]=l)}}return i},s.ax=ti,s.ay=Jo,s.az=Zt,s.b=function(i,e){const r=new Blob([new Uint8Array(i)],{type:"image/png"});createImageBitmap(r).then(o=>{e(null,o)}).catch(o=>{e(new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})},s.b0=Xr,s.b1=function(i,e){var r=i[0],o=i[1],l=i[2],h=i[3],p=i[4],y=i[5],w=i[6],T=i[7],M=i[8],z=i[9],D=i[10],V=i[11],U=i[12],Z=i[13],$=i[14],ie=i[15],ue=e[0],re=e[1],pe=e[2],ge=e[3],Me=e[4],lt=e[5],pt=e[6],st=e[7],$e=e[8],Ze=e[9],ht=e[10],Ke=e[11],Re=e[12],bt=e[13],yt=e[14],Gt=e[15];return Math.abs(r-ue)<=Dn*Math.max(1,Math.abs(r),Math.abs(ue))&&Math.abs(o-re)<=Dn*Math.max(1,Math.abs(o),Math.abs(re))&&Math.abs(l-pe)<=Dn*Math.max(1,Math.abs(l),Math.abs(pe))&&Math.abs(h-ge)<=Dn*Math.max(1,Math.abs(h),Math.abs(ge))&&Math.abs(p-Me)<=Dn*Math.max(1,Math.abs(p),Math.abs(Me))&&Math.abs(y-lt)<=Dn*Math.max(1,Math.abs(y),Math.abs(lt))&&Math.abs(w-pt)<=Dn*Math.max(1,Math.abs(w),Math.abs(pt))&&Math.abs(T-st)<=Dn*Math.max(1,Math.abs(T),Math.abs(st))&&Math.abs(M-$e)<=Dn*Math.max(1,Math.abs(M),Math.abs($e))&&Math.abs(z-Ze)<=Dn*Math.max(1,Math.abs(z),Math.abs(Ze))&&Math.abs(D-ht)<=Dn*Math.max(1,Math.abs(D),Math.abs(ht))&&Math.abs(V-Ke)<=Dn*Math.max(1,Math.abs(V),Math.abs(Ke))&&Math.abs(U-Re)<=Dn*Math.max(1,Math.abs(U),Math.abs(Re))&&Math.abs(Z-bt)<=Dn*Math.max(1,Math.abs(Z),Math.abs(bt))&&Math.abs($-yt)<=Dn*Math.max(1,Math.abs($),Math.abs(yt))&&Math.abs(ie-Gt)<=Dn*Math.max(1,Math.abs(ie),Math.abs(Gt))},s.b2=function(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},s.b3=function(i,e,r){return i[0]=e[0]*r[0],i[1]=e[1]*r[1],i[2]=e[2]*r[2],i[3]=e[3]*r[3],i},s.b4=function(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]*e[3]},s.b5=Ht,s.b6=Ud,s.b7=Bd,s.b8=function(i,e,r,o,l){var h,p=1/Math.tan(e/2);return i[0]=p/r,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=p,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=-1,i[12]=0,i[13]=0,i[15]=0,l!=null&&l!==1/0?(i[10]=(l+o)*(h=1/(o-l)),i[14]=2*l*o*h):(i[10]=-1,i[14]=-2*o),i},s.b9=function(i,e,r){var o=Math.sin(r),l=Math.cos(r),h=e[4],p=e[5],y=e[6],w=e[7],T=e[8],M=e[9],z=e[10],D=e[11];return e!==i&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15]),i[4]=h*l+T*o,i[5]=p*l+M*o,i[6]=y*l+z*o,i[7]=w*l+D*o,i[8]=T*l-h*o,i[9]=M*l-p*o,i[10]=z*l-y*o,i[11]=D*l-w*o,i},s.bA=_e,s.bB=pd,s.bC=fa,s.bD=Hn,s.ba=it,s.bb=Vt,s.bc=function(i,e){return i[0]=e[0],i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=e[1],i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=e[2],i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i},s.bd=class extends Ka{},s.be=Qu,s.bf=Nd,s.bg=Km,s.bi=He,s.bj=function(i,e,r=!1){if(zn===Rl||zn===Ol||zn===Bl)throw new Error("setRTLTextPlugin cannot be called multiple times.");ms=ze.resolveURL(i),zn=Rl,Nl=e,Vl(),r||Fc()},s.bk=Ul,s.bl=function(i,e){const r={};for(let l=0;lRe*zr)}let st=p?"center":r.get("text-justify").evaluate(T,{},i.canonical);const $e=r.get("symbol-placement"),Ze=$e==="point"?r.get("text-max-width").evaluate(T,{},i.canonical)*zr:0,ht=()=>{i.bucket.allowVerticalPlacement&&wa(pe)&&(U.vertical=Qc(Z,i.glyphMap,i.glyphPositions,i.imagePositions,M,Ze,h,lt,"left",Me,ie,s.ai.vertical,!0,$e,D,z))};if(!p&&pt){const Ke=new Set;if(st==="auto")for(let bt=0;bt{e(null,r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>{r.src=Nr})},r.onerror=()=>e(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 o=new Blob([new Uint8Array(i)],{type:"image/png"});r.src=i.byteLength?URL.createObjectURL(o):Nr},s.e=Nt,s.f=function(i,e){return _r(Nt(i,{type:"json"}),e)},s.g=ct,s.h=ze,s.i=di,s.j=wo,s.k=co,s.l=Ue,s.m=_r,s.n=function(i){return new ju(i).readFields(Tm,[])},s.o=function(i,e,r){if(!i.length)return r(null,[]);let o=i.length;const l=new Array(i.length);let h=null;i.forEach((p,y)=>{e(p,(w,T)=>{w&&(h=w),l[y]=T,--o==0&&r(h,l)})})},s.p=bd,s.q=ec,s.r=xr,s.s=Bi,s.t=Li,s.u=Xe,s.v=Se,s.w=Dt,s.x=Gn,s.y=mo,s.z=function([i,e,r]){return e+=90,e*=Math.PI/180,r*=Math.PI/180,{x:i*Math.cos(e)*Math.sin(r),y:i*Math.sin(e)*Math.sin(r),z:i*Math.cos(r)}}}),k(["./shared"],function(s){class H{constructor(L){this.keyCache={},L&&this.replace(L)}replace(L){this._layerConfigs={},this._layers={},this.update(L,[])}update(L,F){for(const J of L){this._layerConfigs[J.id]=J;const Q=this._layers[J.id]=s.aC(J);Q._featureFilter=s.a6(Q.filter),this.keyCache[J.id]&&delete this.keyCache[J.id]}for(const J of F)delete this.keyCache[J],delete this._layerConfigs[J],delete this._layers[J];this.familiesBySource={};const j=s.bl(Object.values(this._layerConfigs),this.keyCache);for(const J of j){const Q=J.map(Ie=>this._layers[Ie.id]),he=Q[0];if(he.visibility==="none")continue;const oe=he.source||"";let te=this.familiesBySource[oe];te||(te=this.familiesBySource[oe]={});const ae=he.sourceLayer||"_geojsonTileLayer";let Te=te[ae];Te||(Te=te[ae]=[]),Te.push(Q)}}}class N{constructor(L){const F={},j=[];for(const oe in L){const te=L[oe],ae=F[oe]={};for(const Te in te){const Ie=te[+Te];if(!Ie||Ie.bitmap.width===0||Ie.bitmap.height===0)continue;const Ee={x:0,y:0,w:Ie.bitmap.width+2,h:Ie.bitmap.height+2};j.push(Ee),ae[Te]={rect:Ee,metrics:Ie.metrics}}}const{w:J,h:Q}=s.p(j),he=new s.q({width:J||1,height:Q||1});for(const oe in L){const te=L[oe];for(const ae in te){const Te=te[+ae];if(!Te||Te.bitmap.width===0||Te.bitmap.height===0)continue;const Ie=F[oe][ae].rect;s.q.copy(Te.bitmap,he,{x:0,y:0},{x:Ie.x+1,y:Ie.y+1},Te.bitmap)}}this.image=he,this.positions=F}}s.bm("GlyphAtlas",N);class _e{constructor(L){this.tileID=new s.O(L.tileID.overscaledZ,L.tileID.wrap,L.tileID.canonical.z,L.tileID.canonical.x,L.tileID.canonical.y),this.uid=L.uid,this.zoom=L.zoom,this.pixelRatio=L.pixelRatio,this.tileSize=L.tileSize,this.source=L.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=L.showCollisionBoxes,this.collectResourceTiming=!!L.collectResourceTiming,this.returnDependencies=!!L.returnDependencies,this.promoteId=L.promoteId,this.inFlightDependencies=[],this.dependencySentinel=-1}parse(L,F,j,J,Q){this.status="parsing",this.data=L,this.collisionBoxArray=new s.a3;const he=new s.bn(Object.keys(L.layers).sort()),oe=new s.bo(this.tileID,this.promoteId);oe.bucketLayerIDs=[];const te={},ae={featureIndex:oe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:j},Te=F.familiesBySource[this.source];for(const si in Te){const ii=L.layers[si];if(!ii)continue;ii.version===1&&s.w(`Vector tile source "${this.source}" layer "${si}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Ur=he.encode(si),Ei=[];for(let ur=0;ur=yr.maxzoom||yr.visibility!=="none"&&(be(ur,this.zoom,j),(te[yr.id]=yr.createBucket({index:oe.bucketLayerIDs.length,layers:ur,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ur,sourceID:this.source})).populate(Ei,ae,this.tileID.canonical),oe.bucketLayerIDs.push(ur.map(An=>An.id)))}}let Ie,Ee,mt,kt;const ut=s.aH(ae.glyphDependencies,si=>Object.keys(si).map(Number));this.inFlightDependencies.forEach(si=>si==null?void 0:si.cancel()),this.inFlightDependencies=[];const vt=++this.dependencySentinel;Object.keys(ut).length?this.inFlightDependencies.push(J.send("getGlyphs",{uid:this.uid,stacks:ut,source:this.source,tileID:this.tileID,type:"glyphs"},(si,ii)=>{vt===this.dependencySentinel&&(Ie||(Ie=si,Ee=ii,Ut.call(this)))})):Ee={};const Ft=Object.keys(ae.iconDependencies);Ft.length?this.inFlightDependencies.push(J.send("getImages",{icons:Ft,source:this.source,tileID:this.tileID,type:"icons"},(si,ii)=>{vt===this.dependencySentinel&&(Ie||(Ie=si,mt=ii,Ut.call(this)))})):mt={};const mi=Object.keys(ae.patternDependencies);function Ut(){if(Ie)return Q(Ie);if(Ee&&mt&&kt){const si=new N(Ee),ii=new s.bp(mt,kt);for(const Ur in te){const Ei=te[Ur];Ei instanceof s.a4?(be(Ei.layers,this.zoom,j),s.bq({bucket:Ei,glyphMap:Ee,glyphPositions:si.positions,imageMap:mt,imagePositions:ii.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ei.hasPattern&&(Ei instanceof s.br||Ei instanceof s.bs||Ei instanceof s.bt)&&(be(Ei.layers,this.zoom,j),Ei.addFeatures(ae,this.tileID.canonical,ii.patternPositions))}this.status="done",Q(null,{buckets:Object.values(te).filter(Ur=>!Ur.isEmpty()),featureIndex:oe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:si.image,imageAtlas:ii,glyphMap:this.returnDependencies?Ee:null,iconMap:this.returnDependencies?mt:null,glyphPositions:this.returnDependencies?si.positions:null})}}mi.length?this.inFlightDependencies.push(J.send("getImages",{icons:mi,source:this.source,tileID:this.tileID,type:"patterns"},(si,ii)=>{vt===this.dependencySentinel&&(Ie||(Ie=si,kt=ii,Ut.call(this)))})):kt={},Ut.call(this)}}function be(X,L,F){const j=new s.a8(L);for(const J of X)J.recalculate(j,F)}function ye(X,L){const F=s.l(X.request,(j,J,Q,he)=>{if(j)L(j);else if(J)try{const oe=new s.bw.VectorTile(new s.bv(J));L(null,{vectorTile:oe,rawData:J,cacheControl:Q,expires:he})}catch(oe){const te=new Uint8Array(J);let ae=`Unable to parse the tile at ${X.request.url}, `;ae+=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: ${oe.messge}`,L(new Error(ae))}});return()=>{F.cancel(),L()}}class Oe{constructor(L,F,j,J){this.actor=L,this.layerIndex=F,this.availableImages=j,this.loadVectorData=J||ye,this.fetching={},this.loading={},this.loaded={}}loadTile(L,F){const j=L.uid;this.loading||(this.loading={});const J=!!(L&&L.request&&L.request.collectResourceTiming)&&new s.bu(L.request),Q=this.loading[j]=new _e(L);Q.abort=this.loadVectorData(L,(he,oe)=>{if(delete this.loading[j],he||!oe)return Q.status="done",this.loaded[j]=Q,F(he);const te=oe.rawData,ae={};oe.expires&&(ae.expires=oe.expires),oe.cacheControl&&(ae.cacheControl=oe.cacheControl);const Te={};if(J){const Ie=J.finish();Ie&&(Te.resourceTiming=JSON.parse(JSON.stringify(Ie)))}Q.vectorTile=oe.vectorTile,Q.parse(oe.vectorTile,this.layerIndex,this.availableImages,this.actor,(Ie,Ee)=>{if(delete this.fetching[j],Ie||!Ee)return F(Ie);F(null,s.e({rawTileData:te.slice(0)},Ee,ae,Te))}),this.loaded=this.loaded||{},this.loaded[j]=Q,this.fetching[j]={rawTileData:te,cacheControl:ae,resourceTiming:Te}})}reloadTile(L,F){const j=this.loaded,J=L.uid;if(j&&j[J]){const Q=j[J];Q.showCollisionBoxes=L.showCollisionBoxes,Q.status==="parsing"?Q.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor,(he,oe)=>{if(he||!oe)return F(he,oe);let te;if(this.fetching[J]){const{rawTileData:ae,cacheControl:Te,resourceTiming:Ie}=this.fetching[J];delete this.fetching[J],te=s.e({rawTileData:ae.slice(0)},oe,Te,Ie)}else te=oe;F(null,te)}):Q.status==="done"&&(Q.vectorTile?Q.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor,F):F())}}abortTile(L,F){const j=this.loading,J=L.uid;j&&j[J]&&j[J].abort&&(j[J].abort(),delete j[J]),F()}removeTile(L,F){const j=this.loaded,J=L.uid;j&&j[J]&&delete j[J],F()}}class Le{constructor(){this.loaded={}}loadTile(L,F){return s._(this,void 0,void 0,function*(){const{uid:j,encoding:J,rawImageData:Q,redFactor:he,greenFactor:oe,blueFactor:te,baseShift:ae}=L,Te=Q.width+2,Ie=Q.height+2,Ee=s.a(Q)?new s.R({width:Te,height:Ie},yield s.bx(Q,-1,-1,Te,Ie)):Q,mt=new s.by(j,Ee,J,he,oe,te,ae);this.loaded=this.loaded||{},this.loaded[j]=mt,F(null,mt)})}removeTile(L){const F=this.loaded,j=L.uid;F&&F[j]&&delete F[j]}}function Be(X,L){if(X.length!==0){Ne(X[0],L);for(var F=1;F=Math.abs(oe)?F-te+oe:oe-te+F,F=te}F+j>=0!=!!L&&X.reverse()}var et=s.bz(function X(L,F){var j,J=L&&L.type;if(J==="FeatureCollection")for(j=0;j>31}function di(X,L){for(var F=X.loadGeometry(),j=X.type,J=0,Q=0,he=F.length,oe=0;oeX},zi=Math.fround||(Ti=new Float32Array(1),X=>(Ti[0]=+X,Ti[0]));var Ti;const Tt=3,pi=5,Oi=6;class ze{constructor(L){this.options=Object.assign(Object.create(Nr),L),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(L){const{log:F,minZoom:j,maxZoom:J}=this.options;F&&console.time("total time");const Q=`prepare ${L.length} points`;F&&console.time(Q),this.points=L;const he=[];for(let te=0;te=j;te--){const ae=+Date.now();oe=this.trees[te]=this._createTree(this._cluster(oe,te)),F&&console.log("z%d: %d clusters in %dms",te,oe.numItems,+Date.now()-ae)}return F&&console.timeEnd("total time"),this}getClusters(L,F){let j=((L[0]+180)%360+360)%360-180;const J=Math.max(-90,Math.min(90,L[1]));let Q=L[2]===180?180:((L[2]+180)%360+360)%360-180;const he=Math.max(-90,Math.min(90,L[3]));if(L[2]-L[0]>=360)j=-180,Q=180;else if(j>Q){const Ie=this.getClusters([j,J,180,he],F),Ee=this.getClusters([-180,J,Q,he],F);return Ie.concat(Ee)}const oe=this.trees[this._limitZoom(F)],te=oe.range(Zt(j),ct(he),Zt(Q),ct(J)),ae=oe.data,Te=[];for(const Ie of te){const Ee=this.stride*Ie;Te.push(ae[Ee+pi]>1?Pt(ae,Ee,this.clusterProps):this.points[ae[Ee+Tt]])}return Te}getChildren(L){const F=this._getOriginId(L),j=this._getOriginZoom(L),J="No cluster with the specified id.",Q=this.trees[j];if(!Q)throw new Error(J);const he=Q.data;if(F*this.stride>=he.length)throw new Error(J);const oe=this.options.radius/(this.options.extent*Math.pow(2,j-1)),te=Q.within(he[F*this.stride],he[F*this.stride+1],oe),ae=[];for(const Te of te){const Ie=Te*this.stride;he[Ie+4]===L&&ae.push(he[Ie+pi]>1?Pt(he,Ie,this.clusterProps):this.points[he[Ie+Tt]])}if(ae.length===0)throw new Error(J);return ae}getLeaves(L,F,j){const J=[];return this._appendLeaves(J,L,F=F||10,j=j||0,0),J}getTile(L,F,j){const J=this.trees[this._limitZoom(L)],Q=Math.pow(2,L),{extent:he,radius:oe}=this.options,te=oe/he,ae=(j-te)/Q,Te=(j+1+te)/Q,Ie={features:[]};return this._addTileFeatures(J.range((F-te)/Q,ae,(F+1+te)/Q,Te),J.data,F,j,Q,Ie),F===0&&this._addTileFeatures(J.range(1-te/Q,ae,1,Te),J.data,Q,j,Q,Ie),F===Q-1&&this._addTileFeatures(J.range(0,ae,te/Q,Te),J.data,-1,j,Q,Ie),Ie.features.length?Ie:null}getClusterExpansionZoom(L){let F=this._getOriginZoom(L)-1;for(;F<=this.options.maxZoom;){const j=this.getChildren(L);if(F++,j.length!==1)break;L=j[0].properties.cluster_id}return F}_appendLeaves(L,F,j,J,Q){const he=this.getChildren(F);for(const oe of he){const te=oe.properties;if(te&&te.cluster?Q+te.point_count<=J?Q+=te.point_count:Q=this._appendLeaves(L,te.cluster_id,j,J,Q):Q1;let Te,Ie,Ee;if(ae)Te=He(F,te,this.clusterProps),Ie=F[te],Ee=F[te+1];else{const ut=this.points[F[te+Tt]];Te=ut.properties;const[vt,Ft]=ut.geometry.coordinates;Ie=Zt(vt),Ee=ct(Ft)}const mt={type:1,geometry:[[Math.round(this.options.extent*(Ie*Q-j)),Math.round(this.options.extent*(Ee*Q-J))]],tags:Te};let kt;kt=ae||this.options.generateId?F[te+Tt]:this.points[F[te+Tt]].id,kt!==void 0&&(mt.id=kt),he.features.push(mt)}}_limitZoom(L){return Math.max(this.options.minZoom,Math.min(Math.floor(+L),this.options.maxZoom+1))}_cluster(L,F){const{radius:j,extent:J,reduce:Q,minPoints:he}=this.options,oe=j/(J*Math.pow(2,F)),te=L.data,ae=[],Te=this.stride;for(let Ie=0;IeF&&(vt+=te[mi+pi])}if(vt>ut&&vt>=he){let Ft,mi=Ee*ut,Ut=mt*ut,si=-1;const ii=((Ie/Te|0)<<5)+(F+1)+this.points.length;for(const Ur of kt){const Ei=Ur*Te;if(te[Ei+2]<=F)continue;te[Ei+2]=F;const ur=te[Ei+pi];mi+=te[Ei]*ur,Ut+=te[Ei+1]*ur,te[Ei+4]=ii,Q&&(Ft||(Ft=this._map(te,Ie,!0),si=this.clusterProps.length,this.clusterProps.push(Ft)),Q(Ft,this._map(te,Ei)))}te[Ie+4]=ii,ae.push(mi/vt,Ut/vt,1/0,ii,-1,vt),Q&&ae.push(si)}else{for(let Ft=0;Ft1)for(const Ft of kt){const mi=Ft*Te;if(!(te[mi+2]<=F)){te[mi+2]=F;for(let Ut=0;Ut>5}_getOriginZoom(L){return(L-this.points.length)%32}_map(L,F,j){if(L[F+pi]>1){const he=this.clusterProps[L[F+Oi]];return j?Object.assign({},he):he}const J=this.points[L[F+Tt]].properties,Q=this.options.map(J);return j&&Q===J?Object.assign({},Q):Q}}function Pt(X,L,F){return{type:"Feature",id:X[L+Tt],properties:He(X,L,F),geometry:{type:"Point",coordinates:[(j=X[L],360*(j-.5)),Zi(X[L+1])]}};var j}function He(X,L,F){const j=X[L+pi],J=j>=1e4?`${Math.round(j/1e3)}k`:j>=1e3?Math.round(j/100)/10+"k":j,Q=X[L+Oi],he=Q===-1?{}:Object.assign({},F[Q]);return Object.assign(he,{cluster:!0,cluster_id:X[L+Tt],point_count:j,point_count_abbreviated:J})}function Zt(X){return X/360+.5}function ct(X){const L=Math.sin(X*Math.PI/180),F=.5-.25*Math.log((1+L)/(1-L))/Math.PI;return F<0?0:F>1?1:F}function Zi(X){const L=(180-360*X)*Math.PI/180;return 360*Math.atan(Math.exp(L))/Math.PI-90}function _r(X,L,F,j){for(var J,Q=j,he=F-L>>1,oe=F-L,te=X[L],ae=X[L+1],Te=X[F],Ie=X[F+1],Ee=L+3;EeQ)J=Ee,Q=mt;else if(mt===Q){var kt=Math.abs(Ee-he);ktj&&(J-L>3&&_r(X,L,J,j),X[J+2]=Q,F-J>3&&_r(X,J,F,j))}function Ue(X,L,F,j,J,Q){var he=J-F,oe=Q-j;if(he!==0||oe!==0){var te=((X-F)*he+(L-j)*oe)/(he*he+oe*oe);te>1?(F=J,j=Q):te>0&&(F+=he*te,j+=oe*te)}return(he=X-F)*he+(oe=L-j)*oe}function Bi(X,L,F,j){var J={id:X===void 0?null:X,type:L,geometry:F,tags:j,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Q){var he=Q.geometry,oe=Q.type;if(oe==="Point"||oe==="MultiPoint"||oe==="LineString")gr(Q,he);else if(oe==="Polygon"||oe==="MultiLineString")for(var te=0;te0&&(he+=j?(J*ae-te*Q)/2:Math.sqrt(Math.pow(te-J,2)+Math.pow(ae-Q,2))),J=te,Q=ae}var Te=L.length-3;L[2]=1,_r(L,0,Te,F),L[Te+2]=1,L.size=Math.abs(he),L.start=0,L.end=L.size}function jo(X,L,F,j){for(var J=0;J1?1:F}function In(X,L,F,j,J,Q,he,oe){if(j/=L,Q>=(F/=L)&&he=j)return null;for(var te=[],ae=0;ae=F&&kt=j)){var ut=[];if(Ee==="Point"||Ee==="MultiPoint")Ii(Ie,ut,F,j,J);else if(Ee==="LineString")ti(Ie,ut,F,j,J,!1,oe.lineMetrics);else if(Ee==="MultiLineString")En(Ie,ut,F,j,J,!1);else if(Ee==="Polygon")En(Ie,ut,F,j,J,!0);else if(Ee==="MultiPolygon")for(var vt=0;vt=F&&he<=j&&(L.push(X[Q]),L.push(X[Q+1]),L.push(X[Q+2]))}}function ti(X,L,F,j,J,Q,he){for(var oe,te,ae=Vn(X),Te=J===0?qo:So,Ie=X.start,Ee=0;EeF&&(te=Te(ae,mt,kt,vt,Ft,F),he&&(ae.start=Ie+oe*te)):mi>j?Ut=F&&(te=Te(ae,mt,kt,vt,Ft,F),si=!0),Ut>j&&mi<=j&&(te=Te(ae,mt,kt,vt,Ft,j),si=!0),!Q&&si&&(he&&(ae.end=Ie+oe*te),L.push(ae),ae=Vn(X)),he&&(Ie+=oe)}var ii=X.length-3;mt=X[ii],kt=X[ii+1],ut=X[ii+2],(mi=J===0?mt:kt)>=F&&mi<=j&&Un(ae,mt,kt,ut),ii=ae.length-3,Q&&ii>=3&&(ae[ii]!==ae[0]||ae[ii+1]!==ae[1])&&Un(ae,ae[0],ae[1],ae[2]),ae.length&&L.push(ae)}function Vn(X){var L=[];return L.size=X.size,L.start=X.start,L.end=X.end,L}function En(X,L,F,j,J,Q){for(var he=0;hehe.maxX&&(he.maxX=Te),Ie>he.maxY&&(he.maxY=Ie)}return he}function Zo(X,L,F,j){var J=L.geometry,Q=L.type,he=[];if(Q==="Point"||Q==="MultiPoint")for(var oe=0;oe0&&L.size<(J?he:j))F.numPoints+=L.length/3;else{for(var oe=[],te=0;tehe)&&(F.numSimplified++,oe.push(L[te]),oe.push(L[te+1])),F.numPoints++;J&&function(ae,Te){for(var Ie=0,Ee=0,mt=ae.length,kt=mt-2;Ee0===Te)for(Ee=0,mt=ae.length;Ee24)throw new Error("maxZoom should be in the 0-24 range");if(L.promoteId&&L.generateId)throw new Error("promoteId and generateId cannot be used together.");var j=function(J,Q){var he=[];if(J.type==="FeatureCollection")for(var oe=0;oe1&&console.time("creation"),Ee=this.tiles[Ie]=er(X,L,F,j,te),this.tileCoords.push({z:L,x:F,y:j}),ae)){ae>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,F,j,Ee.numFeatures,Ee.numPoints,Ee.numSimplified),console.timeEnd("creation"));var mt="z"+L;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ee.source=X,J){if(L===te.maxZoom||L===J)continue;var kt=1<1&&console.time("clipping");var ut,vt,Ft,mi,Ut,si,ii=.5*te.buffer/te.extent,Ur=.5-ii,Ei=.5+ii,ur=1+ii;ut=vt=Ft=mi=null,Ut=In(X,Te,F-ii,F+Ei,0,Ee.minX,Ee.maxX,te),si=In(X,Te,F+Ur,F+ur,0,Ee.minX,Ee.maxX,te),X=null,Ut&&(ut=In(Ut,Te,j-ii,j+Ei,1,Ee.minY,Ee.maxY,te),vt=In(Ut,Te,j+Ur,j+ur,1,Ee.minY,Ee.maxY,te),Ut=null),si&&(Ft=In(si,Te,j-ii,j+Ei,1,Ee.minY,Ee.maxY,te),mi=In(si,Te,j+Ur,j+ur,1,Ee.minY,Ee.maxY,te),si=null),ae>1&&console.timeEnd("clipping"),oe.push(ut||[],L+1,2*F,2*j),oe.push(vt||[],L+1,2*F,2*j+1),oe.push(Ft||[],L+1,2*F+1,2*j),oe.push(mi||[],L+1,2*F+1,2*j+1)}}},We.prototype.getTile=function(X,L,F){var j=this.options,J=j.extent,Q=j.debug;if(X<0||X>24)return null;var he=1<1&&console.log("drilling down to z%d-%d-%d",X,L,F);for(var te,ae=X,Te=L,Ie=F;!te&&ae>0;)ae--,Te=Math.floor(Te/2),Ie=Math.floor(Ie/2),te=this.tiles[Bt(ae,Te,Ie)];return te&&te.source?(Q>1&&console.log("found parent tile z%d-%d-%d",ae,Te,Ie),Q>1&&console.time("drilling down"),this.splitTile(te.source,ae,Te,Ie,X,L,F),Q>1&&console.timeEnd("drilling down"),this.tiles[oe]?qe(this.tiles[oe],J):null):null};class It extends Oe{constructor(L,F,j,J){super(L,F,j),this._dataUpdateable=new Map,this.loadGeoJSON=(Q,he)=>{const{promoteId:oe}=Q;if(Q.request)return s.f(Q.request,(te,ae,Te,Ie)=>{this._dataUpdateable=Vr(ae,oe)?mn(ae,oe):void 0,he(te,ae,Te,Ie)});if(typeof Q.data=="string")try{const te=JSON.parse(Q.data);this._dataUpdateable=Vr(te,oe)?mn(te,oe):void 0,he(null,te)}catch{he(new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`))}else Q.dataDiff?this._dataUpdateable?(function(te,ae,Te){var Ie,Ee,mt,kt;if(ae.removeAll&&te.clear(),ae.remove)for(const ut of ae.remove)te.delete(ut);if(ae.add)for(const ut of ae.add){const vt=Mt(ut,Te);vt!=null&&te.set(vt,ut)}if(ae.update)for(const ut of ae.update){let vt=te.get(ut.id);if(vt==null)continue;const Ft=!ut.removeAllProperties&&(((Ie=ut.removeProperties)===null||Ie===void 0?void 0:Ie.length)>0||((Ee=ut.addOrUpdateProperties)===null||Ee===void 0?void 0:Ee.length)>0);if((ut.newGeometry||ut.removeAllProperties||Ft)&&(vt=Object.assign({},vt),te.set(ut.id,vt),Ft&&(vt.properties=Object.assign({},vt.properties))),ut.newGeometry&&(vt.geometry=ut.newGeometry),ut.removeAllProperties)vt.properties={};else if(((mt=ut.removeProperties)===null||mt===void 0?void 0:mt.length)>0)for(const mi of ut.removeProperties)Object.prototype.hasOwnProperty.call(vt.properties,mi)&&delete vt.properties[mi];if(((kt=ut.addOrUpdateProperties)===null||kt===void 0?void 0:kt.length)>0)for(const{key:mi,value:Ut}of ut.addOrUpdateProperties)vt.properties[mi]=Ut}}(this._dataUpdateable,Q.dataDiff,oe),he(null,{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())})):he(new Error(`Cannot update existing geojson data in ${Q.source}`)):he(new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}},this.loadVectorData=this.loadGeoJSONTile,J&&(this.loadGeoJSON=J)}loadGeoJSONTile(L,F){const j=L.tileID.canonical;if(!this._geoJSONIndex)return F(null,null);const J=this._geoJSONIndex.getTile(j.z,j.x,j.y);if(!J)return F(null,null);const Q=new class{constructor(oe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=s.N,this.length=oe.length,this._features=oe}feature(oe){return new class{constructor(te){this._feature=te,this.extent=s.N,this.type=te.type,this.properties=te.tags,"id"in te&&!isNaN(te.id)&&(this.id=parseInt(te.id,10))}loadGeometry(){if(this._feature.type===1){const te=[];for(const ae of this._feature.geometry)te.push([new s.P(ae[0],ae[1])]);return te}{const te=[];for(const ae of this._feature.geometry){const Te=[];for(const Ie of ae)Te.push(new s.P(Ie[0],Ie[1]));te.push(Te)}return te}}toGeoJSON(te,ae,Te){return at.call(this,te,ae,Te)}}(this._features[oe])}}(J.features);let he=$r(Q);he.byteOffset===0&&he.byteLength===he.buffer.byteLength||(he=new Uint8Array(he)),F(null,{vectorTile:Q,rawData:he.buffer})}loadData(L,F){var j;(j=this._pendingRequest)===null||j===void 0||j.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const J=!!(L&&L.request&&L.request.collectResourceTiming)&&new s.bu(L.request);this._pendingCallback=F,this._pendingRequest=this.loadGeoJSON(L,(Q,he)=>{if(delete this._pendingCallback,delete this._pendingRequest,Q||!he)return F(Q);if(typeof he!="object")return F(new Error(`Input data given to '${L.source}' is not a valid GeoJSON object.`));{et(he,!0);try{if(L.filter){const te=s.bC(L.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(te.result==="error")throw new Error(te.value.map(Te=>`${Te.key}: ${Te.message}`).join(", "));he={type:"FeatureCollection",features:he.features.filter(Te=>te.value.evaluate({zoom:0},Te))}}this._geoJSONIndex=L.cluster?new ze(function({superclusterOptions:te,clusterProperties:ae}){if(!ae||!te)return te;const Te={},Ie={},Ee={accumulated:null,zoom:0},mt={properties:null},kt=Object.keys(ae);for(const ut of kt){const[vt,Ft]=ae[ut],mi=s.bC(Ft),Ut=s.bC(typeof vt=="string"?[vt,["accumulated"],["get",ut]]:vt);Te[ut]=mi.value,Ie[ut]=Ut.value}return te.map=ut=>{mt.properties=ut;const vt={};for(const Ft of kt)vt[Ft]=Te[Ft].evaluate(Ee,mt);return vt},te.reduce=(ut,vt)=>{mt.properties=vt;for(const Ft of kt)Ee.accumulated=ut[Ft],ut[Ft]=Ie[Ft].evaluate(Ee,mt)},te}(L)).load(he.features):function(te,ae){return new We(te,ae)}(he,L.geojsonVtOptions)}catch(te){return F(te)}this.loaded={};const oe={};if(J){const te=J.finish();te&&(oe.resourceTiming={},oe.resourceTiming[L.source]=JSON.parse(JSON.stringify(te)))}F(null,oe)}})}reloadTile(L,F){const j=this.loaded;return j&&j[L.uid]?super.reloadTile(L,F):this.loadTile(L,F)}removeSource(L,F){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),F()}getClusterExpansionZoom(L,F){try{F(null,this._geoJSONIndex.getClusterExpansionZoom(L.clusterId))}catch(j){F(j)}}getClusterChildren(L,F){try{F(null,this._geoJSONIndex.getChildren(L.clusterId))}catch(j){F(j)}}getClusterLeaves(L,F){try{F(null,this._geoJSONIndex.getLeaves(L.clusterId,L.limit,L.offset))}catch(j){F(j)}}}class Mn{constructor(L){this.self=L,this.actor=new s.C(L,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:Oe,geojson:It},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(F,j)=>{if(this.workerSourceTypes[F])throw new Error(`Worker source with name "${F}" already registered.`);this.workerSourceTypes[F]=j},this.self.registerRTLTextPlugin=F=>{if(s.bD.isParsed())throw new Error("RTL text plugin already registered.");s.bD.applyArabicShaping=F.applyArabicShaping,s.bD.processBidirectionalText=F.processBidirectionalText,s.bD.processStyledBidirectionalText=F.processStyledBidirectionalText}}setReferrer(L,F){this.referrer=F}setImages(L,F,j){this.availableImages[L]=F;for(const J in this.workerSources[L]){const Q=this.workerSources[L][J];for(const he in Q)Q[he].availableImages=F}j()}setLayers(L,F,j){this.getLayerIndex(L).replace(F),j()}updateLayers(L,F,j){this.getLayerIndex(L).update(F.layers,F.removedIds),j()}loadTile(L,F,j){this.getWorkerSource(L,F.type,F.source).loadTile(F,j)}loadDEMTile(L,F,j){this.getDEMWorkerSource(L,F.source).loadTile(F,j)}reloadTile(L,F,j){this.getWorkerSource(L,F.type,F.source).reloadTile(F,j)}abortTile(L,F,j){this.getWorkerSource(L,F.type,F.source).abortTile(F,j)}removeTile(L,F,j){this.getWorkerSource(L,F.type,F.source).removeTile(F,j)}removeDEMTile(L,F){this.getDEMWorkerSource(L,F.source).removeTile(F)}removeSource(L,F,j){if(!this.workerSources[L]||!this.workerSources[L][F.type]||!this.workerSources[L][F.type][F.source])return;const J=this.workerSources[L][F.type][F.source];delete this.workerSources[L][F.type][F.source],J.removeSource!==void 0?J.removeSource(F,j):j()}loadWorkerSource(L,F,j){try{this.self.importScripts(F.url),j()}catch(J){j(J.toString())}}syncRTLPluginState(L,F,j){try{s.bD.setState(F);const J=s.bD.getPluginURL();if(s.bD.isLoaded()&&!s.bD.isParsed()&&J!=null){this.self.importScripts(J);const Q=s.bD.isParsed();j(Q?void 0:new Error(`RTL Text Plugin failed to import scripts from ${J}`),Q)}}catch(J){j(J.toString())}}getAvailableImages(L){let F=this.availableImages[L];return F||(F=[]),F}getLayerIndex(L){let F=this.layerIndexes[L];return F||(F=this.layerIndexes[L]=new H),F}getWorkerSource(L,F,j){return this.workerSources[L]||(this.workerSources[L]={}),this.workerSources[L][F]||(this.workerSources[L][F]={}),this.workerSources[L][F][j]||(this.workerSources[L][F][j]=new this.workerSourceTypes[F]({send:(J,Q,he)=>{this.actor.send(J,Q,he,L)}},this.getLayerIndex(L),this.getAvailableImages(L))),this.workerSources[L][F][j]}getDEMWorkerSource(L,F){return this.demWorkerSources[L]||(this.demWorkerSources[L]={}),this.demWorkerSources[L][F]||(this.demWorkerSources[L][F]=new Le),this.demWorkerSources[L][F]}}return s.i()&&(self.worker=new Mn(self)),Mn}),k(["./shared"],function(s){var H="3.6.2";class N{static testProp(t){if(!N.docStyle)return t[0];for(let n=0;n{window.removeEventListener("click",N.suppressClickInternal,!0)},0)}static mousePos(t,n){const a=t.getBoundingClientRect();return new s.P(n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop)}static touchPos(t,n){const a=t.getBoundingClientRect(),c=[];for(let d=0;d{t=[],n=0,a=0,c={}},u.addThrottleControl=C=>{const A=a++;return c[A]=C,A},u.removeThrottleControl=C=>{delete c[C],b()},u.getImage=(C,A,P=!0)=>{_e.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*");const R={requestParameters:C,supportImageRefresh:P,callback:A,cancelled:!1,completed:!1,cancel:()=>{R.completed||R.cancelled||(R.cancelled=!0,R.innerRequest&&(R.innerRequest.cancel(),n--),b())}};return t.push(R),b(),R};const d=C=>{const{requestParameters:A,supportImageRefresh:P,callback:R}=C;return s.e(A,{type:"image"}),(P!==!1||s.i()||s.g(A.url)||A.headers&&!Object.keys(A.headers).reduce((W,G)=>W&&G==="accept",!0)?s.m:S)(A,(W,G,K,q)=>{x(C,R,W,G,K,q)})},x=(C,A,P,R,W,G)=>{P?A(P):R instanceof HTMLImageElement||s.a(R)?A(null,R):R&&((K,q)=>{typeof createImageBitmap=="function"?s.b(K,q):s.d(K,q)})(R,(K,q)=>{K!=null?A(K):q!=null&&A(null,q,{cacheControl:W,expires:G})}),C.cancelled||(C.completed=!0,n--,b())},b=()=>{const C=(()=>{const A=Object.keys(c);let P=!1;if(A.length>0){for(const R of A)if(P=c[R](),P)break}return P})()?s.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let A=n;A0;A++){const P=t.shift();if(P.cancelled){A--;continue}const R=d(P);n++,P.innerRequest=R}},S=(C,A)=>{const P=new Image,R=C.url;let W=!1;const G=C.credentials;return G&&G==="include"?P.crossOrigin="use-credentials":(G&&G==="same-origin"||!s.s(R))&&(P.crossOrigin="anonymous"),P.fetchPriority="high",P.onload=()=>{A(null,P),P.onerror=P.onload=null},P.onerror=()=>{W||A(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.")),P.onerror=P.onload=null},P.src=R,{cancel:()=>{W=!0,P.src=""}}}}(Ne||(Ne={})),Ne.resetRequestQueue(),function(u){u.Glyphs="Glyphs",u.Image="Image",u.Source="Source",u.SpriteImage="SpriteImage",u.SpriteJSON="SpriteJSON",u.Style="Style",u.Tile="Tile",u.Unknown="Unknown"}(et||(et={}));class at{constructor(t){this._transformRequestFn=t}transformRequest(t,n){return this._transformRequestFn&&this._transformRequestFn(t,n)||{url:t}}normalizeSpriteURL(t,n,a){const c=function(d){const x=d.match(nt);if(!x)throw new Error(`Unable to parse URL "${d}"`);return{protocol:x[1],authority:x[2],path:x[3]||"/",params:x[4]?x[4].split("&"):[]}}(t);return c.path+=`${n}${a}`,function(d){const x=d.params.length?`?${d.params.join("&")}`:"";return`${d.protocol}://${d.authority}${d.path}${x}`}(c)}setTransformRequest(t){this._transformRequestFn=t}}const nt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function it(u){var t=new s.A(3);return t[0]=u[0],t[1]=u[1],t[2]=u[2],t}var Vt,ei=function(u,t,n){return u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2],u};Vt=new s.A(3),s.A!=Float32Array&&(Vt[0]=0,Vt[1]=0,Vt[2]=0);var Ht=function(u){var t=u[0],n=u[1];return t*t+n*n};function Nt(u){const t=[];if(typeof u=="string")t.push({id:"default",url:u});else if(u&&u.length>0){const n=[];for(const{id:a,url:c}of u){const d=`${a}${c}`;n.indexOf(d)===-1&&(n.push(d),t.push({id:a,url:c}))}}return t}function Jt(u,t,n,a,c){if(a)return void u(a);if(c!==Object.values(t).length||c!==Object.values(n).length)return;const d={};for(const x in t){d[x]={};const b=s.h.getImageCanvasContext(n[x]),S=t[x];for(const C in S){const{width:A,height:P,x:R,y:W,sdf:G,pixelRatio:K,stretchX:q,stretchY:le,content:me}=S[C];d[x][C]={data:null,pixelRatio:K,sdf:G,stretchX:q,stretchY:le,content:me,spriteData:{width:A,height:P,x:R,y:W,context:b}}}}u(null,d)}(function(){var u=new s.A(2);s.A!=Float32Array&&(u[0]=0,u[1]=0)})();class At{constructor(t,n,a,c){this.context=t,this.format=a,this.texture=t.gl.createTexture(),this.update(n,c)}update(t,n,a){const{width:c,height:d}=t,x=!(this.size&&this.size[0]===c&&this.size[1]===d||a),{context:b}=this,{gl:S}=b;if(this.useMipmap=!!(n&&n.useMipmap),S.bindTexture(S.TEXTURE_2D,this.texture),b.pixelStoreUnpackFlipY.set(!1),b.pixelStoreUnpack.set(1),b.pixelStoreUnpackPremultiplyAlpha.set(this.format===S.RGBA&&(!n||n.premultiply!==!1)),x)this.size=[c,d],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||s.a(t)?S.texImage2D(S.TEXTURE_2D,0,this.format,this.format,S.UNSIGNED_BYTE,t):S.texImage2D(S.TEXTURE_2D,0,this.format,c,d,0,this.format,S.UNSIGNED_BYTE,t.data);else{const{x:C,y:A}=a||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||s.a(t)?S.texSubImage2D(S.TEXTURE_2D,0,C,A,S.RGBA,S.UNSIGNED_BYTE,t):S.texSubImage2D(S.TEXTURE_2D,0,C,A,c,d,S.RGBA,S.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&S.generateMipmap(S.TEXTURE_2D)}bind(t,n,a){const{context:c}=this,{gl:d}=c;d.bindTexture(d.TEXTURE_2D,this.texture),a!==d.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=d.LINEAR),t!==this.filter&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,t),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,a||t),this.filter=t),n!==this.wrap&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,n),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),this.wrap=n)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function Ae(u){const{userImage:t}=u;return!!(t&&t.render&&t.render())&&(u.data.replace(new Uint8Array(t.data.buffer)),!0)}class Ge extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:n,callback:a}of this.requestors)this._notify(n,a);this.requestors=[]}}getImage(t){const n=this.images[t];if(n&&!n.data&&n.spriteData){const a=n.spriteData;n.data=new s.R({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),n.spriteData=null}return n}addImage(t,n){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,n)&&(this.images[t]=n)}_validate(t,n){let a=!0;const c=n.data||n.spriteData;return this._validateStretch(n.stretchX,c&&c.width)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "stretchX" value`))),a=!1),this._validateStretch(n.stretchY,c&&c.height)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "stretchY" value`))),a=!1),this._validateContent(n.content,n)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "content" value`))),a=!1),a}_validateStretch(t,n){if(!t)return!0;let a=0;for(const c of t){if(c[0]-1);S++,d[S]=b,x[S]=C,x[S+1]=Ui}for(let b=0,S=0;b{let b=this.entries[c];b||(b=this.entries[c]={glyphs:{},requests:{},ranges:{}});let S=b.glyphs[d];if(S!==void 0)return void x(null,{stack:c,id:d,glyph:S});if(S=this._tinySDF(b,c,d),S)return b.glyphs[d]=S,void x(null,{stack:c,id:d,glyph:S});const C=Math.floor(d/256);if(256*C>65535)return void x(new Error("glyphs > 65535 not supported"));if(b.ranges[C])return void x(null,{stack:c,id:d,glyph:S});if(!this.url)return void x(new Error("glyphsUrl is not set"));let A=b.requests[C];A||(A=b.requests[C]=[],Lt.loadGlyphRange(c,C,this.url,this.requestManager,(P,R)=>{if(R){for(const W in R)this._doesCharSupportLocalGlyph(+W)||(b.glyphs[+W]=R[+W]);b.ranges[C]=!0}for(const W of A)W(P,R);delete b.requests[C]})),A.push((P,R)=>{P?x(P):R&&x(null,{stack:c,id:d,glyph:R[d]||null})})},(c,d)=>{if(c)n(c);else if(d){const x={};for(const{stack:b,id:S,glyph:C}of d)(x[b]||(x[b]={}))[S]=C&&{id:C.id,bitmap:C.bitmap.clone(),metrics:C.metrics};n(null,x)}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(s.u["CJK Unified Ideographs"](t)||s.u["Hangul Syllables"](t)||s.u.Hiragana(t)||s.u.Katakana(t))}_tinySDF(t,n,a){const c=this.localIdeographFontFamily;if(!c||!this._doesCharSupportLocalGlyph(a))return;let d=t.tinySDF;if(!d){let b="400";/bold/i.test(n)?b="900":/medium/i.test(n)?b="500":/light/i.test(n)&&(b="200"),d=t.tinySDF=new Lt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:c,fontWeight:b})}const x=d.draw(String.fromCharCode(a));return{id:a,bitmap:new s.q({width:x.width||60,height:x.height||60},x.data),metrics:{width:x.glyphWidth/2||24,height:x.glyphHeight/2||24,left:x.glyphLeft/2+.5||0,top:x.glyphTop/2-27.5||-8,advance:x.glyphAdvance/2||24,isDoubleResolution:!0}}}}Lt.loadGlyphRange=function(u,t,n,a,c){const d=256*t,x=d+255,b=a.transformRequest(n.replace("{fontstack}",u).replace("{range}",`${d}-${x}`),et.Glyphs);s.l(b,(S,C)=>{if(S)c(S);else if(C){const A={};for(const P of s.n(C))A[P.id]=P;c(null,A)}})},Lt.TinySDF=class{constructor({fontSize:u=24,buffer:t=3,radius:n=8,cutoff:a=.25,fontFamily:c="sans-serif",fontWeight:d="normal",fontStyle:x="normal"}={}){this.buffer=t,this.cutoff=a,this.radius=n;const b=this.size=u+4*t,S=this._createCanvas(b),C=this.ctx=S.getContext("2d",{willReadFrequently:!0});C.font=`${x} ${d} ${u}px ${c}`,C.textBaseline="alphabetic",C.textAlign="left",C.fillStyle="black",this.gridOuter=new Float64Array(b*b),this.gridInner=new Float64Array(b*b),this.f=new Float64Array(b),this.z=new Float64Array(b+1),this.v=new Uint16Array(b)}_createCanvas(u){const t=document.createElement("canvas");return t.width=t.height=u,t}draw(u){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:a,actualBoundingBoxLeft:c,actualBoundingBoxRight:d}=this.ctx.measureText(u),x=Math.ceil(n),b=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-c))),S=Math.min(this.size-this.buffer,x+Math.ceil(a)),C=b+2*this.buffer,A=S+2*this.buffer,P=Math.max(C*A,0),R=new Uint8ClampedArray(P),W={data:R,width:C,height:A,glyphWidth:b,glyphHeight:S,glyphTop:x,glyphLeft:0,glyphAdvance:t};if(b===0||S===0)return W;const{ctx:G,buffer:K,gridInner:q,gridOuter:le}=this;G.clearRect(K,K,b,S),G.fillText(u,K,K+x);const me=G.getImageData(K,K,b,S);le.fill(Ui,0,P),q.fill(0,0,P);for(let ee=0;ee0?Ce*Ce:0,q[xe]=Ce<0?Ce*Ce:0}}Dt(le,0,0,C,A,C,this.f,this.v,this.z),Dt(q,K,K,b,S,C,this.f,this.v,this.z);for(let ee=0;ee1&&(S=t[++b]);const A=Math.abs(C-S.left),P=Math.abs(C-S.right),R=Math.min(A,P);let W;const G=d/a*(c+1);if(S.isDash){const K=c-Math.abs(G);W=Math.sqrt(R*R+K*K)}else W=c-Math.sqrt(R*R+G*G);this.data[x+C]=Math.max(0,Math.min(255,W+128))}}}addRegularDash(t){for(let b=t.length-1;b>=0;--b){const S=t[b],C=t[b+1];S.zeroLength?t.splice(b,1):C&&C.isDash===S.isDash&&(C.left=S.left,t.splice(b,1))}const n=t[0],a=t[t.length-1];n.isDash===a.isDash&&(n.left=a.left-this.width,a.right=n.right+this.width);const c=this.width*this.nextRow;let d=0,x=t[d];for(let b=0;b1&&(x=t[++d]);const S=Math.abs(b-x.left),C=Math.abs(b-x.right),A=Math.min(S,C);this.data[c+b]=Math.max(0,Math.min(255,(x.isDash?A:-A)+128))}}addDash(t,n){const a=n?7:0,c=2*a+1;if(this.nextRow+c>this.height)return s.w("LineAtlas out of space"),null;let d=0;for(let b=0;b{c.send(t,n,d)},a=a||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(t=!0){this.actors.forEach(n=>{n.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}}function Ti(u,t,n){const a=function(c,d){if(c)return n(c);if(d){const x=s.F(s.e(d,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);d.vector_layers&&(x.vectorLayers=d.vector_layers,x.vectorLayerIds=x.vectorLayers.map(b=>b.id)),n(null,x)}};return u.url?s.f(t.transformRequest(u.url,et.Source),a):s.h.frame(()=>a(null,u))}class Tt{constructor(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof s.L?new s.L(t.lng,t.lat):s.L.convert(t),this}setSouthWest(t){return this._sw=t instanceof s.L?new s.L(t.lng,t.lat):s.L.convert(t),this}extend(t){const n=this._sw,a=this._ne;let c,d;if(t instanceof s.L)c=t,d=t;else{if(!(t instanceof Tt))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(Tt.convert(t)):this.extend(s.L.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(s.L.convert(t)):this;if(c=t._sw,d=t._ne,!c||!d)return this}return n||a?(n.lng=Math.min(c.lng,n.lng),n.lat=Math.min(c.lat,n.lat),a.lng=Math.max(d.lng,a.lng),a.lat=Math.max(d.lat,a.lat)):(this._sw=new s.L(c.lng,c.lat),this._ne=new s.L(d.lng,d.lat)),this}getCenter(){return new s.L((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 s.L(this.getWest(),this.getNorth())}getSouthEast(){return new s.L(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(t){const{lng:n,lat:a}=s.L.convert(t);let c=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(c=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&c}static convert(t){return t instanceof Tt?t:t&&new Tt(t)}static fromLngLat(t,n=0){const a=360*n/40075017,c=a/Math.cos(Math.PI/180*t.lat);return new Tt(new s.L(t.lng-c,t.lat-a),new s.L(t.lng+c,t.lat+a))}}class pi{constructor(t,n,a){this.bounds=Tt.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=a||24}validateBounds(t){return Array.isArray(t)&&t.length===4?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),a=Math.floor(s.G(this.bounds.getWest())*n),c=Math.floor(s.H(this.bounds.getNorth())*n),d=Math.ceil(s.G(this.bounds.getEast())*n),x=Math.ceil(s.H(this.bounds.getSouth())*n);return t.x>=a&&t.x=c&&t.y{this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=Ti(this._options,this.map._requestManager,(d,x)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),d?this.fire(new s.j(d)):x&&(s.e(this,x),x.bounds&&(this.tileBounds=new pi(x.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))})},this.serialize=()=>s.e({},this._options),this.id=t,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,s.e(this,s.F(n,["url","scheme","tileSize","promoteId"])),this._options=s.e({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(c)}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c={request:this.map._requestManager.transformRequest(a,et.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(x,b){return delete t.request,t.aborted?n(null):x&&x.status!==404?n(x):(b&&b.resourceTiming&&(t.resourceTiming=b.resourceTiming),this.map._refreshExpiredTiles&&b&&t.setExpiryData(b),t.loadVectorData(b,this.map.painter),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}c.request.collectResourceTiming=this._collectResourceTiming,t.actor&&t.state!=="expired"?t.state==="loading"?t.reloadCallback=n:t.request=t.actor.send("reloadTile",c,d.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",c,d.bind(this)))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class ze extends s.E{constructor(t,n,a,c){super(),this.id=t,this.dispatcher=a,this.setEventedParent(c),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},n),s.e(this,s.F(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=Ti(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new s.j(t)):n&&(s.e(this,n),n.bounds&&(this.tileBounds=new pi(n.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}serialize(){return s.e({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.request=Ne.getImage(this.map._requestManager.transformRequest(a,et.Tile),(c,d,x)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(c)t.state="errored",n(c);else if(d){this.map._refreshExpiredTiles&&x&&t.setExpiryData(x);const b=this.map.painter.context,S=b.gl;t.texture=this.map.painter.getTileTexture(d.width),t.texture?t.texture.update(d,{useMipmap:!0}):(t.texture=new At(b,d,S.RGBA,{useMipmap:!0}),t.texture.bind(S.LINEAR,S.CLAMP_TO_EDGE,S.LINEAR_MIPMAP_NEAREST),b.extTextureFilterAnisotropic&&S.texParameterf(S.TEXTURE_2D,b.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,b.extTextureFilterAnisotropicMax)),t.state="loaded",n(null)}},this.map._refreshExpiredTiles)}abortTile(t,n){t.request&&(t.request.cancel(),delete t.request),n()}unloadTile(t,n){t.texture&&this.map.painter.saveTileTexture(t.texture),n()}hasTransition(){return!1}}class Pt extends ze{constructor(t,n,a,c){super(t,n,a,c),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox",this.redFactor=n.redFactor,this.greenFactor=n.greenFactor,this.blueFactor=n.blueFactor,this.baseShift=n.baseShift}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c=this.map._requestManager.transformRequest(a,et.Tile);function d(x,b){x&&(t.state="errored",n(x)),b&&(t.dem=b,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.request=Ne.getImage(c,(x,b,S)=>s._(this,void 0,void 0,function*(){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(x)t.state="errored",n(x);else if(b){this.map._refreshExpiredTiles&&t.setExpiryData(S);const C=s.a(b)&&s.J()?b:yield function(P){return s._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&s.K()){const R=P.width+2,W=P.height+2;try{return new s.R({width:R,height:W},yield s.M(P,-1,-1,R,W))}catch{}}return s.h.getImageData(P,1)})}(b),A={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:C,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};t.actor&&t.state!=="expired"||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",A,d))}}),this.map._refreshExpiredTiles)}_getNeighboringTiles(t){const n=t.canonical,a=Math.pow(2,n.z),c=(n.x-1+a)%a,d=n.x===0?t.wrap-1:t.wrap,x=(n.x+1+a)%a,b=n.x+1===a?t.wrap+1:t.wrap,S={};return S[new s.O(t.overscaledZ,d,n.z,c,n.y).key]={backfilled:!1},S[new s.O(t.overscaledZ,b,n.z,x,n.y).key]={backfilled:!1},n.y>0&&(S[new s.O(t.overscaledZ,d,n.z,c,n.y-1).key]={backfilled:!1},S[new s.O(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},S[new s.O(t.overscaledZ,b,n.z,x,n.y-1).key]={backfilled:!1}),n.y+1{this._updateWorkerData()},this.serialize=()=>s.e({},this._options,{type:this.type,data:this._data}),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=a.getActor(),this.setEventedParent(c),this._data=n.data,this._options=s.e({},n),this._collectResourceTiming=n.collectResourceTiming,n.maxzoom!==void 0&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const d=s.N/this.tileSize;this.workerOptions=s.e({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(n.buffer!==void 0?n.buffer:128)*d,tolerance:(n.tolerance!==void 0?n.tolerance:.375)*d,extent:s.N,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:n.clusterMaxZoom!==void 0?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:s.N,radius:(n.clusterRadius||50)*d,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}onAdd(t){this.map=t,this.load()}setData(t){return this._data=t,this._updateWorkerData(),this}updateData(t){return this._updateWorkerData(t),this}setClusterOptions(t){return this.workerOptions.cluster=t.cluster,t&&(t.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=t.clusterRadius),t.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=t.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(t,n){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},n),this}getClusterChildren(t,n){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},n),this}getClusterLeaves(t,n,a,c){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:n,offset:a},c),this}_updateWorkerData(t){const n=s.e({},this.workerOptions);t?n.dataDiff=t:typeof this._data=="string"?(n.request=this.map._requestManager.transformRequest(s.h.resolveURL(this._data),et.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new s.k("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,n,(a,c)=>{if(this._pendingLoads--,this._removed||c&&c.abandoned)return void this.fire(new s.k("dataabort",{dataType:"source"}));let d=null;if(c&&c.resourceTiming&&c.resourceTiming[this.id]&&(d=c.resourceTiming[this.id].slice(0)),a)return void this.fire(new s.j(a));const x={dataType:"source"};this._collectResourceTiming&&d&&d.length>0&&s.e(x,{resourceTiming:d}),this.fire(new s.k("data",Object.assign(Object.assign({},x),{sourceDataType:"metadata"}))),this.fire(new s.k("data",Object.assign(Object.assign({},x),{sourceDataType:"content"})))})}loaded(){return this._pendingLoads===0}loadTile(t,n){const a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const c={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(a,c,(d,x)=>(delete t.request,t.unloadVectorData(),t.aborted?n(null):d?n(d):(t.loadVectorData(x,this.map.painter,a==="reloadTile"),n(null))))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}hasTransition(){return!1}}var Zt=s.Q([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ct extends s.E{constructor(t,n,a,c){super(),this.load=(d,x)=>{this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=Ne.getImage(this.map._requestManager.transformRequest(this.url,et.Image),(b,S)=>{this._request=null,this._loaded=!0,b?this.fire(new s.j(b)):S&&(this.image=S,d&&(this.coordinates=d),x&&x(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||!this.image)return;const d=this.map.painter.context,x=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,Zt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture||(this.texture=new At(d,this.image,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let b=!1;for(const S in this.tiles){const C=this.tiles[S];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture,b=!0)}b&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"image",url:this.options.url,coordinates:this.coordinates}),this.id=t,this.dispatcher=a,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(c),this.options=n}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.cancel(),this._request=null),this.options.url=t.url,this.load(t.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.cancel(),this._request=null)}setCoordinates(t){this.coordinates=t;const n=t.map(s.U.fromLngLat);this.tileID=function(c){let d=1/0,x=1/0,b=-1/0,S=-1/0;for(const R of c)d=Math.min(d,R.x),x=Math.min(x,R.y),b=Math.max(b,R.x),S=Math.max(S,R.y);const C=Math.max(b-d,S-x),A=Math.max(0,Math.floor(-Math.log(C)/Math.LN2)),P=Math.pow(2,A);return new s.W(A,Math.floor((d+b)/2*P),Math.floor((x+S)/2*P))}(n),this.minzoom=this.maxzoom=this.tileID.z;const a=n.map(c=>this.tileID.getTilePoint(c)._round());return this._boundsArray=new s.V,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,s.N,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,s.N),this._boundsArray.emplaceBack(a[2].x,a[2].y,s.N,s.N),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})),this}loadTile(t,n){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},n(null)):(t.state="errored",n(null))}hasTransition(){return!1}}class Zi extends ct{constructor(t,n,a,c){super(t,n,a,c),this.load=()=>{this._loaded=!1;const d=this.options;this.urls=[];for(const x of d.urls)this.urls.push(this.map._requestManager.transformRequest(x,et.Source).url);s.X(this.urls,(x,b)=>{this._loaded=!0,x?this.fire(new s.j(x)):b&&(this.video=b,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const d=this.map.painter.context,x=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,Zt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE),x.texSubImage2D(x.TEXTURE_2D,0,0,0,x.RGBA,x.UNSIGNED_BYTE,this.video)):(this.texture=new At(d,this.video,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let b=!1;for(const S in this.tiles){const C=this.tiles[S];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture,b=!0)}b&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"video",urls:this.urls,coordinates:this.coordinates}),this.roundZoom=!0,this.type="video",this.options=n}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;tn.end(0)?this.fire(new s.j(new s.Y(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}hasTransition(){return this.video&&!this.video.paused}}class _r extends ct{constructor(t,n,a,c){super(t,n,a,c),this.load=()=>{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 s.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())},this.prepare=()=>{let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const x=this.map.painter.context,b=x.gl;this.boundsBuffer||(this.boundsBuffer=x.createVertexBuffer(this._boundsArray,Zt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new At(x,this.canvas,b.RGBA,{premultiply:!0});let S=!1;for(const C in this.tiles){const A=this.tiles[C];A.state!=="loaded"&&(A.state="loaded",A.texture=this.texture,S=!0)}S&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"canvas",coordinates:this.coordinates}),n.coordinates?Array.isArray(n.coordinates)&&n.coordinates.length===4&&!n.coordinates.some(d=>!Array.isArray(d)||d.length!==2||d.some(x=>typeof x!="number"))||this.fire(new s.j(new s.Y(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.j(new s.Y(`sources.${t}`,null,'missing required property "coordinates"'))),n.animate&&typeof n.animate!="boolean"&&this.fire(new s.j(new s.Y(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),n.canvas?typeof n.canvas=="string"||n.canvas instanceof HTMLCanvasElement||this.fire(new s.j(new s.Y(`sources.${t}`,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 s.j(new s.Y(`sources.${t}`,null,'missing required property "canvas"'))),this.options=n,this.animate=n.animate===void 0||n.animate}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const Ue={},Bi=u=>{switch(u){case"geojson":return He;case"image":return ct;case"raster":return ze;case"raster-dem":return Pt;case"vector":return Oi;case"video":return Zi;case"canvas":return _r}return Ue[u]};function gr(u,t){const n=s.Z();return s.$(n,n,[1,1,0]),s.a0(n,n,[.5*u.width,.5*u.height,1]),s.a1(n,n,u.calculatePosMatrix(t.toUnwrapped()))}function ci(u,t,n,a,c,d){const x=function(P,R,W){if(P)for(const G of P){const K=R[G];if(K&&K.source===W&&K.type==="fill-extrusion")return!0}else for(const G in R){const K=R[G];if(K.source===W&&K.type==="fill-extrusion")return!0}return!1}(c&&c.layers,t,u.id),b=d.maxPitchScaleFactor(),S=u.tilesIn(a,b,x);S.sort(co);const C=[];for(const P of S)C.push({wrappedTileID:P.tileID.wrapped().key,queryResults:P.tile.queryRenderedFeatures(t,n,u._state,P.queryGeometry,P.cameraQueryGeometry,P.scale,c,d,b,gr(u.transform,P.tileID))});const A=function(P){const R={},W={};for(const G of P){const K=G.queryResults,q=G.wrappedTileID,le=W[q]=W[q]||{};for(const me in K){const ee=K[me],ce=le[me]=le[me]||{},ve=R[me]=R[me]||[];for(const xe of ee)ce[xe.featureIndex]||(ce[xe.featureIndex]=!0,ve.push(xe))}}return R}(C);for(const P in A)A[P].forEach(R=>{const W=R.feature,G=u.getFeatureState(W.layer["source-layer"],W.id);W.source=W.layer.source,W.layer["source-layer"]&&(W.sourceLayer=W.layer["source-layer"]),W.state=G});return A}function co(u,t){const n=u.tileID,a=t.tileID;return n.overscaledZ-a.overscaledZ||n.canonical.y-a.canonical.y||n.wrap-a.wrap||n.canonical.x-a.canonical.x}class wo{constructor(t,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=s.a2(),this.uses=0,this.tileSize=n,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(t){const n=t+this.timeAdded;nd.getLayer(C)).filter(Boolean);if(S.length!==0){b.layers=S,b.stateDependentLayerIds&&(b.stateDependentLayers=b.stateDependentLayerIds.map(C=>S.filter(A=>A.id===C)[0]));for(const C of S)x[C.id]=b}}return x}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const c in this.buckets){const d=this.buckets[c];if(d instanceof s.a4){if(this.hasSymbolBuckets=!0,!a)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const c in this.buckets){const d=this.buckets[c];if(d instanceof s.a4&&d.hasRTLText){this.hasRTLText=!0,s.a5();break}}this.queryPadding=0;for(const c in this.buckets){const d=this.buckets[c];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(c).queryRadius(d))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new s.a3}unloadVectorData(){for(const t in this.buckets)this.buckets[t].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(t){return this.buckets[t.id]}upload(t){for(const a in this.buckets){const c=this.buckets[a];c.uploadPending()&&c.upload(t)}const n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new At(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new At(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,n,a,c,d,x,b,S,C,A){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:c,cameraQueryGeometry:d,scale:x,tileSize:this.tileSize,pixelPosMatrix:A,transform:S,params:b,queryPadding:this.queryPadding*C},t,n,a):{}}querySourceFeatures(t,n){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const c=a.loadVTLayers(),d=n&&n.sourceLayer?n.sourceLayer:"",x=c._geojsonTileLayer||c[d];if(!x)return;const b=s.a6(n&&n.filter),{z:S,x:C,y:A}=this.tileID.canonical,P={z:S,x:C,y:A};for(let R=0;Ra)c=!1;else if(n)if(this.expirationTime{this.remove(t,d)},a)),this.data[c].push(d),this.order.push(c),this.order.length>this.max){const x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const n=this.data[t].shift();return n.timeout&&clearTimeout(n.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),n.value}getByKey(t){const n=this.data[t];return n?n[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,n){if(!this.has(t))return this;const a=t.wrapped().key,c=n===void 0?0:this.data[a].indexOf(n),d=this.data[a][c];return this.data[a].splice(c,1),d.timeout&&clearTimeout(d.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(d.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const n=this._getAndRemoveByKey(this.order[0]);n&&this.onRemove(n)}return this}filter(t){const n=[];for(const a in this.data)for(const c of this.data[a])t(c.value)||n.push(c);for(const a of n)this.remove(a.value.tileID,a)}}class Se{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,a){const c=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][c]=this.stateChanges[t][c]||{},s.e(this.stateChanges[t][c],a),this.deletedStates[t]===null){this.deletedStates[t]={};for(const d in this.state[t])d!==c&&(this.deletedStates[t][d]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][c]===null){this.deletedStates[t][c]={};for(const d in this.state[t][c])a[d]||(this.deletedStates[t][c][d]=null)}else for(const d in a)this.deletedStates[t]&&this.deletedStates[t][c]&&this.deletedStates[t][c][d]===null&&delete this.deletedStates[t][c][d]}removeFeatureState(t,n,a){if(this.deletedStates[t]===null)return;const c=String(n);if(this.deletedStates[t]=this.deletedStates[t]||{},a&&n!==void 0)this.deletedStates[t][c]!==null&&(this.deletedStates[t][c]=this.deletedStates[t][c]||{},this.deletedStates[t][c][a]=null);else if(n!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][c])for(a in this.deletedStates[t][c]={},this.stateChanges[t][c])this.deletedStates[t][c][a]=null;else this.deletedStates[t][c]=null;else this.deletedStates[t]=null}getState(t,n){const a=String(n),c=s.e({},(this.state[t]||{})[a],(this.stateChanges[t]||{})[a]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){const d=this.deletedStates[t][n];if(d===null)return{};for(const x in d)delete c[x]}return c}initializeTileState(t,n){t.setFeatureState(this.state,n)}coalesceChanges(t,n){const a={};for(const c in this.stateChanges){this.state[c]=this.state[c]||{};const d={};for(const x in this.stateChanges[c])this.state[c][x]||(this.state[c][x]={}),s.e(this.state[c][x],this.stateChanges[c][x]),d[x]=this.state[c][x];a[c]=d}for(const c in this.deletedStates){this.state[c]=this.state[c]||{};const d={};if(this.deletedStates[c]===null)for(const x in this.state[c])d[x]={},this.state[c][x]={};else for(const x in this.deletedStates[c]){if(this.deletedStates[c][x]===null)this.state[c][x]={};else for(const b of Object.keys(this.deletedStates[c][x]))delete this.state[c][x][b];d[x]=this.state[c][x]}a[c]=a[c]||{},s.e(a[c],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const c in t)t[c].setFeatureState(a,n)}}class en extends s.E{constructor(t,n,a){super(),this.id=t,this.dispatcher=a,this.on("data",c=>{c.dataType==="source"&&c.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&c.dataType==="source"&&c.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((c,d,x,b)=>{const S=new(Bi(d.type))(c,d,x,b);if(S.id!==c)throw new Error(`Expected Source id to be ${c} instead of ${S.id}`);return S})(t,n,a,this),this._tiles={},this._cache=new jo(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Se,this._didEmitContent=!1,this._updated=!1}onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}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 t in this._tiles){const n=this._tiles[t];if(n.state!=="loaded"&&n.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,n){return this._source.loadTile(t,n)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,()=>{})}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,()=>{}),this._source.fire(new s.k("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const n in this._tiles){const a=this._tiles[n];a.upload(t),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(In).map(t=>t.key)}getRenderableIds(t){const n=[];for(const a in this._tiles)this._isIdRenderable(a,t)&&n.push(this._tiles[a]);return t?n.sort((a,c)=>{const d=a.tileID,x=c.tileID,b=new s.P(d.canonical.x,d.canonical.y)._rotate(this.transform.angle),S=new s.P(x.canonical.x,x.canonical.y)._rotate(this.transform.angle);return d.overscaledZ-x.overscaledZ||S.y-b.y||S.x-b.x}).map(a=>a.tileID.key):n.map(a=>a.tileID).sort(In).map(a=>a.key)}hasRenderableParent(t){const n=this.findLoadedParent(t,0);return!!n&&this._isIdRenderable(n.tileID.key)}_isIdRenderable(t,n){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(n||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)this._tiles[t].state!=="errored"&&this._reloadTile(t,"reloading")}}_reloadTile(t,n){const a=this._tiles[t];a&&(a.state!=="loading"&&(a.state=n),this._loadTile(a,this._tileLoaded.bind(this,a,t,n)))}_tileLoaded(t,n,a,c){if(c)return t.state="errored",void(c.status!==404?this._source.fire(new s.j(c,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=s.h.now(),a==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new s.k("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){const n=this.getRenderableIds();for(let c=0;c1||(Math.abs(x)>1&&(Math.abs(x+S)===1?x+=S:Math.abs(x-S)===1&&(x-=S)),d.dem&&c.dem&&(c.dem.backfillBorder(d.dem,x,b),c.neighboringTiles&&c.neighboringTiles[C]&&(c.neighboringTiles[C].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,n,a,c){for(const d in this._tiles){let x=this._tiles[d];if(c[d]||!x.hasData()||x.tileID.overscaledZ<=n||x.tileID.overscaledZ>a)continue;let b=x.tileID;for(;x&&x.tileID.overscaledZ>n+1;){const C=x.tileID.scaledTo(x.tileID.overscaledZ-1);x=this._tiles[C.key],x&&x.hasData()&&(b=C)}let S=b;for(;S.overscaledZ>n;)if(S=S.scaledTo(S.overscaledZ-1),t[S.key]){c[b.key]=b;break}}}findLoadedParent(t,n){if(t.key in this._loadedParentTiles){const a=this._loadedParentTiles[t.key];return a&&a.tileID.overscaledZ>=n?a:null}for(let a=t.overscaledZ-1;a>=n;a--){const c=t.scaledTo(a),d=this._getLoadedTile(c);if(d)return d}}_getLoadedTile(t){const n=this._tiles[t.key];return n&&n.hasData()?n:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const n=Math.ceil(t.width/this._source.tileSize)+1,a=Math.ceil(t.height/this._source.tileSize)+1,c=Math.floor(n*a*(this._maxTileCacheZoomLevels===null?s.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,c):c;this._cache.setMaxSize(d)}handleWrapJump(t){const n=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,n){const a={};for(const c in this._tiles){const d=this._tiles[c];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+n),a[d.tileID.key]=d}this._tiles=a;for(const c in this._timers)clearTimeout(this._timers[c]),delete this._timers[c];for(const c in this._tiles)this._setTileReloadTimer(c,this._tiles[c])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(A=>new s.O(A.canonical.z,A.wrap,A.canonical.z,A.canonical.x,A.canonical.y)):(a=t.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:n}),this._source.hasTile&&(a=a.filter(A=>this._source.hasTile(A)))):a=[];const c=t.coveringZoomLevel(this._source),d=Math.max(c-en.maxOverzooming,this._source.minzoom),x=Math.max(c+en.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const A={};for(const P of a)if(P.canonical.z>this._source.minzoom){const R=P.scaledTo(P.canonical.z-1);A[R.key]=R;const W=P.scaledTo(Math.max(this._source.minzoom,Math.min(P.canonical.z,5)));A[W.key]=W}a=a.concat(Object.values(A))}const b=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,b&&this.fire(new s.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const S=this._updateRetainedTiles(a,c);if(Ii(this._source.type)){const A={},P={},R=Object.keys(S),W=s.h.now();for(const G of R){const K=S[G],q=this._tiles[G];if(!q||q.fadeEndTime!==0&&q.fadeEndTime<=W)continue;const le=this.findLoadedParent(K,d);le&&(this._addTile(le.tileID),A[le.tileID.key]=le.tileID),P[G]=K}this._retainLoadedChildren(P,c,x,S);for(const G in A)S[G]||(this._coveredTiles[G]=!0,S[G]=A[G]);if(n){const G={},K={};for(const q of a)this._tiles[q.key].hasData()?G[q.key]=q:K[q.key]=q;for(const q in K){const le=K[q].children(this._source.maxzoom);this._tiles[le[0].key]&&this._tiles[le[1].key]&&this._tiles[le[2].key]&&this._tiles[le[3].key]&&(G[le[0].key]=S[le[0].key]=le[0],G[le[1].key]=S[le[1].key]=le[1],G[le[2].key]=S[le[2].key]=le[2],G[le[3].key]=S[le[3].key]=le[3],delete K[q])}for(const q in K){const le=this.findLoadedParent(K[q],this._source.minzoom);if(le){G[le.tileID.key]=S[le.tileID.key]=le.tileID;for(const me in G)G[me].isChildOf(le.tileID)&&delete G[me]}}for(const q in this._tiles)G[q]||(this._coveredTiles[q]=!0)}}for(const A in S)this._tiles[A].clearFadeHold();const C=s.ab(this._tiles,S);for(const A of C){const P=this._tiles[A];P.hasSymbolBuckets&&!P.holdingForFade()?P.setHoldDuration(this.map._fadeDuration):P.hasSymbolBuckets&&!P.symbolFadeFinished()||this._removeTile(A)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,n){const a={},c={},d=Math.max(n-en.maxOverzooming,this._source.minzoom),x=Math.max(n+en.maxUnderzooming,this._source.minzoom),b={};for(const S of t){const C=this._addTile(S);a[S.key]=S,C.hasData()||nthis._source.maxzoom){const P=S.children(this._source.maxzoom)[0],R=this.getTile(P);if(R&&R.hasData()){a[P.key]=P;continue}}else{const P=S.children(this._source.maxzoom);if(a[P[0].key]&&a[P[1].key]&&a[P[2].key]&&a[P[3].key])continue}let A=C.wasRequested();for(let P=S.overscaledZ-1;P>=d;--P){const R=S.scaledTo(P);if(c[R.key])break;if(c[R.key]=!0,C=this.getTile(R),!C&&A&&(C=this._addTile(R)),C){const W=C.hasData();if((A||W)&&(a[R.key]=R),A=C.wasRequested(),W)break}}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const n=[];let a,c=this._tiles[t].tileID;for(;c.overscaledZ>0;){if(c.key in this._loadedParentTiles){a=this._loadedParentTiles[c.key];break}n.push(c.key);const d=c.scaledTo(c.overscaledZ-1);if(a=this._getLoadedTile(d),a)break;c=d}for(const d of n)this._loadedParentTiles[d]=a}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const a=n;return n||(n=new wo(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,a||this._source.fire(new s.k("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(t,n){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const a=n.getExpiryTimeout();a&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},a))}_removeTile(t){const n=this._tiles[t];n&&(n.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),n.uses>0||(n.hasData()&&n.state!=="reloading"?this._cache.add(n.tileID,n,n.getExpiryTimeout()):(n.aborted=!0,this._abortTile(n),this._unloadTile(n))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,n,a){const c=[],d=this.transform;if(!d)return c;const x=a?d.getCameraQueryGeometry(t):t,b=t.map(G=>d.pointCoordinate(G,this.terrain)),S=x.map(G=>d.pointCoordinate(G,this.terrain)),C=this.getIds();let A=1/0,P=1/0,R=-1/0,W=-1/0;for(const G of S)A=Math.min(A,G.x),P=Math.min(P,G.y),R=Math.max(R,G.x),W=Math.max(W,G.y);for(let G=0;G=0&&ee[1].y+me>=0){const ce=b.map(xe=>q.getTilePoint(xe)),ve=S.map(xe=>q.getTilePoint(xe));c.push({tile:K,tileID:q,queryGeometry:ce,cameraQueryGeometry:ve,scale:le})}}return c}getVisibleCoordinates(t){const n=this.getRenderableIds(t).map(a=>this._tiles[a].tileID);for(const a of n)a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped());return n}hasTransition(){if(this._source.hasTransition())return!0;if(Ii(this._source.type)){const t=s.h.now();for(const n in this._tiles)if(this._tiles[n].fadeEndTime>=t)return!0}return!1}setFeatureState(t,n,a){this._state.updateState(t=t||"_geojsonTileLayer",n,a)}removeFeatureState(t,n,a){this._state.removeFeatureState(t=t||"_geojsonTileLayer",n,a)}getFeatureState(t,n){return this._state.getState(t=t||"_geojsonTileLayer",n)}setDependencies(t,n,a){const c=this._tiles[t];c&&c.setDependencies(n,a)}reloadTilesForDependencies(t,n){for(const a in this._tiles)this._tiles[a].hasDependency(t,n)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(t,n))}}function In(u,t){const n=Math.abs(2*u.wrap)-+(u.wrap<0),a=Math.abs(2*t.wrap)-+(t.wrap<0);return u.overscaledZ-t.overscaledZ||a-n||t.canonical.y-u.canonical.y||t.canonical.x-u.canonical.x}function Ii(u){return u==="raster"||u==="image"||u==="video"}en.maxOverzooming=10,en.maxUnderzooming=3;const ti="mapboxgl_preloaded_worker_pool";class Vn{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length{n.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[ti]}numActive(){return Object.keys(this.active).length}}const En=Math.floor(s.h.hardwareConcurrency/2);let Un;function qo(){return Un||(Un=new Vn),Un}Vn.workerCount=s.ac(globalThis)?Math.max(Math.min(En,3),1):1;class So{constructor(t,n){this.reset(t,n)}reset(t,n){this.points=t||[],this._distances=[0];for(let a=1;a0?(c-x)/b:0;return this.points[d].mult(1-S).add(this.points[n].mult(S))}}function Cn(u,t){let n=!0;return u==="always"||u!=="never"&&t!=="never"||(n=!1),n}class $n{constructor(t,n,a){const c=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(t/a),this.yCellCount=Math.ceil(n/a);for(let x=0;xthis.width||c<0||n>this.height)return[];const S=[];if(t<=0&&n<=0&&this.width<=a&&this.height<=c){if(d)return[{key:null,x1:t,y1:n,x2:a,y2:c}];for(let C=0;C0}hitTestCircle(t,n,a,c,d){const x=t-a,b=t+a,S=n-a,C=n+a;if(b<0||x>this.width||C<0||S>this.height)return!1;const A=[];return this._forEachCell(x,S,b,C,this._queryCellCircle,A,{hitTest:!0,overlapMode:c,circle:{x:t,y:n,radius:a},seenUids:{box:{},circle:{}}},d),A.length>0}_queryCell(t,n,a,c,d,x,b,S){const{seenUids:C,hitTest:A,overlapMode:P}=b,R=this.boxCells[d];if(R!==null){const G=this.bboxes;for(const K of R)if(!C.box[K]){C.box[K]=!0;const q=4*K,le=this.boxKeys[K];if(t<=G[q+2]&&n<=G[q+3]&&a>=G[q+0]&&c>=G[q+1]&&(!S||S(le))&&(!A||!Cn(P,le.overlapMode))&&(x.push({key:le,x1:G[q],y1:G[q+1],x2:G[q+2],y2:G[q+3]}),A))return!0}}const W=this.circleCells[d];if(W!==null){const G=this.circles;for(const K of W)if(!C.circle[K]){C.circle[K]=!0;const q=3*K,le=this.circleKeys[K];if(this._circleAndRectCollide(G[q],G[q+1],G[q+2],t,n,a,c)&&(!S||S(le))&&(!A||!Cn(P,le.overlapMode))){const me=G[q],ee=G[q+1],ce=G[q+2];if(x.push({key:le,x1:me-ce,y1:ee-ce,x2:me+ce,y2:ee+ce}),A)return!0}}}return!1}_queryCellCircle(t,n,a,c,d,x,b,S){const{circle:C,seenUids:A,overlapMode:P}=b,R=this.boxCells[d];if(R!==null){const G=this.bboxes;for(const K of R)if(!A.box[K]){A.box[K]=!0;const q=4*K,le=this.boxKeys[K];if(this._circleAndRectCollide(C.x,C.y,C.radius,G[q+0],G[q+1],G[q+2],G[q+3])&&(!S||S(le))&&!Cn(P,le.overlapMode))return x.push(!0),!0}}const W=this.circleCells[d];if(W!==null){const G=this.circles;for(const K of W)if(!A.circle[K]){A.circle[K]=!0;const q=3*K,le=this.circleKeys[K];if(this._circlesCollide(G[q],G[q+1],G[q+2],C.x,C.y,C.radius)&&(!S||S(le))&&!Cn(P,le.overlapMode))return x.push(!0),!0}}}_forEachCell(t,n,a,c,d,x,b,S){const C=this._convertToXCellCoord(t),A=this._convertToYCellCoord(n),P=this._convertToXCellCoord(a),R=this._convertToYCellCoord(c);for(let W=C;W<=P;W++)for(let G=A;G<=R;G++)if(d.call(this,t,n,a,c,this.xCellCount*G+W,x,b,S))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,n,a,c,d,x){const b=c-t,S=d-n,C=a+x;return C*C>b*b+S*S}_circleAndRectCollide(t,n,a,c,d,x,b){const S=(x-c)/2,C=Math.abs(t-(c+S));if(C>S+a)return!1;const A=(b-d)/2,P=Math.abs(n-(d+A));if(P>A+a)return!1;if(C<=S||P<=A)return!0;const R=C-S,W=P-A;return R*R+W*W<=a*a}}function qe(u,t,n,a,c){const d=s.Z();return t?(s.a0(d,d,[1/c,1/c,1]),n||s.ae(d,d,a.angle)):s.a1(d,a.labelPlaneMatrix,u),d}function fn(u,t,n,a,c){if(t){const d=s.af(u);return s.a0(d,d,[c,c,1]),n||s.ae(d,d,-a.angle),d}return a.glCoordMatrix}function er(u,t,n){let a;n?(a=[u.x,u.y,n(u.x,u.y),1],s.ag(a,a,t)):(a=[u.x,u.y,0,1],J(a,a,t));const c=a[3];return{point:new s.P(a[0]/c,a[1]/c),signedDistanceFromCamera:c}}function Zo(u,t){return .5+u/t*.5}function tn(u,t){const n=u[0]/u[3],a=u[1]/u[3];return n>=-t[0]&&n<=t[0]&&a>=-t[1]&&a<=t[1]}function We(u,t,n,a,c,d,x,b,S,C){const A=a?u.textSizeData:u.iconSizeData,P=s.ah(A,n.transform.zoom),R=[256/n.width*2+1,256/n.height*2+1],W=a?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;W.clear();const G=u.lineVertexArray,K=a?u.text.placedSymbolArray:u.icon.placedSymbolArray,q=n.transform.width/n.transform.height;let le=!1;for(let me=0;meMath.abs(n.x-t.x)*a?{useVertical:!0}:(u===s.ai.vertical?t.yn.x)?{needsFlipping:!0}:null}function Vr(u,t,n,a,c,d,x,b,S,C,A,P,R,W,G,K){const q=t/24,le=u.lineOffsetX*q,me=u.lineOffsetY*q;let ee;if(u.numGlyphs>1){const ce=u.glyphStartIndex+u.numGlyphs,ve=u.lineStartIndex,xe=u.lineStartIndex+u.lineLength,Ce=Bt(q,b,le,me,n,A,P,u,S,d,R,G,K);if(!Ce)return{notEnoughRoom:!0};const Fe=er(Ce.first.point,x,K).point,Pe=er(Ce.last.point,x,K).point;if(a&&!n){const je=Mt(u.writingMode,Fe,Pe,W);if(je)return je}ee=[Ce.first];for(let je=u.glyphStartIndex+1;je0?Fe.point:mn(P,Ce,ve,1,c,K),je=Mt(u.writingMode,ve,Pe,W);if(je)return je}const ce=L(q*b.getoffsetX(u.glyphStartIndex),le,me,n,A,P,u.segment,u.lineStartIndex,u.lineStartIndex+u.lineLength,S,d,R,G,K);if(!ce)return{notEnoughRoom:!0};ee=[ce]}for(const ce of ee)s.ak(C,ce.point,ce.angle);return{}}function mn(u,t,n,a,c,d){const x=er(u.add(u.sub(t)._unit()),c,d).point,b=n.sub(x);return n.add(b._mult(a/b.mag()))}function It(u,t){const{projectionCache:n,lineVertexArray:a,labelPlaneMatrix:c,tileAnchorPoint:d,distanceFromAnchor:x,getElevation:b,previousVertex:S,direction:C,absOffsetX:A}=t;if(n.projections[u])return n.projections[u];const P=new s.P(a.getx(u),a.gety(u)),R=er(P,c,b);if(R.signedDistanceFromCamera>0)return n.projections[u]=R.point,R.point;const W=u-C;return mn(x===0?d:new s.P(a.getx(W),a.gety(W)),P,S,A-x+1,c,b)}function Mn(u,t,n){return u._unit()._perp()._mult(t*n)}function X(u,t,n,a,c,d,x,b){const{projectionCache:S,direction:C}=b;if(S.offsets[u])return S.offsets[u];const A=n.add(t);if(u+C=c)return S.offsets[u]=A,A;const P=It(u+C,b),R=Mn(P.sub(n),x,C),W=n.add(R),G=P.add(R);return S.offsets[u]=s.al(d,A,W,G)||A,S.offsets[u]}function L(u,t,n,a,c,d,x,b,S,C,A,P,R,W){const G=a?u-t:u+t;let K=G>0?1:-1,q=0;a&&(K*=-1,q=Math.PI),K<0&&(q+=Math.PI);let le,me,ee=K>0?b+x:b+x+1,ce=c,ve=c,xe=0,Ce=0;const Fe=Math.abs(G),Pe=[];let je;for(;xe+Ce<=Fe;){if(ee+=K,ee=S)return null;xe+=Ce,ve=ce,me=le;const Qe={projectionCache:P,lineVertexArray:C,labelPlaneMatrix:A,tileAnchorPoint:d,distanceFromAnchor:xe,getElevation:W,previousVertex:ve,direction:K,absOffsetX:Fe};if(ce=It(ee,Qe),n===0)Pe.push(ve),je=ce.sub(ve);else{let Ct;const gt=ce.sub(ve);Ct=gt.mag()===0?Mn(It(ee+K,Qe).sub(ce),n,K):Mn(gt,n,K),me||(me=ve.add(Ct)),le=X(ee,Ct,ce,b,S,me,n,Qe),Pe.push(me),je=le.sub(me)}Ce=je.mag()}const dt=je._mult((Fe-xe)/Ce)._add(me||ve),Qt=q+Math.atan2(ce.y-ve.y,ce.x-ve.x);return Pe.push(dt),{point:dt,angle:R?Qt:0,path:Pe}}const F=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function j(u,t){for(let n=0;n=1;jt--)gt.push(Qe.path[jt]);for(let jt=1;jter($t,S,G));gt=jt.some($t=>$t.signedDistanceFromCamera<=0)?[]:jt.map($t=>$t.point)}let Kt=[];if(gt.length>0){const jt=gt[0].clone(),$t=gt[0].clone();for(let pr=1;pr=je.x&&$t.x<=dt.x&&jt.y>=je.y&&$t.y<=dt.y?[gt]:$t.xdt.x||$t.ydt.y?[]:s.am([gt],je.x,je.y,dt.x,dt.y)}for(const jt of Kt){Qt.reset(jt,.25*Pe);let $t=0;$t=Qt.length<=.5*Pe?1:Math.ceil(Qt.paddedLength/Mi)+1;for(let pr=0;pr<$t;pr++){const qi=pr/Math.max($t-1,1),Xr=Qt.lerp(qi),kr=Xr.x+Q,br=Xr.y+Q;K.push(kr,br,Pe,0);const Xn=kr-Pe,Qi=br-Pe,Do=kr+Pe,Fo=br+Pe;if(Fe=Fe&&this.isOffscreen(Xn,Qi,Do,Fo),Ce=Ce||this.isInsideGrid(Xn,Qi,Do,Fo),t!=="always"&&this.grid.hitTestCircle(kr,br,Pe,t,P)&&(xe=!0,!C))return{circles:[],offscreen:!1,collisionDetected:xe}}}}return{circles:!C&&xe||!Ce||me=this.screenRightBoundary||cthis.screenBottomBoundary}isInsideGrid(t,n,a,c){return a>=0&&t=0&&na.collisionGroupID===n}}return this.collisionGroups[t]}}function kt(u,t,n,a,c){const{horizontalAlign:d,verticalAlign:x}=s.au(u);return new s.P(-(d-.5)*t+a[0]*c,-(x-.5)*n+a[1]*c)}function ut(u,t,n,a,c,d){const{x1:x,x2:b,y1:S,y2:C,anchorPointX:A,anchorPointY:P}=u,R=new s.P(t,n);return a&&R._rotate(c?d:-d),{x1:x+R.x,y1:S+R.y,x2:b+R.x,y2:C+R.y,anchorPointX:A,anchorPointY:P}}class vt{constructor(t,n,a,c,d){this.transform=t.clone(),this.terrain=n,this.collisionIndex=new he(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new mt(c),this.collisionCircleArrays={},this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,a,c){const d=a.getBucket(n),x=a.latestFeatureIndex;if(!d||!x||n.id!==d.layerIds[0])return;const b=a.collisionBoxArray,S=d.layers[0].layout,C=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),A=a.tileSize/s.N,P=this.transform.calculatePosMatrix(a.tileID.toUnwrapped()),R=S.get("text-pitch-alignment")==="map",W=S.get("text-rotation-alignment")==="map",G=oe(a,1,this.transform.zoom),K=qe(P,R,W,this.transform,G);let q=null;if(R){const me=fn(P,R,W,this.transform,G);q=s.a1([],this.transform.labelPlaneMatrix,me)}this.retainedQueryData[d.bucketInstanceId]=new Ee(d.bucketInstanceId,x,d.sourceLayerIndex,d.index,a.tileID);const le={bucket:d,layout:S,posMatrix:P,textLabelPlaneMatrix:K,labelToScreenMatrix:q,scale:C,textPixelRatio:A,holdingForFade:a.holdingForFade(),collisionBoxArray:b,partiallyEvaluatedTextSize:s.ah(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(c)for(const me of d.sortKeyRanges){const{sortKey:ee,symbolInstanceStart:ce,symbolInstanceEnd:ve}=me;t.push({sortKey:ee,symbolInstanceStart:ce,symbolInstanceEnd:ve,parameters:le})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:le})}attemptAnchorPlacement(t,n,a,c,d,x,b,S,C,A,P,R,W,G,K,q){const le=s.aq[t.textAnchor],me=[t.textOffset0,t.textOffset1],ee=kt(le,a,c,me,d),ce=this.collisionIndex.placeCollisionBox(ut(n,ee.x,ee.y,x,b,this.transform.angle),P,S,C,A.predicate,q);if((!K||this.collisionIndex.placeCollisionBox(ut(K,ee.x,ee.y,x,b,this.transform.angle),P,S,C,A.predicate,q).box.length!==0)&&ce.box.length>0){let ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID].text&&(ve=this.prevPlacement.variableOffsets[R.crossTileID].anchor),R.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[R.crossTileID]={textOffset:me,width:a,height:c,anchor:le,textBoxScale:d,prevAnchor:ve},this.markUsedJustification(W,le,R,G),W.allowVerticalPlacement&&(this.markUsedOrientation(W,G,R),this.placedOrientations[R.crossTileID]=G),{shift:ee,placedGlyphBoxes:ce}}}placeLayerBucketPart(t,n,a){const{bucket:c,layout:d,posMatrix:x,textLabelPlaneMatrix:b,labelToScreenMatrix:S,textPixelRatio:C,holdingForFade:A,collisionBoxArray:P,partiallyEvaluatedTextSize:R,collisionGroup:W}=t.parameters,G=d.get("text-optional"),K=d.get("icon-optional"),q=s.ar(d,"text-overlap","text-allow-overlap"),le=q==="always",me=s.ar(d,"icon-overlap","icon-allow-overlap"),ee=me==="always",ce=d.get("text-rotation-alignment")==="map",ve=d.get("text-pitch-alignment")==="map",xe=d.get("icon-text-fit")!=="none",Ce=d.get("symbol-z-order")==="viewport-y",Fe=le&&(ee||!c.hasIconData()||K),Pe=ee&&(le||!c.hasTextData()||G);!c.collisionArrays&&P&&c.deserializeCollisionBoxes(P);const je=this.retainedQueryData[c.bucketInstanceId].tileID,dt=this.terrain?(Qe,Ct)=>this.terrain.getElevation(je,Qe,Ct):null,Qt=(Qe,Ct)=>{var gt,Mi;if(n[Qe.crossTileID])return;if(A)return void(this.placements[Qe.crossTileID]=new Te(!1,!1,!1));let Kt=!1,jt=!1,$t=!0,pr=null,qi={box:null,offscreen:null},Xr={box:null,offscreen:null},kr=null,br=null,Xn=null,Qi=0,Do=0,Fo=0;Ct.textFeatureIndex?Qi=Ct.textFeatureIndex:Qe.useRuntimeCollisionCircles&&(Qi=Qe.featureIndex),Ct.verticalTextFeatureIndex&&(Do=Ct.verticalTextFeatureIndex);const _s=Ct.textBox;if(_s){const ln=fr=>{let Pr=s.ai.horizontal;if(c.allowVerticalPlacement&&!fr&&this.prevPlacement){const Ln=this.prevPlacement.placedOrientations[Qe.crossTileID];Ln&&(this.placedOrientations[Qe.crossTileID]=Ln,Pr=Ln,this.markUsedOrientation(c,Pr,Qe))}return Pr},Kr=(fr,Pr)=>{if(c.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&Ct.verticalTextBox){for(const Ln of c.writingModes)if(Ln===s.ai.vertical?(qi=Pr(),Xr=qi):qi=fr(),qi&&qi.box&&qi.box.length)break}else qi=fr()},vn=Qe.textAnchorOffsetStartIndex,Bs=Qe.textAnchorOffsetEndIndex;if(Bs===vn){const fr=(Pr,Ln)=>{const mr=this.collisionIndex.placeCollisionBox(Pr,q,C,x,W.predicate,dt);return mr&&mr.box&&mr.box.length&&(this.markUsedOrientation(c,Ln,Qe),this.placedOrientations[Qe.crossTileID]=Ln),mr};Kr(()=>fr(_s,s.ai.horizontal),()=>{const Pr=Ct.verticalTextBox;return c.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&Pr?fr(Pr,s.ai.vertical):{box:null,offscreen:null}}),ln(qi&&qi.box&&qi.box.length)}else{let fr=s.aq[(Mi=(gt=this.prevPlacement)===null||gt===void 0?void 0:gt.variableOffsets[Qe.crossTileID])===null||Mi===void 0?void 0:Mi.anchor];const Pr=(mr,Ns,ml)=>{const Vc=mr.x2-mr.x1,Uc=mr.y2-mr.y1,wu=Qe.textBoxScale,Jl=xe&&me==="never"?Ns:null;let Ro={box:[],offscreen:!1},Vs=q==="never"?1:2,Oo="never";fr&&Vs++;for(let ao=0;aoPr(_s,Ct.iconBox,s.ai.horizontal),()=>{const mr=Ct.verticalTextBox;return c.allowVerticalPlacement&&!(qi&&qi.box&&qi.box.length)&&Qe.numVerticalGlyphVertices>0&&mr?Pr(mr,Ct.verticalIconBox,s.ai.vertical):{box:null,offscreen:null}}),qi&&(Kt=qi.box,$t=qi.offscreen);const Ln=ln(qi&&qi.box);if(!Kt&&this.prevPlacement){const mr=this.prevPlacement.variableOffsets[Qe.crossTileID];mr&&(this.variableOffsets[Qe.crossTileID]=mr,this.markUsedJustification(c,mr.anchor,Qe,Ln))}}}if(kr=qi,Kt=kr&&kr.box&&kr.box.length>0,$t=kr&&kr.offscreen,Qe.useRuntimeCollisionCircles){const ln=c.text.placedSymbolArray.get(Qe.centerJustifiedTextSymbolIndex),Kr=s.aj(c.textSizeData,R,ln),vn=d.get("text-padding");br=this.collisionIndex.placeCollisionCircles(q,ln,c.lineVertexArray,c.glyphOffsetArray,Kr,x,b,S,a,ve,W.predicate,Qe.collisionCircleDiameter,vn,dt),br.circles.length&&br.collisionDetected&&!a&&s.w("Collisions detected, but collision boxes are not shown"),Kt=le||br.circles.length>0&&!br.collisionDetected,$t=$t&&br.offscreen}if(Ct.iconFeatureIndex&&(Fo=Ct.iconFeatureIndex),Ct.iconBox){const ln=Kr=>{const vn=xe&&pr?ut(Kr,pr.x,pr.y,ce,ve,this.transform.angle):Kr;return this.collisionIndex.placeCollisionBox(vn,me,C,x,W.predicate,dt)};Xr&&Xr.box&&Xr.box.length&&Ct.verticalIconBox?(Xn=ln(Ct.verticalIconBox),jt=Xn.box.length>0):(Xn=ln(Ct.iconBox),jt=Xn.box.length>0),$t=$t&&Xn.offscreen}const Os=G||Qe.numHorizontalGlyphVertices===0&&Qe.numVerticalGlyphVertices===0,Ea=K||Qe.numIconVertices===0;if(Os||Ea?Ea?Os||(jt=jt&&Kt):Kt=jt&&Kt:jt=Kt=jt&&Kt,Kt&&kr&&kr.box&&this.collisionIndex.insertCollisionBox(kr.box,q,d.get("text-ignore-placement"),c.bucketInstanceId,Xr&&Xr.box&&Do?Do:Qi,W.ID),jt&&Xn&&this.collisionIndex.insertCollisionBox(Xn.box,me,d.get("icon-ignore-placement"),c.bucketInstanceId,Fo,W.ID),br&&(Kt&&this.collisionIndex.insertCollisionCircles(br.circles,q,d.get("text-ignore-placement"),c.bucketInstanceId,Qi,W.ID),a)){const ln=c.bucketInstanceId;let Kr=this.collisionCircleArrays[ln];Kr===void 0&&(Kr=this.collisionCircleArrays[ln]=new Ie);for(let vn=0;vn=0;--Ct){const gt=Qe[Ct];Qt(c.symbolInstances.get(gt),c.collisionArrays[gt])}}else for(let Qe=t.symbolInstanceStart;Qe=0&&(t.text.placedSymbolArray.get(b).crossTileID=d>=0&&b!==d?0:a.crossTileID)}markUsedOrientation(t,n,a){const c=n===s.ai.horizontal||n===s.ai.horizontalOnly?n:0,d=n===s.ai.vertical?n:0,x=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const b of x)t.text.placedSymbolArray.get(b).placedOrientation=c;a.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const n=this.prevPlacement;let a=!1;this.prevZoomAdjustment=n?n.zoomAdjustment(this.transform.zoom):0;const c=n?n.symbolFadeChange(t):1,d=n?n.opacities:{},x=n?n.variableOffsets:{},b=n?n.placedOrientations:{};for(const S in this.placements){const C=this.placements[S],A=d[S];A?(this.opacities[S]=new ae(A,c,C.text,C.icon),a=a||C.text!==A.text.placed||C.icon!==A.icon.placed):(this.opacities[S]=new ae(null,c,C.text,C.icon,C.skipFade),a=a||C.text||C.icon)}for(const S in d){const C=d[S];if(!this.opacities[S]){const A=new ae(C,c,!1,!1);A.isHidden()||(this.opacities[S]=A,a=a||C.text.placed||C.icon.placed)}}for(const S in x)this.variableOffsets[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.variableOffsets[S]=x[S]);for(const S in b)this.placedOrientations[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.placedOrientations[S]=b[S]);if(n&&n.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=n?n.lastPlacementChangeTime:t)}updateLayerOpacities(t,n){const a={};for(const c of n){const d=c.getBucket(t);d&&c.latestFeatureIndex&&t.id===d.layerIds[0]&&this.updateBucketOpacities(d,a,c.collisionBoxArray)}}updateBucketOpacities(t,n,a){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const c=t.layers[0],d=c.layout,x=new ae(null,0,!1,!1,!0),b=d.get("text-allow-overlap"),S=d.get("icon-allow-overlap"),C=c._unevaluatedLayout.hasValue("text-variable-anchor")||c._unevaluatedLayout.hasValue("text-variable-anchor-offset"),A=d.get("text-rotation-alignment")==="map",P=d.get("text-pitch-alignment")==="map",R=d.get("icon-text-fit")!=="none",W=new ae(null,0,b&&(S||!t.hasIconData()||d.get("icon-optional")),S&&(b||!t.hasTextData()||d.get("text-optional")),!0);!t.collisionArrays&&a&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(a);const G=(K,q,le)=>{for(let me=0;me0,xe=this.placedOrientations[q.crossTileID],Ce=xe===s.ai.vertical,Fe=xe===s.ai.horizontal||xe===s.ai.horizontalOnly;if(le>0||me>0){const Pe=yr(ce.text);G(t.text,le,Ce?An:Pe),G(t.text,me,Fe?An:Pe);const je=ce.text.isHidden();[q.rightJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.leftJustifiedTextSymbolIndex].forEach(Qe=>{Qe>=0&&(t.text.placedSymbolArray.get(Qe).hidden=je||Ce?1:0)}),q.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(q.verticalPlacedTextSymbolIndex).hidden=je||Fe?1:0);const dt=this.variableOffsets[q.crossTileID];dt&&this.markUsedJustification(t,dt.anchor,q,xe);const Qt=this.placedOrientations[q.crossTileID];Qt&&(this.markUsedJustification(t,"left",q,Qt),this.markUsedOrientation(t,Qt,q))}if(ve){const Pe=yr(ce.icon),je=!(R&&q.verticalPlacedIconSymbolIndex&&Ce);q.placedIconSymbolIndex>=0&&(G(t.icon,q.numIconVertices,je?Pe:An),t.icon.placedSymbolArray.get(q.placedIconSymbolIndex).hidden=ce.icon.isHidden()),q.verticalPlacedIconSymbolIndex>=0&&(G(t.icon,q.numVerticalIconVertices,je?An:Pe),t.icon.placedSymbolArray.get(q.verticalPlacedIconSymbolIndex).hidden=ce.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const Pe=t.collisionArrays[K];if(Pe){let je=new s.P(0,0);if(Pe.textBox||Pe.verticalTextBox){let Qt=!0;if(C){const Qe=this.variableOffsets[ee];Qe?(je=kt(Qe.anchor,Qe.width,Qe.height,Qe.textOffset,Qe.textBoxScale),A&&je._rotate(P?this.transform.angle:-this.transform.angle)):Qt=!1}Pe.textBox&&Ft(t.textCollisionBox.collisionVertexArray,ce.text.placed,!Qt||Ce,je.x,je.y),Pe.verticalTextBox&&Ft(t.textCollisionBox.collisionVertexArray,ce.text.placed,!Qt||Fe,je.x,je.y)}const dt=!!(!Fe&&Pe.verticalIconBox);Pe.iconBox&&Ft(t.iconCollisionBox.collisionVertexArray,ce.icon.placed,dt,R?je.x:0,R?je.y:0),Pe.verticalIconBox&&Ft(t.iconCollisionBox.collisionVertexArray,ce.icon.placed,!dt,R?je.x:0,R?je.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const K=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=K.invProjMatrix,t.placementViewportMatrix=K.viewportMatrix,t.collisionCircleArray=K.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(t){return this.fadeDuration===0?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTimet}setStale(){this.stale=!0}}function Ft(u,t,n,a,c){u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0)}const mi=Math.pow(2,25),Ut=Math.pow(2,24),si=Math.pow(2,17),ii=Math.pow(2,16),Ur=Math.pow(2,9),Ei=Math.pow(2,8),ur=Math.pow(2,1);function yr(u){if(u.opacity===0&&!u.placed)return 0;if(u.opacity===1&&u.placed)return 4294967295;const t=u.placed?1:0,n=Math.floor(127*u.opacity);return n*mi+t*Ut+n*si+t*ii+n*Ur+t*Ei+n*ur+t}const An=0;class xs{constructor(t){this._sortAcrossTiles=t.layout.get("symbol-z-order")!=="viewport-y"&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,n,a,c,d){const x=this._bucketParts;for(;this._currentTileIndexb.sortKey-S.sortKey));this._currentPartIndex!this._forceFullPlacement&&s.h.now()-c>2;for(;this._currentPlacementIndex>=0;){const x=n[t[this._currentPlacementIndex]],b=this.placement.collisionIndex.transform.zoom;if(x.type==="symbol"&&(!x.minzoom||x.minzoom<=b)&&(!x.maxzoom||x.maxzoom>b)){if(this._inProgressLayer||(this._inProgressLayer=new xs(x)),this._inProgressLayer.continuePlacement(a[x.source],this.placement,this._showCollisionBoxes,x,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const Io=512/s.N/2;class vr{constructor(t,n,a){this.tileID=t,this.bucketInstanceId=a,this._symbolsByKey={};const c=new Map;for(let d=0;d({x:Math.floor(S.anchorX*Io),y:Math.floor(S.anchorY*Io)})),crossTileIDs:x.map(S=>S.crossTileID)};if(b.positions.length>128){const S=new s.av(b.positions.length,16,Uint16Array);for(const{x:C,y:A}of b.positions)S.add(C,A);S.finish(),delete b.positions,b.index=S}this._symbolsByKey[d]=b}}getScaledCoordinates(t,n){const{x:a,y:c,z:d}=this.tileID.canonical,{x,y:b,z:S}=n.canonical,C=Io/Math.pow(2,S-d),A=(b*s.N+t.anchorY)*C,P=c*s.N*Io;return{x:Math.floor((x*s.N+t.anchorX)*C-a*s.N*Io),y:Math.floor(A-P)}}findMatches(t,n,a){const c=this.tileID.canonical.zt)}}class gi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ea{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const n=Math.round((t-this.lng)/360);if(n!==0)for(const a in this.indexes){const c=this.indexes[a],d={};for(const x in c){const b=c[x];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+n),d[b.tileID.key]=b}this.indexes[a]=d}this.lng=t}addBucket(t,n,a){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===n.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let d=0;dt.overscaledZ)for(const b in x){const S=x[b];S.tileID.isChildOf(t)&&S.findMatches(n.symbolInstances,t,c)}else{const b=x[t.scaledTo(Number(d)).key];b&&b.findMatches(n.symbolInstances,t,c)}}for(let d=0;d{n[a]=!0});for(const a in this.layerIndexes)n[a]||delete this.layerIndexes[a]}}const ji=(u,t)=>s.x(u,t&&t.filter(n=>n.identifier!=="source.canvas")),jr=s.F(s.ax,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setGlyphs","setSprite"]),Go=s.F(s.ax,["setCenter","setZoom","setBearing","setPitch"]),Tr=s.aw();class Ir extends s.E{constructor(t,n={}){super(),this.map=t,this.dispatcher=new zi(qo(),this,t._getMapId()),this.imageManager=new Ge,this.imageManager.setEventedParent(this),this.glyphManager=new Lt(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new Nr(256,512),this.crossTileSymbolIndex=new jn,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.ay,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",s.az());const a=this;this._rtlTextPluginCallback=Ir.registerForPluginStateChange(c=>{a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:c.pluginStatus,pluginURL:c.pluginURL},(d,x)=>{if(s.aA(d),x&&x.every(b=>b))for(const b in a.sourceCaches){const S=a.sourceCaches[b].getSource().type;S!=="vector"&&S!=="geojson"||a.sourceCaches[b].reload()}})}),this.on("data",c=>{if(c.dataType!=="source"||c.sourceDataType!=="metadata")return;const d=this.sourceCaches[c.sourceId];if(!d)return;const x=d.getSource();if(x&&x.vectorLayerIds)for(const b in this._layers){const S=this._layers[b];S.source===x.id&&this._validateLayer(S)}})}loadURL(t,n={},a){this.fire(new s.k("dataloading",{dataType:"style"})),n.validate=typeof n.validate!="boolean"||n.validate;const c=this.map._requestManager.transformRequest(t,et.Style);this._request=s.f(c,(d,x)=>{this._request=null,d?this.fire(new s.j(d)):x&&this._load(x,n,a)})}loadJSON(t,n={},a){this.fire(new s.k("dataloading",{dataType:"style"})),this._request=s.h.frame(()=>{this._request=null,n.validate=n.validate!==!1,this._load(t,n,a)})}loadEmpty(){this.fire(new s.k("dataloading",{dataType:"style"})),this._load(Tr,{validate:!1})}_load(t,n,a){var c;const d=n.transformStyle?n.transformStyle(a,t):t;if(!n.validate||!ji(this,s.y(d))){this._loaded=!0,this.stylesheet=d;for(const x in d.sources)this.addSource(x,d.sources[x],{validate:!1});d.sprite?this._loadSprite(d.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(d.glyphs),this._createLayers(),this.light=new $r(this.stylesheet.light),this.map.setTerrain((c=this.stylesheet.terrain)!==null&&c!==void 0?c:null),this.fire(new s.k("data",{dataType:"style"})),this.fire(new s.k("style.load"))}}_createLayers(){const t=s.aB(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",t),this._order=t.map(n=>n.id),this._layers={},this._serializedLayers=null;for(const n of t){const a=s.aC(n);a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a}}_loadSprite(t,n=!1,a=void 0){this.imageManager.setLoaded(!1),this._spriteRequest=function(c,d,x,b){const S=Nt(c),C=S.length,A=x>1?"@2x":"",P={},R={},W={};for(const{id:G,url:K}of S){const q=d.transformRequest(d.normalizeSpriteURL(K,A,".json"),et.SpriteJSON),le=`${G}_${q.url}`;P[le]=s.f(q,(ce,ve)=>{delete P[le],R[G]=ve,Jt(b,R,W,ce,C)});const me=d.transformRequest(d.normalizeSpriteURL(K,A,".png"),et.SpriteImage),ee=`${G}_${me.url}`;P[ee]=Ne.getImage(me,(ce,ve)=>{delete P[ee],W[G]=ve,Jt(b,R,W,ce,C)})}return{cancel(){for(const G of Object.values(P))G.cancel()}}}(t,this.map._requestManager,this.map.getPixelRatio(),(c,d)=>{if(this._spriteRequest=null,c)this.fire(new s.j(c));else if(d)for(const x in d){this._spritesImagesIds[x]=[];const b=this._spritesImagesIds[x]?this._spritesImagesIds[x].filter(S=>!(S in d)):[];for(const S of b)this.imageManager.removeImage(S),this._changedImages[S]=!0;for(const S in d[x]){const C=x==="default"?S:`${x}:${S}`;this._spritesImagesIds[x].push(C),C in this.imageManager.images?this.imageManager.updateImage(C,d[x][S],!1):this.imageManager.addImage(C,d[x][S]),n&&(this._changedImages[C]=!0)}}this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"})),a&&a(c)})}_unloadSprite(){for(const t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const a=t.sourceLayer;if(!a)return;const c=n.getSource();(c.type==="geojson"||c.vectorLayerIds&&c.vectorLayerIds.indexOf(a)===-1)&&this.fire(new s.j(new Error(`Source layer "${a}" does not exist on source "${c.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(t){const n=this._serializedAllLayers();if(!t||t.length===0)return Object.values(n);const a=[];for(const c of t)n[c]&&a.push(n[c]);return a}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const n=Object.keys(this._layers);for(const a of n){const c=this._layers[a];c.type!=="custom"&&(t[a]=c.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const c=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(c.length||d.length)&&this._updateWorkerLayers(c,d);for(const x in this._updatedSources){const b=this._updatedSources[x];if(b==="reload")this._reloadSource(x);else{if(b!=="clear")throw new Error(`Invalid action ${b}`);this._clearSource(x)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const x in this._updatedPaintProps)this._layers[x].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const a={};for(const c in this.sourceCaches){const d=this.sourceCaches[c];a[c]=d.used,d.used=!1}for(const c of this._order){const d=this._layers[c];d.recalculate(t,this._availableImages),!d.isHidden(t.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const c in a){const d=this.sourceCaches[c];a[c]!==d.used&&d.fire(new s.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:c}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new s.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,n){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(t),removedIds:n})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,n={}){this._checkLoaded();const a=this.serialize();if(t=n.transformStyle?n.transformStyle(a,t):t,ji(this,s.y(t)))return!1;(t=s.aD(t)).layers=s.aB(t.layers);const c=s.aE(a,t).filter(x=>!(x.command in Go));if(c.length===0)return!1;const d=c.filter(x=>!(x.command in jr));if(d.length>0)throw new Error(`Unimplemented: ${d.map(x=>x.command).join(", ")}.`);for(const x of c)x.command!=="setTransition"&&this[x.command].apply(this,x.args);return this.stylesheet=t,this._serializedLayers=null,!0}addImage(t,n){if(this.getImage(t))return this.fire(new s.j(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(t,n){this.imageManager.updateImage(t,n)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new s.j(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,a={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(s.y.source,`sources.${t}`,n,null,a))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const c=this.sourceCaches[t]=new en(t,n,this.dispatcher);c.style=this,c.setEventedParent(this,()=>({isSourceLoaded:c.loaded(),source:c.serialize(),sourceId:t})),c.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===t)return this.fire(new s.j(new Error(`Source "${t}" cannot be removed while layer "${a}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new s.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,n){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);const a=this.sourceCaches[t].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(n),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,n,a={}){this._checkLoaded();const c=t.id;if(this.getLayer(c))return void this.fire(new s.j(new Error(`Layer "${c}" already exists on this map.`)));let d;if(t.type==="custom"){if(ji(this,s.aF(t)))return;d=s.aC(t)}else{if("source"in t&&typeof t.source=="object"&&(this.addSource(c,t.source),t=s.aD(t),t=s.e(t,{source:c})),this._validate(s.y.layer,`layers.${c}`,t,{arrayIndex:-1},a))return;d=s.aC(t),this._validateLayer(d),d.setEventedParent(this,{layer:{id:c}})}const x=n?this._order.indexOf(n):this._order.length;if(n&&x===-1)this.fire(new s.j(new Error(`Cannot add layer "${c}" before non-existing layer "${n}".`)));else{if(this._order.splice(x,0,c),this._layerOrderChanged=!0,this._layers[c]=d,this._removedLayers[c]&&d.source&&d.type!=="custom"){const b=this._removedLayers[c];delete this._removedLayers[c],b.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new s.j(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const a=this._order.indexOf(t);this._order.splice(a,1);const c=n?this._order.indexOf(n):this._order.length;n&&c===-1?this.fire(new s.j(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(c,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new s.j(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const a=this._order.indexOf(t);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(t){return this._layers[t]}getLayersOrder(){return[...this._order]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,n,a){this._checkLoaded();const c=this.getLayer(t);c?c.minzoom===n&&c.maxzoom===a||(n!=null&&(c.minzoom=n),a!=null&&(c.maxzoom=a),this._updateLayer(c)):this.fire(new s.j(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,a={}){this._checkLoaded();const c=this.getLayer(t);if(c){if(!s.aG(c.filter,n))return n==null?(c.filter=void 0,void this._updateLayer(c)):void(this._validate(s.y.filter,`layers.${c.id}.filter`,n,null,a)||(c.filter=s.aD(n),this._updateLayer(c)))}else this.fire(new s.j(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return s.aD(this.getLayer(t).filter)}setLayoutProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?s.aG(d.getLayoutProperty(n),a)||(d.setLayoutProperty(n,a,c),this._updateLayer(d)):this.fire(new s.j(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const a=this.getLayer(t);if(a)return a.getLayoutProperty(n);this.fire(new s.j(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?s.aG(d.getPaintProperty(n),a)||(d.setPaintProperty(n,a,c)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new s.j(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,n){return this.getLayer(t).getPaintProperty(n)}setFeatureState(t,n){this._checkLoaded();const a=t.source,c=t.sourceLayer,d=this.sourceCaches[a];if(d===void 0)return void this.fire(new s.j(new Error(`The source '${a}' does not exist in the map's style.`)));const x=d.getSource().type;x==="geojson"&&c?this.fire(new s.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):x!=="vector"||c?(t.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),d.setFeatureState(c,t.id,n)):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const a=t.source,c=this.sourceCaches[a];if(c===void 0)return void this.fire(new s.j(new Error(`The source '${a}' does not exist in the map's style.`)));const d=c.getSource().type,x=d==="vector"?t.sourceLayer:void 0;d!=="vector"||x?n&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new s.j(new Error("A feature id is required to remove its specific state property."))):c.removeFeatureState(x,t.id,n):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,a=t.sourceLayer,c=this.sourceCaches[n];if(c!==void 0)return c.getSource().type!=="vector"||a?(t.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),c.getFeatureState(a,t.id)):void this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.j(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const t=s.aH(this.sourceCaches,d=>d.serialize()),n=this._serializeByIds(this._order),a=this.map.getTerrain()||void 0,c=this.stylesheet;return s.aI({version:c.version,name:c.name,metadata:c.metadata,light:c.light,center:c.center,zoom:c.zoom,bearing:c.bearing,pitch:c.pitch,sprite:c.sprite,glyphs:c.glyphs,transition:c.transition,sources:t,layers:n,terrain:a},d=>d!==void 0)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&this.sourceCaches[t.source].getSource().type!=="raster"&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){const n=x=>this._layers[x].type==="fill-extrusion",a={},c=[];for(let x=this._order.length-1;x>=0;x--){const b=this._order[x];if(n(b)){a[b]=x;for(const S of t){const C=S[b];if(C)for(const A of C)c.push(A)}}}c.sort((x,b)=>b.intersectionZ-x.intersectionZ);const d=[];for(let x=this._order.length-1;x>=0;x--){const b=this._order[x];if(n(b))for(let S=c.length-1;S>=0;S--){const C=c[S].feature;if(a[C.layer.id]{const Fe=le.featureSortOrder;if(Fe){const Pe=Fe.indexOf(xe.featureIndex);return Fe.indexOf(Ce.featureIndex)-Pe}return Ce.featureIndex-xe.featureIndex});for(const xe of ve)ce.push(xe)}}for(const le in G)G[le].forEach(me=>{const ee=me.feature,ce=C[b[le].source].getFeatureState(ee.layer["source-layer"],ee.id);ee.source=ee.layer.source,ee.layer["source-layer"]&&(ee.sourceLayer=ee.layer["source-layer"]),ee.state=ce});return G}(this._layers,x,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(t,n){n&&n.filter&&this._validate(s.y.filter,"querySourceFeatures.filter",n.filter,null,n);const a=this.sourceCaches[t];return a?function(c,d){const x=c.getRenderableIds().map(C=>c.getTileByID(C)),b=[],S={};for(let C=0;C{Ue[c]=d})(t,n),n.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:n.workerSourceURL},a):a(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const a=this.light.getLight();let c=!1;for(const x in t)if(!s.aG(t[x],a[x])){c=!0;break}if(!c)return;const d={now:s.h.now(),transition:s.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(d)}_validate(t,n,a,c,d={}){return(!d||d.validate!==!1)&&ji(this,t.call(s.y,s.e({key:n,style:this.serialize(),value:a,styleSpec:s.v},c)))}_remove(t=!0){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),s.aJ.off("pluginStateChange",this._rtlTextPluginCallback);for(const n in this._layers)this._layers[n].setEventedParent(null);for(const n in this.sourceCaches){const a=this.sourceCaches[n];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove(t)}_clearSource(t){this.sourceCaches[t].clearTiles()}_reloadSource(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}_updateSources(t){for(const n in this.sourceCaches)this.sourceCaches[n].update(t,this.map.terrain)}_generateCollisionBoxes(){for(const t in this.sourceCaches)this._reloadSource(t)}_updatePlacement(t,n,a,c,d=!1){let x=!1,b=!1;const S={};for(const C of this._order){const A=this._layers[C];if(A.type!=="symbol")continue;if(!S[A.source]){const R=this.sourceCaches[A.source];S[A.source]=R.getRenderableIds(!0).map(W=>R.getTileByID(W)).sort((W,G)=>G.tileID.overscaledZ-W.tileID.overscaledZ||(W.tileID.isLessThan(G.tileID)?-1:1))}const P=this.crossTileSymbolIndex.addLayer(A,S[A.source],t.center.lng);x=x||P}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(s.h.now(),t.zoom))&&(this.pauseablePlacement=new To(t,this.map.terrain,this._order,d,n,a,c,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,S),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(s.h.now()),b=!0),x&&this.pauseablePlacement.placement.setStale()),b||x)for(const C of this._order){const A=this._layers[C];A.type==="symbol"&&this.placement.updateLayerOpacities(A,S[A.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(s.h.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,n,a){this.imageManager.getImages(n.icons,a),this._updateTilesForChangedImages();const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,n.icons)}getGlyphs(t,n,a){this.glyphManager.getGlyphs(n.stacks,a);const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,[""])}getResource(t,n,a){return s.m(n,a)}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,n={}){this._checkLoaded(),t&&this._validate(s.y.glyphs,"glyphs",t,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,n,a={},c){this._checkLoaded();const d=[{id:t,url:n}],x=[...Nt(this.stylesheet.sprite),...d];this._validate(s.y.sprite,"sprite",x,null,a)||(this.stylesheet.sprite=x,this._loadSprite(d,!0,c))}removeSprite(t){this._checkLoaded();const n=Nt(this.stylesheet.sprite);if(n.find(a=>a.id===t)){if(this._spritesImagesIds[t])for(const a of this._spritesImagesIds[t])this.imageManager.removeImage(a),this._changedImages[a]=!0;n.splice(n.findIndex(a=>a.id===t),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}else this.fire(new s.j(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return Nt(this.stylesheet.sprite)}setSprite(t,n={},a){this._checkLoaded(),t&&this._validate(s.y.sprite,"sprite",t,null,n)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,a):(this._unloadSprite(),a&&a(null)))}}Ir.registerForPluginStateChange=s.aK;var ta=s.Q([{name:"a_pos",type:"Int16",components:2}]),os="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 Gi={prelude:ui(`#ifdef GL_ES +var a_=Object.defineProperty;var l_=(m,f,_)=>f in m?a_(m,f,{enumerable:!0,configurable:!0,writable:!0,value:_}):m[f]=_;var Nn=(m,f,_)=>(l_(m,typeof f!="symbol"?f+"":f,_),_);(function(){const f=document.createElement("link").relList;if(f&&f.supports&&f.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))v(E);new MutationObserver(E=>{for(const k of E)if(k.type==="childList")for(const B of k.addedNodes)B.tagName==="LINK"&&B.rel==="modulepreload"&&v(B)}).observe(document,{childList:!0,subtree:!0});function _(E){const k={};return E.integrity&&(k.integrity=E.integrity),E.referrerPolicy&&(k.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?k.credentials="include":E.crossOrigin==="anonymous"?k.credentials="omit":k.credentials="same-origin",k}function v(E){if(E.ep)return;E.ep=!0;const k=_(E);fetch(E.href,k)}})();function Ar(){}function c_(m,f){for(const _ in f)m[_]=f[_];return m}function Np(m){return m()}function pp(){return Object.create(null)}function Ra(m){m.forEach(Np)}function Th(m){return typeof m=="function"}function Tr(m,f){return m!=m?f==f:m!==f||m&&typeof m=="object"||typeof m=="function"}function u_(m){return Object.keys(m).length===0}function Vp(m,...f){if(m==null){for(const v of f)v(void 0);return Ar}const _=m.subscribe(...f);return _.unsubscribe?()=>_.unsubscribe():_}function h_(m){let f;return Vp(m,_=>f=_)(),f}function $r(m,f,_){m.$$.on_destroy.push(Vp(f,_))}function Js(m,f,_,v){if(m){const E=Up(m,f,_,v);return m[0](E)}}function Up(m,f,_,v){return m[1]&&v?c_(_.ctx.slice(),m[1](v(f))):_.ctx}function Ys(m,f,_,v){if(m[2]&&v){const E=m[2](v(_));if(f.dirty===void 0)return E;if(typeof E=="object"){const k=[],B=Math.max(f.dirty.length,E.length);for(let s=0;s32){const f=[],_=m.ctx.length/32;for(let v=0;v<_;v++)f[v]=-1;return f}return-1}function d_(m){const f={};for(const _ in m)f[_]=!0;return f}function fp(m){return m??""}function rl(m,f,_){return m.set(_),f}function p_(m){return m&&Th(m.destroy)?m.destroy:Ar}function mi(m,f){m.appendChild(f)}function ci(m,f,_){m.insertBefore(f,_||null)}function si(m){m.parentNode&&m.parentNode.removeChild(m)}function f_(m,f){for(let _=0;_m.removeEventListener(f,_,v)}function vs(m,f,_){_==null?m.removeAttribute(f):m.getAttribute(f)!==_&&m.setAttribute(f,_)}function m_(m){return Array.from(m.childNodes)}function yh(m,f){f=""+f,m.data!==f&&(m.data=f)}function Uo(m,f){m.value=f??""}function Ic(m,f,_,v){_==null?m.style.removeProperty(f):m.style.setProperty(f,_,v?"important":"")}function mp(m,f,_){for(let v=0;v{const E=m.$$.callbacks[f];if(E){const k=g_(f,_,{cancelable:v});return E.slice().forEach(B=>{B.call(m,k)}),!k.defaultPrevented}return!0}}function qp(m,f){return Pc().$$.context.set(m,f),f}function y_(m){return Pc().$$.context.get(m)}function pn(m,f){const _=m.$$.callbacks[f.type];_&&_.slice().forEach(v=>v.call(this,f))}const Ml=[],ea=[];let Pl=[];const vh=[],Zp=Promise.resolve();let xh=!1;function Gp(){xh||(xh=!0,Zp.then(Wp))}function v_(){return Gp(),Zp}function _u(m){Pl.push(m)}function zc(m){vh.push(m)}const dh=new Set;let El=0;function Wp(){if(El!==0)return;const m=kc;do{try{for(;Elm.indexOf(v)===-1?f.push(v):_.push(v)),_.forEach(v=>v()),Pl=f}const du=new Set;let il;function rs(){il={r:0,c:[],p:il}}function ns(){il.r||Ra(il.c),il=il.p}function ft(m,f){m&&m.i&&(du.delete(m),m.i(f))}function St(m,f,_,v){if(m&&m.o){if(du.has(m))return;du.add(m),il.c.push(()=>{du.delete(m),v&&(_&&m.d(1),v())}),m.o(f)}else v&&v()}function gp(m){return(m==null?void 0:m.length)!==void 0?m:Array.from(m)}function Lc(m,f,_){const v=m.$$.props[f];v!==void 0&&(m.$$.bound[v]=_,_(m.$$.ctx[v]))}function Ri(m){m&&m.c()}function Ai(m,f,_){const{fragment:v,after_update:E}=m.$$;v&&v.m(f,_),_u(()=>{const k=m.$$.on_mount.map(Np).filter(Th);m.$$.on_destroy?m.$$.on_destroy.push(...k):Ra(k),m.$$.on_mount=[]}),E.forEach(_u)}function ki(m,f){const _=m.$$;_.fragment!==null&&(b_(_.after_update),Ra(_.on_destroy),_.fragment&&_.fragment.d(f),_.on_destroy=_.fragment=null,_.ctx=[])}function w_(m,f){m.$$.dirty[0]===-1&&(Ml.push(m),Gp(),m.$$.dirty.fill(0)),m.$$.dirty[f/31|0]|=1<{const De=Ie.length?Ie[0]:_e;return V.ctx&&E(V.ctx[be],V.ctx[be]=De)&&(!V.skip_bound&&V.bound[be]&&V.bound[be](De),ge&&w_(m,be)),_e}):[],V.update(),ge=!0,Ra(V.before_update),V.fragment=v?v(V.ctx):!1,f.target){if(f.hydrate){const be=m_(f.target);V.fragment&&V.fragment.l(be),be.forEach(si)}else V.fragment&&V.fragment.c();f.intro&&ft(m.$$.fragment),Ai(m,f.target,f.anchor),Wp()}Ec(H)}class Wr{constructor(){Nn(this,"$$");Nn(this,"$$set")}$destroy(){ki(this,1),this.$destroy=Ar}$on(f,_){if(!Th(_))return Ar;const v=this.$$.callbacks[f]||(this.$$.callbacks[f]=[]);return v.push(_),()=>{const E=v.indexOf(_);E!==-1&&v.splice(E,1)}}$set(f){this.$$set&&!u_(f)&&(this.$$.skip_bound=!0,this.$$set(f),this.$$.skip_bound=!1)}}const S_="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(S_);function Hp(m,f,_){if(m!==null)for(var v,E,k,B,s,H,V,ge=0,be=0,_e,Ie=m.type,De=Ie==="FeatureCollection",Fe=Ie==="Feature",Ne=De?m.features.length:1,et=0;et_[0]&&(f[0]=_[0]),f[1]>_[1]&&(f[1]=_[1]),f[2]<_[0]&&(f[2]=_[0]),f[3]<_[1]&&(f[3]=_[1])}),f}bh.default=bh;let _i;const Ws=new Array(128).fill(void 0);Ws.push(void 0,null,!0,!1);function Wt(m){return Ws[m]}let Cc=Ws.length;function T_(m){m<132||(Ws[m]=Cc,Cc=m)}function gc(m){const f=Wt(m);return T_(m),f}let nl=0,yc=null;function zl(){return(yc===null||yc.byteLength===0)&&(yc=new Uint8Array(_i.memory.buffer)),yc}const pu=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},I_=typeof pu.encodeInto=="function"?function(m,f){return pu.encodeInto(m,f)}:function(m,f){const _=pu.encode(m);return f.set(_),{read:m.length,written:_.length}};function ph(m,f,_){if(_===void 0){const s=pu.encode(m),H=f(s.length,1)>>>0;return zl().subarray(H,H+s.length).set(s),nl=s.length,H}let v=m.length,E=f(v,1)>>>0;const k=zl();let B=0;for(;B127)break;k[E+B]=s}if(B!==v){B!==0&&(m=m.slice(B)),E=_(E,v,v=B+m.length*3,1)>>>0;const s=zl().subarray(E+B,E+v),H=I_(m,s);B+=H.written}return nl=B,E}function mc(m){return m==null}let vc=null;function Sr(){return(vc===null||vc.byteLength===0)&&(vc=new Int32Array(_i.memory.buffer)),vc}const Xp=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Xp.decode();function kl(m,f){return m=m>>>0,Xp.decode(zl().subarray(m,m+f))}function Nr(m){Cc===Ws.length&&Ws.push(Ws.length+1);const f=Cc;return Cc=Ws[f],Ws[f]=m,f}let xc=null;function E_(){return(xc===null||xc.byteLength===0)&&(xc=new Float64Array(_i.memory.buffer)),xc}let bc=null;function C_(){return(bc===null||bc.byteLength===0)&&(bc=new BigInt64Array(_i.memory.buffer)),bc}function wh(m){const f=typeof m;if(f=="number"||f=="boolean"||m==null)return`${m}`;if(f=="string")return`"${m}"`;if(f=="symbol"){const E=m.description;return E==null?"Symbol":`Symbol(${E})`}if(f=="function"){const E=m.name;return typeof E=="string"&&E.length>0?`Function(${E})`:"Function"}if(Array.isArray(m)){const E=m.length;let k="[";E>0&&(k+=wh(m[0]));for(let B=1;B1)v=_[1];else return toString.call(m);if(v=="Object")try{return"Object("+JSON.stringify(m)+")"}catch{return"Object"}return m instanceof Error?`${m.name}: ${m.message} +${m.stack}`:v}function M_(m,f){const _=f(m.length*1,1)>>>0;return zl().set(m,_/1),nl=m.length,_}function A_(m,f){return m=m>>>0,zl().subarray(m/1,m/1+f)}function fh(m,f){try{return m.apply(this,f)}catch(_){_i.__wbindgen_exn_store(Nr(_))}}class k_{__destroy_into_raw(){const f=this.__wbg_ptr;return this.__wbg_ptr=0,f}free(){const f=this.__destroy_into_raw();_i.__wbg_mapmodel_free(f)}constructor(f){try{const k=_i.__wbindgen_add_to_stack_pointer(-16),B=M_(f,_i.__wbindgen_malloc),s=nl;_i.mapmodel_new(k,B,s);var _=Sr()[k/4+0],v=Sr()[k/4+1],E=Sr()[k/4+2];if(E)throw gc(v);return this.__wbg_ptr=_>>>0,this}finally{_i.__wbindgen_add_to_stack_pointer(16)}}render(){let f,_;try{const V=_i.__wbindgen_add_to_stack_pointer(-16);_i.mapmodel_render(V,this.__wbg_ptr);var v=Sr()[V/4+0],E=Sr()[V/4+1],k=Sr()[V/4+2],B=Sr()[V/4+3],s=v,H=E;if(B)throw s=0,H=0,gc(k);return f=s,_=H,kl(s,H)}finally{_i.__wbindgen_add_to_stack_pointer(16),_i.__wbindgen_free(f,_,1)}}toRouteSnapper(){try{const E=_i.__wbindgen_add_to_stack_pointer(-16);_i.mapmodel_toRouteSnapper(E,this.__wbg_ptr);var f=Sr()[E/4+0],_=Sr()[E/4+1],v=A_(f,_).slice();return _i.__wbindgen_free(f,_*1,1),v}finally{_i.__wbindgen_add_to_stack_pointer(16)}}analyzeNeighbourhood(f){let _,v;try{const ge=_i.__wbindgen_add_to_stack_pointer(-16);_i.mapmodel_analyzeNeighbourhood(ge,this.__wbg_ptr,Nr(f));var E=Sr()[ge/4+0],k=Sr()[ge/4+1],B=Sr()[ge/4+2],s=Sr()[ge/4+3],H=E,V=k;if(s)throw H=0,V=0,gc(B);return _=H,v=V,kl(H,V)}finally{_i.__wbindgen_add_to_stack_pointer(16),_i.__wbindgen_free(_,v,1)}}addModalFilter(f){try{const E=_i.__wbindgen_add_to_stack_pointer(-16);_i.mapmodel_addModalFilter(E,this.__wbg_ptr,Nr(f));var _=Sr()[E/4+0],v=Sr()[E/4+1];if(v)throw gc(_)}finally{_i.__wbindgen_add_to_stack_pointer(16)}}}async function P_(m,f){if(typeof Response=="function"&&m instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(m,f)}catch(v){if(m.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",v);else throw v}const _=await m.arrayBuffer();return await WebAssembly.instantiate(_,f)}else{const _=await WebAssembly.instantiate(m,f);return _ instanceof WebAssembly.Instance?{instance:_,module:m}:_}}function z_(){const m={};return m.wbg={},m.wbg.__wbindgen_object_drop_ref=function(f){gc(f)},m.wbg.__wbindgen_string_get=function(f,_){const v=Wt(_),E=typeof v=="string"?v:void 0;var k=mc(E)?0:ph(E,_i.__wbindgen_malloc,_i.__wbindgen_realloc),B=nl;Sr()[f/4+1]=B,Sr()[f/4+0]=k},m.wbg.__wbindgen_error_new=function(f,_){const v=new Error(kl(f,_));return Nr(v)},m.wbg.__wbindgen_string_new=function(f,_){const v=kl(f,_);return Nr(v)},m.wbg.__wbindgen_boolean_get=function(f){const _=Wt(f);return typeof _=="boolean"?_?1:0:2},m.wbg.__wbindgen_is_bigint=function(f){return typeof Wt(f)=="bigint"},m.wbg.__wbindgen_bigint_from_i64=function(f){return Nr(f)},m.wbg.__wbindgen_jsval_eq=function(f,_){return Wt(f)===Wt(_)},m.wbg.__wbindgen_bigint_from_u64=function(f){const _=BigInt.asUintN(64,f);return Nr(_)},m.wbg.__wbindgen_number_get=function(f,_){const v=Wt(_),E=typeof v=="number"?v:void 0;E_()[f/8+1]=mc(E)?0:E,Sr()[f/4+0]=!mc(E)},m.wbg.__wbindgen_is_object=function(f){const _=Wt(f);return typeof _=="object"&&_!==null},m.wbg.__wbindgen_in=function(f,_){return Wt(f)in Wt(_)},m.wbg.__wbindgen_is_undefined=function(f){return Wt(f)===void 0},m.wbg.__wbindgen_object_clone_ref=function(f){const _=Wt(f);return Nr(_)},m.wbg.__wbindgen_jsval_loose_eq=function(f,_){return Wt(f)==Wt(_)},m.wbg.__wbg_getwithrefkey_3b3c46ba20582127=function(f,_){const v=Wt(f)[Wt(_)];return Nr(v)},m.wbg.__wbg_debug_34c9290896ec9856=function(f){console.debug(Wt(f))},m.wbg.__wbg_error_e60eff06f24ab7a4=function(f){console.error(Wt(f))},m.wbg.__wbg_info_d7d58472d0bab115=function(f){console.info(Wt(f))},m.wbg.__wbg_log_a4530b4fe289336f=function(f){console.log(Wt(f))},m.wbg.__wbg_warn_f260f49434e45e62=function(f){console.warn(Wt(f))},m.wbg.__wbg_get_f01601b5a68d10e3=function(f,_){const v=Wt(f)[_>>>0];return Nr(v)},m.wbg.__wbg_length_1009b1af0c481d7b=function(f){return Wt(f).length},m.wbg.__wbindgen_is_function=function(f){return typeof Wt(f)=="function"},m.wbg.__wbg_next_9b877f231f476d01=function(f){const _=Wt(f).next;return Nr(_)},m.wbg.__wbg_next_6529ee0cca8d57ed=function(){return fh(function(f){const _=Wt(f).next();return Nr(_)},arguments)},m.wbg.__wbg_done_5fe336b092d60cf2=function(f){return Wt(f).done},m.wbg.__wbg_value_0c248a78fdc8e19f=function(f){const _=Wt(f).value;return Nr(_)},m.wbg.__wbg_iterator_db7ca081358d4fb2=function(){return Nr(Symbol.iterator)},m.wbg.__wbg_get_7b48513de5dc5ea4=function(){return fh(function(f,_){const v=Reflect.get(Wt(f),Wt(_));return Nr(v)},arguments)},m.wbg.__wbg_call_90c26b09837aba1c=function(){return fh(function(f,_){const v=Wt(f).call(Wt(_));return Nr(v)},arguments)},m.wbg.__wbg_isArray_74fb723e24f76012=function(f){return Array.isArray(Wt(f))},m.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2=function(f){let _;try{_=Wt(f)instanceof ArrayBuffer}catch{_=!1}return _},m.wbg.__wbg_isSafeInteger_f93fde0dca9820f8=function(f){return Number.isSafeInteger(Wt(f))},m.wbg.__wbg_entries_9e2e2aa45aa5094a=function(f){const _=Object.entries(Wt(f));return Nr(_)},m.wbg.__wbg_buffer_a448f833075b71ba=function(f){const _=Wt(f).buffer;return Nr(_)},m.wbg.__wbg_new_8f67e318f15d7254=function(f){const _=new Uint8Array(Wt(f));return Nr(_)},m.wbg.__wbg_set_2357bf09366ee480=function(f,_,v){Wt(f).set(Wt(_),v>>>0)},m.wbg.__wbg_length_1d25fa9e4ac21ce7=function(f){return Wt(f).length},m.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa=function(f){let _;try{_=Wt(f)instanceof Uint8Array}catch{_=!1}return _},m.wbg.__wbg_new_abda76e883ba8a5f=function(){const f=new Error;return Nr(f)},m.wbg.__wbg_stack_658279fe44541cf6=function(f,_){const v=Wt(_).stack,E=ph(v,_i.__wbindgen_malloc,_i.__wbindgen_realloc),k=nl;Sr()[f/4+1]=k,Sr()[f/4+0]=E},m.wbg.__wbg_error_f851667af71bcfc6=function(f,_){let v,E;try{v=f,E=_,console.error(kl(f,_))}finally{_i.__wbindgen_free(v,E,1)}},m.wbg.__wbindgen_bigint_get_as_i64=function(f,_){const v=Wt(_),E=typeof v=="bigint"?v:void 0;C_()[f/8+1]=mc(E)?BigInt(0):E,Sr()[f/4+0]=!mc(E)},m.wbg.__wbindgen_debug_string=function(f,_){const v=wh(Wt(_)),E=ph(v,_i.__wbindgen_malloc,_i.__wbindgen_realloc),k=nl;Sr()[f/4+1]=k,Sr()[f/4+0]=E},m.wbg.__wbindgen_throw=function(f,_){throw new Error(kl(f,_))},m.wbg.__wbindgen_memory=function(){const f=_i.memory;return Nr(f)},m}function L_(m,f){return _i=m.exports,Kp.__wbindgen_wasm_module=f,bc=null,xc=null,vc=null,yc=null,_i}async function Kp(m){if(_i!==void 0)return _i;typeof m>"u"&&(m="/ltn/assets/backend_bg.wasm");const f=z_();(typeof m=="string"||typeof Request=="function"&&m instanceof Request||typeof URL=="function"&&m instanceof URL)&&(m=fetch(m));const{instance:_,module:v}=await P_(await m,f);return L_(_,v)}const Cl=[];function mh(m,f){return{subscribe:bo(m,f).subscribe}}function bo(m,f=Ar){let _;const v=new Set;function E(s){if(Tr(m,s)&&(m=s,_)){const H=!Cl.length;for(const V of v)V[1](),Cl.push(V,m);if(H){for(let V=0;V{v.delete(V),v.size===0&&_&&(_(),_=null)}}return{set:E,update:k,subscribe:B}}let D_=Date.now();function Dc(m){return`${m}-${D_++}`}const Eh=Symbol.for("svelte-maplibre");function Ll(){return y_(Eh)}function F_(m){let f=new WeakMap;return _=>{var B;let v=f.get(_.originalEvent);if(v!==void 0)return v;let k=(B=_.target.queryRenderedFeatures(_.point).find(s=>{var H;return(H=m.get(s.layer.id))==null?void 0:H.interactive}))==null?void 0:B.layer.id;return f.set(_.originalEvent,k),k}}function R_(){let m=new Map;return qp(Eh,{map:bo(null),source:mh(null),layer:mh(null),popupTarget:mh(null),cluster:bo(),loadedImages:bo(new Set),minzoom:bo(0),maxzoom:bo(24),layerEvent:bo(null),layerInfo:m,eventTopMost:F_(m)})}function yp(m){return{subscribe:m.subscribe}}function Jp({key:m,setPopupTarget:f=!1,setCluster:_=!1,setMouseEvent:v=!1}){let E=Ll(),k=bo(null),B=yp(k),s={...E,[m]:yp(k)};if(f&&(s.popupTarget=B),v){let H=bo(null);s.layerEvent=H,E.layerEvent=H}return _&&(s.cluster=bo()),qp(Eh,s),{...E,self:k}}function O_(){return Jp({key:"source",setCluster:!0})}function B_(m=!0){return Jp({key:"layer",setPopupTarget:m,setMouseEvent:m})}function N_(m){return"layerType"in m&&m.layerType==="deckgl"}var Al=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yp(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Qp={exports:{}};(function(m,f){(function(_,v){m.exports=v()})(Al,function(){var _,v,E;function k(s,H){if(!_)_=H;else if(!v)v=H;else{var V="var sharedChunk = {}; ("+_+")(sharedChunk); ("+v+")(sharedChunk);",ge={};_(ge),E=H(ge),typeof window<"u"&&(E.workerUrl=window.URL.createObjectURL(new Blob([V],{type:"text/javascript"})))}}k(["exports"],function(s){function H(i,e,r,o){return new(r||(r=Promise))(function(l,h){function p(T){try{w(o.next(T))}catch(M){h(M)}}function y(T){try{w(o.throw(T))}catch(M){h(M)}}function w(T){var M;T.done?l(T.value):(M=T.value,M instanceof r?M:new r(function(z){z(M)})).then(p,y)}w((o=o.apply(i,e||[])).next())})}function V(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}typeof SuppressedError=="function"&&SuppressedError;var ge=be;function be(i,e){this.x=i,this.y=e}be.prototype={clone:function(){return new be(this.x,this.y)},add:function(i){return this.clone()._add(i)},sub:function(i){return this.clone()._sub(i)},multByPoint:function(i){return this.clone()._multByPoint(i)},divByPoint:function(i){return this.clone()._divByPoint(i)},mult:function(i){return this.clone()._mult(i)},div:function(i){return this.clone()._div(i)},rotate:function(i){return this.clone()._rotate(i)},rotateAround:function(i,e){return this.clone()._rotateAround(i,e)},matMult:function(i){return this.clone()._matMult(i)},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(i){return this.x===i.x&&this.y===i.y},dist:function(i){return Math.sqrt(this.distSqr(i))},distSqr:function(i){var e=i.x-this.x,r=i.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(i){return Math.atan2(this.y-i.y,this.x-i.x)},angleWith:function(i){return this.angleWithSep(i.x,i.y)},angleWithSep:function(i,e){return Math.atan2(this.x*e-this.y*i,this.x*i+this.y*e)},_matMult:function(i){var e=i[2]*this.x+i[3]*this.y;return this.x=i[0]*this.x+i[1]*this.y,this.y=e,this},_add:function(i){return this.x+=i.x,this.y+=i.y,this},_sub:function(i){return this.x-=i.x,this.y-=i.y,this},_mult:function(i){return this.x*=i,this.y*=i,this},_div:function(i){return this.x/=i,this.y/=i,this},_multByPoint:function(i){return this.x*=i.x,this.y*=i.y,this},_divByPoint:function(i){return this.x/=i.x,this.y/=i.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var i=this.y;return this.y=this.x,this.x=-i,this},_rotate:function(i){var e=Math.cos(i),r=Math.sin(i),o=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=o,this},_rotateAround:function(i,e){var r=Math.cos(i),o=Math.sin(i),l=e.y+o*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-o*(this.y-e.y),this.y=l,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},be.convert=function(i){return i instanceof be?i:Array.isArray(i)?new be(i[0],i[1]):i};var _e=V(ge),Ie=De;function De(i,e,r,o){this.cx=3*i,this.bx=3*(r-i)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(o-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=i,this.p1y=e,this.p2x=r,this.p2y=o}De.prototype={sampleCurveX:function(i){return((this.ax*i+this.bx)*i+this.cx)*i},sampleCurveY:function(i){return((this.ay*i+this.by)*i+this.cy)*i},sampleCurveDerivativeX:function(i){return(3*this.ax*i+2*this.bx)*i+this.cx},solveCurveX:function(i,e){if(e===void 0&&(e=1e-6),i<0)return 0;if(i>1)return 1;for(var r=i,o=0;o<8;o++){var l=this.sampleCurveX(r)-i;if(Math.abs(l)l?p=r:y=r,r=.5*(y-p)+p;return r},solve:function(i,e){return this.sampleCurveY(this.solveCurveX(i,e))}};var Fe=V(Ie);let Ne,et;function at(){return Ne==null&&(Ne=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),Ne}function nt(){if(et==null&&(et=!1,at())){const e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let o=0;o<5*5;o++){const l=4*o;e.fillStyle=`rgb(${l},${l+1},${l+2})`,e.fillRect(o%5,Math.floor(o/5),1,1)}const r=e.getImageData(0,0,5,5).data;for(let o=0;o<5*5*4;o++)if(o%4!=3&&r[o]!==o){et=!0;break}}}return et||!1}function it(i,e,r,o){const l=new Fe(i,e,r,o);return function(h){return l.solve(h)}}const Vt=it(.25,.1,.25,1);function ti(i,e,r){return Math.min(r,Math.max(e,i))}function Xt(i,e,r){const o=r-e,l=((i-e)%o+o)%o+e;return l===e?r:l}function Nt(i,...e){for(const r of e)for(const o in r)i[o]=r[o];return i}let Yt=1;function At(i,e,r){const o={};for(const l in i)o[l]=e.call(r||this,i[l],l,i);return o}function ke(i,e,r){const o={};for(const l in i)e.call(r||this,i[l],l,i)&&(o[l]=i[l]);return o}function Ge(i){return Array.isArray(i)?i.map(Ge):typeof i=="object"&&i?At(i,Ge):i}const Ui={};function Dt(i){Ui[i]||(typeof console<"u"&&console.warn(i),Ui[i]=!0)}function qt(i,e,r){return(r.y-i.y)*(e.x-i.x)>(e.y-i.y)*(r.x-i.x)}function Lt(i){let e=0;for(let r,o,l=0,h=i.length,p=h-1;l"u")throw new Error("VideoFrame not supported");const h=new VideoFrame(i,{timestamp:0});try{const p=h==null?void 0:h.format;if(!p||!p.startsWith("BGR")&&!p.startsWith("RGB"))throw new Error(`Unrecognized format ${p}`);const y=p.startsWith("BGR"),w=new Uint8ClampedArray(o*l*4);if(yield h.copyTo(w,function(T,M,z,D,N){const U=4*Math.max(-M,0),Z=(Math.max(0,z)-z)*D*4+U,$=4*D,ie=Math.max(0,M),ue=Math.max(0,z);return{rect:{x:ie,y:ue,width:Math.min(T.width,M+D)-ie,height:Math.min(T.height,z+N)-ue},layout:[{offset:Z,stride:$}]}}(i,e,r,o,l)),y)for(let T=0;TcancelAnimationFrame(e)}},getImageData(i,e=0){return this.getImageCanvasContext(i).getImageData(-e,-e,i.width+2*e,i.height+2*e)},getImageCanvasContext(i){const e=window.document.createElement("canvas"),r=e.getContext("2d",{willReadFrequently:!0});if(!r)throw new Error("failed to create canvas 2d context");return e.width=i.width,e.height=i.height,r.drawImage(i,0,0,i.width,i.height),r},resolveURL:i=>(pi||(pi=document.createElement("a")),pi.href=i,pi.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(Oi==null&&(Oi=matchMedia("(prefers-reduced-motion: reduce)")),Oi.matches)}},Pt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};class He extends Error{constructor(e,r,o,l){super(`AJAXError: ${r} (${e}): ${o}`),this.status=e,this.statusText=r,this.url=o,this.body=l}}const Gt=di()?()=>self.worker&&self.worker.referrer:()=>(window.location.protocol==="blob:"?window.parent:window).location.href,ct=i=>Pt.REGISTERED_PROTOCOLS[i.substring(0,i.indexOf("://"))];function Zi(i,e){const r=new AbortController,o=new Request(i.url,{method:i.method||"GET",body:i.body,credentials:i.credentials,headers:i.headers,cache:i.cache,referrer:Gt(),signal:r.signal});let l=!1,h=!1;return i.type==="json"&&o.headers.set("Accept","application/json"),h||fetch(o).then(p=>p.ok?(y=>{(i.type==="arrayBuffer"||i.type==="image"?y.arrayBuffer():i.type==="json"?y.json():y.text()).then(w=>{h||(l=!0,e(null,w,y.headers.get("Cache-Control"),y.headers.get("Expires")))}).catch(w=>{h||e(new Error(w.message))})})(p):p.blob().then(y=>e(new He(p.status,p.statusText,i.url,y)))).catch(p=>{p.code!==20&&e(new Error(p.message))}),{cancel:()=>{h=!0,l||r.abort()}}}const _r=function(i,e){if(/:\/\//.test(i.url)&&!/^https?:|^file:/.test(i.url)){if(di()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e);if(!di())return(ct(i.url)||Zi)(i,e)}if(!(/^file:/.test(r=i.url)||/^file:/.test(Gt())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return Zi(i,e);if(di()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",i,e,void 0,!0)}var r;return function(o,l){const h=new XMLHttpRequest;h.open(o.method||"GET",o.url,!0),o.type!=="arrayBuffer"&&o.type!=="image"||(h.responseType="arraybuffer");for(const p in o.headers)h.setRequestHeader(p,o.headers[p]);return o.type==="json"&&(h.responseType="text",h.setRequestHeader("Accept","application/json")),h.withCredentials=o.credentials==="include",h.onerror=()=>{l(new Error(h.statusText))},h.onload=()=>{if((h.status>=200&&h.status<300||h.status===0)&&h.response!==null){let p=h.response;if(o.type==="json")try{p=JSON.parse(h.response)}catch(y){return l(y)}l(null,p,h.getResponseHeader("Cache-Control"),h.getResponseHeader("Expires"))}else{const p=new Blob([h.response],{type:h.getResponseHeader("Content-Type")});l(new He(h.status,h.statusText,o.url,p))}},h.send(o.body),{cancel:()=>h.abort()}}(i,e)},Ue=function(i,e){return _r(Nt(i,{type:"arrayBuffer"}),e)};function Bi(i){if(!i||i.indexOf("://")<=0||i.indexOf("data:image/")===0||i.indexOf("blob:")===0)return!0;const e=new URL(i),r=window.location;return e.protocol===r.protocol&&e.host===r.host}function gr(i,e,r){r[i]&&r[i].indexOf(e)!==-1||(r[i]=r[i]||[],r[i].push(e))}function ui(i,e,r){if(r&&r[i]){const o=r[i].indexOf(e);o!==-1&&r[i].splice(o,1)}}class co{constructor(e,r={}){Nt(this,r),this.type=e}}class wo extends co{constructor(e,r={}){super("error",Nt({error:e},r))}}class jo{on(e,r){return this._listeners=this._listeners||{},gr(e,r,this._listeners),this}off(e,r){return ui(e,r,this._listeners),ui(e,r,this._oneTimeListeners),this}once(e,r){return r?(this._oneTimeListeners=this._oneTimeListeners||{},gr(e,r,this._oneTimeListeners),this):new Promise(o=>this.once(e,o))}fire(e,r){typeof e=="string"&&(e=new co(e,r||{}));const o=e.type;if(this.listens(o)){e.target=this;const l=this._listeners&&this._listeners[o]?this._listeners[o].slice():[];for(const y of l)y.call(this,e);const h=this._oneTimeListeners&&this._oneTimeListeners[o]?this._oneTimeListeners[o].slice():[];for(const y of h)ui(o,y,this._oneTimeListeners),y.call(this,e);const p=this._eventedParent;p&&(Nt(e,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),p.fire(e))}else e instanceof wo&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,r){return this._eventedParent=e,this._eventedParentData=r,this}}var Se={$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"},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}},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 tn=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function In(i,e){const r={};for(const o in i)o!=="ref"&&(r[o]=i[o]);return tn.forEach(o=>{o in e&&(r[o]=e[o])}),r}function Ii(i,e){if(Array.isArray(i)){if(!Array.isArray(e)||i.length!==e.length)return!1;for(let r=0;r`:i.itemType.kind==="value"?"array":`array<${e}>`}return i.kind}const he=[rn,We,Bt,Mt,Ur,X,_n,J(It),L,F,j];function oe(i,e){if(e.kind==="error")return null;if(i.kind==="array"){if(e.kind==="array"&&(e.N===0&&e.itemType.kind==="value"||!oe(i.itemType,e.itemType))&&(typeof i.N!="number"||i.N===e.N))return null}else{if(i.kind===e.kind)return null;if(i.kind==="value"){for(const r of he)if(!oe(r,e))return null}}return`Expected ${Q(i)} but found ${Q(e)} instead.`}function te(i,e){return e.some(r=>r.kind===i.kind)}function ae(i,e){return e.some(r=>r==="null"?i===null:r==="array"?Array.isArray(i):r==="object"?i&&!Array.isArray(i)&&typeof i=="object":r===typeof i)}function Te(i,e){return i.kind==="array"&&e.kind==="array"?i.itemType.kind===e.itemType.kind&&typeof i.N=="number":i.kind===e.kind}const Ee=.96422,Ce=.82521,mt=4/29,kt=6/29,ut=3*kt*kt,vt=kt*kt*kt,Ft=Math.PI/180,gi=180/Math.PI;function Ut(i){return(i%=360)<0&&(i+=360),i}function ai([i,e,r,o]){let l,h;const p=jr((.2225045*(i=ri(i))+.7168786*(e=ri(e))+.0606169*(r=ri(r)))/1);i===e&&e===r?l=h=p:(l=jr((.4360747*i+.3850649*e+.1430804*r)/Ee),h=jr((.0139322*i+.0971045*e+.7141733*r)/Ce));const y=116*p-16;return[y<0?0:y,500*(l-p),200*(p-h),o]}function ri(i){return i<=.04045?i/12.92:Math.pow((i+.055)/1.055,2.4)}function jr(i){return i>vt?Math.pow(i,1/3):i/ut+mt}function Ei([i,e,r,o]){let l=(i+16)/116,h=isNaN(e)?l:l+e/500,p=isNaN(r)?l:l-r/200;return l=1*yr(l),h=Ee*yr(h),p=Ce*yr(p),[ur(3.1338561*h-1.6168667*l-.4906146*p),ur(-.9787684*h+1.9161415*l+.033454*p),ur(.0719453*h-.2289914*l+1.4052427*p),o]}function ur(i){return(i=i<=.00304?12.92*i:1.055*Math.pow(i,1/2.4)-.055)<0?0:i>1?1:i}function yr(i){return i>kt?i*i*i:ut*(i-mt)}function An(i){return parseInt(i.padEnd(2,i),16)/255}function xs(i,e){return To(e?i/100:i,0,1)}function To(i,e,r){return Math.min(Math.max(e,i),r)}function Io(i){return!i.some(Number.isNaN)}const vr={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 yi{constructor(e,r,o,l=1,h=!0){this.r=e,this.g=r,this.b=o,this.a=l,h||(this.r*=l,this.g*=l,this.b*=l,l||this.overwriteGetter("rgb",[e,r,o,l]))}static parse(e){if(e instanceof yi)return e;if(typeof e!="string")return;const r=function(o){if((o=o.toLowerCase().trim())==="transparent")return[0,0,0,0];const l=vr[o];if(l){const[p,y,w]=l;return[p/255,y/255,w/255,1]}if(o.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(o)){const p=o.length<6?1:2;let y=1;return[An(o.slice(y,y+=p)),An(o.slice(y,y+=p)),An(o.slice(y,y+=p)),An(o.slice(y,y+p)||"ff")]}if(o.startsWith("rgb")){const p=o.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(p){const[y,w,T,M,z,D,N,U,Z,$,ie,ue]=p,re=[M||" ",N||" ",$].join("");if(re===" "||re===" /"||re===",,"||re===",,,"){const pe=[T,D,Z].join(""),ye=pe==="%%%"?100:pe===""?255:0;if(ye){const Ae=[To(+w/ye,0,1),To(+z/ye,0,1),To(+U/ye,0,1),ie?xs(+ie,ue):1];if(Io(Ae))return Ae}}return}}const h=o.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(h){const[p,y,w,T,M,z,D,N,U]=h,Z=[w||" ",M||" ",D].join("");if(Z===" "||Z===" /"||Z===",,"||Z===",,,"){const $=[+y,To(+T,0,100),To(+z,0,100),N?xs(+N,U):1];if(Io($))return function([ie,ue,re,pe]){function ye(Ae){const lt=(Ae+ie/30)%12,pt=ue*Math.min(re,1-re);return re-pt*Math.max(-1,Math.min(lt-3,9-lt,1))}return ie=Ut(ie),ue/=100,re/=100,[ye(0),ye(8),ye(4),pe]}($)}}}(e);return r?new yi(...r,!1):void 0}get rgb(){const{r:e,g:r,b:o,a:l}=this,h=l||1/0;return this.overwriteGetter("rgb",[e/h,r/h,o/h,l])}get hcl(){return this.overwriteGetter("hcl",function(e){const[r,o,l,h]=ai(e),p=Math.sqrt(o*o+l*l);return[Math.round(1e4*p)?Ut(Math.atan2(l,o)*gi):NaN,p,r,h]}(this.rgb))}get lab(){return this.overwriteGetter("lab",ai(this.rgb))}overwriteGetter(e,r){return Object.defineProperty(this,e,{value:r}),r}toString(){const[e,r,o,l]=this.rgb;return`rgba(${[e,r,o].map(h=>Math.round(255*h)).join(",")},${l})`}}yi.black=new yi(0,0,0,1),yi.white=new yi(1,1,1,1),yi.transparent=new yi(0,0,0,0),yi.red=new yi(1,0,0,1);class ta{constructor(e,r,o){this.sensitivity=e?r?"variant":"case":r?"accent":"base",this.locale=o,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,r){return this.collator.compare(e,r)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class jn{constructor(e,r,o,l,h){this.text=e,this.image=r,this.scale=o,this.fontStack=l,this.textColor=h}}class ji{constructor(e){this.sections=e}static fromString(e){return new ji([new jn(e,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(e=>e.text.length!==0||e.image&&e.image.name.length!==0)}static factory(e){return e instanceof ji?e:ji.fromString(e)}toString(){return this.sections.length===0?"":this.sections.map(e=>e.text).join("")}}class qr{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof qr)return e;if(typeof e=="number")return new qr([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(const r of e)if(typeof r!="number")return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new qr(e)}}toString(){return JSON.stringify(this.values)}}const Go=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Ir{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof Ir)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let r=0;r=0&&i<=255&&typeof e=="number"&&e>=0&&e<=255&&typeof r=="number"&&r>=0&&r<=255?o===void 0||typeof o=="number"&&o>=0&&o<=1?null:`Invalid rgba value [${[i,e,r,o].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof o=="number"?[i,e,r,o]:[i,e,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function os(i){if(i===null||typeof i=="string"||typeof i=="boolean"||typeof i=="number"||i instanceof yi||i instanceof ta||i instanceof ji||i instanceof qr||i instanceof Ir||i instanceof Er)return!0;if(Array.isArray(i)){for(const e of i)if(!os(e))return!1;return!0}if(typeof i=="object"){for(const e in i)if(!os(i[e]))return!1;return!0}return!1}function Gi(i){if(i===null)return rn;if(typeof i=="string")return Bt;if(typeof i=="boolean")return Mt;if(typeof i=="number")return We;if(i instanceof yi)return Ur;if(i instanceof ta)return Mn;if(i instanceof ji)return X;if(i instanceof qr)return L;if(i instanceof Ir)return j;if(i instanceof Er)return F;if(Array.isArray(i)){const e=i.length;let r;for(const o of i){const l=Gi(o);if(r){if(r===l)continue;r=It;break}r=l}return J(r||It,e)}return _n}function hi(i){const e=typeof i;return i===null?"":e==="string"||e==="number"||e==="boolean"?String(i):i instanceof yi||i instanceof ji||i instanceof qr||i instanceof Ir||i instanceof Er?i.toString():JSON.stringify(i)}class uo{constructor(e,r){this.type=e,this.value=r}static parse(e,r){if(e.length!==2)return r.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!os(e[1]))return r.error("invalid value");const o=e[1];let l=Gi(o);const h=r.expectedType;return l.kind!=="array"||l.N!==0||!h||h.kind!=="array"||typeof h.N=="number"&&h.N!==0||(l=h),new uo(l,o)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Wi{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}const bs={string:Bt,number:We,boolean:Mt,object:_n};class kn{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");let o,l=1;const h=e[0];if(h==="array"){let y,w;if(e.length>2){const T=e[1];if(typeof T!="string"||!(T in bs)||T==="object")return r.error('The item type argument of "array" must be one of string, number, boolean',1);y=bs[T],l++}else y=It;if(e.length>3){if(e[2]!==null&&(typeof e[2]!="number"||e[2]<0||e[2]!==Math.floor(e[2])))return r.error('The length argument to "array" must be a positive integer literal',2);w=e[2],l++}o=J(y,w)}else{if(!bs[h])throw new Error(`Types doesn't contain name = ${h}`);o=bs[h]}const p=[];for(;le.outputDefined())}}const Na={"to-boolean":Mt,"to-color":Ur,"to-number":We,"to-string":Bt};class Eo{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const o=e[0];if(!Na[o])throw new Error(`Can't parse ${o} as it is not part of the known types`);if((o==="to-boolean"||o==="to-string")&&e.length!==2)return r.error("Expected one argument.");const l=Na[o],h=[];for(let p=1;p4?`Invalid rbga value ${JSON.stringify(r)}: expected an array containing either three or four numeric values.`:ia(r[0],r[1],r[2],r[3]),!o))return new yi(r[0]/255,r[1]/255,r[2]/255,r[3])}throw new Wi(o||`Could not parse color from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"padding":{let r;for(const o of this.args){r=o.evaluate(e);const l=qr.parse(r);if(l)return l}throw new Wi(`Could not parse padding from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"variableAnchorOffsetCollection":{let r;for(const o of this.args){r=o.evaluate(e);const l=Ir.parse(r);if(l)return l}throw new Wi(`Could not parse variableAnchorOffsetCollection from value '${typeof r=="string"?r:JSON.stringify(r)}'`)}case"number":{let r=null;for(const o of this.args){if(r=o.evaluate(e),r===null)return 0;const l=Number(r);if(!isNaN(l))return l}throw new Wi(`Could not convert ${JSON.stringify(r)} to number.`)}case"formatted":return ji.fromString(hi(this.args[0].evaluate(e)));case"resolvedImage":return Er.fromString(hi(this.args[0].evaluate(e)));default:return hi(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}const ws=["Unknown","Point","LineString","Polygon"];class g{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"?ws[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(e){let r=this._parseColorCache[e];return r||(r=this._parseColorCache[e]=yi.parse(e)),r}}class I{constructor(e,r,o=[],l,h=new Zo,p=[]){this.registry=e,this.path=o,this.key=o.map(y=>`[${y}]`).join(""),this.scope=h,this.errors=p,this.expectedType=l,this._isConstant=r}parse(e,r,o,l,h={}){return r?this.concat(r,o,l)._parse(e,h):this._parse(e,h)}_parse(e,r){function o(l,h,p){return p==="assert"?new kn(h,[l]):p==="coerce"?new Eo(h,[l]):l}if(e!==null&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"||(e=["literal",e]),Array.isArray(e)){if(e.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const l=e[0];if(typeof l!="string")return this.error(`Expression name must be a string, but found ${typeof l} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const h=this.registry[l];if(h){let p=h.parse(e,this);if(!p)return null;if(this.expectedType){const y=this.expectedType,w=p.type;if(y.kind!=="string"&&y.kind!=="number"&&y.kind!=="boolean"&&y.kind!=="object"&&y.kind!=="array"||w.kind!=="value")if(y.kind!=="color"&&y.kind!=="formatted"&&y.kind!=="resolvedImage"||w.kind!=="value"&&w.kind!=="string")if(y.kind!=="padding"||w.kind!=="value"&&w.kind!=="number"&&w.kind!=="array")if(y.kind!=="variableAnchorOffsetCollection"||w.kind!=="value"&&w.kind!=="array"){if(this.checkSubtype(y,w))return null}else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"coerce");else p=o(p,y,r.typeAnnotation||"assert")}if(!(p instanceof uo)&&p.type.kind!=="resolvedImage"&&this._isConstant(p)){const y=new g;try{p=new uo(p.type,p.evaluate(y))}catch(w){return this.error(w.message),null}}return p}return this.error(`Unknown expression "${l}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(e===void 0?"'undefined' value invalid. Use null instead.":typeof e=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,r,o){const l=typeof e=="number"?this.path.concat(e):this.path,h=o?this.scope.concat(o):this.scope;return new I(this.registry,this._isConstant,l,r||null,h,this.errors)}error(e,...r){const o=`${this.key}${r.map(l=>`[${l}]`).join("")}`;this.errors.push(new er(o,e))}checkSubtype(e,r){const o=oe(e,r);return o&&this.error(o),o}}class O{constructor(e,r,o){this.type=Mn,this.locale=o,this.caseSensitive=e,this.diacriticSensitive=r}static parse(e,r){if(e.length!==2)return r.error("Expected one argument.");const o=e[1];if(typeof o!="object"||Array.isArray(o))return r.error("Collator options argument must be an object.");const l=r.parse(o["case-sensitive"]!==void 0&&o["case-sensitive"],1,Mt);if(!l)return null;const h=r.parse(o["diacritic-sensitive"]!==void 0&&o["diacritic-sensitive"],1,Mt);if(!h)return null;let p=null;return o.locale&&(p=r.parse(o.locale,1,Bt),!p)?null:new O(l,h,p)}evaluate(e){return new ta(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}const Y=8192;function ne(i,e){i[0]=Math.min(i[0],e[0]),i[1]=Math.min(i[1],e[1]),i[2]=Math.max(i[2],e[0]),i[3]=Math.max(i[3],e[1])}function se(i,e){return!(i[0]<=e[0]||i[2]>=e[2]||i[1]<=e[1]||i[3]>=e[3])}function fe(i,e){const r=(180+i[0])/360,o=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i[1]*Math.PI/360)))/360,l=Math.pow(2,e.z);return[Math.round(r*l*Y),Math.round(o*l*Y)]}function Re(i,e,r){const o=i[0]-e[0],l=i[1]-e[1],h=i[0]-r[0],p=i[1]-r[1];return o*p-h*l==0&&o*h<=0&&l*p<=0}function Ve(i,e){let r=!1;for(let p=0,y=e.length;p(o=i)[1]!=(h=w[T+1])[1]>o[1]&&o[0]<(h[0]-l[0])*(o[1]-l[1])/(h[1]-l[1])+l[0]&&(r=!r)}}var o,l,h;return r}function rt(i,e){for(let r=0;r0&&y<0||p<0&&y>0}function Je(i,e,r){for(const T of r)for(let M=0;Mr[2]){const l=.5*o;let h=i[0]-r[0]>l?-o:r[0]-i[0]>l?o:0;h===0&&(h=i[0]-r[2]>l?-o:r[2]-i[0]>l?o:0),i[0]+=h}ne(e,i)}function _t(i,e,r,o){const l=Math.pow(2,o.z)*Y,h=[o.x*Y,o.y*Y],p=[];for(const y of i)for(const w of y){const T=[w.x+h[0],w.y+h[1]];Pe(T,e,r,l),p.push(T)}return p}function vi(i,e,r,o){const l=Math.pow(2,o.z)*Y,h=[o.x*Y,o.y*Y],p=[];for(const w of i){const T=[];for(const M of w){const z=[M.x+h[0],M.y+h[1]];ne(e,z),T.push(z)}p.push(T)}if(e[2]-e[0]<=l/2){(y=e)[0]=y[1]=1/0,y[2]=y[3]=-1/0;for(const w of p)for(const T of w)Pe(T,e,r,l)}var y;return p}class Xi{constructor(e,r){this.type=Mt,this.geojson=e,this.geometries=r}static parse(e,r){if(e.length!==2)return r.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(os(e[1])){const o=e[1];if(o.type==="FeatureCollection")for(let l=0;l!Array.isArray(T)||T.length===e.length-1);let w=null;for(const[T,M]of y){w=new I(r.registry,ra,r.path,null,r.scope);const z=[];let D=!1;for(let N=1;N{return D=z,Array.isArray(D)?`(${D.map(Q).join(", ")})`:`(${Q(D.type)}...)`;var D}).join(" | "),M=[];for(let z=1;z{r=e?r&&ra(o):r&&o instanceof uo}),!!r&&Ci(i)&&na(i,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Ci(i){if(i instanceof nn&&(i.name==="get"&&i.args.length===1||i.name==="feature-state"||i.name==="has"&&i.args.length===1||i.name==="properties"||i.name==="geometry-type"||i.name==="id"||/^filter-/.test(i.name))||i instanceof Xi)return!1;let e=!0;return i.eachChild(r=>{e&&!Ci(r)&&(e=!1)}),e}function ss(i){if(i instanceof nn&&i.name==="feature-state")return!1;let e=!0;return i.eachChild(r=>{e&&!ss(r)&&(e=!1)}),e}function na(i,e){if(i instanceof nn&&e.indexOf(i.name)>=0)return!1;let r=!0;return i.eachChild(o=>{r&&!na(o,e)&&(r=!1)}),r}function on(i,e){const r=i.length-1;let o,l,h=0,p=r,y=0;for(;h<=p;)if(y=Math.floor((h+p)/2),o=i[y],l=i[y+1],o<=e){if(y===r||ee))throw new Wi("Input is not a number.");p=y-1}return 0}class ho{constructor(e,r,o){this.type=e,this.input=r,this.labels=[],this.outputs=[];for(const[l,h]of o)this.labels.push(l),this.outputs.push(h)}static parse(e,r){if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");const o=r.parse(e[1],1,We);if(!o)return null;const l=[];let h=null;r.expectedType&&r.expectedType.kind!=="value"&&(h=r.expectedType);for(let p=1;p=y)return r.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',T);const z=r.parse(w,M,h);if(!z)return null;h=h||z.type,l.push([y,z])}return new ho(h,o,l)}evaluate(e){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return o[0].evaluate(e);const h=r.length;return l>=r[h-1]?o[h-1].evaluate(e):o[on(r,l)].evaluate(e)}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function Kt(i,e,r){return i+r*(e-i)}function Ss(i,e,r){return i.map((o,l)=>Kt(o,e[l],r))}const Hr={number:Kt,color:function(i,e,r,o="rgb"){switch(o){case"rgb":{const[l,h,p,y]=Ss(i.rgb,e.rgb,r);return new yi(l,h,p,y,!1)}case"hcl":{const[l,h,p,y]=i.hcl,[w,T,M,z]=e.hcl;let D,N;if(isNaN(l)||isNaN(w))isNaN(l)?isNaN(w)?D=NaN:(D=w,p!==1&&p!==0||(N=T)):(D=l,M!==1&&M!==0||(N=h));else{let ue=w-l;w>l&&ue>180?ue-=360:w180&&(ue+=360),D=l+r*ue}const[U,Z,$,ie]=function([ue,re,pe,ye]){return ue=isNaN(ue)?0:ue*Ft,Ei([pe,Math.cos(ue)*re,Math.sin(ue)*re,ye])}([D,N??Kt(h,T,r),Kt(p,M,r),Kt(y,z,r)]);return new yi(U,Z,$,ie,!1)}case"lab":{const[l,h,p,y]=Ei(Ss(i.lab,e.lab,r));return new yi(l,h,p,y,!1)}}},array:Ss,padding:function(i,e,r){return new qr(Ss(i.values,e.values,r))},variableAnchorOffsetCollection:function(i,e,r){const o=i.values,l=e.values;if(o.length!==l.length)throw new Wi(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${e.toString()}`);const h=[];for(let p=0;ptypeof M!="number"||M<0||M>1))return r.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);l={name:"cubic-bezier",controlPoints:T}}}if(e.length-1<4)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return r.error("Expected an even number of arguments.");if(h=r.parse(h,2,We),!h)return null;const y=[];let w=null;o==="interpolate-hcl"||o==="interpolate-lab"?w=Ur:r.expectedType&&r.expectedType.kind!=="value"&&(w=r.expectedType);for(let T=0;T=M)return r.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',D);const U=r.parse(z,N,w);if(!U)return null;w=w||U.type,y.push([M,U])}return Te(w,We)||Te(w,Ur)||Te(w,L)||Te(w,j)||Te(w,J(We))?new sn(w,o,l,h,y):r.error(`Type ${Q(w)} is not interpolatable.`)}evaluate(e){const r=this.labels,o=this.outputs;if(r.length===1)return o[0].evaluate(e);const l=this.input.evaluate(e);if(l<=r[0])return o[0].evaluate(e);const h=r.length;if(l>=r[h-1])return o[h-1].evaluate(e);const p=on(r,l),y=sn.interpolationFactor(this.interpolation,l,r[p],r[p+1]),w=o[p].evaluate(e),T=o[p+1].evaluate(e);switch(this.operator){case"interpolate":return Hr[this.type.kind](w,T,y);case"interpolate-hcl":return Hr.color(w,T,y,"hcl");case"interpolate-lab":return Hr.color(w,T,y,"lab")}}eachChild(e){e(this.input);for(const r of this.outputs)e(r)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function oa(i,e,r,o){const l=o-r,h=i-r;return l===0?0:e===1?h/l:(Math.pow(e,h)-1)/(Math.pow(e,l)-1)}class sa{constructor(e,r){this.type=e,this.args=r}static parse(e,r){if(e.length<2)return r.error("Expectected at least one argument.");let o=null;const l=r.expectedType;l&&l.kind!=="value"&&(o=l);const h=[];for(const y of e.slice(1)){const w=r.parse(y,1+h.length,o,void 0,{typeAnnotation:"omit"});if(!w)return null;o=o||w.type,h.push(w)}if(!o)throw new Error("No output type");const p=l&&h.some(y=>oe(l,y.type));return new sa(p?It:o,h)}evaluate(e){let r,o=null,l=0;for(const h of this.args)if(l++,o=h.evaluate(e),o&&o instanceof Er&&!o.available&&(r||(r=o.name),o=null,l===this.args.length&&(o=r)),o!==null)break;return o}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}class aa{constructor(e,r){this.type=r.type,this.bindings=[].concat(e),this.result=r}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(const r of this.bindings)e(r[1]);e(this.result)}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);const o=[];for(let h=1;h=o.length)throw new Wi(`Array index out of bounds: ${r} > ${o.length-1}.`);if(r!==Math.floor(r))throw new Wi(`Array index must be an integer, but found ${r} instead.`);return o[r]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}}class la{constructor(e,r){this.type=Mt,this.needle=e,this.haystack=r}static parse(e,r){if(e.length!==3)return r.error(`Expected 2 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,It);return o&&l?te(o.type,[Mt,Bt,We,rn,It])?new la(o,l):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Q(o.type)} instead`):null}evaluate(e){const r=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!o)return!1;if(!ae(r,["boolean","string","number","null"]))throw new Wi(`Expected first argument to be of type boolean, string, number or null, but found ${Q(Gi(r))} instead.`);if(!ae(o,["string","array"]))throw new Wi(`Expected second argument to be of type array or string, but found ${Q(Gi(o))} instead.`);return o.indexOf(r)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}}class Ts{constructor(e,r,o){this.type=We,this.needle=e,this.haystack=r,this.fromIndex=o}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,It);if(!o||!l)return null;if(!te(o.type,[Mt,Bt,We,rn,It]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${Q(o.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,We);return h?new Ts(o,l,h):null}return new Ts(o,l)}evaluate(e){const r=this.needle.evaluate(e),o=this.haystack.evaluate(e);if(!ae(r,["boolean","string","number","null"]))throw new Wi(`Expected first argument to be of type boolean, string, number or null, but found ${Q(Gi(r))} instead.`);if(!ae(o,["string","array"]))throw new Wi(`Expected second argument to be of type array or string, but found ${Q(Gi(o))} instead.`);if(this.fromIndex){const l=this.fromIndex.evaluate(e);return o.indexOf(r,l)}return o.indexOf(r)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}}class ca{constructor(e,r,o,l,h,p){this.inputType=e,this.type=r,this.input=o,this.cases=l,this.outputs=h,this.otherwise=p}static parse(e,r){if(e.length<5)return r.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if(e.length%2!=1)return r.error("Expected an even number of arguments.");let o,l;r.expectedType&&r.expectedType.kind!=="value"&&(l=r.expectedType);const h={},p=[];for(let T=2;TNumber.MAX_SAFE_INTEGER)return D.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof U=="number"&&Math.floor(U)!==U)return D.error("Numeric branch labels must be integer values.");if(o){if(D.checkSubtype(o,Gi(U)))return null}else o=Gi(U);if(h[String(U)]!==void 0)return D.error("Branch labels must be unique.");h[String(U)]=p.length}const N=r.parse(z,T,l);if(!N)return null;l=l||N.type,p.push(N)}const y=r.parse(e[1],1,It);if(!y)return null;const w=r.parse(e[e.length-1],e.length-1,l);return w?y.type.kind!=="value"&&r.concat(1).checkSubtype(o,y.type)?null:new ca(o,l,y,h,p,w):null}evaluate(e){const r=this.input.evaluate(e);return(Gi(r)===this.inputType&&this.outputs[this.cases[r]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}}class Ua{constructor(e,r,o){this.type=e,this.branches=r,this.otherwise=o}static parse(e,r){if(e.length<4)return r.error(`Expected at least 3 arguments, but found only ${e.length-1}.`);if(e.length%2!=0)return r.error("Expected an odd number of arguments.");let o;r.expectedType&&r.expectedType.kind!=="value"&&(o=r.expectedType);const l=[];for(let p=1;pr.outputDefined())&&this.otherwise.outputDefined()}}class ua{constructor(e,r,o,l){this.type=e,this.input=r,this.beginIndex=o,this.endIndex=l}static parse(e,r){if(e.length<=2||e.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${e.length-1} instead.`);const o=r.parse(e[1],1,It),l=r.parse(e[2],2,We);if(!o||!l)return null;if(!te(o.type,[J(It),Bt,It]))return r.error(`Expected first argument to be of type array or string, but found ${Q(o.type)} instead`);if(e.length===4){const h=r.parse(e[3],3,We);return h?new ua(o.type,o,l,h):null}return new ua(o.type,o,l)}evaluate(e){const r=this.input.evaluate(e),o=this.beginIndex.evaluate(e);if(!ae(r,["string","array"]))throw new Wi(`Expected first argument to be of type array or string, but found ${Q(Gi(r))} instead.`);if(this.endIndex){const l=this.endIndex.evaluate(e);return r.slice(o,l)}return r.slice(o)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}}function Is(i,e){return i==="=="||i==="!="?e.kind==="boolean"||e.kind==="string"||e.kind==="number"||e.kind==="null"||e.kind==="value":e.kind==="string"||e.kind==="number"||e.kind==="value"}function ha(i,e,r,o){return o.compare(e,r)===0}function Wo(i,e,r){const o=i!=="=="&&i!=="!=";return class $p{constructor(h,p,y){this.type=Mt,this.lhs=h,this.rhs=p,this.collator=y,this.hasUntypedArgument=h.type.kind==="value"||p.type.kind==="value"}static parse(h,p){if(h.length!==3&&h.length!==4)return p.error("Expected two or three arguments.");const y=h[0];let w=p.parse(h[1],1,It);if(!w)return null;if(!Is(y,w.type))return p.concat(1).error(`"${y}" comparisons are not supported for type '${Q(w.type)}'.`);let T=p.parse(h[2],2,It);if(!T)return null;if(!Is(y,T.type))return p.concat(2).error(`"${y}" comparisons are not supported for type '${Q(T.type)}'.`);if(w.type.kind!==T.type.kind&&w.type.kind!=="value"&&T.type.kind!=="value")return p.error(`Cannot compare types '${Q(w.type)}' and '${Q(T.type)}'.`);o&&(w.type.kind==="value"&&T.type.kind!=="value"?w=new kn(T.type,[w]):w.type.kind!=="value"&&T.type.kind==="value"&&(T=new kn(w.type,[T])));let M=null;if(h.length===4){if(w.type.kind!=="string"&&T.type.kind!=="string"&&w.type.kind!=="value"&&T.type.kind!=="value")return p.error("Cannot use collator to compare non-string types.");if(M=p.parse(h[3],3,Mn),!M)return null}return new $p(w,T,M)}evaluate(h){const p=this.lhs.evaluate(h),y=this.rhs.evaluate(h);if(o&&this.hasUntypedArgument){const w=Gi(p),T=Gi(y);if(w.kind!==T.kind||w.kind!=="string"&&w.kind!=="number")throw new Wi(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${w.kind}, ${T.kind}) instead.`)}if(this.collator&&!o&&this.hasUntypedArgument){const w=Gi(p),T=Gi(y);if(w.kind!=="string"||T.kind!=="string")return e(h,p,y)}return this.collator?r(h,p,y,this.collator.evaluate(h)):e(h,p,y)}eachChild(h){h(this.lhs),h(this.rhs),this.collator&&h(this.collator)}outputDefined(){return!0}}}const eo=Wo("==",function(i,e,r){return e===r},ha),sl=Wo("!=",function(i,e,r){return e!==r},function(i,e,r,o){return!ha(0,e,r,o)}),al=Wo("<",function(i,e,r){return e",function(i,e,r){return e>r},function(i,e,r,o){return o.compare(e,r)>0}),ll=Wo("<=",function(i,e,r){return e<=r},function(i,e,r,o){return o.compare(e,r)<=0}),da=Wo(">=",function(i,e,r){return e>=r},function(i,e,r,o){return o.compare(e,r)>=0});class pa{constructor(e,r,o,l,h){this.type=Bt,this.number=e,this.locale=r,this.currency=o,this.minFractionDigits=l,this.maxFractionDigits=h}static parse(e,r){if(e.length!==3)return r.error("Expected two arguments.");const o=r.parse(e[1],1,We);if(!o)return null;const l=e[2];if(typeof l!="object"||Array.isArray(l))return r.error("NumberFormat options argument must be an object.");let h=null;if(l.locale&&(h=r.parse(l.locale,1,Bt),!h))return null;let p=null;if(l.currency&&(p=r.parse(l.currency,1,Bt),!p))return null;let y=null;if(l["min-fraction-digits"]&&(y=r.parse(l["min-fraction-digits"],1,We),!y))return null;let w=null;return l["max-fraction-digits"]&&(w=r.parse(l["max-fraction-digits"],1,We),!w)?null:new pa(o,h,p,y,w)}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}}class Es{constructor(e){this.type=X,this.sections=e}static parse(e,r){if(e.length<2)return r.error("Expected at least one argument.");const o=e[1];if(!Array.isArray(o)&&typeof o=="object")return r.error("First argument must be an image or text section.");const l=[];let h=!1;for(let p=1;p<=e.length-1;++p){const y=e[p];if(h&&typeof y=="object"&&!Array.isArray(y)){h=!1;let w=null;if(y["font-scale"]&&(w=r.parse(y["font-scale"],1,We),!w))return null;let T=null;if(y["text-font"]&&(T=r.parse(y["text-font"],1,J(Bt)),!T))return null;let M=null;if(y["text-color"]&&(M=r.parse(y["text-color"],1,Ur),!M))return null;const z=l[l.length-1];z.scale=w,z.font=T,z.textColor=M}else{const w=r.parse(e[p],1,It);if(!w)return null;const T=w.type.kind;if(T!=="string"&&T!=="value"&&T!=="null"&&T!=="resolvedImage")return r.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");h=!0,l.push({content:w,scale:null,font:null,textColor:null})}}return new Es(l)}evaluate(e){return new ji(this.sections.map(r=>{const o=r.content.evaluate(e);return Gi(o)===F?new jn("",o,null,null,null):new jn(hi(o),null,r.scale?r.scale.evaluate(e):null,r.font?r.font.evaluate(e).join(","):null,r.textColor?r.textColor.evaluate(e):null)}))}eachChild(e){for(const r of this.sections)e(r.content),r.scale&&e(r.scale),r.font&&e(r.font),r.textColor&&e(r.textColor)}outputDefined(){return!1}}class ja{constructor(e){this.type=F,this.input=e}static parse(e,r){if(e.length!==2)return r.error("Expected two arguments.");const o=r.parse(e[1],1,Bt);return o?new ja(o):r.error("No image name provided.")}evaluate(e){const r=this.input.evaluate(e),o=Er.fromString(r);return o&&e.availableImages&&(o.available=e.availableImages.indexOf(r)>-1),o}eachChild(e){e(this.input)}outputDefined(){return!1}}class po{constructor(e){this.type=We,this.input=e}static parse(e,r){if(e.length!==2)return r.error(`Expected 1 argument, but found ${e.length-1} instead.`);const o=r.parse(e[1],1);return o?o.type.kind!=="array"&&o.type.kind!=="string"&&o.type.kind!=="value"?r.error(`Expected argument of type string or array, but found ${Q(o.type)} instead.`):new po(o):null}evaluate(e){const r=this.input.evaluate(e);if(typeof r=="string"||Array.isArray(r))return r.length;throw new Wi(`Expected value to be of type string or array, but found ${Q(Gi(r))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}}const Ho={"==":eo,"!=":sl,">":Dl,"<":al,">=":da,"<=":ll,array:kn,at:Va,boolean:kn,case:Ua,coalesce:sa,collator:O,format:Es,image:ja,in:la,"index-of":Ts,interpolate:sn,"interpolate-hcl":sn,"interpolate-lab":sn,length:po,let:aa,literal:uo,match:ca,number:kn,"number-format":pa,object:kn,slice:ua,step:ho,string:kn,"to-boolean":Eo,"to-color":Eo,"to-number":Eo,"to-string":Eo,var:tr,within:Xi};function cl(i,[e,r,o,l]){e=e.evaluate(i),r=r.evaluate(i),o=o.evaluate(i);const h=l?l.evaluate(i):1,p=ia(e,r,o,h);if(p)throw new Wi(p);return new yi(e/255,r/255,o/255,h,!1)}function ul(i,e){return i in e}function Cs(i,e){const r=e[i];return r===void 0?null:r}function qn(i){return{type:i}}function fa(i){return{result:"success",value:i}}function to(i){return{result:"error",value:i}}function Co(i){return i["property-type"]==="data-driven"||i["property-type"]==="cross-faded-data-driven"}function as(i){return!!i.expression&&i.expression.parameters.indexOf("zoom")>-1}function qa(i){return!!i.expression&&i.expression.interpolated}function fi(i){return i instanceof Number?"number":i instanceof String?"string":i instanceof Boolean?"boolean":Array.isArray(i)?"array":i===null?"null":typeof i}function Ki(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Fl(i){return i}function Qt(i,e){const r=e.type==="color",o=i.stops&&typeof i.stops[0][0]=="object",l=o||!(o||i.property!==void 0),h=i.type||(qa(e)?"exponential":"interval");if(r||e.type==="padding"){const M=r?yi.parse:qr.parse;(i=mn({},i)).stops&&(i.stops=i.stops.map(z=>[z[0],M(z[1])])),i.default=M(i.default?i.default:e.default)}if(i.colorSpace&&(p=i.colorSpace)!=="rgb"&&p!=="hcl"&&p!=="lab")throw new Error(`Unknown color space: "${i.colorSpace}"`);var p;let y,w,T;if(h==="exponential")y=gn;else if(h==="interval")y=xi;else if(h==="categorical"){y=Ni,w=Object.create(null);for(const M of i.stops)w[M[0]]=M[1];T=typeof i.stops[0][0]}else{if(h!=="identity")throw new Error(`Unknown function type "${h}"`);y=Ao}if(o){const M={},z=[];for(let U=0;UU[0]),evaluate:({zoom:U},Z)=>gn({stops:D,base:i.base},e,U).evaluate(U,Z)}}if(l){const M=h==="exponential"?{name:"exponential",base:i.base!==void 0?i.base:1}:null;return{kind:"camera",interpolationType:M,interpolationFactor:sn.interpolationFactor.bind(void 0,M),zoomStops:i.stops.map(z=>z[0]),evaluate:({zoom:z})=>y(i,e,z,w,T)}}return{kind:"source",evaluate(M,z){const D=z&&z.properties?z.properties[i.property]:void 0;return D===void 0?Mo(i.default,e.default):y(i,e,D,w,T)}}}function Mo(i,e,r){return i!==void 0?i:e!==void 0?e:r!==void 0?r:void 0}function Ni(i,e,r,o,l){return Mo(typeof r===l?o[r]:void 0,i.default,e.default)}function xi(i,e,r){if(fi(r)!=="number")return Mo(i.default,e.default);const o=i.stops.length;if(o===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[o-1][0])return i.stops[o-1][1];const l=on(i.stops.map(h=>h[0]),r);return i.stops[l][1]}function gn(i,e,r){const o=i.base!==void 0?i.base:1;if(fi(r)!=="number")return Mo(i.default,e.default);const l=i.stops.length;if(l===1||r<=i.stops[0][0])return i.stops[0][1];if(r>=i.stops[l-1][0])return i.stops[l-1][1];const h=on(i.stops.map(M=>M[0]),r),p=function(M,z,D,N){const U=N-D,Z=M-D;return U===0?0:z===1?Z/U:(Math.pow(z,Z)-1)/(Math.pow(z,U)-1)}(r,o,i.stops[h][0],i.stops[h+1][0]),y=i.stops[h][1],w=i.stops[h+1][1],T=Hr[e.type]||Fl;return typeof y.evaluate=="function"?{evaluate(...M){const z=y.evaluate.apply(void 0,M),D=w.evaluate.apply(void 0,M);if(z!==void 0&&D!==void 0)return T(z,D,p,i.colorSpace)}}:T(y,w,p,i.colorSpace)}function Ao(i,e,r){switch(e.type){case"color":r=yi.parse(r);break;case"formatted":r=ji.fromString(r.toString());break;case"resolvedImage":r=Er.fromString(r.toString());break;case"padding":r=qr.parse(r);break;default:fi(r)===e.type||e.type==="enum"&&e.values[r]||(r=void 0)}return Mo(r,i.default,e.default)}nn.register(Ho,{error:[{kind:"error"},[Bt],(i,[e])=>{throw new Wi(e.evaluate(i))}],typeof:[Bt,[It],(i,[e])=>Q(Gi(e.evaluate(i)))],"to-rgba":[J(We,4),[Ur],(i,[e])=>{const[r,o,l,h]=e.evaluate(i).rgb;return[255*r,255*o,255*l,h]}],rgb:[Ur,[We,We,We],cl],rgba:[Ur,[We,We,We,We],cl],has:{type:Mt,overloads:[[[Bt],(i,[e])=>ul(e.evaluate(i),i.properties())],[[Bt,_n],(i,[e,r])=>ul(e.evaluate(i),r.evaluate(i))]]},get:{type:It,overloads:[[[Bt],(i,[e])=>Cs(e.evaluate(i),i.properties())],[[Bt,_n],(i,[e,r])=>Cs(e.evaluate(i),r.evaluate(i))]]},"feature-state":[It,[Bt],(i,[e])=>Cs(e.evaluate(i),i.featureState||{})],properties:[_n,[],i=>i.properties()],"geometry-type":[Bt,[],i=>i.geometryType()],id:[It,[],i=>i.id()],zoom:[We,[],i=>i.globals.zoom],"heatmap-density":[We,[],i=>i.globals.heatmapDensity||0],"line-progress":[We,[],i=>i.globals.lineProgress||0],accumulated:[It,[],i=>i.globals.accumulated===void 0?null:i.globals.accumulated],"+":[We,qn(We),(i,e)=>{let r=0;for(const o of e)r+=o.evaluate(i);return r}],"*":[We,qn(We),(i,e)=>{let r=1;for(const o of e)r*=o.evaluate(i);return r}],"-":{type:We,overloads:[[[We,We],(i,[e,r])=>e.evaluate(i)-r.evaluate(i)],[[We],(i,[e])=>-e.evaluate(i)]]},"/":[We,[We,We],(i,[e,r])=>e.evaluate(i)/r.evaluate(i)],"%":[We,[We,We],(i,[e,r])=>e.evaluate(i)%r.evaluate(i)],ln2:[We,[],()=>Math.LN2],pi:[We,[],()=>Math.PI],e:[We,[],()=>Math.E],"^":[We,[We,We],(i,[e,r])=>Math.pow(e.evaluate(i),r.evaluate(i))],sqrt:[We,[We],(i,[e])=>Math.sqrt(e.evaluate(i))],log10:[We,[We],(i,[e])=>Math.log(e.evaluate(i))/Math.LN10],ln:[We,[We],(i,[e])=>Math.log(e.evaluate(i))],log2:[We,[We],(i,[e])=>Math.log(e.evaluate(i))/Math.LN2],sin:[We,[We],(i,[e])=>Math.sin(e.evaluate(i))],cos:[We,[We],(i,[e])=>Math.cos(e.evaluate(i))],tan:[We,[We],(i,[e])=>Math.tan(e.evaluate(i))],asin:[We,[We],(i,[e])=>Math.asin(e.evaluate(i))],acos:[We,[We],(i,[e])=>Math.acos(e.evaluate(i))],atan:[We,[We],(i,[e])=>Math.atan(e.evaluate(i))],min:[We,qn(We),(i,e)=>Math.min(...e.map(r=>r.evaluate(i)))],max:[We,qn(We),(i,e)=>Math.max(...e.map(r=>r.evaluate(i)))],abs:[We,[We],(i,[e])=>Math.abs(e.evaluate(i))],round:[We,[We],(i,[e])=>{const r=e.evaluate(i);return r<0?-Math.round(-r):Math.round(r)}],floor:[We,[We],(i,[e])=>Math.floor(e.evaluate(i))],ceil:[We,[We],(i,[e])=>Math.ceil(e.evaluate(i))],"filter-==":[Mt,[Bt,It],(i,[e,r])=>i.properties()[e.value]===r.value],"filter-id-==":[Mt,[It],(i,[e])=>i.id()===e.value],"filter-type-==":[Mt,[Bt],(i,[e])=>i.geometryType()===e.value],"filter-<":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o{const r=i.id(),o=e.value;return typeof r==typeof o&&r":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o>l}],"filter-id->":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r>o}],"filter-<=":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o<=l}],"filter-id-<=":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r<=o}],"filter->=":[Mt,[Bt,It],(i,[e,r])=>{const o=i.properties()[e.value],l=r.value;return typeof o==typeof l&&o>=l}],"filter-id->=":[Mt,[It],(i,[e])=>{const r=i.id(),o=e.value;return typeof r==typeof o&&r>=o}],"filter-has":[Mt,[It],(i,[e])=>e.value in i.properties()],"filter-has-id":[Mt,[],i=>i.id()!==null&&i.id()!==void 0],"filter-type-in":[Mt,[J(Bt)],(i,[e])=>e.value.indexOf(i.geometryType())>=0],"filter-id-in":[Mt,[J(It)],(i,[e])=>e.value.indexOf(i.id())>=0],"filter-in-small":[Mt,[Bt,J(It)],(i,[e,r])=>r.value.indexOf(i.properties()[e.value])>=0],"filter-in-large":[Mt,[Bt,J(It)],(i,[e,r])=>function(o,l,h,p){for(;h<=p;){const y=h+p>>1;if(l[y]===o)return!0;l[y]>o?p=y-1:h=y+1}return!1}(i.properties()[e.value],r.value,0,r.value.length-1)],all:{type:Mt,overloads:[[[Mt,Mt],(i,[e,r])=>e.evaluate(i)&&r.evaluate(i)],[qn(Mt),(i,e)=>{for(const r of e)if(!r.evaluate(i))return!1;return!0}]]},any:{type:Mt,overloads:[[[Mt,Mt],(i,[e,r])=>e.evaluate(i)||r.evaluate(i)],[qn(Mt),(i,e)=>{for(const r of e)if(r.evaluate(i))return!0;return!1}]]},"!":[Mt,[Mt],(i,[e])=>!e.evaluate(i)],"is-supported-script":[Mt,[Bt],(i,[e])=>{const r=i.globals&&i.globals.isSupportedScript;return!r||r(e.evaluate(i))}],upcase:[Bt,[Bt],(i,[e])=>e.evaluate(i).toUpperCase()],downcase:[Bt,[Bt],(i,[e])=>e.evaluate(i).toLowerCase()],concat:[Bt,qn(It),(i,e)=>e.map(r=>hi(r.evaluate(i))).join("")],"resolved-locale":[Bt,[Mn],(i,[e])=>e.evaluate(i).resolvedLocale()]});class ls{constructor(e,r){var o;this.expression=e,this._warningHistory={},this._evaluator=new g,this._defaultValue=r?(o=r).type==="color"&&Ki(o.default)?new yi(0,0,0,0):o.type==="color"?yi.parse(o.default)||null:o.type==="padding"?qr.parse(o.default)||null:o.type==="variableAnchorOffsetCollection"?Ir.parse(o.default)||null:o.default===void 0?null:o.default:null,this._enumValues=r&&r.type==="enum"?r.values:null}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._evaluator.globals=e,this._evaluator.feature=r,this._evaluator.featureState=o,this._evaluator.canonical=l,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=p,this.expression.evaluate(this._evaluator)}evaluate(e,r,o,l,h,p){this._evaluator.globals=e,this._evaluator.feature=r||null,this._evaluator.featureState=o||null,this._evaluator.canonical=l,this._evaluator.availableImages=h||null,this._evaluator.formattedSection=p||null;try{const y=this.expression.evaluate(this._evaluator);if(y==null||typeof y=="number"&&y!=y)return this._defaultValue;if(this._enumValues&&!(y in this._enumValues))throw new Wi(`Expected value to be one of ${Object.keys(this._enumValues).map(w=>JSON.stringify(w)).join(", ")}, but found ${JSON.stringify(y)} instead.`);return y}catch(y){return this._warningHistory[y.message]||(this._warningHistory[y.message]=!0,typeof console<"u"&&console.warn(y.message)),this._defaultValue}}}function Zn(i){return Array.isArray(i)&&i.length>0&&typeof i[0]=="string"&&i[0]in Ho}function ma(i,e){const r=new I(Ho,ra,[],e?function(l){const h={color:Ur,string:Bt,number:We,enum:Bt,boolean:Mt,formatted:X,padding:L,resolvedImage:F,variableAnchorOffsetCollection:j};return l.type==="array"?J(h[l.value]||It,l.length):h[l.type]}(e):void 0),o=r.parse(i,void 0,void 0,void 0,e&&e.type==="string"?{typeAnnotation:"coerce"}:void 0);return o?fa(new ls(o,e)):to(r.errors)}class cs{constructor(e,r){this.kind=e,this._styleExpression=r,this.isStateDependent=e!=="constant"&&!ss(r.expression)}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,o,l,h,p)}evaluate(e,r,o,l,h,p){return this._styleExpression.evaluate(e,r,o,l,h,p)}}class ko{constructor(e,r,o,l){this.kind=e,this.zoomStops=o,this._styleExpression=r,this.isStateDependent=e!=="camera"&&!ss(r.expression),this.interpolationType=l}evaluateWithoutErrorHandling(e,r,o,l,h,p){return this._styleExpression.evaluateWithoutErrorHandling(e,r,o,l,h,p)}evaluate(e,r,o,l,h,p){return this._styleExpression.evaluate(e,r,o,l,h,p)}interpolationFactor(e,r,o){return this.interpolationType?sn.interpolationFactor(this.interpolationType,e,r,o):0}}function _a(i,e){const r=ma(i,e);if(r.result==="error")return r;const o=r.value.expression,l=Ci(o);if(!l&&!Co(e))return to([new er("","data expressions not supported")]);const h=na(o,["zoom"]);if(!h&&!as(e))return to([new er("","zoom expressions not supported")]);const p=Ms(o);return p||h?p instanceof er?to([p]):p instanceof sn&&!qa(e)?to([new er("",'"interpolate" expressions cannot be used with this property')]):fa(p?new ko(l?"camera":"composite",r.value,p.labels,p instanceof sn?p.interpolation:void 0):new cs(l?"constant":"source",r.value)):to([new er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class us{constructor(e,r){this._parameters=e,this._specification=r,mn(this,Qt(this._parameters,this._specification))}static deserialize(e){return new us(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function Ms(i){let e=null;if(i instanceof aa)e=Ms(i.result);else if(i instanceof sa){for(const r of i.args)if(e=Ms(r),e)break}else(i instanceof ho||i instanceof sn)&&i.input instanceof nn&&i.input.name==="zoom"&&(e=i);return e instanceof er||i.eachChild(r=>{const o=Ms(r);o instanceof er?e=o:!e&&o?e=new er("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):e&&o&&e!==o&&(e=new er("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),e}function As(i){if(i===!0||i===!1)return!0;if(!Array.isArray(i)||i.length===0)return!1;switch(i[0]){case"has":return i.length>=2&&i[1]!=="$id"&&i[1]!=="$type";case"in":return i.length>=3&&(typeof i[1]!="string"||Array.isArray(i[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return i.length!==3||Array.isArray(i[1])||Array.isArray(i[2]);case"any":case"all":for(const e of i.slice(1))if(!As(e)&&typeof e!="boolean")return!1;return!0;default:return!0}}const hl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ga(i){if(i==null)return{filter:()=>!0,needGeometry:!1};As(i)||(i=va(i));const e=ma(i,hl);if(e.result==="error")throw new Error(e.value.map(r=>`${r.key}: ${r.message}`).join(", "));return{filter:(r,o,l)=>e.value.evaluate(r,o,{},l),needGeometry:Xo(i)}}function ya(i,e){return ie?1:0}function Xo(i){if(!Array.isArray(i))return!1;if(i[0]==="within")return!0;for(let e=1;e"||e==="<="||e===">="?io(i[1],i[2],e):e==="any"?(r=i.slice(1),["any"].concat(r.map(va))):e==="all"?["all"].concat(i.slice(1).map(va)):e==="none"?["all"].concat(i.slice(1).map(va).map(hs)):e==="in"?dl(i[1],i.slice(2)):e==="!in"?hs(dl(i[1],i.slice(2))):e==="has"?Po(i[1]):e==="!has"?hs(Po(i[1])):e!=="within"||i;var r}function io(i,e,r){switch(i){case"$type":return[`filter-type-${r}`,e];case"$id":return[`filter-id-${r}`,e];default:return[`filter-${r}`,i,e]}}function dl(i,e){if(e.length===0)return!1;switch(i){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(r=>typeof r!=typeof e[0])?["filter-in-large",i,["literal",e.sort(ya)]]:["filter-in-small",i,["literal",e]]}}function Po(i){switch(i){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",i]}}function hs(i){return["!",i]}function xa(i){const e=typeof i;if(e==="number"||e==="boolean"||e==="string"||i==null)return JSON.stringify(i);if(Array.isArray(i)){let l="[";for(const h of i)l+=`${xa(h)},`;return`${l}]`}const r=Object.keys(i).sort();let o="{";for(let l=0;lo.maximum?[new qe(e,r,`${r} is greater than the maximum value ${o.maximum}`)]:[]}function wa(i){const e=i.valueSpec,r=Ji(i.value.type);let o,l,h,p={};const y=r!=="categorical"&&i.value.property===void 0,w=!y,T=fi(i.value.stops)==="array"&&fi(i.value.stops[0])==="array"&&fi(i.value.stops[0][0])==="object",M=Xr({key:i.key,value:i.value,valueSpec:i.styleSpec.function,validateSpec:i.validateSpec,style:i.style,styleSpec:i.styleSpec,objectElementValidators:{stops:function(N){if(r==="identity")return[new qe(N.key,N.value,'identity function may not have a "stops" property')];let U=[];const Z=N.value;return U=U.concat(ro({key:N.key,value:Z,valueSpec:N.valueSpec,validateSpec:N.validateSpec,style:N.style,styleSpec:N.styleSpec,arrayElementValidator:z})),fi(Z)==="array"&&Z.length===0&&U.push(new qe(N.key,Z,"array must have at least one stop")),U},default:function(N){return N.validateSpec({key:N.key,value:N.value,valueSpec:e,validateSpec:N.validateSpec,style:N.style,styleSpec:N.styleSpec})}}});return r==="identity"&&y&&M.push(new qe(i.key,i.value,'missing required property "property"')),r==="identity"||i.value.stops||M.push(new qe(i.key,i.value,'missing required property "stops"')),r==="exponential"&&i.valueSpec.expression&&!qa(i.valueSpec)&&M.push(new qe(i.key,i.value,"exponential functions not supported")),i.styleSpec.$version>=8&&(w&&!Co(i.valueSpec)?M.push(new qe(i.key,i.value,"property functions not supported")):y&&!as(i.valueSpec)&&M.push(new qe(i.key,i.value,"zoom functions not supported"))),r!=="categorical"&&!T||i.value.property!==void 0||M.push(new qe(i.key,i.value,'"property" property is required')),M;function z(N){let U=[];const Z=N.value,$=N.key;if(fi(Z)!=="array")return[new qe($,Z,`array expected, ${fi(Z)} found`)];if(Z.length!==2)return[new qe($,Z,`array length 2 expected, length ${Z.length} found`)];if(T){if(fi(Z[0])!=="object")return[new qe($,Z,`object expected, ${fi(Z[0])} found`)];if(Z[0].zoom===void 0)return[new qe($,Z,"object stop key must have zoom")];if(Z[0].value===void 0)return[new qe($,Z,"object stop key must have value")];if(h&&h>Ji(Z[0].zoom))return[new qe($,Z[0].zoom,"stop zoom values must appear in ascending order")];Ji(Z[0].zoom)!==h&&(h=Ji(Z[0].zoom),l=void 0,p={}),U=U.concat(Xr({key:`${$}[0]`,value:Z[0],valueSpec:{zoom:{}},validateSpec:N.validateSpec,style:N.style,styleSpec:N.styleSpec,objectElementValidators:{zoom:ds,value:D}}))}else U=U.concat(D({key:`${$}[0]`,value:Z[0],valueSpec:{},validateSpec:N.validateSpec,style:N.style,styleSpec:N.styleSpec},Z));return Zn(zo(Z[1]))?U.concat([new qe(`${$}[1]`,Z[1],"expressions are not allowed in function stops.")]):U.concat(N.validateSpec({key:`${$}[1]`,value:Z[1],valueSpec:e,validateSpec:N.validateSpec,style:N.style,styleSpec:N.styleSpec}))}function D(N,U){const Z=fi(N.value),$=Ji(N.value),ie=N.value!==null?N.value:U;if(o){if(Z!==o)return[new qe(N.key,ie,`${Z} stop domain type must match previous stop domain type ${o}`)]}else o=Z;if(Z!=="number"&&Z!=="string"&&Z!=="boolean")return[new qe(N.key,ie,"stop domain value must be a number, string, or boolean")];if(Z!=="number"&&r!=="categorical"){let ue=`number expected, ${Z} found`;return Co(e)&&r===void 0&&(ue+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qe(N.key,ie,ue)]}return r!=="categorical"||Z!=="number"||isFinite($)&&Math.floor($)===$?r!=="categorical"&&Z==="number"&&l!==void 0&&$new qe(`${i.key}${o.key}`,i.value,o.message));const r=e.value.expression||e.value._styleExpression.expression;if(i.expressionContext==="property"&&i.propertyKey==="text-font"&&!r.outputDefined())return[new qe(i.key,i.value,`Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];if(i.expressionContext==="property"&&i.propertyType==="layout"&&!ss(r))return[new qe(i.key,i.value,'"feature-state" data expressions are not supported with layout properties.')];if(i.expressionContext==="filter"&&!ss(r))return[new qe(i.key,i.value,'"feature-state" data expressions are not supported with filters.')];if(i.expressionContext&&i.expressionContext.indexOf("cluster")===0){if(!na(r,["zoom","feature-state"]))return[new qe(i.key,i.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(i.expressionContext==="cluster-initial"&&!Ci(r))return[new qe(i.key,i.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function we(i){const e=i.key,r=i.value,o=i.valueSpec,l=[];return Array.isArray(o.values)?o.values.indexOf(Ji(r))===-1&&l.push(new qe(e,r,`expected one of [${o.values.join(", ")}], ${JSON.stringify(r)} found`)):Object.keys(o.values).indexOf(Ji(r))===-1&&l.push(new qe(e,r,`expected one of [${Object.keys(o.values).join(", ")}], ${JSON.stringify(r)} found`)),l}function Ye(i){return As(zo(i.value))?de(mn({},i,{expressionContext:"filter",valueSpec:{value:"boolean"}})):wt(i)}function wt(i){const e=i.value,r=i.key;if(fi(e)!=="array")return[new qe(r,e,`array expected, ${fi(e)} found`)];const o=i.styleSpec;let l,h=[];if(e.length<1)return[new qe(r,e,"filter array must have at least 1 element")];switch(h=h.concat(we({key:`${r}[0]`,value:e[0],valueSpec:o.filter_operator,style:i.style,styleSpec:i.styleSpec})),Ji(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&Ji(e[1])==="$type"&&h.push(new qe(r,e,`"$type" cannot be use with operator "${e[0]}"`));case"==":case"!=":e.length!==3&&h.push(new qe(r,e,`filter array for operator "${e[0]}" must have 3 elements`));case"in":case"!in":e.length>=2&&(l=fi(e[1]),l!=="string"&&h.push(new qe(`${r}[1]`,e[1],`string expected, ${l} found`)));for(let p=2;p{T in r&&e.push(new qe(o,r[T],`"${T}" is prohibited for ref layers`))}),l.layers.forEach(T=>{Ji(T.id)===y&&(w=T)}),w?w.ref?e.push(new qe(o,r.ref,"ref cannot reference another ref layer")):p=Ji(w.type):e.push(new qe(o,r.ref,`ref layer "${y}" not found`))}else if(p!=="background")if(r.source){const w=l.sources&&l.sources[r.source],T=w&&Ji(w.type);w?T==="vector"&&p==="raster"?e.push(new qe(o,r.source,`layer "${r.id}" requires a raster source`)):T!=="raster-dem"&&p==="hillshade"?e.push(new qe(o,r.source,`layer "${r.id}" requires a raster-dem source`)):T==="raster"&&p!=="raster"?e.push(new qe(o,r.source,`layer "${r.id}" requires a vector source`)):T!=="vector"||r["source-layer"]?T==="raster-dem"&&p!=="hillshade"?e.push(new qe(o,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):p!=="line"||!r.paint||!r.paint["line-gradient"]||T==="geojson"&&w.lineMetrics||e.push(new qe(o,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):e.push(new qe(o,r,`layer "${r.id}" must specify a "source-layer"`)):e.push(new qe(o,r.source,`source "${r.source}" not found`))}else e.push(new qe(o,r,'missing required property "source"'));return e=e.concat(Xr({key:o,value:r,valueSpec:h.layer,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,objectElementValidators:{"*":()=>[],type:()=>i.validateSpec({key:`${o}.type`,value:r.type,valueSpec:h.layer.type,style:i.style,styleSpec:i.styleSpec,validateSpec:i.validateSpec,object:r,objectKey:"type"}),filter:Ye,layout:w=>Xr({layer:r,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":T=>ir(mn({layerType:p},T))}}),paint:w=>Xr({layer:r,key:w.key,value:w.value,style:w.style,styleSpec:w.styleSpec,validateSpec:w.validateSpec,objectElementValidators:{"*":T=>ni(mn({layerType:p},T))}})}})),e}function hr(i){const e=i.value,r=i.key,o=fi(e);return o!=="string"?[new qe(r,e,`string expected, ${o} found`)]:[]}const rr={promoteId:function({key:i,value:e}){if(fi(e)==="string")return hr({key:i,value:e});{const r=[];for(const o in e)r.push(...hr({key:`${i}.${o}`,value:e[o]}));return r}}};function bi(i){const e=i.value,r=i.key,o=i.styleSpec,l=i.style,h=i.validateSpec;if(!e.type)return[new qe(r,e,'"type" is required')];const p=Ji(e.type);let y;switch(p){case"vector":case"raster":return y=Xr({key:r,value:e,valueSpec:o[`source_${p.replace("-","_")}`],style:i.style,styleSpec:o,objectElementValidators:rr,validateSpec:h}),y;case"raster-dem":return y=function(w){var T;const M=(T=w.sourceName)!==null&&T!==void 0?T:"",z=w.value,D=w.styleSpec,N=D.source_raster_dem,U=w.style;let Z=[];const $=fi(z);if(z===void 0)return Z;if($!=="object")return Z.push(new qe("source_raster_dem",z,`object expected, ${$} found`)),Z;const ie=Ji(z.encoding)==="custom",ue=["redFactor","greenFactor","blueFactor","baseShift"],re=w.value.encoding?`"${w.value.encoding}"`:"Default";for(const pe in z)!ie&&ue.includes(pe)?Z.push(new qe(pe,z[pe],`In "${M}": "${pe}" is only valid when "encoding" is set to "custom". ${re} encoding found`)):N[pe]?Z=Z.concat(w.validateSpec({key:pe,value:z[pe],valueSpec:N[pe],validateSpec:w.validateSpec,style:U,styleSpec:D})):Z.push(new qe(pe,z[pe],`unknown property "${pe}"`));return Z}({sourceName:r,value:e,style:i.style,styleSpec:o,validateSpec:h}),y;case"geojson":if(y=Xr({key:r,value:e,valueSpec:o.source_geojson,style:l,styleSpec:o,validateSpec:h,objectElementValidators:rr}),e.cluster)for(const w in e.clusterProperties){const[T,M]=e.clusterProperties[w],z=typeof T=="string"?[T,["accumulated"],["get",w]]:T;y.push(...de({key:`${r}.${w}.map`,value:M,validateSpec:h,expressionContext:"cluster-map"})),y.push(...de({key:`${r}.${w}.reduce`,value:z,validateSpec:h,expressionContext:"cluster-reduce"}))}return y;case"video":return Xr({key:r,value:e,valueSpec:o.source_video,style:l,validateSpec:h,styleSpec:o});case"image":return Xr({key:r,value:e,valueSpec:o.source_image,style:l,validateSpec:h,styleSpec:o});case"canvas":return[new qe(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return we({key:`${r}.type`,value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:l,validateSpec:h,styleSpec:o})}}function an(i){const e=i.value,r=i.styleSpec,o=r.light,l=i.style;let h=[];const p=fi(e);if(e===void 0)return h;if(p!=="object")return h=h.concat([new qe("light",e,`object expected, ${p} found`)]),h;for(const y in e){const w=y.match(/^(.*)-transition$/);h=h.concat(w&&o[w[1]]&&o[w[1]].transition?i.validateSpec({key:y,value:e[y],valueSpec:r.transition,validateSpec:i.validateSpec,style:l,styleSpec:r}):o[y]?i.validateSpec({key:y,value:e[y],valueSpec:o[y],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new qe(y,e[y],`unknown property "${y}"`)])}return h}function no(i){const e=i.value,r=i.styleSpec,o=r.terrain,l=i.style;let h=[];const p=fi(e);if(e===void 0)return h;if(p!=="object")return h=h.concat([new qe("terrain",e,`object expected, ${p} found`)]),h;for(const y in e)h=h.concat(o[y]?i.validateSpec({key:y,value:e[y],valueSpec:o[y],validateSpec:i.validateSpec,style:l,styleSpec:r}):[new qe(y,e[y],`unknown property "${y}"`)]);return h}function Zr(i){let e=[];const r=i.value,o=i.key;if(Array.isArray(r)){const l=[],h=[];for(const p in r)r[p].id&&l.includes(r[p].id)&&e.push(new qe(o,r,`all the sprites' ids must be unique, but ${r[p].id} is duplicated`)),l.push(r[p].id),r[p].url&&h.includes(r[p].url)&&e.push(new qe(o,r,`all the sprites' URLs must be unique, but ${r[p].url} is duplicated`)),h.push(r[p].url),e=e.concat(Xr({key:`${o}[${p}]`,value:r[p],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:i.validateSpec}));return e}return hr({key:o,value:r})}const oo={"*":()=>[],array:ro,boolean:function(i){const e=i.value,r=i.key,o=fi(e);return o!=="boolean"?[new qe(r,e,`boolean expected, ${o} found`)]:[]},number:ds,color:function(i){const e=i.key,r=i.value,o=fi(r);return o!=="string"?[new qe(e,r,`color expected, ${o} found`)]:yi.parse(String(r))?[]:[new qe(e,r,`color expected, "${r}" found`)]},constants:ba,enum:we,filter:Ye,function:wa,layer:lr,object:Xr,source:bi,light:an,terrain:no,string:hr,formatted:function(i){return hr(i).length===0?[]:de(i)},resolvedImage:function(i){return hr(i).length===0?[]:de(i)},padding:function(i){const e=i.key,r=i.value;if(fi(r)==="array"){if(r.length<1||r.length>4)return[new qe(e,r,`padding requires 1 to 4 values; ${r.length} values found`)];const o={type:"number"};let l=[];for(let h=0;h[]}})),i.constants&&(r=r.concat(ba({key:"constants",value:i.constants,style:i,styleSpec:e,validateSpec:ln}))),Ps(r)}function yn(i){return function(e){return i({...e,validateSpec:ln})}}function Ps(i){return[].concat(i).sort((e,r)=>e.line-r.line)}function fo(i){return function(...e){return Ps(i.apply(this,e))}}kr.source=fo(yn(bi)),kr.sprite=fo(yn(Zr)),kr.glyphs=fo(yn(ks)),kr.light=fo(yn(an)),kr.terrain=fo(yn(no)),kr.layer=fo(yn(lr)),kr.filter=fo(yn(Ye)),kr.paintProperty=fo(yn(ni)),kr.layoutProperty=fo(yn(ir));const mo=kr,Li=mo.light,wi=mo.paintProperty,zs=mo.layoutProperty;function Gn(i,e){let r=!1;if(e&&e.length)for(const o of e)i.fire(new wo(new Error(o.message))),r=!0;return r}class Lo{constructor(e,r,o){const l=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;const p=new Int32Array(this.arrayBuffer);e=p[0],this.d=(r=p[1])+2*(o=p[2]);for(let w=0;w=z[U+0]&&l>=z[U+1])?(y[N]=!0,p.push(M[N])):y[N]=!1}}}}_forEachCell(e,r,o,l,h,p,y,w){const T=this._convertToCellCoord(e),M=this._convertToCellCoord(r),z=this._convertToCellCoord(o),D=this._convertToCellCoord(l);for(let N=T;N<=z;N++)for(let U=M;U<=D;U++){const Z=this.d*U+N;if((!w||w(this._convertFromCellCoord(N),this._convertFromCellCoord(U),this._convertFromCellCoord(N+1),this._convertFromCellCoord(U+1)))&&h.call(this,e,r,o,l,Z,p,y,w))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const e=this.cells,r=3+this.cells.length+1+1;let o=0;for(let p=0;p=0)continue;const p=i[h];l[h]=dr[o].shallow.indexOf(h)>=0?p:Pn(p,e)}i instanceof Error&&(l.message=i.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return o!=="Object"&&(l.$name=o),l}throw new Error("can't serialize object of type "+typeof i)}function _o(i){if(i==null||typeof i=="boolean"||typeof i=="number"||typeof i=="string"||i instanceof Boolean||i instanceof Number||i instanceof String||i instanceof Date||i instanceof RegExp||i instanceof Blob||Wn(i)||en(i)||ArrayBuffer.isView(i)||i instanceof ImageData)return i;if(Array.isArray(i))return i.map(_o);if(typeof i=="object"){const e=i.$name||"Object";if(!dr[e])throw new Error(`can't deserialize unregistered class ${e}`);const{klass:r}=dr[e];if(!r)throw new Error(`can't deserialize unregistered class ${e}`);if(r.deserialize)return r.deserialize(i);const o=Object.create(r.prototype);for(const l of Object.keys(i)){if(l==="$name")continue;const h=i[l];o[l]=dr[e].shallow.indexOf(l)>=0?h:_o(h)}return o}throw new Error("can't deserialize object of type "+typeof i)}class Jo{constructor(){this.first=!0}update(e,r){const o=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=o,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=o,!0):(this.lastFloorZoom>o?(this.lastIntegerZoom=o+1,this.lastIntegerZoomTime=r):this.lastFloorZoomi>=128&&i<=255,Arabic:i=>i>=1536&&i<=1791,"Arabic Supplement":i=>i>=1872&&i<=1919,"Arabic Extended-A":i=>i>=2208&&i<=2303,"Hangul Jamo":i=>i>=4352&&i<=4607,"Unified Canadian Aboriginal Syllabics":i=>i>=5120&&i<=5759,Khmer:i=>i>=6016&&i<=6143,"Unified Canadian Aboriginal Syllabics Extended":i=>i>=6320&&i<=6399,"General Punctuation":i=>i>=8192&&i<=8303,"Letterlike Symbols":i=>i>=8448&&i<=8527,"Number Forms":i=>i>=8528&&i<=8591,"Miscellaneous Technical":i=>i>=8960&&i<=9215,"Control Pictures":i=>i>=9216&&i<=9279,"Optical Character Recognition":i=>i>=9280&&i<=9311,"Enclosed Alphanumerics":i=>i>=9312&&i<=9471,"Geometric Shapes":i=>i>=9632&&i<=9727,"Miscellaneous Symbols":i=>i>=9728&&i<=9983,"Miscellaneous Symbols and Arrows":i=>i>=11008&&i<=11263,"CJK Radicals Supplement":i=>i>=11904&&i<=12031,"Kangxi Radicals":i=>i>=12032&&i<=12255,"Ideographic Description Characters":i=>i>=12272&&i<=12287,"CJK Symbols and Punctuation":i=>i>=12288&&i<=12351,Hiragana:i=>i>=12352&&i<=12447,Katakana:i=>i>=12448&&i<=12543,Bopomofo:i=>i>=12544&&i<=12591,"Hangul Compatibility Jamo":i=>i>=12592&&i<=12687,Kanbun:i=>i>=12688&&i<=12703,"Bopomofo Extended":i=>i>=12704&&i<=12735,"CJK Strokes":i=>i>=12736&&i<=12783,"Katakana Phonetic Extensions":i=>i>=12784&&i<=12799,"Enclosed CJK Letters and Months":i=>i>=12800&&i<=13055,"CJK Compatibility":i=>i>=13056&&i<=13311,"CJK Unified Ideographs Extension A":i=>i>=13312&&i<=19903,"Yijing Hexagram Symbols":i=>i>=19904&&i<=19967,"CJK Unified Ideographs":i=>i>=19968&&i<=40959,"Yi Syllables":i=>i>=40960&&i<=42127,"Yi Radicals":i=>i>=42128&&i<=42191,"Hangul Jamo Extended-A":i=>i>=43360&&i<=43391,"Hangul Syllables":i=>i>=44032&&i<=55215,"Hangul Jamo Extended-B":i=>i>=55216&&i<=55295,"Private Use Area":i=>i>=57344&&i<=63743,"CJK Compatibility Ideographs":i=>i>=63744&&i<=64255,"Arabic Presentation Forms-A":i=>i>=64336&&i<=65023,"Vertical Forms":i=>i>=65040&&i<=65055,"CJK Compatibility Forms":i=>i>=65072&&i<=65103,"Small Form Variants":i=>i>=65104&&i<=65135,"Arabic Presentation Forms-B":i=>i>=65136&&i<=65279,"Halfwidth and Fullwidth Forms":i=>i>=65280&&i<=65519};function Sa(i){for(const e of i)if(fs(e.charCodeAt(0)))return!0;return!1}function ps(i){for(const e of i)if(!Za(e.charCodeAt(0)))return!1;return!0}function Za(i){return!(Xe.Arabic(i)||Xe["Arabic Supplement"](i)||Xe["Arabic Extended-A"](i)||Xe["Arabic Presentation Forms-A"](i)||Xe["Arabic Presentation Forms-B"](i))}function fs(i){return!(i!==746&&i!==747&&(i<4352||!(Xe["Bopomofo Extended"](i)||Xe.Bopomofo(i)||Xe["CJK Compatibility Forms"](i)&&!(i>=65097&&i<=65103)||Xe["CJK Compatibility Ideographs"](i)||Xe["CJK Compatibility"](i)||Xe["CJK Radicals Supplement"](i)||Xe["CJK Strokes"](i)||!(!Xe["CJK Symbols and Punctuation"](i)||i>=12296&&i<=12305||i>=12308&&i<=12319||i===12336)||Xe["CJK Unified Ideographs Extension A"](i)||Xe["CJK Unified Ideographs"](i)||Xe["Enclosed CJK Letters and Months"](i)||Xe["Hangul Compatibility Jamo"](i)||Xe["Hangul Jamo Extended-A"](i)||Xe["Hangul Jamo Extended-B"](i)||Xe["Hangul Jamo"](i)||Xe["Hangul Syllables"](i)||Xe.Hiragana(i)||Xe["Ideographic Description Characters"](i)||Xe.Kanbun(i)||Xe["Kangxi Radicals"](i)||Xe["Katakana Phonetic Extensions"](i)||Xe.Katakana(i)&&i!==12540||!(!Xe["Halfwidth and Fullwidth Forms"](i)||i===65288||i===65289||i===65293||i>=65306&&i<=65310||i===65339||i===65341||i===65343||i>=65371&&i<=65503||i===65507||i>=65512&&i<=65519)||!(!Xe["Small Form Variants"](i)||i>=65112&&i<=65118||i>=65123&&i<=65126)||Xe["Unified Canadian Aboriginal Syllabics"](i)||Xe["Unified Canadian Aboriginal Syllabics Extended"](i)||Xe["Vertical Forms"](i)||Xe["Yijing Hexagram Symbols"](i)||Xe["Yi Syllables"](i)||Xe["Yi Radicals"](i))))}function Ls(i){return!(fs(i)||function(e){return!!(Xe["Latin-1 Supplement"](e)&&(e===167||e===169||e===174||e===177||e===188||e===189||e===190||e===215||e===247)||Xe["General Punctuation"](e)&&(e===8214||e===8224||e===8225||e===8240||e===8241||e===8251||e===8252||e===8258||e===8263||e===8264||e===8265||e===8273)||Xe["Letterlike Symbols"](e)||Xe["Number Forms"](e)||Xe["Miscellaneous Technical"](e)&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||e===9003||e>=9085&&e<=9114||e>=9150&&e<=9165||e===9167||e>=9169&&e<=9179||e>=9186&&e<=9215)||Xe["Control Pictures"](e)&&e!==9251||Xe["Optical Character Recognition"](e)||Xe["Enclosed Alphanumerics"](e)||Xe["Geometric Shapes"](e)||Xe["Miscellaneous Symbols"](e)&&!(e>=9754&&e<=9759)||Xe["Miscellaneous Symbols and Arrows"](e)&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||Xe["CJK Symbols and Punctuation"](e)||Xe.Katakana(e)||Xe["Private Use Area"](e)||Xe["CJK Compatibility Forms"](e)||Xe["Small Form Variants"](e)||Xe["Halfwidth and Fullwidth Forms"](e)||e===8734||e===8756||e===8757||e>=9984&&e<=10087||e>=10102&&e<=10131||e===65532||e===65533)}(i))}function Ga(i){return i>=1424&&i<=2303||Xe["Arabic Presentation Forms-A"](i)||Xe["Arabic Presentation Forms-B"](i)}function Ds(i,e){return!(!e&&Ga(i)||i>=2304&&i<=3583||i>=3840&&i<=4255||Xe.Khmer(i))}function Ta(i){for(const e of i)if(Ga(e.charCodeAt(0)))return!0;return!1}const Rl="deferred",Ol="loading",Bl="loaded";let Nl=null,zn="unavailable",ms=null;const Wa=function(i){i&&typeof i=="string"&&i.indexOf("NetworkError")>-1&&(zn="error"),Nl&&Nl(i)};function Vl(){Ha.fire(new co("pluginStateChange",{pluginStatus:zn,pluginURL:ms}))}const Ha=new jo,Ul=function(){return zn},Rc=function(){if(zn!==Rl||!ms)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");zn=Ol,Vl(),ms&&Ue({url:ms},i=>{i?Wa(i):(zn=Bl,Vl())})},Hn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:()=>zn===Bl||Hn.applyArabicShaping!=null,isLoading:()=>zn===Ol,setState(i){if(!di())throw new Error("Cannot set the state of the rtl-text-plugin when not in the web-worker context");zn=i.pluginStatus,ms=i.pluginURL},isParsed(){if(!di())throw new Error("rtl-text-plugin is only parsed on the worker-threads");return Hn.applyArabicShaping!=null&&Hn.processBidirectionalText!=null&&Hn.processStyledBidirectionalText!=null},getPluginURL(){if(!di())throw new Error("rtl-text-plugin url can only be queried from the worker threads");return ms}};class Yi{constructor(e,r){this.zoom=e,r?(this.now=r.now,this.fadeDuration=r.fadeDuration,this.zoomHistory=r.zoomHistory,this.transition=r.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Jo,this.transition={})}isSupportedScript(e){return function(r,o){for(const l of r)if(!Ds(l.charCodeAt(0),o))return!1;return!0}(e,Hn.isLoaded())}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const e=this.zoom,r=e-Math.floor(e),o=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:r+(1-r)*o}:{fromScale:.5,toScale:1,t:1-(1-o)*r}}}class pl{constructor(e,r){this.property=e,this.value=r,this.expression=function(o,l){if(Ki(o))return new us(o,l);if(Zn(o)){const h=_a(o,l);if(h.result==="error")throw new Error(h.value.map(p=>`${p.key}: ${p.message}`).join(", "));return h.value}{let h=o;return l.type==="color"&&typeof o=="string"?h=yi.parse(o):l.type!=="padding"||typeof o!="number"&&!Array.isArray(o)?l.type==="variableAnchorOffsetCollection"&&Array.isArray(o)&&(h=Ir.parse(o)):h=qr.parse(o),{kind:"constant",evaluate:()=>h}}}(r===void 0?e.specification.default:r,e.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(e,r,o){return this.property.possiblyEvaluate(this,e,r,o)}}class jl{constructor(e){this.property=e,this.value=new pl(e,void 0)}transitioned(e,r){return new Bc(this.property,this.value,r,Nt({},e.transition,this.transition),e.now)}untransitioned(){return new Bc(this.property,this.value,null,{},0)}}class Oc{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return Ge(this._values[e].value.value)}setValue(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].value=new pl(this._values[e].property,r===null?void 0:Ge(r))}getTransition(e){return Ge(this._values[e].transition)}setTransition(e,r){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new jl(this._values[e].property)),this._values[e].transition=Ge(r)||void 0}serialize(){const e={};for(const r of Object.keys(this._values)){const o=this.getValue(r);o!==void 0&&(e[r]=o);const l=this.getTransition(r);l!==void 0&&(e[`${r}-transition`]=l)}return e}transitioned(e,r){const o=new Nc(this._properties);for(const l of Object.keys(this._values))o._values[l]=this._values[l].transitioned(e,r._values[l]);return o}untransitioned(){const e=new Nc(this._properties);for(const r of Object.keys(this._values))e._values[r]=this._values[r].untransitioned();return e}}class Bc{constructor(e,r,o,l,h){this.property=e,this.value=r,this.begin=h+l.delay||0,this.end=this.begin+l.duration||0,e.specification.transition&&(l.delay||l.duration)&&(this.prior=o)}possiblyEvaluate(e,r,o){const l=e.now||0,h=this.value.possiblyEvaluate(e,r,o),p=this.prior;if(p){if(l>this.end)return this.prior=null,h;if(this.value.isDataDriven())return this.prior=null,h;if(l=1)return 1;const T=w*w,M=T*w;return 4*(w<.5?M:3*(w-T)+M-.75)}(y))}}return h}}class Nc{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,r,o){const l=new fl(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].possiblyEvaluate(e,r,o);return l}hasTransition(){for(const e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class bu{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return this._values[e].value!==void 0}getValue(e){return Ge(this._values[e].value)}setValue(e,r){this._values[e]=new pl(this._values[e].property,r===null?void 0:Ge(r))}serialize(){const e={};for(const r of Object.keys(this._values)){const o=this.getValue(r);o!==void 0&&(e[r]=o)}return e}possiblyEvaluate(e,r,o){const l=new fl(this._properties);for(const h of Object.keys(this._values))l._values[h]=this._values[h].possiblyEvaluate(e,r,o);return l}}class vn{constructor(e,r,o){this.property=e,this.value=r,this.parameters=o}isConstant(){return this.value.kind==="constant"}constantOr(e){return this.value.kind==="constant"?this.value.value:e}evaluate(e,r,o,l){return this.property.evaluate(this.value,this.parameters,e,r,o,l)}}class fl{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class xt{constructor(e){this.specification=e}possiblyEvaluate(e,r){if(e.isDataDriven())throw new Error("Value should not be data driven");return e.expression.evaluate(r)}interpolate(e,r,o){const l=Hr[this.specification.type];return l?l(e,r,o):e}}class Et{constructor(e,r){this.specification=e,this.overrides=r}possiblyEvaluate(e,r,o,l){return new vn(this,e.expression.kind==="constant"||e.expression.kind==="camera"?{kind:"constant",value:e.expression.evaluate(r,null,{},o,l)}:e.expression,r)}interpolate(e,r,o){if(e.value.kind!=="constant"||r.value.kind!=="constant")return e;if(e.value.value===void 0||r.value.value===void 0)return new vn(this,{kind:"constant",value:void 0},e.parameters);const l=Hr[this.specification.type];if(l){const h=l(e.value.value,r.value.value,o);return new vn(this,{kind:"constant",value:h},e.parameters)}return e}evaluate(e,r,o,l,h,p){return e.kind==="constant"?e.value:e.evaluate(r,o,l,h,p)}}class Xa extends Et{possiblyEvaluate(e,r,o,l){if(e.value===void 0)return new vn(this,{kind:"constant",value:void 0},r);if(e.expression.kind==="constant"){const h=e.expression.evaluate(r,null,{},o,l),p=e.property.specification.type==="resolvedImage"&&typeof h!="string"?h.name:h,y=this._calculate(p,p,p,r);return new vn(this,{kind:"constant",value:y},r)}if(e.expression.kind==="camera"){const h=this._calculate(e.expression.evaluate({zoom:r.zoom-1}),e.expression.evaluate({zoom:r.zoom}),e.expression.evaluate({zoom:r.zoom+1}),r);return new vn(this,{kind:"constant",value:h},r)}return new vn(this,e.expression,r)}evaluate(e,r,o,l,h,p){if(e.kind==="source"){const y=e.evaluate(r,o,l,h,p);return this._calculate(y,y,y,r)}return e.kind==="composite"?this._calculate(e.evaluate({zoom:Math.floor(r.zoom)-1},o,l),e.evaluate({zoom:Math.floor(r.zoom)},o,l),e.evaluate({zoom:Math.floor(r.zoom)+1},o,l),r):e.value}_calculate(e,r,o,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:o,to:r}}interpolate(e){return e}}class ql{constructor(e){this.specification=e}possiblyEvaluate(e,r,o,l){if(e.value!==void 0){if(e.expression.kind==="constant"){const h=e.expression.evaluate(r,null,{},o,l);return this._calculate(h,h,h,r)}return this._calculate(e.expression.evaluate(new Yi(Math.floor(r.zoom-1),r)),e.expression.evaluate(new Yi(Math.floor(r.zoom),r)),e.expression.evaluate(new Yi(Math.floor(r.zoom+1),r)),r)}}_calculate(e,r,o,l){return l.zoom>l.zoomHistory.lastIntegerZoom?{from:e,to:r}:{from:o,to:r}}interpolate(e){return e}}class Zl{constructor(e){this.specification=e}possiblyEvaluate(e,r,o,l){return!!e.expression.evaluate(r,null,{},o,l)}interpolate(){return!1}}class xr{constructor(e){this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const r in e){const o=e[r];o.specification.overridable&&this.overridableProperties.push(r);const l=this.defaultPropertyValues[r]=new pl(o,void 0),h=this.defaultTransitionablePropertyValues[r]=new jl(o);this.defaultTransitioningPropertyValues[r]=h.untransitioned(),this.defaultPossiblyEvaluatedValues[r]=l.possiblyEvaluate({})}}}tt("DataDrivenProperty",Et),tt("DataConstantProperty",xt),tt("CrossFadedDataDrivenProperty",Xa),tt("CrossFadedProperty",ql),tt("ColorRampProperty",Zl);const Gl="-transition";class so extends jo{constructor(e,r){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},e.type!=="custom"&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,e.type!=="background"&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new bu(r.layout)),r.paint)){this._transitionablePaint=new Oc(r.paint);for(const o in e.paint)this.setPaintProperty(o,e.paint[o],{validate:!1});for(const o in e.layout)this.setLayoutProperty(o,e.layout[o],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new fl(r.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return e==="visibility"?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,r,o={}){r!=null&&this._validate(zs,`layers.${this.id}.layout.${e}`,e,r,o)||(e!=="visibility"?this._unevaluatedLayout.setValue(e,r):this.visibility=r)}getPaintProperty(e){return e.endsWith(Gl)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,r,o={}){if(r!=null&&this._validate(wi,`layers.${this.id}.paint.${e}`,e,r,o))return!1;if(e.endsWith(Gl))return this._transitionablePaint.setTransition(e.slice(0,-11),r||void 0),!1;{const l=this._transitionablePaint._values[e],h=l.property.specification["property-type"]==="cross-faded-data-driven",p=l.value.isDataDriven(),y=l.value;this._transitionablePaint.setValue(e,r),this._handleSpecialPaintPropertyUpdate(e);const w=this._transitionablePaint._values[e].value;return w.isDataDriven()||p||h||this._handleOverridablePaintPropertyUpdate(e,y,w)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,r,o){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||this.visibility==="none"}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,r){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,r)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,r)}serialize(){const e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),ke(e,(r,o)=>!(r===void 0||o==="layout"&&!Object.keys(r).length||o==="paint"&&!Object.keys(r).length))}_validate(e,r,o,l,h={}){return(!h||h.validate!==!1)&&Gn(this,e.call(mo,{key:r,layerType:this.type,objectKey:o,value:l,styleSpec:Se,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const e in this.paint._values){const r=this.paint.get(e);if(r instanceof vn&&Co(r.property.specification)&&(r.value.kind==="source"||r.value.kind==="composite")&&r.value.isStateDependent)return!0}return!1}}const Vc={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Fs{constructor(e,r){this._structArray=e,this._pos1=r*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class cr{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,r){return e._trim(),r&&(e.isTransferred=!0,r.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){const r=Object.create(this.prototype);return r.arrayBuffer=e.arrayBuffer,r.length=e.length,r.capacity=e.arrayBuffer.byteLength/r.bytesPerElement,r._refreshViews(),r}_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(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const r=this.uint8;this._refreshViews(),r&&this.uint8.set(r)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function or(i,e=1){let r=0,o=0;return{members:i.map(l=>{const h=Vc[l.type].BYTES_PER_ELEMENT,p=r=Ia(r,Math.max(e,h)),y=l.components||1;return o=Math.max(o,h),r+=h*y,{name:l.name,type:l.type,components:y,offset:p}}),size:Ia(r,Math.max(o,e)),alignment:e}}function Ia(i,e){return Math.ceil(i/e)*e}class Ka extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.int16[l+0]=r,this.int16[l+1]=o,e}}Ka.prototype.bytesPerElement=4,tt("StructArrayLayout2i4",Ka);class Ja extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.int16[h+0]=r,this.int16[h+1]=o,this.int16[h+2]=l,e}}Ja.prototype.bytesPerElement=6,tt("StructArrayLayout3i6",Ja);class Rs extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=4*e;return this.int16[p+0]=r,this.int16[p+1]=o,this.int16[p+2]=l,this.int16[p+3]=h,e}}Rs.prototype.bytesPerElement=8,tt("StructArrayLayout4i8",Rs);class Wl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=6*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.int16[w+2]=l,this.int16[w+3]=h,this.int16[w+4]=p,this.int16[w+5]=y,e}}Wl.prototype.bytesPerElement=12,tt("StructArrayLayout2i4i12",Wl);class Hl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=4*e,T=8*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.uint8[T+4]=l,this.uint8[T+5]=h,this.uint8[T+6]=p,this.uint8[T+7]=y,e}}Hl.prototype.bytesPerElement=8,tt("StructArrayLayout2i4ub8",Hl);class Ea extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.float32[l+0]=r,this.float32[l+1]=o,e}}Ea.prototype.bytesPerElement=8,tt("StructArrayLayout2f8",Ea);class Xl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p,y,w,T,M){const z=this.length;return this.resize(z+1),this.emplace(z,e,r,o,l,h,p,y,w,T,M)}emplace(e,r,o,l,h,p,y,w,T,M,z){const D=10*e;return this.uint16[D+0]=r,this.uint16[D+1]=o,this.uint16[D+2]=l,this.uint16[D+3]=h,this.uint16[D+4]=p,this.uint16[D+5]=y,this.uint16[D+6]=w,this.uint16[D+7]=T,this.uint16[D+8]=M,this.uint16[D+9]=z,e}}Xl.prototype.bytesPerElement=20,tt("StructArrayLayout10ui20",Xl);class Kl extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p,y,w,T,M,z,D){const N=this.length;return this.resize(N+1),this.emplace(N,e,r,o,l,h,p,y,w,T,M,z,D)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,N){const U=12*e;return this.int16[U+0]=r,this.int16[U+1]=o,this.int16[U+2]=l,this.int16[U+3]=h,this.uint16[U+4]=p,this.uint16[U+5]=y,this.uint16[U+6]=w,this.uint16[U+7]=T,this.int16[U+8]=M,this.int16[U+9]=z,this.int16[U+10]=D,this.int16[U+11]=N,e}}Kl.prototype.bytesPerElement=24,tt("StructArrayLayout4i4ui4i24",Kl);class Si extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.float32[h+0]=r,this.float32[h+1]=o,this.float32[h+2]=l,e}}Si.prototype.bytesPerElement=12,tt("StructArrayLayout3f12",Si);class u extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint32[1*e+0]=r,e}}u.prototype.bytesPerElement=4,tt("StructArrayLayout1ul4",u);class t extends cr{_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(e,r,o,l,h,p,y,w,T){const M=this.length;return this.resize(M+1),this.emplace(M,e,r,o,l,h,p,y,w,T)}emplace(e,r,o,l,h,p,y,w,T,M){const z=10*e,D=5*e;return this.int16[z+0]=r,this.int16[z+1]=o,this.int16[z+2]=l,this.int16[z+3]=h,this.int16[z+4]=p,this.int16[z+5]=y,this.uint32[D+3]=w,this.uint16[z+8]=T,this.uint16[z+9]=M,e}}t.prototype.bytesPerElement=20,tt("StructArrayLayout6i1ul2ui20",t);class n extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h,p){const y=this.length;return this.resize(y+1),this.emplace(y,e,r,o,l,h,p)}emplace(e,r,o,l,h,p,y){const w=6*e;return this.int16[w+0]=r,this.int16[w+1]=o,this.int16[w+2]=l,this.int16[w+3]=h,this.int16[w+4]=p,this.int16[w+5]=y,e}}n.prototype.bytesPerElement=12,tt("StructArrayLayout2i2i2i12",n);class a extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,r,o,l,h){const p=this.length;return this.resize(p+1),this.emplace(p,e,r,o,l,h)}emplace(e,r,o,l,h,p){const y=4*e,w=8*e;return this.float32[y+0]=r,this.float32[y+1]=o,this.float32[y+2]=l,this.int16[w+6]=h,this.int16[w+7]=p,e}}a.prototype.bytesPerElement=16,tt("StructArrayLayout2f1f2i16",a);class c extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=12*e,y=3*e;return this.uint8[p+0]=r,this.uint8[p+1]=o,this.float32[y+1]=l,this.float32[y+2]=h,e}}c.prototype.bytesPerElement=12,tt("StructArrayLayout2ub2f12",c);class d extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.uint16[h+0]=r,this.uint16[h+1]=o,this.uint16[h+2]=l,e}}d.prototype.bytesPerElement=6,tt("StructArrayLayout3ui6",d);class x extends cr{_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(e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie){const ue=this.length;return this.resize(ue+1),this.emplace(ue,e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie,ue){const re=24*e,pe=12*e,ye=48*e;return this.int16[re+0]=r,this.int16[re+1]=o,this.uint16[re+2]=l,this.uint16[re+3]=h,this.uint32[pe+2]=p,this.uint32[pe+3]=y,this.uint32[pe+4]=w,this.uint16[re+10]=T,this.uint16[re+11]=M,this.uint16[re+12]=z,this.float32[pe+7]=D,this.float32[pe+8]=N,this.uint8[ye+36]=U,this.uint8[ye+37]=Z,this.uint8[ye+38]=$,this.uint32[pe+10]=ie,this.int16[re+22]=ue,e}}x.prototype.bytesPerElement=48,tt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",x);class b extends cr{_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(e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie,ue,re,pe,ye,Ae,lt,pt,st,$e,Ze,ht){const Ke=this.length;return this.resize(Ke+1),this.emplace(Ke,e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie,ue,re,pe,ye,Ae,lt,pt,st,$e,Ze,ht)}emplace(e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z,$,ie,ue,re,pe,ye,Ae,lt,pt,st,$e,Ze,ht,Ke){const Be=32*e,bt=16*e;return this.int16[Be+0]=r,this.int16[Be+1]=o,this.int16[Be+2]=l,this.int16[Be+3]=h,this.int16[Be+4]=p,this.int16[Be+5]=y,this.int16[Be+6]=w,this.int16[Be+7]=T,this.uint16[Be+8]=M,this.uint16[Be+9]=z,this.uint16[Be+10]=D,this.uint16[Be+11]=N,this.uint16[Be+12]=U,this.uint16[Be+13]=Z,this.uint16[Be+14]=$,this.uint16[Be+15]=ie,this.uint16[Be+16]=ue,this.uint16[Be+17]=re,this.uint16[Be+18]=pe,this.uint16[Be+19]=ye,this.uint16[Be+20]=Ae,this.uint16[Be+21]=lt,this.uint16[Be+22]=pt,this.uint32[bt+12]=st,this.float32[bt+13]=$e,this.float32[bt+14]=Ze,this.uint16[Be+30]=ht,this.uint16[Be+31]=Ke,e}}b.prototype.bytesPerElement=64,tt("StructArrayLayout8i15ui1ul2f2ui64",b);class S extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.float32[1*e+0]=r,e}}S.prototype.bytesPerElement=4,tt("StructArrayLayout1f4",S);class C extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=3*e;return this.uint16[6*e+0]=r,this.float32[h+1]=o,this.float32[h+2]=l,e}}C.prototype.bytesPerElement=12,tt("StructArrayLayout1ui2f12",C);class A extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r,o){const l=this.length;return this.resize(l+1),this.emplace(l,e,r,o)}emplace(e,r,o,l){const h=4*e;return this.uint32[2*e+0]=r,this.uint16[h+2]=o,this.uint16[h+3]=l,e}}A.prototype.bytesPerElement=8,tt("StructArrayLayout1ul2ui8",A);class P extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,r){const o=this.length;return this.resize(o+1),this.emplace(o,e,r)}emplace(e,r,o){const l=2*e;return this.uint16[l+0]=r,this.uint16[l+1]=o,e}}P.prototype.bytesPerElement=4,tt("StructArrayLayout2ui4",P);class R extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){const r=this.length;return this.resize(r+1),this.emplace(r,e)}emplace(e,r){return this.uint16[1*e+0]=r,e}}R.prototype.bytesPerElement=2,tt("StructArrayLayout1ui2",R);class W extends cr{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,r,o,l){const h=this.length;return this.resize(h+1),this.emplace(h,e,r,o,l)}emplace(e,r,o,l,h){const p=4*e;return this.float32[p+0]=r,this.float32[p+1]=o,this.float32[p+2]=l,this.float32[p+3]=h,e}}W.prototype.bytesPerElement=16,tt("StructArrayLayout4f16",W);class G extends Fs{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)}}G.prototype.size=20;class K extends t{get(e){return new G(this,e)}}tt("CollisionBoxArray",K);class q extends Fs{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(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}q.prototype.size=48;class le extends x{get(e){return new q(this,e)}}tt("PlacedSymbolArray",le);class me extends Fs{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(e){this._structArray.uint32[this._pos4+12]=e}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]}}me.prototype.size=64;class ee extends b{get(e){return new me(this,e)}}tt("SymbolInstanceArray",ee);class ce extends S{getoffsetX(e){return this.float32[1*e+0]}}tt("GlyphOffsetArray",ce);class ve extends Ja{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}tt("SymbolLineVertexArray",ve);class xe extends Fs{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]}}xe.prototype.size=12;class Me extends C{get(e){return new xe(this,e)}}tt("TextAnchorOffsetArray",Me);class Oe extends Fs{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]}}Oe.prototype.size=8;class ze extends A{get(e){return new Oe(this,e)}}tt("FeatureIndexArray",ze);class je extends Ka{}class dt extends Ka{}class $t extends Ka{}class Qe extends Wl{}class Ct extends Hl{}class gt extends Ea{}class Mi extends Xl{}class Jt extends Kl{}class jt extends Si{}class ei extends u{}class pr extends n{}class qi extends c{}class Kr extends d{}class Pr extends P{}const br=or([{name:"a_pos",components:2,type:"Int16"}],4),{members:Xn}=br;class Qi{constructor(e=[]){this.segments=e}prepareSegment(e,r,o,l){let h=this.segments[this.segments.length-1];return e>Qi.MAX_VERTEX_ARRAY_LENGTH&&Dt(`Max vertices per segment is ${Qi.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!h||h.vertexLength+e>Qi.MAX_VERTEX_ARRAY_LENGTH||h.sortKey!==l)&&(h={vertexOffset:r.length,primitiveOffset:o.length,vertexLength:0,primitiveLength:0},l!==void 0&&(h.sortKey=l),this.segments.push(h)),h}get(){return this.segments}destroy(){for(const e of this.segments)for(const r in e.vaos)e.vaos[r].destroy()}static simpleSegment(e,r,o,l){return new Qi([{vertexOffset:e,primitiveOffset:r,vertexLength:o,primitiveLength:l,vaos:{},sortKey:0}])}}function Do(i,e){return 256*(i=ti(Math.floor(i),0,255))+ti(Math.floor(e),0,255)}Qi.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,tt("SegmentVector",Qi);const Fo=or([{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 _s={exports:{}},Os={exports:{}};Os.exports=function(i,e){var r,o,l,h,p,y,w,T;for(o=i.length-(r=3&i.length),l=e,p=3432918353,y=461845907,T=0;T>>16)*p&65535)<<16)&4294967295)<<15|w>>>17))*y+(((w>>>16)*y&65535)<<16)&4294967295)<<13|l>>>19))+((5*(l>>>16)&65535)<<16)&4294967295))+((58964+(h>>>16)&65535)<<16);switch(w=0,r){case 3:w^=(255&i.charCodeAt(T+2))<<16;case 2:w^=(255&i.charCodeAt(T+1))<<8;case 1:l^=w=(65535&(w=(w=(65535&(w^=255&i.charCodeAt(T)))*p+(((w>>>16)*p&65535)<<16)&4294967295)<<15|w>>>17))*y+(((w>>>16)*y&65535)<<16)&4294967295}return l^=i.length,l=2246822507*(65535&(l^=l>>>16))+((2246822507*(l>>>16)&65535)<<16)&4294967295,l=3266489909*(65535&(l^=l>>>13))+((3266489909*(l>>>16)&65535)<<16)&4294967295,(l^=l>>>16)>>>0};var Ca=Os.exports,cn={exports:{}};cn.exports=function(i,e){for(var r,o=i.length,l=e^o,h=0;o>=4;)r=1540483477*(65535&(r=255&i.charCodeAt(h)|(255&i.charCodeAt(++h))<<8|(255&i.charCodeAt(++h))<<16|(255&i.charCodeAt(++h))<<24))+((1540483477*(r>>>16)&65535)<<16),l=1540483477*(65535&l)+((1540483477*(l>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),o-=4,++h;switch(o){case 3:l^=(255&i.charCodeAt(h+2))<<16;case 2:l^=(255&i.charCodeAt(h+1))<<8;case 1:l=1540483477*(65535&(l^=255&i.charCodeAt(h)))+((1540483477*(l>>>16)&65535)<<16)}return l=1540483477*(65535&(l^=l>>>13))+((1540483477*(l>>>16)&65535)<<16),(l^=l>>>15)>>>0};var Jr=Ca,xn=cn.exports;_s.exports=Jr,_s.exports.murmur3=Jr,_s.exports.murmur2=xn;var Bs=V(_s.exports);class fr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,r,o,l){this.ids.push(zr(e)),this.positions.push(r,o,l)}getPositions(e){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const r=zr(e);let o=0,l=this.ids.length-1;for(;o>1;this.ids[p]>=r?l=p:o=p+1}const h=[];for(;this.ids[o]===r;)h.push({index:this.positions[3*o],start:this.positions[3*o+1],end:this.positions[3*o+2]}),o++;return h}static serialize(e,r){const o=new Float64Array(e.ids),l=new Uint32Array(e.positions);return Ln(o,l,0,o.length-1),r&&r.push(o.buffer,l.buffer),{ids:o,positions:l}}static deserialize(e){const r=new fr;return r.ids=e.ids,r.positions=e.positions,r.indexed=!0,r}}function zr(i){const e=+i;return!isNaN(e)&&e<=Number.MAX_SAFE_INTEGER?e:Bs(String(i))}function Ln(i,e,r,o){for(;r>1];let h=r-1,p=o+1;for(;;){do h++;while(i[h]l);if(h>=p)break;mr(i,h,p),mr(e,3*h,3*p),mr(e,3*h+1,3*p+1),mr(e,3*h+2,3*p+2)}p-r`u_${l}`),this.type=o}setUniform(e,r,o){e.set(o.constantOr(this.value))}getBinding(e,r,o){return this.type==="color"?new jc(e,r):new ml(e,r)}}class Vs{constructor(e,r){this.uniformNames=r.map(o=>`u_${o}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,r){this.pixelRatioFrom=r.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=r.tlbr,this.patternTo=e.tlbr}setUniform(e,r,o,l){const h=l==="u_pattern_to"?this.patternTo:l==="u_pattern_from"?this.patternFrom:l==="u_pixel_ratio_to"?this.pixelRatioTo:l==="u_pixel_ratio_from"?this.pixelRatioFrom:null;h&&e.set(h)}getBinding(e,r,o){return o.substr(0,9)==="u_pattern"?new Uc(e,r):new ml(e,r)}}class Oo{constructor(e,r,o,l){this.expression=e,this.type=o,this.maxValue=0,this.paintVertexAttributes=r.map(h=>({name:`a_${h}`,type:"Float32",components:o==="color"?2:1,offset:0})),this.paintVertexArray=new l}populatePaintArray(e,r,o,l,h){const p=this.paintVertexArray.length,y=this.expression.evaluate(new Yi(0),r,{},l,[],h);this.paintVertexArray.resize(e),this._setPaintValue(p,e,y)}updatePaintArray(e,r,o,l){const h=this.expression.evaluate({zoom:0},o,l);this._setPaintValue(e,r,h)}_setPaintValue(e,r,o){if(this.type==="color"){const l=Jl(o);for(let h=e;h`u_${y}_t`),this.type=o,this.useIntegerZoom=l,this.zoom=h,this.maxValue=0,this.paintVertexAttributes=r.map(y=>({name:`a_${y}`,type:"Float32",components:o==="color"?4:2,offset:0})),this.paintVertexArray=new p}populatePaintArray(e,r,o,l,h){const p=this.expression.evaluate(new Yi(this.zoom),r,{},l,[],h),y=this.expression.evaluate(new Yi(this.zoom+1),r,{},l,[],h),w=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(w,e,p,y)}updatePaintArray(e,r,o,l){const h=this.expression.evaluate({zoom:this.zoom},o,l),p=this.expression.evaluate({zoom:this.zoom+1},o,l);this._setPaintValue(e,r,h,p)}_setPaintValue(e,r,o,l){if(this.type==="color"){const h=Jl(o),p=Jl(l);for(let y=e;y`#define HAS_UNIFORM_${l}`))}return e}getBinderAttributes(){const e=[];for(const r in this.binders){const o=this.binders[r];if(o instanceof Oo||o instanceof ao)for(let l=0;l!0){this.programConfigurations={};for(const l of e)this.programConfigurations[l.id]=new Yl(l,r,o);this.needsUpload=!1,this._featureMap=new fr,this._bufferOffset=0}populatePaintArrays(e,r,o,l,h,p){for(const y in this.programConfigurations)this.programConfigurations[y].populatePaintArrays(e,r,l,h,p);r.id!==void 0&&this._featureMap.add(r.id,o,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,r,o,l){for(const h of o)this.needsUpload=this.programConfigurations[h.id].updatePaintArrays(e,this._featureMap,r,h,l)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(const r in this.programConfigurations)this.programConfigurations[r].upload(e);this.needsUpload=!1}}destroy(){for(const e in this.programConfigurations)this.programConfigurations[e].destroy()}}function pf(i,e){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"]}[i]||[i.replace(`${e}-`,"").replace(/-/g,"_")]}function Lh(i,e,r){const o={color:{source:Ea,composite:W},number:{source:S,composite:Ea}},l=function(h){return{"line-pattern":{source:Mi,composite:Mi},"fill-pattern":{source:Mi,composite:Mi},"fill-extrusion-pattern":{source:Mi,composite:Mi}}[h]}(i);return l&&l[r]||o[e][r]}tt("ConstantBinder",Ro),tt("CrossFadedConstantBinder",Vs),tt("SourceExpressionBinder",Oo),tt("CrossFadedCompositeBinder",Bo),tt("CompositeExpressionBinder",ao),tt("ProgramConfiguration",Yl,{omit:["_buffers"]}),tt("ProgramConfigurationSet",Yo);const Cr=8192,Su=Math.pow(2,14)-1,Dh=-Su-1;function Ya(i){const e=Cr/i.extent,r=i.loadGeometry();for(let o=0;op.x+1||wp.y+1)&&Dt("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function Qa(i,e){return{type:i.type,id:i.id,properties:i.properties,geometry:e?Ya(i):[]}}function qc(i,e,r,o,l){i.emplaceBack(2*e+(o+1)/2,2*r+(l+1)/2)}class Tu{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new dt,this.indexArray=new Kr,this.segments=new Qi,this.programConfigurations=new Yo(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){const l=this.layers[0],h=[];let p=null,y=!1;l.type==="circle"&&(p=l.layout.get("circle-sort-key"),y=!p.isConstant());for(const{feature:w,id:T,index:M,sourceLayerIndex:z}of e){const D=this.layers[0]._featureFilter.needGeometry,N=Qa(w,D);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),N,o))continue;const U=y?p.evaluate(N,{},o):void 0,Z={id:T,properties:w.properties,type:w.type,sourceLayerIndex:z,index:M,geometry:D?N.geometry:Ya(w),patterns:{},sortKey:U};h.push(Z)}y&&h.sort((w,T)=>w.sortKey-T.sortKey);for(const w of h){const{geometry:T,index:M,sourceLayerIndex:z}=w,D=e[M].feature;this.addFeature(w,T,M,o),r.featureIndex.insert(D,T,M,z,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Xn),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,r,o,l){for(const h of r)for(const p of h){const y=p.x,w=p.y;if(y<0||y>=Cr||w<0||w>=Cr)continue;const T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),M=T.vertexLength;qc(this.layoutVertexArray,y,w,-1,-1),qc(this.layoutVertexArray,y,w,1,-1),qc(this.layoutVertexArray,y,w,1,1),qc(this.layoutVertexArray,y,w,-1,1),this.indexArray.emplaceBack(M,M+1,M+2),this.indexArray.emplaceBack(M,M+3,M+2),T.vertexLength+=4,T.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,{},l)}}function Fh(i,e){for(let r=0;r1){if(Iu(i,e))return!0;for(let o=0;o1?r:r.sub(e)._mult(l)._add(e))}function Bh(i,e){let r,o,l,h=!1;for(let p=0;pe.y!=l.y>e.y&&e.x<(l.x-o.x)*(e.y-o.y)/(l.y-o.y)+o.x&&(h=!h)}return h}function _l(i,e){let r=!1;for(let o=0,l=i.length-1;oe.y!=p.y>e.y&&e.x<(p.x-h.x)*(e.y-h.y)/(p.y-h.y)+h.x&&(r=!r)}return r}function gf(i,e,r){const o=r[0],l=r[2];if(i.xl.x&&e.x>l.x||i.yl.y&&e.y>l.y)return!1;const h=qt(i,e,r[0]);return h!==qt(i,e,r[1])||h!==qt(i,e,r[2])||h!==qt(i,e,r[3])}function Ql(i,e,r){const o=e.paint.get(i).value;return o.kind==="constant"?o.value:r.programConfigurations.get(e.id).getMaxValue(i)}function Zc(i){return Math.sqrt(i[0]*i[0]+i[1]*i[1])}function Gc(i,e,r,o,l){if(!e[0]&&!e[1])return i;const h=_e.convert(e)._mult(l);r==="viewport"&&h._rotate(-o);const p=[];for(let y=0;yjh($,Z))}(T,w),N=z?M*y:M;for(const U of l)for(const Z of U){const $=z?Z:jh(Z,w);let ie=N;const ue=Wc([],[Z.x,Z.y,0,1],w);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ie*=ue[3]/p.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ie*=p.cameraToCenterDistance/ue[3]),ff(D,$,ie))return!0}return!1}}function jh(i,e){const r=Wc([],[i.x,i.y,0,1],e);return new _e(r[0]/r[3],r[1]/r[3])}class qh extends Tu{}let Zh;tt("HeatmapBucket",qh,{omit:["layers"]});var bf={get paint(){return Zh=Zh||new xr({"heatmap-radius":new Et(Se.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Et(Se.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new xt(Se.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Zl(Se.paint_heatmap["heatmap-color"]),"heatmap-opacity":new xt(Se.paint_heatmap["heatmap-opacity"])})}};function Mu(i,{width:e,height:r},o,l){if(l){if(l instanceof Uint8ClampedArray)l=new Uint8Array(l.buffer);else if(l.length!==e*r*o)throw new RangeError(`mismatched image size. expected: ${l.length} but got: ${e*r*o}`)}else l=new Uint8Array(e*r*o);return i.width=e,i.height=r,i.data=l,i}function Gh(i,{width:e,height:r},o){if(e===i.width&&r===i.height)return;const l=Mu({},{width:e,height:r},o);Au(i,l,{x:0,y:0},{x:0,y:0},{width:Math.min(i.width,e),height:Math.min(i.height,r)},o),i.width=e,i.height=r,i.data=l.data}function Au(i,e,r,o,l,h){if(l.width===0||l.height===0)return e;if(l.width>i.width||l.height>i.height||r.x>i.width-l.width||r.y>i.height-l.height)throw new RangeError("out of range source coordinates for image copy");if(l.width>e.width||l.height>e.height||o.x>e.width-l.width||o.y>e.height-l.height)throw new RangeError("out of range destination coordinates for image copy");const p=i.data,y=e.data;if(p===y)throw new Error("srcData equals dstData, so image is already copied");for(let w=0;w{e[i.evaluationKey]=w;const T=i.expression.evaluate(e);l.data[p+y+0]=Math.floor(255*T.r/T.a),l.data[p+y+1]=Math.floor(255*T.g/T.a),l.data[p+y+2]=Math.floor(255*T.b/T.a),l.data[p+y+3]=Math.floor(255*T.a)};if(i.clips)for(let p=0,y=0;p80*r){o=h=i[0],l=p=i[1];for(var U=r;Uh&&(h=y),w>p&&(p=w);T=(T=Math.max(h-o,p-l))!==0?32767/T:0}return tc(D,N,r,o,l,T,0),N}function Xh(i,e,r,o,l){var h,p;if(l===Lu(i,e,r,o)>0)for(h=e;h=e;h-=o)p=Yh(h,i[h],i[h+1],p);return p&&Xc(p,p.next)&&(rc(p),p=p.next),p}function $a(i,e){if(!i)return i;e||(e=i);var r,o=i;do if(r=!1,o.steiner||!Xc(o,o.next)&&wr(o.prev,o,o.next)!==0)o=o.next;else{if(rc(o),(o=e=o.prev)===o.next)break;r=!0}while(r||o!==e);return e}function tc(i,e,r,o,l,h,p){if(i){!p&&h&&function(M,z,D,N){var U=M;do U.z===0&&(U.z=Pu(U.x,U.y,z,D,N)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==M);U.prevZ.nextZ=null,U.prevZ=null,function(Z){var $,ie,ue,re,pe,ye,Ae,lt,pt=1;do{for(ie=Z,Z=null,pe=null,ye=0;ie;){for(ye++,ue=ie,Ae=0,$=0;$0||lt>0&&ue;)Ae!==0&&(lt===0||!ue||ie.z<=ue.z)?(re=ie,ie=ie.nextZ,Ae--):(re=ue,ue=ue.nextZ,lt--),pe?pe.nextZ=re:Z=re,re.prevZ=pe,pe=re;ie=ue}pe.nextZ=null,pt*=2}while(ye>1)}(U)}(i,o,l,h);for(var y,w,T=i;i.prev!==i.next;)if(y=i.prev,w=i.next,h?Mf(i,o,l,h):Cf(i))e.push(y.i/r|0),e.push(i.i/r|0),e.push(w.i/r|0),rc(i),i=w.next,T=w.next;else if((i=w)===T){p?p===1?tc(i=Af($a(i),e,r),e,r,o,l,h,2):p===2&&kf(i,e,r,o,l,h):tc($a(i),e,r,o,l,h,1);break}}}function Cf(i){var e=i.prev,r=i,o=i.next;if(wr(e,r,o)>=0)return!1;for(var l=e.x,h=r.x,p=o.x,y=e.y,w=r.y,T=o.y,M=lh?l>p?l:p:h>p?h:p,N=y>w?y>T?y:T:w>T?w:T,U=o.next;U!==e;){if(U.x>=M&&U.x<=D&&U.y>=z&&U.y<=N&&yl(l,y,h,w,p,T,U.x,U.y)&&wr(U.prev,U,U.next)>=0)return!1;U=U.next}return!0}function Mf(i,e,r,o){var l=i.prev,h=i,p=i.next;if(wr(l,h,p)>=0)return!1;for(var y=l.x,w=h.x,T=p.x,M=l.y,z=h.y,D=p.y,N=yw?y>T?y:T:w>T?w:T,$=M>z?M>D?M:D:z>D?z:D,ie=Pu(N,U,e,r,o),ue=Pu(Z,$,e,r,o),re=i.prevZ,pe=i.nextZ;re&&re.z>=ie&&pe&&pe.z<=ue;){if(re.x>=N&&re.x<=Z&&re.y>=U&&re.y<=$&&re!==l&&re!==p&&yl(y,M,w,z,T,D,re.x,re.y)&&wr(re.prev,re,re.next)>=0||(re=re.prevZ,pe.x>=N&&pe.x<=Z&&pe.y>=U&&pe.y<=$&&pe!==l&&pe!==p&&yl(y,M,w,z,T,D,pe.x,pe.y)&&wr(pe.prev,pe,pe.next)>=0))return!1;pe=pe.nextZ}for(;re&&re.z>=ie;){if(re.x>=N&&re.x<=Z&&re.y>=U&&re.y<=$&&re!==l&&re!==p&&yl(y,M,w,z,T,D,re.x,re.y)&&wr(re.prev,re,re.next)>=0)return!1;re=re.prevZ}for(;pe&&pe.z<=ue;){if(pe.x>=N&&pe.x<=Z&&pe.y>=U&&pe.y<=$&&pe!==l&&pe!==p&&yl(y,M,w,z,T,D,pe.x,pe.y)&&wr(pe.prev,pe,pe.next)>=0)return!1;pe=pe.nextZ}return!0}function Af(i,e,r){var o=i;do{var l=o.prev,h=o.next.next;!Xc(l,h)&&Kh(l,o,o.next,h)&&ic(l,h)&&ic(h,l)&&(e.push(l.i/r|0),e.push(o.i/r|0),e.push(h.i/r|0),rc(o),rc(o.next),o=i=h),o=o.next}while(o!==i);return $a(o)}function kf(i,e,r,o,l,h){var p=i;do{for(var y=p.next.next;y!==p.prev;){if(p.i!==y.i&&Ff(p,y)){var w=Jh(p,y);return p=$a(p,p.next),w=$a(w,w.next),tc(p,e,r,o,l,h,0),void tc(w,e,r,o,l,h,0)}y=y.next}p=p.next}while(p!==i)}function Pf(i,e){return i.x-e.x}function zf(i,e){var r=function(l,h){var p,y=h,w=l.x,T=l.y,M=-1/0;do{if(T<=y.y&&T>=y.next.y&&y.next.y!==y.y){var z=y.x+(T-y.y)*(y.next.x-y.x)/(y.next.y-y.y);if(z<=w&&z>M&&(M=z,p=y.x=y.x&&y.x>=U&&w!==y.x&&yl(Tp.x||y.x===p.x&&Lf(p,y)))&&(p=y,$=D)),y=y.next;while(y!==N);return p}(i,e);if(!r)return e;var o=Jh(r,i);return $a(o,o.next),$a(r,r.next)}function Lf(i,e){return wr(i.prev,i,e.prev)<0&&wr(e.next,i,i.next)<0}function Pu(i,e,r,o,l){return(i=1431655765&((i=858993459&((i=252645135&((i=16711935&((i=(i-r)*l|0)|i<<8))|i<<4))|i<<2))|i<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-o)*l|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Df(i){var e=i,r=i;do(e.x=(i-p)*(h-y)&&(i-p)*(o-y)>=(r-p)*(e-y)&&(r-p)*(h-y)>=(l-p)*(o-y)}function Ff(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!function(r,o){var l=r;do{if(l.i!==r.i&&l.next.i!==r.i&&l.i!==o.i&&l.next.i!==o.i&&Kh(l,l.next,r,o))return!0;l=l.next}while(l!==r);return!1}(i,e)&&(ic(i,e)&&ic(e,i)&&function(r,o){var l=r,h=!1,p=(r.x+o.x)/2,y=(r.y+o.y)/2;do l.y>y!=l.next.y>y&&l.next.y!==l.y&&p<(l.next.x-l.x)*(y-l.y)/(l.next.y-l.y)+l.x&&(h=!h),l=l.next;while(l!==r);return h}(i,e)&&(wr(i.prev,i,e.prev)||wr(i,e.prev,e))||Xc(i,e)&&wr(i.prev,i,i.next)>0&&wr(e.prev,e,e.next)>0)}function wr(i,e,r){return(e.y-i.y)*(r.x-e.x)-(e.x-i.x)*(r.y-e.y)}function Xc(i,e){return i.x===e.x&&i.y===e.y}function Kh(i,e,r,o){var l=Jc(wr(i,e,r)),h=Jc(wr(i,e,o)),p=Jc(wr(r,o,i)),y=Jc(wr(r,o,e));return l!==h&&p!==y||!(l!==0||!Kc(i,r,e))||!(h!==0||!Kc(i,o,e))||!(p!==0||!Kc(r,i,o))||!(y!==0||!Kc(r,e,o))}function Kc(i,e,r){return e.x<=Math.max(i.x,r.x)&&e.x>=Math.min(i.x,r.x)&&e.y<=Math.max(i.y,r.y)&&e.y>=Math.min(i.y,r.y)}function Jc(i){return i>0?1:i<0?-1:0}function ic(i,e){return wr(i.prev,i,i.next)<0?wr(i,e,i.next)>=0&&wr(i,i.prev,e)>=0:wr(i,e,i.prev)<0||wr(i,i.next,e)<0}function Jh(i,e){var r=new zu(i.i,i.x,i.y),o=new zu(e.i,e.x,e.y),l=i.next,h=e.prev;return i.next=e,e.prev=i,r.next=l,l.prev=r,o.next=r,r.prev=o,h.next=o,o.prev=h,o}function Yh(i,e,r,o){var l=new zu(i,e,r);return o?(l.next=o.next,l.prev=o,o.next.prev=l,o.next=l):(l.prev=l,l.next=l),l}function rc(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function zu(i,e,r){this.i=i,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Lu(i,e,r,o){for(var l=0,h=e,p=r-o;h0&&r.holes.push(o+=i[l-1].length)}return r};var Qh=V(ku.exports);function Rf(i,e,r,o,l){$h(i,e,r||0,o||i.length-1,l||Of)}function $h(i,e,r,o,l){for(;o>r;){if(o-r>600){var h=o-r+1,p=e-r+1,y=Math.log(h),w=.5*Math.exp(2*y/3),T=.5*Math.sqrt(y*w*(h-w)/h)*(p-h/2<0?-1:1);$h(i,e,Math.max(r,Math.floor(e-p*w/h+T)),Math.min(o,Math.floor(e+(h-p)*w/h+T)),l)}var M=i[e],z=r,D=o;for(nc(i,r,e),l(i[o],M)>0&&nc(i,r,o);z0;)D--}l(i[r],M)===0?nc(i,r,D):nc(i,++D,o),D<=e&&(r=D+1),e<=D&&(o=D-1)}}function nc(i,e,r){var o=i[e];i[e]=i[r],i[r]=o}function Of(i,e){return ie?1:0}function Du(i,e){const r=i.length;if(r<=1)return[i];const o=[];let l,h;for(let p=0;p1)for(let p=0;pr.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new $t,this.indexArray=new Kr,this.indexArray2=new Pr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.segments2=new Qi,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.hasPattern=Fu("fill",this.layers,r);const l=this.layers[0].layout.get("fill-sort-key"),h=!l.isConstant(),p=[];for(const{feature:y,id:w,index:T,sourceLayerIndex:M}of e){const z=this.layers[0]._featureFilter.needGeometry,D=Qa(y,z);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),D,o))continue;const N=h?l.evaluate(D,{},o,r.availableImages):void 0,U={id:w,properties:y.properties,type:y.type,sourceLayerIndex:M,index:T,geometry:z?D.geometry:Ya(y),patterns:{},sortKey:N};p.push(U)}h&&p.sort((y,w)=>y.sortKey-w.sortKey);for(const y of p){const{geometry:w,index:T,sourceLayerIndex:M}=y;if(this.hasPattern){const z=Ru("fill",this.layers,y,this.zoom,r);this.patternFeatures.push(z)}else this.addFeature(y,w,T,o,{});r.featureIndex.insert(e[T].feature,w,T,M,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}addFeatures(e,r,o){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,Ef),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),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(e,r,o,l,h){for(const p of Du(r,500)){let y=0;for(const N of p)y+=N.length;const w=this.segments.prepareSegment(y,this.layoutVertexArray,this.indexArray),T=w.vertexLength,M=[],z=[];for(const N of p){if(N.length===0)continue;N!==p[0]&&z.push(M.length/2);const U=this.segments2.prepareSegment(N.length,this.layoutVertexArray,this.indexArray2),Z=U.vertexLength;this.layoutVertexArray.emplaceBack(N[0].x,N[0].y),this.indexArray2.emplaceBack(Z+N.length-1,Z),M.push(N[0].x),M.push(N[0].y);for(let $=1;$>3}if(l--,o===1||o===2)h+=i.readSVarint(),p+=i.readSVarint(),o===1&&(e&&y.push(e),e=[]),e.push(new Zf(h,p));else{if(o!==7)throw new Error("unknown command "+o);e&&e.push(e[0].clone())}}return e&&y.push(e),y},vl.prototype.bbox=function(){var i=this._pbf;i.pos=this._geometry;for(var e=i.readVarint()+i.pos,r=1,o=0,l=0,h=0,p=1/0,y=-1/0,w=1/0,T=-1/0;i.pos>3}if(o--,r===1||r===2)(l+=i.readSVarint())y&&(y=l),(h+=i.readSVarint())T&&(T=h);else if(r!==7)throw new Error("unknown command "+r)}return[p,w,y,T]},vl.prototype.toGeoJSON=function(i,e,r){var o,l,h=this.extent*Math.pow(2,r),p=this.extent*i,y=this.extent*e,w=this.loadGeometry(),T=vl.types[this.type];function M(N){for(var U=0;U>3;l=p===1?o.readString():p===2?o.readFloat():p===3?o.readDouble():p===4?o.readVarint64():p===5?o.readVarint():p===6?o.readSVarint():p===7?o.readBoolean():null}return l}(r))}nd.prototype.feature=function(i){if(i<0||i>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[i];var e=this._pbf.readVarint()+this._pbf.pos;return new Hf(this._pbf,e,this.extent,this._keys,this._values)};var Kf=rd;function Jf(i,e,r){if(i===3){var o=new Kf(r,r.readVarint()+r.pos);o.length&&(e[o.name]=o)}}Ma.VectorTile=function(i,e){this.layers=i.readFields(Jf,{},e)},Ma.VectorTileFeature=id,Ma.VectorTileLayer=rd;const Yf=Ma.VectorTileFeature.types,Bu=Math.pow(2,13);function oc(i,e,r,o,l,h,p,y){i.emplaceBack(e,r,2*Math.floor(o*Bu)+p,l*Bu*2,h*Bu*2,Math.round(y))}class Nu{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(r=>r.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new Qe,this.centroidVertexArray=new je,this.indexArray=new Kr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.features=[],this.hasPattern=Fu("fill-extrusion",this.layers,r);for(const{feature:l,id:h,index:p,sourceLayerIndex:y}of e){const w=this.layers[0]._featureFilter.needGeometry,T=Qa(l,w);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),T,o))continue;const M={id:h,sourceLayerIndex:y,index:p,geometry:w?T.geometry:Ya(l),properties:l.properties,type:l.type,patterns:{}};this.hasPattern?this.features.push(Ru("fill-extrusion",this.layers,M,this.zoom,r)):this.addFeature(M,M.geometry,p,o,{}),r.featureIndex.insert(l,M.geometry,p,y,this.index,!0)}}addFeatures(e,r,o){for(const l of this.features){const{geometry:h}=l;this.addFeature(l,h,l.index,r,o)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,qf),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,jf.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,r,o,l,h){const p={x:0,y:0,vertexCount:0};for(const y of Du(r,500)){let w=0;for(const U of y)w+=U.length;let T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const U of y){if(U.length===0||$f(U))continue;let Z=0;for(let $=0;$=1){const ue=U[$-1];if(!Qf(ie,ue)){T.vertexLength+4>Qi.MAX_VERTEX_ARRAY_LENGTH&&(T=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const re=ie.sub(ue)._perp()._unit(),pe=ue.dist(ie);Z+pe>32768&&(Z=0),oc(this.layoutVertexArray,ie.x,ie.y,re.x,re.y,0,0,Z),oc(this.layoutVertexArray,ie.x,ie.y,re.x,re.y,0,1,Z),p.x+=2*ie.x,p.y+=2*ie.y,p.vertexCount+=2,Z+=pe,oc(this.layoutVertexArray,ue.x,ue.y,re.x,re.y,0,0,Z),oc(this.layoutVertexArray,ue.x,ue.y,re.x,re.y,0,1,Z),p.x+=2*ue.x,p.y+=2*ue.y,p.vertexCount+=2;const ye=T.vertexLength;this.indexArray.emplaceBack(ye,ye+2,ye+1),this.indexArray.emplaceBack(ye+1,ye+2,ye+3),T.vertexLength+=4,T.primitiveLength+=2}}}}if(T.vertexLength+w>Qi.MAX_VERTEX_ARRAY_LENGTH&&(T=this.segments.prepareSegment(w,this.layoutVertexArray,this.indexArray)),Yf[e.type]!=="Polygon")continue;const M=[],z=[],D=T.vertexLength;for(const U of y)if(U.length!==0){U!==y[0]&&z.push(M.length/2);for(let Z=0;ZCr)||i.y===e.y&&(i.y<0||i.y>Cr)}function $f(i){return i.every(e=>e.x<0)||i.every(e=>e.x>Cr)||i.every(e=>e.y<0)||i.every(e=>e.y>Cr)}let od;tt("FillExtrusionBucket",Nu,{omit:["layers","features"]});var em={get paint(){return od=od||new xr({"fill-extrusion-opacity":new xt(Se["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Et(Se["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new xt(Se["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new xt(Se["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Xa(Se["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Et(Se["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Et(Se["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new xt(Se["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class tm extends so{constructor(e){super(e,em)}createBucket(e){return new Nu(e)}queryRadius(){return Zc(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(e,r,o,l,h,p,y,w){const T=Gc(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),p.angle,y),M=this.paint.get("fill-extrusion-height").evaluate(r,o),z=this.paint.get("fill-extrusion-base").evaluate(r,o),D=function(U,Z,$,ie){const ue=[];for(const re of U){const pe=[re.x,re.y,0,1];Wc(pe,pe,Z),ue.push(new _e(pe[0]/pe[3],pe[1]/pe[3]))}return ue}(T,w),N=function(U,Z,$,ie){const ue=[],re=[],pe=ie[8]*Z,ye=ie[9]*Z,Ae=ie[10]*Z,lt=ie[11]*Z,pt=ie[8]*$,st=ie[9]*$,$e=ie[10]*$,Ze=ie[11]*$;for(const ht of U){const Ke=[],Be=[];for(const bt of ht){const yt=bt.x,Ht=bt.y,$i=ie[0]*yt+ie[4]*Ht+ie[12],nr=ie[1]*yt+ie[5]*Ht+ie[13],Dr=ie[2]*yt+ie[6]*Ht+ie[14],lo=ie[3]*yt+ie[7]*Ht+ie[15],Fn=Dr+Ae,Mr=lo+lt,Yr=$i+pt,hn=nr+st,Rn=Dr+$e,On=lo+Ze,Fr=new _e(($i+pe)/Mr,(nr+ye)/Mr);Fr.z=Fn/Mr,Ke.push(Fr);const Rr=new _e(Yr/On,hn/On);Rr.z=Rn/On,Be.push(Rr)}ue.push(Ke),re.push(Be)}return[ue,re]}(l,z,M,w);return function(U,Z,$){let ie=1/0;Rh($,Z)&&(ie=sd($,Z[0]));for(let ue=0;uer.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(r=>{this.gradients[r.id]={}}),this.layoutVertexArray=new Ct,this.layoutVertexArray2=new gt,this.indexArray=new Kr,this.programConfigurations=new Yo(e.layers,e.zoom),this.segments=new Qi,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(r=>r.isStateDependent()).map(r=>r.id)}populate(e,r,o){this.hasPattern=Fu("line",this.layers,r);const l=this.layers[0].layout.get("line-sort-key"),h=!l.isConstant(),p=[];for(const{feature:y,id:w,index:T,sourceLayerIndex:M}of e){const z=this.layers[0]._featureFilter.needGeometry,D=Qa(y,z);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),D,o))continue;const N=h?l.evaluate(D,{},o):void 0,U={id:w,properties:y.properties,type:y.type,sourceLayerIndex:M,index:T,geometry:z?D.geometry:Ya(y),patterns:{},sortKey:N};p.push(U)}h&&p.sort((y,w)=>y.sortKey-w.sortKey);for(const y of p){const{geometry:w,index:T,sourceLayerIndex:M}=y;if(this.hasPattern){const z=Ru("line",this.layers,y,this.zoom,r);this.patternFeatures.push(z)}else this.addFeature(y,w,T,o,{});r.featureIndex.insert(e[T].feature,w,T,M,this.index)}}update(e,r,o){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,r,this.stateDependentLayers,o)}addFeatures(e,r,o){for(const l of this.patternFeatures)this.addFeature(l,l.geometry,l.index,r,o)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,om)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,rm),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,r,o,l,h){const p=this.layers[0].layout,y=p.get("line-join").evaluate(e,{}),w=p.get("line-cap"),T=p.get("line-miter-limit"),M=p.get("line-round-limit");this.lineClips=this.lineFeatureClips(e);for(const z of r)this.addLine(z,e,y,w,T,M);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,o,h,l)}addLine(e,r,o,l,h,p){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ie=0;ie=2&&e[w-1].equals(e[w-2]);)w--;let T=0;for(;T0;if(lt&&ie>T){const Ze=D.dist(N);if(Ze>2*M){const ht=D.sub(D.sub(N)._mult(M/Ze)._round());this.updateDistance(N,ht),this.addCurrentVertex(ht,Z,0,0,z),N=ht}}const st=N&&U;let $e=st?o:y?"butt":l;if(st&&$e==="round"&&(yeh&&($e="bevel"),$e==="bevel"&&(ye>2&&($e="flipbevel"),ye100)ue=$.mult(-1);else{const Ze=ye*Z.add($).mag()/Z.sub($).mag();ue._perp()._mult(Ze*(pt?-1:1))}this.addCurrentVertex(D,ue,0,0,z),this.addCurrentVertex(D,ue.mult(-1),0,0,z)}else if($e==="bevel"||$e==="fakeround"){const Ze=-Math.sqrt(ye*ye-1),ht=pt?Ze:0,Ke=pt?0:Ze;if(N&&this.addCurrentVertex(D,Z,ht,Ke,z),$e==="fakeround"){const Be=Math.round(180*Ae/Math.PI/20);for(let bt=1;bt2*M){const ht=D.add(U.sub(D)._mult(M/Ze)._round());this.updateDistance(D,ht),this.addCurrentVertex(ht,$,0,0,z),D=ht}}}}addCurrentVertex(e,r,o,l,h,p=!1){const y=r.y*l-r.x,w=-r.y-r.x*l;this.addHalfVertex(e,r.x+r.y*o,r.y-r.x*o,p,!1,o,h),this.addHalfVertex(e,y,w,p,!0,-l,h),this.distance>ad/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,r,o,l,h,p))}addHalfVertex({x:e,y:r},o,l,h,p,y,w){const T=.5*(this.lineClips?this.scaledDistance*(ad-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+(h?1:0),(r<<1)+(p?1:0),Math.round(63*o)+128,Math.round(63*l)+128,1+(y===0?0:y<0?-1:1)|(63&T)<<2,T>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const M=w.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,M),w.primitiveLength++),p?this.e2=M:this.e1=M}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,r){this.distance+=e.dist(r),this.updateScaledDistance()}}let ld,cd;tt("LineBucket",Vu,{omit:["layers","patternFeatures"]});var ud={get paint(){return cd=cd||new xr({"line-opacity":new Et(Se.paint_line["line-opacity"]),"line-color":new Et(Se.paint_line["line-color"]),"line-translate":new xt(Se.paint_line["line-translate"]),"line-translate-anchor":new xt(Se.paint_line["line-translate-anchor"]),"line-width":new Et(Se.paint_line["line-width"]),"line-gap-width":new Et(Se.paint_line["line-gap-width"]),"line-offset":new Et(Se.paint_line["line-offset"]),"line-blur":new Et(Se.paint_line["line-blur"]),"line-dasharray":new ql(Se.paint_line["line-dasharray"]),"line-pattern":new Xa(Se.paint_line["line-pattern"]),"line-gradient":new Zl(Se.paint_line["line-gradient"])})},get layout(){return ld=ld||new xr({"line-cap":new xt(Se.layout_line["line-cap"]),"line-join":new Et(Se.layout_line["line-join"]),"line-miter-limit":new xt(Se.layout_line["line-miter-limit"]),"line-round-limit":new xt(Se.layout_line["line-round-limit"]),"line-sort-key":new Et(Se.layout_line["line-sort-key"])})}};class lm extends Et{possiblyEvaluate(e,r){return r=new Yi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),super.possiblyEvaluate(e,r)}evaluate(e,r,o,l){return r=Nt({},r,{zoom:Math.floor(r.zoom)}),super.evaluate(e,r,o,l)}}let Yc;class cm extends so{constructor(e){super(e,ud),this.gradientVersion=0,Yc||(Yc=new lm(ud.paint.properties["line-width"].specification),Yc.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if(e==="line-gradient"){const r=this.gradientExpression();this.stepInterpolant=!!function(o){return o._styleExpression!==void 0}(r)&&r._styleExpression.expression instanceof ho,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,r){super.recalculate(e,r),this.paint._values["line-floorwidth"]=Yc.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new Vu(e)}queryRadius(e){const r=e,o=hd(Ql("line-width",this,r),Ql("line-gap-width",this,r)),l=Ql("line-offset",this,r);return o/2+Math.abs(l)+Zc(this.paint.get("line-translate"))}queryIntersectsFeature(e,r,o,l,h,p,y){const w=Gc(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),p.angle,y),T=y/2*hd(this.paint.get("line-width").evaluate(r,o),this.paint.get("line-gap-width").evaluate(r,o)),M=this.paint.get("line-offset").evaluate(r,o);return M&&(l=function(z,D){const N=[];for(let U=0;U=3){for(let $=0;$0?e+2*i:i}const um=or([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hm=or([{name:"a_projected_pos",components:3,type:"Float32"}],4);or([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const dm=or([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);or([{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 dd=or([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),pm=or([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function fm(i,e,r){return i.sections.forEach(o=>{o.text=function(l,h,p){const y=h.layout.get("text-transform").evaluate(p,{});return y==="uppercase"?l=l.toLocaleUpperCase():y==="lowercase"&&(l=l.toLocaleLowerCase()),Hn.applyArabicShaping&&(l=Hn.applyArabicShaping(l)),l}(o.text,e,r)}),i}or([{name:"triangle",components:3,type:"Uint16"}]),or([{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"}]),or([{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"}]),or([{type:"Float32",name:"offsetX"}]),or([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),or([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const ac={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var Lr=24,pd=Di,fd=function(i,e,r,o,l){var h,p,y=8*l-o-1,w=(1<>1,M=-7,z=r?l-1:0,D=r?-1:1,N=i[e+z];for(z+=D,h=N&(1<<-M)-1,N>>=-M,M+=y;M>0;h=256*h+i[e+z],z+=D,M-=8);for(p=h&(1<<-M)-1,h>>=-M,M+=o;M>0;p=256*p+i[e+z],z+=D,M-=8);if(h===0)h=1-T;else{if(h===w)return p?NaN:1/0*(N?-1:1);p+=Math.pow(2,o),h-=T}return(N?-1:1)*p*Math.pow(2,h-o)},md=function(i,e,r,o,l,h){var p,y,w,T=8*h-l-1,M=(1<>1,D=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,N=o?0:h-1,U=o?1:-1,Z=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(y=isNaN(e)?1:0,p=M):(p=Math.floor(Math.log(e)/Math.LN2),e*(w=Math.pow(2,-p))<1&&(p--,w*=2),(e+=p+z>=1?D/w:D*Math.pow(2,1-z))*w>=2&&(p++,w/=2),p+z>=M?(y=0,p=M):p+z>=1?(y=(e*w-1)*Math.pow(2,l),p+=z):(y=e*Math.pow(2,z-1)*Math.pow(2,l),p=0));l>=8;i[r+N]=255&y,N+=U,y/=256,l-=8);for(p=p<0;i[r+N]=255&p,N+=U,p/=256,T-=8);i[r+N-U]|=128*Z};function Di(i){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(i)?i:new Uint8Array(i||0),this.pos=0,this.type=0,this.length=this.buf.length}Di.Varint=0,Di.Fixed64=1,Di.Bytes=2,Di.Fixed32=5;var Uu=4294967296,_d=1/Uu,gd=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Us(i){return i.type===Di.Bytes?i.readVarint()+i.pos:i.pos+1}function xl(i,e,r){return r?4294967296*e+(i>>>0):4294967296*(e>>>0)+(i>>>0)}function yd(i,e,r){var o=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(o);for(var l=r.pos-1;l>=i;l--)r.buf[l+o]=r.buf[l]}function mm(i,e){for(var r=0;r>>8,i[r+2]=e>>>16,i[r+3]=e>>>24}function vd(i,e){return(i[e]|i[e+1]<<8|i[e+2]<<16)+(i[e+3]<<24)}Di.prototype={destroy:function(){this.buf=null},readFields:function(i,e,r){for(r=r||this.length;this.pos>3,h=this.pos;this.type=7&o,i(l,e,this),this.pos===h&&this.skip(o)}return e},readMessage:function(i,e){return this.readFields(i,e,this.readVarint()+this.pos)},readFixed32:function(){var i=Qc(this.buf,this.pos);return this.pos+=4,i},readSFixed32:function(){var i=vd(this.buf,this.pos);return this.pos+=4,i},readFixed64:function(){var i=Qc(this.buf,this.pos)+Qc(this.buf,this.pos+4)*Uu;return this.pos+=8,i},readSFixed64:function(){var i=Qc(this.buf,this.pos)+vd(this.buf,this.pos+4)*Uu;return this.pos+=8,i},readFloat:function(){var i=fd(this.buf,this.pos,!0,23,4);return this.pos+=4,i},readDouble:function(){var i=fd(this.buf,this.pos,!0,52,8);return this.pos+=8,i},readVarint:function(i){var e,r,o=this.buf;return e=127&(r=o[this.pos++]),r<128?e:(e|=(127&(r=o[this.pos++]))<<7,r<128?e:(e|=(127&(r=o[this.pos++]))<<14,r<128?e:(e|=(127&(r=o[this.pos++]))<<21,r<128?e:function(l,h,p){var y,w,T=p.buf;if(y=(112&(w=T[p.pos++]))>>4,w<128||(y|=(127&(w=T[p.pos++]))<<3,w<128)||(y|=(127&(w=T[p.pos++]))<<10,w<128)||(y|=(127&(w=T[p.pos++]))<<17,w<128)||(y|=(127&(w=T[p.pos++]))<<24,w<128)||(y|=(1&(w=T[p.pos++]))<<31,w<128))return xl(l,y,h);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=o[this.pos]))<<28,i,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var i=this.readVarint();return i%2==1?(i+1)/-2:i/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var i=this.readVarint()+this.pos,e=this.pos;return this.pos=i,i-e>=12&&gd?function(r,o,l){return gd.decode(r.subarray(o,l))}(this.buf,e,i):function(r,o,l){for(var h="",p=o;p239?4:M>223?3:M>191?2:1;if(p+D>l)break;D===1?M<128&&(z=M):D===2?(192&(y=r[p+1]))==128&&(z=(31&M)<<6|63&y)<=127&&(z=null):D===3?(w=r[p+2],(192&(y=r[p+1]))==128&&(192&w)==128&&((z=(15&M)<<12|(63&y)<<6|63&w)<=2047||z>=55296&&z<=57343)&&(z=null)):D===4&&(w=r[p+2],T=r[p+3],(192&(y=r[p+1]))==128&&(192&w)==128&&(192&T)==128&&((z=(15&M)<<18|(63&y)<<12|(63&w)<<6|63&T)<=65535||z>=1114112)&&(z=null)),z===null?(z=65533,D=1):z>65535&&(z-=65536,h+=String.fromCharCode(z>>>10&1023|55296),z=56320|1023&z),h+=String.fromCharCode(z),p+=D}return h}(this.buf,e,i)},readBytes:function(){var i=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,i);return this.pos=i,e},readPackedVarint:function(i,e){if(this.type!==Di.Bytes)return i.push(this.readVarint(e));var r=Us(this);for(i=i||[];this.pos127;);else if(e===Di.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Di.Fixed32)this.pos+=4;else{if(e!==Di.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(i,e){this.writeVarint(i<<3|e)},realloc:function(i){for(var e=this.length||16;e268435455||i<0?function(e,r){var o,l;if(e>=0?(o=e%4294967296|0,l=e/4294967296|0):(l=~(-e/4294967296),4294967295^(o=~(-e%4294967296))?o=o+1|0:(o=0,l=l+1|0)),e>=18446744073709552e3||e<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");r.realloc(10),function(h,p,y){y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,h>>>=7,y.buf[y.pos++]=127&h|128,y.buf[y.pos]=127&(h>>>=7)}(o,0,r),function(h,p){var y=(7&h)<<4;p.buf[p.pos++]|=y|((h>>>=3)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h|((h>>>=7)?128:0),h&&(p.buf[p.pos++]=127&h)))))}(l,r)}(i,this):(this.realloc(4),this.buf[this.pos++]=127&i|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=127&(i>>>=7)|(i>127?128:0),i<=127||(this.buf[this.pos++]=i>>>7&127))))},writeSVarint:function(i){this.writeVarint(i<0?2*-i-1:2*i)},writeBoolean:function(i){this.writeVarint(!!i)},writeString:function(i){i=String(i),this.realloc(4*i.length),this.pos++;var e=this.pos;this.pos=function(o,l,h){for(var p,y,w=0;w55295&&p<57344){if(!y){p>56319||w+1===l.length?(o[h++]=239,o[h++]=191,o[h++]=189):y=p;continue}if(p<56320){o[h++]=239,o[h++]=191,o[h++]=189,y=p;continue}p=y-55296<<10|p-56320|65536,y=null}else y&&(o[h++]=239,o[h++]=191,o[h++]=189,y=null);p<128?o[h++]=p:(p<2048?o[h++]=p>>6|192:(p<65536?o[h++]=p>>12|224:(o[h++]=p>>18|240,o[h++]=p>>12&63|128),o[h++]=p>>6&63|128),o[h++]=63&p|128)}return h}(this.buf,i,this.pos);var r=this.pos-e;r>=128&&yd(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(i){this.realloc(4),md(this.buf,i,this.pos,!0,23,4),this.pos+=4},writeDouble:function(i){this.realloc(8),md(this.buf,i,this.pos,!0,52,8),this.pos+=8},writeBytes:function(i){var e=i.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&yd(r,o,this),this.pos=r-1,this.writeVarint(o),this.pos+=o},writeMessage:function(i,e,r){this.writeTag(i,Di.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(i,e){e.length&&this.writeMessage(i,mm,e)},writePackedSVarint:function(i,e){e.length&&this.writeMessage(i,_m,e)},writePackedBoolean:function(i,e){e.length&&this.writeMessage(i,vm,e)},writePackedFloat:function(i,e){e.length&&this.writeMessage(i,gm,e)},writePackedDouble:function(i,e){e.length&&this.writeMessage(i,ym,e)},writePackedFixed32:function(i,e){e.length&&this.writeMessage(i,xm,e)},writePackedSFixed32:function(i,e){e.length&&this.writeMessage(i,bm,e)},writePackedFixed64:function(i,e){e.length&&this.writeMessage(i,wm,e)},writePackedSFixed64:function(i,e){e.length&&this.writeMessage(i,Sm,e)},writeBytesField:function(i,e){this.writeTag(i,Di.Bytes),this.writeBytes(e)},writeFixed32Field:function(i,e){this.writeTag(i,Di.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(i,e){this.writeTag(i,Di.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(i,e){this.writeTag(i,Di.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(i,e){this.writeTag(i,Di.Fixed64),this.writeSFixed64(e)},writeVarintField:function(i,e){this.writeTag(i,Di.Varint),this.writeVarint(e)},writeSVarintField:function(i,e){this.writeTag(i,Di.Varint),this.writeSVarint(e)},writeStringField:function(i,e){this.writeTag(i,Di.Bytes),this.writeString(e)},writeFloatField:function(i,e){this.writeTag(i,Di.Fixed32),this.writeFloat(e)},writeDoubleField:function(i,e){this.writeTag(i,Di.Fixed64),this.writeDouble(e)},writeBooleanField:function(i,e){this.writeVarintField(i,!!e)}};var ju=V(pd);const qu=3;function Tm(i,e,r){i===1&&r.readMessage(Im,e)}function Im(i,e,r){if(i===3){const{id:o,bitmap:l,width:h,height:p,left:y,top:w,advance:T}=r.readMessage(Em,{});e.push({id:o,bitmap:new ec({width:h+2*qu,height:p+2*qu},l),metrics:{width:h,height:p,left:y,top:w,advance:T}})}}function Em(i,e,r){i===1?e.id=r.readVarint():i===2?e.bitmap=r.readBytes():i===3?e.width=r.readVarint():i===4?e.height=r.readVarint():i===5?e.left=r.readSVarint():i===6?e.top=r.readSVarint():i===7&&(e.advance=r.readVarint())}const xd=qu;function bd(i){let e=0,r=0;for(const p of i)e+=p.w*p.h,r=Math.max(r,p.w);i.sort((p,y)=>y.h-p.h);const o=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}];let l=0,h=0;for(const p of i)for(let y=o.length-1;y>=0;y--){const w=o[y];if(!(p.w>w.w||p.h>w.h)){if(p.x=w.x,p.y=w.y,h=Math.max(h,p.y+p.h),l=Math.max(l,p.x+p.w),p.w===w.w&&p.h===w.h){const T=o.pop();y=0&&o>=e&&eu[this.text.charCodeAt(o)];o--)r--;this.text=this.text.substring(e,r),this.sectionIndex=this.sectionIndex.slice(e,r)}substring(e,r){const o=new wl;return o.text=this.text.substring(e,r),o.sectionIndex=this.sectionIndex.slice(e,r),o.sections=this.sections,o}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,r)=>Math.max(e,this.sections[r].scale),0)}addTextSection(e,r){this.text+=e.text,this.sections.push(cc.forText(e.scale,e.fontStack||r));const o=this.sections.length-1;for(let l=0;l=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function $c(i,e,r,o,l,h,p,y,w,T,M,z,D,N,U,Z){const $=wl.fromFeature(i,l);let ie;z===s.ai.vertical&&$.verticalizePunctuation();const{processBidirectionalText:ue,processStyledBidirectionalText:re}=Hn;if(ue&&$.sections.length===1){ie=[];const Ae=ue($.toString(),Gu($,T,h,e,o,N,U));for(const lt of Ae){const pt=new wl;pt.text=lt,pt.sections=$.sections;for(let st=0;st0&&qs>Jn&&(Jn=qs)}else{const vo=pt[oi.fontStack],Qn=vo&&vo[dn];if(Qn&&Qn.rect)Qo=Qn.rect,No=Qn.metrics;else{const qs=lt[oi.fontStack],fc=qs&&qs[dn];if(!fc)continue;No=fc.metrics}Br=(Rr-oi.scale)*Lr}Vo?(Ae.verticalizable=!0,wn.push({glyph:dn,imageName:$o,x:$i,y:nr+Br,vertical:Vo,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:Sn,metrics:No,rect:Qo}),$i+=js*oi.scale+bt):(wn.push({glyph:dn,imageName:$o,x:$i,y:nr+Br,vertical:Vo,scale:oi.scale,fontStack:oi.fontStack,sectionIndex:Sn,metrics:No,rect:Qo}),$i+=No.advance*oi.scale+bt)}wn.length!==0&&(Dr=Math.max($i-bt,Dr),Am(wn,0,wn.length-1,Fn,Jn)),$i=0;const Yn=Ze*Rr+Jn;Bn.lineOffset=Math.max(Jn,bn),nr+=Yn,lo=Math.max(Yn,lo),++Mr}var Yr;const hn=nr-lc,{horizontalAlign:Rn,verticalAlign:On}=Wu(ht);(function(Fr,Rr,bn,Bn,wn,Jn,Yn,Or,oi){const Sn=(Rr-bn)*wn;let dn=0;dn=Jn!==Yn?-Or*Bn-lc:(-Bn*oi+.5)*Yn;for(const Br of Fr)for(const No of Br.positionedGlyphs)No.x+=Sn,No.y+=dn})(Ae.positionedLines,Fn,Rn,On,Dr,lo,Ze,hn,$e.length),Ae.top+=-On*hn,Ae.bottom=Ae.top+hn,Ae.left+=-Rn*Dr,Ae.right=Ae.left+Dr}(ye,e,r,o,ie,p,y,w,z,T,D,Z),!function(Ae){for(const lt of Ae)if(lt.positionedGlyphs.length!==0)return!1;return!0}(pe)&&ye}const eu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Cm={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 Sd(i,e,r,o,l,h){if(e.imageName){const p=o[e.imageName];return p?p.displaySize[0]*e.scale*Lr/h+l:0}{const p=r[e.fontStack],y=p&&p[i];return y?y.metrics.advance*e.scale+l:0}}function Td(i,e,r,o){const l=Math.pow(i-e,2);return o?i=0;let M=0;for(let D=0;Dp.id),this.index=e.index,this.pixelRatio=e.pixelRatio,this.sourceLayerIndex=e.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Cu([]),this.placementViewportMatrix=Cu([]);const r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Md(this.zoom,r["text-size"]),this.iconSizeData=Md(this.zoom,r["icon-size"]);const o=this.layers[0].layout,l=o.get("symbol-sort-key"),h=o.get("symbol-z-order");this.canOverlap=Hu(o,"text-overlap","text-allow-overlap")!=="never"||Hu(o,"icon-overlap","icon-allow-overlap")!=="never"||o.get("text-ignore-placement")||o.get("icon-ignore-placement"),this.sortFeaturesByKey=h!=="viewport-y"&&!l.isConstant(),this.sortFeaturesByY=(h==="viewport-y"||h==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,o.get("symbol-placement")==="point"&&(this.writingModes=o.get("text-writing-mode").map(p=>s.ai[p])),this.stateDependentLayerIds=this.layers.filter(p=>p.isStateDependent()).map(p=>p.id),this.sourceID=e.sourceID}createArrays(){this.text=new Ku(new Yo(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new Ku(new Yo(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new ce,this.lineVertexArray=new ve,this.symbolInstances=new ee,this.textAnchorOffsets=new Me}calculateGlyphDependencies(e,r,o,l,h){for(let p=0;p0)&&(p.value.kind!=="constant"||p.value.value.length>0),M=w.value.kind!=="constant"||!!w.value.value||Object.keys(w.parameters).length>0,z=h.get("symbol-sort-key");if(this.features=[],!T&&!M)return;const D=r.iconDependencies,N=r.glyphDependencies,U=r.availableImages,Z=new Yi(this.zoom);for(const{feature:$,id:ie,index:ue,sourceLayerIndex:re}of e){const pe=l._featureFilter.needGeometry,ye=Qa($,pe);if(!l._featureFilter.filter(Z,ye,o))continue;let Ae,lt;if(pe||(ye.geometry=Ya($)),T){const st=l.getValueAndResolveTokens("text-field",ye,o,U),$e=ji.factory(st);Lm($e)&&(this.hasRTLText=!0),(!this.hasRTLText||Ul()==="unavailable"||this.hasRTLText&&Hn.isParsed())&&(Ae=fm($e,l,ye))}if(M){const st=l.getValueAndResolveTokens("icon-image",ye,o,U);lt=st instanceof Er?st:Er.fromString(st)}if(!Ae&&!lt)continue;const pt=this.sortFeaturesByKey?z.evaluate(ye,{},o):void 0;if(this.features.push({id:ie,text:Ae,icon:lt,index:ue,sourceLayerIndex:re,geometry:ye.geometry,properties:$.properties,type:Pm[$.type],sortKey:pt}),lt&&(D[lt.name]=!0),Ae){const st=p.evaluate(ye,{},o).join(","),$e=h.get("text-rotation-alignment")!=="viewport"&&h.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(s.ai.vertical)>=0;for(const Ze of Ae.sections)if(Ze.image)D[Ze.image.name]=!0;else{const ht=Sa(Ae.toString()),Ke=Ze.fontStack||st,Be=N[Ke]=N[Ke]||{};this.calculateGlyphDependencies(Ze.text,Be,$e,this.allowVerticalPlacement,ht)}}}h.get("symbol-placement")==="line"&&(this.features=function($){const ie={},ue={},re=[];let pe=0;function ye(st){re.push($[st]),pe++}function Ae(st,$e,Ze){const ht=ue[st];return delete ue[st],ue[$e]=ht,re[ht].geometry[0].pop(),re[ht].geometry[0]=re[ht].geometry[0].concat(Ze[0]),ht}function lt(st,$e,Ze){const ht=ie[$e];return delete ie[$e],ie[st]=ht,re[ht].geometry[0].shift(),re[ht].geometry[0]=Ze[0].concat(re[ht].geometry[0]),ht}function pt(st,$e,Ze){const ht=Ze?$e[0][$e[0].length-1]:$e[0][0];return`${st}:${ht.x}:${ht.y}`}for(let st=0;st<$.length;st++){const $e=$[st],Ze=$e.geometry,ht=$e.text?$e.text.toString():null;if(!ht){ye(st);continue}const Ke=pt(ht,Ze),Be=pt(ht,Ze,!0);if(Ke in ue&&Be in ie&&ue[Ke]!==ie[Be]){const bt=lt(Ke,Be,Ze),yt=Ae(Ke,Be,re[bt].geometry);delete ie[Ke],delete ue[Be],ue[pt(ht,re[yt].geometry,!0)]=yt,re[bt].geometry=null}else Ke in ue?Ae(Ke,Be,Ze):Be in ie?lt(Ke,Be,Ze):(ye(st),ie[Ke]=pe-1,ue[Be]=pe-1)}return re.filter(st=>st.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort(($,ie)=>$.sortKey-ie.sortKey)}update(e,r,o){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,r,this.layers,o),this.icon.programConfigurations.updatePaintArrays(e,r,this.layers,o))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,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(e,r){const o=this.lineVertexArray.length;if(e.segment!==void 0){let l=e.dist(r[e.segment+1]),h=e.dist(r[e.segment]);const p={};for(let y=e.segment+1;y=0;y--)p[y]={x:r[y].x,y:r[y].y,tileUnitDistanceFromAnchor:h},y>0&&(h+=r[y-1].dist(r[y]));for(let y=0;y0}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(e,r){const o=e.placedSymbolArray.get(r),l=o.vertexStartIndex+4*o.numGlyphs;for(let h=o.vertexStartIndex;hl[y]-l[w]||h[w]-h[y]),p}addToSortKeyRanges(e,r){const o=this.sortKeyRanges[this.sortKeyRanges.length-1];o&&o.sortKey===r?o.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:r,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const r of this.symbolInstanceIndexes){const o=this.symbolInstances.get(r);this.featureSortOrder.push(o.featureIndex),[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach((l,h,p)=>{l>=0&&p.indexOf(l)===h&&this.addIndicesForPlacedSymbol(this.text,l)}),o.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,o.verticalPlacedTextSymbolIndex),o.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.placedIconSymbolIndex),o.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,o.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Ad,kd;tt("SymbolBucket",Sl,{omit:["layers","collisionBoxArray","features","compareText"]}),Sl.MAX_GLYPHS=65535,Sl.addDynamicAttributes=Xu;var Yu={get paint(){return kd=kd||new xr({"icon-opacity":new Et(Se.paint_symbol["icon-opacity"]),"icon-color":new Et(Se.paint_symbol["icon-color"]),"icon-halo-color":new Et(Se.paint_symbol["icon-halo-color"]),"icon-halo-width":new Et(Se.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Et(Se.paint_symbol["icon-halo-blur"]),"icon-translate":new xt(Se.paint_symbol["icon-translate"]),"icon-translate-anchor":new xt(Se.paint_symbol["icon-translate-anchor"]),"text-opacity":new Et(Se.paint_symbol["text-opacity"]),"text-color":new Et(Se.paint_symbol["text-color"],{runtimeType:Ur,getOverride:i=>i.textColor,hasOverride:i=>!!i.textColor}),"text-halo-color":new Et(Se.paint_symbol["text-halo-color"]),"text-halo-width":new Et(Se.paint_symbol["text-halo-width"]),"text-halo-blur":new Et(Se.paint_symbol["text-halo-blur"]),"text-translate":new xt(Se.paint_symbol["text-translate"]),"text-translate-anchor":new xt(Se.paint_symbol["text-translate-anchor"])})},get layout(){return Ad=Ad||new xr({"symbol-placement":new xt(Se.layout_symbol["symbol-placement"]),"symbol-spacing":new xt(Se.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new xt(Se.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Et(Se.layout_symbol["symbol-sort-key"]),"symbol-z-order":new xt(Se.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new xt(Se.layout_symbol["icon-allow-overlap"]),"icon-overlap":new xt(Se.layout_symbol["icon-overlap"]),"icon-ignore-placement":new xt(Se.layout_symbol["icon-ignore-placement"]),"icon-optional":new xt(Se.layout_symbol["icon-optional"]),"icon-rotation-alignment":new xt(Se.layout_symbol["icon-rotation-alignment"]),"icon-size":new Et(Se.layout_symbol["icon-size"]),"icon-text-fit":new xt(Se.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new xt(Se.layout_symbol["icon-text-fit-padding"]),"icon-image":new Et(Se.layout_symbol["icon-image"]),"icon-rotate":new Et(Se.layout_symbol["icon-rotate"]),"icon-padding":new Et(Se.layout_symbol["icon-padding"]),"icon-keep-upright":new xt(Se.layout_symbol["icon-keep-upright"]),"icon-offset":new Et(Se.layout_symbol["icon-offset"]),"icon-anchor":new Et(Se.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new xt(Se.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new xt(Se.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new xt(Se.layout_symbol["text-rotation-alignment"]),"text-field":new Et(Se.layout_symbol["text-field"]),"text-font":new Et(Se.layout_symbol["text-font"]),"text-size":new Et(Se.layout_symbol["text-size"]),"text-max-width":new Et(Se.layout_symbol["text-max-width"]),"text-line-height":new xt(Se.layout_symbol["text-line-height"]),"text-letter-spacing":new Et(Se.layout_symbol["text-letter-spacing"]),"text-justify":new Et(Se.layout_symbol["text-justify"]),"text-radial-offset":new Et(Se.layout_symbol["text-radial-offset"]),"text-variable-anchor":new xt(Se.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Et(Se.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Et(Se.layout_symbol["text-anchor"]),"text-max-angle":new xt(Se.layout_symbol["text-max-angle"]),"text-writing-mode":new xt(Se.layout_symbol["text-writing-mode"]),"text-rotate":new Et(Se.layout_symbol["text-rotate"]),"text-padding":new xt(Se.layout_symbol["text-padding"]),"text-keep-upright":new xt(Se.layout_symbol["text-keep-upright"]),"text-transform":new Et(Se.layout_symbol["text-transform"]),"text-offset":new Et(Se.layout_symbol["text-offset"]),"text-allow-overlap":new xt(Se.layout_symbol["text-allow-overlap"]),"text-overlap":new xt(Se.layout_symbol["text-overlap"]),"text-ignore-placement":new xt(Se.layout_symbol["text-ignore-placement"]),"text-optional":new xt(Se.layout_symbol["text-optional"])})}};class Pd{constructor(e){if(e.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:rn,this.defaultValue=e}evaluate(e){if(e.formattedSection){const r=this.defaultValue.property.overrides;if(r&&r.hasOverride(e.formattedSection))return r.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}tt("FormatSectionOverride",Pd,{omit:["defaultValue"]});class iu extends so{constructor(e){super(e,Yu)}recalculate(e,r){if(super.recalculate(e,r),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 o=this.layout.get("text-writing-mode");if(o){const l=[];for(const h of o)l.indexOf(h)<0&&l.push(h);this.layout._values["text-writing-mode"]=l}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,r,o,l){const h=this.layout.get(e).evaluate(r,{},o,l),p=this._unevaluatedLayout._values[e];return p.isDataDriven()||Zn(p.value)||!h?h:function(y,w){return w.replace(/{([^{}]+)}/g,(T,M)=>y&&M in y?String(y[M]):"")}(r.properties,h)}createBucket(e){return new Sl(e)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const e of Yu.paint.overridableProperties){if(!iu.hasPaintOverride(this.layout,e))continue;const r=this.paint.get(e),o=new Pd(r),l=new ls(o,r.property.specification);let h=null;h=r.value.kind==="constant"||r.value.kind==="source"?new cs("source",l):new ko("composite",l,r.value.zoomStops),this.paint._values[e]=new vn(r.property,h,r.parameters)}}_handleOverridablePaintPropertyUpdate(e,r,o){return!(!this.layout||r.isDataDriven()||o.isDataDriven())&&iu.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,r){const o=e.get("text-field"),l=Yu.paint.properties[r];let h=!1;const p=y=>{for(const w of y)if(l.overrides&&l.overrides.hasOverride(w))return void(h=!0)};if(o.value.kind==="constant"&&o.value.value instanceof ji)p(o.value.value.sections);else if(o.value.kind==="source"){const y=T=>{h||(T instanceof uo&&Gi(T.value)===X?p(T.value.sections):T instanceof Es?p(T.sections):T.eachChild(y))},w=o.value;w._styleExpression&&y(w._styleExpression.expression)}return h}}let zd;var Dm={get paint(){return zd=zd||new xr({"background-color":new xt(Se.paint_background["background-color"]),"background-pattern":new ql(Se.paint_background["background-pattern"]),"background-opacity":new xt(Se.paint_background["background-opacity"])})}};class Fm extends so{constructor(e){super(e,Dm)}}let Ld;var Rm={get paint(){return Ld=Ld||new xr({"raster-opacity":new xt(Se.paint_raster["raster-opacity"]),"raster-hue-rotate":new xt(Se.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new xt(Se.paint_raster["raster-brightness-min"]),"raster-brightness-max":new xt(Se.paint_raster["raster-brightness-max"]),"raster-saturation":new xt(Se.paint_raster["raster-saturation"]),"raster-contrast":new xt(Se.paint_raster["raster-contrast"]),"raster-resampling":new xt(Se.paint_raster["raster-resampling"]),"raster-fade-duration":new xt(Se.paint_raster["raster-fade-duration"])})}};class Om extends so{constructor(e){super(e,Rm)}}class Bm extends so{constructor(e){super(e,{}),this.onAdd=r=>{this.implementation.onAdd&&this.implementation.onAdd(r,r.painter.context.gl)},this.onRemove=r=>{this.implementation.onRemove&&this.implementation.onRemove(r,r.painter.context.gl)},this.implementation=e}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 Nm{constructor(e){this._callback=e,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._callback()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._callback()},0))}remove(){delete this._channel,this._callback=()=>{}}}const Qu=63710088e-1;class Pa{constructor(e,r){if(isNaN(e)||isNaN(r))throw new Error(`Invalid LngLat object: (${e}, ${r})`);if(this.lng=+e,this.lat=+r,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Pa(Xt(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){const r=Math.PI/180,o=this.lat*r,l=e.lat*r,h=Math.sin(o)*Math.sin(l)+Math.cos(o)*Math.cos(l)*Math.cos((e.lng-this.lng)*r);return Qu*Math.acos(Math.min(h,1))}static convert(e){if(e instanceof Pa)return e;if(Array.isArray(e)&&(e.length===2||e.length===3))return new Pa(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&typeof e=="object"&&e!==null)return new Pa(Number("lng"in e?e.lng:e.lon),Number(e.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 Dd=2*Math.PI*Qu;function Fd(i){return Dd*Math.cos(i*Math.PI/180)}function Rd(i){return(180+i)/360}function Od(i){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+i*Math.PI/360)))/360}function Bd(i,e){return i/Fd(e)}function Nd(i){return 360*i-180}function $u(i){return 360/Math.PI*Math.atan(Math.exp((180-360*i)*Math.PI/180))-90}class ru{constructor(e,r,o=0){this.x=+e,this.y=+r,this.z=+o}static fromLngLat(e,r=0){const o=Pa.convert(e);return new ru(Rd(o.lng),Od(o.lat),Bd(r,o.lat))}toLngLat(){return new Pa(Nd(this.x),$u(this.y))}toAltitude(){return this.z*Fd($u(this.y))}meterInMercatorCoordinateUnits(){return 1/Dd*(e=$u(this.y),1/Math.cos(e*Math.PI/180));var e}}function Vd(i,e,r){var o=2*Math.PI*6378137/256/Math.pow(2,r);return[i*o-2*Math.PI*6378137/2,e*o-2*Math.PI*6378137/2]}class eh{constructor(e,r,o){if(e<0||e>25||o<0||o>=Math.pow(2,e)||r<0||r>=Math.pow(2,e))throw new Error(`x=${r}, y=${o}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=r,this.y=o,this.key=hc(0,e,e,r,o)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,r,o){const l=(p=this.y,y=this.z,w=Vd(256*(h=this.x),256*(p=Math.pow(2,y)-p-1),y),T=Vd(256*(h+1),256*(p+1),y),w[0]+","+w[1]+","+T[0]+","+T[1]);var h,p,y,w,T;const M=function(z,D,N){let U,Z="";for(let $=z;$>0;$--)U=1<<$-1,Z+=(D&U?1:0)+(N&U?2:0);return Z}(this.z,this.x,this.y);return e[(this.x+this.y)%e.length].replace(/{prefix}/g,(this.x%16).toString(16)+(this.y%16).toString(16)).replace(/{z}/g,String(this.z)).replace(/{x}/g,String(this.x)).replace(/{y}/g,String(o==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,r>1?"@2x":"").replace(/{quadkey}/g,M).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){const r=this.z-e.z;return r>0&&e.x===this.x>>r&&e.y===this.y>>r}getTilePoint(e){const r=Math.pow(2,this.z);return new _e((e.x*r-this.x)*Cr,(e.y*r-this.y)*Cr)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Ud{constructor(e,r){this.wrap=e,this.canonical=r,this.key=hc(e,r.z,r.z,r.x,r.y)}}class yo{constructor(e,r,o,l,h){if(e= z; overscaledZ = ${e}; z = ${o}`);this.overscaledZ=e,this.wrap=r,this.canonical=new eh(o,+l,+h),this.key=hc(r,e,o,l,h)}clone(){return new yo(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const r=this.canonical.z-e;return e>this.canonical.z?new yo(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new yo(e,this.wrap,e,this.canonical.x>>r,this.canonical.y>>r)}calculateScaledKey(e,r){if(e>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);const o=this.canonical.z-e;return e>this.canonical.z?hc(this.wrap*+r,e,this.canonical.z,this.canonical.x,this.canonical.y):hc(this.wrap*+r,e,e,this.canonical.x>>o,this.canonical.y>>o)}isChildOf(e){if(e.wrap!==this.wrap)return!1;const r=this.canonical.z-e.canonical.z;return e.overscaledZ===0||e.overscaledZ>r&&e.canonical.y===this.canonical.y>>r}children(e){if(this.overscaledZ>=e)return[new yo(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const r=this.canonical.z+1,o=2*this.canonical.x,l=2*this.canonical.y;return[new yo(r,this.wrap,r,o,l),new yo(r,this.wrap,r,o+1,l),new yo(r,this.wrap,r,o,l+1),new yo(r,this.wrap,r,o+1,l+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=z),z=this.dim+1||r<-1||r>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(r+1)*this.stride+(e+1)}unpack(e,r,o){return e*this.redFactor+r*this.greenFactor+o*this.blueFactor-this.baseShift}getPixels(){return new go({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,r,o){if(this.dim!==e.dim)throw new Error("dem dimension mismatch");let l=r*this.dim,h=r*this.dim+this.dim,p=o*this.dim,y=o*this.dim+this.dim;switch(r){case-1:l=h-1;break;case 1:h=l+1}switch(o){case-1:p=y-1;break;case 1:y=p+1}const w=-r*this.dim,T=-o*this.dim;for(let M=p;M=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class Zd{constructor(e,r,o,l,h){this.type="Feature",this._vectorTileFeature=e,e._z=r,e._x=o,e._y=l,this.properties=e.properties,this.id=h}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(e){this._geometry=e}toJSON(){const e={geometry:this.geometry};for(const r in this)r!=="_geometry"&&r!=="_vectorTileFeature"&&(e[r]=this[r]);return e}}class Gd{constructor(e,r){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new Lo(Cr,16,0),this.grid3D=new Lo(Cr,16,0),this.featureIndexArray=new ze,this.promoteId=r}insert(e,r,o,l,h,p){const y=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(o,l,h);const w=p?this.grid3D:this.grid;for(let T=0;T=0&&z[3]>=0&&w.insert(y,z[0],z[1],z[2],z[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ma.VectorTile(new ju(this.rawTileData)).layers,this.sourceLayerCoder=new qd(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,r,o,l){this.loadVTLayers();const h=e.params||{},p=Cr/e.tileSize/e.scale,y=ga(h.filter),w=e.queryGeometry,T=e.queryPadding*p,M=Hd(w),z=this.grid.query(M.minX-T,M.minY-T,M.maxX+T,M.maxY+T),D=Hd(e.cameraQueryGeometry),N=this.grid3D.query(D.minX-T,D.minY-T,D.maxX+T,D.maxY+T,($,ie,ue,re)=>function(pe,ye,Ae,lt,pt){for(const $e of pe)if(ye<=$e.x&&Ae<=$e.y&<>=$e.x&&pt>=$e.y)return!0;const st=[new _e(ye,Ae),new _e(ye,pt),new _e(lt,pt),new _e(lt,Ae)];if(pe.length>2){for(const $e of st)if(_l(pe,$e))return!0}for(let $e=0;$e(re||(re=Ya(pe)),ye.queryIntersectsFeature(w,pe,Ae,re,this.z,e.transform,p,e.pixelPosMatrix)))}return U}loadMatchingFeature(e,r,o,l,h,p,y,w,T,M,z){const D=this.bucketLayerIDs[r];if(p&&!function($,ie){for(let ue=0;ue<$.length;ue++)if(ie.indexOf($[ue])>=0)return!0;return!1}(p,D))return;const N=this.sourceLayerCoder.decode(o),U=this.vtLayers[N].feature(l);if(h.needGeometry){const $=Qa(U,!0);if(!h.filter(new Yi(this.tileID.overscaledZ),$,this.tileID.canonical))return}else if(!h.filter(new Yi(this.tileID.overscaledZ),U))return;const Z=this.getId(U,N);for(let $=0;${const y=e instanceof fl?e.get(p):null;return y&&y.evaluate?y.evaluate(r,o,l):y})}function Hd(i){let e=1/0,r=1/0,o=-1/0,l=-1/0;for(const h of i)e=Math.min(e,h.x),r=Math.min(r,h.y),o=Math.max(o,h.x),l=Math.max(l,h.y);return{minX:e,minY:r,maxX:o,maxY:l}}function Vm(i,e){return e-i}function Xd(i,e,r,o,l){const h=[];for(let p=0;p=o&&z.x>=o||(M.x>=o?M=new _e(o,M.y+(o-M.x)/(z.x-M.x)*(z.y-M.y))._round():z.x>=o&&(z=new _e(o,M.y+(o-M.x)/(z.x-M.x)*(z.y-M.y))._round()),M.y>=l&&z.y>=l||(M.y>=l?M=new _e(M.x+(l-M.y)/(z.y-M.y)*(z.x-M.x),l)._round():z.y>=l&&(z=new _e(M.x+(l-M.y)/(z.y-M.y)*(z.x-M.x),l)._round()),w&&M.equals(w[w.length-1])||(w=[M],h.push(w)),w.push(z)))))}}return h}tt("FeatureIndex",Gd,{omit:["rawTileData","sourceLayerCoder"]});class za extends _e{constructor(e,r,o,l){super(e,r),this.angle=o,l!==void 0&&(this.segment=l)}clone(){return new za(this.x,this.y,this.angle,this.segment)}}function Kd(i,e,r,o,l){if(e.segment===void 0||r===0)return!0;let h=e,p=e.segment+1,y=0;for(;y>-r/2;){if(p--,p<0)return!1;y-=i[p].dist(h),h=i[p]}y+=i[p].dist(i[p+1]),p++;const w=[];let T=0;for(;yo;)T-=w.shift().angleDelta;if(T>l)return!1;p++,y+=M.dist(z)}return!0}function Jd(i){let e=0;for(let r=0;rT){const U=(T-w)/N,Z=Hr.number(z.x,D.x,U),$=Hr.number(z.y,D.y,U),ie=new za(Z,$,D.angleTo(z),M);return ie._round(),!p||Kd(i,ie,y,p,e)?ie:void 0}w+=N}}function jm(i,e,r,o,l,h,p,y,w){const T=Yd(o,h,p),M=Qd(o,l),z=M*p,D=i[0].x===0||i[0].x===w||i[0].y===0||i[0].y===w;return e-z=0&&pe=0&&ye=0&&D+T<=M){const Ae=new za(pe,ye,ue,U);Ae._round(),o&&!Kd(i,Ae,h,o,l)||N.push(Ae)}}z+=ie}return y||N.length||p||(N=$d(i,z/2,r,o,l,h,p,!0,w)),N}tt("Anchor",za);const Tl=Kn;function ep(i,e,r,o){const l=[],h=i.image,p=h.pixelRatio,y=h.paddedRect.w-2*Tl,w=h.paddedRect.h-2*Tl,T=i.right-i.left,M=i.bottom-i.top,z=h.stretchX||[[0,y]],D=h.stretchY||[[0,w]],N=(Ze,ht)=>Ze+ht[1]-ht[0],U=z.reduce(N,0),Z=D.reduce(N,0),$=y-U,ie=w-Z;let ue=0,re=U,pe=0,ye=Z,Ae=0,lt=$,pt=0,st=ie;if(h.content&&o){const Ze=h.content;ue=nu(z,0,Ze[0]),pe=nu(D,0,Ze[1]),re=nu(z,Ze[0],Ze[2]),ye=nu(D,Ze[1],Ze[3]),Ae=Ze[0]-ue,pt=Ze[1]-pe,lt=Ze[2]-Ze[0]-re,st=Ze[3]-Ze[1]-ye}const $e=(Ze,ht,Ke,Be)=>{const bt=ou(Ze.stretch-ue,re,T,i.left),yt=su(Ze.fixed-Ae,lt,Ze.stretch,U),Ht=ou(ht.stretch-pe,ye,M,i.top),$i=su(ht.fixed-pt,st,ht.stretch,Z),nr=ou(Ke.stretch-ue,re,T,i.left),Dr=su(Ke.fixed-Ae,lt,Ke.stretch,U),lo=ou(Be.stretch-pe,ye,M,i.top),Fn=su(Be.fixed-pt,st,Be.stretch,Z),Mr=new _e(bt,Ht),Yr=new _e(nr,Ht),hn=new _e(nr,lo),Rn=new _e(bt,lo),On=new _e(yt/p,$i/p),Fr=new _e(Dr/p,Fn/p),Rr=e*Math.PI/180;if(Rr){const wn=Math.sin(Rr),Jn=Math.cos(Rr),Yn=[Jn,-wn,wn,Jn];Mr._matMult(Yn),Yr._matMult(Yn),Rn._matMult(Yn),hn._matMult(Yn)}const bn=Ze.stretch+Ze.fixed,Bn=ht.stretch+ht.fixed;return{tl:Mr,tr:Yr,bl:Rn,br:hn,tex:{x:h.paddedRect.x+Tl+bn,y:h.paddedRect.y+Tl+Bn,w:Ke.stretch+Ke.fixed-bn,h:Be.stretch+Be.fixed-Bn},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:On,pixelOffsetBR:Fr,minFontScaleX:lt/p/T,minFontScaleY:st/p/M,isSDF:r}};if(o&&(h.stretchX||h.stretchY)){const Ze=tp(z,$,U),ht=tp(D,ie,Z);for(let Ke=0;Ke0&&(U=Math.max(10,U),this.circleDiameter=U)}else{let z=p.top*y-w[0],D=p.bottom*y+w[2],N=p.left*y-w[3],U=p.right*y+w[1];const Z=p.collisionPadding;if(Z&&(N-=Z[0]*y,z-=Z[1]*y,U+=Z[2]*y,D+=Z[3]*y),M){const $=new _e(N,z),ie=new _e(U,z),ue=new _e(N,D),re=new _e(U,D),pe=M*Math.PI/180;$._rotate(pe),ie._rotate(pe),ue._rotate(pe),re._rotate(pe),N=Math.min($.x,ie.x,ue.x,re.x),U=Math.max($.x,ie.x,ue.x,re.x),z=Math.min($.y,ie.y,ue.y,re.y),D=Math.max($.y,ie.y,ue.y,re.y)}e.emplaceBack(r.x,r.y,N,z,U,D,o,l,h)}this.boxEndIndex=e.length}}class qm{constructor(e=[],r=Zm){if(this.data=e,this.length=this.data.length,this.compare=r,this.length>0)for(let o=(this.length>>1)-1;o>=0;o--)this._down(o)}push(e){this.data.push(e),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const e=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),e}peek(){return this.data[0]}_up(e){const{data:r,compare:o}=this,l=r[e];for(;e>0;){const h=e-1>>1,p=r[h];if(o(l,p)>=0)break;r[e]=p,e=h}r[e]=l}_down(e){const{data:r,compare:o}=this,l=this.length>>1,h=r[e];for(;e=0)break;r[e]=y,e=p}r[e]=h}}function Zm(i,e){return ie?1:0}function Gm(i,e=1,r=!1){let o=1/0,l=1/0,h=-1/0,p=-1/0;const y=i[0];for(let N=0;Nh)&&(h=U.x),(!N||U.y>p)&&(p=U.y)}const w=Math.min(h-o,p-l);let T=w/2;const M=new qm([],Wm);if(w===0)return new _e(o,l);for(let N=o;Nz.d||!z.d)&&(z=N,r&&console.log("found best %d after %d probes",Math.round(1e4*N.d)/1e4,D)),N.max-z.d<=e||(T=N.h/2,M.push(new Il(N.p.x-T,N.p.y-T,T,i)),M.push(new Il(N.p.x+T,N.p.y-T,T,i)),M.push(new Il(N.p.x-T,N.p.y+T,T,i)),M.push(new Il(N.p.x+T,N.p.y+T,T,i)),D+=4)}return r&&(console.log(`num probes: ${D}`),console.log(`best distance: ${z.d}`)),z.p}function Wm(i,e){return e.max-i.max}function Il(i,e,r,o){this.p=new _e(i,e),this.h=r,this.d=function(l,h){let p=!1,y=1/0;for(let w=0;wl.y!=U.y>l.y&&l.x<(U.x-N.x)*(l.y-N.y)/(U.y-N.y)+N.x&&(p=!p),y=Math.min(y,Oh(l,N,U))}}return(p?1:-1)*Math.sqrt(y)}(this.p,o),this.max=this.d+this.h*Math.SQRT2}var un;s.aq=void 0,(un=s.aq||(s.aq={}))[un.center=1]="center",un[un.left=2]="left",un[un.right=3]="right",un[un.top=4]="top",un[un.bottom=5]="bottom",un[un["top-left"]=6]="top-left",un[un["top-right"]=7]="top-right",un[un["bottom-left"]=8]="bottom-left",un[un["bottom-right"]=9]="bottom-right";const La=7,th=Number.POSITIVE_INFINITY;function ip(i,e){return e[1]!==th?function(r,o,l){let h=0,p=0;switch(o=Math.abs(o),l=Math.abs(l),r){case"top-right":case"top-left":case"top":p=l-La;break;case"bottom-right":case"bottom-left":case"bottom":p=-l+La}switch(r){case"top-right":case"bottom-right":case"right":h=-o;break;case"top-left":case"bottom-left":case"left":h=o}return[h,p]}(i,e[0],e[1]):function(r,o){let l=0,h=0;o<0&&(o=0);const p=o/Math.SQRT2;switch(r){case"top-right":case"top-left":h=p-La;break;case"bottom-right":case"bottom-left":h=-p+La;break;case"bottom":h=-o+La;break;case"top":h=o-La}switch(r){case"top-right":case"bottom-right":l=-p;break;case"top-left":case"bottom-left":l=p;break;case"left":l=o;break;case"right":l=-o}return[l,h]}(i,e[0])}function rp(i,e,r){var o;const l=i.layout,h=(o=l.get("text-variable-anchor-offset"))===null||o===void 0?void 0:o.evaluate(e,{},r);if(h){const y=h.values,w=[];for(let T=0;TD*Lr);M.startsWith("top")?z[1]-=La:M.startsWith("bottom")&&(z[1]+=La),w[T+1]=z}return new Ir(w)}const p=l.get("text-variable-anchor");if(p){let y;y=i._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[l.get("text-radial-offset").evaluate(e,{},r)*Lr,th]:l.get("text-offset").evaluate(e,{},r).map(T=>T*Lr);const w=[];for(const T of p)w.push(T,ip(T,y));return new Ir(w)}return null}function ih(i){switch(i){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function Hm(i,e,r,o,l,h,p,y,w,T,M){let z=h.textMaxSize.evaluate(e,{});z===void 0&&(z=p);const D=i.layers[0].layout,N=D.get("icon-offset").evaluate(e,{},M),U=op(r.horizontal),Z=p/24,$=i.tilePixelRatio*Z,ie=i.tilePixelRatio*z/24,ue=i.tilePixelRatio*y,re=i.tilePixelRatio*D.get("symbol-spacing"),pe=D.get("text-padding")*i.tilePixelRatio,ye=function(Be,bt,yt,Ht=1){const $i=Be.get("icon-padding").evaluate(bt,{},yt),nr=$i&&$i.values;return[nr[0]*Ht,nr[1]*Ht,nr[2]*Ht,nr[3]*Ht]}(D,e,M,i.tilePixelRatio),Ae=D.get("text-max-angle")/180*Math.PI,lt=D.get("text-rotation-alignment")!=="viewport"&&D.get("symbol-placement")!=="point",pt=D.get("icon-rotation-alignment")==="map"&&D.get("symbol-placement")!=="point",st=D.get("symbol-placement"),$e=re/2,Ze=D.get("icon-text-fit");let ht;o&&Ze!=="none"&&(i.allowVerticalPlacement&&r.vertical&&(ht=Cd(o,r.vertical,Ze,D.get("icon-text-fit-padding"),N,Z)),U&&(o=Cd(o,U,Ze,D.get("icon-text-fit-padding"),N,Z)));const Ke=(Be,bt)=>{bt.x<0||bt.x>=Cr||bt.y<0||bt.y>=Cr||function(yt,Ht,$i,nr,Dr,lo,Fn,Mr,Yr,hn,Rn,On,Fr,Rr,bn,Bn,wn,Jn,Yn,Or,oi,Sn,dn,Br,No){const Qo=yt.addToLineVertexArray(Ht,$i);let $o,js,Vo,vo,Qn=0,qs=0,fc=0,cp=0,uh=-1,hh=-1;const Zs={};let up=Bs("");if(yt.allowVerticalPlacement&&nr.vertical){const Tn=Mr.layout.get("text-rotate").evaluate(oi,{},Br)+90;Vo=new au(Yr,Ht,hn,Rn,On,nr.vertical,Fr,Rr,bn,Tn),Fn&&(vo=new au(Yr,Ht,hn,Rn,On,Fn,wn,Jn,bn,Tn))}if(Dr){const Tn=Mr.layout.get("icon-rotate").evaluate(oi,{}),xo=Mr.layout.get("icon-text-fit")!=="none",el=ep(Dr,Tn,dn,xo),ts=Fn?ep(Fn,Tn,dn,xo):void 0;js=new au(Yr,Ht,hn,Rn,On,Dr,wn,Jn,!1,Tn),Qn=4*el.length;const tl=yt.iconSizeData;let ys=null;tl.kind==="source"?(ys=[gs*Mr.layout.get("icon-size").evaluate(oi,{})],ys[0]>ka&&Dt(`${yt.layerIds[0]}: Value for "icon-size" is >= ${uc}. Reduce your "icon-size".`)):tl.kind==="composite"&&(ys=[gs*Sn.compositeIconSizes[0].evaluate(oi,{},Br),gs*Sn.compositeIconSizes[1].evaluate(oi,{},Br)],(ys[0]>ka||ys[1]>ka)&&Dt(`${yt.layerIds[0]}: Value for "icon-size" is >= ${uc}. Reduce your "icon-size".`)),yt.addSymbols(yt.icon,el,ys,Or,Yn,oi,s.ai.none,Ht,Qo.lineStartIndex,Qo.lineLength,-1,Br),uh=yt.icon.placedSymbolArray.length-1,ts&&(qs=4*ts.length,yt.addSymbols(yt.icon,ts,ys,Or,Yn,oi,s.ai.vertical,Ht,Qo.lineStartIndex,Qo.lineLength,-1,Br),hh=yt.icon.placedSymbolArray.length-1)}const hp=Object.keys(nr.horizontal);for(const Tn of hp){const xo=nr.horizontal[Tn];if(!$o){up=Bs(xo.text);const ts=Mr.layout.get("text-rotate").evaluate(oi,{},Br);$o=new au(Yr,Ht,hn,Rn,On,xo,Fr,Rr,bn,ts)}const el=xo.positionedLines.length===1;if(fc+=np(yt,Ht,xo,lo,Mr,bn,oi,Bn,Qo,nr.vertical?s.ai.horizontal:s.ai.horizontalOnly,el?hp:[Tn],Zs,uh,Sn,Br),el)break}nr.vertical&&(cp+=np(yt,Ht,nr.vertical,lo,Mr,bn,oi,Bn,Qo,s.ai.vertical,["vertical"],Zs,hh,Sn,Br));const Jm=$o?$o.boxStartIndex:yt.collisionBoxArray.length,Ym=$o?$o.boxEndIndex:yt.collisionBoxArray.length,Qm=Vo?Vo.boxStartIndex:yt.collisionBoxArray.length,$m=Vo?Vo.boxEndIndex:yt.collisionBoxArray.length,e_=js?js.boxStartIndex:yt.collisionBoxArray.length,t_=js?js.boxEndIndex:yt.collisionBoxArray.length,i_=vo?vo.boxStartIndex:yt.collisionBoxArray.length,r_=vo?vo.boxEndIndex:yt.collisionBoxArray.length;let es=-1;const cu=(Tn,xo)=>Tn&&Tn.circleDiameter?Math.max(Tn.circleDiameter,xo):xo;es=cu($o,es),es=cu(Vo,es),es=cu(js,es),es=cu(vo,es);const dp=es>-1?1:0;dp&&(es*=No/Lr),yt.glyphOffsetArray.length>=Sl.MAX_GLYPHS&&Dt("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),oi.sortKey!==void 0&&yt.addToSortKeyRanges(yt.symbolInstances.length,oi.sortKey);const n_=rp(Mr,oi,Br),[o_,s_]=function(Tn,xo){const el=Tn.length,ts=xo==null?void 0:xo.values;if((ts==null?void 0:ts.length)>0)for(let tl=0;tl=0?Zs.right:-1,Zs.center>=0?Zs.center:-1,Zs.left>=0?Zs.left:-1,Zs.vertical||-1,uh,hh,up,Jm,Ym,Qm,$m,e_,t_,i_,r_,hn,fc,cp,Qn,qs,dp,0,Fr,es,o_,s_)}(i,bt,Be,r,o,l,ht,i.layers[0],i.collisionBoxArray,e.index,e.sourceLayerIndex,i.index,$,[pe,pe,pe,pe],lt,w,ue,ye,pt,N,e,h,T,M,p)};if(st==="line")for(const Be of Xd(e.geometry,0,0,Cr,Cr)){const bt=jm(Be,re,Ae,r.vertical||U,o,24,ie,i.overscaling,Cr);for(const yt of bt)U&&Xm(i,U.text,$e,yt)||Ke(Be,yt)}else if(st==="line-center"){for(const Be of e.geometry)if(Be.length>1){const bt=Um(Be,Ae,r.vertical||U,o,24,ie);bt&&Ke(Be,bt)}}else if(e.type==="Polygon")for(const Be of Du(e.geometry,0)){const bt=Gm(Be,16);Ke(Be[0],new za(bt.x,bt.y,0))}else if(e.type==="LineString")for(const Be of e.geometry)Ke(Be,new za(Be[0].x,Be[0].y,0));else if(e.type==="Point")for(const Be of e.geometry)for(const bt of Be)Ke([bt],new za(bt.x,bt.y,0))}function np(i,e,r,o,l,h,p,y,w,T,M,z,D,N,U){const Z=function(ue,re,pe,ye,Ae,lt,pt,st){const $e=ye.layout.get("text-rotate").evaluate(lt,{})*Math.PI/180,Ze=[];for(const ht of re.positionedLines)for(const Ke of ht.positionedGlyphs){if(!Ke.rect)continue;const Be=Ke.rect||{};let bt=xd+1,yt=!0,Ht=1,$i=0;const nr=(Ae||st)&&Ke.vertical,Dr=Ke.metrics.advance*Ke.scale/2;if(st&&re.verticalizable&&($i=ht.lineOffset/2-(Ke.imageName?-(Lr-Ke.metrics.width*Ke.scale)/2:(Ke.scale-1)*Lr)),Ke.imageName){const Or=pt[Ke.imageName];yt=Or.sdf,Ht=Or.pixelRatio,bt=Kn/Ht}const lo=Ae?[Ke.x+Dr,Ke.y]:[0,0];let Fn=Ae?[0,0]:[Ke.x+Dr+pe[0],Ke.y+pe[1]-$i],Mr=[0,0];nr&&(Mr=Fn,Fn=[0,0]);const Yr=Ke.metrics.isDoubleResolution?2:1,hn=(Ke.metrics.left-bt)*Ke.scale-Dr+Fn[0],Rn=(-Ke.metrics.top-bt)*Ke.scale+Fn[1],On=hn+Be.w/Yr*Ke.scale/Ht,Fr=Rn+Be.h/Yr*Ke.scale/Ht,Rr=new _e(hn,Rn),bn=new _e(On,Rn),Bn=new _e(hn,Fr),wn=new _e(On,Fr);if(nr){const Or=new _e(-Dr,Dr-lc),oi=-Math.PI/2,Sn=Lr/2-Dr,dn=new _e(5-lc-Sn,-(Ke.imageName?Sn:0)),Br=new _e(...Mr);Rr._rotateAround(oi,Or)._add(dn)._add(Br),bn._rotateAround(oi,Or)._add(dn)._add(Br),Bn._rotateAround(oi,Or)._add(dn)._add(Br),wn._rotateAround(oi,Or)._add(dn)._add(Br)}if($e){const Or=Math.sin($e),oi=Math.cos($e),Sn=[oi,-Or,Or,oi];Rr._matMult(Sn),bn._matMult(Sn),Bn._matMult(Sn),wn._matMult(Sn)}const Jn=new _e(0,0),Yn=new _e(0,0);Ze.push({tl:Rr,tr:bn,bl:Bn,br:wn,tex:Be,writingMode:re.writingMode,glyphOffset:lo,sectionIndex:Ke.sectionIndex,isSDF:yt,pixelOffsetTL:Jn,pixelOffsetBR:Yn,minFontScaleX:0,minFontScaleY:0})}return Ze}(0,r,y,l,h,p,o,i.allowVerticalPlacement),$=i.textSizeData;let ie=null;$.kind==="source"?(ie=[gs*l.layout.get("text-size").evaluate(p,{})],ie[0]>ka&&Dt(`${i.layerIds[0]}: Value for "text-size" is >= ${uc}. Reduce your "text-size".`)):$.kind==="composite"&&(ie=[gs*N.compositeTextSizes[0].evaluate(p,{},U),gs*N.compositeTextSizes[1].evaluate(p,{},U)],(ie[0]>ka||ie[1]>ka)&&Dt(`${i.layerIds[0]}: Value for "text-size" is >= ${uc}. Reduce your "text-size".`)),i.addSymbols(i.text,Z,ie,y,h,p,T,e,w.lineStartIndex,w.lineLength,D,U);for(const ue of M)z[ue]=i.text.placedSymbolArray.length-1;return 4*Z.length}function op(i){for(const e in i)return i[e];return null}function Xm(i,e,r,o){const l=i.compareText;if(e in l){const h=l[e];for(let p=h.length-1;p>=0;p--)if(o.dist(h[p])>4;if(l!==1)throw new Error(`Got v${l} data when expected v1.`);const h=sp[15&o];if(!h)throw new Error("Unrecognized array type.");const[p]=new Uint16Array(e,2,1),[y]=new Uint32Array(e,4,1);return new rh(y,p,h,e)}constructor(e,r=64,o=Float64Array,l){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=o,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const h=sp.indexOf(this.ArrayType),p=2*e*this.ArrayType.BYTES_PER_ELEMENT,y=e*this.IndexArrayType.BYTES_PER_ELEMENT,w=(8-y%8)%8;if(h<0)throw new Error(`Unexpected typed array class: ${o}.`);l&&l instanceof ArrayBuffer?(this.data=l,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+y+w,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+p+y+w),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+y+w,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+h]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=e)}add(e,r){const o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=e,this.coords[this._pos++]=r,o}finish(){const e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return nh(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,r,o,l){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:h,coords:p,nodeSize:y}=this,w=[0,h.length-1,0],T=[];for(;w.length;){const M=w.pop()||0,z=w.pop()||0,D=w.pop()||0;if(z-D<=y){for(let $=D;$<=z;$++){const ie=p[2*$],ue=p[2*$+1];ie>=e&&ie<=o&&ue>=r&&ue<=l&&T.push(h[$])}continue}const N=D+z>>1,U=p[2*N],Z=p[2*N+1];U>=e&&U<=o&&Z>=r&&Z<=l&&T.push(h[N]),(M===0?e<=U:r<=Z)&&(w.push(D),w.push(N-1),w.push(1-M)),(M===0?o>=U:l>=Z)&&(w.push(N+1),w.push(z),w.push(1-M))}return T}within(e,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:l,coords:h,nodeSize:p}=this,y=[0,l.length-1,0],w=[],T=o*o;for(;y.length;){const M=y.pop()||0,z=y.pop()||0,D=y.pop()||0;if(z-D<=p){for(let $=D;$<=z;$++)lp(h[2*$],h[2*$+1],e,r)<=T&&w.push(l[$]);continue}const N=D+z>>1,U=h[2*N],Z=h[2*N+1];lp(U,Z,e,r)<=T&&w.push(l[N]),(M===0?e-o<=U:r-o<=Z)&&(y.push(D),y.push(N-1),y.push(1-M)),(M===0?e+o>=U:r+o>=Z)&&(y.push(N+1),y.push(z),y.push(1-M))}return w}}function nh(i,e,r,o,l,h){if(l-o<=r)return;const p=o+l>>1;ap(i,e,p,o,l,h),nh(i,e,r,o,p-1,1-h),nh(i,e,r,p+1,l,1-h)}function ap(i,e,r,o,l,h){for(;l>o;){if(l-o>600){const T=l-o+1,M=r-o+1,z=Math.log(T),D=.5*Math.exp(2*z/3),N=.5*Math.sqrt(z*D*(T-D)/T)*(M-T/2<0?-1:1);ap(i,e,r,Math.max(o,Math.floor(r-M*D/T+N)),Math.min(l,Math.floor(r+(T-M)*D/T+N)),h)}const p=e[2*r+h];let y=o,w=l;for(dc(i,e,o,r),e[2*l+h]>p&&dc(i,e,o,l);yp;)w--}e[2*o+h]===p?dc(i,e,o,w):(w++,dc(i,e,w,l)),w<=r&&(o=w+1),r<=w&&(l=w-1)}}function dc(i,e,r,o){oh(i,r,o),oh(e,2*r,2*o),oh(e,2*r+1,2*o+1)}function oh(i,e,r){const o=i[e];i[e]=i[r],i[r]=o}function lp(i,e,r,o){const l=i-r,h=e-o;return l*l+h*h}var sh;s.bh=void 0,(sh=s.bh||(s.bh={})).create="create",sh.load="load",sh.fullLoad="fullLoad";let lu=null,pc=[];const ah=1e3/60,lh="loadTime",ch="fullLoadTime",Km={mark(i){performance.mark(i)},frame(i){const e=i;lu!=null&&pc.push(e-lu),lu=e},clearMetrics(){lu=null,pc=[],performance.clearMeasures(lh),performance.clearMeasures(ch);for(const i in s.bh)performance.clearMarks(s.bh[i])},getPerformanceMetrics(){performance.measure(lh,s.bh.create,s.bh.load),performance.measure(ch,s.bh.create,s.bh.fullLoad);const i=performance.getEntriesByName(lh)[0].duration,e=performance.getEntriesByName(ch)[0].duration,r=pc.length,o=1/(pc.reduce((h,p)=>h+p,0)/r/1e3),l=pc.filter(h=>h>ah).reduce((h,p)=>h+(p-ah)/ah,0);return{loadTime:i,fullLoadTime:e,fps:o,percentDroppedFrames:l/(r+l)*100,totalFrames:r}}};s.$=function(i,e,r){var o,l,h,p,y,w,T,M,z,D,N,U,Z=r[0],$=r[1],ie=r[2];return e===i?(i[12]=e[0]*Z+e[4]*$+e[8]*ie+e[12],i[13]=e[1]*Z+e[5]*$+e[9]*ie+e[13],i[14]=e[2]*Z+e[6]*$+e[10]*ie+e[14],i[15]=e[3]*Z+e[7]*$+e[11]*ie+e[15]):(l=e[1],h=e[2],p=e[3],y=e[4],w=e[5],T=e[6],M=e[7],z=e[8],D=e[9],N=e[10],U=e[11],i[0]=o=e[0],i[1]=l,i[2]=h,i[3]=p,i[4]=y,i[5]=w,i[6]=T,i[7]=M,i[8]=z,i[9]=D,i[10]=N,i[11]=U,i[12]=o*Z+y*$+z*ie+e[12],i[13]=l*Z+w*$+D*ie+e[13],i[14]=h*Z+T*$+N*ie+e[14],i[15]=p*Z+M*$+U*ie+e[15]),i},s.A=gl,s.B=Hr,s.C=class{constructor(i,e,r){this.receive=o=>{const l=o.data,h=l.id;if(h&&(!l.targetMapId||this.mapId===l.targetMapId))if(l.type===""){delete this.tasks[h];const p=this.cancelCallbacks[h];delete this.cancelCallbacks[h],p&&p()}else di()||l.mustQueue?(this.tasks[h]=l,this.taskQueue.push(h),this.invoker.trigger()):this.processTask(h,l)},this.process=()=>{if(!this.taskQueue.length)return;const o=this.taskQueue.shift(),l=this.tasks[o];delete this.tasks[o],this.taskQueue.length&&this.invoker.trigger(),l&&this.processTask(o,l)},this.target=i,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},this.invoker=new Nm(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=di()?i:window}send(i,e,r,o,l=!1){const h=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[h]=r);const p=[],y={id:h,type:i,hasCallback:!!r,targetMapId:o,mustQueue:l,sourceMapId:this.mapId,data:Pn(e,p)};return this.target.postMessage(y,{transfer:p}),{cancel:()=>{r&&delete this.callbacks[h],this.target.postMessage({id:h,type:"",targetMapId:o,sourceMapId:this.mapId})}}}processTask(i,e){if(e.type===""){const r=this.callbacks[i];delete this.callbacks[i],r&&(e.error?r(_o(e.error)):r(null,_o(e.data)))}else{let r=!1;const o=[],l=e.hasCallback?(y,w)=>{r=!0,delete this.cancelCallbacks[i];const T={id:i,type:"",sourceMapId:this.mapId,error:y?Pn(y):null,data:Pn(w,o)};this.target.postMessage(T,{transfer:o})}:y=>{r=!0};let h=null;const p=_o(e.data);if(this.parent[e.type])h=this.parent[e.type](e.sourceMapId,p,l);else if("getWorkerSource"in this.parent){const y=e.type.split(".");h=this.parent.getWorkerSource(e.sourceMapId,y[0],p.source)[y[1]](p,l)}else l(new Error(`Could not find function ${e.type}`));!r&&h&&h.cancel&&(this.cancelCallbacks[i]=h.cancel)}}remove(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)}},s.D=xt,s.E=jo,s.F=function(i,e){const r={};for(let o=0;o{}}},s.Y=qe,s.Z=function(){var i=new gl(16);return gl!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i},s._=H,s.a=en,s.a$=class extends R{},s.a0=function(i,e,r){var o=r[0],l=r[1],h=r[2];return i[0]=e[0]*o,i[1]=e[1]*o,i[2]=e[2]*o,i[3]=e[3]*o,i[4]=e[4]*l,i[5]=e[5]*l,i[6]=e[6]*l,i[7]=e[7]*l,i[8]=e[8]*h,i[9]=e[9]*h,i[10]=e[10]*h,i[11]=e[11]*h,i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},s.a1=Uh,s.a2=function(){return Yt++},s.a3=K,s.a4=Sl,s.a5=function(){Hn.isLoading()||Hn.isLoaded()||Ul()!=="deferred"||Rc()},s.a6=ga,s.a7=Qa,s.a8=Yi,s.a9=Zd,s.aA=Wa,s.aB=function(i){i=i.slice();const e=Object.create(null);for(let r=0;r{o[p.source]?r.push({command:ii.removeLayer,args:[p.id]}):h.push(p)}),r=r.concat(l),function(p,y,w){y=y||[];const T=(p=p||[]).map(Cn),M=y.map(Cn),z=p.reduce($n,{}),D=y.reduce($n,{}),N=T.slice(),U=Object.create(null);let Z,$,ie,ue,re,pe,ye;for(Z=0,$=0;Z@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(r,o,l,h)=>{const p=l||h;return e[o]=!p||p.toLowerCase(),""}),e["max-age"]){const r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e},s.ab=function(i,e){const r=[];for(const o in i)o in e||r.push(o);return r},s.ac=function(i){if(Pi==null){const e=i.navigator?i.navigator.userAgent:null;Pi=!!i.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return Pi},s.ad=ti,s.ae=function(i,e,r){var o=Math.sin(r),l=Math.cos(r),h=e[0],p=e[1],y=e[2],w=e[3],T=e[4],M=e[5],z=e[6],D=e[7];return e!==i&&(i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15]),i[0]=h*l+T*o,i[1]=p*l+M*o,i[2]=y*l+z*o,i[3]=w*l+D*o,i[4]=T*l-h*o,i[5]=M*l-p*o,i[6]=z*l-y*o,i[7]=D*l-w*o,i},s.af=function(i){var e=new gl(16);return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],e},s.ag=Wc,s.ah=function(i,e){let r=0,o=0;if(i.kind==="constant")o=i.layoutSize;else if(i.kind!=="source"){const{interpolationType:l,minZoom:h,maxZoom:p}=i,y=l?ti(sn.interpolationFactor(l,e,h,p),0,1):0;i.kind==="camera"?o=Hr.number(i.minSize,i.maxSize,y):r=y}return{uSizeT:r,uSize:o}},s.aj=function(i,{uSize:e,uSizeT:r},{lowerSize:o,upperSize:l}){return i.kind==="source"?o/gs:i.kind==="composite"?Hr.number(o/gs,l/gs,r):e},s.ak=Xu,s.al=function(i,e,r,o){const l=e.y-i.y,h=e.x-i.x,p=o.y-r.y,y=o.x-r.x,w=p*h-y*l;if(w===0)return null;const T=(y*(i.y-r.y)-p*(i.x-r.x))/w;return new _e(i.x+T*h,i.y+T*l)},s.am=Xd,s.an=Fh,s.ao=Cu,s.ap=Lr,s.ar=Hu,s.as=function(i,e){var r=e[0],o=e[1],l=e[2],h=e[3],p=e[4],y=e[5],w=e[6],T=e[7],M=e[8],z=e[9],D=e[10],N=e[11],U=e[12],Z=e[13],$=e[14],ie=e[15],ue=r*y-o*p,re=r*w-l*p,pe=r*T-h*p,ye=o*w-l*y,Ae=o*T-h*y,lt=l*T-h*w,pt=M*Z-z*U,st=M*$-D*U,$e=M*ie-N*U,Ze=z*$-D*Z,ht=z*ie-N*Z,Ke=D*ie-N*$,Be=ue*Ke-re*ht+pe*Ze+ye*$e-Ae*st+lt*pt;return Be?(i[0]=(y*Ke-w*ht+T*Ze)*(Be=1/Be),i[1]=(l*ht-o*Ke-h*Ze)*Be,i[2]=(Z*lt-$*Ae+ie*ye)*Be,i[3]=(D*Ae-z*lt-N*ye)*Be,i[4]=(w*$e-p*Ke-T*st)*Be,i[5]=(r*Ke-l*$e+h*st)*Be,i[6]=($*pe-U*lt-ie*re)*Be,i[7]=(M*lt-D*pe+N*re)*Be,i[8]=(p*ht-y*$e+T*pt)*Be,i[9]=(o*$e-r*ht-h*pt)*Be,i[10]=(U*Ae-Z*pe+ie*ue)*Be,i[11]=(z*pe-M*Ae-N*ue)*Be,i[12]=(y*st-p*Ze-w*pt)*Be,i[13]=(r*Ze-o*st+l*pt)*Be,i[14]=(Z*re-U*ye-$*ue)*Be,i[15]=(M*ye-z*re+D*ue)*Be,i):null},s.at=ih,s.au=Wu,s.av=rh,s.aw=function(){const i={},e=Se.$version;for(const r in Se.$root){const o=Se.$root[r];if(o.required){let l=null;l=r==="version"?e:o.type==="array"?[]:{},l!=null&&(i[r]=l)}}return i},s.ax=ii,s.ay=Jo,s.az=Gt,s.b=function(i,e){const r=new Blob([new Uint8Array(i)],{type:"image/png"});createImageBitmap(r).then(o=>{e(null,o)}).catch(o=>{e(new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`))})},s.b0=Kr,s.b1=function(i,e){var r=i[0],o=i[1],l=i[2],h=i[3],p=i[4],y=i[5],w=i[6],T=i[7],M=i[8],z=i[9],D=i[10],N=i[11],U=i[12],Z=i[13],$=i[14],ie=i[15],ue=e[0],re=e[1],pe=e[2],ye=e[3],Ae=e[4],lt=e[5],pt=e[6],st=e[7],$e=e[8],Ze=e[9],ht=e[10],Ke=e[11],Be=e[12],bt=e[13],yt=e[14],Ht=e[15];return Math.abs(r-ue)<=Dn*Math.max(1,Math.abs(r),Math.abs(ue))&&Math.abs(o-re)<=Dn*Math.max(1,Math.abs(o),Math.abs(re))&&Math.abs(l-pe)<=Dn*Math.max(1,Math.abs(l),Math.abs(pe))&&Math.abs(h-ye)<=Dn*Math.max(1,Math.abs(h),Math.abs(ye))&&Math.abs(p-Ae)<=Dn*Math.max(1,Math.abs(p),Math.abs(Ae))&&Math.abs(y-lt)<=Dn*Math.max(1,Math.abs(y),Math.abs(lt))&&Math.abs(w-pt)<=Dn*Math.max(1,Math.abs(w),Math.abs(pt))&&Math.abs(T-st)<=Dn*Math.max(1,Math.abs(T),Math.abs(st))&&Math.abs(M-$e)<=Dn*Math.max(1,Math.abs(M),Math.abs($e))&&Math.abs(z-Ze)<=Dn*Math.max(1,Math.abs(z),Math.abs(Ze))&&Math.abs(D-ht)<=Dn*Math.max(1,Math.abs(D),Math.abs(ht))&&Math.abs(N-Ke)<=Dn*Math.max(1,Math.abs(N),Math.abs(Ke))&&Math.abs(U-Be)<=Dn*Math.max(1,Math.abs(U),Math.abs(Be))&&Math.abs(Z-bt)<=Dn*Math.max(1,Math.abs(Z),Math.abs(bt))&&Math.abs($-yt)<=Dn*Math.max(1,Math.abs($),Math.abs(yt))&&Math.abs(ie-Ht)<=Dn*Math.max(1,Math.abs(ie),Math.abs(Ht))},s.b2=function(i,e){return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[4]=e[4],i[5]=e[5],i[6]=e[6],i[7]=e[7],i[8]=e[8],i[9]=e[9],i[10]=e[10],i[11]=e[11],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15],i},s.b3=function(i,e,r){return i[0]=e[0]*r[0],i[1]=e[1]*r[1],i[2]=e[2]*r[2],i[3]=e[3]*r[3],i},s.b4=function(i,e){return i[0]*e[0]+i[1]*e[1]+i[2]*e[2]+i[3]*e[3]},s.b5=Xt,s.b6=Ud,s.b7=Bd,s.b8=function(i,e,r,o,l){var h,p=1/Math.tan(e/2);return i[0]=p/r,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=p,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=-1,i[12]=0,i[13]=0,i[15]=0,l!=null&&l!==1/0?(i[10]=(l+o)*(h=1/(o-l)),i[14]=2*l*o*h):(i[10]=-1,i[14]=-2*o),i},s.b9=function(i,e,r){var o=Math.sin(r),l=Math.cos(r),h=e[4],p=e[5],y=e[6],w=e[7],T=e[8],M=e[9],z=e[10],D=e[11];return e!==i&&(i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[3],i[12]=e[12],i[13]=e[13],i[14]=e[14],i[15]=e[15]),i[4]=h*l+T*o,i[5]=p*l+M*o,i[6]=y*l+z*o,i[7]=w*l+D*o,i[8]=T*l-h*o,i[9]=M*l-p*o,i[10]=z*l-y*o,i[11]=D*l-w*o,i},s.bA=ge,s.bB=pd,s.bC=ma,s.bD=Hn,s.ba=it,s.bb=Vt,s.bc=function(i,e){return i[0]=e[0],i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=e[1],i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=e[2],i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i},s.bd=class extends Ja{},s.be=Qu,s.bf=Nd,s.bg=Km,s.bi=He,s.bj=function(i,e,r=!1){if(zn===Rl||zn===Ol||zn===Bl)throw new Error("setRTLTextPlugin cannot be called multiple times.");ms=Le.resolveURL(i),zn=Rl,Nl=e,Vl(),r||Rc()},s.bk=Ul,s.bl=function(i,e){const r={};for(let l=0;lBe*Lr)}let st=p?"center":r.get("text-justify").evaluate(T,{},i.canonical);const $e=r.get("symbol-placement"),Ze=$e==="point"?r.get("text-max-width").evaluate(T,{},i.canonical)*Lr:0,ht=()=>{i.bucket.allowVerticalPlacement&&Sa(pe)&&(U.vertical=$c(Z,i.glyphMap,i.glyphPositions,i.imagePositions,M,Ze,h,lt,"left",Ae,ie,s.ai.vertical,!0,$e,D,z))};if(!p&&pt){const Ke=new Set;if(st==="auto")for(let bt=0;bt{e(null,r),URL.revokeObjectURL(r.src),r.onload=null,window.requestAnimationFrame(()=>{r.src=Vr})},r.onerror=()=>e(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 o=new Blob([new Uint8Array(i)],{type:"image/png"});r.src=i.byteLength?URL.createObjectURL(o):Vr},s.e=Nt,s.f=function(i,e){return _r(Nt(i,{type:"json"}),e)},s.g=ct,s.h=Le,s.i=di,s.j=wo,s.k=co,s.l=Ue,s.m=_r,s.n=function(i){return new ju(i).readFields(Tm,[])},s.o=function(i,e,r){if(!i.length)return r(null,[]);let o=i.length;const l=new Array(i.length);let h=null;i.forEach((p,y)=>{e(p,(w,T)=>{w&&(h=w),l[y]=T,--o==0&&r(h,l)})})},s.p=bd,s.q=ec,s.r=xr,s.s=Bi,s.t=Li,s.u=Xe,s.v=Se,s.w=Dt,s.x=Gn,s.y=mo,s.z=function([i,e,r]){return e+=90,e*=Math.PI/180,r*=Math.PI/180,{x:i*Math.cos(e)*Math.sin(r),y:i*Math.sin(e)*Math.sin(r),z:i*Math.cos(r)}}}),k(["./shared"],function(s){class H{constructor(L){this.keyCache={},L&&this.replace(L)}replace(L){this._layerConfigs={},this._layers={},this.update(L,[])}update(L,F){for(const J of L){this._layerConfigs[J.id]=J;const Q=this._layers[J.id]=s.aC(J);Q._featureFilter=s.a6(Q.filter),this.keyCache[J.id]&&delete this.keyCache[J.id]}for(const J of F)delete this.keyCache[J],delete this._layerConfigs[J],delete this._layers[J];this.familiesBySource={};const j=s.bl(Object.values(this._layerConfigs),this.keyCache);for(const J of j){const Q=J.map(Ee=>this._layers[Ee.id]),he=Q[0];if(he.visibility==="none")continue;const oe=he.source||"";let te=this.familiesBySource[oe];te||(te=this.familiesBySource[oe]={});const ae=he.sourceLayer||"_geojsonTileLayer";let Te=te[ae];Te||(Te=te[ae]=[]),Te.push(Q)}}}class V{constructor(L){const F={},j=[];for(const oe in L){const te=L[oe],ae=F[oe]={};for(const Te in te){const Ee=te[+Te];if(!Ee||Ee.bitmap.width===0||Ee.bitmap.height===0)continue;const Ce={x:0,y:0,w:Ee.bitmap.width+2,h:Ee.bitmap.height+2};j.push(Ce),ae[Te]={rect:Ce,metrics:Ee.metrics}}}const{w:J,h:Q}=s.p(j),he=new s.q({width:J||1,height:Q||1});for(const oe in L){const te=L[oe];for(const ae in te){const Te=te[+ae];if(!Te||Te.bitmap.width===0||Te.bitmap.height===0)continue;const Ee=F[oe][ae].rect;s.q.copy(Te.bitmap,he,{x:0,y:0},{x:Ee.x+1,y:Ee.y+1},Te.bitmap)}}this.image=he,this.positions=F}}s.bm("GlyphAtlas",V);class ge{constructor(L){this.tileID=new s.O(L.tileID.overscaledZ,L.tileID.wrap,L.tileID.canonical.z,L.tileID.canonical.x,L.tileID.canonical.y),this.uid=L.uid,this.zoom=L.zoom,this.pixelRatio=L.pixelRatio,this.tileSize=L.tileSize,this.source=L.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=L.showCollisionBoxes,this.collectResourceTiming=!!L.collectResourceTiming,this.returnDependencies=!!L.returnDependencies,this.promoteId=L.promoteId,this.inFlightDependencies=[],this.dependencySentinel=-1}parse(L,F,j,J,Q){this.status="parsing",this.data=L,this.collisionBoxArray=new s.a3;const he=new s.bn(Object.keys(L.layers).sort()),oe=new s.bo(this.tileID,this.promoteId);oe.bucketLayerIDs=[];const te={},ae={featureIndex:oe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:j},Te=F.familiesBySource[this.source];for(const ai in Te){const ri=L.layers[ai];if(!ri)continue;ri.version===1&&s.w(`Vector tile source "${this.source}" layer "${ai}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const jr=he.encode(ai),Ei=[];for(let ur=0;ur=yr.maxzoom||yr.visibility!=="none"&&(be(ur,this.zoom,j),(te[yr.id]=yr.createBucket({index:oe.bucketLayerIDs.length,layers:ur,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:jr,sourceID:this.source})).populate(Ei,ae,this.tileID.canonical),oe.bucketLayerIDs.push(ur.map(An=>An.id)))}}let Ee,Ce,mt,kt;const ut=s.aH(ae.glyphDependencies,ai=>Object.keys(ai).map(Number));this.inFlightDependencies.forEach(ai=>ai==null?void 0:ai.cancel()),this.inFlightDependencies=[];const vt=++this.dependencySentinel;Object.keys(ut).length?this.inFlightDependencies.push(J.send("getGlyphs",{uid:this.uid,stacks:ut,source:this.source,tileID:this.tileID,type:"glyphs"},(ai,ri)=>{vt===this.dependencySentinel&&(Ee||(Ee=ai,Ce=ri,Ut.call(this)))})):Ce={};const Ft=Object.keys(ae.iconDependencies);Ft.length?this.inFlightDependencies.push(J.send("getImages",{icons:Ft,source:this.source,tileID:this.tileID,type:"icons"},(ai,ri)=>{vt===this.dependencySentinel&&(Ee||(Ee=ai,mt=ri,Ut.call(this)))})):mt={};const gi=Object.keys(ae.patternDependencies);function Ut(){if(Ee)return Q(Ee);if(Ce&&mt&&kt){const ai=new V(Ce),ri=new s.bp(mt,kt);for(const jr in te){const Ei=te[jr];Ei instanceof s.a4?(be(Ei.layers,this.zoom,j),s.bq({bucket:Ei,glyphMap:Ce,glyphPositions:ai.positions,imageMap:mt,imagePositions:ri.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):Ei.hasPattern&&(Ei instanceof s.br||Ei instanceof s.bs||Ei instanceof s.bt)&&(be(Ei.layers,this.zoom,j),Ei.addFeatures(ae,this.tileID.canonical,ri.patternPositions))}this.status="done",Q(null,{buckets:Object.values(te).filter(jr=>!jr.isEmpty()),featureIndex:oe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ai.image,imageAtlas:ri,glyphMap:this.returnDependencies?Ce:null,iconMap:this.returnDependencies?mt:null,glyphPositions:this.returnDependencies?ai.positions:null})}}gi.length?this.inFlightDependencies.push(J.send("getImages",{icons:gi,source:this.source,tileID:this.tileID,type:"patterns"},(ai,ri)=>{vt===this.dependencySentinel&&(Ee||(Ee=ai,kt=ri,Ut.call(this)))})):kt={},Ut.call(this)}}function be(X,L,F){const j=new s.a8(L);for(const J of X)J.recalculate(j,F)}function _e(X,L){const F=s.l(X.request,(j,J,Q,he)=>{if(j)L(j);else if(J)try{const oe=new s.bw.VectorTile(new s.bv(J));L(null,{vectorTile:oe,rawData:J,cacheControl:Q,expires:he})}catch(oe){const te=new Uint8Array(J);let ae=`Unable to parse the tile at ${X.request.url}, `;ae+=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: ${oe.messge}`,L(new Error(ae))}});return()=>{F.cancel(),L()}}class Ie{constructor(L,F,j,J){this.actor=L,this.layerIndex=F,this.availableImages=j,this.loadVectorData=J||_e,this.fetching={},this.loading={},this.loaded={}}loadTile(L,F){const j=L.uid;this.loading||(this.loading={});const J=!!(L&&L.request&&L.request.collectResourceTiming)&&new s.bu(L.request),Q=this.loading[j]=new ge(L);Q.abort=this.loadVectorData(L,(he,oe)=>{if(delete this.loading[j],he||!oe)return Q.status="done",this.loaded[j]=Q,F(he);const te=oe.rawData,ae={};oe.expires&&(ae.expires=oe.expires),oe.cacheControl&&(ae.cacheControl=oe.cacheControl);const Te={};if(J){const Ee=J.finish();Ee&&(Te.resourceTiming=JSON.parse(JSON.stringify(Ee)))}Q.vectorTile=oe.vectorTile,Q.parse(oe.vectorTile,this.layerIndex,this.availableImages,this.actor,(Ee,Ce)=>{if(delete this.fetching[j],Ee||!Ce)return F(Ee);F(null,s.e({rawTileData:te.slice(0)},Ce,ae,Te))}),this.loaded=this.loaded||{},this.loaded[j]=Q,this.fetching[j]={rawTileData:te,cacheControl:ae,resourceTiming:Te}})}reloadTile(L,F){const j=this.loaded,J=L.uid;if(j&&j[J]){const Q=j[J];Q.showCollisionBoxes=L.showCollisionBoxes,Q.status==="parsing"?Q.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor,(he,oe)=>{if(he||!oe)return F(he,oe);let te;if(this.fetching[J]){const{rawTileData:ae,cacheControl:Te,resourceTiming:Ee}=this.fetching[J];delete this.fetching[J],te=s.e({rawTileData:ae.slice(0)},oe,Te,Ee)}else te=oe;F(null,te)}):Q.status==="done"&&(Q.vectorTile?Q.parse(Q.vectorTile,this.layerIndex,this.availableImages,this.actor,F):F())}}abortTile(L,F){const j=this.loading,J=L.uid;j&&j[J]&&j[J].abort&&(j[J].abort(),delete j[J]),F()}removeTile(L,F){const j=this.loaded,J=L.uid;j&&j[J]&&delete j[J],F()}}class De{constructor(){this.loaded={}}loadTile(L,F){return s._(this,void 0,void 0,function*(){const{uid:j,encoding:J,rawImageData:Q,redFactor:he,greenFactor:oe,blueFactor:te,baseShift:ae}=L,Te=Q.width+2,Ee=Q.height+2,Ce=s.a(Q)?new s.R({width:Te,height:Ee},yield s.bx(Q,-1,-1,Te,Ee)):Q,mt=new s.by(j,Ce,J,he,oe,te,ae);this.loaded=this.loaded||{},this.loaded[j]=mt,F(null,mt)})}removeTile(L){const F=this.loaded,j=L.uid;F&&F[j]&&delete F[j]}}function Fe(X,L){if(X.length!==0){Ne(X[0],L);for(var F=1;F=Math.abs(oe)?F-te+oe:oe-te+F,F=te}F+j>=0!=!!L&&X.reverse()}var et=s.bz(function X(L,F){var j,J=L&&L.type;if(J==="FeatureCollection")for(j=0;j>31}function di(X,L){for(var F=X.loadGeometry(),j=X.type,J=0,Q=0,he=F.length,oe=0;oeX},zi=Math.fround||(Ti=new Float32Array(1),X=>(Ti[0]=+X,Ti[0]));var Ti;const Tt=3,pi=5,Oi=6;class Le{constructor(L){this.options=Object.assign(Object.create(Vr),L),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(L){const{log:F,minZoom:j,maxZoom:J}=this.options;F&&console.time("total time");const Q=`prepare ${L.length} points`;F&&console.time(Q),this.points=L;const he=[];for(let te=0;te=j;te--){const ae=+Date.now();oe=this.trees[te]=this._createTree(this._cluster(oe,te)),F&&console.log("z%d: %d clusters in %dms",te,oe.numItems,+Date.now()-ae)}return F&&console.timeEnd("total time"),this}getClusters(L,F){let j=((L[0]+180)%360+360)%360-180;const J=Math.max(-90,Math.min(90,L[1]));let Q=L[2]===180?180:((L[2]+180)%360+360)%360-180;const he=Math.max(-90,Math.min(90,L[3]));if(L[2]-L[0]>=360)j=-180,Q=180;else if(j>Q){const Ee=this.getClusters([j,J,180,he],F),Ce=this.getClusters([-180,J,Q,he],F);return Ee.concat(Ce)}const oe=this.trees[this._limitZoom(F)],te=oe.range(Gt(j),ct(he),Gt(Q),ct(J)),ae=oe.data,Te=[];for(const Ee of te){const Ce=this.stride*Ee;Te.push(ae[Ce+pi]>1?Pt(ae,Ce,this.clusterProps):this.points[ae[Ce+Tt]])}return Te}getChildren(L){const F=this._getOriginId(L),j=this._getOriginZoom(L),J="No cluster with the specified id.",Q=this.trees[j];if(!Q)throw new Error(J);const he=Q.data;if(F*this.stride>=he.length)throw new Error(J);const oe=this.options.radius/(this.options.extent*Math.pow(2,j-1)),te=Q.within(he[F*this.stride],he[F*this.stride+1],oe),ae=[];for(const Te of te){const Ee=Te*this.stride;he[Ee+4]===L&&ae.push(he[Ee+pi]>1?Pt(he,Ee,this.clusterProps):this.points[he[Ee+Tt]])}if(ae.length===0)throw new Error(J);return ae}getLeaves(L,F,j){const J=[];return this._appendLeaves(J,L,F=F||10,j=j||0,0),J}getTile(L,F,j){const J=this.trees[this._limitZoom(L)],Q=Math.pow(2,L),{extent:he,radius:oe}=this.options,te=oe/he,ae=(j-te)/Q,Te=(j+1+te)/Q,Ee={features:[]};return this._addTileFeatures(J.range((F-te)/Q,ae,(F+1+te)/Q,Te),J.data,F,j,Q,Ee),F===0&&this._addTileFeatures(J.range(1-te/Q,ae,1,Te),J.data,Q,j,Q,Ee),F===Q-1&&this._addTileFeatures(J.range(0,ae,te/Q,Te),J.data,-1,j,Q,Ee),Ee.features.length?Ee:null}getClusterExpansionZoom(L){let F=this._getOriginZoom(L)-1;for(;F<=this.options.maxZoom;){const j=this.getChildren(L);if(F++,j.length!==1)break;L=j[0].properties.cluster_id}return F}_appendLeaves(L,F,j,J,Q){const he=this.getChildren(F);for(const oe of he){const te=oe.properties;if(te&&te.cluster?Q+te.point_count<=J?Q+=te.point_count:Q=this._appendLeaves(L,te.cluster_id,j,J,Q):Q1;let Te,Ee,Ce;if(ae)Te=He(F,te,this.clusterProps),Ee=F[te],Ce=F[te+1];else{const ut=this.points[F[te+Tt]];Te=ut.properties;const[vt,Ft]=ut.geometry.coordinates;Ee=Gt(vt),Ce=ct(Ft)}const mt={type:1,geometry:[[Math.round(this.options.extent*(Ee*Q-j)),Math.round(this.options.extent*(Ce*Q-J))]],tags:Te};let kt;kt=ae||this.options.generateId?F[te+Tt]:this.points[F[te+Tt]].id,kt!==void 0&&(mt.id=kt),he.features.push(mt)}}_limitZoom(L){return Math.max(this.options.minZoom,Math.min(Math.floor(+L),this.options.maxZoom+1))}_cluster(L,F){const{radius:j,extent:J,reduce:Q,minPoints:he}=this.options,oe=j/(J*Math.pow(2,F)),te=L.data,ae=[],Te=this.stride;for(let Ee=0;EeF&&(vt+=te[gi+pi])}if(vt>ut&&vt>=he){let Ft,gi=Ce*ut,Ut=mt*ut,ai=-1;const ri=((Ee/Te|0)<<5)+(F+1)+this.points.length;for(const jr of kt){const Ei=jr*Te;if(te[Ei+2]<=F)continue;te[Ei+2]=F;const ur=te[Ei+pi];gi+=te[Ei]*ur,Ut+=te[Ei+1]*ur,te[Ei+4]=ri,Q&&(Ft||(Ft=this._map(te,Ee,!0),ai=this.clusterProps.length,this.clusterProps.push(Ft)),Q(Ft,this._map(te,Ei)))}te[Ee+4]=ri,ae.push(gi/vt,Ut/vt,1/0,ri,-1,vt),Q&&ae.push(ai)}else{for(let Ft=0;Ft1)for(const Ft of kt){const gi=Ft*Te;if(!(te[gi+2]<=F)){te[gi+2]=F;for(let Ut=0;Ut>5}_getOriginZoom(L){return(L-this.points.length)%32}_map(L,F,j){if(L[F+pi]>1){const he=this.clusterProps[L[F+Oi]];return j?Object.assign({},he):he}const J=this.points[L[F+Tt]].properties,Q=this.options.map(J);return j&&Q===J?Object.assign({},Q):Q}}function Pt(X,L,F){return{type:"Feature",id:X[L+Tt],properties:He(X,L,F),geometry:{type:"Point",coordinates:[(j=X[L],360*(j-.5)),Zi(X[L+1])]}};var j}function He(X,L,F){const j=X[L+pi],J=j>=1e4?`${Math.round(j/1e3)}k`:j>=1e3?Math.round(j/100)/10+"k":j,Q=X[L+Oi],he=Q===-1?{}:Object.assign({},F[Q]);return Object.assign(he,{cluster:!0,cluster_id:X[L+Tt],point_count:j,point_count_abbreviated:J})}function Gt(X){return X/360+.5}function ct(X){const L=Math.sin(X*Math.PI/180),F=.5-.25*Math.log((1+L)/(1-L))/Math.PI;return F<0?0:F>1?1:F}function Zi(X){const L=(180-360*X)*Math.PI/180;return 360*Math.atan(Math.exp(L))/Math.PI-90}function _r(X,L,F,j){for(var J,Q=j,he=F-L>>1,oe=F-L,te=X[L],ae=X[L+1],Te=X[F],Ee=X[F+1],Ce=L+3;CeQ)J=Ce,Q=mt;else if(mt===Q){var kt=Math.abs(Ce-he);ktj&&(J-L>3&&_r(X,L,J,j),X[J+2]=Q,F-J>3&&_r(X,J,F,j))}function Ue(X,L,F,j,J,Q){var he=J-F,oe=Q-j;if(he!==0||oe!==0){var te=((X-F)*he+(L-j)*oe)/(he*he+oe*oe);te>1?(F=J,j=Q):te>0&&(F+=he*te,j+=oe*te)}return(he=X-F)*he+(oe=L-j)*oe}function Bi(X,L,F,j){var J={id:X===void 0?null:X,type:L,geometry:F,tags:j,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Q){var he=Q.geometry,oe=Q.type;if(oe==="Point"||oe==="MultiPoint"||oe==="LineString")gr(Q,he);else if(oe==="Polygon"||oe==="MultiLineString")for(var te=0;te0&&(he+=j?(J*ae-te*Q)/2:Math.sqrt(Math.pow(te-J,2)+Math.pow(ae-Q,2))),J=te,Q=ae}var Te=L.length-3;L[2]=1,_r(L,0,Te,F),L[Te+2]=1,L.size=Math.abs(he),L.start=0,L.end=L.size}function jo(X,L,F,j){for(var J=0;J1?1:F}function In(X,L,F,j,J,Q,he,oe){if(j/=L,Q>=(F/=L)&&he=j)return null;for(var te=[],ae=0;ae=F&&kt=j)){var ut=[];if(Ce==="Point"||Ce==="MultiPoint")Ii(Ee,ut,F,j,J);else if(Ce==="LineString")ii(Ee,ut,F,j,J,!1,oe.lineMetrics);else if(Ce==="MultiLineString")En(Ee,ut,F,j,J,!1);else if(Ce==="Polygon")En(Ee,ut,F,j,J,!0);else if(Ce==="MultiPolygon")for(var vt=0;vt=F&&he<=j&&(L.push(X[Q]),L.push(X[Q+1]),L.push(X[Q+2]))}}function ii(X,L,F,j,J,Q,he){for(var oe,te,ae=Vn(X),Te=J===0?qo:So,Ee=X.start,Ce=0;CeF&&(te=Te(ae,mt,kt,vt,Ft,F),he&&(ae.start=Ee+oe*te)):gi>j?Ut=F&&(te=Te(ae,mt,kt,vt,Ft,F),ai=!0),Ut>j&&gi<=j&&(te=Te(ae,mt,kt,vt,Ft,j),ai=!0),!Q&&ai&&(he&&(ae.end=Ee+oe*te),L.push(ae),ae=Vn(X)),he&&(Ee+=oe)}var ri=X.length-3;mt=X[ri],kt=X[ri+1],ut=X[ri+2],(gi=J===0?mt:kt)>=F&&gi<=j&&Un(ae,mt,kt,ut),ri=ae.length-3,Q&&ri>=3&&(ae[ri]!==ae[0]||ae[ri+1]!==ae[1])&&Un(ae,ae[0],ae[1],ae[2]),ae.length&&L.push(ae)}function Vn(X){var L=[];return L.size=X.size,L.start=X.start,L.end=X.end,L}function En(X,L,F,j,J,Q){for(var he=0;hehe.maxX&&(he.maxX=Te),Ee>he.maxY&&(he.maxY=Ee)}return he}function Zo(X,L,F,j){var J=L.geometry,Q=L.type,he=[];if(Q==="Point"||Q==="MultiPoint")for(var oe=0;oe0&&L.size<(J?he:j))F.numPoints+=L.length/3;else{for(var oe=[],te=0;tehe)&&(F.numSimplified++,oe.push(L[te]),oe.push(L[te+1])),F.numPoints++;J&&function(ae,Te){for(var Ee=0,Ce=0,mt=ae.length,kt=mt-2;Ce0===Te)for(Ce=0,mt=ae.length;Ce24)throw new Error("maxZoom should be in the 0-24 range");if(L.promoteId&&L.generateId)throw new Error("promoteId and generateId cannot be used together.");var j=function(J,Q){var he=[];if(J.type==="FeatureCollection")for(var oe=0;oe1&&console.time("creation"),Ce=this.tiles[Ee]=er(X,L,F,j,te),this.tileCoords.push({z:L,x:F,y:j}),ae)){ae>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,F,j,Ce.numFeatures,Ce.numPoints,Ce.numSimplified),console.timeEnd("creation"));var mt="z"+L;this.stats[mt]=(this.stats[mt]||0)+1,this.total++}if(Ce.source=X,J){if(L===te.maxZoom||L===J)continue;var kt=1<1&&console.time("clipping");var ut,vt,Ft,gi,Ut,ai,ri=.5*te.buffer/te.extent,jr=.5-ri,Ei=.5+ri,ur=1+ri;ut=vt=Ft=gi=null,Ut=In(X,Te,F-ri,F+Ei,0,Ce.minX,Ce.maxX,te),ai=In(X,Te,F+jr,F+ur,0,Ce.minX,Ce.maxX,te),X=null,Ut&&(ut=In(Ut,Te,j-ri,j+Ei,1,Ce.minY,Ce.maxY,te),vt=In(Ut,Te,j+jr,j+ur,1,Ce.minY,Ce.maxY,te),Ut=null),ai&&(Ft=In(ai,Te,j-ri,j+Ei,1,Ce.minY,Ce.maxY,te),gi=In(ai,Te,j+jr,j+ur,1,Ce.minY,Ce.maxY,te),ai=null),ae>1&&console.timeEnd("clipping"),oe.push(ut||[],L+1,2*F,2*j),oe.push(vt||[],L+1,2*F,2*j+1),oe.push(Ft||[],L+1,2*F+1,2*j),oe.push(gi||[],L+1,2*F+1,2*j+1)}}},We.prototype.getTile=function(X,L,F){var j=this.options,J=j.extent,Q=j.debug;if(X<0||X>24)return null;var he=1<1&&console.log("drilling down to z%d-%d-%d",X,L,F);for(var te,ae=X,Te=L,Ee=F;!te&&ae>0;)ae--,Te=Math.floor(Te/2),Ee=Math.floor(Ee/2),te=this.tiles[Bt(ae,Te,Ee)];return te&&te.source?(Q>1&&console.log("found parent tile z%d-%d-%d",ae,Te,Ee),Q>1&&console.time("drilling down"),this.splitTile(te.source,ae,Te,Ee,X,L,F),Q>1&&console.timeEnd("drilling down"),this.tiles[oe]?qe(this.tiles[oe],J):null):null};class It extends Ie{constructor(L,F,j,J){super(L,F,j),this._dataUpdateable=new Map,this.loadGeoJSON=(Q,he)=>{const{promoteId:oe}=Q;if(Q.request)return s.f(Q.request,(te,ae,Te,Ee)=>{this._dataUpdateable=Ur(ae,oe)?_n(ae,oe):void 0,he(te,ae,Te,Ee)});if(typeof Q.data=="string")try{const te=JSON.parse(Q.data);this._dataUpdateable=Ur(te,oe)?_n(te,oe):void 0,he(null,te)}catch{he(new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`))}else Q.dataDiff?this._dataUpdateable?(function(te,ae,Te){var Ee,Ce,mt,kt;if(ae.removeAll&&te.clear(),ae.remove)for(const ut of ae.remove)te.delete(ut);if(ae.add)for(const ut of ae.add){const vt=Mt(ut,Te);vt!=null&&te.set(vt,ut)}if(ae.update)for(const ut of ae.update){let vt=te.get(ut.id);if(vt==null)continue;const Ft=!ut.removeAllProperties&&(((Ee=ut.removeProperties)===null||Ee===void 0?void 0:Ee.length)>0||((Ce=ut.addOrUpdateProperties)===null||Ce===void 0?void 0:Ce.length)>0);if((ut.newGeometry||ut.removeAllProperties||Ft)&&(vt=Object.assign({},vt),te.set(ut.id,vt),Ft&&(vt.properties=Object.assign({},vt.properties))),ut.newGeometry&&(vt.geometry=ut.newGeometry),ut.removeAllProperties)vt.properties={};else if(((mt=ut.removeProperties)===null||mt===void 0?void 0:mt.length)>0)for(const gi of ut.removeProperties)Object.prototype.hasOwnProperty.call(vt.properties,gi)&&delete vt.properties[gi];if(((kt=ut.addOrUpdateProperties)===null||kt===void 0?void 0:kt.length)>0)for(const{key:gi,value:Ut}of ut.addOrUpdateProperties)vt.properties[gi]=Ut}}(this._dataUpdateable,Q.dataDiff,oe),he(null,{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())})):he(new Error(`Cannot update existing geojson data in ${Q.source}`)):he(new Error(`Input data given to '${Q.source}' is not a valid GeoJSON object.`));return{cancel:()=>{}}},this.loadVectorData=this.loadGeoJSONTile,J&&(this.loadGeoJSON=J)}loadGeoJSONTile(L,F){const j=L.tileID.canonical;if(!this._geoJSONIndex)return F(null,null);const J=this._geoJSONIndex.getTile(j.z,j.x,j.y);if(!J)return F(null,null);const Q=new class{constructor(oe){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=s.N,this.length=oe.length,this._features=oe}feature(oe){return new class{constructor(te){this._feature=te,this.extent=s.N,this.type=te.type,this.properties=te.tags,"id"in te&&!isNaN(te.id)&&(this.id=parseInt(te.id,10))}loadGeometry(){if(this._feature.type===1){const te=[];for(const ae of this._feature.geometry)te.push([new s.P(ae[0],ae[1])]);return te}{const te=[];for(const ae of this._feature.geometry){const Te=[];for(const Ee of ae)Te.push(new s.P(Ee[0],Ee[1]));te.push(Te)}return te}}toGeoJSON(te,ae,Te){return at.call(this,te,ae,Te)}}(this._features[oe])}}(J.features);let he=en(Q);he.byteOffset===0&&he.byteLength===he.buffer.byteLength||(he=new Uint8Array(he)),F(null,{vectorTile:Q,rawData:he.buffer})}loadData(L,F){var j;(j=this._pendingRequest)===null||j===void 0||j.cancel(),this._pendingCallback&&this._pendingCallback(null,{abandoned:!0});const J=!!(L&&L.request&&L.request.collectResourceTiming)&&new s.bu(L.request);this._pendingCallback=F,this._pendingRequest=this.loadGeoJSON(L,(Q,he)=>{if(delete this._pendingCallback,delete this._pendingRequest,Q||!he)return F(Q);if(typeof he!="object")return F(new Error(`Input data given to '${L.source}' is not a valid GeoJSON object.`));{et(he,!0);try{if(L.filter){const te=s.bC(L.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(te.result==="error")throw new Error(te.value.map(Te=>`${Te.key}: ${Te.message}`).join(", "));he={type:"FeatureCollection",features:he.features.filter(Te=>te.value.evaluate({zoom:0},Te))}}this._geoJSONIndex=L.cluster?new Le(function({superclusterOptions:te,clusterProperties:ae}){if(!ae||!te)return te;const Te={},Ee={},Ce={accumulated:null,zoom:0},mt={properties:null},kt=Object.keys(ae);for(const ut of kt){const[vt,Ft]=ae[ut],gi=s.bC(Ft),Ut=s.bC(typeof vt=="string"?[vt,["accumulated"],["get",ut]]:vt);Te[ut]=gi.value,Ee[ut]=Ut.value}return te.map=ut=>{mt.properties=ut;const vt={};for(const Ft of kt)vt[Ft]=Te[Ft].evaluate(Ce,mt);return vt},te.reduce=(ut,vt)=>{mt.properties=vt;for(const Ft of kt)Ce.accumulated=ut[Ft],ut[Ft]=Ee[Ft].evaluate(Ce,mt)},te}(L)).load(he.features):function(te,ae){return new We(te,ae)}(he,L.geojsonVtOptions)}catch(te){return F(te)}this.loaded={};const oe={};if(J){const te=J.finish();te&&(oe.resourceTiming={},oe.resourceTiming[L.source]=JSON.parse(JSON.stringify(te)))}F(null,oe)}})}reloadTile(L,F){const j=this.loaded;return j&&j[L.uid]?super.reloadTile(L,F):this.loadTile(L,F)}removeSource(L,F){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),F()}getClusterExpansionZoom(L,F){try{F(null,this._geoJSONIndex.getClusterExpansionZoom(L.clusterId))}catch(j){F(j)}}getClusterChildren(L,F){try{F(null,this._geoJSONIndex.getChildren(L.clusterId))}catch(j){F(j)}}getClusterLeaves(L,F){try{F(null,this._geoJSONIndex.getLeaves(L.clusterId,L.limit,L.offset))}catch(j){F(j)}}}class Mn{constructor(L){this.self=L,this.actor=new s.C(L,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:Ie,geojson:It},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=(F,j)=>{if(this.workerSourceTypes[F])throw new Error(`Worker source with name "${F}" already registered.`);this.workerSourceTypes[F]=j},this.self.registerRTLTextPlugin=F=>{if(s.bD.isParsed())throw new Error("RTL text plugin already registered.");s.bD.applyArabicShaping=F.applyArabicShaping,s.bD.processBidirectionalText=F.processBidirectionalText,s.bD.processStyledBidirectionalText=F.processStyledBidirectionalText}}setReferrer(L,F){this.referrer=F}setImages(L,F,j){this.availableImages[L]=F;for(const J in this.workerSources[L]){const Q=this.workerSources[L][J];for(const he in Q)Q[he].availableImages=F}j()}setLayers(L,F,j){this.getLayerIndex(L).replace(F),j()}updateLayers(L,F,j){this.getLayerIndex(L).update(F.layers,F.removedIds),j()}loadTile(L,F,j){this.getWorkerSource(L,F.type,F.source).loadTile(F,j)}loadDEMTile(L,F,j){this.getDEMWorkerSource(L,F.source).loadTile(F,j)}reloadTile(L,F,j){this.getWorkerSource(L,F.type,F.source).reloadTile(F,j)}abortTile(L,F,j){this.getWorkerSource(L,F.type,F.source).abortTile(F,j)}removeTile(L,F,j){this.getWorkerSource(L,F.type,F.source).removeTile(F,j)}removeDEMTile(L,F){this.getDEMWorkerSource(L,F.source).removeTile(F)}removeSource(L,F,j){if(!this.workerSources[L]||!this.workerSources[L][F.type]||!this.workerSources[L][F.type][F.source])return;const J=this.workerSources[L][F.type][F.source];delete this.workerSources[L][F.type][F.source],J.removeSource!==void 0?J.removeSource(F,j):j()}loadWorkerSource(L,F,j){try{this.self.importScripts(F.url),j()}catch(J){j(J.toString())}}syncRTLPluginState(L,F,j){try{s.bD.setState(F);const J=s.bD.getPluginURL();if(s.bD.isLoaded()&&!s.bD.isParsed()&&J!=null){this.self.importScripts(J);const Q=s.bD.isParsed();j(Q?void 0:new Error(`RTL Text Plugin failed to import scripts from ${J}`),Q)}}catch(J){j(J.toString())}}getAvailableImages(L){let F=this.availableImages[L];return F||(F=[]),F}getLayerIndex(L){let F=this.layerIndexes[L];return F||(F=this.layerIndexes[L]=new H),F}getWorkerSource(L,F,j){return this.workerSources[L]||(this.workerSources[L]={}),this.workerSources[L][F]||(this.workerSources[L][F]={}),this.workerSources[L][F][j]||(this.workerSources[L][F][j]=new this.workerSourceTypes[F]({send:(J,Q,he)=>{this.actor.send(J,Q,he,L)}},this.getLayerIndex(L),this.getAvailableImages(L))),this.workerSources[L][F][j]}getDEMWorkerSource(L,F){return this.demWorkerSources[L]||(this.demWorkerSources[L]={}),this.demWorkerSources[L][F]||(this.demWorkerSources[L][F]=new De),this.demWorkerSources[L][F]}}return s.i()&&(self.worker=new Mn(self)),Mn}),k(["./shared"],function(s){var H="3.6.2";class V{static testProp(t){if(!V.docStyle)return t[0];for(let n=0;n{window.removeEventListener("click",V.suppressClickInternal,!0)},0)}static mousePos(t,n){const a=t.getBoundingClientRect();return new s.P(n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop)}static touchPos(t,n){const a=t.getBoundingClientRect(),c=[];for(let d=0;d{t=[],n=0,a=0,c={}},u.addThrottleControl=C=>{const A=a++;return c[A]=C,A},u.removeThrottleControl=C=>{delete c[C],b()},u.getImage=(C,A,P=!0)=>{ge.supported&&(C.headers||(C.headers={}),C.headers.accept="image/webp,*/*");const R={requestParameters:C,supportImageRefresh:P,callback:A,cancelled:!1,completed:!1,cancel:()=>{R.completed||R.cancelled||(R.cancelled=!0,R.innerRequest&&(R.innerRequest.cancel(),n--),b())}};return t.push(R),b(),R};const d=C=>{const{requestParameters:A,supportImageRefresh:P,callback:R}=C;return s.e(A,{type:"image"}),(P!==!1||s.i()||s.g(A.url)||A.headers&&!Object.keys(A.headers).reduce((W,G)=>W&&G==="accept",!0)?s.m:S)(A,(W,G,K,q)=>{x(C,R,W,G,K,q)})},x=(C,A,P,R,W,G)=>{P?A(P):R instanceof HTMLImageElement||s.a(R)?A(null,R):R&&((K,q)=>{typeof createImageBitmap=="function"?s.b(K,q):s.d(K,q)})(R,(K,q)=>{K!=null?A(K):q!=null&&A(null,q,{cacheControl:W,expires:G})}),C.cancelled||(C.completed=!0,n--,b())},b=()=>{const C=(()=>{const A=Object.keys(c);let P=!1;if(A.length>0){for(const R of A)if(P=c[R](),P)break}return P})()?s.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:s.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let A=n;A0;A++){const P=t.shift();if(P.cancelled){A--;continue}const R=d(P);n++,P.innerRequest=R}},S=(C,A)=>{const P=new Image,R=C.url;let W=!1;const G=C.credentials;return G&&G==="include"?P.crossOrigin="use-credentials":(G&&G==="same-origin"||!s.s(R))&&(P.crossOrigin="anonymous"),P.fetchPriority="high",P.onload=()=>{A(null,P),P.onerror=P.onload=null},P.onerror=()=>{W||A(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.")),P.onerror=P.onload=null},P.src=R,{cancel:()=>{W=!0,P.src=""}}}}(Ne||(Ne={})),Ne.resetRequestQueue(),function(u){u.Glyphs="Glyphs",u.Image="Image",u.Source="Source",u.SpriteImage="SpriteImage",u.SpriteJSON="SpriteJSON",u.Style="Style",u.Tile="Tile",u.Unknown="Unknown"}(et||(et={}));class at{constructor(t){this._transformRequestFn=t}transformRequest(t,n){return this._transformRequestFn&&this._transformRequestFn(t,n)||{url:t}}normalizeSpriteURL(t,n,a){const c=function(d){const x=d.match(nt);if(!x)throw new Error(`Unable to parse URL "${d}"`);return{protocol:x[1],authority:x[2],path:x[3]||"/",params:x[4]?x[4].split("&"):[]}}(t);return c.path+=`${n}${a}`,function(d){const x=d.params.length?`?${d.params.join("&")}`:"";return`${d.protocol}://${d.authority}${d.path}${x}`}(c)}setTransformRequest(t){this._transformRequestFn=t}}const nt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function it(u){var t=new s.A(3);return t[0]=u[0],t[1]=u[1],t[2]=u[2],t}var Vt,ti=function(u,t,n){return u[0]=t[0]-n[0],u[1]=t[1]-n[1],u[2]=t[2]-n[2],u};Vt=new s.A(3),s.A!=Float32Array&&(Vt[0]=0,Vt[1]=0,Vt[2]=0);var Xt=function(u){var t=u[0],n=u[1];return t*t+n*n};function Nt(u){const t=[];if(typeof u=="string")t.push({id:"default",url:u});else if(u&&u.length>0){const n=[];for(const{id:a,url:c}of u){const d=`${a}${c}`;n.indexOf(d)===-1&&(n.push(d),t.push({id:a,url:c}))}}return t}function Yt(u,t,n,a,c){if(a)return void u(a);if(c!==Object.values(t).length||c!==Object.values(n).length)return;const d={};for(const x in t){d[x]={};const b=s.h.getImageCanvasContext(n[x]),S=t[x];for(const C in S){const{width:A,height:P,x:R,y:W,sdf:G,pixelRatio:K,stretchX:q,stretchY:le,content:me}=S[C];d[x][C]={data:null,pixelRatio:K,sdf:G,stretchX:q,stretchY:le,content:me,spriteData:{width:A,height:P,x:R,y:W,context:b}}}}u(null,d)}(function(){var u=new s.A(2);s.A!=Float32Array&&(u[0]=0,u[1]=0)})();class At{constructor(t,n,a,c){this.context=t,this.format=a,this.texture=t.gl.createTexture(),this.update(n,c)}update(t,n,a){const{width:c,height:d}=t,x=!(this.size&&this.size[0]===c&&this.size[1]===d||a),{context:b}=this,{gl:S}=b;if(this.useMipmap=!!(n&&n.useMipmap),S.bindTexture(S.TEXTURE_2D,this.texture),b.pixelStoreUnpackFlipY.set(!1),b.pixelStoreUnpack.set(1),b.pixelStoreUnpackPremultiplyAlpha.set(this.format===S.RGBA&&(!n||n.premultiply!==!1)),x)this.size=[c,d],t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||s.a(t)?S.texImage2D(S.TEXTURE_2D,0,this.format,this.format,S.UNSIGNED_BYTE,t):S.texImage2D(S.TEXTURE_2D,0,this.format,c,d,0,this.format,S.UNSIGNED_BYTE,t.data);else{const{x:C,y:A}=a||{x:0,y:0};t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageData||s.a(t)?S.texSubImage2D(S.TEXTURE_2D,0,C,A,S.RGBA,S.UNSIGNED_BYTE,t):S.texSubImage2D(S.TEXTURE_2D,0,C,A,c,d,S.RGBA,S.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&S.generateMipmap(S.TEXTURE_2D)}bind(t,n,a){const{context:c}=this,{gl:d}=c;d.bindTexture(d.TEXTURE_2D,this.texture),a!==d.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=d.LINEAR),t!==this.filter&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,t),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,a||t),this.filter=t),n!==this.wrap&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,n),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,n),this.wrap=n)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:t}=this.context;t.deleteTexture(this.texture),this.texture=null}}function ke(u){const{userImage:t}=u;return!!(t&&t.render&&t.render())&&(u.data.replace(new Uint8Array(t.data.buffer)),!0)}class Ge extends s.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new s.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(t){if(this.loaded!==t&&(this.loaded=t,t)){for(const{ids:n,callback:a}of this.requestors)this._notify(n,a);this.requestors=[]}}getImage(t){const n=this.images[t];if(n&&!n.data&&n.spriteData){const a=n.spriteData;n.data=new s.R({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),n.spriteData=null}return n}addImage(t,n){if(this.images[t])throw new Error(`Image id ${t} already exist, use updateImage instead`);this._validate(t,n)&&(this.images[t]=n)}_validate(t,n){let a=!0;const c=n.data||n.spriteData;return this._validateStretch(n.stretchX,c&&c.width)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "stretchX" value`))),a=!1),this._validateStretch(n.stretchY,c&&c.height)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "stretchY" value`))),a=!1),this._validateContent(n.content,n)||(this.fire(new s.j(new Error(`Image "${t}" has invalid "content" value`))),a=!1),a}_validateStretch(t,n){if(!t)return!0;let a=0;for(const c of t){if(c[0]-1);S++,d[S]=b,x[S]=C,x[S+1]=Ui}for(let b=0,S=0;b{let b=this.entries[c];b||(b=this.entries[c]={glyphs:{},requests:{},ranges:{}});let S=b.glyphs[d];if(S!==void 0)return void x(null,{stack:c,id:d,glyph:S});if(S=this._tinySDF(b,c,d),S)return b.glyphs[d]=S,void x(null,{stack:c,id:d,glyph:S});const C=Math.floor(d/256);if(256*C>65535)return void x(new Error("glyphs > 65535 not supported"));if(b.ranges[C])return void x(null,{stack:c,id:d,glyph:S});if(!this.url)return void x(new Error("glyphsUrl is not set"));let A=b.requests[C];A||(A=b.requests[C]=[],Lt.loadGlyphRange(c,C,this.url,this.requestManager,(P,R)=>{if(R){for(const W in R)this._doesCharSupportLocalGlyph(+W)||(b.glyphs[+W]=R[+W]);b.ranges[C]=!0}for(const W of A)W(P,R);delete b.requests[C]})),A.push((P,R)=>{P?x(P):R&&x(null,{stack:c,id:d,glyph:R[d]||null})})},(c,d)=>{if(c)n(c);else if(d){const x={};for(const{stack:b,id:S,glyph:C}of d)(x[b]||(x[b]={}))[S]=C&&{id:C.id,bitmap:C.bitmap.clone(),metrics:C.metrics};n(null,x)}})}_doesCharSupportLocalGlyph(t){return!!this.localIdeographFontFamily&&(s.u["CJK Unified Ideographs"](t)||s.u["Hangul Syllables"](t)||s.u.Hiragana(t)||s.u.Katakana(t))}_tinySDF(t,n,a){const c=this.localIdeographFontFamily;if(!c||!this._doesCharSupportLocalGlyph(a))return;let d=t.tinySDF;if(!d){let b="400";/bold/i.test(n)?b="900":/medium/i.test(n)?b="500":/light/i.test(n)&&(b="200"),d=t.tinySDF=new Lt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:c,fontWeight:b})}const x=d.draw(String.fromCharCode(a));return{id:a,bitmap:new s.q({width:x.width||60,height:x.height||60},x.data),metrics:{width:x.glyphWidth/2||24,height:x.glyphHeight/2||24,left:x.glyphLeft/2+.5||0,top:x.glyphTop/2-27.5||-8,advance:x.glyphAdvance/2||24,isDoubleResolution:!0}}}}Lt.loadGlyphRange=function(u,t,n,a,c){const d=256*t,x=d+255,b=a.transformRequest(n.replace("{fontstack}",u).replace("{range}",`${d}-${x}`),et.Glyphs);s.l(b,(S,C)=>{if(S)c(S);else if(C){const A={};for(const P of s.n(C))A[P.id]=P;c(null,A)}})},Lt.TinySDF=class{constructor({fontSize:u=24,buffer:t=3,radius:n=8,cutoff:a=.25,fontFamily:c="sans-serif",fontWeight:d="normal",fontStyle:x="normal"}={}){this.buffer=t,this.cutoff=a,this.radius=n;const b=this.size=u+4*t,S=this._createCanvas(b),C=this.ctx=S.getContext("2d",{willReadFrequently:!0});C.font=`${x} ${d} ${u}px ${c}`,C.textBaseline="alphabetic",C.textAlign="left",C.fillStyle="black",this.gridOuter=new Float64Array(b*b),this.gridInner=new Float64Array(b*b),this.f=new Float64Array(b),this.z=new Float64Array(b+1),this.v=new Uint16Array(b)}_createCanvas(u){const t=document.createElement("canvas");return t.width=t.height=u,t}draw(u){const{width:t,actualBoundingBoxAscent:n,actualBoundingBoxDescent:a,actualBoundingBoxLeft:c,actualBoundingBoxRight:d}=this.ctx.measureText(u),x=Math.ceil(n),b=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-c))),S=Math.min(this.size-this.buffer,x+Math.ceil(a)),C=b+2*this.buffer,A=S+2*this.buffer,P=Math.max(C*A,0),R=new Uint8ClampedArray(P),W={data:R,width:C,height:A,glyphWidth:b,glyphHeight:S,glyphTop:x,glyphLeft:0,glyphAdvance:t};if(b===0||S===0)return W;const{ctx:G,buffer:K,gridInner:q,gridOuter:le}=this;G.clearRect(K,K,b,S),G.fillText(u,K,K+x);const me=G.getImageData(K,K,b,S);le.fill(Ui,0,P),q.fill(0,0,P);for(let ee=0;ee0?Me*Me:0,q[xe]=Me<0?Me*Me:0}}Dt(le,0,0,C,A,C,this.f,this.v,this.z),Dt(q,K,K,b,S,C,this.f,this.v,this.z);for(let ee=0;ee1&&(S=t[++b]);const A=Math.abs(C-S.left),P=Math.abs(C-S.right),R=Math.min(A,P);let W;const G=d/a*(c+1);if(S.isDash){const K=c-Math.abs(G);W=Math.sqrt(R*R+K*K)}else W=c-Math.sqrt(R*R+G*G);this.data[x+C]=Math.max(0,Math.min(255,W+128))}}}addRegularDash(t){for(let b=t.length-1;b>=0;--b){const S=t[b],C=t[b+1];S.zeroLength?t.splice(b,1):C&&C.isDash===S.isDash&&(C.left=S.left,t.splice(b,1))}const n=t[0],a=t[t.length-1];n.isDash===a.isDash&&(n.left=a.left-this.width,a.right=n.right+this.width);const c=this.width*this.nextRow;let d=0,x=t[d];for(let b=0;b1&&(x=t[++d]);const S=Math.abs(b-x.left),C=Math.abs(b-x.right),A=Math.min(S,C);this.data[c+b]=Math.max(0,Math.min(255,(x.isDash?A:-A)+128))}}addDash(t,n){const a=n?7:0,c=2*a+1;if(this.nextRow+c>this.height)return s.w("LineAtlas out of space"),null;let d=0;for(let b=0;b{c.send(t,n,d)},a=a||function(){})}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(t=!0){this.actors.forEach(n=>{n.remove()}),this.actors=[],t&&this.workerPool.release(this.id)}}function Ti(u,t,n){const a=function(c,d){if(c)return n(c);if(d){const x=s.F(s.e(d,u),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);d.vector_layers&&(x.vectorLayers=d.vector_layers,x.vectorLayerIds=x.vectorLayers.map(b=>b.id)),n(null,x)}};return u.url?s.f(t.transformRequest(u.url,et.Source),a):s.h.frame(()=>a(null,u))}class Tt{constructor(t,n){t&&(n?this.setSouthWest(t).setNorthEast(n):Array.isArray(t)&&(t.length===4?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1])))}setNorthEast(t){return this._ne=t instanceof s.L?new s.L(t.lng,t.lat):s.L.convert(t),this}setSouthWest(t){return this._sw=t instanceof s.L?new s.L(t.lng,t.lat):s.L.convert(t),this}extend(t){const n=this._sw,a=this._ne;let c,d;if(t instanceof s.L)c=t,d=t;else{if(!(t instanceof Tt))return Array.isArray(t)?t.length===4||t.every(Array.isArray)?this.extend(Tt.convert(t)):this.extend(s.L.convert(t)):t&&("lng"in t||"lon"in t)&&"lat"in t?this.extend(s.L.convert(t)):this;if(c=t._sw,d=t._ne,!c||!d)return this}return n||a?(n.lng=Math.min(c.lng,n.lng),n.lat=Math.min(c.lat,n.lat),a.lng=Math.max(d.lng,a.lng),a.lat=Math.max(d.lat,a.lat)):(this._sw=new s.L(c.lng,c.lat),this._ne=new s.L(d.lng,d.lat)),this}getCenter(){return new s.L((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 s.L(this.getWest(),this.getNorth())}getSouthEast(){return new s.L(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(t){const{lng:n,lat:a}=s.L.convert(t);let c=this._sw.lng<=n&&n<=this._ne.lng;return this._sw.lng>this._ne.lng&&(c=this._sw.lng>=n&&n>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&c}static convert(t){return t instanceof Tt?t:t&&new Tt(t)}static fromLngLat(t,n=0){const a=360*n/40075017,c=a/Math.cos(Math.PI/180*t.lat);return new Tt(new s.L(t.lng-c,t.lat-a),new s.L(t.lng+c,t.lat+a))}}class pi{constructor(t,n,a){this.bounds=Tt.convert(this.validateBounds(t)),this.minzoom=n||0,this.maxzoom=a||24}validateBounds(t){return Array.isArray(t)&&t.length===4?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]}contains(t){const n=Math.pow(2,t.z),a=Math.floor(s.G(this.bounds.getWest())*n),c=Math.floor(s.H(this.bounds.getNorth())*n),d=Math.ceil(s.G(this.bounds.getEast())*n),x=Math.ceil(s.H(this.bounds.getSouth())*n);return t.x>=a&&t.x=c&&t.y{this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=Ti(this._options,this.map._requestManager,(d,x)=>{this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),d?this.fire(new s.j(d)):x&&(s.e(this,x),x.bounds&&(this.tileBounds=new pi(x.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))})},this.serialize=()=>s.e({},this._options),this.id=t,this.dispatcher=a,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,s.e(this,s.F(n,["url","scheme","tileSize","promoteId"])),this._options=s.e({type:"vector"},n),this._collectResourceTiming=n.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(c)}loaded(){return this._loaded}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}onAdd(t){this.map=t,this.load()}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}setUrl(t){return this.setSourceProperty(()=>{this.url=t,this._options.url=t}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c={request:this.map._requestManager.transformRequest(a,et.Tile),uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,tileSize:this.tileSize*t.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function d(x,b){return delete t.request,t.aborted?n(null):x&&x.status!==404?n(x):(b&&b.resourceTiming&&(t.resourceTiming=b.resourceTiming),this.map._refreshExpiredTiles&&b&&t.setExpiryData(b),t.loadVectorData(b,this.map.painter),n(null),void(t.reloadCallback&&(this.loadTile(t,t.reloadCallback),t.reloadCallback=null)))}c.request.collectResourceTiming=this._collectResourceTiming,t.actor&&t.state!=="expired"?t.state==="loading"?t.reloadCallback=n:t.request=t.actor.send("reloadTile",c,d.bind(this)):(t.actor=this.dispatcher.getActor(),t.request=t.actor.send("loadTile",c,d.bind(this)))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)}unloadTile(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)}hasTransition(){return!1}}class Le extends s.E{constructor(t,n,a,c){super(),this.id=t,this.dispatcher=a,this.setEventedParent(c),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=s.e({type:"raster"},n),s.e(this,s.F(n,["url","scheme","tileSize"]))}load(){this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this._tileJSONRequest=Ti(this._options,this.map._requestManager,(t,n)=>{this._tileJSONRequest=null,this._loaded=!0,t?this.fire(new s.j(t)):n&&(s.e(this,n),n.bounds&&(this.tileBounds=new pi(n.bounds,this.minzoom,this.maxzoom)),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})))})}loaded(){return this._loaded}onAdd(t){this.map=t,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)}setSourceProperty(t){this._tileJSONRequest&&this._tileJSONRequest.cancel(),t(),this.load()}setTiles(t){return this.setSourceProperty(()=>{this._options.tiles=t}),this}serialize(){return s.e({},this._options)}hasTile(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);t.request=Ne.getImage(this.map._requestManager.transformRequest(a,et.Tile),(c,d,x)=>{if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(c)t.state="errored",n(c);else if(d){this.map._refreshExpiredTiles&&x&&t.setExpiryData(x);const b=this.map.painter.context,S=b.gl;t.texture=this.map.painter.getTileTexture(d.width),t.texture?t.texture.update(d,{useMipmap:!0}):(t.texture=new At(b,d,S.RGBA,{useMipmap:!0}),t.texture.bind(S.LINEAR,S.CLAMP_TO_EDGE,S.LINEAR_MIPMAP_NEAREST),b.extTextureFilterAnisotropic&&S.texParameterf(S.TEXTURE_2D,b.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,b.extTextureFilterAnisotropicMax)),t.state="loaded",n(null)}},this.map._refreshExpiredTiles)}abortTile(t,n){t.request&&(t.request.cancel(),delete t.request),n()}unloadTile(t,n){t.texture&&this.map.painter.saveTileTexture(t.texture),n()}hasTransition(){return!1}}class Pt extends Le{constructor(t,n,a,c){super(t,n,a,c),this.type="raster-dem",this.maxzoom=22,this._options=s.e({type:"raster-dem"},n),this.encoding=n.encoding||"mapbox",this.redFactor=n.redFactor,this.greenFactor=n.greenFactor,this.blueFactor=n.blueFactor,this.baseShift=n.baseShift}loadTile(t,n){const a=t.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),c=this.map._requestManager.transformRequest(a,et.Tile);function d(x,b){x&&(t.state="errored",n(x)),b&&(t.dem=b,t.needsHillshadePrepare=!0,t.needsTerrainPrepare=!0,t.state="loaded",n(null))}t.neighboringTiles=this._getNeighboringTiles(t.tileID),t.request=Ne.getImage(c,(x,b,S)=>s._(this,void 0,void 0,function*(){if(delete t.request,t.aborted)t.state="unloaded",n(null);else if(x)t.state="errored",n(x);else if(b){this.map._refreshExpiredTiles&&t.setExpiryData(S);const C=s.a(b)&&s.J()?b:yield function(P){return s._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&s.K()){const R=P.width+2,W=P.height+2;try{return new s.R({width:R,height:W},yield s.M(P,-1,-1,R,W))}catch{}}return s.h.getImageData(P,1)})}(b),A={uid:t.uid,coord:t.tileID,source:this.id,rawImageData:C,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};t.actor&&t.state!=="expired"||(t.actor=this.dispatcher.getActor(),t.actor.send("loadDEMTile",A,d))}}),this.map._refreshExpiredTiles)}_getNeighboringTiles(t){const n=t.canonical,a=Math.pow(2,n.z),c=(n.x-1+a)%a,d=n.x===0?t.wrap-1:t.wrap,x=(n.x+1+a)%a,b=n.x+1===a?t.wrap+1:t.wrap,S={};return S[new s.O(t.overscaledZ,d,n.z,c,n.y).key]={backfilled:!1},S[new s.O(t.overscaledZ,b,n.z,x,n.y).key]={backfilled:!1},n.y>0&&(S[new s.O(t.overscaledZ,d,n.z,c,n.y-1).key]={backfilled:!1},S[new s.O(t.overscaledZ,t.wrap,n.z,n.x,n.y-1).key]={backfilled:!1},S[new s.O(t.overscaledZ,b,n.z,x,n.y-1).key]={backfilled:!1}),n.y+1{this._updateWorkerData()},this.serialize=()=>s.e({},this._options,{type:this.type,data:this._data}),this.id=t,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=a.getActor(),this.setEventedParent(c),this._data=n.data,this._options=s.e({},n),this._collectResourceTiming=n.collectResourceTiming,n.maxzoom!==void 0&&(this.maxzoom=n.maxzoom),n.type&&(this.type=n.type),n.attribution&&(this.attribution=n.attribution),this.promoteId=n.promoteId;const d=s.N/this.tileSize;this.workerOptions=s.e({source:this.id,cluster:n.cluster||!1,geojsonVtOptions:{buffer:(n.buffer!==void 0?n.buffer:128)*d,tolerance:(n.tolerance!==void 0?n.tolerance:.375)*d,extent:s.N,maxZoom:this.maxzoom,lineMetrics:n.lineMetrics||!1,generateId:n.generateId||!1},superclusterOptions:{maxZoom:n.clusterMaxZoom!==void 0?n.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,n.clusterMinPoints||2),extent:s.N,radius:(n.clusterRadius||50)*d,log:!1,generateId:n.generateId||!1},clusterProperties:n.clusterProperties,filter:n.filter},n.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}onAdd(t){this.map=t,this.load()}setData(t){return this._data=t,this._updateWorkerData(),this}updateData(t){return this._updateWorkerData(t),this}setClusterOptions(t){return this.workerOptions.cluster=t.cluster,t&&(t.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=t.clusterRadius),t.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=t.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(t,n){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},n),this}getClusterChildren(t,n){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},n),this}getClusterLeaves(t,n,a,c){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:n,offset:a},c),this}_updateWorkerData(t){const n=s.e({},this.workerOptions);t?n.dataDiff=t:typeof this._data=="string"?(n.request=this.map._requestManager.transformRequest(s.h.resolveURL(this._data),et.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new s.k("dataloading",{dataType:"source"})),this.actor.send(`${this.type}.loadData`,n,(a,c)=>{if(this._pendingLoads--,this._removed||c&&c.abandoned)return void this.fire(new s.k("dataabort",{dataType:"source"}));let d=null;if(c&&c.resourceTiming&&c.resourceTiming[this.id]&&(d=c.resourceTiming[this.id].slice(0)),a)return void this.fire(new s.j(a));const x={dataType:"source"};this._collectResourceTiming&&d&&d.length>0&&s.e(x,{resourceTiming:d}),this.fire(new s.k("data",Object.assign(Object.assign({},x),{sourceDataType:"metadata"}))),this.fire(new s.k("data",Object.assign(Object.assign({},x),{sourceDataType:"content"})))})}loaded(){return this._pendingLoads===0}loadTile(t,n){const a=t.actor?"reloadTile":"loadTile";t.actor=this.actor;const c={type:this.type,uid:t.uid,tileID:t.tileID,zoom:t.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};t.request=this.actor.send(a,c,(d,x)=>(delete t.request,t.unloadVectorData(),t.aborted?n(null):d?n(d):(t.loadVectorData(x,this.map.painter,a==="reloadTile"),n(null))))}abortTile(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0}unloadTile(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})}onRemove(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})}hasTransition(){return!1}}var Gt=s.Q([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class ct extends s.E{constructor(t,n,a,c){super(),this.load=(d,x)=>{this._loaded=!1,this.fire(new s.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=Ne.getImage(this.map._requestManager.transformRequest(this.url,et.Image),(b,S)=>{this._request=null,this._loaded=!0,b?this.fire(new s.j(b)):S&&(this.image=S,d&&(this.coordinates=d),x&&x(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||!this.image)return;const d=this.map.painter.context,x=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,Gt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture||(this.texture=new At(d,this.image,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let b=!1;for(const S in this.tiles){const C=this.tiles[S];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture,b=!0)}b&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"image",url:this.options.url,coordinates:this.coordinates}),this.id=t,this.dispatcher=a,this.coordinates=n.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(c),this.options=n}loaded(){return this._loaded}updateImage(t){return t.url?(this._request&&(this._request.cancel(),this._request=null),this.options.url=t.url,this.load(t.coordinates,()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new s.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(t){this.map=t,this.load()}onRemove(){this._request&&(this._request.cancel(),this._request=null)}setCoordinates(t){this.coordinates=t;const n=t.map(s.U.fromLngLat);this.tileID=function(c){let d=1/0,x=1/0,b=-1/0,S=-1/0;for(const R of c)d=Math.min(d,R.x),x=Math.min(x,R.y),b=Math.max(b,R.x),S=Math.max(S,R.y);const C=Math.max(b-d,S-x),A=Math.max(0,Math.floor(-Math.log(C)/Math.LN2)),P=Math.pow(2,A);return new s.W(A,Math.floor((d+b)/2*P),Math.floor((x+S)/2*P))}(n),this.minzoom=this.maxzoom=this.tileID.z;const a=n.map(c=>this.tileID.getTilePoint(c)._round());return this._boundsArray=new s.V,this._boundsArray.emplaceBack(a[0].x,a[0].y,0,0),this._boundsArray.emplaceBack(a[1].x,a[1].y,s.N,0),this._boundsArray.emplaceBack(a[3].x,a[3].y,0,s.N),this._boundsArray.emplaceBack(a[2].x,a[2].y,s.N,s.N),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new s.k("data",{dataType:"source",sourceDataType:"content"})),this}loadTile(t,n){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},n(null)):(t.state="errored",n(null))}hasTransition(){return!1}}class Zi extends ct{constructor(t,n,a,c){super(t,n,a,c),this.load=()=>{this._loaded=!1;const d=this.options;this.urls=[];for(const x of d.urls)this.urls.push(this.map._requestManager.transformRequest(x,et.Source).url);s.X(this.urls,(x,b)=>{this._loaded=!0,x?this.fire(new s.j(x)):b&&(this.video=b,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading())})},this.prepare=()=>{if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const d=this.map.painter.context,x=d.gl;this.boundsBuffer||(this.boundsBuffer=d.createVertexBuffer(this._boundsArray,Gt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE),x.texSubImage2D(x.TEXTURE_2D,0,0,0,x.RGBA,x.UNSIGNED_BYTE,this.video)):(this.texture=new At(d,this.video,x.RGBA),this.texture.bind(x.LINEAR,x.CLAMP_TO_EDGE));let b=!1;for(const S in this.tiles){const C=this.tiles[S];C.state!=="loaded"&&(C.state="loaded",C.texture=this.texture,b=!0)}b&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"video",urls:this.urls,coordinates:this.coordinates}),this.roundZoom=!0,this.type="video",this.options=n}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(t){if(this.video){const n=this.video.seekable;tn.end(0)?this.fire(new s.j(new s.Y(`sources.${this.id}`,null,`Playback for this video can be set only between the ${n.start(0)} and ${n.end(0)}-second mark.`))):this.video.currentTime=t}}getVideo(){return this.video}onAdd(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}hasTransition(){return this.video&&!this.video.paused}}class _r extends ct{constructor(t,n,a,c){super(t,n,a,c),this.load=()=>{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 s.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())},this.prepare=()=>{let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const x=this.map.painter.context,b=x.gl;this.boundsBuffer||(this.boundsBuffer=x.createVertexBuffer(this._boundsArray,Gt.members)),this.boundsSegments||(this.boundsSegments=s.S.simpleSegment(0,0,4,2)),this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new At(x,this.canvas,b.RGBA,{premultiply:!0});let S=!1;for(const C in this.tiles){const A=this.tiles[C];A.state!=="loaded"&&(A.state="loaded",A.texture=this.texture,S=!0)}S&&this.fire(new s.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))},this.serialize=()=>({type:"canvas",coordinates:this.coordinates}),n.coordinates?Array.isArray(n.coordinates)&&n.coordinates.length===4&&!n.coordinates.some(d=>!Array.isArray(d)||d.length!==2||d.some(x=>typeof x!="number"))||this.fire(new s.j(new s.Y(`sources.${t}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new s.j(new s.Y(`sources.${t}`,null,'missing required property "coordinates"'))),n.animate&&typeof n.animate!="boolean"&&this.fire(new s.j(new s.Y(`sources.${t}`,null,'optional "animate" property must be a boolean value'))),n.canvas?typeof n.canvas=="string"||n.canvas instanceof HTMLCanvasElement||this.fire(new s.j(new s.Y(`sources.${t}`,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 s.j(new s.Y(`sources.${t}`,null,'missing required property "canvas"'))),this.options=n,this.animate=n.animate===void 0||n.animate}getCanvas(){return this.canvas}onAdd(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const t of[this.canvas.width,this.canvas.height])if(isNaN(t)||t<=0)return!0;return!1}}const Ue={},Bi=u=>{switch(u){case"geojson":return He;case"image":return ct;case"raster":return Le;case"raster-dem":return Pt;case"vector":return Oi;case"video":return Zi;case"canvas":return _r}return Ue[u]};function gr(u,t){const n=s.Z();return s.$(n,n,[1,1,0]),s.a0(n,n,[.5*u.width,.5*u.height,1]),s.a1(n,n,u.calculatePosMatrix(t.toUnwrapped()))}function ui(u,t,n,a,c,d){const x=function(P,R,W){if(P)for(const G of P){const K=R[G];if(K&&K.source===W&&K.type==="fill-extrusion")return!0}else for(const G in R){const K=R[G];if(K.source===W&&K.type==="fill-extrusion")return!0}return!1}(c&&c.layers,t,u.id),b=d.maxPitchScaleFactor(),S=u.tilesIn(a,b,x);S.sort(co);const C=[];for(const P of S)C.push({wrappedTileID:P.tileID.wrapped().key,queryResults:P.tile.queryRenderedFeatures(t,n,u._state,P.queryGeometry,P.cameraQueryGeometry,P.scale,c,d,b,gr(u.transform,P.tileID))});const A=function(P){const R={},W={};for(const G of P){const K=G.queryResults,q=G.wrappedTileID,le=W[q]=W[q]||{};for(const me in K){const ee=K[me],ce=le[me]=le[me]||{},ve=R[me]=R[me]||[];for(const xe of ee)ce[xe.featureIndex]||(ce[xe.featureIndex]=!0,ve.push(xe))}}return R}(C);for(const P in A)A[P].forEach(R=>{const W=R.feature,G=u.getFeatureState(W.layer["source-layer"],W.id);W.source=W.layer.source,W.layer["source-layer"]&&(W.sourceLayer=W.layer["source-layer"]),W.state=G});return A}function co(u,t){const n=u.tileID,a=t.tileID;return n.overscaledZ-a.overscaledZ||n.canonical.y-a.canonical.y||n.wrap-a.wrap||n.canonical.x-a.canonical.x}class wo{constructor(t,n){this.timeAdded=0,this.fadeEndTime=0,this.tileID=t,this.uid=s.a2(),this.uses=0,this.tileSize=n,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(t){const n=t+this.timeAdded;nd.getLayer(C)).filter(Boolean);if(S.length!==0){b.layers=S,b.stateDependentLayerIds&&(b.stateDependentLayers=b.stateDependentLayerIds.map(C=>S.filter(A=>A.id===C)[0]));for(const C of S)x[C.id]=b}}return x}(t.buckets,n.style),this.hasSymbolBuckets=!1;for(const c in this.buckets){const d=this.buckets[c];if(d instanceof s.a4){if(this.hasSymbolBuckets=!0,!a)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const c in this.buckets){const d=this.buckets[c];if(d instanceof s.a4&&d.hasRTLText){this.hasRTLText=!0,s.a5();break}}this.queryPadding=0;for(const c in this.buckets){const d=this.buckets[c];this.queryPadding=Math.max(this.queryPadding,n.style.getLayer(c).queryRadius(d))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new s.a3}unloadVectorData(){for(const t in this.buckets)this.buckets[t].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(t){return this.buckets[t.id]}upload(t){for(const a in this.buckets){const c=this.buckets[a];c.uploadPending()&&c.upload(t)}const n=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new At(t,this.imageAtlas.image,n.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new At(t,this.glyphAtlasImage,n.ALPHA),this.glyphAtlasImage=null)}prepare(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)}queryRenderedFeatures(t,n,a,c,d,x,b,S,C,A){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:c,cameraQueryGeometry:d,scale:x,tileSize:this.tileSize,pixelPosMatrix:A,transform:S,params:b,queryPadding:this.queryPadding*C},t,n,a):{}}querySourceFeatures(t,n){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const c=a.loadVTLayers(),d=n&&n.sourceLayer?n.sourceLayer:"",x=c._geojsonTileLayer||c[d];if(!x)return;const b=s.a6(n&&n.filter),{z:S,x:C,y:A}=this.tileID.canonical,P={z:S,x:C,y:A};for(let R=0;Ra)c=!1;else if(n)if(this.expirationTime{this.remove(t,d)},a)),this.data[c].push(d),this.order.push(c),this.order.length>this.max){const x=this._getAndRemoveByKey(this.order[0]);x&&this.onRemove(x)}return this}has(t){return t.wrapped().key in this.data}getAndRemove(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null}_getAndRemoveByKey(t){const n=this.data[t].shift();return n.timeout&&clearTimeout(n.timeout),this.data[t].length===0&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),n.value}getByKey(t){const n=this.data[t];return n?n[0].value:null}get(t){return this.has(t)?this.data[t.wrapped().key][0].value:null}remove(t,n){if(!this.has(t))return this;const a=t.wrapped().key,c=n===void 0?0:this.data[a].indexOf(n),d=this.data[a][c];return this.data[a].splice(c,1),d.timeout&&clearTimeout(d.timeout),this.data[a].length===0&&delete this.data[a],this.onRemove(d.value),this.order.splice(this.order.indexOf(a),1),this}setMaxSize(t){for(this.max=t;this.order.length>this.max;){const n=this._getAndRemoveByKey(this.order[0]);n&&this.onRemove(n)}return this}filter(t){const n=[];for(const a in this.data)for(const c of this.data[a])t(c.value)||n.push(c);for(const a of n)this.remove(a.value.tileID,a)}}class Se{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(t,n,a){const c=String(n);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][c]=this.stateChanges[t][c]||{},s.e(this.stateChanges[t][c],a),this.deletedStates[t]===null){this.deletedStates[t]={};for(const d in this.state[t])d!==c&&(this.deletedStates[t][d]=null)}else if(this.deletedStates[t]&&this.deletedStates[t][c]===null){this.deletedStates[t][c]={};for(const d in this.state[t][c])a[d]||(this.deletedStates[t][c][d]=null)}else for(const d in a)this.deletedStates[t]&&this.deletedStates[t][c]&&this.deletedStates[t][c][d]===null&&delete this.deletedStates[t][c][d]}removeFeatureState(t,n,a){if(this.deletedStates[t]===null)return;const c=String(n);if(this.deletedStates[t]=this.deletedStates[t]||{},a&&n!==void 0)this.deletedStates[t][c]!==null&&(this.deletedStates[t][c]=this.deletedStates[t][c]||{},this.deletedStates[t][c][a]=null);else if(n!==void 0)if(this.stateChanges[t]&&this.stateChanges[t][c])for(a in this.deletedStates[t][c]={},this.stateChanges[t][c])this.deletedStates[t][c][a]=null;else this.deletedStates[t][c]=null;else this.deletedStates[t]=null}getState(t,n){const a=String(n),c=s.e({},(this.state[t]||{})[a],(this.stateChanges[t]||{})[a]);if(this.deletedStates[t]===null)return{};if(this.deletedStates[t]){const d=this.deletedStates[t][n];if(d===null)return{};for(const x in d)delete c[x]}return c}initializeTileState(t,n){t.setFeatureState(this.state,n)}coalesceChanges(t,n){const a={};for(const c in this.stateChanges){this.state[c]=this.state[c]||{};const d={};for(const x in this.stateChanges[c])this.state[c][x]||(this.state[c][x]={}),s.e(this.state[c][x],this.stateChanges[c][x]),d[x]=this.state[c][x];a[c]=d}for(const c in this.deletedStates){this.state[c]=this.state[c]||{};const d={};if(this.deletedStates[c]===null)for(const x in this.state[c])d[x]={},this.state[c][x]={};else for(const x in this.deletedStates[c]){if(this.deletedStates[c][x]===null)this.state[c][x]={};else for(const b of Object.keys(this.deletedStates[c][x]))delete this.state[c][x][b];d[x]=this.state[c][x]}a[c]=a[c]||{},s.e(a[c],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const c in t)t[c].setFeatureState(a,n)}}class tn extends s.E{constructor(t,n,a){super(),this.id=t,this.dispatcher=a,this.on("data",c=>{c.dataType==="source"&&c.sourceDataType==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&c.dataType==="source"&&c.sourceDataType==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((c,d,x,b)=>{const S=new(Bi(d.type))(c,d,x,b);if(S.id!==c)throw new Error(`Expected Source id to be ${c} instead of ${S.id}`);return S})(t,n,a,this),this._tiles={},this._cache=new jo(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Se,this._didEmitContent=!1,this._updated=!1}onAdd(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._maxTileCacheZoomLevels=t?t._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(t)}onRemove(t){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(t)}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 t in this._tiles){const n=this._tiles[t];if(n.state!=="loaded"&&n.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(t,n){return this._source.loadTile(t,n)}_unloadTile(t){if(this._source.unloadTile)return this._source.unloadTile(t,()=>{})}_abortTile(t){this._source.abortTile&&this._source.abortTile(t,()=>{}),this._source.fire(new s.k("dataabort",{tile:t,coord:t.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(t){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const n in this._tiles){const a=this._tiles[n];a.upload(t),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(t=>t.tileID).sort(In).map(t=>t.key)}getRenderableIds(t){const n=[];for(const a in this._tiles)this._isIdRenderable(a,t)&&n.push(this._tiles[a]);return t?n.sort((a,c)=>{const d=a.tileID,x=c.tileID,b=new s.P(d.canonical.x,d.canonical.y)._rotate(this.transform.angle),S=new s.P(x.canonical.x,x.canonical.y)._rotate(this.transform.angle);return d.overscaledZ-x.overscaledZ||S.y-b.y||S.x-b.x}).map(a=>a.tileID.key):n.map(a=>a.tileID).sort(In).map(a=>a.key)}hasRenderableParent(t){const n=this.findLoadedParent(t,0);return!!n&&this._isIdRenderable(n.tileID.key)}_isIdRenderable(t,n){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(n||!this._tiles[t].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const t in this._tiles)this._tiles[t].state!=="errored"&&this._reloadTile(t,"reloading")}}_reloadTile(t,n){const a=this._tiles[t];a&&(a.state!=="loading"&&(a.state=n),this._loadTile(a,this._tileLoaded.bind(this,a,t,n)))}_tileLoaded(t,n,a,c){if(c)return t.state="errored",void(c.status!==404?this._source.fire(new s.j(c,{tile:t})):this.update(this.transform,this.terrain));t.timeAdded=s.h.now(),a==="expired"&&(t.refreshedUponExpiration=!0),this._setTileReloadTimer(n,t),this.getSource().type==="raster-dem"&&t.dem&&this._backfillDEM(t),this._state.initializeTileState(t,this.map?this.map.painter:null),t.aborted||this._source.fire(new s.k("data",{dataType:"source",tile:t,coord:t.tileID}))}_backfillDEM(t){const n=this.getRenderableIds();for(let c=0;c1||(Math.abs(x)>1&&(Math.abs(x+S)===1?x+=S:Math.abs(x-S)===1&&(x-=S)),d.dem&&c.dem&&(c.dem.backfillBorder(d.dem,x,b),c.neighboringTiles&&c.neighboringTiles[C]&&(c.neighboringTiles[C].backfilled=!0)))}}getTile(t){return this.getTileByID(t.key)}getTileByID(t){return this._tiles[t]}_retainLoadedChildren(t,n,a,c){for(const d in this._tiles){let x=this._tiles[d];if(c[d]||!x.hasData()||x.tileID.overscaledZ<=n||x.tileID.overscaledZ>a)continue;let b=x.tileID;for(;x&&x.tileID.overscaledZ>n+1;){const C=x.tileID.scaledTo(x.tileID.overscaledZ-1);x=this._tiles[C.key],x&&x.hasData()&&(b=C)}let S=b;for(;S.overscaledZ>n;)if(S=S.scaledTo(S.overscaledZ-1),t[S.key]){c[b.key]=b;break}}}findLoadedParent(t,n){if(t.key in this._loadedParentTiles){const a=this._loadedParentTiles[t.key];return a&&a.tileID.overscaledZ>=n?a:null}for(let a=t.overscaledZ-1;a>=n;a--){const c=t.scaledTo(a),d=this._getLoadedTile(c);if(d)return d}}_getLoadedTile(t){const n=this._tiles[t.key];return n&&n.hasData()?n:this._cache.getByKey(t.wrapped().key)}updateCacheSize(t){const n=Math.ceil(t.width/this._source.tileSize)+1,a=Math.ceil(t.height/this._source.tileSize)+1,c=Math.floor(n*a*(this._maxTileCacheZoomLevels===null?s.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,c):c;this._cache.setMaxSize(d)}handleWrapJump(t){const n=Math.round((t-(this._prevLng===void 0?t:this._prevLng))/360);if(this._prevLng=t,n){const a={};for(const c in this._tiles){const d=this._tiles[c];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+n),a[d.tileID.key]=d}this._tiles=a;for(const c in this._timers)clearTimeout(this._timers[c]),delete this._timers[c];for(const c in this._tiles)this._setTileReloadTimer(c,this._tiles[c])}}update(t,n){if(this.transform=t,this.terrain=n,!this._sourceLoaded||this._paused)return;let a;this.updateCacheSize(t),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=t.getVisibleUnwrappedCoordinates(this._source.tileID).map(A=>new s.O(A.canonical.z,A.wrap,A.canonical.z,A.canonical.x,A.canonical.y)):(a=t.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:n}),this._source.hasTile&&(a=a.filter(A=>this._source.hasTile(A)))):a=[];const c=t.coveringZoomLevel(this._source),d=Math.max(c-tn.maxOverzooming,this._source.minzoom),x=Math.max(c+tn.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const A={};for(const P of a)if(P.canonical.z>this._source.minzoom){const R=P.scaledTo(P.canonical.z-1);A[R.key]=R;const W=P.scaledTo(Math.max(this._source.minzoom,Math.min(P.canonical.z,5)));A[W.key]=W}a=a.concat(Object.values(A))}const b=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,b&&this.fire(new s.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const S=this._updateRetainedTiles(a,c);if(Ii(this._source.type)){const A={},P={},R=Object.keys(S),W=s.h.now();for(const G of R){const K=S[G],q=this._tiles[G];if(!q||q.fadeEndTime!==0&&q.fadeEndTime<=W)continue;const le=this.findLoadedParent(K,d);le&&(this._addTile(le.tileID),A[le.tileID.key]=le.tileID),P[G]=K}this._retainLoadedChildren(P,c,x,S);for(const G in A)S[G]||(this._coveredTiles[G]=!0,S[G]=A[G]);if(n){const G={},K={};for(const q of a)this._tiles[q.key].hasData()?G[q.key]=q:K[q.key]=q;for(const q in K){const le=K[q].children(this._source.maxzoom);this._tiles[le[0].key]&&this._tiles[le[1].key]&&this._tiles[le[2].key]&&this._tiles[le[3].key]&&(G[le[0].key]=S[le[0].key]=le[0],G[le[1].key]=S[le[1].key]=le[1],G[le[2].key]=S[le[2].key]=le[2],G[le[3].key]=S[le[3].key]=le[3],delete K[q])}for(const q in K){const le=this.findLoadedParent(K[q],this._source.minzoom);if(le){G[le.tileID.key]=S[le.tileID.key]=le.tileID;for(const me in G)G[me].isChildOf(le.tileID)&&delete G[me]}}for(const q in this._tiles)G[q]||(this._coveredTiles[q]=!0)}}for(const A in S)this._tiles[A].clearFadeHold();const C=s.ab(this._tiles,S);for(const A of C){const P=this._tiles[A];P.hasSymbolBuckets&&!P.holdingForFade()?P.setHoldDuration(this.map._fadeDuration):P.hasSymbolBuckets&&!P.symbolFadeFinished()||this._removeTile(A)}this._updateLoadedParentTileCache()}releaseSymbolFadeTiles(){for(const t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)}_updateRetainedTiles(t,n){const a={},c={},d=Math.max(n-tn.maxOverzooming,this._source.minzoom),x=Math.max(n+tn.maxUnderzooming,this._source.minzoom),b={};for(const S of t){const C=this._addTile(S);a[S.key]=S,C.hasData()||nthis._source.maxzoom){const P=S.children(this._source.maxzoom)[0],R=this.getTile(P);if(R&&R.hasData()){a[P.key]=P;continue}}else{const P=S.children(this._source.maxzoom);if(a[P[0].key]&&a[P[1].key]&&a[P[2].key]&&a[P[3].key])continue}let A=C.wasRequested();for(let P=S.overscaledZ-1;P>=d;--P){const R=S.scaledTo(P);if(c[R.key])break;if(c[R.key]=!0,C=this.getTile(R),!C&&A&&(C=this._addTile(R)),C){const W=C.hasData();if((A||W)&&(a[R.key]=R),A=C.wasRequested(),W)break}}}return a}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const t in this._tiles){const n=[];let a,c=this._tiles[t].tileID;for(;c.overscaledZ>0;){if(c.key in this._loadedParentTiles){a=this._loadedParentTiles[c.key];break}n.push(c.key);const d=c.scaledTo(c.overscaledZ-1);if(a=this._getLoadedTile(d),a)break;c=d}for(const d of n)this._loadedParentTiles[d]=a}}_addTile(t){let n=this._tiles[t.key];if(n)return n;n=this._cache.getAndRemove(t),n&&(this._setTileReloadTimer(t.key,n),n.tileID=t,this._state.initializeTileState(n,this.map?this.map.painter:null),this._cacheTimers[t.key]&&(clearTimeout(this._cacheTimers[t.key]),delete this._cacheTimers[t.key],this._setTileReloadTimer(t.key,n)));const a=n;return n||(n=new wo(t,this._source.tileSize*t.overscaleFactor()),this._loadTile(n,this._tileLoaded.bind(this,n,t.key,n.state))),n.uses++,this._tiles[t.key]=n,a||this._source.fire(new s.k("dataloading",{tile:n,coord:n.tileID,dataType:"source"})),n}_setTileReloadTimer(t,n){t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);const a=n.getExpiryTimeout();a&&(this._timers[t]=setTimeout(()=>{this._reloadTile(t,"expired"),delete this._timers[t]},a))}_removeTile(t){const n=this._tiles[t];n&&(n.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),n.uses>0||(n.hasData()&&n.state!=="reloading"?this._cache.add(n.tileID,n,n.getExpiryTimeout()):(n.aborted=!0,this._abortTile(n),this._unloadTile(n))))}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const t in this._tiles)this._removeTile(t);this._cache.reset()}tilesIn(t,n,a){const c=[],d=this.transform;if(!d)return c;const x=a?d.getCameraQueryGeometry(t):t,b=t.map(G=>d.pointCoordinate(G,this.terrain)),S=x.map(G=>d.pointCoordinate(G,this.terrain)),C=this.getIds();let A=1/0,P=1/0,R=-1/0,W=-1/0;for(const G of S)A=Math.min(A,G.x),P=Math.min(P,G.y),R=Math.max(R,G.x),W=Math.max(W,G.y);for(let G=0;G=0&&ee[1].y+me>=0){const ce=b.map(xe=>q.getTilePoint(xe)),ve=S.map(xe=>q.getTilePoint(xe));c.push({tile:K,tileID:q,queryGeometry:ce,cameraQueryGeometry:ve,scale:le})}}return c}getVisibleCoordinates(t){const n=this.getRenderableIds(t).map(a=>this._tiles[a].tileID);for(const a of n)a.posMatrix=this.transform.calculatePosMatrix(a.toUnwrapped());return n}hasTransition(){if(this._source.hasTransition())return!0;if(Ii(this._source.type)){const t=s.h.now();for(const n in this._tiles)if(this._tiles[n].fadeEndTime>=t)return!0}return!1}setFeatureState(t,n,a){this._state.updateState(t=t||"_geojsonTileLayer",n,a)}removeFeatureState(t,n,a){this._state.removeFeatureState(t=t||"_geojsonTileLayer",n,a)}getFeatureState(t,n){return this._state.getState(t=t||"_geojsonTileLayer",n)}setDependencies(t,n,a){const c=this._tiles[t];c&&c.setDependencies(n,a)}reloadTilesForDependencies(t,n){for(const a in this._tiles)this._tiles[a].hasDependency(t,n)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(t,n))}}function In(u,t){const n=Math.abs(2*u.wrap)-+(u.wrap<0),a=Math.abs(2*t.wrap)-+(t.wrap<0);return u.overscaledZ-t.overscaledZ||a-n||t.canonical.y-u.canonical.y||t.canonical.x-u.canonical.x}function Ii(u){return u==="raster"||u==="image"||u==="video"}tn.maxOverzooming=10,tn.maxUnderzooming=3;const ii="mapboxgl_preloaded_worker_pool";class Vn{constructor(){this.active={}}acquire(t){if(!this.workers)for(this.workers=[];this.workers.length{n.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[ii]}numActive(){return Object.keys(this.active).length}}const En=Math.floor(s.h.hardwareConcurrency/2);let Un;function qo(){return Un||(Un=new Vn),Un}Vn.workerCount=s.ac(globalThis)?Math.max(Math.min(En,3),1):1;class So{constructor(t,n){this.reset(t,n)}reset(t,n){this.points=t||[],this._distances=[0];for(let a=1;a0?(c-x)/b:0;return this.points[d].mult(1-S).add(this.points[n].mult(S))}}function Cn(u,t){let n=!0;return u==="always"||u!=="never"&&t!=="never"||(n=!1),n}class $n{constructor(t,n,a){const c=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(t/a),this.yCellCount=Math.ceil(n/a);for(let x=0;xthis.width||c<0||n>this.height)return[];const S=[];if(t<=0&&n<=0&&this.width<=a&&this.height<=c){if(d)return[{key:null,x1:t,y1:n,x2:a,y2:c}];for(let C=0;C0}hitTestCircle(t,n,a,c,d){const x=t-a,b=t+a,S=n-a,C=n+a;if(b<0||x>this.width||C<0||S>this.height)return!1;const A=[];return this._forEachCell(x,S,b,C,this._queryCellCircle,A,{hitTest:!0,overlapMode:c,circle:{x:t,y:n,radius:a},seenUids:{box:{},circle:{}}},d),A.length>0}_queryCell(t,n,a,c,d,x,b,S){const{seenUids:C,hitTest:A,overlapMode:P}=b,R=this.boxCells[d];if(R!==null){const G=this.bboxes;for(const K of R)if(!C.box[K]){C.box[K]=!0;const q=4*K,le=this.boxKeys[K];if(t<=G[q+2]&&n<=G[q+3]&&a>=G[q+0]&&c>=G[q+1]&&(!S||S(le))&&(!A||!Cn(P,le.overlapMode))&&(x.push({key:le,x1:G[q],y1:G[q+1],x2:G[q+2],y2:G[q+3]}),A))return!0}}const W=this.circleCells[d];if(W!==null){const G=this.circles;for(const K of W)if(!C.circle[K]){C.circle[K]=!0;const q=3*K,le=this.circleKeys[K];if(this._circleAndRectCollide(G[q],G[q+1],G[q+2],t,n,a,c)&&(!S||S(le))&&(!A||!Cn(P,le.overlapMode))){const me=G[q],ee=G[q+1],ce=G[q+2];if(x.push({key:le,x1:me-ce,y1:ee-ce,x2:me+ce,y2:ee+ce}),A)return!0}}}return!1}_queryCellCircle(t,n,a,c,d,x,b,S){const{circle:C,seenUids:A,overlapMode:P}=b,R=this.boxCells[d];if(R!==null){const G=this.bboxes;for(const K of R)if(!A.box[K]){A.box[K]=!0;const q=4*K,le=this.boxKeys[K];if(this._circleAndRectCollide(C.x,C.y,C.radius,G[q+0],G[q+1],G[q+2],G[q+3])&&(!S||S(le))&&!Cn(P,le.overlapMode))return x.push(!0),!0}}const W=this.circleCells[d];if(W!==null){const G=this.circles;for(const K of W)if(!A.circle[K]){A.circle[K]=!0;const q=3*K,le=this.circleKeys[K];if(this._circlesCollide(G[q],G[q+1],G[q+2],C.x,C.y,C.radius)&&(!S||S(le))&&!Cn(P,le.overlapMode))return x.push(!0),!0}}}_forEachCell(t,n,a,c,d,x,b,S){const C=this._convertToXCellCoord(t),A=this._convertToYCellCoord(n),P=this._convertToXCellCoord(a),R=this._convertToYCellCoord(c);for(let W=C;W<=P;W++)for(let G=A;G<=R;G++)if(d.call(this,t,n,a,c,this.xCellCount*G+W,x,b,S))return}_convertToXCellCoord(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))}_convertToYCellCoord(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))}_circlesCollide(t,n,a,c,d,x){const b=c-t,S=d-n,C=a+x;return C*C>b*b+S*S}_circleAndRectCollide(t,n,a,c,d,x,b){const S=(x-c)/2,C=Math.abs(t-(c+S));if(C>S+a)return!1;const A=(b-d)/2,P=Math.abs(n-(d+A));if(P>A+a)return!1;if(C<=S||P<=A)return!0;const R=C-S,W=P-A;return R*R+W*W<=a*a}}function qe(u,t,n,a,c){const d=s.Z();return t?(s.a0(d,d,[1/c,1/c,1]),n||s.ae(d,d,a.angle)):s.a1(d,a.labelPlaneMatrix,u),d}function mn(u,t,n,a,c){if(t){const d=s.af(u);return s.a0(d,d,[c,c,1]),n||s.ae(d,d,-a.angle),d}return a.glCoordMatrix}function er(u,t,n){let a;n?(a=[u.x,u.y,n(u.x,u.y),1],s.ag(a,a,t)):(a=[u.x,u.y,0,1],J(a,a,t));const c=a[3];return{point:new s.P(a[0]/c,a[1]/c),signedDistanceFromCamera:c}}function Zo(u,t){return .5+u/t*.5}function rn(u,t){const n=u[0]/u[3],a=u[1]/u[3];return n>=-t[0]&&n<=t[0]&&a>=-t[1]&&a<=t[1]}function We(u,t,n,a,c,d,x,b,S,C){const A=a?u.textSizeData:u.iconSizeData,P=s.ah(A,n.transform.zoom),R=[256/n.width*2+1,256/n.height*2+1],W=a?u.text.dynamicLayoutVertexArray:u.icon.dynamicLayoutVertexArray;W.clear();const G=u.lineVertexArray,K=a?u.text.placedSymbolArray:u.icon.placedSymbolArray,q=n.transform.width/n.transform.height;let le=!1;for(let me=0;meMath.abs(n.x-t.x)*a?{useVertical:!0}:(u===s.ai.vertical?t.yn.x)?{needsFlipping:!0}:null}function Ur(u,t,n,a,c,d,x,b,S,C,A,P,R,W,G,K){const q=t/24,le=u.lineOffsetX*q,me=u.lineOffsetY*q;let ee;if(u.numGlyphs>1){const ce=u.glyphStartIndex+u.numGlyphs,ve=u.lineStartIndex,xe=u.lineStartIndex+u.lineLength,Me=Bt(q,b,le,me,n,A,P,u,S,d,R,G,K);if(!Me)return{notEnoughRoom:!0};const Oe=er(Me.first.point,x,K).point,ze=er(Me.last.point,x,K).point;if(a&&!n){const je=Mt(u.writingMode,Oe,ze,W);if(je)return je}ee=[Me.first];for(let je=u.glyphStartIndex+1;je0?Oe.point:_n(P,Me,ve,1,c,K),je=Mt(u.writingMode,ve,ze,W);if(je)return je}const ce=L(q*b.getoffsetX(u.glyphStartIndex),le,me,n,A,P,u.segment,u.lineStartIndex,u.lineStartIndex+u.lineLength,S,d,R,G,K);if(!ce)return{notEnoughRoom:!0};ee=[ce]}for(const ce of ee)s.ak(C,ce.point,ce.angle);return{}}function _n(u,t,n,a,c,d){const x=er(u.add(u.sub(t)._unit()),c,d).point,b=n.sub(x);return n.add(b._mult(a/b.mag()))}function It(u,t){const{projectionCache:n,lineVertexArray:a,labelPlaneMatrix:c,tileAnchorPoint:d,distanceFromAnchor:x,getElevation:b,previousVertex:S,direction:C,absOffsetX:A}=t;if(n.projections[u])return n.projections[u];const P=new s.P(a.getx(u),a.gety(u)),R=er(P,c,b);if(R.signedDistanceFromCamera>0)return n.projections[u]=R.point,R.point;const W=u-C;return _n(x===0?d:new s.P(a.getx(W),a.gety(W)),P,S,A-x+1,c,b)}function Mn(u,t,n){return u._unit()._perp()._mult(t*n)}function X(u,t,n,a,c,d,x,b){const{projectionCache:S,direction:C}=b;if(S.offsets[u])return S.offsets[u];const A=n.add(t);if(u+C=c)return S.offsets[u]=A,A;const P=It(u+C,b),R=Mn(P.sub(n),x,C),W=n.add(R),G=P.add(R);return S.offsets[u]=s.al(d,A,W,G)||A,S.offsets[u]}function L(u,t,n,a,c,d,x,b,S,C,A,P,R,W){const G=a?u-t:u+t;let K=G>0?1:-1,q=0;a&&(K*=-1,q=Math.PI),K<0&&(q+=Math.PI);let le,me,ee=K>0?b+x:b+x+1,ce=c,ve=c,xe=0,Me=0;const Oe=Math.abs(G),ze=[];let je;for(;xe+Me<=Oe;){if(ee+=K,ee=S)return null;xe+=Me,ve=ce,me=le;const Qe={projectionCache:P,lineVertexArray:C,labelPlaneMatrix:A,tileAnchorPoint:d,distanceFromAnchor:xe,getElevation:W,previousVertex:ve,direction:K,absOffsetX:Oe};if(ce=It(ee,Qe),n===0)ze.push(ve),je=ce.sub(ve);else{let Ct;const gt=ce.sub(ve);Ct=gt.mag()===0?Mn(It(ee+K,Qe).sub(ce),n,K):Mn(gt,n,K),me||(me=ve.add(Ct)),le=X(ee,Ct,ce,b,S,me,n,Qe),ze.push(me),je=le.sub(me)}Me=je.mag()}const dt=je._mult((Oe-xe)/Me)._add(me||ve),$t=q+Math.atan2(ce.y-ve.y,ce.x-ve.x);return ze.push(dt),{point:dt,angle:R?$t:0,path:ze}}const F=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function j(u,t){for(let n=0;n=1;jt--)gt.push(Qe.path[jt]);for(let jt=1;jter(ei,S,G));gt=jt.some(ei=>ei.signedDistanceFromCamera<=0)?[]:jt.map(ei=>ei.point)}let Jt=[];if(gt.length>0){const jt=gt[0].clone(),ei=gt[0].clone();for(let pr=1;pr=je.x&&ei.x<=dt.x&&jt.y>=je.y&&ei.y<=dt.y?[gt]:ei.xdt.x||ei.ydt.y?[]:s.am([gt],je.x,je.y,dt.x,dt.y)}for(const jt of Jt){$t.reset(jt,.25*ze);let ei=0;ei=$t.length<=.5*ze?1:Math.ceil($t.paddedLength/Mi)+1;for(let pr=0;pr=this.screenRightBoundary||cthis.screenBottomBoundary}isInsideGrid(t,n,a,c){return a>=0&&t=0&&na.collisionGroupID===n}}return this.collisionGroups[t]}}function kt(u,t,n,a,c){const{horizontalAlign:d,verticalAlign:x}=s.au(u);return new s.P(-(d-.5)*t+a[0]*c,-(x-.5)*n+a[1]*c)}function ut(u,t,n,a,c,d){const{x1:x,x2:b,y1:S,y2:C,anchorPointX:A,anchorPointY:P}=u,R=new s.P(t,n);return a&&R._rotate(c?d:-d),{x1:x+R.x,y1:S+R.y,x2:b+R.x,y2:C+R.y,anchorPointX:A,anchorPointY:P}}class vt{constructor(t,n,a,c,d){this.transform=t.clone(),this.terrain=n,this.collisionIndex=new he(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new mt(c),this.collisionCircleArrays={},this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}getBucketParts(t,n,a,c){const d=a.getBucket(n),x=a.latestFeatureIndex;if(!d||!x||n.id!==d.layerIds[0])return;const b=a.collisionBoxArray,S=d.layers[0].layout,C=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),A=a.tileSize/s.N,P=this.transform.calculatePosMatrix(a.tileID.toUnwrapped()),R=S.get("text-pitch-alignment")==="map",W=S.get("text-rotation-alignment")==="map",G=oe(a,1,this.transform.zoom),K=qe(P,R,W,this.transform,G);let q=null;if(R){const me=mn(P,R,W,this.transform,G);q=s.a1([],this.transform.labelPlaneMatrix,me)}this.retainedQueryData[d.bucketInstanceId]=new Ce(d.bucketInstanceId,x,d.sourceLayerIndex,d.index,a.tileID);const le={bucket:d,layout:S,posMatrix:P,textLabelPlaneMatrix:K,labelToScreenMatrix:q,scale:C,textPixelRatio:A,holdingForFade:a.holdingForFade(),collisionBoxArray:b,partiallyEvaluatedTextSize:s.ah(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(c)for(const me of d.sortKeyRanges){const{sortKey:ee,symbolInstanceStart:ce,symbolInstanceEnd:ve}=me;t.push({sortKey:ee,symbolInstanceStart:ce,symbolInstanceEnd:ve,parameters:le})}else t.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:le})}attemptAnchorPlacement(t,n,a,c,d,x,b,S,C,A,P,R,W,G,K,q){const le=s.aq[t.textAnchor],me=[t.textOffset0,t.textOffset1],ee=kt(le,a,c,me,d),ce=this.collisionIndex.placeCollisionBox(ut(n,ee.x,ee.y,x,b,this.transform.angle),P,S,C,A.predicate,q);if((!K||this.collisionIndex.placeCollisionBox(ut(K,ee.x,ee.y,x,b,this.transform.angle),P,S,C,A.predicate,q).box.length!==0)&&ce.box.length>0){let ve;if(this.prevPlacement&&this.prevPlacement.variableOffsets[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID]&&this.prevPlacement.placements[R.crossTileID].text&&(ve=this.prevPlacement.variableOffsets[R.crossTileID].anchor),R.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[R.crossTileID]={textOffset:me,width:a,height:c,anchor:le,textBoxScale:d,prevAnchor:ve},this.markUsedJustification(W,le,R,G),W.allowVerticalPlacement&&(this.markUsedOrientation(W,G,R),this.placedOrientations[R.crossTileID]=G),{shift:ee,placedGlyphBoxes:ce}}}placeLayerBucketPart(t,n,a){const{bucket:c,layout:d,posMatrix:x,textLabelPlaneMatrix:b,labelToScreenMatrix:S,textPixelRatio:C,holdingForFade:A,collisionBoxArray:P,partiallyEvaluatedTextSize:R,collisionGroup:W}=t.parameters,G=d.get("text-optional"),K=d.get("icon-optional"),q=s.ar(d,"text-overlap","text-allow-overlap"),le=q==="always",me=s.ar(d,"icon-overlap","icon-allow-overlap"),ee=me==="always",ce=d.get("text-rotation-alignment")==="map",ve=d.get("text-pitch-alignment")==="map",xe=d.get("icon-text-fit")!=="none",Me=d.get("symbol-z-order")==="viewport-y",Oe=le&&(ee||!c.hasIconData()||K),ze=ee&&(le||!c.hasTextData()||G);!c.collisionArrays&&P&&c.deserializeCollisionBoxes(P);const je=this.retainedQueryData[c.bucketInstanceId].tileID,dt=this.terrain?(Qe,Ct)=>this.terrain.getElevation(je,Qe,Ct):null,$t=(Qe,Ct)=>{var gt,Mi;if(n[Qe.crossTileID])return;if(A)return void(this.placements[Qe.crossTileID]=new Te(!1,!1,!1));let Jt=!1,jt=!1,ei=!0,pr=null,qi={box:null,offscreen:null},Kr={box:null,offscreen:null},Pr=null,br=null,Xn=null,Qi=0,Do=0,Fo=0;Ct.textFeatureIndex?Qi=Ct.textFeatureIndex:Qe.useRuntimeCollisionCircles&&(Qi=Qe.featureIndex),Ct.verticalTextFeatureIndex&&(Do=Ct.verticalTextFeatureIndex);const _s=Ct.textBox;if(_s){const cn=fr=>{let zr=s.ai.horizontal;if(c.allowVerticalPlacement&&!fr&&this.prevPlacement){const Ln=this.prevPlacement.placedOrientations[Qe.crossTileID];Ln&&(this.placedOrientations[Qe.crossTileID]=Ln,zr=Ln,this.markUsedOrientation(c,zr,Qe))}return zr},Jr=(fr,zr)=>{if(c.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&Ct.verticalTextBox){for(const Ln of c.writingModes)if(Ln===s.ai.vertical?(qi=zr(),Kr=qi):qi=fr(),qi&&qi.box&&qi.box.length)break}else qi=fr()},xn=Qe.textAnchorOffsetStartIndex,Bs=Qe.textAnchorOffsetEndIndex;if(Bs===xn){const fr=(zr,Ln)=>{const mr=this.collisionIndex.placeCollisionBox(zr,q,C,x,W.predicate,dt);return mr&&mr.box&&mr.box.length&&(this.markUsedOrientation(c,Ln,Qe),this.placedOrientations[Qe.crossTileID]=Ln),mr};Jr(()=>fr(_s,s.ai.horizontal),()=>{const zr=Ct.verticalTextBox;return c.allowVerticalPlacement&&Qe.numVerticalGlyphVertices>0&&zr?fr(zr,s.ai.vertical):{box:null,offscreen:null}}),cn(qi&&qi.box&&qi.box.length)}else{let fr=s.aq[(Mi=(gt=this.prevPlacement)===null||gt===void 0?void 0:gt.variableOffsets[Qe.crossTileID])===null||Mi===void 0?void 0:Mi.anchor];const zr=(mr,Ns,ml)=>{const Uc=mr.x2-mr.x1,jc=mr.y2-mr.y1,wu=Qe.textBoxScale,Jl=xe&&me==="never"?Ns:null;let Ro={box:[],offscreen:!1},Vs=q==="never"?1:2,Oo="never";fr&&Vs++;for(let ao=0;aozr(_s,Ct.iconBox,s.ai.horizontal),()=>{const mr=Ct.verticalTextBox;return c.allowVerticalPlacement&&!(qi&&qi.box&&qi.box.length)&&Qe.numVerticalGlyphVertices>0&&mr?zr(mr,Ct.verticalIconBox,s.ai.vertical):{box:null,offscreen:null}}),qi&&(Jt=qi.box,ei=qi.offscreen);const Ln=cn(qi&&qi.box);if(!Jt&&this.prevPlacement){const mr=this.prevPlacement.variableOffsets[Qe.crossTileID];mr&&(this.variableOffsets[Qe.crossTileID]=mr,this.markUsedJustification(c,mr.anchor,Qe,Ln))}}}if(Pr=qi,Jt=Pr&&Pr.box&&Pr.box.length>0,ei=Pr&&Pr.offscreen,Qe.useRuntimeCollisionCircles){const cn=c.text.placedSymbolArray.get(Qe.centerJustifiedTextSymbolIndex),Jr=s.aj(c.textSizeData,R,cn),xn=d.get("text-padding");br=this.collisionIndex.placeCollisionCircles(q,cn,c.lineVertexArray,c.glyphOffsetArray,Jr,x,b,S,a,ve,W.predicate,Qe.collisionCircleDiameter,xn,dt),br.circles.length&&br.collisionDetected&&!a&&s.w("Collisions detected, but collision boxes are not shown"),Jt=le||br.circles.length>0&&!br.collisionDetected,ei=ei&&br.offscreen}if(Ct.iconFeatureIndex&&(Fo=Ct.iconFeatureIndex),Ct.iconBox){const cn=Jr=>{const xn=xe&&pr?ut(Jr,pr.x,pr.y,ce,ve,this.transform.angle):Jr;return this.collisionIndex.placeCollisionBox(xn,me,C,x,W.predicate,dt)};Kr&&Kr.box&&Kr.box.length&&Ct.verticalIconBox?(Xn=cn(Ct.verticalIconBox),jt=Xn.box.length>0):(Xn=cn(Ct.iconBox),jt=Xn.box.length>0),ei=ei&&Xn.offscreen}const Os=G||Qe.numHorizontalGlyphVertices===0&&Qe.numVerticalGlyphVertices===0,Ca=K||Qe.numIconVertices===0;if(Os||Ca?Ca?Os||(jt=jt&&Jt):Jt=jt&&Jt:jt=Jt=jt&&Jt,Jt&&Pr&&Pr.box&&this.collisionIndex.insertCollisionBox(Pr.box,q,d.get("text-ignore-placement"),c.bucketInstanceId,Kr&&Kr.box&&Do?Do:Qi,W.ID),jt&&Xn&&this.collisionIndex.insertCollisionBox(Xn.box,me,d.get("icon-ignore-placement"),c.bucketInstanceId,Fo,W.ID),br&&(Jt&&this.collisionIndex.insertCollisionCircles(br.circles,q,d.get("text-ignore-placement"),c.bucketInstanceId,Qi,W.ID),a)){const cn=c.bucketInstanceId;let Jr=this.collisionCircleArrays[cn];Jr===void 0&&(Jr=this.collisionCircleArrays[cn]=new Ee);for(let xn=0;xn=0;--Ct){const gt=Qe[Ct];$t(c.symbolInstances.get(gt),c.collisionArrays[gt])}}else for(let Qe=t.symbolInstanceStart;Qe=0&&(t.text.placedSymbolArray.get(b).crossTileID=d>=0&&b!==d?0:a.crossTileID)}markUsedOrientation(t,n,a){const c=n===s.ai.horizontal||n===s.ai.horizontalOnly?n:0,d=n===s.ai.vertical?n:0,x=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const b of x)t.text.placedSymbolArray.get(b).placedOrientation=c;a.verticalPlacedTextSymbolIndex&&(t.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;const n=this.prevPlacement;let a=!1;this.prevZoomAdjustment=n?n.zoomAdjustment(this.transform.zoom):0;const c=n?n.symbolFadeChange(t):1,d=n?n.opacities:{},x=n?n.variableOffsets:{},b=n?n.placedOrientations:{};for(const S in this.placements){const C=this.placements[S],A=d[S];A?(this.opacities[S]=new ae(A,c,C.text,C.icon),a=a||C.text!==A.text.placed||C.icon!==A.icon.placed):(this.opacities[S]=new ae(null,c,C.text,C.icon,C.skipFade),a=a||C.text||C.icon)}for(const S in d){const C=d[S];if(!this.opacities[S]){const A=new ae(C,c,!1,!1);A.isHidden()||(this.opacities[S]=A,a=a||C.text.placed||C.icon.placed)}}for(const S in x)this.variableOffsets[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.variableOffsets[S]=x[S]);for(const S in b)this.placedOrientations[S]||!this.opacities[S]||this.opacities[S].isHidden()||(this.placedOrientations[S]=b[S]);if(n&&n.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=t:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=n?n.lastPlacementChangeTime:t)}updateLayerOpacities(t,n){const a={};for(const c of n){const d=c.getBucket(t);d&&c.latestFeatureIndex&&t.id===d.layerIds[0]&&this.updateBucketOpacities(d,a,c.collisionBoxArray)}}updateBucketOpacities(t,n,a){t.hasTextData()&&(t.text.opacityVertexArray.clear(),t.text.hasVisibleVertices=!1),t.hasIconData()&&(t.icon.opacityVertexArray.clear(),t.icon.hasVisibleVertices=!1),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexArray.clear(),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexArray.clear();const c=t.layers[0],d=c.layout,x=new ae(null,0,!1,!1,!0),b=d.get("text-allow-overlap"),S=d.get("icon-allow-overlap"),C=c._unevaluatedLayout.hasValue("text-variable-anchor")||c._unevaluatedLayout.hasValue("text-variable-anchor-offset"),A=d.get("text-rotation-alignment")==="map",P=d.get("text-pitch-alignment")==="map",R=d.get("icon-text-fit")!=="none",W=new ae(null,0,b&&(S||!t.hasIconData()||d.get("icon-optional")),S&&(b||!t.hasTextData()||d.get("text-optional")),!0);!t.collisionArrays&&a&&(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData())&&t.deserializeCollisionBoxes(a);const G=(K,q,le)=>{for(let me=0;me0,xe=this.placedOrientations[q.crossTileID],Me=xe===s.ai.vertical,Oe=xe===s.ai.horizontal||xe===s.ai.horizontalOnly;if(le>0||me>0){const ze=yr(ce.text);G(t.text,le,Me?An:ze),G(t.text,me,Oe?An:ze);const je=ce.text.isHidden();[q.rightJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.leftJustifiedTextSymbolIndex].forEach(Qe=>{Qe>=0&&(t.text.placedSymbolArray.get(Qe).hidden=je||Me?1:0)}),q.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(q.verticalPlacedTextSymbolIndex).hidden=je||Oe?1:0);const dt=this.variableOffsets[q.crossTileID];dt&&this.markUsedJustification(t,dt.anchor,q,xe);const $t=this.placedOrientations[q.crossTileID];$t&&(this.markUsedJustification(t,"left",q,$t),this.markUsedOrientation(t,$t,q))}if(ve){const ze=yr(ce.icon),je=!(R&&q.verticalPlacedIconSymbolIndex&&Me);q.placedIconSymbolIndex>=0&&(G(t.icon,q.numIconVertices,je?ze:An),t.icon.placedSymbolArray.get(q.placedIconSymbolIndex).hidden=ce.icon.isHidden()),q.verticalPlacedIconSymbolIndex>=0&&(G(t.icon,q.numVerticalIconVertices,je?An:ze),t.icon.placedSymbolArray.get(q.verticalPlacedIconSymbolIndex).hidden=ce.icon.isHidden())}if(t.hasIconCollisionBoxData()||t.hasTextCollisionBoxData()){const ze=t.collisionArrays[K];if(ze){let je=new s.P(0,0);if(ze.textBox||ze.verticalTextBox){let $t=!0;if(C){const Qe=this.variableOffsets[ee];Qe?(je=kt(Qe.anchor,Qe.width,Qe.height,Qe.textOffset,Qe.textBoxScale),A&&je._rotate(P?this.transform.angle:-this.transform.angle)):$t=!1}ze.textBox&&Ft(t.textCollisionBox.collisionVertexArray,ce.text.placed,!$t||Me,je.x,je.y),ze.verticalTextBox&&Ft(t.textCollisionBox.collisionVertexArray,ce.text.placed,!$t||Oe,je.x,je.y)}const dt=!!(!Oe&&ze.verticalIconBox);ze.iconBox&&Ft(t.iconCollisionBox.collisionVertexArray,ce.icon.placed,dt,R?je.x:0,R?je.y:0),ze.verticalIconBox&&Ft(t.iconCollisionBox.collisionVertexArray,ce.icon.placed,!dt,R?je.x:0,R?je.y:0)}}}if(t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasIconCollisionBoxData()&&t.iconCollisionBox.collisionVertexBuffer&&t.iconCollisionBox.collisionVertexBuffer.updateData(t.iconCollisionBox.collisionVertexArray),t.hasTextCollisionBoxData()&&t.textCollisionBox.collisionVertexBuffer&&t.textCollisionBox.collisionVertexBuffer.updateData(t.textCollisionBox.collisionVertexArray),t.text.opacityVertexArray.length!==t.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${t.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${t.text.layoutVertexArray.length}) / 4`);if(t.icon.opacityVertexArray.length!==t.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${t.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${t.icon.layoutVertexArray.length}) / 4`);if(t.bucketInstanceId in this.collisionCircleArrays){const K=this.collisionCircleArrays[t.bucketInstanceId];t.placementInvProjMatrix=K.invProjMatrix,t.placementViewportMatrix=K.viewportMatrix,t.collisionCircleArray=K.circles,delete this.collisionCircleArrays[t.bucketInstanceId]}}symbolFadeChange(t){return this.fadeDuration===0?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(t){return Math.max(0,(this.transform.zoom-t)/1.5)}hasTransitions(t){return this.stale||t-this.lastPlacementChangeTimet}setStale(){this.stale=!0}}function Ft(u,t,n,a,c){u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0),u.emplaceBack(t?1:0,n?1:0,a||0,c||0)}const gi=Math.pow(2,25),Ut=Math.pow(2,24),ai=Math.pow(2,17),ri=Math.pow(2,16),jr=Math.pow(2,9),Ei=Math.pow(2,8),ur=Math.pow(2,1);function yr(u){if(u.opacity===0&&!u.placed)return 0;if(u.opacity===1&&u.placed)return 4294967295;const t=u.placed?1:0,n=Math.floor(127*u.opacity);return n*gi+t*Ut+n*ai+t*ri+n*jr+t*Ei+n*ur+t}const An=0;class xs{constructor(t){this._sortAcrossTiles=t.layout.get("symbol-z-order")!=="viewport-y"&&!t.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(t,n,a,c,d){const x=this._bucketParts;for(;this._currentTileIndexb.sortKey-S.sortKey));this._currentPartIndex!this._forceFullPlacement&&s.h.now()-c>2;for(;this._currentPlacementIndex>=0;){const x=n[t[this._currentPlacementIndex]],b=this.placement.collisionIndex.transform.zoom;if(x.type==="symbol"&&(!x.minzoom||x.minzoom<=b)&&(!x.maxzoom||x.maxzoom>b)){if(this._inProgressLayer||(this._inProgressLayer=new xs(x)),this._inProgressLayer.continuePlacement(a[x.source],this.placement,this._showCollisionBoxes,x,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(t){return this.placement.commit(t),this.placement}}const Io=512/s.N/2;class vr{constructor(t,n,a){this.tileID=t,this.bucketInstanceId=a,this._symbolsByKey={};const c=new Map;for(let d=0;d({x:Math.floor(S.anchorX*Io),y:Math.floor(S.anchorY*Io)})),crossTileIDs:x.map(S=>S.crossTileID)};if(b.positions.length>128){const S=new s.av(b.positions.length,16,Uint16Array);for(const{x:C,y:A}of b.positions)S.add(C,A);S.finish(),delete b.positions,b.index=S}this._symbolsByKey[d]=b}}getScaledCoordinates(t,n){const{x:a,y:c,z:d}=this.tileID.canonical,{x,y:b,z:S}=n.canonical,C=Io/Math.pow(2,S-d),A=(b*s.N+t.anchorY)*C,P=c*s.N*Io;return{x:Math.floor((x*s.N+t.anchorX)*C-a*s.N*Io),y:Math.floor(A-P)}}findMatches(t,n,a){const c=this.tileID.canonical.zt)}}class yi{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class ta{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(t){const n=Math.round((t-this.lng)/360);if(n!==0)for(const a in this.indexes){const c=this.indexes[a],d={};for(const x in c){const b=c[x];b.tileID=b.tileID.unwrapTo(b.tileID.wrap+n),d[b.tileID.key]=b}this.indexes[a]=d}this.lng=t}addBucket(t,n,a){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===n.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(let d=0;dt.overscaledZ)for(const b in x){const S=x[b];S.tileID.isChildOf(t)&&S.findMatches(n.symbolInstances,t,c)}else{const b=x[t.scaledTo(Number(d)).key];b&&b.findMatches(n.symbolInstances,t,c)}}for(let d=0;d{n[a]=!0});for(const a in this.layerIndexes)n[a]||delete this.layerIndexes[a]}}const ji=(u,t)=>s.x(u,t&&t.filter(n=>n.identifier!=="source.canvas")),qr=s.F(s.ax,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData","setGlyphs","setSprite"]),Go=s.F(s.ax,["setCenter","setZoom","setBearing","setPitch"]),Ir=s.aw();class Er extends s.E{constructor(t,n={}){super(),this.map=t,this.dispatcher=new zi(qo(),this,t._getMapId()),this.imageManager=new Ge,this.imageManager.setEventedParent(this),this.glyphManager=new Lt(t._requestManager,n.localIdeographFontFamily),this.lineAtlas=new Vr(256,512),this.crossTileSymbolIndex=new jn,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new s.ay,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",s.az());const a=this;this._rtlTextPluginCallback=Er.registerForPluginStateChange(c=>{a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:c.pluginStatus,pluginURL:c.pluginURL},(d,x)=>{if(s.aA(d),x&&x.every(b=>b))for(const b in a.sourceCaches){const S=a.sourceCaches[b].getSource().type;S!=="vector"&&S!=="geojson"||a.sourceCaches[b].reload()}})}),this.on("data",c=>{if(c.dataType!=="source"||c.sourceDataType!=="metadata")return;const d=this.sourceCaches[c.sourceId];if(!d)return;const x=d.getSource();if(x&&x.vectorLayerIds)for(const b in this._layers){const S=this._layers[b];S.source===x.id&&this._validateLayer(S)}})}loadURL(t,n={},a){this.fire(new s.k("dataloading",{dataType:"style"})),n.validate=typeof n.validate!="boolean"||n.validate;const c=this.map._requestManager.transformRequest(t,et.Style);this._request=s.f(c,(d,x)=>{this._request=null,d?this.fire(new s.j(d)):x&&this._load(x,n,a)})}loadJSON(t,n={},a){this.fire(new s.k("dataloading",{dataType:"style"})),this._request=s.h.frame(()=>{this._request=null,n.validate=n.validate!==!1,this._load(t,n,a)})}loadEmpty(){this.fire(new s.k("dataloading",{dataType:"style"})),this._load(Ir,{validate:!1})}_load(t,n,a){var c;const d=n.transformStyle?n.transformStyle(a,t):t;if(!n.validate||!ji(this,s.y(d))){this._loaded=!0,this.stylesheet=d;for(const x in d.sources)this.addSource(x,d.sources[x],{validate:!1});d.sprite?this._loadSprite(d.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(d.glyphs),this._createLayers(),this.light=new en(this.stylesheet.light),this.map.setTerrain((c=this.stylesheet.terrain)!==null&&c!==void 0?c:null),this.fire(new s.k("data",{dataType:"style"})),this.fire(new s.k("style.load"))}}_createLayers(){const t=s.aB(this.stylesheet.layers);this.dispatcher.broadcast("setLayers",t),this._order=t.map(n=>n.id),this._layers={},this._serializedLayers=null;for(const n of t){const a=s.aC(n);a.setEventedParent(this,{layer:{id:n.id}}),this._layers[n.id]=a}}_loadSprite(t,n=!1,a=void 0){this.imageManager.setLoaded(!1),this._spriteRequest=function(c,d,x,b){const S=Nt(c),C=S.length,A=x>1?"@2x":"",P={},R={},W={};for(const{id:G,url:K}of S){const q=d.transformRequest(d.normalizeSpriteURL(K,A,".json"),et.SpriteJSON),le=`${G}_${q.url}`;P[le]=s.f(q,(ce,ve)=>{delete P[le],R[G]=ve,Yt(b,R,W,ce,C)});const me=d.transformRequest(d.normalizeSpriteURL(K,A,".png"),et.SpriteImage),ee=`${G}_${me.url}`;P[ee]=Ne.getImage(me,(ce,ve)=>{delete P[ee],W[G]=ve,Yt(b,R,W,ce,C)})}return{cancel(){for(const G of Object.values(P))G.cancel()}}}(t,this.map._requestManager,this.map.getPixelRatio(),(c,d)=>{if(this._spriteRequest=null,c)this.fire(new s.j(c));else if(d)for(const x in d){this._spritesImagesIds[x]=[];const b=this._spritesImagesIds[x]?this._spritesImagesIds[x].filter(S=>!(S in d)):[];for(const S of b)this.imageManager.removeImage(S),this._changedImages[S]=!0;for(const S in d[x]){const C=x==="default"?S:`${x}:${S}`;this._spritesImagesIds[x].push(C),C in this.imageManager.images?this.imageManager.updateImage(C,d[x][S],!1):this.imageManager.addImage(C,d[x][S]),n&&(this._changedImages[C]=!0)}}this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),n&&(this._changed=!0),this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"})),a&&a(c)})}_unloadSprite(){for(const t of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(t),this._changedImages[t]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}_validateLayer(t){const n=this.sourceCaches[t.source];if(!n)return;const a=t.sourceLayer;if(!a)return;const c=n.getSource();(c.type==="geojson"||c.vectorLayerIds&&c.vectorLayerIds.indexOf(a)===-1)&&this.fire(new s.j(new Error(`Source layer "${a}" does not exist on source "${c.id}" as specified by style layer "${t.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(t){const n=this._serializedAllLayers();if(!t||t.length===0)return Object.values(n);const a=[];for(const c of t)n[c]&&a.push(n[c]);return a}_serializedAllLayers(){let t=this._serializedLayers;if(t)return t;t=this._serializedLayers={};const n=Object.keys(this._layers);for(const a of n){const c=this._layers[a];c.type!=="custom"&&(t[a]=c.serialize())}return t}hasTransitions(){if(this.light&&this.light.hasTransition())return!0;for(const t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(const t in this._layers)if(this._layers[t].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(t){if(!this._loaded)return;const n=this._changed;if(this._changed){const c=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(c.length||d.length)&&this._updateWorkerLayers(c,d);for(const x in this._updatedSources){const b=this._updatedSources[x];if(b==="reload")this._reloadSource(x);else{if(b!=="clear")throw new Error(`Invalid action ${b}`);this._clearSource(x)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const x in this._updatedPaintProps)this._layers[x].updateTransitions(t);this.light.updateTransitions(t),this._resetUpdates()}const a={};for(const c in this.sourceCaches){const d=this.sourceCaches[c];a[c]=d.used,d.used=!1}for(const c of this._order){const d=this._layers[c];d.recalculate(t,this._availableImages),!d.isHidden(t.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const c in a){const d=this.sourceCaches[c];a[c]!==d.used&&d.fire(new s.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:c}))}this.light.recalculate(t),this.z=t.zoom,n&&this.fire(new s.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const t=Object.keys(this._changedImages);if(t.length){for(const n in this.sourceCaches)this.sourceCaches[n].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(t,n){this.dispatcher.broadcast("updateLayers",{layers:this._serializeByIds(t),removedIds:n})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(t,n={}){this._checkLoaded();const a=this.serialize();if(t=n.transformStyle?n.transformStyle(a,t):t,ji(this,s.y(t)))return!1;(t=s.aD(t)).layers=s.aB(t.layers);const c=s.aE(a,t).filter(x=>!(x.command in Go));if(c.length===0)return!1;const d=c.filter(x=>!(x.command in qr));if(d.length>0)throw new Error(`Unimplemented: ${d.map(x=>x.command).join(", ")}.`);for(const x of c)x.command!=="setTransition"&&this[x.command].apply(this,x.args);return this.stylesheet=t,this._serializedLayers=null,!0}addImage(t,n){if(this.getImage(t))return this.fire(new s.j(new Error(`An image named "${t}" already exists.`)));this.imageManager.addImage(t,n),this._afterImageUpdated(t)}updateImage(t,n){this.imageManager.updateImage(t,n)}getImage(t){return this.imageManager.getImage(t)}removeImage(t){if(!this.getImage(t))return this.fire(new s.j(new Error(`An image named "${t}" does not exist.`)));this.imageManager.removeImage(t),this._afterImageUpdated(t)}_afterImageUpdated(t){this._availableImages=this.imageManager.listImages(),this._changedImages[t]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(t,n,a={}){if(this._checkLoaded(),this.sourceCaches[t]!==void 0)throw new Error(`Source "${t}" already exists.`);if(!n.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(n).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(n.type)>=0&&this._validate(s.y.source,`sources.${t}`,n,null,a))return;this.map&&this.map._collectResourceTiming&&(n.collectResourceTiming=!0);const c=this.sourceCaches[t]=new tn(t,n,this.dispatcher);c.style=this,c.setEventedParent(this,()=>({isSourceLoaded:c.loaded(),source:c.serialize(),sourceId:t})),c.onAdd(this.map),this._changed=!0}removeSource(t){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===t)return this.fire(new s.j(new Error(`Source "${t}" cannot be removed while layer "${a}" is using it.`)));const n=this.sourceCaches[t];delete this.sourceCaches[t],delete this._updatedSources[t],n.fire(new s.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:t})),n.setEventedParent(null),n.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(t,n){if(this._checkLoaded(),this.sourceCaches[t]===void 0)throw new Error(`There is no source with this ID=${t}`);const a=this.sourceCaches[t].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(n),this._changed=!0}getSource(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()}addLayer(t,n,a={}){this._checkLoaded();const c=t.id;if(this.getLayer(c))return void this.fire(new s.j(new Error(`Layer "${c}" already exists on this map.`)));let d;if(t.type==="custom"){if(ji(this,s.aF(t)))return;d=s.aC(t)}else{if("source"in t&&typeof t.source=="object"&&(this.addSource(c,t.source),t=s.aD(t),t=s.e(t,{source:c})),this._validate(s.y.layer,`layers.${c}`,t,{arrayIndex:-1},a))return;d=s.aC(t),this._validateLayer(d),d.setEventedParent(this,{layer:{id:c}})}const x=n?this._order.indexOf(n):this._order.length;if(n&&x===-1)this.fire(new s.j(new Error(`Cannot add layer "${c}" before non-existing layer "${n}".`)));else{if(this._order.splice(x,0,c),this._layerOrderChanged=!0,this._layers[c]=d,this._removedLayers[c]&&d.source&&d.type!=="custom"){const b=this._removedLayers[c];delete this._removedLayers[c],b.type!==d.type?this._updatedSources[d.source]="clear":(this._updatedSources[d.source]="reload",this.sourceCaches[d.source].pause())}this._updateLayer(d),d.onAdd&&d.onAdd(this.map)}}moveLayer(t,n){if(this._checkLoaded(),this._changed=!0,!this._layers[t])return void this.fire(new s.j(new Error(`The layer '${t}' does not exist in the map's style and cannot be moved.`)));if(t===n)return;const a=this._order.indexOf(t);this._order.splice(a,1);const c=n?this._order.indexOf(n):this._order.length;n&&c===-1?this.fire(new s.j(new Error(`Cannot move layer "${t}" before non-existing layer "${n}".`))):(this._order.splice(c,0,t),this._layerOrderChanged=!0)}removeLayer(t){this._checkLoaded();const n=this._layers[t];if(!n)return void this.fire(new s.j(new Error(`Cannot remove non-existing layer "${t}".`)));n.setEventedParent(null);const a=this._order.indexOf(t);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[t]=n,delete this._layers[t],this._serializedLayers&&delete this._serializedLayers[t],delete this._updatedLayers[t],delete this._updatedPaintProps[t],n.onRemove&&n.onRemove(this.map)}getLayer(t){return this._layers[t]}getLayersOrder(){return[...this._order]}hasLayer(t){return t in this._layers}setLayerZoomRange(t,n,a){this._checkLoaded();const c=this.getLayer(t);c?c.minzoom===n&&c.maxzoom===a||(n!=null&&(c.minzoom=n),a!=null&&(c.maxzoom=a),this._updateLayer(c)):this.fire(new s.j(new Error(`Cannot set the zoom range of non-existing layer "${t}".`)))}setFilter(t,n,a={}){this._checkLoaded();const c=this.getLayer(t);if(c){if(!s.aG(c.filter,n))return n==null?(c.filter=void 0,void this._updateLayer(c)):void(this._validate(s.y.filter,`layers.${c.id}.filter`,n,null,a)||(c.filter=s.aD(n),this._updateLayer(c)))}else this.fire(new s.j(new Error(`Cannot filter non-existing layer "${t}".`)))}getFilter(t){return s.aD(this.getLayer(t).filter)}setLayoutProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?s.aG(d.getLayoutProperty(n),a)||(d.setLayoutProperty(n,a,c),this._updateLayer(d)):this.fire(new s.j(new Error(`Cannot style non-existing layer "${t}".`)))}getLayoutProperty(t,n){const a=this.getLayer(t);if(a)return a.getLayoutProperty(n);this.fire(new s.j(new Error(`Cannot get style of non-existing layer "${t}".`)))}setPaintProperty(t,n,a,c={}){this._checkLoaded();const d=this.getLayer(t);d?s.aG(d.getPaintProperty(n),a)||(d.setPaintProperty(n,a,c)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[t]=!0):this.fire(new s.j(new Error(`Cannot style non-existing layer "${t}".`)))}getPaintProperty(t,n){return this.getLayer(t).getPaintProperty(n)}setFeatureState(t,n){this._checkLoaded();const a=t.source,c=t.sourceLayer,d=this.sourceCaches[a];if(d===void 0)return void this.fire(new s.j(new Error(`The source '${a}' does not exist in the map's style.`)));const x=d.getSource().type;x==="geojson"&&c?this.fire(new s.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):x!=="vector"||c?(t.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),d.setFeatureState(c,t.id,n)):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(t,n){this._checkLoaded();const a=t.source,c=this.sourceCaches[a];if(c===void 0)return void this.fire(new s.j(new Error(`The source '${a}' does not exist in the map's style.`)));const d=c.getSource().type,x=d==="vector"?t.sourceLayer:void 0;d!=="vector"||x?n&&typeof t.id!="string"&&typeof t.id!="number"?this.fire(new s.j(new Error("A feature id is required to remove its specific state property."))):c.removeFeatureState(x,t.id,n):this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(t){this._checkLoaded();const n=t.source,a=t.sourceLayer,c=this.sourceCaches[n];if(c!==void 0)return c.getSource().type!=="vector"||a?(t.id===void 0&&this.fire(new s.j(new Error("The feature id parameter must be provided."))),c.getFeatureState(a,t.id)):void this.fire(new s.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new s.j(new Error(`The source '${n}' does not exist in the map's style.`)))}getTransition(){return s.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const t=s.aH(this.sourceCaches,d=>d.serialize()),n=this._serializeByIds(this._order),a=this.map.getTerrain()||void 0,c=this.stylesheet;return s.aI({version:c.version,name:c.name,metadata:c.metadata,light:c.light,center:c.center,zoom:c.zoom,bearing:c.bearing,pitch:c.pitch,sprite:c.sprite,glyphs:c.glyphs,transition:c.transition,sources:t,layers:n,terrain:a},d=>d!==void 0)}_updateLayer(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&this.sourceCaches[t.source].getSource().type!=="raster"&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(t){const n=x=>this._layers[x].type==="fill-extrusion",a={},c=[];for(let x=this._order.length-1;x>=0;x--){const b=this._order[x];if(n(b)){a[b]=x;for(const S of t){const C=S[b];if(C)for(const A of C)c.push(A)}}}c.sort((x,b)=>b.intersectionZ-x.intersectionZ);const d=[];for(let x=this._order.length-1;x>=0;x--){const b=this._order[x];if(n(b))for(let S=c.length-1;S>=0;S--){const C=c[S].feature;if(a[C.layer.id]{const Oe=le.featureSortOrder;if(Oe){const ze=Oe.indexOf(xe.featureIndex);return Oe.indexOf(Me.featureIndex)-ze}return Me.featureIndex-xe.featureIndex});for(const xe of ve)ce.push(xe)}}for(const le in G)G[le].forEach(me=>{const ee=me.feature,ce=C[b[le].source].getFeatureState(ee.layer["source-layer"],ee.id);ee.source=ee.layer.source,ee.layer["source-layer"]&&(ee.sourceLayer=ee.layer["source-layer"]),ee.state=ce});return G}(this._layers,x,this.sourceCaches,t,n,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(t,n){n&&n.filter&&this._validate(s.y.filter,"querySourceFeatures.filter",n.filter,null,n);const a=this.sourceCaches[t];return a?function(c,d){const x=c.getRenderableIds().map(C=>c.getTileByID(C)),b=[],S={};for(let C=0;C{Ue[c]=d})(t,n),n.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:n.workerSourceURL},a):a(null,null))}getLight(){return this.light.getLight()}setLight(t,n={}){this._checkLoaded();const a=this.light.getLight();let c=!1;for(const x in t)if(!s.aG(t[x],a[x])){c=!0;break}if(!c)return;const d={now:s.h.now(),transition:s.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(t,n),this.light.updateTransitions(d)}_validate(t,n,a,c,d={}){return(!d||d.validate!==!1)&&ji(this,t.call(s.y,s.e({key:n,style:this.serialize(),value:a,styleSpec:s.v},c)))}_remove(t=!0){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),s.aJ.off("pluginStateChange",this._rtlTextPluginCallback);for(const n in this._layers)this._layers[n].setEventedParent(null);for(const n in this.sourceCaches){const a=this.sourceCaches[n];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove(t)}_clearSource(t){this.sourceCaches[t].clearTiles()}_reloadSource(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()}_updateSources(t){for(const n in this.sourceCaches)this.sourceCaches[n].update(t,this.map.terrain)}_generateCollisionBoxes(){for(const t in this.sourceCaches)this._reloadSource(t)}_updatePlacement(t,n,a,c,d=!1){let x=!1,b=!1;const S={};for(const C of this._order){const A=this._layers[C];if(A.type!=="symbol")continue;if(!S[A.source]){const R=this.sourceCaches[A.source];S[A.source]=R.getRenderableIds(!0).map(W=>R.getTileByID(W)).sort((W,G)=>G.tileID.overscaledZ-W.tileID.overscaledZ||(W.tileID.isLessThan(G.tileID)?-1:1))}const P=this.crossTileSymbolIndex.addLayer(A,S[A.source],t.center.lng);x=x||P}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(s.h.now(),t.zoom))&&(this.pauseablePlacement=new To(t,this.map.terrain,this._order,d,n,a,c,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,S),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(s.h.now()),b=!0),x&&this.pauseablePlacement.placement.setStale()),b||x)for(const C of this._order){const A=this._layers[C];A.type==="symbol"&&this.placement.updateLayerOpacities(A,S[A.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(s.h.now())}_releaseSymbolFadeTiles(){for(const t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()}getImages(t,n,a){this.imageManager.getImages(n.icons,a),this._updateTilesForChangedImages();const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,n.icons)}getGlyphs(t,n,a){this.glyphManager.getGlyphs(n.stacks,a);const c=this.sourceCaches[n.source];c&&c.setDependencies(n.tileID.key,n.type,[""])}getResource(t,n,a){return s.m(n,a)}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(t,n={}){this._checkLoaded(),t&&this._validate(s.y.glyphs,"glyphs",t,null,n)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=t,this.glyphManager.entries={},this.glyphManager.setURL(t))}addSprite(t,n,a={},c){this._checkLoaded();const d=[{id:t,url:n}],x=[...Nt(this.stylesheet.sprite),...d];this._validate(s.y.sprite,"sprite",x,null,a)||(this.stylesheet.sprite=x,this._loadSprite(d,!0,c))}removeSprite(t){this._checkLoaded();const n=Nt(this.stylesheet.sprite);if(n.find(a=>a.id===t)){if(this._spritesImagesIds[t])for(const a of this._spritesImagesIds[t])this.imageManager.removeImage(a),this._changedImages[a]=!0;n.splice(n.findIndex(a=>a.id===t),1),this.stylesheet.sprite=n.length>0?n:void 0,delete this._spritesImagesIds[t],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new s.k("data",{dataType:"style"}))}else this.fire(new s.j(new Error(`Sprite "${t}" doesn't exists on this map.`)))}getSprite(){return Nt(this.stylesheet.sprite)}setSprite(t,n={},a){this._checkLoaded(),t&&this._validate(s.y.sprite,"sprite",t,null,n)||(this.stylesheet.sprite=t,t?this._loadSprite(t,!0,a):(this._unloadSprite(),a&&a(null)))}}Er.registerForPluginStateChange=s.aK;var ia=s.Q([{name:"a_pos",type:"Int16",components:2}]),os="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 Gi={prelude:hi(`#ifdef GL_ES precision mediump float; #else #if !defined(lowp) @@ -55,15 +55,15 @@ vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=frac #else return 0.0; #endif -}`),background:ui(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}`),background:hi(`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:ui(`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; +}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:hi(`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:ui(`varying vec3 v_data;varying float v_visibility; +}`,"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:hi(`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 @@ -99,7 +99,7 @@ void main(void) { #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:ui("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:ui(`uniform highp float u_intensity;varying vec2 v_extrude; +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:hi("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:hi(`uniform highp float u_intensity;varying vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { @@ -116,11 +116,11 @@ const highp float ZERO=1.0/255.0/16.0; 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:ui(`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; +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:hi(`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:ui("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:ui("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:ui("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:ui(`#pragma mapbox: define highp vec4 color +}`,"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:hi("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:hi("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:hi("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:hi(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color @@ -135,7 +135,7 @@ gl_FragColor=vec4(1.0); void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:ui(`varying vec2 v_pos; +gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:hi(`varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { @@ -151,7 +151,7 @@ gl_FragColor=vec4(1.0); 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:ui(`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; +gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:hi(`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 @@ -175,7 +175,7 @@ void main() { #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:ui(`#ifdef GL_ES +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:hi(`#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; @@ -202,7 +202,7 @@ void main() { #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:ui(`varying vec4 v_color;void main() {gl_FragColor=v_color; +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:hi(`varying vec4 v_color;void main() {gl_FragColor=v_color; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif @@ -224,7 +224,7 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #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:ui(`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; +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:hi(`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 @@ -268,20 +268,20 @@ 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:ui(`#ifdef GL_ES +: 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:hi(`#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:ui(`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; +}`,"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:hi(`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:ui(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; +}`,"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:hi(`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 @@ -315,7 +315,7 @@ 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:ui(`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; +v_width2=vec2(outset,inset);}`),lineGradient:hi(`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() { @@ -345,7 +345,7 @@ 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:ui(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:hi(`#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; @@ -397,7 +397,7 @@ 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:ui(`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; +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:hi(`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 @@ -438,11 +438,11 @@ 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:ui(`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); +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:hi(`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:ui(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +}`,"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:hi(`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 @@ -456,7 +456,7 @@ 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:ui(`#define SDF_PX 8.0 +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:hi(`#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 @@ -487,7 +487,7 @@ void main() { #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:ui(`#define SDF_PX 8.0 +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:hi(`#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; @@ -524,7 +524,7 @@ void main() { #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:ui("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",os),terrainDepth:ui("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);}",os),terrainCoords:ui("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);}",os)};function ui(u,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=t.match(/attribute ([\w]+) ([\w]+)/g),c=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),x=d?d.concat(c):c,b={};return{fragmentSource:u=u.replace(n,(S,C,A,P,R)=>(b[R]=!0,C==="define"?` +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:hi("uniform sampler2D u_texture;varying vec2 v_texture_pos;void main() {gl_FragColor=texture2D(u_texture,v_texture_pos);}",os),terrainDepth:hi("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);}",os),terrainCoords:hi("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);}",os)};function hi(u,t){const n=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=t.match(/attribute ([\w]+) ([\w]+)/g),c=u.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),x=d?d.concat(c):c,b={};return{fragmentSource:u=u.replace(n,(S,C,A,P,R)=>(b[R]=!0,C==="define"?` #ifndef HAS_UNIFORM_u_${R} varying ${A} ${P} ${R}; #else @@ -575,10 +575,10 @@ uniform ${A} ${P} u_${R}; #endif `}),staticAttributes:a,staticUniforms:x}}class uo{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(t,n,a,c,d,x,b,S,C){this.context=t;let A=this.boundPaintVertexBuffers.length!==c.length;for(let P=0;!A&&P({u_depth:new s.aL(xe,Ce.u_depth),u_terrain:new s.aL(xe,Ce.u_terrain),u_terrain_dim:new s.aM(xe,Ce.u_terrain_dim),u_terrain_matrix:new s.aN(xe,Ce.u_terrain_matrix),u_terrain_unpack:new s.aO(xe,Ce.u_terrain_unpack),u_terrain_exaggeration:new s.aM(xe,Ce.u_terrain_exaggeration)}))(t,ve),this.binderUniforms=a?a.getUniforms(t,ve):[]}draw(t,n,a,c,d,x,b,S,C,A,P,R,W,G,K,q,le,me){const ee=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(a),t.setStencilMode(c),t.setColorMode(d),t.setCullFace(x),S){t.activeTexture.set(ee.TEXTURE2),ee.bindTexture(ee.TEXTURE_2D,S.depthTexture),t.activeTexture.set(ee.TEXTURE3),ee.bindTexture(ee.TEXTURE_2D,S.texture);for(const ve in this.terrainUniforms)this.terrainUniforms[ve].set(S[ve])}for(const ve in this.fixedUniforms)this.fixedUniforms[ve].set(b[ve]);K&&K.setUniforms(t,this.binderUniforms,W,{zoom:G});let ce=0;switch(n){case ee.LINES:ce=2;break;case ee.TRIANGLES:ce=3;break;case ee.LINE_STRIP:ce=1}for(const ve of R.get()){const xe=ve.vaos||(ve.vaos={});(xe[C]||(xe[C]=new uo)).bind(t,this,A,K?K.getPaintVertexBuffers():[],P,ve.vertexOffset,q,le,me),ee.drawElements(n,ve.primitiveLength*ce,ee.UNSIGNED_SHORT,ve.primitiveOffset*ce*2)}}}function kn(u,t,n){const a=1/oe(n,1,t.transform.tileZoom),c=Math.pow(2,n.tileID.overscaledZ),d=n.tileSize*Math.pow(2,t.transform.tileZoom)/c,x=d*(n.tileID.canonical.x+n.tileID.wrap*c),b=d*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[a,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[x>>16,b>>16],u_pixel_coord_lower:[65535&x,65535&b]}}const Ba=(u,t,n,a)=>{const c=t.style.light,d=c.properties.get("position"),x=[d.x,d.y,d.z],b=function(){var C=new s.A(9);return s.A!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C}();c.properties.get("anchor")==="viewport"&&function(C,A){var P=Math.sin(A),R=Math.cos(A);C[0]=R,C[1]=P,C[2]=0,C[3]=-P,C[4]=R,C[5]=0,C[6]=0,C[7]=0,C[8]=1}(b,-t.transform.angle),function(C,A,P){var R=A[0],W=A[1],G=A[2];C[0]=R*P[0]+W*P[3]+G*P[6],C[1]=R*P[1]+W*P[4]+G*P[7],C[2]=R*P[2]+W*P[5]+G*P[8]}(x,x,b);const S=c.properties.get("color");return{u_matrix:u,u_lightpos:x,u_lightintensity:c.properties.get("intensity"),u_lightcolor:[S.r,S.g,S.b],u_vertical_gradient:+n,u_opacity:a}},Eo=(u,t,n,a,c,d,x)=>s.e(Ba(u,t,n,a),kn(d,t,x),{u_height_factor:-Math.pow(2,c.overscaledZ)/x.tileSize/8}),ws=u=>({u_matrix:u}),g=(u,t,n,a)=>s.e(ws(u),kn(n,t,a)),I=(u,t)=>({u_matrix:u,u_world:t}),O=(u,t,n,a,c)=>s.e(g(u,t,n,a),{u_world:c}),Y=(u,t,n,a)=>{const c=u.transform;let d,x;if(a.paint.get("circle-pitch-alignment")==="map"){const b=oe(n,1,c.zoom);d=!0,x=[b,b]}else d=!1,x=c.pixelsToGLUnits;return{u_camera_to_center_distance:c.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_matrix:u.translatePosMatrix(t.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+d,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:x}},ne=(u,t,n)=>{const a=oe(n,1,t.zoom),c=Math.pow(2,t.zoom-n.tileID.overscaledZ),d=n.tileID.overscaleFactor();return{u_matrix:u,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:a,u_extrude_scale:[t.pixelsToGLUnits[0]/(a*c),t.pixelsToGLUnits[1]/(a*c)],u_overscale_factor:d}},se=(u,t,n=1)=>({u_matrix:u,u_color:t,u_overlay:0,u_overlay_scale:n}),fe=u=>({u_matrix:u}),De=(u,t,n,a)=>({u_matrix:u,u_extrude_scale:oe(t,1,n),u_intensity:a});function Ve(u,t){const n=Math.pow(2,t.canonical.z),a=t.canonical.y;return[new s.U(0,a/n).toLngLat().lat,new s.U(0,(a+1)/n).toLngLat().lat]}const rt=(u,t,n,a)=>{const c=u.transform;return{u_matrix:Ot(u,t,n,a),u_ratio:1/oe(t,1,c.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},ot=(u,t,n,a,c)=>s.e(rt(u,t,n,c),{u_image:0,u_image_height:a}),Je=(u,t,n,a,c)=>{const d=u.transform,x=Hi(t,d);return{u_matrix:Ot(u,t,n,c),u_texsize:t.imageAtlasTexture.size,u_ratio:1/oe(t,1,d.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[x,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Rt=(u,t,n,a,c,d)=>{const x=u.lineAtlas,b=Hi(t,u.transform),S=n.layout.get("line-cap")==="round",C=x.getDash(a.from,S),A=x.getDash(a.to,S),P=C.width*c.fromScale,R=A.width*c.toScale;return s.e(rt(u,t,n,d),{u_patternscale_a:[b/P,-C.height/2],u_patternscale_b:[b/R,-A.height/2],u_sdfgamma:x.width/(256*Math.min(P,R)*u.pixelRatio)/2,u_image:0,u_tex_y_a:C.y,u_tex_y_b:A.y,u_mix:c.t})};function Hi(u,t){return 1/oe(u,1,t.tileZoom)}function Ot(u,t,n,a){return u.translatePosMatrix(a?a.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const ar=(u,t,n,a,c)=>{return{u_matrix:u,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*c.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:c.paint.get("raster-brightness-min"),u_brightness_high:c.paint.get("raster-brightness-max"),u_saturation_factor:(x=c.paint.get("raster-saturation"),x>0?1-1/(1.001-x):-x),u_contrast_factor:(d=c.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:ke(c.paint.get("raster-hue-rotate"))};var d,x};function ke(u){u*=Math.PI/180;const t=Math.sin(u),n=Math.cos(u);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const _t=(u,t,n,a,c,d,x,b,S,C)=>{const A=c.transform;return{u_is_size_zoom_constant:+(u==="constant"||u==="source"),u_is_size_feature_constant:+(u==="constant"||u==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:A.cameraToCenterDistance,u_pitch:A.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:A.width/A.height,u_fade_change:c.options.fadeDuration?c.symbolFadeChange:1,u_matrix:d,u_label_plane_matrix:x,u_coord_matrix:b,u_is_text:+S,u_pitch_with_map:+a,u_texsize:C,u_texture:0}},yi=(u,t,n,a,c,d,x,b,S,C,A)=>{const P=c.transform;return s.e(_t(u,t,n,a,c,d,x,b,S,C),{u_gamma_scale:a?Math.cos(P._pitch)*P.cameraToCenterDistance:1,u_device_pixel_ratio:c.pixelRatio,u_is_halo:+A})},Xi=(u,t,n,a,c,d,x,b,S,C)=>s.e(yi(u,t,n,a,c,d,x,b,!0,S,!0),{u_texsize_icon:C,u_texture_icon:1}),tr=(u,t,n)=>({u_matrix:u,u_opacity:t,u_color:n}),rn=(u,t,n,a,c,d)=>s.e(function(x,b,S,C){const A=S.imageManager.getPattern(x.from.toString()),P=S.imageManager.getPattern(x.to.toString()),{width:R,height:W}=S.imageManager.getPixelSize(),G=Math.pow(2,C.tileID.overscaledZ),K=C.tileSize*Math.pow(2,S.transform.tileZoom)/G,q=K*(C.tileID.canonical.x+C.tileID.wrap*G),le=K*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:A.tl,u_pattern_br_a:A.br,u_pattern_tl_b:P.tl,u_pattern_br_b:P.br,u_texsize:[R,W],u_mix:b.t,u_pattern_size_a:A.displaySize,u_pattern_size_b:P.displaySize,u_scale_a:b.fromScale,u_scale_b:b.toScale,u_tile_units_to_pixels:1/oe(C,1,S.transform.tileZoom),u_pixel_coord_upper:[q>>16,le>>16],u_pixel_coord_lower:[65535&q,65535&le]}}(a,d,n,c),{u_matrix:u,u_opacity:t}),ia={fillExtrusion:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_lightpos:new s.aP(u,t.u_lightpos),u_lightintensity:new s.aM(u,t.u_lightintensity),u_lightcolor:new s.aP(u,t.u_lightcolor),u_vertical_gradient:new s.aM(u,t.u_vertical_gradient),u_opacity:new s.aM(u,t.u_opacity)}),fillExtrusionPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_lightpos:new s.aP(u,t.u_lightpos),u_lightintensity:new s.aM(u,t.u_lightintensity),u_lightcolor:new s.aP(u,t.u_lightcolor),u_vertical_gradient:new s.aM(u,t.u_vertical_gradient),u_height_factor:new s.aM(u,t.u_height_factor),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade),u_opacity:new s.aM(u,t.u_opacity)}),fill:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix)}),fillPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),fillOutline:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world)}),fillOutlinePattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),circle:(u,t)=>({u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_scale_with_map:new s.aL(u,t.u_scale_with_map),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_extrude_scale:new s.aQ(u,t.u_extrude_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_matrix:new s.aN(u,t.u_matrix)}),collisionBox:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pixels_to_tile_units:new s.aM(u,t.u_pixels_to_tile_units),u_extrude_scale:new s.aQ(u,t.u_extrude_scale),u_overscale_factor:new s.aM(u,t.u_overscale_factor)}),collisionCircle:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_inv_matrix:new s.aN(u,t.u_inv_matrix),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_viewport_size:new s.aQ(u,t.u_viewport_size)}),debug:(u,t)=>({u_color:new s.aR(u,t.u_color),u_matrix:new s.aN(u,t.u_matrix),u_overlay:new s.aL(u,t.u_overlay),u_overlay_scale:new s.aM(u,t.u_overlay_scale)}),clippingMask:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix)}),heatmap:(u,t)=>({u_extrude_scale:new s.aM(u,t.u_extrude_scale),u_intensity:new s.aM(u,t.u_intensity),u_matrix:new s.aN(u,t.u_matrix)}),heatmapTexture:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world),u_image:new s.aL(u,t.u_image),u_color_ramp:new s.aL(u,t.u_color_ramp),u_opacity:new s.aM(u,t.u_opacity)}),hillshade:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_latrange:new s.aQ(u,t.u_latrange),u_light:new s.aQ(u,t.u_light),u_shadow:new s.aR(u,t.u_shadow),u_highlight:new s.aR(u,t.u_highlight),u_accent:new s.aR(u,t.u_accent)}),hillshadePrepare:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_dimension:new s.aQ(u,t.u_dimension),u_zoom:new s.aM(u,t.u_zoom),u_unpack:new s.aO(u,t.u_unpack)}),line:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels)}),lineGradient:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_image:new s.aL(u,t.u_image),u_image_height:new s.aM(u,t.u_image_height)}),linePattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texsize:new s.aQ(u,t.u_texsize),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_image:new s.aL(u,t.u_image),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),lineSDF:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_patternscale_a:new s.aQ(u,t.u_patternscale_a),u_patternscale_b:new s.aQ(u,t.u_patternscale_b),u_sdfgamma:new s.aM(u,t.u_sdfgamma),u_image:new s.aL(u,t.u_image),u_tex_y_a:new s.aM(u,t.u_tex_y_a),u_tex_y_b:new s.aM(u,t.u_tex_y_b),u_mix:new s.aM(u,t.u_mix)}),raster:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_tl_parent:new s.aQ(u,t.u_tl_parent),u_scale_parent:new s.aM(u,t.u_scale_parent),u_buffer_scale:new s.aM(u,t.u_buffer_scale),u_fade_t:new s.aM(u,t.u_fade_t),u_opacity:new s.aM(u,t.u_opacity),u_image0:new s.aL(u,t.u_image0),u_image1:new s.aL(u,t.u_image1),u_brightness_low:new s.aM(u,t.u_brightness_low),u_brightness_high:new s.aM(u,t.u_brightness_high),u_saturation_factor:new s.aM(u,t.u_saturation_factor),u_contrast_factor:new s.aM(u,t.u_contrast_factor),u_spin_weights:new s.aP(u,t.u_spin_weights)}),symbolIcon:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texture:new s.aL(u,t.u_texture)}),symbolSDF:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texture:new s.aL(u,t.u_texture),u_gamma_scale:new s.aM(u,t.u_gamma_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_is_halo:new s.aL(u,t.u_is_halo)}),symbolTextAndIcon:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texsize_icon:new s.aQ(u,t.u_texsize_icon),u_texture:new s.aL(u,t.u_texture),u_texture_icon:new s.aL(u,t.u_texture_icon),u_gamma_scale:new s.aM(u,t.u_gamma_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_is_halo:new s.aL(u,t.u_is_halo)}),background:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_opacity:new s.aM(u,t.u_opacity),u_color:new s.aR(u,t.u_color)}),backgroundPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_opacity:new s.aM(u,t.u_opacity),u_image:new s.aL(u,t.u_image),u_pattern_tl_a:new s.aQ(u,t.u_pattern_tl_a),u_pattern_br_a:new s.aQ(u,t.u_pattern_br_a),u_pattern_tl_b:new s.aQ(u,t.u_pattern_tl_b),u_pattern_br_b:new s.aQ(u,t.u_pattern_br_b),u_texsize:new s.aQ(u,t.u_texsize),u_mix:new s.aM(u,t.u_mix),u_pattern_size_a:new s.aQ(u,t.u_pattern_size_a),u_pattern_size_b:new s.aQ(u,t.u_pattern_size_b),u_scale_a:new s.aM(u,t.u_scale_a),u_scale_b:new s.aM(u,t.u_scale_b),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_tile_units_to_pixels:new s.aM(u,t.u_tile_units_to_pixels)}),terrain:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texture:new s.aL(u,t.u_texture),u_ele_delta:new s.aM(u,t.u_ele_delta)}),terrainDepth:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ele_delta:new s.aM(u,t.u_ele_delta)}),terrainCoords:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texture:new s.aL(u,t.u_texture),u_terrain_coords_id:new s.aM(u,t.u_terrain_coords_id),u_ele_delta:new s.aM(u,t.u_ele_delta)})};class Ci{constructor(t,n,a){this.context=t;const c=t.gl;this.buffer=c.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),c.bufferData(c.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?c.DYNAMIC_DRAW:c.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const n=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ss={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class ra{constructor(t,n,a,c){this.length=n.length,this.attributes=a,this.itemSize=n.bytesPerElement,this.dynamicDraw=c,this.context=t;const d=t.gl;this.buffer=d.createBuffer(),t.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);const n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,n){for(let a=0;a0){const je=s.Z(),dt=Ce;s.aU(je,xe.placementInvProjMatrix,u.transform.glCoordMatrix),s.aU(je,je,xe.placementViewportMatrix),A.push({circleArray:Pe,circleOffset:R,transform:dt,invTransform:je,coord:ce}),P+=Pe.length/4,R=P}Fe&&C.draw(b,S.LINES,Yt.disabled,Ni.disabled,u.colorModeForRenderPass(),vi.disabled,ne(Ce,u.transform,ve),u.style.map.terrain&&u.style.map.terrain.getTerrainData(ce),n.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,null,u.transform.zoom,null,null,Fe.collisionVertexBuffer)}if(!x||!A.length)return;const W=u.useProgram("collisionCircle"),G=new s.aV;G.resize(4*P),G._trim();let K=0;for(const ee of A)for(let ce=0;ce=0&&(G[q.associatedIconIndex]={shiftedAnchor:Qt,angle:Qe})}else j(q.numGlyphs,R)}if(C){W.clear();const K=u.icon.placedSymbolArray;for(let q=0;qu.style.map.terrain.getElevation(Fe,Ln,mr):null,Pr=n.layout.get("text-rotation-alignment")==="map";We(je,Fe.posMatrix,u,c,Qi,Do,q,C,Pr,fr)}const Os=u.translatePosMatrix(Fe.posMatrix,Pe,d,x),Ea=le||c&&xe||_s?ls:Qi,ln=u.translatePosMatrix(Do,Pe,d,x,!0),Kr=Qe&&n.paint.get(c?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let vn;vn=Qe?je.iconsInText?Xi(Ct.kind,Kt,me,q,u,Os,Ea,ln,$t,kr):yi(Ct.kind,Kt,me,q,u,Os,Ea,ln,c,$t,!0):_t(Ct.kind,Kt,me,q,u,Os,Ea,ln,c,$t);const Bs={program:Mi,buffers:dt,uniformValues:vn,atlasTexture:pr,atlasTextureIcon:br,atlasInterpolation:qi,atlasInterpolationIcon:Xr,isSDF:Qe,hasHalo:Kr};if(ee&&je.canOverlap){ce=!0;const fr=dt.segments.get();for(const Pr of fr)Ce.push({segments:new s.S([Pr]),sortKey:Pr.sortKey,state:Bs,terrainData:jt})}else Ce.push({segments:dt.segments,sortKey:0,state:Bs,terrainData:jt})}ce&&Ce.sort((Fe,Pe)=>Fe.sortKey-Pe.sortKey);for(const Fe of Ce){const Pe=Fe.state;if(R.activeTexture.set(W.TEXTURE0),Pe.atlasTexture.bind(Pe.atlasInterpolation,W.CLAMP_TO_EDGE),Pe.atlasTextureIcon&&(R.activeTexture.set(W.TEXTURE1),Pe.atlasTextureIcon&&Pe.atlasTextureIcon.bind(Pe.atlasInterpolationIcon,W.CLAMP_TO_EDGE)),Pe.isSDF){const je=Pe.uniformValues;Pe.hasHalo&&(je.u_is_halo=1,ma(Pe.buffers,Fe.segments,n,u,Pe.program,ve,A,P,je,Fe.terrainData)),je.u_is_halo=0}ma(Pe.buffers,Fe.segments,n,u,Pe.program,ve,A,P,Pe.uniformValues,Fe.terrainData)}}function ma(u,t,n,a,c,d,x,b,S,C){const A=a.context;c.draw(A,A.gl.TRIANGLES,d,x,b,vi.disabled,S,C,n.id,u.layoutVertexBuffer,u.indexBuffer,t,n.paint,a.transform.zoom,u.programConfigurations.get(n.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function us(u,t,n,a,c){if(!n||!a||!a.imageAtlas)return;const d=a.imageAtlas.patternPositions;let x=d[n.to.toString()],b=d[n.from.toString()];if(!x&&b&&(x=b),!b&&x&&(b=x),!x||!b){const S=c.getPaintProperty(t);x=d[S],b=d[S]}x&&b&&u.setConstantPatternPositions(x,b)}function Ms(u,t,n,a,c,d,x){const b=u.context.gl,S="fill-pattern",C=n.paint.get(S),A=C&&C.constantOr(1),P=n.getCrossfadeParameters();let R,W,G,K,q;x?(W=A&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",R=b.LINES):(W=A?"fillPattern":"fill",R=b.TRIANGLES);const le=C.constantOr(null);for(const me of a){const ee=t.getTile(me);if(A&&!ee.patternsLoaded())continue;const ce=ee.getBucket(n);if(!ce)continue;const ve=ce.programConfigurations.get(n.id),xe=u.useProgram(W,ve),Ce=u.style.map.terrain&&u.style.map.terrain.getTerrainData(me);A&&(u.context.activeTexture.set(b.TEXTURE0),ee.imageAtlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE),ve.updatePaintBuffers(P)),us(ve,S,le,ee,n);const Fe=Ce?me:null,Pe=u.translatePosMatrix(Fe?Fe.posMatrix:me.posMatrix,ee,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(x){K=ce.indexBuffer2,q=ce.segments2;const je=[b.drawingBufferWidth,b.drawingBufferHeight];G=W==="fillOutlinePattern"&&A?O(Pe,u,P,ee,je):I(Pe,je)}else K=ce.indexBuffer,q=ce.segments,G=A?g(Pe,u,P,ee):ws(Pe);xe.draw(u.context,R,c,u.stencilModeForClipping(me),d,vi.disabled,G,Ce,n.id,ce.layoutVertexBuffer,K,q,n.paint,u.transform.zoom,ve)}}function As(u,t,n,a,c,d,x){const b=u.context,S=b.gl,C="fill-extrusion-pattern",A=n.paint.get(C),P=A.constantOr(1),R=n.getCrossfadeParameters(),W=n.paint.get("fill-extrusion-opacity"),G=A.constantOr(null);for(const K of a){const q=t.getTile(K),le=q.getBucket(n);if(!le)continue;const me=u.style.map.terrain&&u.style.map.terrain.getTerrainData(K),ee=le.programConfigurations.get(n.id),ce=u.useProgram(P?"fillExtrusionPattern":"fillExtrusion",ee);P&&(u.context.activeTexture.set(S.TEXTURE0),q.imageAtlasTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),ee.updatePaintBuffers(R)),us(ee,C,G,q,n);const ve=u.translatePosMatrix(K.posMatrix,q,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),xe=n.paint.get("fill-extrusion-vertical-gradient"),Ce=P?Eo(ve,u,xe,W,K,R,q):Ba(ve,u,xe,W);ce.draw(b,b.gl.TRIANGLES,c,d,x,vi.backCCW,Ce,me,n.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,n.paint,u.transform.zoom,ee,u.style.map.terrain&&le.centroidVertexBuffer)}}function hl(u,t,n,a,c,d,x){const b=u.context,S=b.gl,C=n.fbo;if(!C)return;const A=u.useProgram("hillshade"),P=u.style.map.terrain&&u.style.map.terrain.getTerrainData(t);b.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,C.colorAttachment.get()),A.draw(b,S.TRIANGLES,c,d,x,vi.disabled,((R,W,G,K)=>{const q=G.paint.get("hillshade-shadow-color"),le=G.paint.get("hillshade-highlight-color"),me=G.paint.get("hillshade-accent-color");let ee=G.paint.get("hillshade-illumination-direction")*(Math.PI/180);G.paint.get("hillshade-illumination-anchor")==="viewport"&&(ee-=R.transform.angle);const ce=!R.options.moving;return{u_matrix:K?K.posMatrix:R.transform.calculatePosMatrix(W.tileID.toUnwrapped(),ce),u_image:0,u_latrange:Ve(0,W.tileID),u_light:[G.paint.get("hillshade-exaggeration"),ee],u_shadow:q,u_highlight:le,u_accent:me}})(u,n,a,P?t:null),P,a.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function _a(u,t,n,a,c,d){const x=u.context,b=x.gl,S=t.dem;if(S&&S.data){const C=S.dim,A=S.stride,P=S.getPixels();if(x.activeTexture.set(b.TEXTURE1),x.pixelStoreUnpackPremultiplyAlpha.set(!1),t.demTexture=t.demTexture||u.getTileTexture(A),t.demTexture){const W=t.demTexture;W.update(P,{premultiply:!1}),W.bind(b.NEAREST,b.CLAMP_TO_EDGE)}else t.demTexture=new At(x,P,b.RGBA,{premultiply:!1}),t.demTexture.bind(b.NEAREST,b.CLAMP_TO_EDGE);x.activeTexture.set(b.TEXTURE0);let R=t.fbo;if(!R){const W=new At(x,{width:C,height:C,data:null},b.RGBA);W.bind(b.LINEAR,b.CLAMP_TO_EDGE),R=t.fbo=x.createFramebuffer(C,C,!0,!1),R.colorAttachment.set(W.texture)}x.bindFramebuffer.set(R.framebuffer),x.viewport.set([0,0,C,C]),u.useProgram("hillshadePrepare").draw(x,b.TRIANGLES,a,c,d,vi.disabled,((W,G)=>{const K=G.stride,q=s.Z();return s.aS(q,0,s.N,-s.N,0,0,1),s.$(q,q,[0,-s.N,0]),{u_matrix:q,u_image:1,u_dimension:[K,K],u_zoom:W.overscaledZ,u_unpack:G.getUnpackVector()}})(t.tileID,S),null,n.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),t.needsHillshadePrepare=!1}}function ga(u,t,n,a,c,d){const x=a.paint.get("raster-fade-duration");if(!d&&x>0){const b=s.h.now(),S=(b-u.timeAdded)/x,C=t?(b-t.timeAdded)/x:-1,A=n.getSource(),P=c.coveringZoomLevel({tileSize:A.tileSize,roundZoom:A.roundZoom}),R=!t||Math.abs(t.tileID.overscaledZ-P)>Math.abs(u.tileID.overscaledZ-P),W=R&&u.refreshedUponExpiration?1:s.ad(R?S:1-C,0,1);return u.refreshedUponExpiration&&S>=1&&(u.refreshedUponExpiration=!1),t?{opacity:1,mix:1-W}:{opacity:W,mix:0}}return{opacity:1,mix:0}}const Xo=new s.aT(1,0,0,1),ya=new s.aT(0,1,0,1),io=new s.aT(0,0,1,1),dl=new s.aT(1,0,1,1),Po=new s.aT(0,1,1,1);function hs(u,t,n,a){Ko(u,0,t+n/2,u.transform.width,n,a)}function va(u,t,n,a){Ko(u,t-n/2,0,n,u.transform.height,a)}function Ko(u,t,n,a,c,d){const x=u.context,b=x.gl;b.enable(b.SCISSOR_TEST),b.scissor(t*u.pixelRatio,n*u.pixelRatio,a*u.pixelRatio,c*u.pixelRatio),x.clear({color:d}),b.disable(b.SCISSOR_TEST)}function xa(u,t,n){const a=u.context,c=a.gl,d=n.posMatrix,x=u.useProgram("debug"),b=Yt.disabled,S=Ni.disabled,C=u.colorModeForRenderPass(),A="$debug",P=u.style.map.terrain&&u.style.map.terrain.getTerrainData(n);a.activeTexture.set(c.TEXTURE0);const R=t.getTileByID(n.key).latestRawTileData,W=Math.floor((R&&R.byteLength||0)/1024),G=t.getTile(n).tileSize,K=512/Math.min(G,512)*(n.overscaledZ/u.transform.zoom)*.5;let q=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(q+=` => ${n.overscaledZ}`),function(le,me){le.initDebugOverlayCanvas();const ee=le.debugOverlayCanvas,ce=le.context.gl,ve=le.debugOverlayCanvas.getContext("2d");ve.clearRect(0,0,ee.width,ee.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(me,5,5),ve.strokeText(me,5,5),le.debugOverlayTexture.update(ee),le.debugOverlayTexture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE)}(u,`${q} ${W}kB`),x.draw(a,c.TRIANGLES,b,S,Ki.alphaBlended,vi.disabled,se(d,s.aT.transparent,K),null,A,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),x.draw(a,c.LINE_STRIP,b,S,C,vi.disabled,se(d,s.aT.red),P,A,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function Ji(u,t,n){const a=u.context,c=a.gl,d=u.colorModeForRenderPass(),x=new Yt(c.LEQUAL,Yt.ReadWrite,u.depthRangeFor3D),b=u.useProgram("terrain"),S=t.getTerrainMesh();a.bindFramebuffer.set(null),a.viewport.set([0,0,u.width,u.height]);for(const C of n){const A=u.renderToTexture.getTexture(C),P=t.getTerrainData(C.tileID);a.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,A.texture);const R={u_matrix:u.transform.calculatePosMatrix(C.tileID.toUnwrapped()),u_texture:0,u_ele_delta:t.getMeshFrameDelta(u.transform.zoom)};b.draw(a,c.TRIANGLES,x,Ni.disabled,d,vi.backCCW,R,P,"terrain",S.vertexBuffer,S.indexBuffer,S.segments)}}class zo{constructor(t,n){this.context=new Fl(t),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.Z(),renderTime:0},this.setup(),this.numSublayers=en.maxUnderzooming+en.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jn}resize(t,n,a){if(this.width=Math.floor(t*a),this.height=Math.floor(n*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const c of this.style._order)this.style._layers[c].resize()}setup(){const t=this.context,n=new s.a_;n.emplaceBack(0,0),n.emplaceBack(s.N,0),n.emplaceBack(0,s.N),n.emplaceBack(s.N,s.N),this.tileExtentBuffer=t.createVertexBuffer(n,ta.members),this.tileExtentSegments=s.S.simpleSegment(0,0,4,2);const a=new s.a_;a.emplaceBack(0,0),a.emplaceBack(s.N,0),a.emplaceBack(0,s.N),a.emplaceBack(s.N,s.N),this.debugBuffer=t.createVertexBuffer(a,ta.members),this.debugSegments=s.S.simpleSegment(0,0,4,5);const c=new s.V;c.emplaceBack(0,0,0,0),c.emplaceBack(s.N,0,s.N,0),c.emplaceBack(0,s.N,0,s.N),c.emplaceBack(s.N,s.N,s.N,s.N),this.rasterBoundsBuffer=t.createVertexBuffer(c,Zt.members),this.rasterBoundsSegments=s.S.simpleSegment(0,0,4,2);const d=new s.a_;d.emplaceBack(0,0),d.emplaceBack(1,0),d.emplaceBack(0,1),d.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(d,ta.members),this.viewportSegments=s.S.simpleSegment(0,0,4,2);const x=new s.a$;x.emplaceBack(0),x.emplaceBack(1),x.emplaceBack(3),x.emplaceBack(2),x.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(x);const b=new s.b0;b.emplaceBack(0,1,2),b.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(b);const S=this.context.gl;this.stencilClearMode=new Ni({func:S.ALWAYS,mask:0},0,255,S.ZERO,S.ZERO,S.ZERO)}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=s.Z();s.aS(a,0,this.width,this.height,0,0,1),s.a0(a,a,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,Yt.disabled,this.stencilClearMode,Ki.disabled,vi.disabled,fe(a),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,n){if(this.currentStencilSource===t.source||!t.isTileClipped()||!n||!n.length)return;this.currentStencilSource=t.source;const a=this.context,c=a.gl;this.nextStencilID+n.length>256&&this.clearStencil(),a.setColorMode(Ki.disabled),a.setDepthMode(Yt.disabled);const d=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const x of n){const b=this._tileClippingMaskIDs[x.key]=this.nextStencilID++,S=this.style.map.terrain&&this.style.map.terrain.getTerrainData(x);d.draw(a,c.TRIANGLES,Yt.disabled,new Ni({func:c.ALWAYS,mask:0},b,255,c.KEEP,c.KEEP,c.REPLACE),Ki.disabled,vi.disabled,fe(x.posMatrix),S,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,n=this.context.gl;return new Ni({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(t){const n=this.context.gl;return new Ni({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(t){const n=this.context.gl,a=t.sort((x,b)=>b.overscaledZ-x.overscaledZ),c=a[a.length-1].overscaledZ,d=a[0].overscaledZ-c+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const x={};for(let b=0;b=0;this.currentLayer--){const S=this.style._layers[a[this.currentLayer]],C=c[S.source],A=d[S.source];this._renderTileClippingMasks(S,A),this.renderLayer(this,C,S,A)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerq.source&&!q.isHidden(A)?[C.sourceCaches[q.source]]:[]),W=R.filter(q=>q.getSource().type==="vector"),G=R.filter(q=>q.getSource().type!=="vector"),K=q=>{(!P||P.getSource().maxzoomK(q)),P||G.forEach(q=>K(q)),P}(this.style,this.transform.zoom);S&&function(C,A,P){for(let R=0;RW.style.map.terrain.getElevation(xe,Ct,gt):null)}}}(S,d,b,x,b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),C),b.paint.get("icon-opacity").constantOr(1)!==0&&ko(d,x,b,S,!1,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),b.layout.get("icon-rotation-alignment"),b.layout.get("icon-pitch-alignment"),b.layout.get("icon-keep-upright"),A,P),b.paint.get("text-opacity").constantOr(1)!==0&&ko(d,x,b,S,!0,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.layout.get("text-keep-upright"),A,P),x.map.showCollisionBoxes&&(Ao(d,x,b,S,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),!0),Ao(d,x,b,S,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),!1))})(t,n,a,c,this.style.placement.variableOffsets);break;case"circle":(function(d,x,b,S){if(d.renderPass!=="translucent")return;const C=b.paint.get("circle-opacity"),A=b.paint.get("circle-stroke-width"),P=b.paint.get("circle-stroke-opacity"),R=!b.layout.get("circle-sort-key").isConstant();if(C.constantOr(1)===0&&(A.constantOr(1)===0||P.constantOr(1)===0))return;const W=d.context,G=W.gl,K=d.depthModeForSublayer(0,Yt.ReadOnly),q=Ni.disabled,le=d.colorModeForRenderPass(),me=[];for(let ee=0;eeee.sortKey-ce.sortKey);for(const ee of me){const{programConfiguration:ce,program:ve,layoutVertexBuffer:xe,indexBuffer:Ce,uniformValues:Fe,terrainData:Pe}=ee.state;ve.draw(W,G.TRIANGLES,K,q,le,vi.disabled,Fe,Pe,b.id,xe,Ce,ee.segments,b.paint,d.transform.zoom,ce)}})(t,n,a,c);break;case"heatmap":(function(d,x,b,S){if(b.paint.get("heatmap-opacity")!==0)if(d.renderPass==="offscreen"){const C=d.context,A=C.gl,P=Ni.disabled,R=new Ki([A.ONE,A.ONE],s.aT.transparent,[!0,!0,!0,!0]);(function(W,G,K){const q=W.gl;W.activeTexture.set(q.TEXTURE1),W.viewport.set([0,0,G.width/4,G.height/4]);let le=K.heatmapFbo;if(le)q.bindTexture(q.TEXTURE_2D,le.colorAttachment.get()),W.bindFramebuffer.set(le.framebuffer);else{const me=q.createTexture();q.bindTexture(q.TEXTURE_2D,me),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.LINEAR),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.LINEAR),le=K.heatmapFbo=W.createFramebuffer(G.width/4,G.height/4,!1,!1),function(ee,ce,ve,xe){var Ce,Fe;const Pe=ee.gl,je=(Ce=ee.HALF_FLOAT)!==null&&Ce!==void 0?Ce:Pe.UNSIGNED_BYTE,dt=(Fe=ee.RGBA16F)!==null&&Fe!==void 0?Fe:Pe.RGBA;Pe.texImage2D(Pe.TEXTURE_2D,0,dt,ce.width/4,ce.height/4,0,Pe.RGBA,je,null),xe.colorAttachment.set(ve)}(W,G,me,le)}})(C,d,b),C.clear({color:s.aT.transparent});for(let W=0;W{const ee=s.Z();s.aS(ee,0,K.width,K.height,0,0,1);const ce=K.context.gl;return{u_matrix:ee,u_world:[ce.drawingBufferWidth,ce.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:q.paint.get("heatmap-opacity")}})(C,A),null,A.id,C.viewportBuffer,C.quadTriangleIndexBuffer,C.viewportSegments,A.paint,C.transform.zoom)}(d,b))})(t,n,a,c);break;case"line":(function(d,x,b,S){if(d.renderPass!=="translucent")return;const C=b.paint.get("line-opacity"),A=b.paint.get("line-width");if(C.constantOr(1)===0||A.constantOr(1)===0)return;const P=d.depthModeForSublayer(0,Yt.ReadOnly),R=d.colorModeForRenderPass(),W=b.paint.get("line-dasharray"),G=b.paint.get("line-pattern"),K=G.constantOr(1),q=b.paint.get("line-gradient"),le=b.getCrossfadeParameters(),me=K?"linePattern":W?"lineSDF":q?"lineGradient":"line",ee=d.context,ce=ee.gl;let ve=!0;for(const xe of S){const Ce=x.getTile(xe);if(K&&!Ce.patternsLoaded())continue;const Fe=Ce.getBucket(b);if(!Fe)continue;const Pe=Fe.programConfigurations.get(b.id),je=d.context.program.get(),dt=d.useProgram(me,Pe),Qt=ve||dt.program!==je,Qe=d.style.map.terrain&&d.style.map.terrain.getTerrainData(xe),Ct=G.constantOr(null);if(Ct&&Ce.imageAtlas){const Kt=Ce.imageAtlas,jt=Kt.patternPositions[Ct.to.toString()],$t=Kt.patternPositions[Ct.from.toString()];jt&&$t&&Pe.setConstantPatternPositions(jt,$t)}const gt=Qe?xe:null,Mi=K?Je(d,Ce,b,le,gt):W?Rt(d,Ce,b,W,le,gt):q?ot(d,Ce,b,Fe.lineClipsArray.length,gt):rt(d,Ce,b,gt);if(K)ee.activeTexture.set(ce.TEXTURE0),Ce.imageAtlasTexture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE),Pe.updatePaintBuffers(le);else if(W&&(Qt||d.lineAtlas.dirty))ee.activeTexture.set(ce.TEXTURE0),d.lineAtlas.bind(ee);else if(q){const Kt=Fe.gradients[b.id];let jt=Kt.texture;if(b.gradientVersion!==Kt.version){let $t=256;if(b.stepInterpolant){const pr=x.getSource().maxzoom,qi=xe.canonical.z===pr?Math.ceil(1<0?n.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const n=this.imageManager.getPattern(t.from.toString()),a=this.imageManager.getPattern(t.to.toString());return!n||!a}useProgram(t,n){this.cache=this.cache||{};const a=t+(n?n.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[a]||(this.cache[a]=new bs(this.context,Gi[t],n,ia[t],this._showOverdrawInspector,this.style.map.terrain)),this.cache[a]}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 t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new At(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:t,drawingBufferHeight:n}=this.context.gl;return this.width!==t||this.height!==n}}class Hr{constructor(t,n){this.points=t,this.planes=n}static fromInvProjectionMatrix(t,n,a){const c=Math.pow(2,a),d=[[-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(b=>{const S=1/(b=s.ag([],b,t))[3]/n*c;return s.b3(b,b,[S,S,1/b[3],S])}),x=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(b=>{const S=function(R,W){var G=W[0],K=W[1],q=W[2],le=G*G+K*K+q*q;return le>0&&(le=1/Math.sqrt(le)),R[0]=W[0]*le,R[1]=W[1]*le,R[2]=W[2]*le,R}([],function(R,W,G){var K=W[0],q=W[1],le=W[2],me=G[0],ee=G[1],ce=G[2];return R[0]=q*ce-le*ee,R[1]=le*me-K*ce,R[2]=K*ee-q*me,R}([],ei([],d[b[0]],d[b[1]]),ei([],d[b[2]],d[b[1]]))),C=-((A=S)[0]*(P=d[b[1]])[0]+A[1]*P[1]+A[2]*P[2]);var A,P;return S.concat(C)});return new Hr(d,x)}}class ro{constructor(t,n){this.min=t,this.max=n,this.center=function(a,c,d){return a[0]=.5*c[0],a[1]=.5*c[1],a[2]=.5*c[2],a}([],function(a,c,d){return a[0]=c[0]+d[0],a[1]=c[1]+d[1],a[2]=c[2]+d[2],a}([],this.min,this.max))}quadrant(t){const n=[t%2==0,t<2],a=it(this.min),c=it(this.max);for(let d=0;d=0&&x++;if(x===0)return 0;x!==n.length&&(a=!1)}if(a)return 2;for(let c=0;c<3;c++){let d=Number.MAX_VALUE,x=-Number.MAX_VALUE;for(let b=0;bthis.max[c]-this.min[c])return 0}return 1}}class ds{constructor(t=0,n=0,a=0,c=0){if(isNaN(t)||t<0||isNaN(n)||n<0||isNaN(a)||a<0||isNaN(c)||c<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=n,this.left=a,this.right=c}interpolate(t,n,a){return n.top!=null&&t.top!=null&&(this.top=s.B.number(t.top,n.top,a)),n.bottom!=null&&t.bottom!=null&&(this.bottom=s.B.number(t.bottom,n.bottom,a)),n.left!=null&&t.left!=null&&(this.left=s.B.number(t.left,n.left,a)),n.right!=null&&t.right!=null&&(this.right=s.B.number(t.right,n.right,a)),this}getCenter(t,n){const a=s.ad((this.left+t-this.right)/2,0,t),c=s.ad((this.top+n-this.bottom)/2,0,n);return new s.P(a,c)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new ds(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class ba{constructor(t,n,a,c,d){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=d===void 0||!!d,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=a??0,this._maxPitch=c??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.L(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ds,this._posMatrixCache={},this._alignedPosMatrixCache={},this._minEleveationForCurrentTile=0}clone(){const t=new ba(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.apply(this),t}apply(t){this.tileSize=t.tileSize,this.latRange=t.latRange,this.width=t.width,this.height=t.height,this._center=t._center,this._elevation=t._elevation,this._minEleveationForCurrentTile=t._minEleveationForCurrentTile,this.zoom=t.zoom,this.angle=t.angle,this._fov=t._fov,this._pitch=t._pitch,this._unmodified=t._unmodified,this._edgeInsets=t._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(t){t===void 0?t=!0:t===null&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-s.b5(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var a=new s.A(4);return s.A!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a}(),function(a,c,d){var x=c[0],b=c[1],S=c[2],C=c[3],A=Math.sin(d),P=Math.cos(d);a[0]=x*P+S*A,a[1]=b*P+C*A,a[2]=x*-A+S*P,a[3]=b*-A+C*P}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=s.ad(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(t){const n=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==n&&(this._unmodified=!1,this._zoom=n,this.tileZoom=Math.max(0,Math.floor(n)),this.scale=this.zoomScale(n),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,n,a){this._unmodified=!1,this._edgeInsets.interpolate(t,n,a),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const n=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,n)}getVisibleUnwrappedCoordinates(t){const n=[new s.b6(0,t)];if(this._renderWorldCopies){const a=this.pointCoordinate(new s.P(0,0)),c=this.pointCoordinate(new s.P(this.width,0)),d=this.pointCoordinate(new s.P(this.width,this.height)),x=this.pointCoordinate(new s.P(0,this.height)),b=Math.floor(Math.min(a.x,c.x,d.x,x.x)),S=Math.floor(Math.max(a.x,c.x,d.x,x.x)),C=1;for(let A=b-C;A<=S+C;A++)A!==0&&n.push(new s.b6(A,t))}return n}coveringTiles(t){var n,a;let c=this.coveringZoomLevel(t);const d=c;if(t.minzoom!==void 0&&ct.maxzoom&&(c=t.maxzoom);const x=this.pointCoordinate(this.getCameraPoint()),b=s.U.fromLngLat(this.center),S=Math.pow(2,c),C=[S*x.x,S*x.y,0],A=[S*b.x,S*b.y,0],P=Hr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,c);let R=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(R=c);const W=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,G=ee=>({aabb:new ro([ee*S,0,0],[(ee+1)*S,S,0]),zoom:0,x:0,y:0,wrap:ee,fullyVisible:!1}),K=[],q=[],le=c,me=t.reparseOverscaled?d:c;if(this._renderWorldCopies)for(let ee=1;ee<=3;ee++)K.push(G(-ee)),K.push(G(ee));for(K.push(G(0));K.length>0;){const ee=K.pop(),ce=ee.x,ve=ee.y;let xe=ee.fullyVisible;if(!xe){const dt=ee.aabb.intersects(P);if(dt===0)continue;xe=dt===2}const Ce=t.terrain?C:A,Fe=ee.aabb.distanceX(Ce),Pe=ee.aabb.distanceY(Ce),je=Math.max(Math.abs(Fe),Math.abs(Pe));if(ee.zoom===le||je>W+(1<=R){const dt=le-ee.zoom,Qt=C[0]-.5-(ce<>1),Ct=ee.zoom+1;let gt=ee.aabb.quadrant(dt);if(t.terrain){const Mi=new s.O(Ct,ee.wrap,Ct,Qt,Qe),Kt=t.terrain.getMinMaxElevation(Mi),jt=(n=Kt.minElevation)!==null&&n!==void 0?n:this.elevation,$t=(a=Kt.maxElevation)!==null&&a!==void 0?a:this.elevation;gt=new ro([gt.min[0],gt.min[1],jt],[gt.max[0],gt.max[1],$t])}K.push({aabb:gt,zoom:Ct,x:Qt,y:Qe,wrap:ee.wrap,fullyVisible:xe})}}return q.sort((ee,ce)=>ee.distanceSq-ce.distanceSq).map(ee=>ee.tileID)}resize(t,n){this.width=t,this.height=n,this.pixelsToGLUnits=[2/t,-2/n],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(t){const n=s.ad(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.P(s.G(t.lng)*this.worldSize,s.H(n)*this.worldSize)}unproject(t){return new s.U(t.x/this.worldSize,t.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(t){const n=this.pointLocation(this.centerPoint,t),a=t.getElevationForLngLatZoom(n,this.tileZoom);if(!(this.elevation-a))return;const c=this.getCameraPosition(),d=s.U.fromLngLat(c.lngLat,c.altitude),x=s.U.fromLngLat(n,a),b=d.x-x.x,S=d.y-x.y,C=d.z-x.z,A=Math.sqrt(b*b+S*S+C*C),P=this.scaleZoom(this.cameraToCenterDistance/A/this.tileSize);this._elevation=a,this._center=n,this.zoom=P}setLocationAtPoint(t,n){const a=this.pointCoordinate(n),c=this.pointCoordinate(this.centerPoint),d=this.locationCoordinate(t),x=new s.U(d.x-(a.x-c.x),d.y-(a.y-c.y));this.center=this.coordinateLocation(x),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(t,n){return n?this.coordinatePoint(this.locationCoordinate(t),n.getElevationForLngLatZoom(t,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(t))}pointLocation(t,n){return this.coordinateLocation(this.pointCoordinate(t,n))}locationCoordinate(t){return s.U.fromLngLat(t)}coordinateLocation(t){return t&&t.toLngLat()}pointCoordinate(t,n){if(n){const R=n.pointCoordinate(t);if(R!=null)return R}const a=[t.x,t.y,0,1],c=[t.x,t.y,1,1];s.ag(a,a,this.pixelMatrixInverse),s.ag(c,c,this.pixelMatrixInverse);const d=a[3],x=c[3],b=a[1]/d,S=c[1]/x,C=a[2]/d,A=c[2]/x,P=C===A?0:(0-C)/(A-C);return new s.U(s.B.number(a[0]/d,c[0]/x,P)/this.worldSize,s.B.number(b,S,P)/this.worldSize)}coordinatePoint(t,n=0,a=this.pixelMatrix){const c=[t.x*this.worldSize,t.y*this.worldSize,n,1];return s.ag(c,c,a),new s.P(c[0]/c[3],c[1]/c[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return new Tt().extend(this.pointLocation(new s.P(0,t))).extend(this.pointLocation(new s.P(this.width,t))).extend(this.pointLocation(new s.P(this.width,this.height))).extend(this.pointLocation(new s.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Tt([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(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n=!1){const a=t.key,c=n?this._alignedPosMatrixCache:this._posMatrixCache;if(c[a])return c[a];const d=t.canonical,x=this.worldSize/this.zoomScale(d.z),b=d.x+Math.pow(2,d.z)*t.wrap,S=s.ao(new Float64Array(16));return s.$(S,S,[b*x,d.y*x,0]),s.a0(S,S,[x/s.N,x/s.N,1]),s.a1(S,n?this.alignedProjMatrix:this.projMatrix,S),c[a]=new Float32Array(S),c[a]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,a,c,d=-90,x=90,b=-180,S=180;const C=this.size,A=this._unmodified;if(this.latRange){const W=this.latRange;d=s.H(W[1])*this.worldSize,x=s.H(W[0])*this.worldSize,t=x-dx&&(c=x-G)}if(this.lngRange){const W=(b+S)/2,G=s.b5(P.x,W-this.worldSize/2,W+this.worldSize/2),K=C.x/2;G-KS&&(a=S-K)}a===void 0&&c===void 0||(this.center=this.unproject(new s.P(a!==void 0?a:P.x,c!==void 0?c:P.y)).wrap()),this._unmodified=A,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,a=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=s.b7(1,this.center.lat)*this.worldSize;let c=s.ao(new Float64Array(16));s.a0(c,c,[this.width/2,-this.height/2,1]),s.$(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=s.ao(new Float64Array(16)),s.a0(c,c,[1,-1,1]),s.$(c,c,[-1,-1,0]),s.a0(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c;const d=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),x=Math.min(this.elevation,this._minEleveationForCurrentTile),b=d-x*this._pixelPerMeter/Math.cos(this._pitch),S=x<0?b:d,C=Math.PI/2+this._pitch,A=this._fov*(.5+t.y/this.height),P=Math.sin(A)*S/Math.sin(s.ad(Math.PI-C-A,.01,Math.PI-.01)),R=this.getHorizon(),W=2*Math.atan(R/this.cameraToCenterDistance)*(.5+t.y/(2*R)),G=Math.sin(W)*S/Math.sin(s.ad(Math.PI-C-W,.01,Math.PI-.01)),K=Math.min(P,G),q=1.01*(Math.cos(Math.PI/2-this._pitch)*K+S),le=this.height/50;c=new Float64Array(16),s.b8(c,this._fov,this.width/this.height,le,q),c[8]=2*-t.x/this.width,c[9]=2*t.y/this.height,s.a0(c,c,[1,-1,1]),s.$(c,c,[0,0,-this.cameraToCenterDistance]),s.b9(c,c,this._pitch),s.ae(c,c,this.angle),s.$(c,c,[-n,-a,0]),this.mercatorMatrix=s.a0([],c,[this.worldSize,this.worldSize,this.worldSize]),s.a0(c,c,[1,1,this._pixelPerMeter]),this.pixelMatrix=s.a1(new Float64Array(16),this.labelPlaneMatrix,c),s.$(c,c,[0,0,-this.elevation]),this.projMatrix=c,this.invProjMatrix=s.as([],c),this.pixelMatrix3D=s.a1(new Float64Array(16),this.labelPlaneMatrix,c);const me=this.width%2/2,ee=this.height%2/2,ce=Math.cos(this.angle),ve=Math.sin(this.angle),xe=n-Math.round(n)+ce*me+ve*ee,Ce=a-Math.round(a)+ce*ee+ve*me,Fe=new Float64Array(c);if(s.$(Fe,Fe,[xe>.5?xe-1:xe,Ce>.5?Ce-1:Ce,0]),this.alignedProjMatrix=Fe,c=s.as(new Float64Array(16),this.pixelMatrix),!c)throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new s.P(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return s.ag(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(t.length===1)return[t[0],n];{let a=n.x,c=n.y,d=n.x,x=n.y;for(const b of t)a=Math.min(a,b.x),c=Math.min(c,b.y),d=Math.max(d,b.x),x=Math.max(x,b.y);return[new s.P(a,c),new s.P(d,c),new s.P(d,x),new s.P(a,x),new s.P(a,c)]}}}function de(u,t){let n,a=!1,c=null,d=null;const x=()=>{c=null,a&&(u.apply(d,n),c=setTimeout(x,t),a=!1)};return(...b)=>(a=!0,d=this,n=b,c||x(),c)}class we{constructor(t){this._getCurrentHash=()=>{const n=window.location.hash.replace("#","");if(this._hashName){let a;return n.split("&").map(c=>c.split("=")).forEach(c=>{c[0]===this._hashName&&(a=c)}),(a&&a[1]||"").split("/")}return n.split("/")},this._onHashChange=()=>{const n=this._getCurrentHash();if(n.length>=3&&!n.some(a=>isNaN(a))){const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:a,pitch:+(n[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const n=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,n)}catch{}},this._updateHash=de(this._updateHashUnthrottled,300),this._hashName=t&&encodeURIComponent(t)}addTo(t){return this._map=t,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(t){const n=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,c=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,c),x=Math.round(n.lng*d)/d,b=Math.round(n.lat*d)/d,S=this._map.getBearing(),C=this._map.getPitch();let A="";if(A+=t?`/${x}/${b}/${a}`:`${a}/${b}/${x}`,(S||C)&&(A+="/"+Math.round(10*S)/10),C&&(A+=`/${Math.round(C)}`),this._hashName){const P=this._hashName;let R=!1;const W=window.location.hash.slice(1).split("&").map(G=>{const K=G.split("=")[0];return K===P?(R=!0,`${K}=${A}`):G}).filter(G=>G);return R||W.push(`${P}=${A}`),`#${W.join("&")}`}return`#${A}`}}const Ye={linearity:.3,easing:s.ba(0,0,.3,1)},wt=s.e({deceleration:2500,maxSpeed:1400},Ye),Vi=s.e({deceleration:20,maxSpeed:1400},Ye),ri=s.e({deceleration:1e3,maxSpeed:360},Ye),ir=s.e({deceleration:1e3,maxSpeed:90},Ye);class lr{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.h.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=s.h.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)n.zoom+=d.zoomDelta||0,n.bearing+=d.bearingDelta||0,n.pitch+=d.pitchDelta||0,d.panDelta&&n.pan._add(d.panDelta),d.around&&(n.around=d.around),d.pinchAround&&(n.pinchAround=d.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,c={};if(n.pan.mag()){const d=rr(n.pan.mag(),a,s.e({},wt,t||{}));c.offset=n.pan.mult(d.amount/n.pan.mag()),c.center=this._map.transform.center,hr(c,d)}if(n.zoom){const d=rr(n.zoom,a,Vi);c.zoom=this._map.transform.zoom+d.amount,hr(c,d)}if(n.bearing){const d=rr(n.bearing,a,ri);c.bearing=this._map.transform.bearing+s.ad(d.amount,-179,179),hr(c,d)}if(n.pitch){const d=rr(n.pitch,a,ir);c.pitch=this._map.transform.pitch+d.amount,hr(c,d)}if(c.zoom||c.bearing){const d=n.pinchAround===void 0?n.around:n.pinchAround;c.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),s.e(c,{noMoveStart:!0})}}function hr(u,t){(!u.duration||u.durationn.unproject(S)),b=d.reduce((S,C,A,P)=>S.add(C.div(P.length)),new s.P(0,0));super(t,{points:d,point:b,lngLats:x,lngLat:n.unproject(b),originalEvent:a}),this._defaultPrevented=!1}}class no extends s.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,a){super(t,{originalEvent:a}),this._defaultPrevented=!1}}class qr{constructor(t,n){this._map=t,this._clickTolerance=n.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new no(t.type,this._map,t))}mousedown(t,n){return this._mousedownPos=n,this._firePreventable(new xi(t.type,this._map,t))}mouseup(t){this._map.fire(new xi(t.type,this._map,t))}click(t,n){this._mousedownPos&&this._mousedownPos.dist(n)>=this._clickTolerance||this._map.fire(new xi(t.type,this._map,t))}dblclick(t){return this._firePreventable(new xi(t.type,this._map,t))}mouseover(t){this._map.fire(new xi(t.type,this._map,t))}mouseout(t){this._map.fire(new xi(t.type,this._map,t))}touchstart(t){return this._firePreventable(new sn(t.type,this._map,t))}touchmove(t){this._map.fire(new sn(t.type,this._map,t))}touchend(t){this._map.fire(new sn(t.type,this._map,t))}touchcancel(t){this._map.fire(new sn(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class oo{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new xi(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new xi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new xi(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class an{constructor(t){this._map=t}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(t){return this.transform.pointLocation(s.P.convert(t),this._map.terrain)}}class ks{constructor(t,n){this._map=t,this._tr=new an(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=n.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,n){this.isEnabled()&&t.shiftKey&&t.button===0&&(N.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(t,n){if(!this._active)return;const a=n;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)d.fitScreenCoordinates(a,c,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&t.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(N.remove(this._box),this._box=null),N.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new s.k(t,{originalEvent:n}))}}function Ar(u,t){if(u.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${t.length}`);const n={};for(let a=0;athis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),a.length===this.numTouches&&(this.centroid=function(c){const d=new s.P(0,0);for(const x of c)d._add(x);return d.div(c.length)}(n),this.touches=Ar(a,n)))}touchmove(t,n,a){if(this.aborted||!this.centroid)return;const c=Ar(a,n);for(const d in this.touches){const x=c[d];(!x||x.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(t,n,a){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const c=!this.aborted&&this.centroid;if(this.reset(),c)return c}}}class Ps{constructor(t){this.singleTap=new gn(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,n,a){this.singleTap.touchstart(t,n,a)}touchmove(t,n,a){this.singleTap.touchmove(t,n,a)}touchend(t,n,a){const c=this.singleTap.touchend(t,n,a);if(c){const d=t.timeStamp-this.lastTime<500,x=!this.lastTap||this.lastTap.dist(c)<30;if(d&&x||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=c,this.count===this.numTaps)return this.reset(),c}}}class fo{constructor(t){this._tr=new an(t),this._zoomIn=new Ps({numTouches:1,numTaps:2}),this._zoomOut=new Ps({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,n,a){this._zoomIn.touchstart(t,n,a),this._zoomOut.touchstart(t,n,a)}touchmove(t,n,a){this._zoomIn.touchmove(t,n,a),this._zoomOut.touchmove(t,n,a)}touchend(t,n,a){const c=this._zoomIn.touchend(t,n,a),d=this._zoomOut.touchend(t,n,a),x=this._tr;return c?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:x.zoom+1,around:x.unproject(c)},{originalEvent:t})}):d?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:x.zoom-1,around:x.unproject(d)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){const n=this._moveFunction(...t);if(n.bearingDelta||n.pitchDelta||n.around||n.panDelta)return this._active=!0,n}dragStart(t,n){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=n.length?n[0]:n,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,n){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const c=n.length?n[0]:n;return!this._moved&&c.dist(a){u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=function(t){t.preventDefault()}},Lo=({enable:u,clickTolerance:t,bearingDegreesPerPixelMoved:n=.8})=>{const a=new bi({checkCorrectEvent:c=>N.mouseButton(c)===0&&c.ctrlKey||N.mouseButton(c)===2});return new mo({clickTolerance:t,move:(c,d)=>({bearingDelta:(d.x-c.x)*n}),moveStateManager:a,enable:u,assignEvents:Gn})},dr=({enable:u,clickTolerance:t,pitchDegreesPerPixelMoved:n=-.5})=>{const a=new bi({checkCorrectEvent:c=>N.mouseButton(c)===0&&c.ctrlKey||N.mouseButton(c)===2});return new mo({clickTolerance:t,move:(c,d)=>({pitchDelta:(d.y-c.y)*n}),moveStateManager:a,enable:u,assignEvents:Gn})};class tt{constructor(t,n){this._minTouches=t.cooperativeGestures?2:1,this._clickTolerance=t.clickTolerance||1,this._map=n,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(t,n,a){return this._calculateTransform(t,n,a)}touchmove(t,n,a){if(this._map._cooperativeGestures&&(this._minTouches===2&&a.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(t,!1,a.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(a.length0&&(this._active=!0);const c=Ar(a,n),d=new s.P(0,0),x=new s.P(0,0);let b=0;for(const C in c){const A=c[C],P=this._touches[C];P&&(d._add(A),x._add(A.sub(P)),b++,c[C]=A)}if(this._touches=c,bMath.abs(u.x)}class qa extends Wn{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,n,a){super.touchstart(t,n,a),this._currentTouchCount=a.length}_start(t){this._lastPoints=t,ps(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,n,a){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const c=t[0].sub(this._lastPoints[0]),d=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(c,d,a.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(c.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(t,n,a){if(this._valid!==void 0)return this._valid;const c=t.mag()>=2,d=n.mag()>=2;if(!c&&!d)return;if(!c||!d)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const x=t.y>0==n.y>0;return ps(t)&&ps(n)&&x}}const fs={panStep:100,bearingStep:15,pitchStep:10};class Ls{constructor(t){this._tr=new an(t);const n=fs;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=0,a=0,c=0,d=0,x=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?a=-1:(t.preventDefault(),d=-1);break;case 39:t.shiftKey?a=1:(t.preventDefault(),d=1);break;case 38:t.shiftKey?c=1:(t.preventDefault(),x=-1);break;case 40:t.shiftKey?c=-1:(t.preventDefault(),x=1);break;default:return}return this._rotationDisabled&&(a=0,c=0),{cameraAnimation:b=>{const S=this._tr;b.easeTo({duration:300,easeId:"keyboardHandler",easing:Za,zoom:n?Math.round(S.zoom)+n*(t.shiftKey?2:1):S.zoom,bearing:S.bearing+a*this._bearingStep,pitch:S.pitch+c*this._pitchStep,offset:[-d*this._panStep,-x*this._panStep],center:S.center},{originalEvent:t})}}}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 Za(u){return u*(2-u)}const Ds=4.000244140625;class Sa{constructor(t,n){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=t,this._tr=new an(t),this._el=t.getCanvasContainer(),this._triggerRenderFrame=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&t.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!t[this._map._metaKey])return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const a=s.h.now(),c=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,n!==0&&n%Ds==0?this._type="wheel":n!==0&&Math.abs(n)<4?this._type="trackpad":c>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(c*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_start(t){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 n=N.mousePos(this._el,t),a=this._tr;this._around=s.L.convert(this._aroundCenter?a.center:a.unproject(n)),this._aroundPoint=a.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const t=this._tr.transform;if(this._delta!==0){const b=this._type==="wheel"&&Math.abs(this._delta)>Ds?this._wheelZoomRate:this._defaultZoomRate;let S=2/(1+Math.exp(-Math.abs(this._delta*b)));this._delta<0&&S!==0&&(S=1/S);const C=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(C*S))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,a=this._startZoom,c=this._easing;let d,x=!1;if(this._type==="wheel"&&a&&c){const b=Math.min((s.h.now()-this._lastWheelEventTime)/200,1),S=c(b);d=s.B.number(a,n,S),b<1?this._frameId||(this._frameId=!0):x=!0}else d=n,x=!0;return this._active=!0,x&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!x,zoomDelta:d-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=s.bb;if(this._prevEase){const a=this._prevEase,c=(s.h.now()-a.start)/a.duration,d=a.easing(c+.01)-a.easing(c),x=.27/Math.sqrt(d*d+1e-4)*.01,b=Math.sqrt(.0729-x*x);n=s.ba(x,b,.25,1)}return this._prevEase={start:s.h.now(),duration:t,easing:n},n}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Rl{constructor(t,n){this._clickZoom=t,this._tapZoom=n}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 Ol{constructor(t){this._tr=new an(t),this.reset()}reset(){this._active=!1}dblclick(t,n){return t.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(n)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bl{constructor(){this._tap=new Ps({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(t,n,a){if(!this._swipePoint)if(this._tapTime){const c=n[0],d=t.timeStamp-this._tapTime<500,x=this._tapPoint.dist(c)<30;d&&x?a.length>0&&(this._swipePoint=c,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(t,n,a)}touchmove(t,n,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const c=n[0],d=c.y-this._swipePoint.y;return this._swipePoint=c,t.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(t,n,a)}touchend(t,n,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const c=this._tap.touchend(t,n,a);c&&(this._tapTime=t.timeStamp,this._tapPoint=c)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Nl{constructor(t,n,a){this._el=t,this._mousePan=n,this._touchPan=a}enable(t){this._inertiaOptions=t||{},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 zn{constructor(t,n,a){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=n,this._mousePitch=a}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 ms{constructor(t,n,a,c){this._el=t,this._touchZoom=n,this._touchRotate=a,this._tapDragZoom=c,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),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()}}const Ga=u=>u.zoom||u.drag||u.pitch||u.rotate;class Vl extends s.k{}function Wa(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class Ul{constructor(t,n){this.handleWindowEvent=c=>{this.handleEvent(c,`${c.type}Window`)},this.handleEvent=(c,d)=>{if(c.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const x=c.type==="renderFrame"?void 0:c,b={needsRenderFrame:!1},S={},C={},A=c.touches,P=A?this._getMapTouches(A):void 0,R=P?N.touchPos(this._el,P):N.mousePos(this._el,c);for(const{handlerName:K,handler:q,allowed:le}of this._handlers){if(!q.isEnabled())continue;let me;this._blockedByActive(C,le,K)?q.reset():q[d||c.type]&&(me=q[d||c.type](c,R,P),this.mergeHandlerResult(b,S,me,K,x),me&&me.needsRenderFrame&&this._triggerRenderFrame()),(me||q.isActive())&&(C[K]=q)}const W={};for(const K in this._previousActiveHandlers)C[K]||(W[K]=x);this._previousActiveHandlers=C,(Object.keys(W).length||Wa(b))&&(this._changes.push([b,S,W]),this._triggerRenderFrame()),(Object.keys(C).length||Wa(b))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:G}=b;G&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],G(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lr(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[c,d,x]of this._listeners)N.addEventListener(c,d,c===document?this.handleWindowEvent:this.handleEvent,x)}destroy(){for(const[t,n,a]of this._listeners)N.removeEventListener(t,n,t===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(t){const n=this._map,a=n.getCanvasContainer();this._add("mapEvent",new qr(n,t));const c=n.boxZoom=new ks(n,t);this._add("boxZoom",c),t.interactive&&t.boxZoom&&c.enable();const d=new fo(n),x=new Ol(n);n.doubleClickZoom=new Rl(x,d),this._add("tapZoom",d),this._add("clickZoom",x),t.interactive&&t.doubleClickZoom&&n.doubleClickZoom.enable();const b=new Bl;this._add("tapDragZoom",b);const S=n.touchPitch=new qa(n);this._add("touchPitch",S),t.interactive&&t.touchPitch&&n.touchPitch.enable(t.touchPitch);const C=Lo(t),A=dr(t);n.dragRotate=new zn(t,C,A),this._add("mouseRotate",C,["mousePitch"]),this._add("mousePitch",A,["mouseRotate"]),t.interactive&&t.dragRotate&&n.dragRotate.enable();const P=(({enable:le,clickTolerance:me})=>{const ee=new bi({checkCorrectEvent:ce=>N.mouseButton(ce)===0&&!ce.ctrlKey});return new mo({clickTolerance:me,move:(ce,ve)=>({around:ve,panDelta:ve.sub(ce)}),activateOnStart:!0,moveStateManager:ee,enable:le,assignEvents:Gn})})(t),R=new tt(t,n);n.dragPan=new Nl(a,P,R),this._add("mousePan",P),this._add("touchPan",R,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&n.dragPan.enable(t.dragPan);const W=new wa,G=new Jo;n.touchZoomRotate=new ms(a,G,W,b),this._add("touchRotate",W,["touchPan","touchZoom"]),this._add("touchZoom",G,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&n.touchZoomRotate.enable(t.touchZoomRotate);const K=n.scrollZoom=new Sa(n,()=>this._triggerRenderFrame());this._add("scrollZoom",K,["mousePan"]),t.interactive&&t.scrollZoom&&n.scrollZoom.enable(t.scrollZoom);const q=n.keyboard=new Ls(n);this._add("keyboard",q),t.interactive&&t.keyboard&&n.keyboard.enable(),this._add("blockableMapEvent",new oo(n))}_add(t,n,a){this._handlers.push({handlerName:t,handler:n,allowed:a}),this._handlersById[t]=n}stop(t){if(!this._updatingCamera){for(const{handler:n}of this._handlers)n.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Ga(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,n,a){for(const c in t)if(c!==a&&(!n||n.indexOf(c)<0))return!0;return!1}_getMapTouches(t){const n=[];for(const a of t)this._el.contains(a.target)&&n.push(a);return n}mergeHandlerResult(t,n,a,c,d){if(!a)return;s.e(t,a);const x={handlerName:c,originalEvent:a.originalEvent||d};a.zoomDelta!==void 0&&(n.zoom=x),a.panDelta!==void 0&&(n.drag=x),a.pitchDelta!==void 0&&(n.pitch=x),a.bearingDelta!==void 0&&(n.rotate=x)}_applyChanges(){const t={},n={},a={};for(const[c,d,x]of this._changes)c.panDelta&&(t.panDelta=(t.panDelta||new s.P(0,0))._add(c.panDelta)),c.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+c.zoomDelta),c.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+c.bearingDelta),c.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+c.pitchDelta),c.around!==void 0&&(t.around=c.around),c.pinchAround!==void 0&&(t.pinchAround=c.pinchAround),c.noInertia&&(t.noInertia=c.noInertia),s.e(n,d),s.e(a,x);this._updateMapTransform(t,n,a),this._changes=[]}_updateMapTransform(t,n,a){const c=this._map,d=c._getTransformForUpdate(),x=c.terrain;if(!(Wa(t)||x&&this._terrainMovement))return this._fireEvents(n,a,!0);let{panDelta:b,zoomDelta:S,bearingDelta:C,pitchDelta:A,around:P,pinchAround:R}=t;R!==void 0&&(P=R),c._stop(!0),P=P||c.transform.centerPoint;const W=d.pointLocation(b?P.sub(b):P);C&&(d.bearing+=C),A&&(d.pitch+=A),S&&(d.zoom+=S),x?this._terrainMovement||!n.drag&&!n.zoom?n.drag&&this._terrainMovement?d.center=d.pointLocation(d.centerPoint.sub(b)):d.setLocationAtPoint(W,P):(this._terrainMovement=!0,this._map._elevationFreeze=!0,d.setLocationAtPoint(W,P),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,d.recalculateZoom(c.terrain)})):d.setLocationAtPoint(W,P),c._applyUpdatedTransform(d),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,a,!0)}_fireEvents(t,n,a){const c=Ga(this._eventsInProgress),d=Ga(t),x={};for(const A in t){const{originalEvent:P}=t[A];this._eventsInProgress[A]||(x[`${A}start`]=P),this._eventsInProgress[A]=t[A]}!c&&d&&this._fireEvent("movestart",d.originalEvent);for(const A in x)this._fireEvent(A,x[A]);d&&this._fireEvent("move",d.originalEvent);for(const A in t){const{originalEvent:P}=t[A];this._fireEvent(A,P)}const b={};let S;for(const A in this._eventsInProgress){const{handlerName:P,originalEvent:R}=this._eventsInProgress[A];this._handlersById[P].isActive()||(delete this._eventsInProgress[A],S=n[P]||R,b[`${A}end`]=S)}for(const A in b)this._fireEvent(A,b[A]);const C=Ga(this._eventsInProgress);if(a&&(c||d)&&!C){this._updatingCamera=!0;const A=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),P=R=>R!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Vl("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Fc extends s.E{constructor(t,n){super(),this._renderFrameCallback=()=>{const a=Math.min((s.h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(a)),a<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new s.L(this.transform.center.lng,this.transform.center.lat)}setCenter(t,n){return this.jumpTo({center:t},n)}panBy(t,n,a){return t=s.P.convert(t).mult(-1),this.panTo(this.transform.center,s.e({offset:t},n),a)}panTo(t,n,a){return this.easeTo(s.e({center:t},n),a)}getZoom(){return this.transform.zoom}setZoom(t,n){return this.jumpTo({zoom:t},n),this}zoomTo(t,n,a){return this.easeTo(s.e({zoom:t},n),a)}zoomIn(t,n){return this.zoomTo(this.getZoom()+1,t,n),this}zoomOut(t,n){return this.zoomTo(this.getZoom()-1,t,n),this}getBearing(){return this.transform.bearing}setBearing(t,n){return this.jumpTo({bearing:t},n),this}getPadding(){return this.transform.padding}setPadding(t,n){return this.jumpTo({padding:t},n),this}rotateTo(t,n,a){return this.easeTo(s.e({bearing:t},n),a)}resetNorth(t,n){return this.rotateTo(0,s.e({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(s.e({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(t,n){return Math.abs(this.getBearing()){if(this._zooming&&(a.zoom=s.B.number(c,S,xe)),this._rotating&&(a.bearing=s.B.number(d,C,xe)),this._pitching&&(a.pitch=s.B.number(x,A,xe)),this._padding&&(a.interpolatePadding(b,P,xe),W=a.centerPoint.add(R)),this.terrain&&!t.freezeElevation&&this._updateElevation(xe),ee)a.setLocationAtPoint(ee,ce);else{const Ce=a.zoomScale(a.zoom-c),Fe=S>c?Math.min(2,me):Math.max(.5,me),Pe=Math.pow(Fe,1-xe),je=a.unproject(q.add(le.mult(xe*Pe)).mult(Ce));a.setLocationAtPoint(a.renderWorldCopies?je.wrap():je,W)}this._applyUpdatedTransform(a),this._fireMoveEvents(n)},xe=>{this.terrain&&this._finalizeElevation(),this._afterEase(n,xe)},t),this}_prepareEase(t,n,a={}){this._moving=!0,n||a.moving||this.fire(new s.k("movestart",t)),this._zooming&&!a.zooming&&this.fire(new s.k("zoomstart",t)),this._rotating&&!a.rotating&&this.fire(new s.k("rotatestart",t)),this._pitching&&!a.pitching&&this.fire(new s.k("pitchstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(t,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const n=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&n!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(a-(n-(a*t+this._elevationStart))/(1-t)),this._elevationTarget=n}this.transform.elevation=s.B.number(this._elevationStart,this._elevationTarget,t)}_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(t){if(!this.transformCameraUpdate)return;const n=t.clone(),{center:a,zoom:c,pitch:d,bearing:x,elevation:b}=this.transformCameraUpdate(n);a&&(n.center=a),c!==void 0&&(n.zoom=c),d!==void 0&&(n.pitch=d),x!==void 0&&(n.bearing=x),b!==void 0&&(n.elevation=b),this.transform.apply(n)}_fireMoveEvents(t){this.fire(new s.k("move",t)),this._zooming&&this.fire(new s.k("zoom",t)),this._rotating&&this.fire(new s.k("rotate",t)),this._pitching&&this.fire(new s.k("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const a=this._zooming,c=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,a&&this.fire(new s.k("zoomend",t)),c&&this.fire(new s.k("rotateend",t)),d&&this.fire(new s.k("pitchend",t)),this.fire(new s.k("moveend",t))}flyTo(t,n){if(!t.essential&&s.h.prefersReducedMotion){const gt=s.F(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(gt,n)}this.stop(),t=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.bb},t);const a=this._getTransformForUpdate(),c=this.getZoom(),d=this.getBearing(),x=this.getPitch(),b=this.getPadding(),S="zoom"in t?s.ad(+t.zoom,a.minZoom,a.maxZoom):c,C="bearing"in t?this._normalizeBearing(t.bearing,d):d,A="pitch"in t?+t.pitch:x,P="padding"in t?t.padding:a.padding,R=a.zoomScale(S-c),W=s.P.convert(t.offset);let G=a.centerPoint.add(W);const K=a.pointLocation(G),q=s.L.convert(t.center||K);this._normalizeCenter(q);const le=a.project(K),me=a.project(q).sub(le);let ee=t.curve;const ce=Math.max(a.width,a.height),ve=ce/R,xe=me.mag();if("minZoom"in t){const gt=s.ad(Math.min(t.minZoom,c,S),a.minZoom,a.maxZoom),Mi=ce/a.zoomScale(gt-c);ee=Math.sqrt(Mi/xe*2)}const Ce=ee*ee;function Fe(gt){const Mi=(ve*ve-ce*ce+(gt?-1:1)*Ce*Ce*xe*xe)/(2*(gt?ve:ce)*Ce*xe);return Math.log(Math.sqrt(Mi*Mi+1)-Mi)}function Pe(gt){return(Math.exp(gt)-Math.exp(-gt))/2}function je(gt){return(Math.exp(gt)+Math.exp(-gt))/2}const dt=Fe(!1);let Qt=function(gt){return je(dt)/je(dt+ee*gt)},Qe=function(gt){return ce*((je(dt)*(Pe(Mi=dt+ee*gt)/je(Mi))-Pe(dt))/Ce)/xe;var Mi},Ct=(Fe(!0)-dt)/ee;if(Math.abs(xe)<1e-6||!isFinite(Ct)){if(Math.abs(ce-ve)<1e-6)return this.easeTo(t,n);const gt=vet.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=d!==C,this._pitching=A!==x,this._padding=!a.isPaddingEqual(P),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(q),this._ease(gt=>{const Mi=gt*Ct,Kt=1/Qt(Mi);a.zoom=gt===1?S:c+a.scaleZoom(Kt),this._rotating&&(a.bearing=s.B.number(d,C,gt)),this._pitching&&(a.pitch=s.B.number(x,A,gt)),this._padding&&(a.interpolatePadding(b,P,gt),G=a.centerPoint.add(W)),this.terrain&&!t.freezeElevation&&this._updateElevation(gt);const jt=gt===1?q:a.unproject(le.add(me.mult(Qe(Mi))).mult(Kt));a.setLocationAtPoint(a.renderWorldCopies?jt.wrap():jt,G),this._applyUpdatedTransform(a),this._fireMoveEvents(n)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(n)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,n){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const a=this._onEaseEnd;delete this._onEaseEnd,a.call(this,n)}if(!t){const a=this.handlers;a&&a.stop(!1)}return this}_ease(t,n,a){a.animate===!1||a.duration===0?(t(1),n()):(this._easeStart=s.h.now(),this._easeOptions=a,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,n){t=s.b5(t,-180,180);const a=Math.abs(t-n);return Math.abs(t-360-n)180?-360:a<-180?360:0}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(s.L.convert(t),this.transform.tileZoom)-this.transform.elevation:null}}class Hn{constructor(t={}){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=n=>{!n||n.sourceDataType!=="metadata"&&n.sourceDataType!=="visibility"&&n.dataType!=="style"&&n.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=t}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options&&this.options.compact,this._container=N.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=N.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=N.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(){N.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(t,n){const a=this._map._getUIString(`AttributionControl.${n}`);t.title=a,t.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(c=>typeof c!="string"?"":c)):typeof this.options.customAttribution=="string"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const c=this._map.style.stylesheet;this.styleOwner=c.owner,this.styleId=c.id}const n=this._map.style.sourceCaches;for(const c in n){const d=n[c];if(d.used||d.usedForTerrain){const x=d.getSource();x.attribution&&t.indexOf(x.attribution)<0&&t.push(x.attribution)}}t=t.filter(c=>String(c).trim()),t.sort((c,d)=>c.length-d.length),t=t.filter((c,d)=>{for(let x=d+1;x=0)return!1;return!0});const a=t.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Yi{constructor(t={}){this._updateCompact=()=>{const n=this._container.children;if(n.length){const a=n[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=t}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=N.create("div","maplibregl-ctrl");const n=N.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){N.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class pl{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const n=++this._id;return this._queue.push({callback:t,id:n,cancelled:!1}),n}remove(t){const n=this._currentlyRunning,a=n?this._queue.concat(n):this._queue;for(const c of a)if(c.id===t)return void(c.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const n=this._currentlyRunning=this._queue;this._queue=[];for(const a of n)if(!a.cancelled&&(a.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const jl={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var Rc=s.Q([{name:"a_pos3d",type:"Int16",components:3}]);class Oc extends s.E{constructor(t){super(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,t.usedForTerrain=!0,t.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];const a={};for(const c of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))a[c.key]=!0,this._renderableTilesKeys.push(c.key),this._tiles[c.key]||(c.posMatrix=new Float64Array(16),s.aS(c.posMatrix,0,s.N,0,s.N,0,1),this._tiles[c.key]=new wo(c,this.tileSize));for(const c in this._tiles)a[c]||delete this._tiles[c]}freeRtt(t){for(const n in this._tiles){const a=this._tiles[n];(!t||a.tileID.equals(t)||a.tileID.isChildOf(t)||t.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t){const n={};for(const a of this._renderableTilesKeys){const c=this._tiles[a].tileID;if(c.canonical.equals(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16),s.aS(d.posMatrix,0,s.N,0,s.N,0,1),n[a]=d}else if(c.canonical.isChildOf(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const x=c.canonical.z-t.canonical.z,b=c.canonical.x-(c.canonical.x>>x<>x<>x;s.aS(d.posMatrix,0,C,0,C,0,1),s.$(d.posMatrix,d.posMatrix,[-b*C,-S*C,0]),n[a]=d}else if(t.canonical.isChildOf(c.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const x=t.canonical.z-c.canonical.z,b=t.canonical.x-(t.canonical.x>>x<>x<>x;s.aS(d.posMatrix,0,s.N,0,s.N,0,1),s.$(d.posMatrix,d.posMatrix,[b*C,S*C,0]),s.a0(d.posMatrix,d.posMatrix,[1/2**x,1/2**x,0]),n[a]=d}}return n}getSourceTile(t,n){const a=this.sourceCache._source;let c=t.overscaledZ-this.deltaZoom;if(c>a.maxzoom&&(c=a.maxzoom),c=a.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(t.scaledTo(c--).key);return d}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter(n=>n.timeAdded>=t)}}class Bc{constructor(t,n,a){this.painter=t,this.sourceCache=new Oc(n),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,n,a,c=s.N){var d;if(!(n>=0&&n=0&&at.canonical.z&&(t.canonical.z>=c?d=t.canonical.z-c:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const x=t.canonical.x-(t.canonical.x>>d<>d<>8<<4|d>>8,n[x+3]=0;const a=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),c=new At(t,a,t.gl.RGBA,{premultiply:!1});return c.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=c,c}pointCoordinate(t){const n=new Uint8Array(4),a=this.painter.context,c=a.gl;a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),c.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,c.RGBA,c.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null);const d=n[0]+(n[2]>>4<<8),x=n[1]+((15&n[2])<<8),b=this.coordsIndex[255-n[3]],S=b&&this.sourceCache.getTileByID(b);if(!S)return null;const C=this._coordsTextureSize,A=(1<0&&Math.sign(d)<0||!a&&Math.sign(c)<0&&Math.sign(d)>0?(c=360*Math.sign(d)+c,s.G(c)):n}}class bu{constructor(t,n,a){this._context=t,this._size=n,this._tileSize=a,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const t of this._objects)t.texture.destroy(),t.fbo.destroy()}_createObject(t){const n=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),a=new At(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return a.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),n.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),n.colorAttachment.set(a.texture),{id:t,fbo:n,texture:a,stamp:-1,inUse:!1}}getObjectForId(t){return this._objects[t]}useObject(t){t.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(n=>t.id!==n),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const n of this._recentlyUsed)if(!this._objects[n].inUse)return this._objects[n];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(const t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length!t.inUse)===!1}}const yn={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class fl{constructor(t,n){this.painter=t,this.terrain=n,this.pool=new bu(t.context,30,n.sourceCache.tileSize*n.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,n){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(a=>!t._layers[a].isHidden(n)),this._coordsDescendingInv={};for(const a in t.sourceCaches){this._coordsDescendingInv[a]={};const c=t.sourceCaches[a].getVisibleCoordinates();for(const d of c){const x=this.terrain.sourceCache.getTerrainCoords(d);for(const b in x)this._coordsDescendingInv[a][b]||(this._coordsDescendingInv[a][b]=[]),this._coordsDescendingInv[a][b].push(x[b])}}this._coordsDescendingInvStr={};for(const a of t._order){const c=t._layers[a],d=c.source;if(yn[c.type]&&!this._coordsDescendingInvStr[d]){this._coordsDescendingInvStr[d]={};for(const x in this._coordsDescendingInv[d])this._coordsDescendingInvStr[d][x]=this._coordsDescendingInv[d][x].map(b=>b.key).sort().join()}}for(const a of this._renderableTiles)for(const c in this._coordsDescendingInvStr){const d=this._coordsDescendingInvStr[c][a.tileID.key];d&&d!==a.rttCoords[c]&&(a.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const n=t.type,a=this.painter,c=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(yn[n]&&(this._prevType&&yn[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(t.id),!c))return!0;if(yn[this._prevType]||yn[n]&&c){this._prevType=n;const d=this._stacks.length-1,x=this._stacks[d]||[];for(const b of this._renderableTiles){if(this.pool.isFull()&&(Ji(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(b),b.rtt[d]){const C=this.pool.getObjectForId(b.rtt[d].id);if(C.stamp===b.rtt[d].stamp){this.pool.useObject(C);continue}}const S=this.pool.getOrCreateFreeObject();this.pool.useObject(S),this.pool.stampObject(S),b.rtt[d]={id:S.id,stamp:S.stamp},a.context.bindFramebuffer.set(S.fbo.framebuffer),a.context.clear({color:s.aT.transparent,stencil:0}),a.currentStencilSource=void 0;for(let C=0;C{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},ql={showCompass:!0,showZoom:!0,visualizePitch:!1};class Zl{constructor(t,n,a=!1){this.mousedown=x=>{this.startMouse(s.e({},x,{ctrlKey:!0,preventDefault:()=>x.preventDefault()}),N.mousePos(this.element,x)),N.addEventListener(window,"mousemove",this.mousemove),N.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=x=>{this.moveMouse(x,N.mousePos(this.element,x))},this.mouseup=x=>{this.mouseRotate.dragEnd(x),this.mousePitch&&this.mousePitch.dragEnd(x),this.offTemp()},this.touchstart=x=>{x.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=N.touchPos(this.element,x.targetTouches)[0],this.startTouch(x,this._startPos),N.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),N.addEventListener(window,"touchend",this.touchend))},this.touchmove=x=>{x.targetTouches.length!==1?this.reset():(this._lastPos=N.touchPos(this.element,x.targetTouches)[0],this.moveTouch(x,this._lastPos))},this.touchend=x=>{x.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 c=t.dragRotate._mouseRotate.getClickTolerance(),d=t.dragRotate._mousePitch.getClickTolerance();this.element=n,this.mouseRotate=Lo({clickTolerance:c,enable:!0}),this.touchRotate=(({enable:x,clickTolerance:b,bearingDegreesPerPixelMoved:S=.8})=>{const C=new zs;return new mo({clickTolerance:b,move:(A,P)=>({bearingDelta:(P.x-A.x)*S}),moveStateManager:C,enable:x,assignEvents:Ha})})({clickTolerance:c,enable:!0}),this.map=t,a&&(this.mousePitch=dr({clickTolerance:d,enable:!0}),this.touchPitch=(({enable:x,clickTolerance:b,pitchDegreesPerPixelMoved:S=-.5})=>{const C=new zs;return new mo({clickTolerance:b,move:(A,P)=>({pitchDelta:(P.y-A.y)*S}),moveStateManager:C,enable:x,assignEvents:Ha})})({clickTolerance:d,enable:!0})),N.addEventListener(n,"mousedown",this.mousedown),N.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),N.addEventListener(n,"touchcancel",this.reset)}startMouse(t,n){this.mouseRotate.dragStart(t,n),this.mousePitch&&this.mousePitch.dragStart(t,n),N.disableDrag()}startTouch(t,n){this.touchRotate.dragStart(t,n),this.touchPitch&&this.touchPitch.dragStart(t,n),N.disableDrag()}moveMouse(t,n){const a=this.map,{bearingDelta:c}=this.mouseRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.mousePitch){const{pitchDelta:d}=this.mousePitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}moveTouch(t,n){const a=this.map,{bearingDelta:c}=this.touchRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.touchPitch){const{pitchDelta:d}=this.touchPitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}off(){const t=this.element;N.removeEventListener(t,"mousedown",this.mousedown),N.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),N.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),N.removeEventListener(window,"touchend",this.touchend),N.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){N.enableDrag(),N.removeEventListener(window,"mousemove",this.mousemove),N.removeEventListener(window,"mouseup",this.mouseup),N.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),N.removeEventListener(window,"touchend",this.touchend)}}let xr;function Gl(u,t,n){if(u=new s.L(u.lng,u.lat),t){const a=new s.L(u.lng-360,u.lat),c=new s.L(u.lng+360,u.lat),d=n.locationPoint(u).distSqr(t);n.locationPoint(a).distSqr(t)180;){const a=n.locationPoint(u);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;u.lng>n.center.lng?u.lng-=360:u.lng+=360}return u}const so={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 Nc(u,t,n){const a=u.classList;for(const c in so)a.remove(`maplibregl-${n}-anchor-${c}`);a.add(`maplibregl-${n}-anchor-${t}`)}class Fs extends s.E{constructor(t){if(super(),this._onKeyPress=n=>{const a=n.code,c=n.charCode||n.keyCode;a!=="Space"&&a!=="Enter"&&c!==32&&c!==13||this.togglePopup()},this._onMapClick=n=>{const a=n.originalEvent.target,c=this._element;this._popup&&(a===c||c.contains(a))&&this.togglePopup()},this._update=n=>{if(!this._map)return;const a=this._map.loaded()&&!this._map.isMoving();((n==null?void 0:n.type)==="terrain"||(n==null?void 0:n.type)==="render"&&!a)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies&&(this._lngLat=Gl(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let c="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?c=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(c=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let d="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?d="rotateX(0deg)":this._pitchAlignment==="map"&&(d=`rotateX(${this._map.getPitch()}deg)`),n&&n.type!=="moveend"||(this._pos=this._pos.round()),N.setTransform(this._element,`${so[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${c}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const x=this._map.unproject(this._pos),b=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=x.distanceTo(this._lngLat)>20*b?"0.2":"1.0",this._opacityTimeout=null},100))},this._onMove=n=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=n.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 s.k("dragstart"))),this.fire(new s.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 s.k("dragend")),this._state="inactive"},this._addDragHandler=n=>{this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.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=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment!=="auto"?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=s.P.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=N.create("div"),this._element.setAttribute("aria-label","Map marker");const n=N.createNS("http://www.w3.org/2000/svg","svg"),a=41,c=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${a}px`),n.setAttributeNS(null,"width",`${c}px`),n.setAttributeNS(null,"viewBox",`0 0 ${c} ${a}`);const d=N.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"stroke","none"),d.setAttributeNS(null,"stroke-width","1"),d.setAttributeNS(null,"fill","none"),d.setAttributeNS(null,"fill-rule","evenodd");const x=N.createNS("http://www.w3.org/2000/svg","g");x.setAttributeNS(null,"fill-rule","nonzero");const b=N.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(3.0, 29.0)"),b.setAttributeNS(null,"fill","#000000");const S=[{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 le of S){const me=N.createNS("http://www.w3.org/2000/svg","ellipse");me.setAttributeNS(null,"opacity","0.04"),me.setAttributeNS(null,"cx","10.5"),me.setAttributeNS(null,"cy","5.80029008"),me.setAttributeNS(null,"rx",le.rx),me.setAttributeNS(null,"ry",le.ry),b.appendChild(me)}const C=N.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"fill",this._color);const A=N.createNS("http://www.w3.org/2000/svg","path");A.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"),C.appendChild(A);const P=N.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"opacity","0.25"),P.setAttributeNS(null,"fill","#000000");const R=N.createNS("http://www.w3.org/2000/svg","path");R.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"),P.appendChild(R);const W=N.createNS("http://www.w3.org/2000/svg","g");W.setAttributeNS(null,"transform","translate(6.0, 7.0)"),W.setAttributeNS(null,"fill","#FFFFFF");const G=N.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"transform","translate(8.0, 8.0)");const K=N.createNS("http://www.w3.org/2000/svg","circle");K.setAttributeNS(null,"fill","#000000"),K.setAttributeNS(null,"opacity","0.25"),K.setAttributeNS(null,"cx","5.5"),K.setAttributeNS(null,"cy","5.5"),K.setAttributeNS(null,"r","5.4999962");const q=N.createNS("http://www.w3.org/2000/svg","circle");q.setAttributeNS(null,"fill","#FFFFFF"),q.setAttributeNS(null,"cx","5.5"),q.setAttributeNS(null,"cy","5.5"),q.setAttributeNS(null,"r","5.4999962"),G.appendChild(K),G.appendChild(q),x.appendChild(b),x.appendChild(C),x.appendChild(P),x.appendChild(W),x.appendChild(G),n.appendChild(x),n.setAttributeNS(null,"height",a*this._scale+"px"),n.setAttributeNS(null,"width",c*this._scale+"px"),this._element.appendChild(n),this._offset=s.P.convert(t&&t.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",n=>{n.preventDefault()}),this._element.addEventListener("mousedown",n=>{n.preventDefault()}),Nc(this._element,this._anchor,"marker"),t&&t.className)for(const n of t.className.split(" "))this._element.classList.add(n);this._popup=null}addTo(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),t.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),N.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=s.L.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const c=Math.abs(13.5)/Math.SQRT2;t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[c,-1*(38.1-13.5+c)],"bottom-right":[-c,-1*(38.1-13.5+c)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),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 t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}getOffset(){return this._offset}setOffset(t){return this._offset=s.P.convert(t),this._update(),this}addClassName(t){this._element.classList.add(t)}removeClassName(t){this._element.classList.remove(t)}toggleClassName(t){return this._element.classList.toggle(t)}setDraggable(t){return this._draggable=!!t,this._map&&(t?(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(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&t!=="auto"?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const cr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let or=0,Ta=!1;const Xa={maxWidth:100,unit:"metric"};function Ka(u,t,n){const a=n&&n.maxWidth||100,c=u._container.clientHeight/2,d=u.unproject([0,c]),x=u.unproject([a,c]),b=d.distanceTo(x);if(n&&n.unit==="imperial"){const S=3.2808*b;S>5280?Rs(t,a,S/5280,u._getUIString("ScaleControl.Miles")):Rs(t,a,S,u._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?Rs(t,a,b/1852,u._getUIString("ScaleControl.NauticalMiles")):b>=1e3?Rs(t,a,b/1e3,u._getUIString("ScaleControl.Kilometers")):Rs(t,a,b,u._getUIString("ScaleControl.Meters"))}function Rs(u,t,n,a){const c=function(d){const x=Math.pow(10,`${Math.floor(d)}`.length-1);let b=d/x;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:b>=1?1:function(S){const C=Math.pow(10,Math.ceil(-Math.log(S)/Math.LN10));return Math.round(S*C)/C}(b),x*b}(n);u.style.width=t*(c/n)+"px",u.innerHTML=`${c} ${a}`}const Wl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Hl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ia(u){if(u){if(typeof u=="number"){const t=Math.round(Math.abs(u)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,u),"top-left":new s.P(t,t),"top-right":new s.P(-t,t),bottom:new s.P(0,-u),"bottom-left":new s.P(t,-t),"bottom-right":new s.P(-t,-t),left:new s.P(u,0),right:new s.P(-u,0)}}if(u instanceof s.P||Array.isArray(u)){const t=s.P.convert(u);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:s.P.convert(u.center||[0,0]),top:s.P.convert(u.top||[0,0]),"top-left":s.P.convert(u["top-left"]||[0,0]),"top-right":s.P.convert(u["top-right"]||[0,0]),bottom:s.P.convert(u.bottom||[0,0]),"bottom-left":s.P.convert(u["bottom-left"]||[0,0]),"bottom-right":s.P.convert(u["bottom-right"]||[0,0]),left:s.P.convert(u.left||[0,0]),right:s.P.convert(u.right||[0,0])}}return Ia(new s.P(0,0))}const Xl={extend:(u,...t)=>s.e(u,...t),run(u){u()},logToElement(u,t=!1,n="log"){const a=window.document.getElementById(n);a&&(t&&(a.innerHTML=""),a.innerHTML+=`
${u}`)}},Kl=H;class wi{static get version(){return Kl}static get workerCount(){return Vn.workerCount}static set workerCount(t){Vn.workerCount=t}static get maxParallelImageRequests(){return s.c.MAX_PARALLEL_IMAGE_REQUESTS}static set maxParallelImageRequests(t){s.c.MAX_PARALLEL_IMAGE_REQUESTS=t}static get workerUrl(){return s.c.WORKER_URL}static set workerUrl(t){s.c.WORKER_URL=t}static addProtocol(t,n){s.c.REGISTERED_PROTOCOLS[t]=n}static removeProtocol(t){delete s.c.REGISTERED_PROTOCOLS[t]}}return wi.Map=class extends Fc{constructor(u){if(s.bg.mark(s.bh.create),(u=s.e({},Et,u)).minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new ba(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._cooperativeGesturesOnWheel=t=>{this._onCooperativeGesture(t,t[this._metaKey],1)},this._contextLost=t=>{t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new s.k("webglcontextlost",{originalEvent:t}))},this._contextRestored=t=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.k("webglcontextrestored",{originalEvent:t}))},this._onMapScroll=t=>{if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._cooperativeGestures=u.cooperativeGestures,this._metaKey=navigator.platform.indexOf("Mac")===0?"metaKey":"ctrlKey",this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=u.preserveDrawingBuffer,this._antialias=u.antialias,this._trackResize=u.trackResize,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=u.collectResourceTiming,this._renderTaskQueue=new pl,this._controls=[],this._mapId=s.a2(),this._locale=s.e({},jl,u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this._imageQueueHandle=Ne.addThrottleControl(()=>this.isMoving()),this._requestManager=new at(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 t=!1;const n=de(a=>{this._trackResize&&!this._removed&&this.resize(a)._update()},50);this._resizeObserver=new ResizeObserver(a=>{t?n(a):t=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ul(this,u),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=u.hash&&new we(typeof u.hash=="string"&&u.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,s.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new Hn({customAttribution:u.customAttribution})),u.maplibreLogo&&this.addControl(new Yi,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update(t.dataType==="style"),this.fire(new s.k(`${t.dataType}data`,t))}),this.on("dataloading",t=>{this.fire(new s.k(`${t.dataType}dataloading`,t))}),this.on("dataabort",t=>{this.fire(new s.k("sourcedataabort",t))})}_getMapId(){return this._mapId}addControl(u,t){if(t===void 0&&(t=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new s.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=u.onAdd(this);this._controls.push(u);const a=this._controlPositions[t];return t.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new s.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(u);return t>-1&&this._controls.splice(t,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,t,n,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,t,n,a)}resize(u){var t;const n=this._containerDimensions(),a=n[0],c=n[1],d=this._getClampedPixelRatio(a,c);if(this._resizeCanvas(a,c,d),this.painter.resize(a,c,d),this.painter.overLimit()){const b=this.painter.context.gl;this._maxCanvasSize=[b.drawingBufferWidth,b.drawingBufferHeight];const S=this._getClampedPixelRatio(a,c);this._resizeCanvas(a,c,S),this.painter.resize(a,c,S)}this.transform.resize(a,c),(t=this._requestedCameraState)===null||t===void 0||t.resize(a,c);const x=!this._moving;return x&&(this.stop(),this.fire(new s.k("movestart",u)).fire(new s.k("move",u))),this.fire(new s.k("resize",u)),x&&this.fire(new s.k("moveend",u)),this}_getClampedPixelRatio(u,t){const{0:n,1:a}=this._maxCanvasSize,c=this.getPixelRatio(),d=u*c,x=t*c;return Math.min(d>n?n/d:1,x>a?a/x:1)*c}getPixelRatio(){var u;return(u=this._overridePixelRatio)!==null&&u!==void 0?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(Tt.convert(u)),this._update()}setMinZoom(u){if((u=u??-2)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=u??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(u){return this._cooperativeGestures=u,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(u){return this.transform.locationPoint(s.L.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(s.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||((u=this.handlers)===null||u===void 0?void 0:u.isMoving())}isZooming(){var u;return this._zooming||((u=this.handlers)===null||u===void 0?void 0:u.isZooming())}isRotating(){var u;return this._rotating||((u=this.handlers)===null||u===void 0?void 0:u.isRotating())}_createDelegatedListener(u,t,n){if(u==="mouseenter"||u==="mouseover"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:d=>{const x=this.getLayer(t)?this.queryRenderedFeatures(d.point,{layers:[t]}):[];x.length?a||(a=!0,n.call(this,new xi(u,this,d.originalEvent,{features:x}))):a=!1},mouseout:()=>{a=!1}}}}if(u==="mouseleave"||u==="mouseout"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:x=>{(this.getLayer(t)?this.queryRenderedFeatures(x.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(this,new xi(u,this,x.originalEvent)))},mouseout:x=>{a&&(a=!1,n.call(this,new xi(u,this,x.originalEvent)))}}}}{const a=c=>{const d=this.getLayer(t)?this.queryRenderedFeatures(c.point,{layers:[t]}):[];d.length&&(c.features=d,n.call(this,c),delete c.features)};return{layer:t,listener:n,delegates:{[u]:a}}}}on(u,t,n){if(n===void 0)return super.on(u,t);const a=this._createDelegatedListener(u,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(a);for(const c in a.delegates)this.on(c,a.delegates[c]);return this}once(u,t,n){if(n===void 0)return super.once(u,t);const a=this._createDelegatedListener(u,t,n);for(const c in a.delegates)this.once(c,a.delegates[c]);return this}off(u,t,n){return n===void 0?super.off(u,t):(this._delegatedListeners&&this._delegatedListeners[u]&&(a=>{const c=this._delegatedListeners[u];for(let d=0;dthis._updateStyle(u,t));const n=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new Ir(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof u=="string"?this.style.loadURL(u,t,n):this.style.loadJSON(u,t,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ir(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,t){if(typeof u=="string"){const n=this._requestManager.transformRequest(u,et.Style);s.f(n,(a,c)=>{a?this.fire(new s.j(a)):c&&this._updateDiff(c,t)})}else typeof u=="object"&&this._updateDiff(u,t)}_updateDiff(u,t){try{this.style.setState(u,t)&&this._update(!0)}catch(n){s.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(u,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(u,t){return this._lazyInitEmptyStyle(),this.style.addSource(u,t),this._update(!0)}isSourceLoaded(u){const t=this.style&&this.style.sourceCaches[u];if(t!==void 0)return t.loaded();this.fire(new s.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const t=this.style.sourceCaches[u.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);for(const n in this.style._layers){const a=this.style._layers[n];a.type==="hillshade"&&a.source===u.source&&s.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 Bc(this.painter,t,u),this.painter.renderToTexture=new fl(this.painter,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=n=>{n.dataType==="style"?this.terrain.sourceCache.freeRtt():n.dataType==="source"&&n.tile&&(n.sourceId!==u.source||this._elevationFreeze||(this.transform._minEleveationForCurrentTile=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(n.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._minEleveationForCurrentTile=0,this.transform.elevation=0;return this.fire(new s.k("terrain",{terrain:u})),this}getTerrain(){var u,t;return(t=(u=this.terrain)===null||u===void 0?void 0:u.options)!==null&&t!==void 0?t:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const t in u){const n=u[t]._tiles;for(const a in n){const c=n[a];if(c.state!=="loaded"&&c.state!=="errored")return!1}}return!0}addSourceType(u,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(u,t,n)}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,t,n={}){const{pixelRatio:a=1,sdf:c=!1,stretchX:d,stretchY:x,content:b}=n;if(this._lazyInitEmptyStyle(),!(t instanceof HTMLImageElement||s.a(t))){if(t.width===void 0||t.height===void 0)return this.fire(new s.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:S,height:C,data:A}=t,P=t;return this.style.addImage(u,{data:new s.R({width:S,height:C},new Uint8Array(A)),pixelRatio:a,stretchX:d,stretchY:x,content:b,sdf:c,version:0,userImage:P}),P.onAdd&&P.onAdd(this,u),this}}{const{width:S,height:C,data:A}=s.h.getImageData(t);this.style.addImage(u,{data:new s.R({width:S,height:C},A),pixelRatio:a,stretchX:d,stretchY:x,content:b,sdf:c,version:0})}}updateImage(u,t){const n=this.style.getImage(u);if(!n)return this.fire(new s.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=t instanceof HTMLImageElement||s.a(t)?s.h.getImageData(t):t,{width:c,height:d,data:x}=a;if(c===void 0||d===void 0)return this.fire(new s.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(c!==n.data.width||d!==n.data.height)return this.fire(new s.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const b=!(t instanceof HTMLImageElement||s.a(t));return n.data.replace(x,b),this.style.updateImage(u,n),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new s.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u,t){Ne.getImage(this._requestManager.transformRequest(u,et.Image),t)}listImages(){return this.style.listImages()}addLayer(u,t){return this._lazyInitEmptyStyle(),this.style.addLayer(u,t),this._update(!0)}moveLayer(u,t){return this.style.moveLayer(u,t),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,t,n){return this.style.setLayerZoomRange(u,t,n),this._update(!0)}setFilter(u,t,n={}){return this.style.setFilter(u,t,n),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,t,n,a={}){return this.style.setPaintProperty(u,t,n,a),this._update(!0)}getPaintProperty(u,t){return this.style.getPaintProperty(u,t)}setLayoutProperty(u,t,n,a={}){return this.style.setLayoutProperty(u,t,n,a),this._update(!0)}getLayoutProperty(u,t){return this.style.getLayoutProperty(u,t)}setGlyphs(u,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,t,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,t,n,a=>{a||this._update(!0)}),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,t,n=>{n||this._update(!0)}),this}setLight(u,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(u,t){return this.style.setFeatureState(u,t),this._update()}removeFeatureState(u,t){return this.style.removeFeatureState(u,t),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,t=0;return this._container&&(u=this._container.clientWidth||400,t=this._container.clientHeight||300),[u,t]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const t=this._canvasContainer=N.create("div","maplibregl-canvas-container",u);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=N.create("canvas","maplibregl-canvas",t),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 n=this._containerDimensions(),a=this._getClampedPixelRatio(n[0],n[1]);this._resizeCanvas(n[0],n[1],a);const c=this._controlContainer=N.create("div","maplibregl-control-container",u),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(x=>{d[x]=N.create("div",`maplibregl-ctrl-${x} `,c)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=N.create("div","maplibregl-cooperative-gesture-screen",this._container);let u=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(u=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=` +`),ee=b.createShader(b.FRAGMENT_SHADER);if(b.isContextLost())return void(this.failedToCreate=!0);if(b.shaderSource(ee,le),b.compileShader(ee),!b.getShaderParameter(ee,b.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${b.getShaderInfoLog(ee)}`);b.attachShader(this.program,ee);const ce=b.createShader(b.VERTEX_SHADER);if(b.isContextLost())return void(this.failedToCreate=!0);if(b.shaderSource(ce,me),b.compileShader(ce),!b.getShaderParameter(ce,b.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${b.getShaderInfoLog(ce)}`);b.attachShader(this.program,ce),this.attributes={};const ve={};this.numAttributes=A.length;for(let xe=0;xe({u_depth:new s.aL(xe,Me.u_depth),u_terrain:new s.aL(xe,Me.u_terrain),u_terrain_dim:new s.aM(xe,Me.u_terrain_dim),u_terrain_matrix:new s.aN(xe,Me.u_terrain_matrix),u_terrain_unpack:new s.aO(xe,Me.u_terrain_unpack),u_terrain_exaggeration:new s.aM(xe,Me.u_terrain_exaggeration)}))(t,ve),this.binderUniforms=a?a.getUniforms(t,ve):[]}draw(t,n,a,c,d,x,b,S,C,A,P,R,W,G,K,q,le,me){const ee=t.gl;if(this.failedToCreate)return;if(t.program.set(this.program),t.setDepthMode(a),t.setStencilMode(c),t.setColorMode(d),t.setCullFace(x),S){t.activeTexture.set(ee.TEXTURE2),ee.bindTexture(ee.TEXTURE_2D,S.depthTexture),t.activeTexture.set(ee.TEXTURE3),ee.bindTexture(ee.TEXTURE_2D,S.texture);for(const ve in this.terrainUniforms)this.terrainUniforms[ve].set(S[ve])}for(const ve in this.fixedUniforms)this.fixedUniforms[ve].set(b[ve]);K&&K.setUniforms(t,this.binderUniforms,W,{zoom:G});let ce=0;switch(n){case ee.LINES:ce=2;break;case ee.TRIANGLES:ce=3;break;case ee.LINE_STRIP:ce=1}for(const ve of R.get()){const xe=ve.vaos||(ve.vaos={});(xe[C]||(xe[C]=new uo)).bind(t,this,A,K?K.getPaintVertexBuffers():[],P,ve.vertexOffset,q,le,me),ee.drawElements(n,ve.primitiveLength*ce,ee.UNSIGNED_SHORT,ve.primitiveOffset*ce*2)}}}function kn(u,t,n){const a=1/oe(n,1,t.transform.tileZoom),c=Math.pow(2,n.tileID.overscaledZ),d=n.tileSize*Math.pow(2,t.transform.tileZoom)/c,x=d*(n.tileID.canonical.x+n.tileID.wrap*c),b=d*n.tileID.canonical.y;return{u_image:0,u_texsize:n.imageAtlasTexture.size,u_scale:[a,u.fromScale,u.toScale],u_fade:u.t,u_pixel_coord_upper:[x>>16,b>>16],u_pixel_coord_lower:[65535&x,65535&b]}}const Na=(u,t,n,a)=>{const c=t.style.light,d=c.properties.get("position"),x=[d.x,d.y,d.z],b=function(){var C=new s.A(9);return s.A!=Float32Array&&(C[1]=0,C[2]=0,C[3]=0,C[5]=0,C[6]=0,C[7]=0),C[0]=1,C[4]=1,C[8]=1,C}();c.properties.get("anchor")==="viewport"&&function(C,A){var P=Math.sin(A),R=Math.cos(A);C[0]=R,C[1]=P,C[2]=0,C[3]=-P,C[4]=R,C[5]=0,C[6]=0,C[7]=0,C[8]=1}(b,-t.transform.angle),function(C,A,P){var R=A[0],W=A[1],G=A[2];C[0]=R*P[0]+W*P[3]+G*P[6],C[1]=R*P[1]+W*P[4]+G*P[7],C[2]=R*P[2]+W*P[5]+G*P[8]}(x,x,b);const S=c.properties.get("color");return{u_matrix:u,u_lightpos:x,u_lightintensity:c.properties.get("intensity"),u_lightcolor:[S.r,S.g,S.b],u_vertical_gradient:+n,u_opacity:a}},Eo=(u,t,n,a,c,d,x)=>s.e(Na(u,t,n,a),kn(d,t,x),{u_height_factor:-Math.pow(2,c.overscaledZ)/x.tileSize/8}),ws=u=>({u_matrix:u}),g=(u,t,n,a)=>s.e(ws(u),kn(n,t,a)),I=(u,t)=>({u_matrix:u,u_world:t}),O=(u,t,n,a,c)=>s.e(g(u,t,n,a),{u_world:c}),Y=(u,t,n,a)=>{const c=u.transform;let d,x;if(a.paint.get("circle-pitch-alignment")==="map"){const b=oe(n,1,c.zoom);d=!0,x=[b,b]}else d=!1,x=c.pixelsToGLUnits;return{u_camera_to_center_distance:c.cameraToCenterDistance,u_scale_with_map:+(a.paint.get("circle-pitch-scale")==="map"),u_matrix:u.translatePosMatrix(t.posMatrix,n,a.paint.get("circle-translate"),a.paint.get("circle-translate-anchor")),u_pitch_with_map:+d,u_device_pixel_ratio:u.pixelRatio,u_extrude_scale:x}},ne=(u,t,n)=>{const a=oe(n,1,t.zoom),c=Math.pow(2,t.zoom-n.tileID.overscaledZ),d=n.tileID.overscaleFactor();return{u_matrix:u,u_camera_to_center_distance:t.cameraToCenterDistance,u_pixels_to_tile_units:a,u_extrude_scale:[t.pixelsToGLUnits[0]/(a*c),t.pixelsToGLUnits[1]/(a*c)],u_overscale_factor:d}},se=(u,t,n=1)=>({u_matrix:u,u_color:t,u_overlay:0,u_overlay_scale:n}),fe=u=>({u_matrix:u}),Re=(u,t,n,a)=>({u_matrix:u,u_extrude_scale:oe(t,1,n),u_intensity:a});function Ve(u,t){const n=Math.pow(2,t.canonical.z),a=t.canonical.y;return[new s.U(0,a/n).toLngLat().lat,new s.U(0,(a+1)/n).toLngLat().lat]}const rt=(u,t,n,a)=>{const c=u.transform;return{u_matrix:Ot(u,t,n,a),u_ratio:1/oe(t,1,c.zoom),u_device_pixel_ratio:u.pixelRatio,u_units_to_pixels:[1/c.pixelsToGLUnits[0],1/c.pixelsToGLUnits[1]]}},ot=(u,t,n,a,c)=>s.e(rt(u,t,n,c),{u_image:0,u_image_height:a}),Je=(u,t,n,a,c)=>{const d=u.transform,x=Hi(t,d);return{u_matrix:Ot(u,t,n,c),u_texsize:t.imageAtlasTexture.size,u_ratio:1/oe(t,1,d.zoom),u_device_pixel_ratio:u.pixelRatio,u_image:0,u_scale:[x,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Rt=(u,t,n,a,c,d)=>{const x=u.lineAtlas,b=Hi(t,u.transform),S=n.layout.get("line-cap")==="round",C=x.getDash(a.from,S),A=x.getDash(a.to,S),P=C.width*c.fromScale,R=A.width*c.toScale;return s.e(rt(u,t,n,d),{u_patternscale_a:[b/P,-C.height/2],u_patternscale_b:[b/R,-A.height/2],u_sdfgamma:x.width/(256*Math.min(P,R)*u.pixelRatio)/2,u_image:0,u_tex_y_a:C.y,u_tex_y_b:A.y,u_mix:c.t})};function Hi(u,t){return 1/oe(u,1,t.tileZoom)}function Ot(u,t,n,a){return u.translatePosMatrix(a?a.posMatrix:t.tileID.posMatrix,t,n.paint.get("line-translate"),n.paint.get("line-translate-anchor"))}const ar=(u,t,n,a,c)=>{return{u_matrix:u,u_tl_parent:t,u_scale_parent:n,u_buffer_scale:1,u_fade_t:a.mix,u_opacity:a.opacity*c.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:c.paint.get("raster-brightness-min"),u_brightness_high:c.paint.get("raster-brightness-max"),u_saturation_factor:(x=c.paint.get("raster-saturation"),x>0?1-1/(1.001-x):-x),u_contrast_factor:(d=c.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:Pe(c.paint.get("raster-hue-rotate"))};var d,x};function Pe(u){u*=Math.PI/180;const t=Math.sin(u),n=Math.cos(u);return[(2*n+1)/3,(-Math.sqrt(3)*t-n+1)/3,(Math.sqrt(3)*t-n+1)/3]}const _t=(u,t,n,a,c,d,x,b,S,C)=>{const A=c.transform;return{u_is_size_zoom_constant:+(u==="constant"||u==="source"),u_is_size_feature_constant:+(u==="constant"||u==="camera"),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:A.cameraToCenterDistance,u_pitch:A.pitch/360*2*Math.PI,u_rotate_symbol:+n,u_aspect_ratio:A.width/A.height,u_fade_change:c.options.fadeDuration?c.symbolFadeChange:1,u_matrix:d,u_label_plane_matrix:x,u_coord_matrix:b,u_is_text:+S,u_pitch_with_map:+a,u_texsize:C,u_texture:0}},vi=(u,t,n,a,c,d,x,b,S,C,A)=>{const P=c.transform;return s.e(_t(u,t,n,a,c,d,x,b,S,C),{u_gamma_scale:a?Math.cos(P._pitch)*P.cameraToCenterDistance:1,u_device_pixel_ratio:c.pixelRatio,u_is_halo:+A})},Xi=(u,t,n,a,c,d,x,b,S,C)=>s.e(vi(u,t,n,a,c,d,x,b,!0,S,!0),{u_texsize_icon:C,u_texture_icon:1}),tr=(u,t,n)=>({u_matrix:u,u_opacity:t,u_color:n}),nn=(u,t,n,a,c,d)=>s.e(function(x,b,S,C){const A=S.imageManager.getPattern(x.from.toString()),P=S.imageManager.getPattern(x.to.toString()),{width:R,height:W}=S.imageManager.getPixelSize(),G=Math.pow(2,C.tileID.overscaledZ),K=C.tileSize*Math.pow(2,S.transform.tileZoom)/G,q=K*(C.tileID.canonical.x+C.tileID.wrap*G),le=K*C.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:A.tl,u_pattern_br_a:A.br,u_pattern_tl_b:P.tl,u_pattern_br_b:P.br,u_texsize:[R,W],u_mix:b.t,u_pattern_size_a:A.displaySize,u_pattern_size_b:P.displaySize,u_scale_a:b.fromScale,u_scale_b:b.toScale,u_tile_units_to_pixels:1/oe(C,1,S.transform.tileZoom),u_pixel_coord_upper:[q>>16,le>>16],u_pixel_coord_lower:[65535&q,65535&le]}}(a,d,n,c),{u_matrix:u,u_opacity:t}),ra={fillExtrusion:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_lightpos:new s.aP(u,t.u_lightpos),u_lightintensity:new s.aM(u,t.u_lightintensity),u_lightcolor:new s.aP(u,t.u_lightcolor),u_vertical_gradient:new s.aM(u,t.u_vertical_gradient),u_opacity:new s.aM(u,t.u_opacity)}),fillExtrusionPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_lightpos:new s.aP(u,t.u_lightpos),u_lightintensity:new s.aM(u,t.u_lightintensity),u_lightcolor:new s.aP(u,t.u_lightcolor),u_vertical_gradient:new s.aM(u,t.u_vertical_gradient),u_height_factor:new s.aM(u,t.u_height_factor),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade),u_opacity:new s.aM(u,t.u_opacity)}),fill:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix)}),fillPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),fillOutline:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world)}),fillOutlinePattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world),u_image:new s.aL(u,t.u_image),u_texsize:new s.aQ(u,t.u_texsize),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),circle:(u,t)=>({u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_scale_with_map:new s.aL(u,t.u_scale_with_map),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_extrude_scale:new s.aQ(u,t.u_extrude_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_matrix:new s.aN(u,t.u_matrix)}),collisionBox:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pixels_to_tile_units:new s.aM(u,t.u_pixels_to_tile_units),u_extrude_scale:new s.aQ(u,t.u_extrude_scale),u_overscale_factor:new s.aM(u,t.u_overscale_factor)}),collisionCircle:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_inv_matrix:new s.aN(u,t.u_inv_matrix),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_viewport_size:new s.aQ(u,t.u_viewport_size)}),debug:(u,t)=>({u_color:new s.aR(u,t.u_color),u_matrix:new s.aN(u,t.u_matrix),u_overlay:new s.aL(u,t.u_overlay),u_overlay_scale:new s.aM(u,t.u_overlay_scale)}),clippingMask:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix)}),heatmap:(u,t)=>({u_extrude_scale:new s.aM(u,t.u_extrude_scale),u_intensity:new s.aM(u,t.u_intensity),u_matrix:new s.aN(u,t.u_matrix)}),heatmapTexture:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_world:new s.aQ(u,t.u_world),u_image:new s.aL(u,t.u_image),u_color_ramp:new s.aL(u,t.u_color_ramp),u_opacity:new s.aM(u,t.u_opacity)}),hillshade:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_latrange:new s.aQ(u,t.u_latrange),u_light:new s.aQ(u,t.u_light),u_shadow:new s.aR(u,t.u_shadow),u_highlight:new s.aR(u,t.u_highlight),u_accent:new s.aR(u,t.u_accent)}),hillshadePrepare:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_image:new s.aL(u,t.u_image),u_dimension:new s.aQ(u,t.u_dimension),u_zoom:new s.aM(u,t.u_zoom),u_unpack:new s.aO(u,t.u_unpack)}),line:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels)}),lineGradient:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_image:new s.aL(u,t.u_image),u_image_height:new s.aM(u,t.u_image_height)}),linePattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texsize:new s.aQ(u,t.u_texsize),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_image:new s.aL(u,t.u_image),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_scale:new s.aP(u,t.u_scale),u_fade:new s.aM(u,t.u_fade)}),lineSDF:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ratio:new s.aM(u,t.u_ratio),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_units_to_pixels:new s.aQ(u,t.u_units_to_pixels),u_patternscale_a:new s.aQ(u,t.u_patternscale_a),u_patternscale_b:new s.aQ(u,t.u_patternscale_b),u_sdfgamma:new s.aM(u,t.u_sdfgamma),u_image:new s.aL(u,t.u_image),u_tex_y_a:new s.aM(u,t.u_tex_y_a),u_tex_y_b:new s.aM(u,t.u_tex_y_b),u_mix:new s.aM(u,t.u_mix)}),raster:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_tl_parent:new s.aQ(u,t.u_tl_parent),u_scale_parent:new s.aM(u,t.u_scale_parent),u_buffer_scale:new s.aM(u,t.u_buffer_scale),u_fade_t:new s.aM(u,t.u_fade_t),u_opacity:new s.aM(u,t.u_opacity),u_image0:new s.aL(u,t.u_image0),u_image1:new s.aL(u,t.u_image1),u_brightness_low:new s.aM(u,t.u_brightness_low),u_brightness_high:new s.aM(u,t.u_brightness_high),u_saturation_factor:new s.aM(u,t.u_saturation_factor),u_contrast_factor:new s.aM(u,t.u_contrast_factor),u_spin_weights:new s.aP(u,t.u_spin_weights)}),symbolIcon:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texture:new s.aL(u,t.u_texture)}),symbolSDF:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texture:new s.aL(u,t.u_texture),u_gamma_scale:new s.aM(u,t.u_gamma_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_is_halo:new s.aL(u,t.u_is_halo)}),symbolTextAndIcon:(u,t)=>({u_is_size_zoom_constant:new s.aL(u,t.u_is_size_zoom_constant),u_is_size_feature_constant:new s.aL(u,t.u_is_size_feature_constant),u_size_t:new s.aM(u,t.u_size_t),u_size:new s.aM(u,t.u_size),u_camera_to_center_distance:new s.aM(u,t.u_camera_to_center_distance),u_pitch:new s.aM(u,t.u_pitch),u_rotate_symbol:new s.aL(u,t.u_rotate_symbol),u_aspect_ratio:new s.aM(u,t.u_aspect_ratio),u_fade_change:new s.aM(u,t.u_fade_change),u_matrix:new s.aN(u,t.u_matrix),u_label_plane_matrix:new s.aN(u,t.u_label_plane_matrix),u_coord_matrix:new s.aN(u,t.u_coord_matrix),u_is_text:new s.aL(u,t.u_is_text),u_pitch_with_map:new s.aL(u,t.u_pitch_with_map),u_texsize:new s.aQ(u,t.u_texsize),u_texsize_icon:new s.aQ(u,t.u_texsize_icon),u_texture:new s.aL(u,t.u_texture),u_texture_icon:new s.aL(u,t.u_texture_icon),u_gamma_scale:new s.aM(u,t.u_gamma_scale),u_device_pixel_ratio:new s.aM(u,t.u_device_pixel_ratio),u_is_halo:new s.aL(u,t.u_is_halo)}),background:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_opacity:new s.aM(u,t.u_opacity),u_color:new s.aR(u,t.u_color)}),backgroundPattern:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_opacity:new s.aM(u,t.u_opacity),u_image:new s.aL(u,t.u_image),u_pattern_tl_a:new s.aQ(u,t.u_pattern_tl_a),u_pattern_br_a:new s.aQ(u,t.u_pattern_br_a),u_pattern_tl_b:new s.aQ(u,t.u_pattern_tl_b),u_pattern_br_b:new s.aQ(u,t.u_pattern_br_b),u_texsize:new s.aQ(u,t.u_texsize),u_mix:new s.aM(u,t.u_mix),u_pattern_size_a:new s.aQ(u,t.u_pattern_size_a),u_pattern_size_b:new s.aQ(u,t.u_pattern_size_b),u_scale_a:new s.aM(u,t.u_scale_a),u_scale_b:new s.aM(u,t.u_scale_b),u_pixel_coord_upper:new s.aQ(u,t.u_pixel_coord_upper),u_pixel_coord_lower:new s.aQ(u,t.u_pixel_coord_lower),u_tile_units_to_pixels:new s.aM(u,t.u_tile_units_to_pixels)}),terrain:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texture:new s.aL(u,t.u_texture),u_ele_delta:new s.aM(u,t.u_ele_delta)}),terrainDepth:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_ele_delta:new s.aM(u,t.u_ele_delta)}),terrainCoords:(u,t)=>({u_matrix:new s.aN(u,t.u_matrix),u_texture:new s.aL(u,t.u_texture),u_terrain_coords_id:new s.aM(u,t.u_terrain_coords_id),u_ele_delta:new s.aM(u,t.u_ele_delta)})};class Ci{constructor(t,n,a){this.context=t;const c=t.gl;this.buffer=c.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),c.bufferData(c.ELEMENT_ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?c.DYNAMIC_DRAW:c.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(t){const n=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),n.bufferSubData(n.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const ss={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class na{constructor(t,n,a,c){this.length=n.length,this.attributes=a,this.itemSize=n.bytesPerElement,this.dynamicDraw=c,this.context=t;const d=t.gl;this.buffer=d.createBuffer(),t.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,n.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete n.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(t){if(t.length!==this.length)throw new Error(`Length of new data is ${t.length}, which doesn't match current length of ${this.length}`);const n=this.context.gl;this.bind(),n.bufferSubData(n.ARRAY_BUFFER,0,t.arrayBuffer)}enableAttributes(t,n){for(let a=0;a0){const je=s.Z(),dt=Me;s.aU(je,xe.placementInvProjMatrix,u.transform.glCoordMatrix),s.aU(je,je,xe.placementViewportMatrix),A.push({circleArray:ze,circleOffset:R,transform:dt,invTransform:je,coord:ce}),P+=ze.length/4,R=P}Oe&&C.draw(b,S.LINES,Qt.disabled,Ni.disabled,u.colorModeForRenderPass(),xi.disabled,ne(Me,u.transform,ve),u.style.map.terrain&&u.style.map.terrain.getTerrainData(ce),n.id,Oe.layoutVertexBuffer,Oe.indexBuffer,Oe.segments,null,u.transform.zoom,null,null,Oe.collisionVertexBuffer)}if(!x||!A.length)return;const W=u.useProgram("collisionCircle"),G=new s.aV;G.resize(4*P),G._trim();let K=0;for(const ee of A)for(let ce=0;ce=0&&(G[q.associatedIconIndex]={shiftedAnchor:$t,angle:Qe})}else j(q.numGlyphs,R)}if(C){W.clear();const K=u.icon.placedSymbolArray;for(let q=0;qu.style.map.terrain.getElevation(Oe,Ln,mr):null,zr=n.layout.get("text-rotation-alignment")==="map";We(je,Oe.posMatrix,u,c,Qi,Do,q,C,zr,fr)}const Os=u.translatePosMatrix(Oe.posMatrix,ze,d,x),Ca=le||c&&xe||_s?ls:Qi,cn=u.translatePosMatrix(Do,ze,d,x,!0),Jr=Qe&&n.paint.get(c?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let xn;xn=Qe?je.iconsInText?Xi(Ct.kind,Jt,me,q,u,Os,Ca,cn,ei,Pr):vi(Ct.kind,Jt,me,q,u,Os,Ca,cn,c,ei,!0):_t(Ct.kind,Jt,me,q,u,Os,Ca,cn,c,ei);const Bs={program:Mi,buffers:dt,uniformValues:xn,atlasTexture:pr,atlasTextureIcon:br,atlasInterpolation:qi,atlasInterpolationIcon:Kr,isSDF:Qe,hasHalo:Jr};if(ee&&je.canOverlap){ce=!0;const fr=dt.segments.get();for(const zr of fr)Me.push({segments:new s.S([zr]),sortKey:zr.sortKey,state:Bs,terrainData:jt})}else Me.push({segments:dt.segments,sortKey:0,state:Bs,terrainData:jt})}ce&&Me.sort((Oe,ze)=>Oe.sortKey-ze.sortKey);for(const Oe of Me){const ze=Oe.state;if(R.activeTexture.set(W.TEXTURE0),ze.atlasTexture.bind(ze.atlasInterpolation,W.CLAMP_TO_EDGE),ze.atlasTextureIcon&&(R.activeTexture.set(W.TEXTURE1),ze.atlasTextureIcon&&ze.atlasTextureIcon.bind(ze.atlasInterpolationIcon,W.CLAMP_TO_EDGE)),ze.isSDF){const je=ze.uniformValues;ze.hasHalo&&(je.u_is_halo=1,_a(ze.buffers,Oe.segments,n,u,ze.program,ve,A,P,je,Oe.terrainData)),je.u_is_halo=0}_a(ze.buffers,Oe.segments,n,u,ze.program,ve,A,P,ze.uniformValues,Oe.terrainData)}}function _a(u,t,n,a,c,d,x,b,S,C){const A=a.context;c.draw(A,A.gl.TRIANGLES,d,x,b,xi.disabled,S,C,n.id,u.layoutVertexBuffer,u.indexBuffer,t,n.paint,a.transform.zoom,u.programConfigurations.get(n.id),u.dynamicLayoutVertexBuffer,u.opacityVertexBuffer)}function us(u,t,n,a,c){if(!n||!a||!a.imageAtlas)return;const d=a.imageAtlas.patternPositions;let x=d[n.to.toString()],b=d[n.from.toString()];if(!x&&b&&(x=b),!b&&x&&(b=x),!x||!b){const S=c.getPaintProperty(t);x=d[S],b=d[S]}x&&b&&u.setConstantPatternPositions(x,b)}function Ms(u,t,n,a,c,d,x){const b=u.context.gl,S="fill-pattern",C=n.paint.get(S),A=C&&C.constantOr(1),P=n.getCrossfadeParameters();let R,W,G,K,q;x?(W=A&&!n.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",R=b.LINES):(W=A?"fillPattern":"fill",R=b.TRIANGLES);const le=C.constantOr(null);for(const me of a){const ee=t.getTile(me);if(A&&!ee.patternsLoaded())continue;const ce=ee.getBucket(n);if(!ce)continue;const ve=ce.programConfigurations.get(n.id),xe=u.useProgram(W,ve),Me=u.style.map.terrain&&u.style.map.terrain.getTerrainData(me);A&&(u.context.activeTexture.set(b.TEXTURE0),ee.imageAtlasTexture.bind(b.LINEAR,b.CLAMP_TO_EDGE),ve.updatePaintBuffers(P)),us(ve,S,le,ee,n);const Oe=Me?me:null,ze=u.translatePosMatrix(Oe?Oe.posMatrix:me.posMatrix,ee,n.paint.get("fill-translate"),n.paint.get("fill-translate-anchor"));if(x){K=ce.indexBuffer2,q=ce.segments2;const je=[b.drawingBufferWidth,b.drawingBufferHeight];G=W==="fillOutlinePattern"&&A?O(ze,u,P,ee,je):I(ze,je)}else K=ce.indexBuffer,q=ce.segments,G=A?g(ze,u,P,ee):ws(ze);xe.draw(u.context,R,c,u.stencilModeForClipping(me),d,xi.disabled,G,Me,n.id,ce.layoutVertexBuffer,K,q,n.paint,u.transform.zoom,ve)}}function As(u,t,n,a,c,d,x){const b=u.context,S=b.gl,C="fill-extrusion-pattern",A=n.paint.get(C),P=A.constantOr(1),R=n.getCrossfadeParameters(),W=n.paint.get("fill-extrusion-opacity"),G=A.constantOr(null);for(const K of a){const q=t.getTile(K),le=q.getBucket(n);if(!le)continue;const me=u.style.map.terrain&&u.style.map.terrain.getTerrainData(K),ee=le.programConfigurations.get(n.id),ce=u.useProgram(P?"fillExtrusionPattern":"fillExtrusion",ee);P&&(u.context.activeTexture.set(S.TEXTURE0),q.imageAtlasTexture.bind(S.LINEAR,S.CLAMP_TO_EDGE),ee.updatePaintBuffers(R)),us(ee,C,G,q,n);const ve=u.translatePosMatrix(K.posMatrix,q,n.paint.get("fill-extrusion-translate"),n.paint.get("fill-extrusion-translate-anchor")),xe=n.paint.get("fill-extrusion-vertical-gradient"),Me=P?Eo(ve,u,xe,W,K,R,q):Na(ve,u,xe,W);ce.draw(b,b.gl.TRIANGLES,c,d,x,xi.backCCW,Me,me,n.id,le.layoutVertexBuffer,le.indexBuffer,le.segments,n.paint,u.transform.zoom,ee,u.style.map.terrain&&le.centroidVertexBuffer)}}function hl(u,t,n,a,c,d,x){const b=u.context,S=b.gl,C=n.fbo;if(!C)return;const A=u.useProgram("hillshade"),P=u.style.map.terrain&&u.style.map.terrain.getTerrainData(t);b.activeTexture.set(S.TEXTURE0),S.bindTexture(S.TEXTURE_2D,C.colorAttachment.get()),A.draw(b,S.TRIANGLES,c,d,x,xi.disabled,((R,W,G,K)=>{const q=G.paint.get("hillshade-shadow-color"),le=G.paint.get("hillshade-highlight-color"),me=G.paint.get("hillshade-accent-color");let ee=G.paint.get("hillshade-illumination-direction")*(Math.PI/180);G.paint.get("hillshade-illumination-anchor")==="viewport"&&(ee-=R.transform.angle);const ce=!R.options.moving;return{u_matrix:K?K.posMatrix:R.transform.calculatePosMatrix(W.tileID.toUnwrapped(),ce),u_image:0,u_latrange:Ve(0,W.tileID),u_light:[G.paint.get("hillshade-exaggeration"),ee],u_shadow:q,u_highlight:le,u_accent:me}})(u,n,a,P?t:null),P,a.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments)}function ga(u,t,n,a,c,d){const x=u.context,b=x.gl,S=t.dem;if(S&&S.data){const C=S.dim,A=S.stride,P=S.getPixels();if(x.activeTexture.set(b.TEXTURE1),x.pixelStoreUnpackPremultiplyAlpha.set(!1),t.demTexture=t.demTexture||u.getTileTexture(A),t.demTexture){const W=t.demTexture;W.update(P,{premultiply:!1}),W.bind(b.NEAREST,b.CLAMP_TO_EDGE)}else t.demTexture=new At(x,P,b.RGBA,{premultiply:!1}),t.demTexture.bind(b.NEAREST,b.CLAMP_TO_EDGE);x.activeTexture.set(b.TEXTURE0);let R=t.fbo;if(!R){const W=new At(x,{width:C,height:C,data:null},b.RGBA);W.bind(b.LINEAR,b.CLAMP_TO_EDGE),R=t.fbo=x.createFramebuffer(C,C,!0,!1),R.colorAttachment.set(W.texture)}x.bindFramebuffer.set(R.framebuffer),x.viewport.set([0,0,C,C]),u.useProgram("hillshadePrepare").draw(x,b.TRIANGLES,a,c,d,xi.disabled,((W,G)=>{const K=G.stride,q=s.Z();return s.aS(q,0,s.N,-s.N,0,0,1),s.$(q,q,[0,-s.N,0]),{u_matrix:q,u_image:1,u_dimension:[K,K],u_zoom:W.overscaledZ,u_unpack:G.getUnpackVector()}})(t.tileID,S),null,n.id,u.rasterBoundsBuffer,u.quadTriangleIndexBuffer,u.rasterBoundsSegments),t.needsHillshadePrepare=!1}}function ya(u,t,n,a,c,d){const x=a.paint.get("raster-fade-duration");if(!d&&x>0){const b=s.h.now(),S=(b-u.timeAdded)/x,C=t?(b-t.timeAdded)/x:-1,A=n.getSource(),P=c.coveringZoomLevel({tileSize:A.tileSize,roundZoom:A.roundZoom}),R=!t||Math.abs(t.tileID.overscaledZ-P)>Math.abs(u.tileID.overscaledZ-P),W=R&&u.refreshedUponExpiration?1:s.ad(R?S:1-C,0,1);return u.refreshedUponExpiration&&S>=1&&(u.refreshedUponExpiration=!1),t?{opacity:1,mix:1-W}:{opacity:W,mix:0}}return{opacity:1,mix:0}}const Xo=new s.aT(1,0,0,1),va=new s.aT(0,1,0,1),io=new s.aT(0,0,1,1),dl=new s.aT(1,0,1,1),Po=new s.aT(0,1,1,1);function hs(u,t,n,a){Ko(u,0,t+n/2,u.transform.width,n,a)}function xa(u,t,n,a){Ko(u,t-n/2,0,n,u.transform.height,a)}function Ko(u,t,n,a,c,d){const x=u.context,b=x.gl;b.enable(b.SCISSOR_TEST),b.scissor(t*u.pixelRatio,n*u.pixelRatio,a*u.pixelRatio,c*u.pixelRatio),x.clear({color:d}),b.disable(b.SCISSOR_TEST)}function ba(u,t,n){const a=u.context,c=a.gl,d=n.posMatrix,x=u.useProgram("debug"),b=Qt.disabled,S=Ni.disabled,C=u.colorModeForRenderPass(),A="$debug",P=u.style.map.terrain&&u.style.map.terrain.getTerrainData(n);a.activeTexture.set(c.TEXTURE0);const R=t.getTileByID(n.key).latestRawTileData,W=Math.floor((R&&R.byteLength||0)/1024),G=t.getTile(n).tileSize,K=512/Math.min(G,512)*(n.overscaledZ/u.transform.zoom)*.5;let q=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(q+=` => ${n.overscaledZ}`),function(le,me){le.initDebugOverlayCanvas();const ee=le.debugOverlayCanvas,ce=le.context.gl,ve=le.debugOverlayCanvas.getContext("2d");ve.clearRect(0,0,ee.width,ee.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(me,5,5),ve.strokeText(me,5,5),le.debugOverlayTexture.update(ee),le.debugOverlayTexture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE)}(u,`${q} ${W}kB`),x.draw(a,c.TRIANGLES,b,S,Ki.alphaBlended,xi.disabled,se(d,s.aT.transparent,K),null,A,u.debugBuffer,u.quadTriangleIndexBuffer,u.debugSegments),x.draw(a,c.LINE_STRIP,b,S,C,xi.disabled,se(d,s.aT.red),P,A,u.debugBuffer,u.tileBorderIndexBuffer,u.debugSegments)}function Ji(u,t,n){const a=u.context,c=a.gl,d=u.colorModeForRenderPass(),x=new Qt(c.LEQUAL,Qt.ReadWrite,u.depthRangeFor3D),b=u.useProgram("terrain"),S=t.getTerrainMesh();a.bindFramebuffer.set(null),a.viewport.set([0,0,u.width,u.height]);for(const C of n){const A=u.renderToTexture.getTexture(C),P=t.getTerrainData(C.tileID);a.activeTexture.set(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,A.texture);const R={u_matrix:u.transform.calculatePosMatrix(C.tileID.toUnwrapped()),u_texture:0,u_ele_delta:t.getMeshFrameDelta(u.transform.zoom)};b.draw(a,c.TRIANGLES,x,Ni.disabled,d,xi.backCCW,R,P,"terrain",S.vertexBuffer,S.indexBuffer,S.segments)}}class zo{constructor(t,n){this.context=new Fl(t),this.transform=n,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:s.Z(),renderTime:0},this.setup(),this.numSublayers=tn.maxUnderzooming+tn.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new jn}resize(t,n,a){if(this.width=Math.floor(t*a),this.height=Math.floor(n*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const c of this.style._order)this.style._layers[c].resize()}setup(){const t=this.context,n=new s.a_;n.emplaceBack(0,0),n.emplaceBack(s.N,0),n.emplaceBack(0,s.N),n.emplaceBack(s.N,s.N),this.tileExtentBuffer=t.createVertexBuffer(n,ia.members),this.tileExtentSegments=s.S.simpleSegment(0,0,4,2);const a=new s.a_;a.emplaceBack(0,0),a.emplaceBack(s.N,0),a.emplaceBack(0,s.N),a.emplaceBack(s.N,s.N),this.debugBuffer=t.createVertexBuffer(a,ia.members),this.debugSegments=s.S.simpleSegment(0,0,4,5);const c=new s.V;c.emplaceBack(0,0,0,0),c.emplaceBack(s.N,0,s.N,0),c.emplaceBack(0,s.N,0,s.N),c.emplaceBack(s.N,s.N,s.N,s.N),this.rasterBoundsBuffer=t.createVertexBuffer(c,Gt.members),this.rasterBoundsSegments=s.S.simpleSegment(0,0,4,2);const d=new s.a_;d.emplaceBack(0,0),d.emplaceBack(1,0),d.emplaceBack(0,1),d.emplaceBack(1,1),this.viewportBuffer=t.createVertexBuffer(d,ia.members),this.viewportSegments=s.S.simpleSegment(0,0,4,2);const x=new s.a$;x.emplaceBack(0),x.emplaceBack(1),x.emplaceBack(3),x.emplaceBack(2),x.emplaceBack(0),this.tileBorderIndexBuffer=t.createIndexBuffer(x);const b=new s.b0;b.emplaceBack(0,1,2),b.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=t.createIndexBuffer(b);const S=this.context.gl;this.stencilClearMode=new Ni({func:S.ALWAYS,mask:0},0,255,S.ZERO,S.ZERO,S.ZERO)}clearStencil(){const t=this.context,n=t.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=s.Z();s.aS(a,0,this.width,this.height,0,0,1),s.a0(a,a,[n.drawingBufferWidth,n.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(t,n.TRIANGLES,Qt.disabled,this.stencilClearMode,Ki.disabled,xi.disabled,fe(a),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(t,n){if(this.currentStencilSource===t.source||!t.isTileClipped()||!n||!n.length)return;this.currentStencilSource=t.source;const a=this.context,c=a.gl;this.nextStencilID+n.length>256&&this.clearStencil(),a.setColorMode(Ki.disabled),a.setDepthMode(Qt.disabled);const d=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const x of n){const b=this._tileClippingMaskIDs[x.key]=this.nextStencilID++,S=this.style.map.terrain&&this.style.map.terrain.getTerrainData(x);d.draw(a,c.TRIANGLES,Qt.disabled,new Ni({func:c.ALWAYS,mask:0},b,255,c.KEEP,c.KEEP,c.REPLACE),Ki.disabled,xi.disabled,fe(x.posMatrix),S,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const t=this.nextStencilID++,n=this.context.gl;return new Ni({func:n.NOTEQUAL,mask:255},t,255,n.KEEP,n.KEEP,n.REPLACE)}stencilModeForClipping(t){const n=this.context.gl;return new Ni({func:n.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,n.KEEP,n.KEEP,n.REPLACE)}stencilConfigForOverlap(t){const n=this.context.gl,a=t.sort((x,b)=>b.overscaledZ-x.overscaledZ),c=a[a.length-1].overscaledZ,d=a[0].overscaledZ-c+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const x={};for(let b=0;b=0;this.currentLayer--){const S=this.style._layers[a[this.currentLayer]],C=c[S.source],A=d[S.source];this._renderTileClippingMasks(S,A),this.renderLayer(this,C,S,A)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerq.source&&!q.isHidden(A)?[C.sourceCaches[q.source]]:[]),W=R.filter(q=>q.getSource().type==="vector"),G=R.filter(q=>q.getSource().type!=="vector"),K=q=>{(!P||P.getSource().maxzoomK(q)),P||G.forEach(q=>K(q)),P}(this.style,this.transform.zoom);S&&function(C,A,P){for(let R=0;RW.style.map.terrain.getElevation(xe,Ct,gt):null)}}}(S,d,b,x,b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),C),b.paint.get("icon-opacity").constantOr(1)!==0&&ko(d,x,b,S,!1,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),b.layout.get("icon-rotation-alignment"),b.layout.get("icon-pitch-alignment"),b.layout.get("icon-keep-upright"),A,P),b.paint.get("text-opacity").constantOr(1)!==0&&ko(d,x,b,S,!0,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),b.layout.get("text-rotation-alignment"),b.layout.get("text-pitch-alignment"),b.layout.get("text-keep-upright"),A,P),x.map.showCollisionBoxes&&(Ao(d,x,b,S,b.paint.get("text-translate"),b.paint.get("text-translate-anchor"),!0),Ao(d,x,b,S,b.paint.get("icon-translate"),b.paint.get("icon-translate-anchor"),!1))})(t,n,a,c,this.style.placement.variableOffsets);break;case"circle":(function(d,x,b,S){if(d.renderPass!=="translucent")return;const C=b.paint.get("circle-opacity"),A=b.paint.get("circle-stroke-width"),P=b.paint.get("circle-stroke-opacity"),R=!b.layout.get("circle-sort-key").isConstant();if(C.constantOr(1)===0&&(A.constantOr(1)===0||P.constantOr(1)===0))return;const W=d.context,G=W.gl,K=d.depthModeForSublayer(0,Qt.ReadOnly),q=Ni.disabled,le=d.colorModeForRenderPass(),me=[];for(let ee=0;eeee.sortKey-ce.sortKey);for(const ee of me){const{programConfiguration:ce,program:ve,layoutVertexBuffer:xe,indexBuffer:Me,uniformValues:Oe,terrainData:ze}=ee.state;ve.draw(W,G.TRIANGLES,K,q,le,xi.disabled,Oe,ze,b.id,xe,Me,ee.segments,b.paint,d.transform.zoom,ce)}})(t,n,a,c);break;case"heatmap":(function(d,x,b,S){if(b.paint.get("heatmap-opacity")!==0)if(d.renderPass==="offscreen"){const C=d.context,A=C.gl,P=Ni.disabled,R=new Ki([A.ONE,A.ONE],s.aT.transparent,[!0,!0,!0,!0]);(function(W,G,K){const q=W.gl;W.activeTexture.set(q.TEXTURE1),W.viewport.set([0,0,G.width/4,G.height/4]);let le=K.heatmapFbo;if(le)q.bindTexture(q.TEXTURE_2D,le.colorAttachment.get()),W.bindFramebuffer.set(le.framebuffer);else{const me=q.createTexture();q.bindTexture(q.TEXTURE_2D,me),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_S,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_WRAP_T,q.CLAMP_TO_EDGE),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MIN_FILTER,q.LINEAR),q.texParameteri(q.TEXTURE_2D,q.TEXTURE_MAG_FILTER,q.LINEAR),le=K.heatmapFbo=W.createFramebuffer(G.width/4,G.height/4,!1,!1),function(ee,ce,ve,xe){var Me,Oe;const ze=ee.gl,je=(Me=ee.HALF_FLOAT)!==null&&Me!==void 0?Me:ze.UNSIGNED_BYTE,dt=(Oe=ee.RGBA16F)!==null&&Oe!==void 0?Oe:ze.RGBA;ze.texImage2D(ze.TEXTURE_2D,0,dt,ce.width/4,ce.height/4,0,ze.RGBA,je,null),xe.colorAttachment.set(ve)}(W,G,me,le)}})(C,d,b),C.clear({color:s.aT.transparent});for(let W=0;W{const ee=s.Z();s.aS(ee,0,K.width,K.height,0,0,1);const ce=K.context.gl;return{u_matrix:ee,u_world:[ce.drawingBufferWidth,ce.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:q.paint.get("heatmap-opacity")}})(C,A),null,A.id,C.viewportBuffer,C.quadTriangleIndexBuffer,C.viewportSegments,A.paint,C.transform.zoom)}(d,b))})(t,n,a,c);break;case"line":(function(d,x,b,S){if(d.renderPass!=="translucent")return;const C=b.paint.get("line-opacity"),A=b.paint.get("line-width");if(C.constantOr(1)===0||A.constantOr(1)===0)return;const P=d.depthModeForSublayer(0,Qt.ReadOnly),R=d.colorModeForRenderPass(),W=b.paint.get("line-dasharray"),G=b.paint.get("line-pattern"),K=G.constantOr(1),q=b.paint.get("line-gradient"),le=b.getCrossfadeParameters(),me=K?"linePattern":W?"lineSDF":q?"lineGradient":"line",ee=d.context,ce=ee.gl;let ve=!0;for(const xe of S){const Me=x.getTile(xe);if(K&&!Me.patternsLoaded())continue;const Oe=Me.getBucket(b);if(!Oe)continue;const ze=Oe.programConfigurations.get(b.id),je=d.context.program.get(),dt=d.useProgram(me,ze),$t=ve||dt.program!==je,Qe=d.style.map.terrain&&d.style.map.terrain.getTerrainData(xe),Ct=G.constantOr(null);if(Ct&&Me.imageAtlas){const Jt=Me.imageAtlas,jt=Jt.patternPositions[Ct.to.toString()],ei=Jt.patternPositions[Ct.from.toString()];jt&&ei&&ze.setConstantPatternPositions(jt,ei)}const gt=Qe?xe:null,Mi=K?Je(d,Me,b,le,gt):W?Rt(d,Me,b,W,le,gt):q?ot(d,Me,b,Oe.lineClipsArray.length,gt):rt(d,Me,b,gt);if(K)ee.activeTexture.set(ce.TEXTURE0),Me.imageAtlasTexture.bind(ce.LINEAR,ce.CLAMP_TO_EDGE),ze.updatePaintBuffers(le);else if(W&&($t||d.lineAtlas.dirty))ee.activeTexture.set(ce.TEXTURE0),d.lineAtlas.bind(ee);else if(q){const Jt=Oe.gradients[b.id];let jt=Jt.texture;if(b.gradientVersion!==Jt.version){let ei=256;if(b.stepInterpolant){const pr=x.getSource().maxzoom,qi=xe.canonical.z===pr?Math.ceil(1<0?n.pop():null}isPatternMissing(t){if(!t)return!1;if(!t.from||!t.to)return!0;const n=this.imageManager.getPattern(t.from.toString()),a=this.imageManager.getPattern(t.to.toString());return!n||!a}useProgram(t,n){this.cache=this.cache||{};const a=t+(n?n.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[a]||(this.cache[a]=new bs(this.context,Gi[t],n,ra[t],this._showOverdrawInspector,this.style.map.terrain)),this.cache[a]}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 t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new At(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:t,drawingBufferHeight:n}=this.context.gl;return this.width!==t||this.height!==n}}class Xr{constructor(t,n){this.points=t,this.planes=n}static fromInvProjectionMatrix(t,n,a){const c=Math.pow(2,a),d=[[-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(b=>{const S=1/(b=s.ag([],b,t))[3]/n*c;return s.b3(b,b,[S,S,1/b[3],S])}),x=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(b=>{const S=function(R,W){var G=W[0],K=W[1],q=W[2],le=G*G+K*K+q*q;return le>0&&(le=1/Math.sqrt(le)),R[0]=W[0]*le,R[1]=W[1]*le,R[2]=W[2]*le,R}([],function(R,W,G){var K=W[0],q=W[1],le=W[2],me=G[0],ee=G[1],ce=G[2];return R[0]=q*ce-le*ee,R[1]=le*me-K*ce,R[2]=K*ee-q*me,R}([],ti([],d[b[0]],d[b[1]]),ti([],d[b[2]],d[b[1]]))),C=-((A=S)[0]*(P=d[b[1]])[0]+A[1]*P[1]+A[2]*P[2]);var A,P;return S.concat(C)});return new Xr(d,x)}}class ro{constructor(t,n){this.min=t,this.max=n,this.center=function(a,c,d){return a[0]=.5*c[0],a[1]=.5*c[1],a[2]=.5*c[2],a}([],function(a,c,d){return a[0]=c[0]+d[0],a[1]=c[1]+d[1],a[2]=c[2]+d[2],a}([],this.min,this.max))}quadrant(t){const n=[t%2==0,t<2],a=it(this.min),c=it(this.max);for(let d=0;d=0&&x++;if(x===0)return 0;x!==n.length&&(a=!1)}if(a)return 2;for(let c=0;c<3;c++){let d=Number.MAX_VALUE,x=-Number.MAX_VALUE;for(let b=0;bthis.max[c]-this.min[c])return 0}return 1}}class ds{constructor(t=0,n=0,a=0,c=0){if(isNaN(t)||t<0||isNaN(n)||n<0||isNaN(a)||a<0||isNaN(c)||c<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=n,this.left=a,this.right=c}interpolate(t,n,a){return n.top!=null&&t.top!=null&&(this.top=s.B.number(t.top,n.top,a)),n.bottom!=null&&t.bottom!=null&&(this.bottom=s.B.number(t.bottom,n.bottom,a)),n.left!=null&&t.left!=null&&(this.left=s.B.number(t.left,n.left,a)),n.right!=null&&t.right!=null&&(this.right=s.B.number(t.right,n.right,a)),this}getCenter(t,n){const a=s.ad((this.left+t-this.right)/2,0,t),c=s.ad((this.top+n-this.bottom)/2,0,n);return new s.P(a,c)}equals(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right}clone(){return new ds(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class wa{constructor(t,n,a,c,d){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=d===void 0||!!d,this._minZoom=t||0,this._maxZoom=n||22,this._minPitch=a??0,this._maxPitch=c??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new s.L(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new ds,this._posMatrixCache={},this._alignedPosMatrixCache={},this._minEleveationForCurrentTile=0}clone(){const t=new wa(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.apply(this),t}apply(t){this.tileSize=t.tileSize,this.latRange=t.latRange,this.width=t.width,this.height=t.height,this._center=t._center,this._elevation=t._elevation,this._minEleveationForCurrentTile=t._minEleveationForCurrentTile,this.zoom=t.zoom,this.angle=t.angle,this._fov=t._fov,this._pitch=t._pitch,this._unmodified=t._unmodified,this._edgeInsets=t._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))}get maxZoom(){return this._maxZoom}set maxZoom(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))}get minPitch(){return this._minPitch}set minPitch(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))}get maxPitch(){return this._maxPitch}set maxPitch(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(t){t===void 0?t=!0:t===null&&(t=!1),this._renderWorldCopies=t}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new s.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(t){const n=-s.b5(t,-180,180)*Math.PI/180;this.angle!==n&&(this._unmodified=!1,this.angle=n,this._calcMatrices(),this.rotationMatrix=function(){var a=new s.A(4);return s.A!=Float32Array&&(a[1]=0,a[2]=0),a[0]=1,a[3]=1,a}(),function(a,c,d){var x=c[0],b=c[1],S=c[2],C=c[3],A=Math.sin(d),P=Math.cos(d);a[0]=x*P+S*A,a[1]=b*P+C*A,a[2]=x*-A+S*P,a[3]=b*-A+C*P}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(t){const n=s.ad(t,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==n&&(this._unmodified=!1,this._pitch=n,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(t){const n=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==n&&(this._unmodified=!1,this._zoom=n,this.tileZoom=Math.max(0,Math.floor(n)),this.scale=this.zoomScale(n),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(t){t!==this._elevation&&(this._elevation=t,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(t){return this._edgeInsets.equals(t)}interpolatePadding(t,n,a){this._unmodified=!1,this._edgeInsets.interpolate(t,n,a),this._constrain(),this._calcMatrices()}coveringZoomLevel(t){const n=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,n)}getVisibleUnwrappedCoordinates(t){const n=[new s.b6(0,t)];if(this._renderWorldCopies){const a=this.pointCoordinate(new s.P(0,0)),c=this.pointCoordinate(new s.P(this.width,0)),d=this.pointCoordinate(new s.P(this.width,this.height)),x=this.pointCoordinate(new s.P(0,this.height)),b=Math.floor(Math.min(a.x,c.x,d.x,x.x)),S=Math.floor(Math.max(a.x,c.x,d.x,x.x)),C=1;for(let A=b-C;A<=S+C;A++)A!==0&&n.push(new s.b6(A,t))}return n}coveringTiles(t){var n,a;let c=this.coveringZoomLevel(t);const d=c;if(t.minzoom!==void 0&&ct.maxzoom&&(c=t.maxzoom);const x=this.pointCoordinate(this.getCameraPoint()),b=s.U.fromLngLat(this.center),S=Math.pow(2,c),C=[S*x.x,S*x.y,0],A=[S*b.x,S*b.y,0],P=Xr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,c);let R=t.minzoom||0;!t.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(R=c);const W=t.terrain?2/Math.min(this.tileSize,t.tileSize)*this.tileSize:3,G=ee=>({aabb:new ro([ee*S,0,0],[(ee+1)*S,S,0]),zoom:0,x:0,y:0,wrap:ee,fullyVisible:!1}),K=[],q=[],le=c,me=t.reparseOverscaled?d:c;if(this._renderWorldCopies)for(let ee=1;ee<=3;ee++)K.push(G(-ee)),K.push(G(ee));for(K.push(G(0));K.length>0;){const ee=K.pop(),ce=ee.x,ve=ee.y;let xe=ee.fullyVisible;if(!xe){const dt=ee.aabb.intersects(P);if(dt===0)continue;xe=dt===2}const Me=t.terrain?C:A,Oe=ee.aabb.distanceX(Me),ze=ee.aabb.distanceY(Me),je=Math.max(Math.abs(Oe),Math.abs(ze));if(ee.zoom===le||je>W+(1<=R){const dt=le-ee.zoom,$t=C[0]-.5-(ce<>1),Ct=ee.zoom+1;let gt=ee.aabb.quadrant(dt);if(t.terrain){const Mi=new s.O(Ct,ee.wrap,Ct,$t,Qe),Jt=t.terrain.getMinMaxElevation(Mi),jt=(n=Jt.minElevation)!==null&&n!==void 0?n:this.elevation,ei=(a=Jt.maxElevation)!==null&&a!==void 0?a:this.elevation;gt=new ro([gt.min[0],gt.min[1],jt],[gt.max[0],gt.max[1],ei])}K.push({aabb:gt,zoom:Ct,x:$t,y:Qe,wrap:ee.wrap,fullyVisible:xe})}}return q.sort((ee,ce)=>ee.distanceSq-ce.distanceSq).map(ee=>ee.tileID)}resize(t,n){this.width=t,this.height=n,this.pixelsToGLUnits=[2/t,-2/n],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(t){return Math.pow(2,t)}scaleZoom(t){return Math.log(t)/Math.LN2}project(t){const n=s.ad(t.lat,-this.maxValidLatitude,this.maxValidLatitude);return new s.P(s.G(t.lng)*this.worldSize,s.H(n)*this.worldSize)}unproject(t){return new s.U(t.x/this.worldSize,t.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(t){const n=this.pointLocation(this.centerPoint,t),a=t.getElevationForLngLatZoom(n,this.tileZoom);if(!(this.elevation-a))return;const c=this.getCameraPosition(),d=s.U.fromLngLat(c.lngLat,c.altitude),x=s.U.fromLngLat(n,a),b=d.x-x.x,S=d.y-x.y,C=d.z-x.z,A=Math.sqrt(b*b+S*S+C*C),P=this.scaleZoom(this.cameraToCenterDistance/A/this.tileSize);this._elevation=a,this._center=n,this.zoom=P}setLocationAtPoint(t,n){const a=this.pointCoordinate(n),c=this.pointCoordinate(this.centerPoint),d=this.locationCoordinate(t),x=new s.U(d.x-(a.x-c.x),d.y-(a.y-c.y));this.center=this.coordinateLocation(x),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(t,n){return n?this.coordinatePoint(this.locationCoordinate(t),n.getElevationForLngLatZoom(t,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(t))}pointLocation(t,n){return this.coordinateLocation(this.pointCoordinate(t,n))}locationCoordinate(t){return s.U.fromLngLat(t)}coordinateLocation(t){return t&&t.toLngLat()}pointCoordinate(t,n){if(n){const R=n.pointCoordinate(t);if(R!=null)return R}const a=[t.x,t.y,0,1],c=[t.x,t.y,1,1];s.ag(a,a,this.pixelMatrixInverse),s.ag(c,c,this.pixelMatrixInverse);const d=a[3],x=c[3],b=a[1]/d,S=c[1]/x,C=a[2]/d,A=c[2]/x,P=C===A?0:(0-C)/(A-C);return new s.U(s.B.number(a[0]/d,c[0]/x,P)/this.worldSize,s.B.number(b,S,P)/this.worldSize)}coordinatePoint(t,n=0,a=this.pixelMatrix){const c=[t.x*this.worldSize,t.y*this.worldSize,n,1];return s.ag(c,c,a),new s.P(c[0]/c[3],c[1]/c[3])}getBounds(){const t=Math.max(0,this.height/2-this.getHorizon());return new Tt().extend(this.pointLocation(new s.P(0,t))).extend(this.pointLocation(new s.P(this.width,t))).extend(this.pointLocation(new s.P(this.width,this.height))).extend(this.pointLocation(new s.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new Tt([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(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])}calculatePosMatrix(t,n=!1){const a=t.key,c=n?this._alignedPosMatrixCache:this._posMatrixCache;if(c[a])return c[a];const d=t.canonical,x=this.worldSize/this.zoomScale(d.z),b=d.x+Math.pow(2,d.z)*t.wrap,S=s.ao(new Float64Array(16));return s.$(S,S,[b*x,d.y*x,0]),s.a0(S,S,[x/s.N,x/s.N,1]),s.a1(S,n?this.alignedProjMatrix:this.projMatrix,S),c[a]=new Float32Array(S),c[a]}customLayerMatrix(){return this.mercatorMatrix.slice()}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let t,n,a,c,d=-90,x=90,b=-180,S=180;const C=this.size,A=this._unmodified;if(this.latRange){const W=this.latRange;d=s.H(W[1])*this.worldSize,x=s.H(W[0])*this.worldSize,t=x-dx&&(c=x-G)}if(this.lngRange){const W=(b+S)/2,G=s.b5(P.x,W-this.worldSize/2,W+this.worldSize/2),K=C.x/2;G-KS&&(a=S-K)}a===void 0&&c===void 0||(this.center=this.unproject(new s.P(a!==void 0?a:P.x,c!==void 0?c:P.y)).wrap()),this._unmodified=A,this._constraining=!1}_calcMatrices(){if(!this.height)return;const t=this.centerOffset,n=this.point.x,a=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=s.b7(1,this.center.lat)*this.worldSize;let c=s.ao(new Float64Array(16));s.a0(c,c,[this.width/2,-this.height/2,1]),s.$(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=s.ao(new Float64Array(16)),s.a0(c,c,[1,-1,1]),s.$(c,c,[-1,-1,0]),s.a0(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c;const d=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),x=Math.min(this.elevation,this._minEleveationForCurrentTile),b=d-x*this._pixelPerMeter/Math.cos(this._pitch),S=x<0?b:d,C=Math.PI/2+this._pitch,A=this._fov*(.5+t.y/this.height),P=Math.sin(A)*S/Math.sin(s.ad(Math.PI-C-A,.01,Math.PI-.01)),R=this.getHorizon(),W=2*Math.atan(R/this.cameraToCenterDistance)*(.5+t.y/(2*R)),G=Math.sin(W)*S/Math.sin(s.ad(Math.PI-C-W,.01,Math.PI-.01)),K=Math.min(P,G),q=1.01*(Math.cos(Math.PI/2-this._pitch)*K+S),le=this.height/50;c=new Float64Array(16),s.b8(c,this._fov,this.width/this.height,le,q),c[8]=2*-t.x/this.width,c[9]=2*t.y/this.height,s.a0(c,c,[1,-1,1]),s.$(c,c,[0,0,-this.cameraToCenterDistance]),s.b9(c,c,this._pitch),s.ae(c,c,this.angle),s.$(c,c,[-n,-a,0]),this.mercatorMatrix=s.a0([],c,[this.worldSize,this.worldSize,this.worldSize]),s.a0(c,c,[1,1,this._pixelPerMeter]),this.pixelMatrix=s.a1(new Float64Array(16),this.labelPlaneMatrix,c),s.$(c,c,[0,0,-this.elevation]),this.projMatrix=c,this.invProjMatrix=s.as([],c),this.pixelMatrix3D=s.a1(new Float64Array(16),this.labelPlaneMatrix,c);const me=this.width%2/2,ee=this.height%2/2,ce=Math.cos(this.angle),ve=Math.sin(this.angle),xe=n-Math.round(n)+ce*me+ve*ee,Me=a-Math.round(a)+ce*ee+ve*me,Oe=new Float64Array(c);if(s.$(Oe,Oe,[xe>.5?xe-1:xe,Me>.5?Me-1:Me,0]),this.alignedProjMatrix=Oe,c=s.as(new Float64Array(16),this.pixelMatrix),!c)throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const t=this.pointCoordinate(new s.P(0,0)),n=[t.x*this.worldSize,t.y*this.worldSize,0,1];return s.ag(n,n,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const t=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new s.P(0,t))}getCameraQueryGeometry(t){const n=this.getCameraPoint();if(t.length===1)return[t[0],n];{let a=n.x,c=n.y,d=n.x,x=n.y;for(const b of t)a=Math.min(a,b.x),c=Math.min(c,b.y),d=Math.max(d,b.x),x=Math.max(x,b.y);return[new s.P(a,c),new s.P(d,c),new s.P(d,x),new s.P(a,x),new s.P(a,c)]}}}function de(u,t){let n,a=!1,c=null,d=null;const x=()=>{c=null,a&&(u.apply(d,n),c=setTimeout(x,t),a=!1)};return(...b)=>(a=!0,d=this,n=b,c||x(),c)}class we{constructor(t){this._getCurrentHash=()=>{const n=window.location.hash.replace("#","");if(this._hashName){let a;return n.split("&").map(c=>c.split("=")).forEach(c=>{c[0]===this._hashName&&(a=c)}),(a&&a[1]||"").split("/")}return n.split("/")},this._onHashChange=()=>{const n=this._getCurrentHash();if(n.length>=3&&!n.some(a=>isNaN(a))){const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(n[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+n[2],+n[1]],zoom:+n[0],bearing:a,pitch:+(n[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const n=window.location.href.replace(/(#.+)?$/,this.getHashString());try{window.history.replaceState(window.history.state,null,n)}catch{}},this._updateHash=de(this._updateHashUnthrottled,300),this._hashName=t&&encodeURIComponent(t)}addTo(t){return this._map=t,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(t){const n=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,c=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,c),x=Math.round(n.lng*d)/d,b=Math.round(n.lat*d)/d,S=this._map.getBearing(),C=this._map.getPitch();let A="";if(A+=t?`/${x}/${b}/${a}`:`${a}/${b}/${x}`,(S||C)&&(A+="/"+Math.round(10*S)/10),C&&(A+=`/${Math.round(C)}`),this._hashName){const P=this._hashName;let R=!1;const W=window.location.hash.slice(1).split("&").map(G=>{const K=G.split("=")[0];return K===P?(R=!0,`${K}=${A}`):G}).filter(G=>G);return R||W.push(`${P}=${A}`),`#${W.join("&")}`}return`#${A}`}}const Ye={linearity:.3,easing:s.ba(0,0,.3,1)},wt=s.e({deceleration:2500,maxSpeed:1400},Ye),Vi=s.e({deceleration:20,maxSpeed:1400},Ye),ni=s.e({deceleration:1e3,maxSpeed:360},Ye),ir=s.e({deceleration:1e3,maxSpeed:90},Ye);class lr{constructor(t){this._map=t,this.clear()}clear(){this._inertiaBuffer=[]}record(t){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.h.now(),settings:t})}_drainInertiaBuffer(){const t=this._inertiaBuffer,n=s.h.now();for(;t.length>0&&n-t[0].time>160;)t.shift()}_onMoveEnd(t){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const n={zoom:0,bearing:0,pitch:0,pan:new s.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)n.zoom+=d.zoomDelta||0,n.bearing+=d.bearingDelta||0,n.pitch+=d.pitchDelta||0,d.panDelta&&n.pan._add(d.panDelta),d.around&&(n.around=d.around),d.pinchAround&&(n.pinchAround=d.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,c={};if(n.pan.mag()){const d=rr(n.pan.mag(),a,s.e({},wt,t||{}));c.offset=n.pan.mult(d.amount/n.pan.mag()),c.center=this._map.transform.center,hr(c,d)}if(n.zoom){const d=rr(n.zoom,a,Vi);c.zoom=this._map.transform.zoom+d.amount,hr(c,d)}if(n.bearing){const d=rr(n.bearing,a,ni);c.bearing=this._map.transform.bearing+s.ad(d.amount,-179,179),hr(c,d)}if(n.pitch){const d=rr(n.pitch,a,ir);c.pitch=this._map.transform.pitch+d.amount,hr(c,d)}if(c.zoom||c.bearing){const d=n.pinchAround===void 0?n.around:n.pinchAround;c.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),s.e(c,{noMoveStart:!0})}}function hr(u,t){(!u.duration||u.durationn.unproject(S)),b=d.reduce((S,C,A,P)=>S.add(C.div(P.length)),new s.P(0,0));super(t,{points:d,point:b,lngLats:x,lngLat:n.unproject(b),originalEvent:a}),this._defaultPrevented=!1}}class no extends s.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(t,n,a){super(t,{originalEvent:a}),this._defaultPrevented=!1}}class Zr{constructor(t,n){this._map=t,this._clickTolerance=n.clickTolerance}reset(){delete this._mousedownPos}wheel(t){return this._firePreventable(new no(t.type,this._map,t))}mousedown(t,n){return this._mousedownPos=n,this._firePreventable(new bi(t.type,this._map,t))}mouseup(t){this._map.fire(new bi(t.type,this._map,t))}click(t,n){this._mousedownPos&&this._mousedownPos.dist(n)>=this._clickTolerance||this._map.fire(new bi(t.type,this._map,t))}dblclick(t){return this._firePreventable(new bi(t.type,this._map,t))}mouseover(t){this._map.fire(new bi(t.type,this._map,t))}mouseout(t){this._map.fire(new bi(t.type,this._map,t))}touchstart(t){return this._firePreventable(new an(t.type,this._map,t))}touchmove(t){this._map.fire(new an(t.type,this._map,t))}touchend(t){this._map.fire(new an(t.type,this._map,t))}touchcancel(t){this._map.fire(new an(t.type,this._map,t))}_firePreventable(t){if(this._map.fire(t),t.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class oo{constructor(t){this._map=t}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(t){this._map.fire(new bi(t.type,this._map,t))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new bi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(t){this._delayContextMenu?this._contextMenuEvent=t:this._ignoreContextMenu||this._map.fire(new bi(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ln{constructor(t){this._map=t}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(t){return this.transform.pointLocation(s.P.convert(t),this._map.terrain)}}class ks{constructor(t,n){this._map=t,this._tr=new ln(t),this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=n.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(t,n){this.isEnabled()&&t.shiftKey&&t.button===0&&(V.disableDrag(),this._startPos=this._lastPos=n,this._active=!0)}mousemoveWindow(t,n){if(!this._active)return;const a=n;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)d.fitScreenCoordinates(a,c,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",t)}keydown(t){this._active&&t.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",t))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(V.remove(this._box),this._box=null),V.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(t,n){return this._map.fire(new s.k(t,{originalEvent:n}))}}function kr(u,t){if(u.length!==t.length)throw new Error(`The number of touches and points are not equal - touches ${u.length}, points ${t.length}`);const n={};for(let a=0;athis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=t.timeStamp),a.length===this.numTouches&&(this.centroid=function(c){const d=new s.P(0,0);for(const x of c)d._add(x);return d.div(c.length)}(n),this.touches=kr(a,n)))}touchmove(t,n,a){if(this.aborted||!this.centroid)return;const c=kr(a,n);for(const d in this.touches){const x=c[d];(!x||x.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(t,n,a){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const c=!this.aborted&&this.centroid;if(this.reset(),c)return c}}}class Ps{constructor(t){this.singleTap=new yn(t),this.numTaps=t.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(t,n,a){this.singleTap.touchstart(t,n,a)}touchmove(t,n,a){this.singleTap.touchmove(t,n,a)}touchend(t,n,a){const c=this.singleTap.touchend(t,n,a);if(c){const d=t.timeStamp-this.lastTime<500,x=!this.lastTap||this.lastTap.dist(c)<30;if(d&&x||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=c,this.count===this.numTaps)return this.reset(),c}}}class fo{constructor(t){this._tr=new ln(t),this._zoomIn=new Ps({numTouches:1,numTaps:2}),this._zoomOut=new Ps({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(t,n,a){this._zoomIn.touchstart(t,n,a),this._zoomOut.touchstart(t,n,a)}touchmove(t,n,a){this._zoomIn.touchmove(t,n,a),this._zoomOut.touchmove(t,n,a)}touchend(t,n,a){const c=this._zoomIn.touchend(t,n,a),d=this._zoomOut.touchend(t,n,a),x=this._tr;return c?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:x.zoom+1,around:x.unproject(c)},{originalEvent:t})}):d?(this._active=!0,t.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:b=>b.easeTo({duration:300,zoom:x.zoom-1,around:x.unproject(d)},{originalEvent:t})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mo{constructor(t){this._enabled=!!t.enable,this._moveStateManager=t.moveStateManager,this._clickTolerance=t.clickTolerance||1,this._moveFunction=t.move,this._activateOnStart=!!t.activateOnStart,t.assignEvents(this),this.reset()}reset(t){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(t)}_move(...t){const n=this._moveFunction(...t);if(n.bearingDelta||n.pitchDelta||n.around||n.panDelta)return this._active=!0,n}dragStart(t,n){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(t)&&(this._moveStateManager.startMove(t),this._lastPoint=n.length?n[0]:n,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(t,n){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(t.preventDefault(),!this._moveStateManager.isValidMoveEvent(t))return void this.reset(t);const c=n.length?n[0]:n;return!this._moved&&c.dist(a){u.mousedown=u.dragStart,u.mousemoveWindow=u.dragMove,u.mouseup=u.dragEnd,u.contextmenu=function(t){t.preventDefault()}},Lo=({enable:u,clickTolerance:t,bearingDegreesPerPixelMoved:n=.8})=>{const a=new wi({checkCorrectEvent:c=>V.mouseButton(c)===0&&c.ctrlKey||V.mouseButton(c)===2});return new mo({clickTolerance:t,move:(c,d)=>({bearingDelta:(d.x-c.x)*n}),moveStateManager:a,enable:u,assignEvents:Gn})},dr=({enable:u,clickTolerance:t,pitchDegreesPerPixelMoved:n=-.5})=>{const a=new wi({checkCorrectEvent:c=>V.mouseButton(c)===0&&c.ctrlKey||V.mouseButton(c)===2});return new mo({clickTolerance:t,move:(c,d)=>({pitchDelta:(d.y-c.y)*n}),moveStateManager:a,enable:u,assignEvents:Gn})};class tt{constructor(t,n){this._minTouches=t.cooperativeGestures?2:1,this._clickTolerance=t.clickTolerance||1,this._map=n,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new s.P(0,0),setTimeout(()=>{this._cancelCooperativeMessage=!1},200)}touchstart(t,n,a){return this._calculateTransform(t,n,a)}touchmove(t,n,a){if(this._map._cooperativeGestures&&(this._minTouches===2&&a.length<2&&!this._cancelCooperativeMessage?this._map._onCooperativeGesture(t,!1,a.length):this._cancelCooperativeMessage||(this._cancelCooperativeMessage=!0)),this._active&&!(a.length0&&(this._active=!0);const c=kr(a,n),d=new s.P(0,0),x=new s.P(0,0);let b=0;for(const C in c){const A=c[C],P=this._touches[C];P&&(d._add(A),x._add(A.sub(P)),b++,c[C]=A)}if(this._touches=c,bMath.abs(u.x)}class Za extends Wn{constructor(t){super(),this._map=t}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(t,n,a){super.touchstart(t,n,a),this._currentTouchCount=a.length}_start(t){this._lastPoints=t,ps(t[0].sub(t[1]))&&(this._valid=!1)}_move(t,n,a){if(this._map._cooperativeGestures&&this._currentTouchCount<3)return;const c=t[0].sub(this._lastPoints[0]),d=t[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(c,d,a.timeStamp),this._valid?(this._lastPoints=t,this._active=!0,{pitchDelta:(c.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(t,n,a){if(this._valid!==void 0)return this._valid;const c=t.mag()>=2,d=n.mag()>=2;if(!c&&!d)return;if(!c||!d)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const x=t.y>0==n.y>0;return ps(t)&&ps(n)&&x}}const fs={panStep:100,bearingStep:15,pitchStep:10};class Ls{constructor(t){this._tr=new ln(t);const n=fs;this._panStep=n.panStep,this._bearingStep=n.bearingStep,this._pitchStep=n.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(t){if(t.altKey||t.ctrlKey||t.metaKey)return;let n=0,a=0,c=0,d=0,x=0;switch(t.keyCode){case 61:case 107:case 171:case 187:n=1;break;case 189:case 109:case 173:n=-1;break;case 37:t.shiftKey?a=-1:(t.preventDefault(),d=-1);break;case 39:t.shiftKey?a=1:(t.preventDefault(),d=1);break;case 38:t.shiftKey?c=1:(t.preventDefault(),x=-1);break;case 40:t.shiftKey?c=-1:(t.preventDefault(),x=1);break;default:return}return this._rotationDisabled&&(a=0,c=0),{cameraAnimation:b=>{const S=this._tr;b.easeTo({duration:300,easeId:"keyboardHandler",easing:Ga,zoom:n?Math.round(S.zoom)+n*(t.shiftKey?2:1):S.zoom,bearing:S.bearing+a*this._bearingStep,pitch:S.pitch+c*this._pitchStep,offset:[-d*this._panStep,-x*this._panStep],center:S.center},{originalEvent:t})}}}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 Ga(u){return u*(2-u)}const Ds=4.000244140625;class Ta{constructor(t,n){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=t,this._tr=new ln(t),this._el=t.getCanvasContainer(),this._triggerRenderFrame=n,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(t){this._defaultZoomRate=t}setWheelZoomRate(t){this._wheelZoomRate=t}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!t&&t.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}wheel(t){if(!this.isEnabled())return;if(this._map._cooperativeGestures){if(!t[this._map._metaKey])return;t.preventDefault()}let n=t.deltaMode===WheelEvent.DOM_DELTA_LINE?40*t.deltaY:t.deltaY;const a=s.h.now(),c=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,n!==0&&n%Ds==0?this._type="wheel":n!==0&&Math.abs(n)<4?this._type="trackpad":c>400?(this._type=null,this._lastValue=n,this._timeout=setTimeout(this._onTimeout,40,t)):this._type||(this._type=Math.abs(c*n)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,n+=this._lastValue)),t.shiftKey&&n&&(n/=4),this._type&&(this._lastWheelEvent=t,this._delta-=n,this._active||this._start(t)),t.preventDefault()}_start(t){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 n=V.mousePos(this._el,t),a=this._tr;this._around=s.L.convert(this._aroundCenter?a.center:a.unproject(n)),this._aroundPoint=a.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const t=this._tr.transform;if(this._delta!==0){const b=this._type==="wheel"&&Math.abs(this._delta)>Ds?this._wheelZoomRate:this._defaultZoomRate;let S=2/(1+Math.exp(-Math.abs(this._delta*b)));this._delta<0&&S!==0&&(S=1/S);const C=typeof this._targetZoom=="number"?t.zoomScale(this._targetZoom):t.scale;this._targetZoom=Math.min(t.maxZoom,Math.max(t.minZoom,t.scaleZoom(C*S))),this._type==="wheel"&&(this._startZoom=t.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const n=typeof this._targetZoom=="number"?this._targetZoom:t.zoom,a=this._startZoom,c=this._easing;let d,x=!1;if(this._type==="wheel"&&a&&c){const b=Math.min((s.h.now()-this._lastWheelEventTime)/200,1),S=c(b);d=s.B.number(a,n,S),b<1?this._frameId||(this._frameId=!0):x=!0}else d=n,x=!0;return this._active=!0,x&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!x,zoomDelta:d-t.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(t){let n=s.bb;if(this._prevEase){const a=this._prevEase,c=(s.h.now()-a.start)/a.duration,d=a.easing(c+.01)-a.easing(c),x=.27/Math.sqrt(d*d+1e-4)*.01,b=Math.sqrt(.0729-x*x);n=s.ba(x,b,.25,1)}return this._prevEase={start:s.h.now(),duration:t,easing:n},n}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Rl{constructor(t,n){this._clickZoom=t,this._tapZoom=n}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 Ol{constructor(t){this._tr=new ln(t),this.reset()}reset(){this._active=!1}dblclick(t,n){return t.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(t.shiftKey?-1:1),around:this._tr.unproject(n)},{originalEvent:t})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Bl{constructor(){this._tap=new Ps({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(t,n,a){if(!this._swipePoint)if(this._tapTime){const c=n[0],d=t.timeStamp-this._tapTime<500,x=this._tapPoint.dist(c)<30;d&&x?a.length>0&&(this._swipePoint=c,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(t,n,a)}touchmove(t,n,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const c=n[0],d=c.y-this._swipePoint.y;return this._swipePoint=c,t.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(t,n,a)}touchend(t,n,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const c=this._tap.touchend(t,n,a);c&&(this._tapTime=t.timeStamp,this._tapPoint=c)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Nl{constructor(t,n,a){this._el=t,this._mousePan=n,this._touchPan=a}enable(t){this._inertiaOptions=t||{},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 zn{constructor(t,n,a){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=n,this._mousePitch=a}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 ms{constructor(t,n,a,c){this._el=t,this._touchZoom=n,this._touchRotate=a,this._tapDragZoom=c,this._rotationDisabled=!1,this._enabled=!0}enable(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),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()}}const Wa=u=>u.zoom||u.drag||u.pitch||u.rotate;class Vl extends s.k{}function Ha(u){return u.panDelta&&u.panDelta.mag()||u.zoomDelta||u.bearingDelta||u.pitchDelta}class Ul{constructor(t,n){this.handleWindowEvent=c=>{this.handleEvent(c,`${c.type}Window`)},this.handleEvent=(c,d)=>{if(c.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const x=c.type==="renderFrame"?void 0:c,b={needsRenderFrame:!1},S={},C={},A=c.touches,P=A?this._getMapTouches(A):void 0,R=P?V.touchPos(this._el,P):V.mousePos(this._el,c);for(const{handlerName:K,handler:q,allowed:le}of this._handlers){if(!q.isEnabled())continue;let me;this._blockedByActive(C,le,K)?q.reset():q[d||c.type]&&(me=q[d||c.type](c,R,P),this.mergeHandlerResult(b,S,me,K,x),me&&me.needsRenderFrame&&this._triggerRenderFrame()),(me||q.isActive())&&(C[K]=q)}const W={};for(const K in this._previousActiveHandlers)C[K]||(W[K]=x);this._previousActiveHandlers=C,(Object.keys(W).length||Ha(b))&&(this._changes.push([b,S,W]),this._triggerRenderFrame()),(Object.keys(C).length||Ha(b))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:G}=b;G&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],G(this._map))},this._map=t,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lr(t),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n);const a=this._el;this._listeners=[[a,"touchstart",{passive:!0}],[a,"touchmove",{passive:!1}],[a,"touchend",void 0],[a,"touchcancel",void 0],[a,"mousedown",void 0],[a,"mousemove",void 0],[a,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[a,"mouseover",void 0],[a,"mouseout",void 0],[a,"dblclick",void 0],[a,"click",void 0],[a,"keydown",{capture:!1}],[a,"keyup",void 0],[a,"wheel",{passive:!1}],[a,"contextmenu",void 0],[window,"blur",void 0]];for(const[c,d,x]of this._listeners)V.addEventListener(c,d,c===document?this.handleWindowEvent:this.handleEvent,x)}destroy(){for(const[t,n,a]of this._listeners)V.removeEventListener(t,n,t===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(t){const n=this._map,a=n.getCanvasContainer();this._add("mapEvent",new Zr(n,t));const c=n.boxZoom=new ks(n,t);this._add("boxZoom",c),t.interactive&&t.boxZoom&&c.enable();const d=new fo(n),x=new Ol(n);n.doubleClickZoom=new Rl(x,d),this._add("tapZoom",d),this._add("clickZoom",x),t.interactive&&t.doubleClickZoom&&n.doubleClickZoom.enable();const b=new Bl;this._add("tapDragZoom",b);const S=n.touchPitch=new Za(n);this._add("touchPitch",S),t.interactive&&t.touchPitch&&n.touchPitch.enable(t.touchPitch);const C=Lo(t),A=dr(t);n.dragRotate=new zn(t,C,A),this._add("mouseRotate",C,["mousePitch"]),this._add("mousePitch",A,["mouseRotate"]),t.interactive&&t.dragRotate&&n.dragRotate.enable();const P=(({enable:le,clickTolerance:me})=>{const ee=new wi({checkCorrectEvent:ce=>V.mouseButton(ce)===0&&!ce.ctrlKey});return new mo({clickTolerance:me,move:(ce,ve)=>({around:ve,panDelta:ve.sub(ce)}),activateOnStart:!0,moveStateManager:ee,enable:le,assignEvents:Gn})})(t),R=new tt(t,n);n.dragPan=new Nl(a,P,R),this._add("mousePan",P),this._add("touchPan",R,["touchZoom","touchRotate"]),t.interactive&&t.dragPan&&n.dragPan.enable(t.dragPan);const W=new Sa,G=new Jo;n.touchZoomRotate=new ms(a,G,W,b),this._add("touchRotate",W,["touchPan","touchZoom"]),this._add("touchZoom",G,["touchPan","touchRotate"]),t.interactive&&t.touchZoomRotate&&n.touchZoomRotate.enable(t.touchZoomRotate);const K=n.scrollZoom=new Ta(n,()=>this._triggerRenderFrame());this._add("scrollZoom",K,["mousePan"]),t.interactive&&t.scrollZoom&&n.scrollZoom.enable(t.scrollZoom);const q=n.keyboard=new Ls(n);this._add("keyboard",q),t.interactive&&t.keyboard&&n.keyboard.enable(),this._add("blockableMapEvent",new oo(n))}_add(t,n,a){this._handlers.push({handlerName:t,handler:n,allowed:a}),this._handlersById[t]=n}stop(t){if(!this._updatingCamera){for(const{handler:n}of this._handlers)n.reset();this._inertia.clear(),this._fireEvents({},{},t),this._changes=[]}}isActive(){for(const{handler:t}of this._handlers)if(t.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Wa(this._eventsInProgress)||this.isZooming()}_blockedByActive(t,n,a){for(const c in t)if(c!==a&&(!n||n.indexOf(c)<0))return!0;return!1}_getMapTouches(t){const n=[];for(const a of t)this._el.contains(a.target)&&n.push(a);return n}mergeHandlerResult(t,n,a,c,d){if(!a)return;s.e(t,a);const x={handlerName:c,originalEvent:a.originalEvent||d};a.zoomDelta!==void 0&&(n.zoom=x),a.panDelta!==void 0&&(n.drag=x),a.pitchDelta!==void 0&&(n.pitch=x),a.bearingDelta!==void 0&&(n.rotate=x)}_applyChanges(){const t={},n={},a={};for(const[c,d,x]of this._changes)c.panDelta&&(t.panDelta=(t.panDelta||new s.P(0,0))._add(c.panDelta)),c.zoomDelta&&(t.zoomDelta=(t.zoomDelta||0)+c.zoomDelta),c.bearingDelta&&(t.bearingDelta=(t.bearingDelta||0)+c.bearingDelta),c.pitchDelta&&(t.pitchDelta=(t.pitchDelta||0)+c.pitchDelta),c.around!==void 0&&(t.around=c.around),c.pinchAround!==void 0&&(t.pinchAround=c.pinchAround),c.noInertia&&(t.noInertia=c.noInertia),s.e(n,d),s.e(a,x);this._updateMapTransform(t,n,a),this._changes=[]}_updateMapTransform(t,n,a){const c=this._map,d=c._getTransformForUpdate(),x=c.terrain;if(!(Ha(t)||x&&this._terrainMovement))return this._fireEvents(n,a,!0);let{panDelta:b,zoomDelta:S,bearingDelta:C,pitchDelta:A,around:P,pinchAround:R}=t;R!==void 0&&(P=R),c._stop(!0),P=P||c.transform.centerPoint;const W=d.pointLocation(b?P.sub(b):P);C&&(d.bearing+=C),A&&(d.pitch+=A),S&&(d.zoom+=S),x?this._terrainMovement||!n.drag&&!n.zoom?n.drag&&this._terrainMovement?d.center=d.pointLocation(d.centerPoint.sub(b)):d.setLocationAtPoint(W,P):(this._terrainMovement=!0,this._map._elevationFreeze=!0,d.setLocationAtPoint(W,P),this._map.once("moveend",()=>{this._map._elevationFreeze=!1,this._terrainMovement=!1,d.recalculateZoom(c.terrain)})):d.setLocationAtPoint(W,P),c._applyUpdatedTransform(d),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(n,a,!0)}_fireEvents(t,n,a){const c=Wa(this._eventsInProgress),d=Wa(t),x={};for(const A in t){const{originalEvent:P}=t[A];this._eventsInProgress[A]||(x[`${A}start`]=P),this._eventsInProgress[A]=t[A]}!c&&d&&this._fireEvent("movestart",d.originalEvent);for(const A in x)this._fireEvent(A,x[A]);d&&this._fireEvent("move",d.originalEvent);for(const A in t){const{originalEvent:P}=t[A];this._fireEvent(A,P)}const b={};let S;for(const A in this._eventsInProgress){const{handlerName:P,originalEvent:R}=this._eventsInProgress[A];this._handlersById[P].isActive()||(delete this._eventsInProgress[A],S=n[P]||R,b[`${A}end`]=S)}for(const A in b)this._fireEvent(A,b[A]);const C=Wa(this._eventsInProgress);if(a&&(c||d)&&!C){this._updatingCamera=!0;const A=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),P=R=>R!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Vl("renderFrame",{timeStamp:t})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Rc extends s.E{constructor(t,n){super(),this._renderFrameCallback=()=>{const a=Math.min((s.h.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(a)),a<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=t,this._bearingSnap=n.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new s.L(this.transform.center.lng,this.transform.center.lat)}setCenter(t,n){return this.jumpTo({center:t},n)}panBy(t,n,a){return t=s.P.convert(t).mult(-1),this.panTo(this.transform.center,s.e({offset:t},n),a)}panTo(t,n,a){return this.easeTo(s.e({center:t},n),a)}getZoom(){return this.transform.zoom}setZoom(t,n){return this.jumpTo({zoom:t},n),this}zoomTo(t,n,a){return this.easeTo(s.e({zoom:t},n),a)}zoomIn(t,n){return this.zoomTo(this.getZoom()+1,t,n),this}zoomOut(t,n){return this.zoomTo(this.getZoom()-1,t,n),this}getBearing(){return this.transform.bearing}setBearing(t,n){return this.jumpTo({bearing:t},n),this}getPadding(){return this.transform.padding}setPadding(t,n){return this.jumpTo({padding:t},n),this}rotateTo(t,n,a){return this.easeTo(s.e({bearing:t},n),a)}resetNorth(t,n){return this.rotateTo(0,s.e({duration:1e3},t),n),this}resetNorthPitch(t,n){return this.easeTo(s.e({bearing:0,pitch:0,duration:1e3},t),n),this}snapToNorth(t,n){return Math.abs(this.getBearing()){if(this._zooming&&(a.zoom=s.B.number(c,S,xe)),this._rotating&&(a.bearing=s.B.number(d,C,xe)),this._pitching&&(a.pitch=s.B.number(x,A,xe)),this._padding&&(a.interpolatePadding(b,P,xe),W=a.centerPoint.add(R)),this.terrain&&!t.freezeElevation&&this._updateElevation(xe),ee)a.setLocationAtPoint(ee,ce);else{const Me=a.zoomScale(a.zoom-c),Oe=S>c?Math.min(2,me):Math.max(.5,me),ze=Math.pow(Oe,1-xe),je=a.unproject(q.add(le.mult(xe*ze)).mult(Me));a.setLocationAtPoint(a.renderWorldCopies?je.wrap():je,W)}this._applyUpdatedTransform(a),this._fireMoveEvents(n)},xe=>{this.terrain&&this._finalizeElevation(),this._afterEase(n,xe)},t),this}_prepareEase(t,n,a={}){this._moving=!0,n||a.moving||this.fire(new s.k("movestart",t)),this._zooming&&!a.zooming&&this.fire(new s.k("zoomstart",t)),this._rotating&&!a.rotating&&this.fire(new s.k("rotatestart",t)),this._pitching&&!a.pitching&&this.fire(new s.k("pitchstart",t))}_prepareElevation(t){this._elevationCenter=t,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(t,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(t){this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const n=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(t<1&&n!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=t*(a-(n-(a*t+this._elevationStart))/(1-t)),this._elevationTarget=n}this.transform.elevation=s.B.number(this._elevationStart,this._elevationTarget,t)}_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(t){if(!this.transformCameraUpdate)return;const n=t.clone(),{center:a,zoom:c,pitch:d,bearing:x,elevation:b}=this.transformCameraUpdate(n);a&&(n.center=a),c!==void 0&&(n.zoom=c),d!==void 0&&(n.pitch=d),x!==void 0&&(n.bearing=x),b!==void 0&&(n.elevation=b),this.transform.apply(n)}_fireMoveEvents(t){this.fire(new s.k("move",t)),this._zooming&&this.fire(new s.k("zoom",t)),this._rotating&&this.fire(new s.k("rotate",t)),this._pitching&&this.fire(new s.k("pitch",t))}_afterEase(t,n){if(this._easeId&&n&&this._easeId===n)return;delete this._easeId;const a=this._zooming,c=this._rotating,d=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,a&&this.fire(new s.k("zoomend",t)),c&&this.fire(new s.k("rotateend",t)),d&&this.fire(new s.k("pitchend",t)),this.fire(new s.k("moveend",t))}flyTo(t,n){if(!t.essential&&s.h.prefersReducedMotion){const gt=s.F(t,["center","zoom","bearing","pitch","around"]);return this.jumpTo(gt,n)}this.stop(),t=s.e({offset:[0,0],speed:1.2,curve:1.42,easing:s.bb},t);const a=this._getTransformForUpdate(),c=this.getZoom(),d=this.getBearing(),x=this.getPitch(),b=this.getPadding(),S="zoom"in t?s.ad(+t.zoom,a.minZoom,a.maxZoom):c,C="bearing"in t?this._normalizeBearing(t.bearing,d):d,A="pitch"in t?+t.pitch:x,P="padding"in t?t.padding:a.padding,R=a.zoomScale(S-c),W=s.P.convert(t.offset);let G=a.centerPoint.add(W);const K=a.pointLocation(G),q=s.L.convert(t.center||K);this._normalizeCenter(q);const le=a.project(K),me=a.project(q).sub(le);let ee=t.curve;const ce=Math.max(a.width,a.height),ve=ce/R,xe=me.mag();if("minZoom"in t){const gt=s.ad(Math.min(t.minZoom,c,S),a.minZoom,a.maxZoom),Mi=ce/a.zoomScale(gt-c);ee=Math.sqrt(Mi/xe*2)}const Me=ee*ee;function Oe(gt){const Mi=(ve*ve-ce*ce+(gt?-1:1)*Me*Me*xe*xe)/(2*(gt?ve:ce)*Me*xe);return Math.log(Math.sqrt(Mi*Mi+1)-Mi)}function ze(gt){return(Math.exp(gt)-Math.exp(-gt))/2}function je(gt){return(Math.exp(gt)+Math.exp(-gt))/2}const dt=Oe(!1);let $t=function(gt){return je(dt)/je(dt+ee*gt)},Qe=function(gt){return ce*((je(dt)*(ze(Mi=dt+ee*gt)/je(Mi))-ze(dt))/Me)/xe;var Mi},Ct=(Oe(!0)-dt)/ee;if(Math.abs(xe)<1e-6||!isFinite(Ct)){if(Math.abs(ce-ve)<1e-6)return this.easeTo(t,n);const gt=vet.maxDuration&&(t.duration=0),this._zooming=!0,this._rotating=d!==C,this._pitching=A!==x,this._padding=!a.isPaddingEqual(P),this._prepareEase(n,!1),this.terrain&&this._prepareElevation(q),this._ease(gt=>{const Mi=gt*Ct,Jt=1/$t(Mi);a.zoom=gt===1?S:c+a.scaleZoom(Jt),this._rotating&&(a.bearing=s.B.number(d,C,gt)),this._pitching&&(a.pitch=s.B.number(x,A,gt)),this._padding&&(a.interpolatePadding(b,P,gt),G=a.centerPoint.add(W)),this.terrain&&!t.freezeElevation&&this._updateElevation(gt);const jt=gt===1?q:a.unproject(le.add(me.mult(Qe(Mi))).mult(Jt));a.setLocationAtPoint(a.renderWorldCopies?jt.wrap():jt,G),this._applyUpdatedTransform(a),this._fireMoveEvents(n)},()=>{this.terrain&&this._finalizeElevation(),this._afterEase(n)},t),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(t,n){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const a=this._onEaseEnd;delete this._onEaseEnd,a.call(this,n)}if(!t){const a=this.handlers;a&&a.stop(!1)}return this}_ease(t,n,a){a.animate===!1||a.duration===0?(t(1),n()):(this._easeStart=s.h.now(),this._easeOptions=a,this._onEaseFrame=t,this._onEaseEnd=n,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(t,n){t=s.b5(t,-180,180);const a=Math.abs(t-n);return Math.abs(t-360-n)180?-360:a<-180?360:0}queryTerrainElevation(t){return this.terrain?this.terrain.getElevationForLngLatZoom(s.L.convert(t),this.transform.tileZoom)-this.transform.elevation:null}}class Hn{constructor(t={}){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=n=>{!n||n.sourceDataType!=="metadata"&&n.sourceDataType!=="visibility"&&n.dataType!=="style"&&n.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=t}getDefaultPosition(){return"bottom-right"}onAdd(t){return this._map=t,this._compact=this.options&&this.options.compact,this._container=V.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=V.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=V.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(){V.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(t,n){const a=this._map._getUIString(`AttributionControl.${n}`);t.title=a,t.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(c=>typeof c!="string"?"":c)):typeof this.options.customAttribution=="string"&&t.push(this.options.customAttribution)),this._map.style.stylesheet){const c=this._map.style.stylesheet;this.styleOwner=c.owner,this.styleId=c.id}const n=this._map.style.sourceCaches;for(const c in n){const d=n[c];if(d.used||d.usedForTerrain){const x=d.getSource();x.attribution&&t.indexOf(x.attribution)<0&&t.push(x.attribution)}}t=t.filter(c=>String(c).trim()),t.sort((c,d)=>c.length-d.length),t=t.filter((c,d)=>{for(let x=d+1;x=0)return!1;return!0});const a=t.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Yi{constructor(t={}){this._updateCompact=()=>{const n=this._container.children;if(n.length){const a=n[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=t}getDefaultPosition(){return"bottom-left"}onAdd(t){this._map=t,this._compact=this.options&&this.options.compact,this._container=V.create("div","maplibregl-ctrl");const n=V.create("a","maplibregl-ctrl-logo");return n.target="_blank",n.rel="noopener nofollow",n.href="https://maplibre.org/",n.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),n.setAttribute("rel","noopener nofollow"),this._container.appendChild(n),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){V.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class pl{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(t){const n=++this._id;return this._queue.push({callback:t,id:n,cancelled:!1}),n}remove(t){const n=this._currentlyRunning,a=n?this._queue.concat(n):this._queue;for(const c of a)if(c.id===t)return void(c.cancelled=!0)}run(t=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const n=this._currentlyRunning=this._queue;this._queue=[];for(const a of n)if(!a.cancelled&&(a.callback(t),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}const jl={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","TerrainControl.enableTerrain":"Enable terrain","TerrainControl.disableTerrain":"Disable terrain"};var Oc=s.Q([{name:"a_pos3d",type:"Int16",components:3}]);class Bc extends s.E{constructor(t){super(),this.sourceCache=t,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,t.usedForTerrain=!0,t.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(t,n){this.sourceCache.update(t,n),this._renderableTilesKeys=[];const a={};for(const c of t.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:n}))a[c.key]=!0,this._renderableTilesKeys.push(c.key),this._tiles[c.key]||(c.posMatrix=new Float64Array(16),s.aS(c.posMatrix,0,s.N,0,s.N,0,1),this._tiles[c.key]=new wo(c,this.tileSize));for(const c in this._tiles)a[c]||delete this._tiles[c]}freeRtt(t){for(const n in this._tiles){const a=this._tiles[n];(!t||a.tileID.equals(t)||a.tileID.isChildOf(t)||t.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(t=>this.getTileByID(t))}getTileByID(t){return this._tiles[t]}getTerrainCoords(t){const n={};for(const a of this._renderableTilesKeys){const c=this._tiles[a].tileID;if(c.canonical.equals(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16),s.aS(d.posMatrix,0,s.N,0,s.N,0,1),n[a]=d}else if(c.canonical.isChildOf(t.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const x=c.canonical.z-t.canonical.z,b=c.canonical.x-(c.canonical.x>>x<>x<>x;s.aS(d.posMatrix,0,C,0,C,0,1),s.$(d.posMatrix,d.posMatrix,[-b*C,-S*C,0]),n[a]=d}else if(t.canonical.isChildOf(c.canonical)){const d=t.clone();d.posMatrix=new Float64Array(16);const x=t.canonical.z-c.canonical.z,b=t.canonical.x-(t.canonical.x>>x<>x<>x;s.aS(d.posMatrix,0,s.N,0,s.N,0,1),s.$(d.posMatrix,d.posMatrix,[b*C,S*C,0]),s.a0(d.posMatrix,d.posMatrix,[1/2**x,1/2**x,0]),n[a]=d}}return n}getSourceTile(t,n){const a=this.sourceCache._source;let c=t.overscaledZ-this.deltaZoom;if(c>a.maxzoom&&(c=a.maxzoom),c=a.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(t.scaledTo(c--).key);return d}tilesAfterTime(t=Date.now()){return Object.values(this._tiles).filter(n=>n.timeAdded>=t)}}class Nc{constructor(t,n,a){this.painter=t,this.sourceCache=new Bc(n),this.options=a,this.exaggeration=typeof a.exaggeration=="number"?a.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(t,n,a,c=s.N){var d;if(!(n>=0&&n=0&&at.canonical.z&&(t.canonical.z>=c?d=t.canonical.z-c:s.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const x=t.canonical.x-(t.canonical.x>>d<>d<>8<<4|d>>8,n[x+3]=0;const a=new s.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(n.buffer)),c=new At(t,a,t.gl.RGBA,{premultiply:!1});return c.bind(t.gl.NEAREST,t.gl.CLAMP_TO_EDGE),this._coordsTexture=c,c}pointCoordinate(t){const n=new Uint8Array(4),a=this.painter.context,c=a.gl;a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),c.readPixels(t.x,this.painter.height/devicePixelRatio-t.y-1,1,1,c.RGBA,c.UNSIGNED_BYTE,n),a.bindFramebuffer.set(null);const d=n[0]+(n[2]>>4<<8),x=n[1]+((15&n[2])<<8),b=this.coordsIndex[255-n[3]],S=b&&this.sourceCache.getTileByID(b);if(!S)return null;const C=this._coordsTextureSize,A=(1<0&&Math.sign(d)<0||!a&&Math.sign(c)<0&&Math.sign(d)>0?(c=360*Math.sign(d)+c,s.G(c)):n}}class bu{constructor(t,n,a){this._context=t,this._size=n,this._tileSize=a,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const t of this._objects)t.texture.destroy(),t.fbo.destroy()}_createObject(t){const n=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),a=new At(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return a.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),n.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),n.colorAttachment.set(a.texture),{id:t,fbo:n,texture:a,stamp:-1,inUse:!1}}getObjectForId(t){return this._objects[t]}useObject(t){t.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(n=>t.id!==n),this._recentlyUsed.push(t.id)}stampObject(t){t.stamp=++this._stamp}getOrCreateFreeObject(){for(const n of this._recentlyUsed)if(!this._objects[n].inUse)return this._objects[n];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const t=this._createObject(this._objects.length);return this._objects.push(t),t}freeObject(t){t.inUse=!1}freeAllObjects(){for(const t of this._objects)this.freeObject(t)}isFull(){return!(this._objects.length!t.inUse)===!1}}const vn={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class fl{constructor(t,n){this.painter=t,this.terrain=n,this.pool=new bu(t.context,30,n.sourceCache.tileSize*n.qualityFactor)}destruct(){this.pool.destruct()}getTexture(t){return this.pool.getObjectForId(t.rtt[this._stacks.length-1].id).texture}prepareForRender(t,n){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=t._order.filter(a=>!t._layers[a].isHidden(n)),this._coordsDescendingInv={};for(const a in t.sourceCaches){this._coordsDescendingInv[a]={};const c=t.sourceCaches[a].getVisibleCoordinates();for(const d of c){const x=this.terrain.sourceCache.getTerrainCoords(d);for(const b in x)this._coordsDescendingInv[a][b]||(this._coordsDescendingInv[a][b]=[]),this._coordsDescendingInv[a][b].push(x[b])}}this._coordsDescendingInvStr={};for(const a of t._order){const c=t._layers[a],d=c.source;if(vn[c.type]&&!this._coordsDescendingInvStr[d]){this._coordsDescendingInvStr[d]={};for(const x in this._coordsDescendingInv[d])this._coordsDescendingInvStr[d][x]=this._coordsDescendingInv[d][x].map(b=>b.key).sort().join()}}for(const a of this._renderableTiles)for(const c in this._coordsDescendingInvStr){const d=this._coordsDescendingInvStr[c][a.tileID.key];d&&d!==a.rttCoords[c]&&(a.rtt=[])}}renderLayer(t){if(t.isHidden(this.painter.transform.zoom))return!1;const n=t.type,a=this.painter,c=this._renderableLayerIds[this._renderableLayerIds.length-1]===t.id;if(vn[n]&&(this._prevType&&vn[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(t.id),!c))return!0;if(vn[this._prevType]||vn[n]&&c){this._prevType=n;const d=this._stacks.length-1,x=this._stacks[d]||[];for(const b of this._renderableTiles){if(this.pool.isFull()&&(Ji(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(b),b.rtt[d]){const C=this.pool.getObjectForId(b.rtt[d].id);if(C.stamp===b.rtt[d].stamp){this.pool.useObject(C);continue}}const S=this.pool.getOrCreateFreeObject();this.pool.useObject(S),this.pool.stampObject(S),b.rtt[d]={id:S.id,stamp:S.stamp},a.context.bindFramebuffer.set(S.fbo.framebuffer),a.context.clear({color:s.aT.transparent,stencil:0}),a.currentStencilSource=void 0;for(let C=0;C{u.touchstart=u.dragStart,u.touchmoveWindow=u.dragMove,u.touchend=u.dragEnd},ql={showCompass:!0,showZoom:!0,visualizePitch:!1};class Zl{constructor(t,n,a=!1){this.mousedown=x=>{this.startMouse(s.e({},x,{ctrlKey:!0,preventDefault:()=>x.preventDefault()}),V.mousePos(this.element,x)),V.addEventListener(window,"mousemove",this.mousemove),V.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=x=>{this.moveMouse(x,V.mousePos(this.element,x))},this.mouseup=x=>{this.mouseRotate.dragEnd(x),this.mousePitch&&this.mousePitch.dragEnd(x),this.offTemp()},this.touchstart=x=>{x.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=V.touchPos(this.element,x.targetTouches)[0],this.startTouch(x,this._startPos),V.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.addEventListener(window,"touchend",this.touchend))},this.touchmove=x=>{x.targetTouches.length!==1?this.reset():(this._lastPos=V.touchPos(this.element,x.targetTouches)[0],this.moveTouch(x,this._lastPos))},this.touchend=x=>{x.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 c=t.dragRotate._mouseRotate.getClickTolerance(),d=t.dragRotate._mousePitch.getClickTolerance();this.element=n,this.mouseRotate=Lo({clickTolerance:c,enable:!0}),this.touchRotate=(({enable:x,clickTolerance:b,bearingDegreesPerPixelMoved:S=.8})=>{const C=new zs;return new mo({clickTolerance:b,move:(A,P)=>({bearingDelta:(P.x-A.x)*S}),moveStateManager:C,enable:x,assignEvents:Xa})})({clickTolerance:c,enable:!0}),this.map=t,a&&(this.mousePitch=dr({clickTolerance:d,enable:!0}),this.touchPitch=(({enable:x,clickTolerance:b,pitchDegreesPerPixelMoved:S=-.5})=>{const C=new zs;return new mo({clickTolerance:b,move:(A,P)=>({pitchDelta:(P.y-A.y)*S}),moveStateManager:C,enable:x,assignEvents:Xa})})({clickTolerance:d,enable:!0})),V.addEventListener(n,"mousedown",this.mousedown),V.addEventListener(n,"touchstart",this.touchstart,{passive:!1}),V.addEventListener(n,"touchcancel",this.reset)}startMouse(t,n){this.mouseRotate.dragStart(t,n),this.mousePitch&&this.mousePitch.dragStart(t,n),V.disableDrag()}startTouch(t,n){this.touchRotate.dragStart(t,n),this.touchPitch&&this.touchPitch.dragStart(t,n),V.disableDrag()}moveMouse(t,n){const a=this.map,{bearingDelta:c}=this.mouseRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.mousePitch){const{pitchDelta:d}=this.mousePitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}moveTouch(t,n){const a=this.map,{bearingDelta:c}=this.touchRotate.dragMove(t,n)||{};if(c&&a.setBearing(a.getBearing()+c),this.touchPitch){const{pitchDelta:d}=this.touchPitch.dragMove(t,n)||{};d&&a.setPitch(a.getPitch()+d)}}off(){const t=this.element;V.removeEventListener(t,"mousedown",this.mousedown),V.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),V.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.removeEventListener(window,"touchend",this.touchend),V.removeEventListener(t,"touchcancel",this.reset),this.offTemp()}offTemp(){V.enableDrag(),V.removeEventListener(window,"mousemove",this.mousemove),V.removeEventListener(window,"mouseup",this.mouseup),V.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),V.removeEventListener(window,"touchend",this.touchend)}}let xr;function Gl(u,t,n){if(u=new s.L(u.lng,u.lat),t){const a=new s.L(u.lng-360,u.lat),c=new s.L(u.lng+360,u.lat),d=n.locationPoint(u).distSqr(t);n.locationPoint(a).distSqr(t)180;){const a=n.locationPoint(u);if(a.x>=0&&a.y>=0&&a.x<=n.width&&a.y<=n.height)break;u.lng>n.center.lng?u.lng-=360:u.lng+=360}return u}const so={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 Vc(u,t,n){const a=u.classList;for(const c in so)a.remove(`maplibregl-${n}-anchor-${c}`);a.add(`maplibregl-${n}-anchor-${t}`)}class Fs extends s.E{constructor(t){if(super(),this._onKeyPress=n=>{const a=n.code,c=n.charCode||n.keyCode;a!=="Space"&&a!=="Enter"&&c!==32&&c!==13||this.togglePopup()},this._onMapClick=n=>{const a=n.originalEvent.target,c=this._element;this._popup&&(a===c||c.contains(a))&&this.togglePopup()},this._update=n=>{if(!this._map)return;const a=this._map.loaded()&&!this._map.isMoving();((n==null?void 0:n.type)==="terrain"||(n==null?void 0:n.type)==="render"&&!a)&&this._map.once("render",this._update),this._map.transform.renderWorldCopies&&(this._lngLat=Gl(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);let c="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?c=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(c=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let d="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?d="rotateX(0deg)":this._pitchAlignment==="map"&&(d=`rotateX(${this._map.getPitch()}deg)`),n&&n.type!=="moveend"||(this._pos=this._pos.round()),V.setTransform(this._element,`${so[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${c}`),this._map.terrain&&!this._opacityTimeout&&(this._opacityTimeout=setTimeout(()=>{const x=this._map.unproject(this._pos),b=40075016686e-3*Math.abs(Math.cos(this._lngLat.lat*Math.PI/180))/Math.pow(2,this._map.transform.tileZoom+8);this._element.style.opacity=x.distanceTo(this._lngLat)>20*b?"0.2":"1.0",this._opacityTimeout=null},100))},this._onMove=n=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=n.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=n.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 s.k("dragstart"))),this.fire(new s.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 s.k("dragend")),this._state="inactive"},this._addDragHandler=n=>{this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(this._pos).add(this._offset),this._pointerdownPos=n.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=t&&t.anchor||"center",this._color=t&&t.color||"#3FB1CE",this._scale=t&&t.scale||1,this._draggable=t&&t.draggable||!1,this._clickTolerance=t&&t.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=t&&t.rotation||0,this._rotationAlignment=t&&t.rotationAlignment||"auto",this._pitchAlignment=t&&t.pitchAlignment&&t.pitchAlignment!=="auto"?t.pitchAlignment:this._rotationAlignment,t&&t.element)this._element=t.element,this._offset=s.P.convert(t&&t.offset||[0,0]);else{this._defaultMarker=!0,this._element=V.create("div"),this._element.setAttribute("aria-label","Map marker");const n=V.createNS("http://www.w3.org/2000/svg","svg"),a=41,c=27;n.setAttributeNS(null,"display","block"),n.setAttributeNS(null,"height",`${a}px`),n.setAttributeNS(null,"width",`${c}px`),n.setAttributeNS(null,"viewBox",`0 0 ${c} ${a}`);const d=V.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"stroke","none"),d.setAttributeNS(null,"stroke-width","1"),d.setAttributeNS(null,"fill","none"),d.setAttributeNS(null,"fill-rule","evenodd");const x=V.createNS("http://www.w3.org/2000/svg","g");x.setAttributeNS(null,"fill-rule","nonzero");const b=V.createNS("http://www.w3.org/2000/svg","g");b.setAttributeNS(null,"transform","translate(3.0, 29.0)"),b.setAttributeNS(null,"fill","#000000");const S=[{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 le of S){const me=V.createNS("http://www.w3.org/2000/svg","ellipse");me.setAttributeNS(null,"opacity","0.04"),me.setAttributeNS(null,"cx","10.5"),me.setAttributeNS(null,"cy","5.80029008"),me.setAttributeNS(null,"rx",le.rx),me.setAttributeNS(null,"ry",le.ry),b.appendChild(me)}const C=V.createNS("http://www.w3.org/2000/svg","g");C.setAttributeNS(null,"fill",this._color);const A=V.createNS("http://www.w3.org/2000/svg","path");A.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"),C.appendChild(A);const P=V.createNS("http://www.w3.org/2000/svg","g");P.setAttributeNS(null,"opacity","0.25"),P.setAttributeNS(null,"fill","#000000");const R=V.createNS("http://www.w3.org/2000/svg","path");R.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"),P.appendChild(R);const W=V.createNS("http://www.w3.org/2000/svg","g");W.setAttributeNS(null,"transform","translate(6.0, 7.0)"),W.setAttributeNS(null,"fill","#FFFFFF");const G=V.createNS("http://www.w3.org/2000/svg","g");G.setAttributeNS(null,"transform","translate(8.0, 8.0)");const K=V.createNS("http://www.w3.org/2000/svg","circle");K.setAttributeNS(null,"fill","#000000"),K.setAttributeNS(null,"opacity","0.25"),K.setAttributeNS(null,"cx","5.5"),K.setAttributeNS(null,"cy","5.5"),K.setAttributeNS(null,"r","5.4999962");const q=V.createNS("http://www.w3.org/2000/svg","circle");q.setAttributeNS(null,"fill","#FFFFFF"),q.setAttributeNS(null,"cx","5.5"),q.setAttributeNS(null,"cy","5.5"),q.setAttributeNS(null,"r","5.4999962"),G.appendChild(K),G.appendChild(q),x.appendChild(b),x.appendChild(C),x.appendChild(P),x.appendChild(W),x.appendChild(G),n.appendChild(x),n.setAttributeNS(null,"height",a*this._scale+"px"),n.setAttributeNS(null,"width",c*this._scale+"px"),this._element.appendChild(n),this._offset=s.P.convert(t&&t.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",n=>{n.preventDefault()}),this._element.addEventListener("mousedown",n=>{n.preventDefault()}),Vc(this._element,this._anchor,"marker"),t&&t.className)for(const n of t.className.split(" "))this._element.classList.add(n);this._popup=null}addTo(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),t.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),V.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(t){return this._lngLat=s.L.convert(t),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){const c=Math.abs(13.5)/Math.SQRT2;t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[c,-1*(38.1-13.5+c)],"bottom-right":[-c,-1*(38.1-13.5+c)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),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 t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this}getOffset(){return this._offset}setOffset(t){return this._offset=s.P.convert(t),this._update(),this}addClassName(t){this._element.classList.add(t)}removeClassName(t){this._element.classList.remove(t)}toggleClassName(t){return this._element.classList.toggle(t)}setDraggable(t){return this._draggable=!!t,this._map&&(t?(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(t){return this._rotation=t||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(t){return this._rotationAlignment=t||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(t){return this._pitchAlignment=t&&t!=="auto"?t:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}}const cr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let or=0,Ia=!1;const Ka={maxWidth:100,unit:"metric"};function Ja(u,t,n){const a=n&&n.maxWidth||100,c=u._container.clientHeight/2,d=u.unproject([0,c]),x=u.unproject([a,c]),b=d.distanceTo(x);if(n&&n.unit==="imperial"){const S=3.2808*b;S>5280?Rs(t,a,S/5280,u._getUIString("ScaleControl.Miles")):Rs(t,a,S,u._getUIString("ScaleControl.Feet"))}else n&&n.unit==="nautical"?Rs(t,a,b/1852,u._getUIString("ScaleControl.NauticalMiles")):b>=1e3?Rs(t,a,b/1e3,u._getUIString("ScaleControl.Kilometers")):Rs(t,a,b,u._getUIString("ScaleControl.Meters"))}function Rs(u,t,n,a){const c=function(d){const x=Math.pow(10,`${Math.floor(d)}`.length-1);let b=d/x;return b=b>=10?10:b>=5?5:b>=3?3:b>=2?2:b>=1?1:function(S){const C=Math.pow(10,Math.ceil(-Math.log(S)/Math.LN10));return Math.round(S*C)/C}(b),x*b}(n);u.style.width=t*(c/n)+"px",u.innerHTML=`${c} ${a}`}const Wl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Hl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ea(u){if(u){if(typeof u=="number"){const t=Math.round(Math.abs(u)/Math.SQRT2);return{center:new s.P(0,0),top:new s.P(0,u),"top-left":new s.P(t,t),"top-right":new s.P(-t,t),bottom:new s.P(0,-u),"bottom-left":new s.P(t,-t),"bottom-right":new s.P(-t,-t),left:new s.P(u,0),right:new s.P(-u,0)}}if(u instanceof s.P||Array.isArray(u)){const t=s.P.convert(u);return{center:t,top:t,"top-left":t,"top-right":t,bottom:t,"bottom-left":t,"bottom-right":t,left:t,right:t}}return{center:s.P.convert(u.center||[0,0]),top:s.P.convert(u.top||[0,0]),"top-left":s.P.convert(u["top-left"]||[0,0]),"top-right":s.P.convert(u["top-right"]||[0,0]),bottom:s.P.convert(u.bottom||[0,0]),"bottom-left":s.P.convert(u["bottom-left"]||[0,0]),"bottom-right":s.P.convert(u["bottom-right"]||[0,0]),left:s.P.convert(u.left||[0,0]),right:s.P.convert(u.right||[0,0])}}return Ea(new s.P(0,0))}const Xl={extend:(u,...t)=>s.e(u,...t),run(u){u()},logToElement(u,t=!1,n="log"){const a=window.document.getElementById(n);a&&(t&&(a.innerHTML=""),a.innerHTML+=`
${u}`)}},Kl=H;class Si{static get version(){return Kl}static get workerCount(){return Vn.workerCount}static set workerCount(t){Vn.workerCount=t}static get maxParallelImageRequests(){return s.c.MAX_PARALLEL_IMAGE_REQUESTS}static set maxParallelImageRequests(t){s.c.MAX_PARALLEL_IMAGE_REQUESTS=t}static get workerUrl(){return s.c.WORKER_URL}static set workerUrl(t){s.c.WORKER_URL=t}static addProtocol(t,n){s.c.REGISTERED_PROTOCOLS[t]=n}static removeProtocol(t){delete s.c.REGISTERED_PROTOCOLS[t]}}return Si.Map=class extends Rc{constructor(u){if(s.bg.mark(s.bh.create),(u=s.e({},Et,u)).minZoom!=null&&u.maxZoom!=null&&u.minZoom>u.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(u.minPitch!=null&&u.maxPitch!=null&&u.minPitch>u.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(u.minPitch!=null&&u.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(u.maxPitch!=null&&u.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new wa(u.minZoom,u.maxZoom,u.minPitch,u.maxPitch,u.renderWorldCopies),{bearingSnap:u.bearingSnap}),this._cooperativeGesturesOnWheel=t=>{this._onCooperativeGesture(t,t[this._metaKey],1)},this._contextLost=t=>{t.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new s.k("webglcontextlost",{originalEvent:t}))},this._contextRestored=t=>{this._setupPainter(),this.resize(),this._update(),this.fire(new s.k("webglcontextrestored",{originalEvent:t}))},this._onMapScroll=t=>{if(t.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=u.interactive,this._cooperativeGestures=u.cooperativeGestures,this._metaKey=navigator.platform.indexOf("Mac")===0?"metaKey":"ctrlKey",this._maxTileCacheSize=u.maxTileCacheSize,this._maxTileCacheZoomLevels=u.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=u.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=u.preserveDrawingBuffer,this._antialias=u.antialias,this._trackResize=u.trackResize,this._bearingSnap=u.bearingSnap,this._refreshExpiredTiles=u.refreshExpiredTiles,this._fadeDuration=u.fadeDuration,this._crossSourceCollisions=u.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=u.collectResourceTiming,this._renderTaskQueue=new pl,this._controls=[],this._mapId=s.a2(),this._locale=s.e({},jl,u.locale),this._clickTolerance=u.clickTolerance,this._overridePixelRatio=u.pixelRatio,this._maxCanvasSize=u.maxCanvasSize,this.transformCameraUpdate=u.transformCameraUpdate,this._imageQueueHandle=Ne.addThrottleControl(()=>this.isMoving()),this._requestManager=new at(u.transformRequest),typeof u.container=="string"){if(this._container=document.getElementById(u.container),!this._container)throw new Error(`Container '${u.container}' not found.`)}else{if(!(u.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=u.container}if(u.maxBounds&&this.setMaxBounds(u.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 t=!1;const n=de(a=>{this._trackResize&&!this._removed&&this.resize(a)._update()},50);this._resizeObserver=new ResizeObserver(a=>{t?n(a):t=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ul(this,u),this._cooperativeGestures&&this._setupCooperativeGestures(),this._hash=u.hash&&new we(typeof u.hash=="string"&&u.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:u.center,zoom:u.zoom,bearing:u.bearing,pitch:u.pitch}),u.bounds&&(this.resize(),this.fitBounds(u.bounds,s.e({},u.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=u.localIdeographFontFamily,this._validateStyle=u.validateStyle,u.style&&this.setStyle(u.style,{localIdeographFontFamily:u.localIdeographFontFamily}),u.attributionControl&&this.addControl(new Hn({customAttribution:u.customAttribution})),u.maplibreLogo&&this.addControl(new Yi,u.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",t=>{this._update(t.dataType==="style"),this.fire(new s.k(`${t.dataType}data`,t))}),this.on("dataloading",t=>{this.fire(new s.k(`${t.dataType}dataloading`,t))}),this.on("dataabort",t=>{this.fire(new s.k("sourcedataabort",t))})}_getMapId(){return this._mapId}addControl(u,t){if(t===void 0&&(t=u.getDefaultPosition?u.getDefaultPosition():"top-right"),!u||!u.onAdd)return this.fire(new s.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const n=u.onAdd(this);this._controls.push(u);const a=this._controlPositions[t];return t.indexOf("bottom")!==-1?a.insertBefore(n,a.firstChild):a.appendChild(n),this}removeControl(u){if(!u||!u.onRemove)return this.fire(new s.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const t=this._controls.indexOf(u);return t>-1&&this._controls.splice(t,1),u.onRemove(this),this}hasControl(u){return this._controls.indexOf(u)>-1}calculateCameraOptionsFromTo(u,t,n,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(n,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(u,t,n,a)}resize(u){var t;const n=this._containerDimensions(),a=n[0],c=n[1],d=this._getClampedPixelRatio(a,c);if(this._resizeCanvas(a,c,d),this.painter.resize(a,c,d),this.painter.overLimit()){const b=this.painter.context.gl;this._maxCanvasSize=[b.drawingBufferWidth,b.drawingBufferHeight];const S=this._getClampedPixelRatio(a,c);this._resizeCanvas(a,c,S),this.painter.resize(a,c,S)}this.transform.resize(a,c),(t=this._requestedCameraState)===null||t===void 0||t.resize(a,c);const x=!this._moving;return x&&(this.stop(),this.fire(new s.k("movestart",u)).fire(new s.k("move",u))),this.fire(new s.k("resize",u)),x&&this.fire(new s.k("moveend",u)),this}_getClampedPixelRatio(u,t){const{0:n,1:a}=this._maxCanvasSize,c=this.getPixelRatio(),d=u*c,x=t*c;return Math.min(d>n?n/d:1,x>a?a/x:1)*c}getPixelRatio(){var u;return(u=this._overridePixelRatio)!==null&&u!==void 0?u:devicePixelRatio}setPixelRatio(u){this._overridePixelRatio=u,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(u){return this.transform.setMaxBounds(Tt.convert(u)),this._update()}setMinZoom(u){if((u=u??-2)>=-2&&u<=this.transform.maxZoom)return this.transform.minZoom=u,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=u,this._update(),this.getZoom()>u&&this.setZoom(u),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(u){if((u=u??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(u>=0&&u<=this.transform.maxPitch)return this.transform.minPitch=u,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(u>=this.transform.minPitch)return this.transform.maxPitch=u,this._update(),this.getPitch()>u&&this.setPitch(u),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(u){return this.transform.renderWorldCopies=u,this._update()}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(u){return this._cooperativeGestures=u,this._cooperativeGestures?this._setupCooperativeGestures():this._destroyCooperativeGestures(),this}project(u){return this.transform.locationPoint(s.L.convert(u),this.style&&this.terrain)}unproject(u){return this.transform.pointLocation(s.P.convert(u),this.terrain)}isMoving(){var u;return this._moving||((u=this.handlers)===null||u===void 0?void 0:u.isMoving())}isZooming(){var u;return this._zooming||((u=this.handlers)===null||u===void 0?void 0:u.isZooming())}isRotating(){var u;return this._rotating||((u=this.handlers)===null||u===void 0?void 0:u.isRotating())}_createDelegatedListener(u,t,n){if(u==="mouseenter"||u==="mouseover"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:d=>{const x=this.getLayer(t)?this.queryRenderedFeatures(d.point,{layers:[t]}):[];x.length?a||(a=!0,n.call(this,new bi(u,this,d.originalEvent,{features:x}))):a=!1},mouseout:()=>{a=!1}}}}if(u==="mouseleave"||u==="mouseout"){let a=!1;return{layer:t,listener:n,delegates:{mousemove:x=>{(this.getLayer(t)?this.queryRenderedFeatures(x.point,{layers:[t]}):[]).length?a=!0:a&&(a=!1,n.call(this,new bi(u,this,x.originalEvent)))},mouseout:x=>{a&&(a=!1,n.call(this,new bi(u,this,x.originalEvent)))}}}}{const a=c=>{const d=this.getLayer(t)?this.queryRenderedFeatures(c.point,{layers:[t]}):[];d.length&&(c.features=d,n.call(this,c),delete c.features)};return{layer:t,listener:n,delegates:{[u]:a}}}}on(u,t,n){if(n===void 0)return super.on(u,t);const a=this._createDelegatedListener(u,t,n);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[u]=this._delegatedListeners[u]||[],this._delegatedListeners[u].push(a);for(const c in a.delegates)this.on(c,a.delegates[c]);return this}once(u,t,n){if(n===void 0)return super.once(u,t);const a=this._createDelegatedListener(u,t,n);for(const c in a.delegates)this.once(c,a.delegates[c]);return this}off(u,t,n){return n===void 0?super.off(u,t):(this._delegatedListeners&&this._delegatedListeners[u]&&(a=>{const c=this._delegatedListeners[u];for(let d=0;dthis._updateStyle(u,t));const n=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!u)),u?(this.style=new Er(this,t||{}),this.style.setEventedParent(this,{style:this.style}),typeof u=="string"?this.style.loadURL(u,t,n):this.style.loadJSON(u,t,n),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Er(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(u,t){if(typeof u=="string"){const n=this._requestManager.transformRequest(u,et.Style);s.f(n,(a,c)=>{a?this.fire(new s.j(a)):c&&this._updateDiff(c,t)})}else typeof u=="object"&&this._updateDiff(u,t)}_updateDiff(u,t){try{this.style.setState(u,t)&&this._update(!0)}catch(n){s.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(u,t)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():s.w("There is no style added to the map.")}addSource(u,t){return this._lazyInitEmptyStyle(),this.style.addSource(u,t),this._update(!0)}isSourceLoaded(u){const t=this.style&&this.style.sourceCaches[u];if(t!==void 0)return t.loaded();this.fire(new s.j(new Error(`There is no source with ID '${u}'`)))}setTerrain(u){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),u){const t=this.style.sourceCaches[u.source];if(!t)throw new Error(`cannot load terrain, because there exists no source with ID: ${u.source}`);for(const n in this.style._layers){const a=this.style._layers[n];a.type==="hillshade"&&a.source===u.source&&s.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 Nc(this.painter,t,u),this.painter.renderToTexture=new fl(this.painter,this.terrain),this.transform._minEleveationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=n=>{n.dataType==="style"?this.terrain.sourceCache.freeRtt():n.dataType==="source"&&n.tile&&(n.sourceId!==u.source||this._elevationFreeze||(this.transform._minEleveationForCurrentTile=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(n.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._minEleveationForCurrentTile=0,this.transform.elevation=0;return this.fire(new s.k("terrain",{terrain:u})),this}getTerrain(){var u,t;return(t=(u=this.terrain)===null||u===void 0?void 0:u.options)!==null&&t!==void 0?t:null}areTilesLoaded(){const u=this.style&&this.style.sourceCaches;for(const t in u){const n=u[t]._tiles;for(const a in n){const c=n[a];if(c.state!=="loaded"&&c.state!=="errored")return!1}}return!0}addSourceType(u,t,n){return this._lazyInitEmptyStyle(),this.style.addSourceType(u,t,n)}removeSource(u){return this.style.removeSource(u),this._update(!0)}getSource(u){return this.style.getSource(u)}addImage(u,t,n={}){const{pixelRatio:a=1,sdf:c=!1,stretchX:d,stretchY:x,content:b}=n;if(this._lazyInitEmptyStyle(),!(t instanceof HTMLImageElement||s.a(t))){if(t.width===void 0||t.height===void 0)return this.fire(new s.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:S,height:C,data:A}=t,P=t;return this.style.addImage(u,{data:new s.R({width:S,height:C},new Uint8Array(A)),pixelRatio:a,stretchX:d,stretchY:x,content:b,sdf:c,version:0,userImage:P}),P.onAdd&&P.onAdd(this,u),this}}{const{width:S,height:C,data:A}=s.h.getImageData(t);this.style.addImage(u,{data:new s.R({width:S,height:C},A),pixelRatio:a,stretchX:d,stretchY:x,content:b,sdf:c,version:0})}}updateImage(u,t){const n=this.style.getImage(u);if(!n)return this.fire(new s.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=t instanceof HTMLImageElement||s.a(t)?s.h.getImageData(t):t,{width:c,height:d,data:x}=a;if(c===void 0||d===void 0)return this.fire(new s.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(c!==n.data.width||d!==n.data.height)return this.fire(new s.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const b=!(t instanceof HTMLImageElement||s.a(t));return n.data.replace(x,b),this.style.updateImage(u,n),this}getImage(u){return this.style.getImage(u)}hasImage(u){return u?!!this.style.getImage(u):(this.fire(new s.j(new Error("Missing required image id"))),!1)}removeImage(u){this.style.removeImage(u)}loadImage(u,t){Ne.getImage(this._requestManager.transformRequest(u,et.Image),t)}listImages(){return this.style.listImages()}addLayer(u,t){return this._lazyInitEmptyStyle(),this.style.addLayer(u,t),this._update(!0)}moveLayer(u,t){return this.style.moveLayer(u,t),this._update(!0)}removeLayer(u){return this.style.removeLayer(u),this._update(!0)}getLayer(u){return this.style.getLayer(u)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(u,t,n){return this.style.setLayerZoomRange(u,t,n),this._update(!0)}setFilter(u,t,n={}){return this.style.setFilter(u,t,n),this._update(!0)}getFilter(u){return this.style.getFilter(u)}setPaintProperty(u,t,n,a={}){return this.style.setPaintProperty(u,t,n,a),this._update(!0)}getPaintProperty(u,t){return this.style.getPaintProperty(u,t)}setLayoutProperty(u,t,n,a={}){return this.style.setLayoutProperty(u,t,n,a),this._update(!0)}getLayoutProperty(u,t){return this.style.getLayoutProperty(u,t)}setGlyphs(u,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(u,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(u,t,n={}){return this._lazyInitEmptyStyle(),this.style.addSprite(u,t,n,a=>{a||this._update(!0)}),this}removeSprite(u){return this._lazyInitEmptyStyle(),this.style.removeSprite(u),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(u,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(u,t,n=>{n||this._update(!0)}),this}setLight(u,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(u,t),this._update(!0)}getLight(){return this.style.getLight()}setFeatureState(u,t){return this.style.setFeatureState(u,t),this._update()}removeFeatureState(u,t){return this.style.removeFeatureState(u,t),this._update()}getFeatureState(u){return this.style.getFeatureState(u)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let u=0,t=0;return this._container&&(u=this._container.clientWidth||400,t=this._container.clientHeight||300),[u,t]}_setupContainer(){const u=this._container;u.classList.add("maplibregl-map");const t=this._canvasContainer=V.create("div","maplibregl-canvas-container",u);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=V.create("canvas","maplibregl-canvas",t),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 n=this._containerDimensions(),a=this._getClampedPixelRatio(n[0],n[1]);this._resizeCanvas(n[0],n[1],a);const c=this._controlContainer=V.create("div","maplibregl-control-container",u),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(x=>{d[x]=V.create("div",`maplibregl-ctrl-${x} `,c)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_setupCooperativeGestures(){this._cooperativeGesturesScreen=V.create("div","maplibregl-cooperative-gesture-screen",this._container);let u=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.windowsHelpText?this._cooperativeGestures.windowsHelpText:"Use Ctrl + scroll to zoom the map";navigator.platform.indexOf("Mac")===0&&(u=typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.macHelpText?this._cooperativeGestures.macHelpText:"Use ⌘ + scroll to zoom the map"),this._cooperativeGesturesScreen.innerHTML=`

${typeof this._cooperativeGestures!="boolean"&&this._cooperativeGestures.mobileHelpText?this._cooperativeGestures.mobileHelpText:"Use two fingers to move the map"}
- `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){N.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(u,t,n){this._canvas.width=Math.floor(n*u),this._canvas.height=Math.floor(n*t),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{t={requestedAttributes:u},a&&(t.statusMessage=a.statusMessage,t.type=a.type)},{once:!0});const n=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!n){const a="Failed to initialize WebGL";throw t?(t.message=a,new Error(JSON.stringify(t))):new Error(a)}this.painter=new zo(n,this.transform),_e.testSupport(n)}_onCooperativeGesture(u,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const t=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const c=this.transform.zoom,d=s.h.now();this.style.zoomHistory.update(c,d);const x=new s.a8(c,{now:d,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),b=x.crossFadingFactor();b===1&&b===this._crossFadingFactor||(n=!0,this._crossFadingFactor=b),this.style.update(x)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=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._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,t,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding}),this.fire(new s.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.bg.mark(s.bh.load),this.fire(new s.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.k("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,s.bg.mark(s.bh.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),Ne.removeThrottleControl(this._imageQueueHandle),(u=this._resizeObserver)===null||u===void 0||u.disconnect();const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),N.remove(this._canvasContainer),N.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),s.bg.clearMetrics(),this._removed=!0,this.fire(new s.k("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=s.h.frame(u=>{s.bg.frame(u),this._frame=null,this._render(u)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return xt}getCameraTargetElevation(){return this.transform.elevation}},wi.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const t=this._map.getZoom(),n=t===this._map.getMaxZoom(),a=t===this._map.getMinZoom();this._zoomInButton.disabled=n,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",n.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{const t=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=t},this._setButtonTitle=(t,n)=>{const a=this._map._getUIString(`NavigationControl.${n}`);t.title=a,t.setAttribute("aria-label",a)},this.options=s.e({},ql,u),this._container=N.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),N.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),N.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=N.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,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 Zl(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){N.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(u,t){const n=N.create("button",u,this._container);return n.type="button",n.addEventListener("click",t),n}},wi.GeolocateControl=class extends s.E{constructor(u){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new s.k("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.k("geolocate",t)),this._finish()}},this._updateCamera=t=>{const n=new s.L(t.coords.longitude,t.coords.latitude),a=t.coords.accuracy,c=this._map.getBearing(),d=s.e({bearing:c},this.options.fitBoundsOptions),x=Tt.fromLngLat(n,a);this._map.fitBounds(x,d,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const n=new s.L(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.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=t=>{if(this._map){if(this.options.trackUserLocation)if(t.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 n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&Ta)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.k("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=t=>{if(this._map){if(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=N.create("button","maplibregl-ctrl-geolocate",this._container),N.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=N.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fs({element:this._dotElement}),this._circleElement=N.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fs({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.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 s.k("trackuserlocationend")))})}},this.options=s.e({},cr,u)}onAdd(u){return this._map=u,this._container=N.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(t,n=!1){xr===void 0||n?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(a=>{xr=a.state!=="denied",t(xr)}).catch(()=>{xr=!!window.navigator.geolocation,t(xr)}):(xr=!!window.navigator.geolocation,t(xr)):t(xr)}(this._setupUI),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(),N.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,or=0,Ta=!1}_isOutOfMapMaxBounds(u){const t=this._map.getMaxBounds(),n=u.coords;return t&&(n.longitudet.getEast()||n.latitudet.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 u=this._map.getBounds(),t=u.getSouthEast(),n=u.getNorthEast(),a=t.distanceTo(n),c=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${c}px`,this._circleElement.style.height=`${c}px`}trigger(){if(!this._setup)return s.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 s.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":or--,Ta=!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 s.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 s.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),or++,or>1?(u={maximumAge:6e5,timeout:0},Ta=!0):(u=this.options.positionOptions,Ta=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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)}},wi.AttributionControl=Hn,wi.LogoControl=Yi,wi.ScaleControl=class{constructor(u){this._onMove=()=>{Ka(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,Ka(this._map,this._container,this.options)},this.options=s.e({},Xa,u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=N.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){N.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},wi.FullscreenControl=class extends s.E{constructor(u={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:s.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(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=N.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){N.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=N.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);N.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 s.k("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new s.k("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_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()}},wi.TerrainControl=class{constructor(u){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.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=u}onAdd(u){return this._map=u,this._container=N.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=N.create("button","maplibregl-ctrl-terrain",this._container),N.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(){N.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},wi.Popup=class extends s.E{constructor(u){super(),this.remove=()=>(this._content&&N.remove(this._content),this._container&&(N.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),delete this._map),this.fire(new s.k("close")),this),this._onMouseUp=t=>{this._update(t.point)},this._onMouseMove=t=>{this._update(t.point)},this._onDrag=t=>{this._update(t.point)},this._update=t=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=N.create("div","maplibregl-popup",this._map.getContainer()),this._tip=N.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const x of this.options.className.split(" "))this._container.classList.add(x);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._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Gl(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!t)return;const n=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);let a=this.options.anchor;const c=Ia(this.options.offset);if(!a){const x=this._container.offsetWidth,b=this._container.offsetHeight;let S;S=n.y+c.bottom.ythis._map.transform.height-b?["bottom"]:[],n.xthis._map.transform.width-x/2&&S.push("right"),a=S.length===0?"bottom":S.join("-")}const d=n.add(c[a]).round();N.setTransform(this._container,`${so[a]} translate(${d.x}px,${d.y}px)`),Nc(this._container,a,"popup")},this._onClose=()=>{this.remove()},this.options=s.e(Object.create(Wl),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 s.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=s.L.convert(u),this._pos=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._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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const t=document.createDocumentFragment(),n=document.createElement("body");let a;for(n.innerHTML=u;a=n.firstChild,a;)t.appendChild(a);return this.setDOMContent(t)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=N.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){this._container&&this._container.classList.add(u)}removeClassName(u){this._container&&this._container.classList.remove(u)}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}_createCloseButton(){this.options.closeButton&&(this._closeButton=N.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 u=this._container.querySelector(Hl);u&&u.focus()}},wi.Marker=Fs,wi.Style=Ir,wi.LngLat=s.L,wi.LngLatBounds=Tt,wi.Point=s.P,wi.MercatorCoordinate=s.U,wi.Evented=s.E,wi.AJAXError=s.bi,wi.config=s.c,wi.CanvasSource=_r,wi.GeoJSONSource=He,wi.ImageSource=ct,wi.RasterDEMTileSource=Pt,wi.RasterTileSource=ze,wi.VectorTileSource=Oi,wi.VideoSource=Zi,wi.setRTLTextPlugin=s.bj,wi.getRTLTextPluginStatus=s.bk,wi.prewarm=function(){qo().acquire(ti)},wi.clearPrewarmedResources=function(){const u=Un;u&&(u.isPreloaded()&&u.numActive()===1?(u.release(ti),Un=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()"))},Xl.extend(wi,{isSafari:s.ac,getPerformanceMetrics:s.bg.getPerformanceMetrics}),wi});var B=E;return B})})(Qp);var V_=Qp.exports;const is=Yp(V_);function vp(m){let f;return _=>{if(_)for(let v in _){let E=f==null?void 0:f[v],k=_[v];E!==k&&m(v,k,E)}else if(f)for(let v in f)m(v,void 0,f[v]);f=_}}function U_(m,...f){let _=[m];for(let v of f)if(v)Array.isArray(v)&&v[0]===m?_.push(...v.slice(1)):_.push(v);else continue;if(_.length!==1)return _.length===2?_[1]:_}function j_(m){return m===!0?["has","point_count"]:m===!1?["!",["has","point_count"]]:void 0}function q_(m,f){return["case",["boolean",["feature-state","hover"],!1],f,m]}var gu=Z_;function Z_(m){var f,_,v;if(m){if(Array.isArray(m)){for(f=[],_=m.length,v=0;v<_;v++){var E=m[v];E!=null&&f.push(E)}return f}if(typeof m=="object"){f={};var k=Object.keys(m);for(_=k.length,v=0;v<_;v++){var B=k[v],s=m[B];s!=null&&(f[B]=s)}return f}}}function xp(m){let f=m[0],_,v,E=bp(m);return{c(){E.c(),_=Oa()},m(k,B){E.m(k,B),hi(k,_,B),v=!0},p(k,B){B[0]&1&&Sr(f,f=k[0])?(rs(),St(E,1,1,Mr),ns(),E=bp(k),E.c(),ft(E,1),E.m(_.parentNode,_)):E.p(k,B)},i(k){v||(ft(E),v=!0)},o(k){St(E),v=!1},d(k){k&&li(_),E.d(k)}}}function bp(m){let f;const _=m[37].default,v=Ks(_,m,m[36],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k[1]&32)&&Ys(v,_,E,E[36],f?Js(_,E[36],k,null):Qs(E[36]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function G_(m){let f,_,v=m[0]&&xp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),hi(E,f,k),_=!0},p(E,k){E[0]?v?(v.p(E,k),k[0]&1&&ft(v,1)):(v=xp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&li(f),v&&v.d(E)}}}function W_(m,f,_){let v,E,k,B,s,H,N,_e,be,ye,Oe,Le,{$$slots:Be={},$$scope:Ne}=f,{id:et=Lc("layer")}=f,{source:at=void 0}=f,{sourceLayer:nt=void 0}=f,{beforeId:it=void 0}=f,{beforeLayerType:Vt=void 0}=f,{type:ei}=f,{paint:Ht=void 0}=f,{layout:Nt=void 0}=f,{filter:Jt=void 0}=f,{applyToClusters:At=void 0}=f,{minzoom:Ae=void 0}=f,{maxzoom:Ge=void 0}=f,{manageHoverState:Ui=!1}=f,{hovered:Dt=null}=f,{interactive:qt=!0}=f,{hoverCursor:Lt=void 0}=f,{eventsIfTopMost:di=!1}=f;const Pi=Ih(),{map:$r,source:Nr,self:zi,minzoom:Ti,maxzoom:Tt,eventTopMost:pi,layerInfo:Oi}=B_();Qr(m,$r,He=>_(32,be=He)),Qr(m,Nr,He=>_(33,ye=He)),Qr(m,zi,He=>_(0,_e=He)),Qr(m,Ti,He=>_(35,Le=He)),Qr(m,Tt,He=>_(34,Oe=He)),ol(()=>{_e&&be&&(Oi.delete(_e),be==null||be.removeLayer(_e))});let ze,Pt=!0;return m.$$set=He=>{"id"in He&&_(7,et=He.id),"source"in He&&_(8,at=He.source),"sourceLayer"in He&&_(9,nt=He.sourceLayer),"beforeId"in He&&_(10,it=He.beforeId),"beforeLayerType"in He&&_(11,Vt=He.beforeLayerType),"type"in He&&_(12,ei=He.type),"paint"in He&&_(13,Ht=He.paint),"layout"in He&&_(14,Nt=He.layout),"filter"in He&&_(15,Jt=He.filter),"applyToClusters"in He&&_(16,At=He.applyToClusters),"minzoom"in He&&_(17,Ae=He.minzoom),"maxzoom"in He&&_(18,Ge=He.maxzoom),"manageHoverState"in He&&_(19,Ui=He.manageHoverState),"hovered"in He&&_(6,Dt=He.hovered),"interactive"in He&&_(20,qt=He.interactive),"hoverCursor"in He&&_(21,Lt=He.hoverCursor),"eventsIfTopMost"in He&&_(22,di=He.eventsIfTopMost),"$$scope"in He&&_(36,Ne=He.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&65536&&_(31,v=j_(At)),m.$$.dirty[0]&32768|m.$$.dirty[1]&1&&_(25,E=U_("all",v,Jt)),m.$$.dirty[0]&131072|m.$$.dirty[1]&16&&_(27,k=Ae??Le),m.$$.dirty[0]&262144|m.$$.dirty[1]&8&&_(26,B=Ge??Oe),m.$$.dirty[0]&256|m.$$.dirty[1]&4&&_(30,s=at||ye),m.$$.dirty[0]&1324908161|m.$$.dirty[1]&2&&be&&_e!==et&&s){let He=function(ct){var Bi,gr;if(!qt||!_e||!be||di&&pi(ct)!==_e)return;let Zi=ct.features??[],_r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id,Ue={event:ct,map:be,clusterId:_r,layer:_e,source:s,features:Zi};Pi(ct.type,Ue)};_e&&Oi.delete(_e);let Zt=it;if(!it&&Vt){let ct=be.getStyle().layers,Zi=typeof Vt=="function"?Vt:Ue=>Ue.type===Vt,_r=ct==null?void 0:ct.find(Zi);_r&&(Zt=_r.id)}il(zi,_e=et,_e),be.addLayer(gu({id:_e,type:ei,source:s,"source-layer":nt,filter:E,paint:Ht,layout:Nt,minzoom:k,maxzoom:B}),Zt),_(24,Pt=!0),be.on("click",_e,He),be.on("dblclick",_e,He),be.on("contextmenu",_e,He),be.on("mouseenter",_e,ct=>{var Bi,gr;if(!qt||!_e||!be||di&&pi(ct)!==_e)return;Lt&&(be.getCanvas().style.cursor=Lt);let Zi=ct.features??[];_(6,Dt=Zi[0]??null);let _r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id;Pi("mouseenter",{event:ct,map:be,clusterId:_r,layer:_e,source:s,features:Zi})}),be.on("mousemove",_e,ct=>{var Bi,gr,ci;if(!qt)return;if(di&&pi(ct)!==_e){_(6,Dt=null),Ui&&ze!==void 0&&(be==null||be.setFeatureState({source:s,sourceLayer:nt,id:ze},{hover:!1}),_(23,ze=void 0));return}be.getCanvas().style.cursor=Lt;let Zi=ct.features??[],_r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id,Ue=(ci=Zi[0])==null?void 0:ci.id;Ue!==ze&&(Ui&&(ze!==void 0&&(be==null||be.setFeatureState({source:s,id:ze,sourceLayer:nt},{hover:!1})),be==null||be.setFeatureState({source:s,id:Ue,sourceLayer:nt},{hover:!0})),_(23,ze=Ue),_(6,Dt=Zi[0]??null)),Pi("mousemove",{event:ct,map:be,clusterId:_r,layer:_e,source:s,features:Zi})}),be.on("mouseleave",_e,ct=>{if(!(!qt||!_e||!be)){if(Lt&&(be.getCanvas().style.cursor=""),_(6,Dt=null),Ui&&ze!==void 0){const Zi={source:s,id:ze,sourceLayer:nt};be==null||be.setFeatureState(Zi,{hover:!1}),_(23,ze=void 0)}Pi("mouseleave",{map:be,layer:_e,source:s})}})}m.$$.dirty[0]&1048577&&_e&&Oi.set(_e,{interactive:qt}),m.$$.dirty[0]&1|m.$$.dirty[1]&2&&_(29,H=_e?vp((He,Zt)=>be==null?void 0:be.setPaintProperty(_e,He,Zt)):void 0),m.$$.dirty[0]&1|m.$$.dirty[1]&2&&_(28,N=_e?vp((He,Zt)=>be==null?void 0:be.setLayoutProperty(_e,He,Zt)):void 0),m.$$.dirty[0]&536879104&&(H==null||H(Ht)),m.$$.dirty[0]&268451840&&(N==null||N(Nt)),m.$$.dirty[0]&201326593|m.$$.dirty[1]&2&&_e&&(be==null||be.setLayerZoomRange(_e,k,B)),m.$$.dirty[0]&50331649|m.$$.dirty[1]&2&&_e&&(Pt?_(24,Pt=!1):be==null||be.setFilter(_e,E))},[_e,$r,Nr,zi,Ti,Tt,Dt,et,at,nt,it,Vt,ei,Ht,Nt,Jt,At,Ae,Ge,Ui,qt,Lt,di,ze,Pt,E,B,k,N,H,s,v,be,ye,Oe,Le,Ne,Be]}class Ch extends Gr{constructor(f){super(),Zr(this,f,W_,G_,Sr,{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 H_(m){let f;const _=m[16].default,v=Ks(_,m,m[24],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&16777216)&&Ys(v,_,E,E[24],f?Js(_,E[24],k,null):Qs(E[24]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function X_(m){let f,_,v;function E(B){m[17](B)}let k={id:m[1],type:"circle",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],applyToClusters:m[9],minzoom:m[10],maxzoom:m[11],hoverCursor:m[12],manageHoverState:m[13],eventsIfTopMost:m[14],interactive:m[15],$$slots:{default:[H_]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),$s.push(()=>zc(f,"hovered",E)),f.$on("click",m[18]),f.$on("dblclick",m[19]),f.$on("contextmenu",m[20]),f.$on("mouseenter",m[21]),f.$on("mousemove",m[22]),f.$on("mouseleave",m[23]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.applyToClusters=B[9]),s&1024&&(H.minzoom=B[10]),s&2048&&(H.maxzoom=B[11]),s&4096&&(H.hoverCursor=B[12]),s&8192&&(H.manageHoverState=B[13]),s&16384&&(H.eventsIfTopMost=B[14]),s&32768&&(H.interactive=B[15]),s&16777216&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],Pc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function K_(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Lc("circle")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:N=void 0}=f,{paint:_e}=f,{layout:be=void 0}=f,{filter:ye=void 0}=f,{applyToClusters:Oe=void 0}=f,{minzoom:Le=void 0}=f,{maxzoom:Be=void 0}=f,{hoverCursor:Ne=void 0}=f,{manageHoverState:et=!1}=f,{hovered:at=null}=f,{eventsIfTopMost:nt=!1}=f,{interactive:it=!0}=f;function Vt(Ge){at=Ge,_(0,at)}function ei(Ge){pn.call(this,m,Ge)}function Ht(Ge){pn.call(this,m,Ge)}function Nt(Ge){pn.call(this,m,Ge)}function Jt(Ge){pn.call(this,m,Ge)}function At(Ge){pn.call(this,m,Ge)}function Ae(Ge){pn.call(this,m,Ge)}return m.$$set=Ge=>{"id"in Ge&&_(1,k=Ge.id),"source"in Ge&&_(2,B=Ge.source),"sourceLayer"in Ge&&_(3,s=Ge.sourceLayer),"beforeId"in Ge&&_(4,H=Ge.beforeId),"beforeLayerType"in Ge&&_(5,N=Ge.beforeLayerType),"paint"in Ge&&_(6,_e=Ge.paint),"layout"in Ge&&_(7,be=Ge.layout),"filter"in Ge&&_(8,ye=Ge.filter),"applyToClusters"in Ge&&_(9,Oe=Ge.applyToClusters),"minzoom"in Ge&&_(10,Le=Ge.minzoom),"maxzoom"in Ge&&_(11,Be=Ge.maxzoom),"hoverCursor"in Ge&&_(12,Ne=Ge.hoverCursor),"manageHoverState"in Ge&&_(13,et=Ge.manageHoverState),"hovered"in Ge&&_(0,at=Ge.hovered),"eventsIfTopMost"in Ge&&_(14,nt=Ge.eventsIfTopMost),"interactive"in Ge&&_(15,it=Ge.interactive),"$$scope"in Ge&&_(24,E=Ge.$$scope)},[at,k,B,s,H,N,_e,be,ye,Oe,Le,Be,Ne,et,nt,it,v,Vt,ei,Ht,Nt,Jt,At,Ae,E]}class ef extends Gr{constructor(f){super(),Zr(this,f,K_,X_,Sr,{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 J_(m){let f;const _=m[15].default,v=Ks(_,m,m[23],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&8388608)&&Ys(v,_,E,E[23],f?Js(_,E[23],k,null):Qs(E[23]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function Y_(m){let f,_,v;function E(B){m[16](B)}let k={id:m[1],type:"fill",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],minzoom:m[9],maxzoom:m[10],hoverCursor:m[11],manageHoverState:m[12],eventsIfTopMost:m[13],interactive:m[14],$$slots:{default:[J_]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),$s.push(()=>zc(f,"hovered",E)),f.$on("click",m[17]),f.$on("dblclick",m[18]),f.$on("contextmenu",m[19]),f.$on("mouseenter",m[20]),f.$on("mousemove",m[21]),f.$on("mouseleave",m[22]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.minzoom=B[9]),s&1024&&(H.maxzoom=B[10]),s&2048&&(H.hoverCursor=B[11]),s&4096&&(H.manageHoverState=B[12]),s&8192&&(H.eventsIfTopMost=B[13]),s&16384&&(H.interactive=B[14]),s&8388608&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],Pc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function Q_(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Lc("fill")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:N=void 0}=f,{paint:_e}=f,{layout:be=void 0}=f,{filter:ye=void 0}=f,{minzoom:Oe=void 0}=f,{maxzoom:Le=void 0}=f,{hoverCursor:Be=void 0}=f,{manageHoverState:Ne=!1}=f,{hovered:et=null}=f,{eventsIfTopMost:at=!1}=f,{interactive:nt=!0}=f;function it(Ae){et=Ae,_(0,et)}function Vt(Ae){pn.call(this,m,Ae)}function ei(Ae){pn.call(this,m,Ae)}function Ht(Ae){pn.call(this,m,Ae)}function Nt(Ae){pn.call(this,m,Ae)}function Jt(Ae){pn.call(this,m,Ae)}function At(Ae){pn.call(this,m,Ae)}return m.$$set=Ae=>{"id"in Ae&&_(1,k=Ae.id),"source"in Ae&&_(2,B=Ae.source),"sourceLayer"in Ae&&_(3,s=Ae.sourceLayer),"beforeId"in Ae&&_(4,H=Ae.beforeId),"beforeLayerType"in Ae&&_(5,N=Ae.beforeLayerType),"paint"in Ae&&_(6,_e=Ae.paint),"layout"in Ae&&_(7,be=Ae.layout),"filter"in Ae&&_(8,ye=Ae.filter),"minzoom"in Ae&&_(9,Oe=Ae.minzoom),"maxzoom"in Ae&&_(10,Le=Ae.maxzoom),"hoverCursor"in Ae&&_(11,Be=Ae.hoverCursor),"manageHoverState"in Ae&&_(12,Ne=Ae.manageHoverState),"hovered"in Ae&&_(0,et=Ae.hovered),"eventsIfTopMost"in Ae&&_(13,at=Ae.eventsIfTopMost),"interactive"in Ae&&_(14,nt=Ae.interactive),"$$scope"in Ae&&_(23,E=Ae.$$scope)},[et,k,B,s,H,N,_e,be,ye,Oe,Le,Be,Ne,at,nt,v,it,Vt,ei,Ht,Nt,Jt,At,E]}class tf extends Gr{constructor(f){super(),Zr(this,f,Q_,Y_,Sr,{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 $_(m,f,_){let v;const{map:E}=Ll();Qr(m,E,H=>_(4,v=H));let{position:k="top-left"}=f,{container:B=void 0}=f,s=null;return ol(()=>{v!=null&&v.loaded()&&s&&v.removeControl(s)}),m.$$set=H=>{"position"in H&&_(1,k=H.position),"container"in H&&_(2,B=H.container)},m.$$.update=()=>{if(m.$$.dirty&30&&v&&!s){let H;typeof B=="string"?H=document.querySelector(B)??void 0:H=B,_(3,s=new is.FullscreenControl({container:H})),v.addControl(s,k)}},[E,k,B,s,v]}class eg extends Gr{constructor(f){super(),Zr(this,f,$_,null,Sr,{position:1,container:2})}}function tg(m,f,_,v,E){let k=!1;m.getSource(f)&&(k=!0,m.removeSource(f));const B=()=>{v(f)&&(m.addSource(f,_),E())};if(k){const s=()=>{f&&(m.getSource(f)?setTimeout(s,1):B())};s()}else B()}function ig(m,f,_){v_().then(()=>{let v=h_(m);if(!v)return;v.getSource(f)===_&&v.removeSource(f)})}function wp(m){let f=m[0],_,v,E=Sp(m);return{c(){E.c(),_=Oa()},m(k,B){E.m(k,B),hi(k,_,B),v=!0},p(k,B){B&1&&Sr(f,f=k[0])?(rs(),St(E,1,1,Mr),ns(),E=Sp(k),E.c(),ft(E,1),E.m(_.parentNode,_)):E.p(k,B)},i(k){v||(ft(E),v=!0)},o(k){St(E),v=!1},d(k){k&&li(_),E.d(k)}}}function Sp(m){let f;const _=m[15].default,v=Ks(_,m,m[14],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&16384)&&Ys(v,_,E,E[14],f?Js(_,E[14],k,null):Qs(E[14]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function rg(m){let f,_,v=m[0]&&wp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),hi(E,f,k),_=!0},p(E,[k]){E[0]?v?(v.p(E,k),k&1&&ft(v,1)):(v=wp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&li(f),v&&v.d(E)}}}function ng(m,f,_){let v,E,k,{$$slots:B={},$$scope:s}=f,{id:H=Lc("geojson")}=f,{data:N}=f,{generateId:_e=!1}=f,{promoteId:be=void 0}=f,{filter:ye=void 0}=f,{lineMetrics:Oe=void 0}=f,{cluster:Le=void 0}=f;const{map:Be,cluster:Ne,self:et}=O_();Qr(m,Be,it=>_(13,E=it)),Qr(m,Ne,it=>_(16,k=it)),Qr(m,et,it=>_(0,v=it));let at,nt=!0;return ol(()=>{v&&at&&E&&(ig(Be,v,at),il(et,v=null,v),_(11,at=void 0))}),m.$$set=it=>{"id"in it&&_(4,H=it.id),"data"in it&&_(5,N=it.data),"generateId"in it&&_(6,_e=it.generateId),"promoteId"in it&&_(7,be=it.promoteId),"filter"in it&&_(8,ye=it.filter),"lineMetrics"in it&&_(9,Oe=it.lineMetrics),"cluster"in it&&_(10,Le=it.cluster),"$$scope"in it&&_(14,s=it.$$scope)},m.$$.update=()=>{m.$$.dirty&1024&&il(Ne,k=Le,k),m.$$.dirty&12273&&E&&v!==H&&(il(et,v=H,v),tg(E,v,gu({type:"geojson",data:N,filter:ye,lineMetrics:Oe,generateId:_e,promoteId:be,cluster:!!Le,clusterMinPoints:Le==null?void 0:Le.minPoints,clusterMaxZoom:Le==null?void 0:Le.maxZoom,clusterRadius:Le==null?void 0:Le.radius,clusterProperties:Le==null?void 0:Le.properties}),it=>E&&it===v,()=>{v&&(_(11,at=E==null?void 0:E.getSource(v)),_(12,nt=!0))})),m.$$.dirty&8208&&(E==null||E.on("style.load",()=>{_(11,at=E==null?void 0:E.getSource(H))})),m.$$.dirty&6176&&at&&(nt?_(12,nt=!1):at.setData(N)),m.$$.dirty&3072&&(at==null||at.setClusterOptions(gu({cluster:!!Le,clusterMaxZoom:Le==null?void 0:Le.maxZoom,clusterRadius:Le==null?void 0:Le.radius})))},[v,Be,Ne,et,H,N,_e,be,ye,Oe,Le,at,nt,E,s,B]}class Mh extends Gr{constructor(f){super(),Zr(this,f,ng,rg,Sr,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function og(m,f,_){let v;const{map:E}=Ll();Qr(m,E,ye=>_(8,v=ye));let{position:k="top-left"}=f,{positionOptions:B=void 0}=f,{fitBoundsOptions:s=void 0}=f,{trackUserLocation:H=!1}=f,{showAccuracyCircle:N=!0}=f,{showUserLocation:_e=!0}=f,be=null;return ol(()=>{v!=null&&v.loaded()&&be&&v.removeControl(be)}),m.$$set=ye=>{"position"in ye&&_(1,k=ye.position),"positionOptions"in ye&&_(2,B=ye.positionOptions),"fitBoundsOptions"in ye&&_(3,s=ye.fitBoundsOptions),"trackUserLocation"in ye&&_(4,H=ye.trackUserLocation),"showAccuracyCircle"in ye&&_(5,N=ye.showAccuracyCircle),"showUserLocation"in ye&&_(6,_e=ye.showUserLocation)},m.$$.update=()=>{m.$$.dirty&510&&v&&!be&&(_(7,be=new is.GeolocateControl({positionOptions:B,fitBoundsOptions:s,trackUserLocation:H,showAccuracyCircle:N,showUserLocation:_e})),v.addControl(be,k))},[E,k,B,s,H,N,_e,be,v]}class sg extends Gr{constructor(f){super(),Zr(this,f,og,null,Sr,{position:1,positionOptions:2,fitBoundsOptions:3,trackUserLocation:4,showAccuracyCircle:5,showUserLocation:6})}}function ag(m){let f;const _=m[15].default,v=Ks(_,m,m[23],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&8388608)&&Ys(v,_,E,E[23],f?Js(_,E[23],k,null):Qs(E[23]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function lg(m){let f,_,v;function E(B){m[16](B)}let k={id:m[1],type:"line",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],minzoom:m[9],maxzoom:m[10],hoverCursor:m[11],manageHoverState:m[12],eventsIfTopMost:m[13],interactive:m[14],$$slots:{default:[ag]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),$s.push(()=>zc(f,"hovered",E)),f.$on("click",m[17]),f.$on("dblclick",m[18]),f.$on("contextmenu",m[19]),f.$on("mouseenter",m[20]),f.$on("mousemove",m[21]),f.$on("mouseleave",m[22]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.minzoom=B[9]),s&1024&&(H.maxzoom=B[10]),s&2048&&(H.hoverCursor=B[11]),s&4096&&(H.manageHoverState=B[12]),s&8192&&(H.eventsIfTopMost=B[13]),s&16384&&(H.interactive=B[14]),s&8388608&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],Pc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function cg(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Lc("line")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:N=void 0}=f,{paint:_e}=f,{layout:be=void 0}=f,{filter:ye=void 0}=f,{minzoom:Oe=void 0}=f,{maxzoom:Le=void 0}=f,{hoverCursor:Be=void 0}=f,{manageHoverState:Ne=!1}=f,{hovered:et=null}=f,{eventsIfTopMost:at=!1}=f,{interactive:nt=!0}=f;function it(Ae){et=Ae,_(0,et)}function Vt(Ae){pn.call(this,m,Ae)}function ei(Ae){pn.call(this,m,Ae)}function Ht(Ae){pn.call(this,m,Ae)}function Nt(Ae){pn.call(this,m,Ae)}function Jt(Ae){pn.call(this,m,Ae)}function At(Ae){pn.call(this,m,Ae)}return m.$$set=Ae=>{"id"in Ae&&_(1,k=Ae.id),"source"in Ae&&_(2,B=Ae.source),"sourceLayer"in Ae&&_(3,s=Ae.sourceLayer),"beforeId"in Ae&&_(4,H=Ae.beforeId),"beforeLayerType"in Ae&&_(5,N=Ae.beforeLayerType),"paint"in Ae&&_(6,_e=Ae.paint),"layout"in Ae&&_(7,be=Ae.layout),"filter"in Ae&&_(8,ye=Ae.filter),"minzoom"in Ae&&_(9,Oe=Ae.minzoom),"maxzoom"in Ae&&_(10,Le=Ae.maxzoom),"hoverCursor"in Ae&&_(11,Be=Ae.hoverCursor),"manageHoverState"in Ae&&_(12,Ne=Ae.manageHoverState),"hovered"in Ae&&_(0,et=Ae.hovered),"eventsIfTopMost"in Ae&&_(13,at=Ae.eventsIfTopMost),"interactive"in Ae&&_(14,nt=Ae.interactive),"$$scope"in Ae&&_(23,E=Ae.$$scope)},[et,k,B,s,H,N,_e,be,ye,Oe,Le,Be,Ne,at,nt,v,it,Vt,ei,Ht,Nt,Jt,At,E]}class Ah extends Gr{constructor(f){super(),Zr(this,f,cg,lg,Sr,{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 ug(m){let f=m.getCenter(),_=Math.round(m.getZoom()*100)/100,v=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),E=Math.pow(10,v),k=Math.round(f.lat*E)/E,B=Math.round(f.lng*E)/E,s=`${_}/${k}/${B}`,H=m.getBearing(),N=m.getPitch();return(H||N)&&(s+=`/${Math.round(H*10)/10}`),N&&(s+=`/${Math.round(N)}`),`#${s}`}function hg(m){return m.replace("#","").split("/").map(parseFloat)}var cu=kh;function kh(m,f){return m===f||m!==m&&f!==f?!0:typeof m!=typeof f||{}.toString.call(m)!={}.toString.call(f)||m!==Object(m)||!m?!1:Array.isArray(m)?Tp(m,f):{}.toString.call(m)=="[object Set]"?Tp(Array.from(m),Array.from(f)):{}.toString.call(m)=="[object Object]"?pg(m,f):dg(m,f)}function dg(m,f){return m.toString()===f.toString()}function Tp(m,f){var _=m.length;if(_!=f.length)return!1;for(var v=0;v<_;v++)if(!kh(m[v],f[v]))return!1;return!0}function pg(m,f){var _=Object.keys(m),v=_.length;if(v!=Object.keys(f).length)return!1;for(var E=0;E_(6,v=_e));let{position:k="top-left"}=f,{showCompass:B=!0}=f,{showZoom:s=!0}=f,{visualizePitch:H=!1}=f,N=null;return ol(()=>{v!=null&&v.loaded()&&N&&v.removeControl(N)}),m.$$set=_e=>{"position"in _e&&_(1,k=_e.position),"showCompass"in _e&&_(2,B=_e.showCompass),"showZoom"in _e&&_(3,s=_e.showZoom),"visualizePitch"in _e&&_(4,H=_e.visualizePitch)},m.$$.update=()=>{m.$$.dirty&126&&v&&!N&&(_(5,N=new is.NavigationControl({showCompass:B,showZoom:s,visualizePitch:H})),v.addControl(N,k))},[E,k,B,s,H,N,v]}class mg extends Gr{constructor(f){super(),Zr(this,f,fg,null,Sr,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function _g(m,f,_){let v;const{map:E}=Ll();Qr(m,E,N=>_(5,v=N));let{position:k="bottom-left"}=f,{maxWidth:B=void 0}=f,{unit:s="metric"}=f,H=null;return ol(()=>{v!=null&&v.loaded()&&H&&v.removeControl(H)}),m.$$set=N=>{"position"in N&&_(1,k=N.position),"maxWidth"in N&&_(2,B=N.maxWidth),"unit"in N&&_(3,s=N.unit)},m.$$.update=()=>{m.$$.dirty&62&&v&&!H&&(_(4,H=new is.ScaleControl({maxWidth:B,unit:s})),v.addControl(H,k))},[E,k,B,s,H,v]}class gg extends Gr{constructor(f){super(),Zr(this,f,_g,null,Sr,{position:1,maxWidth:2,unit:3})}}const yg=m=>({map:m[0]&8,loadedImages:m[0]&16,allImagesLoaded:m[0]&32}),Ip=m=>({map:m[3],loadedImages:m[4],allImagesLoaded:m[5]});function Ep(m){let f,_,v=m[2]&&Cp(m);const E=m[33].default,k=Ks(E,m,m[32],Ip);return{c(){v&&v.c(),f=Tn(),k&&k.c()},m(B,s){v&&v.m(B,s),hi(B,f,s),k&&k.m(B,s),_=!0},p(B,s){B[2]?v?(v.p(B,s),s[0]&4&&ft(v,1)):(v=Cp(B),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns()),k&&k.p&&(!_||s[0]&56|s[1]&2)&&Ys(k,E,B,B[32],_?Js(E,B[32],s,yg):Qs(B[32]),Ip)},i(B){_||(ft(v),ft(k,B),_=!0)},o(B){St(v),St(k,B),_=!1},d(B){B&&li(f),v&&v.d(B),k&&k.d(B)}}}function Cp(m){let f,_,v,E,k,B,s,H;return f=new mg({props:{position:m[6]}}),v=new sg({props:{position:m[6],fitBoundsOptions:{maxZoom:12}}}),k=new eg({props:{position:m[6]}}),s=new gg({props:{position:m[6]}}),{c(){Ri(f.$$.fragment),_=Tn(),Ri(v.$$.fragment),E=Tn(),Ri(k.$$.fragment),B=Tn(),Ri(s.$$.fragment)},m(N,_e){Ai(f,N,_e),hi(N,_,_e),Ai(v,N,_e),hi(N,E,_e),Ai(k,N,_e),hi(N,B,_e),Ai(s,N,_e),H=!0},p(N,_e){const be={};_e[0]&64&&(be.position=N[6]),f.$set(be);const ye={};_e[0]&64&&(ye.position=N[6]),v.$set(ye);const Oe={};_e[0]&64&&(Oe.position=N[6]),k.$set(Oe);const Le={};_e[0]&64&&(Le.position=N[6]),s.$set(Le)},i(N){H||(ft(f.$$.fragment,N),ft(v.$$.fragment,N),ft(k.$$.fragment,N),ft(s.$$.fragment,N),H=!0)},o(N){St(f.$$.fragment,N),St(v.$$.fragment,N),St(k.$$.fragment,N),St(s.$$.fragment,N),H=!1},d(N){N&&(li(_),li(E),li(B)),ki(f,N),ki(v,N),ki(k,N),ki(s,N)}}}function vg(m){let f,_,v,E,k,B=m[3]&&m[0]&&Ep(m);return{c(){f=Wt("div"),B&&B.c(),vs(f,"class",_=fp(m[1])+" svelte-p00lfq"),_p(f,"expand-map",!m[1])},m(s,H){hi(s,f,H),B&&B.m(f,null),v=!0,E||(k=p_(m[9].call(null,f)),E=!0)},p(s,H){s[3]&&s[0]?B?(B.p(s,H),H[0]&9&&ft(B,1)):(B=Ep(s),B.c(),ft(B,1),B.m(f,null)):B&&(rs(),St(B,1,1,()=>{B=null}),ns()),(!v||H[0]&2&&_!==(_=fp(s[1])+" svelte-p00lfq"))&&vs(f,"class",_),(!v||H[0]&2)&&_p(f,"expand-map",!s[1])},i(s){v||(ft(B),v=!0)},o(s){St(B),v=!1},d(s){s&&li(f),B&&B.d(),E=!1,k()}}}function xg(m,f,_){let v,E,k,B,{$$slots:s={},$$scope:H}=f,{map:N=null}=f,{class:_e=void 0}=f,{style:be}=f,{diffStyleUpdates:ye=!1}=f,{center:Oe=void 0}=f,{zoom:Le=void 0}=f,{pitch:Be=0}=f,{bearing:Ne=0}=f,{bounds:et=void 0}=f,{hash:at=!1}=f,{loaded:nt=!1}=f,{minZoom:it=0}=f,{maxZoom:Vt=22}=f,{zoomOnDoubleClick:ei=!0}=f,{interactive:Ht=!0}=f,{attributionControl:Nt=!0}=f,{preserveDrawingBuffer:Jt=!1}=f,{maxBounds:At=void 0}=f,{images:Ae=[]}=f,{standardControls:Ge=!1}=f,{filterLayers:Ui=void 0}=f,{transformRequest:Dt=void 0}=f;const qt=Ih(),{map:Lt,loadedImages:di}=R_();Qr(m,Lt,ze=>_(3,k=ze)),Qr(m,di,ze=>_(4,B=ze));let Pi=new Set;function $r(ze){k!=null&&k.loaded()&&("url"in ze?(Pi.add(ze.id),k.loadImage(ze.url,(Pt,He)=>{Pi.delete(ze.id),Pt?qt("error",Pt):He&&(k==null||k.addImage(ze.id,He,ze.options),B.add(ze.id),di.set(B))})):(k.addImage(ze.id,ze.data,ze.options),B.add(ze.id),di.set(B)))}let Nr,zi,Ti,Tt;function pi(ze){if(at){let Pt=hg(window.location.hash);Pt.length>=3&&(_(11,Le=Pt[0]),_(10,Oe=[Pt[2],Pt[1]])),Pt.length==5&&(_(15,Ne=Pt[3]),_(14,Be=Pt[4]))}return il(Lt,k=new is.Map(gu({container:ze,style:be,center:Oe,zoom:Le,pitch:Be,bearing:Ne,minZoom:it,maxZoom:Vt,interactive:Ht,preserveDrawingBuffer:Jt,maxBounds:At,bounds:et,attributionControl:Nt,transformRequest:Dt})),k),k.on("load",Pt=>{_(0,nt=!0),qt("load",k)}),k.on("error",Pt=>qt("error",{...Pt,map:k})),k.on("movestart",Pt=>qt("movestart",{...Pt,map:k})),k.on("moveend",Pt=>{if(_(10,Oe=Pt.target.getCenter()),_(11,Le=Pt.target.getZoom()),_(12,et=Pt.target.getBounds()),qt("moveend",{...Pt,map:k}),at){let He=window.location.href.replace(/(#.+)?$/,ug(k));window.history.replaceState(window.history.state,"",He)}}),k.on("zoomstart",Pt=>qt("zoomstart",{...Pt,map:k})),k.on("zoom",Pt=>{_(11,Le=Pt.target.getZoom()),qt("zoom",{...Pt,map:k})}),k.on("zoomend",Pt=>{_(11,Le=Pt.target.getZoom()),qt("zoomend",{...Pt,map:k})}),k.on("style.load",()=>{if(k){const Pt=k.getStyle();if(_(29,Nr=Pt.layers.map(He=>He.id)),_(30,zi=Object.keys(Pt.sources)),Tt)for(const[He,Zt]of Object.entries(Tt))k.addSource(He,Zt);if(Ti)for(const He of Ti)k.addLayer(He)}}),k.on("styledata",Pt=>{if(k&&Ui){const He=k.getStyle().layers;if(He)for(let Zt of He)Ui(Zt)||k.setLayoutProperty(Zt.id,"visibility","none")}qt("styledata",{...Pt,map:k})}),{destroy(){_(0,nt=!1),k==null||k.remove(),il(Lt,k=null,k)}}}let Oi=be;return m.$$set=ze=>{"map"in ze&&_(13,N=ze.map),"class"in ze&&_(1,_e=ze.class),"style"in ze&&_(16,be=ze.style),"diffStyleUpdates"in ze&&_(17,ye=ze.diffStyleUpdates),"center"in ze&&_(10,Oe=ze.center),"zoom"in ze&&_(11,Le=ze.zoom),"pitch"in ze&&_(14,Be=ze.pitch),"bearing"in ze&&_(15,Ne=ze.bearing),"bounds"in ze&&_(12,et=ze.bounds),"hash"in ze&&_(18,at=ze.hash),"loaded"in ze&&_(0,nt=ze.loaded),"minZoom"in ze&&_(19,it=ze.minZoom),"maxZoom"in ze&&_(20,Vt=ze.maxZoom),"zoomOnDoubleClick"in ze&&_(21,ei=ze.zoomOnDoubleClick),"interactive"in ze&&_(22,Ht=ze.interactive),"attributionControl"in ze&&_(23,Nt=ze.attributionControl),"preserveDrawingBuffer"in ze&&_(24,Jt=ze.preserveDrawingBuffer),"maxBounds"in ze&&_(25,At=ze.maxBounds),"images"in ze&&_(26,Ae=ze.images),"standardControls"in ze&&_(2,Ge=ze.standardControls),"filterLayers"in ze&&_(27,Ui=ze.filterLayers),"transformRequest"in ze&&_(28,Dt=ze.transformRequest),"$$scope"in ze&&_(32,H=ze.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&4&&_(6,v=typeof Ge=="boolean"?void 0:Ge),m.$$.dirty[0]&8&&_(13,N=k),m.$$.dirty[0]&67108873&&nt&&k!=null&&k.loaded())for(let ze of Ae)!Pi.has(ze.id)&&!k.hasImage(ze.id)&&$r(ze);if(m.$$.dirty[0]&67108880&&_(5,E=Ae.every(ze=>B.has(ze.id))),m.$$.dirty[0]&1610809352|m.$$.dirty[1]&1&&k&&!cu(be,Oi)){const ze=k.getStyle();if(Nr&&(Ti=ze.layers.filter(Pt=>!Nr.includes(Pt.id))),zi){const Pt=Object.keys(ze.sources).filter(He=>!zi.includes(He));Tt={};for(const He of Pt)Tt[He]=ze.sources[He]}_(31,Oi=be),k.setStyle(be,{diff:ye})}m.$$.dirty[0]&1032&&Oe&&!cu(Oe,k==null?void 0:k.getCenter())&&(k==null||k.panTo(Oe)),m.$$.dirty[0]&2056&&Le&&!cu(Le,k==null?void 0:k.getZoom())&&(k==null||k.zoomTo(Le)),m.$$.dirty[0]&4104&&et&&!cu(et,k==null?void 0:k.getBounds())&&(k==null||k.fitBounds(et)),m.$$.dirty[0]&2097160&&(ei?k==null||k.doubleClickZoom.enable():k==null||k.doubleClickZoom.disable())},[nt,_e,Ge,k,B,E,v,Lt,di,pi,Oe,Le,et,N,Be,Ne,be,ye,at,it,Vt,ei,Ht,Nt,Jt,At,Ae,Ui,Dt,Nr,zi,Oi,H,s]}class bg extends Gr{constructor(f){super(),Zr(this,f,xg,vg,Sr,{map:13,class:1,style:16,diffStyleUpdates:17,center:10,zoom:11,pitch:14,bearing:15,bounds:12,hash:18,loaded:0,minZoom:19,maxZoom:20,zoomOnDoubleClick:21,interactive:22,attributionControl:23,preserveDrawingBuffer:24,maxBounds:25,images:26,standardControls:2,filterLayers:27,transformRequest:28},null,[-1,-1])}}const wg=m=>({features:m[0]&16,data:m[0]&16,map:m[0]&4,close:m[0]&1}),Mp=m=>{var f;return{features:m[4],data:(f=m[4])==null?void 0:f[0],map:m[2],close:m[31]}};function Ap(m){let f,_,v=(m[4]||m[3]instanceof is.Marker)&&kp(m);return{c(){f=Wt("div"),v&&v.c()},m(E,k){hi(E,f,k),v&&v.m(f,null),m[32](f),_=!0},p(E,k){E[4]||E[3]instanceof is.Marker?v?(v.p(E,k),k[0]&24&&ft(v,1)):(v=kp(E),v.c(),ft(v,1),v.m(f,null)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&li(f),v&&v.d(),m[32](null)}}}function kp(m){let f;const _=m[30].default,v=Ks(_,m,m[29],Mp);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k[0]&536870933)&&Ys(v,_,E,E[29],f?Js(_,E[29],k,wg):Qs(E[29]),Mp)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function Sg(m){let f,_,v=m[9].default&&Ap(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),hi(E,f,k),_=!0},p(E,k){E[9].default?v?(v.p(E,k),k[0]&512&&ft(v,1)):(v=Ap(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&li(f),v&&v.d(E)}}}function Tg(m,f,_){let v,E,k,B,s,H,{$$slots:N={},$$scope:_e}=f;const be=d_(N);let{closeButton:ye=void 0}=f,{closeOnClickOutside:Oe=!0}=f,{closeOnClickInside:Le=!1}=f,{closeOnMove:Be=!1}=f,{openOn:Ne="click"}=f,{openIfTopMost:et=!0}=f,{focusAfterOpen:at=!0}=f,{anchor:nt=void 0}=f,{offset:it=void 0}=f,{popupClass:Vt=void 0}=f,{maxWidth:ei=void 0}=f,{lngLat:Ht=void 0}=f,{html:Nt=void 0}=f,{open:Jt=!1}=f;const{map:At,popupTarget:Ae,layerEvent:Ge,layer:Ui,eventTopMost:Dt}=Ll();Qr(m,At,Ue=>_(2,k=Ue)),Qr(m,Ae,Ue=>_(3,s=Ue)),Qr(m,Ge,Ue=>_(28,B=Ue)),Qr(m,Ui,Ue=>_(35,H=Ue));const qt=["click","dblclick","contextmenu"];let Lt,di=!1,Pi;function $r(){if(!Lt)return;let Ue=Lt.getElement();!Ue||Ue===Pi||(Pi=Ue,Ne==="hover"&&(Pi.style.pointerEvents="none"),Pi.addEventListener("mouseenter",()=>{_(24,di=!0)},{passive:!0}),Pi.addEventListener("mouseleave",()=>{_(24,di=!1)},{passive:!0}),Pi.addEventListener("click",()=>{Le&&_(0,Jt=!1)},{passive:!0}))}jp(()=>{if(k)return k.on("click",Zt),k.on("contextmenu",Zt),typeof s=="string"&&(k.on("click",s,Tt),k.on("dblclick",s,Tt),k.on("contextmenu",s,Tt),k.on("mousemove",s,He),k.on("mouseleave",s,Pt),k.on("touchstart",s,Oi),k.on("touchend",s,ze)),()=>{k!=null&&k.loaded()&&(Lt==null||Lt.remove(),k.off("click",Zt),k.off("contextmenu",Zt),s instanceof is.Marker?s.getPopup()===Lt&&s.setPopup(void 0):typeof s=="string"&&(k.off("click",s,Tt),k.off("dblclick",s,Tt),k.off("contextmenu",s,Tt),k.off("mousemove",s,He),k.off("mouseleave",s,Pt),k.off("touchstart",s,Oi),k.off("touchend",s,ze)))}});function Nr(Ue){return et?!("marker"in Ue)&&!N_(Ue)&&Dt(Ue)!==H:!1}let zi=null,Ti="normal";function Tt(Ue){Ue.type===Ne&&(Nr(Ue)||("layerType"in Ue?Ue.layerType==="deckgl"?(_(10,Ht=Ue.coordinate),_(4,zi=Ue.object?[Ue.object]:null)):(_(10,Ht=Ue.lngLat),_(4,zi=Ue.features??[])):(_(10,Ht=Ue.lngLat),_(4,zi=Ue.features??[])),setTimeout(()=>_(0,Jt=!0))))}let pi=null;function Oi(Ue){pi=Ue.point}function ze(Ue){if(!pi||Ne!=="hover")return;let Bi=pi.dist(Ue.point);pi=null,Bi<3&&(_(10,Ht=Ue.lngLat),_(4,zi=Ue.features??[]),Lt.isOpen()?_(25,Ti="justOpened"):(_(25,Ti="opening"),_(0,Jt=!0)))}function Pt(Ue){Ne!=="hover"||pi||Ti!=="normal"||(_(0,Jt=!1),_(4,zi=null))}function He(Ue){if(!(Ne!=="hover"||pi||Ti!=="normal")){if(Nr(Ue)){_(0,Jt=!1),_(4,zi=null);return}_(0,Jt=!0),_(4,zi=Ue.features??[]),_(10,Ht=Ue.lngLat)}}function Zt(Ue){if(Ti==="justOpened"){_(25,Ti="normal");return}if(!Oe)return;let Bi=[Pi,s instanceof is.Marker?s==null?void 0:s.getElement():null];Jt&&Lt.isOpen()&&!Bi.some(gr=>gr==null?void 0:gr.contains(Ue.originalEvent.target))&&(Ue.type==="contextmenu"&&Ne==="contextmenu"||Ue.type!=="contextmenu")&&_(0,Jt=!1)}let ct;const Zi=()=>_(0,Jt=!1);function _r(Ue){$s[Ue?"unshift":"push"](()=>{ct=Ue,_(1,ct)})}return m.$$set=Ue=>{"closeButton"in Ue&&_(11,ye=Ue.closeButton),"closeOnClickOutside"in Ue&&_(12,Oe=Ue.closeOnClickOutside),"closeOnClickInside"in Ue&&_(13,Le=Ue.closeOnClickInside),"closeOnMove"in Ue&&_(14,Be=Ue.closeOnMove),"openOn"in Ue&&_(15,Ne=Ue.openOn),"openIfTopMost"in Ue&&_(16,et=Ue.openIfTopMost),"focusAfterOpen"in Ue&&_(17,at=Ue.focusAfterOpen),"anchor"in Ue&&_(18,nt=Ue.anchor),"offset"in Ue&&_(19,it=Ue.offset),"popupClass"in Ue&&_(20,Vt=Ue.popupClass),"maxWidth"in Ue&&_(21,ei=Ue.maxWidth),"lngLat"in Ue&&_(10,Ht=Ue.lngLat),"html"in Ue&&_(22,Nt=Ue.html),"open"in Ue&&_(0,Jt=Ue.open),"$$scope"in Ue&&_(29,_e=Ue.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&14336&&_(27,v=ye??(!Oe&&!Le)),m.$$.dirty[0]&146685952&&(Lt||(_(23,Lt=new is.Popup({closeButton:v,closeOnClick:!1,closeOnMove:Be,focusAfterOpen:at,maxWidth:ei,className:Vt,anchor:nt,offset:it})),Pi=Lt.getElement(),Lt.on("open",()=>{_(0,Jt=!0),$r()}),Lt.on("close",Ue=>{_(0,Jt=!1)}))),m.$$.dirty[0]&8421384&&Lt&&s instanceof is.Marker&&(Ne==="click"?s.setPopup(Lt):s.getPopup()===Lt&&s.setPopup(void 0)),m.$$.dirty[0]&268468224&&qt.includes(Ne)&&(B==null?void 0:B.type)===Ne&&(Tt(B),il(Ge,B=null,B)),m.$$.dirty[0]&268468224&&_(26,E=Ne==="hover"&&((B==null?void 0:B.type)==="mousemove"||(B==null?void 0:B.type)==="mouseenter")),m.$$.dirty[0]&352354304&&Ne==="hover"&&Ge&&(E&&B&&(B.layerType==="deckgl"?(_(10,Ht=B.coordinate),_(4,zi=B.object?[B.object]:null)):(_(10,Ht=B.lngLat),_(4,zi=B.features??[]))),_(0,Jt=(E||di)??!1)),m.$$.dirty[0]&12582914&&(ct?Lt.setDOMContent(ct):Nt&&Lt.setHTML(Nt)),m.$$.dirty[0]&8389632&&Ht&&Lt.setLngLat(Ht),m.$$.dirty[0]&41943045&&k){let Ue=Lt.isOpen();Jt&&!Ue?(Lt.addTo(k),Ti==="opening"&&_(25,Ti="justOpened")):!Jt&&Ue&&Lt.remove()}},[Jt,ct,k,s,zi,At,Ae,Ge,Ui,be,Ht,ye,Oe,Le,Be,Ne,et,at,nt,it,Vt,ei,Nt,Lt,di,Ti,E,v,B,_e,N,Zi,_r]}class Ph extends Gr{constructor(f){super(),Zr(this,f,Tg,Sg,Sr,{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])}}var Dc=Uint8Array,rf=Uint16Array,Ig=Int32Array,Eg=new Dc([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]),Cg=new Dc([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]),nf=function(m,f){for(var _=new rf(31),v=0;v<31;++v)_[v]=f+=1<>1|(Fi&21845)<<1,Gs=(Gs&52428)>>2|(Gs&13107)<<2,Gs=(Gs&61680)>>4|(Gs&3855)<<4,kg[Fi]=((Gs&65280)>>8|(Gs&255)<<8)>>1;var Gs,Fi,xu=new Dc(288);for(Fi=0;Fi<144;++Fi)xu[Fi]=8;var Fi;for(Fi=144;Fi<256;++Fi)xu[Fi]=9;var Fi;for(Fi=256;Fi<280;++Fi)xu[Fi]=7;var Fi;for(Fi=280;Fi<288;++Fi)xu[Fi]=8;var Fi,Pg=new Dc(32);for(Fi=0;Fi<32;++Fi)Pg[Fi]=5;var Fi,zg=new Dc(0),Lg=typeof TextDecoder<"u"&&new TextDecoder,Dg=0;try{Lg.decode(zg,{stream:!0}),Dg=1}catch{}const Fg=m=>({}),Pp=m=>({}),Rg=m=>({}),zp=m=>({});function Og(m){let f,_,v,E;const k=m[1].left,B=Ks(k,m,m[0],zp),s=m[1].main,H=Ks(s,m,m[0],Pp);return{c(){f=Wt("div"),B&&B.c(),_=Tn(),v=Wt("div"),H&&H.c(),vs(f,"class","left svelte-6kzmjs"),vs(v,"class","main svelte-6kzmjs")},m(N,_e){hi(N,f,_e),B&&B.m(f,null),hi(N,_,_e),hi(N,v,_e),H&&H.m(v,null),E=!0},p(N,[_e]){B&&B.p&&(!E||_e&1)&&Ys(B,k,N,N[0],E?Js(k,N[0],_e,Rg):Qs(N[0]),zp),H&&H.p&&(!E||_e&1)&&Ys(H,s,N,N[0],E?Js(s,N[0],_e,Fg):Qs(N[0]),Pp)},i(N){E||(ft(B,N),ft(H,N),E=!0)},o(N){St(B,N),St(H,N),E=!1},d(N){N&&(li(f),li(_),li(v)),B&&B.d(N),H&&H.d(N)}}}function Bg(m,f,_){let{$$slots:v={},$$scope:E}=f;return m.$$set=k=>{"$$scope"in k&&_(0,E=k.$$scope)},[E,v]}class Ng extends Gr{constructor(f){super(),Zr(this,f,Bg,Og,Sr,{})}}function Lp(m){let f,_;return{c(){f=Wt("div"),_=nl(m[0]),vs(f,"class","svelte-1uuov7f")},m(v,E){hi(v,f,E),_i(f,_)},p(v,E){E&1&&yh(_,v[0])},d(v){v&&li(f)}}}function Vg(m){let f,_=m[0]&&Lp(m);return{c(){_&&_.c(),f=Oa()},m(v,E){_&&_.m(v,E),hi(v,f,E)},p(v,[E]){v[0]?_?_.p(v,E):(_=Lp(v),_.c(),_.m(f.parentNode,f)):_&&(_.d(1),_=null)},i:Mr,o:Mr,d(v){v&&li(f),_&&_.d(v)}}}function Ug(m,f,_){let{msg:v=null}=f;return m.$$set=E=>{"msg"in E&&_(0,v=E.msg)},[v]}class jg extends Gr{constructor(f){super(),Zr(this,f,Ug,Vg,Sr,{msg:0})}}var sf={exports:{}};(function(m,f){(function(_,v){m.exports=v()})(Al,function(){var _=function(g,I){var O={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},Y={on:function(se,fe,De){if(O[se]===void 0)throw new Error("Invalid event type: "+se);O[se].push({selector:fe,fn:De})},render:function(se){I.store.featureChanged(se)}},ne=function(se,fe){for(var De=O[se],Ve=De.length;Ve--;){var rt=De[Ve];if(rt.selector(fe)){rt.fn.call(Y,fe)||I.store.render(),I.ui.updateMapClasses();break}}};return g.start.call(Y),{render:g.render,stop:function(){g.stop&&g.stop()},trash:function(){g.trash&&(g.trash(),I.store.render())},combineFeatures:function(){g.combineFeatures&&g.combineFeatures()},uncombineFeatures:function(){g.uncombineFeatures&&g.uncombineFeatures()},drag:function(se){ne("drag",se)},click:function(se){ne("click",se)},mousemove:function(se){ne("mousemove",se)},mousedown:function(se){ne("mousedown",se)},mouseup:function(se){ne("mouseup",se)},mouseout:function(se){ne("mouseout",se)},keydown:function(se){ne("keydown",se)},keyup:function(se){ne("keyup",se)},touchstart:function(se){ne("touchstart",se)},touchmove:function(se){ne("touchmove",se)},touchend:function(se){ne("touchend",se)},tap:function(se){ne("tap",se)}}};function v(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}function E(g){if(g.__esModule)return g;var I=g.default;if(typeof I=="function"){var O=function Y(){if(this instanceof Y){var ne=[null];ne.push.apply(ne,arguments);var se=Function.bind.apply(I,ne);return new se}return I.apply(this,arguments)};O.prototype=I.prototype}else O={};return Object.defineProperty(O,"__esModule",{value:!0}),Object.keys(g).forEach(function(Y){var ne=Object.getOwnPropertyDescriptor(g,Y);Object.defineProperty(O,Y,ne.get?ne:{enumerable:!0,get:function(){return g[Y]}})}),O}var k={},B={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:63567523142e-4},s=B;function H(g){var I=0;if(g&&g.length>0){I+=Math.abs(N(g[0]));for(var O=1;O2){for(fe=0;fe=Math.pow(2,g)?zi(g,I):se};zi.rack=function(g,I,O){var Y=function(se){var fe=0;do{if(fe++>10){if(!O)throw new Error("too many ID collisions, use more bits");g+=O}var De=zi(g,I)}while(Object.hasOwnProperty.call(ne,De));return ne[De]=se,De},ne=Y.hats={};return Y.get=function(se){return Y.hats[se]},Y.set=function(se,fe){return Y.hats[se]=fe,Y},Y.bits=g||128,Y.base=I||16,Y};var Ti=v(Nr.exports),Tt=function(g,I){this.ctx=g,this.properties=I.properties||{},this.coordinates=I.geometry.coordinates,this.id=I.id||Ti(),this.type=I.geometry.type};Tt.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},Tt.prototype.incomingCoords=function(g){this.setCoordinates(g)},Tt.prototype.setCoordinates=function(g){this.coordinates=g,this.changed()},Tt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},Tt.prototype.setProperty=function(g,I){this.properties[g]=I},Tt.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:Be.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},Tt.prototype.internal=function(g){var I={id:this.id,meta:nt.FEATURE,"meta:type":this.type,active:it.INACTIVE,mode:g};if(this.ctx.options.userProperties)for(var O in this.properties)I["user_"+O]=this.properties[O];return{type:Be.FEATURE,properties:I,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var pi=function(g,I){Tt.call(this,g,I)};(pi.prototype=Object.create(Tt.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},pi.prototype.updateCoordinate=function(g,I,O){this.coordinates=arguments.length===3?[I,O]:[g,I],this.changed()},pi.prototype.getCoordinate=function(){return this.getCoordinates()};var Oi=function(g,I){Tt.call(this,g,I)};(Oi.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length>1},Oi.prototype.addCoordinate=function(g,I,O){this.changed();var Y=parseInt(g,10);this.coordinates.splice(Y,0,[I,O])},Oi.prototype.getCoordinate=function(g){var I=parseInt(g,10);return JSON.parse(JSON.stringify(this.coordinates[I]))},Oi.prototype.removeCoordinate=function(g){this.changed(),this.coordinates.splice(parseInt(g,10),1)},Oi.prototype.updateCoordinate=function(g,I,O){var Y=parseInt(g,10);this.coordinates[Y]=[I,O],this.changed()};var ze=function(g,I){Tt.call(this,g,I),this.coordinates=this.coordinates.map(function(O){return O.slice(0,-1)})};(ze.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(g){return g.length>2})},ze.prototype.incomingCoords=function(g){this.coordinates=g.map(function(I){return I.slice(0,-1)}),this.changed()},ze.prototype.setCoordinates=function(g){this.coordinates=g,this.changed()},ze.prototype.addCoordinate=function(g,I,O){this.changed();var Y=g.split(".").map(function(ne){return parseInt(ne,10)});this.coordinates[Y[0]].splice(Y[1],0,[I,O])},ze.prototype.removeCoordinate=function(g){this.changed();var I=g.split(".").map(function(Y){return parseInt(Y,10)}),O=this.coordinates[I[0]];O&&(O.splice(I[1],1),O.length<3&&this.coordinates.splice(I[0],1))},ze.prototype.getCoordinate=function(g){var I=g.split(".").map(function(Y){return parseInt(Y,10)}),O=this.coordinates[I[0]];return JSON.parse(JSON.stringify(O[I[1]]))},ze.prototype.getCoordinates=function(){return this.coordinates.map(function(g){return g.concat([g[0]])})},ze.prototype.updateCoordinate=function(g,I,O){this.changed();var Y=g.split("."),ne=parseInt(Y[0],10),se=parseInt(Y[1],10);this.coordinates[ne]===void 0&&(this.coordinates[ne]=[]),this.coordinates[ne][se]=[I,O]};var Pt={MultiPoint:pi,MultiLineString:Oi,MultiPolygon:ze},He=function(g,I,O,Y,ne){var se=O.split("."),fe=parseInt(se[0],10),De=se[1]?se.slice(1).join("."):null;return g[fe][I](De,Y,ne)},Zt=function(g,I){if(Tt.call(this,g,I),delete this.coordinates,this.model=Pt[I.geometry.type],this.model===void 0)throw new TypeError(I.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(I.geometry.coordinates)};function ct(g){this.map=g.map,this.drawConfig=JSON.parse(JSON.stringify(g.options||{})),this._ctx=g}(Zt.prototype=Object.create(Tt.prototype))._coordinatesToFeatures=function(g){var I=this,O=this.model.bind(this);return g.map(function(Y){return new O(I.ctx,{id:Ti(),type:Be.FEATURE,properties:{},geometry:{coordinates:Y,type:I.type.replace("Multi","")}})})},Zt.prototype.isValid=function(){return this.features.every(function(g){return g.isValid()})},Zt.prototype.setCoordinates=function(g){this.features=this._coordinatesToFeatures(g),this.changed()},Zt.prototype.getCoordinate=function(g){return He(this.features,"getCoordinate",g)},Zt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(g){return g.type===Be.POLYGON?g.getCoordinates():g.coordinates})))},Zt.prototype.updateCoordinate=function(g,I,O){He(this.features,"updateCoordinate",g,I,O),this.changed()},Zt.prototype.addCoordinate=function(g,I,O){He(this.features,"addCoordinate",g,I,O),this.changed()},Zt.prototype.removeCoordinate=function(g){He(this.features,"removeCoordinate",g),this.changed()},Zt.prototype.getFeatures=function(){return this.features},ct.prototype.setSelected=function(g){return this._ctx.store.setSelected(g)},ct.prototype.setSelectedCoordinates=function(g){var I=this;this._ctx.store.setSelectedCoordinates(g),g.reduce(function(O,Y){return O[Y.feature_id]===void 0&&(O[Y.feature_id]=!0,I._ctx.store.get(Y.feature_id).changed()),O},{})},ct.prototype.getSelected=function(){return this._ctx.store.getSelected()},ct.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},ct.prototype.isSelected=function(g){return this._ctx.store.isSelected(g)},ct.prototype.getFeature=function(g){return this._ctx.store.get(g)},ct.prototype.select=function(g){return this._ctx.store.select(g)},ct.prototype.deselect=function(g){return this._ctx.store.deselect(g)},ct.prototype.deleteFeature=function(g,I){return I===void 0&&(I={}),this._ctx.store.delete(g,I)},ct.prototype.addFeature=function(g){return this._ctx.store.add(g)},ct.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},ct.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},ct.prototype.setActionableState=function(g){g===void 0&&(g={});var I={trash:g.trash||!1,combineFeatures:g.combineFeatures||!1,uncombineFeatures:g.uncombineFeatures||!1};return this._ctx.events.actionable(I)},ct.prototype.changeMode=function(g,I,O){return I===void 0&&(I={}),O===void 0&&(O={}),this._ctx.events.changeMode(g,I,O)},ct.prototype.updateUIClasses=function(g){return this._ctx.ui.queueMapClasses(g)},ct.prototype.activateUIButton=function(g){return this._ctx.ui.setActiveButton(g)},ct.prototype.featuresAt=function(g,I,O){if(O===void 0&&(O="click"),O!=="click"&&O!=="touch")throw new Error("invalid buffer type");return Dt[O](g,I,this._ctx)},ct.prototype.newFeature=function(g){var I=g.geometry.type;return I===Be.POINT?new pi(this._ctx,g):I===Be.LINE_STRING?new Oi(this._ctx,g):I===Be.POLYGON?new ze(this._ctx,g):new Zt(this._ctx,g)},ct.prototype.isInstanceOf=function(g,I){if(g===Be.POINT)return I instanceof pi;if(g===Be.LINE_STRING)return I instanceof Oi;if(g===Be.POLYGON)return I instanceof ze;if(g==="MultiFeature")return I instanceof Zt;throw new Error("Unknown feature class: "+g)},ct.prototype.doRender=function(g){return this._ctx.store.featureChanged(g)},ct.prototype.onSetup=function(){},ct.prototype.onDrag=function(){},ct.prototype.onClick=function(){},ct.prototype.onMouseMove=function(){},ct.prototype.onMouseDown=function(){},ct.prototype.onMouseUp=function(){},ct.prototype.onMouseOut=function(){},ct.prototype.onKeyUp=function(){},ct.prototype.onKeyDown=function(){},ct.prototype.onTouchStart=function(){},ct.prototype.onTouchMove=function(){},ct.prototype.onTouchEnd=function(){},ct.prototype.onTap=function(){},ct.prototype.onStop=function(){},ct.prototype.onTrash=function(){},ct.prototype.onCombineFeature=function(){},ct.prototype.onUncombineFeature=function(){},ct.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var Zi={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},_r=Object.keys(Zi);function Ue(g){var I=Object.keys(g);return function(O,Y){Y===void 0&&(Y={});var ne={},se=I.reduce(function(fe,De){return fe[De]=g[De],fe},new ct(O));return{start:function(){var fe=this;ne=se.onSetup(Y),_r.forEach(function(De){var Ve,rt=Zi[De],ot=function(){return!1};g[rt]&&(ot=function(){return!0}),fe.on(De,ot,(Ve=rt,function(Je){return se[Ve](ne,Je)}))})},stop:function(){se.onStop(ne)},trash:function(){se.onTrash(ne)},combineFeatures:function(){se.onCombineFeatures(ne)},uncombineFeatures:function(){se.onUncombineFeatures(ne)},render:function(fe,De){se.toDisplayFeatures(ne,fe,De)}}}}function Bi(g){return[].concat(g).filter(function(I){return I!==void 0})}function gr(){var g=this;if(!(g.ctx.map&&g.ctx.map.getSource(ye.HOT)!==void 0))return Ve();var I=g.ctx.events.currentModeName();g.ctx.ui.queueMapClasses({mode:I});var O=[],Y=[];g.isDirty?Y=g.getAllIds():(O=g.getChangedIds().filter(function(rt){return g.get(rt)!==void 0}),Y=g.sources.hot.filter(function(rt){return rt.properties.id&&O.indexOf(rt.properties.id)===-1&&g.get(rt.properties.id)!==void 0}).map(function(rt){return rt.properties.id})),g.sources.hot=[];var ne=g.sources.cold.length;g.sources.cold=g.isDirty?[]:g.sources.cold.filter(function(rt){var ot=rt.properties.id||rt.properties.parent;return O.indexOf(ot)===-1});var se=ne!==g.sources.cold.length||Y.length>0;function fe(rt,ot){var Je=g.get(rt).internal(I);g.ctx.events.currentModeRender(Je,function(Rt){g.sources[ot].push(Rt)})}if(O.forEach(function(rt){return fe(rt,"hot")}),Y.forEach(function(rt){return fe(rt,"cold")}),se&&g.ctx.map.getSource(ye.COLD).setData({type:Be.FEATURE_COLLECTION,features:g.sources.cold}),g.ctx.map.getSource(ye.HOT).setData({type:Be.FEATURE_COLLECTION,features:g.sources.hot}),g._emitSelectionChange&&(g.ctx.map.fire(et.SELECTION_CHANGE,{features:g.getSelected().map(function(rt){return rt.toGeoJSON()}),points:g.getSelectedCoordinates().map(function(rt){return{type:Be.FEATURE,properties:{},geometry:{type:Be.POINT,coordinates:rt.coordinates}}})}),g._emitSelectionChange=!1),g._deletedFeaturesToEmit.length){var De=g._deletedFeaturesToEmit.map(function(rt){return rt.toGeoJSON()});g._deletedFeaturesToEmit=[],g.ctx.map.fire(et.DELETE,{features:De})}function Ve(){g.isDirty=!1,g.clearChangedIds()}Ve(),g.ctx.map.fire(et.RENDER,{})}function ci(g){var I,O=this;this._features={},this._featureIds=new Ge,this._selectedFeatureIds=new Ge,this._selectedCoordinates=[],this._changedFeatureIds=new Ge,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=g,this.sources={hot:[],cold:[]},this.render=function(){I||(I=requestAnimationFrame(function(){I=null,gr.call(O)}))},this.isDirty=!1}function co(g,I){var O=g._selectedCoordinates.filter(function(Y){return g._selectedFeatureIds.has(Y.feature_id)});g._selectedCoordinates.length===O.length||I.silent||(g._emitSelectionChange=!0),g._selectedCoordinates=O}ci.prototype.createRenderBatch=function(){var g=this,I=this.render,O=0;return this.render=function(){O++},function(){g.render=I,O>0&&g.render()}},ci.prototype.setDirty=function(){return this.isDirty=!0,this},ci.prototype.featureChanged=function(g){return this._changedFeatureIds.add(g),this},ci.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},ci.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},ci.prototype.getAllIds=function(){return this._featureIds.values()},ci.prototype.add=function(g){return this.featureChanged(g.id),this._features[g.id]=g,this._featureIds.add(g.id),this},ci.prototype.delete=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._featureIds.has(Y)&&(O._featureIds.delete(Y),O._selectedFeatureIds.delete(Y),I.silent||O._deletedFeaturesToEmit.indexOf(O._features[Y])===-1&&O._deletedFeaturesToEmit.push(O._features[Y]),delete O._features[Y],O.isDirty=!0)}),co(this,I),this},ci.prototype.get=function(g){return this._features[g]},ci.prototype.getAll=function(){var g=this;return Object.keys(this._features).map(function(I){return g._features[I]})},ci.prototype.select=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._selectedFeatureIds.has(Y)||(O._selectedFeatureIds.add(Y),O._changedFeatureIds.add(Y),I.silent||(O._emitSelectionChange=!0))}),this},ci.prototype.deselect=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._selectedFeatureIds.has(Y)&&(O._selectedFeatureIds.delete(Y),O._changedFeatureIds.add(Y),I.silent||(O._emitSelectionChange=!0))}),co(this,I),this},ci.prototype.clearSelected=function(g){return g===void 0&&(g={}),this.deselect(this._selectedFeatureIds.values(),{silent:g.silent}),this},ci.prototype.setSelected=function(g,I){var O=this;return I===void 0&&(I={}),g=Bi(g),this.deselect(this._selectedFeatureIds.values().filter(function(Y){return g.indexOf(Y)===-1}),{silent:I.silent}),this.select(g.filter(function(Y){return!O._selectedFeatureIds.has(Y)}),{silent:I.silent}),this},ci.prototype.setSelectedCoordinates=function(g){return this._selectedCoordinates=g,this._emitSelectionChange=!0,this},ci.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},ci.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},ci.prototype.getSelected=function(){var g=this;return this._selectedFeatureIds.values().map(function(I){return g.get(I)})},ci.prototype.getSelectedCoordinates=function(){var g=this;return this._selectedCoordinates.map(function(I){return{coordinates:g.get(I.feature_id).getCoordinate(I.coord_path)}})},ci.prototype.isSelected=function(g){return this._selectedFeatureIds.has(g)},ci.prototype.setFeatureProperty=function(g,I,O){this.get(g).setProperty(I,O),this.featureChanged(g)},ci.prototype.storeMapConfig=function(){var g=this;Vt.forEach(function(I){g.ctx.map[I]&&(g._mapInitialConfig[I]=g.ctx.map[I].isEnabled())})},ci.prototype.restoreMapConfig=function(){var g=this;Object.keys(this._mapInitialConfig).forEach(function(I){g._mapInitialConfig[I]?g.ctx.map[I].enable():g.ctx.map[I].disable()})},ci.prototype.getInitialConfigValue=function(g){return this._mapInitialConfig[g]===void 0||this._mapInitialConfig[g]};var wo=function(){for(var g=arguments,I={},O=0;O=48&&ke<=57)};function Ot(ke,_t,yi){yi===void 0&&(yi={}),Rt.stop();var Xi=De[ke];if(Xi===void 0)throw new Error(ke+" is not valid");Je=ke;var tr=Xi(fe,_t);Rt=_(tr,fe),yi.silent||fe.map.fire(et.MODE_CHANGE,{mode:ke}),fe.store.setDirty(),fe.store.render()}ot.keydown=function(ke){(ke.srcElement||ke.target).classList.contains("mapboxgl-canvas")&&(ke.keyCode!==8&&ke.keyCode!==46||!fe.options.controls.trash?Hi(ke.keyCode)?Rt.keydown(ke):ke.keyCode===49&&fe.options.controls.point?Ot(Ne.DRAW_POINT):ke.keyCode===50&&fe.options.controls.line_string?Ot(Ne.DRAW_LINE_STRING):ke.keyCode===51&&fe.options.controls.polygon&&Ot(Ne.DRAW_POLYGON):(ke.preventDefault(),Rt.trash()))},ot.keyup=function(ke){Hi(ke.keyCode)&&Rt.keyup(ke)},ot.zoomend=function(){fe.store.changeZoom()},ot.data=function(ke){if(ke.dataType==="style"){var _t=fe.setup,yi=fe.map,Xi=fe.options,tr=fe.store;Xi.styles.some(function(rn){return yi.getLayer(rn.id)})||(_t.addLayers(),tr.setDirty(),tr.render())}};var ar={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){Je=fe.options.defaultMode,Rt=_(De[Je](fe),fe)},changeMode:Ot,actionable:function(ke){var _t=!1;Object.keys(ke).forEach(function(yi){if(ar[yi]===void 0)throw new Error("Invalid action type");ar[yi]!==ke[yi]&&(_t=!0),ar[yi]=ke[yi]}),_t&&fe.map.fire(et.ACTIONABLE,{actions:ar})},currentModeName:function(){return Je},currentModeRender:function(ke,_t){return Rt.render(ke,_t)},fire:function(ke,_t){ot[ke]&&ot[ke](_t)},addEventListeners:function(){fe.map.on("mousemove",ot.mousemove),fe.map.on("mousedown",ot.mousedown),fe.map.on("mouseup",ot.mouseup),fe.map.on("data",ot.data),fe.map.on("touchmove",ot.touchmove),fe.map.on("touchstart",ot.touchstart),fe.map.on("touchend",ot.touchend),fe.container.addEventListener("mouseout",ot.mouseout),fe.options.keybindings&&(fe.container.addEventListener("keydown",ot.keydown),fe.container.addEventListener("keyup",ot.keyup))},removeEventListeners:function(){fe.map.off("mousemove",ot.mousemove),fe.map.off("mousedown",ot.mousedown),fe.map.off("mouseup",ot.mouseup),fe.map.off("data",ot.data),fe.map.off("touchmove",ot.touchmove),fe.map.off("touchstart",ot.touchstart),fe.map.off("touchend",ot.touchend),fe.container.removeEventListener("mouseout",ot.mouseout),fe.options.keybindings&&(fe.container.removeEventListener("keydown",ot.keydown),fe.container.removeEventListener("keyup",ot.keyup))},trash:function(ke){Rt.trash(ke)},combineFeatures:function(){Rt.combineFeatures()},uncombineFeatures:function(){Rt.uncombineFeatures()},getMode:function(){return Je}}}(g),g.ui=function(fe){var De={},Ve=null,rt={mode:null,feature:null,mouse:null},ot={mode:null,feature:null,mouse:null};function Je(ke){ot=Se(ot,ke)}function Rt(){var ke,_t;if(fe.container){var yi=[],Xi=[];en.forEach(function(tr){ot[tr]!==rt[tr]&&(yi.push(tr+"-"+rt[tr]),ot[tr]!==null&&Xi.push(tr+"-"+ot[tr]))}),yi.length>0&&(ke=fe.container.classList).remove.apply(ke,yi),Xi.length>0&&(_t=fe.container.classList).add.apply(_t,Xi),rt=Se(rt,ot)}}function Hi(ke,_t){_t===void 0&&(_t={});var yi=document.createElement("button");return yi.className=be.CONTROL_BUTTON+" "+_t.className,yi.setAttribute("title",_t.title),_t.container.appendChild(yi),yi.addEventListener("click",function(Xi){if(Xi.preventDefault(),Xi.stopPropagation(),Xi.target===Ve)return Ot(),void _t.onDeactivate();ar(ke),_t.onActivate()},!0),yi}function Ot(){Ve&&(Ve.classList.remove(be.ACTIVE_BUTTON),Ve=null)}function ar(ke){Ot();var _t=De[ke];_t&&_t&&ke!=="trash"&&(_t.classList.add(be.ACTIVE_BUTTON),Ve=_t)}return{setActiveButton:ar,queueMapClasses:Je,updateMapClasses:Rt,clearMapClasses:function(){Je({mode:null,feature:null,mouse:null}),Rt()},addButtons:function(){var ke=fe.options.controls,_t=document.createElement("div");return _t.className=be.CONTROL_GROUP+" "+be.CONTROL_BASE,ke&&(ke[Le.LINE]&&(De[Le.LINE]=Hi(Le.LINE,{container:_t,className:be.CONTROL_BUTTON_LINE,title:"LineString tool "+(fe.options.keybindings?"(l)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_LINE_STRING)},onDeactivate:function(){return fe.events.trash()}})),ke[Le.POLYGON]&&(De[Le.POLYGON]=Hi(Le.POLYGON,{container:_t,className:be.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(fe.options.keybindings?"(p)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_POLYGON)},onDeactivate:function(){return fe.events.trash()}})),ke[Le.POINT]&&(De[Le.POINT]=Hi(Le.POINT,{container:_t,className:be.CONTROL_BUTTON_POINT,title:"Marker tool "+(fe.options.keybindings?"(m)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_POINT)},onDeactivate:function(){return fe.events.trash()}})),ke.trash&&(De.trash=Hi("trash",{container:_t,className:be.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:function(){fe.events.trash()}})),ke.combine_features&&(De.combine_features=Hi("combineFeatures",{container:_t,className:be.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:function(){fe.events.combineFeatures()}})),ke.uncombine_features&&(De.uncombine_features=Hi("uncombineFeatures",{container:_t,className:be.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:function(){fe.events.uncombineFeatures()}}))),_t},removeButtons:function(){Object.keys(De).forEach(function(ke){var _t=De[ke];_t.parentNode&&_t.parentNode.removeChild(_t),delete De[ke]})}}}(g),g.container=ne.getContainer(),g.store=new ci(g),I=g.ui.addButtons(),g.options.boxSelect&&(g.boxZoomInitial=ne.boxZoom.isEnabled(),ne.boxZoom.disable(),ne.dragPan.disable(),ne.dragPan.enable()),ne.loaded()?Y.connect():(ne.on("load",Y.connect),O=setInterval(function(){ne.loaded()&&Y.connect()},16)),g.events.start(),I},addLayers:function(){g.map.addSource(ye.COLD,{data:{type:Be.FEATURE_COLLECTION,features:[]},type:"geojson"}),g.map.addSource(ye.HOT,{data:{type:Be.FEATURE_COLLECTION,features:[]},type:"geojson"}),g.options.styles.forEach(function(ne){g.map.addLayer(ne)}),g.store.setDirty(!0),g.store.render()},removeLayers:function(){g.options.styles.forEach(function(ne){g.map.getLayer(ne.id)&&g.map.removeLayer(ne.id)}),g.map.getSource(ye.COLD)&&g.map.removeSource(ye.COLD),g.map.getSource(ye.HOT)&&g.map.removeSource(ye.HOT)}};return g.setup=Y,Y}var Ii=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}];function ti(g){return function(I){var O=I.featureTarget;return!!O&&!!O.properties&&O.properties.meta===g}}function Vn(g){return!!g.originalEvent&&!!g.originalEvent.shiftKey&&g.originalEvent.button===0}function En(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.active===it.ACTIVE&&g.featureTarget.properties.meta===nt.FEATURE}function Un(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.active===it.INACTIVE&&g.featureTarget.properties.meta===nt.FEATURE}function qo(g){return g.featureTarget===void 0}function So(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.meta===nt.FEATURE}function Cn(g){var I=g.featureTarget;return!!I&&!!I.properties&&I.properties.meta===nt.VERTEX}function $n(g){return!!g.originalEvent&&g.originalEvent.shiftKey===!0}function qe(g){return g.keyCode===27}function fn(g){return g.keyCode===13}var er=Object.freeze({__proto__:null,isOfMetaType:ti,isShiftMousedown:Vn,isActiveFeature:En,isInactiveFeature:Un,noTarget:qo,isFeature:So,isVertex:Cn,isShiftDown:$n,isEscapeKey:qe,isEnterKey:fn,isTrue:function(){return!0}}),Zo=tn;function tn(g,I){this.x=g,this.y=I}tn.prototype={clone:function(){return new tn(this.x,this.y)},add:function(g){return this.clone()._add(g)},sub:function(g){return this.clone()._sub(g)},multByPoint:function(g){return this.clone()._multByPoint(g)},divByPoint:function(g){return this.clone()._divByPoint(g)},mult:function(g){return this.clone()._mult(g)},div:function(g){return this.clone()._div(g)},rotate:function(g){return this.clone()._rotate(g)},rotateAround:function(g,I){return this.clone()._rotateAround(g,I)},matMult:function(g){return this.clone()._matMult(g)},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(g){return this.x===g.x&&this.y===g.y},dist:function(g){return Math.sqrt(this.distSqr(g))},distSqr:function(g){var I=g.x-this.x,O=g.y-this.y;return I*I+O*O},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(g){return Math.atan2(this.y-g.y,this.x-g.x)},angleWith:function(g){return this.angleWithSep(g.x,g.y)},angleWithSep:function(g,I){return Math.atan2(this.x*I-this.y*g,this.x*g+this.y*I)},_matMult:function(g){var I=g[0]*this.x+g[1]*this.y,O=g[2]*this.x+g[3]*this.y;return this.x=I,this.y=O,this},_add:function(g){return this.x+=g.x,this.y+=g.y,this},_sub:function(g){return this.x-=g.x,this.y-=g.y,this},_mult:function(g){return this.x*=g,this.y*=g,this},_div:function(g){return this.x/=g,this.y/=g,this},_multByPoint:function(g){return this.x*=g.x,this.y*=g.y,this},_divByPoint:function(g){return this.x/=g.x,this.y/=g.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var g=this.y;return this.y=this.x,this.x=-g,this},_rotate:function(g){var I=Math.cos(g),O=Math.sin(g),Y=I*this.x-O*this.y,ne=O*this.x+I*this.y;return this.x=Y,this.y=ne,this},_rotateAround:function(g,I){var O=Math.cos(g),Y=Math.sin(g),ne=I.x+O*(this.x-I.x)-Y*(this.y-I.y),se=I.y+Y*(this.x-I.x)+O*(this.y-I.y);return this.x=ne,this.y=se,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},tn.convert=function(g){return g instanceof tn?g:Array.isArray(g)?new tn(g[0],g[1]):g};var We=v(Zo);function Bt(g,I){var O=I.getBoundingClientRect();return new We(g.clientX-O.left-(I.clientLeft||0),g.clientY-O.top-(I.clientTop||0))}function Mt(g,I,O,Y){return{type:Be.FEATURE,properties:{meta:nt.VERTEX,parent:g,coord_path:O,active:Y?it.ACTIVE:it.INACTIVE},geometry:{type:Be.POINT,coordinates:I}}}function Vr(g,I,O){var Y=I.geometry.coordinates,ne=O.geometry.coordinates;if(Y[1]>85||Y[1]85||ne[1]=I&&this._bbox[3]>=O},Ut.prototype.intersect=function(g){return this._valid?(I=g instanceof Ut?g.bbox():g,!(this._bbox[0]>I[2]||this._bbox[2]I[3])):null;var I},Ut.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var g="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",g)},Ut.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var si=function(g){if(!g)return[];var I=Q(J(g)),O=[];return I.features.forEach(function(Y){Y.geometry&&(O=O.concat(he(Y.geometry.coordinates)))}),O},ii=Ft,Ur=mi,Ei={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},ur=Object.keys(Ei);function yr(g){for(var I=Ur(),O=si(g),Y=0;YO&&(O=Je),Rtne&&(ne=Rt),JeDe&&(De=Ot)});var Ve=I;return O+Ve.lat>85&&(Ve.lat=85-O),ne+Ve.lat>90&&(Ve.lat=90-ne),Y+Ve.lat<-85&&(Ve.lat=-85-Y),se+Ve.lat=270&&(Ve.lng-=360*Math.ceil(Math.abs(Ve.lng)/360)),Ve}function Io(g,I){var O=To(g.map(function(Y){return Y.toGeoJSON()}),I);g.forEach(function(Y){var ne,se=Y.getCoordinates(),fe=function(Ve){var rt={lng:Ve[0]+O.lng,lat:Ve[1]+O.lat};return[rt.lng,rt.lat]},De=function(Ve){return Ve.map(function(rt){return fe(rt)})};Y.type===Be.POINT?ne=fe(se):Y.type===Be.LINE_STRING||Y.type===Be.MULTI_POINT?ne=se.map(fe):Y.type===Be.POLYGON||Y.type===Be.MULTI_LINE_STRING?ne=se.map(De):Y.type===Be.MULTI_POLYGON&&(ne=se.map(function(Ve){return Ve.map(function(rt){return De(rt)})})),Y.incomingCoords(ne)})}var vr={onSetup:function(g){var I=this,O={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:g.featureIds||[]};return this.setSelected(O.initiallySelectedFeatureIds.filter(function(Y){return I.getFeature(Y)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),O},fireUpdate:function(){this.map.fire(et.UPDATE,{action:at.MOVE,features:this.getSelected().map(function(g){return g.toGeoJSON()})})},fireActionable:function(){var g=this,I=this.getSelected(),O=I.filter(function(De){return g.isInstanceOf("MultiFeature",De)}),Y=!1;if(I.length>1){Y=!0;var ne=I[0].type.replace("Multi","");I.forEach(function(De){De.type.replace("Multi","")!==ne&&(Y=!1)})}var se=O.length>0,fe=I.length>0;this.setActionableState({combineFeatures:Y,uncombineFeatures:se,trash:fe})},getUniqueIds:function(g){return g.length?g.map(function(I){return I.properties.id}).filter(function(I){return I!==void 0}).reduce(function(I,O){return I.add(O),I},new Ge).values():[]},stopExtendedInteractions:function(g){g.boxSelectElement&&(g.boxSelectElement.parentNode&&g.boxSelectElement.parentNode.removeChild(g.boxSelectElement),g.boxSelectElement=null),this.map.dragPan.enable(),g.boxSelecting=!1,g.canBoxSelect=!1,g.dragMoving=!1,g.canDragMove=!1},onStop:function(){It.enable(this)},onMouseMove:function(g,I){return So(I)&&g.dragMoving&&this.fireUpdate(),this.stopExtendedInteractions(g),!0},onMouseOut:function(g){return!g.dragMoving||this.fireUpdate()}};vr.onTap=vr.onClick=function(g,I){return qo(I)?this.clickAnywhere(g,I):ti(nt.VERTEX)(I)?this.clickOnVertex(g,I):So(I)?this.clickOnFeature(g,I):void 0},vr.clickAnywhere=function(g){var I=this,O=this.getSelectedIds();O.length&&(this.clearSelectedFeatures(),O.forEach(function(Y){return I.doRender(Y)})),It.enable(this),this.stopExtendedInteractions(g)},vr.clickOnVertex=function(g,I){this.changeMode(Ne.DIRECT_SELECT,{featureId:I.featureTarget.properties.parent,coordPath:I.featureTarget.properties.coord_path,startPos:I.lngLat}),this.updateUIClasses({mouse:Oe.MOVE})},vr.startOnActiveFeature=function(g,I){this.stopExtendedInteractions(g),this.map.dragPan.disable(),this.doRender(I.featureTarget.properties.id),g.canDragMove=!0,g.dragMoveLocation=I.lngLat},vr.clickOnFeature=function(g,I){var O=this;It.disable(this),this.stopExtendedInteractions(g);var Y=$n(I),ne=this.getSelectedIds(),se=I.featureTarget.properties.id,fe=this.isSelected(se);if(!Y&&fe&&this.getFeature(se).type!==Be.POINT)return this.changeMode(Ne.DIRECT_SELECT,{featureId:se});fe&&Y?(this.deselect(se),this.updateUIClasses({mouse:Oe.POINTER}),ne.length===1&&It.enable(this)):!fe&&Y?(this.select(se),this.updateUIClasses({mouse:Oe.MOVE})):fe||Y||(ne.forEach(function(De){return O.doRender(De)}),this.setSelected(se),this.updateUIClasses({mouse:Oe.MOVE})),this.doRender(se)},vr.onMouseDown=function(g,I){return En(I)?this.startOnActiveFeature(g,I):this.drawConfig.boxSelect&&Vn(I)?this.startBoxSelect(g,I):void 0},vr.startBoxSelect=function(g,I){this.stopExtendedInteractions(g),this.map.dragPan.disable(),g.boxSelectStartLocation=Bt(I.originalEvent,this.map.getContainer()),g.canBoxSelect=!0},vr.onTouchStart=function(g,I){if(En(I))return this.startOnActiveFeature(g,I)},vr.onDrag=function(g,I){return g.canDragMove?this.dragMove(g,I):this.drawConfig.boxSelect&&g.canBoxSelect?this.whileBoxSelect(g,I):void 0},vr.whileBoxSelect=function(g,I){g.boxSelecting=!0,this.updateUIClasses({mouse:Oe.ADD}),g.boxSelectElement||(g.boxSelectElement=document.createElement("div"),g.boxSelectElement.classList.add(be.BOX_SELECT),this.map.getContainer().appendChild(g.boxSelectElement));var O=Bt(I.originalEvent,this.map.getContainer()),Y=Math.min(g.boxSelectStartLocation.x,O.x),ne=Math.max(g.boxSelectStartLocation.x,O.x),se=Math.min(g.boxSelectStartLocation.y,O.y),fe=Math.max(g.boxSelectStartLocation.y,O.y),De="translate("+Y+"px, "+se+"px)";g.boxSelectElement.style.transform=De,g.boxSelectElement.style.WebkitTransform=De,g.boxSelectElement.style.width=ne-Y+"px",g.boxSelectElement.style.height=fe-se+"px"},vr.dragMove=function(g,I){g.dragMoving=!0,I.originalEvent.stopPropagation();var O={lng:I.lngLat.lng-g.dragMoveLocation.lng,lat:I.lngLat.lat-g.dragMoveLocation.lat};Io(this.getSelected(),O),g.dragMoveLocation=I.lngLat},vr.onTouchEnd=vr.onMouseUp=function(g,I){var O=this;if(g.dragMoving)this.fireUpdate();else if(g.boxSelecting){var Y=[g.boxSelectStartLocation,Bt(I.originalEvent,this.map.getContainer())],ne=this.featuresAt(null,Y,"click"),se=this.getUniqueIds(ne).filter(function(fe){return!O.isSelected(fe)});se.length&&(this.select(se),se.forEach(function(fe){return O.doRender(fe)}),this.updateUIClasses({mouse:Oe.MOVE}))}this.stopExtendedInteractions(g)},vr.toDisplayFeatures=function(g,I,O){I.properties.active=this.isSelected(I.properties.id)?it.ACTIVE:it.INACTIVE,O(I),this.fireActionable(),I.properties.active===it.ACTIVE&&I.geometry.type!==Be.POINT&&mn(I).forEach(O)},vr.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},vr.onCombineFeatures=function(){var g=this.getSelected();if(!(g.length===0||g.length<2)){for(var I=[],O=[],Y=g[0].type.replace("Multi",""),ne=0;ne1){var fe=this.newFeature({type:Be.FEATURE,properties:O[0].properties,geometry:{type:"Multi"+Y,coordinates:I}});this.addFeature(fe),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([fe.id]),this.map.fire(et.COMBINE_FEATURES,{createdFeatures:[fe.toGeoJSON()],deletedFeatures:O})}this.fireActionable()}},vr.onUncombineFeatures=function(){var g=this,I=this.getSelected();if(I.length!==0){for(var O=[],Y=[],ne=function(fe){var De=I[fe];g.isInstanceOf("MultiFeature",De)&&(De.getFeatures().forEach(function(Ve){g.addFeature(Ve),Ve.properties=De.properties,O.push(Ve.toGeoJSON()),g.select([Ve.id])}),g.deleteFeature(De.id,{silent:!0}),Y.push(De.toGeoJSON()))},se=0;se1&&this.map.fire(et.UNCOMBINE_FEATURES,{createdFeatures:O,deletedFeatures:Y}),this.fireActionable()}};var gi=ti(nt.VERTEX),ea=ti(nt.MIDPOINT),jn={fireUpdate:function(){this.map.fire(et.UPDATE,{action:at.CHANGE_COORDINATES,features:this.getSelected().map(function(g){return g.toGeoJSON()})})},fireActionable:function(g){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:g.selectedCoordPaths.length>0})},startDragging:function(g,I){this.map.dragPan.disable(),g.canDragMove=!0,g.dragMoveLocation=I.lngLat},stopDragging:function(g){this.map.dragPan.enable(),g.dragMoving=!1,g.canDragMove=!1,g.dragMoveLocation=null},onVertex:function(g,I){this.startDragging(g,I);var O=I.featureTarget.properties,Y=g.selectedCoordPaths.indexOf(O.coord_path);$n(I)||Y!==-1?$n(I)&&Y===-1&&g.selectedCoordPaths.push(O.coord_path):g.selectedCoordPaths=[O.coord_path];var ne=this.pathsToCoordinates(g.featureId,g.selectedCoordPaths);this.setSelectedCoordinates(ne)},onMidpoint:function(g,I){this.startDragging(g,I);var O=I.featureTarget.properties;g.feature.addCoordinate(O.coord_path,O.lng,O.lat),this.fireUpdate(),g.selectedCoordPaths=[O.coord_path]},pathsToCoordinates:function(g,I){return I.map(function(O){return{feature_id:g,coord_path:O}})},onFeature:function(g,I){g.selectedCoordPaths.length===0?this.startDragging(g,I):this.stopDragging(g)},dragFeature:function(g,I,O){Io(this.getSelected(),O),g.dragMoveLocation=I.lngLat},dragVertex:function(g,I,O){for(var Y=g.selectedCoordPaths.map(function(De){return g.feature.getCoordinate(De)}),ne=To(Y.map(function(De){return{type:Be.FEATURE,properties:{},geometry:{type:Be.POINT,coordinates:De}}}),O),se=0;se0?this.dragVertex(g,I,O):this.dragFeature(g,I,O),g.dragMoveLocation=I.lngLat}},jn.onClick=function(g,I){return qo(I)?this.clickNoTarget(g,I):En(I)?this.clickActiveFeature(g,I):Un(I)?this.clickInactive(g,I):void this.stopDragging(g)},jn.onTap=function(g,I){return qo(I)?this.clickNoTarget(g,I):En(I)?this.clickActiveFeature(g,I):Un(I)?this.clickInactive(g,I):void 0},jn.onTouchEnd=jn.onMouseUp=function(g){g.dragMoving&&this.fireUpdate(),this.stopDragging(g)};var ji={};function jr(g,I){return!!g.lngLat&&g.lngLat.lng===I[0]&&g.lngLat.lat===I[1]}ji.onSetup=function(){var g=this.newFeature({type:Be.FEATURE,properties:{},geometry:{type:Be.POINT,coordinates:[]}});return this.addFeature(g),this.clearSelectedFeatures(),this.updateUIClasses({mouse:Oe.ADD}),this.activateUIButton(Le.POINT),this.setActionableState({trash:!0}),{point:g}},ji.stopDrawingAndRemove=function(g){this.deleteFeature([g.point.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)},ji.onTap=ji.onClick=function(g,I){this.updateUIClasses({mouse:Oe.MOVE}),g.point.updateCoordinate("",I.lngLat.lng,I.lngLat.lat),this.map.fire(et.CREATE,{features:[g.point.toGeoJSON()]}),this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.point.id]})},ji.onStop=function(g){this.activateUIButton(),g.point.getCoordinate().length||this.deleteFeature([g.point.id],{silent:!0})},ji.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.point.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I)},ji.onTrash=ji.stopDrawingAndRemove,ji.onKeyUp=function(g,I){if(qe(I)||fn(I))return this.stopDrawingAndRemove(g,I)};var Go={onSetup:function(){var g=this.newFeature({type:Be.FEATURE,properties:{},geometry:{type:Be.POLYGON,coordinates:[[]]}});return this.addFeature(g),this.clearSelectedFeatures(),It.disable(this),this.updateUIClasses({mouse:Oe.ADD}),this.activateUIButton(Le.POLYGON),this.setActionableState({trash:!0}),{polygon:g,currentVertexPosition:0}},clickAnywhere:function(g,I){if(g.currentVertexPosition>0&&jr(I,g.polygon.coordinates[0][g.currentVertexPosition-1]))return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]});this.updateUIClasses({mouse:Oe.ADD}),g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),g.currentVertexPosition++,g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat)},clickOnVertex:function(g){return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]})},onMouseMove:function(g,I){g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),Cn(I)&&this.updateUIClasses({mouse:Oe.POINTER})}};Go.onTap=Go.onClick=function(g,I){return Cn(I)?this.clickOnVertex(g,I):this.clickAnywhere(g,I)},Go.onKeyUp=function(g,I){qe(I)?(this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)):fn(I)&&this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]})},Go.onStop=function(g){this.updateUIClasses({mouse:Oe.NONE}),It.enable(this),this.activateUIButton(),this.getFeature(g.polygon.id)!==void 0&&(g.polygon.removeCoordinate("0."+g.currentVertexPosition),g.polygon.isValid()?this.map.fire(et.CREATE,{features:[g.polygon.toGeoJSON()]}):(this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT,{},{silent:!0})))},Go.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.polygon.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I);if(I.geometry.coordinates.length!==0){var ne=I.geometry.coordinates[0].length;if(!(ne<3)){if(I.properties.meta=nt.FEATURE,O(Mt(g.polygon.id,I.geometry.coordinates[0][0],"0.0",!1)),ne>3){var se=I.geometry.coordinates[0].length-3;O(Mt(g.polygon.id,I.geometry.coordinates[0][se],"0."+se,!1))}if(ne<=4){var fe=[[I.geometry.coordinates[0][0][0],I.geometry.coordinates[0][0][1]],[I.geometry.coordinates[0][1][0],I.geometry.coordinates[0][1][1]]];if(O({type:Be.FEATURE,properties:I.properties,geometry:{coordinates:fe,type:Be.LINE_STRING}}),ne===3)return}return O(I)}}},Go.onTrash=function(g){this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)};var Tr={onSetup:function(g){var I,O,Y=(g=g||{}).featureId,ne="forward";if(Y){if(!(I=this.getFeature(Y)))throw new Error("Could not find a feature with the provided featureId");var se=g.from;if(se&&se.type==="Feature"&&se.geometry&&se.geometry.type==="Point"&&(se=se.geometry),se&&se.type==="Point"&&se.coordinates&&se.coordinates.length===2&&(se=se.coordinates),!se||!Array.isArray(se))throw new Error("Please use the `from` property to indicate which point to continue the line from");var fe=I.coordinates.length-1;if(I.coordinates[fe][0]===se[0]&&I.coordinates[fe][1]===se[1])O=fe+1,I.addCoordinate.apply(I,[O].concat(I.coordinates[fe]));else{if(I.coordinates[0][0]!==se[0]||I.coordinates[0][1]!==se[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");ne="backwards",O=0,I.addCoordinate.apply(I,[O].concat(I.coordinates[0]))}}else I=this.newFeature({type:Be.FEATURE,properties:{},geometry:{type:Be.LINE_STRING,coordinates:[]}}),O=0,this.addFeature(I);return this.clearSelectedFeatures(),It.disable(this),this.updateUIClasses({mouse:Oe.ADD}),this.activateUIButton(Le.LINE),this.setActionableState({trash:!0}),{line:I,currentVertexPosition:O,direction:ne}},clickAnywhere:function(g,I){if(g.currentVertexPosition>0&&jr(I,g.line.coordinates[g.currentVertexPosition-1])||g.direction==="backwards"&&jr(I,g.line.coordinates[g.currentVertexPosition+1]))return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]});this.updateUIClasses({mouse:Oe.ADD}),g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),g.direction==="forward"?(g.currentVertexPosition++,g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat)):g.line.addCoordinate(0,I.lngLat.lng,I.lngLat.lat)},clickOnVertex:function(g){return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]})},onMouseMove:function(g,I){g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),Cn(I)&&this.updateUIClasses({mouse:Oe.POINTER})}};Tr.onTap=Tr.onClick=function(g,I){if(Cn(I))return this.clickOnVertex(g,I);this.clickAnywhere(g,I)},Tr.onKeyUp=function(g,I){fn(I)?this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]}):qe(I)&&(this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT))},Tr.onStop=function(g){It.enable(this),this.activateUIButton(),this.getFeature(g.line.id)!==void 0&&(g.line.removeCoordinate(""+g.currentVertexPosition),g.line.isValid()?this.map.fire(et.CREATE,{features:[g.line.toGeoJSON()]}):(this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT,{},{silent:!0})))},Tr.onTrash=function(g){this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)},Tr.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.line.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I);I.geometry.coordinates.length<2||(I.properties.meta=nt.FEATURE,O(Mt(g.line.id,I.geometry.coordinates[g.direction==="forward"?I.geometry.coordinates.length-2:1],""+(g.direction==="forward"?I.geometry.coordinates.length-2:1),!1)),O(I))};var Ir={simple_select:vr,direct_select:jn,draw_point:ji,draw_polygon:Go,draw_line_string:Tr},ta={defaultMode:Ne.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:Ii,modes:Ir,controls:{},userProperties:!1},os={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},Gi={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function ui(g,I){return g.map(function(O){return O.source?O:Se(O,{id:O.id+"."+I,source:I==="hot"?ye.HOT:ye.COLD})})}var uo={exports:{}};(function(g,I){var O="__lodash_hash_undefined__",Y=9007199254740991,ne="[object Arguments]",se="[object Array]",fe="[object Boolean]",De="[object Date]",Ve="[object Error]",rt="[object Function]",ot="[object Map]",Je="[object Number]",Rt="[object Object]",Hi="[object Promise]",Ot="[object RegExp]",ar="[object Set]",ke="[object String]",_t="[object Symbol]",yi="[object WeakMap]",Xi="[object ArrayBuffer]",tr="[object DataView]",rn=/^\[object .+?Constructor\]$/,ia=/^(?:0|[1-9]\d*)$/,Ci={};Ci["[object Float32Array]"]=Ci["[object Float64Array]"]=Ci["[object Int8Array]"]=Ci["[object Int16Array]"]=Ci["[object Int32Array]"]=Ci["[object Uint8Array]"]=Ci["[object Uint8ClampedArray]"]=Ci["[object Uint16Array]"]=Ci["[object Uint32Array]"]=!0,Ci[ne]=Ci[se]=Ci[Xi]=Ci[fe]=Ci[tr]=Ci[De]=Ci[Ve]=Ci[rt]=Ci[ot]=Ci[Je]=Ci[Rt]=Ci[Ot]=Ci[ar]=Ci[ke]=Ci[yi]=!1;var ss=typeof Al=="object"&&Al&&Al.Object===Object&&Al,ra=typeof self=="object"&&self&&self.Object===Object&&self,nn=ss||ra||Function("return this")(),ho=I&&!I.nodeType&&I,Xt=ho&&g&&!g.nodeType&&g,Ss=Xt&&Xt.exports===ho,Wr=Ss&&ss.process,on=function(){try{return Wr&&Wr.binding&&Wr.binding("util")}catch{}}(),na=on&&on.isTypedArray;function oa(de,we){for(var Ye=-1,wt=de==null?0:de.length;++Yelr))return!1;var rr=ri.get(de);if(rr&&ri.get(we))return rr==we;var xi=-1,sn=!0,no=2&Ye?new ls:void 0;for(ri.set(de,we),ri.set(we,de);++xi-1},_n.prototype.set=function(de,we){var Ye=this.__data__,wt=cs(Ye,de);return wt<0?(++this.size,Ye.push([de,we])):Ye[wt][1]=we,this},Ao.prototype.clear=function(){this.size=0,this.__data__={hash:new vi,map:new(qn||_n),string:new vi}},Ao.prototype.delete=function(de){var we=ga(this,de).delete(de);return this.size-=we?1:0,we},Ao.prototype.get=function(de){return ga(this,de).get(de)},Ao.prototype.has=function(de){return ga(this,de).has(de)},Ao.prototype.set=function(de,we){var Ye=ga(this,de),wt=Ye.size;return Ye.set(de,we),this.size+=Ye.size==wt?0:1,this},ls.prototype.add=ls.prototype.push=function(de){return this.__data__.set(de,O),this},ls.prototype.has=function(de){return this.__data__.has(de)},Zn.prototype.clear=function(){this.__data__=new _n,this.size=0},Zn.prototype.delete=function(de){var we=this.__data__,Ye=we.delete(de);return this.size=we.size,Ye},Zn.prototype.get=function(de){return this.__data__.get(de)},Zn.prototype.has=function(de){return this.__data__.has(de)},Zn.prototype.set=function(de,we){var Ye=this.__data__;if(Ye instanceof _n){var wt=Ye.__data__;if(!qn||wt.length<199)return wt.push([de,we]),this.size=++Ye.size,this;Ye=this.__data__=new Ao(wt)}return Ye.set(de,we),this.size=Ye.size,this};var ya=Ho?function(de){return de==null?[]:(de=Object(de),function(we,Ye){for(var wt=-1,Vi=we==null?0:we.length,ri=0,ir=[];++wt-1&&de%1==0&&de-1&&de%1==0&&de<=Y}function Hr(de){var we=typeof de;return de!=null&&(we=="object"||we=="function")}function ro(de){return de!=null&&typeof de=="object"}var ds=na?function(de){return function(we){return de(we)}}(na):function(de){return ro(de)&&zo(de.length)&&!!Ci[ko(de)]};function ba(de){return(we=de)!=null&&zo(we.length)&&!Ji(we)?fa(de):As(de);var we}g.exports=function(de,we){return us(de,we)}})(uo,uo.exports);var Wi=v(uo.exports);function bs(g,I){return g.length===I.length&&JSON.stringify(g.map(function(O){return O}).sort())===JSON.stringify(I.map(function(O){return O}).sort())}var kn={Polygon:ze,LineString:Oi,Point:pi,MultiPolygon:Zt,MultiLineString:Zt,MultiPoint:Zt},Ba=Object.freeze({__proto__:null,CommonSelectors:er,constrainFeatureMovement:To,createMidPoint:Vr,createSupplementaryPoints:mn,createVertex:Mt,doubleClickZoom:It,euclideanDistance:di,featuresAt:Dt,getFeatureAtAndSetCursors:Lt,isClick:Pi,isEventAtCoordinates:jr,isTap:$r,mapEventToBoundingBox:Ae,ModeHandler:_,moveFeatures:Io,sortFeatures:At,stringSetsAreEqual:bs,StringSet:Ge,theme:Ii,toDenseArray:Bi}),Eo=function(g,I){var O={options:g=function(ne){ne===void 0&&(ne={});var se=Se(ne);return ne.controls||(se.controls={}),ne.displayControlsDefault===!1?se.controls=Se(Gi,ne.controls):se.controls=Se(os,ne.controls),(se=Se(ta,se)).styles=ui(se.styles,"cold").concat(ui(se.styles,"hot")),se}(g)};I=function(ne,se){return se.modes=Ne,se.getFeatureIdsAt=function(fe){return Dt.click({point:fe},null,ne).map(function(De){return De.properties.id})},se.getSelectedIds=function(){return ne.store.getSelectedIds()},se.getSelected=function(){return{type:Be.FEATURE_COLLECTION,features:ne.store.getSelectedIds().map(function(fe){return ne.store.get(fe)}).map(function(fe){return fe.toGeoJSON()})}},se.getSelectedPoints=function(){return{type:Be.FEATURE_COLLECTION,features:ne.store.getSelectedCoordinates().map(function(fe){return{type:Be.FEATURE,properties:{},geometry:{type:Be.POINT,coordinates:fe.coordinates}}})}},se.set=function(fe){if(fe.type===void 0||fe.type!==Be.FEATURE_COLLECTION||!Array.isArray(fe.features))throw new Error("Invalid FeatureCollection");var De=ne.store.createRenderBatch(),Ve=ne.store.getAllIds().slice(),rt=se.add(fe),ot=new Ge(rt);return(Ve=Ve.filter(function(Je){return!ot.has(Je)})).length&&se.delete(Ve),De(),rt},se.add=function(fe){var De=JSON.parse(JSON.stringify(F(fe))).features.map(function(Ve){if(Ve.id=Ve.id||Ti(),Ve.geometry===null)throw new Error("Invalid geometry: null");if(ne.store.get(Ve.id)===void 0||ne.store.get(Ve.id).type!==Ve.geometry.type){var rt=kn[Ve.geometry.type];if(rt===void 0)throw new Error("Invalid geometry type: "+Ve.geometry.type+".");var ot=new rt(ne,Ve);ne.store.add(ot)}else{var Je=ne.store.get(Ve.id);Je.properties=Ve.properties,Wi(Je.properties,Ve.properties)||ne.store.featureChanged(Je.id),Wi(Je.getCoordinates(),Ve.geometry.coordinates)||Je.incomingCoords(Ve.geometry.coordinates)}return Ve.id});return ne.store.render(),De},se.get=function(fe){var De=ne.store.get(fe);if(De)return De.toGeoJSON()},se.getAll=function(){return{type:Be.FEATURE_COLLECTION,features:ne.store.getAll().map(function(fe){return fe.toGeoJSON()})}},se.delete=function(fe){return ne.store.delete(fe,{silent:!0}),se.getMode()!==Ne.DIRECT_SELECT||ne.store.getSelectedIds().length?ne.store.render():ne.events.changeMode(Ne.SIMPLE_SELECT,void 0,{silent:!0}),se},se.deleteAll=function(){return ne.store.delete(ne.store.getAllIds(),{silent:!0}),se.getMode()===Ne.DIRECT_SELECT?ne.events.changeMode(Ne.SIMPLE_SELECT,void 0,{silent:!0}):ne.store.render(),se},se.changeMode=function(fe,De){return De===void 0&&(De={}),fe===Ne.SIMPLE_SELECT&&se.getMode()===Ne.SIMPLE_SELECT?(bs(De.featureIds||[],ne.store.getSelectedIds())||(ne.store.setSelected(De.featureIds,{silent:!0}),ne.store.render()),se):(fe===Ne.DIRECT_SELECT&&se.getMode()===Ne.DIRECT_SELECT&&De.featureId===ne.store.getSelectedIds()[0]||ne.events.changeMode(fe,De,{silent:!0}),se)},se.getMode=function(){return ne.events.getMode()},se.trash=function(){return ne.events.trash({silent:!0}),se},se.combineFeatures=function(){return ne.events.combineFeatures({silent:!0}),se},se.uncombineFeatures=function(){return ne.events.uncombineFeatures({silent:!0}),se},se.setFeatureProperty=function(fe,De,Ve){return ne.store.setFeatureProperty(fe,De,Ve),se},se}(O,I),O.api=I;var Y=In(O);return I.onAdd=Y.onAdd,I.onRemove=Y.onRemove,I.types=Le,I.options=g,I};function ws(g){Eo(g,this)}return ws.modes=Ir,ws.constants=Ht,ws.lib=Ba,ws})})(sf);var qg=sf.exports;const La=Yp(qg);function Zg(m){let f,_,v;return{c(){f=Wt("button"),f.textContent="Import current view",vs(f,"type","button")},m(E,k){hi(E,f,k),_||(v=Fa(f,"click",m[0]),_=!0)},p:Mr,i:Mr,o:Mr,d(E){E&&li(f),_=!1,v()}}}function Gg(m){let f='poly:"';for(let[v,E]of m.geometry.coordinates[0])f+=`${E} ${v} `;return f=f.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${f}); node(w)->.x; <;); out meta;`}`}function _c(m){return[m.lng,m.lat]}function Wg(m,f,_){let{map:v}=f;const E=Ih();let k=null;ol(()=>{v!=null&&v.loaded()&&k&&v.removeControl(k)});async function B(N){try{E("loading","Loading from Overpass");let be=await(await fetch(Gg(N))).text();E("gotXml",be)}catch(_e){E("error",_e.toString())}}function s(){let N=v.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[_c(N.getSouthWest()),_c(N.getNorthWest()),_c(N.getNorthEast()),_c(N.getSouthEast()),_c(N.getSouthWest())]],type:"Polygon"}}}async function H(){if(v){if(v.getZoom()<13){E("error","Zoom in more to import");return}await B(s())}}return m.$$set=N=>{"map"in N&&_(1,v=N.map)},m.$$.update=()=>{m.$$.dirty&14&&v&&!k&&(_(2,La.constants.classes.CONTROL_BASE="maplibregl-ctrl",La),_(2,La.constants.classes.CONTROL_PREFIX="maplibregl-ctrl-",La),_(2,La.constants.classes.CONTROL_GROUP="maplibregl-ctrl-group",La),_(3,k=new La({displayControlsDefault:!1,controls:{polygon:!0}})),v.addControl(k),v.on("draw.create",async N=>{let _e=N.features[0];k.deleteAll(),await B(_e)}))},[H,v,La,k]}class Hg extends Gr{constructor(f){super(),Zr(this,f,Wg,Zg,Sr,{map:1})}}function Dp(m,f,_){const v=m.slice();return v[1]=f[_][0],v[2]=f[_][1],v}function Fp(m){let f,_,v=m[1]+"",E,k,B=m[2]+"",s;return{c(){f=Wt("tr"),_=Wt("td"),E=nl(v),k=Wt("td"),s=nl(B)},m(H,N){hi(H,f,N),_i(f,_),_i(_,E),_i(f,k),_i(k,s)},p(H,N){N&1&&v!==(v=H[1]+"")&&yh(E,v),N&1&&B!==(B=H[2]+"")&&yh(s,B)},d(H){H&&li(f)}}}function Xg(m){let f,_,v=gp(Object.entries(m[0])),E=[];for(let k=0;k{"properties"in E&&_(0,v=E.properties)},[v]}class zh extends Gr{constructor(f){super(),Zr(this,f,Kg,Xg,Sr,{properties:0})}}const af=["==",["geometry-type"],"Polygon"],lf=["==",["geometry-type"],"LineString"],cf=["==",["geometry-type"],"Point"];function yu(m,f,_){let v=["match",m];for(let[E,k]of Object.entries(f))v.push(E),v.push(k);return v.push(_),v}let zt;const uf=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&uf.decode();let bc=null;function Cc(){return(bc===null||bc.byteLength===0)&&(bc=new Uint8Array(zt.memory.buffer)),bc}function Hs(m,f){return m=m>>>0,uf.decode(Cc().subarray(m,m+f))}const Xs=new Array(128).fill(void 0);Xs.push(void 0,null,!0,!1);let Mc=Xs.length;function Yr(m){Mc===Xs.length&&Xs.push(Xs.length+1);const f=Mc;return Mc=Xs[f],Xs[f]=m,f}function ai(m){return Xs[m]}function Jg(m){m<132||(Xs[m]=Mc,Mc=m)}function fu(m){const f=ai(m);return Jg(m),f}function _h(m){return m==null}let wc=null;function Yg(){return(wc===null||wc.byteLength===0)&&(wc=new Float64Array(zt.memory.buffer)),wc}let Sc=null;function sr(){return(Sc===null||Sc.byteLength===0)&&(Sc=new Int32Array(zt.memory.buffer)),Sc}let Da=0;const mu=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Qg=typeof mu.encodeInto=="function"?function(m,f){return mu.encodeInto(m,f)}:function(m,f){const _=mu.encode(m);return f.set(_),{read:m.length,written:_.length}};function uu(m,f,_){if(_===void 0){const s=mu.encode(m),H=f(s.length,1)>>>0;return Cc().subarray(H,H+s.length).set(s),Da=s.length,H}let v=m.length,E=f(v,1)>>>0;const k=Cc();let B=0;for(;B127)break;k[E+B]=s}if(B!==v){B!==0&&(m=m.slice(B)),E=_(E,v,v=B+m.length*3,1)>>>0;const s=Cc().subarray(E+B,E+v),H=Qg(m,s);B+=H.written}return Da=B,E}function Sh(m){const f=typeof m;if(f=="number"||f=="boolean"||m==null)return`${m}`;if(f=="string")return`"${m}"`;if(f=="symbol"){const E=m.description;return E==null?"Symbol":`Symbol(${E})`}if(f=="function"){const E=m.name;return typeof E=="string"&&E.length>0?`Function(${E})`:"Function"}if(Array.isArray(m)){const E=m.length;let k="[";E>0&&(k+=Sh(m[0]));for(let B=1;B1)v=_[1];else return toString.call(m);if(v=="Object")try{return"Object("+JSON.stringify(m)+")"}catch{return"Object"}return m instanceof Error?`${m.name}: ${m.message} -${m.stack}`:v}function $g(m,f){const _=f(m.length*1,1)>>>0;return Cc().set(m,_/1),Da=m.length,_}function gh(m,f){try{return m.apply(this,f)}catch(_){zt.__wbindgen_exn_store(Yr(_))}}class vu{static __wrap(f){f=f>>>0;const _=Object.create(vu.prototype);return _.__wbg_ptr=f,_}__destroy_into_raw(){const f=this.__wbg_ptr;return this.__wbg_ptr=0,f}free(){const f=this.__destroy_into_raw();zt.__wbg_jsroutesnapper_free(f)}constructor(f){try{const k=zt.__wbindgen_add_to_stack_pointer(-16),B=$g(f,zt.__wbindgen_malloc),s=Da;zt.jsroutesnapper_new(k,B,s);var _=sr()[k/4+0],v=sr()[k/4+1],E=sr()[k/4+2];if(E)throw fu(v);return vu.__wrap(_)}finally{zt.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(f){zt.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Yr(f))}setAreaMode(){zt.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_getConfig(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}toFinalFeature(){try{const v=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_toFinalFeature(v,this.__wbg_ptr);var f=sr()[v/4+0],_=sr()[v/4+1];let E;return f!==0&&(E=Hs(f,_).slice(),zt.__wbindgen_free(f,_*1)),E}finally{zt.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_renderGeojson(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}toggleSnapMode(){zt.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(f,_,v){return zt.jsroutesnapper_onMouseMove(this.__wbg_ptr,f,_,v)!==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(f){try{const E=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_editExisting(E,this.__wbg_ptr,Yr(f));var _=sr()[E/4+0],v=sr()[E/4+1];if(v)throw fu(_)}finally{zt.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_debugRenderGraph(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}routeNameForWaypoints(f){let _,v;try{const _e=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_routeNameForWaypoints(_e,this.__wbg_ptr,Yr(f));var E=sr()[_e/4+0],k=sr()[_e/4+1],B=sr()[_e/4+2],s=sr()[_e/4+3],H=E,N=k;if(s)throw H=0,N=0,fu(B);return _=H,v=N,Hs(H,N)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(_,v,1)}}addSnappedWaypoint(f,_){zt.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,f,_)}undo(){zt.jsroutesnapper_undo(this.__wbg_ptr)}}async function ey(m,f){if(typeof Response=="function"&&m instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(m,f)}catch(v){if(m.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",v);else throw v}const _=await m.arrayBuffer();return await WebAssembly.instantiate(_,f)}else{const _=await WebAssembly.instantiate(m,f);return _ instanceof WebAssembly.Instance?{instance:_,module:m}:_}}function ty(){const m={};return m.wbg={},m.wbg.__wbindgen_string_new=function(f,_){const v=Hs(f,_);return Yr(v)},m.wbg.__wbindgen_object_drop_ref=function(f){fu(f)},m.wbg.__wbindgen_error_new=function(f,_){const v=new Error(Hs(f,_));return Yr(v)},m.wbg.__wbindgen_is_object=function(f){const _=ai(f);return typeof _=="object"&&_!==null},m.wbg.__wbindgen_is_undefined=function(f){return ai(f)===void 0},m.wbg.__wbindgen_in=function(f,_){return ai(f)in ai(_)},m.wbg.__wbindgen_boolean_get=function(f){const _=ai(f);return typeof _=="boolean"?_?1:0:2},m.wbg.__wbindgen_number_get=function(f,_){const v=ai(_),E=typeof v=="number"?v:void 0;Yg()[f/8+1]=_h(E)?0:E,sr()[f/4+0]=!_h(E)},m.wbg.__wbindgen_object_clone_ref=function(f){const _=ai(f);return Yr(_)},m.wbg.__wbindgen_jsval_loose_eq=function(f,_){return ai(f)==ai(_)},m.wbg.__wbindgen_string_get=function(f,_){const v=ai(_),E=typeof v=="string"?v:void 0;var k=_h(E)?0:uu(E,zt.__wbindgen_malloc,zt.__wbindgen_realloc),B=Da;sr()[f/4+1]=B,sr()[f/4+0]=k},m.wbg.__wbg_String_4370c5505c674d30=function(f,_){const v=String(ai(_)),E=uu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Da;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(f,_){const v=ai(f)[ai(_)];return Yr(v)},m.wbg.__wbg_new_abda76e883ba8a5f=function(){const f=new Error;return Yr(f)},m.wbg.__wbg_stack_658279fe44541cf6=function(f,_){const v=ai(_).stack,E=uu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Da;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbg_error_f851667af71bcfc6=function(f,_){let v,E;try{v=f,E=_,console.error(Hs(f,_))}finally{zt.__wbindgen_free(v,E,1)}},m.wbg.__wbg_debug_9a6b3243fbbebb61=function(f){console.debug(ai(f))},m.wbg.__wbg_error_788ae33f81d3b84b=function(f){console.error(ai(f))},m.wbg.__wbg_info_2e30e8204b29d91d=function(f){console.info(ai(f))},m.wbg.__wbg_log_1d3ae0273d8f4f8a=function(f){console.log(ai(f))},m.wbg.__wbg_warn_d60e832f9882c1b2=function(f){console.warn(ai(f))},m.wbg.__wbg_get_44be0491f933a435=function(f,_){const v=ai(f)[_>>>0];return Yr(v)},m.wbg.__wbg_length_fff51ee6522a1a18=function(f){return ai(f).length},m.wbg.__wbindgen_is_function=function(f){return typeof ai(f)=="function"},m.wbg.__wbg_next_526fc47e980da008=function(f){const _=ai(f).next;return Yr(_)},m.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return gh(function(f){const _=ai(f).next();return Yr(_)},arguments)},m.wbg.__wbg_done_5c1f01fb660d73b5=function(f){return ai(f).done},m.wbg.__wbg_value_1695675138684bd5=function(f){const _=ai(f).value;return Yr(_)},m.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Yr(Symbol.iterator)},m.wbg.__wbg_get_97b561fb56f034b5=function(){return gh(function(f,_){const v=Reflect.get(ai(f),ai(_));return Yr(v)},arguments)},m.wbg.__wbg_call_cb65541d95d71282=function(){return gh(function(f,_){const v=ai(f).call(ai(_));return Yr(v)},arguments)},m.wbg.__wbg_isArray_4c24b343cb13cfb1=function(f){return Array.isArray(ai(f))},m.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(f){let _;try{_=ai(f)instanceof ArrayBuffer}catch{_=!1}return _},m.wbg.__wbg_buffer_085ec1f694018c4f=function(f){const _=ai(f).buffer;return Yr(_)},m.wbg.__wbg_new_8125e318e6245eed=function(f){const _=new Uint8Array(ai(f));return Yr(_)},m.wbg.__wbg_set_5cf90238115182c3=function(f,_,v){ai(f).set(ai(_),v>>>0)},m.wbg.__wbg_length_72e2208bbc0efc61=function(f){return ai(f).length},m.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(f){let _;try{_=ai(f)instanceof Uint8Array}catch{_=!1}return _},m.wbg.__wbindgen_debug_string=function(f,_){const v=Sh(ai(_)),E=uu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Da;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbindgen_throw=function(f,_){throw new Error(Hs(f,_))},m.wbg.__wbindgen_memory=function(){const f=zt.memory;return Yr(f)},m}function iy(m,f){return zt=m.exports,hf.__wbindgen_wasm_module=f,wc=null,Sc=null,bc=null,zt}async function hf(m){if(zt!==void 0)return zt;typeof m>"u"&&(m="/ltn/assets/route_snapper_bg.wasm");const f=ty();(typeof m=="string"||typeof Request=="function"&&m instanceof Request||typeof URL=="function"&&m instanceof URL)&&(m=fetch(m));const{instance:_,module:v}=await ey(await m,f);return iy(_,v)}const df=bo({type:"FeatureCollection",features:[]}),ry=bo(!0),ny=bo(0),oy=30;class sy{constructor(f,_){Nn(this,"map");Nn(this,"inner");Nn(this,"active");Nn(this,"eventListenersSuccess");Nn(this,"eventListenersUpdated");Nn(this,"eventListenersFailure");Nn(this,"onMouseMove",f=>{if(!this.active)return;const _=[f.point.x-oy,f.point.y],v=this.map.unproject(f.point).distanceTo(this.map.unproject(_));this.inner.onMouseMove(f.lngLat.lng,f.lngLat.lat,v)&&(this.redraw(),this.dataUpdated())});Nn(this,"onClick",()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())});Nn(this,"onDoubleClick",f=>{this.active&&(f.preventDefault(),this.inner.onClick(),this.finish())});Nn(this,"onDragStart",()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()});Nn(this,"onMouseUp",()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()});Nn(this,"onKeyDown",f=>{this.active&&f.key=="Escape"&&(f.stopPropagation(),this.cancel())});Nn(this,"onKeyPress",f=>{this.active&&f.target.tagName!="INPUT"&&(f.key=="Enter"?(f.stopPropagation(),this.finish()):f.key=="s"?(f.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):f.key=="z"&&f.ctrlKey&&this.undo())});this.map=f,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new vu(_),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],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(f){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),f.properties.waypoints||(f.properties.waypoints=[{lon:f.geometry.coordinates[0][0],lat:f.geometry.coordinates[0][1],snapped:!0},{lon:f.geometry.coordinates[f.geometry.coordinates.length-1][0],lat:f.geometry.coordinates[f.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(f.properties.waypoints),this.redraw()}editExistingArea(f){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),f.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(f.properties.waypoints),this.redraw()}addEventListenerSuccess(f){this.eventListenersSuccess.push(f)}addEventListenerUpdated(f){this.eventListenersUpdated.push(f)}addEventListenerFailure(f){this.eventListenersFailure.push(f)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let f=this.inner.toFinalFeature();if(f)for(let _ of this.eventListenersSuccess)_(JSON.parse(f));else for(let _ of this.eventListenersFailure)_();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(f){this.inner.setRouteConfig(f),this.redraw()}addSnappedWaypoint(f){this.inner.addSnappedWaypoint(f[0],f[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}redraw(){let f=JSON.parse(this.inner.renderGeojson());df.set(f),this.map.getCanvas().style.cursor=f.cursor,ry.set(f.snap_mode),ny.set(f.undo_length)}dataUpdated(){let f=this.inner.toFinalFeature();if(f)for(let _ of this.eventListenersUpdated)_(JSON.parse(f))}}function ay(m){let f,_,v,E,k,B;return f=new ef({props:{filter:cf,paint:{"circle-color":yu(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":yu(["get","type"],{node:Rp/2},Rp)}}}),v=new Ah({props:{filter:lf,paint:{"line-color":["case",["get","snapped"],"red","blue"],"line-width":2.5}}}),k=new tf({props:{filter:af,paint:{"fill-color":"black","fill-opacity":.5}}}),{c(){Ri(f.$$.fragment),_=Tn(),Ri(v.$$.fragment),E=Tn(),Ri(k.$$.fragment)},m(s,H){Ai(f,s,H),hi(s,_,H),Ai(v,s,H),hi(s,E,H),Ai(k,s,H),B=!0},p:Mr,i(s){B||(ft(f.$$.fragment,s),ft(v.$$.fragment,s),ft(k.$$.fragment,s),B=!0)},o(s){St(f.$$.fragment,s),St(v.$$.fragment,s),St(k.$$.fragment,s),B=!1},d(s){s&&(li(_),li(E)),ki(f,s),ki(v,s),ki(k,s)}}}function ly(m){let f,_;return f=new Mh({props:{data:m[0],$$slots:{default:[ay]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&1&&(k.data=v[0]),E&2&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}const Rp=10;function cy(m,f,_){let v;return Qr(m,df,E=>_(0,v=E)),[v]}class uy extends Gr{constructor(f){super(),Zr(this,f,cy,ly,Sr,{})}}function hy(m){let f,_,v,E,k,B,s,H,N,_e,be,ye,Oe,Le,Be,Ne,et,at,nt,it,Vt,ei,Ht,Nt,Jt,At,Ae,Ge,Ui;return f=new jg({props:{msg:m[2]}}),At=new Hg({props:{map:m[0]}}),At.$on("gotXml",m[5]),At.$on("loading",m[9]),At.$on("error",m[10]),{c(){Ri(f.$$.fragment),_=Tn(),v=Wt("div"),E=Wt("div"),k=Wt("label"),B=nl(`Load an osm.xml or a .pbf file: - `),s=Wt("input"),H=Tn(),N=Wt("div"),_e=Wt("label"),be=nl(`Or load an example: - `),ye=Wt("select"),Oe=Wt("option"),Oe.textContent="Custom file loaded",Le=Wt("option"),Le.textContent="Akihabara",Be=Wt("option"),Be.textContent="Hanegi Park",Ne=Wt("option"),Ne.textContent="Harujuku",et=Wt("option"),et.textContent="Taipei main station",at=Wt("option"),at.textContent="Ximending",nt=Wt("option"),nt.textContent="Hong Kong",it=Wt("option"),it.textContent="Kowloon",Vt=Wt("option"),Vt.textContent="Bristol",ei=Wt("option"),ei.textContent="Elephant & Castle",Ht=Wt("option"),Ht.textContent="Westminster",Nt=Wt("option"),Nt.textContent="Montlake",Jt=Tn(),Ri(At.$$.fragment),vs(s,"type","file"),Oe.__value="",Uo(Oe,Oe.__value),Le.__value="akihabara",Uo(Le,Le.__value),Be.__value="hanegi",Uo(Be,Be.__value),Ne.__value="harujuku",Uo(Ne,Ne.__value),et.__value="taipei_main_station",Uo(et,et.__value),at.__value="ximending",Uo(at,at.__value),nt.__value="hong_kong",Uo(nt,nt.__value),it.__value="kowloon",Uo(it,it.__value),Vt.__value="bristol",Uo(Vt,Vt.__value),ei.__value="elephant_castle",Uo(ei,ei.__value),Ht.__value="westminster",Uo(Ht,Ht.__value),Nt.__value="montlake",Uo(Nt,Nt.__value),m[1]===void 0&&_u(()=>m[8].call(ye)),Tc(v,"border","1px solid black"),Tc(v,"padding","8px")},m(Dt,qt){Ai(f,Dt,qt),hi(Dt,_,qt),hi(Dt,v,qt),_i(v,E),_i(E,k),_i(k,B),_i(k,s),m[7](s),_i(v,H),_i(v,N),_i(N,_e),_i(_e,be),_i(_e,ye),_i(ye,Oe),_i(ye,Le),_i(ye,Be),_i(ye,Ne),_i(ye,et),_i(ye,at),_i(ye,nt),_i(ye,it),_i(ye,Vt),_i(ye,ei),_i(ye,Ht),_i(ye,Nt),mp(ye,m[1],!0),_i(v,Jt),Ai(At,v,null),Ae=!0,Ge||(Ui=[Fa(s,"change",m[4]),Fa(ye,"change",m[8])],Ge=!0)},p(Dt,[qt]){const Lt={};qt&4&&(Lt.msg=Dt[2]),f.$set(Lt),qt&2&&mp(ye,Dt[1]);const di={};qt&1&&(di.map=Dt[0]),At.$set(di)},i(Dt){Ae||(ft(f.$$.fragment,Dt),ft(At.$$.fragment,Dt),Ae=!0)},o(Dt){St(f.$$.fragment,Dt),St(At.$$.fragment,Dt),Ae=!1},d(Dt){Dt&&(li(_),li(v)),ki(f,Dt),m[7](null),ki(At),Ge=!1,Ra(Ui)}}}function dy(m,f,_){let{model:v=void 0}=f,{map:E}=f,k="",B=null,s=!1;jp(async()=>{await Kp(),await hf();try{s=(await fetch("/kowloon.pbf",{method:"HEAD"})).ok,console.log("Using local cache, not od2net.org"),ye("bristol")}catch{}});let H;async function N(at){try{_e(await H.files[0].arrayBuffer()),_(1,k="")}catch(nt){window.alert(`Couldn't open this file: ${nt}`)}_(2,B=null)}function _e(at){_(2,B="Building map model from OSM input"),console.time("load"),_(6,v=new k_(new Uint8Array(at))),console.timeEnd("load")}function be(at){try{_e(new TextEncoder().encode(at.detail)),_(1,k="")}catch(nt){window.alert(`Couldn't import from Overpass: ${nt}`)}_(2,B=null)}async function ye(at){at!=""&&(s?await Oe(`/${at}.pbf`):await Oe(`https://assets.od2net.org/severance_pbfs/${at}.pbf`))}async function Oe(at){try{_(2,B=`Downloading ${at}`);let nt=await fetch(at);_e(await nt.arrayBuffer())}catch(nt){window.alert(`Couldn't open from URL ${at}: ${nt}`)}_(2,B=null)}function Le(at){$s[at?"unshift":"push"](()=>{H=at,_(3,H)})}function Be(){k=__(this),_(1,k)}const Ne=at=>_(2,B=at.detail),et=at=>window.alert(at.detail);return m.$$set=at=>{"model"in at&&_(6,v=at.model),"map"in at&&_(0,E=at.map)},m.$$.update=()=>{m.$$.dirty&2&&ye(k)},[E,k,B,H,N,be,v,Le,Be,Ne,et]}class py extends Gr{constructor(f){super(),Zr(this,f,dy,hy,Sr,{model:6,map:0})}}function fy(m){let f,_;return f=new zh({props:{properties:m[6].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&64&&(k.properties=v[6].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function my(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[fy,({data:v})=>({6:v}),({data:v})=>v?64:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&192&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function _y(m){let f,_;return f=new zh({props:{properties:m[6].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&64&&(k.properties=v[6].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function gy(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[_y,({data:v})=>({6:v}),({data:v})=>v?64:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&192&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function yy(m){let f,_,v,E,k,B;return f=new Ah({props:{filter:lf,paint:{"line-width":5,"line-color":yu(["get","kind"],{interior_road:["interpolate-hcl",["linear"],["get","shortcuts"],0,"#F19A93",m[1],"#A32015"],crosses:"blue"},"red")},hoverCursor:"pointer",$$slots:{default:[my]},$$scope:{ctx:m}}}),f.$on("click",m[4]),v=new ef({props:{filter:cf,paint:{"circle-radius":15,"circle-color":yu(["get","kind"],{border_intersection:"green"},"red")},$$slots:{default:[gy]},$$scope:{ctx:m}}}),k=new tf({props:{filter:af,manageHoverState:!0,paint:{"fill-color":["get","color"],"fill-opacity":q_(.6,1)}}}),{c(){Ri(f.$$.fragment),_=Tn(),Ri(v.$$.fragment),E=Tn(),Ri(k.$$.fragment)},m(s,H){Ai(f,s,H),hi(s,_,H),Ai(v,s,H),hi(s,E,H),Ai(k,s,H),B=!0},p(s,H){const N={};H&128&&(N.$$scope={dirty:H,ctx:s}),f.$set(N);const _e={};H&128&&(_e.$$scope={dirty:H,ctx:s}),v.$set(_e)},i(s){B||(ft(f.$$.fragment,s),ft(v.$$.fragment,s),ft(k.$$.fragment,s),B=!0)},o(s){St(f.$$.fragment,s),St(v.$$.fragment,s),St(k.$$.fragment,s),B=!1},d(s){s&&(li(_),li(E)),ki(f,s),ki(v,s),ki(k,s)}}}function vy(m){let f,_;return f=new Mh({props:{data:m[0],generateId:!0,$$slots:{default:[yy]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&128&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function xy(m,f,_){let{model:v}=f,{boundary:E}=f,k=["#8dd3c7","#ffffb3","#bebada","#80b1d3","#fdb462","#b3de69","#fccde5","#bc80bd","#ccebc5","#ffed6f"],B=JSON.parse(v.analyzeNeighbourhood(E)),s=Math.max(...B.features.map(N=>N.properties.shortcuts??0));for(let N of B.features)N.properties.color=="disconnected"?N.properties.color="red":Object.hasOwn(N.properties,"color")&&(N.properties.color=k[N.properties.color%k.length]);const H=N=>window.open(N.detail.features[0].properties.way,"_blank");return m.$$set=N=>{"model"in N&&_(2,v=N.model),"boundary"in N&&_(3,E=N.boundary)},[B,s,v,E,H]}class by extends Gr{constructor(f){super(),Zr(this,f,xy,vy,Sr,{model:2,boundary:3})}}function wy(m){let f,_;return f=new zh({props:{properties:m[2].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&4&&(k.properties=v[2].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Sy(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[wy,({data:v})=>({2:v}),({data:v})=>v?4:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&12&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ty(m){let f,_;return f=new Ah({props:{id:"network",paint:{"line-width":5,"line-color":"black"},hoverCursor:"pointer",$$slots:{default:[Sy]},$$scope:{ctx:m}}}),f.$on("click",m[1]),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&8&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Iy(m){let f,_;return f=new Mh({props:{data:JSON.parse(m[0].render()),$$slots:{default:[Ty]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&1&&(k.data=JSON.parse(v[0].render())),E&8&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ey(m,f,_){let{model:v}=f;const E=k=>window.open(k.detail.features[0].properties.way,"_blank");return m.$$set=k=>{"model"in k&&_(0,v=k.model)},[v,E]}class Cy extends Gr{constructor(f){super(),Zr(this,f,Ey,Iy,Sr,{model:0})}}function Op(m){let f,_,v;function E(B){m[8](B)}let k={map:m[2]};return m[0]!==void 0&&(k.model=m[0]),f=new py({props:k}),$s.push(()=>zc(f,"model",E)),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,s){const H={};s&4&&(H.map=B[2]),!_&&s&1&&(_=!0,H.model=B[0],Pc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function My(m){let f,_,v,E,k,B,s,H,N;return{c(){f=Wt("div"),_=Wt("button"),_.textContent="Reset",v=Tn(),E=Wt("div"),k=Wt("button"),k.textContent="Edit boundary",B=Tn(),s=Wt("p"),s.textContent="Analyze and edit now"},m(_e,be){hi(_e,f,be),_i(f,_),hi(_e,v,be),hi(_e,E,be),_i(E,k),hi(_e,B,be),hi(_e,s,be),H||(N=[Fa(_,"click",m[6]),Fa(k,"click",m[4])],H=!0)},p:Mr,d(_e){_e&&(li(f),li(v),li(E),li(B),li(s)),H=!1,Ra(N)}}}function Ay(m){let f;return{c(){f=Wt("p"),f.textContent="Draw the boundary..."},m(_,v){hi(_,f,v)},p:Mr,d(_){_&&li(f)}}}function ky(m){let f,_,v,E,k,B,s;return{c(){f=Wt("div"),_=Wt("button"),_.textContent="Set boundary",v=Tn(),E=Wt("div"),k=Wt("button"),k.textContent="Quickset boundary (dev)"},m(H,N){hi(H,f,N),_i(f,_),hi(H,v,N),hi(H,E,N),_i(E,k),B||(s=[Fa(_,"click",m[4]),Fa(k,"click",m[5])],B=!0)},p:Mr,d(H){H&&(li(f),li(v),li(E)),B=!1,Ra(s)}}}function Py(m){let f,_,v,E,k,B,s,H,N=m[2]&&Op(m);function _e(Oe,Le){if(Oe[1].mode=="network"&&Oe[0])return ky;if(Oe[1].mode=="set-boundary")return Ay;if(Oe[1].mode=="neighbourhood")return My}let be=_e(m),ye=be&&be(m);return{c(){f=Wt("div"),N&&N.c(),_=Tn(),v=Wt("div"),E=Wt("button"),E.textContent="Zoom to fit",k=Tn(),ye&&ye.c(),vs(f,"slot","left")},m(Oe,Le){hi(Oe,f,Le),N&&N.m(f,null),_i(f,_),_i(f,v),_i(v,E),_i(f,k),ye&&ye.m(f,null),B=!0,s||(H=Fa(E,"click",m[3]),s=!0)},p(Oe,Le){Oe[2]?N?(N.p(Oe,Le),Le&4&&ft(N,1)):(N=Op(Oe),N.c(),ft(N,1),N.m(f,_)):N&&(rs(),St(N,1,1,()=>{N=null}),ns()),be===(be=_e(Oe))&&ye?ye.p(Oe,Le):(ye&&ye.d(1),ye=be&&be(Oe),ye&&(ye.c(),ye.m(f,null)))},i(Oe){B||(ft(N),B=!0)},o(Oe){St(N),B=!1},d(Oe){Oe&&li(f),N&&N.d(),ye&&ye.d(),s=!1,H()}}}function Bp(m){let f,_,v,E;const k=[Dy,Ly,zy],B=[];function s(H,N){return H[1].mode=="network"?0:H[1].mode=="set-boundary"?1:H[1].mode=="neighbourhood"?2:-1}return~(f=s(m))&&(_=B[f]=k[f](m)),{c(){_&&_.c(),v=Oa()},m(H,N){~f&&B[f].m(H,N),hi(H,v,N),E=!0},p(H,N){let _e=f;f=s(H),f===_e?~f&&B[f].p(H,N):(_&&(rs(),St(B[_e],1,1,()=>{B[_e]=null}),ns()),~f?(_=B[f],_?_.p(H,N):(_=B[f]=k[f](H),_.c()),ft(_,1),_.m(v.parentNode,v)):_=null)},i(H){E||(ft(_),E=!0)},o(H){St(_),E=!1},d(H){H&&li(v),~f&&B[f].d(H)}}}function zy(m){let f,_;return f=new by({props:{model:m[0],boundary:m[1].boundary}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&1&&(k.model=v[0]),E&2&&(k.boundary=v[1].boundary),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ly(m){let f,_;return f=new uy({}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p:Mr,i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Dy(m){let f,_;return f=new Cy({props:{model:m[0]}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&1&&(k.model=v[0]),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Fy(m){let f,_,v=m[0]&&Bp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),hi(E,f,k),_=!0},p(E,k){E[0]?v?(v.p(E,k),k&1&&ft(v,1)):(v=Bp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&li(f),v&&v.d(E)}}}function Ry(m){let f,_,v,E;function k(s){m[7](s)}let B={style:"https://api.maptiler.com/maps/dataviz/style.json?key=MZEJTanw3WpxRvt7qDfo",standardControls:!0,hash:!0,$$slots:{default:[Fy]},$$scope:{ctx:m}};return m[2]!==void 0&&(B.map=m[2]),_=new bg({props:B}),$s.push(()=>zc(_,"map",k)),{c(){f=Wt("div"),Ri(_.$$.fragment),vs(f,"slot","main"),Tc(f,"position","relative"),Tc(f,"width","100%"),Tc(f,"height","100vh")},m(s,H){hi(s,f,H),Ai(_,f,null),E=!0},p(s,H){const N={};H&2051&&(N.$$scope={dirty:H,ctx:s}),!v&&H&4&&(v=!0,N.map=s[2],Pc(()=>v=!1)),_.$set(N)},i(s){E||(ft(_.$$.fragment,s),E=!0)},o(s){St(_.$$.fragment,s),E=!1},d(s){s&&li(f),ki(_)}}}function Oy(m){let f,_;return f=new Ng({props:{$$slots:{main:[Ry],left:[Py]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&2055&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function By(m,f,_){let v={mode:"network"},E,k,B;function s(){if(B&&E){let Le=bh(JSON.parse(E.render()));B.fitBounds(Le,{animate:!1})}}function H(Le){E&&(console.log("New map model loaded"),s(),_(1,v={mode:"network"}),k=new sy(B,E.toRouteSnapper()))}function N(){v.mode=="network"?k.startArea():v.mode=="neighbourhood"&&k.editExistingArea(v.boundary),_(1,v={mode:"set-boundary"}),k.addEventListenerSuccess(Le=>{_(1,v={mode:"neighbourhood",boundary:Le}),k.clearEventListeners()}),k.addEventListenerFailure(()=>{_(1,v={mode:"network"}),k.clearEventListeners()})}function _e(){_(1,v={mode:"neighbourhood",boundary:{geometry:{coordinates:[[[-2.582766,51.455751],[-2.582715,51.455655],[-2.582477,51.455207],[-2.582446,51.455157],[-2.582409,51.455129],[-2.582334,51.455111],[-2.58226,51.455115],[-2.582174,51.455113],[-2.582115,51.455126],[-2.581976,51.454882],[-2.581812,51.454602],[-2.582181,51.454505],[-2.582091,51.454224],[-2.582071,51.454159],[-2.582042,51.454073],[-2.581915,51.453674],[-2.581972,51.453287],[-2.581714,51.45322],[-2.58169,51.453214],[-2.581866,51.452966],[-2.581588,51.45288],[-2.581521,51.45281],[-2.581584,51.452731],[-2.581401,51.452671],[-2.581103,51.452566],[-2.579862,51.452092],[-2.579808,51.452069],[-2.579753,51.452045],[-2.579074,51.451752],[-2.578228,51.45135],[-2.578131,51.451293],[-2.578066,51.451251],[-2.577641,51.450924],[-2.577504,51.450818],[-2.577228,51.450628],[-2.576815,51.450348],[-2.576749,51.450294],[-2.576487,51.450084],[-2.57599,51.449653],[-2.575886,51.449685],[-2.575807,51.449709],[-2.575324,51.44978],[-2.574139,51.449954],[-2.573887,51.450007],[-2.573699,51.450097],[-2.573534,51.450262],[-2.573415,51.450398],[-2.573305,51.45055],[-2.573286,51.450604],[-2.573279,51.450637],[-2.573275,51.45066],[-2.57327,51.450705],[-2.573278,51.450761],[-2.573366,51.451076],[-2.573491,51.451385],[-2.573553,51.451514],[-2.573591,51.451605],[-2.573635,51.451726],[-2.573785,51.451943],[-2.573862,51.452052],[-2.574029,51.452215],[-2.574301,51.452438],[-2.573889,51.452598],[-2.572852,51.452994],[-2.57186,51.453341],[-2.571252,51.453557],[-2.571012,51.45364],[-2.570853,51.453697],[-2.5705,51.453823],[-2.570369,51.45387],[-2.570287,51.453901],[-2.570078,51.453977],[-2.569972,51.454016],[-2.569803,51.454082],[-2.569713,51.454115],[-2.569632,51.454144],[-2.569501,51.454184],[-2.569137,51.454304],[-2.568791,51.454436],[-2.568648,51.454505],[-2.568666,51.454525],[-2.568674,51.454548],[-2.56867,51.454571],[-2.568656,51.454593],[-2.568632,51.454611],[-2.568601,51.454623],[-2.568688,51.454756],[-2.568967,51.454972],[-2.569021,51.455014],[-2.568715,51.455271],[-2.568646,51.455327],[-2.568374,51.455559],[-2.568108,51.455772],[-2.567496,51.456239],[-2.567414,51.456319],[-2.567628,51.456492],[-2.567643,51.456517],[-2.567649,51.456526],[-2.567656,51.456544],[-2.567659,51.456553],[-2.567655,51.456589],[-2.56766,51.456617],[-2.567688,51.456643],[-2.567726,51.456662],[-2.567757,51.456684],[-2.567783,51.456719],[-2.567793,51.456739],[-2.567796,51.456747],[-2.56779,51.456775],[-2.567829,51.456783],[-2.567946,51.456871],[-2.568049,51.456948],[-2.568176,51.457057],[-2.568213,51.457083],[-2.568322,51.45716],[-2.568414,51.457216],[-2.56846,51.457251],[-2.568445,51.457292],[-2.567621,51.457946],[-2.567536,51.457943],[-2.567354,51.458066],[-2.567316,51.458148],[-2.567406,51.458165],[-2.567764,51.458232],[-2.568027,51.458276],[-2.568076,51.458283],[-2.568358,51.458287],[-2.568442,51.45829],[-2.568972,51.458337],[-2.56919,51.458356],[-2.569451,51.458365],[-2.569642,51.458363],[-2.569759,51.458354],[-2.570133,51.458292],[-2.570486,51.458208],[-2.570908,51.458114],[-2.571103,51.458103],[-2.57128,51.458116],[-2.571551,51.458175],[-2.571638,51.458205],[-2.571745,51.458247],[-2.571982,51.45828],[-2.572208,51.458286],[-2.573275,51.458227],[-2.573563,51.458208],[-2.573671,51.458195],[-2.573724,51.458183],[-2.573781,51.458175],[-2.573895,51.458156],[-2.573943,51.458146],[-2.576163,51.457686],[-2.576531,51.457615],[-2.576651,51.457592],[-2.576817,51.457539],[-2.57706,51.4574],[-2.577425,51.457222],[-2.577781,51.457082],[-2.578035,51.456998],[-2.578202,51.456951],[-2.578496,51.456874],[-2.578585,51.456849],[-2.578781,51.456795],[-2.579666,51.456548],[-2.579847,51.456493],[-2.579937,51.456464],[-2.580159,51.456403],[-2.580275,51.456396],[-2.580319,51.456385],[-2.580442,51.456351],[-2.580625,51.456286],[-2.580716,51.456255],[-2.580822,51.456205],[-2.580925,51.45617],[-2.581018,51.456139],[-2.581116,51.456108],[-2.581297,51.456054],[-2.581424,51.456018],[-2.581562,51.455983],[-2.581716,51.455949],[-2.581883,51.455913],[-2.582016,51.455898],[-2.582766,51.455751]]],type:"Polygon"},properties:{waypoints:[{lat:51.455751,lon:-2.582766,snapped:!0},{lat:51.449653,lon:-2.57599,snapped:!0},{lat:51.457083,lon:-2.568213,snapped:!0},{lat:51.455751,lon:-2.582766,snapped:!0}]},type:"Feature"}})}function be(){_(1,v={mode:"network"})}function ye(Le){B=Le,_(2,B)}function Oe(Le){E=Le,_(0,E)}return m.$$.update=()=>{m.$$.dirty&1&&H()},[E,v,B,s,N,_e,be,ye,Oe]}class Ny extends Gr{constructor(f){super(),Zr(this,f,By,Oy,Sr,{})}}new Ny({target:document.getElementById("app")}); + `,this._cooperativeGesturesScreen.setAttribute("aria-hidden","true"),this._canvasContainer.addEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.add("maplibregl-cooperative-gestures")}_destroyCooperativeGestures(){V.remove(this._cooperativeGesturesScreen),this._canvasContainer.removeEventListener("wheel",this._cooperativeGesturesOnWheel,!1),this._canvasContainer.classList.remove("maplibregl-cooperative-gestures")}_resizeCanvas(u,t,n){this._canvas.width=Math.floor(n*u),this._canvas.height=Math.floor(n*t),this._canvas.style.width=`${u}px`,this._canvas.style.height=`${t}px`}_setupPainter(){const u={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let t=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{t={requestedAttributes:u},a&&(t.statusMessage=a.statusMessage,t.type=a.type)},{once:!0});const n=this._canvas.getContext("webgl2",u)||this._canvas.getContext("webgl",u);if(!n){const a="Failed to initialize WebGL";throw t?(t.message=a,new Error(JSON.stringify(t))):new Error(a)}this.painter=new zo(n,this.transform),ge.testSupport(n)}_onCooperativeGesture(u,t,n){return!t&&n<2&&(this._cooperativeGesturesScreen.classList.add("maplibregl-show"),setTimeout(()=>{this._cooperativeGesturesScreen.classList.remove("maplibregl-show")},100)),!1}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(u){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||u,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(u){return this._update(),this._renderTaskQueue.add(u)}_cancelRenderFrame(u){this._renderTaskQueue.remove(u)}_render(u){const t=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(u),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const c=this.transform.zoom,d=s.h.now();this.style.zoomHistory.update(c,d);const x=new s.a8(c,{now:d,fadeDuration:t,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),b=x.crossFadingFactor();b===1&&b===this._crossFadingFactor||(n=!0,this._crossFadingFactor=b),this.style.update(x)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform._minEleveationForCurrentTile=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._minEleveationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,t,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:t,showPadding:this.showPadding}),this.fire(new s.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,s.bg.mark(s.bh.load),this.fire(new s.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const a=this._sourcesDirty||this._styleDirty||this._placementDirty;return a||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new s.k("idle")),!this._loaded||this._fullyLoaded||a||(this._fullyLoaded=!0,s.bg.mark(s.bh.fullLoad)),this}redraw(){return this.style&&(this._frame&&(this._frame.cancel(),this._frame=null),this._render(0)),this}remove(){var u;this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),Ne.removeThrottleControl(this._imageQueueHandle),(u=this._resizeObserver)===null||u===void 0||u.disconnect();const t=this.painter.context.gl.getExtension("WEBGL_lose_context");t&&t.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),V.remove(this._canvasContainer),V.remove(this._controlContainer),this._cooperativeGestures&&this._destroyCooperativeGestures(),this._container.classList.remove("maplibregl-map"),s.bg.clearMetrics(),this._removed=!0,this.fire(new s.k("remove"))}triggerRepaint(){this.style&&!this._frame&&(this._frame=s.h.frame(u=>{s.bg.frame(u),this._frame=null,this._render(u)}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(u){this._showTileBoundaries!==u&&(this._showTileBoundaries=u,this._update())}get showPadding(){return!!this._showPadding}set showPadding(u){this._showPadding!==u&&(this._showPadding=u,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(u){this._showCollisionBoxes!==u&&(this._showCollisionBoxes=u,u?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(u){this._showOverdrawInspector!==u&&(this._showOverdrawInspector=u,this._update())}get repaint(){return!!this._repaint}set repaint(u){this._repaint!==u&&(this._repaint=u,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(u){this._vertices=u,this._update()}get version(){return xt}getCameraTargetElevation(){return this.transform.elevation}},Si.NavigationControl=class{constructor(u){this._updateZoomButtons=()=>{const t=this._map.getZoom(),n=t===this._map.getMaxZoom(),a=t===this._map.getMinZoom();this._zoomInButton.disabled=n,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",n.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{const t=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=t},this._setButtonTitle=(t,n)=>{const a=this._map._getUIString(`NavigationControl.${n}`);t.title=a,t.setAttribute("aria-label",a)},this.options=s.e({},ql,u),this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",t=>t.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",t=>this._map.zoomIn({},{originalEvent:t})),V.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",t=>this._map.zoomOut({},{originalEvent:t})),V.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",t=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:t}):this._map.resetNorth({},{originalEvent:t})}),this._compassIcon=V.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(u){return this._map=u,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 Zl(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){V.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(u,t){const n=V.create("button",u,this._container);return n.type="button",n.addEventListener("click",t),n}},Si.GeolocateControl=class extends s.E{constructor(u){super(),this._onSuccess=t=>{if(this._map){if(this._isOutOfMapMaxBounds(t))return this._setErrorState(),this.fire(new s.k("outofmaxbounds",t)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=t,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(t),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(t),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new s.k("geolocate",t)),this._finish()}},this._updateCamera=t=>{const n=new s.L(t.coords.longitude,t.coords.latitude),a=t.coords.accuracy,c=this._map.getBearing(),d=s.e({bearing:c},this.options.fitBoundsOptions),x=Tt.fromLngLat(n,a);this._map.fitBounds(x,d,{geolocateSource:!0})},this._updateMarker=t=>{if(t){const n=new s.L(t.coords.longitude,t.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=t.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=t=>{if(this._map){if(this.options.trackUserLocation)if(t.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 n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(t.code===3&&Ia)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new s.k("error",t)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=t=>{if(this._map){if(this._container.addEventListener("contextmenu",n=>n.preventDefault()),this._geolocateButton=V.create("button","maplibregl-ctrl-geolocate",this._container),V.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",t===!1){s.w("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=V.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Fs({element:this._dotElement}),this._circleElement=V.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fs({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.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 s.k("trackuserlocationend")))})}},this.options=s.e({},cr,u)}onAdd(u){return this._map=u,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),function(t,n=!1){xr===void 0||n?window.navigator.permissions!==void 0?window.navigator.permissions.query({name:"geolocation"}).then(a=>{xr=a.state!=="denied",t(xr)}).catch(()=>{xr=!!window.navigator.geolocation,t(xr)}):(xr=!!window.navigator.geolocation,t(xr)):t(xr)}(this._setupUI),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(),V.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,or=0,Ia=!1}_isOutOfMapMaxBounds(u){const t=this._map.getMaxBounds(),n=u.coords;return t&&(n.longitudet.getEast()||n.latitudet.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 u=this._map.getBounds(),t=u.getSouthEast(),n=u.getNorthEast(),a=t.distanceTo(n),c=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${c}px`,this._circleElement.style.height=`${c}px`}trigger(){if(!this._setup)return s.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 s.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":or--,Ia=!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 s.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 s.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 u;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),or++,or>1?(u={maximumAge:6e5,timeout:0},Ia=!0):(u=this.options.positionOptions,Ia=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,u)}}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)}},Si.AttributionControl=Hn,Si.LogoControl=Yi,Si.ScaleControl=class{constructor(u){this._onMove=()=>{Ja(this._map,this._container,this.options)},this.setUnit=t=>{this.options.unit=t,Ja(this._map,this._container,this.options)},this.options=s.e({},Ka,u)}getDefaultPosition(){return"bottom-left"}onAdd(u){return this._map=u,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-scale",u.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){V.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},Si.FullscreenControl=class extends s.E{constructor(u={}){super(),this._onFullscreenChange=()=>{(window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement)===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,u&&u.container&&(u.container instanceof HTMLElement?this._container=u.container:s.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(u){return this._map=u,this._container||(this._container=this._map.getContainer()),this._controlContainer=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){V.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const u=this._fullscreenButton=V.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);V.create("span","maplibregl-ctrl-icon",u).setAttribute("aria-hidden","true"),u.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const u=this._getTitle();this._fullscreenButton.setAttribute("aria-label",u),this._fullscreenButton.title=u}_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 s.k("fullscreenstart")),this._map._cooperativeGestures&&(this._prevCooperativeGestures=this._map._cooperativeGestures,this._map.setCooperativeGestures())):(this.fire(new s.k("fullscreenend")),this._prevCooperativeGestures&&(this._map.setCooperativeGestures(this._prevCooperativeGestures),delete this._prevCooperativeGestures))}_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()}},Si.TerrainControl=class{constructor(u){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.disableTerrain")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.enableTerrain"))},this.options=u}onAdd(u){return this._map=u,this._container=V.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=V.create("button","maplibregl-ctrl-terrain",this._container),V.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(){V.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},Si.Popup=class extends s.E{constructor(u){super(),this.remove=()=>(this._content&&V.remove(this._content),this._container&&(V.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),delete this._map),this.fire(new s.k("close")),this),this._onMouseUp=t=>{this._update(t.point)},this._onMouseMove=t=>{this._update(t.point)},this._onDrag=t=>{this._update(t.point)},this._update=t=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=V.create("div","maplibregl-popup",this._map.getContainer()),this._tip=V.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const x of this.options.className.split(" "))this._container.classList.add(x);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._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Gl(this._lngLat,this._pos,this._map.transform)),this._trackPointer&&!t)return;const n=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat);let a=this.options.anchor;const c=Ea(this.options.offset);if(!a){const x=this._container.offsetWidth,b=this._container.offsetHeight;let S;S=n.y+c.bottom.ythis._map.transform.height-b?["bottom"]:[],n.xthis._map.transform.width-x/2&&S.push("right"),a=S.length===0?"bottom":S.join("-")}const d=n.add(c[a]).round();V.setTransform(this._container,`${so[a]} translate(${d.x}px,${d.y}px)`),Vc(this._container,a,"popup")},this._onClose=()=>{this.remove()},this.options=s.e(Object.create(Wl),u)}addTo(u){return this._map&&this.remove(),this._map=u,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 s.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(u){return this._lngLat=s.L.convert(u),this._pos=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._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(u){return this.setDOMContent(document.createTextNode(u))}setHTML(u){const t=document.createDocumentFragment(),n=document.createElement("body");let a;for(n.innerHTML=u;a=n.firstChild,a;)t.appendChild(a);return this.setDOMContent(t)}getMaxWidth(){var u;return(u=this._container)===null||u===void 0?void 0:u.style.maxWidth}setMaxWidth(u){return this.options.maxWidth=u,this._update(),this}setDOMContent(u){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=V.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(u),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(u){this._container&&this._container.classList.add(u)}removeClassName(u){this._container&&this._container.classList.remove(u)}setOffset(u){return this.options.offset=u,this._update(),this}toggleClassName(u){if(this._container)return this._container.classList.toggle(u)}_createCloseButton(){this.options.closeButton&&(this._closeButton=V.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 u=this._container.querySelector(Hl);u&&u.focus()}},Si.Marker=Fs,Si.Style=Er,Si.LngLat=s.L,Si.LngLatBounds=Tt,Si.Point=s.P,Si.MercatorCoordinate=s.U,Si.Evented=s.E,Si.AJAXError=s.bi,Si.config=s.c,Si.CanvasSource=_r,Si.GeoJSONSource=He,Si.ImageSource=ct,Si.RasterDEMTileSource=Pt,Si.RasterTileSource=Le,Si.VectorTileSource=Oi,Si.VideoSource=Zi,Si.setRTLTextPlugin=s.bj,Si.getRTLTextPluginStatus=s.bk,Si.prewarm=function(){qo().acquire(ii)},Si.clearPrewarmedResources=function(){const u=Un;u&&(u.isPreloaded()&&u.numActive()===1?(u.release(ii),Un=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()"))},Xl.extend(Si,{isSafari:s.ac,getPerformanceMetrics:s.bg.getPerformanceMetrics}),Si});var B=E;return B})})(Qp);var V_=Qp.exports;const is=Yp(V_);function vp(m){let f;return _=>{if(_)for(let v in _){let E=f==null?void 0:f[v],k=_[v];E!==k&&m(v,k,E)}else if(f)for(let v in f)m(v,void 0,f[v]);f=_}}function U_(m,...f){let _=[m];for(let v of f)if(v)Array.isArray(v)&&v[0]===m?_.push(...v.slice(1)):_.push(v);else continue;if(_.length!==1)return _.length===2?_[1]:_}function j_(m){return m===!0?["has","point_count"]:m===!1?["!",["has","point_count"]]:void 0}function q_(m,f){return["case",["boolean",["feature-state","hover"],!1],f,m]}var gu=Z_;function Z_(m){var f,_,v;if(m){if(Array.isArray(m)){for(f=[],_=m.length,v=0;v<_;v++){var E=m[v];E!=null&&f.push(E)}return f}if(typeof m=="object"){f={};var k=Object.keys(m);for(_=k.length,v=0;v<_;v++){var B=k[v],s=m[B];s!=null&&(f[B]=s)}return f}}}function xp(m){let f=m[0],_,v,E=bp(m);return{c(){E.c(),_=Oa()},m(k,B){E.m(k,B),ci(k,_,B),v=!0},p(k,B){B[0]&1&&Tr(f,f=k[0])?(rs(),St(E,1,1,Ar),ns(),E=bp(k),E.c(),ft(E,1),E.m(_.parentNode,_)):E.p(k,B)},i(k){v||(ft(E),v=!0)},o(k){St(E),v=!1},d(k){k&&si(_),E.d(k)}}}function bp(m){let f;const _=m[37].default,v=Js(_,m,m[36],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k[1]&32)&&Qs(v,_,E,E[36],f?Ys(_,E[36],k,null):$s(E[36]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function G_(m){let f,_,v=m[0]&&xp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),ci(E,f,k),_=!0},p(E,k){E[0]?v?(v.p(E,k),k[0]&1&&ft(v,1)):(v=xp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&si(f),v&&v.d(E)}}}function W_(m,f,_){let v,E,k,B,s,H,V,ge,be,_e,Ie,De,{$$slots:Fe={},$$scope:Ne}=f,{id:et=Dc("layer")}=f,{source:at=void 0}=f,{sourceLayer:nt=void 0}=f,{beforeId:it=void 0}=f,{beforeLayerType:Vt=void 0}=f,{type:ti}=f,{paint:Xt=void 0}=f,{layout:Nt=void 0}=f,{filter:Yt=void 0}=f,{applyToClusters:At=void 0}=f,{minzoom:ke=void 0}=f,{maxzoom:Ge=void 0}=f,{manageHoverState:Ui=!1}=f,{hovered:Dt=null}=f,{interactive:qt=!0}=f,{hoverCursor:Lt=void 0}=f,{eventsIfTopMost:di=!1}=f;const Pi=Ih(),{map:en,source:Vr,self:zi,minzoom:Ti,maxzoom:Tt,eventTopMost:pi,layerInfo:Oi}=B_();$r(m,en,He=>_(32,be=He)),$r(m,Vr,He=>_(33,_e=He)),$r(m,zi,He=>_(0,ge=He)),$r(m,Ti,He=>_(35,De=He)),$r(m,Tt,He=>_(34,Ie=He)),Ba(()=>{ge&&be&&(Oi.delete(ge),be==null||be.removeLayer(ge))});let Le,Pt=!0;return m.$$set=He=>{"id"in He&&_(7,et=He.id),"source"in He&&_(8,at=He.source),"sourceLayer"in He&&_(9,nt=He.sourceLayer),"beforeId"in He&&_(10,it=He.beforeId),"beforeLayerType"in He&&_(11,Vt=He.beforeLayerType),"type"in He&&_(12,ti=He.type),"paint"in He&&_(13,Xt=He.paint),"layout"in He&&_(14,Nt=He.layout),"filter"in He&&_(15,Yt=He.filter),"applyToClusters"in He&&_(16,At=He.applyToClusters),"minzoom"in He&&_(17,ke=He.minzoom),"maxzoom"in He&&_(18,Ge=He.maxzoom),"manageHoverState"in He&&_(19,Ui=He.manageHoverState),"hovered"in He&&_(6,Dt=He.hovered),"interactive"in He&&_(20,qt=He.interactive),"hoverCursor"in He&&_(21,Lt=He.hoverCursor),"eventsIfTopMost"in He&&_(22,di=He.eventsIfTopMost),"$$scope"in He&&_(36,Ne=He.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&65536&&_(31,v=j_(At)),m.$$.dirty[0]&32768|m.$$.dirty[1]&1&&_(25,E=U_("all",v,Yt)),m.$$.dirty[0]&131072|m.$$.dirty[1]&16&&_(27,k=ke??De),m.$$.dirty[0]&262144|m.$$.dirty[1]&8&&_(26,B=Ge??Ie),m.$$.dirty[0]&256|m.$$.dirty[1]&4&&_(30,s=at||_e),m.$$.dirty[0]&1324908161|m.$$.dirty[1]&2&&be&&ge!==et&&s){let He=function(ct){var Bi,gr;if(!qt||!ge||!be||di&&pi(ct)!==ge)return;let Zi=ct.features??[],_r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id,Ue={event:ct,map:be,clusterId:_r,layer:ge,source:s,features:Zi};Pi(ct.type,Ue)};ge&&Oi.delete(ge);let Gt=it;if(!it&&Vt){let ct=be.getStyle().layers,Zi=typeof Vt=="function"?Vt:Ue=>Ue.type===Vt,_r=ct==null?void 0:ct.find(Zi);_r&&(Gt=_r.id)}rl(zi,ge=et,ge),be.addLayer(gu({id:ge,type:ti,source:s,"source-layer":nt,filter:E,paint:Xt,layout:Nt,minzoom:k,maxzoom:B}),Gt),_(24,Pt=!0),be.on("click",ge,He),be.on("dblclick",ge,He),be.on("contextmenu",ge,He),be.on("mouseenter",ge,ct=>{var Bi,gr;if(!qt||!ge||!be||di&&pi(ct)!==ge)return;Lt&&(be.getCanvas().style.cursor=Lt);let Zi=ct.features??[];_(6,Dt=Zi[0]??null);let _r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id;Pi("mouseenter",{event:ct,map:be,clusterId:_r,layer:ge,source:s,features:Zi})}),be.on("mousemove",ge,ct=>{var Bi,gr,ui;if(!qt)return;if(di&&pi(ct)!==ge){_(6,Dt=null),Ui&&Le!==void 0&&(be==null||be.setFeatureState({source:s,sourceLayer:nt,id:Le},{hover:!1}),_(23,Le=void 0));return}be.getCanvas().style.cursor=Lt;let Zi=ct.features??[],_r=(gr=(Bi=Zi[0])==null?void 0:Bi.properties)==null?void 0:gr.cluster_id,Ue=(ui=Zi[0])==null?void 0:ui.id;Ue!==Le&&(Ui&&(Le!==void 0&&(be==null||be.setFeatureState({source:s,id:Le,sourceLayer:nt},{hover:!1})),be==null||be.setFeatureState({source:s,id:Ue,sourceLayer:nt},{hover:!0})),_(23,Le=Ue),_(6,Dt=Zi[0]??null)),Pi("mousemove",{event:ct,map:be,clusterId:_r,layer:ge,source:s,features:Zi})}),be.on("mouseleave",ge,ct=>{if(!(!qt||!ge||!be)){if(Lt&&(be.getCanvas().style.cursor=""),_(6,Dt=null),Ui&&Le!==void 0){const Zi={source:s,id:Le,sourceLayer:nt};be==null||be.setFeatureState(Zi,{hover:!1}),_(23,Le=void 0)}Pi("mouseleave",{map:be,layer:ge,source:s})}})}m.$$.dirty[0]&1048577&&ge&&Oi.set(ge,{interactive:qt}),m.$$.dirty[0]&1|m.$$.dirty[1]&2&&_(29,H=ge?vp((He,Gt)=>be==null?void 0:be.setPaintProperty(ge,He,Gt)):void 0),m.$$.dirty[0]&1|m.$$.dirty[1]&2&&_(28,V=ge?vp((He,Gt)=>be==null?void 0:be.setLayoutProperty(ge,He,Gt)):void 0),m.$$.dirty[0]&536879104&&(H==null||H(Xt)),m.$$.dirty[0]&268451840&&(V==null||V(Nt)),m.$$.dirty[0]&201326593|m.$$.dirty[1]&2&&ge&&(be==null||be.setLayerZoomRange(ge,k,B)),m.$$.dirty[0]&50331649|m.$$.dirty[1]&2&&ge&&(Pt?_(24,Pt=!1):be==null||be.setFilter(ge,E))},[ge,en,Vr,zi,Ti,Tt,Dt,et,at,nt,it,Vt,ti,Xt,Nt,Yt,At,ke,Ge,Ui,qt,Lt,di,Le,Pt,E,B,k,V,H,s,v,be,_e,Ie,De,Ne,Fe]}class Ch extends Wr{constructor(f){super(),Gr(this,f,W_,G_,Tr,{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 H_(m){let f;const _=m[16].default,v=Js(_,m,m[24],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&16777216)&&Qs(v,_,E,E[24],f?Ys(_,E[24],k,null):$s(E[24]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function X_(m){let f,_,v;function E(B){m[17](B)}let k={id:m[1],type:"circle",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],applyToClusters:m[9],minzoom:m[10],maxzoom:m[11],hoverCursor:m[12],manageHoverState:m[13],eventsIfTopMost:m[14],interactive:m[15],$$slots:{default:[H_]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),ea.push(()=>Lc(f,"hovered",E)),f.$on("click",m[18]),f.$on("dblclick",m[19]),f.$on("contextmenu",m[20]),f.$on("mouseenter",m[21]),f.$on("mousemove",m[22]),f.$on("mouseleave",m[23]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.applyToClusters=B[9]),s&1024&&(H.minzoom=B[10]),s&2048&&(H.maxzoom=B[11]),s&4096&&(H.hoverCursor=B[12]),s&8192&&(H.manageHoverState=B[13]),s&16384&&(H.eventsIfTopMost=B[14]),s&32768&&(H.interactive=B[15]),s&16777216&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],zc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function K_(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Dc("circle")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:V=void 0}=f,{paint:ge}=f,{layout:be=void 0}=f,{filter:_e=void 0}=f,{applyToClusters:Ie=void 0}=f,{minzoom:De=void 0}=f,{maxzoom:Fe=void 0}=f,{hoverCursor:Ne=void 0}=f,{manageHoverState:et=!1}=f,{hovered:at=null}=f,{eventsIfTopMost:nt=!1}=f,{interactive:it=!0}=f;function Vt(Ge){at=Ge,_(0,at)}function ti(Ge){pn.call(this,m,Ge)}function Xt(Ge){pn.call(this,m,Ge)}function Nt(Ge){pn.call(this,m,Ge)}function Yt(Ge){pn.call(this,m,Ge)}function At(Ge){pn.call(this,m,Ge)}function ke(Ge){pn.call(this,m,Ge)}return m.$$set=Ge=>{"id"in Ge&&_(1,k=Ge.id),"source"in Ge&&_(2,B=Ge.source),"sourceLayer"in Ge&&_(3,s=Ge.sourceLayer),"beforeId"in Ge&&_(4,H=Ge.beforeId),"beforeLayerType"in Ge&&_(5,V=Ge.beforeLayerType),"paint"in Ge&&_(6,ge=Ge.paint),"layout"in Ge&&_(7,be=Ge.layout),"filter"in Ge&&_(8,_e=Ge.filter),"applyToClusters"in Ge&&_(9,Ie=Ge.applyToClusters),"minzoom"in Ge&&_(10,De=Ge.minzoom),"maxzoom"in Ge&&_(11,Fe=Ge.maxzoom),"hoverCursor"in Ge&&_(12,Ne=Ge.hoverCursor),"manageHoverState"in Ge&&_(13,et=Ge.manageHoverState),"hovered"in Ge&&_(0,at=Ge.hovered),"eventsIfTopMost"in Ge&&_(14,nt=Ge.eventsIfTopMost),"interactive"in Ge&&_(15,it=Ge.interactive),"$$scope"in Ge&&_(24,E=Ge.$$scope)},[at,k,B,s,H,V,ge,be,_e,Ie,De,Fe,Ne,et,nt,it,v,Vt,ti,Xt,Nt,Yt,At,ke,E]}class ef extends Wr{constructor(f){super(),Gr(this,f,K_,X_,Tr,{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 J_(m){let f;const _=m[15].default,v=Js(_,m,m[23],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&8388608)&&Qs(v,_,E,E[23],f?Ys(_,E[23],k,null):$s(E[23]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function Y_(m){let f,_,v;function E(B){m[16](B)}let k={id:m[1],type:"fill",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],minzoom:m[9],maxzoom:m[10],hoverCursor:m[11],manageHoverState:m[12],eventsIfTopMost:m[13],interactive:m[14],$$slots:{default:[J_]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),ea.push(()=>Lc(f,"hovered",E)),f.$on("click",m[17]),f.$on("dblclick",m[18]),f.$on("contextmenu",m[19]),f.$on("mouseenter",m[20]),f.$on("mousemove",m[21]),f.$on("mouseleave",m[22]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.minzoom=B[9]),s&1024&&(H.maxzoom=B[10]),s&2048&&(H.hoverCursor=B[11]),s&4096&&(H.manageHoverState=B[12]),s&8192&&(H.eventsIfTopMost=B[13]),s&16384&&(H.interactive=B[14]),s&8388608&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],zc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function Q_(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Dc("fill")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:V=void 0}=f,{paint:ge}=f,{layout:be=void 0}=f,{filter:_e=void 0}=f,{minzoom:Ie=void 0}=f,{maxzoom:De=void 0}=f,{hoverCursor:Fe=void 0}=f,{manageHoverState:Ne=!1}=f,{hovered:et=null}=f,{eventsIfTopMost:at=!1}=f,{interactive:nt=!0}=f;function it(ke){et=ke,_(0,et)}function Vt(ke){pn.call(this,m,ke)}function ti(ke){pn.call(this,m,ke)}function Xt(ke){pn.call(this,m,ke)}function Nt(ke){pn.call(this,m,ke)}function Yt(ke){pn.call(this,m,ke)}function At(ke){pn.call(this,m,ke)}return m.$$set=ke=>{"id"in ke&&_(1,k=ke.id),"source"in ke&&_(2,B=ke.source),"sourceLayer"in ke&&_(3,s=ke.sourceLayer),"beforeId"in ke&&_(4,H=ke.beforeId),"beforeLayerType"in ke&&_(5,V=ke.beforeLayerType),"paint"in ke&&_(6,ge=ke.paint),"layout"in ke&&_(7,be=ke.layout),"filter"in ke&&_(8,_e=ke.filter),"minzoom"in ke&&_(9,Ie=ke.minzoom),"maxzoom"in ke&&_(10,De=ke.maxzoom),"hoverCursor"in ke&&_(11,Fe=ke.hoverCursor),"manageHoverState"in ke&&_(12,Ne=ke.manageHoverState),"hovered"in ke&&_(0,et=ke.hovered),"eventsIfTopMost"in ke&&_(13,at=ke.eventsIfTopMost),"interactive"in ke&&_(14,nt=ke.interactive),"$$scope"in ke&&_(23,E=ke.$$scope)},[et,k,B,s,H,V,ge,be,_e,Ie,De,Fe,Ne,at,nt,v,it,Vt,ti,Xt,Nt,Yt,At,E]}class tf extends Wr{constructor(f){super(),Gr(this,f,Q_,Y_,Tr,{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 $_(m,f,_){let v;const{map:E}=Ll();$r(m,E,H=>_(4,v=H));let{position:k="top-left"}=f,{container:B=void 0}=f,s=null;return Ba(()=>{v!=null&&v.loaded()&&s&&v.removeControl(s)}),m.$$set=H=>{"position"in H&&_(1,k=H.position),"container"in H&&_(2,B=H.container)},m.$$.update=()=>{if(m.$$.dirty&30&&v&&!s){let H;typeof B=="string"?H=document.querySelector(B)??void 0:H=B,_(3,s=new is.FullscreenControl({container:H})),v.addControl(s,k)}},[E,k,B,s,v]}class eg extends Wr{constructor(f){super(),Gr(this,f,$_,null,Tr,{position:1,container:2})}}function tg(m,f,_,v,E){let k=!1;m.getSource(f)&&(k=!0,m.removeSource(f));const B=()=>{v(f)&&(m.addSource(f,_),E())};if(k){const s=()=>{f&&(m.getSource(f)?setTimeout(s,1):B())};s()}else B()}function ig(m,f,_){v_().then(()=>{let v=h_(m);if(!v)return;v.getSource(f)===_&&v.removeSource(f)})}function wp(m){let f=m[0],_,v,E=Sp(m);return{c(){E.c(),_=Oa()},m(k,B){E.m(k,B),ci(k,_,B),v=!0},p(k,B){B&1&&Tr(f,f=k[0])?(rs(),St(E,1,1,Ar),ns(),E=Sp(k),E.c(),ft(E,1),E.m(_.parentNode,_)):E.p(k,B)},i(k){v||(ft(E),v=!0)},o(k){St(E),v=!1},d(k){k&&si(_),E.d(k)}}}function Sp(m){let f;const _=m[15].default,v=Js(_,m,m[14],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&16384)&&Qs(v,_,E,E[14],f?Ys(_,E[14],k,null):$s(E[14]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function rg(m){let f,_,v=m[0]&&wp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),ci(E,f,k),_=!0},p(E,[k]){E[0]?v?(v.p(E,k),k&1&&ft(v,1)):(v=wp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&si(f),v&&v.d(E)}}}function ng(m,f,_){let v,E,k,{$$slots:B={},$$scope:s}=f,{id:H=Dc("geojson")}=f,{data:V}=f,{generateId:ge=!1}=f,{promoteId:be=void 0}=f,{filter:_e=void 0}=f,{lineMetrics:Ie=void 0}=f,{cluster:De=void 0}=f;const{map:Fe,cluster:Ne,self:et}=O_();$r(m,Fe,it=>_(13,E=it)),$r(m,Ne,it=>_(16,k=it)),$r(m,et,it=>_(0,v=it));let at,nt=!0;return Ba(()=>{v&&at&&E&&(ig(Fe,v,at),rl(et,v=null,v),_(11,at=void 0))}),m.$$set=it=>{"id"in it&&_(4,H=it.id),"data"in it&&_(5,V=it.data),"generateId"in it&&_(6,ge=it.generateId),"promoteId"in it&&_(7,be=it.promoteId),"filter"in it&&_(8,_e=it.filter),"lineMetrics"in it&&_(9,Ie=it.lineMetrics),"cluster"in it&&_(10,De=it.cluster),"$$scope"in it&&_(14,s=it.$$scope)},m.$$.update=()=>{m.$$.dirty&1024&&rl(Ne,k=De,k),m.$$.dirty&12273&&E&&v!==H&&(rl(et,v=H,v),tg(E,v,gu({type:"geojson",data:V,filter:_e,lineMetrics:Ie,generateId:ge,promoteId:be,cluster:!!De,clusterMinPoints:De==null?void 0:De.minPoints,clusterMaxZoom:De==null?void 0:De.maxZoom,clusterRadius:De==null?void 0:De.radius,clusterProperties:De==null?void 0:De.properties}),it=>E&&it===v,()=>{v&&(_(11,at=E==null?void 0:E.getSource(v)),_(12,nt=!0))})),m.$$.dirty&8208&&(E==null||E.on("style.load",()=>{_(11,at=E==null?void 0:E.getSource(H))})),m.$$.dirty&6176&&at&&(nt?_(12,nt=!1):at.setData(V)),m.$$.dirty&3072&&(at==null||at.setClusterOptions(gu({cluster:!!De,clusterMaxZoom:De==null?void 0:De.maxZoom,clusterRadius:De==null?void 0:De.radius})))},[v,Fe,Ne,et,H,V,ge,be,_e,Ie,De,at,nt,E,s,B]}class Mh extends Wr{constructor(f){super(),Gr(this,f,ng,rg,Tr,{id:4,data:5,generateId:6,promoteId:7,filter:8,lineMetrics:9,cluster:10})}}function og(m,f,_){let v;const{map:E}=Ll();$r(m,E,_e=>_(8,v=_e));let{position:k="top-left"}=f,{positionOptions:B=void 0}=f,{fitBoundsOptions:s=void 0}=f,{trackUserLocation:H=!1}=f,{showAccuracyCircle:V=!0}=f,{showUserLocation:ge=!0}=f,be=null;return Ba(()=>{v!=null&&v.loaded()&&be&&v.removeControl(be)}),m.$$set=_e=>{"position"in _e&&_(1,k=_e.position),"positionOptions"in _e&&_(2,B=_e.positionOptions),"fitBoundsOptions"in _e&&_(3,s=_e.fitBoundsOptions),"trackUserLocation"in _e&&_(4,H=_e.trackUserLocation),"showAccuracyCircle"in _e&&_(5,V=_e.showAccuracyCircle),"showUserLocation"in _e&&_(6,ge=_e.showUserLocation)},m.$$.update=()=>{m.$$.dirty&510&&v&&!be&&(_(7,be=new is.GeolocateControl({positionOptions:B,fitBoundsOptions:s,trackUserLocation:H,showAccuracyCircle:V,showUserLocation:ge})),v.addControl(be,k))},[E,k,B,s,H,V,ge,be,v]}class sg extends Wr{constructor(f){super(),Gr(this,f,og,null,Tr,{position:1,positionOptions:2,fitBoundsOptions:3,trackUserLocation:4,showAccuracyCircle:5,showUserLocation:6})}}function ag(m){let f;const _=m[15].default,v=Js(_,m,m[23],null);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k&8388608)&&Qs(v,_,E,E[23],f?Ys(_,E[23],k,null):$s(E[23]),null)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function lg(m){let f,_,v;function E(B){m[16](B)}let k={id:m[1],type:"line",source:m[2],sourceLayer:m[3],beforeId:m[4],beforeLayerType:m[5],paint:m[6],layout:m[7],filter:m[8],minzoom:m[9],maxzoom:m[10],hoverCursor:m[11],manageHoverState:m[12],eventsIfTopMost:m[13],interactive:m[14],$$slots:{default:[ag]},$$scope:{ctx:m}};return m[0]!==void 0&&(k.hovered=m[0]),f=new Ch({props:k}),ea.push(()=>Lc(f,"hovered",E)),f.$on("click",m[17]),f.$on("dblclick",m[18]),f.$on("contextmenu",m[19]),f.$on("mouseenter",m[20]),f.$on("mousemove",m[21]),f.$on("mouseleave",m[22]),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,[s]){const H={};s&2&&(H.id=B[1]),s&4&&(H.source=B[2]),s&8&&(H.sourceLayer=B[3]),s&16&&(H.beforeId=B[4]),s&32&&(H.beforeLayerType=B[5]),s&64&&(H.paint=B[6]),s&128&&(H.layout=B[7]),s&256&&(H.filter=B[8]),s&512&&(H.minzoom=B[9]),s&1024&&(H.maxzoom=B[10]),s&2048&&(H.hoverCursor=B[11]),s&4096&&(H.manageHoverState=B[12]),s&8192&&(H.eventsIfTopMost=B[13]),s&16384&&(H.interactive=B[14]),s&8388608&&(H.$$scope={dirty:s,ctx:B}),!_&&s&1&&(_=!0,H.hovered=B[0],zc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function cg(m,f,_){let{$$slots:v={},$$scope:E}=f,{id:k=Dc("line")}=f,{source:B=void 0}=f,{sourceLayer:s=void 0}=f,{beforeId:H=void 0}=f,{beforeLayerType:V=void 0}=f,{paint:ge}=f,{layout:be=void 0}=f,{filter:_e=void 0}=f,{minzoom:Ie=void 0}=f,{maxzoom:De=void 0}=f,{hoverCursor:Fe=void 0}=f,{manageHoverState:Ne=!1}=f,{hovered:et=null}=f,{eventsIfTopMost:at=!1}=f,{interactive:nt=!0}=f;function it(ke){et=ke,_(0,et)}function Vt(ke){pn.call(this,m,ke)}function ti(ke){pn.call(this,m,ke)}function Xt(ke){pn.call(this,m,ke)}function Nt(ke){pn.call(this,m,ke)}function Yt(ke){pn.call(this,m,ke)}function At(ke){pn.call(this,m,ke)}return m.$$set=ke=>{"id"in ke&&_(1,k=ke.id),"source"in ke&&_(2,B=ke.source),"sourceLayer"in ke&&_(3,s=ke.sourceLayer),"beforeId"in ke&&_(4,H=ke.beforeId),"beforeLayerType"in ke&&_(5,V=ke.beforeLayerType),"paint"in ke&&_(6,ge=ke.paint),"layout"in ke&&_(7,be=ke.layout),"filter"in ke&&_(8,_e=ke.filter),"minzoom"in ke&&_(9,Ie=ke.minzoom),"maxzoom"in ke&&_(10,De=ke.maxzoom),"hoverCursor"in ke&&_(11,Fe=ke.hoverCursor),"manageHoverState"in ke&&_(12,Ne=ke.manageHoverState),"hovered"in ke&&_(0,et=ke.hovered),"eventsIfTopMost"in ke&&_(13,at=ke.eventsIfTopMost),"interactive"in ke&&_(14,nt=ke.interactive),"$$scope"in ke&&_(23,E=ke.$$scope)},[et,k,B,s,H,V,ge,be,_e,Ie,De,Fe,Ne,at,nt,v,it,Vt,ti,Xt,Nt,Yt,At,E]}class Ah extends Wr{constructor(f){super(),Gr(this,f,cg,lg,Tr,{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 ug(m){let f=m.getCenter(),_=Math.round(m.getZoom()*100)/100,v=Math.ceil((_*Math.LN2+Math.log(512/360/.5))/Math.LN10),E=Math.pow(10,v),k=Math.round(f.lat*E)/E,B=Math.round(f.lng*E)/E,s=`${_}/${k}/${B}`,H=m.getBearing(),V=m.getPitch();return(H||V)&&(s+=`/${Math.round(H*10)/10}`),V&&(s+=`/${Math.round(V)}`),`#${s}`}function hg(m){return m.replace("#","").split("/").map(parseFloat)}var uu=kh;function kh(m,f){return m===f||m!==m&&f!==f?!0:typeof m!=typeof f||{}.toString.call(m)!={}.toString.call(f)||m!==Object(m)||!m?!1:Array.isArray(m)?Tp(m,f):{}.toString.call(m)=="[object Set]"?Tp(Array.from(m),Array.from(f)):{}.toString.call(m)=="[object Object]"?pg(m,f):dg(m,f)}function dg(m,f){return m.toString()===f.toString()}function Tp(m,f){var _=m.length;if(_!=f.length)return!1;for(var v=0;v<_;v++)if(!kh(m[v],f[v]))return!1;return!0}function pg(m,f){var _=Object.keys(m),v=_.length;if(v!=Object.keys(f).length)return!1;for(var E=0;E_(6,v=ge));let{position:k="top-left"}=f,{showCompass:B=!0}=f,{showZoom:s=!0}=f,{visualizePitch:H=!1}=f,V=null;return Ba(()=>{v!=null&&v.loaded()&&V&&v.removeControl(V)}),m.$$set=ge=>{"position"in ge&&_(1,k=ge.position),"showCompass"in ge&&_(2,B=ge.showCompass),"showZoom"in ge&&_(3,s=ge.showZoom),"visualizePitch"in ge&&_(4,H=ge.visualizePitch)},m.$$.update=()=>{m.$$.dirty&126&&v&&!V&&(_(5,V=new is.NavigationControl({showCompass:B,showZoom:s,visualizePitch:H})),v.addControl(V,k))},[E,k,B,s,H,V,v]}class mg extends Wr{constructor(f){super(),Gr(this,f,fg,null,Tr,{position:1,showCompass:2,showZoom:3,visualizePitch:4})}}function _g(m,f,_){let v;const{map:E}=Ll();$r(m,E,V=>_(5,v=V));let{position:k="bottom-left"}=f,{maxWidth:B=void 0}=f,{unit:s="metric"}=f,H=null;return Ba(()=>{v!=null&&v.loaded()&&H&&v.removeControl(H)}),m.$$set=V=>{"position"in V&&_(1,k=V.position),"maxWidth"in V&&_(2,B=V.maxWidth),"unit"in V&&_(3,s=V.unit)},m.$$.update=()=>{m.$$.dirty&62&&v&&!H&&(_(4,H=new is.ScaleControl({maxWidth:B,unit:s})),v.addControl(H,k))},[E,k,B,s,H,v]}class gg extends Wr{constructor(f){super(),Gr(this,f,_g,null,Tr,{position:1,maxWidth:2,unit:3})}}const yg=m=>({map:m[0]&8,loadedImages:m[0]&16,allImagesLoaded:m[0]&32}),Ip=m=>({map:m[3],loadedImages:m[4],allImagesLoaded:m[5]});function Ep(m){let f,_,v=m[2]&&Cp(m);const E=m[33].default,k=Js(E,m,m[32],Ip);return{c(){v&&v.c(),f=fn(),k&&k.c()},m(B,s){v&&v.m(B,s),ci(B,f,s),k&&k.m(B,s),_=!0},p(B,s){B[2]?v?(v.p(B,s),s[0]&4&&ft(v,1)):(v=Cp(B),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns()),k&&k.p&&(!_||s[0]&56|s[1]&2)&&Qs(k,E,B,B[32],_?Ys(E,B[32],s,yg):$s(B[32]),Ip)},i(B){_||(ft(v),ft(k,B),_=!0)},o(B){St(v),St(k,B),_=!1},d(B){B&&si(f),v&&v.d(B),k&&k.d(B)}}}function Cp(m){let f,_,v,E,k,B,s,H;return f=new mg({props:{position:m[6]}}),v=new sg({props:{position:m[6],fitBoundsOptions:{maxZoom:12}}}),k=new eg({props:{position:m[6]}}),s=new gg({props:{position:m[6]}}),{c(){Ri(f.$$.fragment),_=fn(),Ri(v.$$.fragment),E=fn(),Ri(k.$$.fragment),B=fn(),Ri(s.$$.fragment)},m(V,ge){Ai(f,V,ge),ci(V,_,ge),Ai(v,V,ge),ci(V,E,ge),Ai(k,V,ge),ci(V,B,ge),Ai(s,V,ge),H=!0},p(V,ge){const be={};ge[0]&64&&(be.position=V[6]),f.$set(be);const _e={};ge[0]&64&&(_e.position=V[6]),v.$set(_e);const Ie={};ge[0]&64&&(Ie.position=V[6]),k.$set(Ie);const De={};ge[0]&64&&(De.position=V[6]),s.$set(De)},i(V){H||(ft(f.$$.fragment,V),ft(v.$$.fragment,V),ft(k.$$.fragment,V),ft(s.$$.fragment,V),H=!0)},o(V){St(f.$$.fragment,V),St(v.$$.fragment,V),St(k.$$.fragment,V),St(s.$$.fragment,V),H=!1},d(V){V&&(si(_),si(E),si(B)),ki(f,V),ki(v,V),ki(k,V),ki(s,V)}}}function vg(m){let f,_,v,E,k,B=m[3]&&m[0]&&Ep(m);return{c(){f=Zt("div"),B&&B.c(),vs(f,"class",_=fp(m[1])+" svelte-p00lfq"),_p(f,"expand-map",!m[1])},m(s,H){ci(s,f,H),B&&B.m(f,null),v=!0,E||(k=p_(m[9].call(null,f)),E=!0)},p(s,H){s[3]&&s[0]?B?(B.p(s,H),H[0]&9&&ft(B,1)):(B=Ep(s),B.c(),ft(B,1),B.m(f,null)):B&&(rs(),St(B,1,1,()=>{B=null}),ns()),(!v||H[0]&2&&_!==(_=fp(s[1])+" svelte-p00lfq"))&&vs(f,"class",_),(!v||H[0]&2)&&_p(f,"expand-map",!s[1])},i(s){v||(ft(B),v=!0)},o(s){St(B),v=!1},d(s){s&&si(f),B&&B.d(),E=!1,k()}}}function xg(m,f,_){let v,E,k,B,{$$slots:s={},$$scope:H}=f,{map:V=null}=f,{class:ge=void 0}=f,{style:be}=f,{diffStyleUpdates:_e=!1}=f,{center:Ie=void 0}=f,{zoom:De=void 0}=f,{pitch:Fe=0}=f,{bearing:Ne=0}=f,{bounds:et=void 0}=f,{hash:at=!1}=f,{loaded:nt=!1}=f,{minZoom:it=0}=f,{maxZoom:Vt=22}=f,{zoomOnDoubleClick:ti=!0}=f,{interactive:Xt=!0}=f,{attributionControl:Nt=!0}=f,{preserveDrawingBuffer:Yt=!1}=f,{maxBounds:At=void 0}=f,{images:ke=[]}=f,{standardControls:Ge=!1}=f,{filterLayers:Ui=void 0}=f,{transformRequest:Dt=void 0}=f;const qt=Ih(),{map:Lt,loadedImages:di}=R_();$r(m,Lt,Le=>_(3,k=Le)),$r(m,di,Le=>_(4,B=Le));let Pi=new Set;function en(Le){k!=null&&k.loaded()&&("url"in Le?(Pi.add(Le.id),k.loadImage(Le.url,(Pt,He)=>{Pi.delete(Le.id),Pt?qt("error",Pt):He&&(k==null||k.addImage(Le.id,He,Le.options),B.add(Le.id),di.set(B))})):(k.addImage(Le.id,Le.data,Le.options),B.add(Le.id),di.set(B)))}let Vr,zi,Ti,Tt;function pi(Le){if(at){let Pt=hg(window.location.hash);Pt.length>=3&&(_(11,De=Pt[0]),_(10,Ie=[Pt[2],Pt[1]])),Pt.length==5&&(_(15,Ne=Pt[3]),_(14,Fe=Pt[4]))}return rl(Lt,k=new is.Map(gu({container:Le,style:be,center:Ie,zoom:De,pitch:Fe,bearing:Ne,minZoom:it,maxZoom:Vt,interactive:Xt,preserveDrawingBuffer:Yt,maxBounds:At,bounds:et,attributionControl:Nt,transformRequest:Dt})),k),k.on("load",Pt=>{_(0,nt=!0),qt("load",k)}),k.on("error",Pt=>qt("error",{...Pt,map:k})),k.on("movestart",Pt=>qt("movestart",{...Pt,map:k})),k.on("moveend",Pt=>{if(_(10,Ie=Pt.target.getCenter()),_(11,De=Pt.target.getZoom()),_(12,et=Pt.target.getBounds()),qt("moveend",{...Pt,map:k}),at){let He=window.location.href.replace(/(#.+)?$/,ug(k));window.history.replaceState(window.history.state,"",He)}}),k.on("zoomstart",Pt=>qt("zoomstart",{...Pt,map:k})),k.on("zoom",Pt=>{_(11,De=Pt.target.getZoom()),qt("zoom",{...Pt,map:k})}),k.on("zoomend",Pt=>{_(11,De=Pt.target.getZoom()),qt("zoomend",{...Pt,map:k})}),k.on("style.load",()=>{if(k){const Pt=k.getStyle();if(_(29,Vr=Pt.layers.map(He=>He.id)),_(30,zi=Object.keys(Pt.sources)),Tt)for(const[He,Gt]of Object.entries(Tt))k.addSource(He,Gt);if(Ti)for(const He of Ti)k.addLayer(He)}}),k.on("styledata",Pt=>{if(k&&Ui){const He=k.getStyle().layers;if(He)for(let Gt of He)Ui(Gt)||k.setLayoutProperty(Gt.id,"visibility","none")}qt("styledata",{...Pt,map:k})}),{destroy(){_(0,nt=!1),k==null||k.remove(),rl(Lt,k=null,k)}}}let Oi=be;return m.$$set=Le=>{"map"in Le&&_(13,V=Le.map),"class"in Le&&_(1,ge=Le.class),"style"in Le&&_(16,be=Le.style),"diffStyleUpdates"in Le&&_(17,_e=Le.diffStyleUpdates),"center"in Le&&_(10,Ie=Le.center),"zoom"in Le&&_(11,De=Le.zoom),"pitch"in Le&&_(14,Fe=Le.pitch),"bearing"in Le&&_(15,Ne=Le.bearing),"bounds"in Le&&_(12,et=Le.bounds),"hash"in Le&&_(18,at=Le.hash),"loaded"in Le&&_(0,nt=Le.loaded),"minZoom"in Le&&_(19,it=Le.minZoom),"maxZoom"in Le&&_(20,Vt=Le.maxZoom),"zoomOnDoubleClick"in Le&&_(21,ti=Le.zoomOnDoubleClick),"interactive"in Le&&_(22,Xt=Le.interactive),"attributionControl"in Le&&_(23,Nt=Le.attributionControl),"preserveDrawingBuffer"in Le&&_(24,Yt=Le.preserveDrawingBuffer),"maxBounds"in Le&&_(25,At=Le.maxBounds),"images"in Le&&_(26,ke=Le.images),"standardControls"in Le&&_(2,Ge=Le.standardControls),"filterLayers"in Le&&_(27,Ui=Le.filterLayers),"transformRequest"in Le&&_(28,Dt=Le.transformRequest),"$$scope"in Le&&_(32,H=Le.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&4&&_(6,v=typeof Ge=="boolean"?void 0:Ge),m.$$.dirty[0]&8&&_(13,V=k),m.$$.dirty[0]&67108873&&nt&&k!=null&&k.loaded())for(let Le of ke)!Pi.has(Le.id)&&!k.hasImage(Le.id)&&en(Le);if(m.$$.dirty[0]&67108880&&_(5,E=ke.every(Le=>B.has(Le.id))),m.$$.dirty[0]&1610809352|m.$$.dirty[1]&1&&k&&!uu(be,Oi)){const Le=k.getStyle();if(Vr&&(Ti=Le.layers.filter(Pt=>!Vr.includes(Pt.id))),zi){const Pt=Object.keys(Le.sources).filter(He=>!zi.includes(He));Tt={};for(const He of Pt)Tt[He]=Le.sources[He]}_(31,Oi=be),k.setStyle(be,{diff:_e})}m.$$.dirty[0]&1032&&Ie&&!uu(Ie,k==null?void 0:k.getCenter())&&(k==null||k.panTo(Ie)),m.$$.dirty[0]&2056&&De&&!uu(De,k==null?void 0:k.getZoom())&&(k==null||k.zoomTo(De)),m.$$.dirty[0]&4104&&et&&!uu(et,k==null?void 0:k.getBounds())&&(k==null||k.fitBounds(et)),m.$$.dirty[0]&2097160&&(ti?k==null||k.doubleClickZoom.enable():k==null||k.doubleClickZoom.disable())},[nt,ge,Ge,k,B,E,v,Lt,di,pi,Ie,De,et,V,Fe,Ne,be,_e,at,it,Vt,ti,Xt,Nt,Yt,At,ke,Ui,Dt,Vr,zi,Oi,H,s]}class bg extends Wr{constructor(f){super(),Gr(this,f,xg,vg,Tr,{map:13,class:1,style:16,diffStyleUpdates:17,center:10,zoom:11,pitch:14,bearing:15,bounds:12,hash:18,loaded:0,minZoom:19,maxZoom:20,zoomOnDoubleClick:21,interactive:22,attributionControl:23,preserveDrawingBuffer:24,maxBounds:25,images:26,standardControls:2,filterLayers:27,transformRequest:28},null,[-1,-1])}}const wg=m=>({features:m[0]&16,data:m[0]&16,map:m[0]&4,close:m[0]&1}),Mp=m=>{var f;return{features:m[4],data:(f=m[4])==null?void 0:f[0],map:m[2],close:m[31]}};function Ap(m){let f,_,v=(m[4]||m[3]instanceof is.Marker)&&kp(m);return{c(){f=Zt("div"),v&&v.c()},m(E,k){ci(E,f,k),v&&v.m(f,null),m[32](f),_=!0},p(E,k){E[4]||E[3]instanceof is.Marker?v?(v.p(E,k),k[0]&24&&ft(v,1)):(v=kp(E),v.c(),ft(v,1),v.m(f,null)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&si(f),v&&v.d(),m[32](null)}}}function kp(m){let f;const _=m[30].default,v=Js(_,m,m[29],Mp);return{c(){v&&v.c()},m(E,k){v&&v.m(E,k),f=!0},p(E,k){v&&v.p&&(!f||k[0]&536870933)&&Qs(v,_,E,E[29],f?Ys(_,E[29],k,wg):$s(E[29]),Mp)},i(E){f||(ft(v,E),f=!0)},o(E){St(v,E),f=!1},d(E){v&&v.d(E)}}}function Sg(m){let f,_,v=m[9].default&&Ap(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),ci(E,f,k),_=!0},p(E,k){E[9].default?v?(v.p(E,k),k[0]&512&&ft(v,1)):(v=Ap(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&si(f),v&&v.d(E)}}}function Tg(m,f,_){let v,E,k,B,s,H,{$$slots:V={},$$scope:ge}=f;const be=d_(V);let{closeButton:_e=void 0}=f,{closeOnClickOutside:Ie=!0}=f,{closeOnClickInside:De=!1}=f,{closeOnMove:Fe=!1}=f,{openOn:Ne="click"}=f,{openIfTopMost:et=!0}=f,{focusAfterOpen:at=!0}=f,{anchor:nt=void 0}=f,{offset:it=void 0}=f,{popupClass:Vt=void 0}=f,{maxWidth:ti=void 0}=f,{lngLat:Xt=void 0}=f,{html:Nt=void 0}=f,{open:Yt=!1}=f;const{map:At,popupTarget:ke,layerEvent:Ge,layer:Ui,eventTopMost:Dt}=Ll();$r(m,At,Ue=>_(2,k=Ue)),$r(m,ke,Ue=>_(3,s=Ue)),$r(m,Ge,Ue=>_(28,B=Ue)),$r(m,Ui,Ue=>_(35,H=Ue));const qt=["click","dblclick","contextmenu"];let Lt,di=!1,Pi;function en(){if(!Lt)return;let Ue=Lt.getElement();!Ue||Ue===Pi||(Pi=Ue,Ne==="hover"&&(Pi.style.pointerEvents="none"),Pi.addEventListener("mouseenter",()=>{_(24,di=!0)},{passive:!0}),Pi.addEventListener("mouseleave",()=>{_(24,di=!1)},{passive:!0}),Pi.addEventListener("click",()=>{De&&_(0,Yt=!1)},{passive:!0}))}jp(()=>{if(k)return k.on("click",Gt),k.on("contextmenu",Gt),typeof s=="string"&&(k.on("click",s,Tt),k.on("dblclick",s,Tt),k.on("contextmenu",s,Tt),k.on("mousemove",s,He),k.on("mouseleave",s,Pt),k.on("touchstart",s,Oi),k.on("touchend",s,Le)),()=>{k!=null&&k.loaded()&&(Lt==null||Lt.remove(),k.off("click",Gt),k.off("contextmenu",Gt),s instanceof is.Marker?s.getPopup()===Lt&&s.setPopup(void 0):typeof s=="string"&&(k.off("click",s,Tt),k.off("dblclick",s,Tt),k.off("contextmenu",s,Tt),k.off("mousemove",s,He),k.off("mouseleave",s,Pt),k.off("touchstart",s,Oi),k.off("touchend",s,Le)))}});function Vr(Ue){return et?!("marker"in Ue)&&!N_(Ue)&&Dt(Ue)!==H:!1}let zi=null,Ti="normal";function Tt(Ue){Ue.type===Ne&&(Vr(Ue)||("layerType"in Ue?Ue.layerType==="deckgl"?(_(10,Xt=Ue.coordinate),_(4,zi=Ue.object?[Ue.object]:null)):(_(10,Xt=Ue.lngLat),_(4,zi=Ue.features??[])):(_(10,Xt=Ue.lngLat),_(4,zi=Ue.features??[])),setTimeout(()=>_(0,Yt=!0))))}let pi=null;function Oi(Ue){pi=Ue.point}function Le(Ue){if(!pi||Ne!=="hover")return;let Bi=pi.dist(Ue.point);pi=null,Bi<3&&(_(10,Xt=Ue.lngLat),_(4,zi=Ue.features??[]),Lt.isOpen()?_(25,Ti="justOpened"):(_(25,Ti="opening"),_(0,Yt=!0)))}function Pt(Ue){Ne!=="hover"||pi||Ti!=="normal"||(_(0,Yt=!1),_(4,zi=null))}function He(Ue){if(!(Ne!=="hover"||pi||Ti!=="normal")){if(Vr(Ue)){_(0,Yt=!1),_(4,zi=null);return}_(0,Yt=!0),_(4,zi=Ue.features??[]),_(10,Xt=Ue.lngLat)}}function Gt(Ue){if(Ti==="justOpened"){_(25,Ti="normal");return}if(!Ie)return;let Bi=[Pi,s instanceof is.Marker?s==null?void 0:s.getElement():null];Yt&&Lt.isOpen()&&!Bi.some(gr=>gr==null?void 0:gr.contains(Ue.originalEvent.target))&&(Ue.type==="contextmenu"&&Ne==="contextmenu"||Ue.type!=="contextmenu")&&_(0,Yt=!1)}let ct;const Zi=()=>_(0,Yt=!1);function _r(Ue){ea[Ue?"unshift":"push"](()=>{ct=Ue,_(1,ct)})}return m.$$set=Ue=>{"closeButton"in Ue&&_(11,_e=Ue.closeButton),"closeOnClickOutside"in Ue&&_(12,Ie=Ue.closeOnClickOutside),"closeOnClickInside"in Ue&&_(13,De=Ue.closeOnClickInside),"closeOnMove"in Ue&&_(14,Fe=Ue.closeOnMove),"openOn"in Ue&&_(15,Ne=Ue.openOn),"openIfTopMost"in Ue&&_(16,et=Ue.openIfTopMost),"focusAfterOpen"in Ue&&_(17,at=Ue.focusAfterOpen),"anchor"in Ue&&_(18,nt=Ue.anchor),"offset"in Ue&&_(19,it=Ue.offset),"popupClass"in Ue&&_(20,Vt=Ue.popupClass),"maxWidth"in Ue&&_(21,ti=Ue.maxWidth),"lngLat"in Ue&&_(10,Xt=Ue.lngLat),"html"in Ue&&_(22,Nt=Ue.html),"open"in Ue&&_(0,Yt=Ue.open),"$$scope"in Ue&&_(29,ge=Ue.$$scope)},m.$$.update=()=>{if(m.$$.dirty[0]&14336&&_(27,v=_e??(!Ie&&!De)),m.$$.dirty[0]&146685952&&(Lt||(_(23,Lt=new is.Popup({closeButton:v,closeOnClick:!1,closeOnMove:Fe,focusAfterOpen:at,maxWidth:ti,className:Vt,anchor:nt,offset:it})),Pi=Lt.getElement(),Lt.on("open",()=>{_(0,Yt=!0),en()}),Lt.on("close",Ue=>{_(0,Yt=!1)}))),m.$$.dirty[0]&8421384&&Lt&&s instanceof is.Marker&&(Ne==="click"?s.setPopup(Lt):s.getPopup()===Lt&&s.setPopup(void 0)),m.$$.dirty[0]&268468224&&qt.includes(Ne)&&(B==null?void 0:B.type)===Ne&&(Tt(B),rl(Ge,B=null,B)),m.$$.dirty[0]&268468224&&_(26,E=Ne==="hover"&&((B==null?void 0:B.type)==="mousemove"||(B==null?void 0:B.type)==="mouseenter")),m.$$.dirty[0]&352354304&&Ne==="hover"&&Ge&&(E&&B&&(B.layerType==="deckgl"?(_(10,Xt=B.coordinate),_(4,zi=B.object?[B.object]:null)):(_(10,Xt=B.lngLat),_(4,zi=B.features??[]))),_(0,Yt=(E||di)??!1)),m.$$.dirty[0]&12582914&&(ct?Lt.setDOMContent(ct):Nt&&Lt.setHTML(Nt)),m.$$.dirty[0]&8389632&&Xt&&Lt.setLngLat(Xt),m.$$.dirty[0]&41943045&&k){let Ue=Lt.isOpen();Yt&&!Ue?(Lt.addTo(k),Ti==="opening"&&_(25,Ti="justOpened")):!Yt&&Ue&&Lt.remove()}},[Yt,ct,k,s,zi,At,ke,Ge,Ui,be,Xt,_e,Ie,De,Fe,Ne,et,at,nt,it,Vt,ti,Nt,Lt,di,Ti,E,v,B,ge,V,Zi,_r]}class Ph extends Wr{constructor(f){super(),Gr(this,f,Tg,Sg,Tr,{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])}}var Fc=Uint8Array,rf=Uint16Array,Ig=Int32Array,Eg=new Fc([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]),Cg=new Fc([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]),nf=function(m,f){for(var _=new rf(31),v=0;v<31;++v)_[v]=f+=1<>1|(Fi&21845)<<1,Gs=(Gs&52428)>>2|(Gs&13107)<<2,Gs=(Gs&61680)>>4|(Gs&3855)<<4,kg[Fi]=((Gs&65280)>>8|(Gs&255)<<8)>>1;var Gs,Fi,xu=new Fc(288);for(Fi=0;Fi<144;++Fi)xu[Fi]=8;var Fi;for(Fi=144;Fi<256;++Fi)xu[Fi]=9;var Fi;for(Fi=256;Fi<280;++Fi)xu[Fi]=7;var Fi;for(Fi=280;Fi<288;++Fi)xu[Fi]=8;var Fi,Pg=new Fc(32);for(Fi=0;Fi<32;++Fi)Pg[Fi]=5;var Fi,zg=new Fc(0),Lg=typeof TextDecoder<"u"&&new TextDecoder,Dg=0;try{Lg.decode(zg,{stream:!0}),Dg=1}catch{}const Fg=m=>({}),Pp=m=>({}),Rg=m=>({}),zp=m=>({});function Og(m){let f,_,v,E;const k=m[1].left,B=Js(k,m,m[0],zp),s=m[1].main,H=Js(s,m,m[0],Pp);return{c(){f=Zt("div"),B&&B.c(),_=fn(),v=Zt("div"),H&&H.c(),vs(f,"class","left svelte-6kzmjs"),vs(v,"class","main svelte-6kzmjs")},m(V,ge){ci(V,f,ge),B&&B.m(f,null),ci(V,_,ge),ci(V,v,ge),H&&H.m(v,null),E=!0},p(V,[ge]){B&&B.p&&(!E||ge&1)&&Qs(B,k,V,V[0],E?Ys(k,V[0],ge,Rg):$s(V[0]),zp),H&&H.p&&(!E||ge&1)&&Qs(H,s,V,V[0],E?Ys(s,V[0],ge,Fg):$s(V[0]),Pp)},i(V){E||(ft(B,V),ft(H,V),E=!0)},o(V){St(B,V),St(H,V),E=!1},d(V){V&&(si(f),si(_),si(v)),B&&B.d(V),H&&H.d(V)}}}function Bg(m,f,_){let{$$slots:v={},$$scope:E}=f;return m.$$set=k=>{"$$scope"in k&&_(0,E=k.$$scope)},[E,v]}class Ng extends Wr{constructor(f){super(),Gr(this,f,Bg,Og,Tr,{})}}function Lp(m){let f,_;return{c(){f=Zt("div"),_=ol(m[0]),vs(f,"class","svelte-1uuov7f")},m(v,E){ci(v,f,E),mi(f,_)},p(v,E){E&1&&yh(_,v[0])},d(v){v&&si(f)}}}function Vg(m){let f,_=m[0]&&Lp(m);return{c(){_&&_.c(),f=Oa()},m(v,E){_&&_.m(v,E),ci(v,f,E)},p(v,[E]){v[0]?_?_.p(v,E):(_=Lp(v),_.c(),_.m(f.parentNode,f)):_&&(_.d(1),_=null)},i:Ar,o:Ar,d(v){v&&si(f),_&&_.d(v)}}}function Ug(m,f,_){let{msg:v=null}=f;return m.$$set=E=>{"msg"in E&&_(0,v=E.msg)},[v]}class jg extends Wr{constructor(f){super(),Gr(this,f,Ug,Vg,Tr,{msg:0})}}var sf={exports:{}};(function(m,f){(function(_,v){m.exports=v()})(Al,function(){var _=function(g,I){var O={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},Y={on:function(se,fe,Re){if(O[se]===void 0)throw new Error("Invalid event type: "+se);O[se].push({selector:fe,fn:Re})},render:function(se){I.store.featureChanged(se)}},ne=function(se,fe){for(var Re=O[se],Ve=Re.length;Ve--;){var rt=Re[Ve];if(rt.selector(fe)){rt.fn.call(Y,fe)||I.store.render(),I.ui.updateMapClasses();break}}};return g.start.call(Y),{render:g.render,stop:function(){g.stop&&g.stop()},trash:function(){g.trash&&(g.trash(),I.store.render())},combineFeatures:function(){g.combineFeatures&&g.combineFeatures()},uncombineFeatures:function(){g.uncombineFeatures&&g.uncombineFeatures()},drag:function(se){ne("drag",se)},click:function(se){ne("click",se)},mousemove:function(se){ne("mousemove",se)},mousedown:function(se){ne("mousedown",se)},mouseup:function(se){ne("mouseup",se)},mouseout:function(se){ne("mouseout",se)},keydown:function(se){ne("keydown",se)},keyup:function(se){ne("keyup",se)},touchstart:function(se){ne("touchstart",se)},touchmove:function(se){ne("touchmove",se)},touchend:function(se){ne("touchend",se)},tap:function(se){ne("tap",se)}}};function v(g){return g&&g.__esModule&&Object.prototype.hasOwnProperty.call(g,"default")?g.default:g}function E(g){if(g.__esModule)return g;var I=g.default;if(typeof I=="function"){var O=function Y(){if(this instanceof Y){var ne=[null];ne.push.apply(ne,arguments);var se=Function.bind.apply(I,ne);return new se}return I.apply(this,arguments)};O.prototype=I.prototype}else O={};return Object.defineProperty(O,"__esModule",{value:!0}),Object.keys(g).forEach(function(Y){var ne=Object.getOwnPropertyDescriptor(g,Y);Object.defineProperty(O,Y,ne.get?ne:{enumerable:!0,get:function(){return g[Y]}})}),O}var k={},B={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:63567523142e-4},s=B;function H(g){var I=0;if(g&&g.length>0){I+=Math.abs(V(g[0]));for(var O=1;O2){for(fe=0;fe=Math.pow(2,g)?zi(g,I):se};zi.rack=function(g,I,O){var Y=function(se){var fe=0;do{if(fe++>10){if(!O)throw new Error("too many ID collisions, use more bits");g+=O}var Re=zi(g,I)}while(Object.hasOwnProperty.call(ne,Re));return ne[Re]=se,Re},ne=Y.hats={};return Y.get=function(se){return Y.hats[se]},Y.set=function(se,fe){return Y.hats[se]=fe,Y},Y.bits=g||128,Y.base=I||16,Y};var Ti=v(Vr.exports),Tt=function(g,I){this.ctx=g,this.properties=I.properties||{},this.coordinates=I.geometry.coordinates,this.id=I.id||Ti(),this.type=I.geometry.type};Tt.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},Tt.prototype.incomingCoords=function(g){this.setCoordinates(g)},Tt.prototype.setCoordinates=function(g){this.coordinates=g,this.changed()},Tt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},Tt.prototype.setProperty=function(g,I){this.properties[g]=I},Tt.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:Fe.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},Tt.prototype.internal=function(g){var I={id:this.id,meta:nt.FEATURE,"meta:type":this.type,active:it.INACTIVE,mode:g};if(this.ctx.options.userProperties)for(var O in this.properties)I["user_"+O]=this.properties[O];return{type:Fe.FEATURE,properties:I,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var pi=function(g,I){Tt.call(this,g,I)};(pi.prototype=Object.create(Tt.prototype)).isValid=function(){return typeof this.coordinates[0]=="number"&&typeof this.coordinates[1]=="number"},pi.prototype.updateCoordinate=function(g,I,O){this.coordinates=arguments.length===3?[I,O]:[g,I],this.changed()},pi.prototype.getCoordinate=function(){return this.getCoordinates()};var Oi=function(g,I){Tt.call(this,g,I)};(Oi.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length>1},Oi.prototype.addCoordinate=function(g,I,O){this.changed();var Y=parseInt(g,10);this.coordinates.splice(Y,0,[I,O])},Oi.prototype.getCoordinate=function(g){var I=parseInt(g,10);return JSON.parse(JSON.stringify(this.coordinates[I]))},Oi.prototype.removeCoordinate=function(g){this.changed(),this.coordinates.splice(parseInt(g,10),1)},Oi.prototype.updateCoordinate=function(g,I,O){var Y=parseInt(g,10);this.coordinates[Y]=[I,O],this.changed()};var Le=function(g,I){Tt.call(this,g,I),this.coordinates=this.coordinates.map(function(O){return O.slice(0,-1)})};(Le.prototype=Object.create(Tt.prototype)).isValid=function(){return this.coordinates.length!==0&&this.coordinates.every(function(g){return g.length>2})},Le.prototype.incomingCoords=function(g){this.coordinates=g.map(function(I){return I.slice(0,-1)}),this.changed()},Le.prototype.setCoordinates=function(g){this.coordinates=g,this.changed()},Le.prototype.addCoordinate=function(g,I,O){this.changed();var Y=g.split(".").map(function(ne){return parseInt(ne,10)});this.coordinates[Y[0]].splice(Y[1],0,[I,O])},Le.prototype.removeCoordinate=function(g){this.changed();var I=g.split(".").map(function(Y){return parseInt(Y,10)}),O=this.coordinates[I[0]];O&&(O.splice(I[1],1),O.length<3&&this.coordinates.splice(I[0],1))},Le.prototype.getCoordinate=function(g){var I=g.split(".").map(function(Y){return parseInt(Y,10)}),O=this.coordinates[I[0]];return JSON.parse(JSON.stringify(O[I[1]]))},Le.prototype.getCoordinates=function(){return this.coordinates.map(function(g){return g.concat([g[0]])})},Le.prototype.updateCoordinate=function(g,I,O){this.changed();var Y=g.split("."),ne=parseInt(Y[0],10),se=parseInt(Y[1],10);this.coordinates[ne]===void 0&&(this.coordinates[ne]=[]),this.coordinates[ne][se]=[I,O]};var Pt={MultiPoint:pi,MultiLineString:Oi,MultiPolygon:Le},He=function(g,I,O,Y,ne){var se=O.split("."),fe=parseInt(se[0],10),Re=se[1]?se.slice(1).join("."):null;return g[fe][I](Re,Y,ne)},Gt=function(g,I){if(Tt.call(this,g,I),delete this.coordinates,this.model=Pt[I.geometry.type],this.model===void 0)throw new TypeError(I.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(I.geometry.coordinates)};function ct(g){this.map=g.map,this.drawConfig=JSON.parse(JSON.stringify(g.options||{})),this._ctx=g}(Gt.prototype=Object.create(Tt.prototype))._coordinatesToFeatures=function(g){var I=this,O=this.model.bind(this);return g.map(function(Y){return new O(I.ctx,{id:Ti(),type:Fe.FEATURE,properties:{},geometry:{coordinates:Y,type:I.type.replace("Multi","")}})})},Gt.prototype.isValid=function(){return this.features.every(function(g){return g.isValid()})},Gt.prototype.setCoordinates=function(g){this.features=this._coordinatesToFeatures(g),this.changed()},Gt.prototype.getCoordinate=function(g){return He(this.features,"getCoordinate",g)},Gt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(function(g){return g.type===Fe.POLYGON?g.getCoordinates():g.coordinates})))},Gt.prototype.updateCoordinate=function(g,I,O){He(this.features,"updateCoordinate",g,I,O),this.changed()},Gt.prototype.addCoordinate=function(g,I,O){He(this.features,"addCoordinate",g,I,O),this.changed()},Gt.prototype.removeCoordinate=function(g){He(this.features,"removeCoordinate",g),this.changed()},Gt.prototype.getFeatures=function(){return this.features},ct.prototype.setSelected=function(g){return this._ctx.store.setSelected(g)},ct.prototype.setSelectedCoordinates=function(g){var I=this;this._ctx.store.setSelectedCoordinates(g),g.reduce(function(O,Y){return O[Y.feature_id]===void 0&&(O[Y.feature_id]=!0,I._ctx.store.get(Y.feature_id).changed()),O},{})},ct.prototype.getSelected=function(){return this._ctx.store.getSelected()},ct.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},ct.prototype.isSelected=function(g){return this._ctx.store.isSelected(g)},ct.prototype.getFeature=function(g){return this._ctx.store.get(g)},ct.prototype.select=function(g){return this._ctx.store.select(g)},ct.prototype.deselect=function(g){return this._ctx.store.deselect(g)},ct.prototype.deleteFeature=function(g,I){return I===void 0&&(I={}),this._ctx.store.delete(g,I)},ct.prototype.addFeature=function(g){return this._ctx.store.add(g)},ct.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},ct.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},ct.prototype.setActionableState=function(g){g===void 0&&(g={});var I={trash:g.trash||!1,combineFeatures:g.combineFeatures||!1,uncombineFeatures:g.uncombineFeatures||!1};return this._ctx.events.actionable(I)},ct.prototype.changeMode=function(g,I,O){return I===void 0&&(I={}),O===void 0&&(O={}),this._ctx.events.changeMode(g,I,O)},ct.prototype.updateUIClasses=function(g){return this._ctx.ui.queueMapClasses(g)},ct.prototype.activateUIButton=function(g){return this._ctx.ui.setActiveButton(g)},ct.prototype.featuresAt=function(g,I,O){if(O===void 0&&(O="click"),O!=="click"&&O!=="touch")throw new Error("invalid buffer type");return Dt[O](g,I,this._ctx)},ct.prototype.newFeature=function(g){var I=g.geometry.type;return I===Fe.POINT?new pi(this._ctx,g):I===Fe.LINE_STRING?new Oi(this._ctx,g):I===Fe.POLYGON?new Le(this._ctx,g):new Gt(this._ctx,g)},ct.prototype.isInstanceOf=function(g,I){if(g===Fe.POINT)return I instanceof pi;if(g===Fe.LINE_STRING)return I instanceof Oi;if(g===Fe.POLYGON)return I instanceof Le;if(g==="MultiFeature")return I instanceof Gt;throw new Error("Unknown feature class: "+g)},ct.prototype.doRender=function(g){return this._ctx.store.featureChanged(g)},ct.prototype.onSetup=function(){},ct.prototype.onDrag=function(){},ct.prototype.onClick=function(){},ct.prototype.onMouseMove=function(){},ct.prototype.onMouseDown=function(){},ct.prototype.onMouseUp=function(){},ct.prototype.onMouseOut=function(){},ct.prototype.onKeyUp=function(){},ct.prototype.onKeyDown=function(){},ct.prototype.onTouchStart=function(){},ct.prototype.onTouchMove=function(){},ct.prototype.onTouchEnd=function(){},ct.prototype.onTap=function(){},ct.prototype.onStop=function(){},ct.prototype.onTrash=function(){},ct.prototype.onCombineFeature=function(){},ct.prototype.onUncombineFeature=function(){},ct.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var Zi={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},_r=Object.keys(Zi);function Ue(g){var I=Object.keys(g);return function(O,Y){Y===void 0&&(Y={});var ne={},se=I.reduce(function(fe,Re){return fe[Re]=g[Re],fe},new ct(O));return{start:function(){var fe=this;ne=se.onSetup(Y),_r.forEach(function(Re){var Ve,rt=Zi[Re],ot=function(){return!1};g[rt]&&(ot=function(){return!0}),fe.on(Re,ot,(Ve=rt,function(Je){return se[Ve](ne,Je)}))})},stop:function(){se.onStop(ne)},trash:function(){se.onTrash(ne)},combineFeatures:function(){se.onCombineFeatures(ne)},uncombineFeatures:function(){se.onUncombineFeatures(ne)},render:function(fe,Re){se.toDisplayFeatures(ne,fe,Re)}}}}function Bi(g){return[].concat(g).filter(function(I){return I!==void 0})}function gr(){var g=this;if(!(g.ctx.map&&g.ctx.map.getSource(_e.HOT)!==void 0))return Ve();var I=g.ctx.events.currentModeName();g.ctx.ui.queueMapClasses({mode:I});var O=[],Y=[];g.isDirty?Y=g.getAllIds():(O=g.getChangedIds().filter(function(rt){return g.get(rt)!==void 0}),Y=g.sources.hot.filter(function(rt){return rt.properties.id&&O.indexOf(rt.properties.id)===-1&&g.get(rt.properties.id)!==void 0}).map(function(rt){return rt.properties.id})),g.sources.hot=[];var ne=g.sources.cold.length;g.sources.cold=g.isDirty?[]:g.sources.cold.filter(function(rt){var ot=rt.properties.id||rt.properties.parent;return O.indexOf(ot)===-1});var se=ne!==g.sources.cold.length||Y.length>0;function fe(rt,ot){var Je=g.get(rt).internal(I);g.ctx.events.currentModeRender(Je,function(Rt){g.sources[ot].push(Rt)})}if(O.forEach(function(rt){return fe(rt,"hot")}),Y.forEach(function(rt){return fe(rt,"cold")}),se&&g.ctx.map.getSource(_e.COLD).setData({type:Fe.FEATURE_COLLECTION,features:g.sources.cold}),g.ctx.map.getSource(_e.HOT).setData({type:Fe.FEATURE_COLLECTION,features:g.sources.hot}),g._emitSelectionChange&&(g.ctx.map.fire(et.SELECTION_CHANGE,{features:g.getSelected().map(function(rt){return rt.toGeoJSON()}),points:g.getSelectedCoordinates().map(function(rt){return{type:Fe.FEATURE,properties:{},geometry:{type:Fe.POINT,coordinates:rt.coordinates}}})}),g._emitSelectionChange=!1),g._deletedFeaturesToEmit.length){var Re=g._deletedFeaturesToEmit.map(function(rt){return rt.toGeoJSON()});g._deletedFeaturesToEmit=[],g.ctx.map.fire(et.DELETE,{features:Re})}function Ve(){g.isDirty=!1,g.clearChangedIds()}Ve(),g.ctx.map.fire(et.RENDER,{})}function ui(g){var I,O=this;this._features={},this._featureIds=new Ge,this._selectedFeatureIds=new Ge,this._selectedCoordinates=[],this._changedFeatureIds=new Ge,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=g,this.sources={hot:[],cold:[]},this.render=function(){I||(I=requestAnimationFrame(function(){I=null,gr.call(O)}))},this.isDirty=!1}function co(g,I){var O=g._selectedCoordinates.filter(function(Y){return g._selectedFeatureIds.has(Y.feature_id)});g._selectedCoordinates.length===O.length||I.silent||(g._emitSelectionChange=!0),g._selectedCoordinates=O}ui.prototype.createRenderBatch=function(){var g=this,I=this.render,O=0;return this.render=function(){O++},function(){g.render=I,O>0&&g.render()}},ui.prototype.setDirty=function(){return this.isDirty=!0,this},ui.prototype.featureChanged=function(g){return this._changedFeatureIds.add(g),this},ui.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},ui.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},ui.prototype.getAllIds=function(){return this._featureIds.values()},ui.prototype.add=function(g){return this.featureChanged(g.id),this._features[g.id]=g,this._featureIds.add(g.id),this},ui.prototype.delete=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._featureIds.has(Y)&&(O._featureIds.delete(Y),O._selectedFeatureIds.delete(Y),I.silent||O._deletedFeaturesToEmit.indexOf(O._features[Y])===-1&&O._deletedFeaturesToEmit.push(O._features[Y]),delete O._features[Y],O.isDirty=!0)}),co(this,I),this},ui.prototype.get=function(g){return this._features[g]},ui.prototype.getAll=function(){var g=this;return Object.keys(this._features).map(function(I){return g._features[I]})},ui.prototype.select=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._selectedFeatureIds.has(Y)||(O._selectedFeatureIds.add(Y),O._changedFeatureIds.add(Y),I.silent||(O._emitSelectionChange=!0))}),this},ui.prototype.deselect=function(g,I){var O=this;return I===void 0&&(I={}),Bi(g).forEach(function(Y){O._selectedFeatureIds.has(Y)&&(O._selectedFeatureIds.delete(Y),O._changedFeatureIds.add(Y),I.silent||(O._emitSelectionChange=!0))}),co(this,I),this},ui.prototype.clearSelected=function(g){return g===void 0&&(g={}),this.deselect(this._selectedFeatureIds.values(),{silent:g.silent}),this},ui.prototype.setSelected=function(g,I){var O=this;return I===void 0&&(I={}),g=Bi(g),this.deselect(this._selectedFeatureIds.values().filter(function(Y){return g.indexOf(Y)===-1}),{silent:I.silent}),this.select(g.filter(function(Y){return!O._selectedFeatureIds.has(Y)}),{silent:I.silent}),this},ui.prototype.setSelectedCoordinates=function(g){return this._selectedCoordinates=g,this._emitSelectionChange=!0,this},ui.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},ui.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},ui.prototype.getSelected=function(){var g=this;return this._selectedFeatureIds.values().map(function(I){return g.get(I)})},ui.prototype.getSelectedCoordinates=function(){var g=this;return this._selectedCoordinates.map(function(I){return{coordinates:g.get(I.feature_id).getCoordinate(I.coord_path)}})},ui.prototype.isSelected=function(g){return this._selectedFeatureIds.has(g)},ui.prototype.setFeatureProperty=function(g,I,O){this.get(g).setProperty(I,O),this.featureChanged(g)},ui.prototype.storeMapConfig=function(){var g=this;Vt.forEach(function(I){g.ctx.map[I]&&(g._mapInitialConfig[I]=g.ctx.map[I].isEnabled())})},ui.prototype.restoreMapConfig=function(){var g=this;Object.keys(this._mapInitialConfig).forEach(function(I){g._mapInitialConfig[I]?g.ctx.map[I].enable():g.ctx.map[I].disable()})},ui.prototype.getInitialConfigValue=function(g){return this._mapInitialConfig[g]===void 0||this._mapInitialConfig[g]};var wo=function(){for(var g=arguments,I={},O=0;O=48&&Pe<=57)};function Ot(Pe,_t,vi){vi===void 0&&(vi={}),Rt.stop();var Xi=Re[Pe];if(Xi===void 0)throw new Error(Pe+" is not valid");Je=Pe;var tr=Xi(fe,_t);Rt=_(tr,fe),vi.silent||fe.map.fire(et.MODE_CHANGE,{mode:Pe}),fe.store.setDirty(),fe.store.render()}ot.keydown=function(Pe){(Pe.srcElement||Pe.target).classList.contains("mapboxgl-canvas")&&(Pe.keyCode!==8&&Pe.keyCode!==46||!fe.options.controls.trash?Hi(Pe.keyCode)?Rt.keydown(Pe):Pe.keyCode===49&&fe.options.controls.point?Ot(Ne.DRAW_POINT):Pe.keyCode===50&&fe.options.controls.line_string?Ot(Ne.DRAW_LINE_STRING):Pe.keyCode===51&&fe.options.controls.polygon&&Ot(Ne.DRAW_POLYGON):(Pe.preventDefault(),Rt.trash()))},ot.keyup=function(Pe){Hi(Pe.keyCode)&&Rt.keyup(Pe)},ot.zoomend=function(){fe.store.changeZoom()},ot.data=function(Pe){if(Pe.dataType==="style"){var _t=fe.setup,vi=fe.map,Xi=fe.options,tr=fe.store;Xi.styles.some(function(nn){return vi.getLayer(nn.id)})||(_t.addLayers(),tr.setDirty(),tr.render())}};var ar={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){Je=fe.options.defaultMode,Rt=_(Re[Je](fe),fe)},changeMode:Ot,actionable:function(Pe){var _t=!1;Object.keys(Pe).forEach(function(vi){if(ar[vi]===void 0)throw new Error("Invalid action type");ar[vi]!==Pe[vi]&&(_t=!0),ar[vi]=Pe[vi]}),_t&&fe.map.fire(et.ACTIONABLE,{actions:ar})},currentModeName:function(){return Je},currentModeRender:function(Pe,_t){return Rt.render(Pe,_t)},fire:function(Pe,_t){ot[Pe]&&ot[Pe](_t)},addEventListeners:function(){fe.map.on("mousemove",ot.mousemove),fe.map.on("mousedown",ot.mousedown),fe.map.on("mouseup",ot.mouseup),fe.map.on("data",ot.data),fe.map.on("touchmove",ot.touchmove),fe.map.on("touchstart",ot.touchstart),fe.map.on("touchend",ot.touchend),fe.container.addEventListener("mouseout",ot.mouseout),fe.options.keybindings&&(fe.container.addEventListener("keydown",ot.keydown),fe.container.addEventListener("keyup",ot.keyup))},removeEventListeners:function(){fe.map.off("mousemove",ot.mousemove),fe.map.off("mousedown",ot.mousedown),fe.map.off("mouseup",ot.mouseup),fe.map.off("data",ot.data),fe.map.off("touchmove",ot.touchmove),fe.map.off("touchstart",ot.touchstart),fe.map.off("touchend",ot.touchend),fe.container.removeEventListener("mouseout",ot.mouseout),fe.options.keybindings&&(fe.container.removeEventListener("keydown",ot.keydown),fe.container.removeEventListener("keyup",ot.keyup))},trash:function(Pe){Rt.trash(Pe)},combineFeatures:function(){Rt.combineFeatures()},uncombineFeatures:function(){Rt.uncombineFeatures()},getMode:function(){return Je}}}(g),g.ui=function(fe){var Re={},Ve=null,rt={mode:null,feature:null,mouse:null},ot={mode:null,feature:null,mouse:null};function Je(Pe){ot=Se(ot,Pe)}function Rt(){var Pe,_t;if(fe.container){var vi=[],Xi=[];tn.forEach(function(tr){ot[tr]!==rt[tr]&&(vi.push(tr+"-"+rt[tr]),ot[tr]!==null&&Xi.push(tr+"-"+ot[tr]))}),vi.length>0&&(Pe=fe.container.classList).remove.apply(Pe,vi),Xi.length>0&&(_t=fe.container.classList).add.apply(_t,Xi),rt=Se(rt,ot)}}function Hi(Pe,_t){_t===void 0&&(_t={});var vi=document.createElement("button");return vi.className=be.CONTROL_BUTTON+" "+_t.className,vi.setAttribute("title",_t.title),_t.container.appendChild(vi),vi.addEventListener("click",function(Xi){if(Xi.preventDefault(),Xi.stopPropagation(),Xi.target===Ve)return Ot(),void _t.onDeactivate();ar(Pe),_t.onActivate()},!0),vi}function Ot(){Ve&&(Ve.classList.remove(be.ACTIVE_BUTTON),Ve=null)}function ar(Pe){Ot();var _t=Re[Pe];_t&&_t&&Pe!=="trash"&&(_t.classList.add(be.ACTIVE_BUTTON),Ve=_t)}return{setActiveButton:ar,queueMapClasses:Je,updateMapClasses:Rt,clearMapClasses:function(){Je({mode:null,feature:null,mouse:null}),Rt()},addButtons:function(){var Pe=fe.options.controls,_t=document.createElement("div");return _t.className=be.CONTROL_GROUP+" "+be.CONTROL_BASE,Pe&&(Pe[De.LINE]&&(Re[De.LINE]=Hi(De.LINE,{container:_t,className:be.CONTROL_BUTTON_LINE,title:"LineString tool "+(fe.options.keybindings?"(l)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_LINE_STRING)},onDeactivate:function(){return fe.events.trash()}})),Pe[De.POLYGON]&&(Re[De.POLYGON]=Hi(De.POLYGON,{container:_t,className:be.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(fe.options.keybindings?"(p)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_POLYGON)},onDeactivate:function(){return fe.events.trash()}})),Pe[De.POINT]&&(Re[De.POINT]=Hi(De.POINT,{container:_t,className:be.CONTROL_BUTTON_POINT,title:"Marker tool "+(fe.options.keybindings?"(m)":""),onActivate:function(){return fe.events.changeMode(Ne.DRAW_POINT)},onDeactivate:function(){return fe.events.trash()}})),Pe.trash&&(Re.trash=Hi("trash",{container:_t,className:be.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:function(){fe.events.trash()}})),Pe.combine_features&&(Re.combine_features=Hi("combineFeatures",{container:_t,className:be.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:function(){fe.events.combineFeatures()}})),Pe.uncombine_features&&(Re.uncombine_features=Hi("uncombineFeatures",{container:_t,className:be.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:function(){fe.events.uncombineFeatures()}}))),_t},removeButtons:function(){Object.keys(Re).forEach(function(Pe){var _t=Re[Pe];_t.parentNode&&_t.parentNode.removeChild(_t),delete Re[Pe]})}}}(g),g.container=ne.getContainer(),g.store=new ui(g),I=g.ui.addButtons(),g.options.boxSelect&&(g.boxZoomInitial=ne.boxZoom.isEnabled(),ne.boxZoom.disable(),ne.dragPan.disable(),ne.dragPan.enable()),ne.loaded()?Y.connect():(ne.on("load",Y.connect),O=setInterval(function(){ne.loaded()&&Y.connect()},16)),g.events.start(),I},addLayers:function(){g.map.addSource(_e.COLD,{data:{type:Fe.FEATURE_COLLECTION,features:[]},type:"geojson"}),g.map.addSource(_e.HOT,{data:{type:Fe.FEATURE_COLLECTION,features:[]},type:"geojson"}),g.options.styles.forEach(function(ne){g.map.addLayer(ne)}),g.store.setDirty(!0),g.store.render()},removeLayers:function(){g.options.styles.forEach(function(ne){g.map.getLayer(ne.id)&&g.map.removeLayer(ne.id)}),g.map.getSource(_e.COLD)&&g.map.removeSource(_e.COLD),g.map.getSource(_e.HOT)&&g.map.removeSource(_e.HOT)}};return g.setup=Y,Y}var Ii=[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}];function ii(g){return function(I){var O=I.featureTarget;return!!O&&!!O.properties&&O.properties.meta===g}}function Vn(g){return!!g.originalEvent&&!!g.originalEvent.shiftKey&&g.originalEvent.button===0}function En(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.active===it.ACTIVE&&g.featureTarget.properties.meta===nt.FEATURE}function Un(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.active===it.INACTIVE&&g.featureTarget.properties.meta===nt.FEATURE}function qo(g){return g.featureTarget===void 0}function So(g){return!!g.featureTarget&&!!g.featureTarget.properties&&g.featureTarget.properties.meta===nt.FEATURE}function Cn(g){var I=g.featureTarget;return!!I&&!!I.properties&&I.properties.meta===nt.VERTEX}function $n(g){return!!g.originalEvent&&g.originalEvent.shiftKey===!0}function qe(g){return g.keyCode===27}function mn(g){return g.keyCode===13}var er=Object.freeze({__proto__:null,isOfMetaType:ii,isShiftMousedown:Vn,isActiveFeature:En,isInactiveFeature:Un,noTarget:qo,isFeature:So,isVertex:Cn,isShiftDown:$n,isEscapeKey:qe,isEnterKey:mn,isTrue:function(){return!0}}),Zo=rn;function rn(g,I){this.x=g,this.y=I}rn.prototype={clone:function(){return new rn(this.x,this.y)},add:function(g){return this.clone()._add(g)},sub:function(g){return this.clone()._sub(g)},multByPoint:function(g){return this.clone()._multByPoint(g)},divByPoint:function(g){return this.clone()._divByPoint(g)},mult:function(g){return this.clone()._mult(g)},div:function(g){return this.clone()._div(g)},rotate:function(g){return this.clone()._rotate(g)},rotateAround:function(g,I){return this.clone()._rotateAround(g,I)},matMult:function(g){return this.clone()._matMult(g)},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(g){return this.x===g.x&&this.y===g.y},dist:function(g){return Math.sqrt(this.distSqr(g))},distSqr:function(g){var I=g.x-this.x,O=g.y-this.y;return I*I+O*O},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(g){return Math.atan2(this.y-g.y,this.x-g.x)},angleWith:function(g){return this.angleWithSep(g.x,g.y)},angleWithSep:function(g,I){return Math.atan2(this.x*I-this.y*g,this.x*g+this.y*I)},_matMult:function(g){var I=g[0]*this.x+g[1]*this.y,O=g[2]*this.x+g[3]*this.y;return this.x=I,this.y=O,this},_add:function(g){return this.x+=g.x,this.y+=g.y,this},_sub:function(g){return this.x-=g.x,this.y-=g.y,this},_mult:function(g){return this.x*=g,this.y*=g,this},_div:function(g){return this.x/=g,this.y/=g,this},_multByPoint:function(g){return this.x*=g.x,this.y*=g.y,this},_divByPoint:function(g){return this.x/=g.x,this.y/=g.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var g=this.y;return this.y=this.x,this.x=-g,this},_rotate:function(g){var I=Math.cos(g),O=Math.sin(g),Y=I*this.x-O*this.y,ne=O*this.x+I*this.y;return this.x=Y,this.y=ne,this},_rotateAround:function(g,I){var O=Math.cos(g),Y=Math.sin(g),ne=I.x+O*(this.x-I.x)-Y*(this.y-I.y),se=I.y+Y*(this.x-I.x)+O*(this.y-I.y);return this.x=ne,this.y=se,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},rn.convert=function(g){return g instanceof rn?g:Array.isArray(g)?new rn(g[0],g[1]):g};var We=v(Zo);function Bt(g,I){var O=I.getBoundingClientRect();return new We(g.clientX-O.left-(I.clientLeft||0),g.clientY-O.top-(I.clientTop||0))}function Mt(g,I,O,Y){return{type:Fe.FEATURE,properties:{meta:nt.VERTEX,parent:g,coord_path:O,active:Y?it.ACTIVE:it.INACTIVE},geometry:{type:Fe.POINT,coordinates:I}}}function Ur(g,I,O){var Y=I.geometry.coordinates,ne=O.geometry.coordinates;if(Y[1]>85||Y[1]85||ne[1]=I&&this._bbox[3]>=O},Ut.prototype.intersect=function(g){return this._valid?(I=g instanceof Ut?g.bbox():g,!(this._bbox[0]>I[2]||this._bbox[2]I[3])):null;var I},Ut.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var g="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",g)},Ut.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var ai=function(g){if(!g)return[];var I=Q(J(g)),O=[];return I.features.forEach(function(Y){Y.geometry&&(O=O.concat(he(Y.geometry.coordinates)))}),O},ri=Ft,jr=gi,Ei={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},ur=Object.keys(Ei);function yr(g){for(var I=jr(),O=ai(g),Y=0;YO&&(O=Je),Rtne&&(ne=Rt),JeRe&&(Re=Ot)});var Ve=I;return O+Ve.lat>85&&(Ve.lat=85-O),ne+Ve.lat>90&&(Ve.lat=90-ne),Y+Ve.lat<-85&&(Ve.lat=-85-Y),se+Ve.lat=270&&(Ve.lng-=360*Math.ceil(Math.abs(Ve.lng)/360)),Ve}function Io(g,I){var O=To(g.map(function(Y){return Y.toGeoJSON()}),I);g.forEach(function(Y){var ne,se=Y.getCoordinates(),fe=function(Ve){var rt={lng:Ve[0]+O.lng,lat:Ve[1]+O.lat};return[rt.lng,rt.lat]},Re=function(Ve){return Ve.map(function(rt){return fe(rt)})};Y.type===Fe.POINT?ne=fe(se):Y.type===Fe.LINE_STRING||Y.type===Fe.MULTI_POINT?ne=se.map(fe):Y.type===Fe.POLYGON||Y.type===Fe.MULTI_LINE_STRING?ne=se.map(Re):Y.type===Fe.MULTI_POLYGON&&(ne=se.map(function(Ve){return Ve.map(function(rt){return Re(rt)})})),Y.incomingCoords(ne)})}var vr={onSetup:function(g){var I=this,O={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:g.featureIds||[]};return this.setSelected(O.initiallySelectedFeatureIds.filter(function(Y){return I.getFeature(Y)!==void 0})),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),O},fireUpdate:function(){this.map.fire(et.UPDATE,{action:at.MOVE,features:this.getSelected().map(function(g){return g.toGeoJSON()})})},fireActionable:function(){var g=this,I=this.getSelected(),O=I.filter(function(Re){return g.isInstanceOf("MultiFeature",Re)}),Y=!1;if(I.length>1){Y=!0;var ne=I[0].type.replace("Multi","");I.forEach(function(Re){Re.type.replace("Multi","")!==ne&&(Y=!1)})}var se=O.length>0,fe=I.length>0;this.setActionableState({combineFeatures:Y,uncombineFeatures:se,trash:fe})},getUniqueIds:function(g){return g.length?g.map(function(I){return I.properties.id}).filter(function(I){return I!==void 0}).reduce(function(I,O){return I.add(O),I},new Ge).values():[]},stopExtendedInteractions:function(g){g.boxSelectElement&&(g.boxSelectElement.parentNode&&g.boxSelectElement.parentNode.removeChild(g.boxSelectElement),g.boxSelectElement=null),this.map.dragPan.enable(),g.boxSelecting=!1,g.canBoxSelect=!1,g.dragMoving=!1,g.canDragMove=!1},onStop:function(){It.enable(this)},onMouseMove:function(g,I){return So(I)&&g.dragMoving&&this.fireUpdate(),this.stopExtendedInteractions(g),!0},onMouseOut:function(g){return!g.dragMoving||this.fireUpdate()}};vr.onTap=vr.onClick=function(g,I){return qo(I)?this.clickAnywhere(g,I):ii(nt.VERTEX)(I)?this.clickOnVertex(g,I):So(I)?this.clickOnFeature(g,I):void 0},vr.clickAnywhere=function(g){var I=this,O=this.getSelectedIds();O.length&&(this.clearSelectedFeatures(),O.forEach(function(Y){return I.doRender(Y)})),It.enable(this),this.stopExtendedInteractions(g)},vr.clickOnVertex=function(g,I){this.changeMode(Ne.DIRECT_SELECT,{featureId:I.featureTarget.properties.parent,coordPath:I.featureTarget.properties.coord_path,startPos:I.lngLat}),this.updateUIClasses({mouse:Ie.MOVE})},vr.startOnActiveFeature=function(g,I){this.stopExtendedInteractions(g),this.map.dragPan.disable(),this.doRender(I.featureTarget.properties.id),g.canDragMove=!0,g.dragMoveLocation=I.lngLat},vr.clickOnFeature=function(g,I){var O=this;It.disable(this),this.stopExtendedInteractions(g);var Y=$n(I),ne=this.getSelectedIds(),se=I.featureTarget.properties.id,fe=this.isSelected(se);if(!Y&&fe&&this.getFeature(se).type!==Fe.POINT)return this.changeMode(Ne.DIRECT_SELECT,{featureId:se});fe&&Y?(this.deselect(se),this.updateUIClasses({mouse:Ie.POINTER}),ne.length===1&&It.enable(this)):!fe&&Y?(this.select(se),this.updateUIClasses({mouse:Ie.MOVE})):fe||Y||(ne.forEach(function(Re){return O.doRender(Re)}),this.setSelected(se),this.updateUIClasses({mouse:Ie.MOVE})),this.doRender(se)},vr.onMouseDown=function(g,I){return En(I)?this.startOnActiveFeature(g,I):this.drawConfig.boxSelect&&Vn(I)?this.startBoxSelect(g,I):void 0},vr.startBoxSelect=function(g,I){this.stopExtendedInteractions(g),this.map.dragPan.disable(),g.boxSelectStartLocation=Bt(I.originalEvent,this.map.getContainer()),g.canBoxSelect=!0},vr.onTouchStart=function(g,I){if(En(I))return this.startOnActiveFeature(g,I)},vr.onDrag=function(g,I){return g.canDragMove?this.dragMove(g,I):this.drawConfig.boxSelect&&g.canBoxSelect?this.whileBoxSelect(g,I):void 0},vr.whileBoxSelect=function(g,I){g.boxSelecting=!0,this.updateUIClasses({mouse:Ie.ADD}),g.boxSelectElement||(g.boxSelectElement=document.createElement("div"),g.boxSelectElement.classList.add(be.BOX_SELECT),this.map.getContainer().appendChild(g.boxSelectElement));var O=Bt(I.originalEvent,this.map.getContainer()),Y=Math.min(g.boxSelectStartLocation.x,O.x),ne=Math.max(g.boxSelectStartLocation.x,O.x),se=Math.min(g.boxSelectStartLocation.y,O.y),fe=Math.max(g.boxSelectStartLocation.y,O.y),Re="translate("+Y+"px, "+se+"px)";g.boxSelectElement.style.transform=Re,g.boxSelectElement.style.WebkitTransform=Re,g.boxSelectElement.style.width=ne-Y+"px",g.boxSelectElement.style.height=fe-se+"px"},vr.dragMove=function(g,I){g.dragMoving=!0,I.originalEvent.stopPropagation();var O={lng:I.lngLat.lng-g.dragMoveLocation.lng,lat:I.lngLat.lat-g.dragMoveLocation.lat};Io(this.getSelected(),O),g.dragMoveLocation=I.lngLat},vr.onTouchEnd=vr.onMouseUp=function(g,I){var O=this;if(g.dragMoving)this.fireUpdate();else if(g.boxSelecting){var Y=[g.boxSelectStartLocation,Bt(I.originalEvent,this.map.getContainer())],ne=this.featuresAt(null,Y,"click"),se=this.getUniqueIds(ne).filter(function(fe){return!O.isSelected(fe)});se.length&&(this.select(se),se.forEach(function(fe){return O.doRender(fe)}),this.updateUIClasses({mouse:Ie.MOVE}))}this.stopExtendedInteractions(g)},vr.toDisplayFeatures=function(g,I,O){I.properties.active=this.isSelected(I.properties.id)?it.ACTIVE:it.INACTIVE,O(I),this.fireActionable(),I.properties.active===it.ACTIVE&&I.geometry.type!==Fe.POINT&&_n(I).forEach(O)},vr.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},vr.onCombineFeatures=function(){var g=this.getSelected();if(!(g.length===0||g.length<2)){for(var I=[],O=[],Y=g[0].type.replace("Multi",""),ne=0;ne1){var fe=this.newFeature({type:Fe.FEATURE,properties:O[0].properties,geometry:{type:"Multi"+Y,coordinates:I}});this.addFeature(fe),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([fe.id]),this.map.fire(et.COMBINE_FEATURES,{createdFeatures:[fe.toGeoJSON()],deletedFeatures:O})}this.fireActionable()}},vr.onUncombineFeatures=function(){var g=this,I=this.getSelected();if(I.length!==0){for(var O=[],Y=[],ne=function(fe){var Re=I[fe];g.isInstanceOf("MultiFeature",Re)&&(Re.getFeatures().forEach(function(Ve){g.addFeature(Ve),Ve.properties=Re.properties,O.push(Ve.toGeoJSON()),g.select([Ve.id])}),g.deleteFeature(Re.id,{silent:!0}),Y.push(Re.toGeoJSON()))},se=0;se1&&this.map.fire(et.UNCOMBINE_FEATURES,{createdFeatures:O,deletedFeatures:Y}),this.fireActionable()}};var yi=ii(nt.VERTEX),ta=ii(nt.MIDPOINT),jn={fireUpdate:function(){this.map.fire(et.UPDATE,{action:at.CHANGE_COORDINATES,features:this.getSelected().map(function(g){return g.toGeoJSON()})})},fireActionable:function(g){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:g.selectedCoordPaths.length>0})},startDragging:function(g,I){this.map.dragPan.disable(),g.canDragMove=!0,g.dragMoveLocation=I.lngLat},stopDragging:function(g){this.map.dragPan.enable(),g.dragMoving=!1,g.canDragMove=!1,g.dragMoveLocation=null},onVertex:function(g,I){this.startDragging(g,I);var O=I.featureTarget.properties,Y=g.selectedCoordPaths.indexOf(O.coord_path);$n(I)||Y!==-1?$n(I)&&Y===-1&&g.selectedCoordPaths.push(O.coord_path):g.selectedCoordPaths=[O.coord_path];var ne=this.pathsToCoordinates(g.featureId,g.selectedCoordPaths);this.setSelectedCoordinates(ne)},onMidpoint:function(g,I){this.startDragging(g,I);var O=I.featureTarget.properties;g.feature.addCoordinate(O.coord_path,O.lng,O.lat),this.fireUpdate(),g.selectedCoordPaths=[O.coord_path]},pathsToCoordinates:function(g,I){return I.map(function(O){return{feature_id:g,coord_path:O}})},onFeature:function(g,I){g.selectedCoordPaths.length===0?this.startDragging(g,I):this.stopDragging(g)},dragFeature:function(g,I,O){Io(this.getSelected(),O),g.dragMoveLocation=I.lngLat},dragVertex:function(g,I,O){for(var Y=g.selectedCoordPaths.map(function(Re){return g.feature.getCoordinate(Re)}),ne=To(Y.map(function(Re){return{type:Fe.FEATURE,properties:{},geometry:{type:Fe.POINT,coordinates:Re}}}),O),se=0;se0?this.dragVertex(g,I,O):this.dragFeature(g,I,O),g.dragMoveLocation=I.lngLat}},jn.onClick=function(g,I){return qo(I)?this.clickNoTarget(g,I):En(I)?this.clickActiveFeature(g,I):Un(I)?this.clickInactive(g,I):void this.stopDragging(g)},jn.onTap=function(g,I){return qo(I)?this.clickNoTarget(g,I):En(I)?this.clickActiveFeature(g,I):Un(I)?this.clickInactive(g,I):void 0},jn.onTouchEnd=jn.onMouseUp=function(g){g.dragMoving&&this.fireUpdate(),this.stopDragging(g)};var ji={};function qr(g,I){return!!g.lngLat&&g.lngLat.lng===I[0]&&g.lngLat.lat===I[1]}ji.onSetup=function(){var g=this.newFeature({type:Fe.FEATURE,properties:{},geometry:{type:Fe.POINT,coordinates:[]}});return this.addFeature(g),this.clearSelectedFeatures(),this.updateUIClasses({mouse:Ie.ADD}),this.activateUIButton(De.POINT),this.setActionableState({trash:!0}),{point:g}},ji.stopDrawingAndRemove=function(g){this.deleteFeature([g.point.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)},ji.onTap=ji.onClick=function(g,I){this.updateUIClasses({mouse:Ie.MOVE}),g.point.updateCoordinate("",I.lngLat.lng,I.lngLat.lat),this.map.fire(et.CREATE,{features:[g.point.toGeoJSON()]}),this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.point.id]})},ji.onStop=function(g){this.activateUIButton(),g.point.getCoordinate().length||this.deleteFeature([g.point.id],{silent:!0})},ji.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.point.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I)},ji.onTrash=ji.stopDrawingAndRemove,ji.onKeyUp=function(g,I){if(qe(I)||mn(I))return this.stopDrawingAndRemove(g,I)};var Go={onSetup:function(){var g=this.newFeature({type:Fe.FEATURE,properties:{},geometry:{type:Fe.POLYGON,coordinates:[[]]}});return this.addFeature(g),this.clearSelectedFeatures(),It.disable(this),this.updateUIClasses({mouse:Ie.ADD}),this.activateUIButton(De.POLYGON),this.setActionableState({trash:!0}),{polygon:g,currentVertexPosition:0}},clickAnywhere:function(g,I){if(g.currentVertexPosition>0&&qr(I,g.polygon.coordinates[0][g.currentVertexPosition-1]))return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]});this.updateUIClasses({mouse:Ie.ADD}),g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),g.currentVertexPosition++,g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat)},clickOnVertex:function(g){return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]})},onMouseMove:function(g,I){g.polygon.updateCoordinate("0."+g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),Cn(I)&&this.updateUIClasses({mouse:Ie.POINTER})}};Go.onTap=Go.onClick=function(g,I){return Cn(I)?this.clickOnVertex(g,I):this.clickAnywhere(g,I)},Go.onKeyUp=function(g,I){qe(I)?(this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)):mn(I)&&this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.polygon.id]})},Go.onStop=function(g){this.updateUIClasses({mouse:Ie.NONE}),It.enable(this),this.activateUIButton(),this.getFeature(g.polygon.id)!==void 0&&(g.polygon.removeCoordinate("0."+g.currentVertexPosition),g.polygon.isValid()?this.map.fire(et.CREATE,{features:[g.polygon.toGeoJSON()]}):(this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT,{},{silent:!0})))},Go.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.polygon.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I);if(I.geometry.coordinates.length!==0){var ne=I.geometry.coordinates[0].length;if(!(ne<3)){if(I.properties.meta=nt.FEATURE,O(Mt(g.polygon.id,I.geometry.coordinates[0][0],"0.0",!1)),ne>3){var se=I.geometry.coordinates[0].length-3;O(Mt(g.polygon.id,I.geometry.coordinates[0][se],"0."+se,!1))}if(ne<=4){var fe=[[I.geometry.coordinates[0][0][0],I.geometry.coordinates[0][0][1]],[I.geometry.coordinates[0][1][0],I.geometry.coordinates[0][1][1]]];if(O({type:Fe.FEATURE,properties:I.properties,geometry:{coordinates:fe,type:Fe.LINE_STRING}}),ne===3)return}return O(I)}}},Go.onTrash=function(g){this.deleteFeature([g.polygon.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)};var Ir={onSetup:function(g){var I,O,Y=(g=g||{}).featureId,ne="forward";if(Y){if(!(I=this.getFeature(Y)))throw new Error("Could not find a feature with the provided featureId");var se=g.from;if(se&&se.type==="Feature"&&se.geometry&&se.geometry.type==="Point"&&(se=se.geometry),se&&se.type==="Point"&&se.coordinates&&se.coordinates.length===2&&(se=se.coordinates),!se||!Array.isArray(se))throw new Error("Please use the `from` property to indicate which point to continue the line from");var fe=I.coordinates.length-1;if(I.coordinates[fe][0]===se[0]&&I.coordinates[fe][1]===se[1])O=fe+1,I.addCoordinate.apply(I,[O].concat(I.coordinates[fe]));else{if(I.coordinates[0][0]!==se[0]||I.coordinates[0][1]!==se[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");ne="backwards",O=0,I.addCoordinate.apply(I,[O].concat(I.coordinates[0]))}}else I=this.newFeature({type:Fe.FEATURE,properties:{},geometry:{type:Fe.LINE_STRING,coordinates:[]}}),O=0,this.addFeature(I);return this.clearSelectedFeatures(),It.disable(this),this.updateUIClasses({mouse:Ie.ADD}),this.activateUIButton(De.LINE),this.setActionableState({trash:!0}),{line:I,currentVertexPosition:O,direction:ne}},clickAnywhere:function(g,I){if(g.currentVertexPosition>0&&qr(I,g.line.coordinates[g.currentVertexPosition-1])||g.direction==="backwards"&&qr(I,g.line.coordinates[g.currentVertexPosition+1]))return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]});this.updateUIClasses({mouse:Ie.ADD}),g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),g.direction==="forward"?(g.currentVertexPosition++,g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat)):g.line.addCoordinate(0,I.lngLat.lng,I.lngLat.lat)},clickOnVertex:function(g){return this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]})},onMouseMove:function(g,I){g.line.updateCoordinate(g.currentVertexPosition,I.lngLat.lng,I.lngLat.lat),Cn(I)&&this.updateUIClasses({mouse:Ie.POINTER})}};Ir.onTap=Ir.onClick=function(g,I){if(Cn(I))return this.clickOnVertex(g,I);this.clickAnywhere(g,I)},Ir.onKeyUp=function(g,I){mn(I)?this.changeMode(Ne.SIMPLE_SELECT,{featureIds:[g.line.id]}):qe(I)&&(this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT))},Ir.onStop=function(g){It.enable(this),this.activateUIButton(),this.getFeature(g.line.id)!==void 0&&(g.line.removeCoordinate(""+g.currentVertexPosition),g.line.isValid()?this.map.fire(et.CREATE,{features:[g.line.toGeoJSON()]}):(this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT,{},{silent:!0})))},Ir.onTrash=function(g){this.deleteFeature([g.line.id],{silent:!0}),this.changeMode(Ne.SIMPLE_SELECT)},Ir.toDisplayFeatures=function(g,I,O){var Y=I.properties.id===g.line.id;if(I.properties.active=Y?it.ACTIVE:it.INACTIVE,!Y)return O(I);I.geometry.coordinates.length<2||(I.properties.meta=nt.FEATURE,O(Mt(g.line.id,I.geometry.coordinates[g.direction==="forward"?I.geometry.coordinates.length-2:1],""+(g.direction==="forward"?I.geometry.coordinates.length-2:1),!1)),O(I))};var Er={simple_select:vr,direct_select:jn,draw_point:ji,draw_polygon:Go,draw_line_string:Ir},ia={defaultMode:Ne.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:Ii,modes:Er,controls:{},userProperties:!1},os={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},Gi={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function hi(g,I){return g.map(function(O){return O.source?O:Se(O,{id:O.id+"."+I,source:I==="hot"?_e.HOT:_e.COLD})})}var uo={exports:{}};(function(g,I){var O="__lodash_hash_undefined__",Y=9007199254740991,ne="[object Arguments]",se="[object Array]",fe="[object Boolean]",Re="[object Date]",Ve="[object Error]",rt="[object Function]",ot="[object Map]",Je="[object Number]",Rt="[object Object]",Hi="[object Promise]",Ot="[object RegExp]",ar="[object Set]",Pe="[object String]",_t="[object Symbol]",vi="[object WeakMap]",Xi="[object ArrayBuffer]",tr="[object DataView]",nn=/^\[object .+?Constructor\]$/,ra=/^(?:0|[1-9]\d*)$/,Ci={};Ci["[object Float32Array]"]=Ci["[object Float64Array]"]=Ci["[object Int8Array]"]=Ci["[object Int16Array]"]=Ci["[object Int32Array]"]=Ci["[object Uint8Array]"]=Ci["[object Uint8ClampedArray]"]=Ci["[object Uint16Array]"]=Ci["[object Uint32Array]"]=!0,Ci[ne]=Ci[se]=Ci[Xi]=Ci[fe]=Ci[tr]=Ci[Re]=Ci[Ve]=Ci[rt]=Ci[ot]=Ci[Je]=Ci[Rt]=Ci[Ot]=Ci[ar]=Ci[Pe]=Ci[vi]=!1;var ss=typeof Al=="object"&&Al&&Al.Object===Object&&Al,na=typeof self=="object"&&self&&self.Object===Object&&self,on=ss||na||Function("return this")(),ho=I&&!I.nodeType&&I,Kt=ho&&g&&!g.nodeType&&g,Ss=Kt&&Kt.exports===ho,Hr=Ss&&ss.process,sn=function(){try{return Hr&&Hr.binding&&Hr.binding("util")}catch{}}(),oa=sn&&sn.isTypedArray;function sa(de,we){for(var Ye=-1,wt=de==null?0:de.length;++Yelr))return!1;var rr=ni.get(de);if(rr&&ni.get(we))return rr==we;var bi=-1,an=!0,no=2&Ye?new ls:void 0;for(ni.set(de,we),ni.set(we,de);++bi-1},gn.prototype.set=function(de,we){var Ye=this.__data__,wt=cs(Ye,de);return wt<0?(++this.size,Ye.push([de,we])):Ye[wt][1]=we,this},Ao.prototype.clear=function(){this.size=0,this.__data__={hash:new xi,map:new(qn||gn),string:new xi}},Ao.prototype.delete=function(de){var we=ya(this,de).delete(de);return this.size-=we?1:0,we},Ao.prototype.get=function(de){return ya(this,de).get(de)},Ao.prototype.has=function(de){return ya(this,de).has(de)},Ao.prototype.set=function(de,we){var Ye=ya(this,de),wt=Ye.size;return Ye.set(de,we),this.size+=Ye.size==wt?0:1,this},ls.prototype.add=ls.prototype.push=function(de){return this.__data__.set(de,O),this},ls.prototype.has=function(de){return this.__data__.has(de)},Zn.prototype.clear=function(){this.__data__=new gn,this.size=0},Zn.prototype.delete=function(de){var we=this.__data__,Ye=we.delete(de);return this.size=we.size,Ye},Zn.prototype.get=function(de){return this.__data__.get(de)},Zn.prototype.has=function(de){return this.__data__.has(de)},Zn.prototype.set=function(de,we){var Ye=this.__data__;if(Ye instanceof gn){var wt=Ye.__data__;if(!qn||wt.length<199)return wt.push([de,we]),this.size=++Ye.size,this;Ye=this.__data__=new Ao(wt)}return Ye.set(de,we),this.size=Ye.size,this};var va=Ho?function(de){return de==null?[]:(de=Object(de),function(we,Ye){for(var wt=-1,Vi=we==null?0:we.length,ni=0,ir=[];++wt-1&&de%1==0&&de-1&&de%1==0&&de<=Y}function Xr(de){var we=typeof de;return de!=null&&(we=="object"||we=="function")}function ro(de){return de!=null&&typeof de=="object"}var ds=oa?function(de){return function(we){return de(we)}}(oa):function(de){return ro(de)&&zo(de.length)&&!!Ci[ko(de)]};function wa(de){return(we=de)!=null&&zo(we.length)&&!Ji(we)?ma(de):As(de);var we}g.exports=function(de,we){return us(de,we)}})(uo,uo.exports);var Wi=v(uo.exports);function bs(g,I){return g.length===I.length&&JSON.stringify(g.map(function(O){return O}).sort())===JSON.stringify(I.map(function(O){return O}).sort())}var kn={Polygon:Le,LineString:Oi,Point:pi,MultiPolygon:Gt,MultiLineString:Gt,MultiPoint:Gt},Na=Object.freeze({__proto__:null,CommonSelectors:er,constrainFeatureMovement:To,createMidPoint:Ur,createSupplementaryPoints:_n,createVertex:Mt,doubleClickZoom:It,euclideanDistance:di,featuresAt:Dt,getFeatureAtAndSetCursors:Lt,isClick:Pi,isEventAtCoordinates:qr,isTap:en,mapEventToBoundingBox:ke,ModeHandler:_,moveFeatures:Io,sortFeatures:At,stringSetsAreEqual:bs,StringSet:Ge,theme:Ii,toDenseArray:Bi}),Eo=function(g,I){var O={options:g=function(ne){ne===void 0&&(ne={});var se=Se(ne);return ne.controls||(se.controls={}),ne.displayControlsDefault===!1?se.controls=Se(Gi,ne.controls):se.controls=Se(os,ne.controls),(se=Se(ia,se)).styles=hi(se.styles,"cold").concat(hi(se.styles,"hot")),se}(g)};I=function(ne,se){return se.modes=Ne,se.getFeatureIdsAt=function(fe){return Dt.click({point:fe},null,ne).map(function(Re){return Re.properties.id})},se.getSelectedIds=function(){return ne.store.getSelectedIds()},se.getSelected=function(){return{type:Fe.FEATURE_COLLECTION,features:ne.store.getSelectedIds().map(function(fe){return ne.store.get(fe)}).map(function(fe){return fe.toGeoJSON()})}},se.getSelectedPoints=function(){return{type:Fe.FEATURE_COLLECTION,features:ne.store.getSelectedCoordinates().map(function(fe){return{type:Fe.FEATURE,properties:{},geometry:{type:Fe.POINT,coordinates:fe.coordinates}}})}},se.set=function(fe){if(fe.type===void 0||fe.type!==Fe.FEATURE_COLLECTION||!Array.isArray(fe.features))throw new Error("Invalid FeatureCollection");var Re=ne.store.createRenderBatch(),Ve=ne.store.getAllIds().slice(),rt=se.add(fe),ot=new Ge(rt);return(Ve=Ve.filter(function(Je){return!ot.has(Je)})).length&&se.delete(Ve),Re(),rt},se.add=function(fe){var Re=JSON.parse(JSON.stringify(F(fe))).features.map(function(Ve){if(Ve.id=Ve.id||Ti(),Ve.geometry===null)throw new Error("Invalid geometry: null");if(ne.store.get(Ve.id)===void 0||ne.store.get(Ve.id).type!==Ve.geometry.type){var rt=kn[Ve.geometry.type];if(rt===void 0)throw new Error("Invalid geometry type: "+Ve.geometry.type+".");var ot=new rt(ne,Ve);ne.store.add(ot)}else{var Je=ne.store.get(Ve.id);Je.properties=Ve.properties,Wi(Je.properties,Ve.properties)||ne.store.featureChanged(Je.id),Wi(Je.getCoordinates(),Ve.geometry.coordinates)||Je.incomingCoords(Ve.geometry.coordinates)}return Ve.id});return ne.store.render(),Re},se.get=function(fe){var Re=ne.store.get(fe);if(Re)return Re.toGeoJSON()},se.getAll=function(){return{type:Fe.FEATURE_COLLECTION,features:ne.store.getAll().map(function(fe){return fe.toGeoJSON()})}},se.delete=function(fe){return ne.store.delete(fe,{silent:!0}),se.getMode()!==Ne.DIRECT_SELECT||ne.store.getSelectedIds().length?ne.store.render():ne.events.changeMode(Ne.SIMPLE_SELECT,void 0,{silent:!0}),se},se.deleteAll=function(){return ne.store.delete(ne.store.getAllIds(),{silent:!0}),se.getMode()===Ne.DIRECT_SELECT?ne.events.changeMode(Ne.SIMPLE_SELECT,void 0,{silent:!0}):ne.store.render(),se},se.changeMode=function(fe,Re){return Re===void 0&&(Re={}),fe===Ne.SIMPLE_SELECT&&se.getMode()===Ne.SIMPLE_SELECT?(bs(Re.featureIds||[],ne.store.getSelectedIds())||(ne.store.setSelected(Re.featureIds,{silent:!0}),ne.store.render()),se):(fe===Ne.DIRECT_SELECT&&se.getMode()===Ne.DIRECT_SELECT&&Re.featureId===ne.store.getSelectedIds()[0]||ne.events.changeMode(fe,Re,{silent:!0}),se)},se.getMode=function(){return ne.events.getMode()},se.trash=function(){return ne.events.trash({silent:!0}),se},se.combineFeatures=function(){return ne.events.combineFeatures({silent:!0}),se},se.uncombineFeatures=function(){return ne.events.uncombineFeatures({silent:!0}),se},se.setFeatureProperty=function(fe,Re,Ve){return ne.store.setFeatureProperty(fe,Re,Ve),se},se}(O,I),O.api=I;var Y=In(O);return I.onAdd=Y.onAdd,I.onRemove=Y.onRemove,I.types=De,I.options=g,I};function ws(g){Eo(g,this)}return ws.modes=Er,ws.constants=Xt,ws.lib=Na,ws})})(sf);var qg=sf.exports;const Da=Yp(qg);function Zg(m){let f,_,v;return{c(){f=Zt("button"),f.textContent="Import current view",vs(f,"type","button")},m(E,k){ci(E,f,k),_||(v=Ks(f,"click",m[0]),_=!0)},p:Ar,i:Ar,o:Ar,d(E){E&&si(f),_=!1,v()}}}function Gg(m){let f='poly:"';for(let[v,E]of m.geometry.coordinates[0])f+=`${E} ${v} `;return f=f.slice(0,-1)+'"',`https://overpass-api.de/api/interpreter?data=${`(nwr(${f}); node(w)->.x; <;); out meta;`}`}function _c(m){return[m.lng,m.lat]}function Wg(m,f,_){let{map:v}=f;const E=Ih();let k=null;Ba(()=>{v!=null&&v.loaded()&&k&&v.removeControl(k)});async function B(V){try{E("loading","Loading from Overpass");let be=await(await fetch(Gg(V))).text();E("gotXml",be)}catch(ge){E("error",ge.toString())}}function s(){let V=v.getBounds();return{type:"Feature",properties:{},geometry:{coordinates:[[_c(V.getSouthWest()),_c(V.getNorthWest()),_c(V.getNorthEast()),_c(V.getSouthEast()),_c(V.getSouthWest())]],type:"Polygon"}}}async function H(){if(v){if(v.getZoom()<13){E("error","Zoom in more to import");return}await B(s())}}return m.$$set=V=>{"map"in V&&_(1,v=V.map)},m.$$.update=()=>{m.$$.dirty&14&&v&&!k&&(_(2,Da.constants.classes.CONTROL_BASE="maplibregl-ctrl",Da),_(2,Da.constants.classes.CONTROL_PREFIX="maplibregl-ctrl-",Da),_(2,Da.constants.classes.CONTROL_GROUP="maplibregl-ctrl-group",Da),_(3,k=new Da({displayControlsDefault:!1,controls:{polygon:!0}})),v.addControl(k),v.on("draw.create",async V=>{let ge=V.features[0];k.deleteAll(),await B(ge)}))},[H,v,Da,k]}class Hg extends Wr{constructor(f){super(),Gr(this,f,Wg,Zg,Tr,{map:1})}}function Dp(m,f,_){const v=m.slice();return v[1]=f[_][0],v[2]=f[_][1],v}function Fp(m){let f,_,v=m[1]+"",E,k,B=m[2]+"",s;return{c(){f=Zt("tr"),_=Zt("td"),E=ol(v),k=Zt("td"),s=ol(B)},m(H,V){ci(H,f,V),mi(f,_),mi(_,E),mi(f,k),mi(k,s)},p(H,V){V&1&&v!==(v=H[1]+"")&&yh(E,v),V&1&&B!==(B=H[2]+"")&&yh(s,B)},d(H){H&&si(f)}}}function Xg(m){let f,_,v=gp(Object.entries(m[0])),E=[];for(let k=0;k{"properties"in E&&_(0,v=E.properties)},[v]}class zh extends Wr{constructor(f){super(),Gr(this,f,Kg,Xg,Tr,{properties:0})}}const af=["==",["geometry-type"],"Polygon"],lf=["==",["geometry-type"],"LineString"],cf=["==",["geometry-type"],"Point"];function yu(m,f,_){let v=["match",m];for(let[E,k]of Object.entries(f))v.push(E),v.push(k);return v.push(_),v}let zt;const uf=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&uf.decode();let wc=null;function Mc(){return(wc===null||wc.byteLength===0)&&(wc=new Uint8Array(zt.memory.buffer)),wc}function Hs(m,f){return m=m>>>0,uf.decode(Mc().subarray(m,m+f))}const Xs=new Array(128).fill(void 0);Xs.push(void 0,null,!0,!1);let Ac=Xs.length;function Qr(m){Ac===Xs.length&&Xs.push(Xs.length+1);const f=Ac;return Ac=Xs[f],Xs[f]=m,f}function li(m){return Xs[m]}function Jg(m){m<132||(Xs[m]=Ac,Ac=m)}function fu(m){const f=li(m);return Jg(m),f}function _h(m){return m==null}let Sc=null;function Yg(){return(Sc===null||Sc.byteLength===0)&&(Sc=new Float64Array(zt.memory.buffer)),Sc}let Tc=null;function sr(){return(Tc===null||Tc.byteLength===0)&&(Tc=new Int32Array(zt.memory.buffer)),Tc}let Fa=0;const mu=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Qg=typeof mu.encodeInto=="function"?function(m,f){return mu.encodeInto(m,f)}:function(m,f){const _=mu.encode(m);return f.set(_),{read:m.length,written:_.length}};function hu(m,f,_){if(_===void 0){const s=mu.encode(m),H=f(s.length,1)>>>0;return Mc().subarray(H,H+s.length).set(s),Fa=s.length,H}let v=m.length,E=f(v,1)>>>0;const k=Mc();let B=0;for(;B127)break;k[E+B]=s}if(B!==v){B!==0&&(m=m.slice(B)),E=_(E,v,v=B+m.length*3,1)>>>0;const s=Mc().subarray(E+B,E+v),H=Qg(m,s);B+=H.written}return Fa=B,E}function Sh(m){const f=typeof m;if(f=="number"||f=="boolean"||m==null)return`${m}`;if(f=="string")return`"${m}"`;if(f=="symbol"){const E=m.description;return E==null?"Symbol":`Symbol(${E})`}if(f=="function"){const E=m.name;return typeof E=="string"&&E.length>0?`Function(${E})`:"Function"}if(Array.isArray(m)){const E=m.length;let k="[";E>0&&(k+=Sh(m[0]));for(let B=1;B1)v=_[1];else return toString.call(m);if(v=="Object")try{return"Object("+JSON.stringify(m)+")"}catch{return"Object"}return m instanceof Error?`${m.name}: ${m.message} +${m.stack}`:v}function $g(m,f){const _=f(m.length*1,1)>>>0;return Mc().set(m,_/1),Fa=m.length,_}function gh(m,f){try{return m.apply(this,f)}catch(_){zt.__wbindgen_exn_store(Qr(_))}}class vu{static __wrap(f){f=f>>>0;const _=Object.create(vu.prototype);return _.__wbg_ptr=f,_}__destroy_into_raw(){const f=this.__wbg_ptr;return this.__wbg_ptr=0,f}free(){const f=this.__destroy_into_raw();zt.__wbg_jsroutesnapper_free(f)}constructor(f){try{const k=zt.__wbindgen_add_to_stack_pointer(-16),B=$g(f,zt.__wbindgen_malloc),s=Fa;zt.jsroutesnapper_new(k,B,s);var _=sr()[k/4+0],v=sr()[k/4+1],E=sr()[k/4+2];if(E)throw fu(v);return vu.__wrap(_)}finally{zt.__wbindgen_add_to_stack_pointer(16)}}setRouteConfig(f){zt.jsroutesnapper_setRouteConfig(this.__wbg_ptr,Qr(f))}setAreaMode(){zt.jsroutesnapper_setAreaMode(this.__wbg_ptr)}getConfig(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_getConfig(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}toFinalFeature(){try{const v=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_toFinalFeature(v,this.__wbg_ptr);var f=sr()[v/4+0],_=sr()[v/4+1];let E;return f!==0&&(E=Hs(f,_).slice(),zt.__wbindgen_free(f,_*1)),E}finally{zt.__wbindgen_add_to_stack_pointer(16)}}renderGeojson(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_renderGeojson(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}toggleSnapMode(){zt.jsroutesnapper_toggleSnapMode(this.__wbg_ptr)}onMouseMove(f,_,v){return zt.jsroutesnapper_onMouseMove(this.__wbg_ptr,f,_,v)!==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(f){try{const E=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_editExisting(E,this.__wbg_ptr,Qr(f));var _=sr()[E/4+0],v=sr()[E/4+1];if(v)throw fu(_)}finally{zt.__wbindgen_add_to_stack_pointer(16)}}debugRenderGraph(){let f,_;try{const k=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_debugRenderGraph(k,this.__wbg_ptr);var v=sr()[k/4+0],E=sr()[k/4+1];return f=v,_=E,Hs(v,E)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(f,_,1)}}routeNameForWaypoints(f){let _,v;try{const ge=zt.__wbindgen_add_to_stack_pointer(-16);zt.jsroutesnapper_routeNameForWaypoints(ge,this.__wbg_ptr,Qr(f));var E=sr()[ge/4+0],k=sr()[ge/4+1],B=sr()[ge/4+2],s=sr()[ge/4+3],H=E,V=k;if(s)throw H=0,V=0,fu(B);return _=H,v=V,Hs(H,V)}finally{zt.__wbindgen_add_to_stack_pointer(16),zt.__wbindgen_free(_,v,1)}}addSnappedWaypoint(f,_){zt.jsroutesnapper_addSnappedWaypoint(this.__wbg_ptr,f,_)}undo(){zt.jsroutesnapper_undo(this.__wbg_ptr)}}async function ey(m,f){if(typeof Response=="function"&&m instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(m,f)}catch(v){if(m.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",v);else throw v}const _=await m.arrayBuffer();return await WebAssembly.instantiate(_,f)}else{const _=await WebAssembly.instantiate(m,f);return _ instanceof WebAssembly.Instance?{instance:_,module:m}:_}}function ty(){const m={};return m.wbg={},m.wbg.__wbindgen_string_new=function(f,_){const v=Hs(f,_);return Qr(v)},m.wbg.__wbindgen_object_drop_ref=function(f){fu(f)},m.wbg.__wbindgen_error_new=function(f,_){const v=new Error(Hs(f,_));return Qr(v)},m.wbg.__wbindgen_is_object=function(f){const _=li(f);return typeof _=="object"&&_!==null},m.wbg.__wbindgen_is_undefined=function(f){return li(f)===void 0},m.wbg.__wbindgen_in=function(f,_){return li(f)in li(_)},m.wbg.__wbindgen_boolean_get=function(f){const _=li(f);return typeof _=="boolean"?_?1:0:2},m.wbg.__wbindgen_number_get=function(f,_){const v=li(_),E=typeof v=="number"?v:void 0;Yg()[f/8+1]=_h(E)?0:E,sr()[f/4+0]=!_h(E)},m.wbg.__wbindgen_object_clone_ref=function(f){const _=li(f);return Qr(_)},m.wbg.__wbindgen_jsval_loose_eq=function(f,_){return li(f)==li(_)},m.wbg.__wbindgen_string_get=function(f,_){const v=li(_),E=typeof v=="string"?v:void 0;var k=_h(E)?0:hu(E,zt.__wbindgen_malloc,zt.__wbindgen_realloc),B=Fa;sr()[f/4+1]=B,sr()[f/4+0]=k},m.wbg.__wbg_String_4370c5505c674d30=function(f,_){const v=String(li(_)),E=hu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Fa;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbg_getwithrefkey_d1f0d12f1f1b63ea=function(f,_){const v=li(f)[li(_)];return Qr(v)},m.wbg.__wbg_new_abda76e883ba8a5f=function(){const f=new Error;return Qr(f)},m.wbg.__wbg_stack_658279fe44541cf6=function(f,_){const v=li(_).stack,E=hu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Fa;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbg_error_f851667af71bcfc6=function(f,_){let v,E;try{v=f,E=_,console.error(Hs(f,_))}finally{zt.__wbindgen_free(v,E,1)}},m.wbg.__wbg_debug_9a6b3243fbbebb61=function(f){console.debug(li(f))},m.wbg.__wbg_error_788ae33f81d3b84b=function(f){console.error(li(f))},m.wbg.__wbg_info_2e30e8204b29d91d=function(f){console.info(li(f))},m.wbg.__wbg_log_1d3ae0273d8f4f8a=function(f){console.log(li(f))},m.wbg.__wbg_warn_d60e832f9882c1b2=function(f){console.warn(li(f))},m.wbg.__wbg_get_44be0491f933a435=function(f,_){const v=li(f)[_>>>0];return Qr(v)},m.wbg.__wbg_length_fff51ee6522a1a18=function(f){return li(f).length},m.wbg.__wbindgen_is_function=function(f){return typeof li(f)=="function"},m.wbg.__wbg_next_526fc47e980da008=function(f){const _=li(f).next;return Qr(_)},m.wbg.__wbg_next_ddb3312ca1c4e32a=function(){return gh(function(f){const _=li(f).next();return Qr(_)},arguments)},m.wbg.__wbg_done_5c1f01fb660d73b5=function(f){return li(f).done},m.wbg.__wbg_value_1695675138684bd5=function(f){const _=li(f).value;return Qr(_)},m.wbg.__wbg_iterator_97f0c81209c6c35a=function(){return Qr(Symbol.iterator)},m.wbg.__wbg_get_97b561fb56f034b5=function(){return gh(function(f,_){const v=Reflect.get(li(f),li(_));return Qr(v)},arguments)},m.wbg.__wbg_call_cb65541d95d71282=function(){return gh(function(f,_){const v=li(f).call(li(_));return Qr(v)},arguments)},m.wbg.__wbg_isArray_4c24b343cb13cfb1=function(f){return Array.isArray(li(f))},m.wbg.__wbg_instanceof_ArrayBuffer_39ac22089b74fddb=function(f){let _;try{_=li(f)instanceof ArrayBuffer}catch{_=!1}return _},m.wbg.__wbg_buffer_085ec1f694018c4f=function(f){const _=li(f).buffer;return Qr(_)},m.wbg.__wbg_new_8125e318e6245eed=function(f){const _=new Uint8Array(li(f));return Qr(_)},m.wbg.__wbg_set_5cf90238115182c3=function(f,_,v){li(f).set(li(_),v>>>0)},m.wbg.__wbg_length_72e2208bbc0efc61=function(f){return li(f).length},m.wbg.__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4=function(f){let _;try{_=li(f)instanceof Uint8Array}catch{_=!1}return _},m.wbg.__wbindgen_debug_string=function(f,_){const v=Sh(li(_)),E=hu(v,zt.__wbindgen_malloc,zt.__wbindgen_realloc),k=Fa;sr()[f/4+1]=k,sr()[f/4+0]=E},m.wbg.__wbindgen_throw=function(f,_){throw new Error(Hs(f,_))},m.wbg.__wbindgen_memory=function(){const f=zt.memory;return Qr(f)},m}function iy(m,f){return zt=m.exports,hf.__wbindgen_wasm_module=f,Sc=null,Tc=null,wc=null,zt}async function hf(m){if(zt!==void 0)return zt;typeof m>"u"&&(m="/ltn/assets/route_snapper_bg.wasm");const f=ty();(typeof m=="string"||typeof Request=="function"&&m instanceof Request||typeof URL=="function"&&m instanceof URL)&&(m=fetch(m));const{instance:_,module:v}=await ey(await m,f);return iy(_,v)}const df=bo({type:"FeatureCollection",features:[]}),ry=bo(!0),ny=bo(0),oy=30;class sy{constructor(f,_){Nn(this,"map");Nn(this,"inner");Nn(this,"active");Nn(this,"eventListenersSuccess");Nn(this,"eventListenersUpdated");Nn(this,"eventListenersFailure");Nn(this,"onMouseMove",f=>{if(!this.active)return;const _=[f.point.x-oy,f.point.y],v=this.map.unproject(f.point).distanceTo(this.map.unproject(_));this.inner.onMouseMove(f.lngLat.lng,f.lngLat.lat,v)&&(this.redraw(),this.dataUpdated())});Nn(this,"onClick",()=>{this.active&&(this.inner.onClick(),this.redraw(),this.dataUpdated())});Nn(this,"onDoubleClick",f=>{this.active&&(f.preventDefault(),this.inner.onClick(),this.finish())});Nn(this,"onDragStart",()=>{this.active&&this.inner.onDragStart()&&this.map.dragPan.disable()});Nn(this,"onMouseUp",()=>{this.active&&this.inner.onMouseUp()&&this.map.dragPan.enable()});Nn(this,"onKeyDown",f=>{this.active&&f.key=="Escape"&&(f.stopPropagation(),this.cancel())});Nn(this,"onKeyPress",f=>{this.active&&f.target.tagName!="INPUT"&&(f.key=="Enter"?(f.stopPropagation(),this.finish()):f.key=="s"?(f.stopPropagation(),this.inner.toggleSnapMode(),this.redraw()):f.key=="z"&&f.ctrlKey&&this.undo())});this.map=f,console.time("Deserialize and setup JsRouteSnapper"),this.inner=new vu(_),console.timeEnd("Deserialize and setup JsRouteSnapper"),this.active=!1,this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[],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(f){this.active&&window.alert("Bug: editExistingRoute called when tool is already active"),f.properties.waypoints||(f.properties.waypoints=[{lon:f.geometry.coordinates[0][0],lat:f.geometry.coordinates[0][1],snapped:!0},{lon:f.geometry.coordinates[f.geometry.coordinates.length-1][0],lat:f.geometry.coordinates[f.geometry.coordinates.length-1][1],snapped:!0}]),this.startRoute(),this.inner.editExisting(f.properties.waypoints),this.redraw()}editExistingArea(f){this.active&&window.alert("Bug: editExistingArea called when tool is already active"),f.properties.waypoints||window.alert("Bug: editExistingArea called for a polygon not produced by the route-snapper"),this.startArea(),this.inner.editExisting(f.properties.waypoints),this.redraw()}addEventListenerSuccess(f){this.eventListenersSuccess.push(f)}addEventListenerUpdated(f){this.eventListenersUpdated.push(f)}addEventListenerFailure(f){this.eventListenersFailure.push(f)}clearEventListeners(){this.eventListenersSuccess=[],this.eventListenersUpdated=[],this.eventListenersFailure=[]}isActive(){return this.active}finish(){let f=this.inner.toFinalFeature();if(f)for(let _ of this.eventListenersSuccess)_(JSON.parse(f));else for(let _ of this.eventListenersFailure)_();this.stop()}cancel(){this.inner.clearState(),this.finish()}setRouteConfig(f){this.inner.setRouteConfig(f),this.redraw()}addSnappedWaypoint(f){this.inner.addSnappedWaypoint(f[0],f[1]),this.redraw()}undo(){this.inner.undo(),this.redraw()}redraw(){let f=JSON.parse(this.inner.renderGeojson());df.set(f),this.map.getCanvas().style.cursor=f.cursor,ry.set(f.snap_mode),ny.set(f.undo_length)}dataUpdated(){let f=this.inner.toFinalFeature();if(f)for(let _ of this.eventListenersUpdated)_(JSON.parse(f))}}function ay(m){let f,_,v,E,k,B;return f=new ef({props:{filter:cf,paint:{"circle-color":yu(["get","type"],{"snapped-waypoint":"red","free-waypoint":"blue"},"black"),"circle-opacity":["case",["has","hovered"],.5,1],"circle-radius":yu(["get","type"],{node:Rp/2},Rp)}}}),v=new Ah({props:{filter:lf,paint:{"line-color":["case",["get","snapped"],"red","blue"],"line-width":2.5}}}),k=new tf({props:{filter:af,paint:{"fill-color":"black","fill-opacity":.5}}}),{c(){Ri(f.$$.fragment),_=fn(),Ri(v.$$.fragment),E=fn(),Ri(k.$$.fragment)},m(s,H){Ai(f,s,H),ci(s,_,H),Ai(v,s,H),ci(s,E,H),Ai(k,s,H),B=!0},p:Ar,i(s){B||(ft(f.$$.fragment,s),ft(v.$$.fragment,s),ft(k.$$.fragment,s),B=!0)},o(s){St(f.$$.fragment,s),St(v.$$.fragment,s),St(k.$$.fragment,s),B=!1},d(s){s&&(si(_),si(E)),ki(f,s),ki(v,s),ki(k,s)}}}function ly(m){let f,_;return f=new Mh({props:{data:m[0],$$slots:{default:[ay]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&1&&(k.data=v[0]),E&2&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}const Rp=10;function cy(m,f,_){let v;return $r(m,df,E=>_(0,v=E)),[v]}class uy extends Wr{constructor(f){super(),Gr(this,f,cy,ly,Tr,{})}}function hy(m){let f,_,v,E,k,B,s,H,V,ge,be,_e,Ie,De,Fe,Ne,et,at,nt,it,Vt,ti,Xt,Nt,Yt,At,ke,Ge,Ui;return f=new jg({props:{msg:m[2]}}),At=new Hg({props:{map:m[0]}}),At.$on("gotXml",m[5]),At.$on("loading",m[9]),At.$on("error",m[10]),{c(){Ri(f.$$.fragment),_=fn(),v=Zt("div"),E=Zt("div"),k=Zt("label"),B=ol(`Load an osm.xml or a .pbf file: + `),s=Zt("input"),H=fn(),V=Zt("div"),ge=Zt("label"),be=ol(`Or load an example: + `),_e=Zt("select"),Ie=Zt("option"),Ie.textContent="Custom file loaded",De=Zt("option"),De.textContent="Akihabara",Fe=Zt("option"),Fe.textContent="Hanegi Park",Ne=Zt("option"),Ne.textContent="Harujuku",et=Zt("option"),et.textContent="Taipei main station",at=Zt("option"),at.textContent="Ximending",nt=Zt("option"),nt.textContent="Hong Kong",it=Zt("option"),it.textContent="Kowloon",Vt=Zt("option"),Vt.textContent="Bristol",ti=Zt("option"),ti.textContent="Elephant & Castle",Xt=Zt("option"),Xt.textContent="Westminster",Nt=Zt("option"),Nt.textContent="Montlake",Yt=fn(),Ri(At.$$.fragment),vs(s,"type","file"),Ie.__value="",Uo(Ie,Ie.__value),De.__value="akihabara",Uo(De,De.__value),Fe.__value="hanegi",Uo(Fe,Fe.__value),Ne.__value="harujuku",Uo(Ne,Ne.__value),et.__value="taipei_main_station",Uo(et,et.__value),at.__value="ximending",Uo(at,at.__value),nt.__value="hong_kong",Uo(nt,nt.__value),it.__value="kowloon",Uo(it,it.__value),Vt.__value="bristol",Uo(Vt,Vt.__value),ti.__value="elephant_castle",Uo(ti,ti.__value),Xt.__value="westminster",Uo(Xt,Xt.__value),Nt.__value="montlake",Uo(Nt,Nt.__value),m[1]===void 0&&_u(()=>m[8].call(_e)),Ic(v,"border","1px solid black"),Ic(v,"padding","8px")},m(Dt,qt){Ai(f,Dt,qt),ci(Dt,_,qt),ci(Dt,v,qt),mi(v,E),mi(E,k),mi(k,B),mi(k,s),m[7](s),mi(v,H),mi(v,V),mi(V,ge),mi(ge,be),mi(ge,_e),mi(_e,Ie),mi(_e,De),mi(_e,Fe),mi(_e,Ne),mi(_e,et),mi(_e,at),mi(_e,nt),mi(_e,it),mi(_e,Vt),mi(_e,ti),mi(_e,Xt),mi(_e,Nt),mp(_e,m[1],!0),mi(v,Yt),Ai(At,v,null),ke=!0,Ge||(Ui=[Ks(s,"change",m[4]),Ks(_e,"change",m[8])],Ge=!0)},p(Dt,[qt]){const Lt={};qt&4&&(Lt.msg=Dt[2]),f.$set(Lt),qt&2&&mp(_e,Dt[1]);const di={};qt&1&&(di.map=Dt[0]),At.$set(di)},i(Dt){ke||(ft(f.$$.fragment,Dt),ft(At.$$.fragment,Dt),ke=!0)},o(Dt){St(f.$$.fragment,Dt),St(At.$$.fragment,Dt),ke=!1},d(Dt){Dt&&(si(_),si(v)),ki(f,Dt),m[7](null),ki(At),Ge=!1,Ra(Ui)}}}function dy(m,f,_){let{model:v=void 0}=f,{map:E}=f,k="",B=null,s=!1;jp(async()=>{await Kp(),await hf();try{s=(await fetch("/kowloon.pbf",{method:"HEAD"})).ok,console.log("Using local cache, not od2net.org"),_e("bristol")}catch{}});let H;async function V(at){try{ge(await H.files[0].arrayBuffer()),_(1,k="")}catch(nt){window.alert(`Couldn't open this file: ${nt}`)}_(2,B=null)}function ge(at){_(2,B="Building map model from OSM input"),console.time("load"),_(6,v=new k_(new Uint8Array(at))),console.timeEnd("load")}function be(at){try{ge(new TextEncoder().encode(at.detail)),_(1,k="")}catch(nt){window.alert(`Couldn't import from Overpass: ${nt}`)}_(2,B=null)}async function _e(at){at!=""&&(s?await Ie(`/${at}.pbf`):await Ie(`https://assets.od2net.org/severance_pbfs/${at}.pbf`))}async function Ie(at){try{_(2,B=`Downloading ${at}`);let nt=await fetch(at);ge(await nt.arrayBuffer())}catch(nt){window.alert(`Couldn't open from URL ${at}: ${nt}`)}_(2,B=null)}function De(at){ea[at?"unshift":"push"](()=>{H=at,_(3,H)})}function Fe(){k=__(this),_(1,k)}const Ne=at=>_(2,B=at.detail),et=at=>window.alert(at.detail);return m.$$set=at=>{"model"in at&&_(6,v=at.model),"map"in at&&_(0,E=at.map)},m.$$.update=()=>{m.$$.dirty&2&&_e(k)},[E,k,B,H,V,be,v,De,Fe,Ne,et]}class py extends Wr{constructor(f){super(),Gr(this,f,dy,hy,Tr,{model:6,map:0})}}function fy(m){let f,_;return f=new zh({props:{properties:m[10].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&1024&&(k.properties=v[10].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function my(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[fy,({data:v})=>({10:v}),({data:v})=>v?1024:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&3072&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function _y(m){let f,_;return f=new zh({props:{properties:m[10].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&1024&&(k.properties=v[10].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function gy(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[_y,({data:v})=>({10:v}),({data:v})=>v?1024:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&3072&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function yy(m){let f,_,v,E,k,B;return f=new Ah({props:{filter:lf,paint:{"line-width":5,"line-color":yu(["get","kind"],{interior_road:["interpolate-hcl",["linear"],["get","shortcuts"],0,"#F19A93",m[1],"#A32015"],crosses:"blue"},"red")},hoverCursor:"pointer",$$slots:{default:[my]},$$scope:{ctx:m}}}),f.$on("click",m[6]),v=new ef({props:{filter:cf,paint:{"circle-radius":15,"circle-color":yu(["get","kind"],{border_intersection:"green"},"red")},$$slots:{default:[gy]},$$scope:{ctx:m}}}),k=new tf({props:{beforeId:"Building",filter:af,manageHoverState:!0,paint:{"fill-color":["get","color"],"fill-opacity":q_(.6,1)}}}),{c(){Ri(f.$$.fragment),_=fn(),Ri(v.$$.fragment),E=fn(),Ri(k.$$.fragment)},m(s,H){Ai(f,s,H),ci(s,_,H),Ai(v,s,H),ci(s,E,H),Ai(k,s,H),B=!0},p(s,H){const V={};H&2048&&(V.$$scope={dirty:H,ctx:s}),f.$set(V);const ge={};H&2048&&(ge.$$scope={dirty:H,ctx:s}),v.$set(ge)},i(s){B||(ft(f.$$.fragment,s),ft(v.$$.fragment,s),ft(k.$$.fragment,s),B=!0)},o(s){St(f.$$.fragment,s),St(v.$$.fragment,s),St(k.$$.fragment,s),B=!1},d(s){s&&(si(_),si(E)),ki(f,s),ki(v,s),ki(k,s)}}}function vy(m){let f,_;return f=new Mh({props:{data:m[0],generateId:!0,$$slots:{default:[yy]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&2048&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function xy(m,f,_){let{map:v}=f,{model:E}=f,{boundary:k}=f,{addingFilter:B=!1}=f,s=["#8dd3c7","#ffffb3","#bebada","#80b1d3","#fdb462","#b3de69","#fccde5","#bc80bd","#ccebc5","#ffed6f"],H=JSON.parse(E.analyzeNeighbourhood(k)),V=Math.max(...H.features.map(Ie=>Ie.properties.shortcuts??0));for(let Ie of H.features)Ie.properties.color=="disconnected"?Ie.properties.color="red":Object.hasOwn(Ie.properties,"color")&&(Ie.properties.color=s[Ie.properties.color%s.length]);Ba(be);function ge(Ie){E.addModalFilter(Ie.lngLat),be()}function be(){_(3,B=!1),v.off("click",ge),_(2,v.style.cursor="inherit",v)}const _e=Ie=>window.open(Ie.detail.features[0].properties.way,"_blank");return m.$$set=Ie=>{"map"in Ie&&_(2,v=Ie.map),"model"in Ie&&_(4,E=Ie.model),"boundary"in Ie&&_(5,k=Ie.boundary),"addingFilter"in Ie&&_(3,B=Ie.addingFilter)},m.$$.update=()=>{m.$$.dirty&12&&B&&(v.on("click",ge),_(2,v.style.cursor="crosshair",v))},[H,V,v,B,E,k,_e]}class by extends Wr{constructor(f){super(),Gr(this,f,xy,vy,Tr,{map:2,model:4,boundary:5,addingFilter:3})}}function wy(m){let f,_;return f=new zh({props:{properties:m[2].properties}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&4&&(k.properties=v[2].properties),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Sy(m){let f,_;return f=new Ph({props:{openOn:"hover",$$slots:{default:[wy,({data:v})=>({2:v}),({data:v})=>v?4:0]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&12&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ty(m){let f,_;return f=new Ah({props:{id:"network",paint:{"line-width":5,"line-color":"black"},hoverCursor:"pointer",$$slots:{default:[Sy]},$$scope:{ctx:m}}}),f.$on("click",m[1]),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&8&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Iy(m){let f,_;return f=new Mh({props:{data:JSON.parse(m[0].render()),$$slots:{default:[Ty]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&1&&(k.data=JSON.parse(v[0].render())),E&8&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ey(m,f,_){let{model:v}=f;const E=k=>window.open(k.detail.features[0].properties.way,"_blank");return m.$$set=k=>{"model"in k&&_(0,v=k.model)},[v,E]}class Cy extends Wr{constructor(f){super(),Gr(this,f,Ey,Iy,Tr,{model:0})}}function Op(m){let f,_,v;function E(B){m[8](B)}let k={map:m[2]};return m[0]!==void 0&&(k.model=m[0]),f=new py({props:k}),ea.push(()=>Lc(f,"model",E)),{c(){Ri(f.$$.fragment)},m(B,s){Ai(f,B,s),v=!0},p(B,s){const H={};s&4&&(H.map=B[2]),!_&&s&1&&(_=!0,H.model=B[0],zc(()=>_=!1)),f.$set(H)},i(B){v||(ft(f.$$.fragment,B),v=!0)},o(B){St(f.$$.fragment,B),v=!1},d(B){ki(f,B)}}}function My(m){let f,_,v,E,k,B,s,H,V,ge,be,_e;return{c(){f=Zt("div"),_=Zt("button"),_.textContent="Reset",v=fn(),E=Zt("div"),k=Zt("button"),k.textContent="Edit boundary",B=fn(),s=Zt("div"),H=Zt("button"),H.textContent="Add a modal filter",V=fn(),ge=Zt("p"),ge.textContent="Analyze and edit now"},m(Ie,De){ci(Ie,f,De),mi(f,_),ci(Ie,v,De),ci(Ie,E,De),mi(E,k),ci(Ie,B,De),ci(Ie,s,De),mi(s,H),ci(Ie,V,De),ci(Ie,ge,De),be||(_e=[Ks(_,"click",m[6]),Ks(k,"click",m[4]),Ks(H,"click",m[9])],be=!0)},p:Ar,d(Ie){Ie&&(si(f),si(v),si(E),si(B),si(s),si(V),si(ge)),be=!1,Ra(_e)}}}function Ay(m){let f;return{c(){f=Zt("p"),f.textContent="Draw the boundary..."},m(_,v){ci(_,f,v)},p:Ar,d(_){_&&si(f)}}}function ky(m){let f,_,v,E,k,B,s;return{c(){f=Zt("div"),_=Zt("button"),_.textContent="Set boundary",v=fn(),E=Zt("div"),k=Zt("button"),k.textContent="Quickset boundary (dev)"},m(H,V){ci(H,f,V),mi(f,_),ci(H,v,V),ci(H,E,V),mi(E,k),B||(s=[Ks(_,"click",m[4]),Ks(k,"click",m[5])],B=!0)},p:Ar,d(H){H&&(si(f),si(v),si(E)),B=!1,Ra(s)}}}function Py(m){let f,_,v,E,k,B,s,H,V=m[2]&&Op(m);function ge(Ie,De){if(Ie[1].mode=="network"&&Ie[0])return ky;if(Ie[1].mode=="set-boundary")return Ay;if(Ie[1].mode=="neighbourhood")return My}let be=ge(m),_e=be&&be(m);return{c(){f=Zt("div"),V&&V.c(),_=fn(),v=Zt("div"),E=Zt("button"),E.textContent="Zoom to fit",k=fn(),_e&&_e.c(),vs(f,"slot","left")},m(Ie,De){ci(Ie,f,De),V&&V.m(f,null),mi(f,_),mi(f,v),mi(v,E),mi(f,k),_e&&_e.m(f,null),B=!0,s||(H=Ks(E,"click",m[3]),s=!0)},p(Ie,De){Ie[2]?V?(V.p(Ie,De),De&4&&ft(V,1)):(V=Op(Ie),V.c(),ft(V,1),V.m(f,_)):V&&(rs(),St(V,1,1,()=>{V=null}),ns()),be===(be=ge(Ie))&&_e?_e.p(Ie,De):(_e&&_e.d(1),_e=be&&be(Ie),_e&&(_e.c(),_e.m(f,null)))},i(Ie){B||(ft(V),B=!0)},o(Ie){St(V),B=!1},d(Ie){Ie&&si(f),V&&V.d(),_e&&_e.d(),s=!1,H()}}}function Bp(m){let f,_,v,E;const k=[Dy,Ly,zy],B=[];function s(H,V){return H[1].mode=="network"?0:H[1].mode=="set-boundary"?1:H[1].mode=="neighbourhood"?2:-1}return~(f=s(m))&&(_=B[f]=k[f](m)),{c(){_&&_.c(),v=Oa()},m(H,V){~f&&B[f].m(H,V),ci(H,v,V),E=!0},p(H,V){let ge=f;f=s(H),f===ge?~f&&B[f].p(H,V):(_&&(rs(),St(B[ge],1,1,()=>{B[ge]=null}),ns()),~f?(_=B[f],_?_.p(H,V):(_=B[f]=k[f](H),_.c()),ft(_,1),_.m(v.parentNode,v)):_=null)},i(H){E||(ft(_),E=!0)},o(H){St(_),E=!1},d(H){H&&si(v),~f&&B[f].d(H)}}}function zy(m){let f,_;return f=new by({props:{map:m[2],model:m[0],boundary:m[1].boundary,addingFilter:m[1].addingFilter}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&4&&(k.map=v[2]),E&1&&(k.model=v[0]),E&2&&(k.boundary=v[1].boundary),E&2&&(k.addingFilter=v[1].addingFilter),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Ly(m){let f,_;return f=new uy({}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p:Ar,i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Dy(m){let f,_;return f=new Cy({props:{model:m[0]}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,E){const k={};E&1&&(k.model=v[0]),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function Fy(m){let f,_,v=m[0]&&Bp(m);return{c(){v&&v.c(),f=Oa()},m(E,k){v&&v.m(E,k),ci(E,f,k),_=!0},p(E,k){E[0]?v?(v.p(E,k),k&1&&ft(v,1)):(v=Bp(E),v.c(),ft(v,1),v.m(f.parentNode,f)):v&&(rs(),St(v,1,1,()=>{v=null}),ns())},i(E){_||(ft(v),_=!0)},o(E){St(v),_=!1},d(E){E&&si(f),v&&v.d(E)}}}function Ry(m){let f,_,v,E;function k(s){m[7](s)}let B={style:"https://api.maptiler.com/maps/dataviz/style.json?key=MZEJTanw3WpxRvt7qDfo",standardControls:!0,hash:!0,$$slots:{default:[Fy]},$$scope:{ctx:m}};return m[2]!==void 0&&(B.map=m[2]),_=new bg({props:B}),ea.push(()=>Lc(_,"map",k)),{c(){f=Zt("div"),Ri(_.$$.fragment),vs(f,"slot","main"),Ic(f,"position","relative"),Ic(f,"width","100%"),Ic(f,"height","100vh")},m(s,H){ci(s,f,H),Ai(_,f,null),E=!0},p(s,H){const V={};H&4103&&(V.$$scope={dirty:H,ctx:s}),!v&&H&4&&(v=!0,V.map=s[2],zc(()=>v=!1)),_.$set(V)},i(s){E||(ft(_.$$.fragment,s),E=!0)},o(s){St(_.$$.fragment,s),E=!1},d(s){s&&si(f),ki(_)}}}function Oy(m){let f,_;return f=new Ng({props:{$$slots:{main:[Ry],left:[Py]},$$scope:{ctx:m}}}),{c(){Ri(f.$$.fragment)},m(v,E){Ai(f,v,E),_=!0},p(v,[E]){const k={};E&4103&&(k.$$scope={dirty:E,ctx:v}),f.$set(k)},i(v){_||(ft(f.$$.fragment,v),_=!0)},o(v){St(f.$$.fragment,v),_=!1},d(v){ki(f,v)}}}function By(m,f,_){let v={mode:"network"},E,k,B;function s(){if(B&&E){let Fe=bh(JSON.parse(E.render()));B.fitBounds(Fe,{animate:!1})}}function H(Fe){E&&(console.log("New map model loaded"),s(),_(1,v={mode:"network"}),k=new sy(B,E.toRouteSnapper()))}function V(){v.mode=="network"?k.startArea():v.mode=="neighbourhood"&&k.editExistingArea(v.boundary),_(1,v={mode:"set-boundary"}),k.addEventListenerSuccess(Fe=>{_(1,v={mode:"neighbourhood",boundary:Fe,addingFilter:!1}),k.clearEventListeners()}),k.addEventListenerFailure(()=>{_(1,v={mode:"network"}),k.clearEventListeners()})}function ge(){_(1,v={mode:"neighbourhood",boundary:{geometry:{coordinates:[[[-2.582766,51.455751],[-2.582715,51.455655],[-2.582477,51.455207],[-2.582446,51.455157],[-2.582409,51.455129],[-2.582334,51.455111],[-2.58226,51.455115],[-2.582174,51.455113],[-2.582115,51.455126],[-2.581976,51.454882],[-2.581812,51.454602],[-2.582181,51.454505],[-2.582091,51.454224],[-2.582071,51.454159],[-2.582042,51.454073],[-2.581915,51.453674],[-2.581972,51.453287],[-2.581714,51.45322],[-2.58169,51.453214],[-2.581866,51.452966],[-2.581588,51.45288],[-2.581521,51.45281],[-2.581584,51.452731],[-2.581401,51.452671],[-2.581103,51.452566],[-2.579862,51.452092],[-2.579808,51.452069],[-2.579753,51.452045],[-2.579074,51.451752],[-2.578228,51.45135],[-2.578131,51.451293],[-2.578066,51.451251],[-2.577641,51.450924],[-2.577504,51.450818],[-2.577228,51.450628],[-2.576815,51.450348],[-2.576749,51.450294],[-2.576487,51.450084],[-2.57599,51.449653],[-2.575886,51.449685],[-2.575807,51.449709],[-2.575324,51.44978],[-2.574139,51.449954],[-2.573887,51.450007],[-2.573699,51.450097],[-2.573534,51.450262],[-2.573415,51.450398],[-2.573305,51.45055],[-2.573286,51.450604],[-2.573279,51.450637],[-2.573275,51.45066],[-2.57327,51.450705],[-2.573278,51.450761],[-2.573366,51.451076],[-2.573491,51.451385],[-2.573553,51.451514],[-2.573591,51.451605],[-2.573635,51.451726],[-2.573785,51.451943],[-2.573862,51.452052],[-2.574029,51.452215],[-2.574301,51.452438],[-2.573889,51.452598],[-2.572852,51.452994],[-2.57186,51.453341],[-2.571252,51.453557],[-2.571012,51.45364],[-2.570853,51.453697],[-2.5705,51.453823],[-2.570369,51.45387],[-2.570287,51.453901],[-2.570078,51.453977],[-2.569972,51.454016],[-2.569803,51.454082],[-2.569713,51.454115],[-2.569632,51.454144],[-2.569501,51.454184],[-2.569137,51.454304],[-2.568791,51.454436],[-2.568648,51.454505],[-2.568666,51.454525],[-2.568674,51.454548],[-2.56867,51.454571],[-2.568656,51.454593],[-2.568632,51.454611],[-2.568601,51.454623],[-2.568688,51.454756],[-2.568967,51.454972],[-2.569021,51.455014],[-2.568715,51.455271],[-2.568646,51.455327],[-2.568374,51.455559],[-2.568108,51.455772],[-2.567496,51.456239],[-2.567414,51.456319],[-2.567628,51.456492],[-2.567643,51.456517],[-2.567649,51.456526],[-2.567656,51.456544],[-2.567659,51.456553],[-2.567655,51.456589],[-2.56766,51.456617],[-2.567688,51.456643],[-2.567726,51.456662],[-2.567757,51.456684],[-2.567783,51.456719],[-2.567793,51.456739],[-2.567796,51.456747],[-2.56779,51.456775],[-2.567829,51.456783],[-2.567946,51.456871],[-2.568049,51.456948],[-2.568176,51.457057],[-2.568213,51.457083],[-2.568322,51.45716],[-2.568414,51.457216],[-2.56846,51.457251],[-2.568445,51.457292],[-2.567621,51.457946],[-2.567536,51.457943],[-2.567354,51.458066],[-2.567316,51.458148],[-2.567406,51.458165],[-2.567764,51.458232],[-2.568027,51.458276],[-2.568076,51.458283],[-2.568358,51.458287],[-2.568442,51.45829],[-2.568972,51.458337],[-2.56919,51.458356],[-2.569451,51.458365],[-2.569642,51.458363],[-2.569759,51.458354],[-2.570133,51.458292],[-2.570486,51.458208],[-2.570908,51.458114],[-2.571103,51.458103],[-2.57128,51.458116],[-2.571551,51.458175],[-2.571638,51.458205],[-2.571745,51.458247],[-2.571982,51.45828],[-2.572208,51.458286],[-2.573275,51.458227],[-2.573563,51.458208],[-2.573671,51.458195],[-2.573724,51.458183],[-2.573781,51.458175],[-2.573895,51.458156],[-2.573943,51.458146],[-2.576163,51.457686],[-2.576531,51.457615],[-2.576651,51.457592],[-2.576817,51.457539],[-2.57706,51.4574],[-2.577425,51.457222],[-2.577781,51.457082],[-2.578035,51.456998],[-2.578202,51.456951],[-2.578496,51.456874],[-2.578585,51.456849],[-2.578781,51.456795],[-2.579666,51.456548],[-2.579847,51.456493],[-2.579937,51.456464],[-2.580159,51.456403],[-2.580275,51.456396],[-2.580319,51.456385],[-2.580442,51.456351],[-2.580625,51.456286],[-2.580716,51.456255],[-2.580822,51.456205],[-2.580925,51.45617],[-2.581018,51.456139],[-2.581116,51.456108],[-2.581297,51.456054],[-2.581424,51.456018],[-2.581562,51.455983],[-2.581716,51.455949],[-2.581883,51.455913],[-2.582016,51.455898],[-2.582766,51.455751]]],type:"Polygon"},properties:{waypoints:[{lat:51.455751,lon:-2.582766,snapped:!0},{lat:51.449653,lon:-2.57599,snapped:!0},{lat:51.457083,lon:-2.568213,snapped:!0},{lat:51.455751,lon:-2.582766,snapped:!0}]},type:"Feature"},addingFilter:!1})}function be(){_(1,v={mode:"network"})}function _e(Fe){B=Fe,_(2,B)}function Ie(Fe){E=Fe,_(0,E)}const De=()=>_(1,v.addingFilter=!0,v);return m.$$.update=()=>{m.$$.dirty&1&&H()},[E,v,B,s,V,ge,be,_e,Ie,De]}class Ny extends Wr{constructor(f){super(),Gr(this,f,By,Oy,Tr,{})}}new Ny({target:document.getElementById("app")}); diff --git a/index.html b/index.html index f70c54c..4aeef7f 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ LTN from scratch - +