@opengis/gis 0.1.13 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,845 @@
1
+ "use strict";var uv=Object.defineProperty;var hv=(u,p,y)=>p in u?uv(u,p,{enumerable:!0,configurable:!0,writable:!0,value:y}):u[p]=y;var Pr=(u,p,y)=>hv(u,typeof p!="symbol"?p+"":p,y);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const _=require("vue");function xg(u,p){return function(){return u.apply(p,arguments)}}const{toString:dv}=Object.prototype,{getPrototypeOf:ip}=Object,{iterator:hh,toStringTag:bg}=Symbol,dh=(u=>p=>{const y=dv.call(p);return u[y]||(u[y]=y.slice(8,-1).toLowerCase())})(Object.create(null)),Hn=u=>(u=u.toLowerCase(),p=>dh(p)===u),ph=u=>p=>typeof p===u,{isArray:$a}=Array,dc=ph("undefined");function pv(u){return u!==null&&!dc(u)&&u.constructor!==null&&!dc(u.constructor)&&tn(u.constructor.isBuffer)&&u.constructor.isBuffer(u)}const wg=Hn("ArrayBuffer");function fv(u){let p;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?p=ArrayBuffer.isView(u):p=u&&u.buffer&&wg(u.buffer),p}const mv=ph("string"),tn=ph("function"),Sg=ph("number"),fh=u=>u!==null&&typeof u=="object",gv=u=>u===!0||u===!1,$u=u=>{if(dh(u)!=="object")return!1;const p=ip(u);return(p===null||p===Object.prototype||Object.getPrototypeOf(p)===null)&&!(bg in u)&&!(hh in u)},yv=Hn("Date"),_v=Hn("File"),vv=Hn("Blob"),xv=Hn("FileList"),bv=u=>fh(u)&&tn(u.pipe),wv=u=>{let p;return u&&(typeof FormData=="function"&&u instanceof FormData||tn(u.append)&&((p=dh(u))==="formdata"||p==="object"&&tn(u.toString)&&u.toString()==="[object FormData]"))},Sv=Hn("URLSearchParams"),[Av,kv,Cv,Tv]=["ReadableStream","Request","Response","Headers"].map(Hn),Ev=u=>u.trim?u.trim():u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fc(u,p,{allOwnKeys:y=!1}={}){if(u===null||typeof u>"u")return;let b,k;if(typeof u!="object"&&(u=[u]),$a(u))for(b=0,k=u.length;b<k;b++)p.call(null,u[b],b,u);else{const P=y?Object.getOwnPropertyNames(u):Object.keys(u),x=P.length;let o;for(b=0;b<x;b++)o=P[b],p.call(null,u[o],o,u)}}function Ag(u,p){p=p.toLowerCase();const y=Object.keys(u);let b=y.length,k;for(;b-- >0;)if(k=y[b],p===k.toLowerCase())return k;return null}const Ns=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,kg=u=>!dc(u)&&u!==Ns;function Zd(){const{caseless:u}=kg(this)&&this||{},p={},y=(b,k)=>{const P=u&&Ag(p,k)||k;$u(p[P])&&$u(b)?p[P]=Zd(p[P],b):$u(b)?p[P]=Zd({},b):$a(b)?p[P]=b.slice():p[P]=b};for(let b=0,k=arguments.length;b<k;b++)arguments[b]&&fc(arguments[b],y);return p}const Pv=(u,p,y,{allOwnKeys:b}={})=>(fc(p,(k,P)=>{y&&tn(k)?u[P]=xg(k,y):u[P]=k},{allOwnKeys:b}),u),Iv=u=>(u.charCodeAt(0)===65279&&(u=u.slice(1)),u),Mv=(u,p,y,b)=>{u.prototype=Object.create(p.prototype,b),u.prototype.constructor=u,Object.defineProperty(u,"super",{value:p.prototype}),y&&Object.assign(u.prototype,y)},Lv=(u,p,y,b)=>{let k,P,x;const o={};if(p=p||{},u==null)return p;do{for(k=Object.getOwnPropertyNames(u),P=k.length;P-- >0;)x=k[P],(!b||b(x,u,p))&&!o[x]&&(p[x]=u[x],o[x]=!0);u=y!==!1&&ip(u)}while(u&&(!y||y(u,p))&&u!==Object.prototype);return p},Rv=(u,p,y)=>{u=String(u),(y===void 0||y>u.length)&&(y=u.length),y-=p.length;const b=u.indexOf(p,y);return b!==-1&&b===y},Dv=u=>{if(!u)return null;if($a(u))return u;let p=u.length;if(!Sg(p))return null;const y=new Array(p);for(;p-- >0;)y[p]=u[p];return y},zv=(u=>p=>u&&p instanceof u)(typeof Uint8Array<"u"&&ip(Uint8Array)),Bv=(u,p)=>{const b=(u&&u[hh]).call(u);let k;for(;(k=b.next())&&!k.done;){const P=k.value;p.call(u,P[0],P[1])}},Vv=(u,p)=>{let y;const b=[];for(;(y=u.exec(p))!==null;)b.push(y);return b},Ov=Hn("HTMLFormElement"),Fv=u=>u.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(y,b,k){return b.toUpperCase()+k}),nm=(({hasOwnProperty:u})=>(p,y)=>u.call(p,y))(Object.prototype),Nv=Hn("RegExp"),Cg=(u,p)=>{const y=Object.getOwnPropertyDescriptors(u),b={};fc(y,(k,P)=>{let x;(x=p(k,P,u))!==!1&&(b[P]=x||k)}),Object.defineProperties(u,b)},qv=u=>{Cg(u,(p,y)=>{if(tn(u)&&["arguments","caller","callee"].indexOf(y)!==-1)return!1;const b=u[y];if(tn(b)){if(p.enumerable=!1,"writable"in p){p.writable=!1;return}p.set||(p.set=()=>{throw Error("Can not rewrite read-only method '"+y+"'")})}})},Uv=(u,p)=>{const y={},b=k=>{k.forEach(P=>{y[P]=!0})};return $a(u)?b(u):b(String(u).split(p)),y},jv=()=>{},Hv=(u,p)=>u!=null&&Number.isFinite(u=+u)?u:p;function Wv(u){return!!(u&&tn(u.append)&&u[bg]==="FormData"&&u[hh])}const Zv=u=>{const p=new Array(10),y=(b,k)=>{if(fh(b)){if(p.indexOf(b)>=0)return;if(!("toJSON"in b)){p[k]=b;const P=$a(b)?[]:{};return fc(b,(x,o)=>{const B=y(x,k+1);!dc(B)&&(P[o]=B)}),p[k]=void 0,P}}return b};return y(u,0)},Kv=Hn("AsyncFunction"),Gv=u=>u&&(fh(u)||tn(u))&&tn(u.then)&&tn(u.catch),Tg=((u,p)=>u?setImmediate:p?((y,b)=>(Ns.addEventListener("message",({source:k,data:P})=>{k===Ns&&P===y&&b.length&&b.shift()()},!1),k=>{b.push(k),Ns.postMessage(y,"*")}))(`axios@${Math.random()}`,[]):y=>setTimeout(y))(typeof setImmediate=="function",tn(Ns.postMessage)),Jv=typeof queueMicrotask<"u"?queueMicrotask.bind(Ns):typeof process<"u"&&process.nextTick||Tg,Xv=u=>u!=null&&tn(u[hh]),Ge={isArray:$a,isArrayBuffer:wg,isBuffer:pv,isFormData:wv,isArrayBufferView:fv,isString:mv,isNumber:Sg,isBoolean:gv,isObject:fh,isPlainObject:$u,isReadableStream:Av,isRequest:kv,isResponse:Cv,isHeaders:Tv,isUndefined:dc,isDate:yv,isFile:_v,isBlob:vv,isRegExp:Nv,isFunction:tn,isStream:bv,isURLSearchParams:Sv,isTypedArray:zv,isFileList:xv,forEach:fc,merge:Zd,extend:Pv,trim:Ev,stripBOM:Iv,inherits:Mv,toFlatObject:Lv,kindOf:dh,kindOfTest:Hn,endsWith:Rv,toArray:Dv,forEachEntry:Bv,matchAll:Vv,isHTMLForm:Ov,hasOwnProperty:nm,hasOwnProp:nm,reduceDescriptors:Cg,freezeMethods:qv,toObjectSet:Uv,toCamelCase:Fv,noop:jv,toFiniteNumber:Hv,findKey:Ag,global:Ns,isContextDefined:kg,isSpecCompliantForm:Wv,toJSONObject:Zv,isAsyncFn:Kv,isThenable:Gv,setImmediate:Tg,asap:Jv,isIterable:Xv};function tr(u,p,y,b,k){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=u,this.name="AxiosError",p&&(this.code=p),y&&(this.config=y),b&&(this.request=b),k&&(this.response=k,this.status=k.status?k.status:null)}Ge.inherits(tr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ge.toJSONObject(this.config),code:this.code,status:this.status}}});const Eg=tr.prototype,Pg={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(u=>{Pg[u]={value:u}});Object.defineProperties(tr,Pg);Object.defineProperty(Eg,"isAxiosError",{value:!0});tr.from=(u,p,y,b,k,P)=>{const x=Object.create(Eg);return Ge.toFlatObject(u,x,function(B){return B!==Error.prototype},o=>o!=="isAxiosError"),tr.call(x,u.message,p,y,b,k),x.cause=u,x.name=u.name,P&&Object.assign(x,P),x};const Qv=null;function Kd(u){return Ge.isPlainObject(u)||Ge.isArray(u)}function Ig(u){return Ge.endsWith(u,"[]")?u.slice(0,-2):u}function om(u,p,y){return u?u.concat(p).map(function(k,P){return k=Ig(k),!y&&P?"["+k+"]":k}).join(y?".":""):p}function Yv(u){return Ge.isArray(u)&&!u.some(Kd)}const $v=Ge.toFlatObject(Ge,{},null,function(p){return/^is[A-Z]/.test(p)});function mh(u,p,y){if(!Ge.isObject(u))throw new TypeError("target must be an object");p=p||new FormData,y=Ge.toFlatObject(y,{metaTokens:!0,dots:!1,indexes:!1},!1,function(U,G){return!Ge.isUndefined(G[U])});const b=y.metaTokens,k=y.visitor||M,P=y.dots,x=y.indexes,B=(y.Blob||typeof Blob<"u"&&Blob)&&Ge.isSpecCompliantForm(p);if(!Ge.isFunction(k))throw new TypeError("visitor must be a function");function D(T){if(T===null)return"";if(Ge.isDate(T))return T.toISOString();if(!B&&Ge.isBlob(T))throw new tr("Blob is not supported. Use a Buffer instead.");return Ge.isArrayBuffer(T)||Ge.isTypedArray(T)?B&&typeof Blob=="function"?new Blob([T]):Buffer.from(T):T}function M(T,U,G){let ie=T;if(T&&!G&&typeof T=="object"){if(Ge.endsWith(U,"{}"))U=b?U:U.slice(0,-2),T=JSON.stringify(T);else if(Ge.isArray(T)&&Yv(T)||(Ge.isFileList(T)||Ge.endsWith(U,"[]"))&&(ie=Ge.toArray(T)))return U=Ig(U),ie.forEach(function(Ie,ee){!(Ge.isUndefined(Ie)||Ie===null)&&p.append(x===!0?om([U],ee,P):x===null?U:U+"[]",D(Ie))}),!1}return Kd(T)?!0:(p.append(om(G,U,P),D(T)),!1)}const O=[],L=Object.assign($v,{defaultVisitor:M,convertValue:D,isVisitable:Kd});function C(T,U){if(!Ge.isUndefined(T)){if(O.indexOf(T)!==-1)throw Error("Circular reference detected in "+U.join("."));O.push(T),Ge.forEach(T,function(ie,le){(!(Ge.isUndefined(ie)||ie===null)&&k.call(p,ie,Ge.isString(le)?le.trim():le,U,L))===!0&&C(ie,U?U.concat(le):[le])}),O.pop()}}if(!Ge.isObject(u))throw new TypeError("data must be an object");return C(u),p}function sm(u){const p={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(u).replace(/[!'()~]|%20|%00/g,function(b){return p[b]})}function np(u,p){this._pairs=[],u&&mh(u,this,p)}const Mg=np.prototype;Mg.append=function(p,y){this._pairs.push([p,y])};Mg.toString=function(p){const y=p?function(b){return p.call(this,b,sm)}:sm;return this._pairs.map(function(k){return y(k[0])+"="+y(k[1])},"").join("&")};function e0(u){return encodeURIComponent(u).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lg(u,p,y){if(!p)return u;const b=y&&y.encode||e0;Ge.isFunction(y)&&(y={serialize:y});const k=y&&y.serialize;let P;if(k?P=k(p,y):P=Ge.isURLSearchParams(p)?p.toString():new np(p,y).toString(b),P){const x=u.indexOf("#");x!==-1&&(u=u.slice(0,x)),u+=(u.indexOf("?")===-1?"?":"&")+P}return u}class am{constructor(){this.handlers=[]}use(p,y,b){return this.handlers.push({fulfilled:p,rejected:y,synchronous:b?b.synchronous:!1,runWhen:b?b.runWhen:null}),this.handlers.length-1}eject(p){this.handlers[p]&&(this.handlers[p]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(p){Ge.forEach(this.handlers,function(b){b!==null&&p(b)})}}const Rg={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},t0=typeof URLSearchParams<"u"?URLSearchParams:np,r0=typeof FormData<"u"?FormData:null,i0=typeof Blob<"u"?Blob:null,n0={isBrowser:!0,classes:{URLSearchParams:t0,FormData:r0,Blob:i0},protocols:["http","https","file","blob","url","data"]},op=typeof window<"u"&&typeof document<"u",Gd=typeof navigator=="object"&&navigator||void 0,o0=op&&(!Gd||["ReactNative","NativeScript","NS"].indexOf(Gd.product)<0),s0=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",a0=op&&window.location.href||"http://localhost",l0=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:op,hasStandardBrowserEnv:o0,hasStandardBrowserWebWorkerEnv:s0,navigator:Gd,origin:a0},Symbol.toStringTag,{value:"Module"})),zi={...l0,...n0};function c0(u,p){return mh(u,new zi.classes.URLSearchParams,Object.assign({visitor:function(y,b,k,P){return zi.isNode&&Ge.isBuffer(y)?(this.append(b,y.toString("base64")),!1):P.defaultVisitor.apply(this,arguments)}},p))}function u0(u){return Ge.matchAll(/\w+|\[(\w*)]/g,u).map(p=>p[0]==="[]"?"":p[1]||p[0])}function h0(u){const p={},y=Object.keys(u);let b;const k=y.length;let P;for(b=0;b<k;b++)P=y[b],p[P]=u[P];return p}function Dg(u){function p(y,b,k,P){let x=y[P++];if(x==="__proto__")return!0;const o=Number.isFinite(+x),B=P>=y.length;return x=!x&&Ge.isArray(k)?k.length:x,B?(Ge.hasOwnProp(k,x)?k[x]=[k[x],b]:k[x]=b,!o):((!k[x]||!Ge.isObject(k[x]))&&(k[x]=[]),p(y,b,k[x],P)&&Ge.isArray(k[x])&&(k[x]=h0(k[x])),!o)}if(Ge.isFormData(u)&&Ge.isFunction(u.entries)){const y={};return Ge.forEachEntry(u,(b,k)=>{p(u0(b),k,y,0)}),y}return null}function d0(u,p,y){if(Ge.isString(u))try{return(p||JSON.parse)(u),Ge.trim(u)}catch(b){if(b.name!=="SyntaxError")throw b}return(y||JSON.stringify)(u)}const mc={transitional:Rg,adapter:["xhr","http","fetch"],transformRequest:[function(p,y){const b=y.getContentType()||"",k=b.indexOf("application/json")>-1,P=Ge.isObject(p);if(P&&Ge.isHTMLForm(p)&&(p=new FormData(p)),Ge.isFormData(p))return k?JSON.stringify(Dg(p)):p;if(Ge.isArrayBuffer(p)||Ge.isBuffer(p)||Ge.isStream(p)||Ge.isFile(p)||Ge.isBlob(p)||Ge.isReadableStream(p))return p;if(Ge.isArrayBufferView(p))return p.buffer;if(Ge.isURLSearchParams(p))return y.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),p.toString();let o;if(P){if(b.indexOf("application/x-www-form-urlencoded")>-1)return c0(p,this.formSerializer).toString();if((o=Ge.isFileList(p))||b.indexOf("multipart/form-data")>-1){const B=this.env&&this.env.FormData;return mh(o?{"files[]":p}:p,B&&new B,this.formSerializer)}}return P||k?(y.setContentType("application/json",!1),d0(p)):p}],transformResponse:[function(p){const y=this.transitional||mc.transitional,b=y&&y.forcedJSONParsing,k=this.responseType==="json";if(Ge.isResponse(p)||Ge.isReadableStream(p))return p;if(p&&Ge.isString(p)&&(b&&!this.responseType||k)){const x=!(y&&y.silentJSONParsing)&&k;try{return JSON.parse(p)}catch(o){if(x)throw o.name==="SyntaxError"?tr.from(o,tr.ERR_BAD_RESPONSE,this,null,this.response):o}}return p}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zi.classes.FormData,Blob:zi.classes.Blob},validateStatus:function(p){return p>=200&&p<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ge.forEach(["delete","get","head","post","put","patch"],u=>{mc.headers[u]={}});const p0=Ge.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),f0=u=>{const p={};let y,b,k;return u&&u.split(`
2
+ `).forEach(function(x){k=x.indexOf(":"),y=x.substring(0,k).trim().toLowerCase(),b=x.substring(k+1).trim(),!(!y||p[y]&&p0[y])&&(y==="set-cookie"?p[y]?p[y].push(b):p[y]=[b]:p[y]=p[y]?p[y]+", "+b:b)}),p},lm=Symbol("internals");function ic(u){return u&&String(u).trim().toLowerCase()}function eh(u){return u===!1||u==null?u:Ge.isArray(u)?u.map(eh):String(u)}function m0(u){const p=Object.create(null),y=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let b;for(;b=y.exec(u);)p[b[1]]=b[2];return p}const g0=u=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(u.trim());function Dd(u,p,y,b,k){if(Ge.isFunction(b))return b.call(this,p,y);if(k&&(p=y),!!Ge.isString(p)){if(Ge.isString(b))return p.indexOf(b)!==-1;if(Ge.isRegExp(b))return b.test(p)}}function y0(u){return u.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(p,y,b)=>y.toUpperCase()+b)}function _0(u,p){const y=Ge.toCamelCase(" "+p);["get","set","has"].forEach(b=>{Object.defineProperty(u,b+y,{value:function(k,P,x){return this[b].call(this,p,k,P,x)},configurable:!0})})}let rn=class{constructor(p){p&&this.set(p)}set(p,y,b){const k=this;function P(o,B,D){const M=ic(B);if(!M)throw new Error("header name must be a non-empty string");const O=Ge.findKey(k,M);(!O||k[O]===void 0||D===!0||D===void 0&&k[O]!==!1)&&(k[O||B]=eh(o))}const x=(o,B)=>Ge.forEach(o,(D,M)=>P(D,M,B));if(Ge.isPlainObject(p)||p instanceof this.constructor)x(p,y);else if(Ge.isString(p)&&(p=p.trim())&&!g0(p))x(f0(p),y);else if(Ge.isObject(p)&&Ge.isIterable(p)){let o={},B,D;for(const M of p){if(!Ge.isArray(M))throw TypeError("Object iterator must return a key-value pair");o[D=M[0]]=(B=o[D])?Ge.isArray(B)?[...B,M[1]]:[B,M[1]]:M[1]}x(o,y)}else p!=null&&P(y,p,b);return this}get(p,y){if(p=ic(p),p){const b=Ge.findKey(this,p);if(b){const k=this[b];if(!y)return k;if(y===!0)return m0(k);if(Ge.isFunction(y))return y.call(this,k,b);if(Ge.isRegExp(y))return y.exec(k);throw new TypeError("parser must be boolean|regexp|function")}}}has(p,y){if(p=ic(p),p){const b=Ge.findKey(this,p);return!!(b&&this[b]!==void 0&&(!y||Dd(this,this[b],b,y)))}return!1}delete(p,y){const b=this;let k=!1;function P(x){if(x=ic(x),x){const o=Ge.findKey(b,x);o&&(!y||Dd(b,b[o],o,y))&&(delete b[o],k=!0)}}return Ge.isArray(p)?p.forEach(P):P(p),k}clear(p){const y=Object.keys(this);let b=y.length,k=!1;for(;b--;){const P=y[b];(!p||Dd(this,this[P],P,p,!0))&&(delete this[P],k=!0)}return k}normalize(p){const y=this,b={};return Ge.forEach(this,(k,P)=>{const x=Ge.findKey(b,P);if(x){y[x]=eh(k),delete y[P];return}const o=p?y0(P):String(P).trim();o!==P&&delete y[P],y[o]=eh(k),b[o]=!0}),this}concat(...p){return this.constructor.concat(this,...p)}toJSON(p){const y=Object.create(null);return Ge.forEach(this,(b,k)=>{b!=null&&b!==!1&&(y[k]=p&&Ge.isArray(b)?b.join(", "):b)}),y}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([p,y])=>p+": "+y).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(p){return p instanceof this?p:new this(p)}static concat(p,...y){const b=new this(p);return y.forEach(k=>b.set(k)),b}static accessor(p){const b=(this[lm]=this[lm]={accessors:{}}).accessors,k=this.prototype;function P(x){const o=ic(x);b[o]||(_0(k,x),b[o]=!0)}return Ge.isArray(p)?p.forEach(P):P(p),this}};rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ge.reduceDescriptors(rn.prototype,({value:u},p)=>{let y=p[0].toUpperCase()+p.slice(1);return{get:()=>u,set(b){this[y]=b}}});Ge.freezeMethods(rn);function zd(u,p){const y=this||mc,b=p||y,k=rn.from(b.headers);let P=b.data;return Ge.forEach(u,function(o){P=o.call(y,P,k.normalize(),p?p.status:void 0)}),k.normalize(),P}function zg(u){return!!(u&&u.__CANCEL__)}function el(u,p,y){tr.call(this,u??"canceled",tr.ERR_CANCELED,p,y),this.name="CanceledError"}Ge.inherits(el,tr,{__CANCEL__:!0});function Bg(u,p,y){const b=y.config.validateStatus;!y.status||!b||b(y.status)?u(y):p(new tr("Request failed with status code "+y.status,[tr.ERR_BAD_REQUEST,tr.ERR_BAD_RESPONSE][Math.floor(y.status/100)-4],y.config,y.request,y))}function v0(u){const p=/^([-+\w]{1,25})(:?\/\/|:)/.exec(u);return p&&p[1]||""}function x0(u,p){u=u||10;const y=new Array(u),b=new Array(u);let k=0,P=0,x;return p=p!==void 0?p:1e3,function(B){const D=Date.now(),M=b[P];x||(x=D),y[k]=B,b[k]=D;let O=P,L=0;for(;O!==k;)L+=y[O++],O=O%u;if(k=(k+1)%u,k===P&&(P=(P+1)%u),D-x<p)return;const C=M&&D-M;return C?Math.round(L*1e3/C):void 0}}function b0(u,p){let y=0,b=1e3/p,k,P;const x=(D,M=Date.now())=>{y=M,k=null,P&&(clearTimeout(P),P=null),u.apply(null,D)};return[(...D)=>{const M=Date.now(),O=M-y;O>=b?x(D,M):(k=D,P||(P=setTimeout(()=>{P=null,x(k)},b-O)))},()=>k&&x(k)]}const nh=(u,p,y=3)=>{let b=0;const k=x0(50,250);return b0(P=>{const x=P.loaded,o=P.lengthComputable?P.total:void 0,B=x-b,D=k(B),M=x<=o;b=x;const O={loaded:x,total:o,progress:o?x/o:void 0,bytes:B,rate:D||void 0,estimated:D&&o&&M?(o-x)/D:void 0,event:P,lengthComputable:o!=null,[p?"download":"upload"]:!0};u(O)},y)},cm=(u,p)=>{const y=u!=null;return[b=>p[0]({lengthComputable:y,total:u,loaded:b}),p[1]]},um=u=>(...p)=>Ge.asap(()=>u(...p)),w0=zi.hasStandardBrowserEnv?((u,p)=>y=>(y=new URL(y,zi.origin),u.protocol===y.protocol&&u.host===y.host&&(p||u.port===y.port)))(new URL(zi.origin),zi.navigator&&/(msie|trident)/i.test(zi.navigator.userAgent)):()=>!0,S0=zi.hasStandardBrowserEnv?{write(u,p,y,b,k,P){const x=[u+"="+encodeURIComponent(p)];Ge.isNumber(y)&&x.push("expires="+new Date(y).toGMTString()),Ge.isString(b)&&x.push("path="+b),Ge.isString(k)&&x.push("domain="+k),P===!0&&x.push("secure"),document.cookie=x.join("; ")},read(u){const p=document.cookie.match(new RegExp("(^|;\\s*)("+u+")=([^;]*)"));return p?decodeURIComponent(p[3]):null},remove(u){this.write(u,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function A0(u){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(u)}function k0(u,p){return p?u.replace(/\/?\/$/,"")+"/"+p.replace(/^\/+/,""):u}function Vg(u,p,y){let b=!A0(p);return u&&(b||y==!1)?k0(u,p):p}const hm=u=>u instanceof rn?{...u}:u;function js(u,p){p=p||{};const y={};function b(D,M,O,L){return Ge.isPlainObject(D)&&Ge.isPlainObject(M)?Ge.merge.call({caseless:L},D,M):Ge.isPlainObject(M)?Ge.merge({},M):Ge.isArray(M)?M.slice():M}function k(D,M,O,L){if(Ge.isUndefined(M)){if(!Ge.isUndefined(D))return b(void 0,D,O,L)}else return b(D,M,O,L)}function P(D,M){if(!Ge.isUndefined(M))return b(void 0,M)}function x(D,M){if(Ge.isUndefined(M)){if(!Ge.isUndefined(D))return b(void 0,D)}else return b(void 0,M)}function o(D,M,O){if(O in p)return b(D,M);if(O in u)return b(void 0,D)}const B={url:P,method:P,data:P,baseURL:x,transformRequest:x,transformResponse:x,paramsSerializer:x,timeout:x,timeoutMessage:x,withCredentials:x,withXSRFToken:x,adapter:x,responseType:x,xsrfCookieName:x,xsrfHeaderName:x,onUploadProgress:x,onDownloadProgress:x,decompress:x,maxContentLength:x,maxBodyLength:x,beforeRedirect:x,transport:x,httpAgent:x,httpsAgent:x,cancelToken:x,socketPath:x,responseEncoding:x,validateStatus:o,headers:(D,M,O)=>k(hm(D),hm(M),O,!0)};return Ge.forEach(Object.keys(Object.assign({},u,p)),function(M){const O=B[M]||k,L=O(u[M],p[M],M);Ge.isUndefined(L)&&O!==o||(y[M]=L)}),y}const Og=u=>{const p=js({},u);let{data:y,withXSRFToken:b,xsrfHeaderName:k,xsrfCookieName:P,headers:x,auth:o}=p;p.headers=x=rn.from(x),p.url=Lg(Vg(p.baseURL,p.url,p.allowAbsoluteUrls),u.params,u.paramsSerializer),o&&x.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):"")));let B;if(Ge.isFormData(y)){if(zi.hasStandardBrowserEnv||zi.hasStandardBrowserWebWorkerEnv)x.setContentType(void 0);else if((B=x.getContentType())!==!1){const[D,...M]=B?B.split(";").map(O=>O.trim()).filter(Boolean):[];x.setContentType([D||"multipart/form-data",...M].join("; "))}}if(zi.hasStandardBrowserEnv&&(b&&Ge.isFunction(b)&&(b=b(p)),b||b!==!1&&w0(p.url))){const D=k&&P&&S0.read(P);D&&x.set(k,D)}return p},C0=typeof XMLHttpRequest<"u",T0=C0&&function(u){return new Promise(function(y,b){const k=Og(u);let P=k.data;const x=rn.from(k.headers).normalize();let{responseType:o,onUploadProgress:B,onDownloadProgress:D}=k,M,O,L,C,T;function U(){C&&C(),T&&T(),k.cancelToken&&k.cancelToken.unsubscribe(M),k.signal&&k.signal.removeEventListener("abort",M)}let G=new XMLHttpRequest;G.open(k.method.toUpperCase(),k.url,!0),G.timeout=k.timeout;function ie(){if(!G)return;const Ie=rn.from("getAllResponseHeaders"in G&&G.getAllResponseHeaders()),me={data:!o||o==="text"||o==="json"?G.responseText:G.response,status:G.status,statusText:G.statusText,headers:Ie,config:u,request:G};Bg(function(qe){y(qe),U()},function(qe){b(qe),U()},me),G=null}"onloadend"in G?G.onloadend=ie:G.onreadystatechange=function(){!G||G.readyState!==4||G.status===0&&!(G.responseURL&&G.responseURL.indexOf("file:")===0)||setTimeout(ie)},G.onabort=function(){G&&(b(new tr("Request aborted",tr.ECONNABORTED,u,G)),G=null)},G.onerror=function(){b(new tr("Network Error",tr.ERR_NETWORK,u,G)),G=null},G.ontimeout=function(){let ee=k.timeout?"timeout of "+k.timeout+"ms exceeded":"timeout exceeded";const me=k.transitional||Rg;k.timeoutErrorMessage&&(ee=k.timeoutErrorMessage),b(new tr(ee,me.clarifyTimeoutError?tr.ETIMEDOUT:tr.ECONNABORTED,u,G)),G=null},P===void 0&&x.setContentType(null),"setRequestHeader"in G&&Ge.forEach(x.toJSON(),function(ee,me){G.setRequestHeader(me,ee)}),Ge.isUndefined(k.withCredentials)||(G.withCredentials=!!k.withCredentials),o&&o!=="json"&&(G.responseType=k.responseType),D&&([L,T]=nh(D,!0),G.addEventListener("progress",L)),B&&G.upload&&([O,C]=nh(B),G.upload.addEventListener("progress",O),G.upload.addEventListener("loadend",C)),(k.cancelToken||k.signal)&&(M=Ie=>{G&&(b(!Ie||Ie.type?new el(null,u,G):Ie),G.abort(),G=null)},k.cancelToken&&k.cancelToken.subscribe(M),k.signal&&(k.signal.aborted?M():k.signal.addEventListener("abort",M)));const le=v0(k.url);if(le&&zi.protocols.indexOf(le)===-1){b(new tr("Unsupported protocol "+le+":",tr.ERR_BAD_REQUEST,u));return}G.send(P||null)})},E0=(u,p)=>{const{length:y}=u=u?u.filter(Boolean):[];if(p||y){let b=new AbortController,k;const P=function(D){if(!k){k=!0,o();const M=D instanceof Error?D:this.reason;b.abort(M instanceof tr?M:new el(M instanceof Error?M.message:M))}};let x=p&&setTimeout(()=>{x=null,P(new tr(`timeout ${p} of ms exceeded`,tr.ETIMEDOUT))},p);const o=()=>{u&&(x&&clearTimeout(x),x=null,u.forEach(D=>{D.unsubscribe?D.unsubscribe(P):D.removeEventListener("abort",P)}),u=null)};u.forEach(D=>D.addEventListener("abort",P));const{signal:B}=b;return B.unsubscribe=()=>Ge.asap(o),B}},P0=function*(u,p){let y=u.byteLength;if(y<p){yield u;return}let b=0,k;for(;b<y;)k=b+p,yield u.slice(b,k),b=k},I0=async function*(u,p){for await(const y of M0(u))yield*P0(y,p)},M0=async function*(u){if(u[Symbol.asyncIterator]){yield*u;return}const p=u.getReader();try{for(;;){const{done:y,value:b}=await p.read();if(y)break;yield b}}finally{await p.cancel()}},dm=(u,p,y,b)=>{const k=I0(u,p);let P=0,x,o=B=>{x||(x=!0,b&&b(B))};return new ReadableStream({async pull(B){try{const{done:D,value:M}=await k.next();if(D){o(),B.close();return}let O=M.byteLength;if(y){let L=P+=O;y(L)}B.enqueue(new Uint8Array(M))}catch(D){throw o(D),D}},cancel(B){return o(B),k.return()}},{highWaterMark:2})},gh=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fg=gh&&typeof ReadableStream=="function",L0=gh&&(typeof TextEncoder=="function"?(u=>p=>u.encode(p))(new TextEncoder):async u=>new Uint8Array(await new Response(u).arrayBuffer())),Ng=(u,...p)=>{try{return!!u(...p)}catch{return!1}},R0=Fg&&Ng(()=>{let u=!1;const p=new Request(zi.origin,{body:new ReadableStream,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!p}),pm=64*1024,Jd=Fg&&Ng(()=>Ge.isReadableStream(new Response("").body)),oh={stream:Jd&&(u=>u.body)};gh&&(u=>{["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!oh[p]&&(oh[p]=Ge.isFunction(u[p])?y=>y[p]():(y,b)=>{throw new tr(`Response type '${p}' is not supported`,tr.ERR_NOT_SUPPORT,b)})})})(new Response);const D0=async u=>{if(u==null)return 0;if(Ge.isBlob(u))return u.size;if(Ge.isSpecCompliantForm(u))return(await new Request(zi.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(Ge.isArrayBufferView(u)||Ge.isArrayBuffer(u))return u.byteLength;if(Ge.isURLSearchParams(u)&&(u=u+""),Ge.isString(u))return(await L0(u)).byteLength},z0=async(u,p)=>{const y=Ge.toFiniteNumber(u.getContentLength());return y??D0(p)},B0=gh&&(async u=>{let{url:p,method:y,data:b,signal:k,cancelToken:P,timeout:x,onDownloadProgress:o,onUploadProgress:B,responseType:D,headers:M,withCredentials:O="same-origin",fetchOptions:L}=Og(u);D=D?(D+"").toLowerCase():"text";let C=E0([k,P&&P.toAbortSignal()],x),T;const U=C&&C.unsubscribe&&(()=>{C.unsubscribe()});let G;try{if(B&&R0&&y!=="get"&&y!=="head"&&(G=await z0(M,b))!==0){let me=new Request(p,{method:"POST",body:b,duplex:"half"}),Le;if(Ge.isFormData(b)&&(Le=me.headers.get("content-type"))&&M.setContentType(Le),me.body){const[qe,rt]=cm(G,nh(um(B)));b=dm(me.body,pm,qe,rt)}}Ge.isString(O)||(O=O?"include":"omit");const ie="credentials"in Request.prototype;T=new Request(p,{...L,signal:C,method:y.toUpperCase(),headers:M.normalize().toJSON(),body:b,duplex:"half",credentials:ie?O:void 0});let le=await fetch(T);const Ie=Jd&&(D==="stream"||D==="response");if(Jd&&(o||Ie&&U)){const me={};["status","statusText","headers"].forEach(St=>{me[St]=le[St]});const Le=Ge.toFiniteNumber(le.headers.get("content-length")),[qe,rt]=o&&cm(Le,nh(um(o),!0))||[];le=new Response(dm(le.body,pm,qe,()=>{rt&&rt(),U&&U()}),me)}D=D||"text";let ee=await oh[Ge.findKey(oh,D)||"text"](le,u);return!Ie&&U&&U(),await new Promise((me,Le)=>{Bg(me,Le,{data:ee,headers:rn.from(le.headers),status:le.status,statusText:le.statusText,config:u,request:T})})}catch(ie){throw U&&U(),ie&&ie.name==="TypeError"&&/Load failed|fetch/i.test(ie.message)?Object.assign(new tr("Network Error",tr.ERR_NETWORK,u,T),{cause:ie.cause||ie}):tr.from(ie,ie&&ie.code,u,T)}}),Xd={http:Qv,xhr:T0,fetch:B0};Ge.forEach(Xd,(u,p)=>{if(u){try{Object.defineProperty(u,"name",{value:p})}catch{}Object.defineProperty(u,"adapterName",{value:p})}});const fm=u=>`- ${u}`,V0=u=>Ge.isFunction(u)||u===null||u===!1,qg={getAdapter:u=>{u=Ge.isArray(u)?u:[u];const{length:p}=u;let y,b;const k={};for(let P=0;P<p;P++){y=u[P];let x;if(b=y,!V0(y)&&(b=Xd[(x=String(y)).toLowerCase()],b===void 0))throw new tr(`Unknown adapter '${x}'`);if(b)break;k[x||"#"+P]=b}if(!b){const P=Object.entries(k).map(([o,B])=>`adapter ${o} `+(B===!1?"is not supported by the environment":"is not available in the build"));let x=p?P.length>1?`since :
4
+ `+P.map(fm).join(`
5
+ `):" "+fm(P[0]):"as no adapter specified";throw new tr("There is no suitable adapter to dispatch the request "+x,"ERR_NOT_SUPPORT")}return b},adapters:Xd};function Bd(u){if(u.cancelToken&&u.cancelToken.throwIfRequested(),u.signal&&u.signal.aborted)throw new el(null,u)}function mm(u){return Bd(u),u.headers=rn.from(u.headers),u.data=zd.call(u,u.transformRequest),["post","put","patch"].indexOf(u.method)!==-1&&u.headers.setContentType("application/x-www-form-urlencoded",!1),qg.getAdapter(u.adapter||mc.adapter)(u).then(function(b){return Bd(u),b.data=zd.call(u,u.transformResponse,b),b.headers=rn.from(b.headers),b},function(b){return zg(b)||(Bd(u),b&&b.response&&(b.response.data=zd.call(u,u.transformResponse,b.response),b.response.headers=rn.from(b.response.headers))),Promise.reject(b)})}const Ug="1.9.0",yh={};["object","boolean","number","function","string","symbol"].forEach((u,p)=>{yh[u]=function(b){return typeof b===u||"a"+(p<1?"n ":" ")+u}});const gm={};yh.transitional=function(p,y,b){function k(P,x){return"[Axios v"+Ug+"] Transitional option '"+P+"'"+x+(b?". "+b:"")}return(P,x,o)=>{if(p===!1)throw new tr(k(x," has been removed"+(y?" in "+y:"")),tr.ERR_DEPRECATED);return y&&!gm[x]&&(gm[x]=!0,console.warn(k(x," has been deprecated since v"+y+" and will be removed in the near future"))),p?p(P,x,o):!0}};yh.spelling=function(p){return(y,b)=>(console.warn(`${b} is likely a misspelling of ${p}`),!0)};function O0(u,p,y){if(typeof u!="object")throw new tr("options must be an object",tr.ERR_BAD_OPTION_VALUE);const b=Object.keys(u);let k=b.length;for(;k-- >0;){const P=b[k],x=p[P];if(x){const o=u[P],B=o===void 0||x(o,P,u);if(B!==!0)throw new tr("option "+P+" must be "+B,tr.ERR_BAD_OPTION_VALUE);continue}if(y!==!0)throw new tr("Unknown option "+P,tr.ERR_BAD_OPTION)}}const th={assertOptions:O0,validators:yh},ao=th.validators;let qs=class{constructor(p){this.defaults=p||{},this.interceptors={request:new am,response:new am}}async request(p,y){try{return await this._request(p,y)}catch(b){if(b instanceof Error){let k={};Error.captureStackTrace?Error.captureStackTrace(k):k=new Error;const P=k.stack?k.stack.replace(/^.+\n/,""):"";try{b.stack?P&&!String(b.stack).endsWith(P.replace(/^.+\n.+\n/,""))&&(b.stack+=`
6
+ `+P):b.stack=P}catch{}}throw b}}_request(p,y){typeof p=="string"?(y=y||{},y.url=p):y=p||{},y=js(this.defaults,y);const{transitional:b,paramsSerializer:k,headers:P}=y;b!==void 0&&th.assertOptions(b,{silentJSONParsing:ao.transitional(ao.boolean),forcedJSONParsing:ao.transitional(ao.boolean),clarifyTimeoutError:ao.transitional(ao.boolean)},!1),k!=null&&(Ge.isFunction(k)?y.paramsSerializer={serialize:k}:th.assertOptions(k,{encode:ao.function,serialize:ao.function},!0)),y.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?y.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:y.allowAbsoluteUrls=!0),th.assertOptions(y,{baseUrl:ao.spelling("baseURL"),withXsrfToken:ao.spelling("withXSRFToken")},!0),y.method=(y.method||this.defaults.method||"get").toLowerCase();let x=P&&Ge.merge(P.common,P[y.method]);P&&Ge.forEach(["delete","get","head","post","put","patch","common"],T=>{delete P[T]}),y.headers=rn.concat(x,P);const o=[];let B=!0;this.interceptors.request.forEach(function(U){typeof U.runWhen=="function"&&U.runWhen(y)===!1||(B=B&&U.synchronous,o.unshift(U.fulfilled,U.rejected))});const D=[];this.interceptors.response.forEach(function(U){D.push(U.fulfilled,U.rejected)});let M,O=0,L;if(!B){const T=[mm.bind(this),void 0];for(T.unshift.apply(T,o),T.push.apply(T,D),L=T.length,M=Promise.resolve(y);O<L;)M=M.then(T[O++],T[O++]);return M}L=o.length;let C=y;for(O=0;O<L;){const T=o[O++],U=o[O++];try{C=T(C)}catch(G){U.call(this,G);break}}try{M=mm.call(this,C)}catch(T){return Promise.reject(T)}for(O=0,L=D.length;O<L;)M=M.then(D[O++],D[O++]);return M}getUri(p){p=js(this.defaults,p);const y=Vg(p.baseURL,p.url,p.allowAbsoluteUrls);return Lg(y,p.params,p.paramsSerializer)}};Ge.forEach(["delete","get","head","options"],function(p){qs.prototype[p]=function(y,b){return this.request(js(b||{},{method:p,url:y,data:(b||{}).data}))}});Ge.forEach(["post","put","patch"],function(p){function y(b){return function(P,x,o){return this.request(js(o||{},{method:p,headers:b?{"Content-Type":"multipart/form-data"}:{},url:P,data:x}))}}qs.prototype[p]=y(),qs.prototype[p+"Form"]=y(!0)});let F0=class jg{constructor(p){if(typeof p!="function")throw new TypeError("executor must be a function.");let y;this.promise=new Promise(function(P){y=P});const b=this;this.promise.then(k=>{if(!b._listeners)return;let P=b._listeners.length;for(;P-- >0;)b._listeners[P](k);b._listeners=null}),this.promise.then=k=>{let P;const x=new Promise(o=>{b.subscribe(o),P=o}).then(k);return x.cancel=function(){b.unsubscribe(P)},x},p(function(P,x,o){b.reason||(b.reason=new el(P,x,o),y(b.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(p){if(this.reason){p(this.reason);return}this._listeners?this._listeners.push(p):this._listeners=[p]}unsubscribe(p){if(!this._listeners)return;const y=this._listeners.indexOf(p);y!==-1&&this._listeners.splice(y,1)}toAbortSignal(){const p=new AbortController,y=b=>{p.abort(b)};return this.subscribe(y),p.signal.unsubscribe=()=>this.unsubscribe(y),p.signal}static source(){let p;return{token:new jg(function(k){p=k}),cancel:p}}};function N0(u){return function(y){return u.apply(null,y)}}function q0(u){return Ge.isObject(u)&&u.isAxiosError===!0}const Qd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qd).forEach(([u,p])=>{Qd[p]=u});function Hg(u){const p=new qs(u),y=xg(qs.prototype.request,p);return Ge.extend(y,qs.prototype,p,{allOwnKeys:!0}),Ge.extend(y,p,null,{allOwnKeys:!0}),y.create=function(k){return Hg(js(u,k))},y}const Br=Hg(mc);Br.Axios=qs;Br.CanceledError=el;Br.CancelToken=F0;Br.isCancel=zg;Br.VERSION=Ug;Br.toFormData=mh;Br.AxiosError=tr;Br.Cancel=Br.CanceledError;Br.all=function(p){return Promise.all(p)};Br.spread=N0;Br.isAxiosError=q0;Br.mergeConfig=js;Br.AxiosHeaders=rn;Br.formToJSON=u=>Dg(Ge.isHTMLForm(u)?new FormData(u):u);Br.getAdapter=qg.getAdapter;Br.HttpStatusCode=Qd;Br.default=Br;const{Axios:dC,AxiosError:pC,CanceledError:fC,isCancel:mC,CancelToken:gC,VERSION:yC,all:_C,Cancel:vC,isAxiosError:xC,spread:bC,toFormData:wC,AxiosHeaders:SC,HttpStatusCode:AC,formToJSON:kC,getAdapter:CC,mergeConfig:TC}=Br;function sp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ws=sp();function Wg(u){Ws=u}var uc={exec:()=>null};function vr(u,p=""){let y=typeof u=="string"?u:u.source;const b={replace:(k,P)=>{let x=typeof P=="string"?P:P.source;return x=x.replace(Wi.caret,"$1"),y=y.replace(k,x),b},getRegex:()=>new RegExp(y,p)};return b}var Wi={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:u=>new RegExp(`^( {0,3}${u})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}#`),htmlBeginRegex:u=>new RegExp(`^ {0,${Math.min(3,u-1)}}<(?:[a-z].*>|!--)`,"i")},U0=/^(?:[ \t]*(?:\n|$))+/,j0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,H0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,gc=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,W0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ap=/(?:[*+-]|\d{1,9}[.)])/,Zg=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Kg=vr(Zg).replace(/bull/g,ap).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Z0=vr(Zg).replace(/bull/g,ap).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),lp=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,K0=/^[^\n]+/,cp=/(?!\s*\])(?:\\.|[^\[\]\\])+/,G0=vr(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",cp).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),J0=vr(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ap).getRegex(),_h="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",up=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,X0=vr("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",up).replace("tag",_h).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gg=vr(lp).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),Q0=vr(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Gg).getRegex(),hp={blockquote:Q0,code:j0,def:G0,fences:H0,heading:W0,hr:gc,html:X0,lheading:Kg,list:J0,newline:U0,paragraph:Gg,table:uc,text:K0},ym=vr("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex(),Y0={...hp,lheading:Z0,table:ym,paragraph:vr(lp).replace("hr",gc).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ym).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",_h).getRegex()},$0={...hp,html:vr(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",up).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:uc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:vr(lp).replace("hr",gc).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",Kg).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ex=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tx=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jg=/^( {2,}|\\)\n(?!\s*$)/,rx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vh=/[\p{P}\p{S}]/u,dp=/[\s\p{P}\p{S}]/u,Xg=/[^\s\p{P}\p{S}]/u,ix=vr(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dp).getRegex(),Qg=/(?!~)[\p{P}\p{S}]/u,nx=/(?!~)[\s\p{P}\p{S}]/u,ox=/(?:[^\s\p{P}\p{S}]|~)/u,sx=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Yg=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ax=vr(Yg,"u").replace(/punct/g,vh).getRegex(),lx=vr(Yg,"u").replace(/punct/g,Qg).getRegex(),$g="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cx=vr($g,"gu").replace(/notPunctSpace/g,Xg).replace(/punctSpace/g,dp).replace(/punct/g,vh).getRegex(),ux=vr($g,"gu").replace(/notPunctSpace/g,ox).replace(/punctSpace/g,nx).replace(/punct/g,Qg).getRegex(),hx=vr("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Xg).replace(/punctSpace/g,dp).replace(/punct/g,vh).getRegex(),dx=vr(/\\(punct)/,"gu").replace(/punct/g,vh).getRegex(),px=vr(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),fx=vr(up).replace("(?:-->|$)","-->").getRegex(),mx=vr("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",fx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),sh=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,gx=vr(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",sh).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ey=vr(/^!?\[(label)\]\[(ref)\]/).replace("label",sh).replace("ref",cp).getRegex(),ty=vr(/^!?\[(ref)\](?:\[\])?/).replace("ref",cp).getRegex(),yx=vr("reflink|nolink(?!\\()","g").replace("reflink",ey).replace("nolink",ty).getRegex(),pp={_backpedal:uc,anyPunctuation:dx,autolink:px,blockSkip:sx,br:Jg,code:tx,del:uc,emStrongLDelim:ax,emStrongRDelimAst:cx,emStrongRDelimUnd:hx,escape:ex,link:gx,nolink:ty,punctuation:ix,reflink:ey,reflinkSearch:yx,tag:mx,text:rx,url:uc},_x={...pp,link:vr(/^!?\[(label)\]\((.*?)\)/).replace("label",sh).getRegex(),reflink:vr(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",sh).getRegex()},Yd={...pp,emStrongRDelimAst:ux,emStrongLDelim:lx,url:vr(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},vx={...Yd,br:vr(Jg).replace("{2,}","*").getRegex(),text:vr(Yd.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Au={normal:hp,gfm:Y0,pedantic:$0},nc={normal:pp,gfm:Yd,breaks:vx,pedantic:_x},xx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},_m=u=>xx[u];function lo(u,p){if(p){if(Wi.escapeTest.test(u))return u.replace(Wi.escapeReplace,_m)}else if(Wi.escapeTestNoEncode.test(u))return u.replace(Wi.escapeReplaceNoEncode,_m);return u}function vm(u){try{u=encodeURI(u).replace(Wi.percentDecode,"%")}catch{return null}return u}function xm(u,p){var P;const y=u.replace(Wi.findPipe,(x,o,B)=>{let D=!1,M=o;for(;--M>=0&&B[M]==="\\";)D=!D;return D?"|":" |"}),b=y.split(Wi.splitPipe);let k=0;if(b[0].trim()||b.shift(),b.length>0&&!((P=b.at(-1))!=null&&P.trim())&&b.pop(),p)if(b.length>p)b.splice(p);else for(;b.length<p;)b.push("");for(;k<b.length;k++)b[k]=b[k].trim().replace(Wi.slashPipe,"|");return b}function oc(u,p,y){const b=u.length;if(b===0)return"";let k=0;for(;k<b&&u.charAt(b-k-1)===p;)k++;return u.slice(0,b-k)}function bx(u,p){if(u.indexOf(p[1])===-1)return-1;let y=0;for(let b=0;b<u.length;b++)if(u[b]==="\\")b++;else if(u[b]===p[0])y++;else if(u[b]===p[1]&&(y--,y<0))return b;return y>0?-2:-1}function bm(u,p,y,b,k){const P=p.href,x=p.title||null,o=u[1].replace(k.other.outputLinkReplace,"$1");b.state.inLink=!0;const B={type:u[0].charAt(0)==="!"?"image":"link",raw:y,href:P,title:x,text:o,tokens:b.inlineTokens(o)};return b.state.inLink=!1,B}function wx(u,p,y){const b=u.match(y.other.indentCodeCompensation);if(b===null)return p;const k=b[1];return p.split(`
8
+ `).map(P=>{const x=P.match(y.other.beginningSpace);if(x===null)return P;const[o]=x;return o.length>=k.length?P.slice(k.length):P}).join(`
9
+ `)}var ah=class{constructor(u){Pr(this,"options");Pr(this,"rules");Pr(this,"lexer");this.options=u||Ws}space(u){const p=this.rules.block.newline.exec(u);if(p&&p[0].length>0)return{type:"space",raw:p[0]}}code(u){const p=this.rules.block.code.exec(u);if(p){const y=p[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:p[0],codeBlockStyle:"indented",text:this.options.pedantic?y:oc(y,`
10
+ `)}}}fences(u){const p=this.rules.block.fences.exec(u);if(p){const y=p[0],b=wx(y,p[3]||"",this.rules);return{type:"code",raw:y,lang:p[2]?p[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):p[2],text:b}}}heading(u){const p=this.rules.block.heading.exec(u);if(p){let y=p[2].trim();if(this.rules.other.endingHash.test(y)){const b=oc(y,"#");(this.options.pedantic||!b||this.rules.other.endingSpaceChar.test(b))&&(y=b.trim())}return{type:"heading",raw:p[0],depth:p[1].length,text:y,tokens:this.lexer.inline(y)}}}hr(u){const p=this.rules.block.hr.exec(u);if(p)return{type:"hr",raw:oc(p[0],`
11
+ `)}}blockquote(u){const p=this.rules.block.blockquote.exec(u);if(p){let y=oc(p[0],`
12
+ `).split(`
13
+ `),b="",k="";const P=[];for(;y.length>0;){let x=!1;const o=[];let B;for(B=0;B<y.length;B++)if(this.rules.other.blockquoteStart.test(y[B]))o.push(y[B]),x=!0;else if(!x)o.push(y[B]);else break;y=y.slice(B);const D=o.join(`
14
+ `),M=D.replace(this.rules.other.blockquoteSetextReplace,`
15
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");b=b?`${b}
16
+ ${D}`:D,k=k?`${k}
17
+ ${M}`:M;const O=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(M,P,!0),this.lexer.state.top=O,y.length===0)break;const L=P.at(-1);if((L==null?void 0:L.type)==="code")break;if((L==null?void 0:L.type)==="blockquote"){const C=L,T=C.raw+`
18
+ `+y.join(`
19
+ `),U=this.blockquote(T);P[P.length-1]=U,b=b.substring(0,b.length-C.raw.length)+U.raw,k=k.substring(0,k.length-C.text.length)+U.text;break}else if((L==null?void 0:L.type)==="list"){const C=L,T=C.raw+`
20
+ `+y.join(`
21
+ `),U=this.list(T);P[P.length-1]=U,b=b.substring(0,b.length-L.raw.length)+U.raw,k=k.substring(0,k.length-C.raw.length)+U.raw,y=T.substring(P.at(-1).raw.length).split(`
22
+ `);continue}}return{type:"blockquote",raw:b,tokens:P,text:k}}}list(u){let p=this.rules.block.list.exec(u);if(p){let y=p[1].trim();const b=y.length>1,k={type:"list",raw:"",ordered:b,start:b?+y.slice(0,-1):"",loose:!1,items:[]};y=b?`\\d{1,9}\\${y.slice(-1)}`:`\\${y}`,this.options.pedantic&&(y=b?y:"[*+-]");const P=this.rules.other.listItemRegex(y);let x=!1;for(;u;){let B=!1,D="",M="";if(!(p=P.exec(u))||this.rules.block.hr.test(u))break;D=p[0],u=u.substring(D.length);let O=p[2].split(`
23
+ `,1)[0].replace(this.rules.other.listReplaceTabs,ie=>" ".repeat(3*ie.length)),L=u.split(`
24
+ `,1)[0],C=!O.trim(),T=0;if(this.options.pedantic?(T=2,M=O.trimStart()):C?T=p[1].length+1:(T=p[2].search(this.rules.other.nonSpaceChar),T=T>4?1:T,M=O.slice(T),T+=p[1].length),C&&this.rules.other.blankLine.test(L)&&(D+=L+`
25
+ `,u=u.substring(L.length+1),B=!0),!B){const ie=this.rules.other.nextBulletRegex(T),le=this.rules.other.hrRegex(T),Ie=this.rules.other.fencesBeginRegex(T),ee=this.rules.other.headingBeginRegex(T),me=this.rules.other.htmlBeginRegex(T);for(;u;){const Le=u.split(`
26
+ `,1)[0];let qe;if(L=Le,this.options.pedantic?(L=L.replace(this.rules.other.listReplaceNesting," "),qe=L):qe=L.replace(this.rules.other.tabCharGlobal," "),Ie.test(L)||ee.test(L)||me.test(L)||ie.test(L)||le.test(L))break;if(qe.search(this.rules.other.nonSpaceChar)>=T||!L.trim())M+=`
27
+ `+qe.slice(T);else{if(C||O.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ie.test(O)||ee.test(O)||le.test(O))break;M+=`
28
+ `+L}!C&&!L.trim()&&(C=!0),D+=Le+`
29
+ `,u=u.substring(Le.length+1),O=qe.slice(T)}}k.loose||(x?k.loose=!0:this.rules.other.doubleBlankLine.test(D)&&(x=!0));let U=null,G;this.options.gfm&&(U=this.rules.other.listIsTask.exec(M),U&&(G=U[0]!=="[ ] ",M=M.replace(this.rules.other.listReplaceTask,""))),k.items.push({type:"list_item",raw:D,task:!!U,checked:G,loose:!1,text:M,tokens:[]}),k.raw+=D}const o=k.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;k.raw=k.raw.trimEnd();for(let B=0;B<k.items.length;B++)if(this.lexer.state.top=!1,k.items[B].tokens=this.lexer.blockTokens(k.items[B].text,[]),!k.loose){const D=k.items[B].tokens.filter(O=>O.type==="space"),M=D.length>0&&D.some(O=>this.rules.other.anyLine.test(O.raw));k.loose=M}if(k.loose)for(let B=0;B<k.items.length;B++)k.items[B].loose=!0;return k}}html(u){const p=this.rules.block.html.exec(u);if(p)return{type:"html",block:!0,raw:p[0],pre:p[1]==="pre"||p[1]==="script"||p[1]==="style",text:p[0]}}def(u){const p=this.rules.block.def.exec(u);if(p){const y=p[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),b=p[2]?p[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",k=p[3]?p[3].substring(1,p[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):p[3];return{type:"def",tag:y,raw:p[0],href:b,title:k}}}table(u){var x;const p=this.rules.block.table.exec(u);if(!p||!this.rules.other.tableDelimiter.test(p[2]))return;const y=xm(p[1]),b=p[2].replace(this.rules.other.tableAlignChars,"").split("|"),k=(x=p[3])!=null&&x.trim()?p[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],P={type:"table",raw:p[0],header:[],align:[],rows:[]};if(y.length===b.length){for(const o of b)this.rules.other.tableAlignRight.test(o)?P.align.push("right"):this.rules.other.tableAlignCenter.test(o)?P.align.push("center"):this.rules.other.tableAlignLeft.test(o)?P.align.push("left"):P.align.push(null);for(let o=0;o<y.length;o++)P.header.push({text:y[o],tokens:this.lexer.inline(y[o]),header:!0,align:P.align[o]});for(const o of k)P.rows.push(xm(o,P.header.length).map((B,D)=>({text:B,tokens:this.lexer.inline(B),header:!1,align:P.align[D]})));return P}}lheading(u){const p=this.rules.block.lheading.exec(u);if(p)return{type:"heading",raw:p[0],depth:p[2].charAt(0)==="="?1:2,text:p[1],tokens:this.lexer.inline(p[1])}}paragraph(u){const p=this.rules.block.paragraph.exec(u);if(p){const y=p[1].charAt(p[1].length-1)===`
31
+ `?p[1].slice(0,-1):p[1];return{type:"paragraph",raw:p[0],text:y,tokens:this.lexer.inline(y)}}}text(u){const p=this.rules.block.text.exec(u);if(p)return{type:"text",raw:p[0],text:p[0],tokens:this.lexer.inline(p[0])}}escape(u){const p=this.rules.inline.escape.exec(u);if(p)return{type:"escape",raw:p[0],text:p[1]}}tag(u){const p=this.rules.inline.tag.exec(u);if(p)return!this.lexer.state.inLink&&this.rules.other.startATag.test(p[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(p[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(p[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(p[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:p[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:p[0]}}link(u){const p=this.rules.inline.link.exec(u);if(p){const y=p[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(y)){if(!this.rules.other.endAngleBracket.test(y))return;const P=oc(y.slice(0,-1),"\\");if((y.length-P.length)%2===0)return}else{const P=bx(p[2],"()");if(P===-2)return;if(P>-1){const o=(p[0].indexOf("!")===0?5:4)+p[1].length+P;p[2]=p[2].substring(0,P),p[0]=p[0].substring(0,o).trim(),p[3]=""}}let b=p[2],k="";if(this.options.pedantic){const P=this.rules.other.pedanticHrefTitle.exec(b);P&&(b=P[1],k=P[3])}else k=p[3]?p[3].slice(1,-1):"";return b=b.trim(),this.rules.other.startAngleBracket.test(b)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(y)?b=b.slice(1):b=b.slice(1,-1)),bm(p,{href:b&&b.replace(this.rules.inline.anyPunctuation,"$1"),title:k&&k.replace(this.rules.inline.anyPunctuation,"$1")},p[0],this.lexer,this.rules)}}reflink(u,p){let y;if((y=this.rules.inline.reflink.exec(u))||(y=this.rules.inline.nolink.exec(u))){const b=(y[2]||y[1]).replace(this.rules.other.multipleSpaceGlobal," "),k=p[b.toLowerCase()];if(!k){const P=y[0].charAt(0);return{type:"text",raw:P,text:P}}return bm(y,k,y[0],this.lexer,this.rules)}}emStrong(u,p,y=""){let b=this.rules.inline.emStrongLDelim.exec(u);if(!b||b[3]&&y.match(this.rules.other.unicodeAlphaNumeric))return;if(!(b[1]||b[2]||"")||!y||this.rules.inline.punctuation.exec(y)){const P=[...b[0]].length-1;let x,o,B=P,D=0;const M=b[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(M.lastIndex=0,p=p.slice(-1*u.length+P);(b=M.exec(p))!=null;){if(x=b[1]||b[2]||b[3]||b[4]||b[5]||b[6],!x)continue;if(o=[...x].length,b[3]||b[4]){B+=o;continue}else if((b[5]||b[6])&&P%3&&!((P+o)%3)){D+=o;continue}if(B-=o,B>0)continue;o=Math.min(o,o+B+D);const O=[...b[0]][0].length,L=u.slice(0,P+b.index+O+o);if(Math.min(P,o)%2){const T=L.slice(1,-1);return{type:"em",raw:L,text:T,tokens:this.lexer.inlineTokens(T)}}const C=L.slice(2,-2);return{type:"strong",raw:L,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(u){const p=this.rules.inline.code.exec(u);if(p){let y=p[2].replace(this.rules.other.newLineCharGlobal," ");const b=this.rules.other.nonSpaceChar.test(y),k=this.rules.other.startingSpaceChar.test(y)&&this.rules.other.endingSpaceChar.test(y);return b&&k&&(y=y.substring(1,y.length-1)),{type:"codespan",raw:p[0],text:y}}}br(u){const p=this.rules.inline.br.exec(u);if(p)return{type:"br",raw:p[0]}}del(u){const p=this.rules.inline.del.exec(u);if(p)return{type:"del",raw:p[0],text:p[2],tokens:this.lexer.inlineTokens(p[2])}}autolink(u){const p=this.rules.inline.autolink.exec(u);if(p){let y,b;return p[2]==="@"?(y=p[1],b="mailto:"+y):(y=p[1],b=y),{type:"link",raw:p[0],text:y,href:b,tokens:[{type:"text",raw:y,text:y}]}}}url(u){var y;let p;if(p=this.rules.inline.url.exec(u)){let b,k;if(p[2]==="@")b=p[0],k="mailto:"+b;else{let P;do P=p[0],p[0]=((y=this.rules.inline._backpedal.exec(p[0]))==null?void 0:y[0])??"";while(P!==p[0]);b=p[0],p[1]==="www."?k="http://"+p[0]:k=p[0]}return{type:"link",raw:p[0],text:b,href:k,tokens:[{type:"text",raw:b,text:b}]}}}inlineText(u){const p=this.rules.inline.text.exec(u);if(p){const y=this.lexer.state.inRawBlock;return{type:"text",raw:p[0],text:p[0],escaped:y}}}},Eo=class $d{constructor(p){Pr(this,"tokens");Pr(this,"options");Pr(this,"state");Pr(this,"tokenizer");Pr(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=p||Ws,this.options.tokenizer=this.options.tokenizer||new ah,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const y={other:Wi,block:Au.normal,inline:nc.normal};this.options.pedantic?(y.block=Au.pedantic,y.inline=nc.pedantic):this.options.gfm&&(y.block=Au.gfm,this.options.breaks?y.inline=nc.breaks:y.inline=nc.gfm),this.tokenizer.rules=y}static get rules(){return{block:Au,inline:nc}}static lex(p,y){return new $d(y).lex(p)}static lexInline(p,y){return new $d(y).inlineTokens(p)}lex(p){p=p.replace(Wi.carriageReturn,`
32
+ `),this.blockTokens(p,this.tokens);for(let y=0;y<this.inlineQueue.length;y++){const b=this.inlineQueue[y];this.inlineTokens(b.src,b.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(p,y=[],b=!1){var k,P,x;for(this.options.pedantic&&(p=p.replace(Wi.tabCharGlobal," ").replace(Wi.spaceLine,""));p;){let o;if((P=(k=this.options.extensions)==null?void 0:k.block)!=null&&P.some(D=>(o=D.call({lexer:this},p,y))?(p=p.substring(o.raw.length),y.push(o),!0):!1))continue;if(o=this.tokenizer.space(p)){p=p.substring(o.raw.length);const D=y.at(-1);o.raw.length===1&&D!==void 0?D.raw+=`
33
+ `:y.push(o);continue}if(o=this.tokenizer.code(p)){p=p.substring(o.raw.length);const D=y.at(-1);(D==null?void 0:D.type)==="paragraph"||(D==null?void 0:D.type)==="text"?(D.raw+=`
34
+ `+o.raw,D.text+=`
35
+ `+o.text,this.inlineQueue.at(-1).src=D.text):y.push(o);continue}if(o=this.tokenizer.fences(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.heading(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.hr(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.blockquote(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.list(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.html(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.def(p)){p=p.substring(o.raw.length);const D=y.at(-1);(D==null?void 0:D.type)==="paragraph"||(D==null?void 0:D.type)==="text"?(D.raw+=`
36
+ `+o.raw,D.text+=`
37
+ `+o.raw,this.inlineQueue.at(-1).src=D.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title});continue}if(o=this.tokenizer.table(p)){p=p.substring(o.raw.length),y.push(o);continue}if(o=this.tokenizer.lheading(p)){p=p.substring(o.raw.length),y.push(o);continue}let B=p;if((x=this.options.extensions)!=null&&x.startBlock){let D=1/0;const M=p.slice(1);let O;this.options.extensions.startBlock.forEach(L=>{O=L.call({lexer:this},M),typeof O=="number"&&O>=0&&(D=Math.min(D,O))}),D<1/0&&D>=0&&(B=p.substring(0,D+1))}if(this.state.top&&(o=this.tokenizer.paragraph(B))){const D=y.at(-1);b&&(D==null?void 0:D.type)==="paragraph"?(D.raw+=`
38
+ `+o.raw,D.text+=`
39
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=D.text):y.push(o),b=B.length!==p.length,p=p.substring(o.raw.length);continue}if(o=this.tokenizer.text(p)){p=p.substring(o.raw.length);const D=y.at(-1);(D==null?void 0:D.type)==="text"?(D.raw+=`
40
+ `+o.raw,D.text+=`
41
+ `+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=D.text):y.push(o);continue}if(p){const D="Infinite loop on byte: "+p.charCodeAt(0);if(this.options.silent){console.error(D);break}else throw new Error(D)}}return this.state.top=!0,y}inline(p,y=[]){return this.inlineQueue.push({src:p,tokens:y}),y}inlineTokens(p,y=[]){var o,B,D;let b=p,k=null;if(this.tokens.links){const M=Object.keys(this.tokens.links);if(M.length>0)for(;(k=this.tokenizer.rules.inline.reflinkSearch.exec(b))!=null;)M.includes(k[0].slice(k[0].lastIndexOf("[")+1,-1))&&(b=b.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(k=this.tokenizer.rules.inline.anyPunctuation.exec(b))!=null;)b=b.slice(0,k.index)+"++"+b.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(k=this.tokenizer.rules.inline.blockSkip.exec(b))!=null;)b=b.slice(0,k.index)+"["+"a".repeat(k[0].length-2)+"]"+b.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let P=!1,x="";for(;p;){P||(x=""),P=!1;let M;if((B=(o=this.options.extensions)==null?void 0:o.inline)!=null&&B.some(L=>(M=L.call({lexer:this},p,y))?(p=p.substring(M.raw.length),y.push(M),!0):!1))continue;if(M=this.tokenizer.escape(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.tag(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.link(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.reflink(p,this.tokens.links)){p=p.substring(M.raw.length);const L=y.at(-1);M.type==="text"&&(L==null?void 0:L.type)==="text"?(L.raw+=M.raw,L.text+=M.text):y.push(M);continue}if(M=this.tokenizer.emStrong(p,b,x)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.codespan(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.br(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.del(p)){p=p.substring(M.raw.length),y.push(M);continue}if(M=this.tokenizer.autolink(p)){p=p.substring(M.raw.length),y.push(M);continue}if(!this.state.inLink&&(M=this.tokenizer.url(p))){p=p.substring(M.raw.length),y.push(M);continue}let O=p;if((D=this.options.extensions)!=null&&D.startInline){let L=1/0;const C=p.slice(1);let T;this.options.extensions.startInline.forEach(U=>{T=U.call({lexer:this},C),typeof T=="number"&&T>=0&&(L=Math.min(L,T))}),L<1/0&&L>=0&&(O=p.substring(0,L+1))}if(M=this.tokenizer.inlineText(O)){p=p.substring(M.raw.length),M.raw.slice(-1)!=="_"&&(x=M.raw.slice(-1)),P=!0;const L=y.at(-1);(L==null?void 0:L.type)==="text"?(L.raw+=M.raw,L.text+=M.text):y.push(M);continue}if(p){const L="Infinite loop on byte: "+p.charCodeAt(0);if(this.options.silent){console.error(L);break}else throw new Error(L)}}return y}},lh=class{constructor(u){Pr(this,"options");Pr(this,"parser");this.options=u||Ws}space(u){return""}code({text:u,lang:p,escaped:y}){var P;const b=(P=(p||"").match(Wi.notSpaceStart))==null?void 0:P[0],k=u.replace(Wi.endingNewline,"")+`
42
+ `;return b?'<pre><code class="language-'+lo(b)+'">'+(y?k:lo(k,!0))+`</code></pre>
43
+ `:"<pre><code>"+(y?k:lo(k,!0))+`</code></pre>
44
+ `}blockquote({tokens:u}){return`<blockquote>
45
+ ${this.parser.parse(u)}</blockquote>
46
+ `}html({text:u}){return u}heading({tokens:u,depth:p}){return`<h${p}>${this.parser.parseInline(u)}</h${p}>
47
+ `}hr(u){return`<hr>
48
+ `}list(u){const p=u.ordered,y=u.start;let b="";for(let x=0;x<u.items.length;x++){const o=u.items[x];b+=this.listitem(o)}const k=p?"ol":"ul",P=p&&y!==1?' start="'+y+'"':"";return"<"+k+P+`>
49
+ `+b+"</"+k+`>
50
+ `}listitem(u){var y;let p="";if(u.task){const b=this.checkbox({checked:!!u.checked});u.loose?((y=u.tokens[0])==null?void 0:y.type)==="paragraph"?(u.tokens[0].text=b+" "+u.tokens[0].text,u.tokens[0].tokens&&u.tokens[0].tokens.length>0&&u.tokens[0].tokens[0].type==="text"&&(u.tokens[0].tokens[0].text=b+" "+lo(u.tokens[0].tokens[0].text),u.tokens[0].tokens[0].escaped=!0)):u.tokens.unshift({type:"text",raw:b+" ",text:b+" ",escaped:!0}):p+=b+" "}return p+=this.parser.parse(u.tokens,!!u.loose),`<li>${p}</li>
51
+ `}checkbox({checked:u}){return"<input "+(u?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:u}){return`<p>${this.parser.parseInline(u)}</p>
52
+ `}table(u){let p="",y="";for(let k=0;k<u.header.length;k++)y+=this.tablecell(u.header[k]);p+=this.tablerow({text:y});let b="";for(let k=0;k<u.rows.length;k++){const P=u.rows[k];y="";for(let x=0;x<P.length;x++)y+=this.tablecell(P[x]);b+=this.tablerow({text:y})}return b&&(b=`<tbody>${b}</tbody>`),`<table>
53
+ <thead>
54
+ `+p+`</thead>
55
+ `+b+`</table>
56
+ `}tablerow({text:u}){return`<tr>
57
+ ${u}</tr>
58
+ `}tablecell(u){const p=this.parser.parseInline(u.tokens),y=u.header?"th":"td";return(u.align?`<${y} align="${u.align}">`:`<${y}>`)+p+`</${y}>
59
+ `}strong({tokens:u}){return`<strong>${this.parser.parseInline(u)}</strong>`}em({tokens:u}){return`<em>${this.parser.parseInline(u)}</em>`}codespan({text:u}){return`<code>${lo(u,!0)}</code>`}br(u){return"<br>"}del({tokens:u}){return`<del>${this.parser.parseInline(u)}</del>`}link({href:u,title:p,tokens:y}){const b=this.parser.parseInline(y),k=vm(u);if(k===null)return b;u=k;let P='<a href="'+u+'"';return p&&(P+=' title="'+lo(p)+'"'),P+=">"+b+"</a>",P}image({href:u,title:p,text:y,tokens:b}){b&&(y=this.parser.parseInline(b,this.parser.textRenderer));const k=vm(u);if(k===null)return lo(y);u=k;let P=`<img src="${u}" alt="${y}"`;return p&&(P+=` title="${lo(p)}"`),P+=">",P}text(u){return"tokens"in u&&u.tokens?this.parser.parseInline(u.tokens):"escaped"in u&&u.escaped?u.text:lo(u.text)}},fp=class{strong({text:u}){return u}em({text:u}){return u}codespan({text:u}){return u}del({text:u}){return u}html({text:u}){return u}text({text:u}){return u}link({text:u}){return""+u}image({text:u}){return""+u}br(){return""}},Po=class ep{constructor(p){Pr(this,"options");Pr(this,"renderer");Pr(this,"textRenderer");this.options=p||Ws,this.options.renderer=this.options.renderer||new lh,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fp}static parse(p,y){return new ep(y).parse(p)}static parseInline(p,y){return new ep(y).parseInline(p)}parse(p,y=!0){var k,P;let b="";for(let x=0;x<p.length;x++){const o=p[x];if((P=(k=this.options.extensions)==null?void 0:k.renderers)!=null&&P[o.type]){const D=o,M=this.options.extensions.renderers[D.type].call({parser:this},D);if(M!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(D.type)){b+=M||"";continue}}const B=o;switch(B.type){case"space":{b+=this.renderer.space(B);continue}case"hr":{b+=this.renderer.hr(B);continue}case"heading":{b+=this.renderer.heading(B);continue}case"code":{b+=this.renderer.code(B);continue}case"table":{b+=this.renderer.table(B);continue}case"blockquote":{b+=this.renderer.blockquote(B);continue}case"list":{b+=this.renderer.list(B);continue}case"html":{b+=this.renderer.html(B);continue}case"paragraph":{b+=this.renderer.paragraph(B);continue}case"text":{let D=B,M=this.renderer.text(D);for(;x+1<p.length&&p[x+1].type==="text";)D=p[++x],M+=`
60
+ `+this.renderer.text(D);y?b+=this.renderer.paragraph({type:"paragraph",raw:M,text:M,tokens:[{type:"text",raw:M,text:M,escaped:!0}]}):b+=M;continue}default:{const D='Token with "'+B.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw new Error(D)}}}return b}parseInline(p,y=this.renderer){var k,P;let b="";for(let x=0;x<p.length;x++){const o=p[x];if((P=(k=this.options.extensions)==null?void 0:k.renderers)!=null&&P[o.type]){const D=this.options.extensions.renderers[o.type].call({parser:this},o);if(D!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){b+=D||"";continue}}const B=o;switch(B.type){case"escape":{b+=y.text(B);break}case"html":{b+=y.html(B);break}case"link":{b+=y.link(B);break}case"image":{b+=y.image(B);break}case"strong":{b+=y.strong(B);break}case"em":{b+=y.em(B);break}case"codespan":{b+=y.codespan(B);break}case"br":{b+=y.br(B);break}case"del":{b+=y.del(B);break}case"text":{b+=y.text(B);break}default:{const D='Token with "'+B.type+'" type was not found.';if(this.options.silent)return console.error(D),"";throw new Error(D)}}}return b}},Wd,rh=(Wd=class{constructor(u){Pr(this,"options");Pr(this,"block");this.options=u||Ws}preprocess(u){return u}postprocess(u){return u}processAllTokens(u){return u}provideLexer(){return this.block?Eo.lex:Eo.lexInline}provideParser(){return this.block?Po.parse:Po.parseInline}},Pr(Wd,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Wd),Sx=class{constructor(...u){Pr(this,"defaults",sp());Pr(this,"options",this.setOptions);Pr(this,"parse",this.parseMarkdown(!0));Pr(this,"parseInline",this.parseMarkdown(!1));Pr(this,"Parser",Po);Pr(this,"Renderer",lh);Pr(this,"TextRenderer",fp);Pr(this,"Lexer",Eo);Pr(this,"Tokenizer",ah);Pr(this,"Hooks",rh);this.use(...u)}walkTokens(u,p){var b,k;let y=[];for(const P of u)switch(y=y.concat(p.call(this,P)),P.type){case"table":{const x=P;for(const o of x.header)y=y.concat(this.walkTokens(o.tokens,p));for(const o of x.rows)for(const B of o)y=y.concat(this.walkTokens(B.tokens,p));break}case"list":{const x=P;y=y.concat(this.walkTokens(x.items,p));break}default:{const x=P;(k=(b=this.defaults.extensions)==null?void 0:b.childTokens)!=null&&k[x.type]?this.defaults.extensions.childTokens[x.type].forEach(o=>{const B=x[o].flat(1/0);y=y.concat(this.walkTokens(B,p))}):x.tokens&&(y=y.concat(this.walkTokens(x.tokens,p)))}}return y}use(...u){const p=this.defaults.extensions||{renderers:{},childTokens:{}};return u.forEach(y=>{const b={...y};if(b.async=this.defaults.async||b.async||!1,y.extensions&&(y.extensions.forEach(k=>{if(!k.name)throw new Error("extension name required");if("renderer"in k){const P=p.renderers[k.name];P?p.renderers[k.name]=function(...x){let o=k.renderer.apply(this,x);return o===!1&&(o=P.apply(this,x)),o}:p.renderers[k.name]=k.renderer}if("tokenizer"in k){if(!k.level||k.level!=="block"&&k.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const P=p[k.level];P?P.unshift(k.tokenizer):p[k.level]=[k.tokenizer],k.start&&(k.level==="block"?p.startBlock?p.startBlock.push(k.start):p.startBlock=[k.start]:k.level==="inline"&&(p.startInline?p.startInline.push(k.start):p.startInline=[k.start]))}"childTokens"in k&&k.childTokens&&(p.childTokens[k.name]=k.childTokens)}),b.extensions=p),y.renderer){const k=this.defaults.renderer||new lh(this.defaults);for(const P in y.renderer){if(!(P in k))throw new Error(`renderer '${P}' does not exist`);if(["options","parser"].includes(P))continue;const x=P,o=y.renderer[x],B=k[x];k[x]=(...D)=>{let M=o.apply(k,D);return M===!1&&(M=B.apply(k,D)),M||""}}b.renderer=k}if(y.tokenizer){const k=this.defaults.tokenizer||new ah(this.defaults);for(const P in y.tokenizer){if(!(P in k))throw new Error(`tokenizer '${P}' does not exist`);if(["options","rules","lexer"].includes(P))continue;const x=P,o=y.tokenizer[x],B=k[x];k[x]=(...D)=>{let M=o.apply(k,D);return M===!1&&(M=B.apply(k,D)),M}}b.tokenizer=k}if(y.hooks){const k=this.defaults.hooks||new rh;for(const P in y.hooks){if(!(P in k))throw new Error(`hook '${P}' does not exist`);if(["options","block"].includes(P))continue;const x=P,o=y.hooks[x],B=k[x];rh.passThroughHooks.has(P)?k[x]=D=>{if(this.defaults.async)return Promise.resolve(o.call(k,D)).then(O=>B.call(k,O));const M=o.call(k,D);return B.call(k,M)}:k[x]=(...D)=>{let M=o.apply(k,D);return M===!1&&(M=B.apply(k,D)),M}}b.hooks=k}if(y.walkTokens){const k=this.defaults.walkTokens,P=y.walkTokens;b.walkTokens=function(x){let o=[];return o.push(P.call(this,x)),k&&(o=o.concat(k.call(this,x))),o}}this.defaults={...this.defaults,...b}}),this}setOptions(u){return this.defaults={...this.defaults,...u},this}lexer(u,p){return Eo.lex(u,p??this.defaults)}parser(u,p){return Po.parse(u,p??this.defaults)}parseMarkdown(u){return(y,b)=>{const k={...b},P={...this.defaults,...k},x=this.onError(!!P.silent,!!P.async);if(this.defaults.async===!0&&k.async===!1)return x(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof y>"u"||y===null)return x(new Error("marked(): input parameter is undefined or null"));if(typeof y!="string")return x(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(y)+", string expected"));P.hooks&&(P.hooks.options=P,P.hooks.block=u);const o=P.hooks?P.hooks.provideLexer():u?Eo.lex:Eo.lexInline,B=P.hooks?P.hooks.provideParser():u?Po.parse:Po.parseInline;if(P.async)return Promise.resolve(P.hooks?P.hooks.preprocess(y):y).then(D=>o(D,P)).then(D=>P.hooks?P.hooks.processAllTokens(D):D).then(D=>P.walkTokens?Promise.all(this.walkTokens(D,P.walkTokens)).then(()=>D):D).then(D=>B(D,P)).then(D=>P.hooks?P.hooks.postprocess(D):D).catch(x);try{P.hooks&&(y=P.hooks.preprocess(y));let D=o(y,P);P.hooks&&(D=P.hooks.processAllTokens(D)),P.walkTokens&&this.walkTokens(D,P.walkTokens);let M=B(D,P);return P.hooks&&(M=P.hooks.postprocess(M)),M}catch(D){return x(D)}}}onError(u,p){return y=>{if(y.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,u){const b="<p>An error occurred:</p><pre>"+lo(y.message+"",!0)+"</pre>";return p?Promise.resolve(b):b}if(p)return Promise.reject(y);throw y}}},Hs=new Sx;function Sr(u,p){return Hs.parse(u,p)}Sr.options=Sr.setOptions=function(u){return Hs.setOptions(u),Sr.defaults=Hs.defaults,Wg(Sr.defaults),Sr};Sr.getDefaults=sp;Sr.defaults=Ws;Sr.use=function(...u){return Hs.use(...u),Sr.defaults=Hs.defaults,Wg(Sr.defaults),Sr};Sr.walkTokens=function(u,p){return Hs.walkTokens(u,p)};Sr.parseInline=Hs.parseInline;Sr.Parser=Po;Sr.parser=Po.parse;Sr.Renderer=lh;Sr.TextRenderer=fp;Sr.Lexer=Eo;Sr.lexer=Eo.lex;Sr.Tokenizer=ah;Sr.Hooks=rh;Sr.parse=Sr;Sr.options;Sr.setOptions;Sr.use;Sr.walkTokens;Sr.parseInline;Po.parse;Eo.lex;function ry(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var ih={exports:{}};/**
62
+ * MapLibre GL JS
63
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.5.0/LICENSE.txt
64
+ */var Ax=ih.exports,wm;function kx(){return wm||(wm=1,function(u,p){(function(y,b){u.exports=b()})(Ax,function(){var y={},b={};function k(x,o,B){if(b[x]=B,x==="index"){var D="var sharedModule = {}; ("+b.shared+")(sharedModule); ("+b.worker+")(sharedModule);",M={};return b.shared(M),b.index(y,M),typeof window<"u"&&y.setWorkerUrl(window.URL.createObjectURL(new Blob([D],{type:"text/javascript"}))),y}}k("shared",["exports"],function(x){function o(n,t,i,s){return new(i||(i=Promise))(function(c,f){function m(E){try{S(s.next(E))}catch(R){f(R)}}function v(E){try{S(s.throw(E))}catch(R){f(R)}}function S(E){var R;E.done?c(E.value):(R=E.value,R instanceof i?R:new i(function(V){V(R)})).then(m,v)}S((s=s.apply(n,t||[])).next())})}function B(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var D,M;function O(){if(M)return D;function n(t,i){this.x=t,this.y=i}return M=1,D=n,n.prototype={clone:function(){return new n(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,i){return this.clone()._rotateAround(t,i)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var i=t.x-this.x,s=t.y-this.y;return i*i+s*s},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,i){return Math.atan2(this.x*i-this.y*t,this.x*t+this.y*i)},_matMult:function(t){var i=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=i,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var i=Math.cos(t),s=Math.sin(t),c=s*this.x+i*this.y;return this.x=i*this.x-s*this.y,this.y=c,this},_rotateAround:function(t,i){var s=Math.cos(t),c=Math.sin(t),f=i.y+c*(this.x-i.x)+s*(this.y-i.y);return this.x=i.x+s*(this.x-i.x)-c*(this.y-i.y),this.y=f,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},n.convert=function(t){return t instanceof n?t:Array.isArray(t)?new n(t[0],t[1]):t},D}typeof SuppressedError=="function"&&SuppressedError;var L,C,T=B(O()),U=function(){if(C)return L;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return C=1,L=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var f=this.sampleCurveX(s)-t;if(Math.abs(f)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=f/m}var v=0,S=1;for(s=t,c=0;c<20&&(f=this.sampleCurveX(s),!(Math.abs(f-t)<i));c++)t>f?v=s:S=s,s=.5*(S-v)+v;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},L}(),G=B(U);let ie,le;function Ie(){return ie==null&&(ie=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),ie}function ee(){if(le==null&&(le=!1,Ie())){const t=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(t){for(let s=0;s<5*5;s++){const c=4*s;t.fillStyle=`rgb(${c},${c+1},${c+2})`,t.fillRect(s%5,Math.floor(s/5),1,1)}const i=t.getImageData(0,0,5,5).data;for(let s=0;s<5*5*4;s++)if(s%4!=3&&i[s]!==s){le=!0;break}}}return le||!1}var me=1e-6,Le=typeof Float32Array<"u"?Float32Array:Array;function qe(){var n=new Le(9);return Le!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function rt(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function St(){var n=new Le(3);return Le!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function yt(n){return Math.hypot(n[0],n[1],n[2])}function ct(n,t,i){var s=new Le(3);return s[0]=n,s[1]=t,s[2]=i,s}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});var _t,qt=yt;function Qt(n,t,i){var s=t[0],c=t[1],f=t[2],m=t[3];return n[0]=i[0]*s+i[4]*c+i[8]*f+i[12]*m,n[1]=i[1]*s+i[5]*c+i[9]*f+i[13]*m,n[2]=i[2]*s+i[6]*c+i[10]*f+i[14]*m,n[3]=i[3]*s+i[7]*c+i[11]*f+i[15]*m,n}function xr(){var n=new Le(4);return Le!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function gr(){var n=new Le(2);return Le!=Float32Array&&(n[0]=0,n[1]=0),n}function ti(n,t){var i=new Le(2);return i[0]=n,i[1]=t,i}St(),_t=new Le(4),Le!=Float32Array&&(_t[0]=0,_t[1]=0,_t[2]=0,_t[3]=0),St(),ct(1,0,0),ct(0,1,0),xr(),xr(),qe(),gr();const ar=8192;function Zi(n,t,i){return t*(ar/(n.tileSize*Math.pow(2,i-n.tileID.overscaledZ)))}function Nr(n,t){return(n%t+t)%t}function Ki(n,t,i){return n*(1-i)+t*i}function fr(n){if(n<=0)return 0;if(n>=1)return 1;const t=n*n,i=t*n;return 4*(n<.5?i:3*(n-t)+i-.75)}function on(n,t,i,s){const c=new G(n,t,i,s);return f=>c.solve(f)}const Ti=on(.25,.1,.25,1);function Ur(n,t,i){return Math.min(i,Math.max(t,n))}function Bi(n,t,i){const s=i-t,c=((n-t)%s+s)%s+t;return c===t?i:c}function ri(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}let Gi=1;function Vi(n,t,i){const s={};for(const c in n)s[c]=t.call(this,n[c],c,n);return s}function Cn(n,t,i){const s={};for(const c in n)t.call(this,n[c],c,n)&&(s[c]=n[c]);return s}function Gr(n){return Array.isArray(n)?n.map(Gr):typeof n=="object"&&n?Vi(n,Gr):n}const fi={};function Jr(n){fi[n]||(typeof console<"u"&&console.warn(n),fi[n]=!0)}function it(n,t,i){return(i.y-n.y)*(t.x-n.x)>(t.y-n.y)*(i.x-n.x)}function vt(n){return typeof WorkerGlobalScope<"u"&&n!==void 0&&n instanceof WorkerGlobalScope}let At=null;function Mt(n){return typeof ImageBitmap<"u"&&n instanceof ImageBitmap}const Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Et(n,t,i,s,c){return o(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const f=new VideoFrame(n,{timestamp:0});try{const m=f==null?void 0:f.format;if(!m||!m.startsWith("BGR")&&!m.startsWith("RGB"))throw new Error(`Unrecognized format ${m}`);const v=m.startsWith("BGR"),S=new Uint8ClampedArray(s*c*4);if(yield f.copyTo(S,function(E,R,V,q,H){const W=4*Math.max(1,0),X=(Math.max(0,V)-V)*q*4+W,re=4*q,ae=Math.max(0,R),Se=Math.max(0,V);return{rect:{x:ae,y:Se,width:Math.min(E.width,R+q)-ae,height:Math.min(E.height,V+H)-Se},layout:[{offset:X,stride:re}]}}(n,t,i,s,c)),v)for(let E=0;E<S.length;E+=4){const R=S[E];S[E]=S[E+2],S[E+2]=R}return S}finally{f.close()}})}let zt,or;function Jt(n,t,i,s){return n.addEventListener(t,i,s),{unsubscribe:()=>{n.removeEventListener(t,i,s)}}}function Ir(n){return n*Math.PI/180}function ii(n){return n/Math.PI*180}const Vr={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ni={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},mi="AbortError";function Mi(){return new Error(mi)}const gi={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function dr(n){return gi.REGISTERED_PROTOCOLS[n.substring(0,n.indexOf("://"))]}const Wt="global-dispatcher";class Pt extends Error{constructor(t,i,s,c){super(`AJAXError: ${i} (${t}): ${s}`),this.status=t,this.statusText=i,this.url=s,this.body=c}}const Bt=()=>vt(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,xt=function(n,t){if(/:\/\//.test(n.url)&&!/^https?:|^file:/.test(n.url)){const s=dr(n.url);if(s)return s(n,t);if(vt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,targetMapId:Wt},t)}if(!(/^file:/.test(i=n.url)||/^file:/.test(Bt())&&!/^\w+:/.test(i))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(s,c){return o(this,void 0,void 0,function*(){const f=new Request(s.url,{method:s.method||"GET",body:s.body,credentials:s.credentials,headers:s.headers,cache:s.cache,referrer:Bt(),signal:c.signal});let m,v;s.type!=="json"||f.headers.has("Accept")||f.headers.set("Accept","application/json");try{m=yield fetch(f)}catch(E){throw new Pt(0,E.message,s.url,new Blob)}if(!m.ok){const E=yield m.blob();throw new Pt(m.status,m.statusText,s.url,E)}v=s.type==="arrayBuffer"||s.type==="image"?m.arrayBuffer():s.type==="json"?m.json():m.text();const S=yield v;if(c.signal.aborted)throw Mi();return{data:S,cacheControl:m.headers.get("Cache-Control"),expires:m.headers.get("Expires")}})}(n,t);if(vt(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:n,mustQueue:!0,targetMapId:Wt},t)}var i;return function(s,c){return new Promise((f,m)=>{var v;const S=new XMLHttpRequest;S.open(s.method||"GET",s.url,!0),s.type!=="arrayBuffer"&&s.type!=="image"||(S.responseType="arraybuffer");for(const E in s.headers)S.setRequestHeader(E,s.headers[E]);s.type==="json"&&(S.responseType="text",!((v=s.headers)===null||v===void 0)&&v.Accept||S.setRequestHeader("Accept","application/json")),S.withCredentials=s.credentials==="include",S.onerror=()=>{m(new Error(S.statusText))},S.onload=()=>{if(!c.signal.aborted)if((S.status>=200&&S.status<300||S.status===0)&&S.response!==null){let E=S.response;if(s.type==="json")try{E=JSON.parse(S.response)}catch(R){return void m(R)}f({data:E,cacheControl:S.getResponseHeader("Cache-Control"),expires:S.getResponseHeader("Expires")})}else{const E=new Blob([S.response],{type:S.getResponseHeader("Content-Type")});m(new Pt(S.status,S.statusText,s.url,E))}},c.signal.addEventListener("abort",()=>{S.abort(),m(Mi())}),S.send(s.body)})}(n,t)};function ke(n){if(!n||n.indexOf("://")<=0||n.indexOf("data:image/")===0||n.indexOf("blob:")===0)return!0;const t=new URL(n),i=window.location;return t.protocol===i.protocol&&t.host===i.host}function K(n,t,i){i[n]&&i[n].indexOf(t)!==-1||(i[n]=i[n]||[],i[n].push(t))}function Q(n,t,i){if(i&&i[n]){const s=i[n].indexOf(t);s!==-1&&i[n].splice(s,1)}}class te{constructor(t,i={}){ri(this,i),this.type=t}}class he extends te{constructor(t,i={}){super("error",ri({error:t},i))}}class xe{on(t,i){return this._listeners=this._listeners||{},K(t,i,this._listeners),{unsubscribe:()=>{this.off(t,i)}}}off(t,i){return Q(t,i,this._listeners),Q(t,i,this._oneTimeListeners),this}once(t,i){return i?(this._oneTimeListeners=this._oneTimeListeners||{},K(t,i,this._oneTimeListeners),this):new Promise(s=>this.once(t,s))}fire(t,i){typeof t=="string"&&(t=new te(t,i||{}));const s=t.type;if(this.listens(s)){t.target=this;const c=this._listeners&&this._listeners[s]?this._listeners[s].slice():[];for(const v of c)v.call(this,t);const f=this._oneTimeListeners&&this._oneTimeListeners[s]?this._oneTimeListeners[s].slice():[];for(const v of f)Q(s,v,this._oneTimeListeners),v.call(this,t);const m=this._eventedParent;m&&(ri(t,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),m.fire(t))}else t instanceof he&&console.error(t.error);return this}listens(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)}setEventedParent(t,i){return this._eventedParent=t,this._eventedParentData=i,this}}var Y={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,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 Pe=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ae(n,t){const i={};for(const s in n)s!=="ref"&&(i[s]=n[s]);return Pe.forEach(s=>{s in t&&(i[s]=t[s])}),i}function Te(n,t){if(Array.isArray(n)){if(!Array.isArray(t)||n.length!==t.length)return!1;for(let i=0;i<n.length;i++)if(!Te(n[i],t[i]))return!1;return!0}if(typeof n=="object"&&n!==null&&t!==null){if(typeof t!="object"||Object.keys(n).length!==Object.keys(t).length)return!1;for(const i in n)if(!Te(n[i],t[i]))return!1;return!0}return n===t}function ze(n,t){n.push(t)}function Me(n,t,i){ze(i,{command:"addSource",args:[n,t[n]]})}function Qe(n,t,i){ze(t,{command:"removeSource",args:[n]}),i[n]=!0}function ut(n,t,i,s){Qe(n,i,s),Me(n,t,i)}function gt(n,t,i){let s;for(s in n[i])if(Object.prototype.hasOwnProperty.call(n[i],s)&&s!=="data"&&!Te(n[i][s],t[i][s]))return!1;for(s in t[i])if(Object.prototype.hasOwnProperty.call(t[i],s)&&s!=="data"&&!Te(n[i][s],t[i][s]))return!1;return!0}function It(n,t,i,s,c,f){n=n||{},t=t||{};for(const m in n)Object.prototype.hasOwnProperty.call(n,m)&&(Te(n[m],t[m])||i.push({command:f,args:[s,m,t[m],c]}));for(const m in t)Object.prototype.hasOwnProperty.call(t,m)&&!Object.prototype.hasOwnProperty.call(n,m)&&(Te(n[m],t[m])||i.push({command:f,args:[s,m,t[m],c]}))}function jt(n){return n.id}function Vt(n,t){return n[t.id]=t,n}class Ue{constructor(t,i,s,c){this.message=(t?`${t}: `:"")+s,c&&(this.identifier=c),i!=null&&i.__line__&&(this.line=i.__line__)}}function cr(n,...t){for(const i of t)for(const s in i)n[s]=i[s];return n}class Yt extends Error{constructor(t,i){super(i),this.message=i,this.key=t}}class sr{constructor(t,i=[]){this.parent=t,this.bindings={};for(const[s,c]of i)this.bindings[s]=c}concat(t){return new sr(this,t)}get(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(`${t} not found in scope.`)}has(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)}}const Ot={kind:"null"},Xe={kind:"number"},Rt={kind:"string"},Zt={kind:"boolean"},Ar={kind:"color"},mr={kind:"projectionDefinition"},yi={kind:"object"},Gt={kind:"value"},Oi={kind:"collator"},co={kind:"formatted"},yn={kind:"padding"},Tn={kind:"colorArray"},Li={kind:"numberArray"},_n={kind:"resolvedImage"},Er={kind:"variableAnchorOffsetCollection"};function _i(n,t){return{kind:"array",itemType:n,N:t}}function yr(n){if(n.kind==="array"){const t=yr(n.itemType);return typeof n.N=="number"?`array<${t}, ${n.N}>`:n.itemType.kind==="value"?"array":`array<${t}>`}return n.kind}const Zn=[Ot,Xe,Rt,Zt,Ar,mr,co,yi,_i(Gt),yn,Li,Tn,_n,Er];function sn(n,t){if(t.kind==="error")return null;if(n.kind==="array"){if(t.kind==="array"&&(t.N===0&&t.itemType.kind==="value"||!sn(n.itemType,t.itemType))&&(typeof n.N!="number"||n.N===t.N))return null}else{if(n.kind===t.kind)return null;if(n.kind==="value"){for(const i of Zn)if(!sn(i,t))return null}}return`Expected ${yr(n)} but found ${yr(t)} instead.`}function uo(n,t){return t.some(i=>i.kind===n.kind)}function En(n,t){return t.some(i=>i==="null"?n===null:i==="array"?Array.isArray(n):i==="object"?n&&!Array.isArray(n)&&typeof n=="object":i===typeof n)}function Ri(n,t){return n.kind==="array"&&t.kind==="array"?n.itemType.kind===t.itemType.kind&&typeof n.N=="number":n.kind===t.kind}const $o=.96422,Mo=.82521,Zs=4/29,Kn=6/29,es=3*Kn*Kn,Ks=Kn*Kn*Kn,Gs=Math.PI/180,Js=180/Math.PI;function ts(n){return(n%=360)<0&&(n+=360),n}function rs([n,t,i,s]){let c,f;const m=is((.2225045*(n=Pn(n))+.7168786*(t=Pn(t))+.0606169*(i=Pn(i)))/1);n===t&&t===i?c=f=m:(c=is((.4360747*n+.3850649*t+.1430804*i)/$o),f=is((.0139322*n+.0971045*t+.7141733*i)/Mo));const v=116*m-16;return[v<0?0:v,500*(c-m),200*(m-f),s]}function Pn(n){return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function is(n){return n>Ks?Math.pow(n,1/3):n/es+Zs}function Xs([n,t,i,s]){let c=(n+16)/116,f=isNaN(t)?c:c+t/500,m=isNaN(i)?c:c-i/200;return c=1*ns(c),f=$o*ns(f),m=Mo*ns(m),[In(3.1338561*f-1.6168667*c-.4906146*m),In(-.9787684*f+1.9161415*c+.033454*m),In(.0719453*f-.2289914*c+1.4052427*m),s]}function In(n){return(n=n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055)<0?0:n>1?1:n}function ns(n){return n>Kn?n*n*n:es*(n-Zs)}const tl=Object.hasOwn||function(n,t){return Object.prototype.hasOwnProperty.call(n,t)};function Gn(n,t){return tl(n,t)?n[t]:void 0}function Jn(n){return parseInt(n.padEnd(2,n),16)/255}function os(n,t){return oi(t?n/100:n,0,1)}function oi(n,t,i){return Math.min(Math.max(t,n),i)}function rr(n){return!n.some(Number.isNaN)}const Mn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};function si(n,t,i){return n+i*(t-n)}function Ln(n,t,i){return n.map((s,c)=>si(s,t[c],i))}class Nt{constructor(t,i,s,c=1,f=!0){this.r=t,this.g=i,this.b=s,this.a=c,f||(this.r*=c,this.g*=c,this.b*=c,c||this.overwriteGetter("rgb",[t,i,s,c]))}static parse(t){if(t instanceof Nt)return t;if(typeof t!="string")return;const i=function(s){if((s=s.toLowerCase().trim())==="transparent")return[0,0,0,0];const c=Gn(Mn,s);if(c){const[m,v,S]=c;return[m/255,v/255,S/255,1]}if(s.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(s)){const m=s.length<6?1:2;let v=1;return[Jn(s.slice(v,v+=m)),Jn(s.slice(v,v+=m)),Jn(s.slice(v,v+=m)),Jn(s.slice(v,v+m)||"ff")]}if(s.startsWith("rgb")){const m=s.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(m){const[v,S,E,R,V,q,H,W,X,re,ae,Se]=m,fe=[R||" ",H||" ",re].join("");if(fe===" "||fe===" /"||fe===",,"||fe===",,,"){const j=[E,q,X].join(""),$=j==="%%%"?100:j===""?255:0;if($){const ge=[oi(+S/$,0,1),oi(+V/$,0,1),oi(+W/$,0,1),ae?os(+ae,Se):1];if(rr(ge))return ge}}return}}const f=s.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(f){const[m,v,S,E,R,V,q,H,W]=f,X=[S||" ",R||" ",q].join("");if(X===" "||X===" /"||X===",,"||X===",,,"){const re=[+v,oi(+E,0,100),oi(+V,0,100),H?os(+H,W):1];if(rr(re))return function([ae,Se,fe,j]){function $(ge){const De=(ge+ae/30)%12,$e=Se*Math.min(fe,1-fe);return fe-$e*Math.max(-1,Math.min(De-3,9-De,1))}return ae=ts(ae),Se/=100,fe/=100,[$(0),$(8),$(4),j]}(re)}}}(t);return i?new Nt(...i,!1):void 0}get rgb(){const{r:t,g:i,b:s,a:c}=this,f=c||1/0;return this.overwriteGetter("rgb",[t/f,i/f,s/f,c])}get hcl(){return this.overwriteGetter("hcl",function(t){const[i,s,c,f]=rs(t),m=Math.sqrt(s*s+c*c);return[Math.round(1e4*m)?ts(Math.atan2(c,s)*Js):NaN,m,i,f]}(this.rgb))}get lab(){return this.overwriteGetter("lab",rs(this.rgb))}overwriteGetter(t,i){return Object.defineProperty(this,t,{value:i}),i}toString(){const[t,i,s,c]=this.rgb;return`rgba(${[t,i,s].map(f=>Math.round(255*f)).join(",")},${c})`}static interpolate(t,i,s,c="rgb"){switch(c){case"rgb":{const[f,m,v,S]=Ln(t.rgb,i.rgb,s);return new Nt(f,m,v,S,!1)}case"hcl":{const[f,m,v,S]=t.hcl,[E,R,V,q]=i.hcl;let H,W;if(isNaN(f)||isNaN(E))isNaN(f)?isNaN(E)?H=NaN:(H=E,v!==1&&v!==0||(W=R)):(H=f,V!==1&&V!==0||(W=m));else{let fe=E-f;E>f&&fe>180?fe-=360:E<f&&f-E>180&&(fe+=360),H=f+s*fe}const[X,re,ae,Se]=function([fe,j,$,ge]){return fe=isNaN(fe)?0:fe*Gs,Xs([$,Math.cos(fe)*j,Math.sin(fe)*j,ge])}([H,W??si(m,R,s),si(v,V,s),si(S,q,s)]);return new Nt(X,re,ae,Se,!1)}case"lab":{const[f,m,v,S]=Xs(Ln(t.lab,i.lab,s));return new Nt(f,m,v,S,!1)}}}}Nt.black=new Nt(0,0,0,1),Nt.white=new Nt(1,1,1,1),Nt.transparent=new Nt(0,0,0,0),Nt.red=new Nt(1,0,0,1);class vn{constructor(t,i,s){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=s,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(t,i){return this.collator.compare(t,i)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}const Fi=["bottom","center","top"];class ce{constructor(t,i,s,c,f,m){this.text=t,this.image=i,this.scale=s,this.fontStack=c,this.textColor=f,this.verticalAlign=m}}class ue{constructor(t){this.sections=t}static fromString(t){return new ue([new ce(t,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(t=>t.text.length!==0||t.image&&t.image.name.length!==0)}static factory(t){return t instanceof ue?t:ue.fromString(t)}toString(){return this.sections.length===0?"":this.sections.map(t=>t.text).join("")}}class de{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof de)return t;if(typeof t=="number")return new de([t,t,t,t]);if(Array.isArray(t)&&!(t.length<1||t.length>4)){for(const i of t)if(typeof i!="number")return;switch(t.length){case 1:t=[t[0],t[0],t[0],t[0]];break;case 2:t=[t[0],t[1],t[0],t[1]];break;case 3:t=[t[0],t[1],t[2],t[1]]}return new de(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new de(Ln(t.values,i.values,s))}}class ve{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof ve)return t;if(typeof t=="number")return new ve([t]);if(Array.isArray(t)){for(const i of t)if(typeof i!="number")return;return new ve(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){return new ve(Ln(t.values,i.values,s))}}class Ee{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Ee)return t;if(typeof t=="string"){const s=Nt.parse(t);return s?new Ee([s]):void 0}if(!Array.isArray(t))return;const i=[];for(const s of t){if(typeof s!="string")return;const c=Nt.parse(s);if(!c)return;i.push(c)}return new Ee(i)}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s,c="rgb"){const f=[];if(t.values.length!=i.values.length)throw new Error(`colorArray: Arrays have mismatched length (${t.values.length} vs. ${i.values.length}), cannot interpolate.`);for(let m=0;m<t.values.length;m++)f.push(Nt.interpolate(t.values[m],i.values[m],s,c));return new Ee(f)}}class Ve extends Error{constructor(t){super(t),this.name="RuntimeError"}toJSON(){return this.message}}const at=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Je{constructor(t){this.values=t.slice()}static parse(t){if(t instanceof Je)return t;if(Array.isArray(t)&&!(t.length<1)&&t.length%2==0){for(let i=0;i<t.length;i+=2){const s=t[i],c=t[i+1];if(typeof s!="string"||!at.has(s)||!Array.isArray(c)||c.length!==2||typeof c[0]!="number"||typeof c[1]!="number")return}return new Je(t)}}toString(){return JSON.stringify(this.values)}static interpolate(t,i,s){const c=t.values,f=i.values;if(c.length!==f.length)throw new Ve(`Cannot interpolate values of different length. from: ${t.toString()}, to: ${i.toString()}`);const m=[];for(let v=0;v<c.length;v+=2){if(c[v]!==f[v])throw new Ve(`Cannot interpolate values containing mismatched anchors. from[${v}]: ${c[v]}, to[${v}]: ${f[v]}`);m.push(c[v]);const[S,E]=c[v+1],[R,V]=f[v+1];m.push([si(S,R,s),si(E,V,s)])}return new Je(m)}}class nt{constructor(t){this.name=t.name,this.available=t.available}toString(){return this.name}static fromString(t){return t?new nt({name:t,available:!1}):null}}class Be{constructor(t,i,s){this.from=t,this.to=i,this.transition=s}static interpolate(t,i,s){return new Be(t,i,s)}static parse(t){return t instanceof Be?t:Array.isArray(t)&&t.length===3&&typeof t[0]=="string"&&typeof t[1]=="string"&&typeof t[2]=="number"?new Be(t[0],t[1],t[2]):typeof t=="object"&&typeof t.from=="string"&&typeof t.to=="string"&&typeof t.transition=="number"?new Be(t.from,t.to,t.transition):typeof t=="string"?new Be(t,t,1):void 0}}function Ke(n,t,i,s){return typeof n=="number"&&n>=0&&n<=255&&typeof t=="number"&&t>=0&&t<=255&&typeof i=="number"&&i>=0&&i<=255?s===void 0||typeof s=="number"&&s>=0&&s<=1?null:`Invalid rgba value [${[n,t,i,s].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof s=="number"?[n,t,i,s]:[n,t,i]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Ye(n){if(n===null||typeof n=="string"||typeof n=="boolean"||typeof n=="number"||n instanceof Be||n instanceof Nt||n instanceof vn||n instanceof ue||n instanceof de||n instanceof ve||n instanceof Ee||n instanceof Je||n instanceof nt)return!0;if(Array.isArray(n)){for(const t of n)if(!Ye(t))return!1;return!0}if(typeof n=="object"){for(const t in n)if(!Ye(n[t]))return!1;return!0}return!1}function ft(n){if(n===null)return Ot;if(typeof n=="string")return Rt;if(typeof n=="boolean")return Zt;if(typeof n=="number")return Xe;if(n instanceof Nt)return Ar;if(n instanceof Be)return mr;if(n instanceof vn)return Oi;if(n instanceof ue)return co;if(n instanceof de)return yn;if(n instanceof ve)return Li;if(n instanceof Ee)return Tn;if(n instanceof Je)return Er;if(n instanceof nt)return _n;if(Array.isArray(n)){const t=n.length;let i;for(const s of n){const c=ft(s);if(i){if(i===c)continue;i=Gt;break}i=c}return _i(i||Gt,t)}return yi}function ht(n){const t=typeof n;return n===null?"":t==="string"||t==="number"||t==="boolean"?String(n):n instanceof Nt||n instanceof Be||n instanceof ue||n instanceof de||n instanceof ve||n instanceof Ee||n instanceof Je||n instanceof nt?n.toString():JSON.stringify(n)}class ot{constructor(t,i){this.type=t,this.value=i}static parse(t,i){if(t.length!==2)return i.error(`'literal' expression requires exactly one argument, but found ${t.length-1} instead.`);if(!Ye(t[1]))return i.error("invalid value");const s=t[1];let c=ft(s);const f=i.expectedType;return c.kind!=="array"||c.N!==0||!f||f.kind!=="array"||typeof f.N=="number"&&f.N!==0||(c=f),new ot(c,s)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}const Kt={string:Rt,number:Xe,boolean:Zt,object:yi};class pt{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s,c=1;const f=t[0];if(f==="array"){let v,S;if(t.length>2){const E=t[1];if(typeof E!="string"||!(E in Kt)||E==="object")return i.error('The item type argument of "array" must be one of string, number, boolean',1);v=Kt[E],c++}else v=Gt;if(t.length>3){if(t[2]!==null&&(typeof t[2]!="number"||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);S=t[2],c++}s=_i(v,S)}else{if(!Kt[f])throw new Error(`Types doesn't contain name = ${f}`);s=Kt[f]}const m=[];for(;c<t.length;c++){const v=i.parse(t[c],c,Gt);if(!v)return null;m.push(v)}return new pt(s,m)}evaluate(t){for(let i=0;i<this.args.length;i++){const s=this.args[i].evaluate(t);if(!sn(this.type,ft(s)))return s;if(i===this.args.length-1)throw new Ve(`Expected value to be of type ${yr(this.type)}, but found ${yr(ft(s))} instead.`)}throw new Error}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const Ut={"to-boolean":Zt,"to-color":Ar,"to-number":Xe,"to-string":Rt};class br{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[0];if(!Ut[s])throw new Error(`Can't parse ${s} as it is not part of the known types`);if((s==="to-boolean"||s==="to-string")&&t.length!==2)return i.error("Expected one argument.");const c=Ut[s],f=[];for(let m=1;m<t.length;m++){const v=i.parse(t[m],m,Gt);if(!v)return null;f.push(v)}return new br(c,f)}evaluate(t){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(t);case"color":{let i,s;for(const c of this.args){if(i=c.evaluate(t),s=null,i instanceof Nt)return i;if(typeof i=="string"){const f=t.parseColor(i);if(f)return f}else if(Array.isArray(i)&&(s=i.length<3||i.length>4?`Invalid rgba value ${JSON.stringify(i)}: expected an array containing either three or four numeric values.`:Ke(i[0],i[1],i[2],i[3]),!s))return new Nt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Ve(s||`Could not parse color from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"padding":{let i;for(const s of this.args){i=s.evaluate(t);const c=de.parse(i);if(c)return c}throw new Ve(`Could not parse padding from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"numberArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=ve.parse(i);if(c)return c}throw new Ve(`Could not parse numberArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"colorArray":{let i;for(const s of this.args){i=s.evaluate(t);const c=Ee.parse(i);if(c)return c}throw new Ve(`Could not parse colorArray from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"variableAnchorOffsetCollection":{let i;for(const s of this.args){i=s.evaluate(t);const c=Je.parse(i);if(c)return c}throw new Ve(`Could not parse variableAnchorOffsetCollection from value '${typeof i=="string"?i:JSON.stringify(i)}'`)}case"number":{let i=null;for(const s of this.args){if(i=s.evaluate(t),i===null)return 0;const c=Number(i);if(!isNaN(c))return c}throw new Ve(`Could not convert ${JSON.stringify(i)} to number.`)}case"formatted":return ue.fromString(ht(this.args[0].evaluate(t)));case"resolvedImage":return nt.fromString(ht(this.args[0].evaluate(t)));case"projectionDefinition":return this.args[0].evaluate(t);default:return ht(this.args[0].evaluate(t))}}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}const ho=["Unknown","Point","LineString","Polygon"];class Rn{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,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"?ho[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(t){let i=this._parseColorCache.get(t);return i||(i=Nt.parse(t),this._parseColorCache.set(t,i)),i}}class an{constructor(t,i,s=[],c,f=new sr,m=[]){this.registry=t,this.path=s,this.key=s.map(v=>`[${v}]`).join(""),this.scope=f,this.errors=m,this.expectedType=c,this._isConstant=i}parse(t,i,s,c,f={}){return i?this.concat(i,s,c)._parse(t,f):this._parse(t,f)}_parse(t,i){function s(c,f,m){return m==="assert"?new pt(f,[c]):m==="coerce"?new br(f,[c]):c}if(t!==null&&typeof t!="string"&&typeof t!="boolean"&&typeof t!="number"||(t=["literal",t]),Array.isArray(t)){if(t.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const c=t[0];if(typeof c!="string")return this.error(`Expression name must be a string, but found ${typeof c} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const f=this.registry[c];if(f){let m=f.parse(t,this);if(!m)return null;if(this.expectedType){const v=this.expectedType,S=m.type;if(v.kind!=="string"&&v.kind!=="number"&&v.kind!=="boolean"&&v.kind!=="object"&&v.kind!=="array"||S.kind!=="value"){if(v.kind==="projectionDefinition"&&["string","array"].includes(S.kind)||["color","formatted","resolvedImage"].includes(v.kind)&&["value","string"].includes(S.kind)||["padding","numberArray"].includes(v.kind)&&["value","number","array"].includes(S.kind)||v.kind==="colorArray"&&["value","string","array"].includes(S.kind)||v.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(S.kind))m=s(m,v,i.typeAnnotation||"coerce");else if(this.checkSubtype(v,S))return null}else m=s(m,v,i.typeAnnotation||"assert")}if(!(m instanceof ot)&&m.type.kind!=="resolvedImage"&&this._isConstant(m)){const v=new Rn;try{m=new ot(m.type,m.evaluate(v))}catch(S){return this.error(S.message),null}}return m}return this.error(`Unknown expression "${c}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(t===void 0?"'undefined' value invalid. Use null instead.":typeof t=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof t} instead.`)}concat(t,i,s){const c=typeof t=="number"?this.path.concat(t):this.path,f=s?this.scope.concat(s):this.scope;return new an(this.registry,this._isConstant,c,i||null,f,this.errors)}error(t,...i){const s=`${this.key}${i.map(c=>`[${c}]`).join("")}`;this.errors.push(new Yt(s,t))}checkSubtype(t,i){const s=sn(t,i);return s&&this.error(s),s}}class Dn{constructor(t,i){this.type=i.type,this.bindings=[].concat(t),this.result=i}evaluate(t){return this.result.evaluate(t)}eachChild(t){for(const i of this.bindings)t(i[1]);t(this.result)}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found ${t.length-1} instead.`);const s=[];for(let f=1;f<t.length-1;f+=2){const m=t[f];if(typeof m!="string")return i.error(`Expected string, but found ${typeof m} instead.`,f);if(/[^a-zA-Z0-9_]/.test(m))return i.error("Variable names must contain only alphanumeric characters or '_'.",f);const v=i.parse(t[f+1],f+1);if(!v)return null;s.push([m,v])}const c=i.parse(t[t.length-1],t.length-1,i.expectedType,s);return c?new Dn(s,c):null}outputDefined(){return this.result.outputDefined()}}class po{constructor(t,i){this.type=i.type,this.name=t,this.boundExpression=i}static parse(t,i){if(t.length!==2||typeof t[1]!="string")return i.error("'var' expression requires exactly one string literal argument.");const s=t[1];return i.scope.has(s)?new po(s,i.scope.get(s)):i.error(`Unknown variable "${s}". Make sure "${s}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(t){return this.boundExpression.evaluate(t)}eachChild(){}outputDefined(){return!1}}class ss{constructor(t,i,s){this.type=t,this.index=i,this.input=s}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Xe),c=i.parse(t[2],2,_i(i.expectedType||Gt));return s&&c?new ss(c.type.itemType,s,c):null}evaluate(t){const i=this.index.evaluate(t),s=this.input.evaluate(t);if(i<0)throw new Ve(`Array index out of bounds: ${i} < 0.`);if(i>=s.length)throw new Ve(`Array index out of bounds: ${i} > ${s.length-1}.`);if(i!==Math.floor(i))throw new Ve(`Array index must be an integer, but found ${i} instead.`);return s[i]}eachChild(t){t(this.index),t(this.input)}outputDefined(){return!1}}class Qs{constructor(t,i){this.type=Zt,this.needle=t,this.haystack=i}static parse(t,i){if(t.length!==3)return i.error(`Expected 2 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Gt),c=i.parse(t[2],2,Gt);return s&&c?uo(s.type,[Zt,Rt,Xe,Ot,Gt])?new Qs(s,c):i.error(`Expected first argument to be of type boolean, string, number or null, but found ${yr(s.type)} instead`):null}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!s)return!1;if(!En(i,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${yr(ft(i))} instead.`);if(!En(s,["string","array"]))throw new Ve(`Expected second argument to be of type array or string, but found ${yr(ft(s))} instead.`);return s.indexOf(i)>=0}eachChild(t){t(this.needle),t(this.haystack)}outputDefined(){return!0}}class as{constructor(t,i,s){this.type=Xe,this.needle=t,this.haystack=i,this.fromIndex=s}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Gt),c=i.parse(t[2],2,Gt);if(!s||!c)return null;if(!uo(s.type,[Zt,Rt,Xe,Ot,Gt]))return i.error(`Expected first argument to be of type boolean, string, number or null, but found ${yr(s.type)} instead`);if(t.length===4){const f=i.parse(t[3],3,Xe);return f?new as(s,c,f):null}return new as(s,c)}evaluate(t){const i=this.needle.evaluate(t),s=this.haystack.evaluate(t);if(!En(i,["boolean","string","number","null"]))throw new Ve(`Expected first argument to be of type boolean, string, number or null, but found ${yr(ft(i))} instead.`);let c;if(this.fromIndex&&(c=this.fromIndex.evaluate(t)),En(s,["string"])){const f=s.indexOf(i,c);return f===-1?-1:[...s.slice(0,f)].length}if(En(s,["array"]))return s.indexOf(i,c);throw new Ve(`Expected second argument to be of type array or string, but found ${yr(ft(s))} instead.`)}eachChild(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)}outputDefined(){return!1}}class fo{constructor(t,i,s,c,f,m){this.inputType=t,this.type=i,this.input=s,this.cases=c,this.outputs=f,this.otherwise=m}static parse(t,i){if(t.length<5)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return i.error("Expected an even number of arguments.");let s,c;i.expectedType&&i.expectedType.kind!=="value"&&(c=i.expectedType);const f={},m=[];for(let E=2;E<t.length-1;E+=2){let R=t[E];const V=t[E+1];Array.isArray(R)||(R=[R]);const q=i.concat(E);if(R.length===0)return q.error("Expected at least one branch label.");for(const W of R){if(typeof W!="number"&&typeof W!="string")return q.error("Branch labels must be numbers or strings.");if(typeof W=="number"&&Math.abs(W)>Number.MAX_SAFE_INTEGER)return q.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof W=="number"&&Math.floor(W)!==W)return q.error("Numeric branch labels must be integer values.");if(s){if(q.checkSubtype(s,ft(W)))return null}else s=ft(W);if(f[String(W)]!==void 0)return q.error("Branch labels must be unique.");f[String(W)]=m.length}const H=i.parse(V,E,c);if(!H)return null;c=c||H.type,m.push(H)}const v=i.parse(t[1],1,Gt);if(!v)return null;const S=i.parse(t[t.length-1],t.length-1,c);return S?v.type.kind!=="value"&&i.concat(1).checkSubtype(s,v.type)?null:new fo(s,c,v,f,m,S):null}evaluate(t){const i=this.input.evaluate(t);return(ft(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)}eachChild(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)}outputDefined(){return this.outputs.every(t=>t.outputDefined())&&this.otherwise.outputDefined()}}class ai{constructor(t,i,s){this.type=t,this.branches=i,this.otherwise=s}static parse(t,i){if(t.length<4)return i.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return i.error("Expected an odd number of arguments.");let s;i.expectedType&&i.expectedType.kind!=="value"&&(s=i.expectedType);const c=[];for(let m=1;m<t.length-1;m+=2){const v=i.parse(t[m],m,Zt);if(!v)return null;const S=i.parse(t[m+1],m+1,s);if(!S)return null;c.push([v,S]),s=s||S.type}const f=i.parse(t[t.length-1],t.length-1,s);if(!f)return null;if(!s)throw new Error("Can't infer output type");return new ai(s,c,f)}evaluate(t){for(const[i,s]of this.branches)if(i.evaluate(t))return s.evaluate(t);return this.otherwise.evaluate(t)}eachChild(t){for(const[i,s]of this.branches)t(i),t(s);t(this.otherwise)}outputDefined(){return this.branches.every(([t,i])=>i.outputDefined())&&this.otherwise.outputDefined()}}class mo{constructor(t,i,s,c){this.type=t,this.input=i,this.beginIndex=s,this.endIndex=c}static parse(t,i){if(t.length<=2||t.length>=5)return i.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);const s=i.parse(t[1],1,Gt),c=i.parse(t[2],2,Xe);if(!s||!c)return null;if(!uo(s.type,[_i(Gt),Rt,Gt]))return i.error(`Expected first argument to be of type array or string, but found ${yr(s.type)} instead`);if(t.length===4){const f=i.parse(t[3],3,Xe);return f?new mo(s.type,s,c,f):null}return new mo(s.type,s,c)}evaluate(t){const i=this.input.evaluate(t),s=this.beginIndex.evaluate(t);let c;if(this.endIndex&&(c=this.endIndex.evaluate(t)),En(i,["string"]))return[...i].slice(s,c).join("");if(En(i,["array"]))return i.slice(s,c);throw new Ve(`Expected first argument to be of type array or string, but found ${yr(ft(i))} instead.`)}eachChild(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)}outputDefined(){return!1}}function ls(n,t){const i=n.length-1;let s,c,f=0,m=i,v=0;for(;f<=m;)if(v=Math.floor((f+m)/2),s=n[v],c=n[v+1],s<=t){if(v===i||t<c)return v;f=v+1}else{if(!(s>t))throw new Ve("Input is not a number.");m=v-1}return 0}class Xn{constructor(t,i,s){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(const[c,f]of s)this.labels.push(c),this.outputs.push(f)}static parse(t,i){if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=[];let f=null;i.expectedType&&i.expectedType.kind!=="value"&&(f=i.expectedType);for(let m=1;m<t.length;m+=2){const v=m===1?-1/0:t[m],S=t[m+1],E=m,R=m+1;if(typeof v!="number")return i.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',E);if(c.length&&c[c.length-1][0]>=v)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',E);const V=i.parse(S,R,f);if(!V)return null;f=f||V.type,c.push([v,V])}return new Xn(f,s,c)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const f=i.length;return c>=i[f-1]?s[f-1].evaluate(t):s[ls(i,c)].evaluate(t)}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function li(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ys,$s,_c=function(){if($s)return Ys;function n(t,i,s,c){this.cx=3*t,this.bx=3*(s-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(c-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=s,this.p2y=c}return $s=1,Ys=n,n.prototype={sampleCurveX:function(t){return((this.ax*t+this.bx)*t+this.cx)*t},sampleCurveY:function(t){return((this.ay*t+this.by)*t+this.cy)*t},sampleCurveDerivativeX:function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},solveCurveX:function(t,i){if(i===void 0&&(i=1e-6),t<0)return 0;if(t>1)return 1;for(var s=t,c=0;c<8;c++){var f=this.sampleCurveX(s)-t;if(Math.abs(f)<i)return s;var m=this.sampleCurveDerivativeX(s);if(Math.abs(m)<1e-6)break;s-=f/m}var v=0,S=1;for(s=t,c=0;c<20&&(f=this.sampleCurveX(s),!(Math.abs(f-t)<i));c++)t>f?v=s:S=s,s=.5*(S-v)+v;return s},solve:function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))}},Ys}(),xh=li(_c);class Si{constructor(t,i,s,c,f){this.type=t,this.operator=i,this.interpolation=s,this.input=c,this.labels=[],this.outputs=[];for(const[m,v]of f)this.labels.push(m),this.outputs.push(v)}static interpolationFactor(t,i,s,c){let f=0;if(t.name==="exponential")f=cs(i,t.base,s,c);else if(t.name==="linear")f=cs(i,1,s,c);else if(t.name==="cubic-bezier"){const m=t.controlPoints;f=new xh(m[0],m[1],m[2],m[3]).solve(cs(i,1,s,c))}return f}static parse(t,i){let[s,c,f,...m]=t;if(!Array.isArray(c)||c.length===0)return i.error("Expected an interpolation type expression.",1);if(c[0]==="linear")c={name:"linear"};else if(c[0]==="exponential"){const E=c[1];if(typeof E!="number")return i.error("Exponential interpolation requires a numeric base.",1,1);c={name:"exponential",base:E}}else{if(c[0]!=="cubic-bezier")return i.error(`Unknown interpolation type ${String(c[0])}`,1,0);{const E=c.slice(1);if(E.length!==4||E.some(R=>typeof R!="number"||R<0||R>1))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);c={name:"cubic-bezier",controlPoints:E}}}if(t.length-1<4)return i.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(f=i.parse(f,2,Xe),!f)return null;const v=[];let S=null;s!=="interpolate-hcl"&&s!=="interpolate-lab"||i.expectedType==Tn?i.expectedType&&i.expectedType.kind!=="value"&&(S=i.expectedType):S=Ar;for(let E=0;E<m.length;E+=2){const R=m[E],V=m[E+1],q=E+3,H=E+4;if(typeof R!="number")return i.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',q);if(v.length&&v[v.length-1][0]>=R)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',q);const W=i.parse(V,H,S);if(!W)return null;S=S||W.type,v.push([R,W])}return Ri(S,Xe)||Ri(S,mr)||Ri(S,Ar)||Ri(S,yn)||Ri(S,Li)||Ri(S,Tn)||Ri(S,Er)||Ri(S,_i(Xe))?new Si(S,s,c,f,v):i.error(`Type ${yr(S)} is not interpolatable.`)}evaluate(t){const i=this.labels,s=this.outputs;if(i.length===1)return s[0].evaluate(t);const c=this.input.evaluate(t);if(c<=i[0])return s[0].evaluate(t);const f=i.length;if(c>=i[f-1])return s[f-1].evaluate(t);const m=ls(i,c),v=Si.interpolationFactor(this.interpolation,c,i[m],i[m+1]),S=s[m].evaluate(t),E=s[m+1].evaluate(t);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return si(S,E,v);case"color":return Nt.interpolate(S,E,v);case"padding":return de.interpolate(S,E,v);case"colorArray":return Ee.interpolate(S,E,v);case"numberArray":return ve.interpolate(S,E,v);case"variableAnchorOffsetCollection":return Je.interpolate(S,E,v);case"array":return Ln(S,E,v);case"projectionDefinition":return Be.interpolate(S,E,v)}case"interpolate-hcl":switch(this.type.kind){case"color":return Nt.interpolate(S,E,v,"hcl");case"colorArray":return Ee.interpolate(S,E,v,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return Nt.interpolate(S,E,v,"lab");case"colorArray":return Ee.interpolate(S,E,v,"lab")}}}eachChild(t){t(this.input);for(const i of this.outputs)t(i)}outputDefined(){return this.outputs.every(t=>t.outputDefined())}}function cs(n,t,i,s){const c=s-i,f=n-i;return c===0?0:t===1?f/c:(Math.pow(t,f)-1)/(Math.pow(t,c)-1)}const xn={color:Nt.interpolate,number:si,padding:de.interpolate,numberArray:ve.interpolate,colorArray:Ee.interpolate,variableAnchorOffsetCollection:Je.interpolate,array:Ln};class go{constructor(t,i){this.type=t,this.args=i}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");let s=null;const c=i.expectedType;c&&c.kind!=="value"&&(s=c);const f=[];for(const v of t.slice(1)){const S=i.parse(v,1+f.length,s,void 0,{typeAnnotation:"omit"});if(!S)return null;s=s||S.type,f.push(S)}if(!s)throw new Error("No output type");const m=c&&f.some(v=>sn(c,v.type));return new go(m?Gt:s,f)}evaluate(t){let i,s=null,c=0;for(const f of this.args)if(c++,s=f.evaluate(t),s&&s instanceof nt&&!s.available&&(i||(i=s.name),s=null,c===this.args.length&&(s=i)),s!==null)break;return s}eachChild(t){this.args.forEach(t)}outputDefined(){return this.args.every(t=>t.outputDefined())}}function us(n,t){return n==="=="||n==="!="?t.kind==="boolean"||t.kind==="string"||t.kind==="number"||t.kind==="null"||t.kind==="value":t.kind==="string"||t.kind==="number"||t.kind==="value"}function Ji(n,t,i,s){return s.compare(t,i)===0}function yo(n,t,i){const s=n!=="=="&&n!=="!=";return class iy{constructor(f,m,v){this.type=Zt,this.lhs=f,this.rhs=m,this.collator=v,this.hasUntypedArgument=f.type.kind==="value"||m.type.kind==="value"}static parse(f,m){if(f.length!==3&&f.length!==4)return m.error("Expected two or three arguments.");const v=f[0];let S=m.parse(f[1],1,Gt);if(!S)return null;if(!us(v,S.type))return m.concat(1).error(`"${v}" comparisons are not supported for type '${yr(S.type)}'.`);let E=m.parse(f[2],2,Gt);if(!E)return null;if(!us(v,E.type))return m.concat(2).error(`"${v}" comparisons are not supported for type '${yr(E.type)}'.`);if(S.type.kind!==E.type.kind&&S.type.kind!=="value"&&E.type.kind!=="value")return m.error(`Cannot compare types '${yr(S.type)}' and '${yr(E.type)}'.`);s&&(S.type.kind==="value"&&E.type.kind!=="value"?S=new pt(E.type,[S]):S.type.kind!=="value"&&E.type.kind==="value"&&(E=new pt(S.type,[E])));let R=null;if(f.length===4){if(S.type.kind!=="string"&&E.type.kind!=="string"&&S.type.kind!=="value"&&E.type.kind!=="value")return m.error("Cannot use collator to compare non-string types.");if(R=m.parse(f[3],3,Oi),!R)return null}return new iy(S,E,R)}evaluate(f){const m=this.lhs.evaluate(f),v=this.rhs.evaluate(f);if(s&&this.hasUntypedArgument){const S=ft(m),E=ft(v);if(S.kind!==E.kind||S.kind!=="string"&&S.kind!=="number")throw new Ve(`Expected arguments for "${n}" to be (string, string) or (number, number), but found (${S.kind}, ${E.kind}) instead.`)}if(this.collator&&!s&&this.hasUntypedArgument){const S=ft(m),E=ft(v);if(S.kind!=="string"||E.kind!=="string")return t(f,m,v)}return this.collator?i(f,m,v,this.collator.evaluate(f)):t(f,m,v)}eachChild(f){f(this.lhs),f(this.rhs),this.collator&&f(this.collator)}outputDefined(){return!0}}}const ea=yo("==",function(n,t,i){return t===i},Ji),bh=yo("!=",function(n,t,i){return t!==i},function(n,t,i,s){return!Ji(0,t,i,s)}),rl=yo("<",function(n,t,i){return t<i},function(n,t,i,s){return s.compare(t,i)<0}),wh=yo(">",function(n,t,i){return t>i},function(n,t,i,s){return s.compare(t,i)>0}),Sh=yo("<=",function(n,t,i){return t<=i},function(n,t,i,s){return s.compare(t,i)<=0}),Ah=yo(">=",function(n,t,i){return t>=i},function(n,t,i,s){return s.compare(t,i)>=0});class ta{constructor(t,i,s){this.type=Oi,this.locale=s,this.caseSensitive=t,this.diacriticSensitive=i}static parse(t,i){if(t.length!==2)return i.error("Expected one argument.");const s=t[1];if(typeof s!="object"||Array.isArray(s))return i.error("Collator options argument must be an object.");const c=i.parse(s["case-sensitive"]!==void 0&&s["case-sensitive"],1,Zt);if(!c)return null;const f=i.parse(s["diacritic-sensitive"]!==void 0&&s["diacritic-sensitive"],1,Zt);if(!f)return null;let m=null;return s.locale&&(m=i.parse(s.locale,1,Rt),!m)?null:new ta(c,f,m)}evaluate(t){return new vn(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)}eachChild(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)}outputDefined(){return!1}}class Lo{constructor(t,i,s,c,f){this.type=Rt,this.number=t,this.locale=i,this.currency=s,this.minFractionDigits=c,this.maxFractionDigits=f}static parse(t,i){if(t.length!==3)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Xe);if(!s)return null;const c=t[2];if(typeof c!="object"||Array.isArray(c))return i.error("NumberFormat options argument must be an object.");let f=null;if(c.locale&&(f=i.parse(c.locale,1,Rt),!f))return null;let m=null;if(c.currency&&(m=i.parse(c.currency,1,Rt),!m))return null;let v=null;if(c["min-fraction-digits"]&&(v=i.parse(c["min-fraction-digits"],1,Xe),!v))return null;let S=null;return c["max-fraction-digits"]&&(S=i.parse(c["max-fraction-digits"],1,Xe),!S)?null:new Lo(s,f,m,v,S)}evaluate(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))}eachChild(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)}outputDefined(){return!1}}class ra{constructor(t){this.type=co,this.sections=t}static parse(t,i){if(t.length<2)return i.error("Expected at least one argument.");const s=t[1];if(!Array.isArray(s)&&typeof s=="object")return i.error("First argument must be an image or text section.");const c=[];let f=!1;for(let m=1;m<=t.length-1;++m){const v=t[m];if(f&&typeof v=="object"&&!Array.isArray(v)){f=!1;let S=null;if(v["font-scale"]&&(S=i.parse(v["font-scale"],1,Xe),!S))return null;let E=null;if(v["text-font"]&&(E=i.parse(v["text-font"],1,_i(Rt)),!E))return null;let R=null;if(v["text-color"]&&(R=i.parse(v["text-color"],1,Ar),!R))return null;let V=null;if(v["vertical-align"]){if(typeof v["vertical-align"]=="string"&&!Fi.includes(v["vertical-align"]))return i.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${v["vertical-align"]}' instead.`);if(V=i.parse(v["vertical-align"],1,Rt),!V)return null}const q=c[c.length-1];q.scale=S,q.font=E,q.textColor=R,q.verticalAlign=V}else{const S=i.parse(t[m],1,Gt);if(!S)return null;const E=S.type.kind;if(E!=="string"&&E!=="value"&&E!=="null"&&E!=="resolvedImage")return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");f=!0,c.push({content:S,scale:null,font:null,textColor:null,verticalAlign:null})}}return new ra(c)}evaluate(t){return new ue(this.sections.map(i=>{const s=i.content.evaluate(t);return ft(s)===_n?new ce("",s,null,null,null,i.verticalAlign?i.verticalAlign.evaluate(t):null):new ce(ht(s),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null,i.verticalAlign?i.verticalAlign.evaluate(t):null)}))}eachChild(t){for(const i of this.sections)t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor),i.verticalAlign&&t(i.verticalAlign)}outputDefined(){return!1}}class ia{constructor(t){this.type=_n,this.input=t}static parse(t,i){if(t.length!==2)return i.error("Expected two arguments.");const s=i.parse(t[1],1,Rt);return s?new ia(s):i.error("No image name provided.")}evaluate(t){const i=this.input.evaluate(t),s=nt.fromString(i);return s&&t.availableImages&&(s.available=t.availableImages.indexOf(i)>-1),s}eachChild(t){t(this.input)}outputDefined(){return!1}}class na{constructor(t){this.type=Xe,this.input=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=i.parse(t[1],1);return s?s.type.kind!=="array"&&s.type.kind!=="string"&&s.type.kind!=="value"?i.error(`Expected argument of type string or array, but found ${yr(s.type)} instead.`):new na(s):null}evaluate(t){const i=this.input.evaluate(t);if(typeof i=="string")return[...i].length;if(Array.isArray(i))return i.length;throw new Ve(`Expected value to be of type string or array, but found ${yr(ft(i))} instead.`)}eachChild(t){t(this.input)}outputDefined(){return!1}}const bn=8192;function vc(n,t){const i=(180+n[0])/360,s=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n[1]*Math.PI/360)))/360,c=Math.pow(2,t.z);return[Math.round(i*c*bn),Math.round(s*c*bn)]}function il(n,t){const i=Math.pow(2,t.z);return[(c=(n[0]/bn+t.x)/i,360*c-180),(s=(n[1]/bn+t.y)/i,360/Math.PI*Math.atan(Math.exp((180-360*s)*Math.PI/180))-90)];var s,c}function hs(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.max(n[2],t[0]),n[3]=Math.max(n[3],t[1])}function ds(n,t){return!(n[0]<=t[0]||n[2]>=t[2]||n[1]<=t[1]||n[3]>=t[3])}function kh(n,t,i){const s=n[0]-t[0],c=n[1]-t[1],f=n[0]-i[0],m=n[1]-i[1];return s*m-f*c==0&&s*f<=0&&c*m<=0}function oa(n,t,i,s){return(c=[s[0]-i[0],s[1]-i[1]])[0]*(f=[t[0]-n[0],t[1]-n[1]])[1]-c[1]*f[0]!=0&&!(!Sc(n,t,i,s)||!Sc(i,s,n,t));var c,f}function xc(n,t,i){for(const s of i)for(let c=0;c<s.length-1;++c)if(oa(n,t,s[c],s[c+1]))return!0;return!1}function _o(n,t,i=!1){let s=!1;for(const v of t)for(let S=0;S<v.length-1;S++){if(kh(n,v[S],v[S+1]))return i;(f=v[S])[1]>(c=n)[1]!=(m=v[S+1])[1]>c[1]&&c[0]<(m[0]-f[0])*(c[1]-f[1])/(m[1]-f[1])+f[0]&&(s=!s)}var c,f,m;return s}function bc(n,t){for(const i of t)if(_o(n,i))return!0;return!1}function wc(n,t){for(const i of n)if(!_o(i,t))return!1;for(let i=0;i<n.length-1;++i)if(xc(n[i],n[i+1],t))return!1;return!0}function Ch(n,t){for(const i of t)if(wc(n,i))return!0;return!1}function Sc(n,t,i,s){const c=s[0]-i[0],f=s[1]-i[1],m=(n[0]-i[0])*f-c*(n[1]-i[1]),v=(t[0]-i[0])*f-c*(t[1]-i[1]);return m>0&&v<0||m<0&&v>0}function ps(n,t,i){const s=[];for(let c=0;c<n.length;c++){const f=[];for(let m=0;m<n[c].length;m++){const v=vc(n[c][m],i);hs(t,v),f.push(v)}s.push(f)}return s}function Ac(n,t,i){const s=[];for(let c=0;c<n.length;c++){const f=ps(n[c],t,i);s.push(f)}return s}function kc(n,t,i,s){if(n[0]<i[0]||n[0]>i[2]){const c=.5*s;let f=n[0]-i[0]>c?-s:i[0]-n[0]>c?s:0;f===0&&(f=n[0]-i[2]>c?-s:i[2]-n[0]>c?s:0),n[0]+=f}hs(t,n)}function Cc(n,t,i,s){const c=Math.pow(2,s.z)*bn,f=[s.x*bn,s.y*bn],m=[];for(const v of n)for(const S of v){const E=[S.x+f[0],S.y+f[1]];kc(E,t,i,c),m.push(E)}return m}function nl(n,t,i,s){const c=Math.pow(2,s.z)*bn,f=[s.x*bn,s.y*bn],m=[];for(const S of n){const E=[];for(const R of S){const V=[R.x+f[0],R.y+f[1]];hs(t,V),E.push(V)}m.push(E)}if(t[2]-t[0]<=c/2){(v=t)[0]=v[1]=1/0,v[2]=v[3]=-1/0;for(const S of m)for(const E of S)kc(E,t,i,c)}var v;return m}class Qn{constructor(t,i){this.type=Zt,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'within' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection"){const c=[];for(const f of s.features){const{type:m,coordinates:v}=f.geometry;m==="Polygon"&&c.push(v),m==="MultiPolygon"&&c.push(...v)}if(c.length)return new Qn(s,{type:"MultiPolygon",coordinates:c})}else if(s.type==="Feature"){const c=s.geometry.type;if(c==="Polygon"||c==="MultiPolygon")return new Qn(s,s.geometry)}else if(s.type==="Polygon"||s.type==="MultiPolygon")return new Qn(s,s)}return i.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const v=ps(s.coordinates,f,m),S=Cc(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of S)if(!_o(E,v))return!1}if(s.type==="MultiPolygon"){const v=Ac(s.coordinates,f,m),S=Cc(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of S)if(!bc(E,v))return!1}return!0}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=[1/0,1/0,-1/0,-1/0],f=[1/0,1/0,-1/0,-1/0],m=i.canonicalID();if(s.type==="Polygon"){const v=ps(s.coordinates,f,m),S=nl(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of S)if(!wc(E,v))return!1}if(s.type==="MultiPolygon"){const v=Ac(s.coordinates,f,m),S=nl(i.geometry(),c,f,m);if(!ds(c,f))return!1;for(const E of S)if(!Ch(E,v))return!1}return!0}(t,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Tc=class{constructor(n=[],t=(i,s)=>i<s?-1:i>s?1:0){if(this.data=n,this.length=this.data.length,this.compare=t,this.length>0)for(let i=(this.length>>1)-1;i>=0;i--)this._down(i)}push(n){this.data.push(n),this._up(this.length++)}pop(){if(this.length===0)return;const n=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),n}peek(){return this.data[0]}_up(n){const{data:t,compare:i}=this,s=t[n];for(;n>0;){const c=n-1>>1,f=t[c];if(i(s,f)>=0)break;t[n]=f,n=c}t[n]=s}_down(n){const{data:t,compare:i}=this,s=this.length>>1,c=t[n];for(;n<s;){let f=1+(n<<1);const m=f+1;if(m<this.length&&i(t[m],t[f])<0&&(f=m),i(t[f],c)>=0)break;t[n]=t[f],n=f}t[n]=c}};function Ec(n,t,i=0,s=n.length-1,c=Pc){for(;s>i;){if(s-i>600){const S=s-i+1,E=t-i+1,R=Math.log(S),V=.5*Math.exp(2*R/3),q=.5*Math.sqrt(R*V*(S-V)/S)*(E-S/2<0?-1:1);Ec(n,t,Math.max(i,Math.floor(t-E*V/S+q)),Math.min(s,Math.floor(t+(S-E)*V/S+q)),c)}const f=n[t];let m=i,v=s;for(Ro(n,i,t),c(n[s],f)>0&&Ro(n,i,s);m<v;){for(Ro(n,m,v),m++,v--;c(n[m],f)<0;)m++;for(;c(n[v],f)>0;)v--}c(n[i],f)===0?Ro(n,i,v):(v++,Ro(n,v,s)),v<=t&&(i=v+1),t<=v&&(s=v-1)}}function Ro(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}function Pc(n,t){return n<t?-1:n>t?1:0}function sa(n,t){if(n.length<=1)return[n];const i=[];let s,c;for(const f of n){const m=Eh(f);m!==0&&(f.area=Math.abs(m),c===void 0&&(c=m<0),c===m<0?(s&&i.push(s),s=[f]):s.push(f))}if(s&&i.push(s),t>1)for(let f=0;f<i.length;f++)i[f].length<=t||(Ec(i[f],t,1,i[f].length-1,Th),i[f]=i[f].slice(0,t));return i}function Th(n,t){return t.area-n.area}function Eh(n){let t=0;for(let i,s,c=0,f=n.length,m=f-1;c<f;m=c++)i=n[c],s=n[m],t+=(s.x-i.x)*(i.y+s.y);return t}const ol=1/298.257223563,Ic=ol*(2-ol),Mc=Math.PI/180;class sl{constructor(t){const i=6378.137*Mc*1e3,s=Math.cos(t*Mc),c=1/(1-Ic*(1-s*s)),f=Math.sqrt(c);this.kx=i*f*s,this.ky=i*f*c*(1-Ic)}distance(t,i){const s=this.wrap(t[0]-i[0])*this.kx,c=(t[1]-i[1])*this.ky;return Math.sqrt(s*s+c*c)}pointOnLine(t,i){let s,c,f,m,v=1/0;for(let S=0;S<t.length-1;S++){let E=t[S][0],R=t[S][1],V=this.wrap(t[S+1][0]-E)*this.kx,q=(t[S+1][1]-R)*this.ky,H=0;V===0&&q===0||(H=(this.wrap(i[0]-E)*this.kx*V+(i[1]-R)*this.ky*q)/(V*V+q*q),H>1?(E=t[S+1][0],R=t[S+1][1]):H>0&&(E+=V/this.kx*H,R+=q/this.ky*H)),V=this.wrap(i[0]-E)*this.kx,q=(i[1]-R)*this.ky;const W=V*V+q*q;W<v&&(v=W,s=E,c=R,f=S,m=H)}return{point:[s,c],index:f,t:Math.max(0,Math.min(1,m))}}wrap(t){for(;t<-180;)t+=360;for(;t>180;)t-=360;return t}}function Lc(n,t){return t[0]-n[0]}function lr(n){return n[1]-n[0]+1}function zn(n,t){return n[1]>=n[0]&&n[1]<t}function al(n,t){if(n[0]>n[1])return[null,null];const i=lr(n);if(t){if(i===2)return[n,null];const c=Math.floor(i/2);return[[n[0],n[0]+c],[n[0]+c,n[1]]]}if(i===1)return[n,null];const s=Math.floor(i/2)-1;return[[n[0],n[0]+s],[n[0]+s+1,n[1]]]}function ll(n,t){if(!zn(t,n.length))return[1/0,1/0,-1/0,-1/0];const i=[1/0,1/0,-1/0,-1/0];for(let s=t[0];s<=t[1];++s)hs(i,n[s]);return i}function cl(n){const t=[1/0,1/0,-1/0,-1/0];for(const i of n)for(const s of i)hs(t,s);return t}function Rc(n){return n[0]!==-1/0&&n[1]!==-1/0&&n[2]!==1/0&&n[3]!==1/0}function ul(n,t,i){if(!Rc(n)||!Rc(t))return NaN;let s=0,c=0;return n[2]<t[0]&&(s=t[0]-n[2]),n[0]>t[2]&&(s=n[0]-t[2]),n[1]>t[3]&&(c=n[1]-t[3]),n[3]<t[1]&&(c=t[1]-n[3]),i.distance([0,0],[s,c])}function vo(n,t,i){const s=i.pointOnLine(t,n);return i.distance(n,s.point)}function hl(n,t,i,s,c){const f=Math.min(vo(n,[i,s],c),vo(t,[i,s],c)),m=Math.min(vo(i,[n,t],c),vo(s,[n,t],c));return Math.min(f,m)}function Ph(n,t,i,s,c){if(!zn(t,n.length)||!zn(s,i.length))return 1/0;let f=1/0;for(let m=t[0];m<t[1];++m){const v=n[m],S=n[m+1];for(let E=s[0];E<s[1];++E){const R=i[E],V=i[E+1];if(oa(v,S,R,V))return 0;f=Math.min(f,hl(v,S,R,V,c))}}return f}function Ih(n,t,i,s,c){if(!zn(t,n.length)||!zn(s,i.length))return NaN;let f=1/0;for(let m=t[0];m<=t[1];++m)for(let v=s[0];v<=s[1];++v)if(f=Math.min(f,c.distance(n[m],i[v])),f===0)return f;return f}function Mh(n,t,i){if(_o(n,t,!0))return 0;let s=1/0;for(const c of t){const f=c[0],m=c[c.length-1];if(f!==m&&(s=Math.min(s,vo(n,[m,f],i)),s===0))return s;const v=i.pointOnLine(c,n);if(s=Math.min(s,i.distance(n,v.point)),s===0)return s}return s}function Lh(n,t,i,s){if(!zn(t,n.length))return NaN;for(let f=t[0];f<=t[1];++f)if(_o(n[f],i,!0))return 0;let c=1/0;for(let f=t[0];f<t[1];++f){const m=n[f],v=n[f+1];for(const S of i)for(let E=0,R=S.length,V=R-1;E<R;V=E++){const q=S[V],H=S[E];if(oa(m,v,q,H))return 0;c=Math.min(c,hl(m,v,q,H,s))}}return c}function Dc(n,t){for(const i of n)for(const s of i)if(_o(s,t,!0))return!0;return!1}function Rh(n,t,i,s=1/0){const c=cl(n),f=cl(t);if(s!==1/0&&ul(c,f,i)>=s)return s;if(ds(c,f)){if(Dc(n,t))return 0}else if(Dc(t,n))return 0;let m=1/0;for(const v of n)for(let S=0,E=v.length,R=E-1;S<E;R=S++){const V=v[R],q=v[S];for(const H of t)for(let W=0,X=H.length,re=X-1;W<X;re=W++){const ae=H[re],Se=H[W];if(oa(V,q,ae,Se))return 0;m=Math.min(m,hl(V,q,ae,Se,i))}}return m}function zc(n,t,i,s,c,f){if(!f)return;const m=ul(ll(s,f),c,i);m<t&&n.push([m,f,[0,0]])}function aa(n,t,i,s,c,f,m){if(!f||!m)return;const v=ul(ll(s,f),ll(c,m),i);v<t&&n.push([v,f,m])}function la(n,t,i,s,c=1/0){let f=Math.min(s.distance(n[0],i[0][0]),c);if(f===0)return f;const m=new Tc([[0,[0,n.length-1],[0,0]]],Lc),v=cl(i);for(;m.length>0;){const S=m.pop();if(S[0]>=f)continue;const E=S[1],R=t?50:100;if(lr(E)<=R){if(!zn(E,n.length))return NaN;if(t){const V=Lh(n,E,i,s);if(isNaN(V)||V===0)return V;f=Math.min(f,V)}else for(let V=E[0];V<=E[1];++V){const q=Mh(n[V],i,s);if(f=Math.min(f,q),f===0)return 0}}else{const V=al(E,t);zc(m,f,s,n,v,V[0]),zc(m,f,s,n,v,V[1])}}return f}function ca(n,t,i,s,c,f=1/0){let m=Math.min(f,c.distance(n[0],i[0]));if(m===0)return m;const v=new Tc([[0,[0,n.length-1],[0,i.length-1]]],Lc);for(;v.length>0;){const S=v.pop();if(S[0]>=m)continue;const E=S[1],R=S[2],V=t?50:100,q=s?50:100;if(lr(E)<=V&&lr(R)<=q){if(!zn(E,n.length)&&zn(R,i.length))return NaN;let H;if(t&&s)H=Ph(n,E,i,R,c),m=Math.min(m,H);else if(t&&!s){const W=n.slice(E[0],E[1]+1);for(let X=R[0];X<=R[1];++X)if(H=vo(i[X],W,c),m=Math.min(m,H),m===0)return m}else if(!t&&s){const W=i.slice(R[0],R[1]+1);for(let X=E[0];X<=E[1];++X)if(H=vo(n[X],W,c),m=Math.min(m,H),m===0)return m}else H=Ih(n,E,i,R,c),m=Math.min(m,H)}else{const H=al(E,t),W=al(R,s);aa(v,m,c,n,i,H[0],W[0]),aa(v,m,c,n,i,H[0],W[1]),aa(v,m,c,n,i,H[1],W[0]),aa(v,m,c,n,i,H[1],W[1])}}return m}function dl(n){return n.type==="MultiPolygon"?n.coordinates.map(t=>({type:"Polygon",coordinates:t})):n.type==="MultiLineString"?n.coordinates.map(t=>({type:"LineString",coordinates:t})):n.type==="MultiPoint"?n.coordinates.map(t=>({type:"Point",coordinates:t})):[n]}class xo{constructor(t,i){this.type=Xe,this.geojson=t,this.geometries=i}static parse(t,i){if(t.length!==2)return i.error(`'distance' expression requires exactly one argument, but found ${t.length-1} instead.`);if(Ye(t[1])){const s=t[1];if(s.type==="FeatureCollection")return new xo(s,s.features.map(c=>dl(c.geometry)).flat());if(s.type==="Feature")return new xo(s,dl(s.geometry));if("type"in s&&"coordinates"in s)return new xo(s,dl(s))}return i.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(t){if(t.geometry()!=null&&t.canonicalID()!=null){if(t.geometryType()==="Point")return function(i,s){const c=i.geometry(),f=c.flat().map(S=>il([S.x,S.y],i.canonical));if(c.length===0)return NaN;const m=new sl(f[0][1]);let v=1/0;for(const S of s){switch(S.type){case"Point":v=Math.min(v,ca(f,!1,[S.coordinates],!1,m,v));break;case"LineString":v=Math.min(v,ca(f,!1,S.coordinates,!0,m,v));break;case"Polygon":v=Math.min(v,la(f,!1,S.coordinates,m,v))}if(v===0)return v}return v}(t,this.geometries);if(t.geometryType()==="LineString")return function(i,s){const c=i.geometry(),f=c.flat().map(S=>il([S.x,S.y],i.canonical));if(c.length===0)return NaN;const m=new sl(f[0][1]);let v=1/0;for(const S of s){switch(S.type){case"Point":v=Math.min(v,ca(f,!0,[S.coordinates],!1,m,v));break;case"LineString":v=Math.min(v,ca(f,!0,S.coordinates,!0,m,v));break;case"Polygon":v=Math.min(v,la(f,!0,S.coordinates,m,v))}if(v===0)return v}return v}(t,this.geometries);if(t.geometryType()==="Polygon")return function(i,s){const c=i.geometry();if(c.length===0||c[0].length===0)return NaN;const f=sa(c,0).map(S=>S.map(E=>E.map(R=>il([R.x,R.y],i.canonical)))),m=new sl(f[0][0][0][1]);let v=1/0;for(const S of s)for(const E of f){switch(S.type){case"Point":v=Math.min(v,la([S.coordinates],!1,E,m,v));break;case"LineString":v=Math.min(v,la(S.coordinates,!0,E,m,v));break;case"Polygon":v=Math.min(v,Rh(E,S.coordinates,m,v))}if(v===0)return v}return v}(t,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class ua{constructor(t){this.type=Gt,this.key=t}static parse(t,i){if(t.length!==2)return i.error(`Expected 1 argument, but found ${t.length-1} instead.`);const s=t[1];return s==null?i.error("Global state property must be defined."):typeof s!="string"?i.error(`Global state property must be string, but found ${typeof t[1]} instead.`):new ua(s)}evaluate(t){var i;const s=(i=t.globals)===null||i===void 0?void 0:i.globalState;return s&&Object.keys(s).length!==0?Gn(s,this.key):null}eachChild(){}outputDefined(){return!1}}const Do={"==":ea,"!=":bh,">":wh,"<":rl,">=":Ah,"<=":Sh,array:pt,at:ss,boolean:pt,case:ai,coalesce:go,collator:ta,format:ra,image:ia,in:Qs,"index-of":as,interpolate:Si,"interpolate-hcl":Si,"interpolate-lab":Si,length:na,let:Dn,literal:ot,match:fo,number:pt,"number-format":Lo,object:pt,slice:mo,step:Xn,string:pt,"to-boolean":br,"to-color":br,"to-number":br,"to-string":br,var:po,within:Qn,distance:xo,"global-state":ua};class Xi{constructor(t,i,s,c){this.name=t,this.type=i,this._evaluate=s,this.args=c}evaluate(t){return this._evaluate(t,this.args)}eachChild(t){this.args.forEach(t)}outputDefined(){return!1}static parse(t,i){const s=t[0],c=Xi.definitions[s];if(!c)return i.error(`Unknown expression "${s}". If you wanted a literal array, use ["literal", [...]].`,0);const f=Array.isArray(c)?c[0]:c.type,m=Array.isArray(c)?[[c[1],c[2]]]:c.overloads,v=m.filter(([E])=>!Array.isArray(E)||E.length===t.length-1);let S=null;for(const[E,R]of v){S=new an(i.registry,ha,i.path,null,i.scope);const V=[];let q=!1;for(let H=1;H<t.length;H++){const W=t[H],X=Array.isArray(E)?E[H-1]:E.type,re=S.parse(W,1+V.length,X);if(!re){q=!0;break}V.push(re)}if(!q)if(Array.isArray(E)&&E.length!==V.length)S.error(`Expected ${E.length} arguments, but found ${V.length} instead.`);else{for(let H=0;H<V.length;H++){const W=Array.isArray(E)?E[H]:E.type,X=V[H];S.concat(H+1).checkSubtype(W,X.type)}if(S.errors.length===0)return new Xi(s,f,R,V)}}if(v.length===1)i.errors.push(...S.errors);else{const E=(v.length?v:m).map(([V])=>{return q=V,Array.isArray(q)?`(${q.map(yr).join(", ")})`:`(${yr(q.type)}...)`;var q}).join(" | "),R=[];for(let V=1;V<t.length;V++){const q=i.parse(t[V],1+R.length);if(!q)return null;R.push(yr(q.type))}i.error(`Expected arguments of type ${E}, but found (${R.join(", ")}) instead.`)}return null}static register(t,i){Xi.definitions=i;for(const s in i)t[s]=Xi}}function Bc(n,[t,i,s,c]){t=t.evaluate(n),i=i.evaluate(n),s=s.evaluate(n);const f=c?c.evaluate(n):1,m=Ke(t,i,s,f);if(m)throw new Ve(m);return new Nt(t/255,i/255,s/255,f,!1)}function Vc(n,t){return n in t}function pl(n,t){const i=t[n];return i===void 0?null:i}function bo(n){return{type:n}}function ha(n){if(n instanceof po)return ha(n.boundExpression);if(n instanceof Xi&&n.name==="error"||n instanceof ta||n instanceof Qn||n instanceof xo||n instanceof ua)return!1;const t=n instanceof br||n instanceof pt;let i=!0;return n.eachChild(s=>{i=t?i&&ha(s):i&&s instanceof ot}),!!i&&da(n)&&pa(n,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function da(n){if(n instanceof Xi&&(n.name==="get"&&n.args.length===1||n.name==="feature-state"||n.name==="has"&&n.args.length===1||n.name==="properties"||n.name==="geometry-type"||n.name==="id"||/^filter-/.test(n.name))||n instanceof Qn||n instanceof xo)return!1;let t=!0;return n.eachChild(i=>{t&&!da(i)&&(t=!1)}),t}function fs(n){if(n instanceof Xi&&n.name==="feature-state")return!1;let t=!0;return n.eachChild(i=>{t&&!fs(i)&&(t=!1)}),t}function pa(n,t){if(n instanceof Xi&&t.indexOf(n.name)>=0)return!1;let i=!0;return n.eachChild(s=>{i&&!pa(s,t)&&(i=!1)}),i}function fa(n){return{result:"success",value:n}}function zo(n){return{result:"error",value:n}}function Bo(n){return n["property-type"]==="data-driven"||n["property-type"]==="cross-faded-data-driven"}function Oc(n){return!!n.expression&&n.expression.parameters.indexOf("zoom")>-1}function ma(n){return!!n.expression&&n.expression.interpolated}function $t(n){return n instanceof Number?"number":n instanceof String?"string":n instanceof Boolean?"boolean":Array.isArray(n)?"array":n===null?"null":typeof n}function ga(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)&&ft(n)===yi}function ya(n){return n}function fl(n,t){const i=n.stops&&typeof n.stops[0][0]=="object",s=i||!(i||n.property!==void 0),c=n.type||(ma(t)?"exponential":"interval"),f=function(R){switch(R.type){case"color":return Nt.parse;case"padding":return de.parse;case"numberArray":return ve.parse;case"colorArray":return Ee.parse;default:return null}}(t);if(f&&((n=cr({},n)).stops&&(n.stops=n.stops.map(R=>[R[0],f(R[1])])),n.default=f(n.default?n.default:t.default)),n.colorSpace&&(m=n.colorSpace)!=="rgb"&&m!=="hcl"&&m!=="lab")throw new Error(`Unknown color space: "${n.colorSpace}"`);var m;const v=function(R){switch(R){case"exponential":return Fc;case"interval":return zh;case"categorical":return Dh;case"identity":return Bh;default:throw new Error(`Unknown function type "${R}"`)}}(c);let S,E;if(c==="categorical"){S=Object.create(null);for(const R of n.stops)S[R[0]]=R[1];E=typeof n.stops[0][0]}if(i){const R={},V=[];for(let W=0;W<n.stops.length;W++){const X=n.stops[W],re=X[0].zoom;R[re]===void 0&&(R[re]={zoom:re,type:n.type,property:n.property,default:n.default,stops:[]},V.push(re)),R[re].stops.push([X[0].value,X[1]])}const q=[];for(const W of V)q.push([R[W].zoom,fl(R[W],t)]);const H={name:"linear"};return{kind:"composite",interpolationType:H,interpolationFactor:Si.interpolationFactor.bind(void 0,H),zoomStops:q.map(W=>W[0]),evaluate:({zoom:W},X)=>Fc({stops:q,base:n.base},t,W).evaluate(W,X)}}if(s){const R=c==="exponential"?{name:"exponential",base:n.base!==void 0?n.base:1}:null;return{kind:"camera",interpolationType:R,interpolationFactor:Si.interpolationFactor.bind(void 0,R),zoomStops:n.stops.map(V=>V[0]),evaluate:({zoom:V})=>v(n,t,V,S,E)}}return{kind:"source",evaluate(R,V){const q=V&&V.properties?V.properties[n.property]:void 0;return q===void 0?ms(n.default,t.default):v(n,t,q,S,E)}}}function ms(n,t,i){return n!==void 0?n:t!==void 0?t:i!==void 0?i:void 0}function Dh(n,t,i,s,c){return ms(typeof i===c?s[i]:void 0,n.default,t.default)}function zh(n,t,i){if($t(i)!=="number")return ms(n.default,t.default);const s=n.stops.length;if(s===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[s-1][0])return n.stops[s-1][1];const c=ls(n.stops.map(f=>f[0]),i);return n.stops[c][1]}function Fc(n,t,i){const s=n.base!==void 0?n.base:1;if($t(i)!=="number")return ms(n.default,t.default);const c=n.stops.length;if(c===1||i<=n.stops[0][0])return n.stops[0][1];if(i>=n.stops[c-1][0])return n.stops[c-1][1];const f=ls(n.stops.map(R=>R[0]),i),m=function(R,V,q,H){const W=H-q,X=R-q;return W===0?0:V===1?X/W:(Math.pow(V,X)-1)/(Math.pow(V,W)-1)}(i,s,n.stops[f][0],n.stops[f+1][0]),v=n.stops[f][1],S=n.stops[f+1][1],E=xn[t.type]||ya;return typeof v.evaluate=="function"?{evaluate(...R){const V=v.evaluate.apply(void 0,R),q=S.evaluate.apply(void 0,R);if(V!==void 0&&q!==void 0)return E(V,q,m,n.colorSpace)}}:E(v,S,m,n.colorSpace)}function Bh(n,t,i){switch(t.type){case"color":i=Nt.parse(i);break;case"formatted":i=ue.fromString(i.toString());break;case"resolvedImage":i=nt.fromString(i.toString());break;case"padding":i=de.parse(i);break;case"colorArray":i=Ee.parse(i);break;case"numberArray":i=ve.parse(i);break;default:$t(i)===t.type||t.type==="enum"&&t.values[i]||(i=void 0)}return ms(i,n.default,t.default)}Xi.register(Do,{error:[{kind:"error"},[Rt],(n,[t])=>{throw new Ve(t.evaluate(n))}],typeof:[Rt,[Gt],(n,[t])=>yr(ft(t.evaluate(n)))],"to-rgba":[_i(Xe,4),[Ar],(n,[t])=>{const[i,s,c,f]=t.evaluate(n).rgb;return[255*i,255*s,255*c,f]}],rgb:[Ar,[Xe,Xe,Xe],Bc],rgba:[Ar,[Xe,Xe,Xe,Xe],Bc],has:{type:Zt,overloads:[[[Rt],(n,[t])=>Vc(t.evaluate(n),n.properties())],[[Rt,yi],(n,[t,i])=>Vc(t.evaluate(n),i.evaluate(n))]]},get:{type:Gt,overloads:[[[Rt],(n,[t])=>pl(t.evaluate(n),n.properties())],[[Rt,yi],(n,[t,i])=>pl(t.evaluate(n),i.evaluate(n))]]},"feature-state":[Gt,[Rt],(n,[t])=>pl(t.evaluate(n),n.featureState||{})],properties:[yi,[],n=>n.properties()],"geometry-type":[Rt,[],n=>n.geometryType()],id:[Gt,[],n=>n.id()],zoom:[Xe,[],n=>n.globals.zoom],"heatmap-density":[Xe,[],n=>n.globals.heatmapDensity||0],"line-progress":[Xe,[],n=>n.globals.lineProgress||0],accumulated:[Gt,[],n=>n.globals.accumulated===void 0?null:n.globals.accumulated],"+":[Xe,bo(Xe),(n,t)=>{let i=0;for(const s of t)i+=s.evaluate(n);return i}],"*":[Xe,bo(Xe),(n,t)=>{let i=1;for(const s of t)i*=s.evaluate(n);return i}],"-":{type:Xe,overloads:[[[Xe,Xe],(n,[t,i])=>t.evaluate(n)-i.evaluate(n)],[[Xe],(n,[t])=>-t.evaluate(n)]]},"/":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)/i.evaluate(n)],"%":[Xe,[Xe,Xe],(n,[t,i])=>t.evaluate(n)%i.evaluate(n)],ln2:[Xe,[],()=>Math.LN2],pi:[Xe,[],()=>Math.PI],e:[Xe,[],()=>Math.E],"^":[Xe,[Xe,Xe],(n,[t,i])=>Math.pow(t.evaluate(n),i.evaluate(n))],sqrt:[Xe,[Xe],(n,[t])=>Math.sqrt(t.evaluate(n))],log10:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN10],ln:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))],log2:[Xe,[Xe],(n,[t])=>Math.log(t.evaluate(n))/Math.LN2],sin:[Xe,[Xe],(n,[t])=>Math.sin(t.evaluate(n))],cos:[Xe,[Xe],(n,[t])=>Math.cos(t.evaluate(n))],tan:[Xe,[Xe],(n,[t])=>Math.tan(t.evaluate(n))],asin:[Xe,[Xe],(n,[t])=>Math.asin(t.evaluate(n))],acos:[Xe,[Xe],(n,[t])=>Math.acos(t.evaluate(n))],atan:[Xe,[Xe],(n,[t])=>Math.atan(t.evaluate(n))],min:[Xe,bo(Xe),(n,t)=>Math.min(...t.map(i=>i.evaluate(n)))],max:[Xe,bo(Xe),(n,t)=>Math.max(...t.map(i=>i.evaluate(n)))],abs:[Xe,[Xe],(n,[t])=>Math.abs(t.evaluate(n))],round:[Xe,[Xe],(n,[t])=>{const i=t.evaluate(n);return i<0?-Math.round(-i):Math.round(i)}],floor:[Xe,[Xe],(n,[t])=>Math.floor(t.evaluate(n))],ceil:[Xe,[Xe],(n,[t])=>Math.ceil(t.evaluate(n))],"filter-==":[Zt,[Rt,Gt],(n,[t,i])=>n.properties()[t.value]===i.value],"filter-id-==":[Zt,[Gt],(n,[t])=>n.id()===t.value],"filter-type-==":[Zt,[Rt],(n,[t])=>n.geometryType()===t.value],"filter-<":[Zt,[Rt,Gt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<c}],"filter-id-<":[Zt,[Gt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<s}],"filter->":[Zt,[Rt,Gt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>c}],"filter-id->":[Zt,[Gt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>s}],"filter-<=":[Zt,[Rt,Gt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s<=c}],"filter-id-<=":[Zt,[Gt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i<=s}],"filter->=":[Zt,[Rt,Gt],(n,[t,i])=>{const s=n.properties()[t.value],c=i.value;return typeof s==typeof c&&s>=c}],"filter-id->=":[Zt,[Gt],(n,[t])=>{const i=n.id(),s=t.value;return typeof i==typeof s&&i>=s}],"filter-has":[Zt,[Gt],(n,[t])=>t.value in n.properties()],"filter-has-id":[Zt,[],n=>n.id()!==null&&n.id()!==void 0],"filter-type-in":[Zt,[_i(Rt)],(n,[t])=>t.value.indexOf(n.geometryType())>=0],"filter-id-in":[Zt,[_i(Gt)],(n,[t])=>t.value.indexOf(n.id())>=0],"filter-in-small":[Zt,[Rt,_i(Gt)],(n,[t,i])=>i.value.indexOf(n.properties()[t.value])>=0],"filter-in-large":[Zt,[Rt,_i(Gt)],(n,[t,i])=>function(s,c,f,m){for(;f<=m;){const v=f+m>>1;if(c[v]===s)return!0;c[v]>s?m=v-1:f=v+1}return!1}(n.properties()[t.value],i.value,0,i.value.length-1)],all:{type:Zt,overloads:[[[Zt,Zt],(n,[t,i])=>t.evaluate(n)&&i.evaluate(n)],[bo(Zt),(n,t)=>{for(const i of t)if(!i.evaluate(n))return!1;return!0}]]},any:{type:Zt,overloads:[[[Zt,Zt],(n,[t,i])=>t.evaluate(n)||i.evaluate(n)],[bo(Zt),(n,t)=>{for(const i of t)if(i.evaluate(n))return!0;return!1}]]},"!":[Zt,[Zt],(n,[t])=>!t.evaluate(n)],"is-supported-script":[Zt,[Rt],(n,[t])=>{const i=n.globals&&n.globals.isSupportedScript;return!i||i(t.evaluate(n))}],upcase:[Rt,[Rt],(n,[t])=>t.evaluate(n).toUpperCase()],downcase:[Rt,[Rt],(n,[t])=>t.evaluate(n).toLowerCase()],concat:[Rt,bo(Gt),(n,t)=>t.map(i=>ht(i.evaluate(n))).join("")],"resolved-locale":[Rt,[Oi],(n,[t])=>t.evaluate(n).resolvedLocale()]});class _a{constructor(t,i){this.expression=t,this._warningHistory={},this._evaluator=new Rn,this._defaultValue=i?function(s){if(s.type==="color"&&ga(s.default))return new Nt(0,0,0,0);switch(s.type){case"color":return Nt.parse(s.default)||null;case"padding":return de.parse(s.default)||null;case"numberArray":return ve.parse(s.default)||null;case"colorArray":return Ee.parse(s.default)||null;case"variableAnchorOffsetCollection":return Je.parse(s.default)||null;case"projectionDefinition":return Be.parse(s.default)||null;default:return s.default===void 0?null:s.default}}(i):null,this._enumValues=i&&i.type==="enum"?i.values:null}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=s,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m,this.expression.evaluate(this._evaluator)}evaluate(t,i,s,c,f,m){this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=s||null,this._evaluator.canonical=c,this._evaluator.availableImages=f||null,this._evaluator.formattedSection=m||null;try{const v=this.expression.evaluate(this._evaluator);if(v==null||typeof v=="number"&&v!=v)return this._defaultValue;if(this._enumValues&&!(v in this._enumValues))throw new Ve(`Expected value to be one of ${Object.keys(this._enumValues).map(S=>JSON.stringify(S)).join(", ")}, but found ${JSON.stringify(v)} instead.`);return v}catch(v){return this._warningHistory[v.message]||(this._warningHistory[v.message]=!0,typeof console<"u"&&console.warn(v.message)),this._defaultValue}}}function gs(n){return Array.isArray(n)&&n.length>0&&typeof n[0]=="string"&&n[0]in Do}function va(n,t){const i=new an(Do,ha,[],t?function(c){const f={color:Ar,string:Rt,number:Xe,enum:Rt,boolean:Zt,formatted:co,padding:yn,numberArray:Li,colorArray:Tn,projectionDefinition:mr,resolvedImage:_n,variableAnchorOffsetCollection:Er};return c.type==="array"?_i(f[c.value]||Gt,c.length):f[c.type]}(t):void 0),s=i.parse(n,void 0,void 0,void 0,t&&t.type==="string"?{typeAnnotation:"coerce"}:void 0);return s?fa(new _a(s,t)):zo(i.errors)}class ml{constructor(t,i){this.kind=t,this._styleExpression=i,this.isStateDependent=t!=="constant"&&!fs(i.expression)}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,f,m)}evaluate(t,i,s,c,f,m){return this._styleExpression.evaluate(t,i,s,c,f,m)}}class xa{constructor(t,i,s,c){this.kind=t,this.zoomStops=s,this._styleExpression=i,this.isStateDependent=t!=="camera"&&!fs(i.expression),this.interpolationType=c}evaluateWithoutErrorHandling(t,i,s,c,f,m){return this._styleExpression.evaluateWithoutErrorHandling(t,i,s,c,f,m)}evaluate(t,i,s,c,f,m){return this._styleExpression.evaluate(t,i,s,c,f,m)}interpolationFactor(t,i,s){return this.interpolationType?Si.interpolationFactor(this.interpolationType,t,i,s):0}}function gl(n,t){const i=va(n,t);if(i.result==="error")return i;const s=i.value.expression,c=da(s);if(!c&&!Bo(t))return zo([new Yt("","data expressions not supported")]);const f=pa(s,["zoom"]);if(!f&&!Oc(t))return zo([new Yt("","zoom expressions not supported")]);const m=_s(s);return m||f?m instanceof Yt?zo([m]):m instanceof Si&&!ma(t)?zo([new Yt("",'"interpolate" expressions cannot be used with this property')]):fa(m?new xa(c?"camera":"composite",i.value,m.labels,m instanceof Si?m.interpolation:void 0):new ml(c?"constant":"source",i.value)):zo([new Yt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class ys{constructor(t,i){this._parameters=t,this._specification=i,cr(this,fl(this._parameters,this._specification))}static deserialize(t){return new ys(t._parameters,t._specification)}static serialize(t){return{_parameters:t._parameters,_specification:t._specification}}}function _s(n){let t=null;if(n instanceof Dn)t=_s(n.result);else if(n instanceof go){for(const i of n.args)if(t=_s(i),t)break}else(n instanceof Xn||n instanceof Si)&&n.input instanceof Xi&&n.input.name==="zoom"&&(t=n);return t instanceof Yt||n.eachChild(i=>{const s=_s(i);s instanceof Yt?t=s:!t&&s?t=new Yt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):t&&s&&t!==s&&(t=new Yt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),t}function vs(n){if(n===!0||n===!1)return!0;if(!Array.isArray(n)||n.length===0)return!1;switch(n[0]){case"has":return n.length>=2&&n[1]!=="$id"&&n[1]!=="$type";case"in":return n.length>=3&&(typeof n[1]!="string"||Array.isArray(n[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return n.length!==3||Array.isArray(n[1])||Array.isArray(n[2]);case"any":case"all":for(const t of n.slice(1))if(!vs(t)&&typeof t!="boolean")return!1;return!0;default:return!0}}const yl={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function xs(n){if(n==null)return{filter:()=>!0,needGeometry:!1};vs(n)||(n=wa(n));const t=va(n,yl);if(t.result==="error")throw new Error(t.value.map(i=>`${i.key}: ${i.message}`).join(", "));return{filter:(i,s,c)=>t.value.evaluate(i,s,{},c),needGeometry:Nc(n)}}function ba(n,t){return n<t?-1:n>t?1:0}function Nc(n){if(!Array.isArray(n))return!1;if(n[0]==="within"||n[0]==="distance")return!0;for(let t=1;t<n.length;t++)if(Nc(n[t]))return!0;return!1}function wa(n){if(!n)return!0;const t=n[0];return n.length<=1?t!=="any":t==="=="?_l(n[1],n[2],"=="):t==="!="?Sa(_l(n[1],n[2],"==")):t==="<"||t===">"||t==="<="||t===">="?_l(n[1],n[2],t):t==="any"?(i=n.slice(1),["any"].concat(i.map(wa))):t==="all"?["all"].concat(n.slice(1).map(wa)):t==="none"?["all"].concat(n.slice(1).map(wa).map(Sa)):t==="in"?qc(n[1],n.slice(2)):t==="!in"?Sa(qc(n[1],n.slice(2))):t==="has"?Uc(n[1]):t!=="!has"||Sa(Uc(n[1]));var i}function _l(n,t,i){switch(n){case"$type":return[`filter-type-${i}`,t];case"$id":return[`filter-id-${i}`,t];default:return[`filter-${i}`,n,t]}}function qc(n,t){if(t.length===0)return!1;switch(n){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(i=>typeof i!=typeof t[0])?["filter-in-large",n,["literal",t.sort(ba)]]:["filter-in-small",n,["literal",t]]}}function Uc(n){switch(n){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",n]}}function Sa(n){return["!",n]}function Aa(n){const t=typeof n;if(t==="number"||t==="boolean"||t==="string"||n==null)return JSON.stringify(n);if(Array.isArray(n)){let c="[";for(const f of n)c+=`${Aa(f)},`;return`${c}]`}const i=Object.keys(n).sort();let s="{";for(let c=0;c<i.length;c++)s+=`${JSON.stringify(i[c])}:${Aa(n[i[c]])},`;return`${s}}`}function jc(n){let t="";for(const i of Pe)t+=`/${Aa(n[i])}`;return t}function bs(n){const t=n.value;return t?[new Ue(n.key,t,"constants have been deprecated as of v8")]:[]}function qr(n){return n instanceof Number||n instanceof String||n instanceof Boolean?n.valueOf():n}function Yn(n){if(Array.isArray(n))return n.map(Yn);if(n instanceof Object&&!(n instanceof Number||n instanceof String||n instanceof Boolean)){const t={};for(const i in n)t[i]=Yn(n[i]);return t}return qr(n)}function Ni(n){const t=n.key,i=n.value,s=n.valueSpec||{},c=n.objectElementValidators||{},f=n.style,m=n.styleSpec,v=n.validateSpec;let S=[];const E=$t(i);if(E!=="object")return[new Ue(t,i,`object expected, ${E} found`)];for(const R in i){const V=R.split(".")[0],q=Gn(s,V)||s["*"];let H;if(Gn(c,V))H=c[V];else if(Gn(s,V))H=v;else if(c["*"])H=c["*"];else{if(!s["*"]){S.push(new Ue(t,i[R],`unknown property "${R}"`));continue}H=v}S=S.concat(H({key:(t&&`${t}.`)+R,value:i[R],valueSpec:q,style:f,styleSpec:m,object:i,objectKey:R,validateSpec:v},i))}for(const R in s)c[R]||s[R].required&&s[R].default===void 0&&i[R]===void 0&&S.push(new Ue(t,i,`missing required property "${R}"`));return S}function vl(n){const t=n.value,i=n.valueSpec,s=n.style,c=n.styleSpec,f=n.key,m=n.arrayElementValidator||n.validateSpec;if($t(t)!=="array")return[new Ue(f,t,`array expected, ${$t(t)} found`)];if(i.length&&t.length!==i.length)return[new Ue(f,t,`array length ${i.length} expected, length ${t.length} found`)];if(i["min-length"]&&t.length<i["min-length"])return[new Ue(f,t,`array length at least ${i["min-length"]} expected, length ${t.length} found`)];let v={type:i.value,values:i.values};c.$version<7&&(v.function=i.function),$t(i.value)==="object"&&(v=i.value);let S=[];for(let E=0;E<t.length;E++)S=S.concat(m({array:t,arrayIndex:E,value:t[E],valueSpec:v,validateSpec:n.validateSpec,style:s,styleSpec:c,key:`${f}[${E}]`}));return S}function ws(n){const t=n.key,i=n.value,s=n.valueSpec;let c=$t(i);return c==="number"&&i!=i&&(c="NaN"),c!=="number"?[new Ue(t,i,`number expected, ${c} found`)]:"minimum"in s&&i<s.minimum?[new Ue(t,i,`${i} is less than the minimum value ${s.minimum}`)]:"maximum"in s&&i>s.maximum?[new Ue(t,i,`${i} is greater than the maximum value ${s.maximum}`)]:[]}function xl(n){const t=n.valueSpec,i=qr(n.value.type);let s,c,f,m={};const v=i!=="categorical"&&n.value.property===void 0,S=!v,E=$t(n.value.stops)==="array"&&$t(n.value.stops[0])==="array"&&$t(n.value.stops[0][0])==="object",R=Ni({key:n.key,value:n.value,valueSpec:n.styleSpec.function,validateSpec:n.validateSpec,style:n.style,styleSpec:n.styleSpec,objectElementValidators:{stops:function(H){if(i==="identity")return[new Ue(H.key,H.value,'identity function may not have a "stops" property')];let W=[];const X=H.value;return W=W.concat(vl({key:H.key,value:X,valueSpec:H.valueSpec,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,arrayElementValidator:V})),$t(X)==="array"&&X.length===0&&W.push(new Ue(H.key,X,"array must have at least one stop")),W},default:function(H){return H.validateSpec({key:H.key,value:H.value,valueSpec:t,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec})}}});return i==="identity"&&v&&R.push(new Ue(n.key,n.value,'missing required property "property"')),i==="identity"||n.value.stops||R.push(new Ue(n.key,n.value,'missing required property "stops"')),i==="exponential"&&n.valueSpec.expression&&!ma(n.valueSpec)&&R.push(new Ue(n.key,n.value,"exponential functions not supported")),n.styleSpec.$version>=8&&(S&&!Bo(n.valueSpec)?R.push(new Ue(n.key,n.value,"property functions not supported")):v&&!Oc(n.valueSpec)&&R.push(new Ue(n.key,n.value,"zoom functions not supported"))),i!=="categorical"&&!E||n.value.property!==void 0||R.push(new Ue(n.key,n.value,'"property" property is required')),R;function V(H){let W=[];const X=H.value,re=H.key;if($t(X)!=="array")return[new Ue(re,X,`array expected, ${$t(X)} found`)];if(X.length!==2)return[new Ue(re,X,`array length 2 expected, length ${X.length} found`)];if(E){if($t(X[0])!=="object")return[new Ue(re,X,`object expected, ${$t(X[0])} found`)];if(X[0].zoom===void 0)return[new Ue(re,X,"object stop key must have zoom")];if(X[0].value===void 0)return[new Ue(re,X,"object stop key must have value")];if(f&&f>qr(X[0].zoom))return[new Ue(re,X[0].zoom,"stop zoom values must appear in ascending order")];qr(X[0].zoom)!==f&&(f=qr(X[0].zoom),c=void 0,m={}),W=W.concat(Ni({key:`${re}[0]`,value:X[0],valueSpec:{zoom:{}},validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec,objectElementValidators:{zoom:ws,value:q}}))}else W=W.concat(q({key:`${re}[0]`,value:X[0],validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec},X));return gs(Yn(X[1]))?W.concat([new Ue(`${re}[1]`,X[1],"expressions are not allowed in function stops.")]):W.concat(H.validateSpec({key:`${re}[1]`,value:X[1],valueSpec:t,validateSpec:H.validateSpec,style:H.style,styleSpec:H.styleSpec}))}function q(H,W){const X=$t(H.value),re=qr(H.value),ae=H.value!==null?H.value:W;if(s){if(X!==s)return[new Ue(H.key,ae,`${X} stop domain type must match previous stop domain type ${s}`)]}else s=X;if(X!=="number"&&X!=="string"&&X!=="boolean")return[new Ue(H.key,ae,"stop domain value must be a number, string, or boolean")];if(X!=="number"&&i!=="categorical"){let Se=`number expected, ${X} found`;return Bo(t)&&i===void 0&&(Se+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(H.key,ae,Se)]}return i!=="categorical"||X!=="number"||isFinite(re)&&Math.floor(re)===re?i!=="categorical"&&X==="number"&&c!==void 0&&re<c?[new Ue(H.key,ae,"stop domain values must appear in ascending order")]:(c=re,i==="categorical"&&re in m?[new Ue(H.key,ae,"stop domain values must be unique")]:(m[re]=!0,[])):[new Ue(H.key,ae,`integer expected, found ${re}`)]}}function wn(n){const t=(n.expressionContext==="property"?gl:va)(Yn(n.value),n.valueSpec);if(t.result==="error")return t.value.map(s=>new Ue(`${n.key}${s.key}`,n.value,s.message));const i=t.value.expression||t.value._styleExpression.expression;if(n.expressionContext==="property"&&n.propertyKey==="text-font"&&!i.outputDefined())return[new Ue(n.key,n.value,`Invalid data expression for "${n.propertyKey}". Output values must be contained as literals within the expression.`)];if(n.expressionContext==="property"&&n.propertyType==="layout"&&!fs(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with layout properties.')];if(n.expressionContext==="filter"&&!fs(i))return[new Ue(n.key,n.value,'"feature-state" data expressions are not supported with filters.')];if(n.expressionContext&&n.expressionContext.indexOf("cluster")===0){if(!pa(i,["zoom","feature-state"]))return[new Ue(n.key,n.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(n.expressionContext==="cluster-initial"&&!da(i))return[new Ue(n.key,n.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function bl(n){const t=n.key,i=n.value,s=$t(i);return s!=="string"?[new Ue(t,i,`color expected, ${s} found`)]:Nt.parse(String(i))?[]:[new Ue(t,i,`color expected, "${i}" found`)]}function Ss(n){const t=n.key,i=n.value,s=n.valueSpec,c=[];return Array.isArray(s.values)?s.values.indexOf(qr(i))===-1&&c.push(new Ue(t,i,`expected one of [${s.values.join(", ")}], ${JSON.stringify(i)} found`)):Object.keys(s.values).indexOf(qr(i))===-1&&c.push(new Ue(t,i,`expected one of [${Object.keys(s.values).join(", ")}], ${JSON.stringify(i)} found`)),c}function wl(n){return vs(Yn(n.value))?wn(cr({},n,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Hc(n)}function Hc(n){const t=n.value,i=n.key;if($t(t)!=="array")return[new Ue(i,t,`array expected, ${$t(t)} found`)];const s=n.styleSpec;let c,f=[];if(t.length<1)return[new Ue(i,t,"filter array must have at least 1 element")];switch(f=f.concat(Ss({key:`${i}[0]`,value:t[0],valueSpec:s.filter_operator,style:n.style,styleSpec:n.styleSpec})),qr(t[0])){case"<":case"<=":case">":case">=":t.length>=2&&qr(t[1])==="$type"&&f.push(new Ue(i,t,`"$type" cannot be use with operator "${t[0]}"`));case"==":case"!=":t.length!==3&&f.push(new Ue(i,t,`filter array for operator "${t[0]}" must have 3 elements`));case"in":case"!in":t.length>=2&&(c=$t(t[1]),c!=="string"&&f.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`)));for(let m=2;m<t.length;m++)c=$t(t[m]),qr(t[1])==="$type"?f=f.concat(Ss({key:`${i}[${m}]`,value:t[m],valueSpec:s.geometry_type,style:n.style,styleSpec:n.styleSpec})):c!=="string"&&c!=="number"&&c!=="boolean"&&f.push(new Ue(`${i}[${m}]`,t[m],`string, number, or boolean expected, ${c} found`));break;case"any":case"all":case"none":for(let m=1;m<t.length;m++)f=f.concat(Hc({key:`${i}[${m}]`,value:t[m],style:n.style,styleSpec:n.styleSpec}));break;case"has":case"!has":c=$t(t[1]),t.length!==2?f.push(new Ue(i,t,`filter array for "${t[0]}" operator must have 2 elements`)):c!=="string"&&f.push(new Ue(`${i}[1]`,t[1],`string expected, ${c} found`))}return f}function Wc(n,t){const i=n.key,s=n.validateSpec,c=n.style,f=n.styleSpec,m=n.value,v=n.objectKey,S=f[`${t}_${n.layerType}`];if(!S)return[];const E=v.match(/^(.*)-transition$/);if(t==="paint"&&E&&S[E[1]]&&S[E[1]].transition)return s({key:i,value:m,valueSpec:f.transition,style:c,styleSpec:f});const R=n.valueSpec||S[v];if(!R)return[new Ue(i,m,`unknown property "${v}"`)];let V;if($t(m)==="string"&&Bo(R)&&!R.tokens&&(V=/^{([^}]+)}$/.exec(m)))return[new Ue(i,m,`"${v}" does not support interpolation syntax
65
+ Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(V[1])} }\`.`)];const q=[];return n.layerType==="symbol"&&(v==="text-field"&&c&&!c.glyphs&&q.push(new Ue(i,m,'use of "text-field" requires a style "glyphs" property')),v==="text-font"&&ga(Yn(m))&&qr(m.type)==="identity"&&q.push(new Ue(i,m,'"text-font" does not support identity functions'))),q.concat(s({key:n.key,value:m,valueSpec:R,style:c,styleSpec:f,expressionContext:"property",propertyType:t,propertyKey:v}))}function Zc(n){return Wc(n,"paint")}function Vo(n){return Wc(n,"layout")}function Oo(n){let t=[];const i=n.value,s=n.key,c=n.style,f=n.styleSpec;if($t(i)!=="object")return[new Ue(s,i,`object expected, ${$t(i)} found`)];i.type||i.ref||t.push(new Ue(s,i,'either "type" or "ref" is required'));let m=qr(i.type);const v=qr(i.ref);if(i.id){const S=qr(i.id);for(let E=0;E<n.arrayIndex;E++){const R=c.layers[E];qr(R.id)===S&&t.push(new Ue(s,i.id,`duplicate layer id "${i.id}", previously used at line ${R.id.__line__}`))}}if("ref"in i){let S;["type","source","source-layer","filter","layout"].forEach(E=>{E in i&&t.push(new Ue(s,i[E],`"${E}" is prohibited for ref layers`))}),c.layers.forEach(E=>{qr(E.id)===v&&(S=E)}),S?S.ref?t.push(new Ue(s,i.ref,"ref cannot reference another ref layer")):m=qr(S.type):t.push(new Ue(s,i.ref,`ref layer "${v}" not found`))}else if(m!=="background")if(i.source){const S=c.sources&&c.sources[i.source],E=S&&qr(S.type);S?E==="vector"&&m==="raster"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a raster source`)):E!=="raster-dem"&&m==="hillshade"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a raster-dem source`)):E==="raster"&&m!=="raster"?t.push(new Ue(s,i.source,`layer "${i.id}" requires a vector source`)):E!=="vector"||i["source-layer"]?E==="raster-dem"&&m!=="hillshade"?t.push(new Ue(s,i.source,"raster-dem source can only be used with layer type 'hillshade'.")):m!=="line"||!i.paint||!i.paint["line-gradient"]||E==="geojson"&&S.lineMetrics||t.push(new Ue(s,i,`layer "${i.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new Ue(s,i,`layer "${i.id}" must specify a "source-layer"`)):t.push(new Ue(s,i.source,`source "${i.source}" not found`))}else t.push(new Ue(s,i,'missing required property "source"'));return t=t.concat(Ni({key:s,value:i,valueSpec:f.layer,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,objectElementValidators:{"*":()=>[],type:()=>n.validateSpec({key:`${s}.type`,value:i.type,valueSpec:f.layer.type,style:n.style,styleSpec:n.styleSpec,validateSpec:n.validateSpec,object:i,objectKey:"type"}),filter:wl,layout:S=>Ni({layer:i,key:S.key,value:S.value,style:S.style,styleSpec:S.styleSpec,validateSpec:S.validateSpec,objectElementValidators:{"*":E=>Vo(cr({layerType:m},E))}}),paint:S=>Ni({layer:i,key:S.key,value:S.value,style:S.style,styleSpec:S.styleSpec,validateSpec:S.validateSpec,objectElementValidators:{"*":E=>Zc(cr({layerType:m},E))}})}})),t}function Xr(n){const t=n.value,i=n.key,s=$t(t);return s!=="string"?[new Ue(i,t,`string expected, ${s} found`)]:[]}const Fo={promoteId:function({key:n,value:t}){if($t(t)==="string")return Xr({key:n,value:t});{const i=[];for(const s in t)i.push(...Xr({key:`${n}.${s}`,value:t[s]}));return i}}};function Sl(n){const t=n.value,i=n.key,s=n.styleSpec,c=n.style,f=n.validateSpec;if(!t.type)return[new Ue(i,t,'"type" is required')];const m=qr(t.type);let v;switch(m){case"vector":case"raster":return v=Ni({key:i,value:t,valueSpec:s[`source_${m.replace("-","_")}`],style:n.style,styleSpec:s,objectElementValidators:Fo,validateSpec:f}),v;case"raster-dem":return v=function(S){var E;const R=(E=S.sourceName)!==null&&E!==void 0?E:"",V=S.value,q=S.styleSpec,H=q.source_raster_dem,W=S.style;let X=[];const re=$t(V);if(V===void 0)return X;if(re!=="object")return X.push(new Ue("source_raster_dem",V,`object expected, ${re} found`)),X;const ae=qr(V.encoding)==="custom",Se=["redFactor","greenFactor","blueFactor","baseShift"],fe=S.value.encoding?`"${S.value.encoding}"`:"Default";for(const j in V)!ae&&Se.includes(j)?X.push(new Ue(j,V[j],`In "${R}": "${j}" is only valid when "encoding" is set to "custom". ${fe} encoding found`)):H[j]?X=X.concat(S.validateSpec({key:j,value:V[j],valueSpec:H[j],validateSpec:S.validateSpec,style:W,styleSpec:q})):X.push(new Ue(j,V[j],`unknown property "${j}"`));return X}({sourceName:i,value:t,style:n.style,styleSpec:s,validateSpec:f}),v;case"geojson":if(v=Ni({key:i,value:t,valueSpec:s.source_geojson,style:c,styleSpec:s,validateSpec:f,objectElementValidators:Fo}),t.cluster)for(const S in t.clusterProperties){const[E,R]=t.clusterProperties[S],V=typeof E=="string"?[E,["accumulated"],["get",S]]:E;v.push(...wn({key:`${i}.${S}.map`,value:R,expressionContext:"cluster-map"})),v.push(...wn({key:`${i}.${S}.reduce`,value:V,expressionContext:"cluster-reduce"}))}return v;case"video":return Ni({key:i,value:t,valueSpec:s.source_video,style:c,validateSpec:f,styleSpec:s});case"image":return Ni({key:i,value:t,valueSpec:s.source_image,style:c,validateSpec:f,styleSpec:s});case"canvas":return[new Ue(i,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ss({key:`${i}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Kc(n){const t=n.value,i=n.styleSpec,s=i.light,c=n.style;let f=[];const m=$t(t);if(t===void 0)return f;if(m!=="object")return f=f.concat([new Ue("light",t,`object expected, ${m} found`)]),f;for(const v in t){const S=v.match(/^(.*)-transition$/);f=f.concat(S&&s[S[1]]&&s[S[1]].transition?n.validateSpec({key:v,value:t[v],valueSpec:i.transition,validateSpec:n.validateSpec,style:c,styleSpec:i}):s[v]?n.validateSpec({key:v,value:t[v],valueSpec:s[v],validateSpec:n.validateSpec,style:c,styleSpec:i}):[new Ue(v,t[v],`unknown property "${v}"`)])}return f}function Gc(n){const t=n.value,i=n.styleSpec,s=i.sky,c=n.style,f=$t(t);if(t===void 0)return[];if(f!=="object")return[new Ue("sky",t,`object expected, ${f} found`)];let m=[];for(const v in t)m=m.concat(s[v]?n.validateSpec({key:v,value:t[v],valueSpec:s[v],style:c,styleSpec:i}):[new Ue(v,t[v],`unknown property "${v}"`)]);return m}function No(n){const t=n.value,i=n.styleSpec,s=i.terrain,c=n.style;let f=[];const m=$t(t);if(t===void 0)return f;if(m!=="object")return f=f.concat([new Ue("terrain",t,`object expected, ${m} found`)]),f;for(const v in t)f=f.concat(s[v]?n.validateSpec({key:v,value:t[v],valueSpec:s[v],validateSpec:n.validateSpec,style:c,styleSpec:i}):[new Ue(v,t[v],`unknown property "${v}"`)]);return f}function Al(n){let t=[];const i=n.value,s=n.key;if(Array.isArray(i)){const c=[],f=[];for(const m in i)i[m].id&&c.includes(i[m].id)&&t.push(new Ue(s,i,`all the sprites' ids must be unique, but ${i[m].id} is duplicated`)),c.push(i[m].id),i[m].url&&f.includes(i[m].url)&&t.push(new Ue(s,i,`all the sprites' URLs must be unique, but ${i[m].url} is duplicated`)),f.push(i[m].url),t=t.concat(Ni({key:`${s}[${m}]`,value:i[m],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:n.validateSpec}));return t}return Xr({key:s,value:i})}function ka(n){return t=n.value,t&&t.constructor===Object?[]:[new Ue(n.key,n.value,`object expected, ${$t(n.value)} found`)];var t}const Jc={"*":()=>[],array:vl,boolean:function(n){const t=n.value,i=n.key,s=$t(t);return s!=="boolean"?[new Ue(i,t,`boolean expected, ${s} found`)]:[]},number:ws,color:bl,constants:bs,enum:Ss,filter:wl,function:xl,layer:Oo,object:Ni,source:Sl,light:Kc,sky:Gc,terrain:No,projection:function(n){const t=n.value,i=n.styleSpec,s=i.projection,c=n.style,f=$t(t);if(t===void 0)return[];if(f!=="object")return[new Ue("projection",t,`object expected, ${f} found`)];let m=[];for(const v in t)m=m.concat(s[v]?n.validateSpec({key:v,value:t[v],valueSpec:s[v],style:c,styleSpec:i}):[new Ue(v,t[v],`unknown property "${v}"`)]);return m},projectionDefinition:function(n){const t=n.key;let i=n.value;i=i instanceof String?i.valueOf():i;const s=$t(i);return s!=="array"||function(c){return Array.isArray(c)&&c.length===3&&typeof c[0]=="string"&&typeof c[1]=="string"&&typeof c[2]=="number"}(i)||function(c){return!!["interpolate","step","literal"].includes(c[0])}(i)?["array","string"].includes(s)?[]:[new Ue(t,i,`projection expected, invalid type "${s}" found`)]:[new Ue(t,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:Xr,formatted:function(n){return Xr(n).length===0?[]:wn(n)},resolvedImage:function(n){return Xr(n).length===0?[]:wn(n)},padding:function(n){const t=n.key,i=n.value;if($t(i)==="array"){if(i.length<1||i.length>4)return[new Ue(t,i,`padding requires 1 to 4 values; ${i.length} values found`)];const s={type:"number"};let c=[];for(let f=0;f<i.length;f++)c=c.concat(n.validateSpec({key:`${t}[${f}]`,value:i[f],validateSpec:n.validateSpec,valueSpec:s}));return c}return ws({key:t,value:i,valueSpec:{}})},numberArray:function(n){const t=n.key,i=n.value;if($t(i)==="array"){const s={type:"number"};if(i.length<1)return[new Ue(t,i,"array length at least 1 expected, length 0 found")];let c=[];for(let f=0;f<i.length;f++)c=c.concat(n.validateSpec({key:`${t}[${f}]`,value:i[f],validateSpec:n.validateSpec,valueSpec:s}));return c}return ws({key:t,value:i,valueSpec:{}})},colorArray:function(n){const t=n.key,i=n.value;if($t(i)==="array"){if(i.length<1)return[new Ue(t,i,"array length at least 1 expected, length 0 found")];let s=[];for(let c=0;c<i.length;c++)s=s.concat(bl({key:`${t}[${c}]`,value:i[c]}));return s}return bl({key:t,value:i})},variableAnchorOffsetCollection:function(n){const t=n.key,i=n.value,s=$t(i),c=n.styleSpec;if(s!=="array"||i.length<1||i.length%2!=0)return[new Ue(t,i,"variableAnchorOffsetCollection requires a non-empty array of even length")];let f=[];for(let m=0;m<i.length;m+=2)f=f.concat(Ss({key:`${t}[${m}]`,value:i[m],valueSpec:c.layout_symbol["text-anchor"]})),f=f.concat(vl({key:`${t}[${m+1}]`,value:i[m+1],valueSpec:{length:2,value:"number"},validateSpec:n.validateSpec,style:n.style,styleSpec:c}));return f},sprite:Al,state:ka};function qo(n){const t=n.value,i=n.valueSpec,s=n.styleSpec;return n.validateSpec=qo,i.expression&&ga(qr(t))?xl(n):i.expression&&gs(Yn(t))?wn(n):i.type&&Jc[i.type]?Jc[i.type](n):Ni(cr({},n,{valueSpec:i.type?s[i.type]:i}))}function Xc(n){const t=n.value,i=n.key,s=Xr(n);return s.length||(t.indexOf("{fontstack}")===-1&&s.push(new Ue(i,t,'"glyphs" url must include a "{fontstack}" token')),t.indexOf("{range}")===-1&&s.push(new Ue(i,t,'"glyphs" url must include a "{range}" token'))),s}function Ai(n,t=Y){let i=[];return i=i.concat(qo({key:"",value:n,valueSpec:t.$root,styleSpec:t,style:n,validateSpec:qo,objectElementValidators:{glyphs:Xc,"*":()=>[]}})),n.constants&&(i=i.concat(bs({key:"constants",value:n.constants}))),Uo(i)}function ln(n){return function(t){return n({...t,validateSpec:qo})}}function Uo(n){return[].concat(n).sort((t,i)=>t.line-i.line)}function cn(n){return function(...t){return Uo(n.apply(this,t))}}Ai.source=cn(ln(Sl)),Ai.sprite=cn(ln(Al)),Ai.glyphs=cn(ln(Xc)),Ai.light=cn(ln(Kc)),Ai.sky=cn(ln(Gc)),Ai.terrain=cn(ln(No)),Ai.state=cn(ln(ka)),Ai.layer=cn(ln(Oo)),Ai.filter=cn(ln(wl)),Ai.paintProperty=cn(ln(Zc)),Ai.layoutProperty=cn(ln(Vo));const jo=Ai,Ca=jo.light,Vh=jo.sky,kl=jo.paintProperty,Ta=jo.layoutProperty;function Cl(n,t){let i=!1;if(t&&t.length)for(const s of t)n.fire(new he(new Error(s.message))),i=!0;return i}class Ho{constructor(t,i,s){const c=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;const m=new Int32Array(this.arrayBuffer);t=m[0],this.d=(i=m[1])+2*(s=m[2]);for(let S=0;S<this.d*this.d;S++){const E=m[3+S],R=m[3+S+1];c.push(E===R?null:m.subarray(E,R))}const v=m[3+c.length+1];this.keys=m.subarray(m[3+c.length],v),this.bboxes=m.subarray(v),this.insert=this._insertReadonly}else{this.d=i+2*s;for(let m=0;m<this.d*this.d;m++)c.push([]);this.keys=[],this.bboxes=[]}this.n=i,this.extent=t,this.padding=s,this.scale=i/t,this.uid=0;const f=s/i*t;this.min=-f,this.max=t+f}insert(t,i,s,c,f){this._forEachCell(i,s,c,f,this._insertCell,this.uid++,void 0,void 0),this.keys.push(t),this.bboxes.push(i),this.bboxes.push(s),this.bboxes.push(c),this.bboxes.push(f)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(t,i,s,c,f,m){this.cells[f].push(m)}query(t,i,s,c,f){const m=this.min,v=this.max;if(t<=m&&i<=m&&v<=s&&v<=c&&!f)return Array.prototype.slice.call(this.keys);{const S=[];return this._forEachCell(t,i,s,c,this._queryCell,S,{},f),S}}_queryCell(t,i,s,c,f,m,v,S){const E=this.cells[f];if(E!==null){const R=this.keys,V=this.bboxes;for(let q=0;q<E.length;q++){const H=E[q];if(v[H]===void 0){const W=4*H;(S?S(V[W+0],V[W+1],V[W+2],V[W+3]):t<=V[W+2]&&i<=V[W+3]&&s>=V[W+0]&&c>=V[W+1])?(v[H]=!0,m.push(R[H])):v[H]=!1}}}}_forEachCell(t,i,s,c,f,m,v,S){const E=this._convertToCellCoord(t),R=this._convertToCellCoord(i),V=this._convertToCellCoord(s),q=this._convertToCellCoord(c);for(let H=E;H<=V;H++)for(let W=R;W<=q;W++){const X=this.d*W+H;if((!S||S(this._convertFromCellCoord(H),this._convertFromCellCoord(W),this._convertFromCellCoord(H+1),this._convertFromCellCoord(W+1)))&&f.call(this,t,i,s,c,X,m,v,S))return}}_convertFromCellCoord(t){return(t-this.padding)/this.scale}_convertToCellCoord(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const t=this.cells,i=3+this.cells.length+1+1;let s=0;for(let m=0;m<this.cells.length;m++)s+=this.cells[m].length;const c=new Int32Array(i+s+this.keys.length+this.bboxes.length);c[0]=this.extent,c[1]=this.n,c[2]=this.padding;let f=i;for(let m=0;m<t.length;m++){const v=t[m];c[3+m]=f,c.set(v,f),f+=v.length}return c[3+t.length]=f,c.set(this.keys,f),f+=this.keys.length,c[3+t.length+1]=f,c.set(this.bboxes,f),f+=this.bboxes.length,c.buffer}static serialize(t,i){const s=t.toArrayBuffer();return i&&i.push(s),{buffer:s}}static deserialize(t){return new Ho(t.buffer)}}const Sn={};function bt(n,t,i={}){if(Sn[n])throw new Error(`${n} is already registered.`);Object.defineProperty(t,"_classRegistryKey",{value:n,writeable:!1}),Sn[n]={klass:t,omit:i.omit||[],shallow:i.shallow||[]}}bt("Object",Object),bt("TransferableGridIndex",Ho),bt("Color",Nt),bt("Error",Error),bt("AJAXError",Pt),bt("ResolvedImage",nt),bt("StylePropertyFunction",ys),bt("StyleExpression",_a,{omit:["_evaluator"]}),bt("ZoomDependentExpression",xa),bt("ZoomConstantExpression",ml),bt("CompoundExpression",Xi,{omit:["_evaluate"]});for(const n in Do)Do[n]._classRegistryKey||bt(`Expression_${n}`,Do[n]);function Ea(n){return n&&typeof ArrayBuffer<"u"&&(n instanceof ArrayBuffer||n.constructor&&n.constructor.name==="ArrayBuffer")}function Pa(n){return n.$name||n.constructor._classRegistryKey}function Qc(n){return!function(t){if(t===null||typeof t!="object")return!1;const i=Pa(t);return!(!i||i==="Object")}(n)&&(n==null||typeof n=="boolean"||typeof n=="number"||typeof n=="string"||n instanceof Boolean||n instanceof Number||n instanceof String||n instanceof Date||n instanceof RegExp||n instanceof Blob||n instanceof Error||Ea(n)||Mt(n)||ArrayBuffer.isView(n)||n instanceof ImageData)}function Wo(n,t){if(Qc(n))return(Ea(n)||Mt(n))&&t&&t.push(n),ArrayBuffer.isView(n)&&t&&t.push(n.buffer),n instanceof ImageData&&t&&t.push(n.data.buffer),n;if(Array.isArray(n)){const f=[];for(const m of n)f.push(Wo(m,t));return f}if(typeof n!="object")throw new Error("can't serialize object of type "+typeof n);const i=Pa(n);if(!i)throw new Error(`can't serialize object of unregistered class ${n.constructor.name}`);if(!Sn[i])throw new Error(`${i} is not registered.`);const{klass:s}=Sn[i],c=s.serialize?s.serialize(n,t):{};if(s.serialize){if(t&&c===t[t.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const f in n){if(!n.hasOwnProperty(f)||Sn[i].omit.indexOf(f)>=0)continue;const m=n[f];c[f]=Sn[i].shallow.indexOf(f)>=0?m:Wo(m,t)}n instanceof Error&&(c.message=n.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return i!=="Object"&&(c.$name=i),c}function As(n){if(Qc(n))return n;if(Array.isArray(n))return n.map(As);if(typeof n!="object")throw new Error("can't deserialize object of type "+typeof n);const t=Pa(n)||"Object";if(!Sn[t])throw new Error(`can't deserialize unregistered class ${t}`);const{klass:i}=Sn[t];if(!i)throw new Error(`can't deserialize unregistered class ${t}`);if(i.deserialize)return i.deserialize(n);const s=Object.create(i.prototype);for(const c of Object.keys(n)){if(c==="$name")continue;const f=n[c];s[c]=Sn[t].shallow.indexOf(c)>=0?f:As(f)}return s}class Tl{constructor(){this.first=!0}update(t,i){const s=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=s,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=s,!0):(this.lastFloorZoom>s?(this.lastIntegerZoom=s+1,this.lastIntegerZoomTime=i):this.lastFloorZoom<s&&(this.lastIntegerZoom=s,this.lastIntegerZoomTime=i),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=s,!0))}}const er={"Latin-1 Supplement":n=>n>=128&&n<=255,"Hangul Jamo":n=>n>=4352&&n<=4607,Khmer:n=>n>=6016&&n<=6143,"General Punctuation":n=>n>=8192&&n<=8303,"Letterlike Symbols":n=>n>=8448&&n<=8527,"Number Forms":n=>n>=8528&&n<=8591,"Miscellaneous Technical":n=>n>=8960&&n<=9215,"Control Pictures":n=>n>=9216&&n<=9279,"Optical Character Recognition":n=>n>=9280&&n<=9311,"Enclosed Alphanumerics":n=>n>=9312&&n<=9471,"Geometric Shapes":n=>n>=9632&&n<=9727,"Miscellaneous Symbols":n=>n>=9728&&n<=9983,"Miscellaneous Symbols and Arrows":n=>n>=11008&&n<=11263,"Ideographic Description Characters":n=>n>=12272&&n<=12287,"CJK Symbols and Punctuation":n=>n>=12288&&n<=12351,Hiragana:n=>n>=12352&&n<=12447,Katakana:n=>n>=12448&&n<=12543,Kanbun:n=>n>=12688&&n<=12703,"CJK Strokes":n=>n>=12736&&n<=12783,"Enclosed CJK Letters and Months":n=>n>=12800&&n<=13055,"CJK Compatibility":n=>n>=13056&&n<=13311,"Yijing Hexagram Symbols":n=>n>=19904&&n<=19967,"CJK Unified Ideographs":n=>n>=19968&&n<=40959,"Hangul Syllables":n=>n>=44032&&n<=55215,"Private Use Area":n=>n>=57344&&n<=63743,"Vertical Forms":n=>n>=65040&&n<=65055,"CJK Compatibility Forms":n=>n>=65072&&n<=65103,"Small Form Variants":n=>n>=65104&&n<=65135,"Halfwidth and Fullwidth Forms":n=>n>=65280&&n<=65519};function Ia(n){for(const t of n)if(Ma(t.charCodeAt(0)))return!0;return!1}function Oh(n){for(const t of n)if(!$c(t.charCodeAt(0)))return!1;return!0}function El(n){const t=n.map(i=>{try{return new RegExp(`\\p{sc=${i}}`,"u").source}catch{return null}}).filter(i=>i);return new RegExp(t.join("|"),"u")}const Yc=El(["Arab","Dupl","Mong","Ougr","Syrc"]);function $c(n){return!Yc.test(String.fromCodePoint(n))}const Pl=El(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Ma(n){return!(n!==746&&n!==747&&(n<4352||!(er["CJK Compatibility Forms"](n)&&!(n>=65097&&n<=65103)||er["CJK Compatibility"](n)||er["CJK Strokes"](n)||!(!er["CJK Symbols and Punctuation"](n)||n>=12296&&n<=12305||n>=12308&&n<=12319||n===12336)||er["Enclosed CJK Letters and Months"](n)||er["Ideographic Description Characters"](n)||er.Kanbun(n)||er.Katakana(n)&&n!==12540||!(!er["Halfwidth and Fullwidth Forms"](n)||n===65288||n===65289||n===65293||n>=65306&&n<=65310||n===65339||n===65341||n===65343||n>=65371&&n<=65503||n===65507||n>=65512&&n<=65519)||!(!er["Small Form Variants"](n)||n>=65112&&n<=65118||n>=65123&&n<=65126)||er["Vertical Forms"](n)||er["Yijing Hexagram Symbols"](n)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(n))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(n))||Pl.test(String.fromCodePoint(n)))))}function ks(n){return!(Ma(n)||function(t){return!!(er["Latin-1 Supplement"](t)&&(t===167||t===169||t===174||t===177||t===188||t===189||t===190||t===215||t===247)||er["General Punctuation"](t)&&(t===8214||t===8224||t===8225||t===8240||t===8241||t===8251||t===8252||t===8258||t===8263||t===8264||t===8265||t===8273)||er["Letterlike Symbols"](t)||er["Number Forms"](t)||er["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||t===9003||t>=9085&&t<=9114||t>=9150&&t<=9165||t===9167||t>=9169&&t<=9179||t>=9186&&t<=9215)||er["Control Pictures"](t)&&t!==9251||er["Optical Character Recognition"](t)||er["Enclosed Alphanumerics"](t)||er["Geometric Shapes"](t)||er["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||er["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||er["CJK Symbols and Punctuation"](t)||er.Katakana(t)||er["Private Use Area"](t)||er["CJK Compatibility Forms"](t)||er["Small Form Variants"](t)||er["Halfwidth and Fullwidth Forms"](t)||t===8734||t===8756||t===8757||t>=9984&&t<=10087||t>=10102&&t<=10131||t===65532||t===65533)}(n))}const Fh=El(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function La(n){return Fh.test(String.fromCodePoint(n))}function Nh(n,t){return!(!t&&La(n)||n>=2304&&n<=3583||n>=3840&&n<=4255||er.Khmer(n))}function qh(n){for(const t of n)if(La(t.charCodeAt(0)))return!0;return!1}const Bn=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(n){this.pluginStatus=n.pluginStatus,this.pluginURL=n.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(n){if(Bn.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=n.applyArabicShaping,this.processBidirectionalText=n.processBidirectionalText,this.processStyledBidirectionalText=n.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(n,t){return o(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(n.pluginStatus!=="loading")return this.setState(n),n;const i=n.pluginURL,s=new Promise(f=>{this.loadScriptResolve=f});t(i);const c=new Promise(f=>setTimeout(()=>f(),this.TIMEOUT));if(yield Promise.race([s,c]),this.isParsed()){const f={pluginStatus:"loaded",pluginURL:i};return this.setState(f),f}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${i}`)})}};class kr{constructor(t,i){this.zoom=t,i?(this.now=i.now,this.fadeDuration=i.fadeDuration,this.zoomHistory=i.zoomHistory,this.transition=i.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Tl,this.transition={})}isSupportedScript(t){return function(i,s){for(const c of i)if(!Nh(c.charCodeAt(0),s))return!1;return!0}(t,Bn.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const t=this.zoom,i=t-Math.floor(t),s=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:i+(1-i)*s}:{fromScale:.5,toScale:1,t:1-(1-s)*i}}}class Cs{constructor(t,i){this.property=t,this.value=i,this.expression=function(s,c){if(ga(s))return new ys(s,c);if(gs(s)){const f=gl(s,c);if(f.result==="error")throw new Error(f.value.map(m=>`${m.key}: ${m.message}`).join(", "));return f.value}{let f=s;return c.type==="color"&&typeof s=="string"?f=Nt.parse(s):c.type!=="padding"||typeof s!="number"&&!Array.isArray(s)?c.type!=="numberArray"||typeof s!="number"&&!Array.isArray(s)?c.type!=="colorArray"||typeof s!="string"&&!Array.isArray(s)?c.type==="variableAnchorOffsetCollection"&&Array.isArray(s)?f=Je.parse(s):c.type==="projectionDefinition"&&typeof s=="string"&&(f=Be.parse(s)):f=Ee.parse(s):f=ve.parse(s):f=de.parse(s),{kind:"constant",evaluate:()=>f}}}(i===void 0?t.specification.default:i,t.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(t,i,s){return this.property.possiblyEvaluate(this,t,i,s)}}class Il{constructor(t){this.property=t,this.value=new Cs(t,void 0)}transitioned(t,i){return new tu(this.property,this.value,i,ri({},t.transition,this.transition),t.now)}untransitioned(){return new tu(this.property,this.value,null,{},0)}}class eu{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)}getValue(t){return Gr(this._values[t].value.value)}setValue(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Il(this._values[t].property)),this._values[t].value=new Cs(this._values[t].property,i===null?void 0:Gr(i))}getTransition(t){return Gr(this._values[t].transition)}setTransition(t,i){Object.prototype.hasOwnProperty.call(this._values,t)||(this._values[t]=new Il(this._values[t].property)),this._values[t].transition=Gr(i)||void 0}serialize(){const t={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(t[i]=s);const c=this.getTransition(i);c!==void 0&&(t[`${i}-transition`]=c)}return t}transitioned(t,i){const s=new ru(this._properties);for(const c of Object.keys(this._values))s._values[c]=this._values[c].transitioned(t,i._values[c]);return s}untransitioned(){const t=new ru(this._properties);for(const i of Object.keys(this._values))t._values[i]=this._values[i].untransitioned();return t}}class tu{constructor(t,i,s,c,f){this.property=t,this.value=i,this.begin=f+c.delay||0,this.end=this.begin+c.duration||0,t.specification.transition&&(c.delay||c.duration)&&(this.prior=s)}possiblyEvaluate(t,i,s){const c=t.now||0,f=this.value.possiblyEvaluate(t,i,s),m=this.prior;if(m){if(c>this.end)return this.prior=null,f;if(this.value.isDataDriven())return this.prior=null,f;if(c<this.begin)return m.possiblyEvaluate(t,i,s);{const v=(c-this.begin)/(this.end-this.begin);return this.property.interpolate(m.possiblyEvaluate(t,i,s),f,fr(v))}}return f}}class ru{constructor(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)}possiblyEvaluate(t,i,s){const c=new Ra(this._properties);for(const f of Object.keys(this._values))c._values[f]=this._values[f].possiblyEvaluate(t,i,s);return c}hasTransition(){for(const t of Object.keys(this._values))if(this._values[t].prior)return!0;return!1}}class Uh{constructor(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)}hasValue(t){return this._values[t].value!==void 0}getValue(t){return Gr(this._values[t].value)}setValue(t,i){this._values[t]=new Cs(this._values[t].property,i===null?void 0:Gr(i))}serialize(){const t={};for(const i of Object.keys(this._values)){const s=this.getValue(i);s!==void 0&&(t[i]=s)}return t}possiblyEvaluate(t,i,s){const c=new Ra(this._properties);for(const f of Object.keys(this._values))c._values[f]=this._values[f].possiblyEvaluate(t,i,s);return c}}class Ei{constructor(t,i,s){this.property=t,this.value=i,this.parameters=s}isConstant(){return this.value.kind==="constant"}constantOr(t){return this.value.kind==="constant"?this.value.value:t}evaluate(t,i,s,c){return this.property.evaluate(this.value,this.parameters,t,i,s,c)}}class Ra{constructor(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)}get(t){return this._values[t]}}class Tt{constructor(t){this.specification=t}possiblyEvaluate(t,i){if(t.isDataDriven())throw new Error("Value should not be data driven");return t.expression.evaluate(i)}interpolate(t,i,s){const c=xn[this.specification.type];return c?c(t,i,s):t}}class Ft{constructor(t,i){this.specification=t,this.overrides=i}possiblyEvaluate(t,i,s,c){return new Ei(this,t.expression.kind==="constant"||t.expression.kind==="camera"?{kind:"constant",value:t.expression.evaluate(i,null,{},s,c)}:t.expression,i)}interpolate(t,i,s){if(t.value.kind!=="constant"||i.value.kind!=="constant")return t;if(t.value.value===void 0||i.value.value===void 0)return new Ei(this,{kind:"constant",value:void 0},t.parameters);const c=xn[this.specification.type];if(c){const f=c(t.value.value,i.value.value,s);return new Ei(this,{kind:"constant",value:f},t.parameters)}return t}evaluate(t,i,s,c,f,m){return t.kind==="constant"?t.value:t.evaluate(i,s,c,f,m)}}class Ts extends Ft{possiblyEvaluate(t,i,s,c){if(t.value===void 0)return new Ei(this,{kind:"constant",value:void 0},i);if(t.expression.kind==="constant"){const f=t.expression.evaluate(i,null,{},s,c),m=t.property.specification.type==="resolvedImage"&&typeof f!="string"?f.name:f,v=this._calculate(m,m,m,i);return new Ei(this,{kind:"constant",value:v},i)}if(t.expression.kind==="camera"){const f=this._calculate(t.expression.evaluate({zoom:i.zoom-1}),t.expression.evaluate({zoom:i.zoom}),t.expression.evaluate({zoom:i.zoom+1}),i);return new Ei(this,{kind:"constant",value:f},i)}return new Ei(this,t.expression,i)}evaluate(t,i,s,c,f,m){if(t.kind==="source"){const v=t.evaluate(i,s,c,f,m);return this._calculate(v,v,v,i)}return t.kind==="composite"?this._calculate(t.evaluate({zoom:Math.floor(i.zoom)-1},s,c),t.evaluate({zoom:Math.floor(i.zoom)},s,c),t.evaluate({zoom:Math.floor(i.zoom)+1},s,c),i):t.value}_calculate(t,i,s,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:s,to:i}}interpolate(t){return t}}class Ml{constructor(t){this.specification=t}possiblyEvaluate(t,i,s,c){if(t.value!==void 0){if(t.expression.kind==="constant"){const f=t.expression.evaluate(i,null,{},s,c);return this._calculate(f,f,f,i)}return this._calculate(t.expression.evaluate(new kr(Math.floor(i.zoom-1),i)),t.expression.evaluate(new kr(Math.floor(i.zoom),i)),t.expression.evaluate(new kr(Math.floor(i.zoom+1),i)),i)}}_calculate(t,i,s,c){return c.zoom>c.zoomHistory.lastIntegerZoom?{from:t,to:i}:{from:s,to:i}}interpolate(t){return t}}class Ll{constructor(t){this.specification=t}possiblyEvaluate(t,i,s,c){return!!t.expression.evaluate(i,null,{},s,c)}interpolate(){return!1}}class Hr{constructor(t){this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const i in t){const s=t[i];s.specification.overridable&&this.overridableProperties.push(i);const c=this.defaultPropertyValues[i]=new Cs(s,void 0),f=this.defaultTransitionablePropertyValues[i]=new Il(s);this.defaultTransitioningPropertyValues[i]=f.untransitioned(),this.defaultPossiblyEvaluatedValues[i]=c.possiblyEvaluate({})}}}bt("DataDrivenProperty",Ft),bt("DataConstantProperty",Tt),bt("CrossFadedDataDrivenProperty",Ts),bt("CrossFadedProperty",Ml),bt("ColorRampProperty",Ll);const Rl="-transition";class Qi extends xe{constructor(t,i){if(super(),this.id=t.id,this.type=t.type,this._featureFilter={filter:()=>!0,needGeometry:!1},t.type!=="custom"&&(this.metadata=t.metadata,this.minzoom=t.minzoom,this.maxzoom=t.maxzoom,t.type!=="background"&&(this.source=t.source,this.sourceLayer=t["source-layer"],this.filter=t.filter),i.layout&&(this._unevaluatedLayout=new Uh(i.layout)),i.paint)){this._transitionablePaint=new eu(i.paint);for(const s in t.paint)this.setPaintProperty(s,t.paint[s],{validate:!1});for(const s in t.layout)this.setLayoutProperty(s,t.layout[s],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ra(i.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(t){return t==="visibility"?this.visibility:this._unevaluatedLayout.getValue(t)}setLayoutProperty(t,i,s={}){i!=null&&this._validate(Ta,`layers.${this.id}.layout.${t}`,t,i,s)||(t!=="visibility"?this._unevaluatedLayout.setValue(t,i):this.visibility=i)}getPaintProperty(t){return t.endsWith(Rl)?this._transitionablePaint.getTransition(t.slice(0,-11)):this._transitionablePaint.getValue(t)}setPaintProperty(t,i,s={}){if(i!=null&&this._validate(kl,`layers.${this.id}.paint.${t}`,t,i,s))return!1;if(t.endsWith(Rl))return this._transitionablePaint.setTransition(t.slice(0,-11),i||void 0),!1;{const c=this._transitionablePaint._values[t],f=c.property.specification["property-type"]==="cross-faded-data-driven",m=c.value.isDataDriven(),v=c.value;this._transitionablePaint.setValue(t,i),this._handleSpecialPaintPropertyUpdate(t);const S=this._transitionablePaint._values[t].value;return S.isDataDriven()||m||f||this._handleOverridablePaintPropertyUpdate(t,v,S)}}_handleSpecialPaintPropertyUpdate(t){}_handleOverridablePaintPropertyUpdate(t,i,s){return!1}isHidden(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||this.visibility==="none"}updateTransitions(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(t,i){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,i)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,i)}serialize(){const t={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&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),Cn(t,(i,s)=>!(i===void 0||s==="layout"&&!Object.keys(i).length||s==="paint"&&!Object.keys(i).length))}_validate(t,i,s,c,f={}){return(!f||f.validate!==!1)&&Cl(this,t.call(jo,{key:i,layerType:this.type,objectKey:s,value:c,styleSpec:Y,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const t in this.paint._values){const i=this.paint.get(t);if(i instanceof Ei&&Bo(i.property.specification)&&(i.value.kind==="source"||i.value.kind==="composite")&&i.value.isStateDependent)return!0}return!1}}const iu={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class wo{constructor(t,i){this._structArray=t,this._pos1=i*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Or{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(t,i){return t._trim(),i&&(t.isTransferred=!0,i.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}}static deserialize(t){const i=Object.create(this.prototype);return i.arrayBuffer=t.arrayBuffer,i.length=t.length,i.capacity=t.arrayBuffer.byteLength/i.bytesPerElement,i._refreshViews(),i}_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(t){this.reserve(t),this.length=t}reserve(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const i=this.uint8;this._refreshViews(),i&&this.uint8.set(i)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Mr(n,t=1){let i=0,s=0;return{members:n.map(c=>{const f=iu[c.type].BYTES_PER_ELEMENT,m=i=Zo(i,Math.max(t,f)),v=c.components||1;return s=Math.max(s,f),i+=f*v,{name:c.name,type:c.type,components:v,offset:m}}),size:Zo(i,Math.max(s,t)),alignment:t}}function Zo(n,t){return Math.ceil(n/t)*t}class Es extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.int16[c+0]=i,this.int16[c+1]=s,t}}Es.prototype.bytesPerElement=4,bt("StructArrayLayout2i4",Es);class Ps extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const f=3*t;return this.int16[f+0]=i,this.int16[f+1]=s,this.int16[f+2]=c,t}}Ps.prototype.bytesPerElement=6,bt("StructArrayLayout3i6",Ps);class So extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c){const f=this.length;return this.resize(f+1),this.emplace(f,t,i,s,c)}emplace(t,i,s,c,f){const m=4*t;return this.int16[m+0]=i,this.int16[m+1]=s,this.int16[m+2]=c,this.int16[m+3]=f,t}}So.prototype.bytesPerElement=8,bt("StructArrayLayout4i8",So);class Dl extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m){const v=this.length;return this.resize(v+1),this.emplace(v,t,i,s,c,f,m)}emplace(t,i,s,c,f,m,v){const S=6*t;return this.int16[S+0]=i,this.int16[S+1]=s,this.int16[S+2]=c,this.int16[S+3]=f,this.int16[S+4]=m,this.int16[S+5]=v,t}}Dl.prototype.bytesPerElement=12,bt("StructArrayLayout2i4i12",Dl);class zl extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m){const v=this.length;return this.resize(v+1),this.emplace(v,t,i,s,c,f,m)}emplace(t,i,s,c,f,m,v){const S=4*t,E=8*t;return this.int16[S+0]=i,this.int16[S+1]=s,this.uint8[E+4]=c,this.uint8[E+5]=f,this.uint8[E+6]=m,this.uint8[E+7]=v,t}}zl.prototype.bytesPerElement=8,bt("StructArrayLayout2i4ub8",zl);class Ko extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.float32[c+0]=i,this.float32[c+1]=s,t}}Ko.prototype.bytesPerElement=8,bt("StructArrayLayout2f8",Ko);class Bl extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m,v,S,E,R){const V=this.length;return this.resize(V+1),this.emplace(V,t,i,s,c,f,m,v,S,E,R)}emplace(t,i,s,c,f,m,v,S,E,R,V){const q=10*t;return this.uint16[q+0]=i,this.uint16[q+1]=s,this.uint16[q+2]=c,this.uint16[q+3]=f,this.uint16[q+4]=m,this.uint16[q+5]=v,this.uint16[q+6]=S,this.uint16[q+7]=E,this.uint16[q+8]=R,this.uint16[q+9]=V,t}}Bl.prototype.bytesPerElement=20,bt("StructArrayLayout10ui20",Bl);class h extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m,v,S,E,R,V,q){const H=this.length;return this.resize(H+1),this.emplace(H,t,i,s,c,f,m,v,S,E,R,V,q)}emplace(t,i,s,c,f,m,v,S,E,R,V,q,H){const W=12*t;return this.int16[W+0]=i,this.int16[W+1]=s,this.int16[W+2]=c,this.int16[W+3]=f,this.uint16[W+4]=m,this.uint16[W+5]=v,this.uint16[W+6]=S,this.uint16[W+7]=E,this.int16[W+8]=R,this.int16[W+9]=V,this.int16[W+10]=q,this.int16[W+11]=H,t}}h.prototype.bytesPerElement=24,bt("StructArrayLayout4i4ui4i24",h);class e extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const f=3*t;return this.float32[f+0]=i,this.float32[f+1]=s,this.float32[f+2]=c,t}}e.prototype.bytesPerElement=12,bt("StructArrayLayout3f12",e);class r extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint32[1*t+0]=i,t}}r.prototype.bytesPerElement=4,bt("StructArrayLayout1ul4",r);class a extends Or{_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(t,i,s,c,f,m,v,S,E){const R=this.length;return this.resize(R+1),this.emplace(R,t,i,s,c,f,m,v,S,E)}emplace(t,i,s,c,f,m,v,S,E,R){const V=10*t,q=5*t;return this.int16[V+0]=i,this.int16[V+1]=s,this.int16[V+2]=c,this.int16[V+3]=f,this.int16[V+4]=m,this.int16[V+5]=v,this.uint32[q+3]=S,this.uint16[V+8]=E,this.uint16[V+9]=R,t}}a.prototype.bytesPerElement=20,bt("StructArrayLayout6i1ul2ui20",a);class l extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m){const v=this.length;return this.resize(v+1),this.emplace(v,t,i,s,c,f,m)}emplace(t,i,s,c,f,m,v){const S=6*t;return this.int16[S+0]=i,this.int16[S+1]=s,this.int16[S+2]=c,this.int16[S+3]=f,this.int16[S+4]=m,this.int16[S+5]=v,t}}l.prototype.bytesPerElement=12,bt("StructArrayLayout2i2i2i12",l);class d extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f){const m=this.length;return this.resize(m+1),this.emplace(m,t,i,s,c,f)}emplace(t,i,s,c,f,m){const v=4*t,S=8*t;return this.float32[v+0]=i,this.float32[v+1]=s,this.float32[v+2]=c,this.int16[S+6]=f,this.int16[S+7]=m,t}}d.prototype.bytesPerElement=16,bt("StructArrayLayout2f1f2i16",d);class g extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(t,i,s,c,f,m){const v=this.length;return this.resize(v+1),this.emplace(v,t,i,s,c,f,m)}emplace(t,i,s,c,f,m,v){const S=16*t,E=4*t,R=8*t;return this.uint8[S+0]=i,this.uint8[S+1]=s,this.float32[E+1]=c,this.float32[E+2]=f,this.int16[R+6]=m,this.int16[R+7]=v,t}}g.prototype.bytesPerElement=16,bt("StructArrayLayout2ub2f2i16",g);class w extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const f=3*t;return this.uint16[f+0]=i,this.uint16[f+1]=s,this.uint16[f+2]=c,t}}w.prototype.bytesPerElement=6,bt("StructArrayLayout3ui6",w);class A extends Or{_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(t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae){const Se=this.length;return this.resize(Se+1),this.emplace(Se,t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae)}emplace(t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae,Se){const fe=24*t,j=12*t,$=48*t;return this.int16[fe+0]=i,this.int16[fe+1]=s,this.uint16[fe+2]=c,this.uint16[fe+3]=f,this.uint32[j+2]=m,this.uint32[j+3]=v,this.uint32[j+4]=S,this.uint16[fe+10]=E,this.uint16[fe+11]=R,this.uint16[fe+12]=V,this.float32[j+7]=q,this.float32[j+8]=H,this.uint8[$+36]=W,this.uint8[$+37]=X,this.uint8[$+38]=re,this.uint32[j+10]=ae,this.int16[fe+22]=Se,t}}A.prototype.bytesPerElement=48,bt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",A);class I extends Or{_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(t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae,Se,fe,j,$,ge,De,$e,Oe,He,st,et){const lt=this.length;return this.resize(lt+1),this.emplace(lt,t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae,Se,fe,j,$,ge,De,$e,Oe,He,st,et)}emplace(t,i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae,Se,fe,j,$,ge,De,$e,Oe,He,st,et,lt){const Ze=32*t,wt=16*t;return this.int16[Ze+0]=i,this.int16[Ze+1]=s,this.int16[Ze+2]=c,this.int16[Ze+3]=f,this.int16[Ze+4]=m,this.int16[Ze+5]=v,this.int16[Ze+6]=S,this.int16[Ze+7]=E,this.uint16[Ze+8]=R,this.uint16[Ze+9]=V,this.uint16[Ze+10]=q,this.uint16[Ze+11]=H,this.uint16[Ze+12]=W,this.uint16[Ze+13]=X,this.uint16[Ze+14]=re,this.uint16[Ze+15]=ae,this.uint16[Ze+16]=Se,this.uint16[Ze+17]=fe,this.uint16[Ze+18]=j,this.uint16[Ze+19]=$,this.uint16[Ze+20]=ge,this.uint16[Ze+21]=De,this.uint16[Ze+22]=$e,this.uint32[wt+12]=Oe,this.float32[wt+13]=He,this.float32[wt+14]=st,this.uint16[Ze+30]=et,this.uint16[Ze+31]=lt,t}}I.prototype.bytesPerElement=64,bt("StructArrayLayout8i15ui1ul2f2ui64",I);class z extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.float32[1*t+0]=i,t}}z.prototype.bytesPerElement=4,bt("StructArrayLayout1f4",z);class N extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const f=3*t;return this.uint16[6*t+0]=i,this.float32[f+1]=s,this.float32[f+2]=c,t}}N.prototype.bytesPerElement=12,bt("StructArrayLayout1ui2f12",N);class F extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i,s){const c=this.length;return this.resize(c+1),this.emplace(c,t,i,s)}emplace(t,i,s,c){const f=4*t;return this.uint32[2*t+0]=i,this.uint16[f+2]=s,this.uint16[f+3]=c,t}}F.prototype.bytesPerElement=8,bt("StructArrayLayout1ul2ui8",F);class Z extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t,i){const s=this.length;return this.resize(s+1),this.emplace(s,t,i)}emplace(t,i,s){const c=2*t;return this.uint16[c+0]=i,this.uint16[c+1]=s,t}}Z.prototype.bytesPerElement=4,bt("StructArrayLayout2ui4",Z);class J extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(t){const i=this.length;return this.resize(i+1),this.emplace(i,t)}emplace(t,i){return this.uint16[1*t+0]=i,t}}J.prototype.bytesPerElement=2,bt("StructArrayLayout1ui2",J);class oe extends Or{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(t,i,s,c){const f=this.length;return this.resize(f+1),this.emplace(f,t,i,s,c)}emplace(t,i,s,c,f){const m=4*t;return this.float32[m+0]=i,this.float32[m+1]=s,this.float32[m+2]=c,this.float32[m+3]=f,t}}oe.prototype.bytesPerElement=16,bt("StructArrayLayout4f16",oe);class ne extends wo{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 T(this.anchorPointX,this.anchorPointY)}}ne.prototype.size=20;class se extends a{get(t){return new ne(this,t)}}bt("CollisionBoxArray",se);class pe extends wo{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(t){this._structArray.uint8[this._pos1+37]=t}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(t){this._structArray.uint8[this._pos1+38]=t}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(t){this._structArray.uint32[this._pos4+10]=t}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}pe.prototype.size=48;class _e extends A{get(t){return new pe(this,t)}}bt("PlacedSymbolArray",_e);class ye extends wo{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(t){this._structArray.uint32[this._pos4+12]=t}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]}}ye.prototype.size=64;class be extends I{get(t){return new ye(this,t)}}bt("SymbolInstanceArray",be);class Ce extends z{getoffsetX(t){return this.float32[1*t+0]}}bt("GlyphOffsetArray",Ce);class we extends Ps{getx(t){return this.int16[3*t+0]}gety(t){return this.int16[3*t+1]}gettileUnitDistanceFromAnchor(t){return this.int16[3*t+2]}}bt("SymbolLineVertexArray",we);class Re extends wo{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]}}Re.prototype.size=12;class We extends N{get(t){return new Re(this,t)}}bt("TextAnchorOffsetArray",We);class Fe extends wo{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 Ne extends F{get(t){return new Fe(this,t)}}bt("FeatureIndexArray",Ne);class je extends Es{}class mt extends Es{}class dt extends Es{}class tt extends Dl{}class kt extends zl{}class Xt extends Ko{}class nr extends Bl{}class Lr extends h{}class _r extends e{}class Rr extends r{}class Dr extends l{}class wr extends g{}class ur extends w{}class Qr extends Z{}const ci=Mr([{name:"a_pos",components:2,type:"Int16"}],4),{members:vi}=ci;class hr{constructor(t=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=t}prepareSegment(t,i,s,c){const f=this.segments[this.segments.length-1];return t>hr.MAX_VERTEX_ARRAY_LENGTH&&Jr(`Max vertices per segment is ${hr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${t}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${hr.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!f||f.vertexLength+t>hr.MAX_VERTEX_ARRAY_LENGTH||f.sortKey!==c?this.createNewSegment(i,s,c):f}createNewSegment(t,i,s){const c={vertexOffset:t.length,primitiveOffset:i.length,vertexLength:0,primitiveLength:0,vaos:{}};return s!==void 0&&(c.sortKey=s),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(c),c}getOrCreateLatestSegment(t,i,s){return this.prepareSegment(0,t,i,s)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(const t of this.segments)for(const i in t.vaos)t.vaos[i].destroy()}static simpleSegment(t,i,s,c){return new hr([{vertexOffset:t,primitiveOffset:i,vertexLength:s,primitiveLength:c,vaos:{},sortKey:0}])}}function $n(n,t){return 256*(n=Ur(Math.floor(n),0,255))+Ur(Math.floor(t),0,255)}hr.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,bt("SegmentVector",hr);const An=Mr([{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 eo,Ao,Is,to={exports:{}},ko={exports:{}},qi={exports:{}},ro=function(){if(Is)return to.exports;Is=1;var n=(eo||(eo=1,ko.exports=function(i,s){var c,f,m,v,S,E,R,V;for(f=i.length-(c=3&i.length),m=s,S=3432918353,E=461845907,V=0;V<f;)R=255&i.charCodeAt(V)|(255&i.charCodeAt(++V))<<8|(255&i.charCodeAt(++V))<<16|(255&i.charCodeAt(++V))<<24,++V,m=27492+(65535&(v=5*(65535&(m=(m^=R=(65535&(R=(R=(65535&R)*S+(((R>>>16)*S&65535)<<16)&4294967295)<<15|R>>>17))*E+(((R>>>16)*E&65535)<<16)&4294967295)<<13|m>>>19))+((5*(m>>>16)&65535)<<16)&4294967295))+((58964+(v>>>16)&65535)<<16);switch(R=0,c){case 3:R^=(255&i.charCodeAt(V+2))<<16;case 2:R^=(255&i.charCodeAt(V+1))<<8;case 1:m^=R=(65535&(R=(R=(65535&(R^=255&i.charCodeAt(V)))*S+(((R>>>16)*S&65535)<<16)&4294967295)<<15|R>>>17))*E+(((R>>>16)*E&65535)<<16)&4294967295}return m^=i.length,m=2246822507*(65535&(m^=m>>>16))+((2246822507*(m>>>16)&65535)<<16)&4294967295,m=3266489909*(65535&(m^=m>>>13))+((3266489909*(m>>>16)&65535)<<16)&4294967295,(m^=m>>>16)>>>0}),ko.exports),t=(Ao||(Ao=1,qi.exports=function(i,s){for(var c,f=i.length,m=s^f,v=0;f>=4;)c=1540483477*(65535&(c=255&i.charCodeAt(v)|(255&i.charCodeAt(++v))<<8|(255&i.charCodeAt(++v))<<16|(255&i.charCodeAt(++v))<<24))+((1540483477*(c>>>16)&65535)<<16),m=1540483477*(65535&m)+((1540483477*(m>>>16)&65535)<<16)^(c=1540483477*(65535&(c^=c>>>24))+((1540483477*(c>>>16)&65535)<<16)),f-=4,++v;switch(f){case 3:m^=(255&i.charCodeAt(v+2))<<16;case 2:m^=(255&i.charCodeAt(v+1))<<8;case 1:m=1540483477*(65535&(m^=255&i.charCodeAt(v)))+((1540483477*(m>>>16)&65535)<<16)}return m=1540483477*(65535&(m^=m>>>13))+((1540483477*(m>>>16)&65535)<<16),(m^=m>>>15)>>>0}),qi.exports);return to.exports=n,to.exports.murmur3=n,to.exports.murmur2=t,to.exports}(),Vn=B(ro);class io{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(t,i,s,c){this.ids.push(Wr(t)),this.positions.push(i,s,c)}getPositions(t){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const i=Wr(t);let s=0,c=this.ids.length-1;for(;s<c;){const m=s+c>>1;this.ids[m]>=i?c=m:s=m+1}const f=[];for(;this.ids[s]===i;)f.push({index:this.positions[3*s],start:this.positions[3*s+1],end:this.positions[3*s+2]}),s++;return f}static serialize(t,i){const s=new Float64Array(t.ids),c=new Uint32Array(t.positions);return Zr(s,c,0,s.length-1),i&&i.push(s.buffer,c.buffer),{ids:s,positions:c}}static deserialize(t){const i=new io;return i.ids=t.ids,i.positions=t.positions,i.indexed=!0,i}}function Wr(n){const t=+n;return!isNaN(t)&&t<=Number.MAX_SAFE_INTEGER?t:Vn(String(n))}function Zr(n,t,i,s){for(;i<s;){const c=n[i+s>>1];let f=i-1,m=s+1;for(;;){do f++;while(n[f]<c);do m--;while(n[m]>c);if(f>=m)break;Pi(n,f,m),Pi(t,3*f,3*m),Pi(t,3*f+1,3*m+1),Pi(t,3*f+2,3*m+2)}m-i<s-m?(Zr(n,t,i,m),i=m+1):(Zr(n,t,m+1,s),s=m)}}function Pi(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}bt("FeaturePositionMap",io);class Cr{constructor(t,i){this.gl=t.gl,this.location=i}}class Da extends Cr{constructor(t,i){super(t,i),this.current=0}set(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))}}class nu extends Cr{constructor(t,i){super(t,i),this.current=[0,0,0,0]}set(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))}}class ou extends Cr{constructor(t,i){super(t,i),this.current=Nt.transparent}set(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))}}const jh=new Float32Array(16);function Vl(n){return[$n(255*n.r,255*n.g),$n(255*n.b,255*n.a)]}class Ms{constructor(t,i,s){this.value=t,this.uniformNames=i.map(c=>`u_${c}`),this.type=s}setUniform(t,i,s){t.set(s.constantOr(this.value))}getBinding(t,i,s){return this.type==="color"?new ou(t,i):new Da(t,i)}}class Yi{constructor(t,i){this.uniformNames=i.map(s=>`u_${s}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(t,i){this.pixelRatioFrom=i.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=i.tlbr,this.patternTo=t.tlbr}setUniform(t,i,s,c){const f=c==="u_pattern_to"?this.patternTo:c==="u_pattern_from"?this.patternFrom:c==="u_pixel_ratio_to"?this.pixelRatioTo:c==="u_pixel_ratio_from"?this.pixelRatioFrom:null;f&&t.set(f)}getBinding(t,i,s){return s.substr(0,9)==="u_pattern"?new nu(t,i):new Da(t,i)}}class kn{constructor(t,i,s,c){this.expression=t,this.type=s,this.maxValue=0,this.paintVertexAttributes=i.map(f=>({name:`a_${f}`,type:"Float32",components:s==="color"?2:1,offset:0})),this.paintVertexArray=new c}populatePaintArray(t,i,s,c,f){const m=this.paintVertexArray.length,v=this.expression.evaluate(new kr(0),i,{},c,[],f);this.paintVertexArray.resize(t),this._setPaintValue(m,t,v)}updatePaintArray(t,i,s,c){const f=this.expression.evaluate({zoom:0},s,c);this._setPaintValue(t,i,f)}_setPaintValue(t,i,s){if(this.type==="color"){const c=Vl(s);for(let f=t;f<i;f++)this.paintVertexArray.emplace(f,c[0],c[1])}else{for(let c=t;c<i;c++)this.paintVertexArray.emplace(c,s);this.maxValue=Math.max(this.maxValue,Math.abs(s))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class $i{constructor(t,i,s,c,f,m){this.expression=t,this.uniformNames=i.map(v=>`u_${v}_t`),this.type=s,this.useIntegerZoom=c,this.zoom=f,this.maxValue=0,this.paintVertexAttributes=i.map(v=>({name:`a_${v}`,type:"Float32",components:s==="color"?4:2,offset:0})),this.paintVertexArray=new m}populatePaintArray(t,i,s,c,f){const m=this.expression.evaluate(new kr(this.zoom),i,{},c,[],f),v=this.expression.evaluate(new kr(this.zoom+1),i,{},c,[],f),S=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(S,t,m,v)}updatePaintArray(t,i,s,c){const f=this.expression.evaluate({zoom:this.zoom},s,c),m=this.expression.evaluate({zoom:this.zoom+1},s,c);this._setPaintValue(t,i,f,m)}_setPaintValue(t,i,s,c){if(this.type==="color"){const f=Vl(s),m=Vl(c);for(let v=t;v<i;v++)this.paintVertexArray.emplace(v,f[0],f[1],m[0],m[1])}else{for(let f=t;f<i;f++)this.paintVertexArray.emplace(f,s,c);this.maxValue=Math.max(this.maxValue,Math.abs(s),Math.abs(c))}}upload(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(t,i){const s=this.useIntegerZoom?Math.floor(i.zoom):i.zoom,c=Ur(this.expression.interpolationFactor(s,this.zoom,this.zoom+1),0,1);t.set(c)}getBinding(t,i,s){return new Da(t,i)}}class On{constructor(t,i,s,c,f,m){this.expression=t,this.type=i,this.useIntegerZoom=s,this.zoom=c,this.layerId=m,this.zoomInPaintVertexArray=new f,this.zoomOutPaintVertexArray=new f}populatePaintArray(t,i,s){const c=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(c,t,i.patterns&&i.patterns[this.layerId],s)}updatePaintArray(t,i,s,c,f){this._setPaintValues(t,i,s.patterns&&s.patterns[this.layerId],f)}_setPaintValues(t,i,s,c){if(!c||!s)return;const{min:f,mid:m,max:v}=s,S=c[f],E=c[m],R=c[v];if(S&&E&&R)for(let V=t;V<i;V++)this.zoomInPaintVertexArray.emplace(V,E.tl[0],E.tl[1],E.br[0],E.br[1],S.tl[0],S.tl[1],S.br[0],S.br[1],E.pixelRatio,S.pixelRatio),this.zoomOutPaintVertexArray.emplace(V,E.tl[0],E.tl[1],E.br[0],E.br[1],R.tl[0],R.tl[1],R.br[0],R.br[1],E.pixelRatio,R.pixelRatio)}upload(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,An.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,An.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class za{constructor(t,i,s){this.binders={},this._buffers=[];const c=[];for(const f in t.paint._values){if(!s(f))continue;const m=t.paint.get(f);if(!(m instanceof Ei&&Bo(m.property.specification)))continue;const v=Ol(f,t.type),S=m.value,E=m.property.specification.type,R=m.property.useIntegerZoom,V=m.property.specification["property-type"],q=V==="cross-faded"||V==="cross-faded-data-driven";if(S.kind==="constant")this.binders[f]=q?new Yi(S.value,v):new Ms(S.value,v,E),c.push(`/u_${f}`);else if(S.kind==="source"||q){const H=yp(f,E,"source");this.binders[f]=q?new On(S,E,R,i,H,t.id):new kn(S,v,E,H),c.push(`/a_${f}`)}else{const H=yp(f,E,"composite");this.binders[f]=new $i(S,v,E,R,i,H),c.push(`/z_${f}`)}}this.cacheKey=c.sort().join("")}getMaxValue(t){const i=this.binders[t];return i instanceof kn||i instanceof $i?i.maxValue:0}populatePaintArrays(t,i,s,c,f){for(const m in this.binders){const v=this.binders[m];(v instanceof kn||v instanceof $i||v instanceof On)&&v.populatePaintArray(t,i,s,c,f)}}setConstantPatternPositions(t,i){for(const s in this.binders){const c=this.binders[s];c instanceof Yi&&c.setConstantPatternPositions(t,i)}}updatePaintArrays(t,i,s,c,f){let m=!1;for(const v in t){const S=i.getPositions(v);for(const E of S){const R=s.feature(E.index);for(const V in this.binders){const q=this.binders[V];if((q instanceof kn||q instanceof $i||q instanceof On)&&q.expression.isStateDependent===!0){const H=c.paint.get(V);q.expression=H.value,q.updatePaintArray(E.start,E.end,R,t[v],f),m=!0}}}}return m}defines(){const t=[];for(const i in this.binders){const s=this.binders[i];(s instanceof Ms||s instanceof Yi)&&t.push(...s.uniformNames.map(c=>`#define HAS_UNIFORM_${c}`))}return t}getBinderAttributes(){const t=[];for(const i in this.binders){const s=this.binders[i];if(s instanceof kn||s instanceof $i)for(let c=0;c<s.paintVertexAttributes.length;c++)t.push(s.paintVertexAttributes[c].name);else if(s instanceof On)for(let c=0;c<An.members.length;c++)t.push(An.members[c].name)}return t}getBinderUniforms(){const t=[];for(const i in this.binders){const s=this.binders[i];if(s instanceof Ms||s instanceof Yi||s instanceof $i)for(const c of s.uniformNames)t.push(c)}return t}getPaintVertexBuffers(){return this._buffers}getUniforms(t,i){const s=[];for(const c in this.binders){const f=this.binders[c];if(f instanceof Ms||f instanceof Yi||f instanceof $i){for(const m of f.uniformNames)if(i[m]){const v=f.getBinding(t,i[m],m);s.push({name:m,property:c,binding:v})}}}return s}setUniforms(t,i,s,c){for(const{name:f,property:m,binding:v}of i)this.binders[m].setUniform(v,c,s.get(m),f)}updatePaintBuffers(t){this._buffers=[];for(const i in this.binders){const s=this.binders[i];if(t&&s instanceof On){const c=t.fromScale===2?s.zoomInPaintVertexBuffer:s.zoomOutPaintVertexBuffer;c&&this._buffers.push(c)}else(s instanceof kn||s instanceof $i)&&s.paintVertexBuffer&&this._buffers.push(s.paintVertexBuffer)}}upload(t){for(const i in this.binders){const s=this.binders[i];(s instanceof kn||s instanceof $i||s instanceof On)&&s.upload(t)}this.updatePaintBuffers()}destroy(){for(const t in this.binders){const i=this.binders[t];(i instanceof kn||i instanceof $i||i instanceof On)&&i.destroy()}}}class no{constructor(t,i,s=()=>!0){this.programConfigurations={};for(const c of t)this.programConfigurations[c.id]=new za(c,i,s);this.needsUpload=!1,this._featureMap=new io,this._bufferOffset=0}populatePaintArrays(t,i,s,c,f,m){for(const v in this.programConfigurations)this.programConfigurations[v].populatePaintArrays(t,i,c,f,m);i.id!==void 0&&this._featureMap.add(i.id,s,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0}updatePaintArrays(t,i,s,c){for(const f of s)this.needsUpload=this.programConfigurations[f.id].updatePaintArrays(t,this._featureMap,i,f,c)||this.needsUpload}get(t){return this.programConfigurations[t]}upload(t){if(this.needsUpload){for(const i in this.programConfigurations)this.programConfigurations[i].upload(t);this.needsUpload=!1}}destroy(){for(const t in this.programConfigurations)this.programConfigurations[t].destroy()}}function Ol(n,t){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"]}[n]||[n.replace(`${t}-`,"").replace(/-/g,"_")]}function yp(n,t,i){const s={color:{source:Ko,composite:oe},number:{source:z,composite:Ko}},c=function(f){return{"line-pattern":{source:nr,composite:nr},"fill-pattern":{source:nr,composite:nr},"fill-extrusion-pattern":{source:nr,composite:nr}}[f]}(n);return c&&c[i]||s[t][i]}bt("ConstantBinder",Ms),bt("CrossFadedConstantBinder",Yi),bt("SourceExpressionBinder",kn),bt("CrossFadedCompositeBinder",On),bt("CompositeExpressionBinder",$i),bt("ProgramConfiguration",za,{omit:["_buffers"]}),bt("ProgramConfigurationSet",no);const Hh=Math.pow(2,14)-1,_p=-Hh-1;function Ls(n){const t=ar/n.extent,i=n.loadGeometry();for(let s=0;s<i.length;s++){const c=i[s];for(let f=0;f<c.length;f++){const m=c[f],v=Math.round(m.x*t),S=Math.round(m.y*t);m.x=Ur(v,_p,Hh),m.y=Ur(S,_p,Hh),(v<m.x||v>m.x+1||S<m.y||S>m.y+1)&&Jr("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return i}function Rs(n,t){return{type:n.type,id:n.id,properties:n.properties,geometry:t?Ls(n):[]}}const vp=-32768;function Cy(n,t,i,s,c){n.emplaceBack(vp+8*t+s,vp+8*i+c)}class Wh{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new mt,this.indexArray=new ur,this.segments=new hr,this.programConfigurations=new no(t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){const c=this.layers[0],f=[];let m=null,v=!1,S=c.type==="heatmap";if(c.type==="circle"){const R=c;m=R.layout.get("circle-sort-key"),v=!m.isConstant(),S=S||R.paint.get("circle-pitch-alignment")==="map"}const E=S?i.subdivisionGranularity.circle:1;for(const{feature:R,id:V,index:q,sourceLayerIndex:H}of t){const W=this.layers[0]._featureFilter.needGeometry,X=Rs(R,W);if(!this.layers[0]._featureFilter.filter(new kr(this.zoom),X,s))continue;const re=v?m.evaluate(X,{},s):void 0,ae={id:V,properties:R.properties,type:R.type,sourceLayerIndex:H,index:q,geometry:W?X.geometry:Ls(R),patterns:{},sortKey:re};f.push(ae)}v&&f.sort((R,V)=>R.sortKey-V.sortKey);for(const R of f){const{geometry:V,index:q,sourceLayerIndex:H}=R,W=t[q].feature;this.addFeature(R,V,q,s,E),i.featureIndex.insert(W,V,q,H,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,vi),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(t,i,s,c,f=1){let m;switch(f){case 1:m=[0,7];break;case 3:m=[0,2,5,7];break;case 5:m=[0,1,3,4,6,7];break;case 7:m=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${f}; valid values are 1, 3, 5, 7.`)}const v=m.length;for(const S of i)for(const E of S){const R=E.x,V=E.y;if(R<0||R>=ar||V<0||V>=ar)continue;const q=this.segments.prepareSegment(v*v,this.layoutVertexArray,this.indexArray,t.sortKey),H=q.vertexLength;for(let W=0;W<v;W++)for(let X=0;X<v;X++)Cy(this.layoutVertexArray,R,V,m[X],m[W]);for(let W=0;W<v-1;W++)for(let X=0;X<v-1;X++){const re=H+W*v+X,ae=H+(W+1)*v+X;this.indexArray.emplaceBack(re,ae+1,re+1),this.indexArray.emplaceBack(re,ae,ae+1)}q.vertexLength+=v*v,q.primitiveLength+=(v-1)*(v-1)*2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,{},c)}}function xp(n,t){for(let i=0;i<n.length;i++)if(Ds(t,n[i]))return!0;for(let i=0;i<t.length;i++)if(Ds(n,t[i]))return!0;return!!Zh(n,t)}function Ty(n,t,i){return!!Ds(n,t)||!!Kh(t,n,i)}function bp(n,t){if(n.length===1)return Sp(t,n[0]);for(let i=0;i<t.length;i++){const s=t[i];for(let c=0;c<s.length;c++)if(Ds(n,s[c]))return!0}for(let i=0;i<n.length;i++)if(Sp(t,n[i]))return!0;for(let i=0;i<t.length;i++)if(Zh(n,t[i]))return!0;return!1}function Ey(n,t,i){if(n.length>1){if(Zh(n,t))return!0;for(let s=0;s<t.length;s++)if(Kh(t[s],n,i))return!0}for(let s=0;s<n.length;s++)if(Kh(n[s],t,i))return!0;return!1}function Zh(n,t){if(n.length===0||t.length===0)return!1;for(let i=0;i<n.length-1;i++){const s=n[i],c=n[i+1];for(let f=0;f<t.length-1;f++)if(Py(s,c,t[f],t[f+1]))return!0}return!1}function Py(n,t,i,s){return it(n,i,s)!==it(t,i,s)&&it(n,t,i)!==it(n,t,s)}function Kh(n,t,i){const s=i*i;if(t.length===1)return n.distSqr(t[0])<s;for(let c=1;c<t.length;c++)if(wp(n,t[c-1],t[c])<s)return!0;return!1}function wp(n,t,i){const s=t.distSqr(i);if(s===0)return n.distSqr(t);const c=((n.x-t.x)*(i.x-t.x)+(n.y-t.y)*(i.y-t.y))/s;return n.distSqr(c<0?t:c>1?i:i.sub(t)._mult(c)._add(t))}function Sp(n,t){for(let i=0;i<n.length;i++)if(Ds(n[i],t))return!0;return!1}function Ds(n,t){let i=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],m=n[c];f.y>t.y!=m.y>t.y&&t.x<(m.x-f.x)*(t.y-f.y)/(m.y-f.y)+f.x&&(i=!i)}return i}function Iy(n,t,i){const s=i[0],c=i[2];if(n.x<s.x&&t.x<s.x||n.x>c.x&&t.x>c.x||n.y<s.y&&t.y<s.y||n.y>c.y&&t.y>c.y)return!1;const f=it(n,t,i[0]);return f!==it(n,t,i[1])||f!==it(n,t,i[2])||f!==it(n,t,i[3])}function Fl(n,t,i){const s=t.paint.get(n).value;return s.kind==="constant"?s.value:i.programConfigurations.get(t.id).getMaxValue(n)}function su(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function au(n,t,i,s,c){if(!t[0]&&!t[1])return n;const f=T.convert(t)._mult(c);i==="viewport"&&f._rotate(-s);const m=[];for(let v=0;v<n.length;v++)m.push(n[v].sub(f));return m}let Ap,kp;bt("CircleBucket",Wh,{omit:["layers"]});var My={get paint(){return kp=kp||new Hr({"circle-radius":new Ft(Y.paint_circle["circle-radius"]),"circle-color":new Ft(Y.paint_circle["circle-color"]),"circle-blur":new Ft(Y.paint_circle["circle-blur"]),"circle-opacity":new Ft(Y.paint_circle["circle-opacity"]),"circle-translate":new Tt(Y.paint_circle["circle-translate"]),"circle-translate-anchor":new Tt(Y.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Tt(Y.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Tt(Y.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ft(Y.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ft(Y.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ft(Y.paint_circle["circle-stroke-opacity"])})},get layout(){return Ap=Ap||new Hr({"circle-sort-key":new Ft(Y.layout_circle["circle-sort-key"])})}};class Ly extends Qi{constructor(t){super(t,My)}createBucket(t){return new Wh(t)}queryRadius(t){const i=t;return Fl("circle-radius",this,i)+Fl("circle-stroke-width",this,i)+su(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:f,pixelsToTileUnits:m,unwrappedTileID:v,getElevation:S}){const E=au(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-f.bearingInRadians,m),R=this.paint.get("circle-radius").evaluate(i,s)+this.paint.get("circle-stroke-width").evaluate(i,s),V=this.paint.get("circle-pitch-alignment")==="map",q=V?E:function(W,X,re,ae){return W.map(Se=>Cp(Se,X,re,ae))}(E,f,v,S),H=V?R*m:R;for(const W of c)for(const X of W){const re=V?X:Cp(X,f,v,S);let ae=H;const Se=f.projectTileCoordinates(X.x,X.y,v,S).signedDistanceFromCamera;if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ae*=Se/f.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ae*=f.cameraToCenterDistance/Se),Ty(q,re,ae))return!0}return!1}}function Cp(n,t,i,s){const c=t.projectTileCoordinates(n.x,n.y,i,s).point;return new T((.5*c.x+.5)*t.width,(.5*-c.y+.5)*t.height)}class Tp extends Wh{}let Ep;bt("HeatmapBucket",Tp,{omit:["layers"]});var Ry={get paint(){return Ep=Ep||new Hr({"heatmap-radius":new Ft(Y.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Ft(Y.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Tt(Y.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Ll(Y.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Tt(Y.paint_heatmap["heatmap-opacity"])})}};function Gh(n,{width:t,height:i},s,c){if(c){if(c instanceof Uint8ClampedArray)c=new Uint8Array(c.buffer);else if(c.length!==t*i*s)throw new RangeError(`mismatched image size. expected: ${c.length} but got: ${t*i*s}`)}else c=new Uint8Array(t*i*s);return n.width=t,n.height=i,n.data=c,n}function Pp(n,{width:t,height:i},s){if(t===n.width&&i===n.height)return;const c=Gh({},{width:t,height:i},s);Jh(n,c,{x:0,y:0},{x:0,y:0},{width:Math.min(n.width,t),height:Math.min(n.height,i)},s),n.width=t,n.height=i,n.data=c.data}function Jh(n,t,i,s,c,f){if(c.width===0||c.height===0)return t;if(c.width>n.width||c.height>n.height||i.x>n.width-c.width||i.y>n.height-c.height)throw new RangeError("out of range source coordinates for image copy");if(c.width>t.width||c.height>t.height||s.x>t.width-c.width||s.y>t.height-c.height)throw new RangeError("out of range destination coordinates for image copy");const m=n.data,v=t.data;if(m===v)throw new Error("srcData equals dstData, so image is already copied");for(let S=0;S<c.height;S++){const E=((i.y+S)*n.width+i.x)*f,R=((s.y+S)*t.width+s.x)*f;for(let V=0;V<c.width*f;V++)v[R+V]=m[E+V]}return t}class Nl{constructor(t,i){Gh(this,t,1,i)}resize(t){Pp(this,t,1)}clone(){return new Nl({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,s,c,f){Jh(t,i,s,c,f,1)}}class un{constructor(t,i){Gh(this,t,4,i)}resize(t){Pp(this,t,4)}replace(t,i){i?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t}clone(){return new un({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(t,i,s,c,f){Jh(t,i,s,c,f,4)}}function Ip(n){const t={},i=n.resolution||256,s=n.clips?n.clips.length:1,c=n.image||new un({width:i,height:s});if(Math.log(i)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${i}`);const f=(m,v,S)=>{t[n.evaluationKey]=S;const E=n.expression.evaluate(t);c.data[m+v+0]=Math.floor(255*E.r/E.a),c.data[m+v+1]=Math.floor(255*E.g/E.a),c.data[m+v+2]=Math.floor(255*E.b/E.a),c.data[m+v+3]=Math.floor(255*E.a)};if(n.clips)for(let m=0,v=0;m<s;++m,v+=4*i)for(let S=0,E=0;S<i;S++,E+=4){const R=S/(i-1),{start:V,end:q}=n.clips[m];f(v,E,V*(1-R)+q*R)}else for(let m=0,v=0;m<i;m++,v+=4)f(0,v,m/(i-1));return c}bt("AlphaImage",Nl),bt("RGBAImage",un);const Xh="big-fb";class Dy extends Qi{createBucket(t){return new Tp(t)}constructor(t){super(t,Ry),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(t){t==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=Ip({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Xh)&&this.heatmapFbos.delete(Xh)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let Mp;var zy={get paint(){return Mp=Mp||new Hr({"hillshade-illumination-direction":new Tt(Y.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-altitude":new Tt(Y.paint_hillshade["hillshade-illumination-altitude"]),"hillshade-illumination-anchor":new Tt(Y.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Tt(Y.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Tt(Y.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Tt(Y.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Tt(Y.paint_hillshade["hillshade-accent-color"]),"hillshade-method":new Tt(Y.paint_hillshade["hillshade-method"])})}};class By extends Qi{constructor(t){super(t,zy),this.recalculate({zoom:0,zoomHistory:{}},void 0)}getIlluminationProperties(){let t=this.paint.get("hillshade-illumination-direction").values,i=this.paint.get("hillshade-illumination-altitude").values,s=this.paint.get("hillshade-highlight-color").values,c=this.paint.get("hillshade-shadow-color").values;const f=Math.max(t.length,i.length,s.length,c.length);t=t.concat(Array(f-t.length).fill(t.at(-1))),i=i.concat(Array(f-i.length).fill(i.at(-1))),s=s.concat(Array(f-s.length).fill(s.at(-1))),c=c.concat(Array(f-c.length).fill(c.at(-1)));const m=i.map(Ir);return{directionRadians:t.map(Ir),altitudeRadians:m,shadowColor:c,highlightColor:s}}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const Vy=Mr([{name:"a_pos",components:2,type:"Int16"}],4),{members:Oy}=Vy;function Qh(n,t,i){const s=i.patternDependencies;let c=!1;for(const f of t){const m=f.paint.get(`${n}-pattern`);m.isConstant()||(c=!0);const v=m.constantOr(null);v&&(c=!0,s[v.to]=!0,s[v.from]=!0)}return c}function Yh(n,t,i,s,c){const f=c.patternDependencies;for(const m of t){const v=m.paint.get(`${n}-pattern`).value;if(v.kind!=="constant"){let S=v.evaluate({zoom:s-1},i,{},c.availableImages),E=v.evaluate({zoom:s},i,{},c.availableImages),R=v.evaluate({zoom:s+1},i,{},c.availableImages);S=S&&S.name?S.name:S,E=E&&E.name?E.name:E,R=R&&R.name?R.name:R,f[S]=!0,f[E]=!0,f[R]=!0,i.patterns[m.id]={min:S,mid:E,max:R}}}return i}function Lp(n,t,i,s,c){let f;if(c===function(m,v,S,E){let R=0;for(let V=v,q=S-E;V<S;V+=E)R+=(m[q]-m[V])*(m[V+1]+m[q+1]),q=V;return R}(n,t,i,s)>0)for(let m=t;m<i;m+=s)f=Bp(m/s|0,n[m],n[m+1],f);else for(let m=i-s;m>=t;m-=s)f=Bp(m/s|0,n[m],n[m+1],f);return f&&Ba(f,f.next)&&(Hl(f),f=f.next),f}function zs(n,t){if(!n)return n;t||(t=n);let i,s=n;do if(i=!1,s.steiner||!Ba(s,s.next)&&jr(s.prev,s,s.next)!==0)s=s.next;else{if(Hl(s),s=t=s.prev,s===s.next)break;i=!0}while(i||s!==t);return t}function ql(n,t,i,s,c,f,m){if(!n)return;!m&&f&&function(S,E,R,V){let q=S;do q.z===0&&(q.z=$h(q.x,q.y,E,R,V)),q.prevZ=q.prev,q.nextZ=q.next,q=q.next;while(q!==S);q.prevZ.nextZ=null,q.prevZ=null,function(H){let W,X=1;do{let re,ae=H;H=null;let Se=null;for(W=0;ae;){W++;let fe=ae,j=0;for(let ge=0;ge<X&&(j++,fe=fe.nextZ,fe);ge++);let $=X;for(;j>0||$>0&&fe;)j!==0&&($===0||!fe||ae.z<=fe.z)?(re=ae,ae=ae.nextZ,j--):(re=fe,fe=fe.nextZ,$--),Se?Se.nextZ=re:H=re,re.prevZ=Se,Se=re;ae=fe}Se.nextZ=null,X*=2}while(W>1)}(q)}(n,s,c,f);let v=n;for(;n.prev!==n.next;){const S=n.prev,E=n.next;if(f?Ny(n,s,c,f):Fy(n))t.push(S.i,n.i,E.i),Hl(n),n=E.next,v=E.next;else if((n=E)===v){m?m===1?ql(n=qy(zs(n),t),t,i,s,c,f,2):m===2&&Uy(n,t,i,s,c,f):ql(zs(n),t,i,s,c,f,1);break}}}function Fy(n){const t=n.prev,i=n,s=n.next;if(jr(t,i,s)>=0)return!1;const c=t.x,f=i.x,m=s.x,v=t.y,S=i.y,E=s.y,R=Math.min(c,f,m),V=Math.min(v,S,E),q=Math.max(c,f,m),H=Math.max(v,S,E);let W=s.next;for(;W!==t;){if(W.x>=R&&W.x<=q&&W.y>=V&&W.y<=H&&Ul(c,v,f,S,m,E,W.x,W.y)&&jr(W.prev,W,W.next)>=0)return!1;W=W.next}return!0}function Ny(n,t,i,s){const c=n.prev,f=n,m=n.next;if(jr(c,f,m)>=0)return!1;const v=c.x,S=f.x,E=m.x,R=c.y,V=f.y,q=m.y,H=Math.min(v,S,E),W=Math.min(R,V,q),X=Math.max(v,S,E),re=Math.max(R,V,q),ae=$h(H,W,t,i,s),Se=$h(X,re,t,i,s);let fe=n.prevZ,j=n.nextZ;for(;fe&&fe.z>=ae&&j&&j.z<=Se;){if(fe.x>=H&&fe.x<=X&&fe.y>=W&&fe.y<=re&&fe!==c&&fe!==m&&Ul(v,R,S,V,E,q,fe.x,fe.y)&&jr(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,j.x>=H&&j.x<=X&&j.y>=W&&j.y<=re&&j!==c&&j!==m&&Ul(v,R,S,V,E,q,j.x,j.y)&&jr(j.prev,j,j.next)>=0))return!1;j=j.nextZ}for(;fe&&fe.z>=ae;){if(fe.x>=H&&fe.x<=X&&fe.y>=W&&fe.y<=re&&fe!==c&&fe!==m&&Ul(v,R,S,V,E,q,fe.x,fe.y)&&jr(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;j&&j.z<=Se;){if(j.x>=H&&j.x<=X&&j.y>=W&&j.y<=re&&j!==c&&j!==m&&Ul(v,R,S,V,E,q,j.x,j.y)&&jr(j.prev,j,j.next)>=0)return!1;j=j.nextZ}return!0}function qy(n,t){let i=n;do{const s=i.prev,c=i.next.next;!Ba(s,c)&&Dp(s,i,i.next,c)&&jl(s,c)&&jl(c,s)&&(t.push(s.i,i.i,c.i),Hl(i),Hl(i.next),i=n=c),i=i.next}while(i!==n);return zs(i)}function Uy(n,t,i,s,c,f){let m=n;do{let v=m.next.next;for(;v!==m.prev;){if(m.i!==v.i&&Ky(m,v)){let S=zp(m,v);return m=zs(m,m.next),S=zs(S,S.next),ql(m,t,i,s,c,f,0),void ql(S,t,i,s,c,f,0)}v=v.next}m=m.next}while(m!==n)}function jy(n,t){let i=n.x-t.x;return i===0&&(i=n.y-t.y,i===0)&&(i=(n.next.y-n.y)/(n.next.x-n.x)-(t.next.y-t.y)/(t.next.x-t.x)),i}function Hy(n,t){const i=function(c,f){let m=f;const v=c.x,S=c.y;let E,R=-1/0;if(Ba(c,m))return m;do{if(Ba(c,m.next))return m.next;if(S<=m.y&&S>=m.next.y&&m.next.y!==m.y){const X=m.x+(S-m.y)*(m.next.x-m.x)/(m.next.y-m.y);if(X<=v&&X>R&&(R=X,E=m.x<m.next.x?m:m.next,X===v))return E}m=m.next}while(m!==f);if(!E)return null;const V=E,q=E.x,H=E.y;let W=1/0;m=E;do{if(v>=m.x&&m.x>=q&&v!==m.x&&Rp(S<H?v:R,S,q,H,S<H?R:v,S,m.x,m.y)){const X=Math.abs(S-m.y)/(v-m.x);jl(m,c)&&(X<W||X===W&&(m.x>E.x||m.x===E.x&&Wy(E,m)))&&(E=m,W=X)}m=m.next}while(m!==V);return E}(n,t);if(!i)return t;const s=zp(i,n);return zs(s,s.next),zs(i,i.next)}function Wy(n,t){return jr(n.prev,n,t.prev)<0&&jr(t.next,n,n.next)<0}function $h(n,t,i,s,c){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=(n-i)*c|0)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-s)*c|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Zy(n){let t=n,i=n;do(t.x<i.x||t.x===i.x&&t.y<i.y)&&(i=t),t=t.next;while(t!==n);return i}function Rp(n,t,i,s,c,f,m,v){return(c-m)*(t-v)>=(n-m)*(f-v)&&(n-m)*(s-v)>=(i-m)*(t-v)&&(i-m)*(f-v)>=(c-m)*(s-v)}function Ul(n,t,i,s,c,f,m,v){return!(n===m&&t===v)&&Rp(n,t,i,s,c,f,m,v)}function Ky(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!function(i,s){let c=i;do{if(c.i!==i.i&&c.next.i!==i.i&&c.i!==s.i&&c.next.i!==s.i&&Dp(c,c.next,i,s))return!0;c=c.next}while(c!==i);return!1}(n,t)&&(jl(n,t)&&jl(t,n)&&function(i,s){let c=i,f=!1;const m=(i.x+s.x)/2,v=(i.y+s.y)/2;do c.y>v!=c.next.y>v&&c.next.y!==c.y&&m<(c.next.x-c.x)*(v-c.y)/(c.next.y-c.y)+c.x&&(f=!f),c=c.next;while(c!==i);return f}(n,t)&&(jr(n.prev,n,t.prev)||jr(n,t.prev,t))||Ba(n,t)&&jr(n.prev,n,n.next)>0&&jr(t.prev,t,t.next)>0)}function jr(n,t,i){return(t.y-n.y)*(i.x-t.x)-(t.x-n.x)*(i.y-t.y)}function Ba(n,t){return n.x===t.x&&n.y===t.y}function Dp(n,t,i,s){const c=cu(jr(n,t,i)),f=cu(jr(n,t,s)),m=cu(jr(i,s,n)),v=cu(jr(i,s,t));return c!==f&&m!==v||!(c!==0||!lu(n,i,t))||!(f!==0||!lu(n,s,t))||!(m!==0||!lu(i,n,s))||!(v!==0||!lu(i,t,s))}function lu(n,t,i){return t.x<=Math.max(n.x,i.x)&&t.x>=Math.min(n.x,i.x)&&t.y<=Math.max(n.y,i.y)&&t.y>=Math.min(n.y,i.y)}function cu(n){return n>0?1:n<0?-1:0}function jl(n,t){return jr(n.prev,n,n.next)<0?jr(n,t,n.next)>=0&&jr(n,n.prev,t)>=0:jr(n,t,n.prev)<0||jr(n,n.next,t)<0}function zp(n,t){const i=ed(n.i,n.x,n.y),s=ed(t.i,t.x,t.y),c=n.next,f=t.prev;return n.next=t,t.prev=n,i.next=c,c.prev=i,s.next=i,i.prev=s,f.next=s,s.prev=f,s}function Bp(n,t,i,s){const c=ed(n,t,i);return s?(c.next=s.next,c.prev=s,s.next.prev=c,s.next=c):(c.prev=c,c.next=c),c}function Hl(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function ed(n,t,i){return{i:n,x:t,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class Va{constructor(t,i){if(i>t)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=t,this._minGranularity=i}getGranularityForZoomLevel(t){return Math.max(Math.floor(this._baseZoomGranularity/(1<<t)),this._minGranularity,1)}}class uu{constructor(t){this.fill=t.fill,this.line=t.line,this.tile=t.tile,this.stencil=t.stencil,this.circle=t.circle}}uu.noSubdivision=new uu({fill:new Va(0,0),line:new Va(0,0),tile:new Va(0,0),stencil:new Va(0,0),circle:1}),bt("SubdivisionGranularityExpression",Va),bt("SubdivisionGranularitySetting",uu);const Oa=-32768,Wl=32767;class Gy{constructor(t,i){this._vertexBuffer=[],this._vertexDictionary=new Map,this._used=!1,this._granularity=t,this._granularityCellSize=ar/t,this._canonical=i}_getKey(t,i){return(t+=32768)<<16|(i+=32768)<<0}_vertexToIndex(t,i){if(t<-32768||i<-32768||t>32767||i>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");const s=0|Math.round(t),c=0|Math.round(i),f=this._getKey(s,c);if(this._vertexDictionary.has(f))return this._vertexDictionary.get(f);const m=this._vertexBuffer.length/2;return this._vertexDictionary.set(f,m),this._vertexBuffer.push(s,c),m}_subdivideTrianglesScanline(t){if(this._granularity<2)return function(c,f){const m=[];for(let v=0;v<f.length;v+=3){const S=f[v],E=f[v+1],R=f[v+2],V=c[2*S],q=c[2*S+1];(c[2*E]-V)*(c[2*R+1]-q)-(c[2*E+1]-q)*(c[2*R]-V)>0?(m.push(S),m.push(R),m.push(E)):(m.push(S),m.push(E),m.push(R))}return m}(this._vertexBuffer,t);const i=[],s=t.length;for(let c=0;c<s;c+=3){const f=[t[c+0],t[c+1],t[c+2]],m=[this._vertexBuffer[2*t[c+0]+0],this._vertexBuffer[2*t[c+0]+1],this._vertexBuffer[2*t[c+1]+0],this._vertexBuffer[2*t[c+1]+1],this._vertexBuffer[2*t[c+2]+0],this._vertexBuffer[2*t[c+2]+1]];let v=1/0,S=1/0,E=-1/0,R=-1/0;for(let X=0;X<3;X++){const re=m[2*X],ae=m[2*X+1];v=Math.min(v,re),E=Math.max(E,re),S=Math.min(S,ae),R=Math.max(R,ae)}if(v===E||S===R)continue;const V=Math.floor(v/this._granularityCellSize),q=Math.ceil(E/this._granularityCellSize),H=Math.floor(S/this._granularityCellSize),W=Math.ceil(R/this._granularityCellSize);if(V!==q||H!==W)for(let X=H;X<W;X++){const re=this._scanlineGenerateVertexRingForCellRow(X,m,f);Jy(this._vertexBuffer,re,i)}else i.push(...f)}return i}_scanlineGenerateVertexRingForCellRow(t,i,s){const c=t*this._granularityCellSize,f=c+this._granularityCellSize,m=[];for(let v=0;v<3;v++){const S=i[2*v],E=i[2*v+1],R=i[2*(v+1)%6],V=i[(2*(v+1)+1)%6],q=i[2*(v+2)%6],H=i[(2*(v+2)+1)%6],W=R-S,X=V-E,re=W===0,ae=X===0,Se=(c-E)/X,fe=(f-E)/X,j=Math.min(Se,fe),$=Math.max(Se,fe);if(!ae&&(j>=1||$<=0)||ae&&(E<c||E>f)){V>=c&&V<=f&&m.push(s[(v+1)%3]);continue}!ae&&j>0&&m.push(this._vertexToIndex(S+W*j,E+X*j));const ge=S+W*Math.max(j,0),De=S+W*Math.min($,1);re||this._generateIntraEdgeVertices(m,S,E,R,V,ge,De),!ae&&$<1&&m.push(this._vertexToIndex(S+W*$,E+X*$)),(ae||V>=c&&V<=f)&&m.push(s[(v+1)%3]),!ae&&(V<=c||V>=f)&&this._generateInterEdgeVertices(m,S,E,R,V,q,H,De,c,f)}return m}_generateIntraEdgeVertices(t,i,s,c,f,m,v){const S=c-i,E=f-s,R=E===0,V=R?Math.min(i,c):Math.min(m,v),q=R?Math.max(i,c):Math.max(m,v),H=Math.floor(V/this._granularityCellSize)+1,W=Math.ceil(q/this._granularityCellSize)-1;if(R?i<c:m<v)for(let X=H;X<=W;X++){const re=X*this._granularityCellSize;t.push(this._vertexToIndex(re,s+E*(re-i)/S))}else for(let X=W;X>=H;X--){const re=X*this._granularityCellSize;t.push(this._vertexToIndex(re,s+E*(re-i)/S))}}_generateInterEdgeVertices(t,i,s,c,f,m,v,S,E,R){const V=f-s,q=m-c,H=v-f,W=(E-f)/H,X=(R-f)/H,re=Math.min(W,X),ae=Math.max(W,X),Se=c+q*re;let fe=Math.floor(Math.min(Se,S)/this._granularityCellSize)+1,j=Math.ceil(Math.max(Se,S)/this._granularityCellSize)-1,$=S<Se;const ge=H===0;if(ge&&(v===E||v===R))return;if(ge||re>=1||ae<=0){const $e=s-v,Oe=m+(i-m)*Math.min((E-v)/$e,(R-v)/$e);fe=Math.floor(Math.min(Oe,S)/this._granularityCellSize)+1,j=Math.ceil(Math.max(Oe,S)/this._granularityCellSize)-1,$=S<Oe}const De=V>0?R:E;if($)for(let $e=fe;$e<=j;$e++)t.push(this._vertexToIndex($e*this._granularityCellSize,De));else for(let $e=j;$e>=fe;$e--)t.push(this._vertexToIndex($e*this._granularityCellSize,De))}_generateOutline(t){const i=[];for(const s of t){const c=Bs(s,this._granularity,!0),f=this._pointArrayToIndices(c),m=[];for(let v=1;v<f.length;v++)m.push(f[v-1]),m.push(f[v]);i.push(m)}return i}_handlePoles(t){let i=!1,s=!1;this._canonical&&(this._canonical.y===0&&(i=!0),this._canonical.y===(1<<this._canonical.z)-1&&(s=!0)),(i||s)&&this._fillPoles(t,i,s)}_ensureNoPoleVertices(){const t=this._vertexBuffer;for(let i=0;i<t.length;i+=2){const s=t[i+1];s===Oa&&(t[i+1]=-32767),s===Wl&&(t[i+1]=32766)}}_generatePoleQuad(t,i,s,c,f,m){c>f!=(m===Oa)?(t.push(i),t.push(s),t.push(this._vertexToIndex(c,m)),t.push(s),t.push(this._vertexToIndex(f,m)),t.push(this._vertexToIndex(c,m))):(t.push(s),t.push(i),t.push(this._vertexToIndex(c,m)),t.push(this._vertexToIndex(f,m)),t.push(s),t.push(this._vertexToIndex(c,m)))}_fillPoles(t,i,s){const c=this._vertexBuffer,f=ar,m=t.length;for(let v=2;v<m;v+=3){const S=t[v-2],E=t[v-1],R=t[v],V=c[2*S],q=c[2*S+1],H=c[2*E],W=c[2*E+1],X=c[2*R],re=c[2*R+1];i&&(q===0&&W===0&&this._generatePoleQuad(t,S,E,V,H,Oa),W===0&&re===0&&this._generatePoleQuad(t,E,R,H,X,Oa),re===0&&q===0&&this._generatePoleQuad(t,R,S,X,V,Oa)),s&&(q===f&&W===f&&this._generatePoleQuad(t,S,E,V,H,Wl),W===f&&re===f&&this._generatePoleQuad(t,E,R,H,X,Wl),re===f&&q===f&&this._generatePoleQuad(t,R,S,X,V,Wl))}}_initializeVertices(t){for(let i=0;i<t.length;i+=2)this._vertexToIndex(t[i],t[i+1])}subdividePolygonInternal(t,i){if(this._used)throw new Error("Subdivision: multiple use not allowed.");this._used=!0;const{flattened:s,holeIndices:c}=function(v){const S=[],E=[];for(const R of v)if(R.length!==0){R!==v[0]&&S.push(E.length/2);for(let V=0;V<R.length;V++)E.push(R[V].x),E.push(R[V].y)}return{flattened:E,holeIndices:S}}(t);let f;this._initializeVertices(s);try{const v=function(E,R,V=2){const q=R&&R.length,H=q?R[0]*V:E.length;let W=Lp(E,0,H,V,!0);const X=[];if(!W||W.next===W.prev)return X;let re,ae,Se;if(q&&(W=function(fe,j,$,ge){const De=[];for(let $e=0,Oe=j.length;$e<Oe;$e++){const He=Lp(fe,j[$e]*ge,$e<Oe-1?j[$e+1]*ge:fe.length,ge,!1);He===He.next&&(He.steiner=!0),De.push(Zy(He))}De.sort(jy);for(let $e=0;$e<De.length;$e++)$=Hy(De[$e],$);return $}(E,R,W,V)),E.length>80*V){re=1/0,ae=1/0;let fe=-1/0,j=-1/0;for(let $=V;$<H;$+=V){const ge=E[$],De=E[$+1];ge<re&&(re=ge),De<ae&&(ae=De),ge>fe&&(fe=ge),De>j&&(j=De)}Se=Math.max(fe-re,j-ae),Se=Se!==0?32767/Se:0}return ql(W,X,V,re,ae,Se,0),X}(s,c),S=this._convertIndices(s,v);f=this._subdivideTrianglesScanline(S)}catch(v){console.error(v)}let m=[];return i&&(m=this._generateOutline(t)),this._ensureNoPoleVertices(),this._handlePoles(f),{verticesFlattened:this._vertexBuffer,indicesTriangles:f,indicesLineList:m}}_convertIndices(t,i){const s=[];for(let c=0;c<i.length;c++)s.push(this._vertexToIndex(t[2*i[c]],t[2*i[c]+1]));return s}_pointArrayToIndices(t){const i=[];for(let s=0;s<t.length;s++){const c=t[s];i.push(this._vertexToIndex(c.x,c.y))}return i}}function Vp(n,t,i,s=!0){return new Gy(i,t).subdividePolygonInternal(n,s)}function Bs(n,t,i=!1){if(!n||n.length<1)return[];if(n.length<2)return[];const s=n[0],c=n[n.length-1],f=i&&(s.x!==c.x||s.y!==c.y);if(t<2)return f?[...n,n[0]]:[...n];const m=Math.floor(ar/t),v=[];v.push(new T(n[0].x,n[0].y));const S=n.length,E=f?S:S-1;for(let R=0;R<E;R++){const V=n[R],q=R<S-1?n[R+1]:n[0],H=V.x,W=V.y,X=q.x,re=q.y,ae=H!==X,Se=W!==re;if(!ae&&!Se)continue;const fe=X-H,j=re-W,$=Math.abs(fe),ge=Math.abs(j);let De=H,$e=W;for(;;){const He=fe>0?(Math.floor(De/m)+1)*m:(Math.ceil(De/m)-1)*m,st=j>0?(Math.floor($e/m)+1)*m:(Math.ceil($e/m)-1)*m,et=Math.abs(De-He),lt=Math.abs($e-st),Ze=Math.abs(De-X),wt=Math.abs($e-re),Dt=ae?et/$:Number.POSITIVE_INFINITY,Lt=Se?lt/ge:Number.POSITIVE_INFINITY;if((Ze<=et||!ae)&&(wt<=lt||!Se))break;if(Dt<Lt&&ae||!Se){De=He,$e+=j*Dt;const Ct=new T(De,Math.round($e));v[v.length-1].x===Ct.x&&v[v.length-1].y===Ct.y||v.push(Ct)}else{De+=fe*Lt,$e=st;const Ct=new T(Math.round(De),$e);v[v.length-1].x===Ct.x&&v[v.length-1].y===Ct.y||v.push(Ct)}}const Oe=new T(X,re);v[v.length-1].x===Oe.x&&v[v.length-1].y===Oe.y||v.push(Oe)}return v}function Jy(n,t,i){if(t.length===0)throw new Error("Subdivision vertex ring is empty.");let s=0,c=n[2*t[0]];for(let S=1;S<t.length;S++){const E=n[2*t[S]];E<c&&(c=E,s=S)}const f=t.length;let m=s,v=(m+1)%f;for(;;){const S=m-1>=0?m-1:f-1,E=(v+1)%f,R=n[2*t[S]],V=n[2*t[E]],q=n[2*t[m]],H=n[2*t[m]+1],W=n[2*t[v]+1];let X=!1;if(R<V)X=!0;else if(R>V)X=!1;else{const re=W-H,ae=-(n[2*t[v]]-q),Se=H<W?1:-1;((R-q)*re+(n[2*t[S]+1]-H)*ae)*Se>((V-q)*re+(n[2*t[E]+1]-H)*ae)*Se&&(X=!0)}if(X){const re=t[S],ae=t[m],Se=t[v];re!==ae&&re!==Se&&ae!==Se&&i.push(Se,ae,re),m--,m<0&&(m=f-1)}else{const re=t[E],ae=t[m],Se=t[v];re!==ae&&re!==Se&&ae!==Se&&i.push(Se,ae,re),v++,v>=f&&(v=0)}if(S===E)break}}function Op(n,t,i,s,c,f,m,v,S){const E=c.length/2,R=m&&v&&S;if(E<hr.MAX_VERTEX_ARRAY_LENGTH){const V=t.prepareSegment(E,i,s),q=V.vertexLength;for(let X=0;X<f.length;X+=3)s.emplaceBack(q+f[X],q+f[X+1],q+f[X+2]);let H,W;V.vertexLength+=E,V.primitiveLength+=f.length/3,R&&(W=m.prepareSegment(E,i,v),H=W.vertexLength,W.vertexLength+=E);for(let X=0;X<c.length;X+=2)n(c[X],c[X+1]);if(R)for(let X=0;X<S.length;X++){const re=S[X];for(let ae=1;ae<re.length;ae+=2)v.emplaceBack(H+re[ae-1],H+re[ae]);W.primitiveLength+=re.length/2}}else(function(V,q,H,W,X,re){const ae=[];for(let ge=0;ge<W.length/2;ge++)ae.push(-1);const Se={count:0};let fe=0,j=V.getOrCreateLatestSegment(q,H),$=j.vertexLength;for(let ge=2;ge<X.length;ge+=3){const De=X[ge-2],$e=X[ge-1],Oe=X[ge];let He=ae[De]<fe,st=ae[$e]<fe,et=ae[Oe]<fe;j.vertexLength+((He?1:0)+(st?1:0)+(et?1:0))>hr.MAX_VERTEX_ARRAY_LENGTH&&(j=V.createNewSegment(q,H),fe=Se.count,He=!0,st=!0,et=!0,$=0);const lt=Zl(ae,W,re,Se,De,He,j),Ze=Zl(ae,W,re,Se,$e,st,j),wt=Zl(ae,W,re,Se,Oe,et,j);H.emplaceBack($+lt-fe,$+Ze-fe,$+wt-fe),j.primitiveLength++}})(t,i,s,c,f,n),R&&function(V,q,H,W,X,re){const ae=[];for(let ge=0;ge<W.length/2;ge++)ae.push(-1);const Se={count:0};let fe=0,j=V.getOrCreateLatestSegment(q,H),$=j.vertexLength;for(let ge=0;ge<X.length;ge++){const De=X[ge];for(let $e=1;$e<X[ge].length;$e+=2){const Oe=De[$e-1],He=De[$e];let st=ae[Oe]<fe,et=ae[He]<fe;j.vertexLength+((st?1:0)+(et?1:0))>hr.MAX_VERTEX_ARRAY_LENGTH&&(j=V.createNewSegment(q,H),fe=Se.count,st=!0,et=!0,$=0);const lt=Zl(ae,W,re,Se,Oe,st,j),Ze=Zl(ae,W,re,Se,He,et,j);H.emplaceBack($+lt-fe,$+Ze-fe),j.primitiveLength++}}}(m,i,v,c,S,n),t.forceNewSegmentOnNextPrepare(),m==null||m.forceNewSegmentOnNextPrepare()}function Zl(n,t,i,s,c,f,m){if(f){const v=s.count;return i(t[2*c],t[2*c+1]),n[c]=s.count,s.count++,m.vertexLength++,v}return n[c]}class td{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new dt,this.indexArray=new ur,this.indexArray2=new Qr,this.programConfigurations=new no(t.layers,t.zoom),this.segments=new hr,this.segments2=new hr,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.hasPattern=Qh("fill",this.layers,i);const c=this.layers[0].layout.get("fill-sort-key"),f=!c.isConstant(),m=[];for(const{feature:v,id:S,index:E,sourceLayerIndex:R}of t){const V=this.layers[0]._featureFilter.needGeometry,q=Rs(v,V);if(!this.layers[0]._featureFilter.filter(new kr(this.zoom),q,s))continue;const H=f?c.evaluate(q,{},s,i.availableImages):void 0,W={id:S,properties:v.properties,type:v.type,sourceLayerIndex:R,index:E,geometry:V?q.geometry:Ls(v),patterns:{},sortKey:H};m.push(W)}f&&m.sort((v,S)=>v.sortKey-S.sortKey);for(const v of m){const{geometry:S,index:E,sourceLayerIndex:R}=v;if(this.hasPattern){const V=Yh("fill",this.layers,v,this.zoom,i);this.patternFeatures.push(V)}else this.addFeature(v,S,E,s,{},i.subdivisionGranularity);i.featureIndex.insert(t[E].feature,S,E,R,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}addFeatures(t,i,s){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,i,s,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Oy),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),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(t,i,s,c,f,m){for(const v of sa(i,500)){const S=Vp(v,c,m.fill.getGranularityForZoomLevel(c.z)),E=this.layoutVertexArray;Op((R,V)=>{E.emplaceBack(R,V)},this.segments,this.layoutVertexArray,this.indexArray,S.verticesFlattened,S.indicesTriangles,this.segments2,this.indexArray2,S.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,f,c)}}let Fp,Np;bt("FillBucket",td,{omit:["layers","patternFeatures"]});var Xy={get paint(){return Np=Np||new Hr({"fill-antialias":new Tt(Y.paint_fill["fill-antialias"]),"fill-opacity":new Ft(Y.paint_fill["fill-opacity"]),"fill-color":new Ft(Y.paint_fill["fill-color"]),"fill-outline-color":new Ft(Y.paint_fill["fill-outline-color"]),"fill-translate":new Tt(Y.paint_fill["fill-translate"]),"fill-translate-anchor":new Tt(Y.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ts(Y.paint_fill["fill-pattern"])})},get layout(){return Fp=Fp||new Hr({"fill-sort-key":new Ft(Y.layout_fill["fill-sort-key"])})}};class Qy extends Qi{constructor(t){super(t,Xy)}recalculate(t,i){super.recalculate(t,i);const s=this.paint._values["fill-outline-color"];s.value.kind==="constant"&&s.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(t){return new td(t)}queryRadius(){return su(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:t,geometry:i,transform:s,pixelsToTileUnits:c}){return bp(au(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-s.bearingInRadians,c),i)}isTileClipped(){return!0}}const Yy=Mr([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),$y=Mr([{name:"a_centroid",components:2,type:"Int16"}],4),{members:e_}=Yy;var rd,qp,id,Up,nd,jp,Hp,hu={};function Wp(){if(qp)return rd;qp=1;var n=O();function t(c,f,m,v,S){this.properties={},this.extent=m,this.type=0,this._pbf=c,this._geometry=-1,this._keys=v,this._values=S,c.readFields(i,this,f)}function i(c,f,m){c==1?f.id=m.readVarint():c==2?function(v,S){for(var E=v.readVarint()+v.pos;v.pos<E;){var R=S._keys[v.readVarint()],V=S._values[v.readVarint()];S.properties[R]=V}}(m,f):c==3?f.type=m.readVarint():c==4&&(f._geometry=m.pos)}function s(c){for(var f,m,v=0,S=0,E=c.length,R=E-1;S<E;R=S++)v+=((m=c[R]).x-(f=c[S]).x)*(f.y+m.y);return v}return rd=t,t.types=["Unknown","Point","LineString","Polygon"],t.prototype.loadGeometry=function(){var c=this._pbf;c.pos=this._geometry;for(var f,m=c.readVarint()+c.pos,v=1,S=0,E=0,R=0,V=[];c.pos<m;){if(S<=0){var q=c.readVarint();v=7&q,S=q>>3}if(S--,v===1||v===2)E+=c.readSVarint(),R+=c.readSVarint(),v===1&&(f&&V.push(f),f=[]),f.push(new n(E,R));else{if(v!==7)throw new Error("unknown command "+v);f&&f.push(f[0].clone())}}return f&&V.push(f),V},t.prototype.bbox=function(){var c=this._pbf;c.pos=this._geometry;for(var f=c.readVarint()+c.pos,m=1,v=0,S=0,E=0,R=1/0,V=-1/0,q=1/0,H=-1/0;c.pos<f;){if(v<=0){var W=c.readVarint();m=7&W,v=W>>3}if(v--,m===1||m===2)(S+=c.readSVarint())<R&&(R=S),S>V&&(V=S),(E+=c.readSVarint())<q&&(q=E),E>H&&(H=E);else if(m!==7)throw new Error("unknown command "+m)}return[R,q,V,H]},t.prototype.toGeoJSON=function(c,f,m){var v,S,E=this.extent*Math.pow(2,m),R=this.extent*c,V=this.extent*f,q=this.loadGeometry(),H=t.types[this.type];function W(ae){for(var Se=0;Se<ae.length;Se++){var fe=ae[Se];ae[Se]=[360*(fe.x+R)/E-180,360/Math.PI*Math.atan(Math.exp((180-360*(fe.y+V)/E)*Math.PI/180))-90]}}switch(this.type){case 1:var X=[];for(v=0;v<q.length;v++)X[v]=q[v][0];W(q=X);break;case 2:for(v=0;v<q.length;v++)W(q[v]);break;case 3:for(q=function(ae){var Se=ae.length;if(Se<=1)return[ae];for(var fe,j,$=[],ge=0;ge<Se;ge++){var De=s(ae[ge]);De!==0&&(j===void 0&&(j=De<0),j===De<0?(fe&&$.push(fe),fe=[ae[ge]]):fe.push(ae[ge]))}return fe&&$.push(fe),$}(q),v=0;v<q.length;v++)for(S=0;S<q[v].length;S++)W(q[v][S])}q.length===1?q=q[0]:H="Multi"+H;var re={type:"Feature",geometry:{type:H,coordinates:q},properties:this.properties};return"id"in this&&(re.id=this.id),re},rd}function Zp(){if(Up)return id;Up=1;var n=Wp();function t(s,c){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=s,this._keys=[],this._values=[],this._features=[],s.readFields(i,this,c),this.length=this._features.length}function i(s,c,f){s===15?c.version=f.readVarint():s===1?c.name=f.readString():s===5?c.extent=f.readVarint():s===2?c._features.push(f.pos):s===3?c._keys.push(f.readString()):s===4&&c._values.push(function(m){for(var v=null,S=m.readVarint()+m.pos;m.pos<S;){var E=m.readVarint()>>3;v=E===1?m.readString():E===2?m.readFloat():E===3?m.readDouble():E===4?m.readVarint64():E===5?m.readVarint():E===6?m.readSVarint():E===7?m.readBoolean():null}return v}(f))}return id=t,t.prototype.feature=function(s){if(s<0||s>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[s];var c=this._pbf.readVarint()+this._pbf.pos;return new n(this._pbf,c,this.extent,this._keys,this._values)},id}function Kp(){return Hp||(Hp=1,hu.VectorTile=function(){if(jp)return nd;jp=1;var n=Zp();function t(i,s,c){if(i===3){var f=new n(c,c.readVarint()+c.pos);f.length&&(s[f.name]=f)}}return nd=function(i,s){this.layers=i.readFields(t,{},s)},nd}(),hu.VectorTileFeature=Wp(),hu.VectorTileLayer=Zp()),hu}var Kl=B(Kp());const t_=Kl.VectorTileFeature.types,od=Math.pow(2,13);function Gl(n,t,i,s,c,f,m,v){n.emplaceBack(t,i,2*Math.floor(s*od)+m,c*od*2,f*od*2,Math.round(v))}class sd{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new tt,this.centroidVertexArray=new je,this.indexArray=new ur,this.programConfigurations=new no(t.layers,t.zoom),this.segments=new hr,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.features=[],this.hasPattern=Qh("fill-extrusion",this.layers,i);for(const{feature:c,id:f,index:m,sourceLayerIndex:v}of t){const S=this.layers[0]._featureFilter.needGeometry,E=Rs(c,S);if(!this.layers[0]._featureFilter.filter(new kr(this.zoom),E,s))continue;const R={id:f,sourceLayerIndex:v,index:m,geometry:S?E.geometry:Ls(c),properties:c.properties,type:c.type,patterns:{}};this.hasPattern?this.features.push(Yh("fill-extrusion",this.layers,R,this.zoom,i)):this.addFeature(R,R.geometry,m,s,{},i.subdivisionGranularity),i.featureIndex.insert(c,R.geometry,m,v,this.index,!0)}}addFeatures(t,i,s){for(const c of this.features){const{geometry:f}=c;this.addFeature(c,f,c.index,i,s,t.subdivisionGranularity)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,e_),this.centroidVertexBuffer=t.createVertexBuffer(this.centroidVertexArray,$y.members,!0),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(t,i,s,c,f,m){for(const v of sa(i,500)){const S={x:0,y:0,sampleCount:0},E=this.layoutVertexArray.length;this.processPolygon(S,c,t,v,m);const R=this.layoutVertexArray.length-E,V=Math.floor(S.x/S.sampleCount),q=Math.floor(S.y/S.sampleCount);for(let H=0;H<R;H++)this.centroidVertexArray.emplaceBack(V,q)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,f,c)}processPolygon(t,i,s,c,f){if(c.length<1||Gp(c[0]))return;for(const V of c)V.length!==0&&r_(t,V);const m={segment:this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray)},v=f.fill.getGranularityForZoomLevel(i.z),S=t_[s.type]==="Polygon";for(const V of c){if(V.length===0||Gp(V))continue;const q=Bs(V,v,S);this._generateSideFaces(q,m)}if(!S)return;const E=Vp(c,i,v,!1),R=this.layoutVertexArray;Op((V,q)=>{Gl(R,V,q,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,E.verticesFlattened,E.indicesTriangles)}_generateSideFaces(t,i){let s=0;for(let c=1;c<t.length;c++){const f=t[c],m=t[c-1];if(i_(f,m))continue;i.segment.vertexLength+4>hr.MAX_VERTEX_ARRAY_LENGTH&&(i.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const v=f.sub(m)._perp()._unit(),S=m.dist(f);s+S>32768&&(s=0),Gl(this.layoutVertexArray,f.x,f.y,v.x,v.y,0,0,s),Gl(this.layoutVertexArray,f.x,f.y,v.x,v.y,0,1,s),s+=S,Gl(this.layoutVertexArray,m.x,m.y,v.x,v.y,0,0,s),Gl(this.layoutVertexArray,m.x,m.y,v.x,v.y,0,1,s);const E=i.segment.vertexLength;this.indexArray.emplaceBack(E,E+2,E+1),this.indexArray.emplaceBack(E+1,E+2,E+3),i.segment.vertexLength+=4,i.segment.primitiveLength+=2}}}function r_(n,t){for(let i=0;i<t.length;i++){const s=t[i];i===t.length-1&&t[0].x===s.x&&t[0].y===s.y||(n.x+=s.x,n.y+=s.y,n.sampleCount++)}}function i_(n,t){return n.x===t.x&&(n.x<0||n.x>ar)||n.y===t.y&&(n.y<0||n.y>ar)}function Gp(n){return n.every(t=>t.x<0)||n.every(t=>t.x>ar)||n.every(t=>t.y<0)||n.every(t=>t.y>ar)}let Jp;bt("FillExtrusionBucket",sd,{omit:["layers","features"]});var n_={get paint(){return Jp=Jp||new Hr({"fill-extrusion-opacity":new Tt(Y["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Ft(Y["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Tt(Y["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Tt(Y["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ts(Y["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Ft(Y["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Ft(Y["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Tt(Y["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class o_ extends Qi{constructor(t){super(t,n_)}createBucket(t){return new sd(t)}queryRadius(){return su(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:f,pixelsToTileUnits:m,pixelPosMatrix:v}){const S=au(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-f.bearingInRadians,m),E=this.paint.get("fill-extrusion-height").evaluate(i,s),R=this.paint.get("fill-extrusion-base").evaluate(i,s),V=function(H,W,X){const re=[];for(const ae of H){const Se=[ae.x,ae.y,0,1];Qt(Se,Se,W),re.push(new T(Se[0]/Se[3],Se[1]/Se[3]))}return re}(S,v),q=function(H,W,X,re){const ae=[],Se=[],fe=re[8]*W,j=re[9]*W,$=re[10]*W,ge=re[11]*W,De=re[8]*X,$e=re[9]*X,Oe=re[10]*X,He=re[11]*X;for(const st of H){const et=[],lt=[];for(const Ze of st){const wt=Ze.x,Dt=Ze.y,Lt=re[0]*wt+re[4]*Dt+re[12],Ct=re[1]*wt+re[5]*Dt+re[13],ir=re[2]*wt+re[6]*Dt+re[14],Fr=re[3]*wt+re[7]*Dt+re[15],$r=ir+$,Ci=Fr+ge,dn=Lt+De,ji=Ct+$e,xi=ir+Oe,zr=Fr+He,ui=new T((Lt+fe)/Ci,(Ct+j)/Ci);ui.z=$r/Ci,et.push(ui);const bi=new T(dn/zr,ji/zr);bi.z=xi/zr,lt.push(bi)}ae.push(et),Se.push(lt)}return[ae,Se]}(c,R,E,v);return function(H,W,X){let re=1/0;bp(X,W)&&(re=Xp(X,W[0]));for(let ae=0;ae<W.length;ae++){const Se=W[ae],fe=H[ae];for(let j=0;j<Se.length-1;j++){const $=Se[j],ge=[$,Se[j+1],fe[j+1],fe[j],$];xp(X,ge)&&(re=Math.min(re,Xp(X,ge)))}}return re!==1/0&&re}(q[0],q[1],V)}}function Jl(n,t){return n.x*t.x+n.y*t.y}function Xp(n,t){if(n.length===1){let i=0;const s=t[i++];let c;for(;!c||s.equals(c);)if(c=t[i++],!c)return 1/0;for(;i<t.length;i++){const f=t[i],m=n[0],v=c.sub(s),S=f.sub(s),E=m.sub(s),R=Jl(v,v),V=Jl(v,S),q=Jl(S,S),H=Jl(E,v),W=Jl(E,S),X=R*q-V*V,re=(q*H-V*W)/X,ae=(R*W-V*H)/X,Se=s.z*(1-re-ae)+c.z*re+f.z*ae;if(isFinite(Se))return Se}return 1/0}{let i=1/0;for(const s of t)i=Math.min(i,s.z);return i}}const s_=Mr([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:a_}=s_,l_=Mr([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:c_}=l_,u_=Kl.VectorTileFeature.types,h_=Math.cos(Math.PI/180*37.5),Qp=Math.pow(2,14)/.5;class ad{constructor(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(i=>i.id),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(i=>{this.gradients[i.id]={}}),this.layoutVertexArray=new kt,this.layoutVertexArray2=new Xt,this.indexArray=new ur,this.programConfigurations=new no(t.layers,t.zoom),this.segments=new hr,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(i=>i.isStateDependent()).map(i=>i.id)}populate(t,i,s){this.hasPattern=Qh("line",this.layers,i);const c=this.layers[0].layout.get("line-sort-key"),f=!c.isConstant(),m=[];for(const{feature:v,id:S,index:E,sourceLayerIndex:R}of t){const V=this.layers[0]._featureFilter.needGeometry,q=Rs(v,V);if(!this.layers[0]._featureFilter.filter(new kr(this.zoom),q,s))continue;const H=f?c.evaluate(q,{},s):void 0,W={id:S,properties:v.properties,type:v.type,sourceLayerIndex:R,index:E,geometry:V?q.geometry:Ls(v),patterns:{},sortKey:H};m.push(W)}f&&m.sort((v,S)=>v.sortKey-S.sortKey);for(const v of m){const{geometry:S,index:E,sourceLayerIndex:R}=v;if(this.hasPattern){const V=Yh("line",this.layers,v,this.zoom,i);this.patternFeatures.push(V)}else this.addFeature(v,S,E,s,{},i.subdivisionGranularity);i.featureIndex.insert(t[E].feature,S,E,R,this.index)}}update(t,i,s){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,i,this.stateDependentLayers,s)}addFeatures(t,i,s){for(const c of this.patternFeatures)this.addFeature(c,c.geometry,c.index,i,s,t.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(t){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=t.createVertexBuffer(this.layoutVertexArray2,c_)),this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,a_),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(t){if(t.properties&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(t.properties,"mapbox_clip_end"))return{start:+t.properties.mapbox_clip_start,end:+t.properties.mapbox_clip_end}}addFeature(t,i,s,c,f,m){const v=this.layers[0].layout,S=v.get("line-join").evaluate(t,{}),E=v.get("line-cap"),R=v.get("line-miter-limit"),V=v.get("line-round-limit");this.lineClips=this.lineFeatureClips(t);for(const q of i)this.addLine(q,t,S,E,R,V,c,m);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,s,f,c)}addLine(t,i,s,c,f,m,v,S){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,t=Bs(t,v?S.line.getGranularityForZoomLevel(v.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let fe=0;fe<t.length-1;fe++)this.totalDistance+=t[fe].dist(t[fe+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const E=u_[i.type]==="Polygon";let R=t.length;for(;R>=2&&t[R-1].equals(t[R-2]);)R--;let V=0;for(;V<R-1&&t[V].equals(t[V+1]);)V++;if(R<(E?3:2))return;s==="bevel"&&(f=1.05);const q=this.overscaling<=16?15*ar/(512*this.overscaling):0,H=this.segments.prepareSegment(10*R,this.layoutVertexArray,this.indexArray);let W,X,re,ae,Se;this.e1=this.e2=-1,E&&(W=t[R-2],Se=t[V].sub(W)._unit()._perp());for(let fe=V;fe<R;fe++){if(re=fe===R-1?E?t[V+1]:void 0:t[fe+1],re&&t[fe].equals(re))continue;Se&&(ae=Se),W&&(X=W),W=t[fe],Se=re?re.sub(W)._unit()._perp():ae,ae=ae||Se;let j=ae.add(Se);j.x===0&&j.y===0||j._unit();const $=ae.x*Se.x+ae.y*Se.y,ge=j.x*Se.x+j.y*Se.y,De=ge!==0?1/ge:1/0,$e=2*Math.sqrt(2-2*ge),Oe=ge<h_&&X&&re,He=ae.x*Se.y-ae.y*Se.x>0;if(Oe&&fe>V){const lt=W.dist(X);if(lt>2*q){const Ze=W.sub(W.sub(X)._mult(q/lt)._round());this.updateDistance(X,Ze),this.addCurrentVertex(Ze,ae,0,0,H),X=Ze}}const st=X&&re;let et=st?s:E?"butt":c;if(st&&et==="round"&&(De<m?et="miter":De<=2&&(et="fakeround")),et==="miter"&&De>f&&(et="bevel"),et==="bevel"&&(De>2&&(et="flipbevel"),De<f&&(et="miter")),X&&this.updateDistance(X,W),et==="miter")j._mult(De),this.addCurrentVertex(W,j,0,0,H);else if(et==="flipbevel"){if(De>100)j=Se.mult(-1);else{const lt=De*ae.add(Se).mag()/ae.sub(Se).mag();j._perp()._mult(lt*(He?-1:1))}this.addCurrentVertex(W,j,0,0,H),this.addCurrentVertex(W,j.mult(-1),0,0,H)}else if(et==="bevel"||et==="fakeround"){const lt=-Math.sqrt(De*De-1),Ze=He?lt:0,wt=He?0:lt;if(X&&this.addCurrentVertex(W,ae,Ze,wt,H),et==="fakeround"){const Dt=Math.round(180*$e/Math.PI/20);for(let Lt=1;Lt<Dt;Lt++){let Ct=Lt/Dt;if(Ct!==.5){const Fr=Ct-.5;Ct+=Ct*Fr*(Ct-1)*((1.0904+$*($*(3.55645-1.43519*$)-3.2452))*Fr*Fr+(.848013+$*(.215638*$-1.06021)))}const ir=Se.sub(ae)._mult(Ct)._add(ae)._unit()._mult(He?-1:1);this.addHalfVertex(W,ir.x,ir.y,!1,He,0,H)}}re&&this.addCurrentVertex(W,Se,-Ze,-wt,H)}else if(et==="butt")this.addCurrentVertex(W,j,0,0,H);else if(et==="square"){const lt=X?1:-1;this.addCurrentVertex(W,j,lt,lt,H)}else et==="round"&&(X&&(this.addCurrentVertex(W,ae,0,0,H),this.addCurrentVertex(W,ae,1,1,H,!0)),re&&(this.addCurrentVertex(W,Se,-1,-1,H,!0),this.addCurrentVertex(W,Se,0,0,H)));if(Oe&&fe<R-1){const lt=W.dist(re);if(lt>2*q){const Ze=W.add(re.sub(W)._mult(q/lt)._round());this.updateDistance(W,Ze),this.addCurrentVertex(Ze,Se,0,0,H),W=Ze}}}}addCurrentVertex(t,i,s,c,f,m=!1){const v=i.y*c-i.x,S=-i.y-i.x*c;this.addHalfVertex(t,i.x+i.y*s,i.y-i.x*s,m,!1,s,f),this.addHalfVertex(t,v,S,m,!0,-c,f),this.distance>Qp/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(t,i,s,c,f,m))}addHalfVertex({x:t,y:i},s,c,f,m,v,S){const E=.5*(this.lineClips?this.scaledDistance*(Qp-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((t<<1)+(f?1:0),(i<<1)+(m?1:0),Math.round(63*s)+128,Math.round(63*c)+128,1+(v===0?0:v<0?-1:1)|(63&E)<<2,E>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const R=S.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,R,this.e2),S.primitiveLength++),m?this.e2=R:this.e1=R}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(t,i){this.distance+=t.dist(i),this.updateScaledDistance()}}let Yp,$p;bt("LineBucket",ad,{omit:["layers","patternFeatures"]});var ef={get paint(){return $p=$p||new Hr({"line-opacity":new Ft(Y.paint_line["line-opacity"]),"line-color":new Ft(Y.paint_line["line-color"]),"line-translate":new Tt(Y.paint_line["line-translate"]),"line-translate-anchor":new Tt(Y.paint_line["line-translate-anchor"]),"line-width":new Ft(Y.paint_line["line-width"]),"line-gap-width":new Ft(Y.paint_line["line-gap-width"]),"line-offset":new Ft(Y.paint_line["line-offset"]),"line-blur":new Ft(Y.paint_line["line-blur"]),"line-dasharray":new Ml(Y.paint_line["line-dasharray"]),"line-pattern":new Ts(Y.paint_line["line-pattern"]),"line-gradient":new Ll(Y.paint_line["line-gradient"])})},get layout(){return Yp=Yp||new Hr({"line-cap":new Tt(Y.layout_line["line-cap"]),"line-join":new Ft(Y.layout_line["line-join"]),"line-miter-limit":new Tt(Y.layout_line["line-miter-limit"]),"line-round-limit":new Tt(Y.layout_line["line-round-limit"]),"line-sort-key":new Ft(Y.layout_line["line-sort-key"])})}};class d_ extends Ft{possiblyEvaluate(t,i){return i=new kr(Math.floor(i.zoom),{now:i.now,fadeDuration:i.fadeDuration,zoomHistory:i.zoomHistory,transition:i.transition}),super.possiblyEvaluate(t,i)}evaluate(t,i,s,c){return i=ri({},i,{zoom:Math.floor(i.zoom)}),super.evaluate(t,i,s,c)}}let du;class p_ extends Qi{constructor(t){super(t,ef),this.gradientVersion=0,du||(du=new d_(ef.paint.properties["line-width"].specification),du.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(t){if(t==="line-gradient"){const i=this.gradientExpression();this.stepInterpolant=!!function(s){return s._styleExpression!==void 0}(i)&&i._styleExpression.expression instanceof Xn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(t,i){super.recalculate(t,i),this.paint._values["line-floorwidth"]=du.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,t)}createBucket(t){return new ad(t)}queryRadius(t){const i=t,s=tf(Fl("line-width",this,i),Fl("line-gap-width",this,i)),c=Fl("line-offset",this,i);return s/2+Math.abs(c)+su(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:t,feature:i,featureState:s,geometry:c,transform:f,pixelsToTileUnits:m}){const v=au(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-f.bearingInRadians,m),S=m/2*tf(this.paint.get("line-width").evaluate(i,s),this.paint.get("line-gap-width").evaluate(i,s)),E=this.paint.get("line-offset").evaluate(i,s);return E&&(c=function(R,V){const q=[];for(let H=0;H<R.length;H++){const W=R[H],X=[];for(let re=0;re<W.length;re++){const ae=W[re-1],Se=W[re],fe=W[re+1],j=re===0?new T(0,0):Se.sub(ae)._unit()._perp(),$=re===W.length-1?new T(0,0):fe.sub(Se)._unit()._perp(),ge=j._add($)._unit(),De=ge.x*$.x+ge.y*$.y;De!==0&&ge._mult(1/De),X.push(ge._mult(V)._add(Se))}q.push(X)}return q}(c,E*m)),function(R,V,q){for(let H=0;H<V.length;H++){const W=V[H];if(R.length>=3){for(let X=0;X<W.length;X++)if(Ds(R,W[X]))return!0}if(Ey(R,W,q))return!0}return!1}(v,c,S)}isTileClipped(){return!0}}function tf(n,t){return t>0?t+2*n:n}const f_=Mr([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),m_=Mr([{name:"a_projected_pos",components:3,type:"Float32"}],4);Mr([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const g_=Mr([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Mr([{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 rf=Mr([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),y_=Mr([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function __(n,t,i){return n.sections.forEach(s=>{s.text=function(c,f,m){const v=f.layout.get("text-transform").evaluate(m,{});return v==="uppercase"?c=c.toLocaleUpperCase():v==="lowercase"&&(c=c.toLocaleLowerCase()),Bn.applyArabicShaping&&(c=Bn.applyArabicShaping(c)),c}(s.text,t,i)}),n}Mr([{name:"triangle",components:3,type:"Uint16"}]),Mr([{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"}]),Mr([{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"}]),Mr([{type:"Float32",name:"offsetX"}]),Mr([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Mr([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Xl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var nf,ld,of,Yr=24,cd={};function v_(){return nf||(nf=1,cd.read=function(n,t,i,s,c){var f,m,v=8*c-s-1,S=(1<<v)-1,E=S>>1,R=-7,V=i?c-1:0,q=i?-1:1,H=n[t+V];for(V+=q,f=H&(1<<-R)-1,H>>=-R,R+=v;R>0;f=256*f+n[t+V],V+=q,R-=8);for(m=f&(1<<-R)-1,f>>=-R,R+=s;R>0;m=256*m+n[t+V],V+=q,R-=8);if(f===0)f=1-E;else{if(f===S)return m?NaN:1/0*(H?-1:1);m+=Math.pow(2,s),f-=E}return(H?-1:1)*m*Math.pow(2,f-s)},cd.write=function(n,t,i,s,c,f){var m,v,S,E=8*f-c-1,R=(1<<E)-1,V=R>>1,q=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,H=s?0:f-1,W=s?1:-1,X=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(v=isNaN(t)?1:0,m=R):(m=Math.floor(Math.log(t)/Math.LN2),t*(S=Math.pow(2,-m))<1&&(m--,S*=2),(t+=m+V>=1?q/S:q*Math.pow(2,1-V))*S>=2&&(m++,S/=2),m+V>=R?(v=0,m=R):m+V>=1?(v=(t*S-1)*Math.pow(2,c),m+=V):(v=t*Math.pow(2,V-1)*Math.pow(2,c),m=0));c>=8;n[i+H]=255&v,H+=W,v/=256,c-=8);for(m=m<<c|v,E+=c;E>0;n[i+H]=255&m,H+=W,m/=256,E-=8);n[i+H-W]|=128*X}),cd}function sf(){if(of)return ld;of=1,ld=t;var n=v_();function t(j){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(j)?j:new Uint8Array(j||0),this.pos=0,this.type=0,this.length=this.buf.length}t.Varint=0,t.Fixed64=1,t.Bytes=2,t.Fixed32=5;var i=4294967296,s=1/i,c=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function f(j){return j.type===t.Bytes?j.readVarint()+j.pos:j.pos+1}function m(j,$,ge){return ge?4294967296*$+(j>>>0):4294967296*($>>>0)+(j>>>0)}function v(j,$,ge){var De=$<=16383?1:$<=2097151?2:$<=268435455?3:Math.floor(Math.log($)/(7*Math.LN2));ge.realloc(De);for(var $e=ge.pos-1;$e>=j;$e--)ge.buf[$e+De]=ge.buf[$e]}function S(j,$){for(var ge=0;ge<j.length;ge++)$.writeVarint(j[ge])}function E(j,$){for(var ge=0;ge<j.length;ge++)$.writeSVarint(j[ge])}function R(j,$){for(var ge=0;ge<j.length;ge++)$.writeFloat(j[ge])}function V(j,$){for(var ge=0;ge<j.length;ge++)$.writeDouble(j[ge])}function q(j,$){for(var ge=0;ge<j.length;ge++)$.writeBoolean(j[ge])}function H(j,$){for(var ge=0;ge<j.length;ge++)$.writeFixed32(j[ge])}function W(j,$){for(var ge=0;ge<j.length;ge++)$.writeSFixed32(j[ge])}function X(j,$){for(var ge=0;ge<j.length;ge++)$.writeFixed64(j[ge])}function re(j,$){for(var ge=0;ge<j.length;ge++)$.writeSFixed64(j[ge])}function ae(j,$){return(j[$]|j[$+1]<<8|j[$+2]<<16)+16777216*j[$+3]}function Se(j,$,ge){j[ge]=$,j[ge+1]=$>>>8,j[ge+2]=$>>>16,j[ge+3]=$>>>24}function fe(j,$){return(j[$]|j[$+1]<<8|j[$+2]<<16)+(j[$+3]<<24)}return t.prototype={destroy:function(){this.buf=null},readFields:function(j,$,ge){for(ge=ge||this.length;this.pos<ge;){var De=this.readVarint(),$e=De>>3,Oe=this.pos;this.type=7&De,j($e,$,this),this.pos===Oe&&this.skip(De)}return $},readMessage:function(j,$){return this.readFields(j,$,this.readVarint()+this.pos)},readFixed32:function(){var j=ae(this.buf,this.pos);return this.pos+=4,j},readSFixed32:function(){var j=fe(this.buf,this.pos);return this.pos+=4,j},readFixed64:function(){var j=ae(this.buf,this.pos)+ae(this.buf,this.pos+4)*i;return this.pos+=8,j},readSFixed64:function(){var j=ae(this.buf,this.pos)+fe(this.buf,this.pos+4)*i;return this.pos+=8,j},readFloat:function(){var j=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,j},readDouble:function(){var j=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,j},readVarint:function(j){var $,ge,De=this.buf;return $=127&(ge=De[this.pos++]),ge<128?$:($|=(127&(ge=De[this.pos++]))<<7,ge<128?$:($|=(127&(ge=De[this.pos++]))<<14,ge<128?$:($|=(127&(ge=De[this.pos++]))<<21,ge<128?$:function($e,Oe,He){var st,et,lt=He.buf;if(st=(112&(et=lt[He.pos++]))>>4,et<128||(st|=(127&(et=lt[He.pos++]))<<3,et<128)||(st|=(127&(et=lt[He.pos++]))<<10,et<128)||(st|=(127&(et=lt[He.pos++]))<<17,et<128)||(st|=(127&(et=lt[He.pos++]))<<24,et<128)||(st|=(1&(et=lt[He.pos++]))<<31,et<128))return m($e,st,Oe);throw new Error("Expected varint not more than 10 bytes")}($|=(15&(ge=De[this.pos]))<<28,j,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var j=this.readVarint();return j%2==1?(j+1)/-2:j/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var j=this.readVarint()+this.pos,$=this.pos;return this.pos=j,j-$>=12&&c?function(ge,De,$e){return c.decode(ge.subarray(De,$e))}(this.buf,$,j):function(ge,De,$e){for(var Oe="",He=De;He<$e;){var st,et,lt,Ze=ge[He],wt=null,Dt=Ze>239?4:Ze>223?3:Ze>191?2:1;if(He+Dt>$e)break;Dt===1?Ze<128&&(wt=Ze):Dt===2?(192&(st=ge[He+1]))==128&&(wt=(31&Ze)<<6|63&st)<=127&&(wt=null):Dt===3?(et=ge[He+2],(192&(st=ge[He+1]))==128&&(192&et)==128&&((wt=(15&Ze)<<12|(63&st)<<6|63&et)<=2047||wt>=55296&&wt<=57343)&&(wt=null)):Dt===4&&(et=ge[He+2],lt=ge[He+3],(192&(st=ge[He+1]))==128&&(192&et)==128&&(192&lt)==128&&((wt=(15&Ze)<<18|(63&st)<<12|(63&et)<<6|63&lt)<=65535||wt>=1114112)&&(wt=null)),wt===null?(wt=65533,Dt=1):wt>65535&&(wt-=65536,Oe+=String.fromCharCode(wt>>>10&1023|55296),wt=56320|1023&wt),Oe+=String.fromCharCode(wt),He+=Dt}return Oe}(this.buf,$,j)},readBytes:function(){var j=this.readVarint()+this.pos,$=this.buf.subarray(this.pos,j);return this.pos=j,$},readPackedVarint:function(j,$){if(this.type!==t.Bytes)return j.push(this.readVarint($));var ge=f(this);for(j=j||[];this.pos<ge;)j.push(this.readVarint($));return j},readPackedSVarint:function(j){if(this.type!==t.Bytes)return j.push(this.readSVarint());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readSVarint());return j},readPackedBoolean:function(j){if(this.type!==t.Bytes)return j.push(this.readBoolean());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readBoolean());return j},readPackedFloat:function(j){if(this.type!==t.Bytes)return j.push(this.readFloat());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readFloat());return j},readPackedDouble:function(j){if(this.type!==t.Bytes)return j.push(this.readDouble());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readDouble());return j},readPackedFixed32:function(j){if(this.type!==t.Bytes)return j.push(this.readFixed32());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readFixed32());return j},readPackedSFixed32:function(j){if(this.type!==t.Bytes)return j.push(this.readSFixed32());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readSFixed32());return j},readPackedFixed64:function(j){if(this.type!==t.Bytes)return j.push(this.readFixed64());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readFixed64());return j},readPackedSFixed64:function(j){if(this.type!==t.Bytes)return j.push(this.readSFixed64());var $=f(this);for(j=j||[];this.pos<$;)j.push(this.readSFixed64());return j},skip:function(j){var $=7&j;if($===t.Varint)for(;this.buf[this.pos++]>127;);else if($===t.Bytes)this.pos=this.readVarint()+this.pos;else if($===t.Fixed32)this.pos+=4;else{if($!==t.Fixed64)throw new Error("Unimplemented type: "+$);this.pos+=8}},writeTag:function(j,$){this.writeVarint(j<<3|$)},realloc:function(j){for(var $=this.length||16;$<this.pos+j;)$*=2;if($!==this.length){var ge=new Uint8Array($);ge.set(this.buf),this.buf=ge,this.length=$}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(j){this.realloc(4),Se(this.buf,j,this.pos),this.pos+=4},writeSFixed32:function(j){this.realloc(4),Se(this.buf,j,this.pos),this.pos+=4},writeFixed64:function(j){this.realloc(8),Se(this.buf,-1&j,this.pos),Se(this.buf,Math.floor(j*s),this.pos+4),this.pos+=8},writeSFixed64:function(j){this.realloc(8),Se(this.buf,-1&j,this.pos),Se(this.buf,Math.floor(j*s),this.pos+4),this.pos+=8},writeVarint:function(j){(j=+j||0)>268435455||j<0?function($,ge){var De,$e;if($>=0?(De=$%4294967296|0,$e=$/4294967296|0):($e=~(-$/4294967296),4294967295^(De=~(-$%4294967296))?De=De+1|0:(De=0,$e=$e+1|0)),$>=18446744073709552e3||$<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");ge.realloc(10),function(Oe,He,st){st.buf[st.pos++]=127&Oe|128,Oe>>>=7,st.buf[st.pos++]=127&Oe|128,Oe>>>=7,st.buf[st.pos++]=127&Oe|128,Oe>>>=7,st.buf[st.pos++]=127&Oe|128,st.buf[st.pos]=127&(Oe>>>=7)}(De,0,ge),function(Oe,He){var st=(7&Oe)<<4;He.buf[He.pos++]|=st|((Oe>>>=3)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe|((Oe>>>=7)?128:0),Oe&&(He.buf[He.pos++]=127&Oe)))))}($e,ge)}(j,this):(this.realloc(4),this.buf[this.pos++]=127&j|(j>127?128:0),j<=127||(this.buf[this.pos++]=127&(j>>>=7)|(j>127?128:0),j<=127||(this.buf[this.pos++]=127&(j>>>=7)|(j>127?128:0),j<=127||(this.buf[this.pos++]=j>>>7&127))))},writeSVarint:function(j){this.writeVarint(j<0?2*-j-1:2*j)},writeBoolean:function(j){this.writeVarint(!!j)},writeString:function(j){j=String(j),this.realloc(4*j.length),this.pos++;var $=this.pos;this.pos=function(De,$e,Oe){for(var He,st,et=0;et<$e.length;et++){if((He=$e.charCodeAt(et))>55295&&He<57344){if(!st){He>56319||et+1===$e.length?(De[Oe++]=239,De[Oe++]=191,De[Oe++]=189):st=He;continue}if(He<56320){De[Oe++]=239,De[Oe++]=191,De[Oe++]=189,st=He;continue}He=st-55296<<10|He-56320|65536,st=null}else st&&(De[Oe++]=239,De[Oe++]=191,De[Oe++]=189,st=null);He<128?De[Oe++]=He:(He<2048?De[Oe++]=He>>6|192:(He<65536?De[Oe++]=He>>12|224:(De[Oe++]=He>>18|240,De[Oe++]=He>>12&63|128),De[Oe++]=He>>6&63|128),De[Oe++]=63&He|128)}return Oe}(this.buf,j,this.pos);var ge=this.pos-$;ge>=128&&v($,ge,this),this.pos=$-1,this.writeVarint(ge),this.pos+=ge},writeFloat:function(j){this.realloc(4),n.write(this.buf,j,this.pos,!0,23,4),this.pos+=4},writeDouble:function(j){this.realloc(8),n.write(this.buf,j,this.pos,!0,52,8),this.pos+=8},writeBytes:function(j){var $=j.length;this.writeVarint($),this.realloc($);for(var ge=0;ge<$;ge++)this.buf[this.pos++]=j[ge]},writeRawMessage:function(j,$){this.pos++;var ge=this.pos;j($,this);var De=this.pos-ge;De>=128&&v(ge,De,this),this.pos=ge-1,this.writeVarint(De),this.pos+=De},writeMessage:function(j,$,ge){this.writeTag(j,t.Bytes),this.writeRawMessage($,ge)},writePackedVarint:function(j,$){$.length&&this.writeMessage(j,S,$)},writePackedSVarint:function(j,$){$.length&&this.writeMessage(j,E,$)},writePackedBoolean:function(j,$){$.length&&this.writeMessage(j,q,$)},writePackedFloat:function(j,$){$.length&&this.writeMessage(j,R,$)},writePackedDouble:function(j,$){$.length&&this.writeMessage(j,V,$)},writePackedFixed32:function(j,$){$.length&&this.writeMessage(j,H,$)},writePackedSFixed32:function(j,$){$.length&&this.writeMessage(j,W,$)},writePackedFixed64:function(j,$){$.length&&this.writeMessage(j,X,$)},writePackedSFixed64:function(j,$){$.length&&this.writeMessage(j,re,$)},writeBytesField:function(j,$){this.writeTag(j,t.Bytes),this.writeBytes($)},writeFixed32Field:function(j,$){this.writeTag(j,t.Fixed32),this.writeFixed32($)},writeSFixed32Field:function(j,$){this.writeTag(j,t.Fixed32),this.writeSFixed32($)},writeFixed64Field:function(j,$){this.writeTag(j,t.Fixed64),this.writeFixed64($)},writeSFixed64Field:function(j,$){this.writeTag(j,t.Fixed64),this.writeSFixed64($)},writeVarintField:function(j,$){this.writeTag(j,t.Varint),this.writeVarint($)},writeSVarintField:function(j,$){this.writeTag(j,t.Varint),this.writeSVarint($)},writeStringField:function(j,$){this.writeTag(j,t.Bytes),this.writeString($)},writeFloatField:function(j,$){this.writeTag(j,t.Fixed32),this.writeFloat($)},writeDoubleField:function(j,$){this.writeTag(j,t.Fixed64),this.writeDouble($)},writeBooleanField:function(j,$){this.writeVarintField(j,!!$)}},ld}var ud=B(sf());const hd=3;function x_(n,t,i){n===1&&i.readMessage(b_,t)}function b_(n,t,i){if(n===3){const{id:s,bitmap:c,width:f,height:m,left:v,top:S,advance:E}=i.readMessage(w_,{});t.push({id:s,bitmap:new Nl({width:f+2*hd,height:m+2*hd},c),metrics:{width:f,height:m,left:v,top:S,advance:E}})}}function w_(n,t,i){n===1?t.id=i.readVarint():n===2?t.bitmap=i.readBytes():n===3?t.width=i.readVarint():n===4?t.height=i.readVarint():n===5?t.left=i.readSVarint():n===6?t.top=i.readSVarint():n===7&&(t.advance=i.readVarint())}const S_=hd;function af(n){let t=0,i=0;for(const m of n)t+=m.w*m.h,i=Math.max(i,m.w);n.sort((m,v)=>v.h-m.h);const s=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),i),h:1/0}];let c=0,f=0;for(const m of n)for(let v=s.length-1;v>=0;v--){const S=s[v];if(!(m.w>S.w||m.h>S.h)){if(m.x=S.x,m.y=S.y,f=Math.max(f,m.y+m.h),c=Math.max(c,m.x+m.w),m.w===S.w&&m.h===S.h){const E=s.pop();v<s.length&&(s[v]=E)}else m.h===S.h?(S.x+=m.w,S.w-=m.w):m.w===S.w?(S.y+=m.h,S.h-=m.h):(s.push({x:S.x+m.w,y:S.y,w:S.w-m.w,h:m.h}),S.y+=m.h,S.h-=m.h);break}}return{w:c,h:f,fill:t/(c*f)||0}}const Ui=1;class dd{constructor(t,{pixelRatio:i,version:s,stretchX:c,stretchY:f,content:m,textFitWidth:v,textFitHeight:S}){this.paddedRect=t,this.pixelRatio=i,this.stretchX=c,this.stretchY=f,this.content=m,this.version=s,this.textFitWidth=v,this.textFitHeight=S}get tl(){return[this.paddedRect.x+Ui,this.paddedRect.y+Ui]}get br(){return[this.paddedRect.x+this.paddedRect.w-Ui,this.paddedRect.y+this.paddedRect.h-Ui]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*Ui)/this.pixelRatio,(this.paddedRect.h-2*Ui)/this.pixelRatio]}}class lf{constructor(t,i){const s={},c={};this.haveRenderCallbacks=[];const f=[];this.addImages(t,s,f),this.addImages(i,c,f);const{w:m,h:v}=af(f),S=new un({width:m||1,height:v||1});for(const E in t){const R=t[E],V=s[E].paddedRect;un.copy(R.data,S,{x:0,y:0},{x:V.x+Ui,y:V.y+Ui},R.data)}for(const E in i){const R=i[E],V=c[E].paddedRect,q=V.x+Ui,H=V.y+Ui,W=R.data.width,X=R.data.height;un.copy(R.data,S,{x:0,y:0},{x:q,y:H},R.data),un.copy(R.data,S,{x:0,y:X-1},{x:q,y:H-1},{width:W,height:1}),un.copy(R.data,S,{x:0,y:0},{x:q,y:H+X},{width:W,height:1}),un.copy(R.data,S,{x:W-1,y:0},{x:q-1,y:H},{width:1,height:X}),un.copy(R.data,S,{x:0,y:0},{x:q+W,y:H},{width:1,height:X})}this.image=S,this.iconPositions=s,this.patternPositions=c}addImages(t,i,s){for(const c in t){const f=t[c],m={x:0,y:0,w:f.data.width+2*Ui,h:f.data.height+2*Ui};s.push(m),i[c]=new dd(m,f),f.hasRenderCallback&&this.haveRenderCallbacks.push(c)}}patchUpdatedImages(t,i){t.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const s in t.updatedImages)this.patchUpdatedImage(this.iconPositions[s],t.getImage(s),i),this.patchUpdatedImage(this.patternPositions[s],t.getImage(s),i)}patchUpdatedImage(t,i,s){if(!t||!i||t.version===i.version)return;t.version=i.version;const[c,f]=t.tl;s.update(i.data,void 0,{x:c,y:f})}}var Go;bt("ImagePosition",dd),bt("ImageAtlas",lf),x.al=void 0,(Go=x.al||(x.al={}))[Go.none=0]="none",Go[Go.horizontal=1]="horizontal",Go[Go.vertical=2]="vertical",Go[Go.horizontalOnly=3]="horizontalOnly";const pu=-17;class Ql{constructor(){this.scale=1,this.fontStack="",this.imageName=null,this.verticalAlign="bottom"}static forText(t,i,s){const c=new Ql;return c.scale=t||1,c.fontStack=i,c.verticalAlign=s||"bottom",c}static forImage(t,i){const s=new Ql;return s.imageName=t,s.verticalAlign=i||"bottom",s}}class Fa{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(t,i){const s=new Fa;for(let c=0;c<t.sections.length;c++){const f=t.sections[c];f.image?s.addImageSection(f):s.addTextSection(f,i)}return s}length(){return this.text.length}getSection(t){return this.sections[this.sectionIndex[t]]}getSectionIndex(t){return this.sectionIndex[t]}getCharCode(t){return this.text.charCodeAt(t)}verticalizePunctuation(){this.text=function(t){let i="";for(let s=0;s<t.length;s++){const c=t.charCodeAt(s+1)||null,f=t.charCodeAt(s-1)||null;i+=c&&ks(c)&&!Xl[t[s+1]]||f&&ks(f)&&!Xl[t[s-1]]||!Xl[t[s]]?t[s]:Xl[t[s]]}return i}(this.text)}trim(){let t=0;for(let s=0;s<this.text.length&&mu[this.text.charCodeAt(s)];s++)t++;let i=this.text.length;for(let s=this.text.length-1;s>=0&&s>=t&&mu[this.text.charCodeAt(s)];s--)i--;this.text=this.text.substring(t,i),this.sectionIndex=this.sectionIndex.slice(t,i)}substring(t,i){const s=new Fa;return s.text=this.text.substring(t,i),s.sectionIndex=this.sectionIndex.slice(t,i),s.sections=this.sections,s}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((t,i)=>Math.max(t,this.sections[i].scale),0)}getMaxImageSize(t){let i=0,s=0;for(let c=0;c<this.length();c++){const f=this.getSection(c);if(f.imageName){const m=t[f.imageName];if(!m)continue;const v=m.displaySize;i=Math.max(i,v[0]),s=Math.max(s,v[1])}}return{maxImageWidth:i,maxImageHeight:s}}addTextSection(t,i){this.text+=t.text,this.sections.push(Ql.forText(t.scale,t.fontStack||i,t.verticalAlign));const s=this.sections.length-1;for(let c=0;c<t.text.length;++c)this.sectionIndex.push(s)}addImageSection(t){const i=t.image?t.image.name:"";if(i.length===0)return void Jr("Can't add FormattedSection with an empty image.");const s=this.getNextImageSectionCharCode();s?(this.text+=String.fromCharCode(s),this.sections.push(Ql.forImage(i,t.verticalAlign)),this.sectionIndex.push(this.sections.length-1)):Jr("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function fu(n,t,i,s,c,f,m,v,S,E,R,V,q,H,W){const X=Fa.fromFeature(n,c);let re;V===x.al.vertical&&X.verticalizePunctuation();const{processBidirectionalText:ae,processStyledBidirectionalText:Se}=Bn;if(ae&&X.sections.length===1){re=[];const $=ae(X.toString(),pd(X,E,f,t,s,H));for(const ge of $){const De=new Fa;De.text=ge,De.sections=X.sections;for(let $e=0;$e<ge.length;$e++)De.sectionIndex.push(0);re.push(De)}}else if(Se){re=[];const $=Se(X.text,X.sectionIndex,pd(X,E,f,t,s,H));for(const ge of $){const De=new Fa;De.text=ge[0],De.sectionIndex=ge[1],De.sections=X.sections,re.push(De)}}else re=function($,ge){const De=[],$e=$.text;let Oe=0;for(const He of ge)De.push($.substring(Oe,He)),Oe=He;return Oe<$e.length&&De.push($.substring(Oe,$e.length)),De}(X,pd(X,E,f,t,s,H));const fe=[],j={positionedLines:fe,text:X.toString(),top:R[1],bottom:R[1],left:R[0],right:R[0],writingMode:V,iconsInText:!1,verticalizable:!1};return function($,ge,De,$e,Oe,He,st,et,lt,Ze,wt,Dt){let Lt=0,Ct=0,ir=0,Fr=0;const $r=et==="right"?1:et==="left"?0:.5,Ci=Yr/Dt;let dn=0;for(const zr of Oe){zr.trim();const ui=zr.getMaxScale(),bi={positionedGlyphs:[],lineOffset:0};$.positionedLines[dn]=bi;const wi=bi.positionedGlyphs;let Di=0;if(!zr.length()){Ct+=He,++dn;continue}const pn=T_($e,zr,Ci);for(let Hi=0;Hi<zr.length();Hi++){const ei=zr.getSection(Hi),di=zr.getSectionIndex(Hi),pi=zr.getCharCode(Hi),Kr=E_(lt,wt,pi);let Tr;if(ei.imageName){if($.iconsInText=!0,ei.scale=ei.scale*Ci,Tr=I_(ei,Kr,ui,pn,$e),!Tr)continue;Di=Math.max(Di,Tr.imageOffset)}else if(Tr=P_(ei,pi,Kr,pn,ge,De),!Tr)continue;const{rect:Fn,metrics:ja,baselineOffset:Nn}=Tr;wi.push({glyph:pi,imageName:ei.imageName,x:Lt,y:Ct+Nn+pu,vertical:Kr,scale:ei.scale,fontStack:ei.fontStack,sectionIndex:di,metrics:ja,rect:Fn}),Kr?($.verticalizable=!0,Lt+=(ei.imageName?ja.advance:Yr)*ei.scale+Ze):Lt+=ja.advance*ei.scale+Ze}wi.length!==0&&(ir=Math.max(Lt-Ze,ir),M_(wi,0,wi.length-1,$r)),Lt=0,bi.lineOffset=Math.max(Di,(ui-1)*Yr);const hi=He*ui+Di;Ct+=hi,Fr=Math.max(hi,Fr),++dn}const{horizontalAlign:ji,verticalAlign:xi}=fd(st);(function(zr,ui,bi,wi,Di,pn,hi,Hi,ei){const di=(ui-bi)*Di;let pi=0;pi=pn!==hi?-Hi*wi-pu:-wi*ei*hi+.5*hi;for(const Kr of zr)for(const Tr of Kr.positionedGlyphs)Tr.x+=di,Tr.y+=pi})($.positionedLines,$r,ji,xi,ir,Fr,He,Ct,Oe.length),$.top+=-xi*Ct,$.bottom=$.top+Ct,$.left+=-ji*ir,$.right=$.left+ir}(j,t,i,s,re,m,v,S,V,E,q,W),!function($){for(const ge of $)if(ge.positionedGlyphs.length!==0)return!1;return!0}(fe)&&j}const mu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},A_={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},k_={40:!0};function cf(n,t,i,s,c,f){if(t.imageName){const m=s[t.imageName];return m?m.displaySize[0]*t.scale*Yr/f+c:0}{const m=i[t.fontStack],v=m&&m[n];return v?v.metrics.advance*t.scale+c:0}}function uf(n,t,i,s){const c=Math.pow(n-t,2);return s?n<t?c/2:2*c:c+Math.abs(i)*i}function C_(n,t,i){let s=0;return n===10&&(s-=1e4),i&&(s+=150),n!==40&&n!==65288||(s+=50),t!==41&&t!==65289||(s+=50),s}function hf(n,t,i,s,c,f){let m=null,v=uf(t,i,c,f);for(const S of s){const E=uf(t-S.x,i,c,f)+S.badness;E<=v&&(m=S,v=E)}return{index:n,x:t,priorBreak:m,badness:v}}function df(n){return n?df(n.priorBreak).concat(n.index):[]}function pd(n,t,i,s,c,f){if(!n)return[];const m=[],v=function(V,q,H,W,X,re){let ae=0;for(let Se=0;Se<V.length();Se++){const fe=V.getSection(Se);ae+=cf(V.getCharCode(Se),fe,W,X,q,re)}return ae/Math.max(1,Math.ceil(ae/H))}(n,t,i,s,c,f),S=n.text.indexOf("​")>=0;let E=0;for(let V=0;V<n.length();V++){const q=n.getSection(V),H=n.getCharCode(V);if(mu[H]||(E+=cf(H,q,s,c,t,f)),V<n.length()-1){const W=!((R=H)<11904)&&(!!er["CJK Compatibility Forms"](R)||!!er["CJK Compatibility"](R)||!!er["CJK Strokes"](R)||!!er["CJK Symbols and Punctuation"](R)||!!er["Enclosed CJK Letters and Months"](R)||!!er["Halfwidth and Fullwidth Forms"](R)||!!er["Ideographic Description Characters"](R)||!!er["Vertical Forms"](R)||Pl.test(String.fromCodePoint(R)));(A_[H]||W||q.imageName||V!==n.length()-2&&k_[n.getCharCode(V+1)])&&m.push(hf(V+1,E,v,m,C_(H,n.getCharCode(V+1),W&&S),!1))}}var R;return df(hf(n.length(),E,v,m,0,!0))}function fd(n){let t=.5,i=.5;switch(n){case"right":case"top-right":case"bottom-right":t=1;break;case"left":case"top-left":case"bottom-left":t=0}switch(n){case"bottom":case"bottom-right":case"bottom-left":i=1;break;case"top":case"top-right":case"top-left":i=0}return{horizontalAlign:t,verticalAlign:i}}function T_(n,t,i){const s=t.getMaxScale()*Yr,{maxImageWidth:c,maxImageHeight:f}=t.getMaxImageSize(n),m=Math.max(s,f*i);return{verticalLineContentWidth:Math.max(s,c*i),horizontalLineContentHeight:m}}function pf(n){switch(n){case"top":return 0;case"center":return .5;default:return 1}}function E_(n,t,i){return!(n===x.al.horizontal||!t&&!Ma(i)||t&&(mu[i]||(s=i,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(s)))));var s}function P_(n,t,i,s,c,f){const m=f[n.fontStack],v=function(E,R,V,q){if(E&&E.rect)return E;const H=R[V.fontStack],W=H&&H[q];return W?{rect:null,metrics:W.metrics}:null}(m&&m[t],c,n,t);if(v===null)return null;let S;if(i)S=s.verticalLineContentWidth-n.scale*Yr;else{const E=pf(n.verticalAlign);S=(s.horizontalLineContentHeight-n.scale*Yr)*E}return{rect:v.rect,metrics:v.metrics,baselineOffset:S}}function I_(n,t,i,s,c){const f=c[n.imageName];if(!f)return null;const m=f.paddedRect,v=f.displaySize,S={width:v[0],height:v[1],left:Ui,top:-3,advance:t?v[1]:v[0]};let E;if(t)E=s.verticalLineContentWidth-v[1]*n.scale;else{const R=pf(n.verticalAlign);E=(s.horizontalLineContentHeight-v[1]*n.scale)*R}return{rect:m,metrics:S,baselineOffset:E,imageOffset:(t?v[0]:v[1])*n.scale-Yr*i}}function M_(n,t,i,s){if(s===0)return;const c=n[i],f=(n[i].x+c.metrics.advance*c.scale)*s;for(let m=t;m<=i;m++)n[m].x-=f}function L_(n,t,i){const{horizontalAlign:s,verticalAlign:c}=fd(i),f=t[0]-n.displaySize[0]*s,m=t[1]-n.displaySize[1]*c;return{image:n,top:m,bottom:m+n.displaySize[1],left:f,right:f+n.displaySize[0]}}function ff(n){var t,i;let s=n.left,c=n.top,f=n.right-s,m=n.bottom-c;const v=(t=n.image.textFitWidth)!==null&&t!==void 0?t:"stretchOrShrink",S=(i=n.image.textFitHeight)!==null&&i!==void 0?i:"stretchOrShrink",E=(n.image.content[2]-n.image.content[0])/(n.image.content[3]-n.image.content[1]);if(S==="proportional"){if(v==="stretchOnly"&&f/m<E||v==="proportional"){const R=Math.ceil(m*E);s*=R/f,f=R}}else if(v==="proportional"&&S==="stretchOnly"&&E!==0&&f/m>E){const R=Math.ceil(f/E);c*=R/m,m=R}return{x1:s,y1:c,x2:s+f,y2:c+m}}function mf(n,t,i,s,c,f){const m=n.image;let v;if(m.content){const re=m.content,ae=m.pixelRatio||1;v=[re[0]/ae,re[1]/ae,m.displaySize[0]-re[2]/ae,m.displaySize[1]-re[3]/ae]}const S=t.left*f,E=t.right*f;let R,V,q,H;i==="width"||i==="both"?(H=c[0]+S-s[3],V=c[0]+E+s[1]):(H=c[0]+(S+E-m.displaySize[0])/2,V=H+m.displaySize[0]);const W=t.top*f,X=t.bottom*f;return i==="height"||i==="both"?(R=c[1]+W-s[0],q=c[1]+X+s[2]):(R=c[1]+(W+X-m.displaySize[1])/2,q=R+m.displaySize[1]),{image:m,top:R,right:V,bottom:q,left:H,collisionPadding:v}}const Yl=255,oo=128,Jo=Yl*oo;function gf(n,t){const{expression:i}=t;if(i.kind==="constant")return{kind:"constant",layoutSize:i.evaluate(new kr(n+1))};if(i.kind==="source")return{kind:"source"};{const{zoomStops:s,interpolationType:c}=i;let f=0;for(;f<s.length&&s[f]<=n;)f++;f=Math.max(0,f-1);let m=f;for(;m<s.length&&s[m]<n+1;)m++;m=Math.min(s.length-1,m);const v=s[f],S=s[m];return i.kind==="composite"?{kind:"composite",minZoom:v,maxZoom:S,interpolationType:c}:{kind:"camera",minZoom:v,maxZoom:S,minSize:i.evaluate(new kr(v)),maxSize:i.evaluate(new kr(S)),interpolationType:c}}}function md(n,t,i){let s="never";const c=n.get(t);return c?s=c:n.get(i)&&(s="always"),s}const R_=Kl.VectorTileFeature.types,D_=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function gu(n,t,i,s,c,f,m,v,S,E,R,V,q){const H=v?Math.min(Jo,Math.round(v[0])):0,W=v?Math.min(Jo,Math.round(v[1])):0;n.emplaceBack(t,i,Math.round(32*s),Math.round(32*c),f,m,(H<<1)+(S?1:0),W,16*E,16*R,256*V,256*q)}function gd(n,t,i){n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i),n.emplaceBack(t.x,t.y,i)}function z_(n){for(const t of n.sections)if(qh(t.text))return!0;return!1}class yd{constructor(t){this.layoutVertexArray=new Lr,this.indexArray=new ur,this.programConfigurations=t,this.segments=new hr,this.dynamicLayoutVertexArray=new _r,this.opacityVertexArray=new Rr,this.hasVisibleVertices=!1,this.placedSymbolArray=new _e}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(t,i,s,c){this.isEmpty()||(s&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,f_.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,i),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,m_.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,D_,!0),this.opacityVertexBuffer.itemSize=1),(s||c)&&this.programConfigurations.upload(t))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}bt("SymbolBuffers",yd);class _d{constructor(t,i,s){this.layoutVertexArray=new t,this.layoutAttributes=i,this.indexArray=new s,this.segments=new hr,this.collisionVertexArray=new wr}upload(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,g_.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}bt("CollisionBuffers",_d);class Na{constructor(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(m=>m.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];const i=this.layers[0]._unevaluatedLayout._values;this.textSizeData=gf(this.zoom,i["text-size"]),this.iconSizeData=gf(this.zoom,i["icon-size"]);const s=this.layers[0].layout,c=s.get("symbol-sort-key"),f=s.get("symbol-z-order");this.canOverlap=md(s,"text-overlap","text-allow-overlap")!=="never"||md(s,"icon-overlap","icon-allow-overlap")!=="never"||s.get("text-ignore-placement")||s.get("icon-ignore-placement"),this.sortFeaturesByKey=f!=="viewport-y"&&!c.isConstant(),this.sortFeaturesByY=(f==="viewport-y"||f==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,s.get("symbol-placement")==="point"&&(this.writingModes=s.get("text-writing-mode").map(m=>x.al[m])),this.stateDependentLayerIds=this.layers.filter(m=>m.isStateDependent()).map(m=>m.id),this.sourceID=t.sourceID}createArrays(){this.text=new yd(new no(this.layers,this.zoom,t=>/^text/.test(t))),this.icon=new yd(new no(this.layers,this.zoom,t=>/^icon/.test(t))),this.glyphOffsetArray=new Ce,this.lineVertexArray=new we,this.symbolInstances=new be,this.textAnchorOffsets=new We}calculateGlyphDependencies(t,i,s,c,f){for(let m=0;m<t.length;m++)if(i[t.charCodeAt(m)]=!0,(s||c)&&f){const v=Xl[t.charAt(m)];v&&(i[v.charCodeAt(0)]=!0)}}populate(t,i,s){const c=this.layers[0],f=c.layout,m=f.get("text-font"),v=f.get("text-field"),S=f.get("icon-image"),E=(v.value.kind!=="constant"||v.value.value instanceof ue&&!v.value.value.isEmpty()||v.value.value.toString().length>0)&&(m.value.kind!=="constant"||m.value.value.length>0),R=S.value.kind!=="constant"||!!S.value.value||Object.keys(S.parameters).length>0,V=f.get("symbol-sort-key");if(this.features=[],!E&&!R)return;const q=i.iconDependencies,H=i.glyphDependencies,W=i.availableImages,X=new kr(this.zoom);for(const{feature:re,id:ae,index:Se,sourceLayerIndex:fe}of t){const j=c._featureFilter.needGeometry,$=Rs(re,j);if(!c._featureFilter.filter(X,$,s))continue;let ge,De;if(j||($.geometry=Ls(re)),E){const Oe=c.getValueAndResolveTokens("text-field",$,s,W),He=ue.factory(Oe),st=this.hasRTLText=this.hasRTLText||z_(He);(!st||Bn.getRTLTextPluginStatus()==="unavailable"||st&&Bn.isParsed())&&(ge=__(He,c,$))}if(R){const Oe=c.getValueAndResolveTokens("icon-image",$,s,W);De=Oe instanceof nt?Oe:nt.fromString(Oe)}if(!ge&&!De)continue;const $e=this.sortFeaturesByKey?V.evaluate($,{},s):void 0;if(this.features.push({id:ae,text:ge,icon:De,index:Se,sourceLayerIndex:fe,geometry:$.geometry,properties:re.properties,type:R_[re.type],sortKey:$e}),De&&(q[De.name]=!0),ge){const Oe=m.evaluate($,{},s).join(","),He=f.get("text-rotation-alignment")!=="viewport"&&f.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(x.al.vertical)>=0;for(const st of ge.sections)if(st.image)q[st.image.name]=!0;else{const et=Ia(ge.toString()),lt=st.fontStack||Oe,Ze=H[lt]=H[lt]||{};this.calculateGlyphDependencies(st.text,Ze,He,this.allowVerticalPlacement,et)}}}f.get("symbol-placement")==="line"&&(this.features=function(re){const ae={},Se={},fe=[];let j=0;function $(Oe){fe.push(re[Oe]),j++}function ge(Oe,He,st){const et=Se[Oe];return delete Se[Oe],Se[He]=et,fe[et].geometry[0].pop(),fe[et].geometry[0]=fe[et].geometry[0].concat(st[0]),et}function De(Oe,He,st){const et=ae[He];return delete ae[He],ae[Oe]=et,fe[et].geometry[0].shift(),fe[et].geometry[0]=st[0].concat(fe[et].geometry[0]),et}function $e(Oe,He,st){const et=st?He[0][He[0].length-1]:He[0][0];return`${Oe}:${et.x}:${et.y}`}for(let Oe=0;Oe<re.length;Oe++){const He=re[Oe],st=He.geometry,et=He.text?He.text.toString():null;if(!et){$(Oe);continue}const lt=$e(et,st),Ze=$e(et,st,!0);if(lt in Se&&Ze in ae&&Se[lt]!==ae[Ze]){const wt=De(lt,Ze,st),Dt=ge(lt,Ze,fe[wt].geometry);delete ae[lt],delete Se[Ze],Se[$e(et,fe[Dt].geometry,!0)]=Dt,fe[wt].geometry=null}else lt in Se?ge(lt,Ze,st):Ze in ae?De(lt,Ze,st):($(Oe),ae[lt]=j-1,Se[Ze]=j-1)}return fe.filter(Oe=>Oe.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((re,ae)=>re.sortKey-ae.sortKey)}update(t,i,s){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,i,this.layers,s),this.icon.programConfigurations.updatePaintArrays(t,i,this.layers,s))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,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(t,i){const s=this.lineVertexArray.length;if(t.segment!==void 0){let c=t.dist(i[t.segment+1]),f=t.dist(i[t.segment]);const m={};for(let v=t.segment+1;v<i.length;v++)m[v]={x:i[v].x,y:i[v].y,tileUnitDistanceFromAnchor:c},v<i.length-1&&(c+=i[v+1].dist(i[v]));for(let v=t.segment||0;v>=0;v--)m[v]={x:i[v].x,y:i[v].y,tileUnitDistanceFromAnchor:f},v>0&&(f+=i[v-1].dist(i[v]));for(let v=0;v<i.length;v++){const S=m[v];this.lineVertexArray.emplaceBack(S.x,S.y,S.tileUnitDistanceFromAnchor)}}return{lineStartIndex:s,lineLength:this.lineVertexArray.length-s}}addSymbols(t,i,s,c,f,m,v,S,E,R,V,q){const H=t.indexArray,W=t.layoutVertexArray,X=t.segments.prepareSegment(4*i.length,W,H,this.canOverlap?m.sortKey:void 0),re=this.glyphOffsetArray.length,ae=X.vertexLength,Se=this.allowVerticalPlacement&&v===x.al.vertical?Math.PI/2:0,fe=m.text&&m.text.sections;for(let j=0;j<i.length;j++){const{tl:$,tr:ge,bl:De,br:$e,tex:Oe,pixelOffsetTL:He,pixelOffsetBR:st,minFontScaleX:et,minFontScaleY:lt,glyphOffset:Ze,isSDF:wt,sectionIndex:Dt}=i[j],Lt=X.vertexLength,Ct=Ze[1];gu(W,S.x,S.y,$.x,Ct+$.y,Oe.x,Oe.y,s,wt,He.x,He.y,et,lt),gu(W,S.x,S.y,ge.x,Ct+ge.y,Oe.x+Oe.w,Oe.y,s,wt,st.x,He.y,et,lt),gu(W,S.x,S.y,De.x,Ct+De.y,Oe.x,Oe.y+Oe.h,s,wt,He.x,st.y,et,lt),gu(W,S.x,S.y,$e.x,Ct+$e.y,Oe.x+Oe.w,Oe.y+Oe.h,s,wt,st.x,st.y,et,lt),gd(t.dynamicLayoutVertexArray,S,Se),H.emplaceBack(Lt,Lt+2,Lt+1),H.emplaceBack(Lt+1,Lt+2,Lt+3),X.vertexLength+=4,X.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ze[0]),j!==i.length-1&&Dt===i[j+1].sectionIndex||t.programConfigurations.populatePaintArrays(W.length,m,m.index,{},q,fe&&fe[Dt])}t.placedSymbolArray.emplaceBack(S.x,S.y,re,this.glyphOffsetArray.length-re,ae,E,R,S.segment,s?s[0]:0,s?s[1]:0,c[0],c[1],v,0,!1,0,V)}_addCollisionDebugVertex(t,i,s,c,f,m){return i.emplaceBack(0,0),t.emplaceBack(s.x,s.y,c,f,Math.round(m.x),Math.round(m.y))}addCollisionDebugVertices(t,i,s,c,f,m,v){const S=f.segments.prepareSegment(4,f.layoutVertexArray,f.indexArray),E=S.vertexLength,R=f.layoutVertexArray,V=f.collisionVertexArray,q=v.anchorX,H=v.anchorY;this._addCollisionDebugVertex(R,V,m,q,H,new T(t,i)),this._addCollisionDebugVertex(R,V,m,q,H,new T(s,i)),this._addCollisionDebugVertex(R,V,m,q,H,new T(s,c)),this._addCollisionDebugVertex(R,V,m,q,H,new T(t,c)),S.vertexLength+=4;const W=f.indexArray;W.emplaceBack(E,E+1),W.emplaceBack(E+1,E+2),W.emplaceBack(E+2,E+3),W.emplaceBack(E+3,E),S.primitiveLength+=4}addDebugCollisionBoxes(t,i,s,c){for(let f=t;f<i;f++){const m=this.collisionBoxArray.get(f);this.addCollisionDebugVertices(m.x1,m.y1,m.x2,m.y2,c?this.textCollisionBox:this.iconCollisionBox,m.anchorPoint,s)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new _d(Dr,rf.members,Qr),this.iconCollisionBox=new _d(Dr,rf.members,Qr);for(let t=0;t<this.symbolInstances.length;t++){const i=this.symbolInstances.get(t);this.addDebugCollisionBoxes(i.textBoxStartIndex,i.textBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.verticalTextBoxStartIndex,i.verticalTextBoxEndIndex,i,!0),this.addDebugCollisionBoxes(i.iconBoxStartIndex,i.iconBoxEndIndex,i,!1),this.addDebugCollisionBoxes(i.verticalIconBoxStartIndex,i.verticalIconBoxEndIndex,i,!1)}}_deserializeCollisionBoxesForSymbol(t,i,s,c,f,m,v,S,E){const R={};for(let V=i;V<s;V++){const q=t.get(V);R.textBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.textFeatureIndex=q.featureIndex;break}for(let V=c;V<f;V++){const q=t.get(V);R.verticalTextBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.verticalTextFeatureIndex=q.featureIndex;break}for(let V=m;V<v;V++){const q=t.get(V);R.iconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.iconFeatureIndex=q.featureIndex;break}for(let V=S;V<E;V++){const q=t.get(V);R.verticalIconBox={x1:q.x1,y1:q.y1,x2:q.x2,y2:q.y2,anchorPointX:q.anchorPointX,anchorPointY:q.anchorPointY},R.verticalIconFeatureIndex=q.featureIndex;break}return R}deserializeCollisionBoxes(t){this.collisionArrays=[];for(let i=0;i<this.symbolInstances.length;i++){const s=this.symbolInstances.get(i);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,s.textBoxStartIndex,s.textBoxEndIndex,s.verticalTextBoxStartIndex,s.verticalTextBoxEndIndex,s.iconBoxStartIndex,s.iconBoxEndIndex,s.verticalIconBoxStartIndex,s.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(t,i){const s=t.placedSymbolArray.get(i),c=s.vertexStartIndex+4*s.numGlyphs;for(let f=s.vertexStartIndex;f<c;f+=4)t.indexArray.emplaceBack(f,f+2,f+1),t.indexArray.emplaceBack(f+1,f+2,f+3)}getSortedSymbolIndexes(t){if(this.sortedAngle===t&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const i=Math.sin(t),s=Math.cos(t),c=[],f=[],m=[];for(let v=0;v<this.symbolInstances.length;++v){m.push(v);const S=this.symbolInstances.get(v);c.push(0|Math.round(i*S.anchorX+s*S.anchorY)),f.push(S.featureIndex)}return m.sort((v,S)=>c[v]-c[S]||f[S]-f[v]),m}addToSortKeyRanges(t,i){const s=this.sortKeyRanges[this.sortKeyRanges.length-1];s&&s.sortKey===i?s.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:i,symbolInstanceStart:t,symbolInstanceEnd:t+1})}sortFeatures(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const i of this.symbolInstanceIndexes){const s=this.symbolInstances.get(i);this.featureSortOrder.push(s.featureIndex),[s.rightJustifiedTextSymbolIndex,s.centerJustifiedTextSymbolIndex,s.leftJustifiedTextSymbolIndex].forEach((c,f,m)=>{c>=0&&m.indexOf(c)===f&&this.addIndicesForPlacedSymbol(this.text,c)}),s.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,s.verticalPlacedTextSymbolIndex),s.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.placedIconSymbolIndex),s.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,s.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let yf,_f;bt("SymbolBucket",Na,{omit:["layers","collisionBoxArray","features","compareText"]}),Na.MAX_GLYPHS=65535,Na.addDynamicAttributes=gd;var vd={get paint(){return _f=_f||new Hr({"icon-opacity":new Ft(Y.paint_symbol["icon-opacity"]),"icon-color":new Ft(Y.paint_symbol["icon-color"]),"icon-halo-color":new Ft(Y.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ft(Y.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ft(Y.paint_symbol["icon-halo-blur"]),"icon-translate":new Tt(Y.paint_symbol["icon-translate"]),"icon-translate-anchor":new Tt(Y.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ft(Y.paint_symbol["text-opacity"]),"text-color":new Ft(Y.paint_symbol["text-color"],{runtimeType:Ar,getOverride:n=>n.textColor,hasOverride:n=>!!n.textColor}),"text-halo-color":new Ft(Y.paint_symbol["text-halo-color"]),"text-halo-width":new Ft(Y.paint_symbol["text-halo-width"]),"text-halo-blur":new Ft(Y.paint_symbol["text-halo-blur"]),"text-translate":new Tt(Y.paint_symbol["text-translate"]),"text-translate-anchor":new Tt(Y.paint_symbol["text-translate-anchor"])})},get layout(){return yf=yf||new Hr({"symbol-placement":new Tt(Y.layout_symbol["symbol-placement"]),"symbol-spacing":new Tt(Y.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Tt(Y.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ft(Y.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Tt(Y.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Tt(Y.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Tt(Y.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Tt(Y.layout_symbol["icon-ignore-placement"]),"icon-optional":new Tt(Y.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Tt(Y.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ft(Y.layout_symbol["icon-size"]),"icon-text-fit":new Tt(Y.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Tt(Y.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ft(Y.layout_symbol["icon-image"]),"icon-rotate":new Ft(Y.layout_symbol["icon-rotate"]),"icon-padding":new Ft(Y.layout_symbol["icon-padding"]),"icon-keep-upright":new Tt(Y.layout_symbol["icon-keep-upright"]),"icon-offset":new Ft(Y.layout_symbol["icon-offset"]),"icon-anchor":new Ft(Y.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Tt(Y.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Tt(Y.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Tt(Y.layout_symbol["text-rotation-alignment"]),"text-field":new Ft(Y.layout_symbol["text-field"]),"text-font":new Ft(Y.layout_symbol["text-font"]),"text-size":new Ft(Y.layout_symbol["text-size"]),"text-max-width":new Ft(Y.layout_symbol["text-max-width"]),"text-line-height":new Tt(Y.layout_symbol["text-line-height"]),"text-letter-spacing":new Ft(Y.layout_symbol["text-letter-spacing"]),"text-justify":new Ft(Y.layout_symbol["text-justify"]),"text-radial-offset":new Ft(Y.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Tt(Y.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Ft(Y.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Ft(Y.layout_symbol["text-anchor"]),"text-max-angle":new Tt(Y.layout_symbol["text-max-angle"]),"text-writing-mode":new Tt(Y.layout_symbol["text-writing-mode"]),"text-rotate":new Ft(Y.layout_symbol["text-rotate"]),"text-padding":new Tt(Y.layout_symbol["text-padding"]),"text-keep-upright":new Tt(Y.layout_symbol["text-keep-upright"]),"text-transform":new Ft(Y.layout_symbol["text-transform"]),"text-offset":new Ft(Y.layout_symbol["text-offset"]),"text-allow-overlap":new Tt(Y.layout_symbol["text-allow-overlap"]),"text-overlap":new Tt(Y.layout_symbol["text-overlap"]),"text-ignore-placement":new Tt(Y.layout_symbol["text-ignore-placement"]),"text-optional":new Tt(Y.layout_symbol["text-optional"])})}};class vf{constructor(t){if(t.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=t.property.overrides?t.property.overrides.runtimeType:Ot,this.defaultValue=t}evaluate(t){if(t.formattedSection){const i=this.defaultValue.property.overrides;if(i&&i.hasOverride(t.formattedSection))return i.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default}eachChild(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}bt("FormatSectionOverride",vf,{omit:["defaultValue"]});class yu extends Qi{constructor(t){super(t,vd)}recalculate(t,i){if(super.recalculate(t,i),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 s=this.layout.get("text-writing-mode");if(s){const c=[];for(const f of s)c.indexOf(f)<0&&c.push(f);this.layout._values["text-writing-mode"]=c}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(t,i,s,c){const f=this.layout.get(t).evaluate(i,{},s,c),m=this._unevaluatedLayout._values[t];return m.isDataDriven()||gs(m.value)||!f?f:function(v,S){return S.replace(/{([^{}]+)}/g,(E,R)=>v&&R in v?String(v[R]):"")}(i.properties,f)}createBucket(t){return new Na(t)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const t of vd.paint.overridableProperties){if(!yu.hasPaintOverride(this.layout,t))continue;const i=this.paint.get(t),s=new vf(i),c=new _a(s,i.property.specification);let f=null;f=i.value.kind==="constant"||i.value.kind==="source"?new ml("source",c):new xa("composite",c,i.value.zoomStops),this.paint._values[t]=new Ei(i.property,f,i.parameters)}}_handleOverridablePaintPropertyUpdate(t,i,s){return!(!this.layout||i.isDataDriven()||s.isDataDriven())&&yu.hasPaintOverride(this.layout,t)}static hasPaintOverride(t,i){const s=t.get("text-field"),c=vd.paint.properties[i];let f=!1;const m=v=>{for(const S of v)if(c.overrides&&c.overrides.hasOverride(S))return void(f=!0)};if(s.value.kind==="constant"&&s.value.value instanceof ue)m(s.value.value.sections);else if(s.value.kind==="source"){const v=E=>{f||(E instanceof ot&&ft(E.value)===co?m(E.value.sections):E instanceof ra?m(E.sections):E.eachChild(v))},S=s.value;S._styleExpression&&v(S._styleExpression.expression)}return f}}let xf;var B_={get paint(){return xf=xf||new Hr({"background-color":new Tt(Y.paint_background["background-color"]),"background-pattern":new Ml(Y.paint_background["background-pattern"]),"background-opacity":new Tt(Y.paint_background["background-opacity"])})}};class V_ extends Qi{constructor(t){super(t,B_)}}let bf;var O_={get paint(){return bf=bf||new Hr({"raster-opacity":new Tt(Y.paint_raster["raster-opacity"]),"raster-hue-rotate":new Tt(Y.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Tt(Y.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Tt(Y.paint_raster["raster-brightness-max"]),"raster-saturation":new Tt(Y.paint_raster["raster-saturation"]),"raster-contrast":new Tt(Y.paint_raster["raster-contrast"]),"raster-resampling":new Tt(Y.paint_raster["raster-resampling"]),"raster-fade-duration":new Tt(Y.paint_raster["raster-fade-duration"])})}};class F_ extends Qi{constructor(t){super(t,O_)}}class N_ extends Qi{constructor(t){super(t,{}),this.onAdd=i=>{this.implementation.onAdd&&this.implementation.onAdd(i,i.painter.context.gl)},this.onRemove=i=>{this.implementation.onRemove&&this.implementation.onRemove(i,i.painter.context.gl)},this.implementation=t}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 q_{constructor(t){this._methodToThrottle=t,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const U_={once:!0},xd=63710088e-1;class Xo{constructor(t,i){if(isNaN(t)||isNaN(i))throw new Error(`Invalid LngLat object: (${t}, ${i})`);if(this.lng=+t,this.lat=+i,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Xo(Bi(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(t){const i=Math.PI/180,s=this.lat*i,c=t.lat*i,f=Math.sin(s)*Math.sin(c)+Math.cos(s)*Math.cos(c)*Math.cos((t.lng-this.lng)*i);return xd*Math.acos(Math.min(f,1))}static convert(t){if(t instanceof Xo)return t;if(Array.isArray(t)&&(t.length===2||t.length===3))return new Xo(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&typeof t=="object"&&t!==null)return new Xo(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const wf=2*Math.PI*xd;function Sf(n){return wf*Math.cos(n*Math.PI/180)}function Af(n){return(180+n)/360}function kf(n){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+n*Math.PI/360)))/360}function Cf(n,t){return n/Sf(t)}function bd(n){return 360/Math.PI*Math.atan(Math.exp((180-360*n)*Math.PI/180))-90}function Tf(n,t){return n*Sf(bd(t))}class $l{constructor(t,i,s=0){this.x=+t,this.y=+i,this.z=+s}static fromLngLat(t,i=0){const s=Xo.convert(t);return new $l(Af(s.lng),kf(s.lat),Cf(i,s.lat))}toLngLat(){return new Xo(360*this.x-180,bd(this.y))}toAltitude(){return Tf(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/wf*(t=bd(this.y),1/Math.cos(t*Math.PI/180));var t}}function Ef(n,t,i){var s=2*Math.PI*6378137/256/Math.pow(2,i);return[n*s-2*Math.PI*6378137/2,t*s-2*Math.PI*6378137/2]}class wd{constructor(t,i,s){if(!function(c,f,m){return!(c<0||c>25||m<0||m>=Math.pow(2,c)||f<0||f>=Math.pow(2,c))}(t,i,s))throw new Error(`x=${i}, y=${s}, z=${t} outside of bounds. 0<=x<${Math.pow(2,t)}, 0<=y<${Math.pow(2,t)} 0<=z<=25 `);this.z=t,this.x=i,this.y=s,this.key=qa(0,t,t,i,s)}equals(t){return this.z===t.z&&this.x===t.x&&this.y===t.y}url(t,i,s){const c=(m=this.y,v=this.z,S=Ef(256*(f=this.x),256*(m=Math.pow(2,v)-m-1),v),E=Ef(256*(f+1),256*(m+1),v),S[0]+","+S[1]+","+E[0]+","+E[1]);var f,m,v,S,E;const R=function(V,q,H){let W,X="";for(let re=V;re>0;re--)W=1<<re-1,X+=(q&W?1:0)+(H&W?2:0);return X}(this.z,this.x,this.y);return t[(this.x+this.y)%t.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(s==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,i>1?"@2x":"").replace(/{quadkey}/g,R).replace(/{bbox-epsg-3857}/g,c)}isChildOf(t){const i=this.z-t.z;return i>0&&t.x===this.x>>i&&t.y===this.y>>i}getTilePoint(t){const i=Math.pow(2,this.z);return new T((t.x*i-this.x)*ar,(t.y*i-this.y)*ar)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Pf{constructor(t,i){this.wrap=t,this.canonical=i,this.key=qa(t,i.z,i.z,i.x,i.y)}}class hn{constructor(t,i,s,c,f){if(this.terrainRttPosMatrix32f=null,t<s)throw new Error(`overscaledZ should be >= z; overscaledZ = ${t}; z = ${s}`);this.overscaledZ=t,this.wrap=i,this.canonical=new wd(s,+c,+f),this.key=qa(i,t,s,c,f)}clone(){return new hn(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)}scaledTo(t){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const i=this.canonical.z-t;return t>this.canonical.z?new hn(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new hn(t,this.wrap,t,this.canonical.x>>i,this.canonical.y>>i)}calculateScaledKey(t,i){if(t>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${t}; overscaledZ = ${this.overscaledZ}`);const s=this.canonical.z-t;return t>this.canonical.z?qa(this.wrap*+i,t,this.canonical.z,this.canonical.x,this.canonical.y):qa(this.wrap*+i,t,t,this.canonical.x>>s,this.canonical.y>>s)}isChildOf(t){if(t.wrap!==this.wrap)return!1;const i=this.canonical.z-t.canonical.z;return t.overscaledZ===0||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>i&&t.canonical.y===this.canonical.y>>i}children(t){if(this.overscaledZ>=t)return[new hn(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const i=this.canonical.z+1,s=2*this.canonical.x,c=2*this.canonical.y;return[new hn(i,this.wrap,i,s,c),new hn(i,this.wrap,i,s+1,c),new hn(i,this.wrap,i,s,c+1),new hn(i,this.wrap,i,s+1,c+1)]}isLessThan(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))}wrapped(){return new hn(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(t){return new hn(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new Pf(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(t){return this.canonical.getTilePoint(new $l(t.x-this.wrap,t.y))}}function qa(n,t,i,s,c){(n*=2)<0&&(n=-1*n-1);const f=1<<i;return(f*f*n+f*c+s).toString(36)+i.toString(36)+t.toString(36)}bt("CanonicalTileID",wd),bt("OverscaledTileID",hn,{omit:["terrainRttPosMatrix32f"]});class If{constructor(t,i,s,c=1,f=1,m=1,v=0){if(this.uid=t,i.height!==i.width)throw new RangeError("DEM tiles must be square");if(s&&!["mapbox","terrarium","custom"].includes(s))return void Jr(`"${s}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=i.height;const S=this.dim=i.height-2;switch(this.data=new Uint32Array(i.data.buffer),s){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=c,this.greenFactor=f,this.blueFactor=m,this.baseShift=v;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let E=0;E<S;E++)this.data[this._idx(-1,E)]=this.data[this._idx(0,E)],this.data[this._idx(S,E)]=this.data[this._idx(S-1,E)],this.data[this._idx(E,-1)]=this.data[this._idx(E,0)],this.data[this._idx(E,S)]=this.data[this._idx(E,S-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(S,-1)]=this.data[this._idx(S-1,0)],this.data[this._idx(-1,S)]=this.data[this._idx(0,S-1)],this.data[this._idx(S,S)]=this.data[this._idx(S-1,S-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let E=0;E<S;E++)for(let R=0;R<S;R++){const V=this.get(E,R);V>this.max&&(this.max=V),V<this.min&&(this.min=V)}}get(t,i){const s=new Uint8Array(this.data.buffer),c=4*this._idx(t,i);return this.unpack(s[c],s[c+1],s[c+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(t,i){if(t<-1||t>=this.dim+1||i<-1||i>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(i+1)*this.stride+(t+1)}unpack(t,i,s){return t*this.redFactor+i*this.greenFactor+s*this.blueFactor-this.baseShift}getPixels(){return new un({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(t,i,s){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");let c=i*this.dim,f=i*this.dim+this.dim,m=s*this.dim,v=s*this.dim+this.dim;switch(i){case-1:c=f-1;break;case 1:f=c+1}switch(s){case-1:m=v-1;break;case 1:v=m+1}const S=-i*this.dim,E=-s*this.dim;for(let R=m;R<v;R++)for(let V=c;V<f;V++)this.data[this._idx(V,R)]=t.data[this._idx(V+S,R+E)]}}bt("DEMData",If);class Mf{constructor(t){this._stringToNumber={},this._numberToString=[];for(let i=0;i<t.length;i++){const s=t[i];this._stringToNumber[s]=i,this._numberToString[i]=s}}encode(t){return this._stringToNumber[t]}decode(t){if(t>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${t} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[t]}}class Lf{constructor(t,i,s,c,f){this.type="Feature",this._vectorTileFeature=t,t._z=i,t._x=s,t._y=c,this.properties=t.properties,this.id=f}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(t){this._geometry=t}toJSON(){const t={geometry:this.geometry};for(const i in this)i!=="_geometry"&&i!=="_vectorTileFeature"&&(t[i]=this[i]);return t}}class Rf{constructor(t,i){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Ho(ar,16,0),this.grid3D=new Ho(ar,16,0),this.featureIndexArray=new Ne,this.promoteId=i}insert(t,i,s,c,f,m){const v=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(s,c,f);const S=m?this.grid3D:this.grid;for(let E=0;E<i.length;E++){const R=i[E],V=[1/0,1/0,-1/0,-1/0];for(let q=0;q<R.length;q++){const H=R[q];V[0]=Math.min(V[0],H.x),V[1]=Math.min(V[1],H.y),V[2]=Math.max(V[2],H.x),V[3]=Math.max(V[3],H.y)}V[0]<ar&&V[1]<ar&&V[2]>=0&&V[3]>=0&&S.insert(v,V[0],V[1],V[2],V[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Kl.VectorTile(new ud(this.rawTileData)).layers,this.sourceLayerCoder=new Mf(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(t,i,s,c){this.loadVTLayers();const f=t.params,m=ar/t.tileSize/t.scale,v=xs(f.filter),S=t.queryGeometry,E=t.queryPadding*m,R=zf(S),V=this.grid.query(R.minX-E,R.minY-E,R.maxX+E,R.maxY+E),q=zf(t.cameraQueryGeometry),H=this.grid3D.query(q.minX-E,q.minY-E,q.maxX+E,q.maxY+E,(re,ae,Se,fe)=>function(j,$,ge,De,$e){for(const He of j)if($<=He.x&&ge<=He.y&&De>=He.x&&$e>=He.y)return!0;const Oe=[new T($,ge),new T($,$e),new T(De,$e),new T(De,ge)];if(j.length>2){for(const He of Oe)if(Ds(j,He))return!0}for(let He=0;He<j.length-1;He++)if(Iy(j[He],j[He+1],Oe))return!0;return!1}(t.cameraQueryGeometry,re-E,ae-E,Se+E,fe+E));for(const re of H)V.push(re);V.sort(j_);const W={};let X;for(let re=0;re<V.length;re++){const ae=V[re];if(ae===X)continue;X=ae;const Se=this.featureIndexArray.get(ae);let fe=null;this.loadMatchingFeature(W,Se.bucketIndex,Se.sourceLayerIndex,Se.featureIndex,v,f.layers,f.availableImages,i,s,c,(j,$,ge)=>(fe||(fe=Ls(j)),$.queryIntersectsFeature({queryGeometry:S,feature:j,featureState:ge,geometry:fe,zoom:this.z,transform:t.transform,pixelsToTileUnits:m,pixelPosMatrix:t.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:t.getElevation})))}return W}loadMatchingFeature(t,i,s,c,f,m,v,S,E,R,V){const q=this.bucketLayerIDs[i];if(m&&!q.some(re=>m.has(re)))return;const H=this.sourceLayerCoder.decode(s),W=this.vtLayers[H].feature(c);if(f.needGeometry){const re=Rs(W,!0);if(!f.filter(new kr(this.tileID.overscaledZ),re,this.tileID.canonical))return}else if(!f.filter(new kr(this.tileID.overscaledZ),W))return;const X=this.getId(W,H);for(let re=0;re<q.length;re++){const ae=q[re];if(m&&!m.has(ae))continue;const Se=S[ae];if(!Se)continue;let fe={};X&&R&&(fe=R.getState(Se.sourceLayer||"_geojsonTileLayer",X));const j=ri({},E[ae]);j.paint=Df(j.paint,Se.paint,W,fe,v),j.layout=Df(j.layout,Se.layout,W,fe,v);const $=!V||V(W,Se,fe);if(!$)continue;const ge=new Lf(W,this.z,this.x,this.y,X);ge.layer=j;let De=t[ae];De===void 0&&(De=t[ae]=[]),De.push({featureIndex:c,feature:ge,intersectionZ:$})}}lookupSymbolFeatures(t,i,s,c,f,m,v,S){const E={};this.loadVTLayers();const R=xs(f);for(const V of t)this.loadMatchingFeature(E,s,c,V,R,m,v,S,i);return E}hasLayer(t){for(const i of this.bucketLayerIDs)for(const s of i)if(t===s)return!0;return!1}getId(t,i){var s;let c=t.id;return this.promoteId&&(c=t.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[i]],typeof c=="boolean"&&(c=Number(c)),c===void 0&&(!((s=t.properties)===null||s===void 0)&&s.cluster)&&this.promoteId&&(c=Number(t.properties.cluster_id))),c}}function Df(n,t,i,s,c){return Vi(n,(f,m)=>{const v=t instanceof Ra?t.get(m):null;return v&&v.evaluate?v.evaluate(i,s,c):v})}function zf(n){let t=1/0,i=1/0,s=-1/0,c=-1/0;for(const f of n)t=Math.min(t,f.x),i=Math.min(i,f.y),s=Math.max(s,f.x),c=Math.max(c,f.y);return{minX:t,minY:i,maxX:s,maxY:c}}function j_(n,t){return t-n}function Bf(n,t,i,s,c){const f=[];for(let m=0;m<n.length;m++){const v=n[m];let S;for(let E=0;E<v.length-1;E++){let R=v[E],V=v[E+1];R.x<t&&V.x<t||(R.x<t?R=new T(t,R.y+(t-R.x)/(V.x-R.x)*(V.y-R.y))._round():V.x<t&&(V=new T(t,R.y+(t-R.x)/(V.x-R.x)*(V.y-R.y))._round()),R.y<i&&V.y<i||(R.y<i?R=new T(R.x+(i-R.y)/(V.y-R.y)*(V.x-R.x),i)._round():V.y<i&&(V=new T(R.x+(i-R.y)/(V.y-R.y)*(V.x-R.x),i)._round()),R.x>=s&&V.x>=s||(R.x>=s?R=new T(s,R.y+(s-R.x)/(V.x-R.x)*(V.y-R.y))._round():V.x>=s&&(V=new T(s,R.y+(s-R.x)/(V.x-R.x)*(V.y-R.y))._round()),R.y>=c&&V.y>=c||(R.y>=c?R=new T(R.x+(c-R.y)/(V.y-R.y)*(V.x-R.x),c)._round():V.y>=c&&(V=new T(R.x+(c-R.y)/(V.y-R.y)*(V.x-R.x),c)._round()),S&&R.equals(S[S.length-1])||(S=[R],f.push(S)),S.push(V)))))}}return f}bt("FeatureIndex",Rf,{omit:["rawTileData","sourceLayerCoder"]});class Qo extends T{constructor(t,i,s,c){super(t,i),this.angle=s,c!==void 0&&(this.segment=c)}clone(){return new Qo(this.x,this.y,this.angle,this.segment)}}function Vf(n,t,i,s,c){if(t.segment===void 0||i===0)return!0;let f=t,m=t.segment+1,v=0;for(;v>-i/2;){if(m--,m<0)return!1;v-=n[m].dist(f),f=n[m]}v+=n[m].dist(n[m+1]),m++;const S=[];let E=0;for(;v<i/2;){const R=n[m],V=n[m+1];if(!V)return!1;let q=n[m-1].angleTo(R)-R.angleTo(V);for(q=Math.abs((q+3*Math.PI)%(2*Math.PI)-Math.PI),S.push({distance:v,angleDelta:q}),E+=q;v-S[0].distance>s;)E-=S.shift().angleDelta;if(E>c)return!1;m++,v+=R.dist(V)}return!0}function Of(n){let t=0;for(let i=0;i<n.length-1;i++)t+=n[i].dist(n[i+1]);return t}function Ff(n,t,i){return n?.6*t*i:0}function Nf(n,t){return Math.max(n?n.right-n.left:0,t?t.right-t.left:0)}function H_(n,t,i,s,c,f){const m=Ff(i,c,f),v=Nf(i,s)*f;let S=0;const E=Of(n)/2;for(let R=0;R<n.length-1;R++){const V=n[R],q=n[R+1],H=V.dist(q);if(S+H>E){const W=(E-S)/H,X=xn.number(V.x,q.x,W),re=xn.number(V.y,q.y,W),ae=new Qo(X,re,q.angleTo(V),R);return ae._round(),!m||Vf(n,ae,v,m,t)?ae:void 0}S+=H}}function W_(n,t,i,s,c,f,m,v,S){const E=Ff(s,f,m),R=Nf(s,c),V=R*m,q=n[0].x===0||n[0].x===S||n[0].y===0||n[0].y===S;return t-V<t/4&&(t=V+t/4),qf(n,q?t/2*v%t:(R/2+2*f)*m*v%t,t,E,i,V,q,!1,S)}function qf(n,t,i,s,c,f,m,v,S){const E=f/2,R=Of(n);let V=0,q=t-i,H=[];for(let W=0;W<n.length-1;W++){const X=n[W],re=n[W+1],ae=X.dist(re),Se=re.angleTo(X);for(;q+i<V+ae;){q+=i;const fe=(q-V)/ae,j=xn.number(X.x,re.x,fe),$=xn.number(X.y,re.y,fe);if(j>=0&&j<S&&$>=0&&$<S&&q-E>=0&&q+E<=R){const ge=new Qo(j,$,Se,W);ge._round(),s&&!Vf(n,ge,f,s,c)||H.push(ge)}}V+=ae}return v||H.length||m||(H=qf(n,V/2,i,s,c,f,m,!0,S)),H}bt("Anchor",Qo);const ec=Ui;function Uf(n,t,i,s){const c=[],f=n.image,m=f.pixelRatio,v=f.paddedRect.w-2*ec,S=f.paddedRect.h-2*ec;let E={x1:n.left,y1:n.top,x2:n.right,y2:n.bottom};const R=f.stretchX||[[0,v]],V=f.stretchY||[[0,S]],q=(Ze,wt)=>Ze+wt[1]-wt[0],H=R.reduce(q,0),W=V.reduce(q,0),X=v-H,re=S-W;let ae=0,Se=H,fe=0,j=W,$=0,ge=X,De=0,$e=re;if(f.content&&s){const Ze=f.content,wt=Ze[2]-Ze[0],Dt=Ze[3]-Ze[1];(f.textFitWidth||f.textFitHeight)&&(E=ff(n)),ae=_u(R,0,Ze[0]),fe=_u(V,0,Ze[1]),Se=_u(R,Ze[0],Ze[2]),j=_u(V,Ze[1],Ze[3]),$=Ze[0]-ae,De=Ze[1]-fe,ge=wt-Se,$e=Dt-j}const Oe=E.x1,He=E.y1,st=E.x2-Oe,et=E.y2-He,lt=(Ze,wt,Dt,Lt)=>{const Ct=vu(Ze.stretch-ae,Se,st,Oe),ir=xu(Ze.fixed-$,ge,Ze.stretch,H),Fr=vu(wt.stretch-fe,j,et,He),$r=xu(wt.fixed-De,$e,wt.stretch,W),Ci=vu(Dt.stretch-ae,Se,st,Oe),dn=xu(Dt.fixed-$,ge,Dt.stretch,H),ji=vu(Lt.stretch-fe,j,et,He),xi=xu(Lt.fixed-De,$e,Lt.stretch,W),zr=new T(Ct,Fr),ui=new T(Ci,Fr),bi=new T(Ci,ji),wi=new T(Ct,ji),Di=new T(ir/m,$r/m),pn=new T(dn/m,xi/m),hi=t*Math.PI/180;if(hi){const di=Math.sin(hi),pi=Math.cos(hi),Kr=[pi,-di,di,pi];zr._matMult(Kr),ui._matMult(Kr),wi._matMult(Kr),bi._matMult(Kr)}const Hi=Ze.stretch+Ze.fixed,ei=wt.stretch+wt.fixed;return{tl:zr,tr:ui,bl:wi,br:bi,tex:{x:f.paddedRect.x+ec+Hi,y:f.paddedRect.y+ec+ei,w:Dt.stretch+Dt.fixed-Hi,h:Lt.stretch+Lt.fixed-ei},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Di,pixelOffsetBR:pn,minFontScaleX:ge/m/st,minFontScaleY:$e/m/et,isSDF:i}};if(s&&(f.stretchX||f.stretchY)){const Ze=jf(R,X,H),wt=jf(V,re,W);for(let Dt=0;Dt<Ze.length-1;Dt++){const Lt=Ze[Dt],Ct=Ze[Dt+1];for(let ir=0;ir<wt.length-1;ir++)c.push(lt(Lt,wt[ir],Ct,wt[ir+1]))}}else c.push(lt({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:v+1},{fixed:0,stretch:S+1}));return c}function _u(n,t,i){let s=0;for(const c of n)s+=Math.max(t,Math.min(i,c[1]))-Math.max(t,Math.min(i,c[0]));return s}function jf(n,t,i){const s=[{fixed:-1,stretch:0}];for(const[c,f]of n){const m=s[s.length-1];s.push({fixed:c-m.stretch,stretch:m.stretch}),s.push({fixed:c-m.stretch,stretch:m.stretch+(f-c)})}return s.push({fixed:t+ec,stretch:i}),s}function vu(n,t,i,s){return n/t*i+s}function xu(n,t,i,s){return n-t*i/s}class bu{constructor(t,i,s,c,f,m,v,S,E,R){var V;if(this.boxStartIndex=t.length,E){let q=m.top,H=m.bottom;const W=m.collisionPadding;W&&(q-=W[1],H+=W[3]);let X=H-q;X>0&&(X=Math.max(10,X),this.circleDiameter=X)}else{const q=!((V=m.image)===null||V===void 0)&&V.content&&(m.image.textFitWidth||m.image.textFitHeight)?ff(m):{x1:m.left,y1:m.top,x2:m.right,y2:m.bottom};q.y1=q.y1*v-S[0],q.y2=q.y2*v+S[2],q.x1=q.x1*v-S[3],q.x2=q.x2*v+S[1];const H=m.collisionPadding;if(H&&(q.x1-=H[0]*v,q.y1-=H[1]*v,q.x2+=H[2]*v,q.y2+=H[3]*v),R){const W=new T(q.x1,q.y1),X=new T(q.x2,q.y1),re=new T(q.x1,q.y2),ae=new T(q.x2,q.y2),Se=R*Math.PI/180;W._rotate(Se),X._rotate(Se),re._rotate(Se),ae._rotate(Se),q.x1=Math.min(W.x,X.x,re.x,ae.x),q.x2=Math.max(W.x,X.x,re.x,ae.x),q.y1=Math.min(W.y,X.y,re.y,ae.y),q.y2=Math.max(W.y,X.y,re.y,ae.y)}t.emplaceBack(i.x,i.y,q.x1,q.y1,q.x2,q.y2,s,c,f)}this.boxEndIndex=t.length}}class Z_{constructor(t=[],i=(s,c)=>s<c?-1:s>c?1:0){if(this.data=t,this.length=this.data.length,this.compare=i,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(t){this.data.push(t),this._up(this.length++)}pop(){if(this.length===0)return;const t=this.data[0],i=this.data.pop();return--this.length>0&&(this.data[0]=i,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:i,compare:s}=this,c=i[t];for(;t>0;){const f=t-1>>1,m=i[f];if(s(c,m)>=0)break;i[t]=m,t=f}i[t]=c}_down(t){const{data:i,compare:s}=this,c=this.length>>1,f=i[t];for(;t<c;){let m=1+(t<<1);const v=m+1;if(v<this.length&&s(i[v],i[m])<0&&(m=v),s(i[m],f)>=0)break;i[t]=i[m],t=m}i[t]=f}}function K_(n,t=1,i=!1){let s=1/0,c=1/0,f=-1/0,m=-1/0;const v=n[0];for(let H=0;H<v.length;H++){const W=v[H];(!H||W.x<s)&&(s=W.x),(!H||W.y<c)&&(c=W.y),(!H||W.x>f)&&(f=W.x),(!H||W.y>m)&&(m=W.y)}const S=Math.min(f-s,m-c);let E=S/2;const R=new Z_([],G_);if(S===0)return new T(s,c);for(let H=s;H<f;H+=S)for(let W=c;W<m;W+=S)R.push(new Ua(H+E,W+E,E,n));let V=function(H){let W=0,X=0,re=0;const ae=H[0];for(let Se=0,fe=ae.length,j=fe-1;Se<fe;j=Se++){const $=ae[Se],ge=ae[j],De=$.x*ge.y-ge.x*$.y;X+=($.x+ge.x)*De,re+=($.y+ge.y)*De,W+=3*De}return new Ua(X/W,re/W,0,H)}(n),q=R.length;for(;R.length;){const H=R.pop();(H.d>V.d||!V.d)&&(V=H,i&&console.log("found best %d after %d probes",Math.round(1e4*H.d)/1e4,q)),H.max-V.d<=t||(E=H.h/2,R.push(new Ua(H.p.x-E,H.p.y-E,E,n)),R.push(new Ua(H.p.x+E,H.p.y-E,E,n)),R.push(new Ua(H.p.x-E,H.p.y+E,E,n)),R.push(new Ua(H.p.x+E,H.p.y+E,E,n)),q+=4)}return i&&(console.log(`num probes: ${q}`),console.log(`best distance: ${V.d}`)),V.p}function G_(n,t){return t.max-n.max}function Ua(n,t,i,s){this.p=new T(n,t),this.h=i,this.d=function(c,f){let m=!1,v=1/0;for(let S=0;S<f.length;S++){const E=f[S];for(let R=0,V=E.length,q=V-1;R<V;q=R++){const H=E[R],W=E[q];H.y>c.y!=W.y>c.y&&c.x<(W.x-H.x)*(c.y-H.y)/(W.y-H.y)+H.x&&(m=!m),v=Math.min(v,wp(c,H,W))}}return(m?1:-1)*Math.sqrt(v)}(this.p,s),this.max=this.d+this.h*Math.SQRT2}var ki;x.aB=void 0,(ki=x.aB||(x.aB={}))[ki.center=1]="center",ki[ki.left=2]="left",ki[ki.right=3]="right",ki[ki.top=4]="top",ki[ki.bottom=5]="bottom",ki[ki["top-left"]=6]="top-left",ki[ki["top-right"]=7]="top-right",ki[ki["bottom-left"]=8]="bottom-left",ki[ki["bottom-right"]=9]="bottom-right";const Yo=7,Sd=Number.POSITIVE_INFINITY;function Hf(n,t){return t[1]!==Sd?function(i,s,c){let f=0,m=0;switch(s=Math.abs(s),c=Math.abs(c),i){case"top-right":case"top-left":case"top":m=c-Yo;break;case"bottom-right":case"bottom-left":case"bottom":m=-c+Yo}switch(i){case"top-right":case"bottom-right":case"right":f=-s;break;case"top-left":case"bottom-left":case"left":f=s}return[f,m]}(n,t[0],t[1]):function(i,s){let c=0,f=0;s<0&&(s=0);const m=s/Math.SQRT2;switch(i){case"top-right":case"top-left":f=m-Yo;break;case"bottom-right":case"bottom-left":f=-m+Yo;break;case"bottom":f=-s+Yo;break;case"top":f=s-Yo}switch(i){case"top-right":case"bottom-right":c=-m;break;case"top-left":case"bottom-left":c=m;break;case"left":c=s;break;case"right":c=-s}return[c,f]}(n,t[0])}function Wf(n,t,i){var s;const c=n.layout,f=(s=c.get("text-variable-anchor-offset"))===null||s===void 0?void 0:s.evaluate(t,{},i);if(f){const v=f.values,S=[];for(let E=0;E<v.length;E+=2){const R=S[E]=v[E],V=v[E+1].map(q=>q*Yr);R.startsWith("top")?V[1]-=Yo:R.startsWith("bottom")&&(V[1]+=Yo),S[E+1]=V}return new Je(S)}const m=c.get("text-variable-anchor");if(m){let v;v=n._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[c.get("text-radial-offset").evaluate(t,{},i)*Yr,Sd]:c.get("text-offset").evaluate(t,{},i).map(E=>E*Yr);const S=[];for(const E of m)S.push(E,Hf(E,v));return new Je(S)}return null}function Ad(n){switch(n){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function J_(n,t,i,s,c,f,m,v,S,E,R,V){let q=f.textMaxSize.evaluate(t,{});q===void 0&&(q=m);const H=n.layers[0].layout,W=H.get("icon-offset").evaluate(t,{},R),X=Kf(i.horizontal),re=m/24,ae=n.tilePixelRatio*re,Se=n.tilePixelRatio*q/24,fe=n.tilePixelRatio*v,j=n.tilePixelRatio*H.get("symbol-spacing"),$=H.get("text-padding")*n.tilePixelRatio,ge=function(Dt,Lt,Ct,ir=1){const Fr=Dt.get("icon-padding").evaluate(Lt,{},Ct),$r=Fr&&Fr.values;return[$r[0]*ir,$r[1]*ir,$r[2]*ir,$r[3]*ir]}(H,t,R,n.tilePixelRatio),De=H.get("text-max-angle")/180*Math.PI,$e=H.get("text-rotation-alignment")!=="viewport"&&H.get("symbol-placement")!=="point",Oe=H.get("icon-rotation-alignment")==="map"&&H.get("symbol-placement")!=="point",He=H.get("symbol-placement"),st=j/2,et=H.get("icon-text-fit");let lt;s&&et!=="none"&&(n.allowVerticalPlacement&&i.vertical&&(lt=mf(s,i.vertical,et,H.get("icon-text-fit-padding"),W,re)),X&&(s=mf(s,X,et,H.get("icon-text-fit-padding"),W,re)));const Ze=R?V.line.getGranularityForZoomLevel(R.z):1,wt=(Dt,Lt)=>{Lt.x<0||Lt.x>=ar||Lt.y<0||Lt.y>=ar||function(Ct,ir,Fr,$r,Ci,dn,ji,xi,zr,ui,bi,wi,Di,pn,hi,Hi,ei,di,pi,Kr,Tr,Fn,ja,Nn,Y_){const Ha=Ct.addToLineVertexArray(ir,Fr);let Vs,Wa,Za,Ka,Qf=0,Yf=0,$f=0,em=0,Ld=-1,Rd=-1;const Co={};let tm=Vn("");if(Ct.allowVerticalPlacement&&$r.vertical){const Ii=xi.layout.get("text-rotate").evaluate(Tr,{},Nn)+90;Za=new bu(zr,ir,ui,bi,wi,$r.vertical,Di,pn,hi,Ii),ji&&(Ka=new bu(zr,ir,ui,bi,wi,ji,ei,di,hi,Ii))}if(Ci){const Ii=xi.layout.get("icon-rotate").evaluate(Tr,{}),fn=xi.layout.get("icon-text-fit")!=="none",Os=Uf(Ci,Ii,ja,fn),Un=ji?Uf(ji,Ii,ja,fn):void 0;Wa=new bu(zr,ir,ui,bi,wi,Ci,ei,di,!1,Ii),Qf=4*Os.length;const Fs=Ct.iconSizeData;let so=null;Fs.kind==="source"?(so=[oo*xi.layout.get("icon-size").evaluate(Tr,{})],so[0]>Jo&&Jr(`${Ct.layerIds[0]}: Value for "icon-size" is >= ${Yl}. Reduce your "icon-size".`)):Fs.kind==="composite"&&(so=[oo*Fn.compositeIconSizes[0].evaluate(Tr,{},Nn),oo*Fn.compositeIconSizes[1].evaluate(Tr,{},Nn)],(so[0]>Jo||so[1]>Jo)&&Jr(`${Ct.layerIds[0]}: Value for "icon-size" is >= ${Yl}. Reduce your "icon-size".`)),Ct.addSymbols(Ct.icon,Os,so,Kr,pi,Tr,x.al.none,ir,Ha.lineStartIndex,Ha.lineLength,-1,Nn),Ld=Ct.icon.placedSymbolArray.length-1,Un&&(Yf=4*Un.length,Ct.addSymbols(Ct.icon,Un,so,Kr,pi,Tr,x.al.vertical,ir,Ha.lineStartIndex,Ha.lineLength,-1,Nn),Rd=Ct.icon.placedSymbolArray.length-1)}const rm=Object.keys($r.horizontal);for(const Ii of rm){const fn=$r.horizontal[Ii];if(!Vs){tm=Vn(fn.text);const Un=xi.layout.get("text-rotate").evaluate(Tr,{},Nn);Vs=new bu(zr,ir,ui,bi,wi,fn,Di,pn,hi,Un)}const Os=fn.positionedLines.length===1;if($f+=Zf(Ct,ir,fn,dn,xi,hi,Tr,Hi,Ha,$r.vertical?x.al.horizontal:x.al.horizontalOnly,Os?rm:[Ii],Co,Ld,Fn,Nn),Os)break}$r.vertical&&(em+=Zf(Ct,ir,$r.vertical,dn,xi,hi,Tr,Hi,Ha,x.al.vertical,["vertical"],Co,Rd,Fn,Nn));const $_=Vs?Vs.boxStartIndex:Ct.collisionBoxArray.length,ev=Vs?Vs.boxEndIndex:Ct.collisionBoxArray.length,tv=Za?Za.boxStartIndex:Ct.collisionBoxArray.length,rv=Za?Za.boxEndIndex:Ct.collisionBoxArray.length,iv=Wa?Wa.boxStartIndex:Ct.collisionBoxArray.length,nv=Wa?Wa.boxEndIndex:Ct.collisionBoxArray.length,ov=Ka?Ka.boxStartIndex:Ct.collisionBoxArray.length,sv=Ka?Ka.boxEndIndex:Ct.collisionBoxArray.length;let qn=-1;const Su=(Ii,fn)=>Ii&&Ii.circleDiameter?Math.max(Ii.circleDiameter,fn):fn;qn=Su(Vs,qn),qn=Su(Za,qn),qn=Su(Wa,qn),qn=Su(Ka,qn);const im=qn>-1?1:0;im&&(qn*=Y_/Yr),Ct.glyphOffsetArray.length>=Na.MAX_GLYPHS&&Jr("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Tr.sortKey!==void 0&&Ct.addToSortKeyRanges(Ct.symbolInstances.length,Tr.sortKey);const av=Wf(xi,Tr,Nn),[lv,cv]=function(Ii,fn){const Os=Ii.length,Un=fn==null?void 0:fn.values;if((Un==null?void 0:Un.length)>0)for(let Fs=0;Fs<Un.length;Fs+=2){const so=Un[Fs+1];Ii.emplaceBack(x.aB[Un[Fs]],so[0],so[1])}return[Os,Ii.length]}(Ct.textAnchorOffsets,av);Ct.symbolInstances.emplaceBack(ir.x,ir.y,Co.right>=0?Co.right:-1,Co.center>=0?Co.center:-1,Co.left>=0?Co.left:-1,Co.vertical||-1,Ld,Rd,tm,$_,ev,tv,rv,iv,nv,ov,sv,ui,$f,em,Qf,Yf,im,0,Di,qn,lv,cv)}(n,Lt,Dt,i,s,c,lt,n.layers[0],n.collisionBoxArray,t.index,t.sourceLayerIndex,n.index,ae,[$,$,$,$],$e,S,fe,ge,Oe,W,t,f,E,R,m)};if(He==="line")for(const Dt of Bf(t.geometry,0,0,ar,ar)){const Lt=Bs(Dt,Ze),Ct=W_(Lt,j,De,i.vertical||X,s,24,Se,n.overscaling,ar);for(const ir of Ct)X&&X_(n,X.text,st,ir)||wt(Lt,ir)}else if(He==="line-center"){for(const Dt of t.geometry)if(Dt.length>1){const Lt=Bs(Dt,Ze),Ct=H_(Lt,De,i.vertical||X,s,24,Se);Ct&&wt(Lt,Ct)}}else if(t.type==="Polygon")for(const Dt of sa(t.geometry,0)){const Lt=K_(Dt,16);wt(Bs(Dt[0],Ze,!0),new Qo(Lt.x,Lt.y,0))}else if(t.type==="LineString")for(const Dt of t.geometry){const Lt=Bs(Dt,Ze);wt(Lt,new Qo(Lt[0].x,Lt[0].y,0))}else if(t.type==="Point")for(const Dt of t.geometry)for(const Lt of Dt)wt([Lt],new Qo(Lt.x,Lt.y,0))}function Zf(n,t,i,s,c,f,m,v,S,E,R,V,q,H,W){const X=function(Se,fe,j,$,ge,De,$e,Oe){const He=$.layout.get("text-rotate").evaluate(De,{})*Math.PI/180,st=[];for(const et of fe.positionedLines)for(const lt of et.positionedGlyphs){if(!lt.rect)continue;const Ze=lt.rect||{};let wt=S_+1,Dt=!0,Lt=1,Ct=0;const ir=(ge||Oe)&&lt.vertical,Fr=lt.metrics.advance*lt.scale/2;if(Oe&&fe.verticalizable&&(Ct=et.lineOffset/2-(lt.imageName?-(Yr-lt.metrics.width*lt.scale)/2:(lt.scale-1)*Yr)),lt.imageName){const di=$e[lt.imageName];Dt=di.sdf,Lt=di.pixelRatio,wt=Ui/Lt}const $r=ge?[lt.x+Fr,lt.y]:[0,0];let Ci=ge?[0,0]:[lt.x+Fr+j[0],lt.y+j[1]-Ct],dn=[0,0];ir&&(dn=Ci,Ci=[0,0]);const ji=lt.metrics.isDoubleResolution?2:1,xi=(lt.metrics.left-wt)*lt.scale-Fr+Ci[0],zr=(-lt.metrics.top-wt)*lt.scale+Ci[1],ui=xi+Ze.w/ji*lt.scale/Lt,bi=zr+Ze.h/ji*lt.scale/Lt,wi=new T(xi,zr),Di=new T(ui,zr),pn=new T(xi,bi),hi=new T(ui,bi);if(ir){const di=new T(-Fr,Fr-pu),pi=-Math.PI/2,Kr=Yr/2-Fr,Tr=new T(5-pu-Kr,-(lt.imageName?Kr:0)),Fn=new T(...dn);wi._rotateAround(pi,di)._add(Tr)._add(Fn),Di._rotateAround(pi,di)._add(Tr)._add(Fn),pn._rotateAround(pi,di)._add(Tr)._add(Fn),hi._rotateAround(pi,di)._add(Tr)._add(Fn)}if(He){const di=Math.sin(He),pi=Math.cos(He),Kr=[pi,-di,di,pi];wi._matMult(Kr),Di._matMult(Kr),pn._matMult(Kr),hi._matMult(Kr)}const Hi=new T(0,0),ei=new T(0,0);st.push({tl:wi,tr:Di,bl:pn,br:hi,tex:Ze,writingMode:fe.writingMode,glyphOffset:$r,sectionIndex:lt.sectionIndex,isSDF:Dt,pixelOffsetTL:Hi,pixelOffsetBR:ei,minFontScaleX:0,minFontScaleY:0})}return st}(0,i,v,c,f,m,s,n.allowVerticalPlacement),re=n.textSizeData;let ae=null;re.kind==="source"?(ae=[oo*c.layout.get("text-size").evaluate(m,{})],ae[0]>Jo&&Jr(`${n.layerIds[0]}: Value for "text-size" is >= ${Yl}. Reduce your "text-size".`)):re.kind==="composite"&&(ae=[oo*H.compositeTextSizes[0].evaluate(m,{},W),oo*H.compositeTextSizes[1].evaluate(m,{},W)],(ae[0]>Jo||ae[1]>Jo)&&Jr(`${n.layerIds[0]}: Value for "text-size" is >= ${Yl}. Reduce your "text-size".`)),n.addSymbols(n.text,X,ae,v,f,m,E,t,S.lineStartIndex,S.lineLength,q,W);for(const Se of R)V[Se]=n.text.placedSymbolArray.length-1;return 4*X.length}function Kf(n){for(const t in n)return n[t];return null}function X_(n,t,i,s){const c=n.compareText;if(t in c){const f=c[t];for(let m=f.length-1;m>=0;m--)if(s.dist(f[m])<i)return!0}else c[t]=[];return c[t].push(s),!1}const Gf=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class kd{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[i,s]=new Uint8Array(t,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");const c=s>>4;if(c!==1)throw new Error(`Got v${c} data when expected v1.`);const f=Gf[15&s];if(!f)throw new Error("Unrecognized array type.");const[m]=new Uint16Array(t,2,1),[v]=new Uint32Array(t,4,1);return new kd(v,m,f,t)}constructor(t,i=64,s=Float64Array,c){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const f=Gf.indexOf(this.ArrayType),m=2*t*this.ArrayType.BYTES_PER_ELEMENT,v=t*this.IndexArrayType.BYTES_PER_ELEMENT,S=(8-v%8)%8;if(f<0)throw new Error(`Unexpected typed array class: ${s}.`);c&&c instanceof ArrayBuffer?(this.data=c,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+S,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+m+v+S),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+v+S,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+f]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=t)}add(t,i){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=i,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return Cd(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,i,s,c){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:f,coords:m,nodeSize:v}=this,S=[0,f.length-1,0],E=[];for(;S.length;){const R=S.pop()||0,V=S.pop()||0,q=S.pop()||0;if(V-q<=v){for(let re=q;re<=V;re++){const ae=m[2*re],Se=m[2*re+1];ae>=t&&ae<=s&&Se>=i&&Se<=c&&E.push(f[re])}continue}const H=q+V>>1,W=m[2*H],X=m[2*H+1];W>=t&&W<=s&&X>=i&&X<=c&&E.push(f[H]),(R===0?t<=W:i<=X)&&(S.push(q),S.push(H-1),S.push(1-R)),(R===0?s>=W:c>=X)&&(S.push(H+1),S.push(V),S.push(1-R))}return E}within(t,i,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:c,coords:f,nodeSize:m}=this,v=[0,c.length-1,0],S=[],E=s*s;for(;v.length;){const R=v.pop()||0,V=v.pop()||0,q=v.pop()||0;if(V-q<=m){for(let re=q;re<=V;re++)Xf(f[2*re],f[2*re+1],t,i)<=E&&S.push(c[re]);continue}const H=q+V>>1,W=f[2*H],X=f[2*H+1];Xf(W,X,t,i)<=E&&S.push(c[H]),(R===0?t-s<=W:i-s<=X)&&(v.push(q),v.push(H-1),v.push(1-R)),(R===0?t+s>=W:i+s>=X)&&(v.push(H+1),v.push(V),v.push(1-R))}return S}}function Cd(n,t,i,s,c,f){if(c-s<=i)return;const m=s+c>>1;Jf(n,t,m,s,c,f),Cd(n,t,i,s,m-1,1-f),Cd(n,t,i,m+1,c,1-f)}function Jf(n,t,i,s,c,f){for(;c>s;){if(c-s>600){const E=c-s+1,R=i-s+1,V=Math.log(E),q=.5*Math.exp(2*V/3),H=.5*Math.sqrt(V*q*(E-q)/E)*(R-E/2<0?-1:1);Jf(n,t,i,Math.max(s,Math.floor(i-R*q/E+H)),Math.min(c,Math.floor(i+(E-R)*q/E+H)),f)}const m=t[2*i+f];let v=s,S=c;for(tc(n,t,s,i),t[2*c+f]>m&&tc(n,t,s,c);v<S;){for(tc(n,t,v,S),v++,S--;t[2*v+f]<m;)v++;for(;t[2*S+f]>m;)S--}t[2*s+f]===m?tc(n,t,s,S):(S++,tc(n,t,S,c)),S<=i&&(s=S+1),i<=S&&(c=S-1)}}function tc(n,t,i,s){Td(n,i,s),Td(t,2*i,2*s),Td(t,2*i+1,2*s+1)}function Td(n,t,i){const s=n[t];n[t]=n[i],n[i]=s}function Xf(n,t,i,s){const c=n-i,f=t-s;return c*c+f*f}var Ed;x.co=void 0,(Ed=x.co||(x.co={})).create="create",Ed.load="load",Ed.fullLoad="fullLoad";let wu=null,rc=[];const Pd=1e3/60,Id="loadTime",Md="fullLoadTime",Q_={mark(n){performance.mark(n)},frame(n){const t=n;wu!=null&&rc.push(t-wu),wu=t},clearMetrics(){wu=null,rc=[],performance.clearMeasures(Id),performance.clearMeasures(Md);for(const n in x.co)performance.clearMarks(x.co[n])},getPerformanceMetrics(){performance.measure(Id,x.co.create,x.co.load),performance.measure(Md,x.co.create,x.co.fullLoad);const n=performance.getEntriesByName(Id)[0].duration,t=performance.getEntriesByName(Md)[0].duration,i=rc.length,s=1/(rc.reduce((f,m)=>f+m,0)/i/1e3),c=rc.filter(f=>f>Pd).reduce((f,m)=>f+(m-Pd)/Pd,0);return{loadTime:n,fullLoadTime:t,fps:s,percentDroppedFrames:c/(i+c)*100,totalFrames:i}}};x.$=$l,x.A=Le,x.B=xn,x.C=kr,x.D=Tt,x.E=xe,x.F=Vh,x.G=function(n){if(At==null){const t=n.navigator?n.navigator.userAgent:null;At=!!n.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return At},x.H=class{constructor(n,t){this.target=n,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new q_(()=>this.process()),this.subscription=Jt(this.target,"message",i=>this.receive(i),!1),this.globalScope=vt(self)?n:window}registerMessageHandler(n,t){this.messageHandlers[n]=t}sendAsync(n,t){return new Promise((i,s)=>{const c=Math.round(1e18*Math.random()).toString(36).substring(0,10),f=t?Jt(t.signal,"abort",()=>{f==null||f.unsubscribe(),delete this.resolveRejects[c];const S={id:c,type:"<cancel>",origin:location.origin,targetMapId:n.targetMapId,sourceMapId:this.mapId};this.target.postMessage(S)},U_):null;this.resolveRejects[c]={resolve:S=>{f==null||f.unsubscribe(),i(S)},reject:S=>{f==null||f.unsubscribe(),s(S)}};const m=[],v=Object.assign(Object.assign({},n),{id:c,sourceMapId:this.mapId,origin:location.origin,data:Wo(n.data,m)});this.target.postMessage(v,{transfer:m})})}receive(n){const t=n.data,i=t.id;if(!(t.origin!=="file://"&&location.origin!=="file://"&&t.origin!=="resource://android"&&location.origin!=="resource://android"&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(t.type==="<cancel>"){delete this.tasks[i];const s=this.abortControllers[i];return delete this.abortControllers[i],void(s&&s.abort())}if(vt(self)||t.mustQueue)return this.tasks[i]=t,this.taskQueue.push(i),void this.invoker.trigger();this.processTask(i,t)}}process(){if(this.taskQueue.length===0)return;const n=this.taskQueue.shift(),t=this.tasks[n];delete this.tasks[n],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(n,t)}processTask(n,t){return o(this,void 0,void 0,function*(){if(t.type==="<response>"){const c=this.resolveRejects[n];return delete this.resolveRejects[n],c?void(t.error?c.reject(As(t.error)):c.resolve(As(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(n,new Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const i=As(t.data),s=new AbortController;this.abortControllers[n]=s;try{const c=yield this.messageHandlers[t.type](t.sourceMapId,i,s);this.completeTask(n,null,c)}catch(c){this.completeTask(n,c)}})}completeTask(n,t,i){const s=[];delete this.abortControllers[n];const c={id:n,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:t?Wo(t):null,data:Wo(i,s)};this.target.postMessage(c,{transfer:s})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},x.I=dd,x.J=Wt,x.K=function(){var n=new Le(16);return Le!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n},x.L=function(n,t,i){var s,c,f,m,v,S,E,R,V,q,H,W,X=i[0],re=i[1],ae=i[2];return t===n?(n[12]=t[0]*X+t[4]*re+t[8]*ae+t[12],n[13]=t[1]*X+t[5]*re+t[9]*ae+t[13],n[14]=t[2]*X+t[6]*re+t[10]*ae+t[14],n[15]=t[3]*X+t[7]*re+t[11]*ae+t[15]):(c=t[1],f=t[2],m=t[3],v=t[4],S=t[5],E=t[6],R=t[7],V=t[8],q=t[9],H=t[10],W=t[11],n[0]=s=t[0],n[1]=c,n[2]=f,n[3]=m,n[4]=v,n[5]=S,n[6]=E,n[7]=R,n[8]=V,n[9]=q,n[10]=H,n[11]=W,n[12]=s*X+v*re+V*ae+t[12],n[13]=c*X+S*re+q*ae+t[13],n[14]=f*X+E*re+H*ae+t[14],n[15]=m*X+R*re+W*ae+t[15]),n},x.M=function(n,t,i){var s=i[0],c=i[1],f=i[2];return n[0]=t[0]*s,n[1]=t[1]*s,n[2]=t[2]*s,n[3]=t[3]*s,n[4]=t[4]*c,n[5]=t[5]*c,n[6]=t[6]*c,n[7]=t[7]*c,n[8]=t[8]*f,n[9]=t[9]*f,n[10]=t[10]*f,n[11]=t[11]*f,n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},x.N=function(n,t,i){var s=t[0],c=t[1],f=t[2],m=t[3],v=t[4],S=t[5],E=t[6],R=t[7],V=t[8],q=t[9],H=t[10],W=t[11],X=t[12],re=t[13],ae=t[14],Se=t[15],fe=i[0],j=i[1],$=i[2],ge=i[3];return n[0]=fe*s+j*v+$*V+ge*X,n[1]=fe*c+j*S+$*q+ge*re,n[2]=fe*f+j*E+$*H+ge*ae,n[3]=fe*m+j*R+$*W+ge*Se,n[4]=(fe=i[4])*s+(j=i[5])*v+($=i[6])*V+(ge=i[7])*X,n[5]=fe*c+j*S+$*q+ge*re,n[6]=fe*f+j*E+$*H+ge*ae,n[7]=fe*m+j*R+$*W+ge*Se,n[8]=(fe=i[8])*s+(j=i[9])*v+($=i[10])*V+(ge=i[11])*X,n[9]=fe*c+j*S+$*q+ge*re,n[10]=fe*f+j*E+$*H+ge*ae,n[11]=fe*m+j*R+$*W+ge*Se,n[12]=(fe=i[12])*s+(j=i[13])*v+($=i[14])*V+(ge=i[15])*X,n[13]=fe*c+j*S+$*q+ge*re,n[14]=fe*f+j*E+$*H+ge*ae,n[15]=fe*m+j*R+$*W+ge*Se,n},x.O=function(n,t){const i={};for(let s=0;s<t.length;s++){const c=t[s];c in n&&(i[c]=n[c])}return i},x.P=T,x.Q=Xo,x.R=un,x.S=kf,x.T=eu,x.U=Af,x.V=Ie,x.W=ee,x.X=Et,x.Y=hn,x.Z=ar,x._=o,x.a=gi,x.a$=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),f=t[4],m=t[5],v=t[6],S=t[7],E=t[8],R=t[9],V=t[10],q=t[11];return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[4]=f*c+E*s,n[5]=m*c+R*s,n[6]=v*c+V*s,n[7]=S*c+q*s,n[8]=E*c-f*s,n[9]=R*c-m*s,n[10]=V*c-v*s,n[11]=q*c-S*s,n},x.a0=25,x.a1=wd,x.a2=n=>{const t=window.document.createElement("video");return t.muted=!0,new Promise(i=>{t.onloadstart=()=>{i(t)};for(const s of n){const c=window.document.createElement("source");ke(s)||(t.crossOrigin="Anonymous"),c.src=s,t.appendChild(c)}})},x.a3=Ue,x.a4=function(){return Gi++},x.a5=se,x.a6=Na,x.a7=xs,x.a8=Rs,x.a9=Lf,x.aA=function(n,t,i,s,c=!1){if(!i[0]&&!i[1])return[0,0];const f=c?s==="map"?-n.bearingInRadians:0:s==="viewport"?n.bearingInRadians:0;if(f){const m=Math.sin(f),v=Math.cos(f);i=[i[0]*v-i[1]*m,i[0]*m+i[1]*v]}return[c?i[0]:Zi(t,i[0],n.zoom),c?i[1]:Zi(t,i[1],n.zoom)]},x.aC=md,x.aD=Ad,x.aE=fd,x.aF=kd,x.aG=Mr,x.aH=uu,x.aI=je,x.aJ=hr,x.aK=ur,x.aL=Bi,x.aM=ii,x.aN=Tf,x.aO=function(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i,n},x.aP=function(n,t,i){return n[0]=t[0]+i[0],n[1]=t[1]+i[1],n[2]=t[2]+i[2],n},x.aQ=function(n){var t=new Le(3);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t},x.aR=function(n,t,i){return n[0]=t[0]*i[0],n[1]=t[1]*i[1],n[2]=t[2]*i[2],n[3]=t[3]*i[3],n},x.aS=function(n,t,i){return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],n},x.aT=function(n,t){var i=t[0],s=t[1],c=t[2],f=i*i+s*s+c*c;return f>0&&(f=1/Math.sqrt(f)),n[0]=t[0]*f,n[1]=t[1]*f,n[2]=t[2]*f,n},x.aU=function(n,t,i){var s=t[0],c=t[1],f=t[2],m=i[0],v=i[1],S=i[2];return n[0]=c*S-f*v,n[1]=f*m-s*S,n[2]=s*v-c*m,n},x.aV=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]},x.aW=Pf,x.aX=qa,x.aY=function(n,t,i,s,c){var f,m=1/Math.tan(t/2);return n[0]=m/i,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=m,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,c!=null&&c!==1/0?(n[10]=(c+s)*(f=1/(s-c)),n[14]=2*c*s*f):(n[10]=-1,n[14]=-2*s),n},x.aZ=function(n){var t=new Le(16);return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],t},x.a_=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),f=t[0],m=t[1],v=t[2],S=t[3],E=t[4],R=t[5],V=t[6],q=t[7];return t!==n&&(n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=f*c+E*s,n[1]=m*c+R*s,n[2]=v*c+V*s,n[3]=S*c+q*s,n[4]=E*c-f*s,n[5]=R*c-m*s,n[6]=V*c-v*s,n[7]=q*c-S*s,n},x.aa=function(n){const t={};if(n.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(i,s,c,f)=>{const m=c||f;return t[s]=!m||m.toLowerCase(),""}),t["max-age"]){const i=parseInt(t["max-age"],10);isNaN(i)?delete t["max-age"]:t["max-age"]=i}return t},x.ab=Ir,x.ac=function(n){return Math.pow(2,n)},x.ad=rt,x.ae=Ur,x.af=85.051129,x.ag=Cf,x.ah=function(n){return Math.log(n)/Math.LN2},x.ai=function(n){var t=n[0],i=n[1];return t*t+i*i},x.aj=function(n,t){const i=[];for(const s in n)s in t||i.push(s);return i},x.ak=function(n,t){let i=0,s=0;if(n.kind==="constant")s=n.layoutSize;else if(n.kind!=="source"){const{interpolationType:c,minZoom:f,maxZoom:m}=n,v=c?Ur(Si.interpolationFactor(c,t,f,m),0,1):0;n.kind==="camera"?s=xn.number(n.minSize,n.maxSize,v):i=v}return{uSizeT:i,uSize:s}},x.am=function(n,{uSize:t,uSizeT:i},{lowerSize:s,upperSize:c}){return n.kind==="source"?s/oo:n.kind==="composite"?xn.number(s/oo,c/oo,i):t},x.an=function(n,t){var i=t[0],s=t[1],c=t[2],f=t[3],m=t[4],v=t[5],S=t[6],E=t[7],R=t[8],V=t[9],q=t[10],H=t[11],W=t[12],X=t[13],re=t[14],ae=t[15],Se=i*v-s*m,fe=i*S-c*m,j=i*E-f*m,$=s*S-c*v,ge=s*E-f*v,De=c*E-f*S,$e=R*X-V*W,Oe=R*re-q*W,He=R*ae-H*W,st=V*re-q*X,et=V*ae-H*X,lt=q*ae-H*re,Ze=Se*lt-fe*et+j*st+$*He-ge*Oe+De*$e;return Ze?(n[0]=(v*lt-S*et+E*st)*(Ze=1/Ze),n[1]=(c*et-s*lt-f*st)*Ze,n[2]=(X*De-re*ge+ae*$)*Ze,n[3]=(q*ge-V*De-H*$)*Ze,n[4]=(S*He-m*lt-E*Oe)*Ze,n[5]=(i*lt-c*He+f*Oe)*Ze,n[6]=(re*j-W*De-ae*fe)*Ze,n[7]=(R*De-q*j+H*fe)*Ze,n[8]=(m*et-v*He+E*$e)*Ze,n[9]=(s*He-i*et-f*$e)*Ze,n[10]=(W*ge-X*j+ae*Se)*Ze,n[11]=(V*j-R*ge-H*Se)*Ze,n[12]=(v*Oe-m*st-S*$e)*Ze,n[13]=(i*st-s*Oe+c*$e)*Ze,n[14]=(X*fe-W*$-re*Se)*Ze,n[15]=(R*$-V*fe+q*Se)*Ze,n):null},x.ao=gr,x.ap=function(n){return Math.hypot(n[0],n[1])},x.aq=function(n){return n[0]=0,n[1]=0,n},x.ar=function(n,t,i){return n[0]=t[0]*i,n[1]=t[1]*i,n},x.as=gd,x.at=Qt,x.au=function(n,t,i,s){const c=t.y-n.y,f=t.x-n.x,m=s.y-i.y,v=s.x-i.x,S=m*f-v*c;if(S===0)return null;const E=(v*(n.y-i.y)-m*(n.x-i.x))/S;return new T(n.x+E*f,n.y+E*c)},x.av=Bf,x.aw=xp,x.ax=function(n){let t=1/0,i=1/0,s=-1/0,c=-1/0;for(const f of n)t=Math.min(t,f.x),i=Math.min(i,f.y),s=Math.max(s,f.x),c=Math.max(c,f.y);return[t,i,s,c]},x.ay=Yr,x.az=Zi,x.b=Mt,x.b$=class extends J{},x.b0=function(){const n=new Float32Array(16);return rt(n),n},x.b1=function(){const n=new Float64Array(16);return rt(n),n},x.b2=function(){return new Float64Array(16)},x.b3=function(n,t,i){const s=new Float64Array(4);return function(c,f,m,v){var S=.5*Math.PI/180;f*=S,m*=S,v*=S;var E=Math.sin(f),R=Math.cos(f),V=Math.sin(m),q=Math.cos(m),H=Math.sin(v),W=Math.cos(v);c[0]=E*q*W-R*V*H,c[1]=R*V*W+E*q*H,c[2]=R*q*H-E*V*W,c[3]=R*q*W+E*V*H}(s,n,t-90,i),s},x.b4=function(n,t,i,s){var c,f,m,v,S,E=t[0],R=t[1],V=t[2],q=t[3],H=i[0],W=i[1],X=i[2],re=i[3];return(f=E*H+R*W+V*X+q*re)<0&&(f=-f,H=-H,W=-W,X=-X,re=-re),1-f>me?(c=Math.acos(f),m=Math.sin(c),v=Math.sin((1-s)*c)/m,S=Math.sin(s*c)/m):(v=1-s,S=s),n[0]=v*E+S*H,n[1]=v*R+S*W,n[2]=v*V+S*X,n[3]=v*q+S*re,n},x.b5=function(n){const t=new Float64Array(9);var i,s,c,f,m,v,S,E,R,V,q,H,W,X,re,ae,Se,fe;V=(c=(s=n)[0])*(S=c+c),q=(f=s[1])*S,W=(m=s[2])*S,X=m*(E=f+f),ae=(v=s[3])*S,Se=v*E,fe=v*(R=m+m),(i=t)[0]=1-(H=f*E)-(re=m*R),i[3]=q-fe,i[6]=W+Se,i[1]=q+fe,i[4]=1-V-re,i[7]=X-ae,i[2]=W-Se,i[5]=X+ae,i[8]=1-V-H;const j=ii(-Math.asin(Ur(t[2],-1,1)));let $,ge;return Math.hypot(t[5],t[8])<.001?($=0,ge=-ii(Math.atan2(t[3],t[4]))):($=ii(t[5]===0&&t[8]===0?0:Math.atan2(t[5],t[8])),ge=ii(t[1]===0&&t[0]===0?0:Math.atan2(t[1],t[0]))),{roll:$,pitch:j+90,bearing:ge}},x.b6=function(n,t){return n.roll==t.roll&&n.pitch==t.pitch&&n.bearing==t.bearing},x.b7=Nt,x.b8=Da,x.b9=Oa,x.bA=function(n){if(n.type==="custom")return new N_(n);switch(n.type){case"background":return new V_(n);case"circle":return new Ly(n);case"fill":return new Qy(n);case"fill-extrusion":return new o_(n);case"heatmap":return new Dy(n);case"hillshade":return new By(n);case"line":return new p_(n);case"raster":return new F_(n);case"symbol":return new yu(n)}},x.bB=Gr,x.bC=function(n,t){if(!n)return[{command:"setStyle",args:[t]}];let i=[];try{if(!Te(n.version,t.version))return[{command:"setStyle",args:[t]}];Te(n.center,t.center)||i.push({command:"setCenter",args:[t.center]}),Te(n.state,t.state)||i.push({command:"setGlobalState",args:[t.state]}),Te(n.centerAltitude,t.centerAltitude)||i.push({command:"setCenterAltitude",args:[t.centerAltitude]}),Te(n.zoom,t.zoom)||i.push({command:"setZoom",args:[t.zoom]}),Te(n.bearing,t.bearing)||i.push({command:"setBearing",args:[t.bearing]}),Te(n.pitch,t.pitch)||i.push({command:"setPitch",args:[t.pitch]}),Te(n.roll,t.roll)||i.push({command:"setRoll",args:[t.roll]}),Te(n.sprite,t.sprite)||i.push({command:"setSprite",args:[t.sprite]}),Te(n.glyphs,t.glyphs)||i.push({command:"setGlyphs",args:[t.glyphs]}),Te(n.transition,t.transition)||i.push({command:"setTransition",args:[t.transition]}),Te(n.light,t.light)||i.push({command:"setLight",args:[t.light]}),Te(n.terrain,t.terrain)||i.push({command:"setTerrain",args:[t.terrain]}),Te(n.sky,t.sky)||i.push({command:"setSky",args:[t.sky]}),Te(n.projection,t.projection)||i.push({command:"setProjection",args:[t.projection]});const s={},c=[];(function(m,v,S,E){let R;for(R in v=v||{},m=m||{})Object.prototype.hasOwnProperty.call(m,R)&&(Object.prototype.hasOwnProperty.call(v,R)||Qe(R,S,E));for(R in v)Object.prototype.hasOwnProperty.call(v,R)&&(Object.prototype.hasOwnProperty.call(m,R)?Te(m[R],v[R])||(m[R].type==="geojson"&&v[R].type==="geojson"&&gt(m,v,R)?ze(S,{command:"setGeoJSONSourceData",args:[R,v[R].data]}):ut(R,v,S,E)):Me(R,v,S))})(n.sources,t.sources,c,s);const f=[];n.layers&&n.layers.forEach(m=>{"source"in m&&s[m.source]?i.push({command:"removeLayer",args:[m.id]}):f.push(m)}),i=i.concat(c),function(m,v,S){v=v||[];const E=(m=m||[]).map(jt),R=v.map(jt),V=m.reduce(Vt,{}),q=v.reduce(Vt,{}),H=E.slice(),W=Object.create(null);let X,re,ae,Se,fe;for(let j=0,$=0;j<E.length;j++)X=E[j],Object.prototype.hasOwnProperty.call(q,X)?$++:(ze(S,{command:"removeLayer",args:[X]}),H.splice(H.indexOf(X,$),1));for(let j=0,$=0;j<R.length;j++)X=R[R.length-1-j],H[H.length-1-j]!==X&&(Object.prototype.hasOwnProperty.call(V,X)?(ze(S,{command:"removeLayer",args:[X]}),H.splice(H.lastIndexOf(X,H.length-$),1)):$++,Se=H[H.length-j],ze(S,{command:"addLayer",args:[q[X],Se]}),H.splice(H.length-j,0,X),W[X]=!0);for(let j=0;j<R.length;j++)if(X=R[j],re=V[X],ae=q[X],!W[X]&&!Te(re,ae))if(Te(re.source,ae.source)&&Te(re["source-layer"],ae["source-layer"])&&Te(re.type,ae.type)){for(fe in It(re.layout,ae.layout,S,X,null,"setLayoutProperty"),It(re.paint,ae.paint,S,X,null,"setPaintProperty"),Te(re.filter,ae.filter)||ze(S,{command:"setFilter",args:[X,ae.filter]}),Te(re.minzoom,ae.minzoom)&&Te(re.maxzoom,ae.maxzoom)||ze(S,{command:"setLayerZoomRange",args:[X,ae.minzoom,ae.maxzoom]}),re)Object.prototype.hasOwnProperty.call(re,fe)&&fe!=="layout"&&fe!=="paint"&&fe!=="filter"&&fe!=="metadata"&&fe!=="minzoom"&&fe!=="maxzoom"&&(fe.indexOf("paint.")===0?It(re[fe],ae[fe],S,X,fe.slice(6),"setPaintProperty"):Te(re[fe],ae[fe])||ze(S,{command:"setLayerProperty",args:[X,fe,ae[fe]]}));for(fe in ae)Object.prototype.hasOwnProperty.call(ae,fe)&&!Object.prototype.hasOwnProperty.call(re,fe)&&fe!=="layout"&&fe!=="paint"&&fe!=="filter"&&fe!=="metadata"&&fe!=="minzoom"&&fe!=="maxzoom"&&(fe.indexOf("paint.")===0?It(re[fe],ae[fe],S,X,fe.slice(6),"setPaintProperty"):Te(re[fe],ae[fe])||ze(S,{command:"setLayerProperty",args:[X,fe,ae[fe]]}))}else ze(S,{command:"removeLayer",args:[X]}),Se=H[H.lastIndexOf(X)+1],ze(S,{command:"addLayer",args:[ae,Se]})}(f,t.layers,i)}catch(s){console.warn("Unable to compute style diff:",s),i=[{command:"setStyle",args:[t]}]}return i},x.bD=function(n){const t=[],i=n.id;return i===void 0&&t.push({message:`layers.${i}: missing required property "id"`}),n.render===void 0&&t.push({message:`layers.${i}: missing required method "render"`}),n.renderingMode&&n.renderingMode!=="2d"&&n.renderingMode!=="3d"&&t.push({message:`layers.${i}: property "renderingMode" must be either "2d" or "3d"`}),t},x.bE=function n(t,i){if(Array.isArray(t)){if(!Array.isArray(i)||t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(!n(t[s],i[s]))return!1;return!0}if(typeof t=="object"&&t!==null&&i!==null){if(typeof i!="object"||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(!n(t[s],i[s]))return!1;return!0}return t===i},x.bF=Vi,x.bG=Cn,x.bH=class extends Cr{constructor(n,t){super(n,t),this.current=0}set(n){this.current!==n&&(this.current=n,this.gl.uniform1i(this.location,n))}},x.bI=ou,x.bJ=class extends Cr{constructor(n,t){super(n,t),this.current=jh}set(n){if(n[12]!==this.current[12]||n[0]!==this.current[0])return this.current=n,void this.gl.uniformMatrix4fv(this.location,!1,n);for(let t=1;t<16;t++)if(n[t]!==this.current[t]){this.current=n,this.gl.uniformMatrix4fv(this.location,!1,n);break}}},x.bK=nu,x.bL=class extends Cr{constructor(n,t){super(n,t),this.current=[0,0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]&&n[2]===this.current[2]||(this.current=n,this.gl.uniform3f(this.location,n[0],n[1],n[2]))}},x.bM=class extends Cr{constructor(n,t){super(n,t),this.current=[0,0]}set(n){n[0]===this.current[0]&&n[1]===this.current[1]||(this.current=n,this.gl.uniform2f(this.location,n[0],n[1]))}},x.bN=qe,x.bO=function(n,t){var i=Math.sin(t),s=Math.cos(t);return n[0]=s,n[1]=i,n[2]=0,n[3]=-i,n[4]=s,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n},x.bP=function(n,t,i){var s=t[0],c=t[1],f=t[2];return n[0]=s*i[0]+c*i[3]+f*i[6],n[1]=s*i[1]+c*i[4]+f*i[7],n[2]=s*i[2]+c*i[5]+f*i[8],n},x.bQ=function(n,t,i,s,c,f,m){var v=1/(t-i),S=1/(s-c),E=1/(f-m);return n[0]=-2*v,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*S,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*E,n[11]=0,n[12]=(t+i)*v,n[13]=(c+s)*S,n[14]=(m+f)*E,n[15]=1,n},x.bR=class extends Cr{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(4*n.length);for(let i=0;i<n.length;i++)t[4*i]=n[i].r,t[4*i+1]=n[i].g,t[4*i+2]=n[i].b,t[4*i+3]=n[i].a;this.gl.uniform4fv(this.location,t)}}},x.bS=class extends Cr{constructor(n,t){super(n,t),this.current=new Array}set(n){if(n!=this.current){this.current=n;const t=new Float32Array(n);this.gl.uniform1fv(this.location,t)}}},x.bT=class extends d{},x.bU=y_,x.bV=class extends w{},x.bW=Xh,x.bX=function(n){return n<=1?1:Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))},x.bY=Ip,x.bZ=function(n,t,i){var s=t[0],c=t[1],f=t[2],m=i[3]*s+i[7]*c+i[11]*f+i[15];return n[0]=(i[0]*s+i[4]*c+i[8]*f+i[12])/(m=m||1),n[1]=(i[1]*s+i[5]*c+i[9]*f+i[13])/m,n[2]=(i[2]*s+i[6]*c+i[10]*f+i[14])/m,n},x.b_=class extends So{},x.ba=Wl,x.bb=Va,x.bc=Ki,x.bd=fr,x.be=Be,x.bf=function(n,t,i,s,c){return Ki(s,c,Ur((n-t)/(i-t),0,1))},x.bg=Nr,x.bh=function(){return new Float64Array(3)},x.bi=function(n,t,i,s){return n[0]=t[0]+i[0]*s,n[1]=t[1]+i[1]*s,n[2]=t[2]+i[2]*s,n},x.bj=qt,x.bk=function(){return new Float64Array(4)},x.bl=function(n,t,i,s){var c=[],f=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],f[0]=c[0]*Math.cos(s)-c[1]*Math.sin(s),f[1]=c[0]*Math.sin(s)+c[1]*Math.cos(s),f[2]=c[2],n[0]=f[0]+i[0],n[1]=f[1]+i[1],n[2]=f[2]+i[2],n},x.bm=function(n,t,i,s){var c=[],f=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],f[0]=c[0],f[1]=c[1]*Math.cos(s)-c[2]*Math.sin(s),f[2]=c[1]*Math.sin(s)+c[2]*Math.cos(s),n[0]=f[0]+i[0],n[1]=f[1]+i[1],n[2]=f[2]+i[2],n},x.bn=function(n,t,i,s){var c=[],f=[];return c[0]=t[0]-i[0],c[1]=t[1]-i[1],c[2]=t[2]-i[2],f[0]=c[2]*Math.sin(s)+c[0]*Math.cos(s),f[1]=c[1],f[2]=c[2]*Math.cos(s)-c[0]*Math.sin(s),n[0]=f[0]+i[0],n[1]=f[1]+i[1],n[2]=f[2]+i[2],n},x.bo=yt,x.bp=function(n,t,i){var s=Math.sin(i),c=Math.cos(i),f=t[0],m=t[1],v=t[2],S=t[3],E=t[8],R=t[9],V=t[10],q=t[11];return t!==n&&(n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15]),n[0]=f*c-E*s,n[1]=m*c-R*s,n[2]=v*c-V*s,n[3]=S*c-q*s,n[8]=f*s+E*c,n[9]=m*s+R*c,n[10]=v*s+V*c,n[11]=S*s+q*c,n},x.bq=function(n,t){const i=Nr(n,360),s=Nr(t,360),c=s-i,f=s>i?c-360:c+360;return Math.abs(c)<Math.abs(f)?c:f},x.br=function(n){return n[0]=0,n[1]=0,n[2]=0,n},x.bs=function(n,t,i,s){const c=Math.sqrt(n*n+t*t),f=Math.sqrt(i*i+s*s);n/=c,t/=c,i/=f,s/=f;const m=Math.acos(n*i+t*s);return-t*i+n*s>0?m:-m},x.bt=function(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]},x.bu=xd,x.bv=function(n,t){const i=Nr(n,2*Math.PI),s=Nr(t,2*Math.PI);return Math.min(Math.abs(i-s),Math.abs(i-s+2*Math.PI),Math.abs(i-s-2*Math.PI))},x.bw=function(){const n={},t=Y.$version;for(const i in Y.$root){const s=Y.$root[i];if(s.required){let c=null;c=i==="version"?t:s.type==="array"?[]:{},c!=null&&(n[i]=c)}}return n},x.bx=Tl,x.by=Bt,x.bz=function(n){n=n.slice();const t=Object.create(null);for(let i=0;i<n.length;i++)t[n[i].id]=n[i];for(let i=0;i<n.length;i++)"ref"in n[i]&&(n[i]=Ae(n[i],t[n[i].ref]));return n},x.c=Mi,x.c0=function(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]&&n[3]===t[3]&&n[4]===t[4]&&n[5]===t[5]&&n[6]===t[6]&&n[7]===t[7]&&n[8]===t[8]&&n[9]===t[9]&&n[10]===t[10]&&n[11]===t[11]&&n[12]===t[12]&&n[13]===t[13]&&n[14]===t[14]&&n[15]===t[15]},x.c1=function(n,t){var i=n[0],s=n[1],c=n[2],f=n[3],m=n[4],v=n[5],S=n[6],E=n[7],R=n[8],V=n[9],q=n[10],H=n[11],W=n[12],X=n[13],re=n[14],ae=n[15],Se=t[0],fe=t[1],j=t[2],$=t[3],ge=t[4],De=t[5],$e=t[6],Oe=t[7],He=t[8],st=t[9],et=t[10],lt=t[11],Ze=t[12],wt=t[13],Dt=t[14],Lt=t[15];return Math.abs(i-Se)<=me*Math.max(1,Math.abs(i),Math.abs(Se))&&Math.abs(s-fe)<=me*Math.max(1,Math.abs(s),Math.abs(fe))&&Math.abs(c-j)<=me*Math.max(1,Math.abs(c),Math.abs(j))&&Math.abs(f-$)<=me*Math.max(1,Math.abs(f),Math.abs($))&&Math.abs(m-ge)<=me*Math.max(1,Math.abs(m),Math.abs(ge))&&Math.abs(v-De)<=me*Math.max(1,Math.abs(v),Math.abs(De))&&Math.abs(S-$e)<=me*Math.max(1,Math.abs(S),Math.abs($e))&&Math.abs(E-Oe)<=me*Math.max(1,Math.abs(E),Math.abs(Oe))&&Math.abs(R-He)<=me*Math.max(1,Math.abs(R),Math.abs(He))&&Math.abs(V-st)<=me*Math.max(1,Math.abs(V),Math.abs(st))&&Math.abs(q-et)<=me*Math.max(1,Math.abs(q),Math.abs(et))&&Math.abs(H-lt)<=me*Math.max(1,Math.abs(H),Math.abs(lt))&&Math.abs(W-Ze)<=me*Math.max(1,Math.abs(W),Math.abs(Ze))&&Math.abs(X-wt)<=me*Math.max(1,Math.abs(X),Math.abs(wt))&&Math.abs(re-Dt)<=me*Math.max(1,Math.abs(re),Math.abs(Dt))&&Math.abs(ae-Lt)<=me*Math.max(1,Math.abs(ae),Math.abs(Lt))},x.c2=function(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n[6]=t[6],n[7]=t[7],n[8]=t[8],n[9]=t[9],n[10]=t[10],n[11]=t[11],n[12]=t[12],n[13]=t[13],n[14]=t[14],n[15]=t[15],n},x.c3=n=>n.type==="symbol",x.c4=n=>n.type==="circle",x.c5=n=>n.type==="heatmap",x.c6=n=>n.type==="line",x.c7=n=>n.type==="fill",x.c8=n=>n.type==="fill-extrusion",x.c9=n=>n.type==="hillshade",x.cA=td,x.cB=sd,x.cC=Kl,x.cD=ud,x.cE=class{constructor(n){this._marks={start:[n.url,"start"].join("#"),end:[n.url,"end"].join("#"),measure:n.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let n=performance.getEntriesByName(this._marks.measure);return n.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),n=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),n}},x.cF=function(n,t,i,s,c){return o(this,void 0,void 0,function*(){if(ee())try{return yield Et(n,t,i,s,c)}catch{}return function(f,m,v,S,E){const R=f.width,V=f.height;zt&&or||(zt=new OffscreenCanvas(R,V),or=zt.getContext("2d",{willReadFrequently:!0})),zt.width=R,zt.height=V,or.drawImage(f,0,0,R,V);const q=or.getImageData(m,v,S,E);return or.clearRect(0,0,R,V),q.data}(n,t,i,s,c)})},x.cG=If,x.cH=B,x.cI=O,x.cJ=Kp,x.cK=sf,x.cL=va,x.cM=Bn,x.ca=n=>n.type==="raster",x.cb=n=>n.type==="background",x.cc=n=>n.type==="custom",x.cd=on,x.ce=function(n,t,i){const s=ti(t.x-i.x,t.y-i.y),c=ti(n.x-i.x,n.y-i.y);var f,m;return ii(Math.atan2(s[0]*c[1]-s[1]*c[0],(f=s)[0]*(m=c)[0]+f[1]*m[1]))},x.cf=Ti,x.cg=function(n,t){return ni[t]&&(n instanceof MouseEvent||n instanceof WheelEvent)},x.ch=function(n,t){return Vr[t]&&"touches"in n},x.ci=function(n){return Vr[n]||ni[n]},x.cj=function(n,t,i){var s=t[0],c=t[1];return n[0]=i[0]*s+i[4]*c+i[12],n[1]=i[1]*s+i[5]*c+i[13],n},x.ck=function(n,t){const{x:i,y:s}=$l.fromLngLat(t);return!(n<0||n>25||s<0||s>=1||i<0||i>=1)},x.cl=function(n,t){return n[0]=t[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=t[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=t[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},x.cm=class extends Ps{},x.cn=Q_,x.cp=function(n){return n.message===mi},x.cq=Pt,x.cr=function(n,t){gi.REGISTERED_PROTOCOLS[n]=t},x.cs=function(n){delete gi.REGISTERED_PROTOCOLS[n]},x.ct=function(n,t){const i={};for(let c=0;c<n.length;c++){const f=t&&t[n[c].id]||jc(n[c]);t&&(t[n[c].id]=f);let m=i[f];m||(m=i[f]=[]),m.push(n[c])}const s=[];for(const c in i)s.push(i[c]);return s},x.cu=bt,x.cv=Mf,x.cw=Rf,x.cx=lf,x.cy=function(n){n.bucket.createArrays(),n.bucket.tilePixelRatio=ar/(512*n.bucket.overscaling),n.bucket.compareText={},n.bucket.iconsNeedLinear=!1;const t=n.bucket.layers[0],i=t.layout,s=t._unevaluatedLayout._values,c={layoutIconSize:s["icon-size"].possiblyEvaluate(new kr(n.bucket.zoom+1),n.canonical),layoutTextSize:s["text-size"].possiblyEvaluate(new kr(n.bucket.zoom+1),n.canonical),textMaxSize:s["text-size"].possiblyEvaluate(new kr(18))};if(n.bucket.textSizeData.kind==="composite"){const{minZoom:E,maxZoom:R}=n.bucket.textSizeData;c.compositeTextSizes=[s["text-size"].possiblyEvaluate(new kr(E),n.canonical),s["text-size"].possiblyEvaluate(new kr(R),n.canonical)]}if(n.bucket.iconSizeData.kind==="composite"){const{minZoom:E,maxZoom:R}=n.bucket.iconSizeData;c.compositeIconSizes=[s["icon-size"].possiblyEvaluate(new kr(E),n.canonical),s["icon-size"].possiblyEvaluate(new kr(R),n.canonical)]}const f=i.get("text-line-height")*Yr,m=i.get("text-rotation-alignment")!=="viewport"&&i.get("symbol-placement")!=="point",v=i.get("text-keep-upright"),S=i.get("text-size");for(const E of n.bucket.features){const R=i.get("text-font").evaluate(E,{},n.canonical).join(","),V=S.evaluate(E,{},n.canonical),q=c.layoutTextSize.evaluate(E,{},n.canonical),H=c.layoutIconSize.evaluate(E,{},n.canonical),W={horizontal:{},vertical:void 0},X=E.text;let re,ae=[0,0];if(X){const j=X.toString(),$=i.get("text-letter-spacing").evaluate(E,{},n.canonical)*Yr,ge=Oh(j)?$:0,De=i.get("text-anchor").evaluate(E,{},n.canonical),$e=Wf(t,E,n.canonical);if(!$e){const et=i.get("text-radial-offset").evaluate(E,{},n.canonical);ae=et?Hf(De,[et*Yr,Sd]):i.get("text-offset").evaluate(E,{},n.canonical).map(lt=>lt*Yr)}let Oe=m?"center":i.get("text-justify").evaluate(E,{},n.canonical);const He=i.get("symbol-placement")==="point"?i.get("text-max-width").evaluate(E,{},n.canonical)*Yr:1/0,st=()=>{n.bucket.allowVerticalPlacement&&Ia(j)&&(W.vertical=fu(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,f,De,"left",ge,ae,x.al.vertical,!0,q,V))};if(!m&&$e){const et=new Set;if(Oe==="auto")for(let Ze=0;Ze<$e.values.length;Ze+=2)et.add(Ad($e.values[Ze]));else et.add(Oe);let lt=!1;for(const Ze of et)if(!W.horizontal[Ze])if(lt)W.horizontal[Ze]=W.horizontal[0];else{const wt=fu(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,f,"center",Ze,ge,ae,x.al.horizontal,!1,q,V);wt&&(W.horizontal[Ze]=wt,lt=wt.positionedLines.length===1)}st()}else{Oe==="auto"&&(Oe=Ad(De));const et=fu(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,f,De,Oe,ge,ae,x.al.horizontal,!1,q,V);et&&(W.horizontal[Oe]=et),st(),Ia(j)&&m&&v&&(W.vertical=fu(X,n.glyphMap,n.glyphPositions,n.imagePositions,R,He,f,De,Oe,ge,ae,x.al.vertical,!1,q,V))}}let Se=!1;if(E.icon&&E.icon.name){const j=n.imageMap[E.icon.name];j&&(re=L_(n.imagePositions[E.icon.name],i.get("icon-offset").evaluate(E,{},n.canonical),i.get("icon-anchor").evaluate(E,{},n.canonical)),Se=!!j.sdf,n.bucket.sdfIcons===void 0?n.bucket.sdfIcons=Se:n.bucket.sdfIcons!==Se&&Jr("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(j.pixelRatio!==n.bucket.pixelRatio||i.get("icon-rotate").constantOr(1)!==0)&&(n.bucket.iconsNeedLinear=!0))}const fe=Kf(W.horizontal)||W.vertical;n.bucket.iconsInText=!!fe&&fe.iconsInText,(fe||re)&&J_(n.bucket,E,W,re,n.imageMap,c,q,H,ae,Se,n.canonical,n.subdivisionGranularity)}n.showCollisionBoxes&&n.bucket.generateCollisionDebugBuffers()},x.cz=ad,x.d=ke,x.e=ri,x.f=n=>o(void 0,void 0,void 0,function*(){if(n.byteLength===0)return createImageBitmap(new ImageData(1,1));const t=new Blob([new Uint8Array(n)],{type:"image/png"});try{return createImageBitmap(t)}catch(i){throw new Error(`Could not load image because of ${i.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),x.g=dr,x.h=n=>new Promise((t,i)=>{const s=new Image;s.onload=()=>{t(s),URL.revokeObjectURL(s.src),s.onload=null,window.requestAnimationFrame(()=>{s.src=Ht})},s.onerror=()=>i(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 c=new Blob([new Uint8Array(n)],{type:"image/png"});s.src=n.byteLength?URL.createObjectURL(c):Ht}),x.i=vt,x.j=(n,t)=>xt(ri(n,{type:"json"}),t),x.k=he,x.l=te,x.m=xt,x.n=(n,t)=>xt(ri(n,{type:"arrayBuffer"}),t),x.o=function(n){return new ud(n).readFields(x_,[])},x.p=af,x.q=Nl,x.r=Hr,x.s=Jt,x.t=Ca,x.u=er,x.v=Y,x.w=Jr,x.x=Cl,x.y=jo,x.z=function([n,t,i]){return t+=90,t*=Math.PI/180,i*=Math.PI/180,{x:n*Math.cos(t)*Math.sin(i),y:n*Math.sin(t)*Math.sin(i),z:n*Math.cos(i)}}}),k("worker",["./shared"],function(x){class o{constructor(K){this.keyCache={},K&&this.replace(K)}replace(K){this._layerConfigs={},this._layers={},this.update(K,[])}update(K,Q){for(const he of K){this._layerConfigs[he.id]=he;const xe=this._layers[he.id]=x.bA(he);xe._featureFilter=x.a7(xe.filter),this.keyCache[he.id]&&delete this.keyCache[he.id]}for(const he of Q)delete this.keyCache[he],delete this._layerConfigs[he],delete this._layers[he];this.familiesBySource={};const te=x.ct(Object.values(this._layerConfigs),this.keyCache);for(const he of te){const xe=he.map(Me=>this._layers[Me.id]),Y=xe[0];if(Y.visibility==="none")continue;const Pe=Y.source||"";let Ae=this.familiesBySource[Pe];Ae||(Ae=this.familiesBySource[Pe]={});const Te=Y.sourceLayer||"_geojsonTileLayer";let ze=Ae[Te];ze||(ze=Ae[Te]=[]),ze.push(xe)}}}class B{constructor(K){const Q={},te=[];for(const Pe in K){const Ae=K[Pe],Te=Q[Pe]={};for(const ze in Ae){const Me=Ae[+ze];if(!Me||Me.bitmap.width===0||Me.bitmap.height===0)continue;const Qe={x:0,y:0,w:Me.bitmap.width+2,h:Me.bitmap.height+2};te.push(Qe),Te[ze]={rect:Qe,metrics:Me.metrics}}}const{w:he,h:xe}=x.p(te),Y=new x.q({width:he||1,height:xe||1});for(const Pe in K){const Ae=K[Pe];for(const Te in Ae){const ze=Ae[+Te];if(!ze||ze.bitmap.width===0||ze.bitmap.height===0)continue;const Me=Q[Pe][Te].rect;x.q.copy(ze.bitmap,Y,{x:0,y:0},{x:Me.x+1,y:Me.y+1},ze.bitmap)}}this.image=Y,this.positions=Q}}x.cu("GlyphAtlas",B);class D{constructor(K){this.tileID=new x.Y(K.tileID.overscaledZ,K.tileID.wrap,K.tileID.canonical.z,K.tileID.canonical.x,K.tileID.canonical.y),this.uid=K.uid,this.zoom=K.zoom,this.pixelRatio=K.pixelRatio,this.tileSize=K.tileSize,this.source=K.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=K.showCollisionBoxes,this.collectResourceTiming=!!K.collectResourceTiming,this.returnDependencies=!!K.returnDependencies,this.promoteId=K.promoteId,this.inFlightDependencies=[]}parse(K,Q,te,he,xe){return x._(this,void 0,void 0,function*(){this.status="parsing",this.data=K,this.collisionBoxArray=new x.a5;const Y=new x.cv(Object.keys(K.layers).sort()),Pe=new x.cw(this.tileID,this.promoteId);Pe.bucketLayerIDs=[];const Ae={},Te={featureIndex:Pe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:te,subdivisionGranularity:xe},ze=Q.familiesBySource[this.source];for(const Ot in ze){const Xe=K.layers[Ot];if(!Xe)continue;Xe.version===1&&x.w(`Vector tile source "${this.source}" layer "${Ot}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Rt=Y.encode(Ot),Zt=[];for(let Ar=0;Ar<Xe.length;Ar++){const mr=Xe.feature(Ar),yi=Pe.getId(mr,Ot);Zt.push({feature:mr,id:yi,index:Ar,sourceLayerIndex:Rt})}for(const Ar of ze[Ot]){const mr=Ar[0];mr.source!==this.source&&x.w(`layer.source = ${mr.source} does not equal this.source = ${this.source}`),mr.minzoom&&this.zoom<Math.floor(mr.minzoom)||mr.maxzoom&&this.zoom>=mr.maxzoom||mr.visibility!=="none"&&(M(Ar,this.zoom,te),(Ae[mr.id]=mr.createBucket({index:Pe.bucketLayerIDs.length,layers:Ar,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Rt,sourceID:this.source})).populate(Zt,Te,this.tileID.canonical),Pe.bucketLayerIDs.push(Ar.map(yi=>yi.id)))}}const Me=x.bF(Te.glyphDependencies,Ot=>Object.keys(Ot).map(Number));this.inFlightDependencies.forEach(Ot=>Ot==null?void 0:Ot.abort()),this.inFlightDependencies=[];let Qe=Promise.resolve({});if(Object.keys(Me).length){const Ot=new AbortController;this.inFlightDependencies.push(Ot),Qe=he.sendAsync({type:"GG",data:{stacks:Me,source:this.source,tileID:this.tileID,type:"glyphs"}},Ot)}const ut=Object.keys(Te.iconDependencies);let gt=Promise.resolve({});if(ut.length){const Ot=new AbortController;this.inFlightDependencies.push(Ot),gt=he.sendAsync({type:"GI",data:{icons:ut,source:this.source,tileID:this.tileID,type:"icons"}},Ot)}const It=Object.keys(Te.patternDependencies);let jt=Promise.resolve({});if(It.length){const Ot=new AbortController;this.inFlightDependencies.push(Ot),jt=he.sendAsync({type:"GI",data:{icons:It,source:this.source,tileID:this.tileID,type:"patterns"}},Ot)}const[Vt,Ue,cr]=yield Promise.all([Qe,gt,jt]),Yt=new B(Vt),sr=new x.cx(Ue,cr);for(const Ot in Ae){const Xe=Ae[Ot];Xe instanceof x.a6?(M(Xe.layers,this.zoom,te),x.cy({bucket:Xe,glyphMap:Vt,glyphPositions:Yt.positions,imageMap:Ue,imagePositions:sr.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:Te.subdivisionGranularity})):Xe.hasPattern&&(Xe instanceof x.cz||Xe instanceof x.cA||Xe instanceof x.cB)&&(M(Xe.layers,this.zoom,te),Xe.addFeatures(Te,this.tileID.canonical,sr.patternPositions))}return this.status="done",{buckets:Object.values(Ae).filter(Ot=>!Ot.isEmpty()),featureIndex:Pe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Yt.image,imageAtlas:sr,glyphMap:this.returnDependencies?Vt:null,iconMap:this.returnDependencies?Ue:null,glyphPositions:this.returnDependencies?Yt.positions:null}})}}function M(ke,K,Q){const te=new x.C(K);for(const he of ke)he.recalculate(te,Q)}class O{constructor(K,Q,te){this.actor=K,this.layerIndex=Q,this.availableImages=te,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(K,Q){return x._(this,void 0,void 0,function*(){const te=yield x.n(K.request,Q);try{return{vectorTile:new x.cC.VectorTile(new x.cD(te.data)),rawData:te.data,cacheControl:te.cacheControl,expires:te.expires}}catch(he){const xe=new Uint8Array(te.data);let Y=`Unable to parse the tile at ${K.request.url}, `;throw Y+=xe[0]===31&&xe[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${he.message}`,new Error(Y)}})}loadTile(K){return x._(this,void 0,void 0,function*(){const Q=K.uid,te=!!(K&&K.request&&K.request.collectResourceTiming)&&new x.cE(K.request),he=new D(K);this.loading[Q]=he;const xe=new AbortController;he.abort=xe;try{const Y=yield this.loadVectorTile(K,xe);if(delete this.loading[Q],!Y)return null;const Pe=Y.rawData,Ae={};Y.expires&&(Ae.expires=Y.expires),Y.cacheControl&&(Ae.cacheControl=Y.cacheControl);const Te={};if(te){const Me=te.finish();Me&&(Te.resourceTiming=JSON.parse(JSON.stringify(Me)))}he.vectorTile=Y.vectorTile;const ze=he.parse(Y.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity);this.loaded[Q]=he,this.fetching[Q]={rawTileData:Pe,cacheControl:Ae,resourceTiming:Te};try{const Me=yield ze;return x.e({rawTileData:Pe.slice(0)},Me,Ae,Te)}finally{delete this.fetching[Q]}}catch(Y){throw delete this.loading[Q],he.status="done",this.loaded[Q]=he,Y}})}reloadTile(K){return x._(this,void 0,void 0,function*(){const Q=K.uid;if(!this.loaded||!this.loaded[Q])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const te=this.loaded[Q];if(te.showCollisionBoxes=K.showCollisionBoxes,te.status==="parsing"){const he=yield te.parse(te.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity);let xe;if(this.fetching[Q]){const{rawTileData:Y,cacheControl:Pe,resourceTiming:Ae}=this.fetching[Q];delete this.fetching[Q],xe=x.e({rawTileData:Y.slice(0)},he,Pe,Ae)}else xe=he;return xe}if(te.status==="done"&&te.vectorTile)return te.parse(te.vectorTile,this.layerIndex,this.availableImages,this.actor,K.subdivisionGranularity)})}abortTile(K){return x._(this,void 0,void 0,function*(){const Q=this.loading,te=K.uid;Q&&Q[te]&&Q[te].abort&&(Q[te].abort.abort(),delete Q[te])})}removeTile(K){return x._(this,void 0,void 0,function*(){this.loaded&&this.loaded[K.uid]&&delete this.loaded[K.uid]})}}class L{constructor(){this.loaded={}}loadTile(K){return x._(this,void 0,void 0,function*(){const{uid:Q,encoding:te,rawImageData:he,redFactor:xe,greenFactor:Y,blueFactor:Pe,baseShift:Ae}=K,Te=he.width+2,ze=he.height+2,Me=x.b(he)?new x.R({width:Te,height:ze},yield x.cF(he,-1,-1,Te,ze)):he,Qe=new x.cG(Q,Me,te,xe,Y,Pe,Ae);return this.loaded=this.loaded||{},this.loaded[Q]=Qe,Qe})}removeTile(K){const Q=this.loaded,te=K.uid;Q&&Q[te]&&delete Q[te]}}var C,T,U=function(){if(T)return C;function ke(Q,te){if(Q.length!==0){K(Q[0],te);for(var he=1;he<Q.length;he++)K(Q[he],!te)}}function K(Q,te){for(var he=0,xe=0,Y=0,Pe=Q.length,Ae=Pe-1;Y<Pe;Ae=Y++){var Te=(Q[Y][0]-Q[Ae][0])*(Q[Ae][1]+Q[Y][1]),ze=he+Te;xe+=Math.abs(he)>=Math.abs(Te)?he-ze+Te:Te-ze+he,he=ze}he+xe>=0!=!!te&&Q.reverse()}return T=1,C=function Q(te,he){var xe,Y=te&&te.type;if(Y==="FeatureCollection")for(xe=0;xe<te.features.length;xe++)Q(te.features[xe],he);else if(Y==="GeometryCollection")for(xe=0;xe<te.geometries.length;xe++)Q(te.geometries[xe],he);else if(Y==="Feature")Q(te.geometry,he);else if(Y==="Polygon")ke(te.coordinates,he);else if(Y==="MultiPolygon")for(xe=0;xe<te.coordinates.length;xe++)ke(te.coordinates[xe],he);return te}}(),G=x.cH(U);const ie=x.cC.VectorTileFeature.prototype.toGeoJSON;class le{constructor(K){this._feature=K,this.extent=x.Z,this.type=K.type,this.properties=K.tags,"id"in K&&!isNaN(K.id)&&(this.id=parseInt(K.id,10))}loadGeometry(){if(this._feature.type===1){const K=[];for(const Q of this._feature.geometry)K.push([new x.P(Q[0],Q[1])]);return K}{const K=[];for(const Q of this._feature.geometry){const te=[];for(const he of Q)te.push(new x.P(he[0],he[1]));K.push(te)}return K}}toGeoJSON(K,Q,te){return ie.call(this,K,Q,te)}}class Ie{constructor(K){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=x.Z,this.length=K.length,this._features=K}feature(K){return new le(this._features[K])}}var ee,me,Le,qe={exports:{}},rt=function(){if(Le)return qe.exports;Le=1;var ke=x.cK(),K=function(){if(me)return ee;me=1;var ze=x.cI(),Me=x.cJ().VectorTileFeature;function Qe(gt,It){this.options=It||{},this.features=gt,this.length=gt.length}function ut(gt,It){this.id=typeof gt.id=="number"?gt.id:void 0,this.type=gt.type,this.rawGeometry=gt.type===1?[gt.geometry]:gt.geometry,this.properties=gt.tags,this.extent=It||4096}return ee=Qe,Qe.prototype.feature=function(gt){return new ut(this.features[gt],this.options.extent)},ut.prototype.loadGeometry=function(){var gt=this.rawGeometry;this.geometry=[];for(var It=0;It<gt.length;It++){for(var jt=gt[It],Vt=[],Ue=0;Ue<jt.length;Ue++)Vt.push(new ze(jt[Ue][0],jt[Ue][1]));this.geometry.push(Vt)}return this.geometry},ut.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var gt=this.geometry,It=1/0,jt=-1/0,Vt=1/0,Ue=-1/0,cr=0;cr<gt.length;cr++)for(var Yt=gt[cr],sr=0;sr<Yt.length;sr++){var Ot=Yt[sr];It=Math.min(It,Ot.x),jt=Math.max(jt,Ot.x),Vt=Math.min(Vt,Ot.y),Ue=Math.max(Ue,Ot.y)}return[It,Vt,jt,Ue]},ut.prototype.toGeoJSON=Me.prototype.toGeoJSON,ee}();function Q(ze){var Me=new ke;return function(Qe,ut){for(var gt in Qe.layers)ut.writeMessage(3,te,Qe.layers[gt])}(ze,Me),Me.finish()}function te(ze,Me){var Qe;Me.writeVarintField(15,ze.version||1),Me.writeStringField(1,ze.name||""),Me.writeVarintField(5,ze.extent||4096);var ut={keys:[],values:[],keycache:{},valuecache:{}};for(Qe=0;Qe<ze.length;Qe++)ut.feature=ze.feature(Qe),Me.writeMessage(2,he,ut);var gt=ut.keys;for(Qe=0;Qe<gt.length;Qe++)Me.writeStringField(3,gt[Qe]);var It=ut.values;for(Qe=0;Qe<It.length;Qe++)Me.writeMessage(4,Te,It[Qe])}function he(ze,Me){var Qe=ze.feature;Qe.id!==void 0&&Me.writeVarintField(1,Qe.id),Me.writeMessage(2,xe,ze),Me.writeVarintField(3,Qe.type),Me.writeMessage(4,Ae,Qe)}function xe(ze,Me){var Qe=ze.feature,ut=ze.keys,gt=ze.values,It=ze.keycache,jt=ze.valuecache;for(var Vt in Qe.properties){var Ue=Qe.properties[Vt],cr=It[Vt];if(Ue!==null){cr===void 0&&(ut.push(Vt),It[Vt]=cr=ut.length-1),Me.writeVarint(cr);var Yt=typeof Ue;Yt!=="string"&&Yt!=="boolean"&&Yt!=="number"&&(Ue=JSON.stringify(Ue));var sr=Yt+":"+Ue,Ot=jt[sr];Ot===void 0&&(gt.push(Ue),jt[sr]=Ot=gt.length-1),Me.writeVarint(Ot)}}}function Y(ze,Me){return(Me<<3)+(7&ze)}function Pe(ze){return ze<<1^ze>>31}function Ae(ze,Me){for(var Qe=ze.loadGeometry(),ut=ze.type,gt=0,It=0,jt=Qe.length,Vt=0;Vt<jt;Vt++){var Ue=Qe[Vt],cr=1;ut===1&&(cr=Ue.length),Me.writeVarint(Y(1,cr));for(var Yt=ut===3?Ue.length-1:Ue.length,sr=0;sr<Yt;sr++){sr===1&&ut!==1&&Me.writeVarint(Y(2,Yt-1));var Ot=Ue[sr].x-gt,Xe=Ue[sr].y-It;Me.writeVarint(Pe(Ot)),Me.writeVarint(Pe(Xe)),gt+=Ot,It+=Xe}ut===3&&Me.writeVarint(Y(7,1))}}function Te(ze,Me){var Qe=typeof ze;Qe==="string"?Me.writeStringField(1,ze):Qe==="boolean"?Me.writeBooleanField(7,ze):Qe==="number"&&(ze%1!=0?Me.writeDoubleField(3,ze):ze<0?Me.writeSVarintField(6,ze):Me.writeVarintField(5,ze))}return qe.exports=Q,qe.exports.fromVectorTileJs=Q,qe.exports.fromGeojsonVt=function(ze,Me){Me=Me||{};var Qe={};for(var ut in ze)Qe[ut]=new K(ze[ut].features,Me),Qe[ut].name=ut,Qe[ut].version=Me.version,Qe[ut].extent=Me.extent;return Q({layers:Qe})},qe.exports.GeoJSONWrapper=K,qe.exports}(),St=x.cH(rt);const yt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:ke=>ke},ct=Math.fround||(_t=new Float32Array(1),ke=>(_t[0]=+ke,_t[0]));var _t;const qt=3,Qt=5,xr=6;class gr{constructor(K){this.options=Object.assign(Object.create(yt),K),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(K){const{log:Q,minZoom:te,maxZoom:he}=this.options;Q&&console.time("total time");const xe=`prepare ${K.length} points`;Q&&console.time(xe),this.points=K;const Y=[];for(let Ae=0;Ae<K.length;Ae++){const Te=K[Ae];if(!Te.geometry)continue;const[ze,Me]=Te.geometry.coordinates,Qe=ct(Zi(ze)),ut=ct(Nr(Me));Y.push(Qe,ut,1/0,Ae,-1,1),this.options.reduce&&Y.push(0)}let Pe=this.trees[he+1]=this._createTree(Y);Q&&console.timeEnd(xe);for(let Ae=he;Ae>=te;Ae--){const Te=+Date.now();Pe=this.trees[Ae]=this._createTree(this._cluster(Pe,Ae)),Q&&console.log("z%d: %d clusters in %dms",Ae,Pe.numItems,+Date.now()-Te)}return Q&&console.timeEnd("total time"),this}getClusters(K,Q){let te=((K[0]+180)%360+360)%360-180;const he=Math.max(-90,Math.min(90,K[1]));let xe=K[2]===180?180:((K[2]+180)%360+360)%360-180;const Y=Math.max(-90,Math.min(90,K[3]));if(K[2]-K[0]>=360)te=-180,xe=180;else if(te>xe){const Me=this.getClusters([te,he,180,Y],Q),Qe=this.getClusters([-180,he,xe,Y],Q);return Me.concat(Qe)}const Pe=this.trees[this._limitZoom(Q)],Ae=Pe.range(Zi(te),Nr(Y),Zi(xe),Nr(he)),Te=Pe.data,ze=[];for(const Me of Ae){const Qe=this.stride*Me;ze.push(Te[Qe+Qt]>1?ti(Te,Qe,this.clusterProps):this.points[Te[Qe+qt]])}return ze}getChildren(K){const Q=this._getOriginId(K),te=this._getOriginZoom(K),he="No cluster with the specified id.",xe=this.trees[te];if(!xe)throw new Error(he);const Y=xe.data;if(Q*this.stride>=Y.length)throw new Error(he);const Pe=this.options.radius/(this.options.extent*Math.pow(2,te-1)),Ae=xe.within(Y[Q*this.stride],Y[Q*this.stride+1],Pe),Te=[];for(const ze of Ae){const Me=ze*this.stride;Y[Me+4]===K&&Te.push(Y[Me+Qt]>1?ti(Y,Me,this.clusterProps):this.points[Y[Me+qt]])}if(Te.length===0)throw new Error(he);return Te}getLeaves(K,Q,te){const he=[];return this._appendLeaves(he,K,Q=Q||10,te=te||0,0),he}getTile(K,Q,te){const he=this.trees[this._limitZoom(K)],xe=Math.pow(2,K),{extent:Y,radius:Pe}=this.options,Ae=Pe/Y,Te=(te-Ae)/xe,ze=(te+1+Ae)/xe,Me={features:[]};return this._addTileFeatures(he.range((Q-Ae)/xe,Te,(Q+1+Ae)/xe,ze),he.data,Q,te,xe,Me),Q===0&&this._addTileFeatures(he.range(1-Ae/xe,Te,1,ze),he.data,xe,te,xe,Me),Q===xe-1&&this._addTileFeatures(he.range(0,Te,Ae/xe,ze),he.data,-1,te,xe,Me),Me.features.length?Me:null}getClusterExpansionZoom(K){let Q=this._getOriginZoom(K)-1;for(;Q<=this.options.maxZoom;){const te=this.getChildren(K);if(Q++,te.length!==1)break;K=te[0].properties.cluster_id}return Q}_appendLeaves(K,Q,te,he,xe){const Y=this.getChildren(Q);for(const Pe of Y){const Ae=Pe.properties;if(Ae&&Ae.cluster?xe+Ae.point_count<=he?xe+=Ae.point_count:xe=this._appendLeaves(K,Ae.cluster_id,te,he,xe):xe<he?xe++:K.push(Pe),K.length===te)break}return xe}_createTree(K){const Q=new x.aF(K.length/this.stride|0,this.options.nodeSize,Float32Array);for(let te=0;te<K.length;te+=this.stride)Q.add(K[te],K[te+1]);return Q.finish(),Q.data=K,Q}_addTileFeatures(K,Q,te,he,xe,Y){for(const Pe of K){const Ae=Pe*this.stride,Te=Q[Ae+Qt]>1;let ze,Me,Qe;if(Te)ze=ar(Q,Ae,this.clusterProps),Me=Q[Ae],Qe=Q[Ae+1];else{const It=this.points[Q[Ae+qt]];ze=It.properties;const[jt,Vt]=It.geometry.coordinates;Me=Zi(jt),Qe=Nr(Vt)}const ut={type:1,geometry:[[Math.round(this.options.extent*(Me*xe-te)),Math.round(this.options.extent*(Qe*xe-he))]],tags:ze};let gt;gt=Te||this.options.generateId?Q[Ae+qt]:this.points[Q[Ae+qt]].id,gt!==void 0&&(ut.id=gt),Y.features.push(ut)}}_limitZoom(K){return Math.max(this.options.minZoom,Math.min(Math.floor(+K),this.options.maxZoom+1))}_cluster(K,Q){const{radius:te,extent:he,reduce:xe,minPoints:Y}=this.options,Pe=te/(he*Math.pow(2,Q)),Ae=K.data,Te=[],ze=this.stride;for(let Me=0;Me<Ae.length;Me+=ze){if(Ae[Me+2]<=Q)continue;Ae[Me+2]=Q;const Qe=Ae[Me],ut=Ae[Me+1],gt=K.within(Ae[Me],Ae[Me+1],Pe),It=Ae[Me+Qt];let jt=It;for(const Vt of gt){const Ue=Vt*ze;Ae[Ue+2]>Q&&(jt+=Ae[Ue+Qt])}if(jt>It&&jt>=Y){let Vt,Ue=Qe*It,cr=ut*It,Yt=-1;const sr=((Me/ze|0)<<5)+(Q+1)+this.points.length;for(const Ot of gt){const Xe=Ot*ze;if(Ae[Xe+2]<=Q)continue;Ae[Xe+2]=Q;const Rt=Ae[Xe+Qt];Ue+=Ae[Xe]*Rt,cr+=Ae[Xe+1]*Rt,Ae[Xe+4]=sr,xe&&(Vt||(Vt=this._map(Ae,Me,!0),Yt=this.clusterProps.length,this.clusterProps.push(Vt)),xe(Vt,this._map(Ae,Xe)))}Ae[Me+4]=sr,Te.push(Ue/jt,cr/jt,1/0,sr,-1,jt),xe&&Te.push(Yt)}else{for(let Vt=0;Vt<ze;Vt++)Te.push(Ae[Me+Vt]);if(jt>1)for(const Vt of gt){const Ue=Vt*ze;if(!(Ae[Ue+2]<=Q)){Ae[Ue+2]=Q;for(let cr=0;cr<ze;cr++)Te.push(Ae[Ue+cr])}}}}return Te}_getOriginId(K){return K-this.points.length>>5}_getOriginZoom(K){return(K-this.points.length)%32}_map(K,Q,te){if(K[Q+Qt]>1){const Y=this.clusterProps[K[Q+xr]];return te?Object.assign({},Y):Y}const he=this.points[K[Q+qt]].properties,xe=this.options.map(he);return te&&xe===he?Object.assign({},xe):xe}}function ti(ke,K,Q){return{type:"Feature",id:ke[K+qt],properties:ar(ke,K,Q),geometry:{type:"Point",coordinates:[(te=ke[K],360*(te-.5)),Ki(ke[K+1])]}};var te}function ar(ke,K,Q){const te=ke[K+Qt],he=te>=1e4?`${Math.round(te/1e3)}k`:te>=1e3?Math.round(te/100)/10+"k":te,xe=ke[K+xr],Y=xe===-1?{}:Object.assign({},Q[xe]);return Object.assign(Y,{cluster:!0,cluster_id:ke[K+qt],point_count:te,point_count_abbreviated:he})}function Zi(ke){return ke/360+.5}function Nr(ke){const K=Math.sin(ke*Math.PI/180),Q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return Q<0?0:Q>1?1:Q}function Ki(ke){const K=(180-360*ke)*Math.PI/180;return 360*Math.atan(Math.exp(K))/Math.PI-90}function fr(ke,K,Q,te){let he=te;const xe=K+(Q-K>>1);let Y,Pe=Q-K;const Ae=ke[K],Te=ke[K+1],ze=ke[Q],Me=ke[Q+1];for(let Qe=K+3;Qe<Q;Qe+=3){const ut=on(ke[Qe],ke[Qe+1],Ae,Te,ze,Me);if(ut>he)Y=Qe,he=ut;else if(ut===he){const gt=Math.abs(Qe-xe);gt<Pe&&(Y=Qe,Pe=gt)}}he>te&&(Y-K>3&&fr(ke,K,Y,te),ke[Y+2]=he,Q-Y>3&&fr(ke,Y,Q,te))}function on(ke,K,Q,te,he,xe){let Y=he-Q,Pe=xe-te;if(Y!==0||Pe!==0){const Ae=((ke-Q)*Y+(K-te)*Pe)/(Y*Y+Pe*Pe);Ae>1?(Q=he,te=xe):Ae>0&&(Q+=Y*Ae,te+=Pe*Ae)}return Y=ke-Q,Pe=K-te,Y*Y+Pe*Pe}function Ti(ke,K,Q,te){const he={id:ke??null,type:K,geometry:Q,tags:te,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(K==="Point"||K==="MultiPoint"||K==="LineString")Ur(he,Q);else if(K==="Polygon")Ur(he,Q[0]);else if(K==="MultiLineString")for(const xe of Q)Ur(he,xe);else if(K==="MultiPolygon")for(const xe of Q)Ur(he,xe[0]);return he}function Ur(ke,K){for(let Q=0;Q<K.length;Q+=3)ke.minX=Math.min(ke.minX,K[Q]),ke.minY=Math.min(ke.minY,K[Q+1]),ke.maxX=Math.max(ke.maxX,K[Q]),ke.maxY=Math.max(ke.maxY,K[Q+1])}function Bi(ke,K,Q,te){if(!K.geometry)return;const he=K.geometry.coordinates;if(he&&he.length===0)return;const xe=K.geometry.type,Y=Math.pow(Q.tolerance/((1<<Q.maxZoom)*Q.extent),2);let Pe=[],Ae=K.id;if(Q.promoteId?Ae=K.properties[Q.promoteId]:Q.generateId&&(Ae=te||0),xe==="Point")ri(he,Pe);else if(xe==="MultiPoint")for(const Te of he)ri(Te,Pe);else if(xe==="LineString")Gi(he,Pe,Y,!1);else if(xe==="MultiLineString"){if(Q.lineMetrics){for(const Te of he)Pe=[],Gi(Te,Pe,Y,!1),ke.push(Ti(Ae,"LineString",Pe,K.properties));return}Vi(he,Pe,Y,!1)}else if(xe==="Polygon")Vi(he,Pe,Y,!0);else{if(xe!=="MultiPolygon"){if(xe==="GeometryCollection"){for(const Te of K.geometry.geometries)Bi(ke,{id:Ae,geometry:Te,properties:K.properties},Q,te);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Te of he){const ze=[];Vi(Te,ze,Y,!0),Pe.push(ze)}}ke.push(Ti(Ae,xe,Pe,K.properties))}function ri(ke,K){K.push(Cn(ke[0]),Gr(ke[1]),0)}function Gi(ke,K,Q,te){let he,xe,Y=0;for(let Ae=0;Ae<ke.length;Ae++){const Te=Cn(ke[Ae][0]),ze=Gr(ke[Ae][1]);K.push(Te,ze,0),Ae>0&&(Y+=te?(he*ze-Te*xe)/2:Math.sqrt(Math.pow(Te-he,2)+Math.pow(ze-xe,2))),he=Te,xe=ze}const Pe=K.length-3;K[2]=1,fr(K,0,Pe,Q),K[Pe+2]=1,K.size=Math.abs(Y),K.start=0,K.end=K.size}function Vi(ke,K,Q,te){for(let he=0;he<ke.length;he++){const xe=[];Gi(ke[he],xe,Q,te),K.push(xe)}}function Cn(ke){return ke/360+.5}function Gr(ke){const K=Math.sin(ke*Math.PI/180),Q=.5-.25*Math.log((1+K)/(1-K))/Math.PI;return Q<0?0:Q>1?1:Q}function fi(ke,K,Q,te,he,xe,Y,Pe){if(te/=K,xe>=(Q/=K)&&Y<te)return ke;if(Y<Q||xe>=te)return null;const Ae=[];for(const Te of ke){const ze=Te.geometry;let Me=Te.type;const Qe=he===0?Te.minX:Te.minY,ut=he===0?Te.maxX:Te.maxY;if(Qe>=Q&&ut<te){Ae.push(Te);continue}if(ut<Q||Qe>=te)continue;let gt=[];if(Me==="Point"||Me==="MultiPoint")Jr(ze,gt,Q,te,he);else if(Me==="LineString")it(ze,gt,Q,te,he,!1,Pe.lineMetrics);else if(Me==="MultiLineString")At(ze,gt,Q,te,he,!1);else if(Me==="Polygon")At(ze,gt,Q,te,he,!0);else if(Me==="MultiPolygon")for(const It of ze){const jt=[];At(It,jt,Q,te,he,!0),jt.length&&gt.push(jt)}if(gt.length){if(Pe.lineMetrics&&Me==="LineString"){for(const It of gt)Ae.push(Ti(Te.id,Me,It,Te.tags));continue}Me!=="LineString"&&Me!=="MultiLineString"||(gt.length===1?(Me="LineString",gt=gt[0]):Me="MultiLineString"),Me!=="Point"&&Me!=="MultiPoint"||(Me=gt.length===3?"Point":"MultiPoint"),Ae.push(Ti(Te.id,Me,gt,Te.tags))}}return Ae.length?Ae:null}function Jr(ke,K,Q,te,he){for(let xe=0;xe<ke.length;xe+=3){const Y=ke[xe+he];Y>=Q&&Y<=te&&Mt(K,ke[xe],ke[xe+1],ke[xe+2])}}function it(ke,K,Q,te,he,xe,Y){let Pe=vt(ke);const Ae=he===0?Ht:Et;let Te,ze,Me=ke.start;for(let jt=0;jt<ke.length-3;jt+=3){const Vt=ke[jt],Ue=ke[jt+1],cr=ke[jt+2],Yt=ke[jt+3],sr=ke[jt+4],Ot=he===0?Vt:Ue,Xe=he===0?Yt:sr;let Rt=!1;Y&&(Te=Math.sqrt(Math.pow(Vt-Yt,2)+Math.pow(Ue-sr,2))),Ot<Q?Xe>Q&&(ze=Ae(Pe,Vt,Ue,Yt,sr,Q),Y&&(Pe.start=Me+Te*ze)):Ot>te?Xe<te&&(ze=Ae(Pe,Vt,Ue,Yt,sr,te),Y&&(Pe.start=Me+Te*ze)):Mt(Pe,Vt,Ue,cr),Xe<Q&&Ot>=Q&&(ze=Ae(Pe,Vt,Ue,Yt,sr,Q),Rt=!0),Xe>te&&Ot<=te&&(ze=Ae(Pe,Vt,Ue,Yt,sr,te),Rt=!0),!xe&&Rt&&(Y&&(Pe.end=Me+Te*ze),K.push(Pe),Pe=vt(ke)),Y&&(Me+=Te)}let Qe=ke.length-3;const ut=ke[Qe],gt=ke[Qe+1],It=he===0?ut:gt;It>=Q&&It<=te&&Mt(Pe,ut,gt,ke[Qe+2]),Qe=Pe.length-3,xe&&Qe>=3&&(Pe[Qe]!==Pe[0]||Pe[Qe+1]!==Pe[1])&&Mt(Pe,Pe[0],Pe[1],Pe[2]),Pe.length&&K.push(Pe)}function vt(ke){const K=[];return K.size=ke.size,K.start=ke.start,K.end=ke.end,K}function At(ke,K,Q,te,he,xe){for(const Y of ke)it(Y,K,Q,te,he,xe,!1)}function Mt(ke,K,Q,te){ke.push(K,Q,te)}function Ht(ke,K,Q,te,he,xe){const Y=(xe-K)/(te-K);return Mt(ke,xe,Q+(he-Q)*Y,1),Y}function Et(ke,K,Q,te,he,xe){const Y=(xe-Q)/(he-Q);return Mt(ke,K+(te-K)*Y,xe,1),Y}function zt(ke,K){const Q=[];for(let te=0;te<ke.length;te++){const he=ke[te],xe=he.type;let Y;if(xe==="Point"||xe==="MultiPoint"||xe==="LineString")Y=or(he.geometry,K);else if(xe==="MultiLineString"||xe==="Polygon"){Y=[];for(const Pe of he.geometry)Y.push(or(Pe,K))}else if(xe==="MultiPolygon"){Y=[];for(const Pe of he.geometry){const Ae=[];for(const Te of Pe)Ae.push(or(Te,K));Y.push(Ae)}}Q.push(Ti(he.id,xe,Y,he.tags))}return Q}function or(ke,K){const Q=[];Q.size=ke.size,ke.start!==void 0&&(Q.start=ke.start,Q.end=ke.end);for(let te=0;te<ke.length;te+=3)Q.push(ke[te]+K,ke[te+1],ke[te+2]);return Q}function Jt(ke,K){if(ke.transformed)return ke;const Q=1<<ke.z,te=ke.x,he=ke.y;for(const xe of ke.features){const Y=xe.geometry,Pe=xe.type;if(xe.geometry=[],Pe===1)for(let Ae=0;Ae<Y.length;Ae+=2)xe.geometry.push(Ir(Y[Ae],Y[Ae+1],K,Q,te,he));else for(let Ae=0;Ae<Y.length;Ae++){const Te=[];for(let ze=0;ze<Y[Ae].length;ze+=2)Te.push(Ir(Y[Ae][ze],Y[Ae][ze+1],K,Q,te,he));xe.geometry.push(Te)}}return ke.transformed=!0,ke}function Ir(ke,K,Q,te,he,xe){return[Math.round(Q*(ke*te-he)),Math.round(Q*(K*te-xe))]}function ii(ke,K,Q,te,he){const xe=K===he.maxZoom?0:he.tolerance/((1<<K)*he.extent),Y={features:[],numPoints:0,numSimplified:0,numFeatures:ke.length,source:null,x:Q,y:te,z:K,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const Pe of ke)Vr(Y,Pe,xe,he);return Y}function Vr(ke,K,Q,te){const he=K.geometry,xe=K.type,Y=[];if(ke.minX=Math.min(ke.minX,K.minX),ke.minY=Math.min(ke.minY,K.minY),ke.maxX=Math.max(ke.maxX,K.maxX),ke.maxY=Math.max(ke.maxY,K.maxY),xe==="Point"||xe==="MultiPoint")for(let Pe=0;Pe<he.length;Pe+=3)Y.push(he[Pe],he[Pe+1]),ke.numPoints++,ke.numSimplified++;else if(xe==="LineString")ni(Y,he,ke,Q,!1,!1);else if(xe==="MultiLineString"||xe==="Polygon")for(let Pe=0;Pe<he.length;Pe++)ni(Y,he[Pe],ke,Q,xe==="Polygon",Pe===0);else if(xe==="MultiPolygon")for(let Pe=0;Pe<he.length;Pe++){const Ae=he[Pe];for(let Te=0;Te<Ae.length;Te++)ni(Y,Ae[Te],ke,Q,!0,Te===0)}if(Y.length){let Pe=K.tags||null;if(xe==="LineString"&&te.lineMetrics){Pe={};for(const Te in K.tags)Pe[Te]=K.tags[Te];Pe.mapbox_clip_start=he.start/he.size,Pe.mapbox_clip_end=he.end/he.size}const Ae={geometry:Y,type:xe==="Polygon"||xe==="MultiPolygon"?3:xe==="LineString"||xe==="MultiLineString"?2:1,tags:Pe};K.id!==null&&(Ae.id=K.id),ke.features.push(Ae)}}function ni(ke,K,Q,te,he,xe){const Y=te*te;if(te>0&&K.size<(he?Y:te))return void(Q.numPoints+=K.length/3);const Pe=[];for(let Ae=0;Ae<K.length;Ae+=3)(te===0||K[Ae+2]>Y)&&(Q.numSimplified++,Pe.push(K[Ae],K[Ae+1])),Q.numPoints++;he&&function(Ae,Te){let ze=0;for(let Me=0,Qe=Ae.length,ut=Qe-2;Me<Qe;ut=Me,Me+=2)ze+=(Ae[Me]-Ae[ut])*(Ae[Me+1]+Ae[ut+1]);if(ze>0===Te)for(let Me=0,Qe=Ae.length;Me<Qe/2;Me+=2){const ut=Ae[Me],gt=Ae[Me+1];Ae[Me]=Ae[Qe-2-Me],Ae[Me+1]=Ae[Qe-1-Me],Ae[Qe-2-Me]=ut,Ae[Qe-1-Me]=gt}}(Pe,xe),ke.push(Pe)}const mi={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class Mi{constructor(K,Q){const te=(Q=this.options=function(xe,Y){for(const Pe in Y)xe[Pe]=Y[Pe];return xe}(Object.create(mi),Q)).debug;if(te&&console.time("preprocess data"),Q.maxZoom<0||Q.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Q.promoteId&&Q.generateId)throw new Error("promoteId and generateId cannot be used together.");let he=function(xe,Y){const Pe=[];if(xe.type==="FeatureCollection")for(let Ae=0;Ae<xe.features.length;Ae++)Bi(Pe,xe.features[Ae],Y,Ae);else Bi(Pe,xe.type==="Feature"?xe:{geometry:xe},Y);return Pe}(K,Q);this.tiles={},this.tileCoords=[],te&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Q.indexMaxZoom,Q.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),he=function(xe,Y){const Pe=Y.buffer/Y.extent;let Ae=xe;const Te=fi(xe,1,-1-Pe,Pe,0,-1,2,Y),ze=fi(xe,1,1-Pe,2+Pe,0,-1,2,Y);return(Te||ze)&&(Ae=fi(xe,1,-Pe,1+Pe,0,-1,2,Y)||[],Te&&(Ae=zt(Te,1).concat(Ae)),ze&&(Ae=Ae.concat(zt(ze,-1)))),Ae}(he,Q),he.length&&this.splitTile(he,0,0,0),te&&(he.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile(K,Q,te,he,xe,Y,Pe){const Ae=[K,Q,te,he],Te=this.options,ze=Te.debug;for(;Ae.length;){he=Ae.pop(),te=Ae.pop(),Q=Ae.pop(),K=Ae.pop();const Me=1<<Q,Qe=gi(Q,te,he);let ut=this.tiles[Qe];if(!ut&&(ze>1&&console.time("creation"),ut=this.tiles[Qe]=ii(K,Q,te,he,Te),this.tileCoords.push({z:Q,x:te,y:he}),ze)){ze>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Q,te,he,ut.numFeatures,ut.numPoints,ut.numSimplified),console.timeEnd("creation"));const Rt=`z${Q}`;this.stats[Rt]=(this.stats[Rt]||0)+1,this.total++}if(ut.source=K,xe==null){if(Q===Te.indexMaxZoom||ut.numPoints<=Te.indexMaxPoints)continue}else{if(Q===Te.maxZoom||Q===xe)continue;if(xe!=null){const Rt=xe-Q;if(te!==Y>>Rt||he!==Pe>>Rt)continue}}if(ut.source=null,K.length===0)continue;ze>1&&console.time("clipping");const gt=.5*Te.buffer/Te.extent,It=.5-gt,jt=.5+gt,Vt=1+gt;let Ue=null,cr=null,Yt=null,sr=null,Ot=fi(K,Me,te-gt,te+jt,0,ut.minX,ut.maxX,Te),Xe=fi(K,Me,te+It,te+Vt,0,ut.minX,ut.maxX,Te);K=null,Ot&&(Ue=fi(Ot,Me,he-gt,he+jt,1,ut.minY,ut.maxY,Te),cr=fi(Ot,Me,he+It,he+Vt,1,ut.minY,ut.maxY,Te),Ot=null),Xe&&(Yt=fi(Xe,Me,he-gt,he+jt,1,ut.minY,ut.maxY,Te),sr=fi(Xe,Me,he+It,he+Vt,1,ut.minY,ut.maxY,Te),Xe=null),ze>1&&console.timeEnd("clipping"),Ae.push(Ue||[],Q+1,2*te,2*he),Ae.push(cr||[],Q+1,2*te,2*he+1),Ae.push(Yt||[],Q+1,2*te+1,2*he),Ae.push(sr||[],Q+1,2*te+1,2*he+1)}}getTile(K,Q,te){K=+K,Q=+Q,te=+te;const he=this.options,{extent:xe,debug:Y}=he;if(K<0||K>24)return null;const Pe=1<<K,Ae=gi(K,Q=Q+Pe&Pe-1,te);if(this.tiles[Ae])return Jt(this.tiles[Ae],xe);Y>1&&console.log("drilling down to z%d-%d-%d",K,Q,te);let Te,ze=K,Me=Q,Qe=te;for(;!Te&&ze>0;)ze--,Me>>=1,Qe>>=1,Te=this.tiles[gi(ze,Me,Qe)];return Te&&Te.source?(Y>1&&(console.log("found parent tile z%d-%d-%d",ze,Me,Qe),console.time("drilling down")),this.splitTile(Te.source,ze,Me,Qe,K,Q,te),Y>1&&console.timeEnd("drilling down"),this.tiles[Ae]?Jt(this.tiles[Ae],xe):null):null}}function gi(ke,K,Q){return 32*((1<<ke)*Q+K)+ke}function dr(ke,K){return K?ke.properties[K]:ke.id}function Wt(ke,K){if(ke==null)return!0;if(ke.type==="Feature")return dr(ke,K)!=null;if(ke.type==="FeatureCollection"){const Q=new Set;for(const te of ke.features){const he=dr(te,K);if(he==null||Q.has(he))return!1;Q.add(he)}return!0}return!1}function Pt(ke,K){const Q=new Map;if(ke!=null)if(ke.type==="Feature")Q.set(dr(ke,K),ke);else for(const te of ke.features)Q.set(dr(te,K),te);return Q}class Bt extends O{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile(K,Q){return x._(this,void 0,void 0,function*(){const te=K.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const he=this._geoJSONIndex.getTile(te.z,te.x,te.y);if(!he)return null;const xe=new Ie(he.features);let Y=St(xe);return Y.byteOffset===0&&Y.byteLength===Y.buffer.byteLength||(Y=new Uint8Array(Y)),{vectorTile:xe,rawData:Y.buffer}})}loadData(K){return x._(this,void 0,void 0,function*(){var Q;(Q=this._pendingRequest)===null||Q===void 0||Q.abort();const te=!!(K&&K.request&&K.request.collectResourceTiming)&&new x.cE(K.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON(K,this._pendingRequest),this._geoJSONIndex=K.cluster?new gr(function({superclusterOptions:Y,clusterProperties:Pe}){if(!Pe||!Y)return Y;const Ae={},Te={},ze={accumulated:null,zoom:0},Me={properties:null},Qe=Object.keys(Pe);for(const ut of Qe){const[gt,It]=Pe[ut],jt=x.cL(It),Vt=x.cL(typeof gt=="string"?[gt,["accumulated"],["get",ut]]:gt);Ae[ut]=jt.value,Te[ut]=Vt.value}return Y.map=ut=>{Me.properties=ut;const gt={};for(const It of Qe)gt[It]=Ae[It].evaluate(ze,Me);return gt},Y.reduce=(ut,gt)=>{Me.properties=gt;for(const It of Qe)ze.accumulated=ut[It],ut[It]=Te[It].evaluate(ze,Me)},Y}(K)).load((yield this._pendingData).features):(he=yield this._pendingData,new Mi(he,K.geojsonVtOptions)),this.loaded={};const xe={};if(te){const Y=te.finish();Y&&(xe.resourceTiming={},xe.resourceTiming[K.source]=JSON.parse(JSON.stringify(Y)))}return xe}catch(xe){if(delete this._pendingRequest,x.cp(xe))return{abandoned:!0};throw xe}var he})}getData(){return x._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(K){const Q=this.loaded;return Q&&Q[K.uid]?super.reloadTile(K):this.loadTile(K)}loadAndProcessGeoJSON(K,Q){return x._(this,void 0,void 0,function*(){let te=yield this.loadGeoJSON(K,Q);if(delete this._pendingRequest,typeof te!="object")throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`);if(G(te,!0),K.filter){const he=x.cL(K.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(he.result==="error")throw new Error(he.value.map(Y=>`${Y.key}: ${Y.message}`).join(", "));te={type:"FeatureCollection",features:te.features.filter(Y=>he.value.evaluate({zoom:0},Y))}}return te})}loadGeoJSON(K,Q){return x._(this,void 0,void 0,function*(){const{promoteId:te}=K;if(K.request){const he=yield x.j(K.request,Q);return this._dataUpdateable=Wt(he.data,te)?Pt(he.data,te):void 0,he.data}if(typeof K.data=="string")try{const he=JSON.parse(K.data);return this._dataUpdateable=Wt(he,te)?Pt(he,te):void 0,he}catch{throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`)}if(!K.dataDiff)throw new Error(`Input data given to '${K.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${K.source}`);return function(he,xe,Y){var Pe,Ae,Te,ze;if(xe.removeAll&&he.clear(),xe.remove)for(const Me of xe.remove)he.delete(Me);if(xe.add)for(const Me of xe.add){const Qe=dr(Me,Y);Qe!=null&&he.set(Qe,Me)}if(xe.update)for(const Me of xe.update){let Qe=he.get(Me.id);if(Qe==null)continue;const ut=!Me.removeAllProperties&&(((Pe=Me.removeProperties)===null||Pe===void 0?void 0:Pe.length)>0||((Ae=Me.addOrUpdateProperties)===null||Ae===void 0?void 0:Ae.length)>0);if((Me.newGeometry||Me.removeAllProperties||ut)&&(Qe=Object.assign({},Qe),he.set(Me.id,Qe),ut&&(Qe.properties=Object.assign({},Qe.properties))),Me.newGeometry&&(Qe.geometry=Me.newGeometry),Me.removeAllProperties)Qe.properties={};else if(((Te=Me.removeProperties)===null||Te===void 0?void 0:Te.length)>0)for(const gt of Me.removeProperties)Object.prototype.hasOwnProperty.call(Qe.properties,gt)&&delete Qe.properties[gt];if(((ze=Me.addOrUpdateProperties)===null||ze===void 0?void 0:ze.length)>0)for(const{key:gt,value:It}of Me.addOrUpdateProperties)Qe.properties[gt]=It}}(this._dataUpdateable,K.dataDiff,te),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(K){return x._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(K){return this._geoJSONIndex.getClusterExpansionZoom(K.clusterId)}getClusterChildren(K){return this._geoJSONIndex.getChildren(K.clusterId)}getClusterLeaves(K){return this._geoJSONIndex.getLeaves(K.clusterId,K.limit,K.offset)}}class xt{constructor(K){this.self=K,this.actor=new x.H(K),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Q,te)=>{if(this.externalWorkerSourceTypes[Q])throw new Error(`Worker source with name "${Q}" already registered.`);this.externalWorkerSourceTypes[Q]=te},this.self.addProtocol=x.cr,this.self.removeProtocol=x.cs,this.self.registerRTLTextPlugin=Q=>{x.cM.setMethods(Q)},this.actor.registerMessageHandler("LDT",(Q,te)=>this._getDEMWorkerSource(Q,te.source).loadTile(te)),this.actor.registerMessageHandler("RDT",(Q,te)=>x._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Q,te.source).removeTile(te)})),this.actor.registerMessageHandler("GCEZ",(Q,te)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,te.type,te.source).getClusterExpansionZoom(te)})),this.actor.registerMessageHandler("GCC",(Q,te)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,te.type,te.source).getClusterChildren(te)})),this.actor.registerMessageHandler("GCL",(Q,te)=>x._(this,void 0,void 0,function*(){return this._getWorkerSource(Q,te.type,te.source).getClusterLeaves(te)})),this.actor.registerMessageHandler("LD",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).loadData(te)),this.actor.registerMessageHandler("GD",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).getData()),this.actor.registerMessageHandler("LT",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).loadTile(te)),this.actor.registerMessageHandler("RT",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).reloadTile(te)),this.actor.registerMessageHandler("AT",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).abortTile(te)),this.actor.registerMessageHandler("RMT",(Q,te)=>this._getWorkerSource(Q,te.type,te.source).removeTile(te)),this.actor.registerMessageHandler("RS",(Q,te)=>x._(this,void 0,void 0,function*(){if(!this.workerSources[Q]||!this.workerSources[Q][te.type]||!this.workerSources[Q][te.type][te.source])return;const he=this.workerSources[Q][te.type][te.source];delete this.workerSources[Q][te.type][te.source],he.removeSource!==void 0&&he.removeSource(te)})),this.actor.registerMessageHandler("RM",Q=>x._(this,void 0,void 0,function*(){delete this.layerIndexes[Q],delete this.availableImages[Q],delete this.workerSources[Q],delete this.demWorkerSources[Q]})),this.actor.registerMessageHandler("SR",(Q,te)=>x._(this,void 0,void 0,function*(){this.referrer=te})),this.actor.registerMessageHandler("SRPS",(Q,te)=>this._syncRTLPluginState(Q,te)),this.actor.registerMessageHandler("IS",(Q,te)=>x._(this,void 0,void 0,function*(){this.self.importScripts(te)})),this.actor.registerMessageHandler("SI",(Q,te)=>this._setImages(Q,te)),this.actor.registerMessageHandler("UL",(Q,te)=>x._(this,void 0,void 0,function*(){this._getLayerIndex(Q).update(te.layers,te.removedIds)})),this.actor.registerMessageHandler("SL",(Q,te)=>x._(this,void 0,void 0,function*(){this._getLayerIndex(Q).replace(te)}))}_setImages(K,Q){return x._(this,void 0,void 0,function*(){this.availableImages[K]=Q;for(const te in this.workerSources[K]){const he=this.workerSources[K][te];for(const xe in he)he[xe].availableImages=Q}})}_syncRTLPluginState(K,Q){return x._(this,void 0,void 0,function*(){return yield x.cM.syncState(Q,this.self.importScripts)})}_getAvailableImages(K){let Q=this.availableImages[K];return Q||(Q=[]),Q}_getLayerIndex(K){let Q=this.layerIndexes[K];return Q||(Q=this.layerIndexes[K]=new o),Q}_getWorkerSource(K,Q,te){if(this.workerSources[K]||(this.workerSources[K]={}),this.workerSources[K][Q]||(this.workerSources[K][Q]={}),!this.workerSources[K][Q][te]){const he={sendAsync:(xe,Y)=>(xe.targetMapId=K,this.actor.sendAsync(xe,Y))};switch(Q){case"vector":this.workerSources[K][Q][te]=new O(he,this._getLayerIndex(K),this._getAvailableImages(K));break;case"geojson":this.workerSources[K][Q][te]=new Bt(he,this._getLayerIndex(K),this._getAvailableImages(K));break;default:this.workerSources[K][Q][te]=new this.externalWorkerSourceTypes[Q](he,this._getLayerIndex(K),this._getAvailableImages(K))}}return this.workerSources[K][Q][te]}_getDEMWorkerSource(K,Q){return this.demWorkerSources[K]||(this.demWorkerSources[K]={}),this.demWorkerSources[K][Q]||(this.demWorkerSources[K][Q]=new L),this.demWorkerSources[K][Q]}}return x.i(self)&&(self.worker=new xt(self)),xt}),k("index",["exports","./shared"],function(x,o){var B="5.5.0";function D(){var h=new o.A(4);return o.A!=Float32Array&&(h[1]=0,h[2]=0),h[0]=1,h[3]=1,h}let M,O;const L={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frame(h,e,r){const a=requestAnimationFrame(d=>{l(),e(d)}),{unsubscribe:l}=o.s(h.signal,"abort",()=>{l(),cancelAnimationFrame(a),r(o.c())},!1)},frameAsync(h){return new Promise((e,r)=>{this.frame(h,e,r)})},getImageData(h,e=0){return this.getImageCanvasContext(h).getImageData(-e,-e,h.width+2*e,h.height+2*e)},getImageCanvasContext(h){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=h.width,e.height=h.height,r.drawImage(h,0,0,h.width,h.height),r},resolveURL:h=>(M||(M=document.createElement("a")),M.href=h,M.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(O==null&&(O=matchMedia("(prefers-reduced-motion: reduce)")),O.matches)}};class C{static testProp(e){if(!C.docStyle)return e[0];for(let r=0;r<e.length;r++)if(e[r]in C.docStyle)return e[r];return e[0]}static create(e,r,a){const l=window.document.createElement(e);return r!==void 0&&(l.className=r),a&&a.appendChild(l),l}static createNS(e,r){return window.document.createElementNS(e,r)}static disableDrag(){C.docStyle&&C.selectProp&&(C.userSelect=C.docStyle[C.selectProp],C.docStyle[C.selectProp]="none")}static enableDrag(){C.docStyle&&C.selectProp&&(C.docStyle[C.selectProp]=C.userSelect)}static setTransform(e,r){e.style[C.transformProp]=r}static addEventListener(e,r,a,l={}){e.addEventListener(r,a,"passive"in l?l:l.capture)}static removeEventListener(e,r,a,l={}){e.removeEventListener(r,a,"passive"in l?l:l.capture)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",C.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",C.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",C.suppressClickInternal,!0)},0)}static getScale(e){const r=e.getBoundingClientRect();return{x:r.width/e.offsetWidth||1,y:r.height/e.offsetHeight||1,boundingClientRect:r}}static getPoint(e,r,a){const l=r.boundingClientRect;return new o.P((a.clientX-l.left)/r.x-e.clientLeft,(a.clientY-l.top)/r.y-e.clientTop)}static mousePos(e,r){const a=C.getScale(e);return C.getPoint(e,a,r)}static touchPos(e,r){const a=[],l=C.getScale(e);for(let d=0;d<r.length;d++)a.push(C.getPoint(e,l,r[d]));return a}static mouseButton(e){return e.button}static remove(e){e.parentNode&&e.parentNode.removeChild(e)}static sanitize(e){const r=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body"),a=r.querySelectorAll("script");for(const l of a)l.remove();return C.clean(r),r.innerHTML}static isPossiblyDangerous(e,r){const a=r.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!a.includes("javascript:")&&!a.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){const r=e.children;for(const a of r)C.removeAttributes(a),C.clean(a)}static removeAttributes(e){for(const{name:r,value:a}of e.attributes)C.isPossiblyDangerous(r,a)&&e.removeAttribute(r)}}C.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,C.selectProp=C.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),C.transformProp=C.testProp(["transform","WebkitTransform"]);const T={supported:!1,testSupport:function(h){!ie&&G&&(le?Ie(h):U=h)}};let U,G,ie=!1,le=!1;function Ie(h){const e=h.createTexture();h.bindTexture(h.TEXTURE_2D,e);try{if(h.texImage2D(h.TEXTURE_2D,0,h.RGBA,h.RGBA,h.UNSIGNED_BYTE,G),h.isContextLost())return;T.supported=!0}catch{}h.deleteTexture(e),ie=!0}var ee;typeof document<"u"&&(G=document.createElement("img"),G.onload=()=>{U&&Ie(U),U=null,le=!0},G.onerror=()=>{ie=!0,U=null},G.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(h){let e,r,a,l;h.resetRequestQueue=()=>{e=[],r=0,a=0,l={}},h.addThrottleControl=A=>{const I=a++;return l[I]=A,I},h.removeThrottleControl=A=>{delete l[A],g()},h.getImage=(A,I,z=!0)=>new Promise((N,F)=>{T.supported&&(A.headers||(A.headers={}),A.headers.accept="image/webp,*/*"),o.e(A,{type:"image"}),e.push({abortController:I,requestParameters:A,supportImageRefresh:z,state:"queued",onError:Z=>{F(Z)},onSuccess:Z=>{N(Z)}}),g()});const d=A=>o._(this,void 0,void 0,function*(){A.state="running";const{requestParameters:I,supportImageRefresh:z,onError:N,onSuccess:F,abortController:Z}=A,J=z===!1&&!o.i(self)&&!o.g(I.url)&&(!I.headers||Object.keys(I.headers).reduce((se,pe)=>se&&pe==="accept",!0));r++;const oe=J?w(I,Z):o.m(I,Z);try{const se=yield oe;delete A.abortController,A.state="completed",se.data instanceof HTMLImageElement||o.b(se.data)?F(se):se.data&&F({data:yield(ne=se.data,typeof createImageBitmap=="function"?o.f(ne):o.h(ne)),cacheControl:se.cacheControl,expires:se.expires})}catch(se){delete A.abortController,N(se)}finally{r--,g()}var ne}),g=()=>{const A=(()=>{for(const I of Object.keys(l))if(l[I]())return!0;return!1})()?o.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:o.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let I=r;I<A&&e.length>0;I++){const z=e.shift();z.abortController.signal.aborted?I--:d(z)}},w=(A,I)=>new Promise((z,N)=>{const F=new Image,Z=A.url,J=A.credentials;J&&J==="include"?F.crossOrigin="use-credentials":(J&&J==="same-origin"||!o.d(Z))&&(F.crossOrigin="anonymous"),I.signal.addEventListener("abort",()=>{F.src="",N(o.c())}),F.fetchPriority="high",F.onload=()=>{F.onerror=F.onload=null,z({data:F})},F.onerror=()=>{F.onerror=F.onload=null,I.signal.aborted||N(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."))},F.src=Z})}(ee||(ee={})),ee.resetRequestQueue();class me{constructor(e){this._transformRequestFn=e}transformRequest(e,r){return this._transformRequestFn&&this._transformRequestFn(e,r)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function Le(h){const e=[];if(typeof h=="string")e.push({id:"default",url:h});else if(h&&h.length>0){const r=[];for(const{id:a,url:l}of h){const d=`${a}${l}`;r.indexOf(d)===-1&&(r.push(d),e.push({id:a,url:l}))}}return e}function qe(h,e,r){try{const a=new URL(h);return a.pathname+=`${e}${r}`,a.toString()}catch{throw new Error(`Invalid sprite URL "${h}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class rt{constructor(e,r,a,l){this.context=e,this.format=a,this.texture=e.gl.createTexture(),this.update(r,l)}update(e,r,a){const{width:l,height:d}=e,g=!(this.size&&this.size[0]===l&&this.size[1]===d||a),{context:w}=this,{gl:A}=w;if(this.useMipmap=!!(r&&r.useMipmap),A.bindTexture(A.TEXTURE_2D,this.texture),w.pixelStoreUnpackFlipY.set(!1),w.pixelStoreUnpack.set(1),w.pixelStoreUnpackPremultiplyAlpha.set(this.format===A.RGBA&&(!r||r.premultiply!==!1)),g)this.size=[l,d],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||o.b(e)?A.texImage2D(A.TEXTURE_2D,0,this.format,this.format,A.UNSIGNED_BYTE,e):A.texImage2D(A.TEXTURE_2D,0,this.format,l,d,0,this.format,A.UNSIGNED_BYTE,e.data);else{const{x:I,y:z}=a||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||o.b(e)?A.texSubImage2D(A.TEXTURE_2D,0,I,z,A.RGBA,A.UNSIGNED_BYTE,e):A.texSubImage2D(A.TEXTURE_2D,0,I,z,l,d,A.RGBA,A.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&A.generateMipmap(A.TEXTURE_2D),w.pixelStoreUnpackFlipY.setDefault(),w.pixelStoreUnpack.setDefault(),w.pixelStoreUnpackPremultiplyAlpha.setDefault()}bind(e,r,a){const{context:l}=this,{gl:d}=l;d.bindTexture(d.TEXTURE_2D,this.texture),a!==d.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(a=d.LINEAR),e!==this.filter&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,e),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,a||e),this.filter=e),r!==this.wrap&&(d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,r),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,r),this.wrap=r)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}function St(h){const{userImage:e}=h;return!!(e&&e.render&&e.render())&&(h.data.replace(new Uint8Array(e.data.buffer)),!0)}class yt extends o.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(const{ids:r,promiseResolve:a}of this.requestors)a(this._getImagesForIds(r));this.requestors=[]}}getImage(e){const r=this.images[e];if(r&&!r.data&&r.spriteData){const a=r.spriteData;r.data=new o.R({width:a.width,height:a.height},a.context.getImageData(a.x,a.y,a.width,a.height).data),r.spriteData=null}return r}addImage(e,r){if(this.images[e])throw new Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,r)&&(this.images[e]=r)}_validate(e,r){let a=!0;const l=r.data||r.spriteData;return this._validateStretch(r.stretchX,l&&l.width)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchX" value`))),a=!1),this._validateStretch(r.stretchY,l&&l.height)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "stretchY" value`))),a=!1),this._validateContent(r.content,r)||(this.fire(new o.k(new Error(`Image "${e}" has invalid "content" value`))),a=!1),a}_validateStretch(e,r){if(!e)return!0;let a=0;for(const l of e){if(l[0]<a||l[1]<l[0]||r<l[1])return!1;a=l[1]}return!0}_validateContent(e,r){if(!e)return!0;if(e.length!==4)return!1;const a=r.spriteData,l=a&&a.width||r.data.width,d=a&&a.height||r.data.height;return!(e[0]<0||l<e[0]||e[1]<0||d<e[1]||e[2]<0||l<e[2]||e[3]<0||d<e[3]||e[2]<e[0]||e[3]<e[1])}updateImage(e,r,a=!0){const l=this.getImage(e);if(a&&(l.data.width!==r.data.width||l.data.height!==r.data.height))throw new Error(`size mismatch between old image (${l.data.width}x${l.data.height}) and new image (${r.data.width}x${r.data.height}).`);r.version=l.version+1,this.images[e]=r,this.updatedImages[e]=!0}removeImage(e){const r=this.images[e];delete this.images[e],delete this.patterns[e],r.userImage&&r.userImage.onRemove&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((r,a)=>{let l=!0;if(!this.isLoaded())for(const d of e)this.images[d]||(l=!1);this.isLoaded()||l?r(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:r})})}_getImagesForIds(e){const r={};for(const a of e){let l=this.getImage(a);l||(this.fire(new o.l("styleimagemissing",{id:a})),l=this.getImage(a)),l?r[a]={data:l.data.clone(),pixelRatio:l.pixelRatio,sdf:l.sdf,version:l.version,stretchX:l.stretchX,stretchY:l.stretchY,content:l.content,textFitWidth:l.textFitWidth,textFitHeight:l.textFitHeight,hasRenderCallback:!!(l.userImage&&l.userImage.render)}:o.w(`Image "${a}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){const{width:e,height:r}=this.atlasImage;return{width:e,height:r}}getPattern(e){const r=this.patterns[e],a=this.getImage(e);if(!a)return null;if(r&&r.position.version===a.version)return r.position;if(r)r.position.version=a.version;else{const l={w:a.data.width+2,h:a.data.height+2,x:0,y:0},d=new o.I(l,a);this.patterns[e]={bin:l,position:d}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){const r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new rt(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){const e=[];for(const d in this.patterns)e.push(this.patterns[d].bin);const{w:r,h:a}=o.p(e),l=this.atlasImage;l.resize({width:r||1,height:a||1});for(const d in this.patterns){const{bin:g}=this.patterns[d],w=g.x+1,A=g.y+1,I=this.getImage(d).data,z=I.width,N=I.height;o.R.copy(I,l,{x:0,y:0},{x:w,y:A},{width:z,height:N}),o.R.copy(I,l,{x:0,y:N-1},{x:w,y:A-1},{width:z,height:1}),o.R.copy(I,l,{x:0,y:0},{x:w,y:A+N},{width:z,height:1}),o.R.copy(I,l,{x:z-1,y:0},{x:w-1,y:A},{width:1,height:N}),o.R.copy(I,l,{x:0,y:0},{x:w+z,y:A},{width:1,height:N})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(const r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;const a=this.getImage(r);a||o.w(`Image with ID: "${r}" was not found`),St(a)&&this.updateImage(r,a)}}}const ct=1e20;function _t(h,e,r,a,l,d,g,w,A){for(let I=e;I<e+a;I++)qt(h,r*d+I,d,l,g,w,A);for(let I=r;I<r+l;I++)qt(h,I*d+e,1,a,g,w,A)}function qt(h,e,r,a,l,d,g){d[0]=0,g[0]=-1e20,g[1]=ct,l[0]=h[e];for(let w=1,A=0,I=0;w<a;w++){l[w]=h[e+w*r];const z=w*w;do{const N=d[A];I=(l[w]-l[N]+z-N*N)/(w-N)/2}while(I<=g[A]&&--A>-1);A++,d[A]=w,g[A]=I,g[A+1]=ct}for(let w=0,A=0;w<a;w++){for(;g[A+1]<w;)A++;const I=d[A],z=w-I;h[e+w*r]=l[I]+z*z}}class Qt{constructor(e,r){this.requestManager=e,this.localIdeographFontFamily=r,this.entries={}}setURL(e){this.url=e}getGlyphs(e){return o._(this,void 0,void 0,function*(){const r=[];for(const d in e)for(const g of e[d])r.push(this._getAndCacheGlyphsPromise(d,g));const a=yield Promise.all(r),l={};for(const{stack:d,id:g,glyph:w}of a)l[d]||(l[d]={}),l[d][g]=w&&{id:w.id,bitmap:w.bitmap.clone(),metrics:w.metrics};return l})}_getAndCacheGlyphsPromise(e,r){return o._(this,void 0,void 0,function*(){let a=this.entries[e];a||(a=this.entries[e]={glyphs:{},requests:{},ranges:{}});let l=a.glyphs[r];if(l!==void 0)return{stack:e,id:r,glyph:l};if(l=this._tinySDF(a,e,r),l)return a.glyphs[r]=l,{stack:e,id:r,glyph:l};const d=Math.floor(r/256);if(256*d>65535)throw new Error("glyphs > 65535 not supported");if(a.ranges[d])return{stack:e,id:r,glyph:l};if(!this.url)throw new Error("glyphsUrl is not set");if(!a.requests[d]){const w=Qt.loadGlyphRange(e,d,this.url,this.requestManager);a.requests[d]=w}const g=yield a.requests[d];for(const w in g)this._doesCharSupportLocalGlyph(+w)||(a.glyphs[+w]=g[+w]);return a.ranges[d]=!0,{stack:e,id:r,glyph:g[r]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&(new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))||o.u["CJK Unified Ideographs"](e)||o.u["Hangul Syllables"](e)||o.u.Hiragana(e)||o.u.Katakana(e)||o.u["CJK Symbols and Punctuation"](e)||o.u["Halfwidth and Fullwidth Forms"](e))}_tinySDF(e,r,a){const l=this.localIdeographFontFamily;if(!l||!this._doesCharSupportLocalGlyph(a))return;let d=e.tinySDF;if(!d){let w="400";/bold/i.test(r)?w="900":/medium/i.test(r)?w="500":/light/i.test(r)&&(w="200"),d=e.tinySDF=new Qt.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:l,fontWeight:w})}const g=d.draw(String.fromCharCode(a));return{id:a,bitmap:new o.q({width:g.width||60,height:g.height||60},g.data),metrics:{width:g.glyphWidth/2||24,height:g.glyphHeight/2||24,left:g.glyphLeft/2+.5||0,top:g.glyphTop/2-27.5||-8,advance:g.glyphAdvance/2||24,isDoubleResolution:!0}}}}Qt.loadGlyphRange=function(h,e,r,a){return o._(this,void 0,void 0,function*(){const l=256*e,d=l+255,g=a.transformRequest(r.replace("{fontstack}",h).replace("{range}",`${l}-${d}`),"Glyphs"),w=yield o.n(g,new AbortController);if(!w||!w.data)throw new Error(`Could not load glyph range. range: ${e}, ${l}-${d}`);const A={};for(const I of o.o(w.data))A[I.id]=I;return A})},Qt.TinySDF=class{constructor({fontSize:h=24,buffer:e=3,radius:r=8,cutoff:a=.25,fontFamily:l="sans-serif",fontWeight:d="normal",fontStyle:g="normal"}={}){this.buffer=e,this.cutoff=a,this.radius=r;const w=this.size=h+4*e,A=this._createCanvas(w),I=this.ctx=A.getContext("2d",{willReadFrequently:!0});I.font=`${g} ${d} ${h}px ${l}`,I.textBaseline="alphabetic",I.textAlign="left",I.fillStyle="black",this.gridOuter=new Float64Array(w*w),this.gridInner=new Float64Array(w*w),this.f=new Float64Array(w),this.z=new Float64Array(w+1),this.v=new Uint16Array(w)}_createCanvas(h){const e=document.createElement("canvas");return e.width=e.height=h,e}draw(h){const{width:e,actualBoundingBoxAscent:r,actualBoundingBoxDescent:a,actualBoundingBoxLeft:l,actualBoundingBoxRight:d}=this.ctx.measureText(h),g=Math.ceil(r),w=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(d-l))),A=Math.min(this.size-this.buffer,g+Math.ceil(a)),I=w+2*this.buffer,z=A+2*this.buffer,N=Math.max(I*z,0),F=new Uint8ClampedArray(N),Z={data:F,width:I,height:z,glyphWidth:w,glyphHeight:A,glyphTop:g,glyphLeft:0,glyphAdvance:e};if(w===0||A===0)return Z;const{ctx:J,buffer:oe,gridInner:ne,gridOuter:se}=this;J.clearRect(oe,oe,w,A),J.fillText(h,oe,oe+g);const pe=J.getImageData(oe,oe,w,A);se.fill(ct,0,N),ne.fill(0,0,N);for(let _e=0;_e<A;_e++)for(let ye=0;ye<w;ye++){const be=pe.data[4*(_e*w+ye)+3]/255;if(be===0)continue;const Ce=(_e+oe)*I+ye+oe;if(be===1)se[Ce]=0,ne[Ce]=ct;else{const we=.5-be;se[Ce]=we>0?we*we:0,ne[Ce]=we<0?we*we:0}}_t(se,0,0,I,z,I,this.f,this.v,this.z),_t(ne,oe,oe,w,A,I,this.f,this.v,this.z);for(let _e=0;_e<N;_e++){const ye=Math.sqrt(se[_e])-Math.sqrt(ne[_e]);F[_e]=Math.round(255-255*(ye/this.radius+this.cutoff))}return Z}};class xr{constructor(){this.specification=o.v.light.position}possiblyEvaluate(e,r){return o.z(e.expression.evaluate(r))}interpolate(e,r,a){return{x:o.B.number(e.x,r.x,a),y:o.B.number(e.y,r.y,a),z:o.B.number(e.z,r.z,a)}}}let gr;class ti extends o.E{constructor(e){super(),gr=gr||new o.r({anchor:new o.D(o.v.light.anchor),position:new xr,color:new o.D(o.v.light.color),intensity:new o.D(o.v.light.intensity)}),this._transitionable=new o.T(gr),this.setLight(e),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(e,r={}){if(!this._validate(o.t,e,r))for(const a in e){const l=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),l):this._transitionable.setValue(a,l)}}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,a){return(!a||a.validate!==!1)&&o.x(this,e.call(o.y,{value:r,style:{glyphs:!0,sprite:!0},styleSpec:o.v}))}}const ar=new o.r({"sky-color":new o.D(o.v.sky["sky-color"]),"horizon-color":new o.D(o.v.sky["horizon-color"]),"fog-color":new o.D(o.v.sky["fog-color"]),"fog-ground-blend":new o.D(o.v.sky["fog-ground-blend"]),"horizon-fog-blend":new o.D(o.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new o.D(o.v.sky["sky-horizon-blend"]),"atmosphere-blend":new o.D(o.v.sky["atmosphere-blend"])});class Zi extends o.E{constructor(e){super(),this._transitionable=new o.T(ar),this.setSky(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.C(0))}setSky(e,r={}){if(!this._validate(o.F,e,r)){e||(e={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const a in e){const l=e[a];a.endsWith("-transition")?this._transitionable.setTransition(a.slice(0,-11),l):this._transitionable.setValue(a,l)}}}getSky(){return this._transitionable.serialize()}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}_validate(e,r,a={}){return(a==null?void 0:a.validate)!==!1&&o.x(this,e.call(o.y,o.e({value:r,style:{glyphs:!0,sprite:!0},styleSpec:o.v})))}calculateFogBlendOpacity(e){return e<60?0:e<70?(e-60)/10:1}}class Nr{constructor(e,r){this.width=e,this.height=r,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(e,r){const a=e.join(",")+String(r);return this.dashEntry[a]||(this.dashEntry[a]=this.addDash(e,r)),this.dashEntry[a]}getDashRanges(e,r,a){const l=[];let d=e.length%2==1?-e[e.length-1]*a:0,g=e[0]*a,w=!0;l.push({left:d,right:g,isDash:w,zeroLength:e[0]===0});let A=e[0];for(let I=1;I<e.length;I++){w=!w;const z=e[I];d=A*a,A+=z,g=A*a,l.push({left:d,right:g,isDash:w,zeroLength:z===0})}return l}addRoundDash(e,r,a){const l=r/2;for(let d=-a;d<=a;d++){const g=this.width*(this.nextRow+a+d);let w=0,A=e[w];for(let I=0;I<this.width;I++){I/A.right>1&&(A=e[++w]);const z=Math.abs(I-A.left),N=Math.abs(I-A.right),F=Math.min(z,N);let Z;const J=d/a*(l+1);if(A.isDash){const oe=l-Math.abs(J);Z=Math.sqrt(F*F+oe*oe)}else Z=l-Math.sqrt(F*F+J*J);this.data[g+I]=Math.max(0,Math.min(255,Z+128))}}}addRegularDash(e){for(let w=e.length-1;w>=0;--w){const A=e[w],I=e[w+1];A.zeroLength?e.splice(w,1):I&&I.isDash===A.isDash&&(I.left=A.left,e.splice(w,1))}const r=e[0],a=e[e.length-1];r.isDash===a.isDash&&(r.left=a.left-this.width,a.right=r.right+this.width);const l=this.width*this.nextRow;let d=0,g=e[d];for(let w=0;w<this.width;w++){w/g.right>1&&(g=e[++d]);const A=Math.abs(w-g.left),I=Math.abs(w-g.right),z=Math.min(A,I);this.data[l+w]=Math.max(0,Math.min(255,(g.isDash?z:-z)+128))}}addDash(e,r){const a=r?7:0,l=2*a+1;if(this.nextRow+l>this.height)return o.w("LineAtlas out of space"),null;let d=0;for(let w=0;w<e.length;w++)d+=e[w];if(d!==0){const w=this.width/d,A=this.getDashRanges(e,this.width,w);r?this.addRoundDash(A,w,a):this.addRegularDash(A)}const g={y:(this.nextRow+a+.5)/this.height,height:2*a/this.height,width:d};return this.nextRow+=l,this.dirty=!0,g}bind(e){const r=e.gl;this.texture?(r.bindTexture(r.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,r.texSubImage2D(r.TEXTURE_2D,0,0,0,this.width,this.height,r.ALPHA,r.UNSIGNED_BYTE,this.data))):(this.texture=r.createTexture(),r.bindTexture(r.TEXTURE_2D,this.texture),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.REPEAT),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.LINEAR),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.LINEAR),r.texImage2D(r.TEXTURE_2D,0,r.ALPHA,this.width,this.height,0,r.ALPHA,r.UNSIGNED_BYTE,this.data))}}const Ki="maplibre_preloaded_worker_pool";class fr{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.length<fr.workerCount;)this.workers.push(new Worker(o.a.WORKER_URL));return this.active[e]=!0,this.workers.slice()}release(e){delete this.active[e],this.numActive()===0&&(this.workers.forEach(r=>{r.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Ki]}numActive(){return Object.keys(this.active).length}}const on=Math.floor(L.hardwareConcurrency/2);let Ti,Ur;function Bi(){return Ti||(Ti=new fr),Ti}fr.workerCount=o.G(globalThis)?Math.max(Math.min(on,3),1):1;class ri{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;const a=this.workerPool.acquire(r);for(let l=0;l<a.length;l++){const d=new o.H(a[l],r);d.name=`Worker ${l}`,this.actors.push(d)}if(!this.actors.length)throw new Error("No actors found")}broadcast(e,r){const a=[];for(const l of this.actors)a.push(l.sendAsync({type:e,data:r}));return Promise.all(a)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(e=!0){this.actors.forEach(r=>{r.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,r){for(const a of this.actors)a.registerMessageHandler(e,r)}}function Gi(){return Ur||(Ur=new ri(Bi(),o.J),Ur.registerMessageHandler("GR",(h,e,r)=>o.m(e,r))),Ur}function Vi(h,e){const r=o.K();return o.L(r,r,[1,1,0]),o.M(r,r,[.5*h.width,.5*h.height,1]),h.calculatePosMatrix?o.N(r,r,h.calculatePosMatrix(e.toUnwrapped())):r}function Cn(h,e,r,a,l,d,g){var w;const A=function(F,Z,J){if(F)for(const oe of F){const ne=Z[oe];if(ne&&ne.source===J&&ne.type==="fill-extrusion")return!0}else for(const oe in Z){const ne=Z[oe];if(ne.source===J&&ne.type==="fill-extrusion")return!0}return!1}((w=l==null?void 0:l.layers)!==null&&w!==void 0?w:null,e,h.id),I=d.maxPitchScaleFactor(),z=h.tilesIn(a,I,A);z.sort(Gr);const N=[];for(const F of z)N.push({wrappedTileID:F.tileID.wrapped().key,queryResults:F.tile.queryRenderedFeatures(e,r,h._state,F.queryGeometry,F.cameraQueryGeometry,F.scale,l,d,I,Vi(h.transform,F.tileID),g?(Z,J)=>g(F.tileID,Z,J):void 0)});return function(F,Z){for(const J in F)for(const oe of F[J])fi(oe,Z);return F}(function(F){const Z={},J={};for(const oe of F){const ne=oe.queryResults,se=oe.wrappedTileID,pe=J[se]=J[se]||{};for(const _e in ne){const ye=ne[_e],be=pe[_e]=pe[_e]||{},Ce=Z[_e]=Z[_e]||[];for(const we of ye)be[we.featureIndex]||(be[we.featureIndex]=!0,Ce.push(we))}}return Z}(N),h)}function Gr(h,e){const r=h.tileID,a=e.tileID;return r.overscaledZ-a.overscaledZ||r.canonical.y-a.canonical.y||r.wrap-a.wrap||r.canonical.x-a.canonical.x}function fi(h,e){const r=h.feature,a=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=a}function Jr(h,e,r){return o._(this,void 0,void 0,function*(){let a=h;if(h.url?a=(yield o.j(e.transformRequest(h.url,"Source"),r)).data:yield L.frameAsync(r),!a)return null;const l=o.O(o.e(a,h),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(l.vectorLayerIds=a.vector_layers.map(d=>d.id)),l})}class it{constructor(e,r){e&&(r?this.setSouthWest(e).setNorthEast(r):Array.isArray(e)&&(e.length===4?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof o.Q?new o.Q(e.lng,e.lat):o.Q.convert(e),this}setSouthWest(e){return this._sw=e instanceof o.Q?new o.Q(e.lng,e.lat):o.Q.convert(e),this}extend(e){const r=this._sw,a=this._ne;let l,d;if(e instanceof o.Q)l=e,d=e;else{if(!(e instanceof it))return Array.isArray(e)?e.length===4||e.every(Array.isArray)?this.extend(it.convert(e)):this.extend(o.Q.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(o.Q.convert(e)):this;if(l=e._sw,d=e._ne,!l||!d)return this}return r||a?(r.lng=Math.min(l.lng,r.lng),r.lat=Math.min(l.lat,r.lat),a.lng=Math.max(d.lng,a.lng),a.lat=Math.max(d.lat,a.lat)):(this._sw=new o.Q(l.lng,l.lat),this._ne=new o.Q(d.lng,d.lat)),this}getCenter(){return new o.Q((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 o.Q(this.getWest(),this.getNorth())}getSouthEast(){return new o.Q(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(e){const{lng:r,lat:a}=o.Q.convert(e);let l=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(l=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=a&&a<=this._ne.lat&&l}static convert(e){return e instanceof it?e:e&&new it(e)}static fromLngLat(e,r=0){const a=360*r/40075017,l=a/Math.cos(Math.PI/180*e.lat);return new it(new o.Q(e.lng-l,e.lat-a),new o.Q(e.lng+l,e.lat+a))}adjustAntiMeridian(){const e=new o.Q(this._sw.lng,this._sw.lat),r=new o.Q(this._ne.lng,this._ne.lat);return new it(e,e.lng>r.lng?new o.Q(r.lng+360,r.lat):r)}}class vt{constructor(e,r,a){this.bounds=it.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=a||24}validateBounds(e){return Array.isArray(e)&&e.length===4?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){const r=Math.pow(2,e.z),a=Math.floor(o.U(this.bounds.getWest())*r),l=Math.floor(o.S(this.bounds.getNorth())*r),d=Math.ceil(o.U(this.bounds.getEast())*r),g=Math.ceil(o.S(this.bounds.getSouth())*r);return e.x>=a&&e.x<d&&e.y>=l&&e.y<g}}class At extends o.E{constructor(e,r,a,l){if(super(),this.id=e,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,o.e(this,o.O(r,["url","scheme","tileSize","promoteId"])),this._options=o.e({type:"vector"},r),this._collectResourceTiming=r.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(l)}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const e=yield Jr(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),e&&(o.e(this,e),e.bounds&&(this.tileBounds=new vt(e.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new o.k(e))}})}loaded(){return this._loaded}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}onAdd(e){this.map=e,this.load()}setSourceProperty(e){this._tileJSONRequest&&this._tileJSONRequest.abort(),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return o.e({},this._options)}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a={request:this.map._requestManager.transformRequest(r,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};a.request.collectResourceTiming=this._collectResourceTiming;let l="RT";if(e.actor&&e.state!=="expired"){if(e.state==="loading")return new Promise((d,g)=>{e.reloadPromise={resolve:d,reject:g}})}else e.actor=this.dispatcher.getActor(),l="LT";e.abortController=new AbortController;try{const d=yield e.actor.sendAsync({type:l,data:a},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,d)}catch(d){if(delete e.abortController,e.aborted)return;if(d&&d.status!==404)throw d;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,r){if(r&&r.resourceTiming&&(e.resourceTiming=r.resourceTiming),r&&this.map._refreshExpiredTiles&&e.setExpiryData(r),e.loadVectorData(r,this.map.painter),e.reloadPromise){const a=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(a.resolve).catch(a.reject)}}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Mt extends o.E{constructor(e,r,a,l){super(),this.id=e,this.dispatcher=a,this.setEventedParent(l),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=o.e({type:"raster"},r),o.e(this,o.O(r,["url","scheme","tileSize"]))}load(){return o._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const r=yield Jr(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,r&&(o.e(this,r),r.bounds&&(this.tileBounds=new vt(r.bounds,this.minzoom,this.maxzoom)),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new o.l("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(r){this._tileJSONRequest=null,this.fire(new o.k(r))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return o.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{const a=yield ee.getImage(this.map._requestManager.transformRequest(r,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(a&&a.data){this.map._refreshExpiredTiles&&(a.cacheControl||a.expires)&&e.setExpiryData({cacheControl:a.cacheControl,expires:a.expires});const l=this.map.painter.context,d=l.gl,g=a.data;e.texture=this.map.painter.getTileTexture(g.width),e.texture?e.texture.update(g,{useMipmap:!0}):(e.texture=new rt(l,g,d.RGBA,{useMipmap:!0}),e.texture.bind(d.LINEAR,d.CLAMP_TO_EDGE,d.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(a){if(delete e.abortController,e.aborted)e.state="unloaded";else if(a)throw e.state="errored",a}})}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class Ht extends Mt{constructor(e,r,a,l){super(e,r,a,l),this.type="raster-dem",this.maxzoom=22,this._options=o.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),a=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{const l=yield ee.getImage(a,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(l&&l.data){const d=l.data;this.map._refreshExpiredTiles&&(l.cacheControl||l.expires)&&e.setExpiryData({cacheControl:l.cacheControl,expires:l.expires});const g=o.b(d)&&o.V()?d:yield this.readImageNow(d),w={type:this.type,uid:e.uid,source:this.id,rawImageData:g,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||e.state==="expired"){e.actor=this.dispatcher.getActor();const A=yield e.actor.sendAsync({type:"LDT",data:w});e.dem=A,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(l){if(delete e.abortController,e.aborted)e.state="unloaded";else if(l)throw e.state="errored",l}})}readImageNow(e){return o._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&o.W()){const r=e.width+2,a=e.height+2;try{return new o.R({width:r,height:a},yield o.X(e,-1,-1,r,a))}catch{}}return L.getImageData(e,1)})}_getNeighboringTiles(e){const r=e.canonical,a=Math.pow(2,r.z),l=(r.x-1+a)%a,d=r.x===0?e.wrap-1:e.wrap,g=(r.x+1+a)%a,w=r.x+1===a?e.wrap+1:e.wrap,A={};return A[new o.Y(e.overscaledZ,d,r.z,l,r.y).key]={backfilled:!1},A[new o.Y(e.overscaledZ,w,r.z,g,r.y).key]={backfilled:!1},r.y>0&&(A[new o.Y(e.overscaledZ,d,r.z,l,r.y-1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,w,r.z,g,r.y-1).key]={backfilled:!1}),r.y+1<a&&(A[new o.Y(e.overscaledZ,d,r.z,l,r.y+1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},A[new o.Y(e.overscaledZ,w,r.z,g,r.y+1).key]={backfilled:!1}),A}unloadTile(e){return o._(this,void 0,void 0,function*(){e.demTexture&&this.map.painter.saveTileTexture(e.demTexture),e.fbo&&(e.fbo.destroy(),delete e.fbo),e.dem&&delete e.dem,delete e.neighboringTiles,e.state="unloaded",e.actor&&(yield e.actor.sendAsync({type:"RDT",data:{type:this.type,uid:e.uid,source:this.id}}))})}}class Et extends o.E{constructor(e,r,a,l){super(),this.id=e,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(l),this._data=r.data,this._options=o.e({},r),this._collectResourceTiming=r.collectResourceTiming,r.maxzoom!==void 0&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,r.clusterMaxZoom!==void 0&&this.maxzoom<=r.clusterMaxZoom&&o.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=o.e({source:this.id,cluster:r.cluster||!1,geojsonVtOptions:{buffer:this._pixelsToTileUnits(r.buffer!==void 0?r.buffer:128),tolerance:this._pixelsToTileUnits(r.tolerance!==void 0?r.tolerance:.375),extent:o.Z,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1},superclusterOptions:{maxZoom:r.clusterMaxZoom!==void 0?r.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,r.clusterMinPoints||2),extent:o.Z,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}_pixelsToTileUnits(e){return e*(o.Z/this.tileSize)}load(){return o._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e){return this._data=e,this._updateWorkerData(),this}updateData(e){return this._updateWorkerData(e),this}getData(){return o._(this,void 0,void 0,function*(){const e=o.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:e})})}getCoordinatesFromGeometry(e){return e.type==="GeometryCollection"?e.geometries.map(r=>r.coordinates).flat(1/0):e.coordinates.flat(1/0)}getBounds(){return o._(this,void 0,void 0,function*(){const e=new it,r=yield this.getData();let a;switch(r.type){case"FeatureCollection":a=r.features.map(l=>this.getCoordinatesFromGeometry(l.geometry)).flat(1/0);break;case"Feature":a=this.getCoordinatesFromGeometry(r.geometry);break;default:a=this.getCoordinatesFromGeometry(r)}if(a.length==0)return e;for(let l=0;l<a.length-1;l+=2)e.extend([a[l],a[l+1]]);return e})}setClusterOptions(e){return this.workerOptions.cluster=e.cluster,e&&(e.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),e.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=e.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,r,a){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:r,offset:a}})}_updateWorkerData(e){return o._(this,void 0,void 0,function*(){const r=o.e({type:this.type},this.workerOptions);e?r.dataDiff=e:typeof this._data=="string"?(r.request=this.map._requestManager.transformRequest(L.resolveURL(this._data),"Source"),r.request.collectResourceTiming=this._collectResourceTiming):r.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new o.l("dataloading",{dataType:"source"}));try{const a=yield this.actor.sendAsync({type:"LD",data:r});if(this._pendingLoads--,this._removed||a.abandoned)return void this.fire(new o.l("dataabort",{dataType:"source"}));let l=null;a.resourceTiming&&a.resourceTiming[this.id]&&(l=a.resourceTiming[this.id].slice(0));const d={dataType:"source"};this._collectResourceTiming&&l&&l.length>0&&o.e(d,{resourceTiming:l}),this.fire(new o.l("data",Object.assign(Object.assign({},d),{sourceDataType:"metadata"}))),this.fire(new o.l("data",Object.assign(Object.assign({},d),{sourceDataType:"content"})))}catch(a){if(this._pendingLoads--,this._removed)return void this.fire(new o.l("dataabort",{dataType:"source"}));this.fire(new o.k(a))}})}loaded(){return this._pendingLoads===0}loadTile(e){return o._(this,void 0,void 0,function*(){const r=e.actor?"RT":"LT";e.actor=this.actor;const a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;const l=yield this.actor.sendAsync({type:r,data:a},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(l,this.map.painter,r==="RT")})}abortTile(e){return o._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return o._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return o.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}class zt extends o.E{constructor(e,r,a,l){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=a,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(l),this.options=r}load(e){return o._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new o.l("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const r=yield ee.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,r&&r.data&&(this.image=r.data,e&&(this.coordinates=e),this._finishLoading())}catch(r){this._request=null,this._loaded=!0,this.fire(new o.k(r))}})}loaded(){return this._loaded}updateImage(e){return e.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.l("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;const r=e.map(o.$.fromLngLat);var a;return this.tileID=function(l){let d=1/0,g=1/0,w=-1/0,A=-1/0;for(const F of l)d=Math.min(d,F.x),g=Math.min(g,F.y),w=Math.max(w,F.x),A=Math.max(A,F.y);const I=Math.max(w-d,A-g),z=Math.max(0,Math.floor(-Math.log(I)/Math.LN2)),N=Math.pow(2,z);return new o.a1(z,Math.floor((d+w)/2*N),Math.floor((g+A)/2*N))}(r),this.terrainTileRanges=this._getOverlappingTileRanges(r),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=r.map(l=>this.tileID.getTilePoint(l)._round()),this.flippedWindingOrder=((a=this.tileCoords)[1].x-a[0].x)*(a[2].y-a[0].y)-(a[1].y-a[0].y)*(a[2].x-a[0].x)<0,this.fire(new o.l("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new rt(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let a=!1;for(const l in this.tiles){const d=this.tiles[l];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,a=!0)}a&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return o._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let r=1/0,a=1/0,l=-1/0,d=-1/0;for(const w of e)r=Math.min(r,w.x),a=Math.min(a,w.y),l=Math.max(l,w.x),d=Math.max(d,w.y);const g={};for(let w=0;w<=o.a0;w++){const A=Math.pow(2,w),I=Math.floor(r*A),z=Math.floor(a*A),N=Math.floor(l*A),F=Math.floor(d*A);g[w]={minTileX:I,minTileY:z,maxTileX:N,maxTileY:F}}return g}}class or extends zt{constructor(e,r,a,l){super(e,r,a,l),this.roundZoom=!0,this.type="video",this.options=r}load(){return o._(this,void 0,void 0,function*(){this._loaded=!1;const e=this.options;this.urls=[];for(const r of e.urls)this.urls.push(this.map._requestManager.transformRequest(r,"Source").url);try{const r=yield o.a2(this.urls);if(this._loaded=!0,!r)return;this.video=r,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(r){this.fire(new o.k(r))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){const r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new o.k(new o.a3(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const e=this.map.painter.context,r=e.gl;this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new rt(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let a=!1;for(const l in this.tiles){const d=this.tiles[l];d.state!=="loaded"&&(d.state="loaded",d.texture=this.texture,a=!0)}a&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Jt extends zt{constructor(e,r,a,l){super(e,r,a,l),r.coordinates?Array.isArray(r.coordinates)&&r.coordinates.length===4&&!r.coordinates.some(d=>!Array.isArray(d)||d.length!==2||d.some(g=>typeof g!="number"))||this.fire(new o.k(new o.a3(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.k(new o.a3(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&typeof r.animate!="boolean"&&this.fire(new o.k(new o.a3(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?typeof r.canvas=="string"||r.canvas instanceof HTMLCanvasElement||this.fire(new o.k(new o.a3(`sources.${e}`,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 o.k(new o.a3(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=r.animate===void 0||r.animate}load(){return o._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new o.k(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const r=this.map.painter.context,a=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new rt(r,this.canvas,a.RGBA,{premultiply:!0});let l=!1;for(const d in this.tiles){const g=this.tiles[d];g.state!=="loaded"&&(g.state="loaded",g.texture=this.texture,l=!0)}l&&this.fire(new o.l("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}const Ir={},ii=h=>{switch(h){case"geojson":return Et;case"image":return zt;case"raster":return Mt;case"raster-dem":return Ht;case"vector":return At;case"video":return or;case"canvas":return Jt}return Ir[h]},Vr="RTLPluginLoaded";class ni extends o.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=Gi()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(r=>{throw this.status="error",r})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return o._(this,arguments,void 0,function*(r,a=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=L.resolveURL(r),!this.url)throw new Error(`requested url ${r} is invalid`);if(this.status==="unavailable"){if(!a)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return o._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new o.l(Vr))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let mi=null;function Mi(){return mi||(mi=new ni),mi}class gi{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=o.a4(),this.uses=0,this.tileSize=r,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(e){const r=e+this.timeAdded;r<this.fadeEndTime||(this.fadeEndTime=r)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,a){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestFeatureIndex.rawTileData=e.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(l,d){const g={};if(!d)return g;for(const w of l){const A=w.layerIds.map(I=>d.getLayer(I)).filter(Boolean);if(A.length!==0){w.layers=A,w.stateDependentLayerIds&&(w.stateDependentLayers=w.stateDependentLayerIds.map(I=>A.filter(z=>z.id===I)[0]));for(const I of A)g[I.id]=w}}return g}(e.buckets,r==null?void 0:r.style),this.hasSymbolBuckets=!1;for(const l in this.buckets){const d=this.buckets[l];if(d instanceof o.a6){if(this.hasSymbolBuckets=!0,!a)break;d.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const l in this.buckets){const d=this.buckets[l];if(d instanceof o.a6&&d.hasRTLText){this.hasRTLText=!0,Mi().lazyLoad();break}}this.queryPadding=0;for(const l in this.buckets){const d=this.buckets[l];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(l).queryRadius(d))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new o.a5}unloadVectorData(){for(const e in this.buckets)this.buckets[e].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(e){return this.buckets[e.id]}upload(e){for(const a in this.buckets){const l=this.buckets[a];l.uploadPending()&&l.upload(e)}const r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new rt(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new rt(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,r,a,l,d,g,w,A,I,z,N){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:l,cameraQueryGeometry:d,scale:g,tileSize:this.tileSize,pixelPosMatrix:z,transform:A,params:w,queryPadding:this.queryPadding*I,getElevation:N},e,r,a):{}}querySourceFeatures(e,r){const a=this.latestFeatureIndex;if(!a||!a.rawTileData)return;const l=a.loadVTLayers(),d=r&&r.sourceLayer?r.sourceLayer:"",g=l._geojsonTileLayer||l[d];if(!g)return;const w=o.a7(r&&r.filter),{z:A,x:I,y:z}=this.tileID.canonical,N={z:A,x:I,y:z};for(let F=0;F<g.length;F++){const Z=g.feature(F);if(w.needGeometry){const ne=o.a8(Z,!0);if(!w.filter(new o.C(this.tileID.overscaledZ),ne,this.tileID.canonical))continue}else if(!w.filter(new o.C(this.tileID.overscaledZ),Z))continue;const J=a.getId(Z,d),oe=new o.a9(Z,A,I,z,J);oe.tile=N,e.push(oe)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(e){const r=this.expirationTime;if(e.cacheControl){const a=o.aa(e.cacheControl);a["max-age"]&&(this.expirationTime=Date.now()+1e3*a["max-age"])}else e.expires&&(this.expirationTime=new Date(e.expires).getTime());if(this.expirationTime){const a=Date.now();let l=!1;if(this.expirationTime>a)l=!1;else if(r)if(this.expirationTime<r)l=!0;else{const d=this.expirationTime-r;d?this.expirationTime=a+Math.max(d,3e4):l=!0}else l=!0;l?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(e,r){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(e).length===0)return;const a=this.latestFeatureIndex.loadVTLayers();for(const l in this.buckets){if(!r.style.hasLayer(l))continue;const d=this.buckets[l],g=d.layers[0].sourceLayer||"_geojsonTileLayer",w=a[g],A=e[g];if(!w||!A||Object.keys(A).length===0)continue;d.update(A,w,this.imageAtlas&&this.imageAtlas.patternPositions||{});const I=r&&r.style&&r.style.getLayer(l);I&&(this.queryPadding=Math.max(this.queryPadding,I.queryRadius(d)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<L.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(e){this.symbolFadeHoldUntil=L.now()+e}setDependencies(e,r){const a={};for(const l of r)a[l]=!0;this.dependencies[e]=a}hasDependency(e,r){for(const a of e){const l=this.dependencies[a];if(l){for(const d of r)if(l[d])return!0}}return!1}}class dr{constructor(e,r){this.max=e,this.onRemove=r,this.reset()}reset(){for(const e in this.data)for(const r of this.data[e])r.timeout&&clearTimeout(r.timeout),this.onRemove(r.value);return this.data={},this.order=[],this}add(e,r,a){const l=e.wrapped().key;this.data[l]===void 0&&(this.data[l]=[]);const d={value:r,timeout:void 0};if(a!==void 0&&(d.timeout=setTimeout(()=>{this.remove(e,d)},a)),this.data[l].push(d),this.order.push(l),this.order.length>this.max){const g=this._getAndRemoveByKey(this.order[0]);g&&this.onRemove(g)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){const r=this.data[e].shift();return r.timeout&&clearTimeout(r.timeout),this.data[e].length===0&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),r.value}getByKey(e){const r=this.data[e];return r?r[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,r){if(!this.has(e))return this;const a=e.wrapped().key,l=r===void 0?0:this.data[a].indexOf(r),d=this.data[a][l];return this.data[a].splice(l,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(e){for(this.max=e;this.order.length>this.max;){const r=this._getAndRemoveByKey(this.order[0]);r&&this.onRemove(r)}return this}filter(e){const r=[];for(const a in this.data)for(const l of this.data[a])e(l.value)||r.push(l);for(const a of r)this.remove(a.value.tileID,a)}}class Wt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,a){const l=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][l]=this.stateChanges[e][l]||{},o.e(this.stateChanges[e][l],a),this.deletedStates[e]===null){this.deletedStates[e]={};for(const d in this.state[e])d!==l&&(this.deletedStates[e][d]=null)}else if(this.deletedStates[e]&&this.deletedStates[e][l]===null){this.deletedStates[e][l]={};for(const d in this.state[e][l])a[d]||(this.deletedStates[e][l][d]=null)}else for(const d in a)this.deletedStates[e]&&this.deletedStates[e][l]&&this.deletedStates[e][l][d]===null&&delete this.deletedStates[e][l][d]}removeFeatureState(e,r,a){if(this.deletedStates[e]===null)return;const l=String(r);if(this.deletedStates[e]=this.deletedStates[e]||{},a&&r!==void 0)this.deletedStates[e][l]!==null&&(this.deletedStates[e][l]=this.deletedStates[e][l]||{},this.deletedStates[e][l][a]=null);else if(r!==void 0)if(this.stateChanges[e]&&this.stateChanges[e][l])for(a in this.deletedStates[e][l]={},this.stateChanges[e][l])this.deletedStates[e][l][a]=null;else this.deletedStates[e][l]=null;else this.deletedStates[e]=null}getState(e,r){const a=String(r),l=o.e({},(this.state[e]||{})[a],(this.stateChanges[e]||{})[a]);if(this.deletedStates[e]===null)return{};if(this.deletedStates[e]){const d=this.deletedStates[e][r];if(d===null)return{};for(const g in d)delete l[g]}return l}initializeTileState(e,r){e.setFeatureState(this.state,r)}coalesceChanges(e,r){const a={};for(const l in this.stateChanges){this.state[l]=this.state[l]||{};const d={};for(const g in this.stateChanges[l])this.state[l][g]||(this.state[l][g]={}),o.e(this.state[l][g],this.stateChanges[l][g]),d[g]=this.state[l][g];a[l]=d}for(const l in this.deletedStates){this.state[l]=this.state[l]||{};const d={};if(this.deletedStates[l]===null)for(const g in this.state[l])d[g]={},this.state[l][g]={};else for(const g in this.deletedStates[l]){if(this.deletedStates[l][g]===null)this.state[l][g]={};else for(const w of Object.keys(this.deletedStates[l][g]))delete this.state[l][g][w];d[g]=this.state[l][g]}a[l]=a[l]||{},o.e(a[l],d)}if(this.stateChanges={},this.deletedStates={},Object.keys(a).length!==0)for(const l in e)e[l].setFeatureState(a,r)}}const Pt=89.25;function Bt(h,e){const r=o.ae(e.lat,-85.051129,o.af);return new o.P(o.U(e.lng)*h,o.S(r)*h)}function xt(h,e){return new o.$(e.x/h,e.y/h).toLngLat()}function ke(h){return h.cameraToCenterDistance*Math.min(.85*Math.tan(o.ab(90-h.pitch)),Math.tan(o.ab(Pt-h.pitch)))}function K(h,e){const r=h.canonical,a=e/o.ac(r.z),l=r.x+Math.pow(2,r.z)*h.wrap,d=o.ad(new Float64Array(16));return o.L(d,d,[l*a,r.y*a,0]),o.M(d,d,[a/o.Z,a/o.Z,1]),d}function Q(h,e,r,a,l){const d=o.$.fromLngLat(h,e),g=l*o.ag(1,h.lat),w=g*Math.cos(o.ab(r)),A=Math.sqrt(g*g-w*w),I=A*Math.sin(o.ab(-a)),z=A*Math.cos(o.ab(-a));return new o.$(d.x+I,d.y+z,d.z+w)}function te(h,e,r){const a=e.intersectsFrustum(h);if(!r)return a;const l=e.intersectsPlane(r);return a===0||l===0?0:a===2&&l===2?2:1}function he(h,e,r){let a=0;const l=(r-e)/10;for(let d=0;d<10;d++)a+=l*Math.pow(Math.cos(e+(d+.5)/10*(r-e)),h);return a}function xe(h,e){return function(r,a,l,d,g){const w=2*((h-1)/o.ah(Math.cos(o.ab(Pt-g))/Math.cos(o.ab(Pt)))-1),A=Math.acos(l/d),I=2*he(w-1,0,o.ab(g/2)),z=Math.min(o.ab(Pt),A+o.ab(g/2)),N=he(w-1,Math.min(z,A-o.ab(g/2)),z),F=Math.atan(a/l),Z=Math.hypot(a,l);let J=r;return J+=o.ah(d/Z/Math.max(.5,Math.cos(o.ab(g/2)))),J+=w*o.ah(Math.cos(F))/2,J-=o.ah(Math.max(1,N/I/e))/2,J}}const Y=xe(9.314,3);function Pe(h,e){const r=(e.roundZoom?Math.round:Math.floor)(h.zoom+o.ah(h.tileSize/e.tileSize));return Math.max(0,r)}function Ae(h,e){const r=h.getCameraFrustum(),a=h.getClippingPlane(),l=h.screenPointToMercatorCoordinate(h.getCameraPoint()),d=o.$.fromLngLat(h.center,h.elevation);l.z=d.z+Math.cos(h.pitchInRadians)*h.cameraToCenterDistance/h.worldSize;const g=h.getCoveringTilesDetailsProvider(),w=g.allowVariableZoom(h,e),A=Pe(h,e),I=e.minzoom||0,z=e.maxzoom!==void 0?e.maxzoom:h.maxZoom,N=Math.min(Math.max(0,A),z),F=Math.pow(2,N),Z=[F*l.x,F*l.y,0],J=[F*d.x,F*d.y,0],oe=Math.hypot(d.x-l.x,d.y-l.y),ne=Math.abs(d.z-l.z),se=Math.hypot(oe,ne),pe=be=>({zoom:0,x:0,y:0,wrap:be,fullyVisible:!1}),_e=[],ye=[];if(h.renderWorldCopies&&g.allowWorldCopies())for(let be=1;be<=3;be++)_e.push(pe(-be)),_e.push(pe(be));for(_e.push(pe(0));_e.length>0;){const be=_e.pop(),Ce=be.x,we=be.y;let Re=be.fullyVisible;const We={x:Ce,y:we,z:be.zoom},Fe=g.getTileAABB(We,be.wrap,h.elevation,e);if(!Re){const dt=te(r,Fe,a);if(dt===0)continue;Re=dt===2}const Ne=g.distanceToTile2d(l.x,l.y,We,Fe);let je=A;w&&(je=(e.calculateTileZoom||Y)(h.zoom+o.ah(h.tileSize/e.tileSize),Ne,ne,se,h.fov)),je=(e.roundZoom?Math.round:Math.floor)(je),je=Math.max(0,je);const mt=Math.min(je,z);if(be.wrap=g.getWrap(d,We,be.wrap),be.zoom>=mt){if(be.zoom<I)continue;const dt=N-be.zoom,tt=Z[0]-.5-(Ce<<dt),kt=Z[1]-.5-(we<<dt),Xt=e.reparseOverscaled?Math.max(be.zoom,je):be.zoom;ye.push({tileID:new o.Y(be.zoom===z?Xt:be.zoom,be.wrap,be.zoom,Ce,we),distanceSq:o.ai([J[0]-.5-Ce,J[1]-.5-we]),tileDistanceToCamera:Math.sqrt(tt*tt+kt*kt)})}else for(let dt=0;dt<4;dt++)_e.push({zoom:be.zoom+1,x:(Ce<<1)+dt%2,y:(we<<1)+(dt>>1),wrap:be.wrap,fullyVisible:Re})}return ye.sort((be,Ce)=>be.distanceSq-Ce.distanceSq).map(be=>be.tileID)}class Te extends o.E{constructor(e,r,a){super(),this.id=e,this.dispatcher=a,this.on("data",l=>this._dataHandler(l)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((l,d,g,w)=>{const A=new(ii(d.type))(l,d,g,w);if(A.id!==l)throw new Error(`Expected Source id to be ${l} instead of ${A.id}`);return A})(e,r,a,this),this._tiles={},this._cache=new dr(0,l=>this._unloadTile(l)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Wt,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}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 e in this._tiles){const r=this._tiles[e];if(r.state!=="loaded"&&r.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,a){return o._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,a)}catch(l){e.state="errored",l.status!==404?this._source.fire(new o.k(l,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new o.l("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const r in this._tiles){const a=this._tiles[r];a.upload(e),a.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(ze).map(e=>e.key)}getRenderableIds(e){const r=[];for(const a in this._tiles)this._isIdRenderable(a,e)&&r.push(this._tiles[a]);return e?r.sort((a,l)=>{const d=a.tileID,g=l.tileID,w=new o.P(d.canonical.x,d.canonical.y)._rotate(-this.transform.bearingInRadians),A=new o.P(g.canonical.x,g.canonical.y)._rotate(-this.transform.bearingInRadians);return d.overscaledZ-g.overscaledZ||A.y-w.y||A.x-w.x}).map(a=>a.tileID.key):r.map(a=>a.tileID).sort(ze).map(a=>a.key)}hasRenderableParent(e){const r=this.findLoadedParent(e,0);return!!r&&this._isIdRenderable(r.tileID.key)}_isIdRenderable(e,r){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(r||!this._tiles[e].holdingForFade())}reload(e){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const r in this._tiles)(e||this._tiles[r].state!=="errored")&&this._reloadTile(r,"reloading")}}_reloadTile(e,r){return o._(this,void 0,void 0,function*(){const a=this._tiles[e];a&&(a.state!=="loading"&&(a.state=r),yield this._loadTile(a,e,r))})}_tileLoaded(e,r,a){e.timeAdded=L.now(),a==="expired"&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),this.getSource().type==="raster-dem"&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new o.l("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){const r=this.getRenderableIds();for(let l=0;l<r.length;l++){const d=r[l];if(e.neighboringTiles&&e.neighboringTiles[d]){const g=this.getTileByID(d);a(e,g),a(g,e)}}function a(l,d){l.needsHillshadePrepare=!0,l.needsTerrainPrepare=!0;let g=d.tileID.canonical.x-l.tileID.canonical.x;const w=d.tileID.canonical.y-l.tileID.canonical.y,A=Math.pow(2,l.tileID.canonical.z),I=d.tileID.key;g===0&&w===0||Math.abs(w)>1||(Math.abs(g)>1&&(Math.abs(g+A)===1?g+=A:Math.abs(g-A)===1&&(g-=A)),d.dem&&l.dem&&(l.dem.backfillBorder(d.dem,g,w),l.neighboringTiles&&l.neighboringTiles[I]&&(l.neighboringTiles[I].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,r,a,l){for(const d in this._tiles){let g=this._tiles[d];if(l[d]||!g.hasData()||g.tileID.overscaledZ<=r||g.tileID.overscaledZ>a)continue;let w=g.tileID;for(;g&&g.tileID.overscaledZ>r+1;){const I=g.tileID.scaledTo(g.tileID.overscaledZ-1);g=this._tiles[I.key],g&&g.hasData()&&(w=I)}let A=w;for(;A.overscaledZ>r;)if(A=A.scaledTo(A.overscaledZ-1),e[A.key]||e[A.canonical.key]){l[w.key]=w;break}}}findLoadedParent(e,r){if(e.key in this._loadedParentTiles){const a=this._loadedParentTiles[e.key];return a&&a.tileID.overscaledZ>=r?a:null}for(let a=e.overscaledZ-1;a>=r;a--){const l=e.scaledTo(a),d=this._getLoadedTile(l);if(d)return d}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){const r=this._tiles[e.key];return r&&r.hasData()?r:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){const r=Math.ceil(e.width/this._source.tileSize)+1,a=Math.ceil(e.height/this._source.tileSize)+1,l=Math.floor(r*a*(this._maxTileCacheZoomLevels===null?o.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),d=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,l):l;this._cache.setMaxSize(d)}handleWrapJump(e){const r=Math.round((e-(this._prevLng===void 0?e:this._prevLng))/360);if(this._prevLng=e,r){const a={};for(const l in this._tiles){const d=this._tiles[l];d.tileID=d.tileID.unwrapTo(d.tileID.wrap+r),a[d.tileID.key]=d}this._tiles=a;for(const l in this._timers)clearTimeout(this._timers[l]),delete this._timers[l];for(const l in this._tiles)this._setTileReloadTimer(l,this._tiles[l])}}_updateCoveredAndRetainedTiles(e,r,a,l,d,g){const w={},A={},I=Object.keys(e),z=L.now();for(const N of I){const F=e[N],Z=this._tiles[N];if(!Z||Z.fadeEndTime!==0&&Z.fadeEndTime<=z)continue;const J=this.findLoadedParent(F,r),oe=this.findLoadedSibling(F),ne=J||oe||null;ne&&(this._addTile(ne.tileID),w[ne.tileID.key]=ne.tileID),A[N]=F}this._retainLoadedChildren(A,l,a,e);for(const N in w)e[N]||(this._coveredTiles[N]=!0,e[N]=w[N]);if(g){const N={},F={};for(const Z of d)this._tiles[Z.key].hasData()?N[Z.key]=Z:F[Z.key]=Z;for(const Z in F){const J=F[Z].children(this._source.maxzoom);this._tiles[J[0].key]&&this._tiles[J[1].key]&&this._tiles[J[2].key]&&this._tiles[J[3].key]&&(N[J[0].key]=e[J[0].key]=J[0],N[J[1].key]=e[J[1].key]=J[1],N[J[2].key]=e[J[2].key]=J[2],N[J[3].key]=e[J[3].key]=J[3],delete F[Z])}for(const Z in F){const J=F[Z],oe=this.findLoadedParent(J,this._source.minzoom),ne=this.findLoadedSibling(J),se=oe||ne||null;if(se){N[se.tileID.key]=e[se.tileID.key]=se.tileID;for(const pe in N)N[pe].isChildOf(se.tileID)&&delete N[pe]}}for(const Z in this._tiles)N[Z]||(this._coveredTiles[Z]=!0)}}update(e,r){if(!this._sourceLoaded||this._paused)return;let a;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?a=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(z=>new o.Y(z.canonical.z,z.wrap,z.canonical.z,z.canonical.x,z.canonical.y)):(a=Ae(e,{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:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(a=a.filter(z=>this._source.hasTile(z)))):a=[];const l=Pe(e,this._source),d=Math.max(l-Te.maxOverzooming,this._source.minzoom),g=Math.max(l+Te.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const z={};for(const N of a)if(N.canonical.z>this._source.minzoom){const F=N.scaledTo(N.canonical.z-1);z[F.key]=F;const Z=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));z[Z.key]=Z}a=a.concat(Object.values(z))}const w=a.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,w&&this.fire(new o.l("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const A=this._updateRetainedTiles(a,l);Me(this._source.type)&&this._updateCoveredAndRetainedTiles(A,d,g,l,a,r);for(const z in A)this._tiles[z].clearFadeHold();const I=o.aj(this._tiles,A);for(const z of I){const N=this._tiles[z];N.hasSymbolBuckets&&!N.holdingForFade()?N.setHoldDuration(this.map._fadeDuration):N.hasSymbolBuckets&&!N.symbolFadeFinished()||this._removeTile(z)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,r){var a;const l={},d={},g=Math.max(r-Te.maxOverzooming,this._source.minzoom),w=Math.max(r+Te.maxUnderzooming,this._source.minzoom),A={};for(const I of e){const z=this._addTile(I);l[I.key]=I,z.hasData()||r<this._source.maxzoom&&(A[I.key]=I)}this._retainLoadedChildren(A,r,w,l);for(const I of e){let z=this._tiles[I.key];if(z.hasData())continue;if(r+1>this._source.maxzoom){const F=I.children(this._source.maxzoom)[0],Z=this.getTile(F);if(Z&&Z.hasData()){l[F.key]=F;continue}}else{const F=I.children(this._source.maxzoom);if(l[F[0].key]&&l[F[1].key]&&l[F[2].key]&&l[F[3].key])continue}let N=z.wasRequested();for(let F=I.overscaledZ-1;F>=g;--F){const Z=I.scaledTo(F);if(d[Z.key])break;if(d[Z.key]=!0,z=this.getTile(Z),!z&&N&&(z=this._addTile(Z)),z){const J=z.hasData();if((J||!(!((a=this.map)===null||a===void 0)&&a.cancelPendingTileRequestsWhileZooming)||N)&&(l[Z.key]=Z),N=z.wasRequested(),J)break}}}return l}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const e in this._tiles){const r=[];let a,l=this._tiles[e].tileID;for(;l.overscaledZ>0;){if(l.key in this._loadedParentTiles){a=this._loadedParentTiles[l.key];break}r.push(l.key);const d=l.scaledTo(l.overscaledZ-1);if(a=this._getLoadedTile(d),a)break;l=d}for(const d of r)this._loadedParentTiles[d]=a}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const e in this._tiles){const r=this._tiles[e].tileID,a=this._getLoadedTile(r);this._loadedSiblingTiles[r.key]=a}}_addTile(e){let r=this._tiles[e.key];if(r)return r;r=this._cache.getAndRemove(e),r&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));const a=r;return r||(r=new gi(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,a||this._source.fire(new o.l("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,r){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);const a=r.getExpiryTimeout();a&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},a))}refreshTiles(e){for(const r in this._tiles)this._isIdRenderable(r)&&e.some(a=>a.equals(this._tiles[r].tileID.canonical))&&this._reloadTile(r,"expired")}_removeTile(e){const r=this._tiles[e];r&&(r.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),r.uses>0||(r.hasData()&&r.state!=="reloading"?this._cache.add(r.tileID,r,r.getExpiryTimeout()):(r.aborted=!0,this._abortTile(r),this._unloadTile(r))))}_dataHandler(e){const r=e.sourceDataType;e.dataType==="source"&&r==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&e.dataType==="source"&&r==="content"&&(this.reload(e.sourceDataChanged),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const e in this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,a){const l=[],d=this.transform;if(!d)return l;const g=a?d.getCameraQueryGeometry(e):e,w=e.map(J=>d.screenPointToMercatorCoordinate(J,this.terrain)),A=g.map(J=>d.screenPointToMercatorCoordinate(J,this.terrain)),I=this.getIds();let z=1/0,N=1/0,F=-1/0,Z=-1/0;for(const J of A)z=Math.min(z,J.x),N=Math.min(N,J.y),F=Math.max(F,J.x),Z=Math.max(Z,J.y);for(let J=0;J<I.length;J++){const oe=this._tiles[I[J]];if(oe.holdingForFade())continue;const ne=d.getCoveringTilesDetailsProvider().allowWorldCopies()?oe.tileID:oe.tileID.unwrapTo(0),se=Math.pow(2,d.zoom-oe.tileID.overscaledZ),pe=r*oe.queryPadding*o.Z/oe.tileSize/se,_e=[ne.getTilePoint(new o.$(z,N)),ne.getTilePoint(new o.$(F,Z))];if(_e[0].x-pe<o.Z&&_e[0].y-pe<o.Z&&_e[1].x+pe>=0&&_e[1].y+pe>=0){const ye=w.map(Ce=>ne.getTilePoint(Ce)),be=A.map(Ce=>ne.getTilePoint(Ce));l.push({tile:oe,tileID:ne,queryGeometry:ye,cameraQueryGeometry:be,scale:se})}}return l}getVisibleCoordinates(e){const r=this.getRenderableIds(e).map(a=>this._tiles[a].tileID);return this.transform&&this.transform.populateCache(r),r}hasTransition(){if(this._source.hasTransition())return!0;if(Me(this._source.type)){const e=L.now();for(const r in this._tiles)if(this._tiles[r].fadeEndTime>=e)return!0}return!1}setFeatureState(e,r,a){this._state.updateState(e=e||"_geojsonTileLayer",r,a)}removeFeatureState(e,r,a){this._state.removeFeatureState(e=e||"_geojsonTileLayer",r,a)}getFeatureState(e,r){return this._state.getState(e=e||"_geojsonTileLayer",r)}setDependencies(e,r,a){const l=this._tiles[e];l&&l.setDependencies(r,a)}reloadTilesForDependencies(e,r){for(const a in this._tiles)this._tiles[a].hasDependency(e,r)&&this._reloadTile(a,"reloading");this._cache.filter(a=>!a.hasDependency(e,r))}}function ze(h,e){const r=Math.abs(2*h.wrap)-+(h.wrap<0),a=Math.abs(2*e.wrap)-+(e.wrap<0);return h.overscaledZ-e.overscaledZ||a-r||e.canonical.y-h.canonical.y||e.canonical.x-h.canonical.x}function Me(h){return h==="raster"||h==="image"||h==="video"}Te.maxOverzooming=10,Te.maxUnderzooming=3;class Qe{constructor(e,r){this.reset(e,r)}reset(e,r){this.points=e||[],this._distances=[0];for(let a=1;a<this.points.length;a++)this._distances[a]=this._distances[a-1]+this.points[a].dist(this.points[a-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(r||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(e){if(this.points.length===1)return this.points[0];e=o.ae(e,0,1);let r=1,a=this._distances[r];const l=e*this.paddedLength+this.padding;for(;a<l&&r<this._distances.length;)a=this._distances[++r];const d=r-1,g=this._distances[d],w=a-g,A=w>0?(l-g)/w:0;return this.points[d].mult(1-A).add(this.points[r].mult(A))}}function ut(h,e){let r=!0;return h==="always"||h!=="never"&&e!=="never"||(r=!1),r}class gt{constructor(e,r,a){const l=this.boxCells=[],d=this.circleCells=[];this.xCellCount=Math.ceil(e/a),this.yCellCount=Math.ceil(r/a);for(let g=0;g<this.xCellCount*this.yCellCount;g++)l.push([]),d.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=e,this.height=r,this.xScale=this.xCellCount/e,this.yScale=this.yCellCount/r,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(e,r,a,l,d){this._forEachCell(r,a,l,d,this._insertBoxCell,this.boxUid++),this.boxKeys.push(e),this.bboxes.push(r),this.bboxes.push(a),this.bboxes.push(l),this.bboxes.push(d)}insertCircle(e,r,a,l){this._forEachCell(r-l,a-l,r+l,a+l,this._insertCircleCell,this.circleUid++),this.circleKeys.push(e),this.circles.push(r),this.circles.push(a),this.circles.push(l)}_insertBoxCell(e,r,a,l,d,g){this.boxCells[d].push(g)}_insertCircleCell(e,r,a,l,d,g){this.circleCells[d].push(g)}_query(e,r,a,l,d,g,w){if(a<0||e>this.width||l<0||r>this.height)return[];const A=[];if(e<=0&&r<=0&&this.width<=a&&this.height<=l){if(d)return[{key:null,x1:e,y1:r,x2:a,y2:l}];for(let I=0;I<this.boxKeys.length;I++)A.push({key:this.boxKeys[I],x1:this.bboxes[4*I],y1:this.bboxes[4*I+1],x2:this.bboxes[4*I+2],y2:this.bboxes[4*I+3]});for(let I=0;I<this.circleKeys.length;I++){const z=this.circles[3*I],N=this.circles[3*I+1],F=this.circles[3*I+2];A.push({key:this.circleKeys[I],x1:z-F,y1:N-F,x2:z+F,y2:N+F})}}else this._forEachCell(e,r,a,l,this._queryCell,A,{hitTest:d,overlapMode:g,seenUids:{box:{},circle:{}}},w);return A}query(e,r,a,l){return this._query(e,r,a,l,!1,null)}hitTest(e,r,a,l,d,g){return this._query(e,r,a,l,!0,d,g).length>0}hitTestCircle(e,r,a,l,d){const g=e-a,w=e+a,A=r-a,I=r+a;if(w<0||g>this.width||I<0||A>this.height)return!1;const z=[];return this._forEachCell(g,A,w,I,this._queryCellCircle,z,{hitTest:!0,overlapMode:l,circle:{x:e,y:r,radius:a},seenUids:{box:{},circle:{}}},d),z.length>0}_queryCell(e,r,a,l,d,g,w,A){const{seenUids:I,hitTest:z,overlapMode:N}=w,F=this.boxCells[d];if(F!==null){const J=this.bboxes;for(const oe of F)if(!I.box[oe]){I.box[oe]=!0;const ne=4*oe,se=this.boxKeys[oe];if(e<=J[ne+2]&&r<=J[ne+3]&&a>=J[ne+0]&&l>=J[ne+1]&&(!A||A(se))&&(!z||!ut(N,se.overlapMode))&&(g.push({key:se,x1:J[ne],y1:J[ne+1],x2:J[ne+2],y2:J[ne+3]}),z))return!0}}const Z=this.circleCells[d];if(Z!==null){const J=this.circles;for(const oe of Z)if(!I.circle[oe]){I.circle[oe]=!0;const ne=3*oe,se=this.circleKeys[oe];if(this._circleAndRectCollide(J[ne],J[ne+1],J[ne+2],e,r,a,l)&&(!A||A(se))&&(!z||!ut(N,se.overlapMode))){const pe=J[ne],_e=J[ne+1],ye=J[ne+2];if(g.push({key:se,x1:pe-ye,y1:_e-ye,x2:pe+ye,y2:_e+ye}),z)return!0}}}return!1}_queryCellCircle(e,r,a,l,d,g,w,A){const{circle:I,seenUids:z,overlapMode:N}=w,F=this.boxCells[d];if(F!==null){const J=this.bboxes;for(const oe of F)if(!z.box[oe]){z.box[oe]=!0;const ne=4*oe,se=this.boxKeys[oe];if(this._circleAndRectCollide(I.x,I.y,I.radius,J[ne+0],J[ne+1],J[ne+2],J[ne+3])&&(!A||A(se))&&!ut(N,se.overlapMode))return g.push(!0),!0}}const Z=this.circleCells[d];if(Z!==null){const J=this.circles;for(const oe of Z)if(!z.circle[oe]){z.circle[oe]=!0;const ne=3*oe,se=this.circleKeys[oe];if(this._circlesCollide(J[ne],J[ne+1],J[ne+2],I.x,I.y,I.radius)&&(!A||A(se))&&!ut(N,se.overlapMode))return g.push(!0),!0}}}_forEachCell(e,r,a,l,d,g,w,A){const I=this._convertToXCellCoord(e),z=this._convertToYCellCoord(r),N=this._convertToXCellCoord(a),F=this._convertToYCellCoord(l);for(let Z=I;Z<=N;Z++)for(let J=z;J<=F;J++)if(d.call(this,e,r,a,l,this.xCellCount*J+Z,g,w,A))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,r,a,l,d,g){const w=l-e,A=d-r,I=a+g;return I*I>w*w+A*A}_circleAndRectCollide(e,r,a,l,d,g,w){const A=(g-l)/2,I=Math.abs(e-(l+A));if(I>A+a)return!1;const z=(w-d)/2,N=Math.abs(r-(d+z));if(N>z+a)return!1;if(I<=A||N<=z)return!0;const F=I-A,Z=N-z;return F*F+Z*Z<=a*a}}function It(h,e,r){const a=o.K();if(!h){const{vecSouth:N,vecEast:F}=Vt(e),Z=D();Z[0]=F[0],Z[1]=F[1],Z[2]=N[0],Z[3]=N[1],l=Z,(z=(g=(d=Z)[0])*(I=d[3])-(A=d[2])*(w=d[1]))&&(l[0]=I*(z=1/z),l[1]=-w*z,l[2]=-A*z,l[3]=g*z),a[0]=Z[0],a[1]=Z[1],a[4]=Z[2],a[5]=Z[3]}var l,d,g,w,A,I,z;return o.M(a,a,[1/r,1/r,1]),a}function jt(h,e,r,a){if(h){const l=o.K();if(!e){const{vecSouth:d,vecEast:g}=Vt(r);l[0]=g[0],l[1]=g[1],l[4]=d[0],l[5]=d[1]}return o.M(l,l,[a,a,1]),l}return r.pixelsToClipSpaceMatrix}function Vt(h){const e=Math.cos(h.rollInRadians),r=Math.sin(h.rollInRadians),a=Math.cos(h.pitchInRadians),l=Math.cos(h.bearingInRadians),d=Math.sin(h.bearingInRadians),g=o.ao();g[0]=-l*a*r-d*e,g[1]=-d*a*r+l*e;const w=o.ap(g);w<1e-9?o.aq(g):o.ar(g,g,1/w);const A=o.ao();A[0]=l*a*e-d*r,A[1]=d*a*e+l*r;const I=o.ap(A);return I<1e-9?o.aq(A):o.ar(A,A,1/I),{vecEast:A,vecSouth:g}}function Ue(h,e,r,a){let l;a?(l=[h,e,a(h,e),1],o.at(l,l,r)):(l=[h,e,0,1],_n(l,l,r));const d=l[3];return{point:new o.P(l[0]/d,l[1]/d),signedDistanceFromCamera:d,isOccluded:!1}}function cr(h,e){return .5+h/e*.5}function Yt(h,e){return h.x>=-e[0]&&h.x<=e[0]&&h.y>=-e[1]&&h.y<=e[1]}function sr(h,e,r,a,l,d,g,w,A,I,z,N,F){const Z=r?h.textSizeData:h.iconSizeData,J=o.ak(Z,e.transform.zoom),oe=[256/e.width*2+1,256/e.height*2+1],ne=r?h.text.dynamicLayoutVertexArray:h.icon.dynamicLayoutVertexArray;ne.clear();const se=h.lineVertexArray,pe=r?h.text.placedSymbolArray:h.icon.placedSymbolArray,_e=e.transform.width/e.transform.height;let ye=!1;for(let be=0;be<pe.length;be++){const Ce=pe.get(be);if(Ce.hidden||Ce.writingMode===o.al.vertical&&!ye){Li(Ce.numGlyphs,ne);continue}ye=!1;const we=new o.P(Ce.anchorX,Ce.anchorY),Re={getElevation:F,pitchedLabelPlaneMatrix:a,lineVertexArray:se,pitchWithMap:d,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:e.transform,tileAnchorPoint:we,unwrappedTileID:A,width:I,height:z,translation:N},We=Gt(Ce.anchorX,Ce.anchorY,Re);if(!Yt(We.point,oe)){Li(Ce.numGlyphs,ne);continue}const Fe=cr(e.transform.cameraToCenterDistance,We.signedDistanceFromCamera),Ne=o.am(Z,J,Ce),je=d?Ne*e.transform.getPitchedTextCorrection(Ce.anchorX,Ce.anchorY,A)/Fe:Ne*Fe,mt=Rt({projectionContext:Re,pitchedLabelPlaneMatrixInverse:l,symbol:Ce,fontSize:je,flip:!1,keepUpright:g,glyphOffsetArray:h.glyphOffsetArray,dynamicLayoutVertexArray:ne,aspectRatio:_e,rotateToLine:w});ye=mt.useVertical,(mt.notEnoughRoom||ye||mt.needsFlipping&&Rt({projectionContext:Re,pitchedLabelPlaneMatrixInverse:l,symbol:Ce,fontSize:je,flip:!0,keepUpright:g,glyphOffsetArray:h.glyphOffsetArray,dynamicLayoutVertexArray:ne,aspectRatio:_e,rotateToLine:w}).notEnoughRoom)&&Li(Ce.numGlyphs,ne)}r?h.text.dynamicLayoutVertexBuffer.updateData(ne):h.icon.dynamicLayoutVertexBuffer.updateData(ne)}function Ot(h,e,r,a,l,d,g,w){const A=d.glyphStartIndex+d.numGlyphs,I=d.lineStartIndex,z=d.lineStartIndex+d.lineLength,N=e.getoffsetX(d.glyphStartIndex),F=e.getoffsetX(A-1),Z=yn(h*N,r,a,l,d.segment,I,z,w,g);if(!Z)return null;const J=yn(h*F,r,a,l,d.segment,I,z,w,g);return J?w.projectionCache.anyProjectionOccluded?null:{first:Z,last:J}:null}function Xe(h,e,r,a){return h===o.al.horizontal&&Math.abs(r.y-e.y)>Math.abs(r.x-e.x)*a?{useVertical:!0}:(h===o.al.vertical?e.y<r.y:e.x>r.x)?{needsFlipping:!0}:null}function Rt(h){const{projectionContext:e,pitchedLabelPlaneMatrixInverse:r,symbol:a,fontSize:l,flip:d,keepUpright:g,glyphOffsetArray:w,dynamicLayoutVertexArray:A,aspectRatio:I,rotateToLine:z}=h,N=l/24,F=a.lineOffsetX*N,Z=a.lineOffsetY*N;let J;if(a.numGlyphs>1){const oe=a.glyphStartIndex+a.numGlyphs,ne=a.lineStartIndex,se=a.lineStartIndex+a.lineLength,pe=Ot(N,w,F,Z,d,a,z,e);if(!pe)return{notEnoughRoom:!0};const _e=yi(pe.first.point.x,pe.first.point.y,e,r),ye=yi(pe.last.point.x,pe.last.point.y,e,r);if(g&&!d){const be=Xe(a.writingMode,_e,ye,I);if(be)return be}J=[pe.first];for(let be=a.glyphStartIndex+1;be<oe-1;be++)J.push(yn(N*w.getoffsetX(be),F,Z,d,a.segment,ne,se,e,z));J.push(pe.last)}else{if(g&&!d){const ne=mr(e.tileAnchorPoint.x,e.tileAnchorPoint.y,e).point,se=a.lineStartIndex+a.segment+1,pe=new o.P(e.lineVertexArray.getx(se),e.lineVertexArray.gety(se)),_e=mr(pe.x,pe.y,e),ye=_e.signedDistanceFromCamera>0?_e.point:Zt(e.tileAnchorPoint,pe,ne,1,e),be=yi(ne.x,ne.y,e,r),Ce=yi(ye.x,ye.y,e,r),we=Xe(a.writingMode,be,Ce,I);if(we)return we}const oe=yn(N*w.getoffsetX(a.glyphStartIndex),F,Z,d,a.segment,a.lineStartIndex,a.lineStartIndex+a.lineLength,e,z);if(!oe||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};J=[oe]}for(const oe of J)o.as(A,oe.point,oe.angle);return{}}function Zt(h,e,r,a,l){const d=h.add(h.sub(e)._unit()),g=mr(d.x,d.y,l).point,w=r.sub(g);return r.add(w._mult(a/w.mag()))}function Ar(h,e,r){const a=e.projectionCache;if(a.projections[h])return a.projections[h];const l=new o.P(e.lineVertexArray.getx(h),e.lineVertexArray.gety(h)),d=mr(l.x,l.y,e);if(d.signedDistanceFromCamera>0)return a.projections[h]=d.point,a.anyProjectionOccluded=a.anyProjectionOccluded||d.isOccluded,d.point;const g=h-r.direction;return Zt(r.distanceFromAnchor===0?e.tileAnchorPoint:new o.P(e.lineVertexArray.getx(g),e.lineVertexArray.gety(g)),l,r.previousVertex,r.absOffsetX-r.distanceFromAnchor+1,e)}function mr(h,e,r){const a=h+r.translation[0],l=e+r.translation[1];let d;return r.pitchWithMap?(d=Ue(a,l,r.pitchedLabelPlaneMatrix,r.getElevation),d.isOccluded=!1):(d=r.transform.projectTileCoordinates(a,l,r.unwrappedTileID,r.getElevation),d.point.x=(.5*d.point.x+.5)*r.width,d.point.y=(.5*-d.point.y+.5)*r.height),d}function yi(h,e,r,a){if(r.pitchWithMap){const l=[h,e,0,1];return o.at(l,l,a),r.transform.projectTileCoordinates(l[0]/l[3],l[1]/l[3],r.unwrappedTileID,r.getElevation).point}return{x:h/r.width*2-1,y:e/r.height*2-1}}function Gt(h,e,r){return r.transform.projectTileCoordinates(h,e,r.unwrappedTileID,r.getElevation)}function Oi(h,e,r){return h._unit()._perp()._mult(e*r)}function co(h,e,r,a,l,d,g,w,A){if(w.projectionCache.offsets[h])return w.projectionCache.offsets[h];const I=r.add(e);if(h+A.direction<a||h+A.direction>=l)return w.projectionCache.offsets[h]=I,I;const z=Ar(h+A.direction,w,A),N=Oi(z.sub(r),g,A.direction),F=r.add(N),Z=z.add(N);return w.projectionCache.offsets[h]=o.au(d,I,F,Z)||I,w.projectionCache.offsets[h]}function yn(h,e,r,a,l,d,g,w,A){const I=a?h-e:h+e;let z=I>0?1:-1,N=0;a&&(z*=-1,N=Math.PI),z<0&&(N+=Math.PI);let F,Z=z>0?d+l:d+l+1;w.projectionCache.cachedAnchorPoint?F=w.projectionCache.cachedAnchorPoint:(F=mr(w.tileAnchorPoint.x,w.tileAnchorPoint.y,w).point,w.projectionCache.cachedAnchorPoint=F);let J,oe,ne=F,se=F,pe=0,_e=0;const ye=Math.abs(I),be=[];let Ce;for(;pe+_e<=ye;){if(Z+=z,Z<d||Z>=g)return null;pe+=_e,se=ne,oe=J;const We={absOffsetX:ye,direction:z,distanceFromAnchor:pe,previousVertex:se};if(ne=Ar(Z,w,We),r===0)be.push(se),Ce=ne.sub(se);else{let Fe;const Ne=ne.sub(se);Fe=Ne.mag()===0?Oi(Ar(Z+z,w,We).sub(ne),r,z):Oi(Ne,r,z),oe||(oe=se.add(Fe)),J=co(Z,Fe,ne,d,g,oe,r,w,We),be.push(oe),Ce=J.sub(oe)}_e=Ce.mag()}const we=Ce._mult((ye-pe)/_e)._add(oe||se),Re=N+Math.atan2(ne.y-se.y,ne.x-se.x);return be.push(we),{point:we,angle:A?Re:0,path:be}}const Tn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Li(h,e){for(let r=0;r<h;r++){const a=e.length;e.resize(a+4),e.float32.set(Tn,3*a)}}function _n(h,e,r){const a=e[0],l=e[1];return h[0]=r[0]*a+r[4]*l+r[12],h[1]=r[1]*a+r[5]*l+r[13],h[3]=r[3]*a+r[7]*l+r[15],h}const Er=100;class _i{constructor(e,r=new gt(e.width+200,e.height+200,25),a=new gt(e.width+200,e.height+200,25)){this.transform=e,this.grid=r,this.ignoredGrid=a,this.pitchFactor=Math.cos(e.pitch*Math.PI/180)*e.cameraToCenterDistance,this.screenRightBoundary=e.width+Er,this.screenBottomBoundary=e.height+Er,this.gridRightBoundary=e.width+200,this.gridBottomBoundary=e.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(e,r,a,l,d,g,w,A,I,z,N,F){const Z=this.projectAndGetPerspectiveRatio(e.anchorPointX+A[0],e.anchorPointY+A[1],d,z,F),J=a*Z.perspectiveRatio;let oe;if(g||w)oe=this._projectCollisionBox(e,J,l,d,g,w,A,Z,z,N,F);else{const Ce=Z.x+(N?N.x*J:0),we=Z.y+(N?N.y*J:0);oe={allPointsOccluded:!1,box:[Ce+e.x1*J,we+e.y1*J,Ce+e.x2*J,we+e.y2*J]}}const[ne,se,pe,_e]=oe.box,ye=g?oe.allPointsOccluded:Z.isOccluded;let be=ye;return be||(be=Z.perspectiveRatio<this.perspectiveRatioCutoff),be||(be=!this.isInsideGrid(ne,se,pe,_e)),be||r!=="always"&&this.grid.hitTest(ne,se,pe,_e,r,I)?{box:[ne,se,pe,_e],placeable:!1,offscreen:!1,occluded:ye}:{box:[ne,se,pe,_e],placeable:!0,offscreen:this.isOffscreen(ne,se,pe,_e),occluded:ye}}placeCollisionCircles(e,r,a,l,d,g,w,A,I,z,N,F,Z,J){const oe=[],ne=new o.P(r.anchorX,r.anchorY),se=this.getPerspectiveRatio(ne.x,ne.y,g,J),pe=(I?d*this.transform.getPitchedTextCorrection(r.anchorX,r.anchorY,g)/se:d*se)/o.ay,_e={getElevation:J,pitchedLabelPlaneMatrix:w,lineVertexArray:a,pitchWithMap:I,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},transform:this.transform,tileAnchorPoint:ne,unwrappedTileID:g,width:this.transform.width,height:this.transform.height,translation:Z},ye=Ot(pe,l,r.lineOffsetX*pe,r.lineOffsetY*pe,!1,r,!1,_e);let be=!1,Ce=!1,we=!0;if(ye){const Re=.5*N*se+F,We=new o.P(-100,-100),Fe=new o.P(this.screenRightBoundary,this.screenBottomBoundary),Ne=new Qe,je=ye.first,mt=ye.last;let dt=[];for(let Xt=je.path.length-1;Xt>=1;Xt--)dt.push(je.path[Xt]);for(let Xt=1;Xt<mt.path.length;Xt++)dt.push(mt.path[Xt]);const tt=2.5*Re;if(I){const Xt=this.projectPathToScreenSpace(dt,_e);dt=Xt.some(nr=>nr.signedDistanceFromCamera<=0)?[]:Xt.map(nr=>nr.point)}let kt=[];if(dt.length>0){const Xt=dt[0].clone(),nr=dt[0].clone();for(let Lr=1;Lr<dt.length;Lr++)Xt.x=Math.min(Xt.x,dt[Lr].x),Xt.y=Math.min(Xt.y,dt[Lr].y),nr.x=Math.max(nr.x,dt[Lr].x),nr.y=Math.max(nr.y,dt[Lr].y);kt=Xt.x>=We.x&&nr.x<=Fe.x&&Xt.y>=We.y&&nr.y<=Fe.y?[dt]:nr.x<We.x||Xt.x>Fe.x||nr.y<We.y||Xt.y>Fe.y?[]:o.av([dt],We.x,We.y,Fe.x,Fe.y)}for(const Xt of kt){Ne.reset(Xt,.25*Re);let nr=0;nr=Ne.length<=.5*Re?1:Math.ceil(Ne.paddedLength/tt)+1;for(let Lr=0;Lr<nr;Lr++){const _r=Lr/Math.max(nr-1,1),Rr=Ne.lerp(_r),Dr=Rr.x+Er,wr=Rr.y+Er;oe.push(Dr,wr,Re,0);const ur=Dr-Re,Qr=wr-Re,ci=Dr+Re,vi=wr+Re;if(we=we&&this.isOffscreen(ur,Qr,ci,vi),Ce=Ce||this.isInsideGrid(ur,Qr,ci,vi),e!=="always"&&this.grid.hitTestCircle(Dr,wr,Re,e,z)&&(be=!0,!A))return{circles:[],offscreen:!1,collisionDetected:be}}}}return{circles:!A&&be||!Ce||se<this.perspectiveRatioCutoff?[]:oe,offscreen:we,collisionDetected:be}}projectPathToScreenSpace(e,r){const a=function(l,d){const g=o.K();return o.an(g,d.pitchedLabelPlaneMatrix),l.map(w=>{const A=Ue(w.x,w.y,g,d.getElevation),I=d.transform.projectTileCoordinates(A.point.x,A.point.y,d.unwrappedTileID,d.getElevation);return I.point.x=(.5*I.point.x+.5)*d.width,I.point.y=(.5*-I.point.y+.5)*d.height,I})}(e,r);return function(l){let d=0,g=0,w=0,A=0;for(let I=0;I<l.length;I++)l[I].isOccluded?(w=I+1,A=0):(A++,A>g&&(g=A,d=w));return l.slice(d,d+g)}(a)}queryRenderedSymbols(e){if(e.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const r=[];let a=1/0,l=1/0,d=-1/0,g=-1/0;for(const z of e){const N=new o.P(z.x+Er,z.y+Er);a=Math.min(a,N.x),l=Math.min(l,N.y),d=Math.max(d,N.x),g=Math.max(g,N.y),r.push(N)}const w=this.grid.query(a,l,d,g).concat(this.ignoredGrid.query(a,l,d,g)),A={},I={};for(const z of w){const N=z.key;if(A[N.bucketInstanceId]===void 0&&(A[N.bucketInstanceId]={}),A[N.bucketInstanceId][N.featureIndex])continue;const F=[new o.P(z.x1,z.y1),new o.P(z.x2,z.y1),new o.P(z.x2,z.y2),new o.P(z.x1,z.y2)];o.aw(r,F)&&(A[N.bucketInstanceId][N.featureIndex]=!0,I[N.bucketInstanceId]===void 0&&(I[N.bucketInstanceId]=[]),I[N.bucketInstanceId].push(N.featureIndex))}return I}insertCollisionBox(e,r,a,l,d,g){(a?this.ignoredGrid:this.grid).insert({bucketInstanceId:l,featureIndex:d,collisionGroupID:g,overlapMode:r},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,r,a,l,d,g){const w=a?this.ignoredGrid:this.grid,A={bucketInstanceId:l,featureIndex:d,collisionGroupID:g,overlapMode:r};for(let I=0;I<e.length;I+=4)w.insertCircle(A,e[I],e[I+1],e[I+2])}projectAndGetPerspectiveRatio(e,r,a,l,d){if(d){let g;l?(g=[e,r,l(e,r),1],o.at(g,g,d)):(g=[e,r,0,1],_n(g,g,d));const w=g[3];return{x:(g[0]/w+1)/2*this.transform.width+Er,y:(-g[1]/w+1)/2*this.transform.height+Er,perspectiveRatio:.5+this.transform.cameraToCenterDistance/w*.5,isOccluded:!1,signedDistanceFromCamera:w}}{const g=this.transform.projectTileCoordinates(e,r,a,l);return{x:(g.point.x+1)/2*this.transform.width+Er,y:(1-g.point.y)/2*this.transform.height+Er,perspectiveRatio:.5+this.transform.cameraToCenterDistance/g.signedDistanceFromCamera*.5,isOccluded:g.isOccluded,signedDistanceFromCamera:g.signedDistanceFromCamera}}}getPerspectiveRatio(e,r,a,l){const d=this.transform.projectTileCoordinates(e,r,a,l);return .5+this.transform.cameraToCenterDistance/d.signedDistanceFromCamera*.5}isOffscreen(e,r,a,l){return a<Er||e>=this.screenRightBoundary||l<Er||r>this.screenBottomBoundary}isInsideGrid(e,r,a,l){return a>=0&&e<this.gridRightBoundary&&l>=0&&r<this.gridBottomBoundary}getViewportMatrix(){const e=o.ad([]);return o.L(e,e,[-100,-100,0]),e}_projectCollisionBox(e,r,a,l,d,g,w,A,I,z,N){let F=1,Z=0,J=0,oe=1;const ne=e.anchorPointX+w[0],se=e.anchorPointY+w[1];if(g&&!d){const dt=this.projectAndGetPerspectiveRatio(ne+1,se,l,I,N),tt=dt.x-A.x,kt=Math.atan((dt.y-A.y)/tt)+(tt<0?Math.PI:0),Xt=Math.sin(kt),nr=Math.cos(kt);F=nr,Z=Xt,J=-Xt,oe=nr}else if(!g&&d){const dt=Vt(this.transform);F=dt.vecEast[0],Z=dt.vecEast[1],J=dt.vecSouth[0],oe=dt.vecSouth[1]}let pe=A.x,_e=A.y,ye=r;d&&(pe=ne,_e=se,ye=Math.pow(2,-(this.transform.zoom-a.overscaledZ)),ye*=this.transform.getPitchedTextCorrection(ne,se,l),z||(ye*=o.ae(.5+A.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))),z&&(pe+=F*z.x*ye+J*z.y*ye,_e+=Z*z.x*ye+oe*z.y*ye);const be=e.x1*ye,Ce=e.x2*ye,we=(be+Ce)/2,Re=e.y1*ye,We=e.y2*ye,Fe=(Re+We)/2,Ne=[{offsetX:be,offsetY:Re},{offsetX:we,offsetY:Re},{offsetX:Ce,offsetY:Re},{offsetX:Ce,offsetY:Fe},{offsetX:Ce,offsetY:We},{offsetX:we,offsetY:We},{offsetX:be,offsetY:We},{offsetX:be,offsetY:Fe}];let je=[];for(const{offsetX:dt,offsetY:tt}of Ne)je.push(new o.P(pe+F*dt+J*tt,_e+Z*dt+oe*tt));let mt=!1;if(d){const dt=je.map(tt=>this.projectAndGetPerspectiveRatio(tt.x,tt.y,l,I,N));mt=dt.some(tt=>!tt.isOccluded),je=dt.map(tt=>new o.P(tt.x,tt.y))}else mt=!0;return{box:o.ax(je),allPointsOccluded:!mt}}}class yr{constructor(e,r,a,l){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?r:-r))):l&&a?1:0,this.placed=a}isHidden(){return this.opacity===0&&!this.placed}}class Zn{constructor(e,r,a,l,d){this.text=new yr(e?e.text:null,r,a,d),this.icon=new yr(e?e.icon:null,r,l,d)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class sn{constructor(e,r,a){this.text=e,this.icon=r,this.skipFade=a}}class uo{constructor(e,r,a,l,d){this.bucketInstanceId=e,this.featureIndex=r,this.sourceLayerIndex=a,this.bucketIndex=l,this.tileID=d}}class En{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){const r=++this.maxGroupID;this.collisionGroups[e]={ID:r,predicate:a=>a.collisionGroupID===r}}return this.collisionGroups[e]}}function Ri(h,e,r,a,l){const{horizontalAlign:d,verticalAlign:g}=o.aE(h);return new o.P(-(d-.5)*e+a[0]*l,-(g-.5)*r+a[1]*l)}class $o{constructor(e,r,a,l,d){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new _i(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=a,this.retainedQueryData={},this.collisionGroups=new En(l),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=d,d&&(d.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){const r=this.terrain;return r?(a,l)=>r.getElevation(e,a,l):null}getBucketParts(e,r,a,l){const d=a.getBucket(r),g=a.latestFeatureIndex;if(!d||!g||r.id!==d.layerIds[0])return;const w=a.collisionBoxArray,A=d.layers[0].layout,I=d.layers[0].paint,z=Math.pow(2,this.transform.zoom-a.tileID.overscaledZ),N=a.tileSize/o.Z,F=a.tileID.toUnwrapped(),Z=A.get("text-rotation-alignment")==="map",J=o.az(a,1,this.transform.zoom),oe=o.aA(this.collisionIndex.transform,a,I.get("text-translate"),I.get("text-translate-anchor")),ne=o.aA(this.collisionIndex.transform,a,I.get("icon-translate"),I.get("icon-translate-anchor")),se=It(Z,this.transform,J);this.retainedQueryData[d.bucketInstanceId]=new uo(d.bucketInstanceId,g,d.sourceLayerIndex,d.index,a.tileID);const pe={bucket:d,layout:A,translationText:oe,translationIcon:ne,unwrappedTileID:F,pitchedLabelPlaneMatrix:se,scale:z,textPixelRatio:N,holdingForFade:a.holdingForFade(),collisionBoxArray:w,partiallyEvaluatedTextSize:o.ak(d.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(d.sourceID)};if(l)for(const _e of d.sortKeyRanges){const{sortKey:ye,symbolInstanceStart:be,symbolInstanceEnd:Ce}=_e;e.push({sortKey:ye,symbolInstanceStart:be,symbolInstanceEnd:Ce,parameters:pe})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:d.symbolInstances.length,parameters:pe})}attemptAnchorPlacement(e,r,a,l,d,g,w,A,I,z,N,F,Z,J,oe,ne,se,pe,_e,ye){const be=o.aB[e.textAnchor],Ce=[e.textOffset0,e.textOffset1],we=Ri(be,a,l,Ce,d),Re=this.collisionIndex.placeCollisionBox(r,F,A,I,z,w,g,ne,N.predicate,_e,we,ye);if((!pe||this.collisionIndex.placeCollisionBox(pe,F,A,I,z,w,g,se,N.predicate,_e,we,ye).placeable)&&Re.placeable){let We;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Z.crossTileID]&&this.prevPlacement.placements[Z.crossTileID]&&this.prevPlacement.placements[Z.crossTileID].text&&(We=this.prevPlacement.variableOffsets[Z.crossTileID].anchor),Z.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Z.crossTileID]={textOffset:Ce,width:a,height:l,anchor:be,textBoxScale:d,prevAnchor:We},this.markUsedJustification(J,be,Z,oe),J.allowVerticalPlacement&&(this.markUsedOrientation(J,oe,Z),this.placedOrientations[Z.crossTileID]=oe),{shift:we,placedGlyphBoxes:Re}}}placeLayerBucketPart(e,r,a){const{bucket:l,layout:d,translationText:g,translationIcon:w,unwrappedTileID:A,pitchedLabelPlaneMatrix:I,textPixelRatio:z,holdingForFade:N,collisionBoxArray:F,partiallyEvaluatedTextSize:Z,collisionGroup:J}=e.parameters,oe=d.get("text-optional"),ne=d.get("icon-optional"),se=o.aC(d,"text-overlap","text-allow-overlap"),pe=se==="always",_e=o.aC(d,"icon-overlap","icon-allow-overlap"),ye=_e==="always",be=d.get("text-rotation-alignment")==="map",Ce=d.get("text-pitch-alignment")==="map",we=d.get("icon-text-fit")!=="none",Re=d.get("symbol-z-order")==="viewport-y",We=pe&&(ye||!l.hasIconData()||ne),Fe=ye&&(pe||!l.hasTextData()||oe);!l.collisionArrays&&F&&l.deserializeCollisionBoxes(F);const Ne=this.retainedQueryData[l.bucketInstanceId].tileID,je=this._getTerrainElevationFunc(Ne),mt=this.transform.getFastPathSimpleProjectionMatrix(Ne),dt=(tt,kt,Xt)=>{var nr,Lr;if(r[tt.crossTileID])return;if(N)return void(this.placements[tt.crossTileID]=new sn(!1,!1,!1));let _r=!1,Rr=!1,Dr=!0,wr=null,ur={box:null,placeable:!1,offscreen:null,occluded:!1},Qr={placeable:!1},ci=null,vi=null,hr=null,$n=0,An=0,eo=0;kt.textFeatureIndex?$n=kt.textFeatureIndex:tt.useRuntimeCollisionCircles&&($n=tt.featureIndex),kt.verticalTextFeatureIndex&&(An=kt.verticalTextFeatureIndex);const Ao=kt.textBox;if(Ao){const qi=Wr=>{let Zr=o.al.horizontal;if(l.allowVerticalPlacement&&!Wr&&this.prevPlacement){const Pi=this.prevPlacement.placedOrientations[tt.crossTileID];Pi&&(this.placedOrientations[tt.crossTileID]=Pi,Zr=Pi,this.markUsedOrientation(l,Zr,tt))}return Zr},ro=(Wr,Zr)=>{if(l.allowVerticalPlacement&&tt.numVerticalGlyphVertices>0&&kt.verticalTextBox){for(const Pi of l.writingModes)if(Pi===o.al.vertical?(ur=Zr(),Qr=ur):ur=Wr(),ur&&ur.placeable)break}else ur=Wr()},Vn=tt.textAnchorOffsetStartIndex,io=tt.textAnchorOffsetEndIndex;if(io===Vn){const Wr=(Zr,Pi)=>{const Cr=this.collisionIndex.placeCollisionBox(Zr,se,z,Ne,A,Ce,be,g,J.predicate,je,void 0,mt);return Cr&&Cr.placeable&&(this.markUsedOrientation(l,Pi,tt),this.placedOrientations[tt.crossTileID]=Pi),Cr};ro(()=>Wr(Ao,o.al.horizontal),()=>{const Zr=kt.verticalTextBox;return l.allowVerticalPlacement&&tt.numVerticalGlyphVertices>0&&Zr?Wr(Zr,o.al.vertical):{box:null,offscreen:null}}),qi(ur&&ur.placeable)}else{let Wr=o.aB[(Lr=(nr=this.prevPlacement)===null||nr===void 0?void 0:nr.variableOffsets[tt.crossTileID])===null||Lr===void 0?void 0:Lr.anchor];const Zr=(Cr,Da,nu)=>{const ou=Cr.x2-Cr.x1,jh=Cr.y2-Cr.y1,Vl=tt.textBoxScale,Ms=we&&_e==="never"?Da:null;let Yi=null,kn=se==="never"?1:2,$i="never";Wr&&kn++;for(let On=0;On<kn;On++){for(let za=Vn;za<io;za++){const no=l.textAnchorOffsets.get(za);if(Wr&&no.textAnchor!==Wr)continue;const Ol=this.attemptAnchorPlacement(no,Cr,ou,jh,Vl,be,Ce,z,Ne,A,J,$i,tt,l,nu,g,w,Ms,je);if(Ol&&(Yi=Ol.placedGlyphBoxes,Yi&&Yi.placeable))return _r=!0,wr=Ol.shift,Yi}Wr?Wr=null:$i=se}return a&&!Yi&&(Yi={box:this.collisionIndex.placeCollisionBox(Ao,"always",z,Ne,A,Ce,be,g,J.predicate,je,void 0,mt).box,offscreen:!1,placeable:!1,occluded:!1}),Yi};ro(()=>Zr(Ao,kt.iconBox,o.al.horizontal),()=>{const Cr=kt.verticalTextBox;return l.allowVerticalPlacement&&(!ur||!ur.placeable)&&tt.numVerticalGlyphVertices>0&&Cr?Zr(Cr,kt.verticalIconBox,o.al.vertical):{box:null,occluded:!0,offscreen:null}}),ur&&(_r=ur.placeable,Dr=ur.offscreen);const Pi=qi(ur&&ur.placeable);if(!_r&&this.prevPlacement){const Cr=this.prevPlacement.variableOffsets[tt.crossTileID];Cr&&(this.variableOffsets[tt.crossTileID]=Cr,this.markUsedJustification(l,Cr.anchor,tt,Pi))}}}if(ci=ur,_r=ci&&ci.placeable,Dr=ci&&ci.offscreen,tt.useRuntimeCollisionCircles){const qi=l.text.placedSymbolArray.get(tt.centerJustifiedTextSymbolIndex),ro=o.am(l.textSizeData,Z,qi),Vn=d.get("text-padding");vi=this.collisionIndex.placeCollisionCircles(se,qi,l.lineVertexArray,l.glyphOffsetArray,ro,A,I,a,Ce,J.predicate,tt.collisionCircleDiameter,Vn,g,je),vi.circles.length&&vi.collisionDetected&&!a&&o.w("Collisions detected, but collision boxes are not shown"),_r=pe||vi.circles.length>0&&!vi.collisionDetected,Dr=Dr&&vi.offscreen}if(kt.iconFeatureIndex&&(eo=kt.iconFeatureIndex),kt.iconBox){const qi=ro=>this.collisionIndex.placeCollisionBox(ro,_e,z,Ne,A,Ce,be,w,J.predicate,je,we&&wr?wr:void 0,mt);Qr&&Qr.placeable&&kt.verticalIconBox?(hr=qi(kt.verticalIconBox),Rr=hr.placeable):(hr=qi(kt.iconBox),Rr=hr.placeable),Dr=Dr&&hr.offscreen}const Is=oe||tt.numHorizontalGlyphVertices===0&&tt.numVerticalGlyphVertices===0,to=ne||tt.numIconVertices===0;Is||to?to?Is||(Rr=Rr&&_r):_r=Rr&&_r:Rr=_r=Rr&&_r;const ko=Rr&&hr.placeable;if(_r&&ci.placeable&&this.collisionIndex.insertCollisionBox(ci.box,se,d.get("text-ignore-placement"),l.bucketInstanceId,Qr&&Qr.placeable&&An?An:$n,J.ID),ko&&this.collisionIndex.insertCollisionBox(hr.box,_e,d.get("icon-ignore-placement"),l.bucketInstanceId,eo,J.ID),vi&&_r&&this.collisionIndex.insertCollisionCircles(vi.circles,se,d.get("text-ignore-placement"),l.bucketInstanceId,$n,J.ID),a&&this.storeCollisionData(l.bucketInstanceId,Xt,kt,ci,hr,vi),tt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(l.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[tt.crossTileID]=new sn((_r||We)&&!(ci!=null&&ci.occluded),(Rr||Fe)&&!(hr!=null&&hr.occluded),Dr||l.justReloaded),r[tt.crossTileID]=!0};if(Re){if(e.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const tt=l.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let kt=tt.length-1;kt>=0;--kt){const Xt=tt[kt];dt(l.symbolInstances.get(Xt),l.collisionArrays[Xt],Xt)}}else for(let tt=e.symbolInstanceStart;tt<e.symbolInstanceEnd;tt++)dt(l.symbolInstances.get(tt),l.collisionArrays[tt],tt);l.justReloaded=!1}storeCollisionData(e,r,a,l,d,g){if(a.textBox||a.iconBox){let w,A;this.collisionBoxArrays.has(e)?w=this.collisionBoxArrays.get(e):(w=new Map,this.collisionBoxArrays.set(e,w)),w.has(r)?A=w.get(r):(A={text:null,icon:null},w.set(r,A)),a.textBox&&(A.text=l.box),a.iconBox&&(A.icon=d.box)}if(g){let w=this.collisionCircleArrays[e];w===void 0&&(w=this.collisionCircleArrays[e]=[]);for(let A=0;A<g.circles.length;A+=4)w.push(g.circles[A+0]-Er),w.push(g.circles[A+1]-Er),w.push(g.circles[A+2]),w.push(g.collisionDetected?1:0)}}markUsedJustification(e,r,a,l){let d;d=l===o.al.vertical?a.verticalPlacedTextSymbolIndex:{left:a.leftJustifiedTextSymbolIndex,center:a.centerJustifiedTextSymbolIndex,right:a.rightJustifiedTextSymbolIndex}[o.aD(r)];const g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex,a.verticalPlacedTextSymbolIndex];for(const w of g)w>=0&&(e.text.placedSymbolArray.get(w).crossTileID=d>=0&&w!==d?0:a.crossTileID)}markUsedOrientation(e,r,a){const l=r===o.al.horizontal||r===o.al.horizontalOnly?r:0,d=r===o.al.vertical?r:0,g=[a.leftJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.rightJustifiedTextSymbolIndex];for(const w of g)e.text.placedSymbolArray.get(w).placedOrientation=l;a.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).placedOrientation=d)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;const r=this.prevPlacement;let a=!1;this.prevZoomAdjustment=r?r.zoomAdjustment(this.transform.zoom):0;const l=r?r.symbolFadeChange(e):1,d=r?r.opacities:{},g=r?r.variableOffsets:{},w=r?r.placedOrientations:{};for(const A in this.placements){const I=this.placements[A],z=d[A];z?(this.opacities[A]=new Zn(z,l,I.text,I.icon),a=a||I.text!==z.text.placed||I.icon!==z.icon.placed):(this.opacities[A]=new Zn(null,l,I.text,I.icon,I.skipFade),a=a||I.text||I.icon)}for(const A in d){const I=d[A];if(!this.opacities[A]){const z=new Zn(I,l,!1,!1);z.isHidden()||(this.opacities[A]=z,a=a||I.text.placed||I.icon.placed)}}for(const A in g)this.variableOffsets[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.variableOffsets[A]=g[A]);for(const A in w)this.placedOrientations[A]||!this.opacities[A]||this.opacities[A].isHidden()||(this.placedOrientations[A]=w[A]);if(r&&r.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");a?this.lastPlacementChangeTime=e:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=r?r.lastPlacementChangeTime:e)}updateLayerOpacities(e,r){const a={};for(const l of r){const d=l.getBucket(e);d&&l.latestFeatureIndex&&e.id===d.layerIds[0]&&this.updateBucketOpacities(d,l.tileID,a,l.collisionBoxArray)}}updateBucketOpacities(e,r,a,l){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();const d=e.layers[0],g=d.layout,w=new Zn(null,0,!1,!1,!0),A=g.get("text-allow-overlap"),I=g.get("icon-allow-overlap"),z=d._unevaluatedLayout.hasValue("text-variable-anchor")||d._unevaluatedLayout.hasValue("text-variable-anchor-offset"),N=g.get("text-rotation-alignment")==="map",F=g.get("text-pitch-alignment")==="map",Z=g.get("icon-text-fit")!=="none",J=new Zn(null,0,A&&(I||!e.hasIconData()||g.get("icon-optional")),I&&(A||!e.hasTextData()||g.get("text-optional")),!0);!e.collisionArrays&&l&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(l);const oe=(se,pe,_e)=>{for(let ye=0;ye<pe/4;ye++)se.opacityVertexArray.emplaceBack(_e);se.hasVisibleVertices=se.hasVisibleVertices||_e!==Pn},ne=this.collisionBoxArrays.get(e.bucketInstanceId);for(let se=0;se<e.symbolInstances.length;se++){const pe=e.symbolInstances.get(se),{numHorizontalGlyphVertices:_e,numVerticalGlyphVertices:ye,crossTileID:be}=pe;let Ce=this.opacities[be];a[be]?Ce=w:Ce||(Ce=J,this.opacities[be]=Ce),a[be]=!0;const we=pe.numIconVertices>0,Re=this.placedOrientations[pe.crossTileID],We=Re===o.al.vertical,Fe=Re===o.al.horizontal||Re===o.al.horizontalOnly;if(_e>0||ye>0){const je=rs(Ce.text);oe(e.text,_e,We?Pn:je),oe(e.text,ye,Fe?Pn:je);const mt=Ce.text.isHidden();[pe.rightJustifiedTextSymbolIndex,pe.centerJustifiedTextSymbolIndex,pe.leftJustifiedTextSymbolIndex].forEach(kt=>{kt>=0&&(e.text.placedSymbolArray.get(kt).hidden=mt||We?1:0)}),pe.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(pe.verticalPlacedTextSymbolIndex).hidden=mt||Fe?1:0);const dt=this.variableOffsets[pe.crossTileID];dt&&this.markUsedJustification(e,dt.anchor,pe,Re);const tt=this.placedOrientations[pe.crossTileID];tt&&(this.markUsedJustification(e,"left",pe,tt),this.markUsedOrientation(e,tt,pe))}if(we){const je=rs(Ce.icon),mt=!(Z&&pe.verticalPlacedIconSymbolIndex&&We);pe.placedIconSymbolIndex>=0&&(oe(e.icon,pe.numIconVertices,mt?je:Pn),e.icon.placedSymbolArray.get(pe.placedIconSymbolIndex).hidden=Ce.icon.isHidden()),pe.verticalPlacedIconSymbolIndex>=0&&(oe(e.icon,pe.numVerticalIconVertices,mt?Pn:je),e.icon.placedSymbolArray.get(pe.verticalPlacedIconSymbolIndex).hidden=Ce.icon.isHidden())}const Ne=ne&&ne.has(se)?ne.get(se):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){const je=e.collisionArrays[se];if(je){let mt=new o.P(0,0);if(je.textBox||je.verticalTextBox){let dt=!0;if(z){const tt=this.variableOffsets[be];tt?(mt=Ri(tt.anchor,tt.width,tt.height,tt.textOffset,tt.textBoxScale),N&&mt._rotate(F?-this.transform.bearingInRadians:this.transform.bearingInRadians)):dt=!1}if(je.textBox||je.verticalTextBox){let tt;je.textBox&&(tt=We),je.verticalTextBox&&(tt=Fe),Mo(e.textCollisionBox.collisionVertexArray,Ce.text.placed,!dt||tt,Ne.text,mt.x,mt.y)}}if(je.iconBox||je.verticalIconBox){const dt=!!(!Fe&&je.verticalIconBox);let tt;je.iconBox&&(tt=dt),je.verticalIconBox&&(tt=!dt),Mo(e.iconCollisionBox.collisionVertexArray,Ce.icon.placed,tt,Ne.icon,Z?mt.x:0,Z?mt.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return this.fadeDuration===0?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(e,r){const a=this.zoomAtLastRecencyCheck===r?1-this.zoomAdjustment(r):1;return this.zoomAtLastRecencyCheck=r,this.commitTime+this.fadeDuration*a>e}setStale(){this.stale=!0}}function Mo(h,e,r,a,l,d){a&&a.length!==0||(a=[0,0,0,0]);const g=a[0]-Er,w=a[1]-Er,A=a[2]-Er,I=a[3]-Er;h.emplaceBack(e?1:0,r?1:0,l||0,d||0,g,w),h.emplaceBack(e?1:0,r?1:0,l||0,d||0,A,w),h.emplaceBack(e?1:0,r?1:0,l||0,d||0,A,I),h.emplaceBack(e?1:0,r?1:0,l||0,d||0,g,I)}const Zs=Math.pow(2,25),Kn=Math.pow(2,24),es=Math.pow(2,17),Ks=Math.pow(2,16),Gs=Math.pow(2,9),Js=Math.pow(2,8),ts=Math.pow(2,1);function rs(h){if(h.opacity===0&&!h.placed)return 0;if(h.opacity===1&&h.placed)return 4294967295;const e=h.placed?1:0,r=Math.floor(127*h.opacity);return r*Zs+e*Kn+r*es+e*Ks+r*Gs+e*Js+r*ts+e}const Pn=0;class is{constructor(e){this._sortAcrossTiles=e.layout.get("symbol-z-order")!=="viewport-y"&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,r,a,l,d){const g=this._bucketParts;for(;this._currentTileIndex<e.length;)if(r.getBucketParts(g,l,e[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,d())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,g.sort((w,A)=>w.sortKey-A.sortKey));this._currentPartIndex<g.length;)if(r.placeLayerBucketPart(g[this._currentPartIndex],this._seenCrossTileIDs,a),this._currentPartIndex++,d())return!0;return!1}}class Xs{constructor(e,r,a,l,d,g,w,A){this.placement=new $o(e,r,g,w,A),this._currentPlacementIndex=a.length-1,this._forceFullPlacement=l,this._showCollisionBoxes=d,this._done=!1}isDone(){return this._done}continuePlacement(e,r,a){const l=L.now(),d=()=>!this._forceFullPlacement&&L.now()-l>2;for(;this._currentPlacementIndex>=0;){const g=r[e[this._currentPlacementIndex]],w=this.placement.collisionIndex.transform.zoom;if(g.type==="symbol"&&(!g.minzoom||g.minzoom<=w)&&(!g.maxzoom||g.maxzoom>w)){if(this._inProgressLayer||(this._inProgressLayer=new is(g)),this._inProgressLayer.continuePlacement(a[g.source],this.placement,this._showCollisionBoxes,g,d))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}const In=512/o.Z/2;class ns{constructor(e,r,a){this.tileID=e,this.bucketInstanceId=a,this._symbolsByKey={};const l=new Map;for(let d=0;d<r.length;d++){const g=r.get(d),w=g.key,A=l.get(w);A?A.push(g):l.set(w,[g])}for(const[d,g]of l){const w={positions:g.map(A=>({x:Math.floor(A.anchorX*In),y:Math.floor(A.anchorY*In)})),crossTileIDs:g.map(A=>A.crossTileID)};if(w.positions.length>128){const A=new o.aF(w.positions.length,16,Uint16Array);for(const{x:I,y:z}of w.positions)A.add(I,z);A.finish(),delete w.positions,w.index=A}this._symbolsByKey[d]=w}}getScaledCoordinates(e,r){const{x:a,y:l,z:d}=this.tileID.canonical,{x:g,y:w,z:A}=r.canonical,I=In/Math.pow(2,A-d),z=(w*o.Z+e.anchorY)*I,N=l*o.Z*In;return{x:Math.floor((g*o.Z+e.anchorX)*I-a*o.Z*In),y:Math.floor(z-N)}}findMatches(e,r,a){const l=this.tileID.canonical.z<r.canonical.z?1:Math.pow(2,this.tileID.canonical.z-r.canonical.z);for(let d=0;d<e.length;d++){const g=e.get(d);if(g.crossTileID)continue;const w=this._symbolsByKey[g.key];if(!w)continue;const A=this.getScaledCoordinates(g,r);if(w.index){const I=w.index.range(A.x-l,A.y-l,A.x+l,A.y+l).sort();for(const z of I){const N=w.crossTileIDs[z];if(!a[N]){a[N]=!0,g.crossTileID=N;break}}}else if(w.positions)for(let I=0;I<w.positions.length;I++){const z=w.positions[I],N=w.crossTileIDs[I];if(Math.abs(z.x-A.x)<=l&&Math.abs(z.y-A.y)<=l&&!a[N]){a[N]=!0,g.crossTileID=N;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:e})=>e)}}class tl{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Gn{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){const r=Math.round((e-this.lng)/360);if(r!==0)for(const a in this.indexes){const l=this.indexes[a],d={};for(const g in l){const w=l[g];w.tileID=w.tileID.unwrapTo(w.tileID.wrap+r),d[w.tileID.key]=w}this.indexes[a]=d}this.lng=e}addBucket(e,r,a){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===r.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let d=0;d<r.symbolInstances.length;d++)r.symbolInstances.get(d).crossTileID=0;this.usedCrossTileIDs[e.overscaledZ]||(this.usedCrossTileIDs[e.overscaledZ]={});const l=this.usedCrossTileIDs[e.overscaledZ];for(const d in this.indexes){const g=this.indexes[d];if(Number(d)>e.overscaledZ)for(const w in g){const A=g[w];A.tileID.isChildOf(e)&&A.findMatches(r.symbolInstances,e,l)}else{const w=g[e.scaledTo(Number(d)).key];w&&w.findMatches(r.symbolInstances,e,l)}}for(let d=0;d<r.symbolInstances.length;d++){const g=r.symbolInstances.get(d);g.crossTileID||(g.crossTileID=a.generate(),l[g.crossTileID]=!0)}return this.indexes[e.overscaledZ]===void 0&&(this.indexes[e.overscaledZ]={}),this.indexes[e.overscaledZ][e.key]=new ns(e,r.symbolInstances,r.bucketInstanceId),!0}removeBucketCrossTileIDs(e,r){for(const a of r.getCrossTileIDsLists())for(const l of a)delete this.usedCrossTileIDs[e][l]}removeStaleBuckets(e){let r=!1;for(const a in this.indexes){const l=this.indexes[a];for(const d in l)e[l[d].bucketInstanceId]||(this.removeBucketCrossTileIDs(a,l[d]),delete l[d],r=!0)}return r}}class Jn{constructor(){this.layerIndexes={},this.crossTileIDs=new tl,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(e,r,a){let l=this.layerIndexes[e.id];l===void 0&&(l=this.layerIndexes[e.id]=new Gn);let d=!1;const g={};l.handleWrapJump(a);for(const w of r){const A=w.getBucket(e);A&&e.id===A.layerIds[0]&&(A.bucketInstanceId||(A.bucketInstanceId=++this.maxBucketInstanceId),l.addBucket(w.tileID,A,this.crossTileIDs)&&(d=!0),g[A.bucketInstanceId]=!0)}return l.removeStaleBuckets(g)&&(d=!0),d}pruneUnusedLayers(e){const r={};e.forEach(a=>{r[a]=!0});for(const a in this.layerIndexes)r[a]||delete this.layerIndexes[a]}}var os="void main() {fragColor=vec4(1.0);}";const oi={prelude:rr(`#ifdef GL_ES
66
+ precision mediump float;
67
+ #else
68
+ #if !defined(lowp)
69
+ #define lowp
70
+ #endif
71
+ #if !defined(mediump)
72
+ #define mediump
73
+ #endif
74
+ #if !defined(highp)
75
+ #define highp
76
+ #endif
77
+ #endif
78
+ out highp vec4 fragColor;`,`#ifdef GL_ES
79
+ precision highp float;
80
+ #else
81
+ #if !defined(lowp)
82
+ #define lowp
83
+ #endif
84
+ #if !defined(mediump)
85
+ #define mediump
86
+ #endif
87
+ #if !defined(highp)
88
+ #define highp
89
+ #endif
90
+ #endif
91
+ vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
92
+ );}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}mat3 rotationMatrixFromAxisAngle(vec3 u,float angle) {float c=cos(angle);float s=sin(angle);float c2=1.0-c;return mat3(u.x*u.x*c2+ c,u.x*u.y*c2-u.z*s,u.x*u.z*c2+u.y*s,u.y*u.x*c2+u.z*s,u.y*u.y*c2+ c,u.y*u.z*c2-u.x*s,u.z*u.x*c2-u.y*s,u.z*u.y*c2+u.x*s,u.z*u.z*c2+ c
93
+ );}
94
+ #ifdef TERRAIN3D
95
+ uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
96
+ #endif
97
+ const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
98
+ #ifdef TERRAIN3D
99
+ highp float d=unpack(texture(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
100
+ #else
101
+ return 1.0;
102
+ #endif
103
+ }float calculate_visibility(vec4 pos) {
104
+ #ifdef TERRAIN3D
105
+ vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
106
+ #else
107
+ return 1.0;
108
+ #endif
109
+ }float ele(vec2 pos) {
110
+ #ifdef TERRAIN3D
111
+ vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
112
+ #else
113
+ return 0.0;
114
+ #endif
115
+ }float get_elevation(vec2 pos) {
116
+ #ifdef TERRAIN3D
117
+ #ifdef GLOBE
118
+ if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;}
119
+ #endif
120
+ vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
121
+ #else
122
+ return 0.0;
123
+ #endif
124
+ }const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:rr("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:rr("",`#define GLOBE_RADIUS 6371008.8
125
+ uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos
126
+ );}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY);
127
+ if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len
128
+ );if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:rr(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity;
129
+ #ifdef OVERDRAW_INSPECTOR
130
+ fragColor=vec4(1.0);
131
+ #endif
132
+ }`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:rr(`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;in vec2 v_pos_a;in 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity;
133
+ #ifdef OVERDRAW_INSPECTOR
134
+ fragColor=vec4(1.0);
135
+ #endif
136
+ }`,"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;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);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:rr(`in vec3 v_data;in float v_visibility;
137
+ #pragma mapbox: define highp vec4 color
138
+ #pragma mapbox: define mediump float radius
139
+ #pragma mapbox: define lowp float blur
140
+ #pragma mapbox: define lowp float opacity
141
+ #pragma mapbox: define highp vec4 stroke_color
142
+ #pragma mapbox: define mediump float stroke_width
143
+ #pragma mapbox: define lowp float stroke_opacity
144
+ void main() {
145
+ #pragma mapbox: initialize highp vec4 color
146
+ #pragma mapbox: initialize mediump float radius
147
+ #pragma mapbox: initialize lowp float blur
148
+ #pragma mapbox: initialize lowp float opacity
149
+ #pragma mapbox: initialize highp vec4 stroke_color
150
+ #pragma mapbox: initialize mediump float stroke_width
151
+ #pragma mapbox: initialize lowp float stroke_opacity
152
+ vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;}
153
+ #ifdef OVERDRAW_INSPECTOR
154
+ fragColor=vec4(1.0);
155
+ #endif
156
+ }`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility;
157
+ #pragma mapbox: define highp vec4 color
158
+ #pragma mapbox: define mediump float radius
159
+ #pragma mapbox: define lowp float blur
160
+ #pragma mapbox: define lowp float opacity
161
+ #pragma mapbox: define highp vec4 stroke_color
162
+ #pragma mapbox: define mediump float stroke_width
163
+ #pragma mapbox: define lowp float stroke_opacity
164
+ void main(void) {
165
+ #pragma mapbox: initialize highp vec4 color
166
+ #pragma mapbox: initialize mediump float radius
167
+ #pragma mapbox: initialize lowp float blur
168
+ #pragma mapbox: initialize lowp float opacity
169
+ #pragma mapbox: initialize highp vec4 stroke_color
170
+ #pragma mapbox: initialize mediump float stroke_width
171
+ #pragma mapbox: initialize lowp float stroke_opacity
172
+ vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) {
173
+ #ifdef GLOBE
174
+ vec3 center_vector=projectToSphere(circle_center);
175
+ #endif
176
+ float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else {
177
+ #ifdef GLOBE
178
+ vec4 projected_center=interpolateProjection(circle_center,center_vector,ele);
179
+ #else
180
+ vec4 projected_center=projectTileWithElevation(circle_center,ele);
181
+ #endif
182
+ corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);}
183
+ #ifdef GLOBE
184
+ vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele);
185
+ #else
186
+ gl_Position=projectTileWithElevation(corner_position,ele);
187
+ #endif
188
+ } else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}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;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:rr(os,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:rr(`uniform highp float u_intensity;in vec2 v_extrude;
189
+ #pragma mapbox: define highp float weight
190
+ #define GAUSS_COEF 0.3989422804014327
191
+ void main() {
192
+ #pragma mapbox: initialize highp float weight
193
+ float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0);
194
+ #ifdef OVERDRAW_INSPECTOR
195
+ fragColor=vec4(1.0);
196
+ #endif
197
+ }`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude;
198
+ #pragma mapbox: define highp float weight
199
+ #pragma mapbox: define mediump float radius
200
+ const highp float ZERO=1.0/255.0/16.0;
201
+ #define GAUSS_COEF 0.3989422804014327
202
+ void main(void) {
203
+ #pragma mapbox: initialize highp float weight
204
+ #pragma mapbox: initialize mediump float radius
205
+ vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.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;vec2 circle_center=floor(pos_raw/8.0);
206
+ #ifdef GLOBE
207
+ vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0);
208
+ #else
209
+ gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center));
210
+ #endif
211
+ }`),heatmapTexture:rr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity;
212
+ #ifdef OVERDRAW_INSPECTOR
213
+ fragColor=vec4(0.0);
214
+ #endif
215
+ }`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out 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:rr("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:rr("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;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);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {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;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:rr("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:rr(os,`in vec2 a_pos;void main() {
216
+ #ifdef GLOBE
217
+ gl_Position=projectTileFor3D(a_pos,0.0);
218
+ #else
219
+ gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0);
220
+ #endif
221
+ }`),fill:rr(`#pragma mapbox: define highp vec4 color
222
+ #pragma mapbox: define lowp float opacity
223
+ void main() {
224
+ #pragma mapbox: initialize highp vec4 color
225
+ #pragma mapbox: initialize lowp float opacity
226
+ fragColor=color*opacity;
227
+ #ifdef OVERDRAW_INSPECTOR
228
+ fragColor=vec4(1.0);
229
+ #endif
230
+ }`,`uniform vec2 u_fill_translate;in vec2 a_pos;
231
+ #pragma mapbox: define highp vec4 color
232
+ #pragma mapbox: define lowp float opacity
233
+ void main() {
234
+ #pragma mapbox: initialize highp vec4 color
235
+ #pragma mapbox: initialize lowp float opacity
236
+ gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:rr(`in vec2 v_pos;
237
+ #ifdef GLOBE
238
+ in float v_depth;
239
+ #endif
240
+ #pragma mapbox: define highp vec4 outline_color
241
+ #pragma mapbox: define lowp float opacity
242
+ void main() {
243
+ #pragma mapbox: initialize highp vec4 outline_color
244
+ #pragma mapbox: initialize lowp float opacity
245
+ float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity);
246
+ #ifdef GLOBE
247
+ if (v_depth > 1.0) {discard;}
248
+ #endif
249
+ #ifdef OVERDRAW_INSPECTOR
250
+ fragColor=vec4(1.0);
251
+ #endif
252
+ }`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos;
253
+ #ifdef GLOBE
254
+ out float v_depth;
255
+ #endif
256
+ #pragma mapbox: define highp vec4 outline_color
257
+ #pragma mapbox: define lowp float opacity
258
+ void main() {
259
+ #pragma mapbox: initialize highp vec4 outline_color
260
+ #pragma mapbox: initialize lowp float opacity
261
+ gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;
262
+ #ifdef GLOBE
263
+ v_depth=gl_Position.z/gl_Position.w;
264
+ #endif
265
+ }`),fillOutlinePattern:rr(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos;
266
+ #ifdef GLOBE
267
+ in float v_depth;
268
+ #endif
269
+ #pragma mapbox: define lowp float opacity
270
+ #pragma mapbox: define lowp vec4 pattern_from
271
+ #pragma mapbox: define lowp vec4 pattern_to
272
+ void main() {
273
+ #pragma mapbox: initialize lowp float opacity
274
+ #pragma mapbox: initialize mediump vec4 pattern_from
275
+ #pragma mapbox: initialize mediump vec4 pattern_to
276
+ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity;
277
+ #ifdef GLOBE
278
+ if (v_depth > 1.0) {discard;}
279
+ #endif
280
+ #ifdef OVERDRAW_INSPECTOR
281
+ fragColor=vec4(1.0);
282
+ #endif
283
+ }`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos;
284
+ #ifdef GLOBE
285
+ out float v_depth;
286
+ #endif
287
+ #pragma mapbox: define lowp float opacity
288
+ #pragma mapbox: define lowp vec4 pattern_from
289
+ #pragma mapbox: define lowp vec4 pattern_to
290
+ #pragma mapbox: define lowp float pixel_ratio_from
291
+ #pragma mapbox: define lowp float pixel_ratio_to
292
+ void main() {
293
+ #pragma mapbox: initialize lowp float opacity
294
+ #pragma mapbox: initialize mediump vec4 pattern_from
295
+ #pragma mapbox: initialize mediump vec4 pattern_to
296
+ #pragma mapbox: initialize lowp float pixel_ratio_from
297
+ #pragma mapbox: initialize lowp float pixel_ratio_to
298
+ 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=projectTile(a_pos+u_fill_translate,a_pos);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;
299
+ #ifdef GLOBE
300
+ v_depth=gl_Position.z/gl_Position.w;
301
+ #endif
302
+ }`),fillPattern:rr(`#ifdef GL_ES
303
+ precision highp float;
304
+ #endif
305
+ uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;
306
+ #pragma mapbox: define lowp float opacity
307
+ #pragma mapbox: define lowp vec4 pattern_from
308
+ #pragma mapbox: define lowp vec4 pattern_to
309
+ void main() {
310
+ #pragma mapbox: initialize lowp float opacity
311
+ #pragma mapbox: initialize mediump vec4 pattern_from
312
+ #pragma mapbox: initialize mediump vec4 pattern_to
313
+ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity;
314
+ #ifdef OVERDRAW_INSPECTOR
315
+ fragColor=vec4(1.0);
316
+ #endif
317
+ }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;
318
+ #pragma mapbox: define lowp float opacity
319
+ #pragma mapbox: define lowp vec4 pattern_from
320
+ #pragma mapbox: define lowp vec4 pattern_to
321
+ #pragma mapbox: define lowp float pixel_ratio_from
322
+ #pragma mapbox: define lowp float pixel_ratio_to
323
+ void main() {
324
+ #pragma mapbox: initialize lowp float opacity
325
+ #pragma mapbox: initialize mediump vec4 pattern_from
326
+ #pragma mapbox: initialize mediump vec4 pattern_to
327
+ #pragma mapbox: initialize lowp float pixel_ratio_from
328
+ #pragma mapbox: initialize lowp float pixel_ratio_to
329
+ 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=projectTile(a_pos+u_fill_translate,a_pos);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:rr(`in vec4 v_color;void main() {fragColor=v_color;
330
+ #ifdef OVERDRAW_INSPECTOR
331
+ fragColor=vec4(1.0);
332
+ #endif
333
+ }`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed;
334
+ #ifdef TERRAIN3D
335
+ in vec2 a_centroid;
336
+ #endif
337
+ out vec4 v_color;
338
+ #pragma mapbox: define highp float base
339
+ #pragma mapbox: define highp float height
340
+ #pragma mapbox: define highp vec4 color
341
+ void main() {
342
+ #pragma mapbox: initialize highp float base
343
+ #pragma mapbox: initialize highp float height
344
+ #pragma mapbox: initialize highp vec4 color
345
+ vec3 normal=a_normal_ed.xyz;
346
+ #ifdef TERRAIN3D
347
+ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
348
+ #else
349
+ float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
350
+ #endif
351
+ base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
352
+ #ifdef GLOBE
353
+ vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
354
+ #else
355
+ gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
356
+ #endif
357
+ 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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0);
358
+ #ifdef GLOBE
359
+ mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition);
360
+ #endif
361
+ 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:rr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting;
362
+ #pragma mapbox: define lowp float base
363
+ #pragma mapbox: define lowp float height
364
+ #pragma mapbox: define lowp vec4 pattern_from
365
+ #pragma mapbox: define lowp vec4 pattern_to
366
+ #pragma mapbox: define lowp float pixel_ratio_from
367
+ #pragma mapbox: define lowp float pixel_ratio_to
368
+ void main() {
369
+ #pragma mapbox: initialize lowp float base
370
+ #pragma mapbox: initialize lowp float height
371
+ #pragma mapbox: initialize mediump vec4 pattern_from
372
+ #pragma mapbox: initialize mediump vec4 pattern_to
373
+ #pragma mapbox: initialize lowp float pixel_ratio_from
374
+ #pragma mapbox: initialize lowp float pixel_ratio_to
375
+ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting;
376
+ #ifdef OVERDRAW_INSPECTOR
377
+ fragColor=vec4(1.0);
378
+ #endif
379
+ }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed;
380
+ #ifdef TERRAIN3D
381
+ in vec2 a_centroid;
382
+ #endif
383
+ #ifdef GLOBE
384
+ out vec3 v_sphere_pos;
385
+ #endif
386
+ out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting;
387
+ #pragma mapbox: define lowp float base
388
+ #pragma mapbox: define lowp float height
389
+ #pragma mapbox: define lowp vec4 pattern_from
390
+ #pragma mapbox: define lowp vec4 pattern_to
391
+ #pragma mapbox: define lowp float pixel_ratio_from
392
+ #pragma mapbox: define lowp float pixel_ratio_to
393
+ void main() {
394
+ #pragma mapbox: initialize lowp float base
395
+ #pragma mapbox: initialize lowp float height
396
+ #pragma mapbox: initialize mediump vec4 pattern_from
397
+ #pragma mapbox: initialize mediump vec4 pattern_to
398
+ #pragma mapbox: initialize lowp float pixel_ratio_from
399
+ #pragma mapbox: initialize lowp float pixel_ratio_to
400
+ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
401
+ #ifdef TERRAIN3D
402
+ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
403
+ #else
404
+ float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
405
+ #endif
406
+ base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate;
407
+ #ifdef GLOBE
408
+ vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation);
409
+ #else
410
+ gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0);
411
+ #endif
412
+ vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
413
+ ? a_pos
414
+ : vec2(edgedistance,elevation*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:rr(`#ifdef GL_ES
415
+ precision highp float;
416
+ #endif
417
+ uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0);
418
+ #ifdef OVERDRAW_INSPECTOR
419
+ fragColor=vec4(1.0);
420
+ #endif
421
+ }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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:rr(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES];
422
+ #define PI 3.141592653589793
423
+ #define STANDARD 0
424
+ #define COMBINED 1
425
+ #define IGOR 2
426
+ #define MULTIDIRECTIONAL 3
427
+ #define BASIC 4
428
+ float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else
429
+ {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else
430
+ {fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;switch(u_method){case BASIC:
431
+ basic_hillshade(deriv);break;case COMBINED:
432
+ combined_hillshade(deriv);break;case IGOR:
433
+ igor_hillshade(deriv);break;case MULTIDIRECTIONAL:
434
+ multidirectional_hillshade(deriv);break;case STANDARD:
435
+ default:
436
+ standard_hillshade(deriv);break;}
437
+ #ifdef OVERDRAW_INSPECTOR
438
+ fragColor=vec4(1.0);
439
+ #endif
440
+ }`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:rr(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;
441
+ #ifdef GLOBE
442
+ in float v_depth;
443
+ #endif
444
+ #pragma mapbox: define highp vec4 color
445
+ #pragma mapbox: define lowp float blur
446
+ #pragma mapbox: define lowp float opacity
447
+ void main() {
448
+ #pragma mapbox: initialize highp vec4 color
449
+ #pragma mapbox: initialize lowp float blur
450
+ #pragma mapbox: initialize lowp float opacity
451
+ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);fragColor=color*(alpha*opacity);
452
+ #ifdef GLOBE
453
+ if (v_depth > 1.0) {discard;}
454
+ #endif
455
+ #ifdef OVERDRAW_INSPECTOR
456
+ fragColor=vec4(1.0);
457
+ #endif
458
+ }`,`
459
+ #define scale 0.015873016
460
+ in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar;
461
+ #ifdef GLOBE
462
+ out float v_depth;
463
+ #endif
464
+ #pragma mapbox: define highp vec4 color
465
+ #pragma mapbox: define lowp float blur
466
+ #pragma mapbox: define lowp float opacity
467
+ #pragma mapbox: define mediump float gapwidth
468
+ #pragma mapbox: define lowp float offset
469
+ #pragma mapbox: define mediump float width
470
+ void main() {
471
+ #pragma mapbox: initialize highp vec4 color
472
+ #pragma mapbox: initialize lowp float blur
473
+ #pragma mapbox: initialize lowp float opacity
474
+ #pragma mapbox: initialize mediump float gapwidth
475
+ #pragma mapbox: initialize lowp float offset
476
+ #pragma mapbox: initialize mediump float width
477
+ float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
478
+ #ifdef GLOBE
479
+ v_depth=gl_Position.z/gl_Position.w;
480
+ #endif
481
+ #ifdef TERRAIN3D
482
+ v_gamma_scale=1.0;
483
+ #else
484
+ float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
485
+ #endif
486
+ v_width2=vec2(outset,inset);}`),lineGradient:rr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv;
487
+ #ifdef GLOBE
488
+ in float v_depth;
489
+ #endif
490
+ #pragma mapbox: define lowp float blur
491
+ #pragma mapbox: define lowp float opacity
492
+ void main() {
493
+ #pragma mapbox: initialize lowp float blur
494
+ #pragma mapbox: initialize lowp float opacity
495
+ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity);
496
+ #ifdef GLOBE
497
+ if (v_depth > 1.0) {discard;}
498
+ #endif
499
+ #ifdef OVERDRAW_INSPECTOR
500
+ fragColor=vec4(1.0);
501
+ #endif
502
+ }`,`
503
+ #define scale 0.015873016
504
+ in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;
505
+ #ifdef GLOBE
506
+ out float v_depth;
507
+ #endif
508
+ #pragma mapbox: define lowp float blur
509
+ #pragma mapbox: define lowp float opacity
510
+ #pragma mapbox: define mediump float gapwidth
511
+ #pragma mapbox: define lowp float offset
512
+ #pragma mapbox: define mediump float width
513
+ void main() {
514
+ #pragma mapbox: initialize lowp float blur
515
+ #pragma mapbox: initialize lowp float opacity
516
+ #pragma mapbox: initialize mediump float gapwidth
517
+ #pragma mapbox: initialize lowp float offset
518
+ #pragma mapbox: initialize mediump float width
519
+ float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
520
+ #ifdef GLOBE
521
+ v_depth=gl_Position.z/gl_Position.w;
522
+ #endif
523
+ #ifdef TERRAIN3D
524
+ v_gamma_scale=1.0;
525
+ #else
526
+ float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
527
+ #endif
528
+ v_width2=vec2(outset,inset);}`),linePattern:rr(`#ifdef GL_ES
529
+ precision highp float;
530
+ #endif
531
+ uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width;
532
+ #ifdef GLOBE
533
+ in float v_depth;
534
+ #endif
535
+ #pragma mapbox: define lowp vec4 pattern_from
536
+ #pragma mapbox: define lowp vec4 pattern_to
537
+ #pragma mapbox: define lowp float pixel_ratio_from
538
+ #pragma mapbox: define lowp float pixel_ratio_to
539
+ #pragma mapbox: define lowp float blur
540
+ #pragma mapbox: define lowp float opacity
541
+ void main() {
542
+ #pragma mapbox: initialize mediump vec4 pattern_from
543
+ #pragma mapbox: initialize mediump vec4 pattern_to
544
+ #pragma mapbox: initialize lowp float pixel_ratio_from
545
+ #pragma mapbox: initialize lowp float pixel_ratio_to
546
+ #pragma mapbox: initialize lowp float blur
547
+ #pragma mapbox: initialize lowp float opacity
548
+ vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity;
549
+ #ifdef GLOBE
550
+ if (v_depth > 1.0) {discard;}
551
+ #endif
552
+ #ifdef OVERDRAW_INSPECTOR
553
+ fragColor=vec4(1.0);
554
+ #endif
555
+ }`,`
556
+ #define scale 0.015873016
557
+ #define LINE_DISTANCE_SCALE 2.0
558
+ in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width;
559
+ #ifdef GLOBE
560
+ out float v_depth;
561
+ #endif
562
+ #pragma mapbox: define lowp float blur
563
+ #pragma mapbox: define lowp float opacity
564
+ #pragma mapbox: define lowp float offset
565
+ #pragma mapbox: define mediump float gapwidth
566
+ #pragma mapbox: define mediump float width
567
+ #pragma mapbox: define lowp float floorwidth
568
+ #pragma mapbox: define lowp vec4 pattern_from
569
+ #pragma mapbox: define lowp vec4 pattern_to
570
+ #pragma mapbox: define lowp float pixel_ratio_from
571
+ #pragma mapbox: define lowp float pixel_ratio_to
572
+ void main() {
573
+ #pragma mapbox: initialize lowp float blur
574
+ #pragma mapbox: initialize lowp float opacity
575
+ #pragma mapbox: initialize lowp float offset
576
+ #pragma mapbox: initialize mediump float gapwidth
577
+ #pragma mapbox: initialize mediump float width
578
+ #pragma mapbox: initialize lowp float floorwidth
579
+ #pragma mapbox: initialize mediump vec4 pattern_from
580
+ #pragma mapbox: initialize mediump vec4 pattern_to
581
+ #pragma mapbox: initialize lowp float pixel_ratio_from
582
+ #pragma mapbox: initialize lowp float pixel_ratio_to
583
+ float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
584
+ #ifdef GLOBE
585
+ v_depth=gl_Position.z/gl_Position.w;
586
+ #endif
587
+ #ifdef TERRAIN3D
588
+ v_gamma_scale=1.0;
589
+ #else
590
+ float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
591
+ #endif
592
+ v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:rr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;
593
+ #ifdef GLOBE
594
+ in float v_depth;
595
+ #endif
596
+ #pragma mapbox: define highp vec4 color
597
+ #pragma mapbox: define lowp float blur
598
+ #pragma mapbox: define lowp float opacity
599
+ #pragma mapbox: define mediump float width
600
+ #pragma mapbox: define lowp float floorwidth
601
+ void main() {
602
+ #pragma mapbox: initialize highp vec4 color
603
+ #pragma mapbox: initialize lowp float blur
604
+ #pragma mapbox: initialize lowp float opacity
605
+ #pragma mapbox: initialize mediump float width
606
+ #pragma mapbox: initialize lowp float floorwidth
607
+ float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity);
608
+ #ifdef GLOBE
609
+ if (v_depth > 1.0) {discard;}
610
+ #endif
611
+ #ifdef OVERDRAW_INSPECTOR
612
+ fragColor=vec4(1.0);
613
+ #endif
614
+ }`,`
615
+ #define scale 0.015873016
616
+ #define LINE_DISTANCE_SCALE 2.0
617
+ in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale;
618
+ #ifdef GLOBE
619
+ out float v_depth;
620
+ #endif
621
+ #pragma mapbox: define highp vec4 color
622
+ #pragma mapbox: define lowp float blur
623
+ #pragma mapbox: define lowp float opacity
624
+ #pragma mapbox: define mediump float gapwidth
625
+ #pragma mapbox: define lowp float offset
626
+ #pragma mapbox: define mediump float width
627
+ #pragma mapbox: define lowp float floorwidth
628
+ void main() {
629
+ #pragma mapbox: initialize highp vec4 color
630
+ #pragma mapbox: initialize lowp float blur
631
+ #pragma mapbox: initialize lowp float opacity
632
+ #pragma mapbox: initialize mediump float gapwidth
633
+ #pragma mapbox: initialize lowp float offset
634
+ #pragma mapbox: initialize mediump float width
635
+ #pragma mapbox: initialize lowp float floorwidth
636
+ float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude;
637
+ #ifdef GLOBE
638
+ v_depth=gl_Position.z/gl_Position.w;
639
+ #endif
640
+ #ifdef TERRAIN3D
641
+ v_gamma_scale=1.0;
642
+ #else
643
+ float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
644
+ #endif
645
+ 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:rr(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
646
+ #ifdef OVERDRAW_INSPECTOR
647
+ fragColor=vec4(1.0);
648
+ #endif
649
+ }`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5;
650
+ #ifdef GLOBE
651
+ if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;}
652
+ #endif
653
+ v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:rr(`uniform sampler2D u_texture;in vec2 v_tex;in float v_fade_opacity;
654
+ #pragma mapbox: define lowp float opacity
655
+ void main() {
656
+ #pragma mapbox: initialize lowp float opacity
657
+ lowp float alpha=opacity*v_fade_opacity;fragColor=texture(u_texture,v_tex)*alpha;
658
+ #ifdef OVERDRAW_INSPECTOR
659
+ fragColor=vec4(1.0);
660
+ #endif
661
+ }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_fade_opacity;
662
+ #pragma mapbox: define lowp float opacity
663
+ void main() {
664
+ #pragma mapbox: initialize lowp float opacity
665
+ 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
666
+ camera_to_anchor_distance/u_camera_to_center_distance :
667
+ 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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
668
+ #ifdef GLOBE
669
+ if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
670
+ #endif
671
+ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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:rr(`#define SDF_PX 8.0
672
+ 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;in vec2 v_data0;in vec3 v_data1;
673
+ #pragma mapbox: define highp vec4 fill_color
674
+ #pragma mapbox: define highp vec4 halo_color
675
+ #pragma mapbox: define lowp float opacity
676
+ #pragma mapbox: define lowp float halo_width
677
+ #pragma mapbox: define lowp float halo_blur
678
+ void main() {
679
+ #pragma mapbox: initialize highp vec4 fill_color
680
+ #pragma mapbox: initialize highp vec4 halo_color
681
+ #pragma mapbox: initialize lowp float opacity
682
+ #pragma mapbox: initialize lowp float halo_width
683
+ #pragma mapbox: initialize lowp float halo_blur
684
+ float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}fragColor=color*(alpha*opacity*fade_opacity);
685
+ #ifdef OVERDRAW_INSPECTOR
686
+ fragColor=vec4(1.0);
687
+ #endif
688
+ }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1;
689
+ #pragma mapbox: define highp vec4 fill_color
690
+ #pragma mapbox: define highp vec4 halo_color
691
+ #pragma mapbox: define lowp float opacity
692
+ #pragma mapbox: define lowp float halo_width
693
+ #pragma mapbox: define lowp float halo_blur
694
+ void main() {
695
+ #pragma mapbox: initialize highp vec4 fill_color
696
+ #pragma mapbox: initialize highp vec4 halo_color
697
+ #pragma mapbox: initialize lowp float opacity
698
+ #pragma mapbox: initialize lowp float halo_width
699
+ #pragma mapbox: initialize lowp float halo_blur
700
+ 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
701
+ camera_to_anchor_distance/u_camera_to_center_distance :
702
+ 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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
703
+ #ifdef GLOBE
704
+ if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
705
+ #endif
706
+ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:rr(`#define SDF_PX 8.0
707
+ #define SDF 1.0
708
+ #define ICON 0.0
709
+ 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;in vec4 v_data0;in vec4 v_data1;
710
+ #pragma mapbox: define highp vec4 fill_color
711
+ #pragma mapbox: define highp vec4 halo_color
712
+ #pragma mapbox: define lowp float opacity
713
+ #pragma mapbox: define lowp float halo_width
714
+ #pragma mapbox: define lowp float halo_blur
715
+ void main() {
716
+ #pragma mapbox: initialize highp vec4 fill_color
717
+ #pragma mapbox: initialize highp vec4 halo_color
718
+ #pragma mapbox: initialize lowp float opacity
719
+ #pragma mapbox: initialize lowp float halo_width
720
+ #pragma mapbox: initialize lowp float halo_blur
721
+ float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;fragColor=texture(u_texture_icon,tex_icon)*alpha;
722
+ #ifdef OVERDRAW_INSPECTOR
723
+ fragColor=vec4(1.0);
724
+ #endif
725
+ return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);fragColor=color*(alpha*opacity*fade_opacity);
726
+ #ifdef OVERDRAW_INSPECTOR
727
+ fragColor=vec4(1.0);
728
+ #endif
729
+ }`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1;
730
+ #pragma mapbox: define highp vec4 fill_color
731
+ #pragma mapbox: define highp vec4 halo_color
732
+ #pragma mapbox: define lowp float opacity
733
+ #pragma mapbox: define lowp float halo_width
734
+ #pragma mapbox: define lowp float halo_blur
735
+ void main() {
736
+ #pragma mapbox: initialize highp vec4 fill_color
737
+ #pragma mapbox: initialize highp vec4 halo_color
738
+ #pragma mapbox: initialize lowp float opacity
739
+ #pragma mapbox: initialize lowp float halo_width
740
+ #pragma mapbox: initialize lowp float halo_blur
741
+ 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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
742
+ camera_to_anchor_distance/u_camera_to_center_distance :
743
+ 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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;
744
+ #ifdef GLOBE
745
+ if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);}
746
+ #endif
747
+ vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;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:rr("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,get_elevation(a_pos3d.xy)-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:rr("in 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() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:rr("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:rr("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:rr(`in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758
748
+ );color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:rr("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function rr(h,e){const r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,a=e.match(/in ([\w]+) ([\w]+)/g),l=h.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),d=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),g=d?d.concat(l):l,w={};return{fragmentSource:h=h.replace(r,(A,I,z,N,F)=>(w[F]=!0,I==="define"?`
749
+ #ifndef HAS_UNIFORM_u_${F}
750
+ in ${z} ${N} ${F};
751
+ #else
752
+ uniform ${z} ${N} u_${F};
753
+ #endif
754
+ `:`
755
+ #ifdef HAS_UNIFORM_u_${F}
756
+ ${z} ${N} ${F} = u_${F};
757
+ #endif
758
+ `)),vertexSource:e=e.replace(r,(A,I,z,N,F)=>{const Z=N==="float"?"vec2":"vec4",J=F.match(/color/)?"color":Z;return w[F]?I==="define"?`
759
+ #ifndef HAS_UNIFORM_u_${F}
760
+ uniform lowp float u_${F}_t;
761
+ in ${z} ${Z} a_${F};
762
+ out ${z} ${N} ${F};
763
+ #else
764
+ uniform ${z} ${N} u_${F};
765
+ #endif
766
+ `:J==="vec4"?`
767
+ #ifndef HAS_UNIFORM_u_${F}
768
+ ${F} = a_${F};
769
+ #else
770
+ ${z} ${N} ${F} = u_${F};
771
+ #endif
772
+ `:`
773
+ #ifndef HAS_UNIFORM_u_${F}
774
+ ${F} = unpack_mix_${J}(a_${F}, u_${F}_t);
775
+ #else
776
+ ${z} ${N} ${F} = u_${F};
777
+ #endif
778
+ `:I==="define"?`
779
+ #ifndef HAS_UNIFORM_u_${F}
780
+ uniform lowp float u_${F}_t;
781
+ in ${z} ${Z} a_${F};
782
+ #else
783
+ uniform ${z} ${N} u_${F};
784
+ #endif
785
+ `:J==="vec4"?`
786
+ #ifndef HAS_UNIFORM_u_${F}
787
+ ${z} ${N} ${F} = a_${F};
788
+ #else
789
+ ${z} ${N} ${F} = u_${F};
790
+ #endif
791
+ `:`
792
+ #ifndef HAS_UNIFORM_u_${F}
793
+ ${z} ${N} ${F} = unpack_mix_${J}(a_${F}, u_${F}_t);
794
+ #else
795
+ ${z} ${N} ${F} = u_${F};
796
+ #endif
797
+ `}),staticAttributes:a,staticUniforms:g}}class Mn{constructor(e,r,a){this.vertexBuffer=e,this.indexBuffer=r,this.segments=a}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var si=o.aG([{name:"a_pos",type:"Int16",components:2}]);const Ln="#define PROJECTION_MERCATOR",Nt="mercator";class vn{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return Nt}get shaderDefine(){return Ln}get shaderPreludeCode(){return oi.projectionMercator}get vertexShaderPreludeCode(){return oi.projectionMercator.vertexSource}get subdivisionGranularity(){return o.aH.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,a,l,d){if(this._cachedMesh)return this._cachedMesh;const g=new o.aI;g.emplaceBack(0,0),g.emplaceBack(o.Z,0),g.emplaceBack(0,o.Z),g.emplaceBack(o.Z,o.Z);const w=e.createVertexBuffer(g,si.members),A=o.aJ.simpleSegment(0,0,4,2),I=new o.aK;I.emplaceBack(1,0,2),I.emplaceBack(1,2,3);const z=e.createIndexBuffer(I);return this._cachedMesh=new Mn(w,z,A),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class Fi{constructor(e=0,r=0,a=0,l=0){if(isNaN(e)||e<0||isNaN(r)||r<0||isNaN(a)||a<0||isNaN(l)||l<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=r,this.left=a,this.right=l}interpolate(e,r,a){return r.top!=null&&e.top!=null&&(this.top=o.B.number(e.top,r.top,a)),r.bottom!=null&&e.bottom!=null&&(this.bottom=o.B.number(e.bottom,r.bottom,a)),r.left!=null&&e.left!=null&&(this.left=o.B.number(e.left,r.left,a)),r.right!=null&&e.right!=null&&(this.right=o.B.number(e.right,r.right,a)),this}getCenter(e,r){const a=o.ae((this.left+e-this.right)/2,0,e),l=o.ae((this.top+r-this.bottom)/2,0,r);return new o.P(a,l)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new Fi(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function ce(h,e){if(!h.renderWorldCopies||h.lngRange)return;const r=e.lng-h.center.lng;e.lng+=r>180?-360:r<-180?360:0}function ue(h){return Math.max(0,Math.floor(h))}class de{constructor(e,r,a,l,d,g){this._callbacks=e,this._tileSize=512,this._renderWorldCopies=g===void 0||!!g,this._minZoom=r||0,this._maxZoom=a||22,this._minPitch=l??0,this._maxPitch=d??60,this.setMaxBounds(),this._width=0,this._height=0,this._center=new o.Q(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ue(this._zoom),this._scale=o.ac(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new Fi,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,a){this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=ue(this._zoom),this._scale=o.ac(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new Fi(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!a&&e.autoCalculateNearFarZ,r&&this._constrain(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.getConstrained(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){e===void 0?e=!0:e===null&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new o.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){const r=o.aL(e,-180,180)*Math.PI/180;var a,l,d,g,w,A,I,z,N;this._bearingInRadians!==r&&(this._unmodified=!1,this._bearingInRadians=r,this._calcMatrices(),this._rotationMatrix=D(),a=this._rotationMatrix,d=-this._bearingInRadians,g=(l=this._rotationMatrix)[0],w=l[1],A=l[2],I=l[3],z=Math.sin(d),N=Math.cos(d),a[0]=g*N+A*z,a[1]=w*N+I*z,a[2]=g*-z+A*N,a[3]=w*-z+I*N)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){const r=o.ae(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){const r=e/180*Math.PI;this._rollInRadians!==r&&(this._unmodified=!1,this._rollInRadians=r,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return o.aM(this._fovInRadians)}setFov(e){e=o.ae(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=o.ab(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){const r=this.getConstrained(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=o.ac(r),this._constrain(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,r){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=r,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,r,a){this._unmodified=!1,this._edgeInsets.interpolate(e,r,a),this._constrain(),this._calcMatrices()}resize(e,r,a=!0){this._width=e,this._height=r,a&&this._constrain(),this._calcMatrices()}getMaxBounds(){return this._latRange&&this._latRange.length===2&&this._lngRange&&this._lngRange.length===2?new it([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]]):null}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this._lngRange=null,this._latRange=[-85.051129,o.af])}getConstrained(e,r){return this._callbacks.getConstrained(e,r)}getCameraQueryGeometry(e,r){if(r.length===1)return[r[0],e];{let a=e.x,l=e.y,d=e.x,g=e.y;for(const w of r)a=Math.min(a,w.x),l=Math.min(l,w.y),d=Math.max(d,w.x),g=Math.max(g,w.y);return[new o.P(a,l),new o.P(d,l),new o.P(d,g),new o.P(a,g),new o.P(a,l)]}}_constrain(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;const e=this._unmodified,{center:r,zoom:a}=this.getConstrained(this.center,this.zoom);this.setCenter(r),this.setZoom(a),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=o.ad(new Float64Array(16));o.M(e,e,[this._width/2,-this._height/2,1]),o.L(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=o.ad(new Float64Array(16)),o.M(e,e,[1,-1,1]),o.L(e,e,[-1,-1,0]),o.M(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,a,l){const d=a!==void 0?a:this.bearing,g=l=l!==void 0?l:this.pitch,w=o.$.fromLngLat(e,r),A=-Math.cos(o.ab(g)),I=Math.sin(o.ab(g)),z=I*Math.sin(o.ab(d)),N=-I*Math.cos(o.ab(d));let F=this.elevation;const Z=r-F;let J;A*Z>=0||Math.abs(A)<.1?(J=1e4,F=r+J*A):J=-Z/A;let oe,ne,se=o.aN(1,w.y),pe=0;do{if(pe+=1,pe>10)break;ne=J/se,oe=new o.$(w.x+z*ne,w.y+N*ne),se=1/oe.meterInMercatorCoordinateUnits()}while(Math.abs(J-ne*se)>1e-12);return{center:oe.toLngLat(),elevation:F,zoom:o.ah(this.height/2/Math.tan(this.fovInRadians/2)/ne/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;const r=o.ag(1,this.center.lat)*this.worldSize,a=this.cameraToCenterDistance/r,l=o.$.fromLngLat(this.center,this.elevation),d=Q(this.center,this.elevation,this.pitch,this.bearing,a);this._elevation=e;const g=this.calculateCenterFromCameraLngLatAlt(d.toLngLat(),o.aN(d.z,l.y),this.bearing,this.pitch);this._elevation=g.elevation,this._center=g.center,this.setZoom(g.zoom)}getCameraPoint(){const e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){const e=o.ag(1,this.center.lat)*this.worldSize;return Q(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];const r=e.canonical.z>=0?1<<e.canonical.z:Math.pow(2,e.canonical.z);return[e.canonical.x/r,e.canonical.y/r,1/r/o.Z,1/r/o.Z]}}class ve{constructor(e,r){this.min=e,this.max=r,this.center=o.aO([],o.aP([],this.min,this.max),.5)}quadrant(e){const r=[e%2==0,e<2],a=o.aQ(this.min),l=o.aQ(this.max);for(let d=0;d<r.length;d++)a[d]=r[d]?this.min[d]:this.center[d],l[d]=r[d]?this.center[d]:this.max[d];return l[2]=this.max[2],new ve(a,l)}distanceX(e){return Math.max(Math.min(this.max[0],e[0]),this.min[0])-e[0]}distanceY(e){return Math.max(Math.min(this.max[1],e[1]),this.min[1])-e[1]}intersectsFrustum(e){let r=!0;for(let a=0;a<e.planes.length;a++){const l=this.intersectsPlane(e.planes[a]);if(l===0)return 0;l===1&&(r=!1)}return r?2:e.aabb.min[0]>this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]<this.min[0]||e.aabb.max[1]<this.min[1]||e.aabb.max[2]<this.min[2]?0:1}intersectsPlane(e){let r=e[3],a=e[3];for(let l=0;l<3;l++)e[l]>0?(r+=e[l]*this.min[l],a+=e[l]*this.max[l]):(a+=e[l]*this.min[l],r+=e[l]*this.max[l]);return r>=0?2:a<0?0:1}}class Ee{distanceToTile2d(e,r,a,l){const d=l.distanceX([e,r]),g=l.distanceY([e,r]);return Math.hypot(d,g)}getWrap(e,r,a){return a}getTileAABB(e,r,a,l){var d,g;let w=a,A=a;if(l.terrain){const z=new o.Y(e.z,r,e.z,e.x,e.y),N=l.terrain.getMinMaxElevation(z);w=(d=N.minElevation)!==null&&d!==void 0?d:a,A=(g=N.maxElevation)!==null&&g!==void 0?g:a}const I=1<<e.z;return new ve([r+e.x/I,e.y/I,w],[r+(e.x+1)/I,(e.y+1)/I,A])}allowVariableZoom(e,r){const a=e.fov*(Math.abs(Math.cos(e.rollInRadians))*e.height+Math.abs(Math.sin(e.rollInRadians))*e.width)/e.height,l=o.ae(78.5-a/2,0,60);return!!r.terrain||e.pitch>l}allowWorldCopies(){return!0}recalculateCache(){}}class Ve{constructor(e,r,a){this.points=e,this.planes=r,this.aabb=a}static fromInvProjectionMatrix(e,r=1,a=0){const l=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(I=>{const z=1/(I=o.at([],I,e))[3]/r*l;return o.aR(I,I,[z,z,1/I[3],z])}),g=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(I=>{const z=o.aS([],d[I[0]],d[I[1]]),N=o.aS([],d[I[2]],d[I[1]]),F=o.aT([],o.aU([],z,N)),Z=-o.aV(F,d[I[1]]);return F.concat(Z)}),w=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],A=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(const I of d)for(let z=0;z<3;z++)w[z]=Math.min(w[z],I[z]),A[z]=Math.max(A[z],I[z]);return new Ve(d,g,new ve(w,A))}}class at{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,a=!0){this._helper.resize(e,r,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,r){}constructor(e,r,a,l,d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this._helper=new de({calcMatrices:()=>{this._calcMatrices()},getConstrained:(g,w)=>this.getConstrained(g,w)},e,r,a,l,d),this._coveringTilesDetailsProvider=new Ee}clone(){const e=new at;return e.apply(this),e}apply(e,r,a){this._helper.apply(e,r,a)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){const r=[new o.aW(0,e)];if(this._helper._renderWorldCopies){const a=this.screenPointToMercatorCoordinate(new o.P(0,0)),l=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,0)),d=this.screenPointToMercatorCoordinate(new o.P(this._helper._width,this._helper._height)),g=this.screenPointToMercatorCoordinate(new o.P(0,this._helper._height)),w=Math.floor(Math.min(a.x,l.x,d.x,g.x)),A=Math.floor(Math.max(a.x,l.x,d.x,g.x)),I=1;for(let z=w-I;z<=A+I;z++)z!==0&&r.push(new o.aW(z,e))}return r}getCameraFrustum(){return Ve.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){const r=this.screenPointToLocation(this.centerPoint,e),a=e?e.getElevationForLngLatZoom(r,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(a)}setLocationAtPoint(e,r){const a=o.ag(this.elevation,this.center.lat),l=this.screenPointToMercatorCoordinateAtZ(r,a),d=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,a),g=o.$.fromLngLat(e),w=new o.$(g.x-(l.x-d.x),g.y-(l.y-d.y));this.setCenter(w==null?void 0:w.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(o.$.fromLngLat(e),r.getElevationForLngLatZoom(e,this._helper._tileZoom),this._pixelMatrix3D):this.coordinatePoint(o.$.fromLngLat(e))}screenPointToLocation(e,r){var a;return(a=this.screenPointToMercatorCoordinate(e,r))===null||a===void 0?void 0:a.toLngLat()}screenPointToMercatorCoordinate(e,r){if(r){const a=r.pointCoordinate(e);if(a!=null)return a}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){const a=r||0,l=[e.x,e.y,0,1],d=[e.x,e.y,1,1];o.at(l,l,this._pixelMatrixInverse),o.at(d,d,this._pixelMatrixInverse);const g=l[3],w=d[3],A=l[1]/g,I=d[1]/w,z=l[2]/g,N=d[2]/w,F=z===N?0:(a-z)/(N-z);return new o.$(o.B.number(l[0]/g,d[0]/w,F)/this.worldSize,o.B.number(A,I,F)/this.worldSize,a)}coordinatePoint(e,r=0,a=this._pixelMatrix){const l=[e.x*this.worldSize,e.y*this.worldSize,r,1];return o.at(l,l,a),new o.P(l[0]/l[3],l[1]/l[3])}getBounds(){const e=Math.max(0,this._helper._height/2-ke(this));return new it().extend(this.screenPointToLocation(new o.P(0,e))).extend(this.screenPointToLocation(new o.P(this._helper._width,e))).extend(this.screenPointToLocation(new o.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new o.P(0,this._helper._height)))}isPointOnMapSurface(e,r){return r?r.pointCoordinate(e)!=null:e.y>this.height/2-ke(this)}calculatePosMatrix(e,r=!1,a){var l;const d=(l=e.key)!==null&&l!==void 0?l:o.aX(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),g=r?this._alignedPosMatrixCache:this._posMatrixCache;if(g.has(d)){const I=g.get(d);return a?I.f32:I.f64}const w=K(e,this.worldSize);o.N(w,r?this._alignedProjMatrix:this._viewProjMatrix,w);const A={f64:w,f32:new Float32Array(w)};return g.set(d,A),a?A.f32:A.f64}calculateFogMatrix(e){const r=e.key,a=this._fogMatrixCacheF32;if(a.has(r))return a.get(r);const l=K(e,this.worldSize);return o.N(l,this._fogMatrix,l),a.set(r,new Float32Array(l)),a.get(r)}getConstrained(e,r){r=o.ae(+r,this.minZoom,this.maxZoom);const a={center:new o.Q(e.lng,e.lat),zoom:r};let l=this._helper._lngRange;this._helper._renderWorldCopies||l!==null||(l=[-179.9999999999,180-1e-10]);const d=this.tileSize*o.ac(a.zoom);let g=0,w=d,A=0,I=d,z=0,N=0;const{x:F,y:Z}=this.size;if(this._helper._latRange){const _e=this._helper._latRange;g=o.S(_e[1])*d,w=o.S(_e[0])*d,w-g<Z&&(z=Z/(w-g))}l&&(A=o.aL(o.U(l[0])*d,0,d),I=o.aL(o.U(l[1])*d,0,d),I<A&&(I+=d),I-A<F&&(N=F/(I-A)));const{x:J,y:oe}=Bt(d,e);let ne,se;const pe=Math.max(N||0,z||0);if(pe){const _e=new o.P(N?(I+A)/2:J,z?(w+g)/2:oe);return a.center=xt(d,_e).wrap(),a.zoom+=o.ah(pe),a}if(this._helper._latRange){const _e=Z/2;oe-_e<g&&(se=g+_e),oe+_e>w&&(se=w-_e)}if(l){const _e=(A+I)/2;let ye=J;this._helper._renderWorldCopies&&(ye=o.aL(J,_e-d/2,_e+d/2));const be=F/2;ye-be<A&&(ne=A+be),ye+be>I&&(ne=I-be)}if(ne!==void 0||se!==void 0){const _e=new o.P(ne??J,se??oe);a.center=xt(d,_e).wrap()}return a}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}_calculateNearFarZIfNeeded(e,r,a){if(!this._helper.autoCalculateNearFarZ)return;const l=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),d=e-l*this._helper._pixelPerMeter/Math.cos(r),g=l<0?d:e,w=Math.PI/2+this.pitchInRadians,A=o.ab(this.fov)*(Math.abs(Math.cos(o.ab(this.roll)))*this.height+Math.abs(Math.sin(o.ab(this.roll)))*this.width)/this.height*(.5+a.y/this.height),I=Math.sin(A)*g/Math.sin(o.ae(Math.PI-w-A,.01,Math.PI-.01)),z=ke(this),N=Math.atan(z/this._helper.cameraToCenterDistance),F=o.ab(.75),Z=N>F?2*N*(.5+a.y/(2*z)):F,J=Math.sin(Z)*g/Math.sin(o.ae(Math.PI-w-Z,.01,Math.PI-.01)),oe=Math.min(I,J);this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*oe+g),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;const e=this.centerOffset,r=Bt(this.worldSize,this.center),a=r.x,l=r.y;this._helper._pixelPerMeter=o.ag(1,this.center.lat)*this.worldSize;const d=o.ab(Math.min(this.pitch,Pt)),g=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(d));let w;this._calculateNearFarZIfNeeded(g,d,e),w=new Float64Array(16),o.aY(w,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),o.an(this._invProjMatrix,w),w[8]=2*-e.x/this._helper._width,w[9]=2*e.y/this._helper._height,this._projectionMatrix=o.aZ(w),o.M(w,w,[1,-1,1]),o.L(w,w,[0,0,-this._helper.cameraToCenterDistance]),o.a_(w,w,-this.rollInRadians),o.a$(w,w,this.pitchInRadians),o.a_(w,w,-this.bearingInRadians),o.L(w,w,[-a,-l,0]),this._mercatorMatrix=o.M([],w,[this.worldSize,this.worldSize,this.worldSize]),o.M(w,w,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=o.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,w),o.L(w,w,[0,0,-this.elevation]),this._viewProjMatrix=w,this._invViewProjMatrix=o.an([],w);const A=[0,0,-1,1];o.at(A,A,this._invViewProjMatrix),this._cameraPosition=[A[0]/A[3],A[1]/A[3],A[2]/A[3]],this._fogMatrix=new Float64Array(16),o.aY(this._fogMatrix,this.fovInRadians,this.width/this.height,g,this._helper._farZ),this._fogMatrix[8]=2*-e.x/this.width,this._fogMatrix[9]=2*e.y/this.height,o.M(this._fogMatrix,this._fogMatrix,[1,-1,1]),o.L(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),o.a_(this._fogMatrix,this._fogMatrix,-this.rollInRadians),o.a$(this._fogMatrix,this._fogMatrix,this.pitchInRadians),o.a_(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),o.L(this._fogMatrix,this._fogMatrix,[-a,-l,0]),o.M(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),o.L(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=o.N(new Float64Array(16),this.clipSpaceToPixelsMatrix,w);const I=this._helper._width%2/2,z=this._helper._height%2/2,N=Math.cos(this.bearingInRadians),F=Math.sin(-this.bearingInRadians),Z=a-Math.round(a)+N*I+F*z,J=l-Math.round(l)+N*z+F*I,oe=new Float64Array(w);if(o.L(oe,oe,[Z>.5?Z-1:Z,J>.5?J-1:J,0]),this._alignedProjMatrix=oe,w=o.an(new Float64Array(16),this._pixelMatrix),!w)throw new Error("failed to invert matrix");this._pixelMatrixInverse=w,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;const e=this.screenPointToMercatorCoordinate(new o.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return o.at(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){const e=o.ag(1,this.center.lat)*this.worldSize;return Q(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){const a=o.$.fromLngLat(e),l=[a.x*this.worldSize,a.y*this.worldSize,r,1];return o.at(l,l,this._viewProjMatrix),l[2]/l[3]}getProjectionData(e){const{overscaledTileID:r,aligned:a,applyTerrainMatrix:l}=e,d=this._helper.getMercatorTileCoordinates(r),g=r?this.calculatePosMatrix(r,a,!0):null;let w;return w=r&&r.terrainRttPosMatrix32f&&l?r.terrainRttPosMatrix32f:g||o.b0(),{mainMatrix:w,tileMercatorCoords:d,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:w}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,r,a){return 1}transformLightDirection(e){return o.aQ(e)}getRayDirectionFromPixel(e){throw new Error("Not implemented.")}projectTileCoordinates(e,r,a,l){const d=this.calculatePosMatrix(a);let g;l?(g=[e,r,l(e,r),1],o.at(g,g,d)):(g=[e,r,0,1],_n(g,g,d));const w=g[3];return{point:new o.P(g[0]/w,g[1]/w),signedDistanceFromCamera:w,isOccluded:!1}}populateCache(e){for(const r of e)this.calculatePosMatrix(r)}getMatrixForModel(e,r){const a=o.$.fromLngLat(e,r),l=a.meterInMercatorCoordinateUnits(),d=o.b1();return o.L(d,d,[a.x,a.y,a.z]),o.a_(d,d,Math.PI),o.a$(d,d,Math.PI/2),o.M(d,d,[-l,l,l]),d}getProjectionDataForCustomLayer(e=!0){const r=new o.Y(0,0,0,0,0),a=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),l=K(r,this.worldSize);o.N(l,this._viewProjMatrix,l),a.tileMercatorCoords=[0,0,1,1];const d=[o.Z,o.Z,this.worldSize/this._helper.pixelsPerMeter],g=o.b2();return o.M(g,l,d),a.fallbackMatrix=g,a.mainMatrix=g,a}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function Je(){o.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function nt(h){if(h.useSlerp)if(h.k<1){const e=o.b3(h.startEulerAngles.roll,h.startEulerAngles.pitch,h.startEulerAngles.bearing),r=o.b3(h.endEulerAngles.roll,h.endEulerAngles.pitch,h.endEulerAngles.bearing),a=new Float64Array(4);o.b4(a,e,r,h.k);const l=o.b5(a);h.tr.setRoll(l.roll),h.tr.setPitch(l.pitch),h.tr.setBearing(l.bearing)}else h.tr.setRoll(h.endEulerAngles.roll),h.tr.setPitch(h.endEulerAngles.pitch),h.tr.setBearing(h.endEulerAngles.bearing);else h.tr.setRoll(o.B.number(h.startEulerAngles.roll,h.endEulerAngles.roll,h.k)),h.tr.setPitch(o.B.number(h.startEulerAngles.pitch,h.endEulerAngles.pitch,h.k)),h.tr.setBearing(o.B.number(h.startEulerAngles.bearing,h.endEulerAngles.bearing,h.k))}function Be(h,e,r,a,l){const d=l.padding,g=Bt(l.worldSize,r.getNorthWest()),w=Bt(l.worldSize,r.getNorthEast()),A=Bt(l.worldSize,r.getSouthEast()),I=Bt(l.worldSize,r.getSouthWest()),z=o.ab(-a),N=g.rotate(z),F=w.rotate(z),Z=A.rotate(z),J=I.rotate(z),oe=new o.P(Math.max(N.x,F.x,J.x,Z.x),Math.max(N.y,F.y,J.y,Z.y)),ne=new o.P(Math.min(N.x,F.x,J.x,Z.x),Math.min(N.y,F.y,J.y,Z.y)),se=oe.sub(ne),pe=(l.width-(d.left+d.right+e.left+e.right))/se.x,_e=(l.height-(d.top+d.bottom+e.top+e.bottom))/se.y;if(_e<0||pe<0)return void Je();const ye=Math.min(o.ah(l.scale*Math.min(pe,_e)),h.maxZoom),be=o.P.convert(h.offset),Ce=new o.P((e.left-e.right)/2,(e.top-e.bottom)/2).rotate(o.ab(a)),we=be.add(Ce).mult(l.scale/o.ac(ye));return{center:xt(l.worldSize,g.add(A).div(2).sub(we)),zoom:ye,bearing:a}}class Ke{get useGlobeControls(){return!1}handlePanInertia(e,r){return{easingOffset:e,easingCenter:r.center}}handleMapControlsRollPitchBearingZoom(e,r){e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta),e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta)}handleMapControlsPan(e,r,a){e.around.distSqr(r.centerPoint)<.01||r.setLocationAtPoint(a,e.around)}cameraForBoxAndBearing(e,r,a,l,d){return Be(e,r,a,l,d)}handleJumpToCenterZoom(e,r){e.zoom!==(r.zoom!==void 0?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),r.center!==void 0&&e.setCenter(o.Q.convert(r.center))}handleEaseTo(e,r){const a=e.zoom,l=e.padding,d={roll:e.roll,pitch:e.pitch,bearing:e.bearing},g={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},w=r.zoom!==void 0,A=!e.isPaddingEqual(r.padding);let I=!1;const z=w?+r.zoom:e.zoom;let N=e.centerPoint.add(r.offsetAsPoint);const F=e.screenPointToLocation(N),{center:Z,zoom:J}=e.getConstrained(o.Q.convert(r.center||F),z??a);ce(e,Z);const oe=Bt(e.worldSize,F),ne=Bt(e.worldSize,Z).sub(oe),se=o.ac(J-a);return I=J!==a,{easeFunc:pe=>{if(I&&e.setZoom(o.B.number(a,J,pe)),o.b6(d,g)||nt({startEulerAngles:d,endEulerAngles:g,tr:e,k:pe,useSlerp:d.roll!=g.roll}),A&&(e.interpolatePadding(l,r.padding,pe),N=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{const _e=o.ac(e.zoom-a),ye=J>a?Math.min(2,se):Math.max(.5,se),be=Math.pow(ye,1-pe),Ce=xt(e.worldSize,oe.add(ne.mult(pe*be)).mult(_e));e.setLocationAtPoint(e.renderWorldCopies?Ce.wrap():Ce,N)}},isZooming:I,elevationCenter:Z}}handleFlyTo(e,r){const a=r.zoom!==void 0,l=e.zoom,d=e.getConstrained(o.Q.convert(r.center||r.locationAtOffset),a?+r.zoom:l),g=d.center,w=d.zoom;ce(e,g);const A=Bt(e.worldSize,r.locationAtOffset),I=Bt(e.worldSize,g).sub(A),z=I.mag(),N=o.ac(w-l);let F;if(r.minZoom!==void 0){const Z=Math.min(+r.minZoom,l,w),J=e.getConstrained(g,Z).zoom;F=o.ac(J-l)}return{easeFunc:(Z,J,oe,ne)=>{e.setZoom(Z===1?w:l+o.ah(J));const se=Z===1?g:xt(e.worldSize,A.add(I.mult(oe)).mult(J));e.setLocationAtPoint(e.renderWorldCopies?se.wrap():se,ne)},scaleOfZoom:N,targetCenter:g,scaleOfMinZoom:F,pixelPathLength:z}}}class Ye{constructor(e,r,a){this.blendFunction=e,this.blendColor=r,this.mask=a}}Ye.Replace=[1,0],Ye.disabled=new Ye(Ye.Replace,o.b7.transparent,[!1,!1,!1,!1]),Ye.unblended=new Ye(Ye.Replace,o.b7.transparent,[!0,!0,!0,!0]),Ye.alphaBlended=new Ye([1,771],o.b7.transparent,[!0,!0,!0,!0]);const ft=2305;class ht{constructor(e,r,a){this.enable=e,this.mode=r,this.frontFace=a}}ht.disabled=new ht(!1,1029,ft),ht.backCCW=new ht(!0,1029,ft),ht.frontCCW=new ht(!0,1028,ft);class ot{constructor(e,r,a){this.func=e,this.mask=r,this.range=a}}ot.ReadOnly=!1,ot.ReadWrite=!0,ot.disabled=new ot(519,ot.ReadOnly,[0,1]);const Kt=7680;class pt{constructor(e,r,a,l,d,g){this.test=e,this.ref=r,this.mask=a,this.fail=l,this.depthFail=d,this.pass=g}}pt.disabled=new pt({func:519,mask:0},0,0,Kt,Kt,Kt);const Ut=new WeakMap;function br(h){var e;if(Ut.has(h))return Ut.get(h);{const r=(e=h.getParameter(h.VERSION))===null||e===void 0?void 0:e.startsWith("WebGL 2.0");return Ut.set(h,r),r}}class ho{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;const r=e.context,a=r.gl;this._texFormat=a.RGBA,this._texType=a.UNSIGNED_BYTE;const l=new o.aI;l.emplaceBack(-1,-1),l.emplaceBack(2,-1),l.emplaceBack(-1,2);const d=new o.aK;d.emplaceBack(0,1,2),this._fullscreenTriangle=new Mn(r.createVertexBuffer(l,si.members),r.createIndexBuffer(d),o.aJ.simpleSegment(0,0,l.length,d.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(a.TEXTURE1);const g=a.createTexture();a.bindTexture(a.TEXTURE_2D,g),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST),a.texImage2D(a.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(g),br(a)&&(this._pbo=a.createBuffer(),a.bindBuffer(a.PIXEL_PACK_BUFFER,this._pbo),a.bufferData(a.PIXEL_PACK_BUFFER,4,a.STREAM_READ),a.bindBuffer(a.PIXEL_PACK_BUFFER,null))}destroy(){const e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,r){const a=this._updateCount;return this._readbackQueue?a>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():a>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,r),this._updateCount++,this._measuredError}_bindFramebuffer(){const e=this._cachedRenderContext.context,r=e.gl;e.activeTexture.set(r.TEXTURE1),r.bindTexture(r.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){const a=this._cachedRenderContext.context,l=a.gl;if(this._bindFramebuffer(),a.viewport.set([0,0,this._texWidth,this._texHeight]),a.clear({color:o.b7.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(a,l.TRIANGLES,ot.disabled,pt.disabled,Ye.unblended,ht.disabled,((d,g)=>({u_input:d,u_output_expected:g}))(e,r),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&br(l)){l.bindBuffer(l.PIXEL_PACK_BUFFER,this._pbo),l.readBuffer(l.COLOR_ATTACHMENT0),l.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),l.bindBuffer(l.PIXEL_PACK_BUFFER,null);const d=l.fenceSync(l.SYNC_GPU_COMMANDS_COMPLETE,0);l.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:d}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){const e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&br(e)){const r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return o.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=ho._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let r=0;return r+=e[0]/256,r+=e[1]/65536,r+=e[2]/16777216,e[3]<127&&(r=-r),r/128}}const Rn=o.Z/128;function an(h,e){const r=h.granularity!==void 0?Math.max(h.granularity,1):1,a=r+(h.generateBorders?2:0),l=r+(h.extendToNorthPole||h.generateBorders?1:0)+(h.extendToSouthPole||h.generateBorders?1:0),d=a+1,g=l+1,w=h.generateBorders?-1:0,A=h.generateBorders||h.extendToNorthPole?-1:0,I=r+(h.generateBorders?1:0),z=r+(h.generateBorders||h.extendToSouthPole?1:0),N=d*g,F=a*l*6,Z=d*g>65536;if(Z&&e==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");const J=Z||e==="32bit",oe=new Int16Array(2*N);let ne=0;for(let _e=A;_e<=z;_e++)for(let ye=w;ye<=I;ye++){let be=ye/r*o.Z;ye===-1&&(be=-64),ye===r+1&&(be=o.Z+Rn);let Ce=_e/r*o.Z;_e===-1&&(Ce=h.extendToNorthPole?o.b9:-64),_e===r+1&&(Ce=h.extendToSouthPole?o.ba:o.Z+Rn),oe[ne++]=be,oe[ne++]=Ce}const se=J?new Uint32Array(F):new Uint16Array(F);let pe=0;for(let _e=0;_e<l;_e++)for(let ye=0;ye<a;ye++){const be=ye+1+_e*d,Ce=ye+(_e+1)*d,we=ye+1+(_e+1)*d;se[pe++]=ye+_e*d,se[pe++]=Ce,se[pe++]=be,se[pe++]=be,se[pe++]=Ce,se[pe++]=we}return{vertices:oe.buffer.slice(0),indices:se.buffer.slice(0),uses32bitIndices:J}}const Dn=new o.aH({fill:new o.bb(128,2),line:new o.bb(512,0),tile:new o.bb(128,32),stencil:new o.bb(128,1),circle:3});class po{constructor(){this._tileMeshCache={},this._errorCorrectionUsable=0,this._errorMeasurementLastValue=0,this._errorCorrectionPreviousValue=0,this._errorMeasurementLastChangeTime=-1e3}get name(){return"vertical-perspective"}get transitionState(){return 1}get useSubdivision(){return!0}get shaderVariantName(){return"globe"}get shaderDefine(){return"#define GLOBE"}get shaderPreludeCode(){return oi.projectionGlobe}get vertexShaderPreludeCode(){return oi.projectionMercator.vertexSource}get subdivisionGranularity(){return Dn}get useGlobeControls(){return!0}get latitudeErrorCorrectionRadians(){return this._errorCorrectionUsable}destroy(){this._errorMeasurement&&this._errorMeasurement.destroy()}updateGPUdependent(e){this._errorMeasurement||(this._errorMeasurement=new ho(e));const r=o.S(this._errorQueryLatitudeDegrees),a=2*Math.atan(Math.exp(Math.PI-r*Math.PI*2))-.5*Math.PI,l=this._errorMeasurement.updateErrorLoop(r,a),d=L.now();l!==this._errorMeasurementLastValue&&(this._errorCorrectionPreviousValue=this._errorCorrectionUsable,this._errorMeasurementLastValue=l,this._errorMeasurementLastChangeTime=d);const g=Math.min(Math.max((d-this._errorMeasurementLastChangeTime)/1e3/.5,0),1);this._errorCorrectionUsable=o.bc(this._errorCorrectionPreviousValue,-this._errorMeasurementLastValue,o.bd(g))}_getMeshKey(e){return`${e.granularity.toString(36)}_${e.generateBorders?"b":""}${e.extendToNorthPole?"n":""}${e.extendToSouthPole?"s":""}`}getMeshFromTileID(e,r,a,l,d){const g=(d==="stencil"?Dn.stencil:Dn.tile).getGranularityForZoomLevel(r.z);return this._getMesh(e,{granularity:g,generateBorders:a,extendToNorthPole:r.y===0&&l,extendToSouthPole:r.y===(1<<r.z)-1&&l})}_getMesh(e,r){const a=this._getMeshKey(r);if(a in this._tileMeshCache)return this._tileMeshCache[a];const l=function(d,g){const w=an(g,"16bit"),A=o.aI.deserialize({arrayBuffer:w.vertices,length:w.vertices.byteLength/2/2}),I=o.aK.deserialize({arrayBuffer:w.indices,length:w.indices.byteLength/2/3});return new Mn(d.createVertexBuffer(A,si.members),d.createIndexBuffer(I),o.aJ.simpleSegment(0,0,A.length,I.length))}(e,r);return this._tileMeshCache[a]=l,l}recalculate(e){}hasTransition(){const e=L.now();let r=!1;return r=r||(e-this._errorMeasurementLastChangeTime)/1e3<.7,r=r||this._errorMeasurement&&this._errorMeasurement.awaitingQuery,r}setErrorQueryLatitudeDegrees(e){this._errorQueryLatitudeDegrees=e}}const ss=new o.r({type:new o.D(o.v.projection.type)});class Qs extends o.E{constructor(e){super(),this._transitionable=new o.T(ss),this.setProjection(e),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new o.C(0)),this._mercatorProjection=new vn,this._verticalPerspectiveProjection=new po}get transitionState(){const e=this.properties.get("type");if(typeof e=="string"&&e==="mercator")return 0;if(typeof e=="string"&&e==="vertical-perspective")return 1;if(e instanceof o.be){if(e.from==="vertical-perspective"&&e.to==="mercator")return 1-e.transition;if(e.from==="mercator"&&e.to==="vertical-perspective")return e.transition}return 1}get useGlobeRendering(){return this.transitionState>0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,r,a,l,d){return this.currentProjection.getMeshFromTileID(e,r,a,l,d)}setProjection(e){this._transitionable.setValue("type",(e==null?void 0:e.type)||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function as(h){const e=mo(h.worldSize,h.center.lat);return 2*Math.PI*e}function fo(h,e,r,a,l){const d=1/(1<<l),g=e/o.Z*d+a*d,w=o.bg((h/o.Z*d+r*d)*Math.PI*2+Math.PI,2*Math.PI),A=2*Math.atan(Math.exp(Math.PI-g*Math.PI*2))-.5*Math.PI,I=Math.cos(A),z=new Float64Array(3);return z[0]=Math.sin(w)*I,z[1]=Math.sin(A),z[2]=Math.cos(w)*I,z}function ai(h){return function(e,r){const a=Math.cos(r),l=new Float64Array(3);return l[0]=Math.sin(e)*a,l[1]=Math.sin(r),l[2]=Math.cos(e)*a,l}(h.lng*Math.PI/180,h.lat*Math.PI/180)}function mo(h,e){return h/(2*Math.PI)/Math.cos(e*Math.PI/180)}function ls(h){const e=Math.asin(h[1])/Math.PI*180,r=Math.sqrt(h[0]*h[0]+h[2]*h[2]);if(r>1e-6){const a=h[0]/r,l=Math.acos(h[2]/r),d=(a>0?l:-l)/Math.PI*180;return new o.Q(o.aL(d,-180,180),e)}return new o.Q(0,e)}function Xn(h){return Math.cos(h*Math.PI/180)}function li(h,e){const r=Xn(h),a=Xn(e);return o.ah(a/r)}function Ys(h,e){const r=h.rotate(e.bearingInRadians),a=e.zoom+li(e.center.lat,0),l=o.bc(1/Xn(e.center.lat),1/Xn(Math.min(Math.abs(e.center.lat),60)),o.bf(a,7,3,0,1)),d=360/as({worldSize:e.worldSize,center:{lat:e.center.lat}});return new o.Q(e.center.lng-r.x*d*l,o.ae(e.center.lat+r.y*d,-85.051129,o.af))}function $s(h){const e=.5*h,r=Math.sin(e),a=Math.cos(e);return Math.log(r+a)-Math.log(a-r)}function _c(h,e,r,a){const l=h.lat+r*a;if(Math.abs(r)>1){const d=(Math.sign(h.lat+r)!==Math.sign(h.lat)?-Math.abs(h.lat):Math.abs(h.lat))*Math.PI/180,g=Math.abs(h.lat+r)*Math.PI/180,w=$s(d+a*(g-d)),A=$s(d),I=$s(g);return new o.Q(h.lng+e*((w-A)/(I-A)),l)}return new o.Q(h.lng+e*a,l)}class xh{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._aabbFactory=e}recalculateCache(){if(!this._hadAnyChanges)return;const e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileAABB(e,r,a,l){const d=`${e.z}_${e.x}_${e.y}`,g=this._cache.get(d);if(g)return g;const w=this._cachePrevious.get(d);if(w)return this._cache.set(d,w),w;const A=this._aabbFactory(e,r,a,l);return this._cache.set(d,A),this._hadAnyChanges=!0,A}}function Si(h,e,r){const a=h-e;return a<0?-a:Math.max(0,a-r)}function cs(h,e,r,a,l){const d=h-r;let g;return g=d<0?Math.min(-d,1+d-l):d>1?Math.min(Math.max(d-l,0),1-d):0,Math.max(g,Si(e,a,l))}class xn{constructor(){this._aabbCache=new xh(this._computeTileAABB)}recalculateCache(){this._aabbCache.recalculateCache()}distanceToTile2d(e,r,a,l){const d=1<<a.z,g=1/d,w=a.x/d,A=a.y/d;let I=2;return I=Math.min(I,cs(e,r,w,A,g)),I=Math.min(I,cs(e,r,w+.5,-A-g,g)),I=Math.min(I,cs(e,r,w+.5,2-A-g,g)),I}getWrap(e,r,a){const l=1<<r.z,d=1/l,g=r.x/l,w=Si(e.x,g,d),A=Si(e.x,g-1,d),I=Si(e.x,g+1,d),z=Math.min(w,A,I);return z===I?1:z===A?-1:0}allowVariableZoom(e,r){return Pe(e,r)>4}allowWorldCopies(){return!1}getTileAABB(e,r,a,l){return this._aabbCache.getTileAABB(e,r,a,l)}_computeTileAABB(e,r,a,l){if(e.z<=0)return new ve([-1,-1,-1],[1,1,1]);if(e.z===1)return new ve([e.x===0?-1:0,e.y===0?0:-1,-1],[e.x===0?0:1,e.y===0?1:0,1]);{const d=[fo(0,0,e.x,e.y,e.z),fo(o.Z,0,e.x,e.y,e.z),fo(o.Z,o.Z,e.x,e.y,e.z),fo(0,o.Z,e.x,e.y,e.z)],g=[1,1,1],w=[-1,-1,-1];for(const A of d)for(let I=0;I<3;I++)g[I]=Math.min(g[I],A[I]),w[I]=Math.max(w[I],A[I]);if(e.y===0||e.y===(1<<e.z)-1){const A=[0,e.y===0?1:-1,0];for(let I=0;I<3;I++)g[I]=Math.min(g[I],A[I]),w[I]=Math.max(w[I],A[I])}return new ve(g,w)}}}class go{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r){this._helper.resize(e,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e){}constructor(){this._cachedClippingPlane=o.bk(),this._projectionMatrix=o.b1(),this._globeViewProjMatrix32f=o.b0(),this._globeViewProjMatrixNoCorrection=o.b1(),this._globeViewProjMatrixNoCorrectionInverted=o.b1(),this._globeProjMatrixInverted=o.b1(),this._cameraPosition=o.bh(),this._globeLatitudeErrorCorrectionRadians=0,this._helper=new de({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._coveringTilesDetailsProvider=new xn}clone(){const e=new go;return e.apply(this),e}apply(e,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){const e=o.bh();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){const{overscaledTileID:r,applyGlobeMatrix:a}=e,l=this._helper.getMercatorTileCoordinates(r);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:l,clippingPlane:this._cachedClippingPlane,projectionTransition:a?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){const r=this.pitchInRadians,a=this.cameraToCenterDistance/e,l=Math.sin(r)*a,d=Math.cos(r)*a+1,g=1/Math.sqrt(l*l+d*d)*1;let w=-l,A=d;const I=Math.sqrt(w*w+A*A);w/=I,A/=I;const z=[0,w,A];o.bl(z,z,[0,0,0],-this.bearingInRadians),o.bm(z,z,[0,0,0],-1*this.center.lat*Math.PI/180),o.bn(z,z,[0,0,0],this.center.lng*Math.PI/180);const N=1/o.bo(z);return o.aO(z,z,N),[...z,-g*N]}isLocationOccluded(e){return!this.isSurfacePointVisible(ai(e))}transformLightDirection(e){const r=this._helper._center.lng*Math.PI/180,a=this._helper._center.lat*Math.PI/180,l=Math.cos(a),d=[Math.sin(r)*l,Math.sin(a),Math.cos(r)*l],g=[d[2],0,-d[0]],w=[0,0,0];o.aU(w,g,d),o.aT(g,g),o.aT(w,w);const A=[0,0,0];return o.aT(A,[g[0]*e[0]+w[0]*e[1]+d[0]*e[2],g[1]*e[0]+w[1]*e[1]+d[1]*e[2],g[2]*e[0]+w[2]*e[1]+d[2]*e[2]]),A}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,a){const l=function(w,A,I){const z=1/(1<<I.z);return new o.$(w/o.Z*z+I.x*z,A/o.Z*z+I.y*z)}(e,r,a.canonical),d=(g=l.y,[o.bg(l.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-g*Math.PI*2))-.5*Math.PI]);var g;return this.getCircleRadiusCorrection()/Math.cos(d[1])}projectTileCoordinates(e,r,a,l){const d=a.canonical,g=fo(e,r,d.x,d.y,d.z),w=1+(l?l(e,r):0)/o.bu,A=[g[0]*w,g[1]*w,g[2]*w,1];o.at(A,A,this._globeViewProjMatrixNoCorrection);const I=this._cachedClippingPlane,z=I[0]*g[0]+I[1]*g[1]+I[2]*g[2]+I[3]<0;return{point:new o.P(A[0]/A[3],A[1]/A[3]),signedDistanceFromCamera:A[3],isOccluded:z}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;const e=mo(this.worldSize,this.center.lat),r=o.b2(),a=o.b2();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),o.aY(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);const l=this.centerOffset;r[8]=2*-l.x/this._helper._width,r[9]=2*l.y/this._helper._height,this._projectionMatrix=o.aZ(r),this._globeProjMatrixInverted=o.b2(),o.an(this._globeProjMatrixInverted,r),o.L(r,r,[0,0,-this.cameraToCenterDistance]),o.a_(r,r,this.rollInRadians),o.a$(r,r,-this.pitchInRadians),o.a_(r,r,this.bearingInRadians),o.L(r,r,[0,0,-e]);const d=o.bh();d[0]=e,d[1]=e,d[2]=e,o.a$(a,r,this.center.lat*Math.PI/180),o.bp(a,a,-this.center.lng*Math.PI/180),o.M(a,a,d),this._globeViewProjMatrixNoCorrection=a,o.a$(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),o.bp(r,r,-this.center.lng*Math.PI/180),o.M(r,r,d),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=o.b2(),o.an(this._globeViewProjMatrixNoCorrectionInverted,a);const g=o.bh();this._cameraPosition=o.bh(),this._cameraPosition[2]=this.cameraToCenterDistance/e,o.bl(this._cameraPosition,this._cameraPosition,g,-this.rollInRadians),o.bm(this._cameraPosition,this._cameraPosition,g,this.pitchInRadians),o.bl(this._cameraPosition,this._cameraPosition,g,-this.bearingInRadians),o.aP(this._cameraPosition,this._cameraPosition,[0,0,1]),o.bm(this._cameraPosition,this._cameraPosition,g,-this.center.lat*Math.PI/180),o.bn(this._cameraPosition,this._cameraPosition,g,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);const w=o.aZ(this._globeViewProjMatrixNoCorrectionInverted);o.M(w,w,[1,1,-1]),this._cachedFrustum=Ve.fromInvProjectionMatrix(w)}calculateFogMatrix(e){o.w("calculateFogMatrix is not supported on globe projection.");const r=o.b2();return o.ad(r),r}getVisibleUnwrappedCoordinates(e){return[new o.aW(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&o.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;const a=ai(e);o.aO(a,a,1+r/o.bu);const l=o.bk();return o.at(l,[a[0],a[1],a[2],1],this._globeViewProjMatrixNoCorrection),l[2]/l[3]}populateCache(e){}getBounds(){const e=.5*this.width,r=.5*this.height,a=[new o.P(0,0),new o.P(e,0),new o.P(this.width,0),new o.P(this.width,r),new o.P(this.width,this.height),new o.P(e,this.height),new o.P(0,this.height),new o.P(0,r)],l=[];for(const N of a)l.push(this.unprojectScreenPoint(N));let d=0,g=0,w=0,A=0;const I=this.center;for(const N of l){const F=o.bq(I.lng,N.lng),Z=o.bq(I.lat,N.lat);F<g&&(g=F),F>d&&(d=F),Z<A&&(A=Z),Z>w&&(w=Z)}const z=[I.lng+g,I.lat+A,I.lng+d,I.lat+w];return this.isSurfacePointOnScreen([0,1,0])&&(z[3]=90,z[0]=-180,z[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(z[1]=-90,z[0]=-180,z[2]=180),new it(z)}getConstrained(e,r){const a=o.ae(e.lat,-85.051129,o.af),l=o.ae(+r,this.minZoom+li(0,a),this.maxZoom);return{center:new o.Q(e.lng,a),zoom:l}}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}setLocationAtPoint(e,r){const a=ai(this.unprojectScreenPoint(r)),l=ai(e),d=o.bh();o.br(d);const g=o.bh();o.bn(g,a,d,-this.center.lng*Math.PI/180),o.bm(g,g,d,this.center.lat*Math.PI/180);const w=l[0]*l[0]+l[2]*l[2],A=g[0]*g[0];if(w<A)return;const I=Math.sqrt(w-A),z=-I,N=o.bs(l[0],l[2],g[0],I),F=o.bs(l[0],l[2],g[0],z),Z=o.bh();o.bn(Z,l,d,-N);const J=o.bs(Z[1],Z[2],g[1],g[2]),oe=o.bh();o.bn(oe,l,d,-F);const ne=o.bs(oe[1],oe[2],g[1],g[2]),se=.5*Math.PI,pe=J>=-se&&J<=se,_e=ne>=-se&&ne<=se;let ye,be;if(pe&&_e){const We=this.center.lng*Math.PI/180,Fe=this.center.lat*Math.PI/180;o.bv(N,We)+o.bv(J,Fe)<o.bv(F,We)+o.bv(ne,Fe)?(ye=N,be=J):(ye=F,be=ne)}else if(pe)ye=N,be=J;else{if(!_e)return;ye=F,be=ne}const Ce=ye/Math.PI*180,we=be/Math.PI*180,Re=this.center.lat;this.setCenter(new o.Q(Ce,o.ae(we,-90,90))),this.setZoom(this.zoom+li(Re,this.center.lat))}locationToScreenPoint(e,r){const a=ai(e);if(r){const l=r.getElevationForLngLatZoom(e,this._helper._tileZoom);o.aO(a,a,1+l/o.bu)}return this._projectSurfacePointToScreen(a)}_projectSurfacePointToScreen(e){const r=o.bk();return o.at(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],new o.P((.5*r[0]+.5)*this.width,(.5*-r[1]+.5)*this.height)}screenPointToMercatorCoordinate(e,r){if(r){const a=r.pointCoordinate(e);if(a)return a}return o.$.fromLngLat(this.unprojectScreenPoint(e))}screenPointToLocation(e,r){var a;return(a=this.screenPointToMercatorCoordinate(e,r))===null||a===void 0?void 0:a.toLngLat()}isPointOnMapSurface(e,r){const a=this._cameraPosition,l=this.getRayDirectionFromPixel(e);return!!this.rayPlanetIntersection(a,l)}getRayDirectionFromPixel(e){const r=o.bk();r[0]=e.x/this.width*2-1,r[1]=-1*(e.y/this.height*2-1),r[2]=1,r[3]=1,o.at(r,r,this._globeViewProjMatrixNoCorrectionInverted),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3];const a=o.bh();a[0]=r[0]-this._cameraPosition[0],a[1]=r[1]-this._cameraPosition[1],a[2]=r[2]-this._cameraPosition[2];const l=o.bh();return o.aT(l,a),l}isSurfacePointVisible(e){const r=this._cachedClippingPlane;return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]>=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;const r=o.bk();return o.at(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){const a=o.aV(e,r),l=o.bh(),d=o.bh();o.aO(d,r,a),o.aS(l,e,d);const g=1-o.aV(l,l);if(g<0)return null;const w=o.aV(e,e)-1,A=-a+(a<0?1:-1)*Math.sqrt(g),I=w/A,z=A;return{tMin:Math.min(I,z),tMax:Math.max(I,z)}}unprojectScreenPoint(e){const r=this._cameraPosition,a=this.getRayDirectionFromPixel(e),l=this.rayPlanetIntersection(r,a);if(l){const z=o.bh();o.aP(z,r,[a[0]*l.tMin,a[1]*l.tMin,a[2]*l.tMin]);const N=o.bh();return o.aT(N,z),ls(N)}const d=this._cachedClippingPlane,g=d[0]*a[0]+d[1]*a[1]+d[2]*a[2],w=-o.bt(d,r)/g,A=o.bh();if(w>0)o.aP(A,r,[a[0]*w,a[1]*w,a[2]*w]);else{const z=o.bh();o.aP(z,r,[2*a[0],2*a[1],2*a[2]]);const N=o.bt(this._cachedClippingPlane,z);o.aS(A,z,[this._cachedClippingPlane[0]*N,this._cachedClippingPlane[1]*N,this._cachedClippingPlane[2]*N])}const I=function(z){const N=o.bh();return N[0]=z[0]*-z[3],N[1]=z[1]*-z[3],N[2]=z[2]*-z[3],{center:N,radius:Math.sqrt(1-z[3]*z[3])}}(d);return ls(function(z,N,F){const Z=o.bh();o.aS(Z,F,z);const J=o.bh();return o.bi(J,z,Z,N/o.bj(Z)),J}(I.center,I.radius,A))}getMatrixForModel(e,r){const a=o.Q.convert(e),l=1/o.bu,d=o.b1();return o.bp(d,d,a.lng/180*Math.PI),o.a$(d,d,-a.lat/180*Math.PI),o.L(d,d,[0,0,1+r/o.bu]),o.a$(d,d,.5*Math.PI),o.M(d,d,[l,l,l]),d}getProjectionDataForCustomLayer(e=!0){const r=this.getProjectionData({overscaledTileID:new o.Y(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class us{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,r,a){return this._helper.interpolatePadding(e,r,a)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,r,a=!0){this._helper.resize(e,r,a)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}overrideNearFarZ(e,r){this._helper.overrideNearFarZ(e,r)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,r){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=r,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().recalculateCache(),this._mercatorTransform.getCoveringTilesDetailsProvider().recalculateCache()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this._helper=new de({calcMatrices:()=>{this._calcMatrices()},getConstrained:(e,r)=>this.getConstrained(e,r)}),this._globeness=1,this._mercatorTransform=new at,this._verticalPerspectiveTransform=new go}clone(){const e=new us;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this),e}apply(e){this._helper.apply(e),this._mercatorTransform.apply(this),this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){const r=this._mercatorTransform.getProjectionData(e),a=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?a.mainMatrix:r.mainMatrix,clippingPlane:a.clippingPlane,tileMercatorCoords:a.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:r.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return o.bc(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return o.bc(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,a){const l=this._mercatorTransform.getPitchedTextCorrection(e,r,a),d=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,a);return o.bc(l,d,this._globeness)}projectTileCoordinates(e,r,a,l){return this.currentTransform.projectTileCoordinates(e,r,a,l)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){return this.currentTransform.lngLatToCameraDepth(e,r)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}getConstrained(e,r){return this.currentTransform.getConstrained(e,r)}calculateCenterFromCameraLngLatAlt(e,r,a,l){return this._helper.calculateCenterFromCameraLngLatAlt(e,r,a,l)}setLocationAtPoint(e,r){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(e,r),void this.apply(this._mercatorTransform);this._verticalPerspectiveTransform.setLocationAtPoint(e,r),this.apply(this._verticalPerspectiveTransform)}locationToScreenPoint(e,r){return this.currentTransform.locationToScreenPoint(e,r)}screenPointToMercatorCoordinate(e,r){return this.currentTransform.screenPointToMercatorCoordinate(e,r)}screenPointToLocation(e,r){return this.currentTransform.screenPointToLocation(e,r)}isPointOnMapSurface(e,r){return this.currentTransform.isPointOnMapSurface(e,r)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,r){return this.currentTransform.getMatrixForModel(e,r)}getProjectionDataForCustomLayer(e=!0){const r=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return r;const a=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return a.fallbackMatrix=r.mainMatrix,a}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class Ji{get useGlobeControls(){return!0}handlePanInertia(e,r){const a=Ys(e,r);return Math.abs(a.lng-r.center.lng)>180&&(a.lng=r.center.lng+179.5*Math.sign(a.lng-r.center.lng)),{easingCenter:a,easingOffset:new o.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){const a=e.around,l=r.screenPointToLocation(a);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);const d=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);const g=r.zoom-d;if(g===0)return;const w=o.bq(r.center.lng,l.lng),A=w/(Math.abs(w/180)+1),I=o.bq(r.center.lat,l.lat),z=r.getRayDirectionFromPixel(a),N=r.cameraPosition,F=-1*o.aV(N,z),Z=o.bh();o.aP(Z,N,[z[0]*F,z[1]*F,z[2]*F]);const J=o.bo(Z)-1,oe=Math.exp(.5*-Math.max(J-.3,0)),ne=mo(r.worldSize,r.center.lat)/Math.min(r.width,r.height),se=o.bf(ne,.9,.5,1,.25),pe=(1-o.ac(-g))*Math.min(oe,se),_e=r.center.lat,ye=r.zoom,be=new o.Q(r.center.lng+A*pe,o.ae(r.center.lat+I*pe,-85.051129,o.af));r.setLocationAtPoint(l,a);const Ce=r.center,we=o.bf(Math.abs(w),45,85,0,1),Re=o.bf(ne,.75,.35,0,1),We=Math.pow(Math.max(we,Re),.25),Fe=o.bq(Ce.lng,be.lng),Ne=o.bq(Ce.lat,be.lat);r.setCenter(new o.Q(Ce.lng+Fe*We,Ce.lat+Ne*We).wrap()),r.setZoom(ye+li(_e,r.center.lat))}handleMapControlsPan(e,r,a){if(!e.panDelta)return;const l=r.center.lat,d=r.zoom;r.setCenter(Ys(e.panDelta,r).wrap()),r.setZoom(d+li(l,r.center.lat))}cameraForBoxAndBearing(e,r,a,l,d){const g=Be(e,r,a,l,d),w=r.left/d.width*2-1,A=(d.width-r.right)/d.width*2-1,I=r.top/d.height*-2+1,z=(d.height-r.bottom)/d.height*-2+1,N=o.bq(a.getWest(),a.getEast())<0,F=N?a.getEast():a.getWest(),Z=N?a.getWest():a.getEast(),J=Math.max(a.getNorth(),a.getSouth()),oe=Math.min(a.getNorth(),a.getSouth()),ne=F+.5*o.bq(F,Z),se=J+.5*o.bq(J,oe),pe=d.clone();pe.setCenter(g.center),pe.setBearing(g.bearing),pe.setPitch(0),pe.setRoll(0),pe.setZoom(g.zoom);const _e=pe.modelViewProjectionMatrix,ye=[ai(a.getNorthWest()),ai(a.getNorthEast()),ai(a.getSouthWest()),ai(a.getSouthEast()),ai(new o.Q(Z,se)),ai(new o.Q(F,se)),ai(new o.Q(ne,J)),ai(new o.Q(ne,oe))],be=ai(g.center);let Ce=Number.POSITIVE_INFINITY;for(const we of ye)w<0&&(Ce=Ji.getLesserNonNegativeNonNull(Ce,Ji.solveVectorScale(we,be,_e,"x",w))),A>0&&(Ce=Ji.getLesserNonNegativeNonNull(Ce,Ji.solveVectorScale(we,be,_e,"x",A))),I>0&&(Ce=Ji.getLesserNonNegativeNonNull(Ce,Ji.solveVectorScale(we,be,_e,"y",I))),z<0&&(Ce=Ji.getLesserNonNegativeNonNull(Ce,Ji.solveVectorScale(we,be,_e,"y",z)));if(Number.isFinite(Ce)&&Ce!==0)return g.zoom=pe.zoom+o.ah(Ce),g;Je()}handleJumpToCenterZoom(e,r){const a=e.center.lat,l=e.getConstrained(r.center?o.Q.convert(r.center):e.center,e.zoom).center;e.setCenter(l.wrap());const d=r.zoom!==void 0?+r.zoom:e.zoom+li(a,l.lat);e.zoom!==d&&e.setZoom(d)}handleEaseTo(e,r){const a=e.zoom,l=e.center,d=e.padding,g={roll:e.roll,pitch:e.pitch,bearing:e.bearing},w={roll:r.roll===void 0?e.roll:r.roll,pitch:r.pitch===void 0?e.pitch:r.pitch,bearing:r.bearing===void 0?e.bearing:r.bearing},A=r.zoom!==void 0,I=!e.isPaddingEqual(r.padding);let z=!1;const N=r.center?o.Q.convert(r.center):l,F=e.getConstrained(N,a).center;ce(e,F);const Z=e.clone();Z.setCenter(F),Z.setZoom(A?+r.zoom:a+li(l.lat,N.lat)),Z.setBearing(r.bearing);const J=new o.P(o.ae(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),o.ae(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));Z.setLocationAtPoint(F,J);const oe=(r.offset&&r.offsetAsPoint.mag())>0?Z.center:F,ne=A?+r.zoom:a+li(l.lat,oe.lat),se=a+li(l.lat,0),pe=ne+li(oe.lat,0),_e=o.bq(l.lng,oe.lng),ye=o.bq(l.lat,oe.lat),be=o.ac(pe-se);return z=ne!==a,{easeFunc:Ce=>{if(o.b6(g,w)||nt({startEulerAngles:g,endEulerAngles:w,tr:e,k:Ce,useSlerp:g.roll!=w.roll}),I&&e.interpolatePadding(d,r.padding,Ce),r.around)o.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{const we=pe>se?Math.min(2,be):Math.max(.5,be),Re=Math.pow(we,1-Ce),We=_c(l,_e,ye,Ce*Re);e.setCenter(We.wrap())}if(z){const we=o.B.number(se,pe,Ce)+li(0,e.center.lat);e.setZoom(we)}},isZooming:z,elevationCenter:oe}}handleFlyTo(e,r){const a=r.zoom!==void 0,l=e.center,d=e.zoom,g=e.padding,w=!e.isPaddingEqual(r.padding),A=e.getConstrained(o.Q.convert(r.center||r.locationAtOffset),d).center,I=a?+r.zoom:e.zoom+li(e.center.lat,A.lat),z=e.clone();z.setCenter(A),z.setZoom(I),z.setBearing(r.bearing);const N=new o.P(o.ae(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),o.ae(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));z.setLocationAtPoint(A,N);const F=z.center;ce(e,F);const Z=function(ye,be,Ce){const we=ai(be),Re=ai(Ce),We=o.aV(we,Re),Fe=Math.acos(We),Ne=as(ye);return Fe/(2*Math.PI)*Ne}(e,l,F),J=d+li(l.lat,0),oe=I+li(F.lat,0),ne=o.ac(oe-J);let se;if(typeof r.minZoom=="number"){const ye=+r.minZoom+li(F.lat,0),be=Math.min(ye,J,oe)+li(0,F.lat),Ce=e.getConstrained(F,be).zoom+li(F.lat,0);se=o.ac(Ce-J)}const pe=o.bq(l.lng,F.lng),_e=o.bq(l.lat,F.lat);return{easeFunc:(ye,be,Ce,we)=>{const Re=_c(l,pe,_e,Ce);w&&e.interpolatePadding(g,r.padding,ye);const We=ye===1?F:Re;e.setCenter(We.wrap());const Fe=J+o.ah(be);e.setZoom(ye===1?I:Fe+li(0,We.lat))},scaleOfZoom:ne,targetCenter:F,scaleOfMinZoom:se,pixelPathLength:Z}}static solveVectorScale(e,r,a,l,d){const g=l==="x"?[a[0],a[4],a[8],a[12]]:[a[1],a[5],a[9],a[13]],w=[a[3],a[7],a[11],a[15]],A=e[0]*g[0]+e[1]*g[1]+e[2]*g[2],I=e[0]*w[0]+e[1]*w[1]+e[2]*w[2],z=r[0]*g[0]+r[1]*g[1]+r[2]*g[2],N=r[0]*w[0]+r[1]*w[1]+r[2]*w[2];return z+d*I===A+d*N||w[3]*(A-z)+g[3]*(N-I)+A*N==z*I?null:(z+g[3]-d*N-d*w[3])/(z-A-d*N+d*I)}static getLesserNonNegativeNonNull(e,r){return r!==null&&r>=0&&r<e?r:e}}class yo{constructor(e){this._globe=e,this._mercatorCameraHelper=new Ke,this._verticalPerspectiveCameraHelper=new Ji}get useGlobeControls(){return this._globe.useGlobeRendering}get currentHelper(){return this.useGlobeControls?this._verticalPerspectiveCameraHelper:this._mercatorCameraHelper}handlePanInertia(e,r){return this.currentHelper.handlePanInertia(e,r)}handleMapControlsRollPitchBearingZoom(e,r){return this.currentHelper.handleMapControlsRollPitchBearingZoom(e,r)}handleMapControlsPan(e,r,a){this.currentHelper.handleMapControlsPan(e,r,a)}cameraForBoxAndBearing(e,r,a,l,d){return this.currentHelper.cameraForBoxAndBearing(e,r,a,l,d)}handleJumpToCenterZoom(e,r){this.currentHelper.handleJumpToCenterZoom(e,r)}handleEaseTo(e,r){return this.currentHelper.handleEaseTo(e,r)}handleFlyTo(e,r){return this.currentHelper.handleFlyTo(e,r)}}const ea=(h,e)=>o.x(h,e&&e.filter(r=>r.identifier!=="source.canvas")),bh=o.bw();class rl extends o.E{constructor(e,r={}){super(),this._rtlPluginLoaded=()=>{for(const a in this.sourceCaches){const l=this.sourceCaches[a].getSource().type;l!=="vector"&&l!=="geojson"||this.sourceCaches[a].reload()}},this.map=e,this.dispatcher=new ri(Bi(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(a,l)=>this.getGlyphs(a,l)),this.dispatcher.registerMessageHandler("GI",(a,l)=>this.getImages(a,l)),this.imageManager=new yt,this.imageManager.setEventedParent(this),this.glyphManager=new Qt(e._requestManager,r.localIdeographFontFamily),this.lineAtlas=new Nr(256,512),this.crossTileSymbolIndex=new Jn,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new o.bx,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",o.by()),Mi().on(Vr,this._rtlPluginLoaded),this.on("data",a=>{if(a.dataType!=="source"||a.sourceDataType!=="metadata")return;const l=this.sourceCaches[a.sourceId];if(!l)return;const d=l.getSource();if(d&&d.vectorLayerIds)for(const g in this._layers){const w=this._layers[g];w.source===d.id&&this._validateLayer(w)}})}loadURL(e,r={},a){this.fire(new o.l("dataloading",{dataType:"style"})),r.validate=typeof r.validate!="boolean"||r.validate;const l=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;const d=this._loadStyleRequest;o.j(l,this._loadStyleRequest).then(g=>{this._loadStyleRequest=null,this._load(g.data,r,a)}).catch(g=>{this._loadStyleRequest=null,g&&!d.signal.aborted&&this.fire(new o.k(g))})}loadJSON(e,r={},a){this.fire(new o.l("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,L.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,r.validate=r.validate!==!1,this._load(e,r,a)}).catch(()=>{})}loadEmpty(){this.fire(new o.l("dataloading",{dataType:"style"})),this._load(bh,{validate:!1})}_load(e,r,a){var l,d;const g=r.transformStyle?r.transformStyle(a,e):e;if(!r.validate||!ea(this,o.y(g))){this._loaded=!0,this.stylesheet=g;for(const w in g.sources)this.addSource(w,g.sources[w],{validate:!1});g.sprite?this._loadSprite(g.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(g.glyphs),this._createLayers(),this.light=new ti(this.stylesheet.light),this._setProjectionInternal(((l=this.stylesheet.projection)===null||l===void 0?void 0:l.type)||"mercator"),this.sky=new Zi(this.stylesheet.sky),this.map.setTerrain((d=this.stylesheet.terrain)!==null&&d!==void 0?d:null),this.fire(new o.l("data",{dataType:"style"})),this.fire(new o.l("style.load"))}}_createLayers(){const e=o.bz(this.stylesheet.layers);this.dispatcher.broadcast("SL",e),this._order=e.map(r=>r.id),this._layers={},this._serializedLayers=null;for(const r of e){const a=o.bA(r);a.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=a}}_loadSprite(e,r=!1,a=void 0){let l;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(d,g,w,A){return o._(this,void 0,void 0,function*(){const I=Le(d),z=w>1?"@2x":"",N={},F={};for(const{id:Z,url:J}of I){const oe=g.transformRequest(qe(J,z,".json"),"SpriteJSON");N[Z]=o.j(oe,A);const ne=g.transformRequest(qe(J,z,".png"),"SpriteImage");F[Z]=ee.getImage(ne,A)}return yield Promise.all([...Object.values(N),...Object.values(F)]),function(Z,J){return o._(this,void 0,void 0,function*(){const oe={};for(const ne in Z){oe[ne]={};const se=L.getImageCanvasContext((yield J[ne]).data),pe=(yield Z[ne]).data;for(const _e in pe){const{width:ye,height:be,x:Ce,y:we,sdf:Re,pixelRatio:We,stretchX:Fe,stretchY:Ne,content:je,textFitWidth:mt,textFitHeight:dt}=pe[_e];oe[ne][_e]={data:null,pixelRatio:We,sdf:Re,stretchX:Fe,stretchY:Ne,content:je,textFitWidth:mt,textFitHeight:dt,spriteData:{width:ye,height:be,x:Ce,y:we,context:se}}}}return oe})}(N,F)})}(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(d=>{if(this._spriteRequest=null,d)for(const g in d){this._spritesImagesIds[g]=[];const w=this._spritesImagesIds[g]?this._spritesImagesIds[g].filter(A=>!(A in d)):[];for(const A of w)this.imageManager.removeImage(A),this._changedImages[A]=!0;for(const A in d[g]){const I=g==="default"?A:`${g}:${A}`;this._spritesImagesIds[g].push(I),I in this.imageManager.images?this.imageManager.updateImage(I,d[g][A],!1):this.imageManager.addImage(I,d[g][A]),r&&(this._changedImages[I]=!0)}}}).catch(d=>{this._spriteRequest=null,l=d,this.fire(new o.k(l))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"})),a&&a(l)})}_unloadSprite(){for(const e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}_validateLayer(e){const r=this.sourceCaches[e.source];if(!r)return;const a=e.sourceLayer;if(!a)return;const l=r.getSource();(l.type==="geojson"||l.vectorLayerIds&&l.vectorLayerIds.indexOf(a)===-1)&&this.fire(new o.k(new Error(`Source layer "${a}" does not exist on source "${l.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){const a=this._serializedAllLayers();if(!e||e.length===0)return Object.values(r?o.bB(a):a);const l=[];for(const d of e)if(a[d]){const g=r?o.bB(a[d]):a[d];l.push(g)}return l}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;e=this._serializedLayers={};const r=Object.keys(this._layers);for(const a of r){const l=this._layers[a];l.type!=="custom"&&(e[a]=l.serialize())}return e}hasTransitions(){var e,r,a;if(!((e=this.light)===null||e===void 0)&&e.hasTransition()||!((r=this.sky)===null||r===void 0)&&r.hasTransition()||!((a=this.projection)===null||a===void 0)&&a.hasTransition())return!0;for(const l in this.sourceCaches)if(this.sourceCaches[l].hasTransition())return!0;for(const l in this._layers)if(this._layers[l].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(e){if(!this._loaded)return;const r=this._changed;if(r){const l=Object.keys(this._updatedLayers),d=Object.keys(this._removedLayers);(l.length||d.length)&&this._updateWorkerLayers(l,d);for(const g in this._updatedSources){const w=this._updatedSources[g];if(w==="reload")this._reloadSource(g);else{if(w!=="clear")throw new Error(`Invalid action ${w}`);this._clearSource(g)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const g in this._updatedPaintProps)this._layers[g].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}const a={};for(const l in this.sourceCaches){const d=this.sourceCaches[l];a[l]=d.used,d.used=!1}for(const l of this._order){const d=this._layers[l];d.recalculate(e,this._availableImages),!d.isHidden(e.zoom)&&d.source&&(this.sourceCaches[d.source].used=!0)}for(const l in a){const d=this.sourceCaches[l];!!a[l]!=!!d.used&&d.fire(new o.l("data",{sourceDataType:"visibility",dataType:"source",sourceId:l}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new o.l("data",{dataType:"style"}))}_updateTilesForChangedImages(){const e=Object.keys(this._changedImages);if(e.length){for(const r in this.sourceCaches)this.sourceCaches[r].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,r){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:r})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var a;this._checkLoaded();const l=this.serialize();if(e=r.transformStyle?r.transformStyle(l,e):e,((a=r.validate)===null||a===void 0||a)&&ea(this,o.y(e)))return!1;(e=o.bB(e)).layers=o.bz(e.layers);const d=o.bC(l,e),g=this._getOperationsToPerform(d);if(g.unimplemented.length>0)throw new Error(`Unimplemented: ${g.unimplemented.join(", ")}.`);if(g.operations.length===0)return!1;for(const w of g.operations)w();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){const r=[],a=[];for(const l of e)switch(l.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":r.push(()=>this.addLayer.apply(this,l.args));break;case"removeLayer":r.push(()=>this.removeLayer.apply(this,l.args));break;case"setPaintProperty":r.push(()=>this.setPaintProperty.apply(this,l.args));break;case"setLayoutProperty":r.push(()=>this.setLayoutProperty.apply(this,l.args));break;case"setFilter":r.push(()=>this.setFilter.apply(this,l.args));break;case"addSource":r.push(()=>this.addSource.apply(this,l.args));break;case"removeSource":r.push(()=>this.removeSource.apply(this,l.args));break;case"setLayerZoomRange":r.push(()=>this.setLayerZoomRange.apply(this,l.args));break;case"setLight":r.push(()=>this.setLight.apply(this,l.args));break;case"setGeoJSONSourceData":r.push(()=>this.setGeoJSONSourceData.apply(this,l.args));break;case"setGlyphs":r.push(()=>this.setGlyphs.apply(this,l.args));break;case"setSprite":r.push(()=>this.setSprite.apply(this,l.args));break;case"setTerrain":r.push(()=>this.map.setTerrain.apply(this,l.args));break;case"setSky":r.push(()=>this.setSky.apply(this,l.args));break;case"setProjection":this.setProjection.apply(this,l.args);break;case"setTransition":r.push(()=>{});break;default:a.push(l.command)}return{operations:r,unimplemented:a}}addImage(e,r){if(this.getImage(e))return this.fire(new o.k(new Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,r){this.imageManager.updateImage(e,r)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new o.k(new Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,a={}){if(this._checkLoaded(),this.sourceCaches[e]!==void 0)throw new Error(`Source "${e}" already exists.`);if(!r.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(o.y.source,`sources.${e}`,r,null,a))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);const l=this.sourceCaches[e]=new Te(e,r,this.dispatcher);l.style=this,l.setEventedParent(this,()=>({isSourceLoaded:l.loaded(),source:l.serialize(),sourceId:e})),l.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error("There is no source with this ID");for(const a in this._layers)if(this._layers[a].source===e)return this.fire(new o.k(new Error(`Source "${e}" cannot be removed while layer "${a}" is using it.`)));const r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new o.l("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,r){if(this._checkLoaded(),this.sourceCaches[e]===void 0)throw new Error(`There is no source with this ID=${e}`);const a=this.sourceCaches[e].getSource();if(a.type!=="geojson")throw new Error(`geojsonSource.type is ${a.type}, which is !== 'geojson`);a.setData(r),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,a={}){this._checkLoaded();const l=e.id;if(this.getLayer(l))return void this.fire(new o.k(new Error(`Layer "${l}" already exists on this map.`)));let d;if(e.type==="custom"){if(ea(this,o.bD(e)))return;d=o.bA(e)}else{if("source"in e&&typeof e.source=="object"&&(this.addSource(l,e.source),e=o.bB(e),e=o.e(e,{source:l})),this._validate(o.y.layer,`layers.${l}`,e,{arrayIndex:-1},a))return;d=o.bA(e),this._validateLayer(d),d.setEventedParent(this,{layer:{id:l}})}const g=r?this._order.indexOf(r):this._order.length;if(r&&g===-1)this.fire(new o.k(new Error(`Cannot add layer "${l}" before non-existing layer "${r}".`)));else{if(this._order.splice(g,0,l),this._layerOrderChanged=!0,this._layers[l]=d,this._removedLayers[l]&&d.source&&d.type!=="custom"){const w=this._removedLayers[l];delete this._removedLayers[l],w.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(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new o.k(new Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;const a=this._order.indexOf(e);this._order.splice(a,1);const l=r?this._order.indexOf(r):this._order.length;r&&l===-1?this.fire(new o.k(new Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(l,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();const r=this._layers[e];if(!r)return void this.fire(new o.k(new Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);const a=this._order.indexOf(e);this._order.splice(a,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,a){this._checkLoaded();const l=this.getLayer(e);l?l.minzoom===r&&l.maxzoom===a||(r!=null&&(l.minzoom=r),a!=null&&(l.maxzoom=a),this._updateLayer(l)):this.fire(new o.k(new Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,a={}){this._checkLoaded();const l=this.getLayer(e);if(l){if(!o.bE(l.filter,r))return r==null?(l.filter=void 0,void this._updateLayer(l)):void(this._validate(o.y.filter,`layers.${l.id}.filter`,r,null,a)||(l.filter=o.bB(r),this._updateLayer(l)))}else this.fire(new o.k(new Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return o.bB(this.getLayer(e).filter)}setLayoutProperty(e,r,a,l={}){this._checkLoaded();const d=this.getLayer(e);d?o.bE(d.getLayoutProperty(r),a)||(d.setLayoutProperty(r,a,l),this._updateLayer(d)):this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){const a=this.getLayer(e);if(a)return a.getLayoutProperty(r);this.fire(new o.k(new Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,a,l={}){this._checkLoaded();const d=this.getLayer(e);d?o.bE(d.getPaintProperty(r),a)||(d.setPaintProperty(r,a,l)&&this._updateLayer(d),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new o.k(new Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,r){return this.getLayer(e).getPaintProperty(r)}setFeatureState(e,r){this._checkLoaded();const a=e.source,l=e.sourceLayer,d=this.sourceCaches[a];if(d===void 0)return void this.fire(new o.k(new Error(`The source '${a}' does not exist in the map's style.`)));const g=d.getSource().type;g==="geojson"&&l?this.fire(new o.k(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):g!=="vector"||l?(e.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),d.setFeatureState(l,e.id,r)):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();const a=e.source,l=this.sourceCaches[a];if(l===void 0)return void this.fire(new o.k(new Error(`The source '${a}' does not exist in the map's style.`)));const d=l.getSource().type,g=d==="vector"?e.sourceLayer:void 0;d!=="vector"||g?r&&typeof e.id!="string"&&typeof e.id!="number"?this.fire(new o.k(new Error("A feature id is required to remove its specific state property."))):l.removeFeatureState(g,e.id,r):this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();const r=e.source,a=e.sourceLayer,l=this.sourceCaches[r];if(l!==void 0)return l.getSource().type!=="vector"||a?(e.id===void 0&&this.fire(new o.k(new Error("The feature id parameter must be provided."))),l.getFeatureState(a,e.id)):void this.fire(new o.k(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new o.k(new Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return o.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const e=o.bF(this.sourceCaches,d=>d.serialize()),r=this._serializeByIds(this._order,!0),a=this.map.getTerrain()||void 0,l=this.stylesheet;return o.bG({version:l.version,name:l.name,metadata:l.metadata,light:l.light,sky:l.sky,center:l.center,zoom:l.zoom,bearing:l.bearing,pitch:l.pitch,sprite:l.sprite,glyphs:l.glyphs,transition:l.transition,projection:l.projection,sources:e,layers:r,terrain:a},d=>d!==void 0)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&this.sourceCaches[e.source].getSource().type!=="raster"&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){const r=g=>this._layers[g].type==="fill-extrusion",a={},l=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(r(w)){a[w]=g;for(const A of e){const I=A[w];if(I)for(const z of I)l.push(z)}}}l.sort((g,w)=>w.intersectionZ-g.intersectionZ);const d=[];for(let g=this._order.length-1;g>=0;g--){const w=this._order[g];if(r(w))for(let A=l.length-1;A>=0;A--){const I=l[A].feature;if(a[I.layer.id]<g)break;d.push(I),l.pop()}else for(const A of e){const I=A[w];if(I)for(const z of I)d.push(z.feature)}}return d}queryRenderedFeatures(e,r,a){r&&r.filter&&this._validate(o.y.filter,"queryRenderedFeatures.filter",r.filter,null,r);const l={};if(r&&r.layers){if(!(Array.isArray(r.layers)||r.layers instanceof Set))return this.fire(new o.k(new Error("parameters.layers must be an Array or a Set of strings"))),[];for(const I of r.layers){const z=this._layers[I];if(!z)return this.fire(new o.k(new Error(`The layer '${I}' does not exist in the map's style and cannot be queried for features.`))),[];l[z.source]=!0}}const d=[];r.availableImages=this._availableImages;const g=this._serializedAllLayers(),w=r.layers instanceof Set?r.layers:Array.isArray(r.layers)?new Set(r.layers):null,A=Object.assign(Object.assign({},r),{layers:w});for(const I in this.sourceCaches)r.layers&&!l[I]||d.push(Cn(this.sourceCaches[I],this._layers,g,e,A,a,this.map.terrain?(z,N,F)=>this.map.terrain.getElevation(z,N,F):void 0));return this.placement&&d.push(function(I,z,N,F,Z,J,oe){const ne={},se=J.queryRenderedSymbols(F),pe=[];for(const _e of Object.keys(se).map(Number))pe.push(oe[_e]);pe.sort(Gr);for(const _e of pe){const ye=_e.featureIndex.lookupSymbolFeatures(se[_e.bucketInstanceId],z,_e.bucketIndex,_e.sourceLayerIndex,Z.filter,Z.layers,Z.availableImages,I);for(const be in ye){const Ce=ne[be]=ne[be]||[],we=ye[be];we.sort((Re,We)=>{const Fe=_e.featureSortOrder;if(Fe){const Ne=Fe.indexOf(Re.featureIndex);return Fe.indexOf(We.featureIndex)-Ne}return We.featureIndex-Re.featureIndex});for(const Re of we)Ce.push(Re)}}return function(_e,ye,be){for(const Ce in _e)for(const we of _e[Ce])fi(we,be[ye[Ce].source]);return _e}(ne,I,N)}(this._layers,g,this.sourceCaches,e,A,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(d)}querySourceFeatures(e,r){r&&r.filter&&this._validate(o.y.filter,"querySourceFeatures.filter",r.filter,null,r);const a=this.sourceCaches[e];return a?function(l,d){const g=l.getRenderableIds().map(I=>l.getTileByID(I)),w=[],A={};for(let I=0;I<g.length;I++){const z=g[I],N=z.tileID.canonical.key;A[N]||(A[N]=!0,z.querySourceFeatures(w,d))}return w}(a,r):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();const a=this.light.getLight();let l=!1;for(const g in e)if(!o.bE(e[g],a[g])){l=!0;break}if(!l)return;const d={now:L.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(d)}getProjection(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.projection}setProjection(e){if(this._checkLoaded(),this.projection){if(this.projection.name===e.type)return;this.projection.destroy(),delete this.projection}this.stylesheet.projection=e,this._setProjectionInternal(e.type)}getSky(){var e;return(e=this.stylesheet)===null||e===void 0?void 0:e.sky}setSky(e,r={}){this._checkLoaded();const a=this.getSky();let l=!1;if(!e&&!a)return;if(e&&!a)l=!0;else if(!e&&a)l=!0;else for(const g in e)if(!o.bE(e[g],a[g])){l=!0;break}if(!l)return;const d={now:L.now(),transition:o.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(d)}_setProjectionInternal(e){const r=function(a){if(Array.isArray(a)){const l=new Qs({type:a});return{projection:l,transform:new us,cameraHelper:new yo(l)}}switch(a){case"mercator":return{projection:new vn,transform:new at,cameraHelper:new Ke};case"globe":{const l=new Qs({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:l,transform:new us,cameraHelper:new yo(l)}}case"vertical-perspective":return{projection:new po,transform:new go,cameraHelper:new Ji};default:return o.w(`Unknown projection name: ${a}. Falling back to mercator projection.`),{projection:new vn,transform:new at,cameraHelper:new Ke}}}(e);this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper);for(const a in this.sourceCaches)this.sourceCaches[a].reload()}_validate(e,r,a,l,d={}){return(!d||d.validate!==!1)&&ea(this,e.call(o.y,o.e({key:r,style:this.serialize(),value:a,styleSpec:o.v},l)))}_remove(e=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Mi().off(Vr,this._rtlPluginLoaded);for(const r in this._layers)this._layers[r].setEventedParent(null);for(const r in this.sourceCaches){const a=this.sourceCaches[r];a.setEventedParent(null),a.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.sourceCaches[e].clearTiles()}_reloadSource(e){this.sourceCaches[e].resume(),this.sourceCaches[e].reload()}_updateSources(e){for(const r in this.sourceCaches)this.sourceCaches[r].update(e,this.map.terrain)}_generateCollisionBoxes(){for(const e in this.sourceCaches)this._reloadSource(e)}_updatePlacement(e,r,a,l,d=!1){let g=!1,w=!1;const A={};for(const I of this._order){const z=this._layers[I];if(z.type!=="symbol")continue;if(!A[z.source]){const F=this.sourceCaches[z.source];A[z.source]=F.getRenderableIds(!0).map(Z=>F.getTileByID(Z)).sort((Z,J)=>J.tileID.overscaledZ-Z.tileID.overscaledZ||(Z.tileID.isLessThan(J.tileID)?-1:1))}const N=this.crossTileSymbolIndex.addLayer(z,A[z.source],e.center.lng);g=g||N}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((d=d||this._layerOrderChanged||a===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(L.now(),e.zoom))&&(this.pauseablePlacement=new Xs(e,this.map.terrain,this._order,d,r,a,l,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,A),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(L.now()),w=!0),g&&this.pauseablePlacement.placement.setStale()),w||g)for(const I of this._order){const z=this._layers[I];z.type==="symbol"&&this.placement.updateLayerOpacities(z,A[z.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(L.now())}_releaseSymbolFadeTiles(){for(const e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return o._(this,void 0,void 0,function*(){const a=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();const l=this.sourceCaches[r.source];return l&&l.setDependencies(r.tileID.key,r.type,r.icons),a})}getGlyphs(e,r){return o._(this,void 0,void 0,function*(){const a=yield this.glyphManager.getGlyphs(r.stacks),l=this.sourceCaches[r.source];return l&&l.setDependencies(r.tileID.key,r.type,[""]),a})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(o.y.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,r,a={},l){this._checkLoaded();const d=[{id:e,url:r}],g=[...Le(this.stylesheet.sprite),...d];this._validate(o.y.sprite,"sprite",g,null,a)||(this.stylesheet.sprite=g,this._loadSprite(d,!0,l))}removeSprite(e){this._checkLoaded();const r=Le(this.stylesheet.sprite);if(r.find(a=>a.id===e)){if(this._spritesImagesIds[e])for(const a of this._spritesImagesIds[e])this.imageManager.removeImage(a),this._changedImages[a]=!0;r.splice(r.findIndex(a=>a.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new o.l("data",{dataType:"style"}))}else this.fire(new o.k(new Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return Le(this.stylesheet.sprite)}setSprite(e,r={},a){this._checkLoaded(),e&&this._validate(o.y.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,a):(this._unloadSprite(),a&&a(null)))}}var wh=o.aG([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Sh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,r,a,l,d,g,w,A,I){this.context=e;let z=this.boundPaintVertexBuffers.length!==l.length;for(let N=0;!z&&N<l.length;N++)this.boundPaintVertexBuffers[N]!==l[N]&&(z=!0);!this.vao||this.boundProgram!==r||this.boundLayoutVertexBuffer!==a||z||this.boundIndexBuffer!==d||this.boundVertexOffset!==g||this.boundDynamicVertexBuffer!==w||this.boundDynamicVertexBuffer2!==A||this.boundDynamicVertexBuffer3!==I?this.freshBind(r,a,l,d,g,w,A,I):(e.bindVertexArray.set(this.vao),w&&w.bind(),d&&d.dynamicDraw&&d.bind(),A&&A.bind(),I&&I.bind())}freshBind(e,r,a,l,d,g,w,A){const I=e.numAttributes,z=this.context,N=z.gl;this.vao&&this.destroy(),this.vao=z.createVertexArray(),z.bindVertexArray.set(this.vao),this.boundProgram=e,this.boundLayoutVertexBuffer=r,this.boundPaintVertexBuffers=a,this.boundIndexBuffer=l,this.boundVertexOffset=d,this.boundDynamicVertexBuffer=g,this.boundDynamicVertexBuffer2=w,this.boundDynamicVertexBuffer3=A,r.enableAttributes(N,e);for(const F of a)F.enableAttributes(N,e);g&&g.enableAttributes(N,e),w&&w.enableAttributes(N,e),A&&A.enableAttributes(N,e),r.bind(),r.setVertexAttribPointers(N,e,d);for(const F of a)F.bind(),F.setVertexAttribPointers(N,e,d);g&&(g.bind(),g.setVertexAttribPointers(N,e,d)),l&&l.bind(),w&&(w.bind(),w.setVertexAttribPointers(N,e,d)),A&&(A.bind(),A.setVertexAttribPointers(N,e,d)),z.currentNumAttributes=I}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Ah=(h,e,r,a,l)=>({u_texture:0,u_ele_delta:h,u_fog_matrix:e,u_fog_color:r?r.properties.get("fog-color"):o.b7.white,u_fog_ground_blend:r?r.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:l?0:r?r.calculateFogBlendOpacity(a):0,u_horizon_color:r?r.properties.get("horizon-color"):o.b7.white,u_horizon_fog_blend:r?r.properties.get("horizon-fog-blend"):1,u_is_globe_mode:l?1:0}),ta={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Lo(h){const e=[];for(let r=0;r<h.length;r++){if(h[r]===null)continue;const a=h[r].split(" ");e.push(a.pop())}return e}class ra{constructor(e,r,a,l,d,g,w,A,I=[]){const z=e.gl;this.program=z.createProgram();const N=Lo(r.staticAttributes),F=a?a.getBinderAttributes():[],Z=N.concat(F),J=oi.prelude.staticUniforms?Lo(oi.prelude.staticUniforms):[],oe=w.staticUniforms?Lo(w.staticUniforms):[],ne=r.staticUniforms?Lo(r.staticUniforms):[],se=a?a.getBinderUniforms():[],pe=J.concat(oe).concat(ne).concat(se),_e=[];for(const Fe of pe)_e.indexOf(Fe)<0&&_e.push(Fe);const ye=a?a.defines():[];br(z)&&ye.unshift("#version 300 es"),d&&ye.push("#define OVERDRAW_INSPECTOR;"),g&&ye.push("#define TERRAIN3D;"),A&&ye.push(A),I&&ye.push(...I);let be=ye.concat(oi.prelude.fragmentSource,w.fragmentSource,r.fragmentSource).join(`
798
+ `),Ce=ye.concat(oi.prelude.vertexSource,w.vertexSource,r.vertexSource).join(`
799
+ `);br(z)||(be=function(Fe){return Fe.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(be),Ce=function(Fe){return Fe.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Ce));const we=z.createShader(z.FRAGMENT_SHADER);if(z.isContextLost())return void(this.failedToCreate=!0);if(z.shaderSource(we,be),z.compileShader(we),!z.getShaderParameter(we,z.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${z.getShaderInfoLog(we)}`);z.attachShader(this.program,we);const Re=z.createShader(z.VERTEX_SHADER);if(z.isContextLost())return void(this.failedToCreate=!0);if(z.shaderSource(Re,Ce),z.compileShader(Re),!z.getShaderParameter(Re,z.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${z.getShaderInfoLog(Re)}`);z.attachShader(this.program,Re),this.attributes={};const We={};this.numAttributes=Z.length;for(let Fe=0;Fe<this.numAttributes;Fe++)Z[Fe]&&(z.bindAttribLocation(this.program,Fe,Z[Fe]),this.attributes[Z[Fe]]=Fe);if(z.linkProgram(this.program),!z.getProgramParameter(this.program,z.LINK_STATUS))throw new Error(`Program failed to link: ${z.getProgramInfoLog(this.program)}`);z.deleteShader(Re),z.deleteShader(we);for(let Fe=0;Fe<_e.length;Fe++){const Ne=_e[Fe];if(Ne&&!We[Ne]){const je=z.getUniformLocation(this.program,Ne);je&&(We[Ne]=je)}}this.fixedUniforms=l(e,We),this.terrainUniforms=((Fe,Ne)=>({u_depth:new o.bH(Fe,Ne.u_depth),u_terrain:new o.bH(Fe,Ne.u_terrain),u_terrain_dim:new o.b8(Fe,Ne.u_terrain_dim),u_terrain_matrix:new o.bJ(Fe,Ne.u_terrain_matrix),u_terrain_unpack:new o.bK(Fe,Ne.u_terrain_unpack),u_terrain_exaggeration:new o.b8(Fe,Ne.u_terrain_exaggeration)}))(e,We),this.projectionUniforms=((Fe,Ne)=>({u_projection_matrix:new o.bJ(Fe,Ne.u_projection_matrix),u_projection_tile_mercator_coords:new o.bK(Fe,Ne.u_projection_tile_mercator_coords),u_projection_clipping_plane:new o.bK(Fe,Ne.u_projection_clipping_plane),u_projection_transition:new o.b8(Fe,Ne.u_projection_transition),u_projection_fallback_matrix:new o.bJ(Fe,Ne.u_projection_fallback_matrix)}))(e,We),this.binderUniforms=a?a.getUniforms(e,We):[]}draw(e,r,a,l,d,g,w,A,I,z,N,F,Z,J,oe,ne,se,pe,_e){const ye=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(a),e.setStencilMode(l),e.setColorMode(d),e.setCullFace(g),A){e.activeTexture.set(ye.TEXTURE2),ye.bindTexture(ye.TEXTURE_2D,A.depthTexture),e.activeTexture.set(ye.TEXTURE3),ye.bindTexture(ye.TEXTURE_2D,A.texture);for(const Ce in this.terrainUniforms)this.terrainUniforms[Ce].set(A[Ce])}if(I)for(const Ce in I)this.projectionUniforms[ta[Ce]].set(I[Ce]);if(w)for(const Ce in this.fixedUniforms)this.fixedUniforms[Ce].set(w[Ce]);ne&&ne.setUniforms(e,this.binderUniforms,J,{zoom:oe});let be=0;switch(r){case ye.LINES:be=2;break;case ye.TRIANGLES:be=3;break;case ye.LINE_STRIP:be=1}for(const Ce of Z.get()){const we=Ce.vaos||(Ce.vaos={});(we[z]||(we[z]=new Sh)).bind(e,this,N,ne?ne.getPaintVertexBuffers():[],F,Ce.vertexOffset,se,pe,_e),ye.drawElements(r,Ce.primitiveLength*be,ye.UNSIGNED_SHORT,Ce.primitiveOffset*be*2)}}}function ia(h,e,r){const a=1/o.az(r,1,e.transform.tileZoom),l=Math.pow(2,r.tileID.overscaledZ),d=r.tileSize*Math.pow(2,e.transform.tileZoom)/l,g=d*(r.tileID.canonical.x+r.tileID.wrap*l),w=d*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[a,h.fromScale,h.toScale],u_fade:h.t,u_pixel_coord_upper:[g>>16,w>>16],u_pixel_coord_lower:[65535&g,65535&w]}}const na=(h,e,r,a)=>{const l=h.style.light,d=l.properties.get("position"),g=[d.x,d.y,d.z],w=o.bN();l.properties.get("anchor")==="viewport"&&o.bO(w,h.transform.bearingInRadians),o.bP(g,g,w);const A=h.transform.transformLightDirection(g),I=l.properties.get("color");return{u_lightpos:g,u_lightpos_globe:A,u_lightintensity:l.properties.get("intensity"),u_lightcolor:[I.r,I.g,I.b],u_vertical_gradient:+e,u_opacity:r,u_fill_translate:a}},bn=(h,e,r,a,l,d,g)=>o.e(na(h,e,r,a),ia(d,h,g),{u_height_factor:-Math.pow(2,l.overscaledZ)/g.tileSize/8}),vc=(h,e,r,a)=>o.e(ia(e,h,r),{u_fill_translate:a}),il=(h,e)=>({u_world:h,u_fill_translate:e}),hs=(h,e,r,a,l)=>o.e(vc(h,e,r,l),{u_world:a}),ds=(h,e,r,a,l)=>{const d=h.transform;let g,w,A=0;if(r.paint.get("circle-pitch-alignment")==="map"){const I=o.az(e,1,d.zoom);g=!0,w=[I,I],A=I/(o.Z*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*l}else g=!1,w=d.pixelsToGLUnits;return{u_camera_to_center_distance:d.cameraToCenterDistance,u_scale_with_map:+(r.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+g,u_device_pixel_ratio:h.pixelRatio,u_extrude_scale:w,u_globe_extrude_scale:A,u_translate:a}},kh=h=>({u_pixel_extrude_scale:[1/h.width,1/h.height]}),oa=h=>({u_viewport_size:[h.width,h.height]}),xc=(h,e=1)=>({u_color:h,u_overlay:0,u_overlay_scale:e}),_o=(h,e,r,a)=>{const l=o.az(h,1,e)/(o.Z*Math.pow(2,h.tileID.overscaledZ))*2*Math.PI*a;return{u_extrude_scale:o.az(h,1,e),u_intensity:r,u_globe_extrude_scale:l}},bc=(h,e,r,a)=>{const l=o.K();o.bQ(l,0,h.width,h.height,0,0,1);const d=h.context.gl;return{u_matrix:l,u_world:[d.drawingBufferWidth,d.drawingBufferHeight],u_image:r,u_color_ramp:a,u_opacity:e.paint.get("heatmap-opacity")}},wc=(h,e,r)=>{const a=r.paint.get("hillshade-accent-color");let l;switch(r.paint.get("hillshade-method")){case"basic":l=4;break;case"combined":l=1;break;case"igor":l=2;break;case"multidirectional":l=3;break;default:l=0}const d=r.getIlluminationProperties();for(let g=0;g<d.directionRadians.length;g++)r.paint.get("hillshade-illumination-anchor")==="viewport"&&(d.directionRadians[g]+=h.transform.bearingInRadians);return{u_image:0,u_latrange:Sc(0,e.tileID),u_exaggeration:r.paint.get("hillshade-exaggeration"),u_altitudes:d.altitudeRadians,u_azimuths:d.directionRadians,u_accent:a,u_method:l,u_highlights:d.highlightColor,u_shadows:d.shadowColor}},Ch=(h,e)=>{const r=e.stride,a=o.K();return o.bQ(a,0,o.Z,-8192,0,0,1),o.L(a,a,[0,-8192,0]),{u_matrix:a,u_image:1,u_dimension:[r,r],u_zoom:h.overscaledZ,u_unpack:e.getUnpackVector()}};function Sc(h,e){const r=Math.pow(2,e.canonical.z),a=e.canonical.y;return[new o.$(0,a/r).toLngLat().lat,new o.$(0,(a+1)/r).toLngLat().lat]}const ps=(h,e,r,a)=>{const l=h.transform;return{u_translation:Qn(h,e,r),u_ratio:a/o.az(e,1,l.zoom),u_device_pixel_ratio:h.pixelRatio,u_units_to_pixels:[1/l.pixelsToGLUnits[0],1/l.pixelsToGLUnits[1]]}},Ac=(h,e,r,a,l)=>o.e(ps(h,e,r,a),{u_image:0,u_image_height:l}),kc=(h,e,r,a,l)=>{const d=h.transform,g=nl(e,d);return{u_translation:Qn(h,e,r),u_texsize:e.imageAtlasTexture.size,u_ratio:a/o.az(e,1,d.zoom),u_device_pixel_ratio:h.pixelRatio,u_image:0,u_scale:[g,l.fromScale,l.toScale],u_fade:l.t,u_units_to_pixels:[1/d.pixelsToGLUnits[0],1/d.pixelsToGLUnits[1]]}},Cc=(h,e,r,a,l,d)=>{const g=h.lineAtlas,w=nl(e,h.transform),A=r.layout.get("line-cap")==="round",I=g.getDash(l.from,A),z=g.getDash(l.to,A),N=I.width*d.fromScale,F=z.width*d.toScale;return o.e(ps(h,e,r,a),{u_patternscale_a:[w/N,-I.height/2],u_patternscale_b:[w/F,-z.height/2],u_sdfgamma:g.width/(256*Math.min(N,F)*h.pixelRatio)/2,u_image:0,u_tex_y_a:I.y,u_tex_y_b:z.y,u_mix:d.t})};function nl(h,e){return 1/o.az(h,1,e.tileZoom)}function Qn(h,e,r){return o.aA(h.transform,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}const Tc=(h,e,r,a,l)=>{return{u_tl_parent:h,u_scale_parent:e,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.opacity*a.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:a.paint.get("raster-brightness-min"),u_brightness_high:a.paint.get("raster-brightness-max"),u_saturation_factor:(g=a.paint.get("raster-saturation"),g>0?1-1/(1.001-g):-g),u_contrast_factor:(d=a.paint.get("raster-contrast"),d>0?1/(1-d):1+d),u_spin_weights:Ec(a.paint.get("raster-hue-rotate")),u_coords_top:[l[0].x,l[0].y,l[1].x,l[1].y],u_coords_bottom:[l[3].x,l[3].y,l[2].x,l[2].y]};var d,g};function Ec(h){h*=Math.PI/180;const e=Math.sin(h),r=Math.cos(h);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}const Ro=(h,e,r,a,l,d,g,w,A,I,z,N,F)=>{const Z=g.transform;return{u_is_size_zoom_constant:+(h==="constant"||h==="source"),u_is_size_feature_constant:+(h==="constant"||h==="camera"),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:Z.cameraToCenterDistance,u_pitch:Z.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:Z.width/Z.height,u_fade_change:g.options.fadeDuration?g.symbolFadeChange:1,u_label_plane_matrix:w,u_coord_matrix:A,u_is_text:+z,u_pitch_with_map:+a,u_is_along_line:l,u_is_variable_anchor:d,u_texsize:N,u_texture:0,u_translation:I,u_pitched_scale:F}},Pc=(h,e,r,a,l,d,g,w,A,I,z,N,F,Z)=>{const J=g.transform;return o.e(Ro(h,e,r,a,l,d,g,w,A,I,z,N,Z),{u_gamma_scale:a?Math.cos(J.pitch*Math.PI/180)*J.cameraToCenterDistance:1,u_device_pixel_ratio:g.pixelRatio,u_is_halo:1})},sa=(h,e,r,a,l,d,g,w,A,I,z,N,F)=>o.e(Pc(h,e,r,a,l,d,g,w,A,I,!0,z,0,F),{u_texsize_icon:N,u_texture_icon:1}),Th=(h,e)=>({u_opacity:h,u_color:e}),Eh=(h,e,r,a,l)=>o.e(function(d,g,w,A){const I=w.imageManager.getPattern(d.from.toString()),z=w.imageManager.getPattern(d.to.toString()),{width:N,height:F}=w.imageManager.getPixelSize(),Z=Math.pow(2,A.tileID.overscaledZ),J=A.tileSize*Math.pow(2,w.transform.tileZoom)/Z,oe=J*(A.tileID.canonical.x+A.tileID.wrap*Z),ne=J*A.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:I.tl,u_pattern_br_a:I.br,u_pattern_tl_b:z.tl,u_pattern_br_b:z.br,u_texsize:[N,F],u_mix:g.t,u_pattern_size_a:I.displaySize,u_pattern_size_b:z.displaySize,u_scale_a:g.fromScale,u_scale_b:g.toScale,u_tile_units_to_pixels:1/o.az(A,1,w.transform.tileZoom),u_pixel_coord_upper:[oe>>16,ne>>16],u_pixel_coord_lower:[65535&oe,65535&ne]}}(r,l,e,a),{u_opacity:h}),ol=(h,e)=>{},Ic={fillExtrusion:(h,e)=>({u_lightpos:new o.bL(h,e.u_lightpos),u_lightpos_globe:new o.bL(h,e.u_lightpos_globe),u_lightintensity:new o.b8(h,e.u_lightintensity),u_lightcolor:new o.bL(h,e.u_lightcolor),u_vertical_gradient:new o.b8(h,e.u_vertical_gradient),u_opacity:new o.b8(h,e.u_opacity),u_fill_translate:new o.bM(h,e.u_fill_translate)}),fillExtrusionPattern:(h,e)=>({u_lightpos:new o.bL(h,e.u_lightpos),u_lightpos_globe:new o.bL(h,e.u_lightpos_globe),u_lightintensity:new o.b8(h,e.u_lightintensity),u_lightcolor:new o.bL(h,e.u_lightcolor),u_vertical_gradient:new o.b8(h,e.u_vertical_gradient),u_height_factor:new o.b8(h,e.u_height_factor),u_opacity:new o.b8(h,e.u_opacity),u_fill_translate:new o.bM(h,e.u_fill_translate),u_image:new o.bH(h,e.u_image),u_texsize:new o.bM(h,e.u_texsize),u_pixel_coord_upper:new o.bM(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(h,e.u_pixel_coord_lower),u_scale:new o.bL(h,e.u_scale),u_fade:new o.b8(h,e.u_fade)}),fill:(h,e)=>({u_fill_translate:new o.bM(h,e.u_fill_translate)}),fillPattern:(h,e)=>({u_image:new o.bH(h,e.u_image),u_texsize:new o.bM(h,e.u_texsize),u_pixel_coord_upper:new o.bM(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(h,e.u_pixel_coord_lower),u_scale:new o.bL(h,e.u_scale),u_fade:new o.b8(h,e.u_fade),u_fill_translate:new o.bM(h,e.u_fill_translate)}),fillOutline:(h,e)=>({u_world:new o.bM(h,e.u_world),u_fill_translate:new o.bM(h,e.u_fill_translate)}),fillOutlinePattern:(h,e)=>({u_world:new o.bM(h,e.u_world),u_image:new o.bH(h,e.u_image),u_texsize:new o.bM(h,e.u_texsize),u_pixel_coord_upper:new o.bM(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(h,e.u_pixel_coord_lower),u_scale:new o.bL(h,e.u_scale),u_fade:new o.b8(h,e.u_fade),u_fill_translate:new o.bM(h,e.u_fill_translate)}),circle:(h,e)=>({u_camera_to_center_distance:new o.b8(h,e.u_camera_to_center_distance),u_scale_with_map:new o.bH(h,e.u_scale_with_map),u_pitch_with_map:new o.bH(h,e.u_pitch_with_map),u_extrude_scale:new o.bM(h,e.u_extrude_scale),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_globe_extrude_scale:new o.b8(h,e.u_globe_extrude_scale),u_translate:new o.bM(h,e.u_translate)}),collisionBox:(h,e)=>({u_pixel_extrude_scale:new o.bM(h,e.u_pixel_extrude_scale)}),collisionCircle:(h,e)=>({u_viewport_size:new o.bM(h,e.u_viewport_size)}),debug:(h,e)=>({u_color:new o.bI(h,e.u_color),u_overlay:new o.bH(h,e.u_overlay),u_overlay_scale:new o.b8(h,e.u_overlay_scale)}),depth:ol,clippingMask:ol,heatmap:(h,e)=>({u_extrude_scale:new o.b8(h,e.u_extrude_scale),u_intensity:new o.b8(h,e.u_intensity),u_globe_extrude_scale:new o.b8(h,e.u_globe_extrude_scale)}),heatmapTexture:(h,e)=>({u_matrix:new o.bJ(h,e.u_matrix),u_world:new o.bM(h,e.u_world),u_image:new o.bH(h,e.u_image),u_color_ramp:new o.bH(h,e.u_color_ramp),u_opacity:new o.b8(h,e.u_opacity)}),hillshade:(h,e)=>({u_image:new o.bH(h,e.u_image),u_latrange:new o.bM(h,e.u_latrange),u_exaggeration:new o.b8(h,e.u_exaggeration),u_altitudes:new o.bS(h,e.u_altitudes),u_azimuths:new o.bS(h,e.u_azimuths),u_accent:new o.bI(h,e.u_accent),u_method:new o.bH(h,e.u_method),u_shadows:new o.bR(h,e.u_shadows),u_highlights:new o.bR(h,e.u_highlights)}),hillshadePrepare:(h,e)=>({u_matrix:new o.bJ(h,e.u_matrix),u_image:new o.bH(h,e.u_image),u_dimension:new o.bM(h,e.u_dimension),u_zoom:new o.b8(h,e.u_zoom),u_unpack:new o.bK(h,e.u_unpack)}),line:(h,e)=>({u_translation:new o.bM(h,e.u_translation),u_ratio:new o.b8(h,e.u_ratio),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(h,e.u_units_to_pixels)}),lineGradient:(h,e)=>({u_translation:new o.bM(h,e.u_translation),u_ratio:new o.b8(h,e.u_ratio),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(h,e.u_units_to_pixels),u_image:new o.bH(h,e.u_image),u_image_height:new o.b8(h,e.u_image_height)}),linePattern:(h,e)=>({u_translation:new o.bM(h,e.u_translation),u_texsize:new o.bM(h,e.u_texsize),u_ratio:new o.b8(h,e.u_ratio),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_image:new o.bH(h,e.u_image),u_units_to_pixels:new o.bM(h,e.u_units_to_pixels),u_scale:new o.bL(h,e.u_scale),u_fade:new o.b8(h,e.u_fade)}),lineSDF:(h,e)=>({u_translation:new o.bM(h,e.u_translation),u_ratio:new o.b8(h,e.u_ratio),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_units_to_pixels:new o.bM(h,e.u_units_to_pixels),u_patternscale_a:new o.bM(h,e.u_patternscale_a),u_patternscale_b:new o.bM(h,e.u_patternscale_b),u_sdfgamma:new o.b8(h,e.u_sdfgamma),u_image:new o.bH(h,e.u_image),u_tex_y_a:new o.b8(h,e.u_tex_y_a),u_tex_y_b:new o.b8(h,e.u_tex_y_b),u_mix:new o.b8(h,e.u_mix)}),raster:(h,e)=>({u_tl_parent:new o.bM(h,e.u_tl_parent),u_scale_parent:new o.b8(h,e.u_scale_parent),u_buffer_scale:new o.b8(h,e.u_buffer_scale),u_fade_t:new o.b8(h,e.u_fade_t),u_opacity:new o.b8(h,e.u_opacity),u_image0:new o.bH(h,e.u_image0),u_image1:new o.bH(h,e.u_image1),u_brightness_low:new o.b8(h,e.u_brightness_low),u_brightness_high:new o.b8(h,e.u_brightness_high),u_saturation_factor:new o.b8(h,e.u_saturation_factor),u_contrast_factor:new o.b8(h,e.u_contrast_factor),u_spin_weights:new o.bL(h,e.u_spin_weights),u_coords_top:new o.bK(h,e.u_coords_top),u_coords_bottom:new o.bK(h,e.u_coords_bottom)}),symbolIcon:(h,e)=>({u_is_size_zoom_constant:new o.bH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(h,e.u_is_size_feature_constant),u_size_t:new o.b8(h,e.u_size_t),u_size:new o.b8(h,e.u_size),u_camera_to_center_distance:new o.b8(h,e.u_camera_to_center_distance),u_pitch:new o.b8(h,e.u_pitch),u_rotate_symbol:new o.bH(h,e.u_rotate_symbol),u_aspect_ratio:new o.b8(h,e.u_aspect_ratio),u_fade_change:new o.b8(h,e.u_fade_change),u_label_plane_matrix:new o.bJ(h,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(h,e.u_coord_matrix),u_is_text:new o.bH(h,e.u_is_text),u_pitch_with_map:new o.bH(h,e.u_pitch_with_map),u_is_along_line:new o.bH(h,e.u_is_along_line),u_is_variable_anchor:new o.bH(h,e.u_is_variable_anchor),u_texsize:new o.bM(h,e.u_texsize),u_texture:new o.bH(h,e.u_texture),u_translation:new o.bM(h,e.u_translation),u_pitched_scale:new o.b8(h,e.u_pitched_scale)}),symbolSDF:(h,e)=>({u_is_size_zoom_constant:new o.bH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(h,e.u_is_size_feature_constant),u_size_t:new o.b8(h,e.u_size_t),u_size:new o.b8(h,e.u_size),u_camera_to_center_distance:new o.b8(h,e.u_camera_to_center_distance),u_pitch:new o.b8(h,e.u_pitch),u_rotate_symbol:new o.bH(h,e.u_rotate_symbol),u_aspect_ratio:new o.b8(h,e.u_aspect_ratio),u_fade_change:new o.b8(h,e.u_fade_change),u_label_plane_matrix:new o.bJ(h,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(h,e.u_coord_matrix),u_is_text:new o.bH(h,e.u_is_text),u_pitch_with_map:new o.bH(h,e.u_pitch_with_map),u_is_along_line:new o.bH(h,e.u_is_along_line),u_is_variable_anchor:new o.bH(h,e.u_is_variable_anchor),u_texsize:new o.bM(h,e.u_texsize),u_texture:new o.bH(h,e.u_texture),u_gamma_scale:new o.b8(h,e.u_gamma_scale),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_is_halo:new o.bH(h,e.u_is_halo),u_translation:new o.bM(h,e.u_translation),u_pitched_scale:new o.b8(h,e.u_pitched_scale)}),symbolTextAndIcon:(h,e)=>({u_is_size_zoom_constant:new o.bH(h,e.u_is_size_zoom_constant),u_is_size_feature_constant:new o.bH(h,e.u_is_size_feature_constant),u_size_t:new o.b8(h,e.u_size_t),u_size:new o.b8(h,e.u_size),u_camera_to_center_distance:new o.b8(h,e.u_camera_to_center_distance),u_pitch:new o.b8(h,e.u_pitch),u_rotate_symbol:new o.bH(h,e.u_rotate_symbol),u_aspect_ratio:new o.b8(h,e.u_aspect_ratio),u_fade_change:new o.b8(h,e.u_fade_change),u_label_plane_matrix:new o.bJ(h,e.u_label_plane_matrix),u_coord_matrix:new o.bJ(h,e.u_coord_matrix),u_is_text:new o.bH(h,e.u_is_text),u_pitch_with_map:new o.bH(h,e.u_pitch_with_map),u_is_along_line:new o.bH(h,e.u_is_along_line),u_is_variable_anchor:new o.bH(h,e.u_is_variable_anchor),u_texsize:new o.bM(h,e.u_texsize),u_texsize_icon:new o.bM(h,e.u_texsize_icon),u_texture:new o.bH(h,e.u_texture),u_texture_icon:new o.bH(h,e.u_texture_icon),u_gamma_scale:new o.b8(h,e.u_gamma_scale),u_device_pixel_ratio:new o.b8(h,e.u_device_pixel_ratio),u_is_halo:new o.bH(h,e.u_is_halo),u_translation:new o.bM(h,e.u_translation),u_pitched_scale:new o.b8(h,e.u_pitched_scale)}),background:(h,e)=>({u_opacity:new o.b8(h,e.u_opacity),u_color:new o.bI(h,e.u_color)}),backgroundPattern:(h,e)=>({u_opacity:new o.b8(h,e.u_opacity),u_image:new o.bH(h,e.u_image),u_pattern_tl_a:new o.bM(h,e.u_pattern_tl_a),u_pattern_br_a:new o.bM(h,e.u_pattern_br_a),u_pattern_tl_b:new o.bM(h,e.u_pattern_tl_b),u_pattern_br_b:new o.bM(h,e.u_pattern_br_b),u_texsize:new o.bM(h,e.u_texsize),u_mix:new o.b8(h,e.u_mix),u_pattern_size_a:new o.bM(h,e.u_pattern_size_a),u_pattern_size_b:new o.bM(h,e.u_pattern_size_b),u_scale_a:new o.b8(h,e.u_scale_a),u_scale_b:new o.b8(h,e.u_scale_b),u_pixel_coord_upper:new o.bM(h,e.u_pixel_coord_upper),u_pixel_coord_lower:new o.bM(h,e.u_pixel_coord_lower),u_tile_units_to_pixels:new o.b8(h,e.u_tile_units_to_pixels)}),terrain:(h,e)=>({u_texture:new o.bH(h,e.u_texture),u_ele_delta:new o.b8(h,e.u_ele_delta),u_fog_matrix:new o.bJ(h,e.u_fog_matrix),u_fog_color:new o.bI(h,e.u_fog_color),u_fog_ground_blend:new o.b8(h,e.u_fog_ground_blend),u_fog_ground_blend_opacity:new o.b8(h,e.u_fog_ground_blend_opacity),u_horizon_color:new o.bI(h,e.u_horizon_color),u_horizon_fog_blend:new o.b8(h,e.u_horizon_fog_blend),u_is_globe_mode:new o.b8(h,e.u_is_globe_mode)}),terrainDepth:(h,e)=>({u_ele_delta:new o.b8(h,e.u_ele_delta)}),terrainCoords:(h,e)=>({u_texture:new o.bH(h,e.u_texture),u_terrain_coords_id:new o.b8(h,e.u_terrain_coords_id),u_ele_delta:new o.b8(h,e.u_ele_delta)}),projectionErrorMeasurement:(h,e)=>({u_input:new o.b8(h,e.u_input),u_output_expected:new o.b8(h,e.u_output_expected)}),atmosphere:(h,e)=>({u_sun_pos:new o.bL(h,e.u_sun_pos),u_atmosphere_blend:new o.b8(h,e.u_atmosphere_blend),u_globe_position:new o.bL(h,e.u_globe_position),u_globe_radius:new o.b8(h,e.u_globe_radius),u_inv_proj_matrix:new o.bJ(h,e.u_inv_proj_matrix)}),sky:(h,e)=>({u_sky_color:new o.bI(h,e.u_sky_color),u_horizon_color:new o.bI(h,e.u_horizon_color),u_horizon:new o.bM(h,e.u_horizon),u_horizon_normal:new o.bM(h,e.u_horizon_normal),u_sky_horizon_blend:new o.b8(h,e.u_sky_horizon_blend),u_sky_blend:new o.b8(h,e.u_sky_blend)})};class Mc{constructor(e,r,a){this.context=e;const l=e.gl;this.buffer=l.createBuffer(),this.dynamicDraw=!!a,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),l.bufferData(l.ELEMENT_ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?l.DYNAMIC_DRAW:l.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){const r=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),r.bufferSubData(r.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const sl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Lc{constructor(e,r,a,l){this.length=r.length,this.attributes=a,this.itemSize=r.bytesPerElement,this.dynamicDraw=l,this.context=e;const d=e.gl;this.buffer=d.createBuffer(),e.bindVertexBuffer.set(this.buffer),d.bufferData(d.ARRAY_BUFFER,r.arrayBuffer,this.dynamicDraw?d.DYNAMIC_DRAW:d.STATIC_DRAW),this.dynamicDraw||delete r.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw new Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);const r=this.context.gl;this.bind(),r.bufferSubData(r.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,r){for(let a=0;a<this.attributes.length;a++){const l=r.attributes[this.attributes[a].name];l!==void 0&&e.enableVertexAttribArray(l)}}setVertexAttribPointers(e,r,a){for(let l=0;l<this.attributes.length;l++){const d=this.attributes[l],g=r.attributes[d.name];g!==void 0&&e.vertexAttribPointer(g,d.components,e[sl[d.type]],!1,this.itemSize,d.offset+this.itemSize*(a||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class lr{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class zn extends lr{getDefault(){return o.b7.transparent}set(e){const r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class al extends lr{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class ll extends lr{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class cl extends lr{getDefault(){return[!0,!0,!0,!0]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Rc extends lr{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class ul extends lr{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class vo extends lr{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){const r=this.current;(e.func!==r.func||e.ref!==r.ref||e.mask!==r.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class hl extends lr{getDefault(){const e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class Ph extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.STENCIL_TEST):r.disable(r.STENCIL_TEST),this.current=e,this.dirty=!1}}class Ih extends lr{getDefault(){return[0,1]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class Mh extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.DEPTH_TEST):r.disable(r.DEPTH_TEST),this.current=e,this.dirty=!1}}class Lh extends lr{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class Dc extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.BLEND):r.disable(r.BLEND),this.current=e,this.dirty=!1}}class Rh extends lr{getDefault(){const e=this.gl;return[e.ONE,e.ZERO]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class zc extends lr{getDefault(){return o.b7.transparent}set(e){const r=this.current;(e.r!==r.r||e.g!==r.g||e.b!==r.b||e.a!==r.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class aa extends lr{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class la extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;e?r.enable(r.CULL_FACE):r.disable(r.CULL_FACE),this.current=e,this.dirty=!1}}class ca extends lr{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class dl extends lr{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class xo extends lr{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class ua extends lr{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class Do extends lr{getDefault(){const e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){const r=this.current;(e[0]!==r[0]||e[1]!==r[1]||e[2]!==r[2]||e[3]!==r[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class Xi extends lr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindFramebuffer(r.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class Bc extends lr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindRenderbuffer(r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Vc extends lr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindTexture(r.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class pl extends lr{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.bindBuffer(r.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class bo extends lr{getDefault(){return null}set(e){const r=this.gl;r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class ha extends lr{getDefault(){return null}set(e){var r;if(e===this.current&&!this.dirty)return;const a=this.gl;br(a)?a.bindVertexArray(e):(r=a.getExtension("OES_vertex_array_object"))===null||r===void 0||r.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class da extends lr{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class fs extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class pa extends lr{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;const r=this.gl;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class fa extends lr{constructor(e,r){super(e),this.context=e,this.parent=r}getDefault(){return null}}class zo extends fa{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class Bo extends fa{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class Oc extends fa{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const r=this.gl;r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,e),this.current=e,this.dirty=!1}}const ma="Framebuffer is not complete";class $t{constructor(e,r,a,l,d){this.context=e,this.width=r,this.height=a;const g=e.gl,w=this.framebuffer=g.createFramebuffer();if(this.colorAttachment=new zo(e,w),l)this.depthAttachment=d?new Oc(e,w):new Bo(e,w);else if(d)throw new Error("Stencil cannot be set without depth");if(g.checkFramebufferStatus(g.FRAMEBUFFER)!==g.FRAMEBUFFER_COMPLETE)throw new Error(ma)}destroy(){const e=this.context.gl,r=this.colorAttachment.get();if(r&&e.deleteTexture(r),this.depthAttachment){const a=this.depthAttachment.get();a&&e.deleteRenderbuffer(a)}e.deleteFramebuffer(this.framebuffer)}}class ga{constructor(e){var r,a;if(this.gl=e,this.clearColor=new zn(this),this.clearDepth=new al(this),this.clearStencil=new ll(this),this.colorMask=new cl(this),this.depthMask=new Rc(this),this.stencilMask=new ul(this),this.stencilFunc=new vo(this),this.stencilOp=new hl(this),this.stencilTest=new Ph(this),this.depthRange=new Ih(this),this.depthTest=new Mh(this),this.depthFunc=new Lh(this),this.blend=new Dc(this),this.blendFunc=new Rh(this),this.blendColor=new zc(this),this.blendEquation=new aa(this),this.cullFace=new la(this),this.cullFaceSide=new ca(this),this.frontFace=new dl(this),this.program=new xo(this),this.activeTexture=new ua(this),this.viewport=new Do(this),this.bindFramebuffer=new Xi(this),this.bindRenderbuffer=new Bc(this),this.bindTexture=new Vc(this),this.bindVertexBuffer=new pl(this),this.bindElementBuffer=new bo(this),this.bindVertexArray=new ha(this),this.pixelStoreUnpack=new da(this),this.pixelStoreUnpackPremultiplyAlpha=new fs(this),this.pixelStoreUnpackFlipY=new pa(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),br(e)){this.HALF_FLOAT=e.HALF_FLOAT;const l=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(r=e.RGBA16F)!==null&&r!==void 0?r:l==null?void 0:l.RGBA16F_EXT,this.RGB16F=(a=e.RGB16F)!==null&&a!==void 0?a:l==null?void 0:l.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");const l=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=l==null?void 0:l.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,r){return new Mc(this,e,r)}createVertexBuffer(e,r,a){return new Lc(this,e,r,a)}createRenderbuffer(e,r,a){const l=this.gl,d=l.createRenderbuffer();return this.bindRenderbuffer.set(d),l.renderbufferStorage(l.RENDERBUFFER,e,r,a),this.bindRenderbuffer.set(null),d}createFramebuffer(e,r,a,l){return new $t(this,e,r,a,l)}clear({color:e,depth:r,stencil:a}){const l=this.gl;let d=0;e&&(d|=l.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),r!==void 0&&(d|=l.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),a!==void 0&&(d|=l.STENCIL_BUFFER_BIT,this.clearStencil.set(a),this.stencilMask.set(255)),l.clear(d)}setCullFace(e){e.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){o.bE(e.blendFunction,Ye.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return br(this.gl)?this.gl.createVertexArray():(e=this.gl.getExtension("OES_vertex_array_object"))===null||e===void 0?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var r;return br(this.gl)?this.gl.deleteVertexArray(e):(r=this.gl.getExtension("OES_vertex_array_object"))===null||r===void 0?void 0:r.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}let ya;function fl(h,e,r,a,l){const d=h.context,g=h.transform,w=d.gl,A=h.useProgram("collisionBox"),I=[];let z=0,N=0;for(let se=0;se<a.length;se++){const pe=a[se],_e=e.getTile(pe).getBucket(r);if(!_e)continue;const ye=l?_e.textCollisionBox:_e.iconCollisionBox,be=_e.collisionCircleArray;be.length>0&&(I.push({circleArray:be,circleOffset:N,coord:pe}),z+=be.length/4,N=z),ye&&A.draw(d,w.LINES,ot.disabled,pt.disabled,h.colorModeForRenderPass(),ht.disabled,kh(h.transform),h.style.map.terrain&&h.style.map.terrain.getTerrainData(pe),g.getProjectionData({overscaledTileID:pe,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),r.id,ye.layoutVertexBuffer,ye.indexBuffer,ye.segments,null,h.transform.zoom,null,null,ye.collisionVertexBuffer)}if(!l||!I.length)return;const F=h.useProgram("collisionCircle"),Z=new o.bT;Z.resize(4*z),Z._trim();let J=0;for(const se of I)for(let pe=0;pe<se.circleArray.length/4;pe++){const _e=4*pe,ye=se.circleArray[_e+0],be=se.circleArray[_e+1],Ce=se.circleArray[_e+2],we=se.circleArray[_e+3];Z.emplace(J++,ye,be,Ce,we,0),Z.emplace(J++,ye,be,Ce,we,1),Z.emplace(J++,ye,be,Ce,we,2),Z.emplace(J++,ye,be,Ce,we,3)}(!ya||ya.length<2*z)&&(ya=function(se){const pe=2*se,_e=new o.bV;_e.resize(pe),_e._trim();for(let ye=0;ye<pe;ye++){const be=6*ye;_e.uint16[be+0]=4*ye+0,_e.uint16[be+1]=4*ye+1,_e.uint16[be+2]=4*ye+2,_e.uint16[be+3]=4*ye+2,_e.uint16[be+4]=4*ye+3,_e.uint16[be+5]=4*ye+0}return _e}(z));const oe=d.createIndexBuffer(ya,!0),ne=d.createVertexBuffer(Z,o.bU.members,!0);for(const se of I){const pe=oa(h.transform);F.draw(d,w.TRIANGLES,ot.disabled,pt.disabled,h.colorModeForRenderPass(),ht.disabled,pe,h.style.map.terrain&&h.style.map.terrain.getTerrainData(se.coord),null,r.id,ne,oe,o.aJ.simpleSegment(0,2*se.circleOffset,se.circleArray.length,se.circleArray.length/2),null,h.transform.zoom,null,null,null)}ne.destroy(),oe.destroy()}const ms=o.ad(new Float32Array(16));function Dh(h,e,r,a,l,d){const{horizontalAlign:g,verticalAlign:w}=o.aE(h);return new o.P((-(g-.5)*e/l+a[0])*d,(-(w-.5)*r/l+a[1])*d)}function zh(h,e,r,a,l,d){const g=e.tileAnchorPoint.add(new o.P(e.translation[0],e.translation[1]));if(e.pitchWithMap){let w=a.mult(d);r||(w=w.rotate(-l));const A=g.add(w);return Ue(A.x,A.y,e.pitchedLabelPlaneMatrix,e.getElevation).point}if(r){const w=mr(e.tileAnchorPoint.x+1,e.tileAnchorPoint.y,e).point.sub(h),A=Math.atan(w.y/w.x)+(w.x<0?Math.PI:0);return h.add(a.rotate(A))}return h.add(a)}function Fc(h,e,r,a,l,d,g,w,A,I,z,N){const F=h.text.placedSymbolArray,Z=h.text.dynamicLayoutVertexArray,J=h.icon.dynamicLayoutVertexArray,oe={};Z.clear();for(let ne=0;ne<F.length;ne++){const se=F.get(ne),pe=se.hidden||!se.crossTileID||h.allowVerticalPlacement&&!se.placedOrientation?null:a[se.crossTileID];if(pe){const _e=new o.P(se.anchorX,se.anchorY),ye={getElevation:N,width:l.width,height:l.height,pitchedLabelPlaneMatrix:d,pitchWithMap:r,transform:l,tileAnchorPoint:_e,translation:I,unwrappedTileID:z},be=r?Gt(_e.x,_e.y,ye):mr(_e.x,_e.y,ye),Ce=cr(l.cameraToCenterDistance,be.signedDistanceFromCamera);let we=o.am(h.textSizeData,w,se)*Ce/o.ay;r&&(we*=h.tilePixelRatio/g);const{width:Re,height:We,anchor:Fe,textOffset:Ne,textBoxScale:je}=pe,mt=Dh(Fe,Re,We,Ne,je,we),dt=l.getPitchedTextCorrection(_e.x+I[0],_e.y+I[1],z),tt=zh(be.point,ye,e,mt,-l.bearingInRadians,dt),kt=h.allowVerticalPlacement&&se.placedOrientation===o.al.vertical?Math.PI/2:0;for(let Xt=0;Xt<se.numGlyphs;Xt++)o.as(Z,tt,kt);A&&se.associatedIconIndex>=0&&(oe[se.associatedIconIndex]={shiftedAnchor:tt,angle:kt})}else Li(se.numGlyphs,Z)}if(A){J.clear();const ne=h.icon.placedSymbolArray;for(let se=0;se<ne.length;se++){const pe=ne.get(se);if(pe.hidden)Li(pe.numGlyphs,J);else{const _e=oe[se];if(_e)for(let ye=0;ye<pe.numGlyphs;ye++)o.as(J,_e.shiftedAnchor,_e.angle);else Li(pe.numGlyphs,J)}}h.icon.dynamicLayoutVertexBuffer.updateData(J)}h.text.dynamicLayoutVertexBuffer.updateData(Z)}function Bh(h,e,r){return r.iconsInText&&e?"symbolTextAndIcon":h?"symbolSDF":"symbolIcon"}function _a(h,e,r,a,l,d,g,w,A,I,z,N,F){const Z=h.context,J=Z.gl,oe=h.transform,ne=w==="map",se=A==="map",pe=w!=="viewport"&&r.layout.get("symbol-placement")!=="point",_e=ne&&!se&&!pe,ye=!r.layout.get("symbol-sort-key").isConstant();let be=!1;const Ce=h.getDepthModeForSublayer(0,ot.ReadOnly),we=r._unevaluatedLayout.hasValue("text-variable-anchor")||r._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Re=[],We=oe.getCircleRadiusCorrection();for(const Fe of a){const Ne=e.getTile(Fe),je=Ne.getBucket(r);if(!je)continue;const mt=l?je.text:je.icon;if(!mt||!mt.segments.get().length||!mt.hasVisibleVertices)continue;const dt=mt.programConfigurations.get(r.id),tt=l||je.sdfIcons,kt=l?je.textSizeData:je.iconSizeData,Xt=se||oe.pitch!==0,nr=h.useProgram(Bh(tt,l,je),dt),Lr=o.ak(kt,oe.zoom),_r=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Fe);let Rr,Dr,wr,ur,Qr=[0,0],ci=null;if(l)Dr=Ne.glyphAtlasTexture,wr=J.LINEAR,Rr=Ne.glyphAtlasTexture.size,je.iconsInText&&(Qr=Ne.imageAtlasTexture.size,ci=Ne.imageAtlasTexture,ur=Xt||h.options.rotating||h.options.zooming||kt.kind==="composite"||kt.kind==="camera"?J.LINEAR:J.NEAREST);else{const Wr=r.layout.get("icon-size").constantOr(0)!==1||je.iconsNeedLinear;Dr=Ne.imageAtlasTexture,wr=tt||h.options.rotating||h.options.zooming||Wr||Xt?J.LINEAR:J.NEAREST,Rr=Ne.imageAtlasTexture.size}const vi=o.az(Ne,1,h.transform.zoom),hr=It(ne,h.transform,vi),$n=o.K();o.an($n,hr);const An=jt(se,ne,h.transform,vi),eo=o.aA(oe,Ne,d,g),Ao=oe.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!F,applyTerrainMatrix:!0}),Is=we&&je.hasTextData(),to=r.layout.get("icon-text-fit")!=="none"&&Is&&je.hasIconData();if(pe){const Wr=h.style.map.terrain?(Pi,Cr)=>h.style.map.terrain.getElevation(Fe,Pi,Cr):null,Zr=r.layout.get("text-rotation-alignment")==="map";sr(je,h,l,hr,$n,se,I,Zr,Fe.toUnwrapped(),oe.width,oe.height,eo,Wr)}const ko=l&&we||to,qi=pe||ko?ms:se?hr:h.transform.clipSpaceToPixelsMatrix,ro=tt&&r.paint.get(l?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let Vn;Vn=tt?je.iconsInText?sa(kt.kind,Lr,_e,se,pe,ko,h,qi,An,eo,Rr,Qr,We):Pc(kt.kind,Lr,_e,se,pe,ko,h,qi,An,eo,l,Rr,0,We):Ro(kt.kind,Lr,_e,se,pe,ko,h,qi,An,eo,l,Rr,We);const io={program:nr,buffers:mt,uniformValues:Vn,projectionData:Ao,atlasTexture:Dr,atlasTextureIcon:ci,atlasInterpolation:wr,atlasInterpolationIcon:ur,isSDF:tt,hasHalo:ro};if(ye&&je.canOverlap){be=!0;const Wr=mt.segments.get();for(const Zr of Wr)Re.push({segments:new o.aJ([Zr]),sortKey:Zr.sortKey,state:io,terrainData:_r})}else Re.push({segments:mt.segments,sortKey:0,state:io,terrainData:_r})}be&&Re.sort((Fe,Ne)=>Fe.sortKey-Ne.sortKey);for(const Fe of Re){const Ne=Fe.state;if(Z.activeTexture.set(J.TEXTURE0),Ne.atlasTexture.bind(Ne.atlasInterpolation,J.CLAMP_TO_EDGE),Ne.atlasTextureIcon&&(Z.activeTexture.set(J.TEXTURE1),Ne.atlasTextureIcon&&Ne.atlasTextureIcon.bind(Ne.atlasInterpolationIcon,J.CLAMP_TO_EDGE)),Ne.isSDF){const je=Ne.uniformValues;Ne.hasHalo&&(je.u_is_halo=1,gs(Ne.buffers,Fe.segments,r,h,Ne.program,Ce,z,N,je,Ne.projectionData,Fe.terrainData)),je.u_is_halo=0}gs(Ne.buffers,Fe.segments,r,h,Ne.program,Ce,z,N,Ne.uniformValues,Ne.projectionData,Fe.terrainData)}}function gs(h,e,r,a,l,d,g,w,A,I,z){const N=a.context;l.draw(N,N.gl.TRIANGLES,d,g,w,ht.backCCW,A,z,I,r.id,h.layoutVertexBuffer,h.indexBuffer,e,r.paint,a.transform.zoom,h.programConfigurations.get(r.id),h.dynamicLayoutVertexBuffer,h.opacityVertexBuffer)}function va(h,e,r,a,l){const d=h.context,g=d.gl,w=pt.disabled,A=new Ye([g.ONE,g.ONE],o.b7.transparent,[!0,!0,!0,!0]),I=e.getBucket(r);if(!I)return;const z=a.key;let N=r.heatmapFbos.get(z);N||(N=xa(d,e.tileSize,e.tileSize),r.heatmapFbos.set(z,N)),d.bindFramebuffer.set(N.framebuffer),d.viewport.set([0,0,e.tileSize,e.tileSize]),d.clear({color:o.b7.transparent});const F=I.programConfigurations.get(r.id),Z=h.useProgram("heatmap",F,!l),J=h.transform.getProjectionData({overscaledTileID:e.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),oe=h.style.map.terrain.getTerrainData(a);Z.draw(d,g.TRIANGLES,ot.disabled,w,A,ht.disabled,_o(e,h.transform.zoom,r.paint.get("heatmap-intensity"),1),oe,J,r.id,I.layoutVertexBuffer,I.indexBuffer,I.segments,r.paint,h.transform.zoom,F)}function ml(h,e,r,a,l){const d=h.context,g=d.gl,w=h.transform;d.setColorMode(h.colorModeForRenderPass());const A=gl(d,e),I=r.key,z=e.heatmapFbos.get(I);if(!z)return;d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,z.colorAttachment.get()),d.activeTexture.set(g.TEXTURE1),A.bind(g.LINEAR,g.CLAMP_TO_EDGE);const N=w.getProjectionData({overscaledTileID:r,applyTerrainMatrix:l,applyGlobeMatrix:!a});h.useProgram("heatmapTexture").draw(d,g.TRIANGLES,ot.disabled,pt.disabled,h.colorModeForRenderPass(),ht.disabled,bc(h,e,0,1),null,N,e.id,h.rasterBoundsBuffer,h.quadTriangleIndexBuffer,h.rasterBoundsSegments,e.paint,w.zoom),z.destroy(),e.heatmapFbos.delete(I)}function xa(h,e,r){var a,l;const d=h.gl,g=d.createTexture();d.bindTexture(d.TEXTURE_2D,g),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);const w=(a=h.HALF_FLOAT)!==null&&a!==void 0?a:d.UNSIGNED_BYTE,A=(l=h.RGBA16F)!==null&&l!==void 0?l:d.RGBA;d.texImage2D(d.TEXTURE_2D,0,A,e,r,0,d.RGBA,w,null);const I=h.createFramebuffer(e,r,!1,!1);return I.colorAttachment.set(g),I}function gl(h,e){return e.colorRampTexture||(e.colorRampTexture=new rt(h,e.colorRamp,h.gl.RGBA)),e.colorRampTexture}function ys(h,e,r,a,l){if(!r||!a||!a.imageAtlas)return;const d=a.imageAtlas.patternPositions;let g=d[r.to.toString()],w=d[r.from.toString()];if(!g&&w&&(g=w),!w&&g&&(w=g),!g||!w){const A=l.getPaintProperty(e);g=d[A],w=d[A]}g&&w&&h.setConstantPatternPositions(g,w)}function _s(h,e,r,a,l,d,g,w){const A=h.context.gl,I="fill-pattern",z=r.paint.get(I),N=z&&z.constantOr(1),F=r.getCrossfadeParameters();let Z,J,oe,ne,se;const pe=h.transform,_e=r.paint.get("fill-translate"),ye=r.paint.get("fill-translate-anchor");g?(J=N&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",Z=A.LINES):(J=N?"fillPattern":"fill",Z=A.TRIANGLES);const be=z.constantOr(null);for(const Ce of a){const we=e.getTile(Ce);if(N&&!we.patternsLoaded())continue;const Re=we.getBucket(r);if(!Re)continue;const We=Re.programConfigurations.get(r.id),Fe=h.useProgram(J,We),Ne=h.style.map.terrain&&h.style.map.terrain.getTerrainData(Ce);N&&(h.context.activeTexture.set(A.TEXTURE0),we.imageAtlasTexture.bind(A.LINEAR,A.CLAMP_TO_EDGE),We.updatePaintBuffers(F)),ys(We,I,be,we,r);const je=pe.getProjectionData({overscaledTileID:Ce,applyGlobeMatrix:!w,applyTerrainMatrix:!0}),mt=o.aA(pe,we,_e,ye);if(g){ne=Re.indexBuffer2,se=Re.segments2;const tt=[A.drawingBufferWidth,A.drawingBufferHeight];oe=J==="fillOutlinePattern"&&N?hs(h,F,we,tt,mt):il(tt,mt)}else ne=Re.indexBuffer,se=Re.segments,oe=N?vc(h,F,we,mt):{u_fill_translate:mt};const dt=h.stencilModeForClipping(Ce);Fe.draw(h.context,Z,l,dt,d,ht.backCCW,oe,Ne,je,r.id,Re.layoutVertexBuffer,ne,se,r.paint,h.transform.zoom,We)}}function vs(h,e,r,a,l,d,g,w){const A=h.context,I=A.gl,z="fill-extrusion-pattern",N=r.paint.get(z),F=N.constantOr(1),Z=r.getCrossfadeParameters(),J=r.paint.get("fill-extrusion-opacity"),oe=N.constantOr(null),ne=h.transform;for(const se of a){const pe=e.getTile(se),_e=pe.getBucket(r);if(!_e)continue;const ye=h.style.map.terrain&&h.style.map.terrain.getTerrainData(se),be=_e.programConfigurations.get(r.id),Ce=h.useProgram(F?"fillExtrusionPattern":"fillExtrusion",be);F&&(h.context.activeTexture.set(I.TEXTURE0),pe.imageAtlasTexture.bind(I.LINEAR,I.CLAMP_TO_EDGE),be.updatePaintBuffers(Z));const we=ne.getProjectionData({overscaledTileID:se,applyGlobeMatrix:!w,applyTerrainMatrix:!0});ys(be,z,oe,pe,r);const Re=o.aA(ne,pe,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),We=r.paint.get("fill-extrusion-vertical-gradient"),Fe=F?bn(h,We,J,Re,se,Z,pe):na(h,We,J,Re);Ce.draw(A,A.gl.TRIANGLES,l,d,g,ht.backCCW,Fe,ye,we,r.id,_e.layoutVertexBuffer,_e.indexBuffer,_e.segments,r.paint,h.transform.zoom,be,h.style.map.terrain&&_e.centroidVertexBuffer)}}function yl(h,e,r,a,l,d,g,w,A){var I;const z=h.style.projection,N=h.context,F=h.transform,Z=N.gl,J=[`#define NUM_ILLUMINATION_SOURCES ${r.paint.get("hillshade-highlight-color").values.length}`],oe=h.useProgram("hillshade",null,!1,J),ne=!h.options.moving;for(const se of a){const pe=e.getTile(se),_e=pe.fbo;if(!_e)continue;const ye=z.getMeshFromTileID(N,se.canonical,w,!0,"raster"),be=(I=h.style.map.terrain)===null||I===void 0?void 0:I.getTerrainData(se);N.activeTexture.set(Z.TEXTURE0),Z.bindTexture(Z.TEXTURE_2D,_e.colorAttachment.get());const Ce=F.getProjectionData({overscaledTileID:se,aligned:ne,applyGlobeMatrix:!A,applyTerrainMatrix:!0});oe.draw(N,Z.TRIANGLES,d,l[se.overscaledZ],g,ht.backCCW,wc(h,pe,r),be,Ce,r.id,ye.vertexBuffer,ye.indexBuffer,ye.segments)}}const xs=[new o.P(0,0),new o.P(o.Z,0),new o.P(o.Z,o.Z),new o.P(0,o.Z)];function ba(h,e,r,a,l,d,g,w,A=!1,I=!1){const z=a[a.length-1].overscaledZ,N=h.context,F=N.gl,Z=h.useProgram("raster"),J=h.transform,oe=h.style.projection,ne=h.colorModeForRenderPass(),se=!h.options.moving;for(const pe of a){const _e=h.getDepthModeForSublayer(pe.overscaledZ-z,r.paint.get("raster-opacity")===1?ot.ReadWrite:ot.ReadOnly,F.LESS),ye=e.getTile(pe);ye.registerFadeDuration(r.paint.get("raster-fade-duration"));const be=e.findLoadedParent(pe,0),Ce=e.findLoadedSibling(pe),we=Nc(ye,be||Ce||null,e,r,h.transform,h.style.map.terrain);let Re,We;const Fe=r.paint.get("raster-resampling")==="nearest"?F.NEAREST:F.LINEAR;N.activeTexture.set(F.TEXTURE0),ye.texture.bind(Fe,F.CLAMP_TO_EDGE,F.LINEAR_MIPMAP_NEAREST),N.activeTexture.set(F.TEXTURE1),be?(be.texture.bind(Fe,F.CLAMP_TO_EDGE,F.LINEAR_MIPMAP_NEAREST),Re=Math.pow(2,be.tileID.overscaledZ-ye.tileID.overscaledZ),We=[ye.tileID.canonical.x*Re%1,ye.tileID.canonical.y*Re%1]):ye.texture.bind(Fe,F.CLAMP_TO_EDGE,F.LINEAR_MIPMAP_NEAREST),ye.texture.useMipmap&&N.extTextureFilterAnisotropic&&h.transform.pitch>20&&F.texParameterf(F.TEXTURE_2D,N.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,N.extTextureFilterAnisotropicMax);const Ne=h.style.map.terrain&&h.style.map.terrain.getTerrainData(pe),je=J.getProjectionData({overscaledTileID:pe,aligned:se,applyGlobeMatrix:!I,applyTerrainMatrix:!0}),mt=Tc(We||[0,0],Re||1,we,r,w),dt=oe.getMeshFromTileID(N,pe.canonical,d,g,"raster");Z.draw(N,F.TRIANGLES,_e,l?l[pe.overscaledZ]:pt.disabled,ne,A?ht.frontCCW:ht.backCCW,mt,Ne,je,r.id,dt.vertexBuffer,dt.indexBuffer,dt.segments)}}function Nc(h,e,r,a,l,d){const g=a.paint.get("raster-fade-duration");if(!d&&g>0){const w=L.now(),A=(w-h.timeAdded)/g,I=e?(w-e.timeAdded)/g:-1,z=r.getSource(),N=Pe(l,{tileSize:z.tileSize,roundZoom:z.roundZoom}),F=!e||Math.abs(e.tileID.overscaledZ-N)>Math.abs(h.tileID.overscaledZ-N),Z=F&&h.refreshedUponExpiration?1:o.ae(F?A:1-I,0,1);return h.refreshedUponExpiration&&A>=1&&(h.refreshedUponExpiration=!1),e?{opacity:1,mix:1-Z}:{opacity:Z,mix:0}}return{opacity:1,mix:0}}const wa=new o.b7(1,0,0,1),_l=new o.b7(0,1,0,1),qc=new o.b7(0,0,1,1),Uc=new o.b7(1,0,1,1),Sa=new o.b7(0,1,1,1);function Aa(h,e,r,a){bs(h,0,e+r/2,h.transform.width,r,a)}function jc(h,e,r,a){bs(h,e-r/2,0,r,h.transform.height,a)}function bs(h,e,r,a,l,d){const g=h.context,w=g.gl;w.enable(w.SCISSOR_TEST),w.scissor(e*h.pixelRatio,r*h.pixelRatio,a*h.pixelRatio,l*h.pixelRatio),g.clear({color:d}),w.disable(w.SCISSOR_TEST)}function qr(h,e,r){const a=h.context,l=a.gl,d=h.useProgram("debug"),g=ot.disabled,w=pt.disabled,A=h.colorModeForRenderPass(),I="$debug",z=h.style.map.terrain&&h.style.map.terrain.getTerrainData(r);a.activeTexture.set(l.TEXTURE0);const N=e.getTileByID(r.key).latestRawTileData,F=Math.floor((N&&N.byteLength||0)/1024),Z=e.getTile(r).tileSize,J=512/Math.min(Z,512)*(r.overscaledZ/h.transform.zoom)*.5;let oe=r.canonical.toString();r.overscaledZ!==r.canonical.z&&(oe+=` => ${r.overscaledZ}`),function(se,pe){se.initDebugOverlayCanvas();const _e=se.debugOverlayCanvas,ye=se.context.gl,be=se.debugOverlayCanvas.getContext("2d");be.clearRect(0,0,_e.width,_e.height),be.shadowColor="white",be.shadowBlur=2,be.lineWidth=1.5,be.strokeStyle="white",be.textBaseline="top",be.font="bold 36px Open Sans, sans-serif",be.fillText(pe,5,5),be.strokeText(pe,5,5),se.debugOverlayTexture.update(_e),se.debugOverlayTexture.bind(ye.LINEAR,ye.CLAMP_TO_EDGE)}(h,`${oe} ${F}kB`);const ne=h.transform.getProjectionData({overscaledTileID:r,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(a,l.TRIANGLES,g,w,Ye.alphaBlended,ht.disabled,xc(o.b7.transparent,J),null,ne,I,h.debugBuffer,h.quadTriangleIndexBuffer,h.debugSegments),d.draw(a,l.LINE_STRIP,g,w,A,ht.disabled,xc(o.b7.red),z,ne,I,h.debugBuffer,h.tileBorderIndexBuffer,h.debugSegments)}function Yn(h,e,r,a){const{isRenderingGlobe:l}=a,d=h.context,g=d.gl,w=h.transform,A=h.colorModeForRenderPass(),I=h.getDepthModeFor3D(),z=h.useProgram("terrain");d.bindFramebuffer.set(null),d.viewport.set([0,0,h.width,h.height]);for(const N of r){const F=e.getTerrainMesh(N.tileID),Z=h.renderToTexture.getTexture(N),J=e.getTerrainData(N.tileID);d.activeTexture.set(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,Z.texture);const oe=e.getMeshFrameDelta(w.zoom),ne=w.calculateFogMatrix(N.tileID.toUnwrapped()),se=Ah(oe,ne,h.style.sky,w.pitch,l),pe=w.getProjectionData({overscaledTileID:N.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});z.draw(d,g.TRIANGLES,I,pt.disabled,A,ht.backCCW,se,J,pe,"terrain",F.vertexBuffer,F.indexBuffer,F.segments)}}function Ni(h,e){if(!e.mesh){const r=new o.aI;r.emplaceBack(-1,-1),r.emplaceBack(1,-1),r.emplaceBack(1,1),r.emplaceBack(-1,1);const a=new o.aK;a.emplaceBack(0,1,2),a.emplaceBack(0,2,3),e.mesh=new Mn(h.createVertexBuffer(r,si.members),h.createIndexBuffer(a),o.aJ.simpleSegment(0,0,r.length,a.length))}return e.mesh}class vl{constructor(e,r){this.context=new ga(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:o.ad(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Te.maxUnderzooming+Te.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Jn}resize(e,r,a){if(this.width=Math.floor(e*a),this.height=Math.floor(r*a),this.pixelRatio=a,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const l of this.style._order)this.style._layers[l].resize()}setup(){const e=this.context,r=new o.aI;r.emplaceBack(0,0),r.emplaceBack(o.Z,0),r.emplaceBack(0,o.Z),r.emplaceBack(o.Z,o.Z),this.tileExtentBuffer=e.createVertexBuffer(r,si.members),this.tileExtentSegments=o.aJ.simpleSegment(0,0,4,2);const a=new o.aI;a.emplaceBack(0,0),a.emplaceBack(o.Z,0),a.emplaceBack(0,o.Z),a.emplaceBack(o.Z,o.Z),this.debugBuffer=e.createVertexBuffer(a,si.members),this.debugSegments=o.aJ.simpleSegment(0,0,4,5);const l=new o.b_;l.emplaceBack(0,0,0,0),l.emplaceBack(o.Z,0,o.Z,0),l.emplaceBack(0,o.Z,0,o.Z),l.emplaceBack(o.Z,o.Z,o.Z,o.Z),this.rasterBoundsBuffer=e.createVertexBuffer(l,wh.members),this.rasterBoundsSegments=o.aJ.simpleSegment(0,0,4,2);const d=new o.aI;d.emplaceBack(0,0),d.emplaceBack(o.Z,0),d.emplaceBack(0,o.Z),d.emplaceBack(o.Z,o.Z),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(d,si.members),this.rasterBoundsSegmentsPosOnly=o.aJ.simpleSegment(0,0,4,5);const g=new o.aI;g.emplaceBack(0,0),g.emplaceBack(1,0),g.emplaceBack(0,1),g.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(g,si.members),this.viewportSegments=o.aJ.simpleSegment(0,0,4,2);const w=new o.b$;w.emplaceBack(0),w.emplaceBack(1),w.emplaceBack(3),w.emplaceBack(2),w.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(w);const A=new o.aK;A.emplaceBack(1,0,2),A.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(A);const I=this.context.gl;this.stencilClearMode=new pt({func:I.ALWAYS,mask:0},0,255,I.ZERO,I.ZERO,I.ZERO),this.tileExtentMesh=new Mn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){const e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const a=o.K();o.bQ(a,0,this.width,this.height,0,0,1),o.M(a,a,[r.drawingBufferWidth,r.drawingBufferHeight,0]);const l={mainMatrix:a,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:a};this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,ot.disabled,this.stencilClearMode,Ye.disabled,ht.disabled,null,null,l,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,r,a){if(this.currentStencilSource===e.source||!e.isTileClipped()||!r||!r.length)return;this.currentStencilSource=e.source,this.nextStencilID+r.length>256&&this.clearStencil();const l=this.context;l.setColorMode(Ye.disabled),l.setDepthMode(ot.disabled);const d={};for(const g of r)d[g.key]=this.nextStencilID++;this._renderTileMasks(d,r,a,!0),this._renderTileMasks(d,r,a,!1),this._tileClippingMaskIDs=d}_renderTileMasks(e,r,a,l){const d=this.context,g=d.gl,w=this.style.projection,A=this.transform,I=this.useProgram("clippingMask");for(const z of r){const N=e[z.key],F=this.style.map.terrain&&this.style.map.terrain.getTerrainData(z),Z=w.getMeshFromTileID(this.context,z.canonical,l,!0,"stencil"),J=A.getProjectionData({overscaledTileID:z,applyGlobeMatrix:!a,applyTerrainMatrix:!0});I.draw(d,g.TRIANGLES,ot.disabled,new pt({func:g.ALWAYS,mask:0},N,255,g.KEEP,g.KEEP,g.REPLACE),Ye.disabled,a?ht.disabled:ht.backCCW,null,F,J,"$clipping",Z.vertexBuffer,Z.indexBuffer,Z.segments)}}_renderTilesDepthBuffer(){const e=this.context,r=e.gl,a=this.style.projection,l=this.transform,d=this.useProgram("depth"),g=this.getDepthModeFor3D(),w=Ae(l,{tileSize:l.tileSize});for(const A of w){const I=this.style.map.terrain&&this.style.map.terrain.getTerrainData(A),z=a.getMeshFromTileID(this.context,A.canonical,!0,!0,"raster"),N=l.getProjectionData({overscaledTileID:A,applyGlobeMatrix:!0,applyTerrainMatrix:!0});d.draw(e,r.TRIANGLES,g,pt.disabled,Ye.disabled,ht.backCCW,null,I,N,"$clipping",z.vertexBuffer,z.indexBuffer,z.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const e=this.nextStencilID++,r=this.context.gl;return new pt({func:r.NOTEQUAL,mask:255},e,255,r.KEEP,r.KEEP,r.REPLACE)}stencilModeForClipping(e){const r=this.context.gl;return new pt({func:r.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,r.KEEP,r.KEEP,r.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){const r=this.context.gl,a=e.sort((g,w)=>w.overscaledZ-g.overscaledZ),l=a[a.length-1].overscaledZ,d=a[0].overscaledZ-l+1;if(d>1){this.currentStencilSource=void 0,this.nextStencilID+d>256&&this.clearStencil();const g={};for(let w=0;w<d;w++)g[w+l]=new pt({func:r.GEQUAL,mask:255},w+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=d,[g,a]}return[{[l]:pt.disabled},a]}stencilConfigForOverlapTwoPass(e){const r=this.context.gl,a=e.sort((g,w)=>w.overscaledZ-g.overscaledZ),l=a[a.length-1].overscaledZ,d=a[0].overscaledZ-l+1;if(this.clearStencil(),d>1){const g={},w={};for(let A=0;A<d;A++)g[A+l]=new pt({func:r.GREATER,mask:255},d+1+A,255,r.KEEP,r.KEEP,r.REPLACE),w[A+l]=new pt({func:r.GREATER,mask:255},1+A,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID=2*d+1,[g,w,a]}return this.nextStencilID=3,[{[l]:new pt({func:r.GREATER,mask:255},2,255,r.KEEP,r.KEEP,r.REPLACE)},{[l]:new pt({func:r.GREATER,mask:255},1,255,r.KEEP,r.KEEP,r.REPLACE)},a]}colorModeForRenderPass(){const e=this.context.gl;return this._showOverdrawInspector?new Ye([e.CONSTANT_COLOR,e.ONE],new o.b7(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ye.unblended:Ye.alphaBlended}getDepthModeForSublayer(e,r,a){if(!this.opaquePassEnabledForLayer())return ot.disabled;const l=1-((1+this.currentLayer)*this.numSublayers+e)*this.depthEpsilon;return new ot(a||this.context.gl.LEQUAL,r,[l,l])}getDepthModeFor3D(){return new ot(this.context.gl.LEQUAL,ot.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(e,r){var a,l;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(L.now()),this.imageManager.beginFrame();const d=this.style._order,g=this.style.sourceCaches,w={},A={},I={},z={isRenderingToTexture:!1,isRenderingGlobe:((a=e.projection)===null||a===void 0?void 0:a.transitionState)>0};for(const F in g){const Z=g[F];Z.used&&Z.prepare(this.context),w[F]=Z.getVisibleCoordinates(!1),A[F]=w[F].slice().reverse(),I[F]=Z.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let F=0;F<d.length;F++)if(this.style._layers[d[F]].is3D()){this.opaquePassCutoff=F;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const F of d){const Z=this.style._layers[F];if(!Z.hasOffscreenPass()||Z.isHidden(this.transform.zoom))continue;const J=A[Z.source];(Z.type==="custom"||J.length)&&this.renderLayer(this,g[Z.source],Z,J,z)}if((l=this.style.projection)===null||l===void 0||l.updateGPUdependent({context:this.context,useProgram:F=>this.useProgram(F)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?o.b7.black:o.b7.transparent,depth:1}),this.clearStencil(),this.style.sky&&function(F,Z){const J=F.context,oe=J.gl,ne=((Ce,we,Re)=>{const We=Math.cos(we.rollInRadians),Fe=Math.sin(we.rollInRadians),Ne=ke(we),je=we.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ce.properties.get("sky-color"),u_horizon_color:Ce.properties.get("horizon-color"),u_horizon:[(we.width/2-Ne*Fe)*Re,(we.height/2+Ne*We)*Re],u_horizon_normal:[-Fe,We],u_sky_horizon_blend:Ce.properties.get("sky-horizon-blend")*we.height/2*Re,u_sky_blend:je}})(Z,F.style.map.transform,F.pixelRatio),se=new ot(oe.LEQUAL,ot.ReadWrite,[0,1]),pe=pt.disabled,_e=F.colorModeForRenderPass(),ye=F.useProgram("sky"),be=Ni(J,Z);ye.draw(J,oe.TRIANGLES,se,pe,_e,ht.disabled,ne,null,void 0,"sky",be.vertexBuffer,be.indexBuffer,be.segments)}(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=d.length-1;this.currentLayer>=0;this.currentLayer--){const F=this.style._layers[d[this.currentLayer]],Z=g[F.source],J=w[F.source];this._renderTileClippingMasks(F,J,!1),this.renderLayer(this,Z,F,J,z)}this.renderPass="translucent";let N=!1;for(this.currentLayer=0;this.currentLayer<d.length;this.currentLayer++){const F=this.style._layers[d[this.currentLayer]],Z=g[F.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(F,z))continue;this.opaquePassEnabledForLayer()||N||(N=!0,z.isRenderingGlobe&&!this.style.map.terrain&&this._renderTilesDepthBuffer());const J=(F.type==="symbol"?I:A)[F.source];this._renderTileClippingMasks(F,w[F.source],!!this.renderToTexture),this.renderLayer(this,Z,F,J,z)}if(z.isRenderingGlobe&&function(F,Z,J){const oe=F.context,ne=oe.gl,se=F.useProgram("atmosphere"),pe=new ot(ne.LEQUAL,ot.ReadOnly,[0,1]),_e=F.transform,ye=function(je,mt){const dt=je.properties.get("position"),tt=[-dt.x,-dt.y,-dt.z],kt=o.ad(new Float64Array(16));return je.properties.get("anchor")==="map"&&(o.a_(kt,kt,mt.rollInRadians),o.a$(kt,kt,-mt.pitchInRadians),o.a_(kt,kt,mt.bearingInRadians),o.a$(kt,kt,mt.center.lat*Math.PI/180),o.bp(kt,kt,-mt.center.lng*Math.PI/180)),o.bZ(tt,tt,kt),tt}(J,F.transform),be=_e.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ce=Z.properties.get("atmosphere-blend")*be.projectionTransition;if(Ce===0)return;const we=mo(_e.worldSize,_e.center.lat),Re=_e.inverseProjectionMatrix,We=new Float64Array(4);We[3]=1,o.at(We,We,_e.modelViewProjectionMatrix),We[0]/=We[3],We[1]/=We[3],We[2]/=We[3],We[3]=1,o.at(We,We,Re),We[0]/=We[3],We[1]/=We[3],We[2]/=We[3],We[3]=1;const Fe=((je,mt,dt,tt,kt)=>({u_sun_pos:je,u_atmosphere_blend:mt,u_globe_position:dt,u_globe_radius:tt,u_inv_proj_matrix:kt}))(ye,Ce,[We[0],We[1],We[2]],we,Re),Ne=Ni(oe,Z);se.draw(oe,ne.TRIANGLES,pe,pt.disabled,Ye.alphaBlended,ht.disabled,Fe,null,null,"atmosphere",Ne.vertexBuffer,Ne.indexBuffer,Ne.segments)}(this,this.style.sky,this.style.light),this.options.showTileBoundaries){const F=function(Z,J){let oe=null;const ne=Object.values(Z._layers).flatMap(ye=>ye.source&&!ye.isHidden(J)?[Z.sourceCaches[ye.source]]:[]),se=ne.filter(ye=>ye.getSource().type==="vector"),pe=ne.filter(ye=>ye.getSource().type!=="vector"),_e=ye=>{(!oe||oe.getSource().maxzoom<ye.getSource().maxzoom)&&(oe=ye)};return se.forEach(ye=>_e(ye)),oe||pe.forEach(ye=>_e(ye)),oe}(this.style,this.transform.zoom);F&&function(Z,J,oe){for(let ne=0;ne<oe.length;ne++)qr(Z,J,oe[ne])}(this,F,F.getVisibleCoordinates())}this.options.showPadding&&function(F){const Z=F.transform.padding;Aa(F,F.transform.height-(Z.top||0),3,wa),Aa(F,Z.bottom||0,3,_l),jc(F,Z.left||0,3,qc),jc(F,F.transform.width-(Z.right||0),3,Uc);const J=F.transform.centerPoint;(function(oe,ne,se,pe){bs(oe,ne-1,se-10,2,20,pe),bs(oe,ne-10,se-1,20,2,pe)})(F,J.x,F.transform.height-J.y,Sa)}(this),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;const r=this.terrainFacilitator.matrix,a=this.transform.modelViewProjectionMatrix;let l=this.terrainFacilitator.dirty;l||(l=e?!o.c0(r,a):!o.c1(r,a)),l||(l=this.style.map.terrain.sourceCache.anyTilesAfterTime(this.terrainFacilitator.renderTime)),l&&(o.c2(r,a),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(d,g){const w=d.context,A=w.gl,I=d.transform,z=Ye.unblended,N=new ot(A.LEQUAL,ot.ReadWrite,[0,1]),F=g.sourceCache.getRenderableTiles(),Z=d.useProgram("terrainDepth");w.bindFramebuffer.set(g.getFramebuffer("depth").framebuffer),w.viewport.set([0,0,d.width/devicePixelRatio,d.height/devicePixelRatio]),w.clear({color:o.b7.transparent,depth:1});for(const J of F){const oe=g.getTerrainMesh(J.tileID),ne=g.getTerrainData(J.tileID),se=I.getProjectionData({overscaledTileID:J.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),pe={u_ele_delta:g.getMeshFrameDelta(I.zoom)};Z.draw(w,A.TRIANGLES,N,pt.disabled,z,ht.backCCW,pe,ne,se,"terrain",oe.vertexBuffer,oe.indexBuffer,oe.segments)}w.bindFramebuffer.set(null),w.viewport.set([0,0,d.width,d.height])}(this,this.style.map.terrain),function(d,g){const w=d.context,A=w.gl,I=d.transform,z=Ye.unblended,N=new ot(A.LEQUAL,ot.ReadWrite,[0,1]),F=g.getCoordsTexture(),Z=g.sourceCache.getRenderableTiles(),J=d.useProgram("terrainCoords");w.bindFramebuffer.set(g.getFramebuffer("coords").framebuffer),w.viewport.set([0,0,d.width/devicePixelRatio,d.height/devicePixelRatio]),w.clear({color:o.b7.transparent,depth:1}),g.coordsIndex=[];for(const oe of Z){const ne=g.getTerrainMesh(oe.tileID),se=g.getTerrainData(oe.tileID);w.activeTexture.set(A.TEXTURE0),A.bindTexture(A.TEXTURE_2D,F.texture);const pe={u_terrain_coords_id:(255-g.coordsIndex.length)/255,u_texture:0,u_ele_delta:g.getMeshFrameDelta(I.zoom)},_e=I.getProjectionData({overscaledTileID:oe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});J.draw(w,A.TRIANGLES,N,pt.disabled,z,ht.backCCW,pe,se,_e,"terrain",ne.vertexBuffer,ne.indexBuffer,ne.segments),g.coordsIndex.push(oe.tileID.key)}w.bindFramebuffer.set(null),w.viewport.set([0,0,d.width,d.height])}(this,this.style.map.terrain))}renderLayer(e,r,a,l,d){a.isHidden(this.transform.zoom)||(a.type==="background"||a.type==="custom"||(l||[]).length)&&(this.id=a.id,o.c3(a)?function(g,w,A,I,z,N){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:F}=N,Z=pt.disabled,J=g.colorModeForRenderPass();(A._unevaluatedLayout.hasValue("text-variable-anchor")||A._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(oe,ne,se,pe,_e,ye,be,Ce,we){const Re=ne.transform,We=ne.style.map.terrain,Fe=_e==="map",Ne=ye==="map";for(const je of oe){const mt=pe.getTile(je),dt=mt.getBucket(se);if(!dt||!dt.text||!dt.text.segments.get().length)continue;const tt=o.ak(dt.textSizeData,Re.zoom),kt=o.az(mt,1,ne.transform.zoom),Xt=It(Fe,ne.transform,kt),nr=se.layout.get("icon-text-fit")!=="none"&&dt.hasIconData();if(tt){const Lr=Math.pow(2,Re.zoom-mt.tileID.overscaledZ),_r=We?(Rr,Dr)=>We.getElevation(je,Rr,Dr):null;Fc(dt,Fe,Ne,we,Re,Xt,Lr,tt,nr,o.aA(Re,mt,be,Ce),je.toUnwrapped(),_r)}}}(I,g,A,w,A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),z),A.paint.get("icon-opacity").constantOr(1)!==0&&_a(g,w,A,I,!1,A.paint.get("icon-translate"),A.paint.get("icon-translate-anchor"),A.layout.get("icon-rotation-alignment"),A.layout.get("icon-pitch-alignment"),A.layout.get("icon-keep-upright"),Z,J,F),A.paint.get("text-opacity").constantOr(1)!==0&&_a(g,w,A,I,!0,A.paint.get("text-translate"),A.paint.get("text-translate-anchor"),A.layout.get("text-rotation-alignment"),A.layout.get("text-pitch-alignment"),A.layout.get("text-keep-upright"),Z,J,F),w.map.showCollisionBoxes&&(fl(g,w,A,I,!0),fl(g,w,A,I,!1))}(e,r,a,l,this.style.placement.variableOffsets,d):o.c4(a)?function(g,w,A,I,z){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:N}=z,F=A.paint.get("circle-opacity"),Z=A.paint.get("circle-stroke-width"),J=A.paint.get("circle-stroke-opacity"),oe=!A.layout.get("circle-sort-key").isConstant();if(F.constantOr(1)===0&&(Z.constantOr(1)===0||J.constantOr(1)===0))return;const ne=g.context,se=ne.gl,pe=g.transform,_e=g.getDepthModeForSublayer(0,ot.ReadOnly),ye=pt.disabled,be=g.colorModeForRenderPass(),Ce=[],we=pe.getCircleRadiusCorrection();for(let Re=0;Re<I.length;Re++){const We=I[Re],Fe=w.getTile(We),Ne=Fe.getBucket(A);if(!Ne)continue;const je=A.paint.get("circle-translate"),mt=A.paint.get("circle-translate-anchor"),dt=o.aA(pe,Fe,je,mt),tt=Ne.programConfigurations.get(A.id),kt=g.useProgram("circle",tt),Xt=Ne.layoutVertexBuffer,nr=Ne.indexBuffer,Lr=g.style.map.terrain&&g.style.map.terrain.getTerrainData(We),_r={programConfiguration:tt,program:kt,layoutVertexBuffer:Xt,indexBuffer:nr,uniformValues:ds(g,Fe,A,dt,we),terrainData:Lr,projectionData:pe.getProjectionData({overscaledTileID:We,applyGlobeMatrix:!N,applyTerrainMatrix:!0})};if(oe){const Rr=Ne.segments.get();for(const Dr of Rr)Ce.push({segments:new o.aJ([Dr]),sortKey:Dr.sortKey,state:_r})}else Ce.push({segments:Ne.segments,sortKey:0,state:_r})}oe&&Ce.sort((Re,We)=>Re.sortKey-We.sortKey);for(const Re of Ce){const{programConfiguration:We,program:Fe,layoutVertexBuffer:Ne,indexBuffer:je,uniformValues:mt,terrainData:dt,projectionData:tt}=Re.state;Fe.draw(ne,se.TRIANGLES,_e,ye,be,ht.backCCW,mt,dt,tt,A.id,Ne,je,Re.segments,A.paint,g.transform.zoom,We)}}(e,r,a,l,d):o.c5(a)?function(g,w,A,I,z){if(A.paint.get("heatmap-opacity")===0)return;const N=g.context,{isRenderingToTexture:F,isRenderingGlobe:Z}=z;if(g.style.map.terrain){for(const J of I){const oe=w.getTile(J);w.hasRenderableParent(J)||(g.renderPass==="offscreen"?va(g,oe,A,J,Z):g.renderPass==="translucent"&&ml(g,A,J,F,Z))}N.viewport.set([0,0,g.width,g.height])}else g.renderPass==="offscreen"?function(J,oe,ne,se){const pe=J.context,_e=pe.gl,ye=J.transform,be=pt.disabled,Ce=new Ye([_e.ONE,_e.ONE],o.b7.transparent,[!0,!0,!0,!0]);(function(we,Re,We){const Fe=we.gl;we.activeTexture.set(Fe.TEXTURE1),we.viewport.set([0,0,Re.width/4,Re.height/4]);let Ne=We.heatmapFbos.get(o.bW);Ne?(Fe.bindTexture(Fe.TEXTURE_2D,Ne.colorAttachment.get()),we.bindFramebuffer.set(Ne.framebuffer)):(Ne=xa(we,Re.width/4,Re.height/4),We.heatmapFbos.set(o.bW,Ne))})(pe,J,ne),pe.clear({color:o.b7.transparent});for(let we=0;we<se.length;we++){const Re=se[we];if(oe.hasRenderableParent(Re))continue;const We=oe.getTile(Re),Fe=We.getBucket(ne);if(!Fe)continue;const Ne=Fe.programConfigurations.get(ne.id),je=J.useProgram("heatmap",Ne),mt=ye.getProjectionData({overscaledTileID:Re,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),dt=ye.getCircleRadiusCorrection();je.draw(pe,_e.TRIANGLES,ot.disabled,be,Ce,ht.backCCW,_o(We,ye.zoom,ne.paint.get("heatmap-intensity"),dt),null,mt,ne.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,ne.paint,ye.zoom,Ne)}pe.viewport.set([0,0,J.width,J.height])}(g,w,A,I):g.renderPass==="translucent"&&function(J,oe){const ne=J.context,se=ne.gl;ne.setColorMode(J.colorModeForRenderPass());const pe=oe.heatmapFbos.get(o.bW);pe&&(ne.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,pe.colorAttachment.get()),ne.activeTexture.set(se.TEXTURE1),gl(ne,oe).bind(se.LINEAR,se.CLAMP_TO_EDGE),J.useProgram("heatmapTexture").draw(ne,se.TRIANGLES,ot.disabled,pt.disabled,J.colorModeForRenderPass(),ht.disabled,bc(J,oe,0,1),null,null,oe.id,J.viewportBuffer,J.quadTriangleIndexBuffer,J.viewportSegments,oe.paint,J.transform.zoom))}(g,A)}(e,r,a,l,d):o.c6(a)?function(g,w,A,I,z){if(g.renderPass!=="translucent")return;const{isRenderingToTexture:N}=z,F=A.paint.get("line-opacity"),Z=A.paint.get("line-width");if(F.constantOr(1)===0||Z.constantOr(1)===0)return;const J=g.getDepthModeForSublayer(0,ot.ReadOnly),oe=g.colorModeForRenderPass(),ne=A.paint.get("line-dasharray"),se=A.paint.get("line-pattern"),pe=se.constantOr(1),_e=A.paint.get("line-gradient"),ye=A.getCrossfadeParameters(),be=pe?"linePattern":ne?"lineSDF":_e?"lineGradient":"line",Ce=g.context,we=Ce.gl,Re=g.transform;let We=!0;for(const Fe of I){const Ne=w.getTile(Fe);if(pe&&!Ne.patternsLoaded())continue;const je=Ne.getBucket(A);if(!je)continue;const mt=je.programConfigurations.get(A.id),dt=g.context.program.get(),tt=g.useProgram(be,mt),kt=We||tt.program!==dt,Xt=g.style.map.terrain&&g.style.map.terrain.getTerrainData(Fe),nr=se.constantOr(null);if(nr&&Ne.imageAtlas){const wr=Ne.imageAtlas,ur=wr.patternPositions[nr.to.toString()],Qr=wr.patternPositions[nr.from.toString()];ur&&Qr&&mt.setConstantPatternPositions(ur,Qr)}const Lr=Re.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!N,applyTerrainMatrix:!0}),_r=Re.getPixelScale(),Rr=pe?kc(g,Ne,A,_r,ye):ne?Cc(g,Ne,A,_r,ne,ye):_e?Ac(g,Ne,A,_r,je.lineClipsArray.length):ps(g,Ne,A,_r);if(pe)Ce.activeTexture.set(we.TEXTURE0),Ne.imageAtlasTexture.bind(we.LINEAR,we.CLAMP_TO_EDGE),mt.updatePaintBuffers(ye);else if(ne&&(kt||g.lineAtlas.dirty))Ce.activeTexture.set(we.TEXTURE0),g.lineAtlas.bind(Ce);else if(_e){const wr=je.gradients[A.id];let ur=wr.texture;if(A.gradientVersion!==wr.version){let Qr=256;if(A.stepInterpolant){const ci=w.getSource().maxzoom,vi=Fe.canonical.z===ci?Math.ceil(1<<g.transform.maxZoom-Fe.canonical.z):1;Qr=o.ae(o.bX(je.maxLineLength/o.Z*1024*vi),256,Ce.maxTextureSize)}wr.gradient=o.bY({expression:A.gradientExpression(),evaluationKey:"lineProgress",resolution:Qr,image:wr.gradient||void 0,clips:je.lineClipsArray}),wr.texture?wr.texture.update(wr.gradient):wr.texture=new rt(Ce,wr.gradient,we.RGBA),wr.version=A.gradientVersion,ur=wr.texture}Ce.activeTexture.set(we.TEXTURE0),ur.bind(A.stepInterpolant?we.NEAREST:we.LINEAR,we.CLAMP_TO_EDGE)}const Dr=g.stencilModeForClipping(Fe);tt.draw(Ce,we.TRIANGLES,J,Dr,oe,ht.disabled,Rr,Xt,Lr,A.id,je.layoutVertexBuffer,je.indexBuffer,je.segments,A.paint,g.transform.zoom,mt,je.layoutVertexBuffer2),We=!1}}(e,r,a,l,d):o.c7(a)?function(g,w,A,I,z){const N=A.paint.get("fill-color"),F=A.paint.get("fill-opacity");if(F.constantOr(1)===0)return;const{isRenderingToTexture:Z}=z,J=g.colorModeForRenderPass(),oe=A.paint.get("fill-pattern"),ne=g.opaquePassEnabledForLayer()&&!oe.constantOr(1)&&N.constantOr(o.b7.transparent).a===1&&F.constantOr(0)===1?"opaque":"translucent";if(g.renderPass===ne){const se=g.getDepthModeForSublayer(1,g.renderPass==="opaque"?ot.ReadWrite:ot.ReadOnly);_s(g,w,A,I,se,J,!1,Z)}if(g.renderPass==="translucent"&&A.paint.get("fill-antialias")){const se=g.getDepthModeForSublayer(A.getPaintProperty("fill-outline-color")?2:0,ot.ReadOnly);_s(g,w,A,I,se,J,!0,Z)}}(e,r,a,l,d):o.c8(a)?function(g,w,A,I,z){const N=A.paint.get("fill-extrusion-opacity");if(N===0)return;const{isRenderingToTexture:F}=z;if(g.renderPass==="translucent"){const Z=new ot(g.context.gl.LEQUAL,ot.ReadWrite,g.depthRangeFor3D);if(N!==1||A.paint.get("fill-extrusion-pattern").constantOr(1))vs(g,w,A,I,Z,pt.disabled,Ye.disabled,F),vs(g,w,A,I,Z,g.stencilModeFor3D(),g.colorModeForRenderPass(),F);else{const J=g.colorModeForRenderPass();vs(g,w,A,I,Z,pt.disabled,J,F)}}}(e,r,a,l,d):o.c9(a)?function(g,w,A,I,z){if(g.renderPass!=="offscreen"&&g.renderPass!=="translucent")return;const{isRenderingToTexture:N}=z,F=g.context,Z=g.style.projection.useSubdivision,J=g.getDepthModeForSublayer(0,ot.ReadOnly),oe=g.colorModeForRenderPass();if(g.renderPass==="offscreen")(function(ne,se,pe,_e,ye,be,Ce){const we=ne.context,Re=we.gl;for(const We of pe){const Fe=se.getTile(We),Ne=Fe.dem;if(!Ne||!Ne.data||!Fe.needsHillshadePrepare)continue;const je=Ne.dim,mt=Ne.stride,dt=Ne.getPixels();if(we.activeTexture.set(Re.TEXTURE1),we.pixelStoreUnpackPremultiplyAlpha.set(!1),Fe.demTexture=Fe.demTexture||ne.getTileTexture(mt),Fe.demTexture){const kt=Fe.demTexture;kt.update(dt,{premultiply:!1}),kt.bind(Re.NEAREST,Re.CLAMP_TO_EDGE)}else Fe.demTexture=new rt(we,dt,Re.RGBA,{premultiply:!1}),Fe.demTexture.bind(Re.NEAREST,Re.CLAMP_TO_EDGE);we.activeTexture.set(Re.TEXTURE0);let tt=Fe.fbo;if(!tt){const kt=new rt(we,{width:je,height:je,data:null},Re.RGBA);kt.bind(Re.LINEAR,Re.CLAMP_TO_EDGE),tt=Fe.fbo=we.createFramebuffer(je,je,!0,!1),tt.colorAttachment.set(kt.texture)}we.bindFramebuffer.set(tt.framebuffer),we.viewport.set([0,0,je,je]),ne.useProgram("hillshadePrepare").draw(we,Re.TRIANGLES,ye,be,Ce,ht.disabled,Ch(Fe.tileID,Ne),null,null,_e.id,ne.rasterBoundsBuffer,ne.quadTriangleIndexBuffer,ne.rasterBoundsSegments),Fe.needsHillshadePrepare=!1}})(g,w,I,A,J,pt.disabled,oe),F.viewport.set([0,0,g.width,g.height]);else if(g.renderPass==="translucent")if(Z){const[ne,se,pe]=g.stencilConfigForOverlapTwoPass(I);yl(g,w,A,pe,ne,J,oe,!1,N),yl(g,w,A,pe,se,J,oe,!0,N)}else{const[ne,se]=g.getStencilConfigForOverlapAndUpdateStencilID(I);yl(g,w,A,se,ne,J,oe,!1,N)}}(e,r,a,l,d):o.ca(a)?function(g,w,A,I,z){if(g.renderPass!=="translucent"||A.paint.get("raster-opacity")===0||!I.length)return;const{isRenderingToTexture:N}=z,F=w.getSource(),Z=g.style.projection.useSubdivision;if(F instanceof zt)ba(g,w,A,I,null,!1,!1,F.tileCoords,F.flippedWindingOrder,N);else if(Z){const[J,oe,ne]=g.stencilConfigForOverlapTwoPass(I);ba(g,w,A,ne,J,!1,!0,xs,!1,N),ba(g,w,A,ne,oe,!0,!0,xs,!1,N)}else{const[J,oe]=g.getStencilConfigForOverlapAndUpdateStencilID(I);ba(g,w,A,oe,J,!1,!0,xs,!1,N)}}(e,r,a,l,d):o.cb(a)?function(g,w,A,I,z){const N=A.paint.get("background-color"),F=A.paint.get("background-opacity");if(F===0)return;const{isRenderingToTexture:Z}=z,J=g.context,oe=J.gl,ne=g.style.projection,se=g.transform,pe=se.tileSize,_e=A.paint.get("background-pattern");if(g.isPatternMissing(_e))return;const ye=!_e&&N.a===1&&F===1&&g.opaquePassEnabledForLayer()?"opaque":"translucent";if(g.renderPass!==ye)return;const be=pt.disabled,Ce=g.getDepthModeForSublayer(0,ye==="opaque"?ot.ReadWrite:ot.ReadOnly),we=g.colorModeForRenderPass(),Re=g.useProgram(_e?"backgroundPattern":"background"),We=I||Ae(se,{tileSize:pe,terrain:g.style.map.terrain});_e&&(J.activeTexture.set(oe.TEXTURE0),g.imageManager.bind(g.context));const Fe=A.getCrossfadeParameters();for(const Ne of We){const je=se.getProjectionData({overscaledTileID:Ne,applyGlobeMatrix:!Z,applyTerrainMatrix:!0}),mt=_e?Eh(F,g,_e,{tileID:Ne,tileSize:pe},Fe):Th(F,N),dt=g.style.map.terrain&&g.style.map.terrain.getTerrainData(Ne),tt=ne.getMeshFromTileID(J,Ne.canonical,!1,!0,"raster");Re.draw(J,oe.TRIANGLES,Ce,be,we,ht.backCCW,mt,dt,je,A.id,tt.vertexBuffer,tt.indexBuffer,tt.segments)}}(e,0,a,l,d):o.cc(a)&&function(g,w,A,I){const{isRenderingGlobe:z}=I,N=g.context,F=A.implementation,Z=g.style.projection,J=g.transform,oe=J.getProjectionDataForCustomLayer(z),ne={farZ:J.farZ,nearZ:J.nearZ,fov:J.fov*Math.PI/180,modelViewProjectionMatrix:J.modelViewProjectionMatrix,projectionMatrix:J.projectionMatrix,shaderData:{variantName:Z.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793;
800
+ uniform mat4 u_projection_matrix;
801
+ ${Z.shaderPreludeCode.vertexSource}`,define:Z.shaderDefine},defaultProjectionData:oe},se=F.renderingMode?F.renderingMode:"2d";if(g.renderPass==="offscreen"){const pe=F.prerender;pe&&(g.setCustomLayerDefaults(),N.setColorMode(g.colorModeForRenderPass()),pe.call(F,N.gl,ne),N.setDirty(),g.setBaseState())}else if(g.renderPass==="translucent"){g.setCustomLayerDefaults(),N.setColorMode(g.colorModeForRenderPass()),N.setStencilMode(pt.disabled);const pe=se==="3d"?g.getDepthModeFor3D():g.getDepthModeForSublayer(0,ot.ReadOnly);N.setDepthMode(pe),F.render(N.gl,ne),N.setDirty(),g.setBaseState(),N.bindFramebuffer.set(null)}}(e,0,a,d))}saveTileTexture(e){const r=this._tileTextures[e.size[0]];r?r.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){const r=this._tileTextures[e];return r&&r.length>0?r.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;const r=this.imageManager.getPattern(e.from.toString()),a=this.imageManager.getPattern(e.to.toString());return!r||!a}useProgram(e,r,a=!1,l=[]){this.cache=this.cache||{};const d=!!this.style.map.terrain,g=this.style.projection,w=a?oi.projectionMercator:g.shaderPreludeCode,A=a?Ln:g.shaderDefine,I=e+(r?r.cacheKey:"")+`/${a?Nt:g.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(d?"/terrain":"")+(l?`/${l.join("/")}`:"");return this.cache[I]||(this.cache[I]=new ra(this.context,oi[e],r,Ic[e],this._showOverdrawInspector,d,w,A,l)),this.cache[I]}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 e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new rt(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:e,drawingBufferHeight:r}=this.context.gl;return this.width!==e||this.height!==r}}function ws(h,e){let r,a=!1,l=null,d=null;const g=()=>{l=null,a&&(h.apply(d,r),l=setTimeout(g,e),a=!1)};return(...w)=>(a=!0,d=this,r=w,l||g(),l)}class xl{constructor(e){this._getCurrentHash=()=>{const r=window.location.hash.replace("#","");if(this._hashName){let a;return r.split("&").map(l=>l.split("=")).forEach(l=>{l[0]===this._hashName&&(a=l)}),(a&&a[1]||"").split("/")}return r.split("/")},this._onHashChange=()=>{const r=this._getCurrentHash();if(!this._isValidHash(r))return!1;const a=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(r[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+r[2],+r[1]],zoom:+r[0],bearing:a,pitch:+(r[4]||0)}),!0},this._updateHashUnthrottled=()=>{const r=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,r)},this._removeHash=()=>{const r=this._getCurrentHash();if(r.length===0)return;const a=r.join("/");let l=a;l.split("&").length>0&&(l=l.split("&")[0]),this._hashName&&(l=`${this._hashName}=${a}`);let d=window.location.hash.replace(l,"");d.startsWith("#&")?d=d.slice(0,1)+d.slice(2):d==="#"&&(d="");let g=window.location.href.replace(/(#.+)?$/,d);g=g.replace("&&","&"),window.history.replaceState(window.history.state,null,g)},this._updateHash=ws(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,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()),this._removeHash(),delete this._map,this}getHashString(e){const r=this._map.getCenter(),a=Math.round(100*this._map.getZoom())/100,l=Math.ceil((a*Math.LN2+Math.log(512/360/.5))/Math.LN10),d=Math.pow(10,l),g=Math.round(r.lng*d)/d,w=Math.round(r.lat*d)/d,A=this._map.getBearing(),I=this._map.getPitch();let z="";if(z+=e?`/${g}/${w}/${a}`:`${a}/${w}/${g}`,(A||I)&&(z+="/"+Math.round(10*A)/10),I&&(z+=`/${Math.round(I)}`),this._hashName){const N=this._hashName;let F=!1;const Z=window.location.hash.slice(1).split("&").map(J=>{const oe=J.split("=")[0];return oe===N?(F=!0,`${oe}=${z}`):J}).filter(J=>J);return F||Z.push(`${N}=${z}`),`#${Z.join("&")}`}return`#${z}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new o.Q(+e[2],+e[1])}catch{return!1}const r=+e[0],a=+(e[3]||0),l=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&a>=-180&&a<=180&&l>=this._map.getMinPitch()&&l<=this._map.getMaxPitch()}}const wn={linearity:.3,easing:o.cd(0,0,.3,1)},bl=o.e({deceleration:2500,maxSpeed:1400},wn),Ss=o.e({deceleration:20,maxSpeed:1400},wn),wl=o.e({deceleration:1e3,maxSpeed:360},wn),Hc=o.e({deceleration:1e3,maxSpeed:90},wn),Wc=o.e({deceleration:1e3,maxSpeed:360},wn);class Zc{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:L.now(),settings:e})}_drainInertiaBuffer(){const e=this._inertiaBuffer,r=L.now();for(;e.length>0&&r-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const r={zoom:0,bearing:0,pitch:0,roll:0,pan:new o.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:d}of this._inertiaBuffer)r.zoom+=d.zoomDelta||0,r.bearing+=d.bearingDelta||0,r.pitch+=d.pitchDelta||0,r.roll+=d.rollDelta||0,d.panDelta&&r.pan._add(d.panDelta),d.around&&(r.around=d.around),d.pinchAround&&(r.pinchAround=d.pinchAround);const a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,l={};if(r.pan.mag()){const d=Oo(r.pan.mag(),a,o.e({},bl,e||{})),g=r.pan.mult(d.amount/r.pan.mag()),w=this._map.cameraHelper.handlePanInertia(g,this._map.transform);l.center=w.easingCenter,l.offset=w.easingOffset,Vo(l,d)}if(r.zoom){const d=Oo(r.zoom,a,Ss);l.zoom=this._map.transform.zoom+d.amount,Vo(l,d)}if(r.bearing){const d=Oo(r.bearing,a,wl);l.bearing=this._map.transform.bearing+o.ae(d.amount,-179,179),Vo(l,d)}if(r.pitch){const d=Oo(r.pitch,a,Hc);l.pitch=this._map.transform.pitch+d.amount,Vo(l,d)}if(r.roll){const d=Oo(r.roll,a,Wc);l.roll=this._map.transform.roll+o.ae(d.amount,-179,179),Vo(l,d)}if(l.zoom||l.bearing){const d=r.pinchAround===void 0?r.around:r.pinchAround;l.around=d?this._map.unproject(d):this._map.getCenter()}return this.clear(),o.e(l,{noMoveStart:!0})}}function Vo(h,e){(!h.duration||h.duration<e.duration)&&(h.duration=e.duration,h.easing=e.easing)}function Oo(h,e,r){const{maxSpeed:a,linearity:l,deceleration:d}=r,g=o.ae(h*l/(e/1e3),-a,a),w=Math.abs(g)/(d*l);return{easing:r.easing,duration:1e3*w,amount:g*(w/2)}}class Xr extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a,l={}){a=a instanceof MouseEvent?a:new MouseEvent(e,a);const d=C.mousePos(r.getCanvas(),a),g=r.unproject(d);super(e,o.e({point:d,lngLat:g,originalEvent:a},l)),this._defaultPrevented=!1,this.target=r}}class Fo extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a){const l=e==="touchend"?a.changedTouches:a.touches,d=C.touchPos(r.getCanvasContainer(),l),g=d.map(A=>r.unproject(A)),w=d.reduce((A,I,z,N)=>A.add(I.div(N.length)),new o.P(0,0));super(e,{points:d,point:w,lngLats:g,lngLat:r.unproject(w),originalEvent:a}),this._defaultPrevented=!1}}class Sl extends o.l{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,r,a){super(e,{originalEvent:a}),this._defaultPrevented=!1}}class Kc{constructor(e,r){this._map=e,this._clickTolerance=r.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new Sl(e.type,this._map,e))}mousedown(e,r){return this._mousedownPos=r,this._firePreventable(new Xr(e.type,this._map,e))}mouseup(e){this._map.fire(new Xr(e.type,this._map,e))}click(e,r){this._mousedownPos&&this._mousedownPos.dist(r)>=this._clickTolerance||this._map.fire(new Xr(e.type,this._map,e))}dblclick(e){return this._firePreventable(new Xr(e.type,this._map,e))}mouseover(e){this._map.fire(new Xr(e.type,this._map,e))}mouseout(e){this._map.fire(new Xr(e.type,this._map,e))}touchstart(e){return this._firePreventable(new Fo(e.type,this._map,e))}touchmove(e){this._map.fire(new Fo(e.type,this._map,e))}touchend(e){this._map.fire(new Fo(e.type,this._map,e))}touchcancel(e){this._map.fire(new Fo(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Gc{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new Xr(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new Xr(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class No{constructor(e){this._map=e}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(e){return this.transform.screenPointToLocation(o.P.convert(e),this._map.terrain)}}class Al{constructor(e,r){this._map=e,this._tr=new No(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,r){this.isEnabled()&&e.shiftKey&&e.button===0&&(C.disableDrag(),this._startPos=this._lastPos=r,this._active=!0)}mousemoveWindow(e,r){if(!this._active)return;const a=r;if(this._lastPos.equals(a)||!this._box&&a.dist(this._startPos)<this._clickTolerance)return;const l=this._startPos;this._lastPos=a,this._box||(this._box=C.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",e));const d=Math.min(l.x,a.x),g=Math.max(l.x,a.x),w=Math.min(l.y,a.y),A=Math.max(l.y,a.y);C.setTransform(this._box,`translate(${d}px,${w}px)`),this._box.style.width=g-d+"px",this._box.style.height=A-w+"px"}mouseupWindow(e,r){if(!this._active||e.button!==0)return;const a=this._startPos,l=r;if(this.reset(),C.suppressClick(),a.x!==l.x||a.y!==l.y)return this._map.fire(new o.l("boxzoomend",{originalEvent:e})),{cameraAnimation:d=>d.fitScreenCoordinates(a,l,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&e.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(C.remove(this._box),this._box=null),C.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new o.l(e,{originalEvent:r}))}}function ka(h,e){if(h.length!==e.length)throw new Error(`The number of touches and points are not equal - touches ${h.length}, points ${e.length}`);const r={};for(let a=0;a<h.length;a++)r[h[a].identifier]=e[a];return r}class Jc{constructor(e){this.reset(),this.numTouches=e.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(e,r,a){(this.centroid||a.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=e.timeStamp),a.length===this.numTouches&&(this.centroid=function(l){const d=new o.P(0,0);for(const g of l)d._add(g);return d.div(l.length)}(r),this.touches=ka(a,r)))}touchmove(e,r,a){if(this.aborted||!this.centroid)return;const l=ka(a,r);for(const d in this.touches){const g=l[d];(!g||g.dist(this.touches[d])>30)&&(this.aborted=!0)}}touchend(e,r,a){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),a.length===0){const l=!this.aborted&&this.centroid;if(this.reset(),l)return l}}}class qo{constructor(e){this.singleTap=new Jc(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,r,a){this.singleTap.touchstart(e,r,a)}touchmove(e,r,a){this.singleTap.touchmove(e,r,a)}touchend(e,r,a){const l=this.singleTap.touchend(e,r,a);if(l){const d=e.timeStamp-this.lastTime<500,g=!this.lastTap||this.lastTap.dist(l)<30;if(d&&g||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=l,this.count===this.numTaps)return this.reset(),l}}}class Xc{constructor(e){this._tr=new No(e),this._zoomIn=new qo({numTouches:1,numTaps:2}),this._zoomOut=new qo({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,r,a){this._zoomIn.touchstart(e,r,a),this._zoomOut.touchstart(e,r,a)}touchmove(e,r,a){this._zoomIn.touchmove(e,r,a),this._zoomOut.touchmove(e,r,a)}touchend(e,r,a){const l=this._zoomIn.touchend(e,r,a),d=this._zoomOut.touchend(e,r,a),g=this._tr;return l?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom+1,around:g.unproject(l)},{originalEvent:e})}):d?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:w=>w.easeTo({duration:300,zoom:g.zoom-1,around:g.unproject(d)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ai{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){const r=this._moveFunction(...e);if(r.bearingDelta||r.pitchDelta||r.rollDelta||r.around||r.panDelta)return this._active=!0,r}dragStart(e,r){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(r)?r[0]:r,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,r){if(!this.isEnabled())return;const a=this._lastPoint;if(!a)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);const l=Array.isArray(r)?r[0]:r;return!this._moved&&l.dist(a)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=l,this._move(a,l))}dragEnd(e){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(e)&&(this._moved&&C.suppressClick(),this.reset(e))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const ln={0:1,2:2};class Uo{constructor(e){this._correctEvent=e.checkCorrectEvent}startMove(e){const r=C.mouseButton(e);this._eventButton=r}endMove(e){delete this._eventButton}isValidStartEvent(e){return this._correctEvent(e)}isValidMoveEvent(e){return!function(r,a){const l=ln[a];return r.buttons===void 0||(r.buttons&l)!==l}(e,this._eventButton)}isValidEndEvent(e){return C.mouseButton(e)===this._eventButton}}class cn{constructor(){this._firstTouch=void 0}_isOneFingerTouch(e){return e.targetTouches.length===1}_isSameTouchEvent(e){return e.targetTouches[0].identifier===this._firstTouch}startMove(e){this._firstTouch=e.targetTouches[0].identifier}endMove(e){delete this._firstTouch}isValidStartEvent(e){return this._isOneFingerTouch(e)}isValidMoveEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}isValidEndEvent(e){return this._isOneFingerTouch(e)&&this._isSameTouchEvent(e)}}class jo{constructor(e=new Uo({checkCorrectEvent:()=>!0}),r=new cn){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=r}_executeRelevantHandler(e,r,a){return e instanceof MouseEvent?r(e):typeof TouchEvent<"u"&&e instanceof TouchEvent?a(e):void 0}startMove(e){this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.startMove(r),r=>this.oneFingerTouchMoveStateManager.startMove(r))}endMove(e){this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.endMove(r),r=>this.oneFingerTouchMoveStateManager.endMove(r))}isValidStartEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidStartEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidStartEvent(r))}isValidMoveEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidMoveEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(r))}isValidEndEvent(e){return this._executeRelevantHandler(e,r=>this.mouseMoveStateManager.isValidEndEvent(r),r=>this.oneFingerTouchMoveStateManager.isValidEndEvent(r))}}const Ca=h=>{h.mousedown=h.dragStart,h.mousemoveWindow=h.dragMove,h.mouseup=h.dragEnd,h.contextmenu=e=>{e.preventDefault()}};class Vh{constructor(e,r){this._clickTolerance=e.clickTolerance||1,this._map=r,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new o.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,r,a){return this._calculateTransform(e,r,a)}touchmove(e,r,a){if(this._active){if(!this._shouldBePrevented(a.length))return e.preventDefault(),this._calculateTransform(e,r,a);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,r,a){this._calculateTransform(e,r,a),this._active&&this._shouldBePrevented(a.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,a){a.length>0&&(this._active=!0);const l=ka(a,r),d=new o.P(0,0),g=new o.P(0,0);let w=0;for(const I in l){const z=l[I],N=this._touches[I];N&&(d._add(z),g._add(z.sub(N)),w++,l[I]=z)}if(this._touches=l,this._shouldBePrevented(w)||!g.mag())return;const A=g.div(w);return this._sum._add(A),this._sum.mag()<this._clickTolerance?void 0:{around:d.div(w),panDelta:A}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class kl{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(e,r,a){this._firstTwoTouches||a.length<2||(this._firstTwoTouches=[a[0].identifier,a[1].identifier],this._start([r[0],r[1]]))}touchmove(e,r,a){if(!this._firstTwoTouches)return;e.preventDefault();const[l,d]=this._firstTwoTouches,g=Ta(a,r,l),w=Ta(a,r,d);if(!g||!w)return;const A=this._aroundCenter?null:g.add(w).div(2);return this._move([g,w],A,e)}touchend(e,r,a){if(!this._firstTwoTouches)return;const[l,d]=this._firstTwoTouches,g=Ta(a,r,l),w=Ta(a,r,d);g&&w||(this._active&&C.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(e){this._enabled=!0,this._aroundCenter=!!e&&e.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Ta(h,e,r){for(let a=0;a<h.length;a++)if(h[a].identifier===r)return e[a]}function Cl(h,e){return Math.log(h/e)/Math.LN2}class Ho extends kl{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(e){this._startDistance=this._distance=e[0].dist(e[1])}_move(e,r){const a=this._distance;if(this._distance=e[0].dist(e[1]),this._active||!(Math.abs(Cl(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Cl(this._distance,a),pinchAround:r}}}function Sn(h,e){return 180*h.angleWith(e)/Math.PI}class bt extends kl{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,r,a){const l=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Sn(this._vector,l),pinchAround:r}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());const r=25/(Math.PI*this._minDiameter)*360,a=Sn(e,this._startVector);return Math.abs(a)<r}}function Ea(h){return Math.abs(h.y)>Math.abs(h.x)}class Pa extends kl{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,r,a){super.touchstart(e,r,a),this._currentTouchCount=a.length}_start(e){this._lastPoints=e,Ea(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,r,a){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const l=e[0].sub(this._lastPoints[0]),d=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(l,d,a.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:(l.y+d.y)/2*-.5}):void 0}gestureBeginsVertically(e,r,a){if(this._valid!==void 0)return this._valid;const l=e.mag()>=2,d=r.mag()>=2;if(!l&&!d)return;if(!l||!d)return this._firstMove===void 0&&(this._firstMove=a),a-this._firstMove<100&&void 0;const g=e.y>0==r.y>0;return Ea(e)&&Ea(r)&&g}}const Qc={panStep:100,bearingStep:15,pitchStep:10};class Wo{constructor(e){this._tr=new No(e);const r=Qc;this._panStep=r.panStep,this._bearingStep=r.bearingStep,this._pitchStep=r.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,a=0,l=0,d=0,g=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?a=-1:(e.preventDefault(),d=-1);break;case 39:e.shiftKey?a=1:(e.preventDefault(),d=1);break;case 38:e.shiftKey?l=1:(e.preventDefault(),g=-1);break;case 40:e.shiftKey?l=-1:(e.preventDefault(),g=1);break;default:return}return this._rotationDisabled&&(a=0,l=0),{cameraAnimation:w=>{const A=this._tr;w.easeTo({duration:300,easeId:"keyboardHandler",easing:As,zoom:r?Math.round(A.zoom)+r*(e.shiftKey?2:1):A.zoom,bearing:A.bearing+a*this._bearingStep,pitch:A.pitch+l*this._pitchStep,offset:[-d*this._panStep,-g*this._panStep],center:A.center},{originalEvent:e})}}}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 As(h){return h*(2-h)}const Tl=4.000244140625;class er{constructor(e,r){this._onTimeout=a=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(a)},this._map=e,this._tr=new No(e),this._triggerRenderFrame=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&e.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let r=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY;const a=L.now(),l=a-(this._lastWheelEventTime||0);this._lastWheelEventTime=a,r!==0&&r%Tl==0?this._type="wheel":r!==0&&Math.abs(r)<4?this._type="trackpad":l>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(l*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}_start(e){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 r=C.mousePos(this._map.getCanvas(),e),a=this._tr;this._aroundPoint=this._aroundCenter?a.transform.locationToScreenPoint(o.Q.convert(a.center)):r,this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const e=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){const w=e.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=w),typeof this._targetZoom=="number"&&(this._targetZoom+=w)}if(this._delta!==0){const w=this._type==="wheel"&&Math.abs(this._delta)>Tl?this._wheelZoomRate:this._defaultZoomRate;let A=2/(1+Math.exp(-Math.abs(this._delta*w)));this._delta<0&&A!==0&&(A=1/A);const I=typeof this._targetZoom!="number"?e.scale:o.ac(this._targetZoom);this._targetZoom=e.getConstrained(e.getCameraLngLat(),o.ah(I*A)).zoom,this._type==="wheel"&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const r=typeof this._targetZoom!="number"?e.zoom:this._targetZoom,a=this._startZoom,l=this._easing;let d,g=!1;if(this._type==="wheel"&&a&&l){const w=L.now()-this._lastWheelEventTime,A=Math.min((w+5)/200,1),I=l(A);d=o.B.number(a,r,I),A<1?this._frameId||(this._frameId=!0):g=!0}else d=r,g=!0;return this._active=!0,g&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=d,{noInertia:!0,needsRenderFrame:!g,zoomDelta:d-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=o.cf;if(this._prevEase){const a=this._prevEase,l=(L.now()-a.start)/a.duration,d=a.easing(l+.01)-a.easing(l),g=.27/Math.sqrt(d*d+1e-4)*.01,w=Math.sqrt(.0729-g*g);r=o.cd(g,w,.25,1)}return this._prevEase={start:L.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ia{constructor(e,r){this._clickZoom=e,this._tapZoom=r}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 Oh{constructor(e){this._tr=new No(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:a=>{a.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class El{constructor(){this._tap=new qo({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(e,r,a){if(!this._swipePoint)if(this._tapTime){const l=r[0],d=e.timeStamp-this._tapTime<500,g=this._tapPoint.dist(l)<30;d&&g?a.length>0&&(this._swipePoint=l,this._swipeTouch=a[0].identifier):this.reset()}else this._tap.touchstart(e,r,a)}touchmove(e,r,a){if(this._tapTime){if(this._swipePoint){if(a[0].identifier!==this._swipeTouch)return;const l=r[0],d=l.y-this._swipePoint.y;return this._swipePoint=l,e.preventDefault(),this._active=!0,{zoomDelta:d/128}}}else this._tap.touchmove(e,r,a)}touchend(e,r,a){if(this._tapTime)this._swipePoint&&a.length===0&&this.reset();else{const l=this._tap.touchend(e,r,a);l&&(this._tapTime=e.timeStamp,this._tapPoint=l)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Yc{constructor(e,r,a){this._el=e,this._mousePan=r,this._touchPan=a}enable(e){this._inertiaOptions=e||{},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 $c{constructor(e,r,a,l){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=r,this._mousePitch=a,this._mouseRoll=l}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Pl{constructor(e,r,a,l){this._el=e,this._touchZoom=r,this._touchRotate=a,this._tapDragZoom=l,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Ma{constructor(e,r){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=e,this._options=r,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=C.create("div","maplibregl-cooperative-gesture-screen",e);let r=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(r=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const a=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),l=document.createElement("div");l.className="maplibregl-desktop-message",l.textContent=r,this._container.appendChild(l);const d=document.createElement("div");d.className="maplibregl-mobile-message",d.textContent=a,this._container.appendChild(d),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(C.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new o.l("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const ks=h=>h.zoom||h.drag||h.roll||h.pitch||h.rotate;class Fh extends o.l{}function La(h){return h.panDelta&&h.panDelta.mag()||h.zoomDelta||h.bearingDelta||h.pitchDelta||h.rollDelta}class Nh{constructor(e,r){this.handleWindowEvent=l=>{this.handleEvent(l,`${l.type}Window`)},this.handleEvent=(l,d)=>{if(l.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const g=l.type==="renderFrame"?void 0:l,w={needsRenderFrame:!1},A={},I={};for(const{handlerName:F,handler:Z,allowed:J}of this._handlers){if(!Z.isEnabled())continue;let oe;if(this._blockedByActive(I,J,F))Z.reset();else if(Z[d||l.type]){if(o.cg(l,d||l.type)){const ne=C.mousePos(this._map.getCanvas(),l);oe=Z[d||l.type](l,ne)}else if(o.ch(l,d||l.type)){const ne=this._getMapTouches(l.touches),se=C.touchPos(this._map.getCanvas(),ne);oe=Z[d||l.type](l,se,ne)}else o.ci(d||l.type)||(oe=Z[d||l.type](l));this.mergeHandlerResult(w,A,oe,F,g),oe&&oe.needsRenderFrame&&this._triggerRenderFrame()}(oe||Z.isActive())&&(I[F]=Z)}const z={};for(const F in this._previousActiveHandlers)I[F]||(z[F]=g);this._previousActiveHandlers=I,(Object.keys(z).length||La(w))&&(this._changes.push([w,A,z]),this._triggerRenderFrame()),(Object.keys(I).length||La(w))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:N}=w;N&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],N(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Zc(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);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[l,d,g]of this._listeners)C.addEventListener(l,d,l===document?this.handleWindowEvent:this.handleEvent,g)}destroy(){for(const[e,r,a]of this._listeners)C.removeEventListener(e,r,e===document?this.handleWindowEvent:this.handleEvent,a)}_addDefaultHandlers(e){const r=this._map,a=r.getCanvasContainer();this._add("mapEvent",new Kc(r,e));const l=r.boxZoom=new Al(r,e);this._add("boxZoom",l),e.interactive&&e.boxZoom&&l.enable();const d=r.cooperativeGestures=new Ma(r,e.cooperativeGestures);this._add("cooperativeGestures",d),e.cooperativeGestures&&d.enable();const g=new Xc(r),w=new Oh(r);r.doubleClickZoom=new Ia(w,g),this._add("tapZoom",g),this._add("clickZoom",w),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();const A=new El;this._add("tapDragZoom",A);const I=r.touchPitch=new Pa(r);this._add("touchPitch",I),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);const z=()=>r.project(r.getCenter()),N=function({enable:ye,clickTolerance:be,aroundCenter:Ce=!0,minPixelCenterThreshold:we=100,rotateDegreesPerPixelMoved:Re=.8},We){const Fe=new Uo({checkCorrectEvent:Ne=>C.mouseButton(Ne)===0&&Ne.ctrlKey||C.mouseButton(Ne)===2&&!Ne.ctrlKey});return new Ai({clickTolerance:be,move:(Ne,je)=>{const mt=We();if(Ce&&Math.abs(mt.y-Ne.y)>we)return{bearingDelta:o.ce(new o.P(Ne.x,je.y),je,mt)};let dt=(je.x-Ne.x)*Re;return Ce&&je.y<mt.y&&(dt=-dt),{bearingDelta:dt}},moveStateManager:Fe,enable:ye,assignEvents:Ca})}(e,z),F=function({enable:ye,clickTolerance:be,pitchDegreesPerPixelMoved:Ce=-.5}){const we=new Uo({checkCorrectEvent:Re=>C.mouseButton(Re)===0&&Re.ctrlKey||C.mouseButton(Re)===2});return new Ai({clickTolerance:be,move:(Re,We)=>({pitchDelta:(We.y-Re.y)*Ce}),moveStateManager:we,enable:ye,assignEvents:Ca})}(e),Z=function({enable:ye,clickTolerance:be,rollDegreesPerPixelMoved:Ce=.3},we){const Re=new Uo({checkCorrectEvent:We=>C.mouseButton(We)===2&&We.ctrlKey});return new Ai({clickTolerance:be,move:(We,Fe)=>{const Ne=we();let je=(Fe.x-We.x)*Ce;return Fe.y<Ne.y&&(je=-je),{rollDelta:je}},moveStateManager:Re,enable:ye,assignEvents:Ca})}(e,z);r.dragRotate=new $c(e,N,F,Z),this._add("mouseRotate",N,["mousePitch"]),this._add("mousePitch",F,["mouseRotate","mouseRoll"]),this._add("mouseRoll",Z,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();const J=function({enable:ye,clickTolerance:be}){const Ce=new Uo({checkCorrectEvent:we=>C.mouseButton(we)===0&&!we.ctrlKey});return new Ai({clickTolerance:be,move:(we,Re)=>({around:Re,panDelta:Re.sub(we)}),activateOnStart:!0,moveStateManager:Ce,enable:ye,assignEvents:Ca})}(e),oe=new Vh(e,r);r.dragPan=new Yc(a,J,oe),this._add("mousePan",J),this._add("touchPan",oe,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);const ne=new bt,se=new Ho;r.touchZoomRotate=new Pl(a,se,ne,A),this._add("touchRotate",ne,["touchPan","touchZoom"]),this._add("touchZoom",se,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate);const pe=r.scrollZoom=new er(r,()=>this._triggerRenderFrame());this._add("scrollZoom",pe,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);const _e=r.keyboard=new Wo(r);this._add("keyboard",_e),e.interactive&&e.keyboard&&r.keyboard.enable(),this._add("blockableMapEvent",new Gc(r))}_add(e,r,a){this._handlers.push({handlerName:e,handler:r,allowed:a}),this._handlersById[e]=r}stop(e){if(!this._updatingCamera){for(const{handler:r}of this._handlers)r.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(const{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ks(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,r,a){for(const l in e)if(l!==a&&(!r||r.indexOf(l)<0))return!0;return!1}_getMapTouches(e){const r=[];for(const a of e)this._el.contains(a.target)&&r.push(a);return r}mergeHandlerResult(e,r,a,l,d){if(!a)return;o.e(e,a);const g={handlerName:l,originalEvent:a.originalEvent||d};a.zoomDelta!==void 0&&(r.zoom=g),a.panDelta!==void 0&&(r.drag=g),a.rollDelta!==void 0&&(r.roll=g),a.pitchDelta!==void 0&&(r.pitch=g),a.bearingDelta!==void 0&&(r.rotate=g)}_applyChanges(){const e={},r={},a={};for(const[l,d,g]of this._changes)l.panDelta&&(e.panDelta=(e.panDelta||new o.P(0,0))._add(l.panDelta)),l.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+l.zoomDelta),l.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+l.bearingDelta),l.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+l.pitchDelta),l.rollDelta&&(e.rollDelta=(e.rollDelta||0)+l.rollDelta),l.around!==void 0&&(e.around=l.around),l.pinchAround!==void 0&&(e.pinchAround=l.pinchAround),l.noInertia&&(e.noInertia=l.noInertia),o.e(r,d),o.e(a,g);this._updateMapTransform(e,r,a),this._changes=[]}_updateMapTransform(e,r,a){const l=this._map,d=l._getTransformForUpdate(),g=l.terrain;if(!(La(e)||g&&this._terrainMovement))return this._fireEvents(r,a,!0);l._stop(!0);let{panDelta:w,zoomDelta:A,bearingDelta:I,pitchDelta:z,rollDelta:N,around:F,pinchAround:Z}=e;Z!==void 0&&(F=Z),F=F||l.transform.centerPoint,g&&!d.isPointOnMapSurface(F)&&(F=d.centerPoint);const J={panDelta:w,zoomDelta:A,rollDelta:N,pitchDelta:z,bearingDelta:I,around:F};this._map.cameraHelper.useGlobeControls&&!d.isPointOnMapSurface(F)&&(F=d.centerPoint);const oe=F.distSqr(d.centerPoint)<.01?d.center:d.screenPointToLocation(w?F.sub(w):F);g?(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(J,d),this._terrainMovement||!r.drag&&!r.zoom?r.drag&&this._terrainMovement?d.setCenter(d.screenPointToLocation(d.centerPoint.sub(w))):this._map.cameraHelper.handleMapControlsPan(J,d,oe):(this._terrainMovement=!0,this._map._elevationFreeze=!0,this._map.cameraHelper.handleMapControlsPan(J,d,oe))):(this._map.cameraHelper.handleMapControlsRollPitchBearingZoom(J,d),this._map.cameraHelper.handleMapControlsPan(J,d,oe)),l._applyUpdatedTransform(d),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(r,a,!0)}_fireEvents(e,r,a){const l=ks(this._eventsInProgress),d=ks(e),g={};for(const N in e){const{originalEvent:F}=e[N];this._eventsInProgress[N]||(g[`${N}start`]=F),this._eventsInProgress[N]=e[N]}!l&&d&&this._fireEvent("movestart",d.originalEvent);for(const N in g)this._fireEvent(N,g[N]);d&&this._fireEvent("move",d.originalEvent);for(const N in e){const{originalEvent:F}=e[N];this._fireEvent(N,F)}const w={};let A;for(const N in this._eventsInProgress){const{handlerName:F,originalEvent:Z}=this._eventsInProgress[N];this._handlersById[F].isActive()||(delete this._eventsInProgress[N],A=r[F]||Z,w[`${N}end`]=A)}for(const N in w)this._fireEvent(N,w[N]);const I=ks(this._eventsInProgress),z=(l||d)&&!I;if(z&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const N=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&N.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(N)}if(a&&z){this._updatingCamera=!0;const N=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),F=Z=>Z!==0&&-this._bearingSnap<Z&&Z<this._bearingSnap;!N||!N.essential&&L.prefersReducedMotion?(this._map.fire(new o.l("moveend",{originalEvent:A})),F(this._map.getBearing())&&this._map.resetNorth()):(F(N.bearing||this._map.getBearing())&&(N.bearing=0),N.freezeElevation=!0,this._map.easeTo(N,{originalEvent:A})),this._updatingCamera=!1}}_fireEvent(e,r){this._map.fire(new o.l(e,r?{originalEvent:r}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(e=>{delete this._frameId,this.handleEvent(new Fh("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class qh extends o.E{constructor(e,r,a){super(),this._renderFrameCallback=()=>{const l=Math.min((L.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(l)),l<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=a.bearingSnap,this.cameraHelper=r,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,r){e.apply(this.transform),this.transform=e,this.cameraHelper=r}getCenter(){return new o.Q(this.transform.center.lng,this.transform.center.lat)}setCenter(e,r){return this.jumpTo({center:e},r)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,r){return this.jumpTo({elevation:e},r),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,a){return e=o.P.convert(e).mult(-1),this.panTo(this.transform.center,o.e({offset:e},r),a)}panTo(e,r,a){return this.easeTo(o.e({center:e},r),a)}getZoom(){return this.transform.zoom}setZoom(e,r){return this.jumpTo({zoom:e},r),this}zoomTo(e,r,a){return this.easeTo(o.e({zoom:e},r),a)}zoomIn(e,r){return this.zoomTo(this.getZoom()+1,e,r),this}zoomOut(e,r){return this.zoomTo(this.getZoom()-1,e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new o.l("movestart",r)).fire(new o.l("move",r)).fire(new o.l("moveend",r))),this}getBearing(){return this.transform.bearing}setBearing(e,r){return this.jumpTo({bearing:e},r),this}getPadding(){return this.transform.padding}setPadding(e,r){return this.jumpTo({padding:e},r),this}rotateTo(e,r,a){return this.easeTo(o.e({bearing:e},r),a)}resetNorth(e,r){return this.rotateTo(0,o.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(o.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,r){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(e,r):this}getPitch(){return this.transform.pitch}setPitch(e,r){return this.jumpTo({pitch:e},r),this}getRoll(){return this.transform.roll}setRoll(e,r){return this.jumpTo({roll:e},r),this}cameraForBounds(e,r){e=it.convert(e).adjustAntiMeridian();const a=r&&r.bearing||0;return this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),a,r)}_cameraForBoxAndBearing(e,r,a,l){const d={top:0,bottom:0,right:0,left:0};if(typeof(l=o.e({padding:d,offset:[0,0],maxZoom:this.transform.maxZoom},l)).padding=="number"){const I=l.padding;l.padding={top:I,bottom:I,right:I,left:I}}const g=o.e(d,l.padding);l.padding=g;const w=this.transform,A=new it(e,r);return this.cameraHelper.cameraForBoxAndBearing(l,g,A,a,w)}fitBounds(e,r,a){return this._fitInternal(this.cameraForBounds(e,r),r,a)}fitScreenCoordinates(e,r,a,l,d){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.screenPointToLocation(o.P.convert(e)),this.transform.screenPointToLocation(o.P.convert(r)),a,l),l,d)}_fitInternal(e,r,a){return e?(delete(r=o.e(e,r)).padding,r.linear?this.easeTo(r,a):this.flyTo(r,a)):this}jumpTo(e,r){this.stop();const a=this._getTransformForUpdate();let l=!1,d=!1,g=!1;const w=a.zoom;this.cameraHelper.handleJumpToCenterZoom(a,e);const A=a.zoom!==w;return"elevation"in e&&a.elevation!==+e.elevation&&a.setElevation(+e.elevation),"bearing"in e&&a.bearing!==+e.bearing&&(l=!0,a.setBearing(+e.bearing)),"pitch"in e&&a.pitch!==+e.pitch&&(d=!0,a.setPitch(+e.pitch)),"roll"in e&&a.roll!==+e.roll&&(g=!0,a.setRoll(+e.roll)),e.padding==null||a.isPaddingEqual(e.padding)||a.setPadding(e.padding),this._applyUpdatedTransform(a),this.fire(new o.l("movestart",r)).fire(new o.l("move",r)),A&&this.fire(new o.l("zoomstart",r)).fire(new o.l("zoom",r)).fire(new o.l("zoomend",r)),l&&this.fire(new o.l("rotatestart",r)).fire(new o.l("rotate",r)).fire(new o.l("rotateend",r)),d&&this.fire(new o.l("pitchstart",r)).fire(new o.l("pitch",r)).fire(new o.l("pitchend",r)),g&&this.fire(new o.l("rollstart",r)).fire(new o.l("roll",r)).fire(new o.l("rollend",r)),this.fire(new o.l("moveend",r))}calculateCameraOptionsFromTo(e,r,a,l=0){const d=o.$.fromLngLat(e,r),g=o.$.fromLngLat(a,l),w=g.x-d.x,A=g.y-d.y,I=g.z-d.z,z=Math.hypot(w,A,I);if(z===0)throw new Error("Can't calculate camera options with same From and To");const N=Math.hypot(w,A),F=o.ah(this.transform.cameraToCenterDistance/z/this.transform.tileSize),Z=180*Math.atan2(w,-A)/Math.PI;let J=180*Math.acos(N/z)/Math.PI;return J=I<0?90-J:90+J,{center:g.toLngLat(),elevation:l,zoom:F,pitch:J,bearing:Z}}calculateCameraOptionsFromCameraLngLatAltRotation(e,r,a,l,d){const g=this.transform.calculateCenterFromCameraLngLatAlt(e,r,a,l);return{center:g.center,elevation:g.elevation,zoom:g.zoom,bearing:a,pitch:l,roll:d}}easeTo(e,r){this._stop(!1,e.easeId),((e=o.e({offset:[0,0],duration:500,easing:o.cf},e)).animate===!1||!e.essential&&L.prefersReducedMotion)&&(e.duration=0);const a=this._getTransformForUpdate(),l=this.getBearing(),d=a.pitch,g=a.roll,w="bearing"in e?this._normalizeBearing(e.bearing,l):l,A="pitch"in e?+e.pitch:d,I="roll"in e?this._normalizeBearing(e.roll,g):g,z="padding"in e?e.padding:a.padding,N=o.P.convert(e.offset);let F,Z;e.around&&(F=o.Q.convert(e.around),Z=a.locationToScreenPoint(F));const J={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching,rolling:this._rolling},oe=this.cameraHelper.handleEaseTo(a,{bearing:w,pitch:A,roll:I,padding:z,around:F,aroundPoint:Z,offsetAsPoint:N,offset:e.offset,zoom:e.zoom,center:e.center});return this._rotating=this._rotating||l!==w,this._pitching=this._pitching||A!==d,this._rolling=this._rolling||I!==g,this._padding=!a.isPaddingEqual(z),this._zooming=this._zooming||oe.isZooming,this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,J),this.terrain&&this._prepareElevation(oe.elevationCenter),this._ease(ne=>{oe.easeFunc(ne),this.terrain&&!e.freezeElevation&&this._updateElevation(ne),this._applyUpdatedTransform(a),this._fireMoveEvents(r)},ne=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,ne)},e),this}_prepareEase(e,r,a={}){this._moving=!0,r||a.moving||this.fire(new o.l("movestart",e)),this._zooming&&!a.zooming&&this.fire(new o.l("zoomstart",e)),this._rotating&&!a.rotating&&this.fire(new o.l("rotatestart",e)),this._pitching&&!a.pitching&&this.fire(new o.l("pitchstart",e)),this._rolling&&!a.rolling&&this.fire(new o.l("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));const r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){const a=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(a-(r-(a*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(o.B.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};const r=e.getCameraLngLat(),a=e.getCameraAltitude(),l=this.terrain?this.terrain.getElevationForLngLatZoom(r,e.zoom):0;if(a<l){const d=this.calculateCameraOptionsFromTo(r,l,e.center,e.elevation);return{pitch:d.pitch,zoom:d.zoom}}return{}}_applyUpdatedTransform(e){const r=[];if(r.push(l=>this._elevateCameraIfInsideTerrain(l)),this.transformCameraUpdate&&r.push(l=>this.transformCameraUpdate(l)),!r.length)return;const a=e.clone();for(const l of r){const d=a.clone(),{center:g,zoom:w,roll:A,pitch:I,bearing:z,elevation:N}=l(d);g&&d.setCenter(g),N!==void 0&&d.setElevation(N),w!==void 0&&d.setZoom(w),A!==void 0&&d.setRoll(A),I!==void 0&&d.setPitch(I),z!==void 0&&d.setBearing(z),a.apply(d)}this.transform.apply(a)}_fireMoveEvents(e){this.fire(new o.l("move",e)),this._zooming&&this.fire(new o.l("zoom",e)),this._rotating&&this.fire(new o.l("rotate",e)),this._pitching&&this.fire(new o.l("pitch",e)),this._rolling&&this.fire(new o.l("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;const a=this._zooming,l=this._rotating,d=this._pitching,g=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,a&&this.fire(new o.l("zoomend",e)),l&&this.fire(new o.l("rotateend",e)),d&&this.fire(new o.l("pitchend",e)),g&&this.fire(new o.l("rollend",e)),this.fire(new o.l("moveend",e))}flyTo(e,r){if(!e.essential&&L.prefersReducedMotion){const je=o.O(e,["center","zoom","bearing","pitch","roll","elevation"]);return this.jumpTo(je,r)}this.stop(),e=o.e({offset:[0,0],speed:1.2,curve:1.42,easing:o.cf},e);const a=this._getTransformForUpdate(),l=a.bearing,d=a.pitch,g=a.roll,w=a.padding,A="bearing"in e?this._normalizeBearing(e.bearing,l):l,I="pitch"in e?+e.pitch:d,z="roll"in e?this._normalizeBearing(e.roll,g):g,N="padding"in e?e.padding:a.padding,F=o.P.convert(e.offset);let Z=a.centerPoint.add(F);const J=a.screenPointToLocation(Z),oe=this.cameraHelper.handleFlyTo(a,{bearing:A,pitch:I,roll:z,padding:N,locationAtOffset:J,offsetAsPoint:F,center:e.center,minZoom:e.minZoom,zoom:e.zoom});let ne=e.curve;const se=Math.max(a.width,a.height),pe=se/oe.scaleOfZoom,_e=oe.pixelPathLength;typeof oe.scaleOfMinZoom=="number"&&(ne=Math.sqrt(se/oe.scaleOfMinZoom/_e*2));const ye=ne*ne;function be(je){const mt=(pe*pe-se*se+(je?-1:1)*ye*ye*_e*_e)/(2*(je?pe:se)*ye*_e);return Math.log(Math.sqrt(mt*mt+1)-mt)}function Ce(je){return(Math.exp(je)-Math.exp(-je))/2}function we(je){return(Math.exp(je)+Math.exp(-je))/2}const Re=be(!1);let We=function(je){return we(Re)/we(Re+ne*je)},Fe=function(je){return se*((we(Re)*(Ce(mt=Re+ne*je)/we(mt))-Ce(Re))/ye)/_e;var mt},Ne=(be(!0)-Re)/ne;if(Math.abs(_e)<2e-6||!isFinite(Ne)){if(Math.abs(se-pe)<1e-6)return this.easeTo(e,r);const je=pe<se?-1:1;Ne=Math.abs(Math.log(pe/se))/ne,Fe=()=>0,We=mt=>Math.exp(je*ne*mt)}return e.duration="duration"in e?+e.duration:1e3*Ne/("screenSpeed"in e?+e.screenSpeed/ne:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=l!==A,this._pitching=I!==d,this._rolling=z!==g,this._padding=!a.isPaddingEqual(N),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(oe.targetCenter),this._ease(je=>{const mt=je*Ne,dt=1/We(mt),tt=Fe(mt);this._rotating&&a.setBearing(o.B.number(l,A,je)),this._pitching&&a.setPitch(o.B.number(d,I,je)),this._rolling&&a.setRoll(o.B.number(g,z,je)),this._padding&&(a.interpolatePadding(w,N,je),Z=a.centerPoint.add(F)),oe.easeFunc(je,dt,tt,Z),this.terrain&&!e.freezeElevation&&this._updateElevation(je),this._applyUpdatedTransform(a),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,r){var a;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const l=this._onEaseEnd;delete this._onEaseEnd,l.call(this,r)}return e||(a=this.handlers)===null||a===void 0||a.stop(!1),this}_ease(e,r,a){a.animate===!1||a.duration===0?(e(1),r()):(this._easeStart=L.now(),this._easeOptions=a,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){e=o.aL(e,-180,180);const a=Math.abs(e-r);return Math.abs(e-360-r)<a&&(e-=360),Math.abs(e+360-r)<a&&(e+=360),e}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(o.Q.convert(e),this.transform.tileZoom):null}}const Bn={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class kr{constructor(e=Bn){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=r=>{!r||r.sourceDataType!=="metadata"&&r.sourceDataType!=="visibility"&&r.dataType!=="style"&&r.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=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=C.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=C.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=C.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,r){const a=this._map._getUIString(`AttributionControl.${r}`);e.title=a,e.setAttribute("aria-label",a)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(l=>typeof l!="string"?"":l)):typeof this.options.customAttribution=="string"&&e.push(this.options.customAttribution)),this._map.style.stylesheet){const l=this._map.style.stylesheet;this.styleOwner=l.owner,this.styleId=l.id}const r=this._map.style.sourceCaches;for(const l in r){const d=r[l];if(d.used||d.usedForTerrain){const g=d.getSource();g.attribution&&e.indexOf(g.attribution)<0&&e.push(g.attribution)}}e=e.filter(l=>String(l).trim()),e.sort((l,d)=>l.length-d.length),e=e.filter((l,d)=>{for(let g=d+1;g<e.length;g++)if(e[g].indexOf(l)>=0)return!1;return!0});const a=e.join(" | ");a!==this._attribHTML&&(this._attribHTML=a,e.length?(this._innerContainer.innerHTML=C.sanitize(a),this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Cs{constructor(e={}){this._updateCompact=()=>{const r=this._container.children;if(r.length){const a=r[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&a.classList.add("maplibregl-compact"):a.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=C.create("div","maplibregl-ctrl");const r=C.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){C.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Il{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){const r=++this._id;return this._queue.push({callback:e,id:r,cancelled:!1}),r}remove(e){const r=this._currentlyRunning,a=r?this._queue.concat(r):this._queue;for(const l of a)if(l.id===e)return void(l.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const r=this._currentlyRunning=this._queue;this._queue=[];for(const a of r)if(!a.cancelled&&(a.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var eu=o.aG([{name:"a_pos3d",type:"Int16",components:3}]);class tu extends o.E{constructor(e){super(),this._lastTilesetChange=L.now(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];const a={};for(const l of Ae(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.sourceCache._source.calculateTileZoom}))a[l.key]=!0,this._renderableTilesKeys.push(l.key),this._tiles[l.key]||(l.terrainRttPosMatrix32f=new Float64Array(16),o.bQ(l.terrainRttPosMatrix32f,0,o.Z,o.Z,0,0,1),this._tiles[l.key]=new gi(l,this.tileSize),this._lastTilesetChange=L.now());for(const l in this._tiles)a[l]||delete this._tiles[l]}freeRtt(e){for(const r in this._tiles){const a=this._tiles[r];(!e||a.tileID.equals(e)||a.tileID.isChildOf(e)||e.isChildOf(a.tileID))&&(a.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,r){return r?this._getTerrainCoordsForTileRanges(e,r):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){const r={};for(const a of this._renderableTilesKeys){const l=this._tiles[a].tileID,d=e.clone(),g=o.b2();if(l.canonical.equals(e.canonical))o.bQ(g,0,o.Z,o.Z,0,0,1);else if(l.canonical.isChildOf(e.canonical)){const w=l.canonical.z-e.canonical.z,A=l.canonical.x-(l.canonical.x>>w<<w),I=l.canonical.y-(l.canonical.y>>w<<w),z=o.Z>>w;o.bQ(g,0,z,z,0,0,1),o.L(g,g,[-A*z,-I*z,0])}else{if(!e.canonical.isChildOf(l.canonical))continue;{const w=e.canonical.z-l.canonical.z,A=e.canonical.x-(e.canonical.x>>w<<w),I=e.canonical.y-(e.canonical.y>>w<<w),z=o.Z>>w;o.bQ(g,0,o.Z,o.Z,0,0,1),o.L(g,g,[A*z,I*z,0]),o.M(g,g,[1/2**w,1/2**w,0])}}d.terrainRttPosMatrix32f=new Float32Array(g),r[a]=d}return r}_getTerrainCoordsForTileRanges(e,r){const a={};for(const l of this._renderableTilesKeys){const d=this._tiles[l].tileID;if(!this._isWithinTileRanges(d,r))continue;const g=e.clone(),w=o.b2();if(d.canonical.z===e.canonical.z){const A=e.canonical.x-d.canonical.x,I=e.canonical.y-d.canonical.y;o.bQ(w,0,o.Z,o.Z,0,0,1),o.L(w,w,[A*o.Z,I*o.Z,0])}else if(d.canonical.z>e.canonical.z){const A=d.canonical.z-e.canonical.z,I=d.canonical.x-(d.canonical.x>>A<<A),z=d.canonical.y-(d.canonical.y>>A<<A),N=e.canonical.x-(d.canonical.x>>A),F=e.canonical.y-(d.canonical.y>>A),Z=o.Z>>A;o.bQ(w,0,Z,Z,0,0,1),o.L(w,w,[-I*Z+N*o.Z,-z*Z+F*o.Z,0])}else{const A=e.canonical.z-d.canonical.z,I=e.canonical.x-(e.canonical.x>>A<<A),z=e.canonical.y-(e.canonical.y>>A<<A),N=(e.canonical.x>>A)-d.canonical.x,F=(e.canonical.y>>A)-d.canonical.y,Z=o.Z<<A;o.bQ(w,0,Z,Z,0,0,1),o.L(w,w,[I*o.Z+N*Z,z*o.Z+F*Z,0])}g.terrainRttPosMatrix32f=new Float32Array(w),a[l]=g}return a}getSourceTile(e,r){const a=this.sourceCache._source;let l=e.overscaledZ-this.deltaZoom;if(l>a.maxzoom&&(l=a.maxzoom),l<a.minzoom)return null;this._sourceTileCache[e.key]||(this._sourceTileCache[e.key]=e.scaledTo(l).key);let d=this.sourceCache.getTileByID(this._sourceTileCache[e.key]);if((!d||!d.dem)&&r)for(;l>=a.minzoom&&(!d||!d.dem);)d=this.sourceCache.getTileByID(e.scaledTo(l--).key);return d}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,r){return r[e.canonical.z]&&e.canonical.x>=r[e.canonical.z].minTileX&&e.canonical.x<=r[e.canonical.z].maxTileX&&e.canonical.y>=r[e.canonical.z].minTileY&&e.canonical.y<=r[e.canonical.z].maxTileY}}class ru{constructor(e,r,a){this._meshCache={},this.painter=e,this.sourceCache=new tu(r),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(e,r,a,l=o.Z){var d;if(!(r>=0&&r<l&&a>=0&&a<l))return 0;const g=this.getTerrainData(e),w=(d=g.tile)===null||d===void 0?void 0:d.dem;if(!w)return 0;const A=o.cj([],[r/l*o.Z,a/l*o.Z],g.u_terrain_matrix),I=[A[0]*w.dim,A[1]*w.dim],z=Math.floor(I[0]),N=Math.floor(I[1]),F=I[0]-z,Z=I[1]-N;return w.get(z,N)*(1-F)*(1-Z)+w.get(z+1,N)*F*(1-Z)+w.get(z,N+1)*(1-F)*Z+w.get(z+1,N+1)*F*Z}getElevationForLngLatZoom(e,r){if(!o.ck(r,e.wrap()))return 0;const{tileID:a,mercatorX:l,mercatorY:d}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(a,l%o.Z,d%o.Z,o.Z)}getElevation(e,r,a,l=o.Z){return this.getDEMElevation(e,r,a,l)*this.exaggeration}getTerrainData(e){if(!this._emptyDemTexture){const l=this.painter.context,d=new o.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new rt(l,d,l.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new rt(l,new o.R({width:1,height:1}),l.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=o.ad([])}const r=this.sourceCache.getSourceTile(e,!0);if(r&&r.dem&&(!r.demTexture||r.needsTerrainPrepare)){const l=this.painter.context;r.demTexture=this.painter.getTileTexture(r.dem.stride),r.demTexture?r.demTexture.update(r.dem.getPixels(),{premultiply:!1}):r.demTexture=new rt(l,r.dem.getPixels(),l.gl.RGBA,{premultiply:!1}),r.demTexture.bind(l.gl.NEAREST,l.gl.CLAMP_TO_EDGE),r.needsTerrainPrepare=!1}const a=r&&r+r.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){const l=this.sourceCache.sourceCache._source.maxzoom;let d=e.canonical.z-r.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=l?d=e.canonical.z-l:o.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const g=e.canonical.x-(e.canonical.x>>d<<d),w=e.canonical.y-(e.canonical.y>>d<<d),A=o.cl(new Float64Array(16),[1/(o.Z<<d),1/(o.Z<<d),0]);o.L(A,A,[g*o.Z,w*o.Z,0]),this._demMatrixCache[e.key]={matrix:A,coord:e}}return{u_depth:2,u_terrain:3,u_terrain_dim:r&&r.dem&&r.dem.dim||1,u_terrain_matrix:a?this._demMatrixCache[e.key].matrix:this._emptyDemMatrix,u_terrain_unpack:r&&r.dem&&r.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(r&&r.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:r}}getFramebuffer(e){const r=this.painter,a=r.width/devicePixelRatio,l=r.height/devicePixelRatio;return!this._fbo||this._fbo.width===a&&this._fbo.height===l||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new rt(r.context,{width:a,height:l,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new rt(r.context,{width:a,height:l,data:null},r.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(r.context.gl.NEAREST,r.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=r.context.createFramebuffer(a,l,!0,!1),this._fbo.depthAttachment.set(r.context.createRenderbuffer(r.context.gl.DEPTH_COMPONENT16,a,l))),this._fbo.colorAttachment.set(e==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const e=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const r=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let d=0,g=0;d<this._coordsTextureSize;d++)for(let w=0;w<this._coordsTextureSize;w++,g+=4)r[g+0]=255&w,r[g+1]=255&d,r[g+2]=w>>8<<4|d>>8,r[g+3]=0;const a=new o.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),l=new rt(e,a,e.gl.RGBA,{premultiply:!1});return l.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=l,l}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);const r=new Uint8Array(4),a=this.painter.context,l=a.gl,d=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),g=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),w=Math.round(this.painter.height/devicePixelRatio);a.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),l.readPixels(d,w-g-1,1,1,l.RGBA,l.UNSIGNED_BYTE,r),a.bindFramebuffer.set(null);const A=r[0]+(r[2]>>4<<8),I=r[1]+((15&r[2])<<8),z=this.coordsIndex[255-r[3]],N=z&&this.sourceCache.getTileByID(z);if(!N)return null;const F=this._coordsTextureSize,Z=(1<<N.tileID.canonical.z)*F;return new o.$((N.tileID.canonical.x*F+A)/Z+N.tileID.wrap,(N.tileID.canonical.y*F+I)/Z,this.getElevation(N.tileID,A,I,F))}depthAtPoint(e){const r=new Uint8Array(4),a=this.painter.context,l=a.gl;return a.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),l.readPixels(e.x,this.painter.height/devicePixelRatio-e.y-1,1,1,l.RGBA,l.UNSIGNED_BYTE,r),a.bindFramebuffer.set(null),(r[0]/16777216+r[1]/65536+r[2]/256+r[3])/256}getTerrainMesh(e){var r;const a=((r=this.painter.style.projection)===null||r===void 0?void 0:r.transitionState)>0,l=a&&e.canonical.y===0,d=a&&e.canonical.y===(1<<e.canonical.z)-1,g=`m_${l?"n":""}_${d?"s":""}`;if(this._meshCache[g])return this._meshCache[g];const w=this.painter.context,A=new o.cm,I=new o.aK,z=this.meshSize,N=o.Z/z,F=z*z;for(let we=0;we<=z;we++)for(let Re=0;Re<=z;Re++)A.emplaceBack(Re*N,we*N,0);for(let we=0;we<F;we+=z+1)for(let Re=0;Re<z;Re++)I.emplaceBack(Re+we,z+Re+we+1,z+Re+we+2),I.emplaceBack(Re+we,z+Re+we+2,Re+we+1);const Z=A.length,J=Z+(z+1),oe=(z+1)*z,ne=l?o.b9:0,se=l?0:1,pe=d?o.ba:o.Z,_e=d?0:1;for(let we=0;we<=z;we++)A.emplaceBack(we*N,ne,se);for(let we=0;we<=z;we++)A.emplaceBack(we*N,pe,_e);for(let we=0;we<z;we++)I.emplaceBack(oe+we,J+we,J+we+1),I.emplaceBack(oe+we,J+we+1,oe+we+1),I.emplaceBack(0+we,Z+we+1,Z+we),I.emplaceBack(0+we,0+we+1,Z+we+1);const ye=A.length,be=ye+2*(z+1);for(const we of[0,1])for(let Re=0;Re<=z;Re++)for(const We of[0,1])A.emplaceBack(we*o.Z,Re*N,We);for(let we=0;we<2*z;we+=2)I.emplaceBack(ye+we,ye+we+1,ye+we+3),I.emplaceBack(ye+we,ye+we+3,ye+we+2),I.emplaceBack(be+we,be+we+3,be+we+1),I.emplaceBack(be+we,be+we+2,be+we+3);const Ce=new Mn(w.createVertexBuffer(A,eu.members),w.createIndexBuffer(I),o.aJ.simpleSegment(0,0,A.length,I.length));return this._meshCache[g]=Ce,Ce}getMeshFrameDelta(e){return 2*Math.PI*o.bu/Math.pow(2,Math.max(e,0))/5}getMinTileElevationForLngLatZoom(e,r){var a;const{tileID:l}=this._getOverscaledTileIDFromLngLatZoom(e,r);return(a=this.getMinMaxElevation(l).minElevation)!==null&&a!==void 0?a:0}getMinMaxElevation(e){const r=this.getTerrainData(e).tile,a={minElevation:null,maxElevation:null};return r&&r.dem&&(a.minElevation=r.dem.min*this.exaggeration,a.maxElevation=r.dem.max*this.exaggeration),a}_getOverscaledTileIDFromLngLatZoom(e,r){const a=o.$.fromLngLat(e.wrap()),l=(1<<r)*o.Z,d=a.x*l,g=a.y*l,w=Math.floor(d/o.Z),A=Math.floor(g/o.Z);return{tileID:new o.Y(r,0,r,w,A),mercatorX:d,mercatorY:g}}}class Uh{constructor(e,r,a){this._context=e,this._size=r,this._tileSize=a,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const e of this._objects)e.texture.destroy(),e.fbo.destroy()}_createObject(e){const r=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),a=new rt(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),this._context.extTextureFilterAnisotropic&&this._context.gl.texParameterf(this._context.gl.TEXTURE_2D,this._context.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,this._context.extTextureFilterAnisotropicMax),r.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),r.colorAttachment.set(a.texture),{id:e,fbo:r,texture:a,stamp:-1,inUse:!1}}getObjectForId(e){return this._objects[e]}useObject(e){e.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(r=>e.id!==r),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(const r of this._recentlyUsed)if(!this._objects[r].inUse)return this._objects[r];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(const e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(e=>!e.inUse)===!1}}const Ei={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Ra{constructor(e,r){this.painter=e,this.terrain=r,this.pool=new Uh(e.context,30,r.sourceCache.tileSize*r.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,r){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(a=>!e._layers[a].isHidden(r)),this._coordsAscending={};for(const a in e.sourceCaches){this._coordsAscending[a]={};const l=e.sourceCaches[a].getVisibleCoordinates(),d=e.sourceCaches[a].getSource(),g=d instanceof zt?d.terrainTileRanges:null;for(const w of l){const A=this.terrain.sourceCache.getTerrainCoords(w,g);for(const I in A)this._coordsAscending[a][I]||(this._coordsAscending[a][I]=[]),this._coordsAscending[a][I].push(A[I])}}this._coordsAscendingStr={};for(const a of e._order){const l=e._layers[a],d=l.source;if(Ei[l.type]&&!this._coordsAscendingStr[d]){this._coordsAscendingStr[d]={};for(const g in this._coordsAscending[d])this._coordsAscendingStr[d][g]=this._coordsAscending[d][g].map(w=>w.key).sort().join()}}for(const a of this._renderableTiles)for(const l in this._coordsAscendingStr){const d=this._coordsAscendingStr[l][a.tileID.key];d&&d!==a.rttCoords[l]&&(a.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;const a=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),l=e.type,d=this.painter,g=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(Ei[l]&&(this._prevType&&Ei[this._prevType]||this._stacks.push([]),this._prevType=l,this._stacks[this._stacks.length-1].push(e.id),!g))return!0;if(Ei[this._prevType]||Ei[l]&&g){this._prevType=l;const w=this._stacks.length-1,A=this._stacks[w]||[];for(const I of this._renderableTiles){if(this.pool.isFull()&&(Yn(this.painter,this.terrain,this._rttTiles,a),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(I),I.rtt[w]){const N=this.pool.getObjectForId(I.rtt[w].id);if(N.stamp===I.rtt[w].stamp){this.pool.useObject(N);continue}}const z=this.pool.getOrCreateFreeObject();this.pool.useObject(z),this.pool.stampObject(z),I.rtt[w]={id:z.id,stamp:z.stamp},d.context.bindFramebuffer.set(z.fbo.framebuffer),d.context.clear({color:o.b7.transparent,stencil:0}),d.currentStencilSource=void 0;for(let N=0;N<A.length;N++){const F=d.style._layers[A[N]],Z=F.source?this._coordsAscending[F.source][I.tileID.key]:[I.tileID];d.context.viewport.set([0,0,z.fbo.width,z.fbo.height]),d._renderTileClippingMasks(F,Z,!0),d.renderLayer(d,d.style.sourceCaches[F.source],F,Z,a),F.source&&(I.rttCoords[F.source]=this._coordsAscendingStr[F.source][I.tileID.key])}}return Yn(this.painter,this.terrain,this._rttTiles,a),this._rttTiles=[],this.pool.freeAllObjects(),Ei[l]}return!1}}const Tt={"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":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Ft=B,Ts={hash:!1,interactive:!0,bearingSnap:7,attributionControl:Bn,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:o.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0},Ml={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Ll{constructor(e,r,a=!1){this.mousedown=d=>{this.startMove(d,C.mousePos(this.element,d)),C.addEventListener(window,"mousemove",this.mousemove),C.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=d=>{this.move(d,C.mousePos(this.element,d))},this.mouseup=d=>{this._rotatePitchHanlder.dragEnd(d),this.offTemp()},this.touchstart=d=>{d.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=C.touchPos(this.element,d.targetTouches)[0],this.startMove(d,this._startPos),C.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.addEventListener(window,"touchend",this.touchend))},this.touchmove=d=>{d.targetTouches.length!==1?this.reset():(this._lastPos=C.touchPos(this.element,d.targetTouches)[0],this.move(d,this._lastPos))},this.touchend=d=>{d.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this._rotatePitchHanlder.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;const l=new jo;this._rotatePitchHanlder=new Ai({clickTolerance:3,move:(d,g)=>{const w=r.getBoundingClientRect(),A=new o.P((w.bottom-w.top)/2,(w.right-w.left)/2);return{bearingDelta:o.ce(new o.P(d.x,g.y),g,A),pitchDelta:a?-.5*(g.y-d.y):void 0}},moveStateManager:l,enable:!0,assignEvents:()=>{}}),this.map=e,C.addEventListener(r,"mousedown",this.mousedown),C.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),C.addEventListener(r,"touchcancel",this.reset)}startMove(e,r){this._rotatePitchHanlder.dragStart(e,r),C.disableDrag()}move(e,r){const a=this.map,{bearingDelta:l,pitchDelta:d}=this._rotatePitchHanlder.dragMove(e,r)||{};l&&a.setBearing(a.getBearing()+l),d&&a.setPitch(a.getPitch()+d)}off(){const e=this.element;C.removeEventListener(e,"mousedown",this.mousedown),C.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend),C.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){C.enableDrag(),C.removeEventListener(window,"mousemove",this.mousemove),C.removeEventListener(window,"mouseup",this.mouseup),C.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),C.removeEventListener(window,"touchend",this.touchend)}}let Hr;function Rl(h,e,r,a=!1){if(a||!r.getCoveringTilesDetailsProvider().allowWorldCopies())return h==null?void 0:h.wrap();const l=new o.Q(h.lng,h.lat);if(h=new o.Q(h.lng,h.lat),e){const d=new o.Q(h.lng-360,h.lat),g=new o.Q(h.lng+360,h.lat),w=r.locationToScreenPoint(h).distSqr(e);r.locationToScreenPoint(d).distSqr(e)<w?h=d:r.locationToScreenPoint(g).distSqr(e)<w&&(h=g)}for(;Math.abs(h.lng-r.center.lng)>180;){const d=r.locationToScreenPoint(h);if(d.x>=0&&d.y>=0&&d.x<=r.width&&d.y<=r.height)break;h.lng>r.center.lng?h.lng-=360:h.lng+=360}return h.lng!==l.lng&&r.isPointOnMapSurface(r.locationToScreenPoint(h))?h:l}const Qi={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 iu(h,e,r){const a=h.classList;for(const l in Qi)a.remove(`maplibregl-${r}-anchor-${l}`);a.add(`maplibregl-${r}-anchor-${e}`)}class wo extends o.E{constructor(e){if(super(),this._onKeyPress=r=>{const a=r.code,l=r.charCode||r.keyCode;a!=="Space"&&a!=="Enter"&&l!==32&&l!==13||this.togglePopup()},this._onMapClick=r=>{const a=r.originalEvent.target,l=this._element;this._popup&&(a===l||l.contains(a))&&this.togglePopup()},this._update=r=>{if(!this._map)return;const a=this._map.loaded()&&!this._map.isMoving();((r==null?void 0:r.type)==="terrain"||(r==null?void 0:r.type)==="render"&&!a)&&this._map.once("render",this._update),this._lngLat=Rl(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let l="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?l=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(l=`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)`),this._subpixelPositioning||r&&r.type!=="moveend"||(this._pos=this._pos.round()),C.setTransform(this._element,`${Qi[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${d} ${l}`),L.frameAsync(new AbortController).then(()=>{this._updateOpacity(r&&r.type==="moveend")}).catch(()=>{})},this._onMove=r=>{if(!this._isDragging){const a=this._clickTolerance||this._map._clickTolerance;this._isDragging=r.point.dist(this._pointerdownPos)>=a}this._isDragging&&(this._pos=r.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 o.l("dragstart"))),this.fire(new o.l("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 o.l("dragend")),this._state="inactive"},this._addDragHandler=r=>{this._element.contains(r.originalEvent.target)&&(r.preventDefault(),this._positionDelta=r.point.sub(this._pos).add(this._offset),this._pointerdownPos=r.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=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&e.pitchAlignment!=="auto"?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e==null?void 0:e.opacity,e==null?void 0:e.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=o.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=C.create("div");const r=C.createNS("http://www.w3.org/2000/svg","svg"),a=41,l=27;r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height",`${a}px`),r.setAttributeNS(null,"width",`${l}px`),r.setAttributeNS(null,"viewBox",`0 0 ${l} ${a}`);const d=C.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 g=C.createNS("http://www.w3.org/2000/svg","g");g.setAttributeNS(null,"fill-rule","nonzero");const w=C.createNS("http://www.w3.org/2000/svg","g");w.setAttributeNS(null,"transform","translate(3.0, 29.0)"),w.setAttributeNS(null,"fill","#000000");const A=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const se of A){const pe=C.createNS("http://www.w3.org/2000/svg","ellipse");pe.setAttributeNS(null,"opacity","0.04"),pe.setAttributeNS(null,"cx","10.5"),pe.setAttributeNS(null,"cy","5.80029008"),pe.setAttributeNS(null,"rx",se.rx),pe.setAttributeNS(null,"ry",se.ry),w.appendChild(pe)}const I=C.createNS("http://www.w3.org/2000/svg","g");I.setAttributeNS(null,"fill",this._color);const z=C.createNS("http://www.w3.org/2000/svg","path");z.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"),I.appendChild(z);const N=C.createNS("http://www.w3.org/2000/svg","g");N.setAttributeNS(null,"opacity","0.25"),N.setAttributeNS(null,"fill","#000000");const F=C.createNS("http://www.w3.org/2000/svg","path");F.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"),N.appendChild(F);const Z=C.createNS("http://www.w3.org/2000/svg","g");Z.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Z.setAttributeNS(null,"fill","#FFFFFF");const J=C.createNS("http://www.w3.org/2000/svg","g");J.setAttributeNS(null,"transform","translate(8.0, 8.0)");const oe=C.createNS("http://www.w3.org/2000/svg","circle");oe.setAttributeNS(null,"fill","#000000"),oe.setAttributeNS(null,"opacity","0.25"),oe.setAttributeNS(null,"cx","5.5"),oe.setAttributeNS(null,"cy","5.5"),oe.setAttributeNS(null,"r","5.4999962");const ne=C.createNS("http://www.w3.org/2000/svg","circle");ne.setAttributeNS(null,"fill","#FFFFFF"),ne.setAttributeNS(null,"cx","5.5"),ne.setAttributeNS(null,"cy","5.5"),ne.setAttributeNS(null,"r","5.4999962"),J.appendChild(oe),J.appendChild(ne),g.appendChild(w),g.appendChild(I),g.appendChild(N),g.appendChild(Z),g.appendChild(J),r.appendChild(g),r.setAttributeNS(null,"height",a*this._scale+"px"),r.setAttributeNS(null,"width",l*this._scale+"px"),this._element.appendChild(r),this._offset=o.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",r=>{r.preventDefault()}),this._element.addEventListener("mousedown",r=>{r.preventDefault()}),iu(this._element,this._anchor,"marker"),e&&e.className)for(const r of e.className.split(" "))this._element.classList.add(r);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),C.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=o.Q.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){const l=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[l,-1*(38.1-13.5+l)],"bottom-right":[-l,-1*(38.1-13.5+l)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){const e=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:e?(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map)),this):this}_updateOpacity(e=!1){var r,a;const l=(r=this._map)===null||r===void 0?void 0:r.terrain,d=this._map.transform.isLocationOccluded(this._lngLat);if(!l||d){const Z=d?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Z&&(this._element.style.opacity=Z))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const g=this._map,w=g.terrain.depthAtPoint(this._pos),A=g.terrain.getElevationForLngLatZoom(this._lngLat,g.transform.tileZoom);if(g.transform.lngLatToCameraDepth(this._lngLat,A)-w<.006)return void(this._element.style.opacity=this._opacity);const I=-this._offset.y/g.transform.pixelsPerMeter,z=Math.sin(g.getPitch()*Math.PI/180)*I,N=g.terrain.depthAtPoint(new o.P(this._pos.x,this._pos.y-this._offset.y)),F=g.transform.lngLatToCameraDepth(this._lngLat,A+z)-N>.006;!((a=this._popup)===null||a===void 0)&&a.isOpen()&&F&&this._popup.remove(),this._element.style.opacity=F?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=o.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(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(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&e!=="auto"?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,r){return(this._opacity===void 0||e===void 0&&r===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),e!==void 0&&(this._opacity=e),r!==void 0&&(this._opacityWhenCovered=r),this._map&&this._updateOpacity(!0),this}}const Or={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Mr=0,Zo=!1;const Es={maxWidth:100,unit:"metric"};function Ps(h,e,r){const a=r&&r.maxWidth||100,l=h._container.clientHeight/2,d=h._container.clientWidth/2,g=h.unproject([d-a/2,l]),w=h.unproject([d+a/2,l]),A=Math.round(h.project(w).x-h.project(g).x),I=Math.min(a,A,h._container.clientWidth),z=g.distanceTo(w);if(r&&r.unit==="imperial"){const N=3.2808*z;N>5280?So(e,I,N/5280,h._getUIString("ScaleControl.Miles")):So(e,I,N,h._getUIString("ScaleControl.Feet"))}else r&&r.unit==="nautical"?So(e,I,z/1852,h._getUIString("ScaleControl.NauticalMiles")):z>=1e3?So(e,I,z/1e3,h._getUIString("ScaleControl.Kilometers")):So(e,I,z,h._getUIString("ScaleControl.Meters"))}function So(h,e,r,a){const l=function(d){const g=Math.pow(10,`${Math.floor(d)}`.length-1);let w=d/g;return w=w>=10?10:w>=5?5:w>=3?3:w>=2?2:w>=1?1:function(A){const I=Math.pow(10,Math.ceil(-Math.log(A)/Math.LN10));return Math.round(A*I)/I}(w),g*w}(r);h.style.width=e*(l/r)+"px",h.innerHTML=`${l}&nbsp;${a}`}const Dl={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0},zl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Ko(h){if(h){if(typeof h=="number"){const e=Math.round(Math.abs(h)/Math.SQRT2);return{center:new o.P(0,0),top:new o.P(0,h),"top-left":new o.P(e,e),"top-right":new o.P(-e,e),bottom:new o.P(0,-h),"bottom-left":new o.P(e,-e),"bottom-right":new o.P(-e,-e),left:new o.P(h,0),right:new o.P(-h,0)}}if(h instanceof o.P||Array.isArray(h)){const e=o.P.convert(h);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:o.P.convert(h.center||[0,0]),top:o.P.convert(h.top||[0,0]),"top-left":o.P.convert(h["top-left"]||[0,0]),"top-right":o.P.convert(h["top-right"]||[0,0]),bottom:o.P.convert(h.bottom||[0,0]),"bottom-left":o.P.convert(h["bottom-left"]||[0,0]),"bottom-right":o.P.convert(h["bottom-right"]||[0,0]),left:o.P.convert(h.left||[0,0]),right:o.P.convert(h.right||[0,0])}}return Ko(new o.P(0,0))}const Bl=B;x.AJAXError=o.cq,x.Event=o.l,x.Evented=o.E,x.LngLat=o.Q,x.MercatorCoordinate=o.$,x.Point=o.P,x.addProtocol=o.cr,x.config=o.a,x.removeProtocol=o.cs,x.AttributionControl=kr,x.BoxZoomHandler=Al,x.CanvasSource=Jt,x.CooperativeGesturesHandler=Ma,x.DoubleClickZoomHandler=Ia,x.DragPanHandler=Yc,x.DragRotateHandler=$c,x.EdgeInsets=Fi,x.FullscreenControl=class extends o.E{constructor(h={}){super(),this._onFullscreenChange=()=>{var e;let r=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((e=r==null?void 0:r.shadowRoot)===null||e===void 0)&&e.fullscreenElement;)r=r.shadowRoot.fullscreenElement;r===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,h&&h.container&&(h.container instanceof HTMLElement?this._container=h.container:o.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(h){return this._map=h,this._container||(this._container=this._map.getContainer()),this._controlContainer=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){C.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const h=this._fullscreenButton=C.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);C.create("span","maplibregl-ctrl-icon",h).setAttribute("aria-hidden","true"),h.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const h=this._getTitle();this._fullscreenButton.setAttribute("aria-label",h),this._fullscreenButton.title=h}_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 o.l("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new o.l("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},x.GeoJSONSource=Et,x.GeolocateControl=class extends o.E{constructor(h){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new o.l("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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(e),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new o.l("geolocate",e)),this._finish()}},this._updateCamera=e=>{const r=new o.Q(e.coords.longitude,e.coords.latitude),a=e.coords.accuracy,l=this._map.getBearing(),d=o.e({bearing:l},this.options.fitBoundsOptions),g=it.fromLngLat(r,a);this._map.fitBounds(g,d,{geolocateSource:!0})},this._updateMarker=e=>{if(e){const r=new o.Q(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.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=e=>{if(this._map){if(e.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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(e.code===3&&Zo)return;this.options.trackUserLocation&&this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new o.l("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=C.create("button","maplibregl-ctrl-geolocate",this._container),C.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(e===!1){o.w("Geolocation support is not available so the GeolocateControl will be disabled.");const r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}else{const r=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=C.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new wo({element:this._dotElement}),this._circleElement=C.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new wo({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",r=>{r.geolocateSource||this._watchState!=="ACTIVE_LOCK"||r.originalEvent&&r.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 o.l("trackuserlocationend")),this.fire(new o.l("userlocationlostfocus")))})}},this.options=o.e({},Or,h)}onAdd(h){return this._map=h,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return o._(this,arguments,void 0,function*(e=!1){if(Hr!==void 0&&!e)return Hr;if(window.navigator.permissions===void 0)return Hr=!!window.navigator.geolocation,Hr;try{Hr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{Hr=!!window.navigator.geolocation}return Hr})}().then(e=>this._finishSetupUI(e)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),C.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Mr=0,Zo=!1}_isOutOfMapMaxBounds(h){const e=this._map.getMaxBounds(),r=h.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.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 h=this._map.getBounds(),e=h.getSouthEast(),r=h.getNorthEast(),a=e.distanceTo(r),l=Math.ceil(this._accuracy/(a/this._map._container.clientHeight)*2);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}trigger(){if(!this._setup)return o.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 o.l("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Mr--,Zo=!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 o.l("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 o.l("trackuserlocationstart")),this.fire(new o.l("userlocationfocus"));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 h;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Mr++,Mr>1?(h={maximumAge:6e5,timeout:0},Zo=!0):(h=this.options.positionOptions,Zo=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,h)}}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)}},x.GlobeControl=class{constructor(){this._toggleProjection=()=>{var h;const e=(h=this._map.getProjection())===null||h===void 0?void 0:h.type;this._map.setProjection(e!=="mercator"&&e?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var h;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((h=this._map.getProjection())===null||h===void 0?void 0:h.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(h){return this._map=h,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=C.create("button","maplibregl-ctrl-globe",this._container),C.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._container}onRemove(){C.remove(this._container),this._map.off("styledata",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},x.Hash=xl,x.ImageSource=zt,x.KeyboardHandler=Wo,x.LngLatBounds=it,x.LogoControl=Cs,x.Map=class extends qh{constructor(h){var e,r;o.cn.mark(o.co.create);const a=Object.assign(Object.assign(Object.assign({},Ts),h),{canvasContextAttributes:Object.assign(Object.assign({},Ts.canvasContextAttributes),h.canvasContextAttributes)});if(a.minZoom!=null&&a.maxZoom!=null&&a.minZoom>a.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(a.minPitch!=null&&a.maxPitch!=null&&a.minPitch>a.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(a.minPitch!=null&&a.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(a.maxPitch!=null&&a.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");const l=new at,d=new Ke;if(a.minZoom!==void 0&&l.setMinZoom(a.minZoom),a.maxZoom!==void 0&&l.setMaxZoom(a.maxZoom),a.minPitch!==void 0&&l.setMinPitch(a.minPitch),a.maxPitch!==void 0&&l.setMaxPitch(a.maxPitch),a.renderWorldCopies!==void 0&&l.setRenderWorldCopies(a.renderWorldCopies),super(l,d,{bearingSnap:a.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Il,this._controls=[],this._mapId=o.a4(),this._contextLost=w=>{w.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new o.l("webglcontextlost",{originalEvent:w}))},this._contextRestored=w=>{this._setupPainter(),this.resize(),this._update(),this.fire(new o.l("webglcontextrestored",{originalEvent:w}))},this._onMapScroll=w=>{if(w.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=a.trackResize===!0,this._bearingSnap=a.bearingSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=a.refreshExpiredTiles===!0,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=a.crossSourceCollisions===!0,this._collectResourceTiming=a.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Tt),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this.transformCameraUpdate=a.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=a.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=ee.addThrottleControl(()=>this.isMoving()),this._requestManager=new me(a.transformRequest),typeof a.container=="string"){if(this._container=document.getElementById(a.container),!this._container)throw new Error(`Container '${a.container}' not found.`)}else{if(!(a.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=a.container}if(a.maxBounds&&this.setMaxBounds(a.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 w=!1;const A=ws(I=>{this._trackResize&&!this._removed&&(this.resize(I),this.redraw())},50);this._resizeObserver=new ResizeObserver(I=>{w?A(I):w=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Nh(this,a),this._hash=a.hash&&new xl(typeof a.hash=="string"&&a.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,o.e({},a.fitBoundsOptions,{duration:0}))));const g=typeof a.style=="string"||((r=(e=a.style)===null||e===void 0?void 0:e.projection)===null||r===void 0?void 0:r.type)!=="globe";this.resize(null,g),this._localIdeographFontFamily=a.localIdeographFontFamily,this._validateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new kr(typeof a.attributionControl=="boolean"?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new Cs,a.logoPosition),this.on("style.load",()=>{if(g||this._resizeTransform(),this.transform.unmodified){const w=o.O(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(w)}}),this.on("data",w=>{this._update(w.dataType==="style"),this.fire(new o.l(`${w.dataType}data`,w))}),this.on("dataloading",w=>{this.fire(new o.l(`${w.dataType}dataloading`,w))}),this.on("dataabort",w=>{this.fire(new o.l("sourcedataabort",w))})}_getMapId(){return this._mapId}addControl(h,e){if(e===void 0&&(e=h.getDefaultPosition?h.getDefaultPosition():"top-right"),!h||!h.onAdd)return this.fire(new o.k(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const r=h.onAdd(this);this._controls.push(h);const a=this._controlPositions[e];return e.indexOf("bottom")!==-1?a.insertBefore(r,a.firstChild):a.appendChild(r),this}removeControl(h){if(!h||!h.onRemove)return this.fire(new o.k(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const e=this._controls.indexOf(h);return e>-1&&this._controls.splice(e,1),h.onRemove(this),this}hasControl(h){return this._controls.indexOf(h)>-1}calculateCameraOptionsFromTo(h,e,r,a){return a==null&&this.terrain&&(a=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(h,e,r,a)}resize(h,e=!0){const[r,a]=this._containerDimensions(),l=this._getClampedPixelRatio(r,a);if(this._resizeCanvas(r,a,l),this.painter.resize(r,a,l),this.painter.overLimit()){const g=this.painter.context.gl;this._maxCanvasSize=[g.drawingBufferWidth,g.drawingBufferHeight];const w=this._getClampedPixelRatio(r,a);this._resizeCanvas(r,a,w),this.painter.resize(r,a,w)}this._resizeTransform(e);const d=!this._moving;return d&&(this.stop(),this.fire(new o.l("movestart",h)).fire(new o.l("move",h))),this.fire(new o.l("resize",h)),d&&this.fire(new o.l("moveend",h)),this}_resizeTransform(h=!0){var e;const[r,a]=this._containerDimensions();this.transform.resize(r,a,h),(e=this._requestedCameraState)===null||e===void 0||e.resize(r,a,h)}_getClampedPixelRatio(h,e){const{0:r,1:a}=this._maxCanvasSize,l=this.getPixelRatio(),d=h*l,g=e*l;return Math.min(d>r?r/d:1,g>a?a/g:1)*l}getPixelRatio(){var h;return(h=this._overridePixelRatio)!==null&&h!==void 0?h:devicePixelRatio}setPixelRatio(h){this._overridePixelRatio=h,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(h){return this.transform.setMaxBounds(it.convert(h)),this._update()}setMinZoom(h){if((h=h??-2)>=-2&&h<=this.transform.maxZoom)return this.transform.setMinZoom(h),this._update(),this.getZoom()<h&&this.setZoom(h),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(h){if((h=h??22)>=this.transform.minZoom)return this.transform.setMaxZoom(h),this._update(),this.getZoom()>h&&this.setZoom(h),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(h){if((h=h??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(h>=0&&h<=this.transform.maxPitch)return this.transform.setMinPitch(h),this._update(),this.getPitch()<h&&this.setPitch(h),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(h){if((h=h??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(h>=this.transform.minPitch)return this.transform.setMaxPitch(h),this._update(),this.getPitch()>h&&this.setPitch(h),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(h){return this.transform.setRenderWorldCopies(h),this._update()}project(h){return this.transform.locationToScreenPoint(o.Q.convert(h),this.style&&this.terrain)}unproject(h){return this.transform.screenPointToLocation(o.P.convert(h),this.terrain)}isMoving(){var h;return this._moving||((h=this.handlers)===null||h===void 0?void 0:h.isMoving())}isZooming(){var h;return this._zooming||((h=this.handlers)===null||h===void 0?void 0:h.isZooming())}isRotating(){var h;return this._rotating||((h=this.handlers)===null||h===void 0?void 0:h.isRotating())}_createDelegatedListener(h,e,r){if(h==="mouseenter"||h==="mouseover"){let a=!1;return{layers:e,listener:r,delegates:{mousemove:d=>{const g=e.filter(A=>this.getLayer(A)),w=g.length!==0?this.queryRenderedFeatures(d.point,{layers:g}):[];w.length?a||(a=!0,r.call(this,new Xr(h,this,d.originalEvent,{features:w}))):a=!1},mouseout:()=>{a=!1}}}}if(h==="mouseleave"||h==="mouseout"){let a=!1;return{layers:e,listener:r,delegates:{mousemove:g=>{const w=e.filter(A=>this.getLayer(A));(w.length!==0?this.queryRenderedFeatures(g.point,{layers:w}):[]).length?a=!0:a&&(a=!1,r.call(this,new Xr(h,this,g.originalEvent)))},mouseout:g=>{a&&(a=!1,r.call(this,new Xr(h,this,g.originalEvent)))}}}}{const a=l=>{const d=e.filter(w=>this.getLayer(w)),g=d.length!==0?this.queryRenderedFeatures(l.point,{layers:d}):[];g.length&&(l.features=g,r.call(this,l),delete l.features)};return{layers:e,listener:r,delegates:{[h]:a}}}}_saveDelegatedListener(h,e){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[h]=this._delegatedListeners[h]||[],this._delegatedListeners[h].push(e)}_removeDelegatedListener(h,e,r){if(!this._delegatedListeners||!this._delegatedListeners[h])return;const a=this._delegatedListeners[h];for(let l=0;l<a.length;l++){const d=a[l];if(d.listener===r&&d.layers.length===e.length&&d.layers.every(g=>e.includes(g))){for(const g in d.delegates)this.off(g,d.delegates[g]);return void a.splice(l,1)}}}on(h,e,r){if(r===void 0)return super.on(h,e);const a=typeof e=="string"?[e]:e,l=this._createDelegatedListener(h,a,r);this._saveDelegatedListener(h,l);for(const d in l.delegates)this.on(d,l.delegates[d]);return{unsubscribe:()=>{this._removeDelegatedListener(h,a,r)}}}once(h,e,r){if(r===void 0)return super.once(h,e);const a=typeof e=="string"?[e]:e,l=this._createDelegatedListener(h,a,r);for(const d in l.delegates){const g=l.delegates[d];l.delegates[d]=(...w)=>{this._removeDelegatedListener(h,a,r),g(...w)}}this._saveDelegatedListener(h,l);for(const d in l.delegates)this.once(d,l.delegates[d]);return this}off(h,e,r){return r===void 0?super.off(h,e):(this._removeDelegatedListener(h,typeof e=="string"?[e]:e,r),this)}queryRenderedFeatures(h,e){if(!this.style)return[];let r;const a=h instanceof o.P||Array.isArray(h),l=a?h:[[0,0],[this.transform.width,this.transform.height]];if(e=e||(a?{}:h)||{},l instanceof o.P||typeof l[0]=="number")r=[o.P.convert(l)];else{const d=o.P.convert(l[0]),g=o.P.convert(l[1]);r=[d,new o.P(g.x,d.y),g,new o.P(d.x,g.y),d]}return this.style.queryRenderedFeatures(r,e,this.transform)}querySourceFeatures(h,e){return this.style.querySourceFeatures(h,e)}setStyle(h,e){return(e=o.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},e)).diff!==!1&&e.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&h?(this._diffStyle(h,e),this):(this._localIdeographFontFamily=e.localIdeographFontFamily,this._updateStyle(h,e))}setTransformRequest(h){return this._requestManager.setTransformRequest(h),this}_getUIString(h){const e=this._locale[h];if(e==null)throw new Error(`Missing UI string '${h}'`);return e}_updateStyle(h,e){var r,a;if(e.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(h,e));const l=this.style&&e.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!h)),h?(this.style=new rl(this,e||{}),this.style.setEventedParent(this,{style:this.style}),typeof h=="string"?this.style.loadURL(h,e,l):this.style.loadJSON(h,e,l),this):((a=(r=this.style)===null||r===void 0?void 0:r.projection)===null||a===void 0||a.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new rl(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(h,e){if(typeof h=="string"){const r=this._requestManager.transformRequest(h,"Style");o.j(r,new AbortController).then(a=>{this._updateDiff(a.data,e)}).catch(a=>{a&&this.fire(new o.k(a))})}else typeof h=="object"&&this._updateDiff(h,e)}_updateDiff(h,e){try{this.style.setState(h,e)&&this._update(!0)}catch(r){o.w(`Unable to perform style diff: ${r.message||r.error||r}. Rebuilding the style from scratch.`),this._updateStyle(h,e)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():o.w("There is no style added to the map.")}addSource(h,e){return this._lazyInitEmptyStyle(),this.style.addSource(h,e),this._update(!0)}isSourceLoaded(h){const e=this.style&&this.style.sourceCaches[h];if(e!==void 0)return e.loaded();this.fire(new o.k(new Error(`There is no source with ID '${h}'`)))}setTerrain(h){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),h){const e=this.style.sourceCaches[h.source];if(!e)throw new Error(`cannot load terrain, because there exists no source with ID: ${h.source}`);this.terrain===null&&e.reload();for(const r in this.style._layers){const a=this.style._layers[r];a.type==="hillshade"&&a.source===h.source&&o.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 ru(this.painter,e,h),this.painter.renderToTexture=new Ra(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=r=>{var a;r.dataType==="style"?this.terrain.sourceCache.freeRtt():r.dataType==="source"&&r.tile&&(r.sourceId!==h.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((a=r.source)===null||a===void 0?void 0:a.type)==="image"?this.terrain.sourceCache.freeRtt():this.terrain.sourceCache.freeRtt(r.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.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new o.l("terrain",{terrain:h})),this}getTerrain(){var h,e;return(e=(h=this.terrain)===null||h===void 0?void 0:h.options)!==null&&e!==void 0?e:null}areTilesLoaded(){const h=this.style&&this.style.sourceCaches;for(const e in h){const r=h[e]._tiles;for(const a in r){const l=r[a];if(l.state!=="loaded"&&l.state!=="errored")return!1}}return!0}removeSource(h){return this.style.removeSource(h),this._update(!0)}getSource(h){return this.style.getSource(h)}setSourceTileLodParams(h,e,r){if(r){const a=this.getSource(r);if(!a)throw new Error(`There is no source with ID "${r}", cannot set LOD parameters`);a.calculateTileZoom=xe(Math.max(1,h),Math.max(1,e))}else for(const a in this.style.sourceCaches)this.style.sourceCaches[a].getSource().calculateTileZoom=xe(Math.max(1,h),Math.max(1,e));return this._update(!0),this}refreshTiles(h,e){const r=this.style.sourceCaches[h];if(!r)throw new Error(`There is no source cache with ID "${h}", cannot refresh tile`);e===void 0?r.reload():r.refreshTiles(e.map(a=>new o.a1(a.z,a.x,a.y)))}addImage(h,e,r={}){const{pixelRatio:a=1,sdf:l=!1,stretchX:d,stretchY:g,content:w,textFitWidth:A,textFitHeight:I}=r;if(this._lazyInitEmptyStyle(),!(e instanceof HTMLImageElement||o.b(e))){if(e.width===void 0||e.height===void 0)return this.fire(new o.k(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:z,height:N,data:F}=e,Z=e;return this.style.addImage(h,{data:new o.R({width:z,height:N},new Uint8Array(F)),pixelRatio:a,stretchX:d,stretchY:g,content:w,textFitWidth:A,textFitHeight:I,sdf:l,version:0,userImage:Z}),Z.onAdd&&Z.onAdd(this,h),this}}{const{width:z,height:N,data:F}=L.getImageData(e);this.style.addImage(h,{data:new o.R({width:z,height:N},F),pixelRatio:a,stretchX:d,stretchY:g,content:w,textFitWidth:A,textFitHeight:I,sdf:l,version:0})}}updateImage(h,e){const r=this.style.getImage(h);if(!r)return this.fire(new o.k(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const a=e instanceof HTMLImageElement||o.b(e)?L.getImageData(e):e,{width:l,height:d,data:g}=a;if(l===void 0||d===void 0)return this.fire(new o.k(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(l!==r.data.width||d!==r.data.height)return this.fire(new o.k(new Error("The width and height of the updated image must be that same as the previous version of the image")));const w=!(e instanceof HTMLImageElement||o.b(e));return r.data.replace(g,w),this.style.updateImage(h,r),this}getImage(h){return this.style.getImage(h)}hasImage(h){return h?!!this.style.getImage(h):(this.fire(new o.k(new Error("Missing required image id"))),!1)}removeImage(h){this.style.removeImage(h)}loadImage(h){return ee.getImage(this._requestManager.transformRequest(h,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(h,e){return this._lazyInitEmptyStyle(),this.style.addLayer(h,e),this._update(!0)}moveLayer(h,e){return this.style.moveLayer(h,e),this._update(!0)}removeLayer(h){return this.style.removeLayer(h),this._update(!0)}getLayer(h){return this.style.getLayer(h)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(h,e,r){return this.style.setLayerZoomRange(h,e,r),this._update(!0)}setFilter(h,e,r={}){return this.style.setFilter(h,e,r),this._update(!0)}getFilter(h){return this.style.getFilter(h)}setPaintProperty(h,e,r,a={}){return this.style.setPaintProperty(h,e,r,a),this._update(!0)}getPaintProperty(h,e){return this.style.getPaintProperty(h,e)}setLayoutProperty(h,e,r,a={}){return this.style.setLayoutProperty(h,e,r,a),this._update(!0)}getLayoutProperty(h,e){return this.style.getLayoutProperty(h,e)}setGlyphs(h,e={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(h,e),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(h,e,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(h,e,r,a=>{a||this._update(!0)}),this}removeSprite(h){return this._lazyInitEmptyStyle(),this.style.removeSprite(h),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSprite(h,e,r=>{r||this._update(!0)}),this}setLight(h,e={}){return this._lazyInitEmptyStyle(),this.style.setLight(h,e),this._update(!0)}getLight(){return this.style.getLight()}setSky(h,e={}){return this._lazyInitEmptyStyle(),this.style.setSky(h,e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(h,e){return this.style.setFeatureState(h,e),this._update()}removeFeatureState(h,e){return this.style.removeFeatureState(h,e),this._update()}getFeatureState(h){return this.style.getFeatureState(h)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let h=0,e=0;return this._container&&(h=this._container.clientWidth||400,e=this._container.clientHeight||300),[h,e]}_setupContainer(){const h=this._container;h.classList.add("maplibregl-map");const e=this._canvasContainer=C.create("div","maplibregl-canvas-container",h);this._interactive&&e.classList.add("maplibregl-interactive"),this._canvas=C.create("canvas","maplibregl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");const r=this._containerDimensions(),a=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],a);const l=this._controlContainer=C.create("div","maplibregl-control-container",h),d=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(g=>{d[g]=C.create("div",`maplibregl-ctrl-${g} `,l)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(h,e,r){this._canvas.width=Math.floor(r*h),this._canvas.height=Math.floor(r*e),this._canvas.style.width=`${h}px`,this._canvas.style.height=`${e}px`}_setupPainter(){const h=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0});let e=null;this._canvas.addEventListener("webglcontextcreationerror",a=>{e={requestedAttributes:h},a&&(e.statusMessage=a.statusMessage,e.type=a.type)},{once:!0});let r=null;if(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,h):this._canvas.getContext("webgl2",h)||this._canvas.getContext("webgl",h),!r){const a="Failed to initialize WebGL";throw e?(e.message=a,new Error(JSON.stringify(e))):new Error(a)}this.painter=new vl(r,this.transform),T.testSupport(r)}migrateProjection(h,e){super.migrateProjection(h,e),this.painter.transform=h,this.fire(new o.l("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(h){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||h,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(h){return this._update(),this._renderTaskQueue.add(h)}_cancelRenderFrame(h){this._renderTaskQueue.remove(h)}_render(h){var e,r,a,l,d;const g=this._idleTriggered?this._fadeDuration:0,w=((e=this.style.projection)===null||e===void 0?void 0:e.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(h),this._removed)return;let A=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const N=this.transform.zoom,F=L.now();this.style.zoomHistory.update(N,F);const Z=new o.C(N,{now:F,fadeDuration:g,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),J=Z.crossFadingFactor();J===1&&J===this._crossFadingFactor||(A=!0,this._crossFadingFactor=J),this.style.update(Z)}const I=((r=this.style.projection)===null||r===void 0?void 0:r.transitionState)>0!==w;(a=this.style.projection)===null||a===void 0||a.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((l=this.style.projection)===null||l===void 0?void 0:l.transitionState,(d=this.style.projection)===null||d===void 0?void 0:d.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||I)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=this.style&&this.style._updatePlacement(this.transform,this.showCollisionBoxes,g,this._crossSourceCollisions,I),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:g,showPadding:this.showPadding}),this.fire(new o.l("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,o.cn.mark(o.co.load),this.fire(new o.l("load"))),this.style&&(this.style.hasTransitions()||A)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const z=this._sourcesDirty||this._styleDirty||this._placementDirty;return z||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new o.l("idle")),!this._loaded||this._fullyLoaded||z||(this._fullyLoaded=!0,o.cn.mark(o.co.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var h;this._hash&&this._hash.remove();for(const r of this._controls)r.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),ee.removeThrottleControl(this._imageQueueHandle),(h=this._resizeObserver)===null||h===void 0||h.disconnect();const e=this.painter.context.gl.getExtension("WEBGL_lose_context");e!=null&&e.loseContext&&e.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),C.remove(this._canvasContainer),C.remove(this._controlContainer),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),o.cn.clearMetrics(),this._removed=!0,this.fire(new o.l("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,L.frame(this._frameRequest,h=>{o.cn.frame(h),this._frameRequest=null;try{this._render(h)}catch(e){if(!o.cp(e)&&!function(r){return r.message===ma}(e))throw e}},()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(h){this._showTileBoundaries!==h&&(this._showTileBoundaries=h,this._update())}get showPadding(){return!!this._showPadding}set showPadding(h){this._showPadding!==h&&(this._showPadding=h,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(h){this._showCollisionBoxes!==h&&(this._showCollisionBoxes=h,h?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(h){this._showOverdrawInspector!==h&&(this._showOverdrawInspector=h,this._update())}get repaint(){return!!this._repaint}set repaint(h){this._repaint!==h&&(this._repaint=h,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(h){this._vertices=h,this._update()}get version(){return Ft}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(h){return this._lazyInitEmptyStyle(),this.style.setProjection(h),this._update(!0)}},x.MapMouseEvent=Xr,x.MapTouchEvent=Fo,x.MapWheelEvent=Sl,x.Marker=wo,x.NavigationControl=class{constructor(h){this._updateZoomButtons=()=>{const e=this._map.getZoom(),r=e===this._map.getMaxZoom(),a=e===this._map.getMinZoom();this._zoomInButton.disabled=r,this._zoomOutButton.disabled=a,this._zoomInButton.setAttribute("aria-disabled",r.toString()),this._zoomOutButton.setAttribute("aria-disabled",a.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,r)=>{const a=this._map._getUIString(`NavigationControl.${r}`);e.title=a,e.setAttribute("aria-label",a)},this.options=o.e({},Ml,h),this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),C.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),C.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=C.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(h){return this._map=h,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.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ll(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){C.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(h,e){const r=C.create("button",h,this._container);return r.type="button",r.addEventListener("click",e),r}},x.Popup=class extends o.E{constructor(h){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:void 0)},this.remove=()=>(this._content&&C.remove(this._content),this._container&&(C.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new o.l("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=C.create("div","maplibregl-popup",this._map.getContainer()),this._tip=C.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const g of this.options.className.split(" "))this._container.classList.add(g);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Rl(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),this._trackPointer&&!e)return;const r=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationToScreenPoint(this._lngLat));let a=this.options.anchor;const l=Ko(this.options.offset);if(!a){const g=this._container.offsetWidth,w=this._container.offsetHeight;let A;A=r.y+l.bottom.y<w?["top"]:r.y>this._map.transform.height-w?["bottom"]:[],r.x<g/2?A.push("left"):r.x>this._map.transform.width-g/2&&A.push("right"),a=A.length===0?"bottom":A.join("-")}let d=r.add(l[a]);this.options.subpixelPositioning||(d=d.round()),C.setTransform(this._container,`${Qi[a]} translate(${d.x}px,${d.y}px)`),iu(this._container,a,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=o.e(Object.create(Dl),h)}addTo(h){return this._map&&this.remove(),this._map=h,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 o.l("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(h){return this._lngLat=o.Q.convert(h),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(h){return this.setDOMContent(document.createTextNode(h))}setHTML(h){const e=document.createDocumentFragment(),r=document.createElement("body");let a;for(r.innerHTML=h;a=r.firstChild,a;)e.appendChild(a);return this.setDOMContent(e)}getMaxWidth(){var h;return(h=this._container)===null||h===void 0?void 0:h.style.maxWidth}setMaxWidth(h){return this.options.maxWidth=h,this._update(),this}setDOMContent(h){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=C.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(h),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(h){return this._container&&this._container.classList.add(h),this}removeClassName(h){return this._container&&this._container.classList.remove(h),this}setOffset(h){return this.options.offset=h,this._update(),this}toggleClassName(h){if(this._container)return this._container.classList.toggle(h)}setSubpixelPositioning(h){this.options.subpixelPositioning=h}_createCloseButton(){this.options.closeButton&&(this._closeButton=C.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const h=this._container.querySelector(zl);h&&h.focus()}},x.RasterDEMTileSource=Ht,x.RasterTileSource=Mt,x.ScaleControl=class{constructor(h){this._onMove=()=>{Ps(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,Ps(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Es),h)}getDefaultPosition(){return"bottom-left"}onAdd(h){return this._map=h,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-scale",h.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){C.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},x.ScrollZoomHandler=er,x.Style=rl,x.TerrainControl=class{constructor(h){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=h}onAdd(h){return this._map=h,this._container=C.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=C.create("button","maplibregl-ctrl-terrain",this._container),C.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){C.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},x.TwoFingersTouchPitchHandler=Pa,x.TwoFingersTouchRotateHandler=bt,x.TwoFingersTouchZoomHandler=Ho,x.TwoFingersTouchZoomRotateHandler=Pl,x.VectorTileSource=At,x.VideoSource=or,x.addSourceType=(h,e)=>o._(void 0,void 0,void 0,function*(){if(ii(h))throw new Error(`A source type called "${h}" already exists.`);((r,a)=>{Ir[r]=a})(h,e)}),x.clearPrewarmedResources=function(){const h=Ti;h&&(h.isPreloaded()&&h.numActive()===1?(h.release(Ki),Ti=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()"))},x.createTileMesh=an,x.getMaxParallelImageRequests=function(){return o.a.MAX_PARALLEL_IMAGE_REQUESTS},x.getRTLTextPluginStatus=function(){return Mi().getRTLTextPluginStatus()},x.getVersion=function(){return Bl},x.getWorkerCount=function(){return fr.workerCount},x.getWorkerUrl=function(){return o.a.WORKER_URL},x.importScriptInWorkers=function(h){return Gi().broadcast("IS",h)},x.prewarm=function(){Bi().acquire(Ki)},x.setMaxParallelImageRequests=function(h){o.a.MAX_PARALLEL_IMAGE_REQUESTS=h},x.setRTLTextPlugin=function(h,e){return Mi().setRTLTextPlugin(h,e)},x.setWorkerCount=function(h){fr.workerCount=h},x.setWorkerUrl=function(h){o.a.WORKER_URL=h}});var P=y;return P})}(ih)),ih.exports}var Cx=kx();const tp=ry(Cx);function ny(u){const p={"bottom-left":"bottom-[20px] left-[20px]","bottom-right":"bottom-[20px] right-[20px]","bottom-center":"bottom-[20px] left-1/2 -translate-x-1/2","top-left":"top-[20px] left-[20px]","top-right":"top-[20px] right-[20px]","top-center":"top-[20px] left-1/2 -translate-x-1/2",center:"top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"};return p[u]||p["bottom-left"]}const pr=(u,p)=>{const y=u.__vccOpts||u;for(const[b,k]of p)y[b]=k;return y},Tx={key:0,class:"p-5 pb-0 flex justify-between items-center"},Ex={class:"inline-block font-semibold text-lg text-gray-800"},Px={class:"flex flex-col gap-1 p-5"},Ix={class:"flex items-center justify-between w-full text-sm text-gray-800"},Mx={key:0,class:"ms-2 text-xs text-gray-500"},Lx={__name:"vs-legend-widget",props:{config:{type:Object,required:!0}},setup(u){const p=u,y=_.computed(()=>{var k;return((k=p.config)==null?void 0:k.items)||[]}),b=_.computed(()=>{var k;return((k=p.config)==null?void 0:k.title)||""});return(k,P)=>(_.openBlock(),_.createElementBlock("div",{class:"legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative",style:_.normalizeStyle({width:u.config.width||"100%"})},[b.value?(_.openBlock(),_.createElementBlock("div",Tx,[_.createElementVNode("h2",Ex,_.toDisplayString(b.value),1)])):_.createCommentVNode("",!0),_.createElementVNode("div",Px,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.value,x=>(_.openBlock(),_.createElementBlock("div",{class:"flex items-center",key:x.label},[_.createElementVNode("span",{class:_.normalizeClass(["shrink-0 size-2.5 inline-block me-2.5",[x.shape==="square"?"rounded-sm":"",x.shape==="circle"?"rounded-full":"",x.shape==="line"?"w-6 h-0.5":"",x.shape==="dashed-line"?"w-6 h-0.5 dashed-line":""]]),style:_.normalizeStyle({backgroundColor:x.color})},null,6),_.createElementVNode("span",Ix,[_.createElementVNode("span",null,_.toDisplayString(x.label),1),x.count!==void 0?(_.openBlock(),_.createElementBlock("span",Mx," ("+_.toDisplayString(x.count)+") ",1)):_.createCommentVNode("",!0)])]))),128))])],4))}},Rx=pr(Lx,[["__scopeId","data-v-6dafc777"]]),Dx="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQfYBUV1ho8x2KJRsRujJppootjAAqioYMOCigUL0dh7Q1Fs2BVRKQJRxBoUuyii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ex-row gap-x-3 z-10 relative"},Bx=["onClick"],Vx=["src","alt"],Ox={__name:"vs-basemaps-widget",props:{map:{type:Object,required:!0},config:{type:Object,default:()=>({})},position:{type:String,default:"bottom-left"}},setup(u){const p=u,y=_.ref("voyager"),b=_.computed(()=>{var B;if(!((B=p.config)!=null&&B.layers))return[];const o=p.config.layers.map(D=>({id:D.id,title:D.label||D.title,url:D.url,service:D.type,category:"Базові карти",attribution:D.attribution,image:D.image,enabled:!0,owner:D.owner||"Unknown"}));return o.push({id:"__none__",title:"Без підложки",url:"",service:"",category:"Базові карти",attribution:"",image:Dx,enabled:!0,owner:""}),o});function k(o){return{version:8,sources:{[o.id]:{type:"raster",tiles:[o.url],tileSize:256,attribution:o.attribution||""}},layers:[{id:o.id,type:"raster",source:o.id}]}}const P=o=>{if(!p.map)return;const B=p.map.getStyle(),D=b.value.map(C=>C.id),M=B.layers.filter(C=>!D.includes(C.id)),O={};for(const C in B.sources)D.includes(C)||(O[C]=B.sources[C]);if(o.id==="__none__"){const C={version:8,sources:{...O},layers:[...M]};p.map.setStyle(C);return}const L=k(o);p.map.setStyle(L),p.map.once("styledata",()=>{for(const[C,T]of Object.entries(O))p.map.getSource(C)||p.map.addSource(C,T);for(const C of M)p.map.getLayer(C.id)||p.map.addLayer(C)})},x=o=>{y.value=o;const B=b.value.find(D=>D.id===o);B&&p.map&&P(B)};return _.onMounted(()=>{var o;(o=p.config)!=null&&o.default&&(y.value=p.config.default)}),(o,B)=>{const D=_.resolveComponent("VsPopover");return _.openBlock(),_.createElementBlock("div",zx,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(b.value,M=>(_.openBlock(),_.createBlock(D,{trigger:"hover",placement:"top",key:M.id},{reference:_.withCtx(()=>[_.createElementVNode("div",{class:_.normalizeClass(["w-14 h-14 flex items-center justify-center bg-white rounded-xl shadow-2xs cursor-pointer transition-all border-4",y.value===M.id?"border-blue-400":"border-transparent"]),onClick:O=>x(M.id)},[_.createElementVNode("img",{src:M.image,alt:M.title,class:_.normalizeClass(["object-cover rounded-lg",M.id==="__none__"?"w-10 h-10":"w-12 h-12"])},null,10,Vx)],10,Bx)]),default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(M.title)+" ",1)]),_:2},1024))),128))])}}};function Ya(u){if(!u.attrType||!u.attribute||!u.rules)return u.color||"#ccc";const p=u.rules.map(y=>[["==",["get",u.attribute],y.id||y.value],y.color]);return p.push(u.color||"#ccc"),["case",...p.flat()]}function Fx(u){if(!u.attrType||u.attrType!=="icon-by-attribute"||!u.attribute||!u.rules)return u.default_icon||null;const p=u.rules.map(y=>[["==",["get",u.attribute],y.value],y.icon]);return p.push(u.default_icon||"marker.svg"),["case",...p.flat()]}function oy(u){if(!u.attrType||u.attrType!=="attribute-pattern"||!u.attribute||!u.rules)return u.fillPattern||"";const p=u.rules.map(y=>[["==",["get",u.attribute],y.value],y.fillPattern||""]);return p.push(u.fillPattern||""),["case",...p.flat()]}function Io(u,p="stroke",y="#ccc"){return["case",["boolean",["feature-state","hovered"],!1],"#ff0000",["boolean",["feature-state","selected"],!1],"#ff0000",u[p]||y]}function Nx(u){const p=[{type:"fill",minzoom:u.pointZoom||0,paint:{"fill-color":Ya(u),"fill-outline-color":Io(u,"stroke","#ccc"),"fill-opacity":u.opacity||1,...u.attrType==="attribute-pattern"&&{"fill-pattern":oy(u)},...u.fillPattern&&!u.attrType&&{"fill-pattern":u.fillPattern}}},{type:"line",paint:{"line-color":Io(u,"stroke","#ccc"),"line-width":u.width||2,"line-opacity":u.lineOpacity||u.opacity||1}}];return u.pointZoom&&p.push({type:"circle",maxzoom:u.pointZoom,paint:{"circle-color":u.color||"#ccc","circle-stroke-color":Io(u,"stroke","#ccc"),"circle-stroke-width":u.width||2,"circle-opacity":u.opacity||1}}),p}function qx(u){return[{type:"line",paint:{"line-color":Io(u,"color",Ya(u)),"line-width":u.width||2,"line-opacity":u.opacity||1,...u.dashArray&&{"line-dasharray":u.dashArray}},layout:{...u.lineCap&&{"line-cap":u.lineCap},...u.lineJoin&&{"line-join":u.lineJoin}}}]}function Ux(u){const p=[{type:"circle",maxzoom:u.icon&&+u.iconZoom||22,paint:{"circle-radius":u.radius||6,"circle-stroke-color":Io(u,"stroke","#ccc"),"circle-stroke-width":u.width||2,"circle-color":Ya(u),"circle-opacity":u.opacity||1}}];return u!=null&&u.clusterZoom?(p.push({type:"circle",filter:["has","point_count"],paint:{"circle-color":["step",["get","point_count"],"#51bbd6",100,"#f1f075",750,"#f28cb1"],"circle-radius":["step",["get","point_count"],20,100,30,750,40]}}),p.push({type:"symbol",filter:["has","point_count"],layout:{"text-field":["get","point_count"],"text-font":["Open Sans Regular"],"text-size":12}})):u.icon&&p.push({type:"symbol",minzoom:+u.iconZoom||16,layout:{"icon-image":u.icon,"icon-allow-overlap":!0}}),p}function jx(u,p,y){const b=u.type||"point";return b==="polygon"?[{type:"fill",...y!==void 0?{maxzoom:y}:{},paint:{"fill-color":Ya(u),"fill-outline-color":Io(u,"stroke","#ccc"),"fill-opacity":u.opacity||1,...u.attrType==="attribute-pattern"&&{"fill-pattern":oy(u)},...u.fillPattern&&!u.attrType&&{"fill-pattern":u.fillPattern}}},{type:"line",...y!==void 0?{maxzoom:y}:{},paint:{"line-color":Io(u,"stroke","#ccc"),"line-width":u.width||2,"line-opacity":u.lineOpacity||u.opacity||1}}]:b==="line"?[{type:"line",...y!==void 0?{maxzoom:y}:{},paint:{"line-color":Io(u,"color",Ya(u)),"line-width":u.width||2,"line-opacity":u.opacity||1,...u.dashArray&&{"line-dasharray":u.dashArray}},layout:{...u.lineCap&&{"line-cap":u.lineCap},...u.lineJoin&&{"line-join":u.lineJoin}}}]:[{type:"circle",...y!==void 0?{maxzoom:y}:{},paint:{"circle-radius":u.radius||6,"circle-stroke-color":Io(u,"stroke","#ccc"),"circle-stroke-width":u.width||2,"circle-color":Ya(u),"circle-opacity":u.opacity||1}}]}function sy(u){var y,b;if(!u)return null;if(u.attrType==="icon-by-attribute"&&u.iconZoom){const k=Fx(u),P=Array.isArray(k)&&k[0]==="case"?k:["case",["==",["get",u.attribute],((b=(y=u.rules)==null?void 0:y[0])==null?void 0:b.value)||""],k,k],x=jx(u,void 0,+u.iconZoom),o={type:"symbol",minzoom:+u.iconZoom,layout:{"icon-image":P,"icon-size":(u==null?void 0:u.icon_size)||1,"icon-allow-overlap":!0,"icon-anchor":(u==null?void 0:u.icon_anchor)||"bottom"},paint:{"icon-opacity":u.opacity||1}};return[...x,o]}const p=u.type||"point";return p==="polygon"?Nx(u):p==="line"?qx(u):Ux(u)}function Hx(u){return u.startsWith("http")?u:`${window.location.origin}${u}`}function Wx(u){const{id:p,sourceLayer:y,url:b,bounds:k,title:P,style:x,service:o,service_type:B,source_type:D,data:M}=u,O=Hx(b),L=B||o||D||"vector";switch(L){case"vtile":case"vector":return Zx(p,y,O,k,P,x);case"raster":return Kx(p,O,k,P,x);case"geojson":return Gx(p,M||O,k,P,x);default:throw new Error(`Unsupported layer service type: ${L}`)}}function ay(u){switch(u){case"polygon":return{type:"polygon",color:"#3388ff",opacity:.5};case"line":return{type:"line",color:"#3388ff",opacity:1};case"point":default:return{type:"point",color:"#3388ff",radius:6,opacity:1}}}function Zx(u,p,y,b,k,P){const x=p||(y.match(/\/vtile\/([^/]+)/)||[])[1],o={type:"vector",tiles:[y],...b&&{bounds:b}},B=P||ay("polygon"),M=sy(B).map((O,L)=>({...O,id:`${u}-${L}`,"source-layer":x||u,source:u}));return{id:u,title:k,source:o,layers:M,visible:!0}}function Kx(u,p,y,b,k){const P={type:"raster",tiles:[p],tileSize:256,...y&&{bounds:y}},x=k||{},o={id:u,type:"raster",source:u,layout:{visibility:"visible"},...x&&{paint:x}};return{id:u,title:b,source:P,layers:[o],visible:!0}}function Gx(u,p,y,b,k){var M;const P={type:"geojson",data:p,...y&&{bounds:y}};let x="point";if(p&&p.features&&p.features.length>0){const O=(M=p.features[0].geometry)==null?void 0:M.type;O==="Polygon"||O==="MultiPolygon"?x="polygon":O==="LineString"||O==="MultiLineString"?x="line":x="point"}const o=k||ay(x),D=sy(o).map((O,L)=>({...O,id:`${u}-${L}`,source:u}));return{id:u,title:b,source:P,layers:D,visible:!0}}function Jx(u){if(!u||u.attrType!=="icon-by-attribute")return[];const p=new Set;return u.default_icon&&p.add(u.default_icon),Array.isArray(u.rules)&&u.rules.forEach(y=>{y.icon&&p.add(y.icon)}),Array.from(p).map(y=>({name:y,url:(u.icon_base_url||"")+y}))}function Xx(u){const p=new Set;function y(b){typeof b=="string"?p.add(b):Array.isArray(b)&&b.forEach(y)}return u&&u["icon-image"]&&y(u["icon-image"]),Array.from(p)}async function ly(u,p){const y=p.map(async({name:b,url:k})=>{const P=await u.loadImage(k);return{name:b,data:P.data}});try{const b=await Promise.all(y);for(const{name:k,data:P}of b)u.hasImage(k)||u.addImage(k,P)}catch(b){console.error("Failed to load icons:",b)}}function Qx(u,p,y="/icons/"){const k=Xx(p).map(P=>({name:P,url:y+P}));return ly(u,k)}async function Us(u,p){const y=Wx(p),b=Jx(p.style);b.length>0&&await ly(u,b),p.layout&&p.layout["icon-image"]&&await Qx(u,p.layout),u.getSource(y.id)||u.addSource(y.id,y.source);for(const k of y.layers)p.visible!==void 0&&(k.layout={...k.layout,visibility:p.visible?"visible":"none"}),u.getLayer(k.id)?u.setLayoutProperty(k.id,"visibility",p.visible?"visible":"none"):await u.addLayer(k);return y}function Qa(u,p){u.getStyle().layers.filter(k=>k.source===p).forEach(k=>{u.removeLayer(k.id)}),u.getSource(p)&&u.removeSource(p)}const Yx={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative"},$x={class:"flex flex-col justify-between h-full pb-5 px-5"},eb={key:0,class:"relative mb-[10px]"},tb={width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0px, -50%)"}},rb={key:1,class:"mb-4"},ib={class:""},nb={class:"space-y-2"},ob={class:"flex items-center gap-[10px] text-gray-500"},sb={class:"dataset-checkbox-container flex"},ab=["onUpdate:modelValue","onChange"],lb={class:"text-sm"},cb=["onClick"],ub=["innerHTML"],hb={key:0,class:"text-sm text-gray-500 text-center py-2"},db={__name:"vs-layers-widget",props:{map:{type:Object,required:!0},history:{type:Boolean,default:!1},config:{type:Object,default:()=>({layers:[],search:!1,allow_toggle_all:!1})},position:{type:String,default:"bottom-left"},hasFilters:{type:Boolean,default:!1}},emits:["set-filter-layer","update:enabledLayerIds"],setup(u,{emit:p}){const y=u,b=p,k=_.ref("");_.computed(()=>ny(y.position));const P=_.ref([]);function x(){const T=new URLSearchParams(window.location.search).get("layers");return T?T.split(","):[]}function o(C){const T=new URLSearchParams(window.location.search);C.length>0?T.set("layers",C.join(",")):T.delete("layers");const U=`${window.location.pathname}?${T.toString()}`;window.history.replaceState({},"",U)}_.onMounted(()=>{let C=[];y.history&&(C=x()),C.length>0?P.value=y.config.layers.map(T=>({...T,visible:C.includes(String(T.id))})):P.value=y.config.layers.map(T=>({...T,visible:T.visible??!1})),P.value.forEach(T=>{T.visible&&Us(y.map,T)}),b("update:enabledLayerIds",M())});const B=_.computed(()=>{if(!k.value)return P.value;const C=k.value.toLowerCase();return P.value.filter(T=>(T.title||T.name||T.label||"").toLowerCase().includes(C))}),D=_.computed(()=>P.value.every(C=>C.visible)),M=()=>P.value.filter(C=>C.visible).map(C=>C.id),O=C=>{C.visible?Us(y.map,C):(Qa(y.map,C.id),b("set-filter-layer",null)),y.map.getStyle().layers.filter(G=>G.source===C.id).forEach(G=>{y.map.setLayoutProperty(G.id,"visibility",C.visible?"visible":"none")}),b("update:enabledLayerIds",M())},L=()=>{const C=!D.value;P.value.forEach(T=>{T.visible=C,C?Us(y.map,T):Qa(y.map,T.id)}),C||b("set-filter-layer",null),b("update:enabledLayerIds",M())};return _.watch(()=>M(),C=>{y.history&&o(C)},{deep:!0}),(C,T)=>(_.openBlock(),_.createElementBlock("div",Yx,[T[2]||(T[2]=_.createElementVNode("div",{class:"p-5 pb-3 flex justify-between items-center"},[_.createElementVNode("h2",{class:"inline-block font-semibold text-lg text-gray-800"},"Шари")],-1)),_.createElementVNode("div",$x,[u.config.search?(_.openBlock(),_.createElementBlock("div",eb,[_.withDirectives(_.createElementVNode("input",{type:"text","onUpdate:modelValue":T[0]||(T[0]=U=>k.value=U),placeholder:"Введіть назву шару...",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none"},null,512),[[_.vModelText,k.value]]),(_.openBlock(),_.createElementBlock("svg",tb,T[1]||(T[1]=[_.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])))])):_.createCommentVNode("",!0),u.config.allow_toggle_all?(_.openBlock(),_.createElementBlock("div",rb,[_.createElementVNode("button",{onClick:L,class:"w-full py-[7px] bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"},_.toDisplayString(D.value?"Вимкнути всі":"Увімкнути всі"),1)])):_.createCommentVNode("",!0),_.createElementVNode("div",ib,[_.createElementVNode("ul",nb,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(B.value,U=>(_.openBlock(),_.createElementBlock("li",{key:U.id,class:"flex flex-wrap justify-between items-center gap-x-2"},[_.createElementVNode("label",ob,[_.createElementVNode("span",sb,[_.withDirectives(_.createElementVNode("input",{class:"dataset-checkbox",type:"checkbox","onUpdate:modelValue":G=>U.visible=G,onChange:()=>O(U)},null,40,ab),[[_.vModelCheckbox,U.visible]])]),_.createElementVNode("span",lb,_.toDisplayString(U.title||U.name||U.label),1)]),U.actions&&U.visible?(_.openBlock(!0),_.createElementBlock(_.Fragment,{key:0},_.renderList(U.actions,G=>(_.openBlock(),_.createElementBlock("div",{key:G.id},[_.createElementVNode("button",{class:"text-sm text-gray-500",onClick:ie=>C.$emit("show-widget",G.widget)},[_.createElementVNode("div",{innerHTML:G.icon},null,8,ub)],8,cb)]))),128)):_.createCommentVNode("",!0)]))),128)),k.value&&B.value.length===0?(_.openBlock(),_.createElementBlock("li",hb," Шарів не знайдено ")):_.createCommentVNode("",!0)])])])]))}},pb={class:"legend-widget flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative"},fb={key:0,class:"p-5 pb-3 flex justify-between items-start gap-[30px]"},mb={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},gb={class:"flex flex-col gap-1"},yb={class:"flex flex-col gap-1 p-5 pt-0"},_b=["innerHTML"],vb={__name:"vs-info-widget",props:{config:{type:Object,required:!0}},setup(u){const p=u,y=_.computed(()=>{var P;return((P=p.config)==null?void 0:P.title)||""}),b=_.computed(()=>{var P;return((P=p.config)==null?void 0:P.content)||""}),k=_.computed(()=>{var P;return((P=p.config)==null?void 0:P.goTo)||[]});return(P,x)=>{var D,M;const o=_.resolveComponent("VsPopover"),B=_.resolveComponent("router-link");return _.openBlock(),_.createElementBlock("div",pb,[y.value||(D=k.value)!=null&&D.length?(_.openBlock(),_.createElementBlock("div",fb,[_.createElementVNode("h2",mb,_.toDisplayString(y.value),1),(M=k.value)!=null&&M.length?(_.openBlock(),_.createBlock(o,{key:0,placement:"bottom"},{reference:_.withCtx(()=>[_.createVNode(o,{trigger:"hover",placement:"right"},{reference:_.withCtx(()=>x[0]||(x[0]=[_.createElementVNode("div",{class:"flex items-center justify-center h-8 w-8 transition-colors rounded-full hover:bg-gray-100 cursor-pointer"},[_.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_.createElementVNode("path",{d:"M4 12H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"}),_.createElementVNode("path",{d:"M4 6H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"}),_.createElementVNode("path",{d:"M4 18H20",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round"})])],-1)])),default:_.withCtx(()=>[x[1]||(x[1]=_.createTextVNode(" Перейти на карту "))]),_:1,__:[1]})]),default:_.withCtx(()=>[_.createElementVNode("div",gb,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(k.value,O=>(_.openBlock(),_.createElementBlock("div",{key:O.label},[O.url?(_.openBlock(),_.createBlock(B,{key:0,to:O.url,class:"text-sm text-gray-800 dark:text-neutral-200 hover:bg-gray-100 hover:text-blue-600 transition-colors rounded px-2 py-1 block"},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(O.label),1)]),_:2},1032,["to"])):_.createCommentVNode("",!0)]))),128))])]),_:1})):_.createCommentVNode("",!0)])):_.createCommentVNode("",!0),_.createElementVNode("div",yb,[_.createElementVNode("div",{innerHTML:b.value},null,8,_b)])])}}},xb=pr(vb,[["__scopeId","data-v-187a97ca"]]),bb={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative overflow-hidden"},wb={key:0,class:"p-5 pb-3 flex justify-between items-center"},Sb={class:"inline-block font-semibold text-lg text-gray-800"},Ab={key:1,class:"flex"},kb={class:"flex items-center mx-[8px]"},Cb={class:"min-h-[34px] max-h-[34px] overflow-hidden min-w-[34px] flex justify-center items-center bg-stone-100 text-stone-800 py-2 px-3 text-sm rounded-lg"},Tb={class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},Eb={class:"flex flex-col justify-between pb-5 px-5 h-full overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},Pb={key:0,class:"text-center"},Ib={key:1,class:"text-red-500"},Mb={key:2},Lb=["innerHTML"],Rb={key:1,class:"flow-root"},Db={class:"-my-3 divide-y divide-gray-100 text-sm"},zb={class:"font-medium text-gray-900"},Bb={class:"text-gray-700 sm:col-span-2"},Vb={key:2,class:"vs-map-card-info__nodata"},cy={__name:"vs-card-widget",props:{config:{type:Object,required:!0},cardValues:{type:Object,required:!0}},emits:["close","content-resize"],setup(u,{emit:p}){const y=u,b=p,k=_.computed(()=>{var G;return((G=y.config)==null?void 0:G.title)||""}),P=_.ref([]),x=_.ref(!1),o=_.ref(null),B=_.ref(0),D=_.computed(()=>B.value+1),M=_.computed(()=>{var G;return((G=y.info)==null?void 0:G.length)||0}),O=_.computed(()=>P.value[B.value]),L=_.computed(()=>{if(!O.value)return{};const{rows:G,columns:ie}=O.value;return!G||!ie?{}:ie.reduce((le,Ie)=>(!Ie.hide&&!["geom","geodata","id"].includes(Ie.name)&&(le[Ie.ua]=G[Ie.name]??"-"),le),{})});async function C(){var G,ie,le;x.value=!0,o.value=null;try{const Ie={id:(G=y.cardValues)==null?void 0:G.id,layer:(ie=y.cardValues)==null?void 0:ie.layer,map:(le=y.cardValues)==null?void 0:le.map},ee=await Br.get("/api/map-format",{params:Ie});P.value[B.value]=ee.data}catch(Ie){o.value=(Ie==null?void 0:Ie.message)||"Помилка запиту"}finally{x.value=!1,await _.nextTick(),b("content-resize")}}function T(){B.value<y.info.length-1&&(B.value+=1,P.value[B.value]||C())}function U(){B.value>0&&(B.value-=1,P.value[B.value]||C())}return _.onMounted(async()=>{await _.nextTick(),C()}),_.watch(()=>y.info,()=>{B.value=0,C(),b("content-resize")},{deep:!0}),_.watch([()=>y.cardValues,()=>y.config],async()=>{await _.nextTick(),C(),b("content-resize")}),(G,ie)=>{var le;return _.openBlock(),_.createElementBlock("div",bb,[k.value?(_.openBlock(),_.createElementBlock("div",wb,[_.createElementVNode("h2",Sb,_.toDisplayString(k.value),1),_.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600 ml-2",onClick:ie[0]||(ie[0]=Ie=>b("close"))},ie[1]||(ie[1]=[_.createElementVNode("svg",{class:"shrink-0 size-4 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[_.createElementVNode("path",{d:"M18 6 6 18"}),_.createElementVNode("path",{d:"m6 6 12 12"})],-1)]))])):_.createCommentVNode("",!0),M.value>1?(_.openBlock(),_.createElementBlock("div",Ab,[_.createElementVNode("button",{type:"button",class:_.normalizeClass([{"opacity-flex items-center justify-between border-b px-[16px] py-[8px]50 pointer-events-none":D.value===1},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"]),onClick:U}," ◀ ",2),_.createElementVNode("div",kb,[_.createElementVNode("span",Cb,_.toDisplayString(D.value),1),ie[2]||(ie[2]=_.createElementVNode("span",{class:"min-h-[34px] flex justify-center items-center text-stone-500 py-2 px-1.5 text-sm"},"з",-1)),_.createElementVNode("span",Tb,_.toDisplayString(M.value),1)]),_.createElementVNode("button",{type:"button",onClick:T,class:_.normalizeClass([{"opacity-50 pointer-events-none":D.value===M.value},"min-h-[34px] min-w-[34px] py-2 px-2.5 inline-flex justify-center items-center gap-x-2 text-sm rounded-lg text-stone-800 hover:bg-stone-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-stone-100"])}," ▶ ",2)])):_.createCommentVNode("",!0),_.createElementVNode("div",Eb,[x.value?(_.openBlock(),_.createElementBlock("div",Pb,"Завантаження даних...")):o.value?(_.openBlock(),_.createElementBlock("div",Ib,"Помилка завантаження даних")):(_.openBlock(),_.createElementBlock("div",Mb,[(le=O.value)!=null&&le.html?(_.openBlock(),_.createElementBlock("div",{key:0,innerHTML:O.value.html,class:"custom-table-html border-b"},null,8,Lb)):Object.keys(L.value).length?(_.openBlock(),_.createElementBlock("div",Rb,[_.createElementVNode("dl",Db,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(L.value,(Ie,ee)=>(_.openBlock(),_.createElementBlock("div",{key:ee,class:"grid grid-cols-1 gap-1 py-3 even:bg-gray-50 sm:grid-cols-3 sm:gap-4"},[_.createElementVNode("dt",zb,_.toDisplayString(ee),1),_.createElementVNode("dd",Bb,_.toDisplayString(Ie),1)]))),128))])])):(_.openBlock(),_.createElementBlock("div",Vb,"Даних не знайдено."))]))])])}}},Ob={class:"size-full flex flex-col bg-white border border-gray-200 shadow-2xs rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},Fb={key:0,class:"p-5 pb-0 items-center"},Nb={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},qb={class:"h-full p-5"},Ub={class:"h-full flex flex-col justify-between space-y-4"},jb={class:"space-y-4"},Hb={key:0,class:"flex gap-x-1 w-full h-2.5 rounded-full overflow-hidden"},Wb=["aria-valuenow"],Zb={class:"text-sm text-gray-500 px-2 w-full py-2 cursor-pointer !flex flex-row items-center rounded-lg group hover:bg-gray-100"},Kb=["for"],Gb={key:0,width:"16",height:"auto",src:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PScwIDAgMTYgMTYnIGZpbGw9J3doaXRlJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxwYXRoIGQ9J00xMi4yMDcgNC43OTNhMSAxIDAgMDEwIDEuNDE0bC01IDVhMSAxIDAgMDEtMS40MTQgMGwtMi0yYTEgMSAwIDAxMS40MTQtMS40MTRMNi41IDkuMDg2bDQuMjkzLTQuMjkzYTEgMSAwIDAxMS40MTQgMHonLz48L3N2Zz4="},Jb=["id","onUpdate:modelValue"],Xb={class:"ms-2 text-gray-800 dark:text-neutral-200"},Qb={key:0,class:"ms-auto text-xs text-gray-500 dark:text-neutral-500"},Yb={__name:"vs-attributre-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0}},setup(u){const p=u,y=_.computed(()=>{var B;return((B=p.config)==null?void 0:B.title)||""}),b=_.ref([]),k=_.computed(()=>p.config.layer.style.rules.some(B=>B.count!==void 0)),P=_.computed(()=>p.config.layer.style.rules.reduce((B,D)=>B+(D.count||0),0)),x=B=>!B||P.value===0?0:Math.round(B/P.value*100),o=()=>{const D=p.config.layer.style.rules.filter((M,O)=>b.value[O]).map(M=>M.id||M.value).join(",");if(p.config.layer.id){const M=p.map.getSource(p.config.layer.id);if(M){const L=M.tiles[0].split("?filter=")[0],C=D?`${L}?filter=${p.config.layer.style.attribute}=${D}`:L;M.setTiles([C])}}};return _.onMounted(()=>{var B;(B=p.config)!=null&&B.layer&&(Us(p.map,p.config.layer),b.value=new Array(p.config.layer.style.rules.length).fill(!1))}),(B,D)=>(_.openBlock(),_.createElementBlock("div",Ob,[y.value?(_.openBlock(),_.createElementBlock("div",Fb,[_.createElementVNode("div",null,[_.createElementVNode("h2",Nb,_.toDisplayString(y.value),1)])])):_.createCommentVNode("",!0),_.createElementVNode("div",qb,[_.createElementVNode("div",Ub,[_.createElementVNode("div",jb,[k.value?(_.openBlock(),_.createElementBlock("div",Hb,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(u.config.layer.style.rules,(M,O)=>(_.openBlock(),_.createElementBlock("div",{key:O,class:"flex flex-col justify-center overflow-hidden text-xs text-white text-center whitespace-nowrap",style:_.normalizeStyle({width:`${x(M.count)}%`,backgroundColor:M.color}),role:"progressbar","aria-valuenow":x(M.count),"aria-valuemin":"0","aria-valuemax":"100"},null,12,Wb))),128))])):_.createCommentVNode("",!0),_.createElementVNode("ul",null,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(u.config.layer.style.rules,(M,O)=>(_.openBlock(),_.createElementBlock("li",{key:O},[_.createElementVNode("div",Zb,[_.createElementVNode("label",{for:`filter-${O}`,class:"flex items-center w-full cursor-pointer"},[_.createElementVNode("div",{class:"w-[18px] h-[18px] border rounded-[4px] flex items-center justify-center",style:_.normalizeStyle({background:b.value[O]?M.color||"#2563eb":"#fff",borderColor:b.value[O]?M.color||"#2563eb":M.color||"#d9d9d9"})},[b.value[O]?(_.openBlock(),_.createElementBlock("img",Gb)):_.createCommentVNode("",!0)],4),_.withDirectives(_.createElementVNode("input",{type:"checkbox",id:`filter-${O}`,"onUpdate:modelValue":L=>b.value[O]=L,onChange:o,class:"hidden",disabled:!1},null,40,Jb),[[_.vModelCheckbox,b.value[O]]]),_.createElementVNode("span",Xb,_.toDisplayString(M.label||M.text),1),k.value?(_.openBlock(),_.createElementBlock("span",Qb,"("+_.toDisplayString(M.count)+")",1)):_.createCommentVNode("",!0)],8,Kb)])]))),128))])])])])]))}},$b={class:"hover:bg-gray-100 rounded-lg flex items-center ml-[20px] py-[8px] px-[8px]"},e1=["for"],t1={class:"custom-checkbox-wrapper"},r1=["id","checked"],i1={class:"custom-checkbox"},n1={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"8",viewBox:"0 0 12 8",fill:"none"},o1={class:"flex items-center justify-between ml-2 w-full"},s1=["title"],a1={key:0,class:"text-xs opacity-60 text-[#4b5563]"},l1={__name:"vs-map-catalog-item",props:{layer:{type:Object,required:!0},map:{type:Object,default:()=>null},selectedLayers:{type:Array,default:()=>[]}},emits:["select","remove"],setup(u,{emit:p}){const y=u,b=p,k=_.computed(()=>y.selectedLayers.some(o=>o.id===y.layer.id)),P=o=>Intl.NumberFormat("uk",{notation:"compact"}).format(o),x=o=>{b(o?"select":"remove",y.layer)};return(o,B)=>{var D,M,O,L,C;return _.openBlock(),_.createElementBlock("div",$b,[_.createElementVNode("label",{class:"flex items-center w-full cursor-pointer",for:u.layer.id},[_.createElementVNode("div",t1,[_.createElementVNode("input",{id:u.layer.id,type:"checkbox",checked:k.value,onChange:B[0]||(B[0]=T=>x(T.target.checked)),class:"custom-checkbox-input"},null,40,r1),_.createElementVNode("div",i1,[k.value?(_.openBlock(),_.createElementBlock("svg",n1,B[1]||(B[1]=[_.createElementVNode("path",{d:"M10.6663 1L4.24967 7.41667L1.33301 4.5",stroke:"#fff","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):_.createCommentVNode("",!0)])]),_.createElementVNode("div",o1,[_.createElementVNode("div",{class:"whitespace-nowrap text text-ellipsis max-w-[260px] overflow-hidden text-[13px] text-[#4b5563]",title:(D=u.layer)==null?void 0:D.name},_.toDisplayString(((M=u.layer)==null?void 0:M.name)||((O=u.layer)==null?void 0:O.title)),9,s1),isNaN(P((L=u.layer)==null?void 0:L.count))?_.createCommentVNode("",!0):(_.openBlock(),_.createElementBlock("div",a1,_.toDisplayString(P((C=u.layer)==null?void 0:C.count)),1))])],8,e1)])}}},c1=pr(l1,[["__scopeId","data-v-b96f3537"]]),u1={},h1={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-zoom-in"};function d1(u,p){return _.openBlock(),_.createElementBlock("svg",h1,p[0]||(p[0]=[_.createElementVNode("circle",{cx:"11",cy:"11",r:"8"},null,-1),_.createElementVNode("line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"},null,-1),_.createElementVNode("line",{x1:"11",x2:"11",y1:"8",y2:"14"},null,-1),_.createElementVNode("line",{x1:"8",x2:"14",y1:"11",y2:"11"},null,-1)]))}const p1=pr(u1,[["render",d1]]),f1={},m1={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-info"};function g1(u,p){return _.openBlock(),_.createElementBlock("svg",m1,p[0]||(p[0]=[_.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),_.createElementVNode("path",{d:"M12 16v-4"},null,-1),_.createElementVNode("path",{d:"M12 8h.01"},null,-1)]))}const y1=pr(f1,[["render",g1]]),_1={},v1={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-table"};function x1(u,p){return _.openBlock(),_.createElementBlock("svg",v1,p[0]||(p[0]=[_.createElementVNode("path",{d:"M12 3v18"},null,-1),_.createElementVNode("rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"},null,-1),_.createElementVNode("path",{d:"M3 9h18"},null,-1),_.createElementVNode("path",{d:"M3 15h18"},null,-1)]))}const b1=pr(_1,[["render",x1]]),w1={},S1={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-trash2"};function A1(u,p){return _.openBlock(),_.createElementBlock("svg",S1,p[0]||(p[0]=[_.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const k1=pr(w1,[["render",A1]]),C1={},T1={xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-more-vertical text-gray-600"};function E1(u,p){return _.openBlock(),_.createElementBlock("svg",T1,p[0]||(p[0]=[_.createElementVNode("circle",{cx:"12",cy:"12",r:"1"},null,-1),_.createElementVNode("circle",{cx:"12",cy:"5",r:"1"},null,-1),_.createElementVNode("circle",{cx:"12",cy:"19",r:"1"},null,-1)]))}const P1=pr(C1,[["render",E1]]),I1={},M1={width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function L1(u,p){return _.openBlock(),_.createElementBlock("svg",M1,p[0]||(p[0]=[_.createElementVNode("path",{d:"M1 9L5 5L1 1",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const R1=pr(I1,[["render",L1]]);var cc={exports:{}},D1=cc.exports,Sm;function z1(){return Sm||(Sm=1,function(u,p){(function(y,b){b(p)})(D1,function(y){var b,k,P="smooth-dnd-container-instance",x="smooth-dnd-draggable-wrapper",o="animated",B="__smooth_dnd_draggable_translation_value",D="__smooth_dnd_draggable_visibility_value",M="smooth-dnd-ghost",O="smooth-dnd-container",L="smooth-dnd-extra-size-for-insertion",C="smooth-dnd-stretcher-element",T="smooth-dnd-stretcher-instance",U="smooth-dnd-disable-touch-action",G="smooth-dnd-no-user-select",ie="smooth-dnd-prevent-auto-scroll-class",le="smooth-dnd-drop-preview-default-class",Ie="smooth-dnd-drop-preview-inner-class",ee="smooth-dnd-drop-preview-constant-class",me="smooth-dnd-drop-preview-flex-container-class",Le=Object.freeze({containerInstance:P,defaultGroupName:"@@smooth-dnd-default-group@@",wrapperClass:x,defaultGrabHandleClass:"smooth-dnd-default-grap-handle",animationClass:o,translationValue:B,visibilityValue:D,ghostClass:M,containerClass:O,extraSizeForInsertion:L,stretcherElementClass:C,stretcherElementInstance:T,isDraggableDetached:"smoth-dnd-is-draggable-detached",disbaleTouchActions:U,noUserSelectClass:G,preventAutoScrollClass:ie,dropPlaceholderDefaultClass:le,dropPlaceholderInnerClass:Ie,dropPlaceholderWrapperClass:ee,dropPlaceholderFlexContainerClass:me}),qe={groupName:void 0,behaviour:"move",orientation:"vertical",getChildPayload:void 0,animationDuration:250,autoScrollEnabled:!0,shouldAcceptDrop:void 0,shouldAnimateDrop:void 0};function rt(ce){return(rt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ue){return typeof ue}:function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue})(ce)}function St(ce,ue,de){return ue in ce?Object.defineProperty(ce,ue,{value:de,enumerable:!0,configurable:!0,writable:!0}):ce[ue]=de,ce}function yt(ce){return function(ue){if(Array.isArray(ue)){for(var de=0,ve=new Array(ue.length);de<ue.length;de++)ve[de]=ue[de];return ve}}(ce)||function(ue){if(Symbol.iterator in Object(ue)||Object.prototype.toString.call(ue)==="[object Arguments]")return Array.from(ue)}(ce)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(k=b||(b={})).x="x",k.y="y",k.xy="xy";function ct(ce,ue,de){return de==="x"?{left:Math.max(ce.left,ue.left),top:ce.top,right:Math.min(ce.right,ue.right),bottom:ce.bottom}:{left:ce.left,top:Math.max(ce.top,ue.top),right:ce.right,bottom:Math.min(ce.bottom,ue.bottom)}}function _t(ce){var ue=window.getComputedStyle(ce),de=ue.overflow;if(de==="auto"||de==="scroll")return b.xy;var ve=ue["overflow-x"],Ee=ve==="auto"||ve==="scroll",Ve=ue["overflow-y"],at=Ve==="auto"||Ve==="scroll";return Ee&&at?b.xy:Ee?b.x:at?b.y:null}function qt(ce,ue){var de=window.getComputedStyle(ce),ve=de.overflow,Ee=de["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||Ee==="auto"||Ee==="scroll"}var Qt=function(ce,ue){return{left:Math.max(ce.left,ue.left),top:Math.max(ce.top,ue.top),right:Math.min(ce.right,ue.right),bottom:Math.min(ce.bottom,ue.bottom)}},xr=function(ce){var ue=ce.getBoundingClientRect(),de={left:ue.left,right:ue.right,top:ue.top,bottom:ue.bottom};if(ti(ce,"x")&&!gr(ce,"x")){var ve=de.right-de.left;de.right=de.right+ce.scrollWidth-ve}if(ti(ce,"y")&&!gr(ce,"y")){var Ee=de.bottom-de.top;de.bottom=de.bottom+ce.scrollHeight-Ee}return de},gr=function(ce,ue){var de=window.getComputedStyle(ce),ve=de.overflow,Ee=de["overflow-".concat(ue)];return ve==="auto"||ve==="scroll"||ve==="hidden"||Ee==="auto"||Ee==="scroll"||Ee==="hidden"},ti=function(ce,ue){return ue==="x"?ce.scrollWidth>ce.clientWidth:ce.scrollHeight>ce.clientHeight},ar=function(ce,ue){var de=ce,ve=ue||xr(ce);for(de=ce.parentElement;de;)ti(de,"x")&&gr(de,"x")&&(ve=ct(ve,de.getBoundingClientRect(),"x")),ti(de,"y")&&gr(de,"y")&&(ve=ct(ve,de.getBoundingClientRect(),"y")),de=de.parentElement;return ve},Zi=function(ce,ue){for(var de=ce;de;){if(de[P]){var ve=function(){var Ee=de[P];if(ue.some(function(Ve){return Ve===Ee}))return{v:Ee}}();if(rt(ve)==="object")return ve.v}de=de.parentElement}return null},Nr=function(ce,ue){for(var de=ce;de;){if(de.matches(ue))return de;de=de.parentElement}return null},Ki=function(ce,ue){return-1<ce.className.split(" ").map(function(de){return de}).indexOf(ue)},fr=function(ce,ue){if(ce){var de=ce.className.split(" ").filter(function(ve){return ve});de.indexOf(ue)===-1&&(de.unshift(ue),ce.className=de.join(" "))}},on=function(ce,ue){if(ce){var de=ce.className.split(" ").filter(function(ve){return ve&&ve!==ue});ce.className=de.join(" ")}},Ti=function(ce,ue){return ce.removeChild(ce.children[ue])},Ur=function(ce,ue,de){de>=ce.children.length?ce.appendChild(ue):ce.insertBefore(ue,ce.children[de])},Bi=function(){window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():window.document.selection&&window.document.selection.empty()},ri=function(ce){if(ce){var ue=window.getComputedStyle(ce);if(ue)return ue.cursor}return null};function Gi(ce){return!(ce.bottom<=ce.top||ce.right<=ce.left)}function Vi(ce){var ue=ce.element,de=ce.draggables;return function(ve,Ee){var Ve=ve,at=Ve.removedIndex,Je=Ve.addedIndex,nt=Ve.droppedElement,Be=null;if(at!==null&&(Be=Ti(ue,at),de.splice(at,1)),Je!==null){var Ke=window.document.createElement("div");Ke.className="".concat(x),Ke.appendChild(Be&&Be.firstElementChild?Be.firstElementChild:nt),Ur(ue,Ke,Je),Je>=de.length?de.push(Ke):de.splice(Je,0,Ke)}Ee&&Ee(ve)}}var Cn=Object.freeze({domDropHandler:Vi,reactDropHandler:function(){return{handler:function(){return function(ce,ue){ue&&ue(ce)}}}}}),Gr={size:"offsetWidth",distanceToParent:"offsetLeft",translate:"transform",begin:"left",end:"right",dragPosition:"x",scrollSize:"scrollWidth",offsetSize:"offsetWidth",scrollValue:"scrollLeft",scale:"scaleX",setSize:"width",setters:{translate:function(ce){return"translate3d(".concat(ce,"px, 0, 0)")}}},fi={size:"offsetHeight",distanceToParent:"offsetTop",translate:"transform",begin:"top",end:"bottom",dragPosition:"y",scrollSize:"scrollHeight",offsetSize:"offsetHeight",scrollValue:"scrollTop",scale:"scaleY",setSize:"height",setters:{translate:function(ce){return"translate3d(0,".concat(ce,"px, 0)")}}};function Jr(ce,ue,de){ce[L]=0;var ve=function(Be){return{get:function(Ke,Ye){return Ke[Be[Ye]||Ye]},set:function(Ke,Ye,ft){Ke[Be[Ye]]=Be.setters[Ye]?Be.setters[Ye](ft):ft}}}(ue==="horizontal"?Gr:fi),Ee={translation:0};function Ve(){at(ce),function(Be){var Ke=Be.getBoundingClientRect();Ee.scaleX=Be.offsetWidth?(Ke.right-Ke.left)/Be.offsetWidth:1,Ee.scaleY=Be.offsetHeight?(Ke.bottom-Ke.top)/Be.offsetHeight:1}(ce)}function at(Be){Ee.rect=xr(Be);var Ke=ar(Be,Ee.rect);Gi(Ke)&&(Ee.lastVisibleRect=Ee.visibleRect),Ee.visibleRect=Ke}function Je(Be){var Ke=Be;if(Ke.tagName){var Ye=Ke.getBoundingClientRect();return ue==="vertical"?Ye.bottom-Ye.top:Ye.right-Ye.left}return ve.get(Be,"size")*ve.get(Ee,"scale")}function nt(Be){return ve.get(Be,"dragPosition")}return window.addEventListener("resize",function(){at(ce)}),setTimeout(function(){Ve()},10),{getSize:Je,getContainerRectangles:function(){return{rect:Ee.rect,visibleRect:Ee.visibleRect,lastVisibleRect:Ee.lastVisibleRect}},getBeginEndOfDOMRect:function(Be){return{begin:ve.get(Be,"begin"),end:ve.get(Be,"end")}},getBeginEndOfContainer:function(){return{begin:ve.get(Ee.rect,"begin")+Ee.translation,end:ve.get(Ee.rect,"end")+Ee.translation}},getBeginEndOfContainerVisibleRect:function(){return{begin:ve.get(Ee.visibleRect,"begin")+Ee.translation,end:ve.get(Ee.visibleRect,"end")+Ee.translation}},getBeginEnd:function(Be){var Ke=function(Ye){return(ve.get(Ye,"distanceToParent")+(Ye[B]||0))*ve.get(Ee,"scale")}(Be)+(ve.get(Ee.rect,"begin")+Ee.translation)-ve.get(ce,"scrollValue");return{begin:Ke,end:Ke+Je(Be)*ve.get(Ee,"scale")}},getAxisValue:nt,setTranslation:function(Be,Ke){Ke?ve.set(Be.style,"translate",Ke):Be.style.removeProperty("transform"),Be[B]=Ke},getTranslation:function(Be){return Be[B]},setVisibility:function(Be,Ke){Be[D]!==void 0&&Be[D]===Ke||(Ke?Be.style.removeProperty("visibility"):Be.style.visibility="hidden",Be[D]=Ke)},isVisible:function(Be){return Be[D]===void 0||Be[D]},isInVisibleRect:function(Be,Ke){var Ye=Ee.visibleRect,ft=Ye.left,ht=Ye.top,ot=Ye.right,Kt=Ye.bottom;Kt-ht<2&&(Kt=ht+30);var pt=Ee.rect;return ue==="vertical"?Be>pt.left&&Be<pt.right&&ht<Ke&&Ke<Kt:ft<Be&&Be<ot&&Ke>pt.top&&Ke<pt.bottom},setSize:function(Be,Ke){ve.set(Be,"setSize",Ke)},getTopLeftOfElementBegin:function(Be){var Ke=0;return{top:ue==="horizontal"?(Ke=Be,Ee.rect.top):(Ke=Ee.rect.left,Be),left:Ke}},getScrollSize:function(Be){return ve.get(Be,"scrollSize")},getScrollValue:function(Be){return ve.get(Be,"scrollValue")},setScrollValue:function(Be,Ke){return ve.set(Be,"scrollValue",Ke)},invalidate:Ve,invalidateRects:function(){at(ce)},getPosition:function(Be){return nt(Be)},setBegin:function(Be,Ke){ve.set(Be,"begin",Ke)}}}function it(ce,ue,de){var ve,Ee,Ve,at=de.left,Je=de.right,nt=de.top,Be=de.bottom,Ke=ce.x,Ye=ce.y;if(Ke<at||Je<Ke||Ye<nt||Be<Ye)return null;Ve=ue==="x"?(ve=at,Ee=Je,Ke):(ve=nt,Ee=Be,Ye);var ft=Ee-ve,ht=400<ft?100:ft/4;return Ee-Ve<ht?{direction:"end",speedFactor:(ht-(Ee-Ve))/ht}:Ve-ve<ht?{direction:"begin",speedFactor:(ht-(Ve-ve))/ht}:null}function vt(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"y",de=null,ve=null,Ee=null,Ve=null;return{animate:function(at,Je){Ee=at,Ve=Je,function nt(){de===null&&(de=requestAnimationFrame(function(Be){ve===null&&(ve=Be);var Ke=Be-ve;ve=Be;var Ye,ft,ht,ot=Ke/1e3*Ve;ft=ue,ht=ot=Ee==="begin"?0-ot:ot,(Ye=ce)&&(Ye!==window?ft==="x"?Ye.scrollLeft+=ht:Ye.scrollTop+=ht:ft==="x"?Ye.scrollBy(ht,0):Ye.scrollBy(0,ht)),de=null,nt()}))}()},stop:function(){de!==null&&(cancelAnimationFrame(de),de=null),ve=null}}}function At(ce){return function(){return ar(ce,ce.getBoundingClientRect())}}var Mt,Ht,Et,zt=function(ce){var ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1500,de=ce.reduce(function(ve,Ee){var Ve=function(at){for(var Je=[],nt=at.element;nt;){var Be=_t(nt);if(Be&&!Ki(nt,ie)){var Ke={};switch(Be){case b.xy:Ke.x={animator:vt(nt,"x")},Ke.y={animator:vt(nt,"y")};break;case b.x:Ke.x={animator:vt(nt,"x")};break;case b.y:Ke.y={animator:vt(nt,"y")}}Je.push({axisAnimations:Ke,getRect:At(nt),scrollerElement:nt})}nt=nt.parentElement}return Je}(Ee).filter(function(at){return!ve.find(function(Je){return Je.scrollerElement===at.scrollerElement})});return[].concat(yt(ve),yt(Ve))},[]);return function(ve){var Ee=ve.draggableInfo;if(ve.reset)de.forEach(function(Je){Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop()});else if(Ee){(function(Je,nt){Je.forEach(function(Be){var Ke=Be.axisAnimations,Ye=(0,Be.getRect)();Ke.x&&(Ke.x.scrollParams=it(nt,"x",Ye),Be.cachedRect=Ye),Ke.y&&(Ke.y.scrollParams=it(nt,"y",Ye),Be.cachedRect=Ye)})})(de,Ee.mousePosition),de.forEach(function(Je){var nt=Je.axisAnimations,Be=nt.x,Ke=nt.y;if(Be)if(Be.scrollParams){var Ye=Be.scrollParams,ft=Ye.direction,ht=Ye.speedFactor;Be.animator.animate(ft,ht*ue)}else Be.animator.stop();if(Ke)if(Ke.scrollParams){var ot=Ke.scrollParams,Kt=ot.direction,pt=ot.speedFactor;Ke.animator.animate(Kt,pt*ue)}else Ke.animator.stop()});var Ve=de.filter(function(Je){return Je.cachedRect});if(Ve.length&&1<Ve.length){var at=function(Je,nt){for(var Be=document.elementFromPoint(nt.x,nt.y);Be;){var Ke=Je.find(function(Ye){return Ye.scrollerElement===Be});if(Ke)return Ke;Be=Be.parentElement}return null}(Ve,Ee.mousePosition);at&&Ve.forEach(function(Je){Je!==at&&(Je.axisAnimations.x&&Je.axisAnimations.x.animator.stop(),Je.axisAnimations.y&&Je.axisAnimations.y.animator.stop())})}}}};typeof window<"u"&&((Mt=Element)&&Mt.prototype&&!Mt.prototype.matches&&(Mt.prototype.matches=Mt.prototype.matchesSelector||Mt.prototype.mozMatchesSelector||Mt.prototype.msMatchesSelector||Mt.prototype.oMatchesSelector||Mt.prototype.webkitMatchesSelector||function(ce){for(var ue=(this.document||this.ownerDocument).querySelectorAll(ce),de=ue.length;0<=--de&&ue.item(de)!==this;);return-1<de}),(Ht=Node||Element)&&Ht.prototype&&Ht.prototype.firstElementChild==null&&Object.defineProperty(Ht.prototype,"firstElementChild",{get:function(){for(var ce,ue=this.childNodes,de=0;ce=ue[de++];)if(ce.nodeType===1)return ce;return null}}),Array.prototype.some||(Array.prototype.some=function(ce){if(this==null)throw new TypeError("Array.prototype.some called on null or undefined");if(typeof ce!="function")throw new TypeError;for(var ue=Object(this),de=ue.length>>>0,ve=2<=arguments.length?arguments[1]:void 0,Ee=0;Ee<de;Ee++)if(Ee in ue&&ce.call(ve,ue[Ee],Ee,ue))return!0;return!1}));var or={overflow:"hidden",display:"block"},Jt={height:"100%",display:"table-cell","vertical-align":"top"},Ir=(St(Et={},".".concat(O),{position:"relative","min-height":"30px","min-width":"30px"}),St(Et,".".concat(O,".horizontal"),{display:"table"}),St(Et,".".concat(O,".horizontal > .").concat(C),{display:"inline-block"}),St(Et,".".concat(O,".horizontal > .").concat(x),Jt),St(Et,".".concat(O,".vertical > .").concat(x),or),St(Et,".".concat(x),{"box-sizing":"border-box"}),St(Et,".".concat(x,".horizontal"),Jt),St(Et,".".concat(x,".vertical"),or),St(Et,".".concat(x,".animated"),{transition:"transform ease"}),St(Et,".".concat(M),{"box-sizing":"border-box"}),St(Et,".".concat(M,".animated"),{transition:"all ease-in-out"}),St(Et,".".concat(M," *"),{"pointer-events":"none"}),St(Et,".".concat(U," *"),{"touch-action":"none","-ms-touch-action":"none"}),St(Et,".".concat(G),{"-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none"}),St(Et,".".concat(Ie),{flex:"1"}),St(Et,".".concat(O,".horizontal > .").concat(ee),{height:"100%",overflow:"hidden",display:"table-cell","vertical-align":"top"}),St(Et,".".concat(O,".vertical > .").concat(ee),{overflow:"hidden",display:"block",width:"100%"}),St(Et,".".concat(me),{width:"100%",height:"100%",display:"flex","justify-content":"stretch","align-items":"stretch"}),St(Et,".".concat(le),{"background-color":"rgba(150, 150, 150, 0.1)",border:"1px solid #ccc"}),Et);function ii(ce){return Object.keys(ce).reduce(function(ue,de){var ve=ce[de];return rt(ve)==="object"?"".concat(ue).concat(de,"{").concat(ii(ve),"}"):"".concat(ue).concat(de,":").concat(ve,";")},"")}function Vr(ce){if(ce&&typeof window<"u"){var ue=window.document.head||window.document.getElementsByTagName("head")[0],de=window.document.createElement("style"),ve=ii({"body *":{cursor:"".concat(ce," !important")}});return de.type="text/css",de.styleSheet?de.styleSheet.cssText=ve:de.appendChild(window.document.createTextNode(ve)),ue.appendChild(de),de}return null}var ni,mi,Mi=["mousedown","touchstart"],gi=["mousemove","touchmove"],dr=["mouseup","touchend"],Wt=null,Pt=null,Bt=null,xt=null,ke=[],K=!1,Q=!1,te=!1,he=!1,xe=null,Y=null,Pe=null,Ae=null,Te=(ni=null,mi=!1,{start:function(){mi||(mi=!0,function ce(){ni=requestAnimationFrame(function(){Wt.forEach(function(ue){return ue.layout.invalidateRects()}),setTimeout(function(){ni!==null&&ce()},50)})}())},stop:function(){ni!==null&&(cancelAnimationFrame(ni),ni=null),mi=!1}}),ze=typeof window<"u"&&!!(window.navigator.userAgent.match(/Android/i)||window.navigator.userAgent.match(/webOS/i)||window.navigator.userAgent.match(/iPhone/i)||window.navigator.userAgent.match(/iPad/i)||window.navigator.userAgent.match(/iPod/i)||window.navigator.userAgent.match(/BlackBerry/i)||window.navigator.userAgent.match(/Windows Phone/i));function Me(){typeof window<"u"&&Mi.forEach(function(ce){window.document.addEventListener(ce,Zt,{passive:!1})})}function Qe(){return xt&&xt.ghostParent?xt.ghostParent:Pt&&Pt.parentElement||window.document.body}var ut,gt,It,jt,Vt,Ue,cr=(jt=null,Vt=1,Ue=5,function(ce,ue,de){ut=Li(ce),It=de,(gt=typeof ue=="number"?ue:ze?200:0)&&(jt=setTimeout(Rt,gt)),gi.forEach(function(ve){return window.document.addEventListener(ve,Yt)},{passive:!1}),dr.forEach(function(ve){return window.document.addEventListener(ve,sr)},{passive:!1}),window.document.addEventListener("drag",Ot,{passive:!1})});function Yt(ce){var ue=Li(ce),de=ue.clientX,ve=ue.clientY;if(gt)(Math.abs(ut.clientX-de)>Ue||Math.abs(ut.clientY-ve)>Ue)&&Xe();else if(Math.abs(ut.clientX-de)>Vt||Math.abs(ut.clientY-ve)>Vt)return Rt()}function sr(){Xe()}function Ot(){Xe()}function Xe(){clearTimeout(jt),gi.forEach(function(ce){return window.document.removeEventListener(ce,Yt)},{passive:!1}),dr.forEach(function(ce){return window.document.removeEventListener(ce,sr)},{passive:!1}),window.document.removeEventListener("drag",Ot,{passive:!1})}function Rt(){clearTimeout(jt),Xe(),It()}function Zt(ce){var ue=Li(ce);if(!K&&(ue.button===void 0||ue.button===0)&&(Pt=Nr(ue.target,"."+x))){var de=Nr(Pt,"."+O),ve=ke.filter(function(Je){return Je.element===de})[0],Ee=ve.getOptions().dragHandleSelector,Ve=ve.getOptions().nonDragAreaSelector,at=!0;Ee&&!Nr(ue.target,Ee)&&(at=!1),Ve&&Nr(ue.target,Ve)&&(at=!1),at&&(ve.layout.invalidate(),fr(window.document.body,U),fr(window.document.body,G),window.document.addEventListener("mouseup",function Je(){on(window.document.body,U),on(window.document.body,G),window.document.removeEventListener("mouseup",Je)})),at&&cr(ue,ve.getOptions().dragBeginDelay,function(){Bi(),Zn(ue,ri(ce.target)),gi.forEach(function(Je){window.document.addEventListener(Je,Ar,{passive:!1})}),dr.forEach(function(Je){window.document.addEventListener(Je,Tn,{passive:!1})})})}}function Ar(ce){ce.preventDefault();var ue=Li(ce);if(xt){var de=xt.container.getOptions();de.behaviour==="contain"?function(ve){var Ee,Ve,at,Je,nt=ve.clientX,Be=ve.clientY,Ke=1<arguments.length&&arguments[1]!==void 0?arguments[1]:"vertical",Ye=xt.container.layout.getBeginEndOfContainerVisibleRect();Je=Ke==="vertical"?(Ee=Be,Ve="y",at="top",xt.size.offsetHeight):(Ee=nt,Ve="x",at="left",xt.size.offsetWidth);var ft=Ye.begin,ht=Ye.end-Je,ot=Math.max(ft,Math.min(ht,Ee+Bt.positionDelta[at]));Bt.topLeft[Ve]=ot,xt.position[Ve]=Math.max(Ye.begin,Math.min(Ye.end,Ee+Bt.centerDelta[Ve])),xt.mousePosition[Ve]=Math.max(Ye.begin,Math.min(Ye.end,Ee)),xt.position[Ve]<Ye.begin+Je/2&&(xt.position[Ve]=Ye.begin+2),xt.position[Ve]>Ye.end-Je/2&&(xt.position[Ve]=Ye.end-2)}(ue,de.orientation):Pe?Pe==="y"?(Bt.topLeft.y=ue.clientY+Bt.positionDelta.top,xt.position.y=ue.clientY+Bt.centerDelta.y,xt.mousePosition.y=ue.clientY):Pe==="x"&&(Bt.topLeft.x=ue.clientX+Bt.positionDelta.left,xt.position.x=ue.clientX+Bt.centerDelta.x,xt.mousePosition.x=ue.clientX):(Bt.topLeft.x=ue.clientX+Bt.positionDelta.left,Bt.topLeft.y=ue.clientY+Bt.positionDelta.top,xt.position.x=ue.clientX+Bt.centerDelta.x,xt.position.y=ue.clientY+Bt.centerDelta.y,xt.mousePosition.x=ue.clientX,xt.mousePosition.y=ue.clientY),uo(),(he=!xe(xt))&&co()}else Zn(ue,ri(ce.target))}var mr,yi,Gt,Oi,co=(mr=yn,Gt=!(yi=20),Oi=null,function(){for(var ce=arguments.length,ue=new Array(ce),de=0;de<ce;de++)ue[de]=arguments[de];Oi&&clearTimeout(Oi),Gt&&!Oi?mr.call.apply(mr,[null].concat(ue)):Oi=setTimeout(function(){Oi=null,mr.call.apply(mr,[null].concat(ue))},yi)});function yn(){he&&(he=!1,_n(xt,Wt))}function Tn(){gi.forEach(function(ce){window.document.removeEventListener(ce,Ar,{passive:!1})}),dr.forEach(function(ce){window.document.removeEventListener(ce,Tn,{passive:!1})}),Y({reset:!0}),Ae&&(function(ce){ce&&typeof window<"u"&&(window.document.head||window.document.getElementsByTagName("head")[0]).removeChild(ce)}(Ae),Ae=null),xt&&(Te.stop(),yn(),te=!0,function(ce){function ue(){on(Bt.ghost,"animated"),Bt.ghost.style.transitionDuration=null,Qe().removeChild(Bt.ghost),ce()}function de(pt,Ut,br){var ho=pt.top,Rn=pt.left;fr(Bt.ghost,"animated"),br&&fr(Bt.ghost.firstElementChild,br),Bt.topLeft.x=Rn,Bt.topLeft.y=ho,uo(Ut),setTimeout(function(){ue()},Ut+20)}function ve(pt,Ut){fr(Bt.ghost,"animated"),uo(pt,.9,!0),setTimeout(function(){Ut()},pt+20)}if(xt.targetElement){var Ee=ke.filter(function(pt){return pt.element===xt.targetElement})[0];!(Kt=Ee.getOptions()).shouldAnimateDrop||Kt.shouldAnimateDrop(xt.container.getOptions(),xt.payload)?de(Ee.getDragResult().shadowBeginEnd.rect,Math.max(150,Ee.getOptions().animationDuration/2),Ee.getOptions().dropClass):ue()}else{var Ve=ke.filter(function(pt){return pt===xt.container})[0];if(Ve){var at=Ve.getOptions(),Je=at.behaviour,nt=at.removeOnDropOut;if(Je!=="move"&&Je!=="contain"||!Q&&nt||!Ve.getDragResult())ve(Ve.getOptions().animationDuration,ue);else{var Be=Ve.layout.getContainerRectangles();if(!Gi(Be.visibleRect)&&Gi(Be.lastVisibleRect))de({top:Be.lastVisibleRect.top,left:Be.lastVisibleRect.left},Ve.getOptions().animationDuration,Ve.getOptions().dropClass);else{var Ke=Ve.getDragResult(),Ye=Ke.removedIndex,ft=Ke.elementSize,ht=Ve.layout;Ve.getTranslateCalculator({dragResult:{removedIndex:Ye,addedIndex:Ye,elementSize:ft,pos:void 0,shadowBeginEnd:void 0}});var ot=0<Ye?ht.getBeginEnd(Ve.draggables[Ye-1]).end:ht.getBeginEndOfContainer().begin;de(ht.getTopLeftOfElementBegin(ot),Ve.getOptions().animationDuration,Ve.getOptions().dropClass)}}}else ve(qe.animationDuration,ue)}var Kt}(function(){yr(K=!1);for(var ce=Wt||[],ue=ce.shift();ue!==void 0;)ue.handleDrop(xt),ue=ce.shift();xe=Pe=xt=Bt=Pt=Wt=null,te=!1}))}function Li(ce){return ce.touches?ce.touches[0]:ce}function _n(ce,ue){var de=!1;ue.forEach(function(ve){var Ee=ve.handleDrag(ce);de=!!Ee.containerBoxChanged||!1,Ee.containerBoxChanged=!1}),de&&(de=!1,requestAnimationFrame(function(){ke.forEach(function(ve){ve.layout.invalidateRects(),ve.onTranslated()})}))}function Er(ce){var ue=ce,de=null;return function(ve){return!(de!==null||!K||te)&&(de=requestAnimationFrame(function(){K&&!te&&(_n(ve,ue),Y({draggableInfo:ve})),de=null}),!0)}}function _i(ce,ue){return ce.getOptions().autoScrollEnabled?zt(ue,ce.getScrollMaxSpeed()):function(de){return null}}function yr(ce){ke.forEach(function(ue){var de=ce?ue.getOptions().onDragStart:ue.getOptions().onDragEnd;if(de){var ve={isSource:ue===xt.container,payload:xt.payload};ue.isDragRelevant(xt.container,xt.payload)?ve.willAcceptDrop=!0:ve.willAcceptDrop=!1,de(ve)}})}function Zn(ce,ue){if(Pt!==null){K=!0;var de=ke.filter(function(ve){return Pt.parentElement===ve.element})[0];de.setDraggables(),Pe=de.getOptions().lockAxis?de.getOptions().lockAxis.toLowerCase():null,xt=function(ve){var Ee=ke.filter(function(nt){return ve.parentElement===nt.element})[0],Ve=Ee.draggables.indexOf(ve),at=Ee.getOptions().getGhostParent,Je=ve.getBoundingClientRect();return{container:Ee,element:ve,size:{offsetHeight:Je.bottom-Je.top,offsetWidth:Je.right-Je.left},elementIndex:Ve,payload:Ee.getOptions().getChildPayload?Ee.getOptions().getChildPayload(Ve):void 0,targetElement:null,position:{x:0,y:0},groupName:Ee.getOptions().groupName,ghostParent:at?at():null,invalidateShadow:null,mousePosition:null,relevantContainers:null}}(Pt),Bt=function(ve,Ee,Ve,at){var Je=Ee.x,nt=Ee.y,Be=ve.getBoundingClientRect(),Ke=Be.left,Ye=Be.top,ft=Be.right,ht=Be.bottom,ot=Qt(Ve.layout.getContainerRectangles().visibleRect,Be),Kt=ot.left+(ot.right-ot.left)/2,pt=ot.top+(ot.bottom-ot.top)/2,Ut=ve.cloneNode(!0);return Ut.style.zIndex="1000",Ut.style.boxSizing="border-box",Ut.style.position="fixed",Ut.style.top="0px",Ut.style.left="0px",Ut.style.transform=null,Ut.style.removeProperty("transform"),Ve.shouldUseTransformForGhost()?Ut.style.transform="translate3d(".concat(Ke,"px, ").concat(Ye,"px, 0)"):(Ut.style.top="".concat(Ye,"px"),Ut.style.left="".concat(Ke,"px")),Ut.style.width=ft-Ke+"px",Ut.style.height=ht-Ye+"px",Ut.style.overflow="visible",Ut.style.transition=null,Ut.style.removeProperty("transition"),Ut.style.pointerEvents="none",Ut.style.userSelect="none",Ve.getOptions().dragClass?setTimeout(function(){fr(Ut.firstElementChild,Ve.getOptions().dragClass);var br=window.getComputedStyle(Ut.firstElementChild).cursor;Ae=Vr(br)}):Ae=Vr(at),fr(Ut,Ve.getOptions().orientation||"vertical"),fr(Ut,M),{ghost:Ut,centerDelta:{x:Kt-Je,y:pt-nt},positionDelta:{left:Ke-Je,top:Ye-nt},topLeft:{x:Ke,y:Ye}}}(Pt,{x:ce.clientX,y:ce.clientY},xt.container,ue),xt.position={x:ce.clientX+Bt.centerDelta.x,y:ce.clientY+Bt.centerDelta.y},xt.mousePosition={x:ce.clientX,y:ce.clientY},Wt=ke.filter(function(ve){return ve.isDragRelevant(de,xt.payload)}),xt.relevantContainers=Wt,xe=Er(Wt),Y&&Y({reset:!0,draggableInfo:void 0}),Y=_i(de,Wt),Wt.forEach(function(ve){return ve.prepareDrag(ve,Wt)}),yr(!0),xe(xt),Qe().appendChild(Bt.ghost),Te.start()}}var sn=null;function uo(){var ce=0<arguments.length&&arguments[0]!==void 0?arguments[0]:0,ue=1<arguments.length&&arguments[1]!==void 0?arguments[1]:1,de=2<arguments.length&&arguments[2]!==void 0&&arguments[2],ve=Bt,Ee=ve.ghost,Ve=ve.topLeft,at=Ve.x,Je=Ve.y,nt=!xt.container||xt.container.shouldUseTransformForGhost(),Be=nt?"translate3d(".concat(at,"px,").concat(Je,"px, 0)"):null;if(ue!==1&&(Be=Be?"".concat(Be," scale(").concat(ue,")"):"scale(".concat(ue,")")),0<ce)return Bt.ghost.style.transitionDuration=ce+"ms",void requestAnimationFrame(function(){Be&&(Ee.style.transform=Be),nt||(Ee.style.left=at+"px",Ee.style.top=Je+"px"),sn=null,de&&(Ee.style.opacity="0")});sn===null&&(sn=requestAnimationFrame(function(){Be&&(Ee.style.transform=Be),nt||(Ee.style.left=at+"px",Ee.style.top=Je+"px"),sn=null,de&&(Ee.style.opacity="0")}))}function En(){if(K&&!Q&&!te){he=!(Q=!0);var ce=Object.assign({},xt,{targetElement:null,position:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER},mousePosition:{x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER}});Wt.forEach(function(ue){ue.handleDrag(ce)}),xt.targetElement=null,xt.cancelDrop=!0,Tn(),Q=!1}}typeof window<"u"&&function(){if(typeof window<"u"){var ce=window.document.head||window.document.getElementsByTagName("head")[0],ue=window.document.createElement("style");ue.id="smooth-dnd-style-definitions";var de=ii(Ir);ue.type="text/css",ue.styleSheet?ue.styleSheet.cssText=de:ue.appendChild(window.document.createTextNode(de)),ce.appendChild(ue)}}();var Ri=(Me(),{register:function(ce){(function(ue){ke.push(ue),K&&xt&&ue.isDragRelevant(xt.container,xt.payload)&&(Wt.push(ue),ue.prepareDrag(ue,Wt),Y&&Y({reset:!0,draggableInfo:void 0}),Y=_i(ue,Wt),xe=Er(Wt),ue.handleDrag(xt))})(ce)},unregister:function(ce){(function(ue){if(ke.splice(ke.indexOf(ue),1),K&&xt){xt.container===ue&&ue.fireRemoveElement(),xt.targetElement===ue.element&&(xt.targetElement=null);var de=Wt.indexOf(ue);-1<de&&(Wt.splice(de,1),Y&&Y({reset:!0,draggableInfo:void 0}),Y=_i(ue,Wt),xe=Er(Wt))}})(ce)},isDragging:function(){return K},cancelDrag:En});function $o(ce,ue){var de=2<arguments.length&&arguments[2]!==void 0?arguments[2]:qe.animationDuration;ue?(fr(ce,o),ce.style.transitionDuration=de+"ms"):(on(ce,o),ce.style.removeProperty("transition-duration"))}function Mo(ce){var ue=[];return Array.prototype.forEach.call(ce.children,function(de){if(de.nodeType===Node.ELEMENT_NODE){var ve=de;Ki(de,x)||(ve=function(Ee){if(Nt.wrapChild){var Ve=window.document.createElement("div");return Ve.className="".concat(x),Ee.parentElement.insertBefore(Ve,Ee),Ve.appendChild(Ee),Ve}return Ee}(de)),ve[B]=0,ue.push(ve)}else ce.removeChild(de)}),ue}function Zs(ce){var ue=ce.layout;return function(de,ve){var Ee=2<arguments.length&&arguments[2]!==void 0&&arguments[2];return function Ve(at,Je,nt,Be){var Ke=4<arguments.length&&arguments[4]!==void 0&&arguments[4];if(Be<nt)return nt;if(nt===Be){var Ye=ue.getBeginEnd(at[nt]),ft=Ye.begin,ht=Ye.end;return Ke?Je<(ht+ft)/2?nt:nt+1:nt}var ot=Math.floor((Be+nt)/2),Kt=ue.getBeginEnd(at[ot]),pt=Kt.begin,Ut=Kt.end;return Je<pt?Ve(at,Je,nt,ot-1,Ke):Ut<Je?Ve(at,Je,ot+1,Be,Ke):Ke?Je<(Ut+pt)/2?ot:ot+1:ot}(de,ve,0,de.length-1,Ee)}}function Kn(ce){var ue=ce.element,de=ce.draggables,ve=ce.layout,Ee=ce.getOptions,Ve=function(Je){var nt=Je.element,Be=Je.draggables,Ke=Je.layout;return function(){Be.forEach(function(Ye){$o(Ye,!1),Ke.setTranslation(Ye,0),Ke.setVisibility(Ye,!0)}),nt[T]&&(nt[T].parentNode.removeChild(nt[T]),nt[T]=null)}}({element:ue,draggables:de,layout:ve}),at=(Nt.dropHandler||Vi)({element:ue,draggables:de,layout:ve,getOptions:Ee});return function(Je,nt){var Be=nt.addedIndex,Ke=nt.removedIndex,Ye=2<arguments.length&&arguments[2]!==void 0&&arguments[2];if(Ve(),!Je.cancelDrop&&(Je.targetElement||Ee().removeOnDropOut||Ye)){var ft={removedIndex:Ke,addedIndex:Be!==null?Ke!==null&&Ke<Be?Be-1:Be:null,payload:Je.payload};at(ft,Ee().onDrop)}}}function es(ce){var ue=ce.element,de=ce.getOptions,ve=null;return function(Ee){var Ve=Ee.draggableInfo,at=ve;return ve==null&&Ve.container.element===ue&&de().behaviour!=="copy"&&(at=ve=Ve.elementIndex),{removedIndex:at}}}function Ks(ce){var ue=ce.draggables,de=ce.layout;return function(ve){var Ee=ve.dragResult;Ee.removedIndex!==null&&de.setVisibility(ue[Ee.removedIndex],!1)}}function Gs(ce){var ue=ce.element,de=ce.layout;return function(ve){var Ee=ve.draggableInfo,Ve=document.elementFromPoint(Ee.position.x,Ee.position.y);if(Ve){var at=Zi(Ve,Ee.relevantContainers);if(at&&at.element===ue)return{pos:de.getPosition(Ee.position)}}return{pos:null}}}function Js(ce){var ue=ce.layout,de=null;return function(ve){var Ee=ve.draggableInfo;return ve.dragResult.pos===null?de=null:{elementSize:de=de||ue.getSize(Ee.size)}}}function ts(ce){var ue=ce.element;return function(de){var ve=de.draggableInfo,Ee=de.dragResult;(function(Ve,at){var Je=!(2<arguments.length&&arguments[2]!==void 0)||arguments[2];at&&Je?Ve.targetElement=at:Ve.targetElement===at&&(Ve.targetElement=null)})(ve,ue,!!Ee.pos)}}function rs(){return function(ce){return ce.dragResult.pos!==null?{addedIndex:0}:{addedIndex:null}}}function Pn(ce){var ue=ce.layout,de=null;return function(ve){var Ee=ve.dragResult.addedIndex;if(Ee===de)return null;de=Ee;var Ve=ue.getBeginEndOfContainer(),at=Ve.begin;return Ve.end,{shadowBeginEnd:{rect:ue.getTopLeftOfElementBegin(at)}}}}function is(ce){var ue=ce.layout,de=ce.element,ve=ce.getOptions,Ee=null;return function(Ve){var at=Ve.dragResult,Je=at.elementSize,nt=at.shadowBeginEnd,Be=at.addedIndex,Ke=at.dropPlaceholderContainer,Ye=ve();if(Ye.dropPlaceholder){var ft=typeof Ye.dropPlaceholder=="boolean"?{}:Ye.dropPlaceholder,ht=ft.animationDuration,ot=ft.className,Kt=ft.showOnTop;if(Be===null)return Ke&&Ee!==null&&de.removeChild(Ke),Ee=null,{dropPlaceholderContainer:void 0};if(!Ke){var pt=document.createElement("div"),Ut=document.createElement("div");Ut.className=me,pt.className="".concat(Ie," ").concat(ot||le),(Ke=document.createElement("div")).className="".concat(ee),Ke.style.position="absolute",ht!==void 0&&(Ke.style.transition="all ".concat(ht,"ms ease")),Ke.appendChild(Ut),Ut.appendChild(pt),ue.setSize(Ke.style,Je+"px"),Ke.style.pointerEvents="none",Kt?de.appendChild(Ke):de.insertBefore(Ke,de.firstElementChild)}return Ee!==Be&&nt.dropArea&&ue.setBegin(Ke.style,nt.dropArea.begin-ue.getBeginEndOfContainer().begin+"px"),Ee=Be,{dropPlaceholderContainer:Ke}}return null}}function Xs(ce){var ue=Jn(ce);return function(de){var ve=de.draggableInfo,Ee=de.dragResult;return ve.invalidateShadow?ue({draggableInfo:ve,dragResult:Ee}):null}}function In(ce){var ue=function(de){var ve=de.draggables,Ee=Zs({layout:de.layout});return function(Ve){var at=Ve.dragResult,Je=at.shadowBeginEnd,nt=at.pos;if(Je)return Je.begin+Je.beginAdjustment<=nt&&Je.end>=nt?null:nt<Je.begin+Je.beginAdjustment?Ee(ve,nt):nt>Je.end?Ee(ve,nt)+1:ve.length;var Be=Ee(ve,nt,!0);return Be!==null?Be:ve.length}}(ce);return function(de){var ve=de.dragResult,Ee=null;return ve.pos!==null&&(Ee=ue({dragResult:ve}))===null&&(Ee=ve.addedIndex),{addedIndex:Ee}}}function ns(){var ce=null;return function(ue){var de=ue.dragResult,ve=de.addedIndex,Ee=de.shadowBeginEnd;ve!==ce&&ce!==null&&Ee&&(Ee.beginAdjustment=0),ce=ve}}function tl(ce){var ue=ce.element,de=ce.draggables,ve=ce.layout,Ee=ce.getOptions,Ve=null;return function(at){var Je=at.dragResult,nt=Je.addedIndex,Be=Je.removedIndex,Ke=Je.elementSize;if(Be===null){if(nt!==null){if(!Ve){var Ye=ve.getBeginEndOfContainer();Ye.end=Ye.begin+ve.getSize(ue);var ft=ve.getScrollSize(ue)>ve.getSize(ue)?Ye.begin+ve.getScrollSize(ue)-ve.getScrollValue(ue):Ye.end,ht=0<de.length?ve.getBeginEnd(de[de.length-1]).end-de[de.length-1][B]:Ye.begin;if(ft<ht+Ke){(Ve=window.document.createElement("div")).className=C+" "+Ee().orientation;var ot=0<de.length?Ke+ht-ft:Ke;return ve.setSize(Ve.style,"".concat(ot,"px")),ue.appendChild(Ve),ue[T]=Ve,{containerBoxChanged:!0}}}}else if(Ve){ve.setTranslation(Ve,0);var Kt=Ve;return Ve=null,ue.removeChild(Kt),{containerBoxChanged:!(ue[T]=null)}}}}}function Gn(ce){var ue=ce.draggables,de=ce.layout,ve=null,Ee=null;return function(Ve){var at=Ve.dragResult,Je=at.addedIndex,nt=at.removedIndex,Be=at.elementSize;if(Je!==ve||nt!==Ee){for(var Ke=0;Ke<ue.length;Ke++)if(Ke!==nt){var Ye=ue[Ke],ft=0;nt!==null&&nt<Ke&&(ft-=Be),Je!==null&&Je<=Ke&&(ft+=Be),de.setTranslation(Ye,ft)}return{addedIndex:ve=Je,removedIndex:Ee=nt}}}}function Jn(ce){var ue=ce.draggables,de=ce.layout,ve=null;return function(Ee){var Ve=Ee.draggableInfo,at=Ee.dragResult,Je=at.addedIndex,nt=at.removedIndex,Be=at.elementSize,Ke=at.pos,Ye=at.shadowBeginEnd;if(Ke===null)return{shadowBeginEnd:ve=null};if(Je===null||!Ve.invalidateShadow&&Je===ve)return null;var ft=Je-1,ht=Number.MIN_SAFE_INTEGER,ot=0,Kt=0,pt=null,Ut=null;if(ft===nt&&ft--,-1<ft){var br=de.getSize(ue[ft]);if(Ut=de.getBeginEnd(ue[ft]),Be<br){var ho=(br-Be)/2;ht=Ut.end-ho}else ht=Ut.end;ot=Ut.end}else Ut={end:de.getBeginEndOfContainer().begin},ot=de.getBeginEndOfContainer().begin;var Rn=Number.MAX_SAFE_INTEGER,an=Je;if(an===nt&&an++,an<ue.length){var Dn=de.getSize(ue[an]);if(pt=de.getBeginEnd(ue[an]),Be<Dn){var po=(Dn-Be)/2;Rn=pt.begin+po}else Rn=pt.begin;Kt=pt.begin}else pt={begin:de.getContainerRectangles().rect.end},Kt=de.getContainerRectangles().rect.end-de.getContainerRectangles().rect.begin;var ss=Ut&&pt?de.getTopLeftOfElementBegin(Ut.end):null;return ve=Je,{shadowBeginEnd:{dropArea:{begin:ot,end:Kt},begin:ht,end:Rn,rect:ss,beginAdjustment:Ye?Ye.beginAdjustment:0}}}}function os(){var ce=null;return function(ue){var de=ue.dragResult,ve=de.pos,Ee=de.addedIndex,Ve=de.shadowBeginEnd;if(ve!==null){if(Ee!=null&&ce===null){if(ve<Ve.begin){var at=ve-Ve.begin-5;Ve.beginAdjustment=at}ce=Ee}}else ce=null}}function oi(ce){var ue=ce.getOptions,de=!1,ve=ue();return function(Ee){var Ve=!!Ee.dragResult.pos;Ve!==de&&((de=Ve)?ve.onDragEnter&&ve.onDragEnter():ve.onDragLeave&&ve.onDragLeave())}}function rr(ce){var ue=ce.getOptions,de=null,ve=ue();return function(Ee){var Ve=Ee.dragResult,at=Ve.addedIndex,Je=Ve.removedIndex,nt=Ee.draggableInfo,Be=nt.payload,Ke=nt.element;if(ve.onDropReady&&at!==null&&de!==at){var Ye=de=at;Je!==null&&Je<at&&Ye--,ve.onDropReady({addedIndex:Ye,removedIndex:Je,payload:Be,element:Ke?Ke.firstElementChild:void 0})}}}function Mn(ce){return ce.getOptions().behaviour==="drop-zone"?si(ce)(es,Ks,Gs,Js,ts,rs,Pn,oi,rr):si(ce)(es,Ks,Gs,Js,ts,Xs,In,ns,tl,Gn,Jn,is,os,oi,rr)}function si(ce){return function(){for(var ue=arguments.length,de=new Array(ue),ve=0;ve<ue;ve++)de[ve]=arguments[ve];var Ee=de.map(function(at){return at(ce)}),Ve=null;return function(at){return Ve=Ee.reduce(function(Je,nt){return Object.assign(Je,nt({draggableInfo:at,dragResult:Je}))},Ve||{addedIndex:null,removedIndex:null,elementSize:null,pos:null,shadowBeginEnd:null})}}}function Ln(ce){return function(ue){var de=Object.assign({},qe,ue),ve=null,Ee=null,Ve=function(ft,ht){var ot=Mo(ft),Kt=ht();return fr(ft,"".concat(O," ").concat(Kt.orientation)),{element:ft,draggables:ot,getOptions:ht,layout:Jr(ft,Kt.orientation,Kt.animationDuration)}}(ce,Ye),at=Mn(Ve),Je=Kn(Ve),nt=function(ft,ht){var ot=[];function Kt(){ot&&(ot.forEach(function(pt){return pt.removeEventListener("scroll",ht)}),window.removeEventListener("scroll",ht))}return function(){for(var pt=ft;pt;)(qt(pt,"x")||qt(pt,"y"))&&ot.push(pt),pt=pt.parentElement}(),{dispose:function(){Kt(),ot=null},start:function(){ot&&(ot.forEach(function(pt){return pt.addEventListener("scroll",ht)}),window.addEventListener("scroll",ht))},stop:Kt}}(ce,function(){Ve.layout.invalidateRects(),Be()});function Be(){Ee!==null&&(Ee.invalidateShadow=!0,ve=at(Ee),Ee.invalidateShadow=!1)}function Ke(ft,ht){for(var ot=Mo(ht),Kt=0;Kt<ot.length;Kt++)ft[Kt]=ot[Kt];for(var pt=0;pt<ft.length-ot.length;pt++)ft.pop()}function Ye(){return de}return{element:ce,draggables:Ve.draggables,isDragRelevant:function(ft){var ht=ft.element,ot=ft.getOptions;return function(Kt,pt){var Ut=ot();if(Ut.shouldAcceptDrop)return Ut.shouldAcceptDrop(Kt.getOptions(),pt);var br=Kt.getOptions();return Ut.behaviour!=="copy"&&Nr(ht,"."+x)!==Kt.element&&(Kt.element===ht||!(!br.groupName||br.groupName!==Ut.groupName))}}(Ve),layout:Ve.layout,dispose:function(ft){nt.dispose(),function(ht){Nt.wrapChild&&Array.prototype.forEach.call(ht.children,function(ot){ot.nodeType===Node.ELEMENT_NODE&&Ki(ot,x)&&(ht.insertBefore(ot.firstElementChild,ot),ht.removeChild(ot))})}(ft.element)},prepareDrag:function(ft,ht){var ot=ft.element,Kt=Ve.draggables;Ke(Kt,ot),ft.layout.invalidateRects(),Kt.forEach(function(pt){return $o(pt,!0,Ye().animationDuration)}),nt.start()},handleDrag:function(ft){return ve=at(Ee=ft)},handleDrop:function(ft){nt.stop(),ve&&ve.dropPlaceholderContainer&&ce.removeChild(ve.dropPlaceholderContainer),Ee=null,at=Mn(Ve),Je(ft,ve),ve=null},fireRemoveElement:function(){Je(Ee,Object.assign({},ve,{addedIndex:null}),!0),ve=null},getDragResult:function(){return ve},getTranslateCalculator:function(ft){return Gn(Ve)(ft)},onTranslated:function(){Be()},setDraggables:function(){Ke(Ve.draggables,ce)},getScrollMaxSpeed:function(){return Nt.maxScrollSpeed},shouldUseTransformForGhost:function(){return Nt.useTransformForGhost===!0},getOptions:Ye,setOptions:function(ft){var ht=!(1<arguments.length&&arguments[1]!==void 0)||arguments[1];de=ht===!1?Object.assign({},qe,ft):Object.assign({},qe,de,ft)}}}}var Nt=function(ce,ue){var de=Ln(ce)(ue);return ce[P]=de,Ri.register(de),{dispose:function(){Ri.unregister(de),de.dispose(de)},setOptions:function(ve,Ee){de.setOptions(ve,Ee)}}};function vn(ce,ue,de){Object.defineProperty(ce,de,{set:function(ve){ue[de]=ve},get:function(){return ue[de]}})}Nt.wrapChild=!0,Nt.cancelDrag=function(){Ri.cancelDrag()},Nt.isDragging=function(){return Ri.isDragging()};function Fi(ce,ue){return console.warn('default export is deprecated. please use named export "smoothDnD"'),Nt(ce,ue)}Fi.cancelDrag=function(){Nt.cancelDrag()},Fi.isDragging=function(){return Nt.isDragging()},vn(Fi,Nt,"useTransformForGhost"),vn(Fi,Nt,"maxScrollSpeed"),vn(Fi,Nt,"wrapChild"),vn(Fi,Nt,"dropHandler"),y.smoothDnD=Nt,y.constants=Le,y.dropHandlers=Cn,y.default=Fi,Object.defineProperty(y,"__esModule",{value:!0})})}(cc,cc.exports)),cc.exports}var pc=z1();function uy(u){return u?typeof u=="string"||typeof u=="object"&&(typeof u.value=="string"||typeof u.value=="function"||typeof u.value=="object"):!0}function hy(u,p){const y=u.$props.tag;if(y){if(typeof y=="string"){const b={value:y};return p&&(b.props={class:p}),b}else if(typeof y=="object"){const b={value:y.value||"div",props:y.props||{}};return p&&(b.props.class?Array.isArray(b.props.class)?b.props.class.push(p):b.props.class=[p,b.props.class]:b.props.class=p),b}}return{value:"div"}}pc.smoothDnD.dropHandler=pc.dropHandlers.reactDropHandler().handler;pc.smoothDnD.wrapChild=!1;const Am={"drag-start":"onDragStart","drag-end":"onDragEnd",drop:"onDrop","drag-enter":"onDragEnter","drag-leave":"onDragLeave","drop-ready":"onDropReady"};var B1=_.defineComponent({name:"Container",mounted(){const u=Object.assign({},this.$props);for(const p in Am)u[Am[p]]=y=>{this.$emit(p,y)};this.containerElement=this.$refs.container||this.$el,this.container=pc.smoothDnD(this.containerElement,u)},unmounted(){if(this.container)try{this.container.dispose()}catch{}},emits:["drop","drag-start","drag-end","drag-enter","drag-leave","drop-ready"],props:{orientation:{type:String,default:"vertical"},removeOnDropOut:{type:Boolean,default:!1},autoScrollEnabled:{type:Boolean,default:!0},animationDuration:{type:Number,default:250},behaviour:String,groupName:String,dragHandleSelector:String,nonDragAreaSelector:String,lockAxis:String,dragClass:String,dropClass:String,dragBeginDelay:Number,getChildPayload:Function,shouldAnimateDrop:Function,shouldAcceptDrop:Function,getGhostParent:Function,dropPlaceholder:[Object,Boolean],tag:{validator:uy,default:"div"}},render(){const u=hy(this);return _.h(u.value,Object.assign({},{ref:"container"},u.props),this.$slots.default())}}),V1=_.defineComponent({name:"Draggable",props:{tag:{validator:uy,default:"div"}},render:function(){const u=hy(this,pc.constants.wrapperClass);return _.h(u.value,Object.assign({},u.props),this.$slots.default())}});function O1(){const p=new URLSearchParams(window.location.search).get("layers");return p?p.split(","):[]}function F1(u){const p=new URLSearchParams(window.location.search);u.length>0?p.set("layers",u.join(",")):p.delete("layers");const y=`${window.location.pathname}?${p.toString()}`;window.history.replaceState({},"",y)}const N1={components:{VsLayersItem:c1,ZoomInIcon:p1,InfoIcon:y1,TableIcon:b1,TrashIcon:k1,DotsIcon:P1,ChevronRightIcon:R1,Container:B1,Draggable:V1},props:{center:{type:Array,default:()=>[26.2516,50.6199]},zoom:{type:Number,default:12},map:{type:Object,default:()=>null},history:{type:Boolean,default:!1}},emits:["content-resize"],data(){return{layers:null,rawCatalog:null,categories:null,selectedCategory:"",search:"",activeView:"catalog",selectedLayers:[]}},computed:{searchedLayers(){return this.layers.filter(({name:u})=>u==null?void 0:u.toLowerCase().match(this.search.toLowerCase()))}},async mounted(){if(await this.getLayers(),this.categories=this.layersCategories(),this.history){const u=O1();u.length>0&&this.layers&&(u.forEach(p=>{const y=this.layers.find(b=>String(b.id)===p);if(y&&!this.selectedLayers.find(b=>b.id===y.id)){const b={...y,visible:!0,opacity:100};this.selectedLayers.push(b),Us(this.map,b)}}),this.activeView="selected")}this._resizeObserver=new window.ResizeObserver(()=>{this.$emit("content-resize")}),this.$nextTick(()=>{const u=this.$el;u&&this._resizeObserver.observe(u)})},beforeUnmount(){this._resizeObserver&&this._resizeObserver.disconnect()},watch:{selectedLayers:{handler(u){this.history&&F1(u.map(p=>p.id))},deep:!0}},methods:{async getLayers(){try{const u=await Br.get("/api/map-catalog"),p=(u.data.services||[]).filter(y=>y.service_type!=="other");this.layers=[...p,...u.data.rasters||[]],this.rawCatalog={...u.data,services:p}}catch(u){console.error("Помилка завантаження шарів:",u)}},layersCategories(){return this.rawCatalog?{Сервіси:this.rawCatalog.services||[],Растри:this.rawCatalog.rasters||[]}:{}},selectCategory(u){this.selectedCategory=this.selectedCategory===u?"":u},formatNumber(u){return Intl.NumberFormat("uk",{notation:"compact"}).format(u)},onEnter(){this.layers.filter(({name:u})=>u==null?void 0:u.toLowerCase().match(this.search.toLowerCase()))},clearSearch(){this.search=""},addToSelected(u){if(!this.selectedLayers.find(p=>p.id===u.id)){const p={...u,visible:!0,opacity:100};this.selectedLayers.unshift(p),Us(this.map,p)}},deleteLayer(u){const p=this.selectedLayers.findIndex(y=>y.id===u.id);p!==-1&&this.selectedLayers.splice(p,1),Qa(this.map,u.id)},async toggleLayerVisibility(u){try{u.visible?(await Us(this.map,u),this.updateLayerOpacity(u)):await Qa(this.map,u.id)}catch(p){console.error("Error toggling layer visibility:",p),u.visible=!u.visible}},onLayerOpacityChange(u){this.updateLayerOpacity(u)},updateLayerOpacity(u){if(this.map){const p=this.map.getStyle().layers.filter(b=>b.id.includes(u.id)),y=u.opacity/100;p.forEach(b=>{b.type==="fill"?(u.originalFillOpacity||(u.originalFillOpacity=this.map.getPaintProperty(b.id,"fill-opacity")||1),this.map.setPaintProperty(b.id,"fill-opacity",u.originalFillOpacity*y)):b.type==="raster"?this.map.setPaintProperty(b.id,"raster-opacity",y):b.type==="line"?this.map.setPaintProperty(b.id,"line-opacity",y):b.type==="circle"?(this.map.setPaintProperty(b.id,"circle-opacity",y),this.map.setPaintProperty(b.id,"circle-stroke-opacity",y)):b.type==="symbol"&&(this.map.setPaintProperty(b.id,"icon-opacity",y),this.map.setPaintProperty(b.id,"text-opacity",y))})}},async handleRemoveFromCatalog(u){const p=this.selectedLayers.find(y=>y.id===u.id);p!=null&&p.visible&&await Qa(this.map,u.id),this.deleteLayer(u)},clearSelectedLayers(){this.selectedLayers.forEach(async u=>{u.visible&&await Qa(this.map,u.id)}),this.selectedLayers=[]},zoomToLayer(u){this.fitBoundsByLayer(u)},showLayerInfo(u){},showLayerTable(u){},fitBoundsByLayer(u){u&&u.bbox&&Array.isArray(u.bbox)&&u.bbox.length===4&&this.map&&this.map.fitBounds([[u.bbox[0],u.bbox[1]],[u.bbox[2],u.bbox[3]]],{padding:50,duration:0})},popoverActions(u){return[{label:"Збільшити до шару",icon:"ZoomInIcon",class:u&&u.bbox&&Array.isArray(u.bbox)&&u.bbox.length===4?"text-gray-700 hover:bg-gray-100":"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"zoomToLayer",disabled:!(u&&u.bbox&&Array.isArray(u.bbox)&&u.bbox.length===4)},{label:"Інформація про шар",icon:"InfoIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerInfo",disabled:!0},{label:"Таблиця шару",icon:"TableIcon",class:"text-gray-700 hover:bg-gray-100 opacity-50 cursor-not-allowed",handler:"showLayerTable",disabled:!0},{divider:!0},{label:"Видалити шар",icon:"TrashIcon",class:"text-red-600 hover:bg-red-50",handler:"deleteLayer",disabled:!1}]},onDrop(u){const{removedIndex:p,addedIndex:y,payload:b}=u;if(p===null&&y===null)return;const k=[...this.selectedLayers];let P=b;if(p!==null&&(P=k.splice(p,1)[0]),y!==null&&k.splice(y,0,P),this.selectedLayers=k,this.map&&this.selectedLayers.length>1)for(let x=this.selectedLayers.length-1;x>=0;x--){const o=this.selectedLayers[x];o.visible&&this.map.getStyle().layers.find(B=>B.id.includes(o.id))&&this.map.getStyle().layers.forEach(B=>{B.id.includes(o.id)&&this.map.moveLayer(B.id)})}}}},q1={class:"w-full max-w-md mx-auto p-4 bg-white border border-gray-200 rounded-lg shadow-sm"},U1={class:"flex items-center justify-between mb-4"},j1={class:"flex items-center gap-2"},H1={class:"text-lg font-semibold text-gray-800"},W1={key:0},Z1={key:1},K1={class:"flex mb-4 border-b border-gray-200"},G1={key:0},J1={class:"mb-4"},X1={class:"border border-gray-200 rounded-md p-3 mb-2 bg-white shadow-sm"},Q1={class:"flex items-center justify-between"},Y1={class:"flex items-center gap-2 cursor-move"},$1=["onUpdate:modelValue","onChange"],ew={class:"text-gray-800 font-medium"},tw={class:"flex items-center gap-2"},rw={class:"relative"},iw={class:"flex items-center gap-2"},nw=["onUpdate:modelValue","onInput"],ow={class:"text-xs text-gray-600 whitespace-nowrap"},sw=["onClick"],aw={class:"relative"},lw={class:"w-48"},cw={key:0,class:"my-1 border-gray-200"},uw=["disabled","onClick"],hw={class:"p-1 rounded-full hover:bg-gray-100 transition-colors","aria-label":"Layer actions"},dw={key:0,class:"text-center text-[14px] text-[#4b5563]"},pw={class:"relative mt-[10px]"},fw={class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"},width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},mw={key:0,class:"vs-layers-catalog__list flex-1 scrollable-container overflow-auto mt-2 catalog-list"},gw={key:0,class:"text-center text-[14px] text-[#4b5563]"},yw={key:0,class:"text-center text-[14px] text-[#4b5563]"},_w=["onClick"],vw={class:"flex items-center gap-x-3"},xw=["title"],bw={class:"text-xs opacity-60 text-[#4b5563]"};function ww(u,p,y,b,k,P){var T;const x=_.resolveComponent("VsPopover"),o=_.resolveComponent("DotsIcon"),B=_.resolveComponent("Draggable"),D=_.resolveComponent("Container"),M=_.resolveComponent("searchIcon"),O=_.resolveComponent("closeIcon"),L=_.resolveComponent("VsLayersItem"),C=_.resolveComponent("chevronRightIcon");return _.openBlock(),_.createElementBlock("div",q1,[_.createElementVNode("div",U1,[_.createElementVNode("div",j1,[p[6]||(p[6]=_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-layers text-blue-600"},[_.createElementVNode("path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z"}),_.createElementVNode("path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65"}),_.createElementVNode("path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65"})],-1)),_.createElementVNode("h2",H1,[_.createTextVNode(_.toDisplayString(k.activeView==="catalog"?"Каталог":"Вибрані шари")+" ",1),k.activeView==="catalog"?(_.openBlock(),_.createElementBlock("span",W1,"("+_.toDisplayString(((T=k.layers)==null?void 0:T.length)||0)+")",1)):(_.openBlock(),_.createElementBlock("span",Z1,"("+_.toDisplayString(k.selectedLayers.length)+")",1))])]),_.createElementVNode("button",{class:"p-1 rounded-full hover:bg-gray-200 transition-colors","aria-label":"Reset layers",onClick:p[0]||(p[0]=(...U)=>P.clearSelectedLayers&&P.clearSelectedLayers(...U))},p[7]||(p[7]=[_.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw text-gray-600" data-v-5b1a9326><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" data-v-5b1a9326></path><path d="M21 3v5h-5" data-v-5b1a9326></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" data-v-5b1a9326></path><path d="M8 16H3v5" data-v-5b1a9326></path></svg>',1)]))]),_.createElementVNode("div",K1,[_.createElementVNode("button",{class:_.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="catalog"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:p[1]||(p[1]=U=>k.activeView="catalog")}," Каталог ",2),_.createElementVNode("button",{class:_.normalizeClass(["px-4 py-2 text-sm font-medium",k.activeView==="selected"?"text-blue-600 border-b-2 border-blue-600":"text-gray-600 hover:text-gray-800"]),onClick:p[2]||(p[2]=U=>k.activeView="selected")}," Вибрані шари ",2)]),k.activeView==="selected"?(_.openBlock(),_.createElementBlock("div",G1,[_.createElementVNode("div",J1,[_.createElementVNode("button",{class:"flex items-center gap-2 text-blue-600 hover:text-blue-700 transition-colors px-3 py-2 rounded-md bg-blue-50 hover:bg-blue-100 w-full justify-center",onClick:p[3]||(p[3]=U=>k.activeView="catalog")},p[8]||(p[8]=[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-plus"},[_.createElementVNode("path",{d:"M5 12h14"}),_.createElementVNode("path",{d:"M12 5v14"})],-1),_.createElementVNode("span",null,"Вибрати шар",-1)]))]),(_.openBlock(),_.createBlock(D,{onDrop:P.onDrop,lockAxis:"y","drag-class":"dragging",key:k.selectedLayers.length,class:"space-y-2 max-h-[400px] overflow-y-auto pr-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(k.selectedLayers,(U,G)=>(_.openBlock(),_.createBlock(B,{key:U.id||G,payload:U},{default:_.withCtx(()=>[_.createElementVNode("div",X1,[_.createElementVNode("div",Q1,[_.createElementVNode("div",Y1,[p[9]||(p[9]=_.createElementVNode("svg",{width:"16",height:"16",fill:"none",stroke:"#9ca3af","stroke-width":"2",viewBox:"0 0 24 24",class:"mr-1 shrink-0"},[_.createElementVNode("circle",{cx:"5",cy:"5",r:"1.5"}),_.createElementVNode("circle",{cx:"5",cy:"12",r:"1.5"}),_.createElementVNode("circle",{cx:"5",cy:"19",r:"1.5"}),_.createElementVNode("circle",{cx:"12",cy:"5",r:"1.5"}),_.createElementVNode("circle",{cx:"12",cy:"12",r:"1.5"}),_.createElementVNode("circle",{cx:"12",cy:"19",r:"1.5"}),_.createElementVNode("circle",{cx:"19",cy:"5",r:"1.5"}),_.createElementVNode("circle",{cx:"19",cy:"12",r:"1.5"}),_.createElementVNode("circle",{cx:"19",cy:"19",r:"1.5"})],-1)),_.withDirectives(_.createElementVNode("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 rounded focus:ring-blue-500","onUpdate:modelValue":ie=>U.visible=ie,onChange:ie=>P.toggleLayerVisibility(U)},null,40,$1),[[_.vModelCheckbox,U.visible]]),_.createElementVNode("span",ew,_.toDisplayString(U.name||U.title||U.label),1)]),_.createElementVNode("div",tw,[_.createElementVNode("div",rw,[_.createVNode(x,{placement:"bottom"},{reference:_.withCtx(()=>[_.createElementVNode("div",{class:"text-sm text-gray-600 hover:text-gray-800 transition-colors px-2 py-1 rounded hover:bg-gray-100 cursor-pointer",onClick:ie=>P.updateLayerOpacity(U)},_.toDisplayString(U.opacity||100)+"% ",9,sw)]),default:_.withCtx(()=>[_.createElementVNode("div",iw,[p[10]||(p[10]=_.createElementVNode("label",{class:"text-gray-600 whitespace-nowrap"},"Прозорість:",-1)),_.withDirectives(_.createElementVNode("input",{type:"range",min:"0",max:"100",step:"1","onUpdate:modelValue":ie=>U.opacity=ie,onInput:ie=>P.onLayerOpacityChange(U),class:"h-2 w-full accent-blue-600 rounded-lg cursor-pointer bg-gray-200"},null,40,nw),[[_.vModelText,U.opacity]]),_.createElementVNode("span",ow,_.toDisplayString(Math.round(U.opacity))+"% ",1)])]),_:2},1024)]),_.createElementVNode("div",aw,[_.createVNode(x,{placement:"bottom"},{reference:_.withCtx(()=>[_.createElementVNode("div",hw,[_.createVNode(o)])]),default:_.withCtx(()=>[_.createElementVNode("div",lw,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(P.popoverActions(U),(ie,le)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:le},[ie.divider?(_.openBlock(),_.createElementBlock("hr",cw)):(_.openBlock(),_.createElementBlock("button",{key:1,class:_.normalizeClass("w-full p-2 text-left text-sm flex items-center gap-2 "+(ie.class||"")),disabled:ie.disabled,onClick:Ie=>!ie.disabled&&u.$options.methods[ie.handler].call(this,U)},[(_.openBlock(),_.createBlock(_.resolveDynamicComponent(ie.icon),{class:"lucide"})),_.createTextVNode(" "+_.toDisplayString(ie.label),1)],10,uw))],64))),128))])]),_:2},1024)])])])])]),_:2},1032,["payload"]))),128)),k.selectedLayers.length===0?(_.openBlock(),_.createElementBlock("div",dw,p[11]||(p[11]=[_.createElementVNode("p",null,'Щоб додати шар, натисніть на кнопку "Вибрати шар".',-1)]))):_.createCommentVNode("",!0)]),_:1},8,["onDrop"]))])):(_.openBlock(),_.createElementBlock(_.Fragment,{key:1},[_.createElementVNode("div",pw,[(_.openBlock(),_.createElementBlock("svg",fw,p[12]||(p[12]=[_.createElementVNode("path",{d:"M7.33333 13.1667C10.2789 13.1667 12.6667 10.7789 12.6667 7.83333C12.6667 4.88781 10.2789 2.5 7.33333 2.5C4.38781 2.5 2 4.88781 2 7.83333C2 10.7789 4.38781 13.1667 7.33333 13.1667Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M13.9995 14.5L11.1328 11.6333",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))),_.withDirectives(_.createElementVNode("input",{title:"value",placeholder:"Введіть назву шару...","onUpdate:modelValue":p[4]||(p[4]=U=>k.search=U),type:"text",class:"py-[7px] ps-8 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:bg-white focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:bg-neutral-800 dark:focus:ring-neutral-600",onKeyup:p[5]||(p[5]=_.withKeys((...U)=>P.onEnter&&P.onEnter(...U),["enter"]))},null,544),[[_.vModelText,k.search]]),_.createVNode(M,{class:"absolute top-1/2 left-[8px] w-[16px] h-[16px]",style:{transform:"translate(0, -50%)"}}),k.search?(_.openBlock(),_.createBlock(O,{key:0,class:"absolute top-1/2 right-[10px] w-[16px] h-[16px] cursor-pointer",style:{transform:"translate(0, -50%)"},onClick:P.clearSearch},null,8,["onClick"])):_.createCommentVNode("",!0)]),k.categories?(_.openBlock(),_.createElementBlock("div",mw,[k.search?(_.openBlock(),_.createElementBlock(_.Fragment,{key:0},[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(P.searchedLayers,(U,G)=>(_.openBlock(),_.createBlock(L,{key:G,layer:U,map:y.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128)),P.searchedLayers.length===0?(_.openBlock(),_.createElementBlock("div",gw," Нічого не знайдено ")):_.createCommentVNode("",!0)],64)):(_.openBlock(),_.createElementBlock(_.Fragment,{key:1},[!k.categories||Object.keys(k.categories).length===0?(_.openBlock(),_.createElementBlock("div",yw," Каталог порожній ")):(_.openBlock(!0),_.createElementBlock(_.Fragment,{key:1},_.renderList(Object.keys(k.categories),U=>(_.openBlock(),_.createElementBlock("div",{key:U},[_.createElementVNode("div",{class:"hover:bg-gray-100 focus:bg-gray-100 px-2.5 cursor-pointer p-[8px] rounded-lg flex justify-between items-center",onClick:G=>P.selectCategory(U)},[_.createElementVNode("div",vw,[_.createVNode(C,{class:_.normalizeClass({"rotate-up":U===k.selectedCategory,"rotate-down":U!==k.selectedCategory})},null,8,["class"]),_.createElementVNode("div",{class:"max-w-[260px] text-[14px] text-[#4b5563]",title:U},_.toDisplayString(U),9,xw)]),_.createElementVNode("div",bw,_.toDisplayString(P.formatNumber(k.categories[U].length)),1)],8,_w),_.withDirectives(_.createElementVNode("div",null,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(k.categories[U],(G,ie)=>(_.openBlock(),_.createBlock(L,{key:ie,layer:G,map:y.map,selectedLayers:k.selectedLayers,onSelect:P.addToSelected,onRemove:P.handleRemoveFromCatalog},null,8,["layer","map","selectedLayers","onSelect","onRemove"]))),128))],512),[[_.vShow,U===k.selectedCategory]])]))),128))],64))])):_.createCommentVNode("",!0)],64))])}const Sw=pr(N1,[["render",ww],["__scopeId","data-v-5b1a9326"]]);var ku={exports:{}},Cu={exports:{}},jn={},en={},km;function nn(){if(km)return en;km=1,en.__esModule=!0,en.extend=k,en.indexOf=B,en.escapeExpression=D,en.isEmpty=M,en.createFrame=O,en.blockParams=L,en.appendContextPath=C;var u={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;","=":"&#x3D;"},p=/[&<>"'`=]/g,y=/[&<>"'`=]/;function b(T){return u[T]}function k(T){for(var U=1;U<arguments.length;U++)for(var G in arguments[U])Object.prototype.hasOwnProperty.call(arguments[U],G)&&(T[G]=arguments[U][G]);return T}var P=Object.prototype.toString;en.toString=P;var x=function(U){return typeof U=="function"};x(/x/)&&(en.isFunction=x=function(T){return typeof T=="function"&&P.call(T)==="[object Function]"}),en.isFunction=x;var o=Array.isArray||function(T){return T&&typeof T=="object"?P.call(T)==="[object Array]":!1};en.isArray=o;function B(T,U){for(var G=0,ie=T.length;G<ie;G++)if(T[G]===U)return G;return-1}function D(T){if(typeof T!="string"){if(T&&T.toHTML)return T.toHTML();if(T==null)return"";if(!T)return T+"";T=""+T}return y.test(T)?T.replace(p,b):T}function M(T){return!T&&T!==0?!0:!!(o(T)&&T.length===0)}function O(T){var U=k({},T);return U._parent=T,U}function L(T,U){return T.path=U,T}function C(T,U){return(T?T+".":"")+U}return en}var Tu={exports:{}},Cm;function Wn(){return Cm||(Cm=1,function(u,p){p.__esModule=!0;var y=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function b(k,P){var x=P&&P.loc,o=void 0,B=void 0,D=void 0,M=void 0;x&&(o=x.start.line,B=x.end.line,D=x.start.column,M=x.end.column,k+=" - "+o+":"+D);for(var O=Error.prototype.constructor.call(this,k),L=0;L<y.length;L++)this[y[L]]=O[y[L]];Error.captureStackTrace&&Error.captureStackTrace(this,b);try{x&&(this.lineNumber=o,this.endLineNumber=B,Object.defineProperty?(Object.defineProperty(this,"column",{value:D,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:M,enumerable:!0})):(this.column=D,this.endColumn=M))}catch{}}b.prototype=new Error,p.default=b,u.exports=p.default}(Tu,Tu.exports)),Tu.exports}var sc={},Eu={exports:{}},Tm;function Aw(){return Tm||(Tm=1,function(u,p){p.__esModule=!0;var y=nn();p.default=function(b){b.registerHelper("blockHelperMissing",function(k,P){var x=P.inverse,o=P.fn;if(k===!0)return o(this);if(k===!1||k==null)return x(this);if(y.isArray(k))return k.length>0?(P.ids&&(P.ids=[P.name]),b.helpers.each(k,P)):x(this);if(P.data&&P.ids){var B=y.createFrame(P.data);B.contextPath=y.appendContextPath(P.data.contextPath,P.name),P={data:B}}return o(k,P)})},u.exports=p.default}(Eu,Eu.exports)),Eu.exports}var Pu={exports:{}},Em;function kw(){return Em||(Em=1,function(u,p){p.__esModule=!0;function y(x){return x&&x.__esModule?x:{default:x}}var b=nn(),k=Wn(),P=y(k);p.default=function(x){x.registerHelper("each",function(o,B){if(!B)throw new P.default("Must pass iterator to #each");var D=B.fn,M=B.inverse,O=0,L="",C=void 0,T=void 0;B.data&&B.ids&&(T=b.appendContextPath(B.data.contextPath,B.ids[0])+"."),b.isFunction(o)&&(o=o.call(this)),B.data&&(C=b.createFrame(B.data));function U(ee,me,Le){C&&(C.key=ee,C.index=me,C.first=me===0,C.last=!!Le,T&&(C.contextPath=T+ee)),L=L+D(o[ee],{data:C,blockParams:b.blockParams([o[ee],ee],[T+ee,null])})}if(o&&typeof o=="object")if(b.isArray(o))for(var G=o.length;O<G;O++)O in o&&U(O,O,O===o.length-1);else if(typeof Symbol=="function"&&o[Symbol.iterator]){for(var ie=[],le=o[Symbol.iterator](),Ie=le.next();!Ie.done;Ie=le.next())ie.push(Ie.value);o=ie;for(var G=o.length;O<G;O++)U(O,O,O===o.length-1)}else(function(){var ee=void 0;Object.keys(o).forEach(function(me){ee!==void 0&&U(ee,O-1),ee=me,O++}),ee!==void 0&&U(ee,O-1,!0)})();return O===0&&(L=M(this)),L})},u.exports=p.default}(Pu,Pu.exports)),Pu.exports}var Iu={exports:{}},Pm;function Cw(){return Pm||(Pm=1,function(u,p){p.__esModule=!0;function y(P){return P&&P.__esModule?P:{default:P}}var b=Wn(),k=y(b);p.default=function(P){P.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new k.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},u.exports=p.default}(Iu,Iu.exports)),Iu.exports}var Mu={exports:{}},Im;function Tw(){return Im||(Im=1,function(u,p){p.__esModule=!0;function y(x){return x&&x.__esModule?x:{default:x}}var b=nn(),k=Wn(),P=y(k);p.default=function(x){x.registerHelper("if",function(o,B){if(arguments.length!=2)throw new P.default("#if requires exactly one argument");return b.isFunction(o)&&(o=o.call(this)),!B.hash.includeZero&&!o||b.isEmpty(o)?B.inverse(this):B.fn(this)}),x.registerHelper("unless",function(o,B){if(arguments.length!=2)throw new P.default("#unless requires exactly one argument");return x.helpers.if.call(this,o,{fn:B.inverse,inverse:B.fn,hash:B.hash})})},u.exports=p.default}(Mu,Mu.exports)),Mu.exports}var Lu={exports:{}},Mm;function Ew(){return Mm||(Mm=1,function(u,p){p.__esModule=!0,p.default=function(y){y.registerHelper("log",function(){for(var b=[void 0],k=arguments[arguments.length-1],P=0;P<arguments.length-1;P++)b.push(arguments[P]);var x=1;k.hash.level!=null?x=k.hash.level:k.data&&k.data.level!=null&&(x=k.data.level),b[0]=x,y.log.apply(y,b)})},u.exports=p.default}(Lu,Lu.exports)),Lu.exports}var Ru={exports:{}},Lm;function Pw(){return Lm||(Lm=1,function(u,p){p.__esModule=!0,p.default=function(y){y.registerHelper("lookup",function(b,k,P){return b&&P.lookupProperty(b,k)})},u.exports=p.default}(Ru,Ru.exports)),Ru.exports}var Du={exports:{}},Rm;function Iw(){return Rm||(Rm=1,function(u,p){p.__esModule=!0;function y(x){return x&&x.__esModule?x:{default:x}}var b=nn(),k=Wn(),P=y(k);p.default=function(x){x.registerHelper("with",function(o,B){if(arguments.length!=2)throw new P.default("#with requires exactly one argument");b.isFunction(o)&&(o=o.call(this));var D=B.fn;if(b.isEmpty(o))return B.inverse(this);var M=B.data;return B.data&&B.ids&&(M=b.createFrame(B.data),M.contextPath=b.appendContextPath(B.data.contextPath,B.ids[0])),D(o,{data:M,blockParams:b.blockParams([o],[M&&M.contextPath])})})},u.exports=p.default}(Du,Du.exports)),Du.exports}var Dm;function dy(){if(Dm)return sc;Dm=1,sc.__esModule=!0,sc.registerDefaultHelpers=U,sc.moveHelperToHooks=G;function u(ie){return ie&&ie.__esModule?ie:{default:ie}}var p=Aw(),y=u(p),b=kw(),k=u(b),P=Cw(),x=u(P),o=Tw(),B=u(o),D=Ew(),M=u(D),O=Pw(),L=u(O),C=Iw(),T=u(C);function U(ie){y.default(ie),k.default(ie),x.default(ie),B.default(ie),M.default(ie),L.default(ie),T.default(ie)}function G(ie,le,Ie){ie.helpers[le]&&(ie.hooks[le]=ie.helpers[le],Ie||delete ie.helpers[le])}return sc}var zu={},Bu={exports:{}},zm;function Mw(){return zm||(zm=1,function(u,p){p.__esModule=!0;var y=nn();p.default=function(b){b.registerDecorator("inline",function(k,P,x,o){var B=k;return P.partials||(P.partials={},B=function(D,M){var O=x.partials;x.partials=y.extend({},O,P.partials);var L=k(D,M);return x.partials=O,L}),P.partials[o.args[0]]=o.fn,B})},u.exports=p.default}(Bu,Bu.exports)),Bu.exports}var Bm;function Lw(){if(Bm)return zu;Bm=1,zu.__esModule=!0,zu.registerDefaultDecorators=b;function u(k){return k&&k.__esModule?k:{default:k}}var p=Mw(),y=u(p);function b(k){y.default(k)}return zu}var Vu={exports:{}},Vm;function py(){return Vm||(Vm=1,function(u,p){p.__esModule=!0;var y=nn(),b={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(P){if(typeof P=="string"){var x=y.indexOf(b.methodMap,P.toLowerCase());x>=0?P=x:P=parseInt(P,10)}return P},log:function(P){if(P=b.lookupLevel(P),typeof console<"u"&&b.lookupLevel(b.level)<=P){var x=b.methodMap[P];console[x]||(x="log");for(var o=arguments.length,B=Array(o>1?o-1:0),D=1;D<o;D++)B[D-1]=arguments[D];console[x].apply(console,B)}}};p.default=b,u.exports=p.default}(Vu,Vu.exports)),Vu.exports}var Ga={},Ou={},Om;function Rw(){if(Om)return Ou;Om=1,Ou.__esModule=!0,Ou.createNewLookupObject=p;var u=nn();function p(){for(var y=arguments.length,b=Array(y),k=0;k<y;k++)b[k]=arguments[k];return u.extend.apply(void 0,[Object.create(null)].concat(b))}return Ou}var Fm;function fy(){if(Fm)return Ga;Fm=1,Ga.__esModule=!0,Ga.createProtoAccessControl=P,Ga.resultIsAllowed=x,Ga.resetLoggedProperties=D;function u(M){return M&&M.__esModule?M:{default:M}}var p=Rw(),y=py(),b=u(y),k=Object.create(null);function P(M){var O=Object.create(null);O.constructor=!1,O.__defineGetter__=!1,O.__defineSetter__=!1,O.__lookupGetter__=!1;var L=Object.create(null);return L.__proto__=!1,{properties:{whitelist:p.createNewLookupObject(L,M.allowedProtoProperties),defaultValue:M.allowProtoPropertiesByDefault},methods:{whitelist:p.createNewLookupObject(O,M.allowedProtoMethods),defaultValue:M.allowProtoMethodsByDefault}}}function x(M,O,L){return o(typeof M=="function"?O.methods:O.properties,L)}function o(M,O){return M.whitelist[O]!==void 0?M.whitelist[O]===!0:M.defaultValue!==void 0?M.defaultValue:(B(O),!1)}function B(M){k[M]!==!0&&(k[M]=!0,b.default.log("error",'Handlebars: Access has been denied to resolve the property "'+M+`" because it is not an "own property" of its parent.
802
+ You can add a runtime option to disable the check or this warning:
803
+ See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function D(){Object.keys(k).forEach(function(M){delete k[M]})}return Ga}var Nm;function mp(){if(Nm)return jn;Nm=1,jn.__esModule=!0,jn.HandlebarsEnvironment=T;function u(G){return G&&G.__esModule?G:{default:G}}var p=nn(),y=Wn(),b=u(y),k=dy(),P=Lw(),x=py(),o=u(x),B=fy(),D="4.7.8";jn.VERSION=D;var M=8;jn.COMPILER_REVISION=M;var O=7;jn.LAST_COMPATIBLE_COMPILER_REVISION=O;var L={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};jn.REVISION_CHANGES=L;var C="[object Object]";function T(G,ie,le){this.helpers=G||{},this.partials=ie||{},this.decorators=le||{},k.registerDefaultHelpers(this),P.registerDefaultDecorators(this)}T.prototype={constructor:T,logger:o.default,log:o.default.log,registerHelper:function(ie,le){if(p.toString.call(ie)===C){if(le)throw new b.default("Arg not supported with multiple helpers");p.extend(this.helpers,ie)}else this.helpers[ie]=le},unregisterHelper:function(ie){delete this.helpers[ie]},registerPartial:function(ie,le){if(p.toString.call(ie)===C)p.extend(this.partials,ie);else{if(typeof le>"u")throw new b.default('Attempting to register a partial called "'+ie+'" as undefined');this.partials[ie]=le}},unregisterPartial:function(ie){delete this.partials[ie]},registerDecorator:function(ie,le){if(p.toString.call(ie)===C){if(le)throw new b.default("Arg not supported with multiple decorators");p.extend(this.decorators,ie)}else this.decorators[ie]=le},unregisterDecorator:function(ie){delete this.decorators[ie]},resetLoggedPropertyAccesses:function(){B.resetLoggedProperties()}};var U=o.default.log;return jn.log=U,jn.createFrame=p.createFrame,jn.logger=o.default,jn}var Fu={exports:{}},qm;function Dw(){return qm||(qm=1,function(u,p){p.__esModule=!0;function y(b){this.string=b}y.prototype.toString=y.prototype.toHTML=function(){return""+this.string},p.default=y,u.exports=p.default}(Fu,Fu.exports)),Fu.exports}var To={},Nu={},Um;function zw(){if(Um)return Nu;Um=1,Nu.__esModule=!0,Nu.wrapHelper=u;function u(p,y){if(typeof p!="function")return p;var b=function(){var P=arguments[arguments.length-1];return arguments[arguments.length-1]=y(P),p.apply(this,arguments)};return b}return Nu}var jm;function Bw(){if(jm)return To;jm=1,To.__esModule=!0,To.checkRevision=M,To.template=O,To.wrapProgram=L,To.resolvePartial=C,To.invokePartial=T,To.noop=U;function u(ee){return ee&&ee.__esModule?ee:{default:ee}}function p(ee){if(ee&&ee.__esModule)return ee;var me={};if(ee!=null)for(var Le in ee)Object.prototype.hasOwnProperty.call(ee,Le)&&(me[Le]=ee[Le]);return me.default=ee,me}var y=nn(),b=p(y),k=Wn(),P=u(k),x=mp(),o=dy(),B=zw(),D=fy();function M(ee){var me=ee&&ee[0]||1,Le=x.COMPILER_REVISION;if(!(me>=x.LAST_COMPATIBLE_COMPILER_REVISION&&me<=x.COMPILER_REVISION))if(me<x.LAST_COMPATIBLE_COMPILER_REVISION){var qe=x.REVISION_CHANGES[Le],rt=x.REVISION_CHANGES[me];throw new P.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+qe+") or downgrade your runtime to an older version ("+rt+").")}else throw new P.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+ee[1]+").")}function O(ee,me){if(!me)throw new P.default("No environment passed to template");if(!ee||!ee.main)throw new P.default("Unknown template object: "+typeof ee);ee.main.decorator=ee.main_d,me.VM.checkRevision(ee.compiler);var Le=ee.compiler&&ee.compiler[0]===7;function qe(yt,ct,_t){_t.hash&&(ct=b.extend({},ct,_t.hash),_t.ids&&(_t.ids[0]=!0)),yt=me.VM.resolvePartial.call(this,yt,ct,_t);var qt=b.extend({},_t,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),Qt=me.VM.invokePartial.call(this,yt,ct,qt);if(Qt==null&&me.compile&&(_t.partials[_t.name]=me.compile(yt,ee.compilerOptions,me),Qt=_t.partials[_t.name](ct,qt)),Qt!=null){if(_t.indent){for(var xr=Qt.split(`
804
+ `),gr=0,ti=xr.length;gr<ti&&!(!xr[gr]&&gr+1===ti);gr++)xr[gr]=_t.indent+xr[gr];Qt=xr.join(`
805
+ `)}return Qt}else throw new P.default("The partial "+_t.name+" could not be compiled when running in runtime-only mode")}var rt={strict:function(ct,_t,qt){if(!ct||!(_t in ct))throw new P.default('"'+_t+'" not defined in '+ct,{loc:qt});return rt.lookupProperty(ct,_t)},lookupProperty:function(ct,_t){var qt=ct[_t];if(qt==null||Object.prototype.hasOwnProperty.call(ct,_t)||D.resultIsAllowed(qt,rt.protoAccessControl,_t))return qt},lookup:function(ct,_t){for(var qt=ct.length,Qt=0;Qt<qt;Qt++){var xr=ct[Qt]&&rt.lookupProperty(ct[Qt],_t);if(xr!=null)return ct[Qt][_t]}},lambda:function(ct,_t){return typeof ct=="function"?ct.call(_t):ct},escapeExpression:b.escapeExpression,invokePartial:qe,fn:function(ct){var _t=ee[ct];return _t.decorator=ee[ct+"_d"],_t},programs:[],program:function(ct,_t,qt,Qt,xr){var gr=this.programs[ct],ti=this.fn(ct);return _t||xr||Qt||qt?gr=L(this,ct,ti,_t,qt,Qt,xr):gr||(gr=this.programs[ct]=L(this,ct,ti)),gr},data:function(ct,_t){for(;ct&&_t--;)ct=ct._parent;return ct},mergeIfNeeded:function(ct,_t){var qt=ct||_t;return ct&&_t&&ct!==_t&&(qt=b.extend({},_t,ct)),qt},nullContext:Object.seal({}),noop:me.VM.noop,compilerInfo:ee.compiler};function St(yt){var ct=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],_t=ct.data;St._setup(ct),!ct.partial&&ee.useData&&(_t=G(yt,_t));var qt=void 0,Qt=ee.useBlockParams?[]:void 0;ee.useDepths&&(ct.depths?qt=yt!=ct.depths[0]?[yt].concat(ct.depths):ct.depths:qt=[yt]);function xr(gr){return""+ee.main(rt,gr,rt.helpers,rt.partials,_t,Qt,qt)}return xr=ie(ee.main,xr,rt,ct.depths||[],_t,Qt),xr(yt,ct)}return St.isTop=!0,St._setup=function(yt){if(yt.partial)rt.protoAccessControl=yt.protoAccessControl,rt.helpers=yt.helpers,rt.partials=yt.partials,rt.decorators=yt.decorators,rt.hooks=yt.hooks;else{var ct=b.extend({},me.helpers,yt.helpers);le(ct,rt),rt.helpers=ct,ee.usePartial&&(rt.partials=rt.mergeIfNeeded(yt.partials,me.partials)),(ee.usePartial||ee.useDecorators)&&(rt.decorators=b.extend({},me.decorators,yt.decorators)),rt.hooks={},rt.protoAccessControl=D.createProtoAccessControl(yt);var _t=yt.allowCallsToHelperMissing||Le;o.moveHelperToHooks(rt,"helperMissing",_t),o.moveHelperToHooks(rt,"blockHelperMissing",_t)}},St._child=function(yt,ct,_t,qt){if(ee.useBlockParams&&!_t)throw new P.default("must pass block params");if(ee.useDepths&&!qt)throw new P.default("must pass parent depths");return L(rt,yt,ee[yt],ct,0,_t,qt)},St}function L(ee,me,Le,qe,rt,St,yt){function ct(_t){var qt=arguments.length<=1||arguments[1]===void 0?{}:arguments[1],Qt=yt;return yt&&_t!=yt[0]&&!(_t===ee.nullContext&&yt[0]===null)&&(Qt=[_t].concat(yt)),Le(ee,_t,ee.helpers,ee.partials,qt.data||qe,St&&[qt.blockParams].concat(St),Qt)}return ct=ie(Le,ct,ee,yt,qe,St),ct.program=me,ct.depth=yt?yt.length:0,ct.blockParams=rt||0,ct}function C(ee,me,Le){return ee?!ee.call&&!Le.name&&(Le.name=ee,ee=Le.partials[ee]):Le.name==="@partial-block"?ee=Le.data["partial-block"]:ee=Le.partials[Le.name],ee}function T(ee,me,Le){var qe=Le.data&&Le.data["partial-block"];Le.partial=!0,Le.ids&&(Le.data.contextPath=Le.ids[0]||Le.data.contextPath);var rt=void 0;if(Le.fn&&Le.fn!==U&&function(){Le.data=x.createFrame(Le.data);var St=Le.fn;rt=Le.data["partial-block"]=function(ct){var _t=arguments.length<=1||arguments[1]===void 0?{}:arguments[1];return _t.data=x.createFrame(_t.data),_t.data["partial-block"]=qe,St(ct,_t)},St.partials&&(Le.partials=b.extend({},Le.partials,St.partials))}(),ee===void 0&&rt&&(ee=rt),ee===void 0)throw new P.default("The partial "+Le.name+" could not be found");if(ee instanceof Function)return ee(me,Le)}function U(){return""}function G(ee,me){return(!me||!("root"in me))&&(me=me?x.createFrame(me):{},me.root=ee),me}function ie(ee,me,Le,qe,rt,St){if(ee.decorator){var yt={};me=ee.decorator(me,yt,Le,qe&&qe[0],rt,St,qe),b.extend(me,yt)}return me}function le(ee,me){Object.keys(ee).forEach(function(Le){var qe=ee[Le];ee[Le]=Ie(qe,me)})}function Ie(ee,me){var Le=me.lookupProperty;return B.wrapHelper(ee,function(qe){return b.extend({lookupProperty:Le},qe)})}return To}var qu={exports:{}},Hm;function my(){return Hm||(Hm=1,function(u,p){p.__esModule=!0,p.default=function(y){(function(){typeof globalThis!="object"&&(Object.prototype.__defineGetter__("__magic__",function(){return this}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__)})();var b=globalThis.Handlebars;y.noConflict=function(){return globalThis.Handlebars===y&&(globalThis.Handlebars=b),y}},u.exports=p.default}(qu,qu.exports)),qu.exports}var Wm;function Vw(){return Wm||(Wm=1,function(u,p){p.__esModule=!0;function y(le){return le&&le.__esModule?le:{default:le}}function b(le){if(le&&le.__esModule)return le;var Ie={};if(le!=null)for(var ee in le)Object.prototype.hasOwnProperty.call(le,ee)&&(Ie[ee]=le[ee]);return Ie.default=le,Ie}var k=mp(),P=b(k),x=Dw(),o=y(x),B=Wn(),D=y(B),M=nn(),O=b(M),L=Bw(),C=b(L),T=my(),U=y(T);function G(){var le=new P.HandlebarsEnvironment;return O.extend(le,P),le.SafeString=o.default,le.Exception=D.default,le.Utils=O,le.escapeExpression=O.escapeExpression,le.VM=C,le.template=function(Ie){return C.template(Ie,le)},le}var ie=G();ie.create=G,U.default(ie),ie.default=ie,p.default=ie,u.exports=p.default}(Cu,Cu.exports)),Cu.exports}var Uu={exports:{}},Zm;function gy(){return Zm||(Zm=1,function(u,p){p.__esModule=!0;var y={helpers:{helperExpression:function(k){return k.type==="SubExpression"||(k.type==="MustacheStatement"||k.type==="BlockStatement")&&!!(k.params&&k.params.length||k.hash)},scopedId:function(k){return/^\.|this\b/.test(k.original)},simpleId:function(k){return k.parts.length===1&&!y.helpers.scopedId(k)&&!k.depth}}};p.default=y,u.exports=p.default}(Uu,Uu.exports)),Uu.exports}var Ja={},ju={exports:{}},Km;function Ow(){return Km||(Km=1,function(u,p){p.__esModule=!0;var y=function(){var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,partialBlock:12,content:13,COMMENT:14,CONTENT:15,openRawBlock:16,rawBlock_repetition0:17,END_RAW_BLOCK:18,OPEN_RAW_BLOCK:19,helperName:20,openRawBlock_repetition0:21,openRawBlock_option0:22,CLOSE_RAW_BLOCK:23,openBlock:24,block_option0:25,closeBlock:26,openInverse:27,block_option1:28,OPEN_BLOCK:29,openBlock_repetition0:30,openBlock_option0:31,openBlock_option1:32,CLOSE:33,OPEN_INVERSE:34,openInverse_repetition0:35,openInverse_option0:36,openInverse_option1:37,openInverseChain:38,OPEN_INVERSE_CHAIN:39,openInverseChain_repetition0:40,openInverseChain_option0:41,openInverseChain_option1:42,inverseAndProgram:43,INVERSE:44,inverseChain:45,inverseChain_option0:46,OPEN_ENDBLOCK:47,OPEN:48,mustache_repetition0:49,mustache_option0:50,OPEN_UNESCAPED:51,mustache_repetition1:52,mustache_option1:53,CLOSE_UNESCAPED:54,OPEN_PARTIAL:55,partialName:56,partial_repetition0:57,partial_option0:58,openPartialBlock:59,OPEN_PARTIAL_BLOCK:60,openPartialBlock_repetition0:61,openPartialBlock_option0:62,param:63,sexpr:64,OPEN_SEXPR:65,sexpr_repetition0:66,sexpr_option0:67,CLOSE_SEXPR:68,hash:69,hash_repetition_plus0:70,hashSegment:71,ID:72,EQUALS:73,blockParams:74,OPEN_BLOCK_PARAMS:75,blockParams_repetition_plus0:76,CLOSE_BLOCK_PARAMS:77,path:78,dataName:79,STRING:80,NUMBER:81,BOOLEAN:82,UNDEFINED:83,NULL:84,DATA:85,pathSegments:86,SEP:87,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"COMMENT",15:"CONTENT",18:"END_RAW_BLOCK",19:"OPEN_RAW_BLOCK",23:"CLOSE_RAW_BLOCK",29:"OPEN_BLOCK",33:"CLOSE",34:"OPEN_INVERSE",39:"OPEN_INVERSE_CHAIN",44:"INVERSE",47:"OPEN_ENDBLOCK",48:"OPEN",51:"OPEN_UNESCAPED",54:"CLOSE_UNESCAPED",55:"OPEN_PARTIAL",60:"OPEN_PARTIAL_BLOCK",65:"OPEN_SEXPR",68:"CLOSE_SEXPR",72:"ID",73:"EQUALS",75:"OPEN_BLOCK_PARAMS",77:"CLOSE_BLOCK_PARAMS",80:"STRING",81:"NUMBER",82:"BOOLEAN",83:"UNDEFINED",84:"NULL",85:"DATA",87:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[13,1],[10,3],[16,5],[9,4],[9,4],[24,6],[27,6],[38,6],[43,2],[45,3],[45,1],[26,3],[8,5],[8,5],[11,5],[12,3],[59,5],[63,1],[63,1],[64,5],[69,1],[71,3],[74,3],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[56,1],[56,1],[79,2],[78,1],[86,3],[86,1],[6,0],[6,2],[17,0],[17,2],[21,0],[21,2],[22,0],[22,1],[25,0],[25,1],[28,0],[28,1],[30,0],[30,2],[31,0],[31,1],[32,0],[32,1],[35,0],[35,2],[36,0],[36,1],[37,0],[37,1],[40,0],[40,2],[41,0],[41,1],[42,0],[42,1],[46,0],[46,1],[49,0],[49,2],[50,0],[50,1],[52,0],[52,2],[53,0],[53,1],[57,0],[57,2],[58,0],[58,1],[61,0],[61,2],[62,0],[62,1],[66,0],[66,2],[67,0],[67,1],[70,1],[70,2],[76,1],[76,2]],performAction:function(o,B,D,M,O,L,C){var T=L.length-1;switch(O){case 1:return L[T-1];case 2:this.$=M.prepareProgram(L[T]);break;case 3:this.$=L[T];break;case 4:this.$=L[T];break;case 5:this.$=L[T];break;case 6:this.$=L[T];break;case 7:this.$=L[T];break;case 8:this.$=L[T];break;case 9:this.$={type:"CommentStatement",value:M.stripComment(L[T]),strip:M.stripFlags(L[T],L[T]),loc:M.locInfo(this._$)};break;case 10:this.$={type:"ContentStatement",original:L[T],value:L[T],loc:M.locInfo(this._$)};break;case 11:this.$=M.prepareRawBlock(L[T-2],L[T-1],L[T],this._$);break;case 12:this.$={path:L[T-3],params:L[T-2],hash:L[T-1]};break;case 13:this.$=M.prepareBlock(L[T-3],L[T-2],L[T-1],L[T],!1,this._$);break;case 14:this.$=M.prepareBlock(L[T-3],L[T-2],L[T-1],L[T],!0,this._$);break;case 15:this.$={open:L[T-5],path:L[T-4],params:L[T-3],hash:L[T-2],blockParams:L[T-1],strip:M.stripFlags(L[T-5],L[T])};break;case 16:this.$={path:L[T-4],params:L[T-3],hash:L[T-2],blockParams:L[T-1],strip:M.stripFlags(L[T-5],L[T])};break;case 17:this.$={path:L[T-4],params:L[T-3],hash:L[T-2],blockParams:L[T-1],strip:M.stripFlags(L[T-5],L[T])};break;case 18:this.$={strip:M.stripFlags(L[T-1],L[T-1]),program:L[T]};break;case 19:var U=M.prepareBlock(L[T-2],L[T-1],L[T],L[T],!1,this._$),G=M.prepareProgram([U],L[T-1].loc);G.chained=!0,this.$={strip:L[T-2].strip,program:G,chain:!0};break;case 20:this.$=L[T];break;case 21:this.$={path:L[T-1],strip:M.stripFlags(L[T-2],L[T])};break;case 22:this.$=M.prepareMustache(L[T-3],L[T-2],L[T-1],L[T-4],M.stripFlags(L[T-4],L[T]),this._$);break;case 23:this.$=M.prepareMustache(L[T-3],L[T-2],L[T-1],L[T-4],M.stripFlags(L[T-4],L[T]),this._$);break;case 24:this.$={type:"PartialStatement",name:L[T-3],params:L[T-2],hash:L[T-1],indent:"",strip:M.stripFlags(L[T-4],L[T]),loc:M.locInfo(this._$)};break;case 25:this.$=M.preparePartialBlock(L[T-2],L[T-1],L[T],this._$);break;case 26:this.$={path:L[T-3],params:L[T-2],hash:L[T-1],strip:M.stripFlags(L[T-4],L[T])};break;case 27:this.$=L[T];break;case 28:this.$=L[T];break;case 29:this.$={type:"SubExpression",path:L[T-3],params:L[T-2],hash:L[T-1],loc:M.locInfo(this._$)};break;case 30:this.$={type:"Hash",pairs:L[T],loc:M.locInfo(this._$)};break;case 31:this.$={type:"HashPair",key:M.id(L[T-2]),value:L[T],loc:M.locInfo(this._$)};break;case 32:this.$=M.id(L[T-1]);break;case 33:this.$=L[T];break;case 34:this.$=L[T];break;case 35:this.$={type:"StringLiteral",value:L[T],original:L[T],loc:M.locInfo(this._$)};break;case 36:this.$={type:"NumberLiteral",value:Number(L[T]),original:Number(L[T]),loc:M.locInfo(this._$)};break;case 37:this.$={type:"BooleanLiteral",value:L[T]==="true",original:L[T]==="true",loc:M.locInfo(this._$)};break;case 38:this.$={type:"UndefinedLiteral",original:void 0,value:void 0,loc:M.locInfo(this._$)};break;case 39:this.$={type:"NullLiteral",original:null,value:null,loc:M.locInfo(this._$)};break;case 40:this.$=L[T];break;case 41:this.$=L[T];break;case 42:this.$=M.preparePath(!0,L[T],this._$);break;case 43:this.$=M.preparePath(!1,L[T],this._$);break;case 44:L[T-2].push({part:M.id(L[T]),original:L[T],separator:L[T-1]}),this.$=L[T-2];break;case 45:this.$=[{part:M.id(L[T]),original:L[T]}];break;case 46:this.$=[];break;case 47:L[T-1].push(L[T]);break;case 48:this.$=[];break;case 49:L[T-1].push(L[T]);break;case 50:this.$=[];break;case 51:L[T-1].push(L[T]);break;case 58:this.$=[];break;case 59:L[T-1].push(L[T]);break;case 64:this.$=[];break;case 65:L[T-1].push(L[T]);break;case 70:this.$=[];break;case 71:L[T-1].push(L[T]);break;case 78:this.$=[];break;case 79:L[T-1].push(L[T]);break;case 82:this.$=[];break;case 83:L[T-1].push(L[T]);break;case 86:this.$=[];break;case 87:L[T-1].push(L[T]);break;case 90:this.$=[];break;case 91:L[T-1].push(L[T]);break;case 94:this.$=[];break;case 95:L[T-1].push(L[T]);break;case 98:this.$=[L[T]];break;case 99:L[T-1].push(L[T]);break;case 100:this.$=[L[T]];break;case 101:L[T-1].push(L[T]);break}},table:[{3:1,4:2,5:[2,46],6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:10,13:11,14:[1,12],15:[1,20],16:17,19:[1,23],24:15,27:16,29:[1,21],34:[1,22],39:[2,2],44:[2,2],47:[2,2],48:[1,13],51:[1,14],55:[1,18],59:19,60:[1,24]},{1:[2,1]},{5:[2,47],14:[2,47],15:[2,47],19:[2,47],29:[2,47],34:[2,47],39:[2,47],44:[2,47],47:[2,47],48:[2,47],51:[2,47],55:[2,47],60:[2,47]},{5:[2,3],14:[2,3],15:[2,3],19:[2,3],29:[2,3],34:[2,3],39:[2,3],44:[2,3],47:[2,3],48:[2,3],51:[2,3],55:[2,3],60:[2,3]},{5:[2,4],14:[2,4],15:[2,4],19:[2,4],29:[2,4],34:[2,4],39:[2,4],44:[2,4],47:[2,4],48:[2,4],51:[2,4],55:[2,4],60:[2,4]},{5:[2,5],14:[2,5],15:[2,5],19:[2,5],29:[2,5],34:[2,5],39:[2,5],44:[2,5],47:[2,5],48:[2,5],51:[2,5],55:[2,5],60:[2,5]},{5:[2,6],14:[2,6],15:[2,6],19:[2,6],29:[2,6],34:[2,6],39:[2,6],44:[2,6],47:[2,6],48:[2,6],51:[2,6],55:[2,6],60:[2,6]},{5:[2,7],14:[2,7],15:[2,7],19:[2,7],29:[2,7],34:[2,7],39:[2,7],44:[2,7],47:[2,7],48:[2,7],51:[2,7],55:[2,7],60:[2,7]},{5:[2,8],14:[2,8],15:[2,8],19:[2,8],29:[2,8],34:[2,8],39:[2,8],44:[2,8],47:[2,8],48:[2,8],51:[2,8],55:[2,8],60:[2,8]},{5:[2,9],14:[2,9],15:[2,9],19:[2,9],29:[2,9],34:[2,9],39:[2,9],44:[2,9],47:[2,9],48:[2,9],51:[2,9],55:[2,9],60:[2,9]},{20:25,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:36,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:37,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{4:38,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{15:[2,48],17:39,18:[2,48]},{20:41,56:40,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:44,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{5:[2,10],14:[2,10],15:[2,10],18:[2,10],19:[2,10],29:[2,10],34:[2,10],39:[2,10],44:[2,10],47:[2,10],48:[2,10],51:[2,10],55:[2,10],60:[2,10]},{20:45,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:46,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:47,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:41,56:48,64:42,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[2,78],49:49,65:[2,78],72:[2,78],80:[2,78],81:[2,78],82:[2,78],83:[2,78],84:[2,78],85:[2,78]},{23:[2,33],33:[2,33],54:[2,33],65:[2,33],68:[2,33],72:[2,33],75:[2,33],80:[2,33],81:[2,33],82:[2,33],83:[2,33],84:[2,33],85:[2,33]},{23:[2,34],33:[2,34],54:[2,34],65:[2,34],68:[2,34],72:[2,34],75:[2,34],80:[2,34],81:[2,34],82:[2,34],83:[2,34],84:[2,34],85:[2,34]},{23:[2,35],33:[2,35],54:[2,35],65:[2,35],68:[2,35],72:[2,35],75:[2,35],80:[2,35],81:[2,35],82:[2,35],83:[2,35],84:[2,35],85:[2,35]},{23:[2,36],33:[2,36],54:[2,36],65:[2,36],68:[2,36],72:[2,36],75:[2,36],80:[2,36],81:[2,36],82:[2,36],83:[2,36],84:[2,36],85:[2,36]},{23:[2,37],33:[2,37],54:[2,37],65:[2,37],68:[2,37],72:[2,37],75:[2,37],80:[2,37],81:[2,37],82:[2,37],83:[2,37],84:[2,37],85:[2,37]},{23:[2,38],33:[2,38],54:[2,38],65:[2,38],68:[2,38],72:[2,38],75:[2,38],80:[2,38],81:[2,38],82:[2,38],83:[2,38],84:[2,38],85:[2,38]},{23:[2,39],33:[2,39],54:[2,39],65:[2,39],68:[2,39],72:[2,39],75:[2,39],80:[2,39],81:[2,39],82:[2,39],83:[2,39],84:[2,39],85:[2,39]},{23:[2,43],33:[2,43],54:[2,43],65:[2,43],68:[2,43],72:[2,43],75:[2,43],80:[2,43],81:[2,43],82:[2,43],83:[2,43],84:[2,43],85:[2,43],87:[1,50]},{72:[1,35],86:51},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{52:52,54:[2,82],65:[2,82],72:[2,82],80:[2,82],81:[2,82],82:[2,82],83:[2,82],84:[2,82],85:[2,82]},{25:53,38:55,39:[1,57],43:56,44:[1,58],45:54,47:[2,54]},{28:59,43:60,44:[1,58],47:[2,56]},{13:62,15:[1,20],18:[1,61]},{33:[2,86],57:63,65:[2,86],72:[2,86],80:[2,86],81:[2,86],82:[2,86],83:[2,86],84:[2,86],85:[2,86]},{33:[2,40],65:[2,40],72:[2,40],80:[2,40],81:[2,40],82:[2,40],83:[2,40],84:[2,40],85:[2,40]},{33:[2,41],65:[2,41],72:[2,41],80:[2,41],81:[2,41],82:[2,41],83:[2,41],84:[2,41],85:[2,41]},{20:64,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:65,47:[1,66]},{30:67,33:[2,58],65:[2,58],72:[2,58],75:[2,58],80:[2,58],81:[2,58],82:[2,58],83:[2,58],84:[2,58],85:[2,58]},{33:[2,64],35:68,65:[2,64],72:[2,64],75:[2,64],80:[2,64],81:[2,64],82:[2,64],83:[2,64],84:[2,64],85:[2,64]},{21:69,23:[2,50],65:[2,50],72:[2,50],80:[2,50],81:[2,50],82:[2,50],83:[2,50],84:[2,50],85:[2,50]},{33:[2,90],61:70,65:[2,90],72:[2,90],80:[2,90],81:[2,90],82:[2,90],83:[2,90],84:[2,90],85:[2,90]},{20:74,33:[2,80],50:71,63:72,64:75,65:[1,43],69:73,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{72:[1,79]},{23:[2,42],33:[2,42],54:[2,42],65:[2,42],68:[2,42],72:[2,42],75:[2,42],80:[2,42],81:[2,42],82:[2,42],83:[2,42],84:[2,42],85:[2,42],87:[1,50]},{20:74,53:80,54:[2,84],63:81,64:75,65:[1,43],69:82,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{26:83,47:[1,66]},{47:[2,55]},{4:84,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],39:[2,46],44:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{47:[2,20]},{20:85,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{4:86,6:3,14:[2,46],15:[2,46],19:[2,46],29:[2,46],34:[2,46],47:[2,46],48:[2,46],51:[2,46],55:[2,46],60:[2,46]},{26:87,47:[1,66]},{47:[2,57]},{5:[2,11],14:[2,11],15:[2,11],19:[2,11],29:[2,11],34:[2,11],39:[2,11],44:[2,11],47:[2,11],48:[2,11],51:[2,11],55:[2,11],60:[2,11]},{15:[2,49],18:[2,49]},{20:74,33:[2,88],58:88,63:89,64:75,65:[1,43],69:90,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{65:[2,94],66:91,68:[2,94],72:[2,94],80:[2,94],81:[2,94],82:[2,94],83:[2,94],84:[2,94],85:[2,94]},{5:[2,25],14:[2,25],15:[2,25],19:[2,25],29:[2,25],34:[2,25],39:[2,25],44:[2,25],47:[2,25],48:[2,25],51:[2,25],55:[2,25],60:[2,25]},{20:92,72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,31:93,33:[2,60],63:94,64:75,65:[1,43],69:95,70:76,71:77,72:[1,78],75:[2,60],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,66],36:96,63:97,64:75,65:[1,43],69:98,70:76,71:77,72:[1,78],75:[2,66],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,22:99,23:[2,52],63:100,64:75,65:[1,43],69:101,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{20:74,33:[2,92],62:102,63:103,64:75,65:[1,43],69:104,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,105]},{33:[2,79],65:[2,79],72:[2,79],80:[2,79],81:[2,79],82:[2,79],83:[2,79],84:[2,79],85:[2,79]},{33:[2,81]},{23:[2,27],33:[2,27],54:[2,27],65:[2,27],68:[2,27],72:[2,27],75:[2,27],80:[2,27],81:[2,27],82:[2,27],83:[2,27],84:[2,27],85:[2,27]},{23:[2,28],33:[2,28],54:[2,28],65:[2,28],68:[2,28],72:[2,28],75:[2,28],80:[2,28],81:[2,28],82:[2,28],83:[2,28],84:[2,28],85:[2,28]},{23:[2,30],33:[2,30],54:[2,30],68:[2,30],71:106,72:[1,107],75:[2,30]},{23:[2,98],33:[2,98],54:[2,98],68:[2,98],72:[2,98],75:[2,98]},{23:[2,45],33:[2,45],54:[2,45],65:[2,45],68:[2,45],72:[2,45],73:[1,108],75:[2,45],80:[2,45],81:[2,45],82:[2,45],83:[2,45],84:[2,45],85:[2,45],87:[2,45]},{23:[2,44],33:[2,44],54:[2,44],65:[2,44],68:[2,44],72:[2,44],75:[2,44],80:[2,44],81:[2,44],82:[2,44],83:[2,44],84:[2,44],85:[2,44],87:[2,44]},{54:[1,109]},{54:[2,83],65:[2,83],72:[2,83],80:[2,83],81:[2,83],82:[2,83],83:[2,83],84:[2,83],85:[2,83]},{54:[2,85]},{5:[2,13],14:[2,13],15:[2,13],19:[2,13],29:[2,13],34:[2,13],39:[2,13],44:[2,13],47:[2,13],48:[2,13],51:[2,13],55:[2,13],60:[2,13]},{38:55,39:[1,57],43:56,44:[1,58],45:111,46:110,47:[2,76]},{33:[2,70],40:112,65:[2,70],72:[2,70],75:[2,70],80:[2,70],81:[2,70],82:[2,70],83:[2,70],84:[2,70],85:[2,70]},{47:[2,18]},{5:[2,14],14:[2,14],15:[2,14],19:[2,14],29:[2,14],34:[2,14],39:[2,14],44:[2,14],47:[2,14],48:[2,14],51:[2,14],55:[2,14],60:[2,14]},{33:[1,113]},{33:[2,87],65:[2,87],72:[2,87],80:[2,87],81:[2,87],82:[2,87],83:[2,87],84:[2,87],85:[2,87]},{33:[2,89]},{20:74,63:115,64:75,65:[1,43],67:114,68:[2,96],69:116,70:76,71:77,72:[1,78],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{33:[1,117]},{32:118,33:[2,62],74:119,75:[1,120]},{33:[2,59],65:[2,59],72:[2,59],75:[2,59],80:[2,59],81:[2,59],82:[2,59],83:[2,59],84:[2,59],85:[2,59]},{33:[2,61],75:[2,61]},{33:[2,68],37:121,74:122,75:[1,120]},{33:[2,65],65:[2,65],72:[2,65],75:[2,65],80:[2,65],81:[2,65],82:[2,65],83:[2,65],84:[2,65],85:[2,65]},{33:[2,67],75:[2,67]},{23:[1,123]},{23:[2,51],65:[2,51],72:[2,51],80:[2,51],81:[2,51],82:[2,51],83:[2,51],84:[2,51],85:[2,51]},{23:[2,53]},{33:[1,124]},{33:[2,91],65:[2,91],72:[2,91],80:[2,91],81:[2,91],82:[2,91],83:[2,91],84:[2,91],85:[2,91]},{33:[2,93]},{5:[2,22],14:[2,22],15:[2,22],19:[2,22],29:[2,22],34:[2,22],39:[2,22],44:[2,22],47:[2,22],48:[2,22],51:[2,22],55:[2,22],60:[2,22]},{23:[2,99],33:[2,99],54:[2,99],68:[2,99],72:[2,99],75:[2,99]},{73:[1,108]},{20:74,63:125,64:75,65:[1,43],72:[1,35],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,23],14:[2,23],15:[2,23],19:[2,23],29:[2,23],34:[2,23],39:[2,23],44:[2,23],47:[2,23],48:[2,23],51:[2,23],55:[2,23],60:[2,23]},{47:[2,19]},{47:[2,77]},{20:74,33:[2,72],41:126,63:127,64:75,65:[1,43],69:128,70:76,71:77,72:[1,78],75:[2,72],78:26,79:27,80:[1,28],81:[1,29],82:[1,30],83:[1,31],84:[1,32],85:[1,34],86:33},{5:[2,24],14:[2,24],15:[2,24],19:[2,24],29:[2,24],34:[2,24],39:[2,24],44:[2,24],47:[2,24],48:[2,24],51:[2,24],55:[2,24],60:[2,24]},{68:[1,129]},{65:[2,95],68:[2,95],72:[2,95],80:[2,95],81:[2,95],82:[2,95],83:[2,95],84:[2,95],85:[2,95]},{68:[2,97]},{5:[2,21],14:[2,21],15:[2,21],19:[2,21],29:[2,21],34:[2,21],39:[2,21],44:[2,21],47:[2,21],48:[2,21],51:[2,21],55:[2,21],60:[2,21]},{33:[1,130]},{33:[2,63]},{72:[1,132],76:131},{33:[1,133]},{33:[2,69]},{15:[2,12],18:[2,12]},{14:[2,26],15:[2,26],19:[2,26],29:[2,26],34:[2,26],47:[2,26],48:[2,26],51:[2,26],55:[2,26],60:[2,26]},{23:[2,31],33:[2,31],54:[2,31],68:[2,31],72:[2,31],75:[2,31]},{33:[2,74],42:134,74:135,75:[1,120]},{33:[2,71],65:[2,71],72:[2,71],75:[2,71],80:[2,71],81:[2,71],82:[2,71],83:[2,71],84:[2,71],85:[2,71]},{33:[2,73],75:[2,73]},{23:[2,29],33:[2,29],54:[2,29],65:[2,29],68:[2,29],72:[2,29],75:[2,29],80:[2,29],81:[2,29],82:[2,29],83:[2,29],84:[2,29],85:[2,29]},{14:[2,15],15:[2,15],19:[2,15],29:[2,15],34:[2,15],39:[2,15],44:[2,15],47:[2,15],48:[2,15],51:[2,15],55:[2,15],60:[2,15]},{72:[1,137],77:[1,136]},{72:[2,100],77:[2,100]},{14:[2,16],15:[2,16],19:[2,16],29:[2,16],34:[2,16],44:[2,16],47:[2,16],48:[2,16],51:[2,16],55:[2,16],60:[2,16]},{33:[1,138]},{33:[2,75]},{33:[2,32]},{72:[2,101],77:[2,101]},{14:[2,17],15:[2,17],19:[2,17],29:[2,17],34:[2,17],39:[2,17],44:[2,17],47:[2,17],48:[2,17],51:[2,17],55:[2,17],60:[2,17]}],defaultActions:{4:[2,1],54:[2,55],56:[2,20],60:[2,57],73:[2,81],82:[2,85],86:[2,18],90:[2,89],101:[2,53],104:[2,93],110:[2,19],111:[2,77],116:[2,97],119:[2,63],122:[2,69],135:[2,75],136:[2,32]},parseError:function(o,B){throw new Error(o)},parse:function(o){var B=this,D=[0],M=[null],O=[],L=this.table,C="",T=0,U=0;this.lexer.setInput(o),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc>"u"&&(this.lexer.yylloc={});var G=this.lexer.yylloc;O.push(G);var ie=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);function le(){var qt;return qt=B.lexer.lex()||1,typeof qt!="number"&&(qt=B.symbols_[qt]||qt),qt}for(var Ie,ee,me,Le,qe={},rt,St,yt,ct;;){if(ee=D[D.length-1],this.defaultActions[ee]?me=this.defaultActions[ee]:((Ie===null||typeof Ie>"u")&&(Ie=le()),me=L[ee]&&L[ee][Ie]),typeof me>"u"||!me.length||!me[0]){var _t="";{ct=[];for(rt in L[ee])this.terminals_[rt]&&rt>2&&ct.push("'"+this.terminals_[rt]+"'");this.lexer.showPosition?_t="Parse error on line "+(T+1)+`:
806
+ `+this.lexer.showPosition()+`
807
+ Expecting `+ct.join(", ")+", got '"+(this.terminals_[Ie]||Ie)+"'":_t="Parse error on line "+(T+1)+": Unexpected "+(Ie==1?"end of input":"'"+(this.terminals_[Ie]||Ie)+"'"),this.parseError(_t,{text:this.lexer.match,token:this.terminals_[Ie]||Ie,line:this.lexer.yylineno,loc:G,expected:ct})}}if(me[0]instanceof Array&&me.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ee+", token: "+Ie);switch(me[0]){case 1:D.push(Ie),M.push(this.lexer.yytext),O.push(this.lexer.yylloc),D.push(me[1]),Ie=null,U=this.lexer.yyleng,C=this.lexer.yytext,T=this.lexer.yylineno,G=this.lexer.yylloc;break;case 2:if(St=this.productions_[me[1]][1],qe.$=M[M.length-St],qe._$={first_line:O[O.length-(St||1)].first_line,last_line:O[O.length-1].last_line,first_column:O[O.length-(St||1)].first_column,last_column:O[O.length-1].last_column},ie&&(qe._$.range=[O[O.length-(St||1)].range[0],O[O.length-1].range[1]]),Le=this.performAction.call(qe,C,U,T,this.yy,me[1],M,O),typeof Le<"u")return Le;St&&(D=D.slice(0,-1*St*2),M=M.slice(0,-1*St),O=O.slice(0,-1*St)),D.push(this.productions_[me[1]][0]),M.push(qe.$),O.push(qe._$),yt=L[D[D.length-2]][D[D.length-1]],D.push(yt);break;case 3:return!0}}return!0}},k=function(){var x={EOF:1,parseError:function(B,D){if(this.yy.parser)this.yy.parser.parseError(B,D);else throw new Error(B)},setInput:function(B){return this._input=B,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var B=this._input[0];this.yytext+=B,this.yyleng++,this.offset++,this.match+=B,this.matched+=B;var D=B.match(/(?:\r\n?|\n).*/g);return D?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),B},unput:function(B){var D=B.length,M=B.split(/(?:\r\n?|\n)/g);this._input=B+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D-1),this.offset-=D;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),M.length-1&&(this.yylineno-=M.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:M?(M.length===O.length?this.yylloc.first_column:0)+O[O.length-M.length].length-M[0].length:this.yylloc.first_column-D},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-D]),this},more:function(){return this._more=!0,this},less:function(B){this.unput(this.match.slice(B))},pastInput:function(){var B=this.matched.substr(0,this.matched.length-this.match.length);return(B.length>20?"...":"")+B.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var B=this.match;return B.length<20&&(B+=this._input.substr(0,20-B.length)),(B.substr(0,20)+(B.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var B=this.pastInput(),D=new Array(B.length+1).join("-");return B+this.upcomingInput()+`
808
+ `+D+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var B,D,M,O,L;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),T=0;T<C.length&&(M=this._input.match(this.rules[C[T]]),!(M&&(!D||M[0].length>D[0].length)&&(D=M,O=T,!this.options.flex)));T++);return D?(L=D[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+D[0].length},this.yytext+=D[0],this.match+=D[0],this.matches=D,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(D[0].length),this.matched+=D[0],B=this.performAction.call(this,this.yy,this,C[O],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
809
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var B=this.next();return typeof B<"u"?B:this.lex()},begin:function(B){this.conditionStack.push(B)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(B){this.begin(B)}};return x.options={},x.performAction=function(B,D,M,O){function L(C,T){return D.yytext=D.yytext.substring(C,D.yyleng-T+C)}switch(M){case 0:if(D.yytext.slice(-2)==="\\\\"?(L(0,1),this.begin("mu")):D.yytext.slice(-1)==="\\"?(L(0,1),this.begin("emu")):this.begin("mu"),D.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(L(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(D.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return D.yytext=L(1,2).replace(/\\"/g,'"'),80;case 32:return D.yytext=L(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return D.yytext=D.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},x.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],x.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},x}();b.lexer=k;function P(){this.yy={}}return P.prototype=b,b.Parser=P,new P}();p.default=y,u.exports=p.default}(ju,ju.exports)),ju.exports}var Hu={exports:{}},Wu={exports:{}},Gm;function yy(){return Gm||(Gm=1,function(u,p){p.__esModule=!0;function y(D){return D&&D.__esModule?D:{default:D}}var b=Wn(),k=y(b);function P(){this.parents=[]}P.prototype={constructor:P,mutating:!1,acceptKey:function(M,O){var L=this.accept(M[O]);if(this.mutating){if(L&&!P.prototype[L.type])throw new k.default('Unexpected node type "'+L.type+'" found when accepting '+O+" on "+M.type);M[O]=L}},acceptRequired:function(M,O){if(this.acceptKey(M,O),!M[O])throw new k.default(M.type+" requires "+O)},acceptArray:function(M){for(var O=0,L=M.length;O<L;O++)this.acceptKey(M,O),M[O]||(M.splice(O,1),O--,L--)},accept:function(M){if(M){if(!this[M.type])throw new k.default("Unknown type: "+M.type,M);this.current&&this.parents.unshift(this.current),this.current=M;var O=this[M.type](M);if(this.current=this.parents.shift(),!this.mutating||O)return O;if(O!==!1)return M}},Program:function(M){this.acceptArray(M.body)},MustacheStatement:x,Decorator:x,BlockStatement:o,DecoratorBlock:o,PartialStatement:B,PartialBlockStatement:function(M){B.call(this,M),this.acceptKey(M,"program")},ContentStatement:function(){},CommentStatement:function(){},SubExpression:x,PathExpression:function(){},StringLiteral:function(){},NumberLiteral:function(){},BooleanLiteral:function(){},UndefinedLiteral:function(){},NullLiteral:function(){},Hash:function(M){this.acceptArray(M.pairs)},HashPair:function(M){this.acceptRequired(M,"value")}};function x(D){this.acceptRequired(D,"path"),this.acceptArray(D.params),this.acceptKey(D,"hash")}function o(D){x.call(this,D),this.acceptKey(D,"program"),this.acceptKey(D,"inverse")}function B(D){this.acceptRequired(D,"name"),this.acceptArray(D.params),this.acceptKey(D,"hash")}p.default=P,u.exports=p.default}(Wu,Wu.exports)),Wu.exports}var Jm;function Fw(){return Jm||(Jm=1,function(u,p){p.__esModule=!0;function y(M){return M&&M.__esModule?M:{default:M}}var b=yy(),k=y(b);function P(){var M=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=M}P.prototype=new k.default,P.prototype.Program=function(M){var O=!this.options.ignoreStandalone,L=!this.isRootSeen;this.isRootSeen=!0;for(var C=M.body,T=0,U=C.length;T<U;T++){var G=C[T],ie=this.accept(G);if(ie){var le=x(C,T,L),Ie=o(C,T,L),ee=ie.openStandalone&&le,me=ie.closeStandalone&&Ie,Le=ie.inlineStandalone&&le&&Ie;ie.close&&B(C,T,!0),ie.open&&D(C,T,!0),O&&Le&&(B(C,T),D(C,T)&&G.type==="PartialStatement"&&(G.indent=/([ \t]+$)/.exec(C[T-1].original)[1])),O&&ee&&(B((G.program||G.inverse).body),D(C,T)),O&&me&&(B(C,T),D((G.inverse||G.program).body))}}return M},P.prototype.BlockStatement=P.prototype.DecoratorBlock=P.prototype.PartialBlockStatement=function(M){this.accept(M.program),this.accept(M.inverse);var O=M.program||M.inverse,L=M.program&&M.inverse,C=L,T=L;if(L&&L.chained)for(C=L.body[0].program;T.chained;)T=T.body[T.body.length-1].program;var U={open:M.openStrip.open,close:M.closeStrip.close,openStandalone:o(O.body),closeStandalone:x((C||O).body)};if(M.openStrip.close&&B(O.body,null,!0),L){var G=M.inverseStrip;G.open&&D(O.body,null,!0),G.close&&B(C.body,null,!0),M.closeStrip.open&&D(T.body,null,!0),!this.options.ignoreStandalone&&x(O.body)&&o(C.body)&&(D(O.body),B(C.body))}else M.closeStrip.open&&D(O.body,null,!0);return U},P.prototype.Decorator=P.prototype.MustacheStatement=function(M){return M.strip},P.prototype.PartialStatement=P.prototype.CommentStatement=function(M){var O=M.strip||{};return{inlineStandalone:!0,open:O.open,close:O.close}};function x(M,O,L){O===void 0&&(O=M.length);var C=M[O-1],T=M[O-2];if(!C)return L;if(C.type==="ContentStatement")return(T||!L?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(C.original)}function o(M,O,L){O===void 0&&(O=-1);var C=M[O+1],T=M[O+2];if(!C)return L;if(C.type==="ContentStatement")return(T||!L?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(C.original)}function B(M,O,L){var C=M[O==null?0:O+1];if(!(!C||C.type!=="ContentStatement"||!L&&C.rightStripped)){var T=C.value;C.value=C.value.replace(L?/^\s+/:/^[ \t]*\r?\n?/,""),C.rightStripped=C.value!==T}}function D(M,O,L){var C=M[O==null?M.length-1:O-1];if(!(!C||C.type!=="ContentStatement"||!L&&C.leftStripped)){var T=C.value;return C.value=C.value.replace(L?/\s+$/:/[ \t]+$/,""),C.leftStripped=C.value!==T,C.leftStripped}}p.default=P,u.exports=p.default}(Hu,Hu.exports)),Hu.exports}var mn={},Xm;function Nw(){if(Xm)return mn;Xm=1,mn.__esModule=!0,mn.SourceLocation=k,mn.id=P,mn.stripFlags=x,mn.stripComment=o,mn.preparePath=B,mn.prepareMustache=D,mn.prepareRawBlock=M,mn.prepareBlock=O,mn.prepareProgram=L,mn.preparePartialBlock=C;function u(T){return T&&T.__esModule?T:{default:T}}var p=Wn(),y=u(p);function b(T,U){if(U=U.path?U.path.original:U,T.path.original!==U){var G={loc:T.path.loc};throw new y.default(T.path.original+" doesn't match "+U,G)}}function k(T,U){this.source=T,this.start={line:U.first_line,column:U.first_column},this.end={line:U.last_line,column:U.last_column}}function P(T){return/^\[.*\]$/.test(T)?T.substring(1,T.length-1):T}function x(T,U){return{open:T.charAt(2)==="~",close:U.charAt(U.length-3)==="~"}}function o(T){return T.replace(/^\{\{~?!-?-?/,"").replace(/-?-?~?\}\}$/,"")}function B(T,U,G){G=this.locInfo(G);for(var ie=T?"@":"",le=[],Ie=0,ee=0,me=U.length;ee<me;ee++){var Le=U[ee].part,qe=U[ee].original!==Le;if(ie+=(U[ee].separator||"")+Le,!qe&&(Le===".."||Le==="."||Le==="this")){if(le.length>0)throw new y.default("Invalid path: "+ie,{loc:G});Le===".."&&Ie++}else le.push(Le)}return{type:"PathExpression",data:T,depth:Ie,parts:le,original:ie,loc:G}}function D(T,U,G,ie,le,Ie){var ee=ie.charAt(3)||ie.charAt(2),me=ee!=="{"&&ee!=="&",Le=/\*/.test(ie);return{type:Le?"Decorator":"MustacheStatement",path:T,params:U,hash:G,escaped:me,strip:le,loc:this.locInfo(Ie)}}function M(T,U,G,ie){b(T,G),ie=this.locInfo(ie);var le={type:"Program",body:U,strip:{},loc:ie};return{type:"BlockStatement",path:T.path,params:T.params,hash:T.hash,program:le,openStrip:{},inverseStrip:{},closeStrip:{},loc:ie}}function O(T,U,G,ie,le,Ie){ie&&ie.path&&b(T,ie);var ee=/\*/.test(T.open);U.blockParams=T.blockParams;var me=void 0,Le=void 0;if(G){if(ee)throw new y.default("Unexpected inverse block on decorator",G);G.chain&&(G.program.body[0].closeStrip=ie.strip),Le=G.strip,me=G.program}return le&&(le=me,me=U,U=le),{type:ee?"DecoratorBlock":"BlockStatement",path:T.path,params:T.params,hash:T.hash,program:U,inverse:me,openStrip:T.strip,inverseStrip:Le,closeStrip:ie&&ie.strip,loc:this.locInfo(Ie)}}function L(T,U){if(!U&&T.length){var G=T[0].loc,ie=T[T.length-1].loc;G&&ie&&(U={source:G.source,start:{line:G.start.line,column:G.start.column},end:{line:ie.end.line,column:ie.end.column}})}return{type:"Program",body:T,strip:{},loc:U}}function C(T,U,G,ie){return b(T,G),{type:"PartialBlockStatement",name:T.path,params:T.params,hash:T.hash,program:U,openStrip:T.strip,closeStrip:G&&G.strip,loc:this.locInfo(ie)}}return mn}var Qm;function qw(){if(Qm)return Ja;Qm=1,Ja.__esModule=!0,Ja.parseWithoutProcessing=M,Ja.parse=O;function u(L){if(L&&L.__esModule)return L;var C={};if(L!=null)for(var T in L)Object.prototype.hasOwnProperty.call(L,T)&&(C[T]=L[T]);return C.default=L,C}function p(L){return L&&L.__esModule?L:{default:L}}var y=Ow(),b=p(y),k=Fw(),P=p(k),x=Nw(),o=u(x),B=nn();Ja.parser=b.default;var D={};B.extend(D,o);function M(L,C){if(L.type==="Program")return L;b.default.yy=D,D.locInfo=function(U){return new D.SourceLocation(C&&C.srcName,U)};var T=b.default.parse(L);return T}function O(L,C){var T=M(L,C),U=new P.default(C);return U.accept(T)}return Ja}var Xa={},Ym;function Uw(){if(Ym)return Xa;Ym=1,Xa.__esModule=!0,Xa.Compiler=o,Xa.precompile=B,Xa.compile=D;function u(L){return L&&L.__esModule?L:{default:L}}var p=Wn(),y=u(p),b=nn(),k=gy(),P=u(k),x=[].slice;function o(){}o.prototype={compiler:o,equals:function(C){var T=this.opcodes.length;if(C.opcodes.length!==T)return!1;for(var U=0;U<T;U++){var G=this.opcodes[U],ie=C.opcodes[U];if(G.opcode!==ie.opcode||!M(G.args,ie.args))return!1}T=this.children.length;for(var U=0;U<T;U++)if(!this.children[U].equals(C.children[U]))return!1;return!0},guid:0,compile:function(C,T){return this.sourceNode=[],this.opcodes=[],this.children=[],this.options=T,this.stringParams=T.stringParams,this.trackIds=T.trackIds,T.blockParams=T.blockParams||[],T.knownHelpers=b.extend(Object.create(null),{helperMissing:!0,blockHelperMissing:!0,each:!0,if:!0,unless:!0,with:!0,log:!0,lookup:!0},T.knownHelpers),this.accept(C)},compileProgram:function(C){var T=new this.compiler,U=T.compile(C,this.options),G=this.guid++;return this.usePartial=this.usePartial||U.usePartial,this.children[G]=U,this.useDepths=this.useDepths||U.useDepths,G},accept:function(C){if(!this[C.type])throw new y.default("Unknown type: "+C.type,C);this.sourceNode.unshift(C);var T=this[C.type](C);return this.sourceNode.shift(),T},Program:function(C){this.options.blockParams.unshift(C.blockParams);for(var T=C.body,U=T.length,G=0;G<U;G++)this.accept(T[G]);return this.options.blockParams.shift(),this.isSimple=U===1,this.blockParams=C.blockParams?C.blockParams.length:0,this},BlockStatement:function(C){O(C);var T=C.program,U=C.inverse;T=T&&this.compileProgram(T),U=U&&this.compileProgram(U);var G=this.classifySexpr(C);G==="helper"?this.helperSexpr(C,T,U):G==="simple"?(this.simpleSexpr(C),this.opcode("pushProgram",T),this.opcode("pushProgram",U),this.opcode("emptyHash"),this.opcode("blockValue",C.path.original)):(this.ambiguousSexpr(C,T,U),this.opcode("pushProgram",T),this.opcode("pushProgram",U),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},DecoratorBlock:function(C){var T=C.program&&this.compileProgram(C.program),U=this.setupFullMustacheParams(C,T,void 0),G=C.path;this.useDecorators=!0,this.opcode("registerDecorator",U.length,G.original)},PartialStatement:function(C){this.usePartial=!0;var T=C.program;T&&(T=this.compileProgram(C.program));var U=C.params;if(U.length>1)throw new y.default("Unsupported number of partial arguments: "+U.length,C);U.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):U.push({type:"PathExpression",parts:[],depth:0}));var G=C.name.original,ie=C.name.type==="SubExpression";ie&&this.accept(C.name),this.setupFullMustacheParams(C,T,void 0,!0);var le=C.indent||"";this.options.preventIndent&&le&&(this.opcode("appendContent",le),le=""),this.opcode("invokePartial",ie,G,le),this.opcode("append")},PartialBlockStatement:function(C){this.PartialStatement(C)},MustacheStatement:function(C){this.SubExpression(C),C.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(C){this.DecoratorBlock(C)},ContentStatement:function(C){C.value&&this.opcode("appendContent",C.value)},CommentStatement:function(){},SubExpression:function(C){O(C);var T=this.classifySexpr(C);T==="simple"?this.simpleSexpr(C):T==="helper"?this.helperSexpr(C):this.ambiguousSexpr(C)},ambiguousSexpr:function(C,T,U){var G=C.path,ie=G.parts[0],le=T!=null||U!=null;this.opcode("getContext",G.depth),this.opcode("pushProgram",T),this.opcode("pushProgram",U),G.strict=!0,this.accept(G),this.opcode("invokeAmbiguous",ie,le)},simpleSexpr:function(C){var T=C.path;T.strict=!0,this.accept(T),this.opcode("resolvePossibleLambda")},helperSexpr:function(C,T,U){var G=this.setupFullMustacheParams(C,T,U),ie=C.path,le=ie.parts[0];if(this.options.knownHelpers[le])this.opcode("invokeKnownHelper",G.length,le);else{if(this.options.knownHelpersOnly)throw new y.default("You specified knownHelpersOnly, but used the unknown helper "+le,C);ie.strict=!0,ie.falsy=!0,this.accept(ie),this.opcode("invokeHelper",G.length,ie.original,P.default.helpers.simpleId(ie))}},PathExpression:function(C){this.addDepth(C.depth),this.opcode("getContext",C.depth);var T=C.parts[0],U=P.default.helpers.scopedId(C),G=!C.depth&&!U&&this.blockParamIndex(T);G?this.opcode("lookupBlockParam",G,C.parts):T?C.data?(this.options.data=!0,this.opcode("lookupData",C.depth,C.parts,C.strict)):this.opcode("lookupOnContext",C.parts,C.falsy,C.strict,U):this.opcode("pushContext")},StringLiteral:function(C){this.opcode("pushString",C.value)},NumberLiteral:function(C){this.opcode("pushLiteral",C.value)},BooleanLiteral:function(C){this.opcode("pushLiteral",C.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(C){var T=C.pairs,U=0,G=T.length;for(this.opcode("pushHash");U<G;U++)this.pushParam(T[U].value);for(;U--;)this.opcode("assignToHash",T[U].key);this.opcode("popHash")},opcode:function(C){this.opcodes.push({opcode:C,args:x.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(C){C&&(this.useDepths=!0)},classifySexpr:function(C){var T=P.default.helpers.simpleId(C.path),U=T&&!!this.blockParamIndex(C.path.parts[0]),G=!U&&P.default.helpers.helperExpression(C),ie=!U&&(G||T);if(ie&&!G){var le=C.path.parts[0],Ie=this.options;Ie.knownHelpers[le]?G=!0:Ie.knownHelpersOnly&&(ie=!1)}return G?"helper":ie?"ambiguous":"simple"},pushParams:function(C){for(var T=0,U=C.length;T<U;T++)this.pushParam(C[T])},pushParam:function(C){var T=C.value!=null?C.value:C.original||"";if(this.stringParams)T.replace&&(T=T.replace(/^(\.?\.\/)*/g,"").replace(/\//g,".")),C.depth&&this.addDepth(C.depth),this.opcode("getContext",C.depth||0),this.opcode("pushStringParam",T,C.type),C.type==="SubExpression"&&this.accept(C);else{if(this.trackIds){var U=void 0;if(C.parts&&!P.default.helpers.scopedId(C)&&!C.depth&&(U=this.blockParamIndex(C.parts[0])),U){var G=C.parts.slice(1).join(".");this.opcode("pushId","BlockParam",U,G)}else T=C.original||T,T.replace&&(T=T.replace(/^this(?:\.|$)/,"").replace(/^\.\//,"").replace(/^\.$/,"")),this.opcode("pushId",C.type,T)}this.accept(C)}},setupFullMustacheParams:function(C,T,U,G){var ie=C.params;return this.pushParams(ie),this.opcode("pushProgram",T),this.opcode("pushProgram",U),C.hash?this.accept(C.hash):this.opcode("emptyHash",G),ie},blockParamIndex:function(C){for(var T=0,U=this.options.blockParams.length;T<U;T++){var G=this.options.blockParams[T],ie=G&&b.indexOf(G,C);if(G&&ie>=0)return[T,ie]}}};function B(L,C,T){if(L==null||typeof L!="string"&&L.type!=="Program")throw new y.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+L);C=C||{},"data"in C||(C.data=!0),C.compat&&(C.useDepths=!0);var U=T.parse(L,C),G=new T.Compiler().compile(U,C);return new T.JavaScriptCompiler().compile(G,C)}function D(L,C,T){if(C===void 0&&(C={}),L==null||typeof L!="string"&&L.type!=="Program")throw new y.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+L);C=b.extend({},C),"data"in C||(C.data=!0),C.compat&&(C.useDepths=!0);var U=void 0;function G(){var le=T.parse(L,C),Ie=new T.Compiler().compile(le,C),ee=new T.JavaScriptCompiler().compile(Ie,C,void 0,!0);return T.template(ee)}function ie(le,Ie){return U||(U=G()),U.call(this,le,Ie)}return ie._setup=function(le){return U||(U=G()),U._setup(le)},ie._child=function(le,Ie,ee,me){return U||(U=G()),U._child(le,Ie,ee,me)},ie}function M(L,C){if(L===C)return!0;if(b.isArray(L)&&b.isArray(C)&&L.length===C.length){for(var T=0;T<L.length;T++)if(!M(L[T],C[T]))return!1;return!0}}function O(L){if(!L.path.parts){var C=L.path;L.path={type:"PathExpression",data:!1,depth:0,parts:[C.original+""],original:C.original+"",loc:C.loc}}}return Xa}var Zu={exports:{}},Ku={exports:{}},ac={},Vd={},Gu={},Ju={},$m;function jw(){if($m)return Ju;$m=1;var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");return Ju.encode=function(p){if(0<=p&&p<u.length)return u[p];throw new TypeError("Must be between 0 and 63: "+p)},Ju.decode=function(p){var y=65,b=90,k=97,P=122,x=48,o=57,B=43,D=47,M=26,O=52;return y<=p&&p<=b?p-y:k<=p&&p<=P?p-k+M:x<=p&&p<=o?p-x+O:p==B?62:p==D?63:-1},Ju}var eg;function _y(){if(eg)return Gu;eg=1;var u=jw(),p=5,y=1<<p,b=y-1,k=y;function P(o){return o<0?(-o<<1)+1:(o<<1)+0}function x(o){var B=(o&1)===1,D=o>>1;return B?-D:D}return Gu.encode=function(B){var D="",M,O=P(B);do M=O&b,O>>>=p,O>0&&(M|=k),D+=u.encode(M);while(O>0);return D},Gu.decode=function(B,D,M){var O=B.length,L=0,C=0,T,U;do{if(D>=O)throw new Error("Expected more digits in base 64 VLQ value.");if(U=u.decode(B.charCodeAt(D++)),U===-1)throw new Error("Invalid base64 digit: "+B.charAt(D-1));T=!!(U&k),U&=b,L=L+(U<<C),C+=p}while(T);M.value=x(L),M.rest=D},Gu}var Od={},tg;function yc(){return tg||(tg=1,function(u){function p(ee,me,Le){if(me in ee)return ee[me];if(arguments.length===3)return Le;throw new Error('"'+me+'" is a required argument.')}u.getArg=p;var y=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,b=/^data:.+\,.+$/;function k(ee){var me=ee.match(y);return me?{scheme:me[1],auth:me[2],host:me[3],port:me[4],path:me[5]}:null}u.urlParse=k;function P(ee){var me="";return ee.scheme&&(me+=ee.scheme+":"),me+="//",ee.auth&&(me+=ee.auth+"@"),ee.host&&(me+=ee.host),ee.port&&(me+=":"+ee.port),ee.path&&(me+=ee.path),me}u.urlGenerate=P;function x(ee){var me=ee,Le=k(ee);if(Le){if(!Le.path)return ee;me=Le.path}for(var qe=u.isAbsolute(me),rt=me.split(/\/+/),St,yt=0,ct=rt.length-1;ct>=0;ct--)St=rt[ct],St==="."?rt.splice(ct,1):St===".."?yt++:yt>0&&(St===""?(rt.splice(ct+1,yt),yt=0):(rt.splice(ct,2),yt--));return me=rt.join("/"),me===""&&(me=qe?"/":"."),Le?(Le.path=me,P(Le)):me}u.normalize=x;function o(ee,me){ee===""&&(ee="."),me===""&&(me=".");var Le=k(me),qe=k(ee);if(qe&&(ee=qe.path||"/"),Le&&!Le.scheme)return qe&&(Le.scheme=qe.scheme),P(Le);if(Le||me.match(b))return me;if(qe&&!qe.host&&!qe.path)return qe.host=me,P(qe);var rt=me.charAt(0)==="/"?me:x(ee.replace(/\/+$/,"")+"/"+me);return qe?(qe.path=rt,P(qe)):rt}u.join=o,u.isAbsolute=function(ee){return ee.charAt(0)==="/"||y.test(ee)};function B(ee,me){ee===""&&(ee="."),ee=ee.replace(/\/$/,"");for(var Le=0;me.indexOf(ee+"/")!==0;){var qe=ee.lastIndexOf("/");if(qe<0||(ee=ee.slice(0,qe),ee.match(/^([^\/]+:\/)?\/*$/)))return me;++Le}return Array(Le+1).join("../")+me.substr(ee.length+1)}u.relative=B;var D=function(){var ee=Object.create(null);return!("__proto__"in ee)}();function M(ee){return ee}function O(ee){return C(ee)?"$"+ee:ee}u.toSetString=D?M:O;function L(ee){return C(ee)?ee.slice(1):ee}u.fromSetString=D?M:L;function C(ee){if(!ee)return!1;var me=ee.length;if(me<9||ee.charCodeAt(me-1)!==95||ee.charCodeAt(me-2)!==95||ee.charCodeAt(me-3)!==111||ee.charCodeAt(me-4)!==116||ee.charCodeAt(me-5)!==111||ee.charCodeAt(me-6)!==114||ee.charCodeAt(me-7)!==112||ee.charCodeAt(me-8)!==95||ee.charCodeAt(me-9)!==95)return!1;for(var Le=me-10;Le>=0;Le--)if(ee.charCodeAt(Le)!==36)return!1;return!0}function T(ee,me,Le){var qe=G(ee.source,me.source);return qe!==0||(qe=ee.originalLine-me.originalLine,qe!==0)||(qe=ee.originalColumn-me.originalColumn,qe!==0||Le)||(qe=ee.generatedColumn-me.generatedColumn,qe!==0)||(qe=ee.generatedLine-me.generatedLine,qe!==0)?qe:G(ee.name,me.name)}u.compareByOriginalPositions=T;function U(ee,me,Le){var qe=ee.generatedLine-me.generatedLine;return qe!==0||(qe=ee.generatedColumn-me.generatedColumn,qe!==0||Le)||(qe=G(ee.source,me.source),qe!==0)||(qe=ee.originalLine-me.originalLine,qe!==0)||(qe=ee.originalColumn-me.originalColumn,qe!==0)?qe:G(ee.name,me.name)}u.compareByGeneratedPositionsDeflated=U;function G(ee,me){return ee===me?0:ee===null?1:me===null?-1:ee>me?1:-1}function ie(ee,me){var Le=ee.generatedLine-me.generatedLine;return Le!==0||(Le=ee.generatedColumn-me.generatedColumn,Le!==0)||(Le=G(ee.source,me.source),Le!==0)||(Le=ee.originalLine-me.originalLine,Le!==0)||(Le=ee.originalColumn-me.originalColumn,Le!==0)?Le:G(ee.name,me.name)}u.compareByGeneratedPositionsInflated=ie;function le(ee){return JSON.parse(ee.replace(/^\)]}'[^\n]*\n/,""))}u.parseSourceMapInput=le;function Ie(ee,me,Le){if(me=me||"",ee&&(ee[ee.length-1]!=="/"&&me[0]!=="/"&&(ee+="/"),me=ee+me),Le){var qe=k(Le);if(!qe)throw new Error("sourceMapURL could not be parsed");if(qe.path){var rt=qe.path.lastIndexOf("/");rt>=0&&(qe.path=qe.path.substring(0,rt+1))}me=o(P(qe),me)}return x(me)}u.computeSourceURL=Ie}(Od)),Od}var Fd={},rg;function vy(){if(rg)return Fd;rg=1;var u=yc(),p=Object.prototype.hasOwnProperty,y=typeof Map<"u";function b(){this._array=[],this._set=y?new Map:Object.create(null)}return b.fromArray=function(P,x){for(var o=new b,B=0,D=P.length;B<D;B++)o.add(P[B],x);return o},b.prototype.size=function(){return y?this._set.size:Object.getOwnPropertyNames(this._set).length},b.prototype.add=function(P,x){var o=y?P:u.toSetString(P),B=y?this.has(P):p.call(this._set,o),D=this._array.length;(!B||x)&&this._array.push(P),B||(y?this._set.set(P,D):this._set[o]=D)},b.prototype.has=function(P){if(y)return this._set.has(P);var x=u.toSetString(P);return p.call(this._set,x)},b.prototype.indexOf=function(P){if(y){var x=this._set.get(P);if(x>=0)return x}else{var o=u.toSetString(P);if(p.call(this._set,o))return this._set[o]}throw new Error('"'+P+'" is not in the set.')},b.prototype.at=function(P){if(P>=0&&P<this._array.length)return this._array[P];throw new Error("No element indexed by "+P)},b.prototype.toArray=function(){return this._array.slice()},Fd.ArraySet=b,Fd}var Nd={},ig;function Hw(){if(ig)return Nd;ig=1;var u=yc();function p(b,k){var P=b.generatedLine,x=k.generatedLine,o=b.generatedColumn,B=k.generatedColumn;return x>P||x==P&&B>=o||u.compareByGeneratedPositionsInflated(b,k)<=0}function y(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}return y.prototype.unsortedForEach=function(k,P){this._array.forEach(k,P)},y.prototype.add=function(k){p(this._last,k)?(this._last=k,this._array.push(k)):(this._sorted=!1,this._array.push(k))},y.prototype.toArray=function(){return this._sorted||(this._array.sort(u.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},Nd.MappingList=y,Nd}var ng;function xy(){if(ng)return Vd;ng=1;var u=_y(),p=yc(),y=vy().ArraySet,b=Hw().MappingList;function k(P){P||(P={}),this._file=p.getArg(P,"file",null),this._sourceRoot=p.getArg(P,"sourceRoot",null),this._skipValidation=p.getArg(P,"skipValidation",!1),this._sources=new y,this._names=new y,this._mappings=new b,this._sourcesContents=null}return k.prototype._version=3,k.fromSourceMap=function(x){var o=x.sourceRoot,B=new k({file:x.file,sourceRoot:o});return x.eachMapping(function(D){var M={generated:{line:D.generatedLine,column:D.generatedColumn}};D.source!=null&&(M.source=D.source,o!=null&&(M.source=p.relative(o,M.source)),M.original={line:D.originalLine,column:D.originalColumn},D.name!=null&&(M.name=D.name)),B.addMapping(M)}),x.sources.forEach(function(D){var M=D;o!==null&&(M=p.relative(o,D)),B._sources.has(M)||B._sources.add(M);var O=x.sourceContentFor(D);O!=null&&B.setSourceContent(D,O)}),B},k.prototype.addMapping=function(x){var o=p.getArg(x,"generated"),B=p.getArg(x,"original",null),D=p.getArg(x,"source",null),M=p.getArg(x,"name",null);this._skipValidation||this._validateMapping(o,B,D,M),D!=null&&(D=String(D),this._sources.has(D)||this._sources.add(D)),M!=null&&(M=String(M),this._names.has(M)||this._names.add(M)),this._mappings.add({generatedLine:o.line,generatedColumn:o.column,originalLine:B!=null&&B.line,originalColumn:B!=null&&B.column,source:D,name:M})},k.prototype.setSourceContent=function(x,o){var B=x;this._sourceRoot!=null&&(B=p.relative(this._sourceRoot,B)),o!=null?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[p.toSetString(B)]=o):this._sourcesContents&&(delete this._sourcesContents[p.toSetString(B)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},k.prototype.applySourceMap=function(x,o,B){var D=o;if(o==null){if(x.file==null)throw new Error(`SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map's "file" property. Both were omitted.`);D=x.file}var M=this._sourceRoot;M!=null&&(D=p.relative(M,D));var O=new y,L=new y;this._mappings.unsortedForEach(function(C){if(C.source===D&&C.originalLine!=null){var T=x.originalPositionFor({line:C.originalLine,column:C.originalColumn});T.source!=null&&(C.source=T.source,B!=null&&(C.source=p.join(B,C.source)),M!=null&&(C.source=p.relative(M,C.source)),C.originalLine=T.line,C.originalColumn=T.column,T.name!=null&&(C.name=T.name))}var U=C.source;U!=null&&!O.has(U)&&O.add(U);var G=C.name;G!=null&&!L.has(G)&&L.add(G)},this),this._sources=O,this._names=L,x.sources.forEach(function(C){var T=x.sourceContentFor(C);T!=null&&(B!=null&&(C=p.join(B,C)),M!=null&&(C=p.relative(M,C)),this.setSourceContent(C,T))},this)},k.prototype._validateMapping=function(x,o,B,D){if(o&&typeof o.line!="number"&&typeof o.column!="number")throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(!(x&&"line"in x&&"column"in x&&x.line>0&&x.column>=0&&!o&&!B&&!D)){if(x&&"line"in x&&"column"in x&&o&&"line"in o&&"column"in o&&x.line>0&&x.column>=0&&o.line>0&&o.column>=0&&B)return;throw new Error("Invalid mapping: "+JSON.stringify({generated:x,source:B,original:o,name:D}))}},k.prototype._serializeMappings=function(){for(var x=0,o=1,B=0,D=0,M=0,O=0,L="",C,T,U,G,ie=this._mappings.toArray(),le=0,Ie=ie.length;le<Ie;le++){if(T=ie[le],C="",T.generatedLine!==o)for(x=0;T.generatedLine!==o;)C+=";",o++;else if(le>0){if(!p.compareByGeneratedPositionsInflated(T,ie[le-1]))continue;C+=","}C+=u.encode(T.generatedColumn-x),x=T.generatedColumn,T.source!=null&&(G=this._sources.indexOf(T.source),C+=u.encode(G-O),O=G,C+=u.encode(T.originalLine-1-D),D=T.originalLine-1,C+=u.encode(T.originalColumn-B),B=T.originalColumn,T.name!=null&&(U=this._names.indexOf(T.name),C+=u.encode(U-M),M=U)),L+=C}return L},k.prototype._generateSourcesContent=function(x,o){return x.map(function(B){if(!this._sourcesContents)return null;o!=null&&(B=p.relative(o,B));var D=p.toSetString(B);return Object.prototype.hasOwnProperty.call(this._sourcesContents,D)?this._sourcesContents[D]:null},this)},k.prototype.toJSON=function(){var x={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._file!=null&&(x.file=this._file),this._sourceRoot!=null&&(x.sourceRoot=this._sourceRoot),this._sourcesContents&&(x.sourcesContent=this._generateSourcesContent(x.sources,x.sourceRoot)),x},k.prototype.toString=function(){return JSON.stringify(this.toJSON())},Vd.SourceMapGenerator=k,Vd}var lc={},qd={},og;function Ww(){return og||(og=1,function(u){u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2;function p(y,b,k,P,x,o){var B=Math.floor((b-y)/2)+y,D=x(k,P[B],!0);return D===0?B:D>0?b-B>1?p(B,b,k,P,x,o):o==u.LEAST_UPPER_BOUND?b<P.length?b:-1:B:B-y>1?p(y,B,k,P,x,o):o==u.LEAST_UPPER_BOUND?B:y<0?-1:y}u.search=function(b,k,P,x){if(k.length===0)return-1;var o=p(-1,k.length,b,k,P,x||u.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;o-1>=0&&P(k[o],k[o-1],!0)===0;)--o;return o}}(qd)),qd}var Ud={},sg;function Zw(){if(sg)return Ud;sg=1;function u(b,k,P){var x=b[k];b[k]=b[P],b[P]=x}function p(b,k){return Math.round(b+Math.random()*(k-b))}function y(b,k,P,x){if(P<x){var o=p(P,x),B=P-1;u(b,o,x);for(var D=b[x],M=P;M<x;M++)k(b[M],D)<=0&&(B+=1,u(b,B,M));u(b,B+1,M);var O=B+1;y(b,k,P,O-1),y(b,k,O+1,x)}}return Ud.quickSort=function(b,k){y(b,k,0,b.length-1)},Ud}var ag;function Kw(){if(ag)return lc;ag=1;var u=yc(),p=Ww(),y=vy().ArraySet,b=_y(),k=Zw().quickSort;function P(D,M){var O=D;return typeof D=="string"&&(O=u.parseSourceMapInput(D)),O.sections!=null?new B(O,M):new x(O,M)}P.fromSourceMap=function(D,M){return x.fromSourceMap(D,M)},P.prototype._version=3,P.prototype.__generatedMappings=null,Object.defineProperty(P.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),P.prototype.__originalMappings=null,Object.defineProperty(P.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),P.prototype._charIsMappingSeparator=function(M,O){var L=M.charAt(O);return L===";"||L===","},P.prototype._parseMappings=function(M,O){throw new Error("Subclasses must implement _parseMappings")},P.GENERATED_ORDER=1,P.ORIGINAL_ORDER=2,P.GREATEST_LOWER_BOUND=1,P.LEAST_UPPER_BOUND=2,P.prototype.eachMapping=function(M,O,L){var C=O||null,T=L||P.GENERATED_ORDER,U;switch(T){case P.GENERATED_ORDER:U=this._generatedMappings;break;case P.ORIGINAL_ORDER:U=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var G=this.sourceRoot;U.map(function(ie){var le=ie.source===null?null:this._sources.at(ie.source);return le=u.computeSourceURL(G,le,this._sourceMapURL),{source:le,generatedLine:ie.generatedLine,generatedColumn:ie.generatedColumn,originalLine:ie.originalLine,originalColumn:ie.originalColumn,name:ie.name===null?null:this._names.at(ie.name)}},this).forEach(M,C)},P.prototype.allGeneratedPositionsFor=function(M){var O=u.getArg(M,"line"),L={source:u.getArg(M,"source"),originalLine:O,originalColumn:u.getArg(M,"column",0)};if(L.source=this._findSourceIndex(L.source),L.source<0)return[];var C=[],T=this._findMapping(L,this._originalMappings,"originalLine","originalColumn",u.compareByOriginalPositions,p.LEAST_UPPER_BOUND);if(T>=0){var U=this._originalMappings[T];if(M.column===void 0)for(var G=U.originalLine;U&&U.originalLine===G;)C.push({line:u.getArg(U,"generatedLine",null),column:u.getArg(U,"generatedColumn",null),lastColumn:u.getArg(U,"lastGeneratedColumn",null)}),U=this._originalMappings[++T];else for(var ie=U.originalColumn;U&&U.originalLine===O&&U.originalColumn==ie;)C.push({line:u.getArg(U,"generatedLine",null),column:u.getArg(U,"generatedColumn",null),lastColumn:u.getArg(U,"lastGeneratedColumn",null)}),U=this._originalMappings[++T]}return C},lc.SourceMapConsumer=P;function x(D,M){var O=D;typeof D=="string"&&(O=u.parseSourceMapInput(D));var L=u.getArg(O,"version"),C=u.getArg(O,"sources"),T=u.getArg(O,"names",[]),U=u.getArg(O,"sourceRoot",null),G=u.getArg(O,"sourcesContent",null),ie=u.getArg(O,"mappings"),le=u.getArg(O,"file",null);if(L!=this._version)throw new Error("Unsupported version: "+L);U&&(U=u.normalize(U)),C=C.map(String).map(u.normalize).map(function(Ie){return U&&u.isAbsolute(U)&&u.isAbsolute(Ie)?u.relative(U,Ie):Ie}),this._names=y.fromArray(T.map(String),!0),this._sources=y.fromArray(C,!0),this._absoluteSources=this._sources.toArray().map(function(Ie){return u.computeSourceURL(U,Ie,M)}),this.sourceRoot=U,this.sourcesContent=G,this._mappings=ie,this._sourceMapURL=M,this.file=le}x.prototype=Object.create(P.prototype),x.prototype.consumer=P,x.prototype._findSourceIndex=function(D){var M=D;if(this.sourceRoot!=null&&(M=u.relative(this.sourceRoot,M)),this._sources.has(M))return this._sources.indexOf(M);var O;for(O=0;O<this._absoluteSources.length;++O)if(this._absoluteSources[O]==D)return O;return-1},x.fromSourceMap=function(M,O){var L=Object.create(x.prototype),C=L._names=y.fromArray(M._names.toArray(),!0),T=L._sources=y.fromArray(M._sources.toArray(),!0);L.sourceRoot=M._sourceRoot,L.sourcesContent=M._generateSourcesContent(L._sources.toArray(),L.sourceRoot),L.file=M._file,L._sourceMapURL=O,L._absoluteSources=L._sources.toArray().map(function(Le){return u.computeSourceURL(L.sourceRoot,Le,O)});for(var U=M._mappings.toArray().slice(),G=L.__generatedMappings=[],ie=L.__originalMappings=[],le=0,Ie=U.length;le<Ie;le++){var ee=U[le],me=new o;me.generatedLine=ee.generatedLine,me.generatedColumn=ee.generatedColumn,ee.source&&(me.source=T.indexOf(ee.source),me.originalLine=ee.originalLine,me.originalColumn=ee.originalColumn,ee.name&&(me.name=C.indexOf(ee.name)),ie.push(me)),G.push(me)}return k(L.__originalMappings,u.compareByOriginalPositions),L},x.prototype._version=3,Object.defineProperty(x.prototype,"sources",{get:function(){return this._absoluteSources.slice()}});function o(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}x.prototype._parseMappings=function(M,O){for(var L=1,C=0,T=0,U=0,G=0,ie=0,le=M.length,Ie=0,ee={},me={},Le=[],qe=[],rt,St,yt,ct,_t;Ie<le;)if(M.charAt(Ie)===";")L++,Ie++,C=0;else if(M.charAt(Ie)===",")Ie++;else{for(rt=new o,rt.generatedLine=L,ct=Ie;ct<le&&!this._charIsMappingSeparator(M,ct);ct++);if(St=M.slice(Ie,ct),yt=ee[St],yt)Ie+=St.length;else{for(yt=[];Ie<ct;)b.decode(M,Ie,me),_t=me.value,Ie=me.rest,yt.push(_t);if(yt.length===2)throw new Error("Found a source, but no line and column");if(yt.length===3)throw new Error("Found a source and line, but no column");ee[St]=yt}rt.generatedColumn=C+yt[0],C=rt.generatedColumn,yt.length>1&&(rt.source=G+yt[1],G+=yt[1],rt.originalLine=T+yt[2],T=rt.originalLine,rt.originalLine+=1,rt.originalColumn=U+yt[3],U=rt.originalColumn,yt.length>4&&(rt.name=ie+yt[4],ie+=yt[4])),qe.push(rt),typeof rt.originalLine=="number"&&Le.push(rt)}k(qe,u.compareByGeneratedPositionsDeflated),this.__generatedMappings=qe,k(Le,u.compareByOriginalPositions),this.__originalMappings=Le},x.prototype._findMapping=function(M,O,L,C,T,U){if(M[L]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+M[L]);if(M[C]<0)throw new TypeError("Column must be greater than or equal to 0, got "+M[C]);return p.search(M,O,T,U)},x.prototype.computeColumnSpans=function(){for(var M=0;M<this._generatedMappings.length;++M){var O=this._generatedMappings[M];if(M+1<this._generatedMappings.length){var L=this._generatedMappings[M+1];if(O.generatedLine===L.generatedLine){O.lastGeneratedColumn=L.generatedColumn-1;continue}}O.lastGeneratedColumn=1/0}},x.prototype.originalPositionFor=function(M){var O={generatedLine:u.getArg(M,"line"),generatedColumn:u.getArg(M,"column")},L=this._findMapping(O,this._generatedMappings,"generatedLine","generatedColumn",u.compareByGeneratedPositionsDeflated,u.getArg(M,"bias",P.GREATEST_LOWER_BOUND));if(L>=0){var C=this._generatedMappings[L];if(C.generatedLine===O.generatedLine){var T=u.getArg(C,"source",null);T!==null&&(T=this._sources.at(T),T=u.computeSourceURL(this.sourceRoot,T,this._sourceMapURL));var U=u.getArg(C,"name",null);return U!==null&&(U=this._names.at(U)),{source:T,line:u.getArg(C,"originalLine",null),column:u.getArg(C,"originalColumn",null),name:U}}}return{source:null,line:null,column:null,name:null}},x.prototype.hasContentsOfAllSources=function(){return this.sourcesContent?this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some(function(M){return M==null}):!1},x.prototype.sourceContentFor=function(M,O){if(!this.sourcesContent)return null;var L=this._findSourceIndex(M);if(L>=0)return this.sourcesContent[L];var C=M;this.sourceRoot!=null&&(C=u.relative(this.sourceRoot,C));var T;if(this.sourceRoot!=null&&(T=u.urlParse(this.sourceRoot))){var U=C.replace(/^file:\/\//,"");if(T.scheme=="file"&&this._sources.has(U))return this.sourcesContent[this._sources.indexOf(U)];if((!T.path||T.path=="/")&&this._sources.has("/"+C))return this.sourcesContent[this._sources.indexOf("/"+C)]}if(O)return null;throw new Error('"'+C+'" is not in the SourceMap.')},x.prototype.generatedPositionFor=function(M){var O=u.getArg(M,"source");if(O=this._findSourceIndex(O),O<0)return{line:null,column:null,lastColumn:null};var L={source:O,originalLine:u.getArg(M,"line"),originalColumn:u.getArg(M,"column")},C=this._findMapping(L,this._originalMappings,"originalLine","originalColumn",u.compareByOriginalPositions,u.getArg(M,"bias",P.GREATEST_LOWER_BOUND));if(C>=0){var T=this._originalMappings[C];if(T.source===L.source)return{line:u.getArg(T,"generatedLine",null),column:u.getArg(T,"generatedColumn",null),lastColumn:u.getArg(T,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},lc.BasicSourceMapConsumer=x;function B(D,M){var O=D;typeof D=="string"&&(O=u.parseSourceMapInput(D));var L=u.getArg(O,"version"),C=u.getArg(O,"sections");if(L!=this._version)throw new Error("Unsupported version: "+L);this._sources=new y,this._names=new y;var T={line:-1,column:0};this._sections=C.map(function(U){if(U.url)throw new Error("Support for url field in sections not implemented.");var G=u.getArg(U,"offset"),ie=u.getArg(G,"line"),le=u.getArg(G,"column");if(ie<T.line||ie===T.line&&le<T.column)throw new Error("Section offsets must be ordered and non-overlapping.");return T=G,{generatedOffset:{generatedLine:ie+1,generatedColumn:le+1},consumer:new P(u.getArg(U,"map"),M)}})}return B.prototype=Object.create(P.prototype),B.prototype.constructor=P,B.prototype._version=3,Object.defineProperty(B.prototype,"sources",{get:function(){for(var D=[],M=0;M<this._sections.length;M++)for(var O=0;O<this._sections[M].consumer.sources.length;O++)D.push(this._sections[M].consumer.sources[O]);return D}}),B.prototype.originalPositionFor=function(M){var O={generatedLine:u.getArg(M,"line"),generatedColumn:u.getArg(M,"column")},L=p.search(O,this._sections,function(T,U){var G=T.generatedLine-U.generatedOffset.generatedLine;return G||T.generatedColumn-U.generatedOffset.generatedColumn}),C=this._sections[L];return C?C.consumer.originalPositionFor({line:O.generatedLine-(C.generatedOffset.generatedLine-1),column:O.generatedColumn-(C.generatedOffset.generatedLine===O.generatedLine?C.generatedOffset.generatedColumn-1:0),bias:M.bias}):{source:null,line:null,column:null,name:null}},B.prototype.hasContentsOfAllSources=function(){return this._sections.every(function(M){return M.consumer.hasContentsOfAllSources()})},B.prototype.sourceContentFor=function(M,O){for(var L=0;L<this._sections.length;L++){var C=this._sections[L],T=C.consumer.sourceContentFor(M,!0);if(T)return T}if(O)return null;throw new Error('"'+M+'" is not in the SourceMap.')},B.prototype.generatedPositionFor=function(M){for(var O=0;O<this._sections.length;O++){var L=this._sections[O];if(L.consumer._findSourceIndex(u.getArg(M,"source"))!==-1){var C=L.consumer.generatedPositionFor(M);if(C){var T={line:C.line+(L.generatedOffset.generatedLine-1),column:C.column+(L.generatedOffset.generatedLine===C.line?L.generatedOffset.generatedColumn-1:0)};return T}}}return{line:null,column:null}},B.prototype._parseMappings=function(M,O){this.__generatedMappings=[],this.__originalMappings=[];for(var L=0;L<this._sections.length;L++)for(var C=this._sections[L],T=C.consumer._generatedMappings,U=0;U<T.length;U++){var G=T[U],ie=C.consumer._sources.at(G.source);ie=u.computeSourceURL(C.consumer.sourceRoot,ie,this._sourceMapURL),this._sources.add(ie),ie=this._sources.indexOf(ie);var le=null;G.name&&(le=C.consumer._names.at(G.name),this._names.add(le),le=this._names.indexOf(le));var Ie={source:ie,generatedLine:G.generatedLine+(C.generatedOffset.generatedLine-1),generatedColumn:G.generatedColumn+(C.generatedOffset.generatedLine===G.generatedLine?C.generatedOffset.generatedColumn-1:0),originalLine:G.originalLine,originalColumn:G.originalColumn,name:le};this.__generatedMappings.push(Ie),typeof Ie.originalLine=="number"&&this.__originalMappings.push(Ie)}k(this.__generatedMappings,u.compareByGeneratedPositionsDeflated),k(this.__originalMappings,u.compareByOriginalPositions)},lc.IndexedSourceMapConsumer=B,lc}var jd={},lg;function Gw(){if(lg)return jd;lg=1;var u=xy().SourceMapGenerator,p=yc(),y=/(\r?\n)/,b=10,k="$$$isSourceNode$$$";function P(x,o,B,D,M){this.children=[],this.sourceContents={},this.line=x??null,this.column=o??null,this.source=B??null,this.name=M??null,this[k]=!0,D!=null&&this.add(D)}return P.fromStringWithSourceMap=function(o,B,D){var M=new P,O=o.split(y),L=0,C=function(){var le=ee(),Ie=ee()||"";return le+Ie;function ee(){return L<O.length?O[L++]:void 0}},T=1,U=0,G=null;return B.eachMapping(function(le){if(G!==null)if(T<le.generatedLine)ie(G,C()),T++,U=0;else{var Ie=O[L]||"",ee=Ie.substr(0,le.generatedColumn-U);O[L]=Ie.substr(le.generatedColumn-U),U=le.generatedColumn,ie(G,ee),G=le;return}for(;T<le.generatedLine;)M.add(C()),T++;if(U<le.generatedColumn){var Ie=O[L]||"";M.add(Ie.substr(0,le.generatedColumn)),O[L]=Ie.substr(le.generatedColumn),U=le.generatedColumn}G=le},this),L<O.length&&(G&&ie(G,C()),M.add(O.splice(L).join(""))),B.sources.forEach(function(le){var Ie=B.sourceContentFor(le);Ie!=null&&(D!=null&&(le=p.join(D,le)),M.setSourceContent(le,Ie))}),M;function ie(le,Ie){if(le===null||le.source===void 0)M.add(Ie);else{var ee=D?p.join(D,le.source):le.source;M.add(new P(le.originalLine,le.originalColumn,ee,Ie,le.name))}}},P.prototype.add=function(o){if(Array.isArray(o))o.forEach(function(B){this.add(B)},this);else if(o[k]||typeof o=="string")o&&this.children.push(o);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+o);return this},P.prototype.prepend=function(o){if(Array.isArray(o))for(var B=o.length-1;B>=0;B--)this.prepend(o[B]);else if(o[k]||typeof o=="string")this.children.unshift(o);else throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+o);return this},P.prototype.walk=function(o){for(var B,D=0,M=this.children.length;D<M;D++)B=this.children[D],B[k]?B.walk(o):B!==""&&o(B,{source:this.source,line:this.line,column:this.column,name:this.name})},P.prototype.join=function(o){var B,D,M=this.children.length;if(M>0){for(B=[],D=0;D<M-1;D++)B.push(this.children[D]),B.push(o);B.push(this.children[D]),this.children=B}return this},P.prototype.replaceRight=function(o,B){var D=this.children[this.children.length-1];return D[k]?D.replaceRight(o,B):typeof D=="string"?this.children[this.children.length-1]=D.replace(o,B):this.children.push("".replace(o,B)),this},P.prototype.setSourceContent=function(o,B){this.sourceContents[p.toSetString(o)]=B},P.prototype.walkSourceContents=function(o){for(var B=0,D=this.children.length;B<D;B++)this.children[B][k]&&this.children[B].walkSourceContents(o);for(var M=Object.keys(this.sourceContents),B=0,D=M.length;B<D;B++)o(p.fromSetString(M[B]),this.sourceContents[M[B]])},P.prototype.toString=function(){var o="";return this.walk(function(B){o+=B}),o},P.prototype.toStringWithSourceMap=function(o){var B={code:"",line:1,column:0},D=new u(o),M=!1,O=null,L=null,C=null,T=null;return this.walk(function(U,G){B.code+=U,G.source!==null&&G.line!==null&&G.column!==null?((O!==G.source||L!==G.line||C!==G.column||T!==G.name)&&D.addMapping({source:G.source,original:{line:G.line,column:G.column},generated:{line:B.line,column:B.column},name:G.name}),O=G.source,L=G.line,C=G.column,T=G.name,M=!0):M&&(D.addMapping({generated:{line:B.line,column:B.column}}),O=null,M=!1);for(var ie=0,le=U.length;ie<le;ie++)U.charCodeAt(ie)===b?(B.line++,B.column=0,ie+1===le?(O=null,M=!1):M&&D.addMapping({source:G.source,original:{line:G.line,column:G.column},generated:{line:B.line,column:B.column},name:G.name})):B.column++}),this.walkSourceContents(function(U,G){D.setSourceContent(U,G)}),{code:B.code,map:D}},jd.SourceNode=P,jd}var cg;function Jw(){return cg||(cg=1,ac.SourceMapGenerator=xy().SourceMapGenerator,ac.SourceMapConsumer=Kw().SourceMapConsumer,ac.SourceNode=Gw().SourceNode),ac}var ug;function Xw(){return ug||(ug=1,function(u,p){p.__esModule=!0;var y=nn(),b=void 0;try{var k=Jw();b=k.SourceNode}catch{}b||(b=function(o,B,D,M){this.src="",M&&this.add(M)},b.prototype={add:function(B){y.isArray(B)&&(B=B.join("")),this.src+=B},prepend:function(B){y.isArray(B)&&(B=B.join("")),this.src=B+this.src},toStringWithSourceMap:function(){return{code:this.toString()}},toString:function(){return this.src}});function P(o,B,D){if(y.isArray(o)){for(var M=[],O=0,L=o.length;O<L;O++)M.push(B.wrap(o[O],D));return M}else if(typeof o=="boolean"||typeof o=="number")return o+"";return o}function x(o){this.srcFile=o,this.source=[]}x.prototype={isEmpty:function(){return!this.source.length},prepend:function(B,D){this.source.unshift(this.wrap(B,D))},push:function(B,D){this.source.push(this.wrap(B,D))},merge:function(){var B=this.empty();return this.each(function(D){B.add([" ",D,`
810
+ `])}),B},each:function(B){for(var D=0,M=this.source.length;D<M;D++)B(this.source[D])},empty:function(){var B=this.currentLocation||{start:{}};return new b(B.start.line,B.start.column,this.srcFile)},wrap:function(B){var D=arguments.length<=1||arguments[1]===void 0?this.currentLocation||{start:{}}:arguments[1];return B instanceof b?B:(B=P(B,this,D),new b(D.start.line,D.start.column,this.srcFile,B))},functionCall:function(B,D,M){return M=this.generateList(M),this.wrap([B,D?"."+D+"(":"(",M,")"])},quotedString:function(B){return'"'+(B+"").replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(B){var D=this,M=[];Object.keys(B).forEach(function(L){var C=P(B[L],D);C!=="undefined"&&M.push([D.quotedString(L),":",C])});var O=this.generateList(M);return O.prepend("{"),O.add("}"),O},generateList:function(B){for(var D=this.empty(),M=0,O=B.length;M<O;M++)M&&D.add(","),D.add(P(B[M],this));return D},generateArray:function(B){var D=this.generateList(B);return D.prepend("["),D.add("]"),D}},p.default=x,u.exports=p.default}(Ku,Ku.exports)),Ku.exports}var hg;function Qw(){return hg||(hg=1,function(u,p){p.__esModule=!0;function y(L){return L&&L.__esModule?L:{default:L}}var b=mp(),k=Wn(),P=y(k),x=nn(),o=Xw(),B=y(o);function D(L){this.value=L}function M(){}M.prototype={nameLookup:function(C,T){return this.internalNameLookup(C,T)},depthedLookup:function(C){return[this.aliasable("container.lookup"),"(depths, ",JSON.stringify(C),")"]},compilerInfo:function(){var C=b.COMPILER_REVISION,T=b.REVISION_CHANGES[C];return[C,T]},appendToBuffer:function(C,T,U){return x.isArray(C)||(C=[C]),C=this.source.wrap(C,T),this.environment.isSimple?["return ",C,";"]:U?["buffer += ",C,";"]:(C.appendToBuffer=!0,C)},initializeBuffer:function(){return this.quotedString("")},internalNameLookup:function(C,T){return this.lookupPropertyFunctionIsUsed=!0,["lookupProperty(",C,",",JSON.stringify(T),")"]},lookupPropertyFunctionIsUsed:!1,compile:function(C,T,U,G){this.environment=C,this.options=T,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!G,this.name=this.environment.name,this.isChild=!!U,this.context=U||{decorators:[],programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.blockParams=[],this.compileChildren(C,T),this.useDepths=this.useDepths||C.useDepths||C.useDecorators||this.options.compat,this.useBlockParams=this.useBlockParams||C.useBlockParams;var ie=C.opcodes,le=void 0,Ie=void 0,ee=void 0,me=void 0;for(ee=0,me=ie.length;ee<me;ee++)le=ie[ee],this.source.currentLocation=le.loc,Ie=Ie||le.loc,this[le.opcode].apply(this,le.args);if(this.source.currentLocation=Ie,this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new P.default("Compile completed with content left on stack");this.decorators.isEmpty()?this.decorators=void 0:(this.useDecorators=!0,this.decorators.prepend(["var decorators = container.decorators, ",this.lookupPropertyFunctionVarDeclaration(),`;
811
+ `]),this.decorators.push("return fn;"),G?this.decorators=Function.apply(this,["fn","props","container","depth0","data","blockParams","depths",this.decorators.merge()]):(this.decorators.prepend(`function(fn, props, container, depth0, data, blockParams, depths) {
812
+ `),this.decorators.push(`}
813
+ `),this.decorators=this.decorators.merge()));var Le=this.createFunctionContext(G);if(this.isChild)return Le;var qe={compiler:this.compilerInfo(),main:Le};this.decorators&&(qe.main_d=this.decorators,qe.useDecorators=!0);var rt=this.context,St=rt.programs,yt=rt.decorators;for(ee=0,me=St.length;ee<me;ee++)St[ee]&&(qe[ee]=St[ee],yt[ee]&&(qe[ee+"_d"]=yt[ee],qe.useDecorators=!0));return this.environment.usePartial&&(qe.usePartial=!0),this.options.data&&(qe.useData=!0),this.useDepths&&(qe.useDepths=!0),this.useBlockParams&&(qe.useBlockParams=!0),this.options.compat&&(qe.compat=!0),G?qe.compilerOptions=this.options:(qe.compiler=JSON.stringify(qe.compiler),this.source.currentLocation={start:{line:1,column:0}},qe=this.objectLiteral(qe),T.srcName?(qe=qe.toStringWithSourceMap({file:T.destName}),qe.map=qe.map&&qe.map.toString()):qe=qe.toString()),qe},preamble:function(){this.lastContext=0,this.source=new B.default(this.options.srcName),this.decorators=new B.default(this.options.srcName)},createFunctionContext:function(C){var T=this,U="",G=this.stackVars.concat(this.registers.list);G.length>0&&(U+=", "+G.join(", "));var ie=0;Object.keys(this.aliases).forEach(function(ee){var me=T.aliases[ee];me.children&&me.referenceCount>1&&(U+=", alias"+ ++ie+"="+ee,me.children[0]="alias"+ie)}),this.lookupPropertyFunctionIsUsed&&(U+=", "+this.lookupPropertyFunctionVarDeclaration());var le=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&le.push("blockParams"),this.useDepths&&le.push("depths");var Ie=this.mergeSource(U);return C?(le.push(Ie),Function.apply(this,le)):this.source.wrap(["function(",le.join(","),`) {
814
+ `,Ie,"}"])},mergeSource:function(C){var T=this.environment.isSimple,U=!this.forceBuffer,G=void 0,ie=void 0,le=void 0,Ie=void 0;return this.source.each(function(ee){ee.appendToBuffer?(le?ee.prepend(" + "):le=ee,Ie=ee):(le&&(ie?le.prepend("buffer += "):G=!0,Ie.add(";"),le=Ie=void 0),ie=!0,T||(U=!1))}),U?le?(le.prepend("return "),Ie.add(";")):ie||this.source.push('return "";'):(C+=", buffer = "+(G?"":this.initializeBuffer()),le?(le.prepend("return buffer + "),Ie.add(";")):this.source.push("return buffer;")),C&&this.source.prepend("var "+C.substring(2)+(G?"":`;
815
+ `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return`
816
+ lookupProperty = container.lookupProperty || function(parent, propertyName) {
817
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
818
+ return parent[propertyName];
819
+ }
820
+ return undefined
821
+ }
822
+ `.trim()},blockValue:function(C){var T=this.aliasable("container.hooks.blockHelperMissing"),U=[this.contextName(0)];this.setupHelperArgs(C,0,U);var G=this.popStack();U.splice(1,0,G),this.push(this.source.functionCall(T,"call",U))},ambiguousBlockValue:function(){var C=this.aliasable("container.hooks.blockHelperMissing"),T=[this.contextName(0)];this.setupHelperArgs("",0,T,!0),this.flushInline();var U=this.topStack();T.splice(1,0,U),this.pushSource(["if (!",this.lastHelper,") { ",U," = ",this.source.functionCall(C,"call",T),"}"])},appendContent:function(C){this.pendingContent?C=this.pendingContent+C:this.pendingLocation=this.source.currentLocation,this.pendingContent=C},append:function(){if(this.isInline())this.replaceStack(function(T){return[" != null ? ",T,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var C=this.popStack();this.pushSource(["if (",C," != null) { ",this.appendToBuffer(C,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(C){this.lastContext=C},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(C,T,U,G){var ie=0;!G&&this.options.compat&&!this.lastContext?this.push(this.depthedLookup(C[ie++])):this.pushContext(),this.resolvePath("context",C,ie,T,U)},lookupBlockParam:function(C,T){this.useBlockParams=!0,this.push(["blockParams[",C[0],"][",C[1],"]"]),this.resolvePath("context",T,1)},lookupData:function(C,T,U){C?this.pushStackLiteral("container.data(data, "+C+")"):this.pushStackLiteral("data"),this.resolvePath("data",T,0,!0,U)},resolvePath:function(C,T,U,G,ie){var le=this;if(this.options.strict||this.options.assumeObjects){this.push(O(this.options.strict&&ie,this,T,U,C));return}for(var Ie=T.length;U<Ie;U++)this.replaceStack(function(ee){var me=le.nameLookup(ee,T[U],C);return G?[" && ",me]:[" != null ? ",me," : ",ee]})},resolvePossibleLambda:function(){this.push([this.aliasable("container.lambda"),"(",this.popStack(),", ",this.contextName(0),")"])},pushStringParam:function(C,T){this.pushContext(),this.pushString(T),T!=="SubExpression"&&(typeof C=="string"?this.pushString(C):this.pushStackLiteral(C))},emptyHash:function(C){this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}")),this.pushStackLiteral(C?"undefined":"{}")},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:{},types:[],contexts:[],ids:[]}},popHash:function(){var C=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push(this.objectLiteral(C.ids)),this.stringParams&&(this.push(this.objectLiteral(C.contexts)),this.push(this.objectLiteral(C.types))),this.push(this.objectLiteral(C.values))},pushString:function(C){this.pushStackLiteral(this.quotedString(C))},pushLiteral:function(C){this.pushStackLiteral(C)},pushProgram:function(C){C!=null?this.pushStackLiteral(this.programExpression(C)):this.pushStackLiteral(null)},registerDecorator:function(C,T){var U=this.nameLookup("decorators",T,"decorator"),G=this.setupHelperArgs(T,C);this.decorators.push(["fn = ",this.decorators.functionCall(U,"",["fn","props","container",G])," || fn;"])},invokeHelper:function(C,T,U){var G=this.popStack(),ie=this.setupHelper(C,T),le=[];U&&le.push(ie.name),le.push(G),this.options.strict||le.push(this.aliasable("container.hooks.helperMissing"));var Ie=["(",this.itemsSeparatedBy(le,"||"),")"],ee=this.source.functionCall(Ie,"call",ie.callParams);this.push(ee)},itemsSeparatedBy:function(C,T){var U=[];U.push(C[0]);for(var G=1;G<C.length;G++)U.push(T,C[G]);return U},invokeKnownHelper:function(C,T){var U=this.setupHelper(C,T);this.push(this.source.functionCall(U.name,"call",U.callParams))},invokeAmbiguous:function(C,T){this.useRegister("helper");var U=this.popStack();this.emptyHash();var G=this.setupHelper(0,C,T),ie=this.lastHelper=this.nameLookup("helpers",C,"helper"),le=["(","(helper = ",ie," || ",U,")"];this.options.strict||(le[0]="(helper = ",le.push(" != null ? helper : ",this.aliasable("container.hooks.helperMissing"))),this.push(["(",le,G.paramsInit?["),(",G.paramsInit]:[],"),","(typeof helper === ",this.aliasable('"function"')," ? ",this.source.functionCall("helper","call",G.callParams)," : helper))"])},invokePartial:function(C,T,U){var G=[],ie=this.setupParams(T,1,G);C&&(T=this.popStack(),delete ie.name),U&&(ie.indent=JSON.stringify(U)),ie.helpers="helpers",ie.partials="partials",ie.decorators="container.decorators",C?G.unshift(T):G.unshift(this.nameLookup("partials",T,"partial")),this.options.compat&&(ie.depths="depths"),ie=this.objectLiteral(ie),G.push(ie),this.push(this.source.functionCall("container.invokePartial","",G))},assignToHash:function(C){var T=this.popStack(),U=void 0,G=void 0,ie=void 0;this.trackIds&&(ie=this.popStack()),this.stringParams&&(G=this.popStack(),U=this.popStack());var le=this.hash;U&&(le.contexts[C]=U),G&&(le.types[C]=G),ie&&(le.ids[C]=ie),le.values[C]=T},pushId:function(C,T,U){C==="BlockParam"?this.pushStackLiteral("blockParams["+T[0]+"].path["+T[1]+"]"+(U?" + "+JSON.stringify("."+U):"")):C==="PathExpression"?this.pushString(T):C==="SubExpression"?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:M,compileChildren:function(C,T){for(var U=C.children,G=void 0,ie=void 0,le=0,Ie=U.length;le<Ie;le++){G=U[le],ie=new this.compiler;var ee=this.matchExistingProgram(G);if(ee==null){this.context.programs.push("");var me=this.context.programs.length;G.index=me,G.name="program"+me,this.context.programs[me]=ie.compile(G,T,this.context,!this.precompile),this.context.decorators[me]=ie.decorators,this.context.environments[me]=G,this.useDepths=this.useDepths||ie.useDepths,this.useBlockParams=this.useBlockParams||ie.useBlockParams,G.useDepths=this.useDepths,G.useBlockParams=this.useBlockParams}else G.index=ee.index,G.name="program"+ee.index,this.useDepths=this.useDepths||ee.useDepths,this.useBlockParams=this.useBlockParams||ee.useBlockParams}},matchExistingProgram:function(C){for(var T=0,U=this.context.environments.length;T<U;T++){var G=this.context.environments[T];if(G&&G.equals(C))return G}},programExpression:function(C){var T=this.environment.children[C],U=[T.index,"data",T.blockParams];return(this.useBlockParams||this.useDepths)&&U.push("blockParams"),this.useDepths&&U.push("depths"),"container.program("+U.join(", ")+")"},useRegister:function(C){this.registers[C]||(this.registers[C]=!0,this.registers.list.push(C))},push:function(C){return C instanceof D||(C=this.source.wrap(C)),this.inlineStack.push(C),C},pushStackLiteral:function(C){this.push(new D(C))},pushSource:function(C){this.pendingContent&&(this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent),this.pendingLocation)),this.pendingContent=void 0),C&&this.source.push(C)},replaceStack:function(C){var T=["("],U=void 0,G=void 0,ie=void 0;if(!this.isInline())throw new P.default("replaceStack on non-inline");var le=this.popStack(!0);if(le instanceof D)U=[le.value],T=["(",U],ie=!0;else{G=!0;var Ie=this.incrStack();T=["((",this.push(Ie)," = ",le,")"],U=this.topStack()}var ee=C.call(this,U);ie||this.popStack(),G&&this.stackSlot--,this.push(T.concat(ee,")"))},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var C=this.inlineStack;this.inlineStack=[];for(var T=0,U=C.length;T<U;T++){var G=C[T];if(G instanceof D)this.compileStack.push(G);else{var ie=this.incrStack();this.pushSource([ie," = ",G,";"]),this.compileStack.push(ie)}}},isInline:function(){return this.inlineStack.length},popStack:function(C){var T=this.isInline(),U=(T?this.inlineStack:this.compileStack).pop();if(!C&&U instanceof D)return U.value;if(!T){if(!this.stackSlot)throw new P.default("Invalid stack pop");this.stackSlot--}return U},topStack:function(){var C=this.isInline()?this.inlineStack:this.compileStack,T=C[C.length-1];return T instanceof D?T.value:T},contextName:function(C){return this.useDepths&&C?"depths["+C+"]":"depth"+C},quotedString:function(C){return this.source.quotedString(C)},objectLiteral:function(C){return this.source.objectLiteral(C)},aliasable:function(C){var T=this.aliases[C];return T?(T.referenceCount++,T):(T=this.aliases[C]=this.source.wrap(C),T.aliasable=!0,T.referenceCount=1,T)},setupHelper:function(C,T,U){var G=[],ie=this.setupHelperArgs(T,C,G,U),le=this.nameLookup("helpers",T,"helper"),Ie=this.aliasable(this.contextName(0)+" != null ? "+this.contextName(0)+" : (container.nullContext || {})");return{params:G,paramsInit:ie,name:le,callParams:[Ie].concat(G)}},setupParams:function(C,T,U){var G={},ie=[],le=[],Ie=[],ee=!U,me=void 0;ee&&(U=[]),G.name=this.quotedString(C),G.hash=this.popStack(),this.trackIds&&(G.hashIds=this.popStack()),this.stringParams&&(G.hashTypes=this.popStack(),G.hashContexts=this.popStack());var Le=this.popStack(),qe=this.popStack();(qe||Le)&&(G.fn=qe||"container.noop",G.inverse=Le||"container.noop");for(var rt=T;rt--;)me=this.popStack(),U[rt]=me,this.trackIds&&(Ie[rt]=this.popStack()),this.stringParams&&(le[rt]=this.popStack(),ie[rt]=this.popStack());return ee&&(G.args=this.source.generateArray(U)),this.trackIds&&(G.ids=this.source.generateArray(Ie)),this.stringParams&&(G.types=this.source.generateArray(le),G.contexts=this.source.generateArray(ie)),this.options.data&&(G.data="data"),this.useBlockParams&&(G.blockParams="blockParams"),G},setupHelperArgs:function(C,T,U,G){var ie=this.setupParams(C,T,U);return ie.loc=JSON.stringify(this.source.currentLocation),ie=this.objectLiteral(ie),G?(this.useRegister("options"),U.push("options"),["options=",ie]):U?(U.push(ie),""):ie}},function(){for(var L="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "),C=M.RESERVED_WORDS={},T=0,U=L.length;T<U;T++)C[L[T]]=!0}(),M.isValidJavaScriptVariableName=function(L){return!M.RESERVED_WORDS[L]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(L)};function O(L,C,T,U,G){var ie=C.popStack(),le=T.length;for(L&&le--;U<le;U++)ie=C.nameLookup(ie,T[U],G);return L?[C.aliasable("container.strict"),"(",ie,", ",C.quotedString(T[U]),", ",JSON.stringify(C.source.currentLocation)," )"]:ie}p.default=M,u.exports=p.default}(Zu,Zu.exports)),Zu.exports}var dg;function Yw(){return dg||(dg=1,function(u,p){p.__esModule=!0;function y(le){return le&&le.__esModule?le:{default:le}}var b=Vw(),k=y(b),P=gy(),x=y(P),o=qw(),B=Uw(),D=Qw(),M=y(D),O=yy(),L=y(O),C=my(),T=y(C),U=k.default.create;function G(){var le=U();return le.compile=function(Ie,ee){return B.compile(Ie,ee,le)},le.precompile=function(Ie,ee){return B.precompile(Ie,ee,le)},le.AST=x.default,le.Compiler=B.Compiler,le.JavaScriptCompiler=M.default,le.Parser=o.parser,le.parse=o.parse,le.parseWithoutProcessing=o.parseWithoutProcessing,le}var ie=G();ie.create=G,T.default(ie),ie.Visitor=L.default,ie.default=ie,p.default=ie,u.exports=p.default}(ku,ku.exports)),ku.exports}var $w=Yw();const Xu=ry($w);function pg(u,p,y,b){const k=u+p;let P=0,x=0;if(k<=y)P=u,x=p;else{const o=y/2;if(u>o&&p>o)P=o-b,x=o-b;else{const B=Math.min(u,p),D=y-B;u>p?(P=Math.max(D,100)-b,x=B):(P=B,x=Math.max(D,100)-b)}}return{topMaxHeight:P,bottomMaxHeight:x}}function Qu(u,p,y,b){if(!u)return!1;const k=y-b*2-((p==null?void 0:p.scrollHeight)||0);return u.scrollHeight>k}function e2(u,p,y){const b=p-y*2;return Math.min(u,b)}function fg(u,p,y){const b=(p-y*3)/2;return Math.min(u,b)}function mg(u,p){var Ie,ee,me,Le,qe,rt,St;const b=p-80,k=((Ie=u.topLeft)==null?void 0:Ie.scrollHeight)||0,P=((ee=u.bottomLeft)==null?void 0:ee.scrollHeight)||0,{topMaxHeight:x,bottomMaxHeight:o}=pg(k,P,b,40),B=((me=u.topRight)==null?void 0:me.scrollHeight)||0,D=((Le=u.bottomRight)==null?void 0:Le.scrollHeight)||0,{topMaxHeight:M,bottomMaxHeight:O}=pg(B,D,b,40),L=((qe=u.center)==null?void 0:qe.scrollHeight)||0,C=e2(L,p,40),T=((rt=u.topCenter)==null?void 0:rt.scrollHeight)||0,U=fg(T,p,40),G=((St=u.bottomCenter)==null?void 0:St.scrollHeight)||0,ie=fg(G,p,40),le={topLeft:Qu(u.topLeft,u.bottomLeft,p,40),topRight:Qu(u.topRight,u.bottomRight,p,40),topCenter:T>U,center:L>C,bottomLeft:Qu(u.bottomLeft,u.topLeft,p,40),bottomRight:Qu(u.bottomRight,u.topRight,p,40),bottomCenter:G>ie};return{heights:{topLeft:x,topRight:M,topCenter:U,center:C,bottomLeft:o,bottomRight:O,bottomCenter:ie},hasScroll:le}}const t2="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQACWAJYAAD/4gogSUNDX1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Zf2D7dyE4vV/Jvr+SryTwtJaSb7zjSaxRnLSwD+oXG8WUKI22d3RYfbCGpVMmpiKQFtzMnQ6l+Q9W6rsaeC4UsO+s2R9QsGowcDesqo3zfL4U0brit8pLsKCkmP3EHFOgRbLntsfZsKJxXweGbev3Nwah41Ri4B7qsmULgljTTuyICFMO14rbsTu4KKdbCC/27cS59afJFXweCZ1vzOk/LVZmVzAS0mccbHqOwhu+K+jYs3M85EXsEEQvUPqTP7fVx7C3RdvBML6l79zZVcjV2RceAioUx21rYZcjfquJJRpkLpacYe5gOy9r6IxxRNw35r8U8EVeqLIefqpW7LcujTmFCcZhXWMVsbziS/Ui5QpIPFuLacOppTd2X+fDimyqi+CMq48hZ1csfT+w/p6cYj06I6lIkDd8Nfyo/pea2pceO7GzBOP7Hv8AwUP5EngyC1y/89nossWhv6eQbt2PTbKGJXkvKKSyQbmU9Yxem6+YdxC0OyqvX2brvxXwc1jXHfmbz0vZOpMvARs0aVfNcfnVf9WxD9FJO41cdj9PHm5we3Z7B9i9zT2XwernFuRtQkWw8ts0nTYM+JMvC6np8hb1hslT33DLuY4K2vb1LunMV2L/AI28FxLaWMg50pA1n9L6eyr/AGY9seM5xu6HEVqI1THxjSU7B9+8FI+tPk3x2JVVfBXOkS/s7UibGO0NP36jUcX2ZEQHLwiw+UNtah6aWnIC9nuTv1L8m+v335J4LhHGN+Zui53plQpuAvX1MbmyO63ThuyK1zeekwFls9pBxT05C2PJU2d7Nx24r4L8f//Z",n2={"diagonal-stripes":t2,dots:r2,crosshatch:i2};async function o2(u){for(const[p,y]of Object.entries(n2))if(!u.hasImage(p))try{const b=await u.loadImage(y);u.addImage(p,b.data)}catch(b){console.error(`Failed to load pattern image: ${p}`,b)}}const s2={class:"w-full flex flex-col bg-white border border-stone-200 shadow-2xs rounded-xl z-10 relative widget"},a2={key:0,class:"p-5 pb-3 flex justify-between items-center"},l2={class:"inline-block font-semibold text-lg text-gray-800 dark:text-neutral-200"},c2={class:"flex flex-col justify-between h-full"},u2={__name:"vs-filters-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0}},setup(u){const p=u,y=_.ref(0),b=_.ref(null),k=_.computed(()=>{var x;return((x=p.config)==null?void 0:x.filters)||[]}),P=_.computed(()=>k.value.map(x=>({...x,id:x.name})));return _.watch(()=>{var x;return(x=b.value)==null?void 0:x.activeFilters},x=>{y.value=Object.keys(x||{}).length},{deep:!0}),(x,o)=>{const B=_.resolveComponent("VsFilter");return _.openBlock(),_.createElementBlock("div",s2,[u.config.title?(_.openBlock(),_.createElementBlock("div",a2,[_.createElementVNode("h2",l2,_.toDisplayString(u.config.title),1)])):_.createCommentVNode("",!0),_.createElementVNode("div",c2,[_.createVNode(B,{ref_key:"filter",ref:b,scheme:P.value,header:!1,urlSeparator:"true",view:"plain",name:"filter",onFilterChange:x.handleFilterChange},null,8,["scheme","onFilterChange"])])])}}},h2={type:"button",class:"py-2 px-2.5 inline-flex items-center gap-x-1.5 text-sm font-medium rounded-lg bg-white text-gray-800 hover:bg-gray-50 focus:outline-none focus:bg-gray-49 h-[38px] shadow-md"},d2={class:"flex gap-[5px] items-center"},p2={class:"text-gray-600"},f2={key:0,class:"w-[16px] h-[16px] font-medium bg-gray-800 text-white rounded-full flex items-center justify-center text-[10px]"},m2={__name:"vs-inline-filters-widget",props:{config:{type:Object,required:!0},map:{type:Object,required:!0},enabledLayerIds:{type:Array,default:()=>[]}},setup(u){const p=u,y=_.ref(0),b=_.ref(null),k=_.computed(()=>{var D;return((D=p.config)==null?void 0:D.filters)||[]}),P=_.computed(()=>k.value.map(D=>({...D,id:D.name}))),x=_.computed(()=>{var M;const D=(M=p.config)==null?void 0:M.conditions;return!D||!D.layers?!0:p.enabledLayerIds.some(O=>D.layers.includes(O))}),o=_.computed(()=>{var D;if(p.enabledLayerIds&&p.enabledLayerIds.length){const O=(((D=p.config)==null?void 0:D.layers)||[]).find(L=>L.id===p.enabledLayerIds[0]);return(O==null?void 0:O.title)||(O==null?void 0:O.name)||(O==null?void 0:O.label)||p.enabledLayerIds[0]}return""}),B=async({url:D})=>{var C,T;const M=(C=p.config)==null?void 0:C.conditions;if(!M){const U=(T=p.config)==null?void 0:T.layer_id;if(!U)return;const G=p.map.getSource(U);if(G){const le=G.tiles[0].split("?filter=")[0],Ie=D?`${le}?filter=${D}`:le;G.setTiles([Ie])}return}const O=(M==null?void 0:M.layers)||[],L=p.enabledLayerIds.filter(U=>O.includes(U));L.length&&L.forEach(U=>{const G=p.map.getSource(U);if(G){const le=G.tiles[0].split("?filter=")[0],Ie=D?`${le}?filter=${D}`:le;G.setTiles([Ie])}})};return _.watch(()=>p.enabledLayerIds,D=>{(!D||!D.length)&&b.value&&(b.value.activeFilters={},y.value=0)}),_.watch(()=>{var D;return(D=b.value)==null?void 0:D.activeFilters},D=>{y.value=Object.keys(D||{}).length},{deep:!0}),(D,M)=>{const O=_.resolveComponent("VsPopover"),L=_.resolveComponent("VsFilterList");return x.value&&P.value.length?(_.openBlock(),_.createBlock(L,{key:0,ref_key:"filter",ref:b,isDialog:u.config.dialog??!0,scheme:P.value,urlSeparator:"true",view:"plain",name:"filter",onFilterChange:B},{button:_.withCtx(({visible:C})=>[_.createVNode(O,{teleport:"body",trigger:"hover",placement:"bottom"},{reference:_.withCtx(()=>[_.createElementVNode("button",h2,[_.createElementVNode("div",d2,[M[0]||(M[0]=_.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[_.createElementVNode("path",{d:"M12 20L9 21V12.5L4.52 7.572C4.18545 7.20393 4.00005 6.7244 4 6.227V4H20V6.172C19.9999 6.70239 19.7891 7.21101 19.414 7.586L15 12",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),_.createElementVNode("path",{d:"M21.121 20.1209C21.5406 19.7014 21.8265 19.1668 21.9423 18.5849C22.0581 18.0029 21.9988 17.3997 21.7717 16.8514C21.5447 16.3032 21.1602 15.8346 20.6668 15.5049C20.1734 15.1752 19.5934 14.9993 19 14.9993C18.4066 14.9993 17.8266 15.1752 17.3332 15.5049C16.8398 15.8346 16.4553 16.3032 16.2283 16.8514C16.0012 17.3997 15.9419 18.0029 16.0577 18.5849C16.1735 19.1668 16.4594 19.7014 16.879 20.1209C17.297 20.5399 18.004 21.1659 19 21.9999C20.051 21.1099 20.759 20.4839 21.121 20.1209Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"}),_.createElementVNode("path",{d:"M19 18V18.01",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),_.createElementVNode("span",p2,_.toDisplayString(o.value),1),y.value?(_.openBlock(),_.createElementBlock("span",f2,_.toDisplayString(y.value),1)):_.createCommentVNode("",!0)])])]),default:_.withCtx(()=>[M[1]||(M[1]=_.createTextVNode(" Відкрити бокову панель "))]),_:1,__:[1]})]),_:1},8,["isDialog","scheme"])):_.createCommentVNode("",!0)}}},g2={name:"VsListWidget",props:{config:{type:Object,required:!0}},data(){return{items:[],total:0,currentPage:1,limit:10,rootEl:null,resizeObserver:null}},methods:{async fetchData(){try{const u=await Br.get(this.config.api,{params:{page:this.currentPage,limit:this.limit}});this.items=u.data.rows,this.total=u.data.total,this.$emit("content-resize")}catch(u){console.error("Error fetching data:",u)}},handlePageChange(u){this.currentPage=u,this.fetchData()},changeLimit(u){this.limit=u,this.currentPage=1,this.fetchData()}},mounted(){this.fetchData(),this.resizeObserver=new ResizeObserver(()=>{this.$emit("content-resize")}),this.$nextTick(()=>{this.$refs.rootEl&&this.resizeObserver.observe(this.$refs.rootEl)})},beforeUnmount(){this.resizeObserver&&this.$refs.rootEl&&(this.resizeObserver.unobserve(this.$refs.rootEl),this.resizeObserver.disconnect())}},y2={class:"bg-white p-4 rounded-lg h-full flex flex-col overflow-hidden",ref:"rootEl"},_2={key:0,class:"flex flex-col flex-1 overflow-hidden"},v2={class:"space-y-0 overflow-y-auto flex-1 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-gray-300 [&::-webkit-scrollbar-track]:bg-transparent"},x2=["onClick"],b2={class:"text-base font-medium"},w2={class:"mt-2 flex flex-wrap gap-2"},S2={key:1,class:"px-2 py-1 text-sm bg-gray-100 rounded-full"},A2={key:0,class:"my-5 pr-2"},k2={class:"paginationWrapper relative flex justify-center"},C2={key:1,class:"text-center text-slate-400"};function T2(u,p,y,b,k,P){var o;const x=_.resolveComponent("VsPagination");return _.openBlock(),_.createElementBlock("div",y2,[p[0]||(p[0]=_.createElementVNode("h2",{class:"text-xl font-semibold mb-4"},"Список",-1)),((o=k.items)==null?void 0:o.length)>0?(_.openBlock(),_.createElementBlock("div",_2,[_.createElementVNode("div",v2,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(k.items,B=>(_.openBlock(),_.createElementBlock("div",{key:B.id,class:"py-4 border-b last:border-b-0 hover:bg-gray-50",onClick:D=>u.$emit("cardValuesId",B.id)},[_.createElementVNode("h3",b2,_.toDisplayString(B.name),1),_.createElementVNode("div",w2,[B.status_data?(_.openBlock(),_.createElementBlock("span",{key:0,class:_.normalizeClass(["px-2 py-1 text-sm rounded-full",{"bg-green-100 text-green-800":B.status_data.color==="green","bg-red-100 text-red-800":B.status_data.color==="red"}])},_.toDisplayString(B.status_data.text),3)):_.createCommentVNode("",!0),B.class_mbd_id_data?(_.openBlock(),_.createElementBlock("span",S2,_.toDisplayString(B.class_mbd_id_data.text),1)):_.createCommentVNode("",!0)])],8,x2))),128))]),k.total>k.limit?(_.openBlock(),_.createElementBlock("div",A2,[_.createElementVNode("div",k2,[_.createVNode(x,{total:k.total,maxPages:4,defaultPage:k.currentPage,pageSize:k.limit,goTo:!1,size:"medium",onPageChange:P.handlePageChange,backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[5,10,20,50],onPageSizeChange:P.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])):_.createCommentVNode("",!0)])):(_.openBlock(),_.createElementBlock("div",C2,"Немає даних"))],512)}const E2=pr(g2,[["render",T2]]),P2={class:"map-skeleton-loader"},I2={__name:"vs-skeleton-loader",setup(u){return(p,y)=>(_.openBlock(),_.createElementBlock("div",P2,y[0]||(y[0]=[_.createElementVNode("div",{class:"dot-pulse"},null,-1)])))}},M2=pr(I2,[["__scopeId","data-v-954c1e03"]]),L2={},R2={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function D2(u,p){return _.openBlock(),_.createElementBlock("svg",R2,p[0]||(p[0]=[_.createElementVNode("title",null,"Globe Icon",-1),_.createElementVNode("desc",null," A circular representation of a globe with horizontal and vertical lines ",-1),_.createElementVNode("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M2 12H22",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M12 2C14.5013 4.73835 15.9228 8.29203 16 12C15.9228 15.708 14.5013 19.2616 12 22C9.49872 19.2616 8.07725 15.708 8 12C8.07725 8.29203 9.49872 4.73835 12 2Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const z2=pr(L2,[["render",D2]]),B2={components:{homeIcon:z2},name:"vs-homezoom",props:{map:{type:Object},initialView:{type:Object,default:()=>({})}},methods:{homeZoom(){!this.map||!this.initialView||(this.initialView.bbox?this.map.fitBounds(this.initialView.bbox,{duration:0,padding:10}):this.initialView.center&&this.initialView.zoom!==void 0&&(this.map.setCenter(this.initialView.center),this.map.setZoom(this.initialView.zoom)),this.initialView.pitch!==void 0&&this.map.setPitch(this.initialView.pitch),this.initialView.bearing!==void 0&&this.map.setBearing(this.initialView.bearing))}},computed:{}};function V2(u,p,y,b,k,P){const x=_.resolveComponent("homeIcon"),o=_.resolveComponent("VsPopover");return _.openBlock(),_.createElementBlock("div",null,[_.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:_.withCtx(()=>[_.createVNode(x,{onClick:P.homeZoom,class:"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"},null,8,["onClick"])]),default:_.withCtx(()=>[p[0]||(p[0]=_.createElementVNode("div",null,"Повернутися до початкових налаштувань",-1))]),_:1,__:[0]})])}const O2=pr(B2,[["render",V2]]),F2={},N2={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function q2(u,p){return _.openBlock(),_.createElementBlock("svg",N2,p[0]||(p[0]=[_.createElementVNode("title",null,"Document with Two Sections Icon",-1),_.createElementVNode("desc",null,"A document icon with a split design indicating two sections",-1),_.createElementVNode("path",{d:"M6 9V2H18V9",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M6 18H4C3.46957 18 2.96086 17.7893 2.58579 17.4142C2.21071 17.0391 2 16.5304 2 16V11C2 10.4696 2.21071 9.96086 2.58579 9.58579C2.96086 9.21071 3.46957 9 4 9H20C20.5304 9 21.0391 9.21071 21.4142 9.58579C21.7893 9.96086 22 10.4696 22 11V16C22 16.5304 21.7893 17.0391 21.4142 17.4142C21.0391 17.7893 20.5304 18 20 18H18",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),_.createElementVNode("path",{d:"M18 14H6V22H18V14Z",stroke:"#1E40AF","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const U2=pr(F2,[["render",q2]]),j2={components:{printIcon:U2},props:{map:{type:Object},activeTool:String,setActiveTool:Function},data(){return{printVisible:!1,scriptElements:[],styleElements:[],resourcesLoaded:!1}},watch:{activeTool(u){u!=="print"?this.printVisible=!1:this.init()},async printVisible(u){!this.resourcesLoaded&&u?(await this.loadResources(),this.init(),this.simulateClick()):this.removeResources()},activeTool(u,p){u!=="print"&&p==="print"&&(this.closePrint&&this.closePrint(),this.printVisible=!1),u==="print"&&!this.printVisible&&(this.printVisible=!0,this.init())}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.printVisible,"bg-white":!this.printVisible}}},mounted(){document.addEventListener("click",u=>{const p=document.querySelector(".mapboxgl-export-list");if(p&&p.contains(u.target)){u.stopPropagation();return}!u.target.classList.contains("mapboxgl-export-list")&&!u.target.classList.contains("print-button")&&!u.target.classList.contains("mapboxgl-export-control")&&!u.target.id.includes("mapbox-gl-export")&&(this.printVisible=!1)})},methods:{addScript(u){return new Promise((p,y)=>{const b=document.createElement("script");b.src=u,b.async=!0,b.onload=p,b.onerror=y,document.head.appendChild(b),this.scriptElements.push(b)})},addStyle(u){return new Promise((p,y)=>{const b=document.createElement("link");b.href=u,b.rel="stylesheet",b.type="text/css",b.onload=p,b.onerror=y,document.head.appendChild(b),this.styleElements.push(b)})},async loadResources(){try{await this.addStyle("https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.8.0/mapbox-gl.min.css"),await this.addScript("https://cdnjs.cloudflare.com/ajax/libs/mapbox-gl/3.8.0/mapbox-gl.js"),await this.addStyle("https://cdn.jsdelivr.net/npm/@watergis/mapbox-gl-export@3.5.4/dist/mapbox-gl-export.min.css"),await this.addScript("https://cdn.jsdelivr.net/npm/@watergis/mapbox-gl-export@3.5.4/dist/mapbox-gl-export.umd.min.js"),this.resourcesLoaded=!0}catch(u){console.error("Failed to load resources:",u)}},removeResources(){this.scriptElements.forEach(u=>{u.parentNode&&u.parentNode.removeChild(u)}),this.scriptElements=[],this.styleElements.forEach(u=>{u.parentNode&&u.parentNode.removeChild(u)}),this.styleElements=[],this.resourcesLoaded=!1},async toggleResources(){this.printVisible=!this.printVisible},init(){if(!window.MapboxExportControl){console.error("MapboxExportControl is not loaded.");return}window.mapboxgl.accessToken="pk.eyJ1Ijoia3Jpemhhbm92c2t5IiwiYSI6ImNsemkxNWtkODA5dDcycnNhMWZzYWM0MTAifQ.6fEpgfd_2mA4UYuflDewpQ";const{MapboxExportControl:u,Size:p,PageOrientation:y,Format:b,DPI:k}=window.MapboxExportControl;this.map.addControl(new u({PageSize:p.A3,PageOrientation:y.Portrait,Format:b.PNG,DPI:k[96],Crosshair:!0,PrintableArea:!0,Local:"uk"}))},simulateClick(){new Promise(p=>{const y=setTimeout(()=>{const b=document.querySelector(".mapboxgl-export-control");b&&(clearInterval(y),p(b))},100)}).then(p=>{p.click()}).catch(()=>{console.error("Print button not found.")})},togglePrint(){!this.activeTool||this.activeTool!=="print"?this.setActiveTool&&this.setActiveTool("print"):this.setActiveTool&&this.setActiveTool(null),this.printVisible=!this.printVisible,this.printVisible?this.init():this.removeResources()}}};function H2(u,p,y,b,k,P){const x=_.resolveComponent("printIcon"),o=_.resolveComponent("VsPopover");return _.openBlock(),_.createBlock(o,{trigger:"hover",placement:"left",teleport:"body"},{reference:_.withCtx(()=>[_.createVNode(x,{onClick:P.togglePrint,class:_.normalizeClass([P.modalButtonClasses,"print-button w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:_.withCtx(()=>[p[0]||(p[0]=_.createElementVNode("div",null,"Надрукувати",-1))]),_:1,__:[0]})}const W2=pr(j2,[["render",H2]]),Z2={props:{map:{type:Object,required:!0}},data(){return{is3D:!1}},mounted(){this.map.on("move",this.updateViewStatus),this.updateViewStatus()},beforeUnmount(){this.map.off("move",this.updateViewStatus)},methods:{toggleView(){this.is3D?this.map.easeTo({pitch:0,bearing:0,duration:1e3}):this.map.easeTo({pitch:60,bearing:-29.6,duration:1e3})},updateViewStatus(){this.is3D=this.map.getPitch()!==0}}};function K2(u,p,y,b,k,P){const x=_.resolveComponent("VsPopover");return _.openBlock(),_.createBlock(x,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:_.withCtx(()=>[_.createElementVNode("div",{class:"font-light w-full h-[44px] p-[9px] [transition:.3s] hover:[transition:.3s] text-[19px] hover:bg-[#DBEAFE] flex cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]",onClick:p[0]||(p[0]=(...o)=>P.toggleView&&P.toggleView(...o))},_.toDisplayString(k.is3D?"2D":"3D"),1)]),default:_.withCtx(()=>[p[1]||(p[1]=_.createElementVNode("div",null,"Перемикач виду",-1))]),_:1,__:[1]})}const G2=pr(Z2,[["render",K2]]),J2={},X2={class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Q2(u,p){return _.openBlock(),_.createElementBlock("svg",X2,p[0]||(p[0]=[_.createElementVNode("path",{d:"M18 6 6 18"},null,-1),_.createElementVNode("path",{d:"m6 6 12 12"},null,-1)]))}const gp=pr(J2,[["render",Q2]]),Y2={props:{bgColor:{type:String,default:"#1E40AF"}}},$2={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},eS=["stroke"],tS=["stroke"],rS=["stroke"],iS=["stroke"],nS=["stroke"],oS=["stroke"];function sS(u,p,y,b,k,P){return _.openBlock(),_.createElementBlock("svg",$2,[p[0]||(p[0]=_.createElementVNode("title",null,"Target Icon",-1)),p[1]||(p[1]=_.createElementVNode("desc",null,"A target icon with a circular pattern inside a rounded square",-1)),_.createElementVNode("path",{d:"M2 12H5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,eS),_.createElementVNode("path",{d:"M19 12H22",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,tS),_.createElementVNode("path",{d:"M12 2V5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,rS),_.createElementVNode("path",{d:"M12 19V22",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,iS),_.createElementVNode("path",{d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,nS),_.createElementVNode("path",{d:"M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,oS)])}const aS=pr(Y2,[["render",sS]]),{Marker:lS}=tp,cS={components:{geoIcon:aS,closeIcon:gp},data(){return{location:null,data:null,marker:null,showLocation:!1}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.showLocation,"bg-white":!this.showLocation}}},props:{map:{type:Object}},beforeUnmount(){var u;(u=this.marker)==null||u.remove()},watch:{activeControl(u,p){u!=="geolocation"&&p==="geolocation"&&(this.showLocation=!1,this.closeGeolocation())}},methods:{togleGeolocation(){this.showLocation=!this.showLocation,this.showLocation?this.getUserLocation():(this.closeGeolocation(),this.activeControl="no")},getUserLocation(){navigator.geolocation?navigator.geolocation.getCurrentPosition(this.onGeolocationSuccess,this.onGeolocationError):(this.showLocation=!1,this.activeControl="no",this.$notify({type:"error",title:"Помилка",message:"Цей браузер не підтримує геолокацію"}),this.$emit("close"))},async onGeolocationSuccess(u){this.location={latitude:u.coords.latitude,longitude:u.coords.longitude};const y=await(await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${this.location.latitude}&lon=${this.location.longitude}`)).json();this.data=y.address;const b=[this.location.longitude,this.location.latitude],k=[[parseFloat(y.boundingbox[2]),parseFloat(y.boundingbox[0])],[parseFloat(y.boundingbox[3]),parseFloat(y.boundingbox[1])]];this.map.fitBounds(k,{padding:200,maxZoom:16}),this.marker||(this.marker=new lS({color:"var(--primary)"})),this.marker.setLngLat(b).addTo(this.map),this.activeControl="geolocation"},closeGeolocation(){this.showLocation=!1,this.marker&&(this.marker.remove(),this.marker=null),this.location=null,this.data=null},onGeolocationError(){this.showLocation=!1,this.activeControl="no",this.$notify({type:"error",title:"Помилка",message:"Для визначення геолокації потрібен HTTPS протокол"}),this.$emit("close")}}},uS={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[70px] bg-white border rounded-[15px] p-4 z-10"},hS={class:"flex justify-between items-center border-b pb-[16px]"},dS={class:"d-flex"},pS={class:"pt-[16px]"};function fS(u,p,y,b,k,P){var D,M,O,L,C,T;const x=_.resolveComponent("closeIcon"),o=_.resolveComponent("geoIcon"),B=_.resolveComponent("VsPopover");return _.openBlock(),_.createElementBlock("div",null,[(_.openBlock(),_.createBlock(_.Teleport,{to:"#maplibre-demo-map"},[k.location?(_.openBlock(),_.createElementBlock("div",uS,[_.createElementVNode("div",hS,[p[0]||(p[0]=_.createElementVNode("div",{class:"text-lg font-semibold"},"Ваша геолокація",-1)),_.createElementVNode("div",dS,[_.createVNode(x,{onClick:P.closeGeolocation},null,8,["onClick"])])]),_.createElementVNode("div",pS,[_.createElementVNode("div",null,[p[1]||(p[1]=_.createElementVNode("strong",null,"Широта:",-1)),_.createTextVNode(" "+_.toDisplayString((D=k.location)==null?void 0:D.latitude),1)]),_.createElementVNode("div",null,[p[2]||(p[2]=_.createElementVNode("strong",null,"Довгота:",-1)),_.createTextVNode(" "+_.toDisplayString((M=k.location)==null?void 0:M.longitude),1)]),_.createElementVNode("div",null,[p[3]||(p[3]=_.createElementVNode("strong",null,"КраЇна:",-1)),_.createTextVNode(" "+_.toDisplayString((O=k.data)==null?void 0:O.country),1)]),_.createElementVNode("div",null,[p[4]||(p[4]=_.createElementVNode("strong",null,"Код країни:",-1)),_.createTextVNode(" "+_.toDisplayString((L=k.data)==null?void 0:L.country_code),1)]),_.createElementVNode("div",null,[p[5]||(p[5]=_.createElementVNode("strong",null,"Місто:",-1)),_.createTextVNode(" "+_.toDisplayString((C=k.data)==null?void 0:C.city),1)]),_.createElementVNode("div",null,[p[6]||(p[6]=_.createElementVNode("strong",null,"Поштовий індекс:",-1)),_.createTextVNode(" "+_.toDisplayString((T=k.data)==null?void 0:T.postcode),1)])])])):_.createCommentVNode("",!0)])),_.createVNode(B,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:_.withCtx(()=>[_.createVNode(o,{onClick:P.togleGeolocation,class:_.normalizeClass([P.modalButtonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:_.withCtx(()=>[p[7]||(p[7]=_.createElementVNode("div",null,"Дізнатися геолокацію",-1))]),_:1,__:[7]})])}const mS=pr(cS,[["render",fS]]);var gg=63710088e-1;function gS(u,p){var y,b,k,P,x,o,B,D,M,O,L=0,C=u.type==="FeatureCollection",T=u.type==="Feature",U=C?u.features.length:1;for(y=0;y<U;y++){for(o=C?u.features[y].geometry:T?u.geometry:u,D=C?u.features[y].properties:T?u.properties:{},M=C?u.features[y].bbox:T?u.bbox:void 0,O=C?u.features[y].id:T?u.id:void 0,B=o?o.type==="GeometryCollection":!1,x=B?o.geometries.length:1,k=0;k<x;k++){if(P=B?o.geometries[k]:o,P===null){if(p(null,L,D,M,O)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(p(P,L,D,M,O)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<P.geometries.length;b++)if(p(P.geometries[b],L,D,M,O)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}L++}}function yS(u,p,y){var b=y;return gS(u,function(k,P,x,o,B){P===0&&y===void 0?b=k:b=p(b,k,P,x,o,B)}),b}function _S(u){return yS(u,(p,y)=>p+vS(y),0)}function vS(u){let p=0,y;switch(u.type){case"Polygon":return yg(u.coordinates);case"MultiPolygon":for(y=0;y<u.coordinates.length;y++)p+=yg(u.coordinates[y]);return p;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function yg(u){let p=0;if(u&&u.length>0){p+=Math.abs(_g(u[0]));for(let y=1;y<u.length;y++)p-=Math.abs(_g(u[y]))}return p}var xS=gg*gg/2,Hd=Math.PI/180;function _g(u){const p=u.length-1;if(p<=2)return 0;let y=0,b=0;for(;b<p;){const k=u[b],P=u[b+1===p?0:b+1],x=u[b+2>=p?(b+2)%p:b+2],o=k[0]*Hd,B=P[1]*Hd,D=x[0]*Hd;y+=(D-o)*Math.sin(B),b++}return y*xS}var gn=63710088e-1,bS={centimeters:gn*100,centimetres:gn*100,degrees:360/(2*Math.PI),feet:gn*3.28084,inches:gn*39.37,kilometers:gn/1e3,kilometres:gn/1e3,meters:gn,metres:gn,miles:gn/1609.344,millimeters:gn*1e3,millimetres:gn*1e3,nauticalmiles:gn/1852,radians:1,yards:gn*1.0936};function ch(u,p,y={}){const b={type:"Feature"};return(y.id===0||y.id)&&(b.id=y.id),y.bbox&&(b.bbox=y.bbox),b.properties=p||{},b.geometry=u,b}function by(u,p,y={}){for(const k of u){if(k.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(k[k.length-1].length!==k[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;P<k[k.length-1].length;P++)if(k[k.length-1][P]!==k[0][P])throw new Error("First and last Position are not equivalent.")}return ch({type:"Polygon",coordinates:u},p,y)}function uh(u,p,y={}){if(u.length<2)throw new Error("coordinates must be an array of two or more positions");return ch({type:"LineString",coordinates:u},p,y)}function hc(u,p={}){const y={type:"FeatureCollection"};return p.id&&(y.id=p.id),p.bbox&&(y.bbox=p.bbox),y.features=u,y}function wS(u,p="kilometers"){const y=bS[p];if(!y)throw new Error(p+" units is invalid");return u*y}function Yu(u){return u%360*Math.PI/180}function vg(u){if(!u)throw new Error("coord is required");if(!Array.isArray(u)){if(u.type==="Feature"&&u.geometry!==null&&u.geometry.type==="Point")return[...u.geometry.coordinates];if(u.type==="Point")return[...u.coordinates]}if(Array.isArray(u)&&u.length>=2&&!Array.isArray(u[0])&&!Array.isArray(u[1]))return[...u];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function rp(u,p,y={}){var b=vg(u),k=vg(p),P=Yu(k[1]-b[1]),x=Yu(k[0]-b[0]),o=Yu(b[1]),B=Yu(k[1]),D=Math.pow(Math.sin(P/2),2)+Math.pow(Math.sin(x/2),2)*Math.cos(o)*Math.cos(B);return wS(2*Math.atan2(Math.sqrt(D),Math.sqrt(1-D)),y.units)}function wy(u,p,y){if(u!==null)for(var b,k,P,x,o,B,D,M=0,O=0,L,C=u.type,T=C==="FeatureCollection",U=C==="Feature",G=T?u.features.length:1,ie=0;ie<G;ie++){D=T?u.features[ie].geometry:U?u.geometry:u,L=D?D.type==="GeometryCollection":!1,o=L?D.geometries.length:1;for(var le=0;le<o;le++){var Ie=0,ee=0;if(x=L?D.geometries[le]:D,x!==null){B=x.coordinates;var me=x.type;switch(M=0,me){case null:break;case"Point":if(p(B,O,ie,Ie,ee)===!1)return!1;O++,Ie++;break;case"LineString":case"MultiPoint":for(b=0;b<B.length;b++){if(p(B[b],O,ie,Ie,ee)===!1)return!1;O++,me==="MultiPoint"&&Ie++}me==="LineString"&&Ie++;break;case"Polygon":case"MultiLineString":for(b=0;b<B.length;b++){for(k=0;k<B[b].length-M;k++){if(p(B[b][k],O,ie,Ie,ee)===!1)return!1;O++}me==="MultiLineString"&&Ie++,me==="Polygon"&&ee++}me==="Polygon"&&Ie++;break;case"MultiPolygon":for(b=0;b<B.length;b++){for(ee=0,k=0;k<B[b].length;k++){for(P=0;P<B[b][k].length-M;P++){if(p(B[b][k][P],O,ie,Ie,ee)===!1)return!1;O++}ee++}Ie++}break;case"GeometryCollection":for(b=0;b<x.geometries.length;b++)if(wy(x.geometries[b],p)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function SS(u,p){var y,b,k,P,x,o,B,D,M,O,L=0,C=u.type==="FeatureCollection",T=u.type==="Feature",U=C?u.features.length:1;for(y=0;y<U;y++){for(o=C?u.features[y].geometry:T?u.geometry:u,D=C?u.features[y].properties:T?u.properties:{},M=C?u.features[y].bbox:T?u.bbox:void 0,O=C?u.features[y].id:T?u.id:void 0,B=o?o.type==="GeometryCollection":!1,x=B?o.geometries.length:1,k=0;k<x;k++){if(P=B?o.geometries[k]:o,P===null){if(p(null,L,D,M,O)===!1)return!1;continue}switch(P.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(p(P,L,D,M,O)===!1)return!1;break}case"GeometryCollection":{for(b=0;b<P.geometries.length;b++)if(p(P.geometries[b],L,D,M,O)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}L++}}function AS(u,p){SS(u,function(y,b,k,P,x){var o=y===null?null:y.type;switch(o){case null:case"Point":case"LineString":case"Polygon":return p(ch(y,k,{bbox:P,id:x}),b,0)===!1?!1:void 0}var B;switch(o){case"MultiPoint":B="Point";break;case"MultiLineString":B="LineString";break;case"MultiPolygon":B="Polygon";break}for(var D=0;D<y.coordinates.length;D++){var M=y.coordinates[D],O={type:B,coordinates:M};if(p(ch(O,k),b,D)===!1)return!1}})}function kS(u,p){AS(u,function(y,b,k){var P=0;if(y.geometry){var x=y.geometry.type;if(!(x==="Point"||x==="MultiPoint")){var o,B=0,D=0,M=0;if(wy(y,function(O,L,C,T,U){if(o===void 0||b>B||T>D||U>M){o=O,B=b,D=T,M=U,P=0;return}var G=uh([o,O],y.properties);if(p(G,b,k,U,P)===!1)return!1;P++,o=O})===!1)return!1}}})}function CS(u,p,y){var b=y,k=!1;return kS(u,function(P,x,o,B,D){k===!1&&y===void 0?b=P:b=p(b,P,x,o,B,D),k=!0}),b}function TS(u,p={}){return CS(u,(y,b)=>{const k=b.geometry.coordinates;return y+rp(k[0],k[1],p)},0)}const ES={props:{bgColor:{type:String,default:"#1E40AF"}}},PS={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},IS=["stroke"],MS=["stroke"],LS=["stroke"],RS=["stroke"],DS=["stroke"];function zS(u,p,y,b,k,P){return _.openBlock(),_.createElementBlock("svg",PS,[p[0]||(p[0]=_.createElementVNode("title",null,"Pencil Icon",-1)),p[1]||(p[1]=_.createElementVNode("desc",null,"A pencil icon with strokes and detailed lines",-1)),_.createElementVNode("path",{d:"M21.3 15.3C21.5238 15.523 21.7013 15.7879 21.8225 16.0796C21.9436 16.3714 22.0059 16.6841 22.0059 17C22.0059 17.3159 21.9436 17.6286 21.8225 17.9204C21.7013 18.2121 21.5238 18.477 21.3 18.7L18.7 21.3C18.4771 21.5237 18.2121 21.7013 17.9204 21.8224C17.6287 21.9435 17.3159 22.0059 17 22.0059C16.6842 22.0059 16.3714 21.9435 16.0797 21.8224C15.788 21.7013 15.523 21.5237 15.3 21.3L2.70005 8.7C2.2506 8.24838 1.99829 7.63715 1.99829 7C1.99829 6.36285 2.2506 5.75162 2.70005 5.3L5.30005 2.7C5.75167 2.25056 6.36289 1.99825 7.00005 1.99825C7.6372 1.99825 8.24842 2.25056 8.70005 2.7L21.3 15.3Z",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,IS),_.createElementVNode("path",{d:"M14.5 12.5L16.5 10.5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,MS),_.createElementVNode("path",{d:"M11.5 9.5L13.5 7.5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,LS),_.createElementVNode("path",{d:"M8.5 6.5L10.5 4.5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,RS),_.createElementVNode("path",{d:"M17.5 15.5L19.5 13.5",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,DS)])}const BS=pr(ES,[["render",zS]]),VS={name:"vs-measure",components:{rulerIcon:BS,closeIcon:gp},data(){return{points:[],inputPoint:[],distance:0,distanceType:!1,modalVisible:!1,draggingPointId:null}},watch:{async points(){this.inputPoint=this.points.map(u=>{var p,y;return{id:u.properties.id,value:((y=(p=u==null?void 0:u.geometry)==null?void 0:p.coordinates)==null?void 0:y.reduceRight((b,k)=>[...b,typeof k=="string"?k:k.toFixed(5)],[]).join(","))||""}}),this.setPoints()},activeTool(u,p){u!=="length"&&p==="length"&&(this.closeMeasure(),this.modalVisible=!1),u==="length"&&!this.modalVisible&&(this.modalVisible=!0,this.initMeasureLayer())}},props:{map:{type:Object},activeTool:String,setActiveTool:Function},methods:{measureMapClick(u){const p=this.map.queryRenderedFeatures(u.point,{layers:["measure-points"]});if(p.length)this.points=this.points.filter(y=>{var b,k;return y.properties.id!==((k=(b=p[0])==null?void 0:b.properties)==null?void 0:k.id)});else{const y={type:"Feature",geometry:{type:"Point",coordinates:Object.values(u.lngLat)},properties:{id:Math.floor(Math.random()*1e3)}};this.points=this.points.concat(y)}},async setPoints(){const u=this.points.filter(k=>k==null?void 0:k.geometry),p=u.map((k,P)=>{var B,D;const x=rp(u[P?P-1:0],k),o=this.distanceType?x:x+ +((D=(B=u[P-1])==null?void 0:B.properties)==null?void 0:D.distance)||0;return k.properties.distance=o,k.properties.title=`${o.toLocaleString()}км`,k}),y=await hc(p);if(p.length>2){const k=by([[...p.map(P=>P.geometry.coordinates),p[0].geometry.coordinates]]);this.map.getSource("linear-area").setData(hc([k]))}else{const k=this.map.getSource("measure");k&&k.setData(y)}p.length>1&&(y.features=y.features.concat(uh(p.map(k=>k.geometry.coordinates))),this.distance=TS(uh(p.map(k=>k.geometry.coordinates))));const b=this.map.getSource("measure");b&&b.setData(y)},handleDelete(u){this.points=this.points.filter(p=>p.properties.id!==u)},addCoords(){this.points=this.points.concat({type:"Feature",properties:{id:Math.floor(Math.random()*1e3)},geometry:null})},handleChange(){this.points=this.inputPoint.map(u=>{if(/^([^,]*,[^,]*)$/.test(u.value)){const p=u.value.split(",").reverse();if(p[0]<-90||p[0]>90||p[1]>180||p[1]<-180)this.$notify({type:"error",title:"Помилка",message:"Координати неправильні"});else return{type:"Feature",geometry:{type:"Point",coordinates:p},properties:{id:u.id}}}else this.$notify({type:"error",title:"Помилка",message:"Координати неправильні"})})},removeLinearLayer(){this.map.getLayer("measure-lines")&&this.map.removeLayer("measure-lines"),this.map.getLayer("measure-points")&&this.map.removeLayer("measure-points"),this.map.getLayer("measure-symbol")&&this.map.removeLayer("measure-symbol"),this.map.getSource("measure")&&this.map.removeSource("measure"),this.map.getLayer("linear-area-fill")&&this.map.removeLayer("linear-area-fill"),this.map.getSource("linear-area")&&this.map.removeSource("linear-area"),this.distance=0},createLinearLayer(){this.map.addSource("measure",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"measure-lines",type:"line",source:"measure",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]}),this.map.addLayer({id:"measure-points",type:"circle",source:"measure",paint:{"circle-radius":4.5,"circle-color":"#fff","circle-stroke-width":2,"circle-stroke-color":"#000"},filter:["in","$type","Point"]}),this.map.addLayer({id:"measure-symbol",source:"measure",type:"symbol",paint:{"text-color":"#111","text-halo-color":"#fff","text-halo-width":2},layout:{"symbol-placement":"point","text-letter-spacing":.2,"text-field":"{title}","text-font":["Open Sans Regular"],"text-size":15,"text-anchor":"bottom-left"},filter:["in","$type","Point"]}),this.createAreaLayer(),this.map.on("mousemove",this.mouseMove),this.map.on("mousemove",this.mouseMove)},mouseMove(u){const p=this.map.queryRenderedFeatures(u.point,{layers:["measure-points"]});this.map.getCanvas().style.cursor=p.length?"move":"crosshair"},createAreaLayer(){const{map:u}=this;u.addSource("linear-area",{type:"geojson",data:{type:"FeatureCollection",features:[]}})},distanceFormat(){const u=this.points.filter(p=>p.geometry).map(p=>p.geometry);u.forEach((p,y)=>{const b=rp(u[y?y-1:0],p);distance.push(b);const k=this.distanceType?b:b+ +this.points[y?y-1:0].properties.distance||0;this.points[y].properties.distance=k,this.points[y].properties.title=`${k.toLocaleString()}km`})},initMeasureLayer(){this.createLinearLayer(),this.map.on("mousedown","measure-points",this.handleDrag),this.map.on("click",this.measureMapClick),this.map.on("touchend",this.measureMapClick)},onMove(u){const p=u.lngLat;this.points=this.points.map(y=>y.properties.id===this.draggingPointId?{...y,geometry:{...y.geometry,coordinates:[p.lng,p.lat]}}:y),this.setPoints()},onUp(){this.map.off("mousemove",this.onMove),this.draggingPointId=null},handleDrag(u){u.preventDefault();const p=this.map.queryRenderedFeatures(u.point,{layers:["measure-points"]});if(p.length){const y=p[0].properties.id;this.draggingPointId=y,this.map.on("mousemove",this.onMove),this.map.once("mouseup",this.onUp)}},closeMeasure(){this.points=[],this.map.off("touchend",this.measureMapClick),this.map.off("click",this.measureMapClick),this.map.off("mousemove",this.mouseMove),this.map.getCanvas().style.cursor="grab",this.modalVisible=!1,this.removeLinearLayer()},toggleMeasure(){!this.activeTool||this.activeTool!=="length"?this.setActiveTool&&this.setActiveTool("length"):this.setActiveTool&&this.setActiveTool(null),this.modalVisible=!this.modalVisible,this.modalVisible?this.initMeasureLayer():this.closeMeasure()}},computed:{buttonClasses(){return{"!bg-[#DBEAFE]":this.modalVisible,"bg-white":!this.modalVisible}}}},OS={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[60px] bg-white border rounded-[15px] p-4 z-10"},FS={class:"flex justify-between items-center border-b pb-[16px]"},NS={class:"pt-[16px]"},qS={class:"text-[14px] font-medium text-[#6B7280] mb-[16px]"},US={key:0,class:"flex items-center mb-4"},jS={key:1,class:"text-[14px] font-bold",ref:"distanceContainer"};function HS(u,p,y,b,k,P){const x=_.resolveComponent("closeIcon"),o=_.resolveComponent("VsPopover"),B=_.resolveComponent("VsSwitch"),D=_.resolveComponent("rulerIcon");return _.openBlock(),_.createElementBlock("div",null,[(_.openBlock(),_.createBlock(_.Teleport,{to:"#maplibre-demo-map"},[k.modalVisible&&y.activeTool==="length"?(_.openBlock(),_.createElementBlock("div",OS,[_.createElementVNode("div",FS,[p[3]||(p[3]=_.createElementVNode("div",{class:"text-[20px]"},"Лінійка",-1)),_.createVNode(o,{trigger:"hover",teleport:"body"},{reference:_.withCtx(()=>[_.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:p[0]||(p[0]=(...M)=>P.toggleMeasure&&P.toggleMeasure(...M))},[_.createVNode(x,{class:"cursor-pointer"})])]),default:_.withCtx(()=>[p[2]||(p[2]=_.createTextVNode(" Приховати панель "))]),_:1,__:[2]})]),_.createElementVNode("div",NS,[_.createElementVNode("p",qS,[k.points.length?_.createCommentVNode("",!0):(_.openBlock(),_.createElementBlock(_.Fragment,{key:0},[_.createTextVNode(" Натисніть на мапу, щоб додати першу точку. ")],64)),k.points.length==1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:1},[_.createTextVNode(" Натисніть на мапу, щоб додати другу точку. ")],64)):_.createCommentVNode("",!0),k.points.length>1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:2},[_.createTextVNode(" Продовжуйте натискати для додавання нових точок. Точки можна рухати. ")],64)):_.createCommentVNode("",!0)]),k.points.length>=3?(_.openBlock(),_.createElementBlock("div",US,[_.createVNode(B,{modelValue:k.distanceType,"onUpdate:modelValue":p[1]||(p[1]=M=>k.distanceType=M),onChange:P.setPoints},null,8,["modelValue","onChange"]),p[4]||(p[4]=_.createElementVNode("span",{class:"text-[14px] font-medium text-[#6B7280] ml-2"},"загальна | до точки",-1))])):_.createCommentVNode("",!0),k.points.length>=2?(_.openBlock(),_.createElementBlock("div",jS,[p[5]||(p[5]=_.createTextVNode(" Загальна відстань: ")),_.createElementVNode("span",null,_.toDisplayString(k.distance.toLocaleString())+" км",1)],512)):_.createCommentVNode("",!0)])])):_.createCommentVNode("",!0)])),_.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:_.withCtx(()=>[_.createVNode(D,{class:_.normalizeClass([P.buttonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"]),onClick:P.toggleMeasure},null,8,["class","onClick"])]),default:_.withCtx(()=>[p[6]||(p[6]=_.createElementVNode("div",null,"Виміряти довжину",-1))]),_:1,__:[6]})])}const WS=pr(VS,[["render",HS],["__scopeId","data-v-401b2f16"]]),ZS={props:{bgColor:{type:String,default:"#1E40AF"}}},KS={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},GS=["stroke"],JS=["stroke"],XS=["stroke"];function QS(u,p,y,b,k,P){return _.openBlock(),_.createElementBlock("svg",KS,[p[0]||(p[0]=_.createElementVNode("title",null,"Crossed Arrows with Curved Line Icon",-1)),p[1]||(p[1]=_.createElementVNode("desc",null,"Two crossed arrows with a curved line to the right",-1)),_.createElementVNode("path",{d:"M4 19L12 11",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,GS),_.createElementVNode("path",{d:"M12 19L4 11",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,JS),_.createElementVNode("path",{d:"M20 12H16C16 10.5 16.442 10 17.5 9.5C18.558 9 20 8.334 20 7.002C20 6.53 19.83 6.072 19.516 5.712C19.196 5.35007 18.7613 5.1092 18.2848 5.02981C17.8083 4.95043 17.319 5.03735 16.899 5.276C16.479 5.515 16.161 5.89 16 6.336",stroke:y.bgColor,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,8,XS)])}const YS=pr(ZS,[["render",QS]]),$S={components:{areaIcon:YS,closeIcon:gp},name:"vs-area-measure",props:{map:{type:Object},activeTool:String,setActiveTool:Function},data(){return{points:[],inputPoint:[],area:0,modalVisible:!1,draggingPointId:null}},watch:{async points(){this.inputPoint=this.points.map(u=>{var p,y;return{id:u.properties.id,value:((y=(p=u==null?void 0:u.geometry)==null?void 0:p.coordinates)==null?void 0:y.reduceRight((b,k)=>[...b,typeof k=="string"?k:k.toFixed(5)],[]).join(","))||""}}),this.setPoints()},activeTool(u,p){u!=="area"&&p==="area"&&(this.closeMeasure(),this.modalVisible=!1),u==="area"&&!this.modalVisible&&(this.modalVisible=!0,this.initMeasureLayer())}},methods:{measureMapClick(u){const p=this.map.queryRenderedFeatures(u.point,{layers:["area-measure-points"]});if(p.length)this.points=this.points.filter(y=>y.properties.id!==p[0].properties.id);else{const y={type:"Feature",geometry:{type:"Point",coordinates:Object.values(u.lngLat)},properties:{id:Math.floor(Math.random()*1e3)}};this.points=this.points.concat(y)}},async setPoints(){const u=this.points.filter(b=>b==null?void 0:b.geometry),p=await hc(u);if(u.length>2){const b=by([[...u.map(P=>P.geometry.coordinates),u[0].geometry.coordinates]]);this.area=_S(b)/1e6;const k=this.map.getSource("area-linear-area");k&&k.setData(hc([b]))}else{const b=this.map.getSource("area-linear-area");b&&b.setData(hc([]))}u.length>1&&(p.features=p.features.concat(uh(u.map(b=>b.geometry.coordinates))));const y=this.map.getSource("area-measure");y&&y.setData(p)},handleDelete(u){this.points=this.points.filter(p=>p.properties.id!==u)},addCoords(){this.points=this.points.concat({type:"Feature",properties:{id:Math.floor(Math.random()*1e3)},geometry:null})},handleChange(){this.points=this.inputPoint.map(u=>{if(/^([^,]*,[^,]*)$/.test(u.value)){const p=u.value.split(",").reverse();if(p[0]<-90||p[0]>90||p[1]>180||p[1]<-180)this.$notify({type:"error",title:"Помилка",message:"Недійсні координати!"});else return{type:"Feature",geometry:{type:"Point",coordinates:p},properties:{id:u.id}}}else this.$notify({type:"error",title:"Помилка",message:"Недійсні координати!"})})},removeLinearLayer(){["area-measure-lines","area-measure-points","area-linear-area-fill","center-symbol"].forEach(y=>{this.map.getLayer(y)&&this.map.removeLayer(y)}),["area-measure","area-linear-area"].forEach(y=>{this.map.getSource(y)&&this.map.removeSource(y)}),this.area=0},createLinearLayer(){this.map.addSource("area-measure",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"area-measure-lines",type:"line",source:"area-measure",layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#000","line-width":2.5},filter:["in","$type","LineString"]}),this.map.addLayer({id:"area-measure-points",type:"circle",source:"area-measure",paint:{"circle-radius":4.5,"circle-color":"#fff","circle-stroke-width":2,"circle-stroke-color":"#000"},filter:["in","$type","Point"]}),this.createAreaLayer(),this.map.on("mousemove",this.mouseMove)},mouseMove(u){const p=this.map.queryRenderedFeatures(u.point,{layers:["area-measure-points"]});this.map.getCanvas().style.cursor=p.length?"move":"crosshair"},createAreaLayer(){this.map.addSource("area-linear-area",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),this.map.addLayer({id:"area-linear-area-fill",type:"fill",source:"area-linear-area",layout:{},paint:{"fill-color":"#000","fill-opacity":.06}})},initMeasureLayer(){this.createLinearLayer(),this.map.on("mousedown","area-measure-points",this.handleDrag),this.map.on("click",this.measureMapClick),this.map.on("touchend",this.measureMapClick)},onMove(u){const p=u.lngLat;this.points=this.points.map(y=>y.properties.id===this.draggingPointId?{...y,geometry:{...y.geometry,coordinates:[p.lng,p.lat]}}:y),this.setPoints()},onUp(){this.map.off("mousemove",this.onMove),this.draggingPointId=null},handleDrag(u){u.preventDefault();const p=this.map.queryRenderedFeatures(u.point,{layers:["area-measure-points"]});if(p.length){const y=p[0].properties.id;this.draggingPointId=y,this.map.on("mousemove",this.onMove),this.map.once("mouseup",this.onUp)}},closeMeasure(){this.points=[],this.map.off("touchend",this.measureMapClick),this.map.off("click",this.measureMapClick),this.map.off("mousemove",this.mouseMove),this.map.getCanvas().style.cursor="grab",this.modalVisible=!1,this.removeLinearLayer()},toggleMeasure(){!this.activeTool||this.activeTool!=="area"?this.setActiveTool&&this.setActiveTool("area"):this.setActiveTool&&this.setActiveTool(null),this.modalVisible=!this.modalVisible,this.modalVisible?this.initMeasureLayer():this.closeMeasure()}},computed:{modalButtonClasses(){return{"!bg-[#DBEAFE]":this.modalVisible,"bg-white":!this.modalVisible}}}},eA={key:0,class:"max-w-[412px] absolute w-full top-[20px] right-[60px] bg-white border rounded-[15px] p-4 z-10"},tA={class:"flex justify-between items-center border-b pb-[16px]"},rA={class:"pt-[16px]"},iA={class:"text-[14px] font-medium text-[#6B7280] mb-[16px]"},nA={key:0,ref:"distanceContainer",class:"text-[14px] font-bold"};function oA(u,p,y,b,k,P){const x=_.resolveComponent("closeIcon"),o=_.resolveComponent("VsPopover"),B=_.resolveComponent("areaIcon");return _.openBlock(),_.createElementBlock("div",null,[(_.openBlock(),_.createBlock(_.Teleport,{to:"#maplibre-demo-map"},[k.modalVisible&&y.activeTool==="area"?(_.openBlock(),_.createElementBlock("div",eA,[_.createElementVNode("div",tA,[p[2]||(p[2]=_.createElementVNode("div",{class:"text-lg"},"Площа",-1)),_.createVNode(o,{trigger:"hover",teleport:"body"},{reference:_.withCtx(()=>[_.createElementVNode("button",{type:"button",class:"size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600",onClick:p[0]||(p[0]=(...D)=>P.toggleMeasure&&P.toggleMeasure(...D))},[_.createVNode(x,{class:"cursor-pointer"})])]),default:_.withCtx(()=>[p[1]||(p[1]=_.createTextVNode(" Приховати панель "))]),_:1,__:[1]})]),_.createElementVNode("div",rA,[_.createElementVNode("p",iA,[k.points.length?_.createCommentVNode("",!0):(_.openBlock(),_.createElementBlock(_.Fragment,{key:0},[_.createTextVNode(" Натисніть на мапу, щоб додати першу точку. ")],64)),k.points.length==1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:1},[_.createTextVNode(" Натисніть на мапу, щоб додати другу точку. ")],64)):_.createCommentVNode("",!0),k.points.length>1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:2},[_.createTextVNode(" Продовжуйте натискати для додавання нових точок. Точки можна рухати. ")],64)):_.createCommentVNode("",!0)]),k.points.length>2?(_.openBlock(),_.createElementBlock("div",nA,[p[3]||(p[3]=_.createTextVNode(" Загальна площа: ")),_.createElementVNode("span",null,_.toDisplayString(k.area.toLocaleString())+" км²",1)],512)):_.createCommentVNode("",!0)])])):_.createCommentVNode("",!0)])),_.createVNode(o,{trigger:"hover",placement:"left",teleport:"body",class:"flex"},{reference:_.withCtx(()=>[_.createVNode(B,{onClick:P.toggleMeasure,class:_.normalizeClass([P.modalButtonClasses,"w-full h-auto p-[9px] [transition:.3s] hover:[transition:.3s] text-[24px] hover:bg-[#DBEAFE] flex font-normal cursor-pointer text-[#1E40AF] bg-[#fff] rounded-[4px] border-[1px] border-solid border-[#E5E7EB]"])},null,8,["onClick","class"])]),default:_.withCtx(()=>[p[4]||(p[4]=_.createElementVNode("div",null,"Виміряти площу",-1))]),_:1,__:[4]})])}const sA=pr($S,[["render",oA],["__scopeId","data-v-024154e1"]]),aA={__name:"vs-map-widget-column",props:{position:String,widgets:Array,map:Object,mapLoaded:Boolean,cardValues:Object,hasFilters:Boolean,currentFilterLayer:Object,enabledLayerIds:Array,getWidgetComponent:Function,getColumnWidth:Function,rightColumnOffset:[String,Number],maxHeight:Number,history:Boolean},emits:["set-filter-layer","update:enabledLayerIds","cardValuesId","closeCard","content-resize"],setup(u,{expose:p,emit:y}){const b=y,k=u,P=_.ref(k.widgets.map(D=>{var M;return{...D,config:{...D.config,visible:((M=D.config)==null?void 0:M.visible)!==!1}}}));_.watch(()=>k.widgets.map(D=>D.id||D.type).join(","),()=>{P.value=k.widgets.map(D=>{var M;return{...D,config:{...D.config,visible:((M=D.config)==null?void 0:M.visible)!==!1}}})});function x(D){const M=P.value.find(O=>O.id===D);M&&M.config&&(M.config.visible=!M.config.visible,setTimeout(()=>{b("content-resize")},30))}const o=_.ref(null);p({columnRef:o});let B=null;return _.onMounted(()=>{B=new MutationObserver(()=>{var D;clearTimeout((D=o.value)==null?void 0:D._resizeTimeout),o.value._resizeTimeout=setTimeout(()=>{b("content-resize")},30)}),o.value&&B.observe(o.value,{childList:!0,subtree:!0,characterData:!0})}),_.onUnmounted(()=>{B&&B.disconnect()}),(D,M)=>u.mapLoaded?(_.openBlock(),_.createElementBlock("div",{key:0,class:_.normalizeClass(["widget-column",[_.unref(ny)(u.position)]]),ref_key:"columnRef",ref:o,style:_.normalizeStyle({maxHeight:u.maxHeight?u.maxHeight+"px":void 0,width:u.getColumnWidth(u.position),...u.rightColumnOffset?{right:u.rightColumnOffset}:{}})},[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(P.value,O=>{var L;return _.openBlock(),_.createElementBlock(_.Fragment,{key:O.id||O.type},[O.type!=="card"?_.withDirectives((_.openBlock(),_.createBlock(_.resolveDynamicComponent(u.getWidgetComponent(O.type)),{key:0,map:u.map,config:O.config,hasFilters:u.hasFilters,currentLayer:u.currentFilterLayer,enabledLayerIds:u.enabledLayerIds,history:u.history,onSetFilterLayer:M[0]||(M[0]=C=>D.$emit("set-filter-layer",C)),"onUpdate:enabledLayerIds":M[1]||(M[1]=C=>D.$emit("update:enabledLayerIds",C)),onCardValuesId:M[2]||(M[2]=C=>D.$emit("cardValuesId",C)),onContentResize:M[3]||(M[3]=C=>D.$emit("content-resize")),onShowWidget:x,class:"widget"},null,40,["map","config","hasFilters","currentLayer","enabledLayerIds","history"])),[[_.vShow,((L=O.config)==null?void 0:L.visible)!==!1]]):_.createCommentVNode("",!0),u.cardValues&&O.type==="card"?(_.openBlock(),_.createBlock(cy,{key:1,config:O.config,cardValues:u.cardValues,class:"widget",onClose:M[4]||(M[4]=C=>D.$emit("closeCard")),onContentResize:M[5]||(M[5]=C=>D.$emit("content-resize"))},null,8,["config","cardValues"])):_.createCommentVNode("",!0)],64)}),128))],6)):_.createCommentVNode("",!0)}},lA=pr(aA,[["__scopeId","data-v-3be78334"]]),cA={class:"map-widgets"},uA={key:0,class:"absolute top-[180px] right-2 z-10 flex flex-col gap-[5px]"},hA={__name:"vs-map",props:{table:{type:String,required:!0}},setup(u){const p=u,y=_.ref(null),b=_.ref(!1);let k=null;const P=_.ref(null),x=_.ref(null),o=_.ref([]),B=_.ref([]),D=_.ref(null),M=_.ref(null),O=_.ref(null),L=["top-left","top-right","top-center","center","bottom-left","bottom-center","bottom-right"],C={"top-left":_.ref(null),"top-right":_.ref(null),"top-center":_.ref(null),center:_.ref(null),"bottom-left":_.ref(null),"bottom-center":_.ref(null),"bottom-right":_.ref(null)};function T(it,vt){C[it].value=vt==null?void 0:vt.columnRef}const U=_.ref(0),G=_.ref(0),ie=_.ref(0),le=_.ref(0),Ie=_.ref(0),ee=_.ref(0),me=_.ref(0);function Le(it){if(!it){const Et={topLeft:C["top-left"].value,topRight:C["top-right"].value,topCenter:C["top-center"].value,center:C.center.value,bottomLeft:C["bottom-left"].value,bottomRight:C["bottom-right"].value,bottomCenter:C["bottom-center"].value};Object.values(Et).forEach(or=>{or&&(or.style.maxHeight="")});const{heights:zt}=mg(Et,window.innerHeight);U.value=zt.topLeft,G.value=zt.topRight,ie.value=zt.topCenter,le.value=zt.center,Ie.value=zt.bottomLeft,ee.value=zt.bottomRight,me.value=zt.bottomCenter;return}const At={"top-left":["top-left","bottom-left"],"bottom-left":["top-left","bottom-left"],"top-right":["top-right","bottom-right"],"bottom-right":["top-right","bottom-right"],"top-center":["top-center","bottom-center"],"bottom-center":["top-center","bottom-center"],center:["center"]}[it]||[],Mt={topLeft:C["top-left"].value,topRight:C["top-right"].value,topCenter:C["top-center"].value,center:C.center.value,bottomLeft:C["bottom-left"].value,bottomRight:C["bottom-right"].value,bottomCenter:C["bottom-center"].value};At.forEach(Et=>{Mt[Et]&&(Mt[Et].style.maxHeight="")});const{heights:Ht}=mg(Mt,window.innerHeight);At.forEach(Et=>{Mt[Et]&&Ht[Et]&&(Mt[Et].style.maxHeight=Ht[Et]+"px")}),At.includes("top-left")&&(U.value=Ht.topLeft),At.includes("bottom-left")&&(Ie.value=Ht.bottomLeft),At.includes("top-right")&&(G.value=Ht.topRight),At.includes("bottom-right")&&(ee.value=Ht.bottomRight),At.includes("top-center")&&(ie.value=Ht.topCenter),At.includes("bottom-center")&&(me.value=Ht.bottomCenter),At.includes("center")&&(le.value=Ht.center)}function qe(it){return!O.value||!O.value.widgets?[]:it==="center"?[...O.value.widgets.filter(At=>(At.position||{})==="center")||[],...B.value.filter(At=>At.position==="center")]:O.value.widgets.filter(vt=>(vt.position||{})===it)||[]}Xu.registerHelper("eq",(it,vt)=>it===vt),Xu.registerHelper("formatDate",it=>it?new Date(it).toLocaleDateString():"Немає дати"),Xu.registerHelper("get",(it,vt)=>(it==null?void 0:it[vt])??"");const rt=(it,vt,At)=>{try{if(it)if(At==="markdown"){const Mt=it.replace(/\{\{([^}]+)\}\}/g,(Ht,Et)=>{try{return new Function("data",`with(data) { return ${Et} }`)(vt)}catch{return""}});return Sr(Mt)}else return Xu.compile(it)(vt)}catch(Mt){return console.error("Error processing template:",Mt),it}},St=(it,vt,At,Mt,Ht,Et)=>{const zt=rt(it,Mt,Ht),or=vt?rt(vt,Mt,Ht):"";let Jt="";return At!=null&&At.length&&(Jt=At.map(Ir=>{const ii=rt(Ir.value,Mt,Ht);return`
823
+ <tr class="flex justify-between items-center">
824
+ <td class="font-medium mr-1.5 flex items-center">${Ir.label}</td>
825
+ <td class="text-right">${ii}</td>
826
+ </tr>
827
+ `}).join("")),`
828
+ <div class="absolute min-w-28 max-w-[300px] bg-white/70 border border-gray-200 rounded-lg shadow-md text-gray-800 pointer-events-none" style="left: ${Et.x+10}px; top: ${Et.y}px">
829
+ ${zt?`
830
+ <div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg px-2 py-1">
831
+ <h3>${zt}</h3>
832
+ </div>
833
+ `:""}
834
+ ${vt?`<div class="text-sm px-2 py-1 break-words">${or}</div>`:""}
835
+ ${At!=null&&At.length&&!vt?`
836
+ <div class="text-xs px-2 py-0.5 text-gray-500">
837
+ <table class="w-full">
838
+ <tbody>${Jt}</tbody>
839
+ </table>
840
+ </div>
841
+ `:""}
842
+ </div>
843
+ `},yt=it=>({legend:Rx,basemaps:Ox,layers:db,info:xb,attribute:Yb,catalog:Sw,filters:u2,"inline-filters":m2,list:E2,card:cy})[it],ct=_.computed(()=>!!O.value&&Array.isArray(O.value.widgets)&&O.value.widgets.some(it=>it.type==="filters")),_t=it=>{P.value=it};function qt(){const it=new URLSearchParams(window.location.search),vt=parseFloat(it.get("x")),At=parseFloat(it.get("y")),Mt=parseFloat(it.get("z")),Ht=parseFloat(it.get("bearing")),Et=parseFloat(it.get("pitch"));return{center:isFinite(vt)&&isFinite(At)?[vt,At]:null,zoom:isFinite(Mt)?Mt:null,bearing:isFinite(Ht)?Ht:null,pitch:isFinite(Et)?Et:null}}function Qt({center:it,zoom:vt,bearing:At,pitch:Mt}){const Ht=new URLSearchParams(window.location.search);Ht.set("x",it[0].toFixed(5)),Ht.set("y",it[1].toFixed(5)),Ht.set("z",vt.toFixed(2)),Ht.set("bearing",At.toFixed(2)),Ht.set("pitch",Mt.toFixed(2));const Et=`${window.location.pathname}?${Ht.toString()}`;window.history.replaceState({},"",Et)}const xr=()=>{var Et,zt,or;if(!O.value||!O.value.map)return;const it={version:8,glyphs:"https://cdn.softpro.ua/data/fonts/{fontstack}/{range}.pbf",sources:{voyager:{type:"raster",tiles:["https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"],tileSize:256,attribution:"&copy; <a href='http://www.openstreetmap.org/copyright'>OpenStreetMap</a>, &copy; <a href='https://carto.com/attributions'>CARTO</a>"}},layers:[{id:"voyager",type:"raster",source:"voyager",minzoom:0,maxzoom:22}]};let vt=O.value.map.center,At=O.value.map.zoom,Mt=O.value.map.bearing||0,Ht=O.value.map.pitch||0;if(O.value.history){const Jt=qt();Jt.center&&(vt=Jt.center),Jt.zoom!==null&&(At=Jt.zoom),Jt.bearing!==null&&(Mt=Jt.bearing),Jt.pitch!==null&&(Ht=Jt.pitch)}if(y.value=new tp.Map({container:"maplibre-demo-map",style:it,center:vt,zoom:At,bearing:Mt,pitch:Ht,maxBounds:[18.0856083513,40.3614785833,58.0807890155,56.3350745713]}),(or=(zt=(Et=O==null?void 0:O.value)==null?void 0:Et.interactions)==null?void 0:zt.navigation)!=null&&or.enabled){const Jt=new tp.NavigationControl({showCompass:!0,showZoom:!0,visualizePitch:!0});y.value.addControl(Jt,"top-right")}y.value.on("load",async()=>{var Vr,ni,mi,Mi,gi;await o2(y.value);const Jt=qt(),Ir=Jt.center&&Jt.zoom!==null;if((Vr=O.value.map)!=null&&Vr.bbox&&!Ir){const[dr,Wt,Pt,Bt]=O.value.map.bbox;y.value.fitBounds([[dr,Wt],[Pt,Bt]],{padding:50,duration:0})}if(await(async()=>{var Wt,Pt,Bt,xt,ke;const dr=((ke=(xt=(Bt=(Pt=(Wt=O.value)==null?void 0:Wt.widgets)==null?void 0:Pt.find(K=>K.type==="layers"))==null?void 0:Bt.config)==null?void 0:xt.layers)==null?void 0:ke.filter(K=>{var Q;return((Q=K.style)==null?void 0:Q.attrType)==="icon-by-attribute"}))||[];for(const K of dr){const{rules:Q,default_icon:te,icon_base_url:he}=K.style,xe=[...Q.map(Y=>Y.icon),te].filter(Boolean);for(const Y of xe)try{const Pe=`${he}${Y}`,Ae=await y.value.loadImage(Pe);y.value.hasImage(Y)||y.value.addImage(Y,Ae.data)}catch(Pe){console.error(`Failed to load icon: ${Y}`,Pe)}}})(),(Mi=(mi=(ni=O.value)==null?void 0:ni.interactions)==null?void 0:mi.hover)!=null&&Mi.enabled&&(y.value.on("mousemove",dr=>{var K,Q,te,he,xe,Y,Pe,Ae;const Wt=y.value.queryRenderedFeatures(dr.point);if(y.value&&y.value.getCanvas&&(y.value.getCanvas().style.cursor=Wt.length?"pointer":""),!Wt.length){if(x.value){const Te=(K=y.value.getSource(x.value.source))==null?void 0:K.type;x.value.source,x.value.id,Te==="vector"&&x.value.source,fr(y.value,x.value.source,x.value.id,{hovered:!1}),x.value=null}k&&(k.remove(),k=null);return}const Pt=Wt[0];if(!x.value||x.value.id!==Pt.id||x.value.source!==Pt.layer.source){if(x.value){const ze=(Q=y.value.getSource(x.value.source))==null?void 0:Q.type;x.value.source,x.value.id,ze==="vector"&&x.value.source,fr(y.value,x.value.source,x.value.id,{hovered:!1})}const Te=(te=y.value.getSource(Pt.layer.source))==null?void 0:te.type;Pt.layer.source,Pt.id,Te==="vector"&&Pt.layer.source,fr(y.value,Pt.layer.source,Pt.id,{hovered:!0}),x.value={source:Pt.layer.source,id:Pt.id}}const Bt=(xe=(he=O.value)==null?void 0:he.widgets)==null?void 0:xe.find(Te=>Te.type==="layers"),xt=(Pe=(Y=O.value)==null?void 0:Y.widgets)==null?void 0:Pe.find(Te=>Te.type==="attribute");let ke=null;if(Bt&&(ke=Bt.config.layers.find(Te=>Te.id===Pt.layer.source)),!ke&&xt&&xt.config.layer.id===Pt.layer.source&&(ke=xt.config.layer),(Ae=ke==null?void 0:ke.style)!=null&&Ae.popup){const Te=ke.style.popup;let ze=Te.title,Me="";Te.mode==="markdown"?Me=Array.isArray(Te.content)?Te.content.join(`
844
+
845
+ `):"":Me=Array.isArray(Te.content)?Te.content.join(""):"",k||(k=document.createElement("div"),y.value.getContainer().appendChild(k));const Qe=y.value.project(dr.lngLat);k.innerHTML=St(ze,Me,Te.fields,Pt.properties,Te.mode,Qe)}}),y.value.on("mouseleave",()=>{var dr;if(k&&(k.remove(),k=null),x.value){const Wt=(dr=y.value.getSource(x.value.source))==null?void 0:dr.type;x.value.source,x.value.id,Wt==="vector"&&x.value.source,fr(y.value,x.value.source,x.value.id,{hovered:!1}),x.value=null}y.value&&y.value.getCanvas&&(y.value.getCanvas().style.cursor="")})),y.value.on("click",async dr=>{var Q,te,he,xe,Y;if(["length","area","print"].includes(M.value))return;const Wt=y.value.queryRenderedFeatures(dr.point);if(!Wt.length)return;o.value.forEach(Pe=>{var Te;const Ae=(Te=y.value.getSource(Pe.source))==null?void 0:Te.type;Pe.source,Pe.id,Ae==="vector"&&Pe.source,fr(y.value,Pe.source,Pe.id,{selected:!1})}),o.value=[];const Pt=Wt[0],Bt=(Q=y.value.getSource(Pt.layer.source))==null?void 0:Q.type;Pt.layer.source,Pt.id,Bt==="vector"&&Pt.layer.source,fr(y.value,Pt.layer.source,Pt.id,{selected:!0}),o.value.push({source:Pt.layer.source,id:Pt.id});const xt=(he=(te=O.value)==null?void 0:te.widgets)==null?void 0:he.find(Pe=>Pe.type==="layers"),ke=(Y=(xe=O.value)==null?void 0:xe.widgets)==null?void 0:Y.find(Pe=>Pe.type==="attribute");let K=(ke==null?void 0:ke.config.layer)||(xt==null?void 0:xt.config.layers.find(Pe=>Pe.id===Pt.layer.source));D.value={layer:(K==null?void 0:K.service_key)||"",map:(K==null?void 0:K.map_key)||"",id:Pt.properties.id,title:(K==null?void 0:K.title)||""}}),y.value.on("dblclick",dr=>{var Bt,xt,ke;if(["length","area","print"].includes(M.value))return;ri([dr.lngLat.lng,dr.lngLat.lat]);const Wt=(xt=(Bt=O.value)==null?void 0:Bt.widgets)==null?void 0:xt.find(K=>K.type==="layers");let Pt=null;(ke=Wt==null?void 0:Wt.config)!=null&&ke.layers&&(Pt=Wt.config.layers.find(K=>K.visible!==!1&&["tms","wms","raster"].includes((K.service_type||K.service||"").toLowerCase()))),D.value={layer:(Pt==null?void 0:Pt.map_key)||"",map:(Pt==null?void 0:Pt.service_key)||"",id:"",title:(Pt==null?void 0:Pt.title)||""}}),y.value.resize(),b.value=!0,(gi=O==null?void 0:O.value)!=null&&gi.history){const dr=()=>{const Wt=y.value.getCenter();Qt({center:[Wt.lng,Wt.lat],zoom:y.value.getZoom(),bearing:y.value.getBearing(),pitch:y.value.getPitch()})};y.value.on("moveend",dr),y.value.on("rotate",dr),y.value.on("pitch",dr)}})},gr=()=>{Bi(),o.value.forEach(it=>{y.value&&fr(y.value,it.source,it.id,{selected:!1})}),o.value=[],D.value=null};_.onMounted(async()=>{await ar(),await _.nextTick(),xr(),window.addEventListener("resize",()=>{Le()}),_.watch([C["top-left"],C["top-right"],C["top-center"],C.center,C["bottom-left"],C["bottom-right"],C["bottom-center"],()=>O.value.widgets,B],async()=>{await _.nextTick(),Le(),setTimeout(Le,0)},{deep:!0}),_.watch(b,it=>{it&&_.nextTick().then(()=>{Le()})}),_.watch(()=>p.table,async it=>{if(it){if(y.value){try{y.value.remove()}catch{}y.value=null,b.value=!1}await ar(),await _.nextTick(),xr(),Le(),window.removeEventListener("resize",Le),window.addEventListener("resize",Le),_.watch([C["top-left"],C["top-right"],C["top-center"],C.center,C["bottom-left"],C["bottom-right"],C["bottom-center"],()=>O.value.widgets,B],async()=>{await _.nextTick(),Le(),setTimeout(Le,0)},{deep:!0}),_.watch(b,vt=>{vt&&_.nextTick().then(()=>{Le()})})}})}),_.onUnmounted(()=>{window.removeEventListener("resize",Le)});const ti=_.computed(()=>{var vt,At,Mt;return{height:((vt=O==null?void 0:O.value)==null?void 0:vt.height)||((Mt=(At=O==null?void 0:O.value)==null?void 0:At.map)==null?void 0:Mt.height)||"100vh",width:"100%"}}),ar=async()=>{const it=await Br.get(`/api/map/${p.table}`);O.value=it.data},Zi=it=>{if(!O.value||!O.value.widgets)return"400px";const vt=O.value.widgets.find(At=>At.position===it);return(vt==null?void 0:vt.width)||"400px"},Nr=_.ref([]);_.watch(()=>O.value,it=>{it&&it.map&&(Nr.value=Ki(),xr())});const Ki=()=>{var vt;if(!O.value||!O.value.widgets)return[];const it=O.value.widgets.find(At=>At.type==="layers");return(vt=it==null?void 0:it.config)!=null&&vt.layers?it.config.layers.map(At=>({...At,visible:At.visible??!1})).filter(At=>At.visible).map(At=>At.id):[]};function fr(it,vt,At,Mt){it.getStyle().layers.filter(Et=>Et.source===vt).forEach(Et=>{var or;const zt={source:vt,id:At};((or=it.getSource(vt))==null?void 0:or.type)==="vector"&&Et["source-layer"]&&(zt.sourceLayer=Et["source-layer"]),it.setFeatureState(zt,Mt)})}const on=_.computed(()=>!!O.value&&!!O.value.interactions&&!!O.value.interactions.navigation&&O.value.interactions.navigation.enabled),Ti=_.computed(()=>!!O.value&&Array.isArray(O.value.tools)&&O.value.tools.length>0),Ur=_.computed(()=>on.value||Ti.value?"70px":"20px");function Bi(){y.value&&(y.value.getLayer("layer-with-pulsing-dot")&&y.value.removeLayer("layer-with-pulsing-dot"),y.value.getSource("dot-point")&&y.value.removeSource("dot-point"),y.value.hasImage&&y.value.hasImage("pulsing-dot")&&y.value.removeImage("pulsing-dot"))}function ri(it){var Mt,Ht,Et,zt;Bi();const vt=80,At={width:vt,height:vt,data:new Uint8Array(vt*vt*4),onAdd(){const or=document.createElement("canvas");or.width=this.width,or.height=this.height,this.context=or.getContext("2d",{willReadFrequently:!0})},render(){var mi;const Jt=performance.now()%2e3/2e3,Ir=vt/2*.3,ii=vt/2*.7*Jt+Ir,{context:Vr}=this;Vr.clearRect(0,0,this.width,this.height),Vr.beginPath(),Vr.arc(this.width/2,this.height/2,ii,0,Math.PI*2),Vr.fillStyle=`rgba(255, 100, 100, ${1-Jt})`,Vr.fill();const ni=vt/2*.7*(Jt-.5<0?Jt-.5+1:Jt-.5)+Ir;return Vr.beginPath(),Vr.arc(this.width/2,this.height/2,ni,0,Math.PI*2),Vr.fillStyle=`rgba(255, 100, 100, ${1-(Jt-.5<0?Jt-.5+1:Jt-.5)})`,Vr.fill(),this.data=Vr.getImageData(0,0,this.width,this.height).data,(mi=y.value)==null||mi.triggerRepaint(),!0}};(Mt=y.value)!=null&&Mt.hasImage("pulsing-dot")||(Ht=y.value)==null||Ht.addImage("pulsing-dot",At,{pixelRatio:2}),(Et=y.value)==null||Et.addSource("dot-point",{type:"geojson",data:{type:"Feature",geometry:{type:"Point",coordinates:it}}}),(zt=y.value)==null||zt.addLayer({id:"layer-with-pulsing-dot",type:"symbol",source:"dot-point",layout:{"icon-image":"pulsing-dot"},paint:{"icon-opacity":.6}})}const Gi=_.computed(()=>{var it,vt,At,Mt,Ht,Et,zt,or,Jt,Ir;return{center:(vt=(it=O==null?void 0:O.value)==null?void 0:it.map)==null?void 0:vt.center,zoom:(Mt=(At=O==null?void 0:O.value)==null?void 0:At.map)==null?void 0:Mt.zoom,pitch:((Et=(Ht=O==null?void 0:O.value)==null?void 0:Ht.map)==null?void 0:Et.pitch)||0,bearing:((or=(zt=O==null?void 0:O.value)==null?void 0:zt.map)==null?void 0:or.bearing)||0,bbox:((Ir=(Jt=O==null?void 0:O.value)==null?void 0:Jt.map)==null?void 0:Ir.bbox)||null}}),Vi={home:O2,print:W2,geolocation:mS,pitch:G2,length:WS,area:sA},Cn=it=>{M.value=it};function Gr(it){if(!O.value||!O.value.widgets)return;const vt=O.value.widgets.find(Ht=>Ht.type==="list");if(!vt||!vt.config)return;const{map_key:At,service_key:Mt}=vt.config;At&&Mt&&(D.value={id:it,map:At,layer:Mt})}function fi(it){switch(it){case"top-left":return U.value;case"top-right":return G.value;case"top-center":return ie.value;case"center":return le.value;case"bottom-left":return Ie.value;case"bottom-right":return ee.value;case"bottom-center":return me.value;default:return 0}}const Jr=_.computed(()=>O.value&&O.value.widgets?O.value.widgets.filter(it=>it.position==="absolute"):[]);return(it,vt)=>{var At,Mt,Ht,Et;return _.openBlock(),_.createElementBlock("div",{id:"maplibre-demo-map",style:_.normalizeStyle(ti.value)},[b.value?_.createCommentVNode("",!0):(_.openBlock(),_.createBlock(M2,{key:0})),_.withDirectives(_.createElementVNode("div",cA,[(_.openBlock(),_.createElementBlock(_.Fragment,null,_.renderList(L,zt=>{var or,Jt;return _.createVNode(lA,{key:zt,position:zt,widgets:qe(zt),map:y.value,mapLoaded:b.value,cardValues:D.value,hasFilters:ct.value,history:(Jt=(or=O.value)==null?void 0:or.value)==null?void 0:Jt.history,currentFilterLayer:P.value,enabledLayerIds:Nr.value,getWidgetComponent:yt,getColumnWidth:Zi,rightColumnOffset:zt==="top-right"?Ur.value:void 0,maxHeight:fi(zt),ref_for:!0,ref:Ir=>T(zt,Ir),onSetFilterLayer:_t,"onUpdate:enabledLayerIds":vt[0]||(vt[0]=Ir=>Nr.value=Ir),onCardValuesId:Gr,onCloseCard:gr,onContentResize:()=>Le(zt)},null,8,["position","widgets","map","mapLoaded","cardValues","hasFilters","history","currentFilterLayer","enabledLayerIds","rightColumnOffset","maxHeight","onContentResize"])}),64)),(Mt=(At=O.value)==null?void 0:At.value)!=null&&Mt.tools?(_.openBlock(),_.createElementBlock("div",uA,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList((Et=(Ht=O.value)==null?void 0:Ht.value)==null?void 0:Et.tools,zt=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:zt},[b.value&&Vi[zt]?(_.openBlock(),_.createBlock(_.resolveDynamicComponent(Vi[zt]),_.mergeProps({key:0,map:y.value,activeTool:M.value,setActiveTool:Cn},{ref_for:!0},zt==="home"?{initialView:Gi.value}:{},{onCardValuesId:Gr}),null,16,["map","activeTool"])):_.createCommentVNode("",!0)],64))),128))])):_.createCommentVNode("",!0)],512),[[_.vShow,b.value]]),(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(Jr.value,(zt,or)=>(_.openBlock(),_.createElementBlock("div",{key:"abs-"+(zt.id||zt.type||or),class:"absolute z-20",style:_.normalizeStyle(zt.style)},[(_.openBlock(),_.createBlock(_.resolveDynamicComponent(yt(zt.type)),{map:y.value,config:zt.config,hasFilters:ct.value,currentFilterLayer:P.value,enabledLayerIds:Nr.value,cardValues:D.value,onSetFilterLayer:_t,"onUpdate:enabledLayerIds":vt[1]||(vt[1]=Jt=>Nr.value=Jt),onCardValuesId:Gr,onCloseCard:gr},null,40,["map","config","hasFilters","currentFilterLayer","enabledLayerIds","cardValues"]))],4))),128))],4)}}},dA=pr(hA,[["__scopeId","data-v-edaa6750"]]),pA={props:{title:{type:String,required:!0},description:{type:String,required:!0}}},fA={class:"text-center mb-12"},mA={class:"text-3xl font-bold mb-4"},gA={class:"text-slate-600 max-w-2xl mx-auto"};function yA(u,p,y,b,k,P){return _.openBlock(),_.createElementBlock("div",fA,[_.createElementVNode("h2",mA,_.toDisplayString(y.title),1),_.createElementVNode("p",gA,_.toDisplayString(y.description),1)])}const Sy=pr(pA,[["render",yA]]),_A={name:"RegistryList",components:{HeroBlock:Sy},props:{title:{type:String,required:!0},description:{type:String,default:""},type:{type:String,default:"data"},items:{type:Array,default:()=>[]},total:{type:Number,default:0},filters:{type:Array,default:()=>null},emptyStateText:{type:String,default:"Немає даних"},limit:{type:Number,default:16},breadcrumbs:{type:Array,default:()=>[]},dialog:{type:Boolean,default:!0},token:{type:String,default:""},table:{type:String,required:!0}},data(){return{filterUrl:"",mounted:!1,tableData:[],currentPage:1,limit:16,localTotal:0}},created(){this.tableData=this.items,this.localTotal=this.total},mounted(){this.mounted=!0},methods:{handleFilterChange({url:u}){this.currentPage=1,this.filterUrl=u,this.getData()},handlePageChange(u){this.currentPage=u,this.getData()},changeLimit(u){this.limit=u,this.currentPage=1,this.getData()},async getData(){try{const u=this.type==="registry"?"/api/gis-registry":"/api/data",{data:p}=await Br.get(`${u}/${this.table}?filter=${this.filterUrl}&page=${this.currentPage}&limit=${this.limit}`);p&&(this.tableData=p==null?void 0:p.rows,this.localTotal=this.type==="registry"?p==null?void 0:p.total:p==null?void 0:p.filtered)}catch(u){console.error(u.message)}}}},vA={class:"py-16 md:py-24"},xA={class:"py-6"},bA={class:"container"},wA={key:0,class:"flex items-center text-sm text-muted-foreground mb-6"},SA=["href"],AA={key:1,class:"text-foreground font-medium truncate"},kA={class:"flex flex-col md:flex-row gap-4 justify-end"},CA={class:"container"},TA={key:0,class:"space-y-4"},EA={class:"my-5 pr-2"},PA={class:"paginationWrapper relative flex justify-center"},IA={key:1,class:"text-center text-slate-400"};function MA(u,p,y,b,k,P){var D,M;const x=_.resolveComponent("HeroBlock"),o=_.resolveComponent("VsFilterList"),B=_.resolveComponent("VsPagination");return _.openBlock(),_.createElementBlock("div",vA,[_.createElementVNode("section",null,[_.createVNode(x,{title:y.title,description:y.description},null,8,["title","description"])]),_.createElementVNode("section",xA,[_.createElementVNode("div",bA,[(D=y.breadcrumbs)!=null&&D.length?(_.openBlock(),_.createElementBlock("div",wA,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.breadcrumbs,(O,L)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:L},[L<y.breadcrumbs.length-1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:0},[_.createElementVNode("a",{href:O.link,class:"hover:text-foreground"},_.toDisplayString(O.name),9,SA),p[0]||(p[0]=_.createElementVNode("span",{class:"mx-2"},"/",-1))],64)):(_.openBlock(),_.createElementBlock("span",AA,_.toDisplayString(O.name),1))],64))),128))])):_.createCommentVNode("",!0),_.createElementVNode("div",kA,[y.filters&&k.mounted?(_.openBlock(),_.createBlock(o,{key:0,ref:"filter",scheme:y.filters,isDialog:y.dialog,urlSeparator:"true",view:"plain",token:y.token,name:"filter",onFilterChange:P.handleFilterChange},{button:_.withCtx(()=>p[1]||(p[1]=[_.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background hover:bg-accent hover:text-accent-foreground px-3 py-2",type:"button"}," Фільтри ",-1)])),_:1},8,["scheme","isDialog","token","onFilterChange"])):_.createCommentVNode("",!0)])])]),_.createElementVNode("section",null,[_.createElementVNode("div",CA,[((M=k.tableData)==null?void 0:M.length)>0?(_.openBlock(),_.createElementBlock("div",TA,[_.renderSlot(u.$slots,"default",{items:k.tableData}),_.createElementVNode("div",EA,[_.createElementVNode("div",PA,[_.createVNode(B,{total:k.localTotal,maxPages:4,defaultPage:k.currentPage,pageSize:k.limit,goTo:!1,size:"medium",backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[9,18,27,36],onPageChange:P.handlePageChange,onPageSizeChange:P.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])])):(_.openBlock(),_.createElementBlock("div",IA,_.toDisplayString(y.emptyStateText),1))])])])}const Ay=pr(_A,[["render",MA]]),LA={name:"Template2",props:{items:{type:Array,required:!0},path:{type:String,required:!0}},methods:{formatDate(u){return new Date(u).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"})}}},RA={class:"flex flex-col space-y-1.5 p-4 pb-2 bg-slate-50"},DA={class:"flex items-center justify-between"},zA={class:"text-lg font-bold line-clamp-2"},BA={class:"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground ml-2 whitespace-nowrap","data-v0-t":"badge"},VA={class:"p-4 pt-2"},OA={class:"grid grid-cols-2 gap-3 text-sm"},FA={class:"flex items-center gap-1.5"},NA={class:"font-medium"},qA={class:"flex items-center gap-1.5"},UA={class:"font-medium"},jA={class:"flex items-center gap-1.5"},HA={class:"font-medium"},WA={class:"flex items-center gap-1.5"},ZA={class:"font-medium"},KA={class:"items-center p-3 bg-slate-50 flex justify-end"},GA=["href"];function JA(u,p,y,b,k,P){return _.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.items,x=>(_.openBlock(),_.createElementBlock("div",{key:x.id,class:"rounded-lg border bg-card text-card-foreground overflow-hidden border-none shadow-md relative","data-v0-t":"card"},[p[8]||(p[8]=_.createElementVNode("div",{class:"absolute left-0 top-0 bottom-0 w-1 bg-blue-500"},null,-1)),_.createElementVNode("div",RA,[_.createElementVNode("div",DA,[_.createElementVNode("h2",zA,_.toDisplayString(x.name),1),_.createElementVNode("div",BA,_.toDisplayString(x.status_text),1)])]),_.createElementVNode("div",VA,[_.createElementVNode("div",OA,[_.createElementVNode("div",FA,[p[0]||(p[0]=_.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hash h-3.5 w-3.5 text-muted-foreground flex-shrink-0"><line x1="4" x2="20" y1="9" y2="9"></line><line x1="4" x2="20" y1="15" y2="15"></line><line x1="10" x2="8" y1="3" y2="21"></line><line x1="16" x2="14" y1="3" y2="21"></line></svg>',1)),_.createElementVNode("div",null,[_.createElementVNode("span",NA,_.toDisplayString(x.parent_text),1)])]),_.createElementVNode("div",qA,[p[2]||(p[2]=_.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-building h-3.5 w-3.5 text-muted-foreground flex-shrink-0"><rect width="16" height="20" x="4" y="2" rx="2" ry="2"></rect><path d="M9 22v-4h6v4"></path><path d="M8 6h.01"></path><path d="M16 6h.01"></path><path d="M12 6h.01"></path><path d="M12 10h.01"></path><path d="M12 14h.01"></path><path d="M16 10h.01"></path><path d="M16 14h.01"></path><path d="M8 10h.01"></path><path d="M8 14h.01"></path></svg>',1)),_.createElementVNode("div",null,[p[1]||(p[1]=_.createElementVNode("span",{class:"text-muted-foreground"},"Статус: ",-1)),_.createElementVNode("span",UA,_.toDisplayString(x.status_text),1)])]),_.createElementVNode("div",jA,[p[4]||(p[4]=_.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-building h-3.5 w-3.5 text-muted-foreground flex-shrink-0"><rect width="16" height="20" x="4" y="2" rx="2" ry="2"></rect><path d="M9 22v-4h6v4"></path><path d="M8 6h.01"></path><path d="M16 6h.01"></path><path d="M12 6h.01"></path><path d="M12 10h.01"></path><path d="M12 14h.01"></path><path d="M16 10h.01"></path><path d="M16 14h.01"></path><path d="M8 10h.01"></path><path d="M8 14h.01"></path></svg>',1)),_.createElementVNode("div",null,[_.createElementVNode("div",null,[p[3]||(p[3]=_.createElementVNode("span",{class:"text-muted-foreground"},"Тип: ",-1)),_.createElementVNode("span",HA,_.toDisplayString(x.type_text),1)])])]),_.createElementVNode("div",WA,[p[6]||(p[6]=_.createStaticVNode('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-calendar h-3.5 w-3.5 text-muted-foreground flex-shrink-0"><path d="M8 2v4"></path><path d="M16 2v4"></path><rect width="18" height="18" x="3" y="4" rx="2"></rect><path d="M3 10h18"></path></svg>',1)),_.createElementVNode("div",null,[p[5]||(p[5]=_.createElementVNode("span",{class:"text-muted-foreground"},"Дата видачі: ",-1)),_.createElementVNode("span",ZA,_.toDisplayString(P.formatDate(x.cdate)),1)])])])]),_.createElementVNode("div",KA,[_.createElementVNode("a",{href:`${y.path}/${x.id}`,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background hover:bg-accent hover:text-accent-foreground h-9 rounded-md px-3"},p[7]||(p[7]=[_.createTextVNode(" Детальніше"),_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-arrow-right ml-1 h-3.5 w-3.5"},[_.createElementVNode("path",{d:"M5 12h14"}),_.createElementVNode("path",{d:"m12 5 7 7-7 7"})],-1)]),8,GA)])]))),128)}const XA=pr(LA,[["render",JA]]),QA={name:"Template2",props:{items:{type:Array,required:!0},path:{type:String,required:!0}},methods:{formatDate(u){return new Date(u).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"})}}},YA={class:"flex flex-col space-y-1.5 p-6 pb-2 border-b"},$A={class:"flex justify-between items-center"},ek={class:"tracking-tight text-lg font-medium"},tk={class:"inline-flex items-center rounded-full bg-blue-100 px-2.5 py-0.5 text-xs font-medium text-blue-800"},rk={class:"p-6 py-4"},ik={class:"grid grid-cols-1 gap-3"},nk={class:"flex items-center"},ok={class:"font-medium"},sk={class:"flex items-center"},ak={class:"font-medium"},lk={class:"items-center p-6 pt-0 flex justify-end"},ck=["href"];function uk(u,p,y,b,k,P){return _.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.items,x=>(_.openBlock(),_.createElementBlock("div",{key:x.id,class:"rounded-lg bg-card text-card-foreground border-0 shadow-md","data-v0-t":"card"},[_.createElementVNode("div",YA,[_.createElementVNode("div",$A,[_.createElementVNode("h3",ek,_.toDisplayString(x.name),1),_.createElementVNode("span",tk,_.toDisplayString(x.status_text),1)])]),_.createElementVNode("div",rk,[_.createElementVNode("div",ik,[_.createElementVNode("div",nk,[p[0]||(p[0]=_.createElementVNode("div",{class:"w-32 flex-shrink-0"},[_.createElementVNode("p",{class:"text-sm font-semibold text-gray-500"},"Номер адреси:")],-1)),_.createElementVNode("p",ok,_.toDisplayString(x.parent_text),1)]),_.createElementVNode("div",sk,[p[1]||(p[1]=_.createElementVNode("div",{class:"w-32 flex-shrink-0"},[_.createElementVNode("p",{class:"text-sm font-semibold text-gray-500"},"Дата видачі:")],-1)),_.createElementVNode("p",ak,_.toDisplayString(P.formatDate(x.cdate)),1)])])]),_.createElementVNode("div",lk,[_.createElementVNode("a",{href:`${y.path}/${x.id}`,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 h-10 px-4 py-2 rounded-md bg-gray-900 text-white hover:bg-black"}," Детальніше ",8,ck)])]))),128)}const hk=pr(QA,[["render",uk]]),dk={name:"Template3",props:{items:{type:Array,required:!0},path:{type:String,required:!0}},methods:{formatDate(u){return new Date(u).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"})}}},pk={class:"flex items-center py-2 px-3"},fk={class:"grid grid-cols-12 gap-2 w-full text-sm"},mk={class:"col-span-5"},gk={class:"font-medium line-clamp-1"},yk={class:"inline-flex items-center rounded-full border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80 mt-1 text-[10px] font-normal px-1.5 py-0","data-v0-t":"badge"},_k={class:"col-span-2"},vk={class:"truncate"},xk={class:"col-span-2"},bk={class:"truncate"},wk={class:"col-span-2"},Sk={class:"col-span-1 flex justify-end items-center"},Ak=["href"];function kk(u,p,y,b,k,P){return _.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.items,x=>(_.openBlock(),_.createElementBlock("div",{class:"border-b border-slate-200 hover:bg-slate-50 transition-colors",key:x.id},[_.createElementVNode("div",pk,[p[4]||(p[4]=_.createElementVNode("div",{class:"w-1 h-8 rounded-full mr-3 bg-blue-500"},null,-1)),_.createElementVNode("div",fk,[_.createElementVNode("div",mk,[_.createElementVNode("p",gk,_.toDisplayString(x.name),1),_.createElementVNode("div",yk,_.toDisplayString(x.type_text),1)]),_.createElementVNode("div",_k,[p[0]||(p[0]=_.createElementVNode("p",{class:"text-[10px] text-muted-foreground"},"Територіальна належність",-1)),_.createElementVNode("p",vk,_.toDisplayString(x.parent_text),1)]),_.createElementVNode("div",xk,[p[1]||(p[1]=_.createElementVNode("p",{class:"text-[10px] text-muted-foreground"},"Статус",-1)),_.createElementVNode("p",bk,_.toDisplayString(x.status_text),1)]),_.createElementVNode("div",wk,[p[2]||(p[2]=_.createElementVNode("p",{class:"text-[10px] text-muted-foreground"},"Дата видачі",-1)),_.createElementVNode("p",null,_.toDisplayString(P.formatDate(x.cdate)),1)]),_.createElementVNode("div",Sk,[_.createElementVNode("a",{href:`${y.path}/${x.id}`,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-7 w-7 p-0"},p[3]||(p[3]=[_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-chevron-right h-4 w-4"},[_.createElementVNode("path",{d:"m9 18 6-6-6-6"})],-1)]),8,Ak)])])])]))),128)}const Ck=pr(dk,[["render",kk]]),Tk={name:"Template3",props:{items:{type:Array,required:!0},path:{type:String,required:!0}},methods:{formatDate(u){return u?new Date(u).toLocaleDateString("uk-UA",{day:"2-digit",month:"2-digit",year:"numeric"}):"Не вказано"}}},Ek={class:"grid grid-cols-12 divide-x divide-gray-100"},Pk={class:"col-span-7 p-4"},Ik={class:"flex items-center mb-1"},Mk={class:"text-base font-bold text-gray-900 mr-2"},Lk={class:"inline-flex items-center rounded-full px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 border-transparent hover:bg-primary/80 bg-blue-100 text-blue-800 border-0 text-xs"},Rk={class:"text-sm text-gray-600 line-clamp-1 mb-2"},Dk={class:"grid grid-cols-2 gap-x-4 gap-y-1 text-sm"},zk={class:"flex items-center"},Bk={class:"text-gray-600 truncate"},Vk={class:"col-span-2 flex flex-col justify-center items-center bg-gray-50 border-l p-2"},Ok={class:"w-full space-y-2"},Fk=["href"];function Nk(u,p,y,b,k,P){return _.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.items,x=>(_.openBlock(),_.createElementBlock("div",{key:x.id,class:"bg-white border border-gray-200 rounded-lg overflow-hidden transition-all duration-200 hover:shadow-md"},[_.createElementVNode("div",Ek,[p[2]||(p[2]=_.createElementVNode("div",{class:"col-span-1 flex items-center justify-center"},[_.createElementVNode("div",{class:"w-3 h-12 rounded-sm bg-red-500",title:"Пріоритет: Високий","aria-hidden":"true"})],-1)),_.createElementVNode("div",Pk,[_.createElementVNode("div",Ik,[_.createElementVNode("h3",Mk,_.toDisplayString(x.name),1),_.createElementVNode("div",Lk,_.toDisplayString(x.type_text),1)]),_.createElementVNode("p",Rk,_.toDisplayString(x.parent_text),1),_.createElementVNode("div",Dk,[_.createElementVNode("div",zk,[p[0]||(p[0]=_.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-clock h-3.5 w-3.5 text-gray-400 mr-1 flex-shrink-0"},[_.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),_.createElementVNode("polyline",{points:"12 6 12 12 16 14"})],-1)),_.createElementVNode("span",Bk,"Оновлено: "+_.toDisplayString(P.formatDate(x.editor_date)),1)])])]),p[3]||(p[3]=_.createStaticVNode('<div class="col-span-2 p-3 bg-gray-50 flex flex-col justify-center"><p class="text-xs text-gray-500 mb-1.5">Категорії:</p><div class="flex flex-wrap gap-1"><div class="inline-flex items-center rounded-full font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:bg-secondary/80 bg-white border border-gray-200 text-gray-700 text-xs px-1.5 py-0"> Житловий </div><div class="inline-flex items-center rounded-full font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover:bg-secondary/80 bg-white border border-gray-200 text-gray-700 text-xs px-1.5 py-0"> Центр </div></div></div>',1)),_.createElementVNode("div",Vk,[_.createElementVNode("div",Ok,[_.createElementVNode("a",{href:`${y.path}/${x.id}`,class:"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md px-3 w-full bg-blue-600 hover:bg-blue-700 text-white text-xs h-8"}," Детальніше",8,Fk),p[1]||(p[1]=_.createElementVNode("button",{disabled:"",class:"inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border bg-background hover:text-accent-foreground rounded-md px-3 w-full text-gray-700 border-gray-300 hover:bg-gray-100 text-xs h-8"}," Завантажити ",-1))])])])]))),128)}const qk=pr(Tk,[["render",Nk]]),Uk={template1:XA,template2:hk,template3:Ck,template4:qk},jk={name:"RegistryList",components:{HeroBlock:Sy,...Uk},props:{title:{type:String,required:!0},description:{type:String,default:""},type:{type:String,default:"list"},items:{type:Array,default:()=>[]},total:{type:Number,default:0},filters:{type:Array,default:()=>null},emptyStateText:{type:String,default:"Немає даних"},limit:{type:Number,default:16},currentPage:{type:Number,default:1},breadcrumbs:{type:Array,default:()=>[]},path:{type:String,default:""},id_key:{type:String,default:"id"},dialog:{type:Boolean,default:!0},token:{type:String,default:""},table:{type:String,required:!0}},data(){return{filterUrl:"",mounted:!1,templateViews:[{value:"template1",label:"Шаблон 1"},{value:"template2",label:"Шаблон 2"},{value:"template3",label:"Шаблон 3"},{value:"template4",label:"Шаблон 4"}],templateView:"template1",tableData:[],localTotal:0}},created(){this.tableData=this.items,this.localTotal=this.total},mounted(){this.mounted=!0},methods:{handleFilterChange({url:u}){this.currentPage=1,this.filterUrl=u,this.getData()},handlePageChange(u){this.currentPage=u,this.getData(),this.$nextTick(()=>{this.$refs.componentRef.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"})})},changeLimit(u){this.limit=u,this.currentPage=1,this.getData()},async getData(){try{const u=this.type==="registry"?"/api/gis-registry":"/api/data",{data:p}=await Br.get(`${u}/${this.table}?filter=${this.filterUrl}&page=${this.currentPage}&limit=${this.limit}`);p&&(this.tableData=p==null?void 0:p.rows,this.localTotal=this.type==="registry"?p==null?void 0:p.filtered:p==null?void 0:p.total)}catch(u){console.error(u.message)}}}},Hk={class:"py-16 md:py-24"},Wk={class:"py-6",ref:"componentRef"},Zk={class:"container"},Kk={key:0,class:"flex items-center text-sm text-muted-foreground mb-6"},Gk=["href"],Jk={key:1,class:"text-foreground font-medium truncate"},Xk={class:"flex flex-col md:flex-row gap-4 justify-end"},Qk={class:"container"},Yk={key:0,class:"space-y-4"},$k={class:"my-5 pr-2"},eC={class:"paginationWrapper relative flex justify-center"},tC={key:1,class:"text-center text-slate-400"};function rC(u,p,y,b,k,P){var O,L;const x=_.resolveComponent("HeroBlock"),o=_.resolveComponent("VsFilterList"),B=_.resolveComponent("VsAutocompleteOption"),D=_.resolveComponent("VsAutocomplete"),M=_.resolveComponent("VsPagination");return _.openBlock(),_.createElementBlock("div",Hk,[_.createElementVNode("section",null,[_.createVNode(x,{title:y.title,description:y.description,path:y.path},null,8,["title","description","path"])]),_.createElementVNode("section",Wk,[_.createElementVNode("div",Zk,[(O=y.breadcrumbs)!=null&&O.length?(_.openBlock(),_.createElementBlock("div",Kk,[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(y.breadcrumbs,(C,T)=>(_.openBlock(),_.createElementBlock(_.Fragment,{key:T},[T<y.breadcrumbs.length-1?(_.openBlock(),_.createElementBlock(_.Fragment,{key:0},[_.createElementVNode("a",{href:C.link,class:"hover:text-foreground"},_.toDisplayString(C.name),9,Gk),p[1]||(p[1]=_.createElementVNode("span",{class:"mx-2"},"/",-1))],64)):(_.openBlock(),_.createElementBlock("span",Jk,_.toDisplayString(C.name),1))],64))),128))])):_.createCommentVNode("",!0),_.createElementVNode("div",Xk,[y.filters&&k.mounted?(_.openBlock(),_.createBlock(o,{key:0,ref:"filter",scheme:y.filters,token:y.token,isDialog:y.dialog,urlSeparator:"true",view:"plain",name:"filter",onFilterChange:P.handleFilterChange},{button:_.withCtx(()=>p[2]||(p[2]=[_.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background hover:bg-accent hover:text-accent-foreground px-3 py-2",type:"button"}," Фільтри ",-1)])),_:1},8,["scheme","token","isDialog","onFilterChange"])):_.createCommentVNode("",!0),_.createVNode(D,{modelValue:k.templateView,"onUpdate:modelValue":p[0]||(p[0]=C=>k.templateView=C),class:"w-[150px]"},{default:_.withCtx(()=>[(_.openBlock(!0),_.createElementBlock(_.Fragment,null,_.renderList(k.templateViews,C=>(_.openBlock(),_.createBlock(B,{label:C.label,value:C.value},{default:_.withCtx(()=>[_.createTextVNode(_.toDisplayString(C.label),1)]),_:2},1032,["label","value"]))),256))]),_:1},8,["modelValue"])])])],512),_.createElementVNode("section",null,[_.createElementVNode("div",Qk,[((L=k.tableData)==null?void 0:L.length)>0?(_.openBlock(),_.createElementBlock("div",Yk,[(_.openBlock(),_.createBlock(_.resolveDynamicComponent(k.templateView),{items:k.tableData,path:y.path,id_key:y.id_key},null,8,["items","path","id_key"])),_.createElementVNode("div",$k,[_.createElementVNode("div",eC,[_.createVNode(M,{total:k.localTotal,maxPages:4,defaultPage:y.currentPage,pageSize:y.limit,goTo:!1,size:"medium",backgroundColor:"#e5e7eb",borderedCellSelected:!0,pageSizes:[10,20,30,40],onPageChange:P.handlePageChange,onPageSizeChange:P.changeLimit},null,8,["total","defaultPage","pageSize","onPageChange","onPageSizeChange"])])])])):(_.openBlock(),_.createElementBlock("div",tC,_.toDisplayString(y.emptyStateText),1))])])])}const ky=pr(jk,[["render",rC]]),iC={class:"pt-[10px]"},nC={__name:"vs-editor-style-ace",props:{yamlValue:{type:null,default:()=>""}},setup(u){const p=u,y=_.ref(p.yamlValue);return(b,k)=>{const P=_.resolveComponent("VsFormAce");return _.openBlock(),_.createElementBlock("div",iC,[_.createVNode(P,{modelValue:y.value,"onUpdate:modelValue":k[0]||(k[0]=x=>y.value=x),value:y.value,fontSize:"12px"},null,8,["modelValue","value"])])}}},oC={components:{VsEditorStyleAce:nC},props:{data:Object,value:null,name:String},data(){var u,p,y;return{style:((y=(p=(u=this.data)==null?void 0:u.rows)==null?void 0:p[0])==null?void 0:y.style)||""}}};function sC(u,p,y,b,k,P){const x=_.resolveComponent("VsEditorStyleAce");return _.openBlock(),_.createBlock(x,{yamlValue:k.style,onChangeData:u.onChange,height:500,onUpdate:u.getData},null,8,["yamlValue","onChangeData","onUpdate"])}const aC=pr(oC,[["render",sC]]),lC={install(u){u.component("MapCustom",dA),u.component("RegistryList",Ay),u.component("RegistryListCustom",ky),u.component("vs-style-yml",aC)}};exports.RegistryList=Ay;exports.RegistryListCustom=ky;exports.default=lC;